@skodaflow/web-library 4.2.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 (651) hide show
  1. package/README.md +61 -47
  2. package/cjs/components/accordion/accordion.d.ts +2 -2
  3. package/cjs/components/accordion/accordion.js +1 -1
  4. package/cjs/components/accordion/accordion.js.map +1 -1
  5. package/cjs/components/banner/banner.d.ts +13 -51
  6. package/cjs/components/banner/banner.js +1 -1
  7. package/cjs/components/banner/banner.js.map +1 -1
  8. package/cjs/components/button/button.d.ts +2 -1
  9. package/cjs/components/button/button.js +1 -1
  10. package/cjs/components/button/button.js.map +1 -1
  11. package/cjs/components/card/Card.d.ts +92 -0
  12. package/cjs/components/card/Card.js +2 -0
  13. package/cjs/components/card/Card.js.map +1 -0
  14. package/cjs/components/card/FlippingCard.d.ts +3 -0
  15. package/cjs/components/card/FlippingCard.js +2 -0
  16. package/cjs/components/card/FlippingCard.js.map +1 -0
  17. package/cjs/components/card/LinkCard.d.ts +3 -0
  18. package/cjs/components/card/LinkCard.js +2 -0
  19. package/cjs/components/card/LinkCard.js.map +1 -0
  20. package/cjs/components/card/SelectableCard.d.ts +3 -0
  21. package/cjs/components/card/SelectableCard.js +2 -0
  22. package/cjs/components/card/SelectableCard.js.map +1 -0
  23. package/cjs/components/card/SimpleCard.d.ts +3 -0
  24. package/cjs/components/card/SimpleCard.js +2 -0
  25. package/cjs/components/card/SimpleCard.js.map +1 -0
  26. package/cjs/components/card/index.d.ts +1 -0
  27. package/cjs/components/cardContainer/cardContainer.d.ts +1 -0
  28. package/cjs/components/cardContainer/cardContainer.js.map +1 -1
  29. package/cjs/components/cardMenu/cardMenu.d.ts +2 -1
  30. package/cjs/components/cardMenu/cardMenu.js +1 -1
  31. package/cjs/components/cardMenu/cardMenu.js.map +1 -1
  32. package/cjs/components/cardMenu/styled/menuListStyled.d.ts +1 -1
  33. package/cjs/components/chip/chipDropdownChildren/chipDropdownChildren.js +1 -1
  34. package/cjs/components/chip/chipDropdownChildren/chipDropdownChildren.js.map +1 -1
  35. package/cjs/components/chip/chipMultiselect/multiSelectChip.d.ts +2 -1
  36. package/cjs/components/chip/chipMultiselect/multiSelectChip.js +1 -1
  37. package/cjs/components/chip/chipMultiselect/multiSelectChip.js.map +1 -1
  38. package/cjs/components/chip/regular/chip.d.ts +2 -1
  39. package/cjs/components/chip/regular/chip.js +1 -1
  40. package/cjs/components/chip/regular/chip.js.map +1 -1
  41. package/cjs/components/closeDialogButton/index.js +1 -1
  42. package/cjs/components/closeDialogButton/index.js.map +1 -1
  43. package/cjs/components/common/hook/useWindowSize.js +1 -1
  44. package/cjs/components/common/hook/useWindowSize.js.map +1 -1
  45. package/cjs/components/common/interface/textInputInterface.d.ts +2 -1
  46. package/cjs/components/common/styled/textFieldStyled.d.ts +1 -1
  47. package/cjs/components/controls/controls.d.ts +2 -1
  48. package/cjs/components/controls/controls.js +1 -1
  49. package/cjs/components/controls/controls.js.map +1 -1
  50. package/cjs/components/icon/icon.d.ts +11 -2
  51. package/cjs/components/icon/icon.definitions.d.ts +847 -0
  52. package/cjs/components/icon/icon.definitions.js +2 -0
  53. package/cjs/components/icon/icon.definitions.js.map +1 -0
  54. package/cjs/components/icon/icon.js +1 -1
  55. package/cjs/components/icon/icon.js.map +1 -1
  56. package/cjs/components/icon/index.d.ts +1 -1
  57. package/cjs/components/iconButton/index.d.ts +1 -1
  58. package/cjs/components/index.d.ts +1 -0
  59. package/cjs/components/indicator/indicator.d.ts +9 -3
  60. package/cjs/components/indicator/indicator.js +1 -18
  61. package/cjs/components/indicator/indicator.js.map +1 -1
  62. package/cjs/components/label/label.js.map +1 -1
  63. package/cjs/components/labelFeature/labelFeature.js.map +1 -1
  64. package/cjs/components/labelStatus/labelStatus.d.ts +1 -0
  65. package/cjs/components/labelStatus/labelStatus.js.map +1 -1
  66. package/cjs/components/menu/menu.js +1 -1
  67. package/cjs/components/menu/menu.js.map +1 -1
  68. package/cjs/components/mobileStepper/index.d.ts +1 -0
  69. package/cjs/components/mobileStepper/mobileStepper.d.ts +1 -1
  70. package/cjs/components/mobileStepper/mobileStepper.js +1 -1
  71. package/cjs/components/mobileStepper/mobileStepper.js.map +1 -1
  72. package/cjs/components/mobileStepper/mobileStepperButton.d.ts +4 -0
  73. package/cjs/components/mobileStepper/mobileStepperButton.js +2 -0
  74. package/cjs/components/mobileStepper/mobileStepperButton.js.map +1 -0
  75. package/cjs/components/modal/modal.d.ts +12 -0
  76. package/cjs/components/modal/modal.js +1 -1
  77. package/cjs/components/modal/modal.js.map +1 -1
  78. package/cjs/components/pagination/pagination.js +1 -1
  79. package/cjs/components/pagination/pagination.js.map +1 -1
  80. package/cjs/components/progressBar/components/loader.js +1 -1
  81. package/cjs/components/progressBar/components/loader.js.map +1 -1
  82. package/cjs/components/progressBar/components/spinner.js +1 -1
  83. package/cjs/components/progressBar/components/spinner.js.map +1 -1
  84. package/cjs/components/selectInput/formControlSelectStyled.d.ts +1 -1
  85. package/cjs/components/selectInput/selectInput.d.ts +2 -1
  86. package/cjs/components/selectInput/selectInput.js +1 -1
  87. package/cjs/components/selectInput/selectInput.js.map +1 -1
  88. package/cjs/components/slider/slider.d.ts +3 -3
  89. package/cjs/components/slider/slider.js +1 -1
  90. package/cjs/components/slider/slider.js.map +1 -1
  91. package/cjs/components/snackbar/snackbarMessage.js +1 -1
  92. package/cjs/components/snackbar/snackbarMessage.js.map +1 -1
  93. package/cjs/components/stepper/stepper.d.ts +2 -2
  94. package/cjs/components/stepper/stepper.js +1 -1
  95. package/cjs/components/stepper/stepper.js.map +1 -1
  96. package/cjs/components/tab/hook/useTabs.d.ts +1 -0
  97. package/cjs/components/tab/hook/useTabs.js.map +1 -1
  98. package/cjs/components/tab/menuTab.d.ts +1 -0
  99. package/cjs/components/tab/menuTab.js +1 -1
  100. package/cjs/components/tab/menuTab.js.map +1 -1
  101. package/cjs/components/tab/secondaryNavigation/secondaryNavigationTabs.js +1 -1
  102. package/cjs/components/tab/secondaryNavigation/secondaryNavigationTabs.js.map +1 -1
  103. package/cjs/components/tab/tab.d.ts +1 -0
  104. package/cjs/components/tab/tab.js.map +1 -1
  105. package/cjs/components/tab/tabPanel.d.ts +1 -0
  106. package/cjs/components/tab/tabPanel.js.map +1 -1
  107. package/cjs/components/tab/tabStyled.d.ts +2 -1
  108. package/cjs/components/tab/tabStyled.js.map +1 -1
  109. package/cjs/components/tab/tabs.d.ts +1 -0
  110. package/cjs/components/tab/tabs.js.map +1 -1
  111. package/cjs/components/textInput/textInput.js +1 -1
  112. package/cjs/components/textInput/textInput.js.map +1 -1
  113. package/cjs/components/upload/UploadField.d.ts +2 -2
  114. package/cjs/components/upload/UploadField.js +1 -1
  115. package/cjs/components/upload/UploadField.js.map +1 -1
  116. package/cjs/components/upload/UploadPreview.d.ts +1 -1
  117. package/cjs/components/upload/UploadPreviewList.d.ts +1 -1
  118. package/cjs/components/upload/UploadPreviewList.js +1 -1
  119. package/cjs/components/upload/UploadPreviewList.js.map +1 -1
  120. package/cjs/design/skoda/components/accordion/accordion.theme.js +1 -1
  121. package/cjs/design/skoda/components/accordion/accordion.theme.js.map +1 -1
  122. package/cjs/design/skoda/components/accordion/accordionSummary.theme.js +1 -1
  123. package/cjs/design/skoda/components/accordion/accordionSummary.theme.js.map +1 -1
  124. package/cjs/design/skoda/components/autocomplete.theme.js +1 -1
  125. package/cjs/design/skoda/components/autocomplete.theme.js.map +1 -1
  126. package/cjs/design/skoda/components/{dialog.theme.js → dialog/dialog.theme.js} +1 -1
  127. package/cjs/design/skoda/components/dialog/dialog.theme.js.map +1 -0
  128. package/cjs/design/skoda/components/dialog/dialogActions.theme.js.map +1 -0
  129. package/cjs/design/skoda/components/dialog/dialogTitle.theme.js.map +1 -0
  130. package/cjs/design/skoda/components/form/filledInput.theme.js.map +1 -0
  131. package/cjs/design/skoda/components/form/formControl.theme.js.map +1 -0
  132. package/cjs/design/skoda/components/form/formControlLabel.theme.js.map +1 -0
  133. package/cjs/design/skoda/components/form/formHelperText.theme.js.map +1 -0
  134. package/cjs/design/skoda/components/form/formLabel.theme.js.map +1 -0
  135. package/cjs/design/skoda/components/form/input.theme.js.map +1 -0
  136. package/cjs/design/skoda/components/form/inputAdornment.theme.js.map +1 -0
  137. package/cjs/design/skoda/components/form/inputBase.theme.js.map +1 -0
  138. package/cjs/design/skoda/components/form/inputLabel.theme.js.map +1 -0
  139. package/cjs/design/skoda/components/form/radio.theme.js +2 -0
  140. package/cjs/design/skoda/components/form/radio.theme.js.map +1 -0
  141. package/cjs/design/skoda/components/form/select.theme.js +2 -0
  142. package/cjs/design/skoda/components/form/select.theme.js.map +1 -0
  143. package/cjs/design/skoda/components/form/slider.theme.js +2 -0
  144. package/cjs/design/skoda/components/form/slider.theme.js.map +1 -0
  145. package/cjs/design/skoda/components/form/switch.theme.js.map +1 -0
  146. package/cjs/design/skoda/components/form/textField.theme.js.map +1 -0
  147. package/cjs/design/skoda/components/layout/breakpoints.theme.js.map +1 -0
  148. package/cjs/design/skoda/components/layout/container.theme.js.map +1 -0
  149. package/cjs/design/skoda/components/layout/grid.theme.js.map +1 -0
  150. package/cjs/design/skoda/components/mobileStepper.theme.js +1 -1
  151. package/cjs/design/skoda/components/mobileStepper.theme.js.map +1 -1
  152. package/cjs/design/skoda/components/stepper/index.d.ts +1 -0
  153. package/cjs/design/skoda/components/stepper/stepIcon/errorStepIcon.d.ts +3 -0
  154. package/cjs/design/skoda/components/stepper/stepIcon/errorStepIcon.js +2 -0
  155. package/cjs/design/skoda/components/stepper/stepIcon/errorStepIcon.js.map +1 -0
  156. package/cjs/design/skoda/components/stepper/stepIcon/index.d.ts +2 -0
  157. package/cjs/design/skoda/components/stepper/stepIcon/index.js +2 -0
  158. package/cjs/design/skoda/components/stepper/stepIcon/index.js.map +1 -0
  159. package/cjs/design/skoda/components/stepper/stepIcon/qontoStepIcon.d.ts +2 -0
  160. package/cjs/design/skoda/components/stepper/stepIcon/qontoStepIcon.js +2 -0
  161. package/cjs/design/skoda/components/stepper/stepIcon/qontoStepIcon.js.map +1 -0
  162. package/cjs/design/skoda/components/stepper/stepper.theme.d.ts +3 -0
  163. package/cjs/design/skoda/components/stepper/stepper.theme.js +2 -0
  164. package/cjs/design/skoda/components/stepper/stepper.theme.js.map +1 -0
  165. package/cjs/design/skoda/components/tabs/tabs.theme.js +1 -1
  166. package/cjs/design/skoda/components/tabs/tabs.theme.js.map +1 -1
  167. package/cjs/design/skoda/theme.js +1 -1
  168. package/cjs/design/skoda/theme.js.map +1 -1
  169. package/cjs/index.js +1 -1
  170. package/cjs/layout/Error/ErrorContent.d.ts +6 -6
  171. package/cjs/layout/Error/ErrorContent.js +1 -1
  172. package/cjs/layout/Error/ErrorContent.js.map +1 -1
  173. package/cjs/layout/Footer/Footer.d.ts +3 -14
  174. package/cjs/layout/Footer/Footer.js +1 -1
  175. package/cjs/layout/Footer/Footer.js.map +1 -1
  176. package/cjs/layout/Footer/FooterAccordion.d.ts +18 -0
  177. package/cjs/layout/Footer/FooterAccordion.js +2 -0
  178. package/cjs/layout/Footer/FooterAccordion.js.map +1 -0
  179. package/cjs/layout/Footer/FooterIconButton.d.ts +6 -2
  180. package/cjs/layout/Footer/FooterIconButton.js +1 -1
  181. package/cjs/layout/Footer/FooterIconButton.js.map +1 -1
  182. package/cjs/layout/Footer/FooterLink.d.ts +15 -0
  183. package/cjs/layout/Footer/FooterLink.js +2 -0
  184. package/cjs/layout/Footer/FooterLink.js.map +1 -0
  185. package/cjs/layout/Footer/FooterMenu.d.ts +21 -0
  186. package/cjs/layout/Footer/FooterMenu.js +2 -0
  187. package/cjs/layout/Footer/FooterMenu.js.map +1 -0
  188. package/cjs/layout/Footer/FooterSectionContact.d.ts +12 -0
  189. package/cjs/layout/Footer/FooterSectionContact.js +2 -0
  190. package/cjs/layout/Footer/FooterSectionContact.js.map +1 -0
  191. package/cjs/layout/Footer/FooterSectionMenu.d.ts +5 -0
  192. package/cjs/layout/Footer/FooterSectionMenu.js +2 -0
  193. package/cjs/layout/Footer/FooterSectionMenu.js.map +1 -0
  194. package/cjs/layout/Footer/PredefinedFooterIconButtons.d.ts +5 -4
  195. package/cjs/layout/Footer/PredefinedFooterIconButtons.js +1 -1
  196. package/cjs/layout/Footer/PredefinedFooterIconButtons.js.map +1 -1
  197. package/cjs/layout/Footer/index.d.ts +5 -1
  198. package/cjs/layout/Header/HeaderButton.d.ts +3 -3
  199. package/cjs/layout/Header/HeaderButton.js +1 -1
  200. package/cjs/layout/Header/HeaderButton.js.map +1 -1
  201. package/cjs/layout/Header/PredefinedHeaderButtons.js +1 -1
  202. package/cjs/layout/Header/PredefinedHeaderButtons.js.map +1 -1
  203. package/cjs/layout/SideMenu/SideMenu.js +1 -1
  204. package/cjs/layout/SideMenu/SideMenu.js.map +1 -1
  205. package/cjs/layout/cookieModal/CookieModal.d.ts +69 -0
  206. package/cjs/layout/cookieModal/CookieModal.js +2 -0
  207. package/cjs/layout/cookieModal/CookieModal.js.map +1 -0
  208. package/cjs/layout/cookieModal/CookieModalItem.d.ts +37 -0
  209. package/cjs/layout/cookieModal/CookieModalItem.js +2 -0
  210. package/cjs/layout/cookieModal/CookieModalItem.js.map +1 -0
  211. package/cjs/layout/cookieModal/index.d.ts +2 -0
  212. package/cjs/layout/index.d.ts +1 -0
  213. package/cjs/organisms/cardOwnedVehicle/cardOwnedVehicleComponent.js +1 -1
  214. package/cjs/organisms/cardOwnedVehicle/cardOwnedVehicleComponent.js.map +1 -1
  215. package/cjs/organisms/cardPhotoAdjustable/cardPhotoAdjustable.js.map +1 -1
  216. package/cjs/organisms/cardPhotoFixed/cardPhotoFixed.js.map +1 -1
  217. package/cjs/organisms/cardTypeOnly/cardTypeOnly.js.map +1 -1
  218. package/cjs/organisms/carousel/carousel.d.ts +3 -2
  219. package/cjs/organisms/carousel/carouselTemplate.d.ts +2 -1
  220. package/cjs/organisms/carousel2/cardCarousel/cardCarousel.js +1 -1
  221. package/cjs/organisms/carousel2/cardCarousel/cardCarousel.js.map +1 -1
  222. package/cjs/organisms/carousel2/carousel2.d.ts +3 -2
  223. package/cjs/organisms/carousel2/components/NavButton.js +1 -1
  224. package/cjs/organisms/carousel2/components/NavButton.js.map +1 -1
  225. package/cjs/organisms/carousel2/heroCarousel/heroCarousel.js +1 -1
  226. package/cjs/organisms/carousel2/heroCarousel/heroCarousel.js.map +1 -1
  227. package/cjs/organisms/common/menuCardComponent/menuCardComponent.js +1 -1
  228. package/cjs/organisms/common/menuCardComponent/menuCardComponent.js.map +1 -1
  229. package/cjs/organisms/common/styled/cardStandardWrapperStyled.d.ts +1 -1
  230. package/cjs/organisms/gallery/Gallery.js +1 -1
  231. package/cjs/organisms/gallery/Gallery.js.map +1 -1
  232. package/cjs/organisms/gallery/GalleryTrigger.js +1 -1
  233. package/cjs/organisms/gallery/GalleryTrigger.js.map +1 -1
  234. package/cjs/organisms/heroImageCard/heroImageCard.js.map +1 -1
  235. package/cjs/organisms/heroImageCard/videoCardController.js +1 -1
  236. package/cjs/organisms/heroImageCard/videoCardController.js.map +1 -1
  237. package/cjs/organisms/hotspotCard/hotspotCard.d.ts +5 -12
  238. package/cjs/organisms/maps/mapComponents/infoWindowConfig.js.map +1 -1
  239. package/cjs/organisms/maps/maps.js.map +1 -1
  240. package/cjs/organisms/notification/Notification.js +1 -1
  241. package/cjs/organisms/notification/Notification.js.map +1 -1
  242. package/cjs/organisms/notification/NotificationCenterHeaderButton.d.ts +1 -1
  243. package/cjs/organisms/shortcutLink/shortcutLink.d.ts +2 -1
  244. package/cjs/organisms/shortcutLink/shortcutLink.js +1 -1
  245. package/cjs/organisms/shortcutLink/shortcutLink.js.map +1 -1
  246. package/cjs/organisms/textCta/textCta.d.ts +2 -1
  247. package/cjs/organisms/textCta/textCta.js +1 -1
  248. package/cjs/organisms/textCta/textCta.js.map +1 -1
  249. package/cjs/production/{Button.d.ts → Button/Button.d.ts} +1 -1
  250. package/cjs/production/Button/Button.js.map +1 -0
  251. package/cjs/production/Button/index.d.ts +1 -0
  252. package/cjs/production/index.js +1 -1
  253. package/cjs/utils/utilities.d.ts +1 -1
  254. package/components/accordion/accordion.d.ts +2 -2
  255. package/components/accordion/accordion.js +1 -1
  256. package/components/accordion/accordion.js.map +1 -1
  257. package/components/banner/banner.d.ts +13 -51
  258. package/components/banner/banner.js +1 -1
  259. package/components/banner/banner.js.map +1 -1
  260. package/components/button/button.d.ts +2 -1
  261. package/components/button/button.js +1 -1
  262. package/components/button/button.js.map +1 -1
  263. package/components/card/Card.d.ts +92 -0
  264. package/components/card/Card.js +2 -0
  265. package/components/card/Card.js.map +1 -0
  266. package/components/card/FlippingCard.d.ts +3 -0
  267. package/components/card/FlippingCard.js +2 -0
  268. package/components/card/FlippingCard.js.map +1 -0
  269. package/components/card/LinkCard.d.ts +3 -0
  270. package/components/card/LinkCard.js +2 -0
  271. package/components/card/LinkCard.js.map +1 -0
  272. package/components/card/SelectableCard.d.ts +3 -0
  273. package/components/card/SelectableCard.js +2 -0
  274. package/components/card/SelectableCard.js.map +1 -0
  275. package/components/card/SimpleCard.d.ts +3 -0
  276. package/components/card/SimpleCard.js +2 -0
  277. package/components/card/SimpleCard.js.map +1 -0
  278. package/components/card/index.d.ts +1 -0
  279. package/components/cardContainer/cardContainer.d.ts +1 -0
  280. package/components/cardContainer/cardContainer.js.map +1 -1
  281. package/components/cardMenu/cardMenu.d.ts +2 -1
  282. package/components/cardMenu/cardMenu.js +1 -1
  283. package/components/cardMenu/cardMenu.js.map +1 -1
  284. package/components/cardMenu/styled/menuListStyled.d.ts +1 -1
  285. package/components/chip/chipDropdownChildren/chipDropdownChildren.js +1 -1
  286. package/components/chip/chipDropdownChildren/chipDropdownChildren.js.map +1 -1
  287. package/components/chip/chipMultiselect/multiSelectChip.d.ts +2 -1
  288. package/components/chip/chipMultiselect/multiSelectChip.js +1 -1
  289. package/components/chip/chipMultiselect/multiSelectChip.js.map +1 -1
  290. package/components/chip/regular/chip.d.ts +2 -1
  291. package/components/chip/regular/chip.js +1 -1
  292. package/components/chip/regular/chip.js.map +1 -1
  293. package/components/closeDialogButton/index.js +1 -1
  294. package/components/closeDialogButton/index.js.map +1 -1
  295. package/components/common/hook/useWindowSize.js +1 -1
  296. package/components/common/hook/useWindowSize.js.map +1 -1
  297. package/components/common/interface/textInputInterface.d.ts +2 -1
  298. package/components/common/styled/textFieldStyled.d.ts +1 -1
  299. package/components/controls/controls.d.ts +2 -1
  300. package/components/controls/controls.js +1 -1
  301. package/components/controls/controls.js.map +1 -1
  302. package/components/icon/icon.d.ts +11 -2
  303. package/components/icon/icon.definitions.d.ts +847 -0
  304. package/components/icon/icon.definitions.js +2 -0
  305. package/components/icon/icon.definitions.js.map +1 -0
  306. package/components/icon/icon.js +1 -1
  307. package/components/icon/icon.js.map +1 -1
  308. package/components/icon/index.d.ts +1 -1
  309. package/components/iconButton/index.d.ts +1 -1
  310. package/components/index.d.ts +1 -0
  311. package/components/indicator/indicator.d.ts +9 -3
  312. package/components/indicator/indicator.js +1 -18
  313. package/components/indicator/indicator.js.map +1 -1
  314. package/components/label/label.js.map +1 -1
  315. package/components/labelFeature/labelFeature.js.map +1 -1
  316. package/components/labelStatus/labelStatus.d.ts +1 -0
  317. package/components/labelStatus/labelStatus.js.map +1 -1
  318. package/components/menu/menu.js +1 -1
  319. package/components/menu/menu.js.map +1 -1
  320. package/components/mobileStepper/index.d.ts +1 -0
  321. package/components/mobileStepper/mobileStepper.d.ts +1 -1
  322. package/components/mobileStepper/mobileStepper.js +1 -1
  323. package/components/mobileStepper/mobileStepper.js.map +1 -1
  324. package/components/mobileStepper/mobileStepperButton.d.ts +4 -0
  325. package/components/mobileStepper/mobileStepperButton.js +2 -0
  326. package/components/mobileStepper/mobileStepperButton.js.map +1 -0
  327. package/components/modal/modal.d.ts +12 -0
  328. package/components/modal/modal.js +1 -1
  329. package/components/modal/modal.js.map +1 -1
  330. package/components/pagination/pagination.js +1 -1
  331. package/components/pagination/pagination.js.map +1 -1
  332. package/components/progressBar/components/loader.js +1 -1
  333. package/components/progressBar/components/loader.js.map +1 -1
  334. package/components/progressBar/components/spinner.js +1 -1
  335. package/components/progressBar/components/spinner.js.map +1 -1
  336. package/components/selectInput/formControlSelectStyled.d.ts +1 -1
  337. package/components/selectInput/selectInput.d.ts +2 -1
  338. package/components/selectInput/selectInput.js +1 -1
  339. package/components/selectInput/selectInput.js.map +1 -1
  340. package/components/slider/slider.d.ts +3 -3
  341. package/components/slider/slider.js +1 -1
  342. package/components/slider/slider.js.map +1 -1
  343. package/components/snackbar/snackbarMessage.js +1 -1
  344. package/components/snackbar/snackbarMessage.js.map +1 -1
  345. package/components/stepper/stepper.d.ts +2 -2
  346. package/components/stepper/stepper.js +1 -1
  347. package/components/stepper/stepper.js.map +1 -1
  348. package/components/tab/hook/useTabs.d.ts +1 -0
  349. package/components/tab/hook/useTabs.js.map +1 -1
  350. package/components/tab/menuTab.d.ts +1 -0
  351. package/components/tab/menuTab.js +1 -1
  352. package/components/tab/menuTab.js.map +1 -1
  353. package/components/tab/secondaryNavigation/secondaryNavigationTabs.js +1 -1
  354. package/components/tab/secondaryNavigation/secondaryNavigationTabs.js.map +1 -1
  355. package/components/tab/tab.d.ts +1 -0
  356. package/components/tab/tab.js.map +1 -1
  357. package/components/tab/tabPanel.d.ts +1 -0
  358. package/components/tab/tabPanel.js.map +1 -1
  359. package/components/tab/tabStyled.d.ts +2 -1
  360. package/components/tab/tabStyled.js.map +1 -1
  361. package/components/tab/tabs.d.ts +1 -0
  362. package/components/tab/tabs.js.map +1 -1
  363. package/components/textInput/textInput.js +1 -1
  364. package/components/textInput/textInput.js.map +1 -1
  365. package/components/upload/UploadField.d.ts +2 -2
  366. package/components/upload/UploadField.js +1 -1
  367. package/components/upload/UploadField.js.map +1 -1
  368. package/components/upload/UploadPreview.d.ts +1 -1
  369. package/components/upload/UploadPreviewList.d.ts +1 -1
  370. package/components/upload/UploadPreviewList.js +1 -1
  371. package/components/upload/UploadPreviewList.js.map +1 -1
  372. package/design/skoda/components/accordion/accordion.theme.js +1 -1
  373. package/design/skoda/components/accordion/accordion.theme.js.map +1 -1
  374. package/design/skoda/components/accordion/accordionSummary.theme.js +1 -1
  375. package/design/skoda/components/accordion/accordionSummary.theme.js.map +1 -1
  376. package/design/skoda/components/autocomplete.theme.js +1 -1
  377. package/design/skoda/components/autocomplete.theme.js.map +1 -1
  378. package/design/skoda/components/dialog/dialog.theme.js +2 -0
  379. package/design/skoda/components/dialog/dialog.theme.js.map +1 -0
  380. package/design/skoda/components/dialog/dialogActions.theme.js.map +1 -0
  381. package/design/skoda/components/dialog/dialogTitle.theme.js.map +1 -0
  382. package/design/skoda/components/form/filledInput.theme.js.map +1 -0
  383. package/design/skoda/components/form/formControl.theme.js.map +1 -0
  384. package/design/skoda/components/form/formControlLabel.theme.js.map +1 -0
  385. package/design/skoda/components/form/formHelperText.theme.js.map +1 -0
  386. package/design/skoda/components/form/formLabel.theme.js.map +1 -0
  387. package/design/skoda/components/form/input.theme.js.map +1 -0
  388. package/design/skoda/components/form/inputAdornment.theme.js.map +1 -0
  389. package/design/skoda/components/form/inputBase.theme.js.map +1 -0
  390. package/design/skoda/components/form/inputLabel.theme.js.map +1 -0
  391. package/design/skoda/components/form/radio.theme.js +2 -0
  392. package/design/skoda/components/form/radio.theme.js.map +1 -0
  393. package/design/skoda/components/form/select.theme.js +2 -0
  394. package/design/skoda/components/form/select.theme.js.map +1 -0
  395. package/design/skoda/components/form/slider.theme.js +2 -0
  396. package/design/skoda/components/form/slider.theme.js.map +1 -0
  397. package/design/skoda/components/form/switch.theme.js.map +1 -0
  398. package/design/skoda/components/form/textField.theme.js.map +1 -0
  399. package/design/skoda/components/layout/breakpoints.theme.js.map +1 -0
  400. package/design/skoda/components/layout/container.theme.js.map +1 -0
  401. package/design/skoda/components/layout/grid.theme.js.map +1 -0
  402. package/design/skoda/components/mobileStepper.theme.js +1 -1
  403. package/design/skoda/components/mobileStepper.theme.js.map +1 -1
  404. package/design/skoda/components/stepper/index.d.ts +1 -0
  405. package/design/skoda/components/stepper/stepIcon/errorStepIcon.d.ts +3 -0
  406. package/design/skoda/components/stepper/stepIcon/errorStepIcon.js +2 -0
  407. package/design/skoda/components/stepper/stepIcon/errorStepIcon.js.map +1 -0
  408. package/design/skoda/components/stepper/stepIcon/index.d.ts +2 -0
  409. package/design/skoda/components/stepper/stepIcon/index.js +2 -0
  410. package/design/skoda/components/stepper/stepIcon/index.js.map +1 -0
  411. package/design/skoda/components/stepper/stepIcon/qontoStepIcon.d.ts +2 -0
  412. package/design/skoda/components/stepper/stepIcon/qontoStepIcon.js +2 -0
  413. package/design/skoda/components/stepper/stepIcon/qontoStepIcon.js.map +1 -0
  414. package/design/skoda/components/stepper/stepper.theme.d.ts +3 -0
  415. package/design/skoda/components/stepper/stepper.theme.js +2 -0
  416. package/design/skoda/components/stepper/stepper.theme.js.map +1 -0
  417. package/design/skoda/components/tabs/tabs.theme.js +1 -1
  418. package/design/skoda/components/tabs/tabs.theme.js.map +1 -1
  419. package/design/skoda/theme.js +1 -1
  420. package/design/skoda/theme.js.map +1 -1
  421. package/eula.txt +40 -0
  422. package/index.js +1 -1
  423. package/layout/Error/ErrorContent.d.ts +6 -6
  424. package/layout/Error/ErrorContent.js +1 -1
  425. package/layout/Error/ErrorContent.js.map +1 -1
  426. package/layout/Footer/Footer.d.ts +3 -14
  427. package/layout/Footer/Footer.js +1 -1
  428. package/layout/Footer/Footer.js.map +1 -1
  429. package/layout/Footer/FooterAccordion.d.ts +18 -0
  430. package/layout/Footer/FooterAccordion.js +2 -0
  431. package/layout/Footer/FooterAccordion.js.map +1 -0
  432. package/layout/Footer/FooterIconButton.d.ts +6 -2
  433. package/layout/Footer/FooterIconButton.js +1 -1
  434. package/layout/Footer/FooterIconButton.js.map +1 -1
  435. package/layout/Footer/FooterLink.d.ts +15 -0
  436. package/layout/Footer/FooterLink.js +2 -0
  437. package/layout/Footer/FooterLink.js.map +1 -0
  438. package/layout/Footer/FooterMenu.d.ts +21 -0
  439. package/layout/Footer/FooterMenu.js +2 -0
  440. package/layout/Footer/FooterMenu.js.map +1 -0
  441. package/layout/Footer/FooterSectionContact.d.ts +12 -0
  442. package/layout/Footer/FooterSectionContact.js +2 -0
  443. package/layout/Footer/FooterSectionContact.js.map +1 -0
  444. package/layout/Footer/FooterSectionMenu.d.ts +5 -0
  445. package/layout/Footer/FooterSectionMenu.js +2 -0
  446. package/layout/Footer/FooterSectionMenu.js.map +1 -0
  447. package/layout/Footer/PredefinedFooterIconButtons.d.ts +5 -4
  448. package/layout/Footer/PredefinedFooterIconButtons.js +1 -1
  449. package/layout/Footer/PredefinedFooterIconButtons.js.map +1 -1
  450. package/layout/Footer/index.d.ts +5 -1
  451. package/layout/Header/HeaderButton.d.ts +3 -3
  452. package/layout/Header/HeaderButton.js +1 -1
  453. package/layout/Header/HeaderButton.js.map +1 -1
  454. package/layout/Header/PredefinedHeaderButtons.js +1 -1
  455. package/layout/Header/PredefinedHeaderButtons.js.map +1 -1
  456. package/layout/SideMenu/SideMenu.js +1 -1
  457. package/layout/SideMenu/SideMenu.js.map +1 -1
  458. package/layout/cookieModal/CookieModal.d.ts +69 -0
  459. package/layout/cookieModal/CookieModal.js +2 -0
  460. package/layout/cookieModal/CookieModal.js.map +1 -0
  461. package/layout/cookieModal/CookieModalItem.d.ts +37 -0
  462. package/layout/cookieModal/CookieModalItem.js +2 -0
  463. package/layout/cookieModal/CookieModalItem.js.map +1 -0
  464. package/layout/cookieModal/index.d.ts +2 -0
  465. package/layout/index.d.ts +1 -0
  466. package/organisms/cardOwnedVehicle/cardOwnedVehicleComponent.js +1 -1
  467. package/organisms/cardOwnedVehicle/cardOwnedVehicleComponent.js.map +1 -1
  468. package/organisms/cardPhotoAdjustable/cardPhotoAdjustable.js.map +1 -1
  469. package/organisms/cardPhotoFixed/cardPhotoFixed.js.map +1 -1
  470. package/organisms/cardTypeOnly/cardTypeOnly.js.map +1 -1
  471. package/organisms/carousel/carousel.d.ts +3 -2
  472. package/organisms/carousel/carouselTemplate.d.ts +2 -1
  473. package/organisms/carousel2/cardCarousel/cardCarousel.js +1 -1
  474. package/organisms/carousel2/cardCarousel/cardCarousel.js.map +1 -1
  475. package/organisms/carousel2/carousel2.d.ts +3 -2
  476. package/organisms/carousel2/components/NavButton.js +1 -1
  477. package/organisms/carousel2/components/NavButton.js.map +1 -1
  478. package/organisms/carousel2/heroCarousel/heroCarousel.js +1 -1
  479. package/organisms/carousel2/heroCarousel/heroCarousel.js.map +1 -1
  480. package/organisms/common/menuCardComponent/menuCardComponent.js +1 -1
  481. package/organisms/common/menuCardComponent/menuCardComponent.js.map +1 -1
  482. package/organisms/common/styled/cardStandardWrapperStyled.d.ts +1 -1
  483. package/organisms/gallery/Gallery.js +1 -1
  484. package/organisms/gallery/Gallery.js.map +1 -1
  485. package/organisms/gallery/GalleryTrigger.js +1 -1
  486. package/organisms/gallery/GalleryTrigger.js.map +1 -1
  487. package/organisms/heroImageCard/heroImageCard.js.map +1 -1
  488. package/organisms/heroImageCard/videoCardController.js +1 -1
  489. package/organisms/heroImageCard/videoCardController.js.map +1 -1
  490. package/organisms/hotspotCard/hotspotCard.d.ts +5 -12
  491. package/organisms/maps/mapComponents/infoWindowConfig.js.map +1 -1
  492. package/organisms/maps/maps.js.map +1 -1
  493. package/organisms/notification/Notification.js +1 -1
  494. package/organisms/notification/Notification.js.map +1 -1
  495. package/organisms/notification/NotificationCenterHeaderButton.d.ts +1 -1
  496. package/organisms/shortcutLink/shortcutLink.d.ts +2 -1
  497. package/organisms/shortcutLink/shortcutLink.js +1 -1
  498. package/organisms/shortcutLink/shortcutLink.js.map +1 -1
  499. package/organisms/textCta/textCta.d.ts +2 -1
  500. package/organisms/textCta/textCta.js +1 -1
  501. package/organisms/textCta/textCta.js.map +1 -1
  502. package/package.json +1 -1
  503. package/production/{Button.d.ts → Button/Button.d.ts} +1 -1
  504. package/production/Button/Button.js.map +1 -0
  505. package/production/Button/index.d.ts +1 -0
  506. package/production/index.js +1 -1
  507. package/theme/skoda/icons.css +1 -1
  508. package/utils/utilities.d.ts +1 -1
  509. package/cjs/components/icon/availableIcons.d.ts +0 -1
  510. package/cjs/components/icon/availableIcons.js +0 -2
  511. package/cjs/components/icon/availableIcons.js.map +0 -1
  512. package/cjs/components/tab/examples.d.ts +0 -3
  513. package/cjs/design/skoda/components/breakpoints.theme.js.map +0 -1
  514. package/cjs/design/skoda/components/container.theme.js.map +0 -1
  515. package/cjs/design/skoda/components/dialog.theme.js.map +0 -1
  516. package/cjs/design/skoda/components/dialogActions.theme.js.map +0 -1
  517. package/cjs/design/skoda/components/dialogTitle.theme.js.map +0 -1
  518. package/cjs/design/skoda/components/filledInput.theme.js.map +0 -1
  519. package/cjs/design/skoda/components/formControl.theme.js.map +0 -1
  520. package/cjs/design/skoda/components/formControlLabel.theme.js.map +0 -1
  521. package/cjs/design/skoda/components/formHelperText.theme.js.map +0 -1
  522. package/cjs/design/skoda/components/formLabel.theme.js.map +0 -1
  523. package/cjs/design/skoda/components/grid.theme.js.map +0 -1
  524. package/cjs/design/skoda/components/input.theme.js.map +0 -1
  525. package/cjs/design/skoda/components/inputAdornment.theme.js.map +0 -1
  526. package/cjs/design/skoda/components/inputBase.theme.js.map +0 -1
  527. package/cjs/design/skoda/components/inputLabel.theme.js.map +0 -1
  528. package/cjs/design/skoda/components/radio.theme.js +0 -2
  529. package/cjs/design/skoda/components/radio.theme.js.map +0 -1
  530. package/cjs/design/skoda/components/select.theme.js +0 -2
  531. package/cjs/design/skoda/components/select.theme.js.map +0 -1
  532. package/cjs/design/skoda/components/slider.theme.js +0 -2
  533. package/cjs/design/skoda/components/slider.theme.js.map +0 -1
  534. package/cjs/design/skoda/components/stepper.theme.d.ts +0 -2
  535. package/cjs/design/skoda/components/stepper.theme.js +0 -2
  536. package/cjs/design/skoda/components/stepper.theme.js.map +0 -1
  537. package/cjs/design/skoda/components/switch.theme.js.map +0 -1
  538. package/cjs/design/skoda/components/textField.theme.js.map +0 -1
  539. package/cjs/layout/Footer/FooterNavItem.d.ts +0 -14
  540. package/cjs/layout/Footer/FooterNavItem.js +0 -2
  541. package/cjs/layout/Footer/FooterNavItem.js.map +0 -1
  542. package/cjs/production/Button.js.map +0 -1
  543. package/components/icon/availableIcons.d.ts +0 -1
  544. package/components/icon/availableIcons.js +0 -2
  545. package/components/icon/availableIcons.js.map +0 -1
  546. package/components/tab/examples.d.ts +0 -3
  547. package/design/skoda/components/breakpoints.theme.js.map +0 -1
  548. package/design/skoda/components/container.theme.js.map +0 -1
  549. package/design/skoda/components/dialog.theme.js +0 -2
  550. package/design/skoda/components/dialog.theme.js.map +0 -1
  551. package/design/skoda/components/dialogActions.theme.js.map +0 -1
  552. package/design/skoda/components/dialogTitle.theme.js.map +0 -1
  553. package/design/skoda/components/filledInput.theme.js.map +0 -1
  554. package/design/skoda/components/formControl.theme.js.map +0 -1
  555. package/design/skoda/components/formControlLabel.theme.js.map +0 -1
  556. package/design/skoda/components/formHelperText.theme.js.map +0 -1
  557. package/design/skoda/components/formLabel.theme.js.map +0 -1
  558. package/design/skoda/components/grid.theme.js.map +0 -1
  559. package/design/skoda/components/input.theme.js.map +0 -1
  560. package/design/skoda/components/inputAdornment.theme.js.map +0 -1
  561. package/design/skoda/components/inputBase.theme.js.map +0 -1
  562. package/design/skoda/components/inputLabel.theme.js.map +0 -1
  563. package/design/skoda/components/radio.theme.js +0 -2
  564. package/design/skoda/components/radio.theme.js.map +0 -1
  565. package/design/skoda/components/select.theme.js +0 -2
  566. package/design/skoda/components/select.theme.js.map +0 -1
  567. package/design/skoda/components/slider.theme.js +0 -2
  568. package/design/skoda/components/slider.theme.js.map +0 -1
  569. package/design/skoda/components/stepper.theme.d.ts +0 -2
  570. package/design/skoda/components/stepper.theme.js +0 -2
  571. package/design/skoda/components/stepper.theme.js.map +0 -1
  572. package/design/skoda/components/switch.theme.js.map +0 -1
  573. package/design/skoda/components/textField.theme.js.map +0 -1
  574. package/layout/Footer/FooterNavItem.d.ts +0 -14
  575. package/layout/Footer/FooterNavItem.js +0 -2
  576. package/layout/Footer/FooterNavItem.js.map +0 -1
  577. package/production/Button.js.map +0 -1
  578. /package/cjs/design/skoda/components/{dialog.theme.d.ts → dialog/dialog.theme.d.ts} +0 -0
  579. /package/cjs/design/skoda/components/{dialogActions.theme.d.ts → dialog/dialogActions.theme.d.ts} +0 -0
  580. /package/cjs/design/skoda/components/{dialogActions.theme.js → dialog/dialogActions.theme.js} +0 -0
  581. /package/cjs/design/skoda/components/{dialogTitle.theme.d.ts → dialog/dialogTitle.theme.d.ts} +0 -0
  582. /package/cjs/design/skoda/components/{dialogTitle.theme.js → dialog/dialogTitle.theme.js} +0 -0
  583. /package/cjs/design/skoda/components/{filledInput.theme.d.ts → form/filledInput.theme.d.ts} +0 -0
  584. /package/cjs/design/skoda/components/{filledInput.theme.js → form/filledInput.theme.js} +0 -0
  585. /package/cjs/design/skoda/components/{formControl.theme.d.ts → form/formControl.theme.d.ts} +0 -0
  586. /package/cjs/design/skoda/components/{formControl.theme.js → form/formControl.theme.js} +0 -0
  587. /package/cjs/design/skoda/components/{formControlLabel.theme.d.ts → form/formControlLabel.theme.d.ts} +0 -0
  588. /package/cjs/design/skoda/components/{formControlLabel.theme.js → form/formControlLabel.theme.js} +0 -0
  589. /package/cjs/design/skoda/components/{formHelperText.theme.d.ts → form/formHelperText.theme.d.ts} +0 -0
  590. /package/cjs/design/skoda/components/{formHelperText.theme.js → form/formHelperText.theme.js} +0 -0
  591. /package/cjs/design/skoda/components/{formLabel.theme.d.ts → form/formLabel.theme.d.ts} +0 -0
  592. /package/cjs/design/skoda/components/{formLabel.theme.js → form/formLabel.theme.js} +0 -0
  593. /package/cjs/design/skoda/components/{input.theme.d.ts → form/input.theme.d.ts} +0 -0
  594. /package/cjs/design/skoda/components/{input.theme.js → form/input.theme.js} +0 -0
  595. /package/cjs/design/skoda/components/{inputAdornment.theme.d.ts → form/inputAdornment.theme.d.ts} +0 -0
  596. /package/cjs/design/skoda/components/{inputAdornment.theme.js → form/inputAdornment.theme.js} +0 -0
  597. /package/cjs/design/skoda/components/{inputBase.theme.d.ts → form/inputBase.theme.d.ts} +0 -0
  598. /package/cjs/design/skoda/components/{inputBase.theme.js → form/inputBase.theme.js} +0 -0
  599. /package/cjs/design/skoda/components/{inputLabel.theme.d.ts → form/inputLabel.theme.d.ts} +0 -0
  600. /package/cjs/design/skoda/components/{inputLabel.theme.js → form/inputLabel.theme.js} +0 -0
  601. /package/cjs/design/skoda/components/{radio.theme.d.ts → form/radio.theme.d.ts} +0 -0
  602. /package/cjs/design/skoda/components/{select.theme.d.ts → form/select.theme.d.ts} +0 -0
  603. /package/cjs/design/skoda/components/{slider.theme.d.ts → form/slider.theme.d.ts} +0 -0
  604. /package/cjs/design/skoda/components/{switch.theme.d.ts → form/switch.theme.d.ts} +0 -0
  605. /package/cjs/design/skoda/components/{switch.theme.js → form/switch.theme.js} +0 -0
  606. /package/cjs/design/skoda/components/{textField.theme.d.ts → form/textField.theme.d.ts} +0 -0
  607. /package/cjs/design/skoda/components/{textField.theme.js → form/textField.theme.js} +0 -0
  608. /package/cjs/design/skoda/components/{breakpoints.theme.d.ts → layout/breakpoints.theme.d.ts} +0 -0
  609. /package/cjs/design/skoda/components/{breakpoints.theme.js → layout/breakpoints.theme.js} +0 -0
  610. /package/cjs/design/skoda/components/{container.theme.d.ts → layout/container.theme.d.ts} +0 -0
  611. /package/cjs/design/skoda/components/{container.theme.js → layout/container.theme.js} +0 -0
  612. /package/cjs/design/skoda/components/{grid.theme.d.ts → layout/grid.theme.d.ts} +0 -0
  613. /package/cjs/design/skoda/components/{grid.theme.js → layout/grid.theme.js} +0 -0
  614. /package/cjs/production/{Button.js → Button/Button.js} +0 -0
  615. /package/design/skoda/components/{dialog.theme.d.ts → dialog/dialog.theme.d.ts} +0 -0
  616. /package/design/skoda/components/{dialogActions.theme.d.ts → dialog/dialogActions.theme.d.ts} +0 -0
  617. /package/design/skoda/components/{dialogActions.theme.js → dialog/dialogActions.theme.js} +0 -0
  618. /package/design/skoda/components/{dialogTitle.theme.d.ts → dialog/dialogTitle.theme.d.ts} +0 -0
  619. /package/design/skoda/components/{dialogTitle.theme.js → dialog/dialogTitle.theme.js} +0 -0
  620. /package/design/skoda/components/{filledInput.theme.d.ts → form/filledInput.theme.d.ts} +0 -0
  621. /package/design/skoda/components/{filledInput.theme.js → form/filledInput.theme.js} +0 -0
  622. /package/design/skoda/components/{formControl.theme.d.ts → form/formControl.theme.d.ts} +0 -0
  623. /package/design/skoda/components/{formControl.theme.js → form/formControl.theme.js} +0 -0
  624. /package/design/skoda/components/{formControlLabel.theme.d.ts → form/formControlLabel.theme.d.ts} +0 -0
  625. /package/design/skoda/components/{formControlLabel.theme.js → form/formControlLabel.theme.js} +0 -0
  626. /package/design/skoda/components/{formHelperText.theme.d.ts → form/formHelperText.theme.d.ts} +0 -0
  627. /package/design/skoda/components/{formHelperText.theme.js → form/formHelperText.theme.js} +0 -0
  628. /package/design/skoda/components/{formLabel.theme.d.ts → form/formLabel.theme.d.ts} +0 -0
  629. /package/design/skoda/components/{formLabel.theme.js → form/formLabel.theme.js} +0 -0
  630. /package/design/skoda/components/{input.theme.d.ts → form/input.theme.d.ts} +0 -0
  631. /package/design/skoda/components/{input.theme.js → form/input.theme.js} +0 -0
  632. /package/design/skoda/components/{inputAdornment.theme.d.ts → form/inputAdornment.theme.d.ts} +0 -0
  633. /package/design/skoda/components/{inputAdornment.theme.js → form/inputAdornment.theme.js} +0 -0
  634. /package/design/skoda/components/{inputBase.theme.d.ts → form/inputBase.theme.d.ts} +0 -0
  635. /package/design/skoda/components/{inputBase.theme.js → form/inputBase.theme.js} +0 -0
  636. /package/design/skoda/components/{inputLabel.theme.d.ts → form/inputLabel.theme.d.ts} +0 -0
  637. /package/design/skoda/components/{inputLabel.theme.js → form/inputLabel.theme.js} +0 -0
  638. /package/design/skoda/components/{radio.theme.d.ts → form/radio.theme.d.ts} +0 -0
  639. /package/design/skoda/components/{select.theme.d.ts → form/select.theme.d.ts} +0 -0
  640. /package/design/skoda/components/{slider.theme.d.ts → form/slider.theme.d.ts} +0 -0
  641. /package/design/skoda/components/{switch.theme.d.ts → form/switch.theme.d.ts} +0 -0
  642. /package/design/skoda/components/{switch.theme.js → form/switch.theme.js} +0 -0
  643. /package/design/skoda/components/{textField.theme.d.ts → form/textField.theme.d.ts} +0 -0
  644. /package/design/skoda/components/{textField.theme.js → form/textField.theme.js} +0 -0
  645. /package/design/skoda/components/{breakpoints.theme.d.ts → layout/breakpoints.theme.d.ts} +0 -0
  646. /package/design/skoda/components/{breakpoints.theme.js → layout/breakpoints.theme.js} +0 -0
  647. /package/design/skoda/components/{container.theme.d.ts → layout/container.theme.d.ts} +0 -0
  648. /package/design/skoda/components/{container.theme.js → layout/container.theme.js} +0 -0
  649. /package/design/skoda/components/{grid.theme.d.ts → layout/grid.theme.d.ts} +0 -0
  650. /package/design/skoda/components/{grid.theme.js → layout/grid.theme.js} +0 -0
  651. /package/production/{Button.js → Button/Button.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"snackbarMessage.js","sources":["../../../../src/components/snackbar/snackbarMessage.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useMemo } from 'react';\nimport { Icon } from '../icon';\nimport { styled } from '@mui/material/styles';\nimport { checkForIcon } from './snackbar';\nexport const SnackbarMessage = ({ header, icon, message }) => {\n const IconComponent = useMemo(() => ({ icon: _icon }) => {\n let iconToReturn = null;\n switch (_icon) {\n case 'alert':\n iconToReturn = _jsx(Icon, { className: \"triangle-up-exclamation\", fontSize: \"inherit\", iconStyle: \"filled\" });\n break;\n case 'success':\n iconToReturn = _jsx(Icon, { className: \"circle-check\", fontSize: \"inherit\", iconStyle: \"filled\" });\n break;\n case 'warning':\n iconToReturn = _jsx(Icon, { className: \"circle-exclamation\", fontSize: \"inherit\", iconStyle: \"filled\" });\n break;\n }\n return iconToReturn ? _jsx(\"span\", { className: \"snackbar-icon-wrapper\", children: iconToReturn }) : iconToReturn;\n }, []);\n return (_jsxs(SnackbarMessageStyled, { header: header, icon: icon, children: [icon && _jsx(IconComponent, { icon: icon }), _jsxs(\"div\", { className: \"styled-message-header-message-container\", children: [header && _jsxs(\"h3\", { children: [\" \", header] }), _jsxs(\"p\", { children: [\" \", message, \" \"] })] }), _jsx(\"div\", { className: \"custom-snackbar-divider\", children: _jsx(\"div\", {}) })] }));\n};\n/**\n * @description SnackbarMessageStyled styling defintion based on props\n */\nexport const SnackbarMessageStyled = styled('div')((_a) => {\n var args = __rest(_a, []);\n return {\n '& .styled-message-header-message-container': {\n display: args.header ? 'block' : 'flex',\n },\n '& p': {\n display: args.header ? 'block' : 'inline',\n paddingBottom: args.header ? '0px' : '2px',\n },\n '& .snackbar-icon-wrapper': {\n '& span': {\n lineHeight: args.header ? '20px' : 'unset',\n },\n },\n '& .custom-snackbar-divider': {\n paddingLeft: checkForIcon(args.icon) ? '24px' : '56px',\n '& > div': {\n borderLeft: `1px solid ${args.theme.palette.onSurface.os600}`,\n height: args.header ? '48px' : '32px',\n },\n },\n };\n});\n//# sourceMappingURL=snackbarMessage.js.map"],"names":["SnackbarMessageStyled","styled","_a","args","__rest","display","header","paddingBottom","lineHeight","paddingLeft","checkForIcon","icon","borderLeft","theme","palette","onSurface","os600","height","message","IconComponent","useMemo","_icon","iconToReturn","_jsx","jsx","Icon","className","fontSize","iconStyle","children","_jsxs","jsxs"],"mappings":"gLAMY,MAqBCA,EAAwBC,EAAMA,OAAC,MAAPA,EAAeC,IAChD,IAAIC,EAAOC,EAAAA,OAAOF,EAAI,IACtB,MAAO,CACH,6CAA8C,CAC1CG,QAASF,EAAKG,OAAS,QAAU,QAErC,MAAO,CACHD,QAASF,EAAKG,OAAS,QAAU,SACjCC,cAAeJ,EAAKG,OAAS,MAAQ,OAEzC,2BAA4B,CACxB,SAAU,CACNE,WAAYL,EAAKG,OAAS,OAAS,UAG3C,6BAA8B,CAC1BG,YAAaC,EAAAA,aAAaP,EAAKQ,MAAQ,OAAS,OAChD,UAAW,CACPC,WAAY,aAAaT,EAAKU,MAAMC,QAAQC,UAAUC,QACtDC,OAAQd,EAAKG,OAAS,OAAS,SAG1C,4BA3C0B,EAAGA,cAAQK,EAAMO,cAC5C,MAAMC,EAAgBC,EAAAA,SAAQ,IAAM,EAAGT,KAAMU,MACzC,IAAIC,EAAe,KACnB,OAAQD,GACJ,IAAK,QACDC,EAAeC,EAAIC,IAACC,OAAM,CAAEC,UAAW,0BAA2BC,SAAU,UAAWC,UAAW,WAClG,MACJ,IAAK,UACDN,EAAeC,EAAIC,IAACC,OAAM,CAAEC,UAAW,eAAgBC,SAAU,UAAWC,UAAW,WACvF,MACJ,IAAK,UACDN,EAAeC,EAAIC,IAACC,OAAM,CAAEC,UAAW,qBAAsBC,SAAU,UAAWC,UAAW,WAGrG,OAAON,EAAeC,MAAK,OAAQ,CAAEG,UAAW,wBAAyBG,SAAUP,IAAkBA,CAAY,GAClH,IACH,OAAQQ,OAAM9B,EAAuB,CAAEM,OAAQA,EAAQK,KAAMA,EAAMkB,SAAU,CAAClB,GAAQY,EAAAA,IAAKJ,EAAe,CAAER,KAAMA,IAASmB,OAAM,MAAO,CAAEJ,UAAW,0CAA2CG,SAAU,CAACvB,GAAUwB,EAAKC,KAAC,KAAM,CAAEF,SAAU,CAAC,IAAKvB,KAAYwB,EAAKC,KAAC,IAAK,CAAEF,SAAU,CAAC,IAAKX,EAAS,UAAaK,MAAK,MAAO,CAAEG,UAAW,0BAA2BG,SAAUN,EAAIC,IAAC,MAAO,CAAE,OAAU"}
1
+ {"version":3,"file":"snackbarMessage.js","sources":["../../../../src/components/snackbar/snackbarMessage.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Icon } from '../icon';\nimport { styled } from '@mui/material/styles';\nimport { checkForIcon } from './snackbar';\nexport const SnackbarMessage = ({ header, icon, message }) => {\n return (_jsxs(SnackbarMessageStyled, { header: header, icon: icon, children: [icon && _jsx(IconComponent, { icon: icon }), _jsxs(\"div\", { className: \"styled-message-header-message-container\", children: [header && _jsxs(\"h3\", { children: [\" \", header] }), _jsxs(\"p\", { children: [\" \", message, \" \"] })] }), _jsx(\"div\", { className: \"custom-snackbar-divider\", children: _jsx(\"div\", {}) })] }));\n};\n/**\n * @description SnackbarMessageStyled styling defintion based on props\n */\nexport const SnackbarMessageStyled = styled('div')((_a) => {\n var args = __rest(_a, []);\n return {\n '& .styled-message-header-message-container': {\n display: args.header ? 'block' : 'flex',\n },\n '& p': {\n display: args.header ? 'block' : 'inline',\n paddingBottom: args.header ? '0px' : '2px',\n },\n '& .snackbar-icon-wrapper': {\n '& span': {\n lineHeight: args.header ? '20px' : 'unset',\n },\n },\n '& .custom-snackbar-divider': {\n paddingLeft: checkForIcon(args.icon) ? '24px' : '56px',\n '& > div': {\n borderLeft: `1px solid ${args.theme.palette.onSurface.os600}`,\n height: args.header ? '48px' : '32px',\n },\n },\n };\n});\nconst IconComponent = ({ icon }) => {\n let iconToReturn = null;\n switch (icon) {\n case 'alert':\n iconToReturn = _jsx(Icon, { name: \"warning\", fontSize: \"inherit\", iconStyle: \"filled\" });\n break;\n case 'success':\n iconToReturn = _jsx(Icon, { name: \"circle-check\", fontSize: \"inherit\", iconStyle: \"filled\" });\n break;\n case 'warning':\n iconToReturn = _jsx(Icon, { name: \"circle-exclamation\", fontSize: \"inherit\", iconStyle: \"filled\" });\n break;\n }\n return iconToReturn ? _jsx(\"span\", { className: \"snackbar-icon-wrapper\", children: iconToReturn }) : iconToReturn;\n};\n//# sourceMappingURL=snackbarMessage.js.map"],"names":["SnackbarMessageStyled","styled","_a","args","__rest","display","header","paddingBottom","lineHeight","paddingLeft","checkForIcon","icon","borderLeft","theme","palette","onSurface","os600","height","IconComponent","iconToReturn","_jsx","jsx","Icon","name","fontSize","iconStyle","className","children","message","_jsxs","jsxs"],"mappings":"wMAKY,MAMCA,EAAwBC,EAAMA,OAAC,MAAPA,EAAeC,IAChD,IAAIC,EAAOC,EAAAA,OA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 'react';
2
- import { SxProps } from '@mui/system';
3
1
  import { Theme } from '@mui/material';
2
+ import { SxProps } from '@mui/system';
3
+ import { FC, HTMLAttributes, ReactNode } from 'react';
4
4
  export interface StepperProps extends HTMLAttributes<HTMLDivElement> {
5
5
  /**
6
6
  * The activeStep of a stepper.
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),o=require("react/jsx-runtime"),r=require("@mui/material/Stepper"),t=require("@mui/material/styles"),l=require("@mui/material"),n=require("../../design/skoda/palette.theme.js");function s(e){return e&&e.__esModule?e:{default:e}}var a=s(r);function i(e){const{active:r,completed:t,className:l}=e;return o.jsx(c,{className:l,children:r?o.jsx("div",{className:"QontoStepIcon-active"}):t?o.jsx("div",{className:"QontoStepIcon-completedIcon"}):o.jsx("div",{className:"QontoStepIcon-circle"})})}const c=t.styled("div")((({theme:e})=>{let o={};return o={color:"dark"===e.palette.mode?e.palette.grey[700]:"#464748",display:"flex",height:22,alignItems:"center","& .QontoStepIcon-completedIcon":{color:n.flowColors.onSurface.os700,width:12,height:12,borderRadius:"50%",backgroundColor:"currentColor","&:hover":{borderRadius:"50%",border:`1.5px solid ${n.flowColors.onSurface.os700}`,color:n.flowColors.brand.secondary}},"& .QontoStepIcon-active":{color:n.flowColors.onSurface.os700,width:18,height:18,borderRadius:"50%",marginRight:"5.25px",marginLeft:"0px",backgroundColor:"currentColor","&:hover":{borderRadius:"50%",border:`1.5px solid ${n.flowColors.onSurface.os700}`,color:n.flowColors.brand.secondary}},"& .QontoStepIcon-circle":{width:12,height:12,borderRadius:"50%",border:"1.5px solid #C4C6C7",color:"transparent","&:hover":{cursor:"pointer",borderRadius:"50%",border:`1.5px solid ${n.flowColors.disabled.tertiary}`,backgroundColor:n.flowColors.disabled.secondary}}},o})),d=t.styled(l.StepConnector)((({theme:e})=>({[`&.${l.stepConnectorClasses.alternativeLabel}`]:{top:10,left:"calc(-50% + 8px)",right:"calc(50% + 8px)"},[`&.${l.stepConnectorClasses.active}`]:{[`& .${l.stepConnectorClasses.line}`]:{borderColor:n.flowColors.onSurface.os700,width:"60px"}},[`&.${l.stepConnectorClasses.completed}`]:{[`& .${l.stepConnectorClasses.line}`]:{borderColor:n.flowColors.onSurface.os700}},[`& .${l.stepConnectorClasses.line}`]:{borderColor:"dark"===e.palette.mode?e.palette.grey[800]:n.flowColors.disabled.primary,borderTopWidth:3,borderRadius:1}}))),p=t.styled("div")((()=>{let e={};return e={"& .controllerContainer":{display:"flex",alignItems:"center",fontFamily:"SKODA Next",fontStyle:"normal",fontWeight:"700",fontSize:"12px",lineHeight:"16px"}},e}));exports.Stepper=r=>{var{activeStep:t,alternativeLabel:n,children:s,classes:c,connector:u,nonLinear:C,orientation:h,step:m}=r,f=e.__rest(r,["activeStep","alternativeLabel","children","classes","connector","nonLinear","orientation","step"]);const x={lineHeight:"16px",fontSize:"12px",fontWeight:"400"};return o.jsx(p,{children:o.jsx("div",{children:o.jsx(a.default,Object.assign({className:"controllerContainer"},f,{activeStep:t,sx:{maxWidth:800,display:"flex",alignItems:"center",spacing:4},alternativeLabel:n,connector:o.jsx(d,{}),children:m.map((e=>o.jsx(l.Step,{children:o.jsx(l.StepLabel,{style:x,StepIconComponent:i,children:e})},e)))}))})})};
1
+ "use strict";var e=require("tslib"),o=require("react/jsx-runtime"),r=require("@mui/material"),t=require("@mui/material/Stepper"),l=require("@mui/material/styles"),n=require("../../design/skoda/palette.theme.js");function s(e){return e&&e.__esModule?e:{default:e}}var a=s(t);function i(e){const{active:r,completed:t,className:l}=e;return o.jsx(c,{className:l,children:r?o.jsx("div",{className:"QontoStepIcon-active"}):t?o.jsx("div",{className:"QontoStepIcon-completedIcon"}):o.jsx("div",{className:"QontoStepIcon-circle"})})}const c=l.styled("div")((({theme:e})=>{let o={};return o={color:"dark"===e.palette.mode?e.palette.grey[700]:"#464748",display:"flex",height:22,alignItems:"center","& .QontoStepIcon-completedIcon":{color:n.flowColors.onSurface.os700,width:12,height:12,borderRadius:"50%",backgroundColor:"currentColor","&:hover":{borderRadius:"50%",border:`1.5px solid ${n.flowColors.onSurface.os700}`,color:n.flowColors.brand.secondary}},"& .QontoStepIcon-active":{color:n.flowColors.onSurface.os700,width:18,height:18,borderRadius:"50%",marginRight:"5.25px",marginLeft:"0px",backgroundColor:"currentColor","&:hover":{borderRadius:"50%",border:`1.5px solid ${n.flowColors.onSurface.os700}`,color:n.flowColors.brand.secondary}},"& .QontoStepIcon-circle":{width:12,height:12,borderRadius:"50%",border:"1.5px solid #C4C6C7",color:"transparent","&:hover":{cursor:"pointer",borderRadius:"50%",border:`1.5px solid ${n.flowColors.disabled.tertiary}`,backgroundColor:n.flowColors.disabled.secondary}}},o})),d=l.styled(r.StepConnector)((({theme:e})=>({[`&.${r.stepConnectorClasses.alternativeLabel}`]:{top:10,left:"calc(-50% + 9px)",right:"calc(50% + 9px)"},[`&.${r.stepConnectorClasses.active}`]:{[`& .${r.stepConnectorClasses.line}`]:{borderColor:n.flowColors.onSurface.os700,width:"60px"}},[`&.${r.stepConnectorClasses.completed}`]:{[`& .${r.stepConnectorClasses.line}`]:{borderColor:n.flowColors.onSurface.os700}},[`& .${r.stepConnectorClasses.line}`]:{borderColor:"dark"===e.palette.mode?e.palette.grey[800]:n.flowColors.disabled.primary,borderTopWidth:3,borderRadius:1}}))),p=l.styled("div")((()=>{let e={};return e={"& .controllerContainer":{display:"flex",alignItems:"center",fontFamily:"SKODA Next",fontStyle:"normal",fontWeight:"700",fontSize:"12px",lineHeight:"16px"}},e}));exports.Stepper=t=>{var{activeStep:l,alternativeLabel:n,children:s,classes:c,connector:u,nonLinear:C,orientation:h,step:m}=t,f=e.__rest(t,["activeStep","alternativeLabel","children","classes","connector","nonLinear","orientation","step"]);const x={lineHeight:"16px",fontSize:"12px",fontWeight:"400"};return o.jsx(p,{children:o.jsx("div",{children:o.jsx(a.default,Object.assign({className:"controllerContainer"},f,{activeStep:l,sx:{maxWidth:800,display:"flex",alignItems:"center",spacing:4},alternativeLabel:n,connector:o.jsx(d,{}),children:m.map((e=>o.jsx(r.Step,{children:o.jsx(r.StepLabel,{style:x,StepIconComponent:i,children:e})},e)))}))})})};
2
2
  //# sourceMappingURL=stepper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stepper.js","sources":["../../../../src/components/stepper/stepper.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport MuiStepper from '@mui/material/Stepper';\nimport { styled } from '@mui/material/styles';\nimport { Step, StepConnector, stepConnectorClasses, StepLabel } from '@mui/material';\nimport { flowColors } from '../../design/skoda/palette.theme';\nexport const Stepper = (_a) => {\n var { activeStep, alternativeLabel, children, classes, connector, nonLinear, orientation, step } = _a, props = __rest(_a, [\"activeStep\", \"alternativeLabel\", \"children\", \"classes\", \"connector\", \"nonLinear\", \"orientation\", \"step\"]);\n const styles = {\n lineHeight: '16px',\n fontSize: '12px',\n fontWeight: '400',\n };\n const desktopStepper = () => (_jsx(\"div\", { children: _jsx(MuiStepper, Object.assign({ className: \"controllerContainer\" }, props, { activeStep: activeStep, sx: {\n maxWidth: 800,\n display: 'flex',\n alignItems: 'center',\n spacing: 4,\n }, alternativeLabel: alternativeLabel, connector: _jsx(QontoConnector, {}), children: step.map((label) => (_jsx(Step, { children: _jsx(StepLabel, { style: styles, StepIconComponent: QontoStepIcon, children: label }) }, label))) })) }));\n return _jsx(StepperStyled, { children: desktopStepper() });\n};\nfunction QontoStepIcon(props) {\n const { active, completed, className } = props;\n return (_jsx(QontoStepIconRoot, { className: className, children: active ? (_jsx(\"div\", { className: \"QontoStepIcon-active\" })) : completed ? (_jsx(\"div\", { className: \"QontoStepIcon-completedIcon\" })) : (_jsx(\"div\", { className: \"QontoStepIcon-circle\" })) }));\n}\nconst QontoStepIconRoot = styled('div')(({ theme }) => {\n let style = {};\n style = {\n color: theme.palette.mode === 'dark' ? theme.palette.grey[700] : '#464748',\n display: 'flex',\n height: 22,\n alignItems: 'center',\n '& .QontoStepIcon-completedIcon': {\n color: flowColors.onSurface.os700,\n width: 12,\n height: 12,\n borderRadius: '50%',\n backgroundColor: 'currentColor',\n '&:hover': {\n borderRadius: '50%',\n border: `1.5px solid ${flowColors.onSurface.os700}`,\n color: flowColors.brand.secondary,\n },\n },\n '& .QontoStepIcon-active': {\n color: flowColors.onSurface.os700,\n width: 18,\n height: 18,\n borderRadius: '50%',\n marginRight: '5.25px',\n marginLeft: '0px',\n backgroundColor: 'currentColor',\n '&:hover': {\n borderRadius: '50%',\n border: `1.5px solid ${flowColors.onSurface.os700}`,\n color: flowColors.brand.secondary,\n },\n },\n '& .QontoStepIcon-circle': {\n width: 12,\n height: 12,\n borderRadius: '50%',\n border: '1.5px solid #C4C6C7',\n color: 'transparent',\n '&:hover': {\n cursor: 'pointer',\n borderRadius: '50%',\n border: `1.5px solid ${flowColors.disabled.tertiary}`,\n backgroundColor: flowColors.disabled.secondary,\n },\n },\n };\n return style;\n});\nconst QontoConnector = styled(StepConnector)(({ theme }) => ({\n [`&.${stepConnectorClasses.alternativeLabel}`]: {\n top: 10,\n left: 'calc(-50% + 8px)',\n right: 'calc(50% + 8px)',\n },\n [`&.${stepConnectorClasses.active}`]: {\n [`& .${stepConnectorClasses.line}`]: {\n borderColor: flowColors.onSurface.os700,\n width: '60px',\n },\n },\n [`&.${stepConnectorClasses.completed}`]: {\n [`& .${stepConnectorClasses.line}`]: {\n borderColor: flowColors.onSurface.os700,\n },\n },\n [`& .${stepConnectorClasses.line}`]: {\n borderColor: theme.palette.mode === 'dark' ? theme.palette.grey[800] : flowColors.disabled.primary,\n borderTopWidth: 3,\n borderRadius: 1,\n },\n}));\nconst StepperStyled = styled('div')(() => {\n let style = {};\n const SKODA_NEXT = 'SKODA Next';\n style = {\n '& .controllerContainer': {\n display: 'flex',\n alignItems: 'center',\n fontFamily: SKODA_NEXT,\n fontStyle: 'normal',\n fontWeight: '700',\n fontSize: '12px',\n lineHeight: '16px',\n },\n };\n return style;\n});\n//# sourceMappingURL=stepper.js.map"],"names":["QontoStepIcon","props","active","completed","className","_jsx","QontoStepIconRoot","children","jsx","styled","theme","style","color","palette","mode","grey","display","height","alignItems","flowColors","onSurface","os700","width","borderRadius","backgroundColor","border","brand","secondary","marginRight","marginLeft","cursor","disabled","tertiary","QontoConnector","StepConnector","stepConnectorClasses","alternativeLabel","top","left","right","line","borderColor","primary","borderTopWidth","StepperStyled","fontFamily","fontStyle","fontWeight","fontSize","lineHeight","_a","activeStep","classes","connector","nonLinear","orientation","step","__rest","styles","MuiStepper","Object","assign","sx","maxWidth","spacing","map","label","Step","StepLabel","StepIconComponent"],"mappings":"kRAqBA,SAASA,EAAcC,GACnB,MAAMC,OAAEA,EAAMC,UAAEA,EAASC,UAAEA,GAAcH,EACzC,OAAQI,MAAKC,EAAmB,CAAEF,UAAWA,EAAWG,SAAUL,EAAUG,EAAIG,IAAC,MAAO,CAAEJ,UAAW,yBAA6BD,EAAaE,EAAAA,IAAK,MAAO,CAAED,UAAW,gCAAqCC,EAAAA,IAAK,MAAO,CAAED,UAAW,0BAC1O,CACA,MAAME,EAAoBG,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YACvC,IAAIC,EAAQ,CAAA,EA8CZ,OA7CAA,EAAQ,CACJC,MAA8B,SAAvBF,EAAMG,QAAQC,KAAkBJ,EAAMG,QAAQE,KAAK,KAAO,UACjEC,QAAS,OACTC,OAAQ,GACRC,WAAY,SACZ,iCAAkC,CAC9BN,MAAOO,EAAAA,WAAWC,UAAUC,MAC5BC,MAAO,GACPL,OAAQ,GACRM,aAAc,MACdC,gBAAiB,eACjB,UAAW,CACPD,aAAc,MACdE,OAAQ,eAAeN,EAAUA,WAACC,UAAUC,QAC5CT,MAAOO,EAAAA,WAAWO,MAAMC,YAGhC,0BAA2B,CACvBf,MAAOO,EAAAA,WAAWC,UAAUC,MAC5BC,MAAO,GACPL,OAAQ,GACRM,aAAc,MACdK,YAAa,SACbC,WAAY,MACZL,gBAAiB,eACjB,UAAW,CACPD,aAAc,MACdE,OAAQ,eAAeN,E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YAAa,YAAa,cAAe,SAC7N,MAAMQ,EAAS,CACXT,WAAY,OACZD,SAAU,OACVD,WAAY,OAQhB,OAAO1C,EAAAA,IAAKuC,EAAe,CAAErC,SANCF,MAAK,MAAO,CAAEE,SAAUF,EAAIG,IAACmD,UAAYC,OAAOC,OAAO,CAAEzD,UAAW,uBAAyBH,EAAO,CAAEkD,WAAYA,EAAYW,GAAI,CACpJC,SAAU,IACV/C,QAAS,OACTE,WAAY,SACZ8C,QAAS,GACV5B,iBAAkBA,EAAkBiB,UAAWhD,EAAAA,IAAK4B,EAAgB,CAAA,GAAK1B,SAAUiD,EAAKS,KAAKC,GAAW7D,EAAAA,IAAK8D,EAAAA,KAAM,CAAE5D,SAAUF,EAAIG,IAAC4D,EAASA,UAAE,CAAEzD,MAAO+C,EAAQW,kBAAmBrE,EAAeO,SAAU2D,KAAYA,WACzK"}
1
+ {"version":3,"file":"stepper.js","sources":["../../../../src/components/stepper/stepper.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Step, StepConnector, StepLabel, stepConnectorClasses } from '@mui/material';\nimport MuiStepper from '@mui/material/Stepper';\nimport { styled } from '@mui/material/styles';\nimport { flowColors } from '../../design/skoda/palette.theme';\nexport const Stepper = (_a) => {\n var { activeStep, alternativeLabel, children, classes, connector, nonLinear, orientation, step } = _a, props = __rest(_a, [\"activeStep\", \"alternativeLabel\", \"children\", \"classes\", \"connector\", \"nonLinear\", \"orientation\", \"step\"]);\n const styles = {\n lineHeight: '16px',\n fontSize: '12px',\n fontWeight: '400',\n };\n const desktopStepper = () => (_jsx(\"div\", { children: _jsx(MuiStepper, Object.assign({ className: \"controllerContainer\" }, props, { activeStep: activeStep, sx: {\n maxWidth: 800,\n display: 'flex',\n alignItems: 'center',\n spacing: 4,\n }, alternativeLabel: alternativeLabel, connector: _jsx(QontoConnector, {}), children: step.map((label) => (_jsx(Step, { children: _jsx(StepLabel, { style: styles, StepIconComponent: QontoStepIcon, children: label }) }, label))) })) }));\n return _jsx(StepperStyled, { children: desktopStepper() });\n};\nfunction QontoStepIcon(props) {\n const { active, completed, className } = props;\n return (_jsx(QontoStepIconRoot, { className: className, children: active ? (_jsx(\"div\", { className: \"QontoStepIcon-active\" })) : completed ? (_jsx(\"div\", { className: \"QontoStepIcon-completedIcon\" })) : (_jsx(\"div\", { className: \"QontoStepIcon-circle\" })) }));\n}\nconst QontoStepIconRoot = styled('div')(({ theme }) => {\n let style = {};\n style = {\n color: theme.palette.mode === 'dark' ? theme.palette.grey[700] : '#464748',\n display: 'flex',\n height: 22,\n alignItems: 'center',\n '& .QontoStepIcon-completedIcon': {\n color: flowColors.onSurface.os700,\n width: 12,\n height: 12,\n borderRadius: '50%',\n backgroundColor: 'currentColor',\n '&:hover': {\n borderRadius: '50%',\n border: `1.5px solid ${flowColors.onSurface.os700}`,\n color: flowColors.brand.secondary,\n },\n },\n '& .QontoStepIcon-active': {\n color: flowColors.onSurface.os700,\n width: 18,\n height: 18,\n borderRadius: '50%',\n marginRight: '5.25px',\n marginLeft: '0px',\n backgroundColor: 'currentColor',\n '&:hover': {\n borderRadius: '50%',\n border: `1.5px solid ${flowColors.onSurface.os700}`,\n color: flowColors.brand.secondary,\n },\n },\n '& .QontoStepIcon-circle': {\n width: 12,\n height: 12,\n borderRadius: '50%',\n border: '1.5px solid #C4C6C7',\n color: 'transparent',\n '&:hover': {\n cursor: 'pointer',\n borderRadius: '50%',\n border: `1.5px solid ${flowColors.disabled.tertiary}`,\n backgroundColor: flowColors.disabled.secondary,\n },\n },\n };\n return style;\n});\nconst QontoConnector = styled(StepConnector)(({ theme }) => ({\n [`&.${stepConnectorClasses.alternativeLabel}`]: {\n top: 10,\n left: 'calc(-50% + 9px)',\n right: 'calc(50% + 9px)',\n },\n [`&.${stepConnectorClasses.active}`]: {\n [`& .${stepConnectorClasses.line}`]: {\n borderColor: flowColors.onSurface.os700,\n width: '60px',\n },\n },\n [`&.${stepConnectorClasses.completed}`]: {\n [`& .${stepConnectorClasses.line}`]: {\n borderColor: flowColors.onSurface.os700,\n },\n },\n [`& .${stepConnectorClasses.line}`]: {\n borderColor: theme.palette.mode === 'dark' ? theme.palette.grey[800] : flowColors.disabled.primary,\n borderTopWidth: 3,\n borderRadius: 1,\n },\n}));\nconst StepperStyled = styled('div')(() => {\n let style = {};\n const SKODA_NEXT = 'SKODA Next';\n style = {\n '& .controllerContainer': {\n display: 'flex',\n alignItems: 'center',\n fontFamily: SKODA_NEXT,\n fontStyle: 'normal',\n fontWeight: '700',\n fontSize: '12px',\n lineHeight: '16px',\n },\n };\n return style;\n});\n//# sourceMappingURL=stepper.js.map"],"names":["QontoStepIcon","props","active","completed","className","_jsx","QontoStepIconRoot","children","jsx","styled","theme","style","color","palette","mode","grey","display","height","alignItems","flowColors","onSurface","os700","width","borderRadius","backgroundColor","border","brand","secondary","marginRight","marginLeft","cursor","disabled","tertiary","QontoConnector","StepConnector","stepConnectorClasses","alternativeLabel","top","left","right","line","borderColor","primary","borderTopWidth","StepperStyled","fontFamily","fontStyle","fontWeight","fontSize","lineHeight","_a","activeStep","classes","connector","nonLinear","orientation","step","__rest","styles","MuiStepper","Object","assign","sx","maxWidth","spacing","map","label","Step","StepLabel","StepIconComponent"],"mappings":"kRAqBA,SAASA,EAAcC,GACnB,MAAMC,OAAEA,EAAMC,UAAEA,EAASC,UAAEA,GAAcH,EACzC,OAAQI,MAAKC,EAAmB,CAAEF,UAAWA,EAAWG,SAAUL,EAAUG,EAAIG,IAAC,MAAO,CAAEJ,UAAW,yBAA6BD,EAAaE,EAAAA,IAAK,MAAO,CAAED,UAAW,gCAAqCC,EAAAA,IAAK,MAAO,CAAED,UAAW,0BAC1O,CACA,MAAME,EAAoBG,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YACvC,IAAIC,EAAQ,CAAA,EA8CZ,OA7CAA,EAAQ,CACJC,MAA8B,SAAvBF,EAAMG,QAAQC,KAAkBJ,EAAMG,QAAQE,KAAK,KAAO,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,OAGhBqB,EAAgBnC,EAAAA,OAAO,MAAPA,EAAc,KAChC,IAAIE,EAAQ,CAAA,EAaZ,OAXAA,EAAQ,CACJ,yBAA0B,CACtBK,QAAS,OACTE,WAAY,SACZ2B,WALW,aAMXC,UAAW,SACXC,WAAY,MACZC,SAAU,OACVC,WAAY,SAGbtC,CAAK,oBAzGQuC,IACpB,IAAIC,WAAEA,EAAUf,iBAAEA,EAAgB7B,SAAEA,EAAQ6C,QAAEA,EAAOC,UAAEA,EAASC,UAAEA,EAASC,YAAEA,EAAWC,KAAEA,GAASN,EAAIjD,EAAQwD,EAAMA,OAACP,EAAI,CAAC,aAAc,mBAAoB,WAAY,UAAW,YAAa,YAAa,cAAe,SAC7N,MAAMQ,EAAS,CACXT,WAAY,OACZD,SAAU,OACVD,WAAY,OAQhB,OAAO1C,EAAAA,IAAKuC,EAAe,CAAErC,SANCF,MAAK,MAAO,CAAEE,SAAUF,EAAIG,IAACmD,UAAYC,OAAOC,OAAO,CAAEzD,UAAW,uBAAyBH,EAAO,CAAEkD,WAAYA,EAAYW,GAAI,CACpJC,SAAU,IACV/C,QAAS,OACTE,WAAY,SACZ8C,QAAS,GACV5B,iBAAkBA,EAAkBiB,UAAWhD,EAAAA,IAAK4B,EAAgB,CAAA,GAAK1B,SAAUiD,EAAKS,KAAKC,GAAW7D,EAAAA,IAAK8D,EAAAA,KAAM,CAAE5D,SAAUF,EAAIG,IAAC4D,EAASA,UAAE,CAAEzD,MAAO+C,EAAQW,kBAAmBrE,EAAeO,SAAU2D,KAAYA,WACzK"}
@@ -1,3 +1,4 @@
1
+ /** @deprecated use Tab component from @mui/material instead */
1
2
  declare const useTabs: () => {
2
3
  handleOverflowingTabs: (tabsRef: any, windowWidth: any, children: any, setMenuChildren: any) => void;
3
4
  handleIsMobileView: (variantSecondaryNavigation: any, isMobileView: any, setIsMobileView: any, setWindowWidth: any) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useTabs.js","sources":["../../../../../src/components/tab/hook/useTabs.ts"],"sourcesContent":["import { useTheme } from '@mui/material';\nimport React, { useCallback } from 'react';\nconst useTabs = () => {\n const theme = useTheme();\n //HANDLE THE RENDER OF THE MORE BTN TABS AND THE OVERFLOWING TABS THAT MUST BE SHOWN INSIDE THE DROPDOWN\n const handleOverflowingTabs = useCallback((tabsRef, windowWidth, children, setMenuChildren) => {\n const tabsListParent = tabsRef.current.closest('div');\n const tabsListContainer = tabsListParent.querySelectorAll('div')[1];\n const tabsList = tabsListContainer.querySelectorAll('.MuiTab-root');\n const moreBtn = [...tabsList].find((item) => item.id === 'simple-tab-more');\n tabsList.forEach((item) => {\n item.style.display = 'inline-flex';\n });\n //if the screen size is desktop view, handle more btn, else hide more btn\n const hiddenItems = [];\n const primaryWidth = tabsListContainer.offsetWidth;\n const primaryItems = [...tabsList].filter((item) => item.id !== 'simple-tab-more');\n const moreBtnWidth = moreBtn.offsetWidth + 58;\n //we are hiding tabs if the overflow the tabs container\n primaryItems.forEach((item) => {\n if (primaryWidth <= item.offsetLeft + (item.offsetWidth + moreBtnWidth)) {\n item.style.display = 'none';\n hiddenItems.push(item.id);\n }\n });\n // if there are hidden elements (overflowing) show the more tabs and add hidden elements inisde the menu list\n //else hide more button\n if (!hiddenItems.length) {\n moreBtn.style.display = 'none';\n }\n else {\n const arr = [];\n hiddenItems.forEach((item) => {\n const filteredChildren = React.Children.toArray(children).find((child) => item === 'simple-tab-' + child.props.value);\n if (filteredChildren) {\n arr.push(filteredChildren);\n }\n });\n setMenuChildren(arr);\n }\n }, [theme.breakpoints.values.lg]);\n const handleIsMobileView = useCallback((variantSecondaryNavigation, isMobileView, setIsMobileView, setWindowWidth) => {\n setWindowWidth(window.innerWidth);\n if (variantSecondaryNavigation) {\n if (window.innerWidth <= theme.breakpoints.values.md && !isMobileView) {\n setIsMobileView(true);\n }\n else if (window.innerWidth > theme.breakpoints.values.md) {\n setIsMobileView(false);\n }\n }\n }, [theme.breakpoints.values.md]);\n //Returns the id and the aria controls for the tab component\n const a11yProps = useCallback((index) => {\n return {\n id: `simple-tab-${index}`,\n 'aria-controls': `simple-tabpanel-${index}`,\n };\n }, []);\n return {\n handleOverflowingTabs,\n handleIsMobileView,\n a11yProps,\n };\n};\nexport default useTabs;\n//# sourceMappingURL=useTabs.js.map"],"names":["theme","useTheme","handleOverflowingTabs","useCallback","tabsRef","windowWidth","children","setMenuChildren","tabsListContainer","current","closest","querySelectorAll","tabsList","moreBtn","find","item","id","forEach","style","display","hiddenItems","primaryWidth","offsetWidth","primaryItems","filter","moreBtnWidth","offsetLeft","push","length","arr","filteredChildren","React","default","Children","toArray","child","props","value","breakpoints","values","lg","handleIsMobileView","variantSecondaryNavigation","isMobileView","setIsMobileView","setWindowWidth","window","innerWidth","md","a11yProps","index"],"mappings":"oMAEgB,KACZ,MAAMA,EAAQC,EAAAA,WAwDd,MAAO,CACHC,sBAvD0BC,EAAAA,aAAY,CAACC,EAASC,EAAaC,EAAUC,KACvE,MACMC,EADiBJ,EAAQK,QAAQC,QAAQ,OACNC,iBAAiB,OAAO,GAC3DC,EAAWJ,EAAkBG,iBAAiB,gBAC9CE,EAAU,IAAID,GAAUE,MAAMC,GAAqB,oBAAZA,EAAKC,KAClDJ,EAASK,SAASF,IACdA,EAAKG,MAAMC,QAAU,aAAa,IAGtC,MAAMC,EAAc,GACdC,EAAeb,EAAkBc,YACjCC,EAAe,IAAIX,GAAUY,QAAQT,GAAqB,oBAAZA,EAAKC,KACnDS,EAAeZ,EAAQS,YAAc,GAU3C,GARAC,EAAaN,SAASF,IACdM,GAAgBN,EAAKW,YAAcX,EAAKO,YAAcG,KACtDV,EAAKG,MAAMC,QAAU,OACrBC,EAAYO,KAAKZ,EAAKC,IACzB,IAIAI,EAAYQ,OAGZ,CACD,MAAMC,EAAM,GACZT,EAAYH,SAASF,IACjB,MAAMe,EAAmBC,EAAKC,QAACC,SAASC,QAAQ5B,GAAUQ,MAAMqB,GAAUpB,IAAS,cAAgBoB,EAAMC,MAAMC,QAC3GP,GACAD,EAAIF,KAAKG,EACZ,IAELvB,EAAgBsB,EACnB,MAXGhB,EAAQK,MAAMC,QAAU,MAW3B,GACF,CAACnB,EAAMsC,YAAYC,OAAOC,KAqBzBC,mBApBuBtC,EAAAA,aAAY,CAACuC,EAA4BC,EAAcC,EAAiBC,KAC/FA,EAAeC,OAAOC,YAClBL,IACII,OAAOC,YAAc/C,EAAMsC,YAAYC,OAAOS,KAAOL,EACrDC,GAAgB,GAEXE,OAAOC,WAAa/C,EAAMsC,YAAYC,OAAOS,IAClDJ,GAAgB,GAEvB,GACF,CAAC5C,EAAMsC,YAAYC,OAAOS,KAWzBC,UATc9C,eAAa+C,IACpB,CACHlC,GAAI,cAAckC,IAClB,gBAAiB,mBAAmBA,OAEzC,IAKF"}
1
+ {"version":3,"file":"useTabs.js","sources":["../../../../../src/components/tab/hook/useTabs.ts"],"sourcesContent":["import { useTheme } from '@mui/material';\nimport React, { useCallback } from 'react';\n/** @deprecated use Tab component from @mui/material instead */\nconst useTabs = () => {\n const theme = useTheme();\n //HANDLE THE RENDER OF THE MORE BTN TABS AND THE OVERFLOWING TABS THAT MUST BE SHOWN INSIDE THE DROPDOWN\n const handleOverflowingTabs = useCallback((tabsRef, windowWidth, children, setMenuChildren) => {\n const tabsListParent = tabsRef.current.closest('div');\n const tabsListContainer = tabsListParent.querySelectorAll('div')[1];\n const tabsList = tabsListContainer.querySelectorAll('.MuiTab-root');\n const moreBtn = [...tabsList].find((item) => item.id === 'simple-tab-more');\n tabsList.forEach((item) => {\n item.style.display = 'inline-flex';\n });\n //if the screen size is desktop view, handle more btn, else hide more btn\n const hiddenItems = [];\n const primaryWidth = tabsListContainer.offsetWidth;\n const primaryItems = [...tabsList].filter((item) => item.id !== 'simple-tab-more');\n const moreBtnWidth = moreBtn.offsetWidth + 58;\n //we are hiding tabs if the overflow the tabs container\n primaryItems.forEach((item) => {\n if (primaryWidth <= item.offsetLeft + (item.offsetWidth + moreBtnWidth)) {\n item.style.display = 'none';\n hiddenItems.push(item.id);\n }\n });\n // if there are hidden elements (overflowing) show the more tabs and add hidden elements inisde the menu list\n //else hide more button\n if (!hiddenItems.length) {\n moreBtn.style.display = 'none';\n }\n else {\n const arr = [];\n hiddenItems.forEach((item) => {\n const filteredChildren = React.Children.toArray(children).find((child) => item === 'simple-tab-' + child.props.value);\n if (filteredChildren) {\n arr.push(filteredChildren);\n }\n });\n setMenuChildren(arr);\n }\n }, [theme.breakpoints.values.lg]);\n const handleIsMobileView = useCallback((variantSecondaryNavigation, isMobileView, setIsMobileView, setWindowWidth) => {\n setWindowWidth(window.innerWidth);\n if (variantSecondaryNavigation) {\n if (window.innerWidth <= theme.breakpoints.values.md && !isMobileView) {\n setIsMobileView(true);\n }\n else if (window.innerWidth > theme.breakpoints.values.md) {\n setIsMobileView(false);\n }\n }\n }, [theme.breakpoints.values.md]);\n //Returns the id and the aria controls for the tab component\n const a11yProps = useCallback((index) => {\n return {\n id: `simple-tab-${index}`,\n 'aria-controls': `simple-tabpanel-${index}`,\n };\n }, []);\n return {\n handleOverflowingTabs,\n handleIsMobileView,\n a11yProps,\n };\n};\nexport default useTabs;\n//# sourceMappingURL=useTabs.js.map"],"names":["theme","useTheme","handleOverflowingTabs","useCallback","tabsRef","windowWidth","children","setMenuChildren","tabsListContainer","current","closest","querySelectorAll","tabsList","moreBtn","find","item","id","forEach","style","display","hiddenItems","primaryWidth","offsetWidth","primaryItems","filter","moreBtnWidth","offsetLeft","push","length","arr","filteredChildren","React","default","Children","toArray","child","props","value","breakpoints","values","lg","handleIsMobileView","variantSecondaryNavigation","isMobileView","setIsMobileView","setWindowWidth","window","innerWidth","md","a11yProps","index"],"mappings":"oMAGgB,KACZ,MAAMA,EAAQC,EAAAA,WAwDd,MAAO,CACHC,sBAvD0BC,EAAAA,aAAY,CAACC,EAASC,EAAaC,EAAUC,KACvE,MACMC,EADiBJ,EAAQK,QAAQC,QAAQ,OACNC,iBAAiB,OAAO,GAC3DC,EAAWJ,EAAkBG,iBAAiB,gBAC9CE,EAAU,IAAID,GAAUE,MAAMC,GAAqB,oBAAZA,EAAKC,KAClDJ,EAASK,SAASF,IACdA,EAAKG,MAAMC,QAAU,aAAa,IAGtC,MAAMC,EAAc,GACdC,EAAeb,EAAkBc,YACjCC,EAAe,IAAIX,GAAUY,QAAQT,GAAqB,oBAAZA,EAAKC,KACnDS,EAAeZ,EAAQS,YAAc,GAU3C,GARAC,EAAaN,SAASF,IACdM,GAAgBN,EAAKW,YAAcX,EAAKO,YAAcG,KACtDV,EAAKG,MAAMC,QAAU,OACrBC,EAAYO,KAAKZ,EAAKC,IACzB,IAIAI,EAAYQ,OAGZ,CACD,MAAMC,EAAM,GACZT,EAAYH,SAASF,IACjB,MAAMe,EAAmBC,EAAKC,QAACC,SAASC,QAAQ5B,GAAUQ,MAAMqB,GAAUpB,IAAS,cAAgBoB,EAAMC,MAAMC,QAC3GP,GACAD,EAAIF,KAAKG,EACZ,IAELvB,EAAgBsB,EACnB,MAXGhB,EAAQK,MAAMC,QAAU,MAW3B,GACF,CAACnB,EAAMsC,YAAYC,OAAOC,KAqBzBC,mBApBuBtC,EAAAA,aAAY,CAACuC,EAA4BC,EAAcC,EAAiBC,KAC/FA,EAAeC,OAAOC,YAClBL,IACII,OAAOC,YAAc/C,EAAMsC,YAAYC,OAAOS,KAAOL,EACrDC,GAAgB,GAEXE,OAAOC,WAAa/C,EAAMsC,YAAYC,OAAOS,IAClDJ,GAAgB,GAEvB,GACF,CAAC5C,EAAMsC,YAAYC,OAAOS,KAWzBC,UATc9C,eAAa+C,IACpB,CACHlC,GAAI,cAAckC,IAClB,gBAAiB,mBAAmBA,OAEzC,IAKF"}
@@ -32,5 +32,6 @@ export interface TabProps {
32
32
  * @description SkodaFlow Tab component.
33
33
  * @param props TabProps
34
34
  * @returns React Functional Component
35
+ * @deprecated use Tab component from @mui/material instead
35
36
  */
36
37
  export declare const MenuTab: React.ForwardRefExoticComponent<TabProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),a=require("react"),t=require("./tabs.js"),l=require("@mui/material"),r=require("../icon/icon.js"),s=require("./tabStyled.js"),i=require("./hook/useTabs.js");function n(e){return e&&e.__esModule?e:{default:e}}var o=n(a);const u=a.forwardRef((({label:n,value:u,children:d},p)=>{const{activeTab:b,updateActiveTab:x,smallSize:h}=a.useContext(t.TabsContext),[m,f]=a.useState(!1),[j,v]=a.useState(!1),[C,k]=a.useState(null),[w,y]=a.useState(null),{a11yProps:S}=i.default(),g=a.useCallback((e=>{e.href?window.open(e.href,e.target):x(e.value,!0),v(!1),e.onClick&&e.onClick(e.value),e.analyticsCallback&&e.analyticsCallback(e.value),y(e.label)}),[x]),T=a.useCallback((e=>{v(!j),k(e.currentTarget)}),[j]),q=a.useCallback((()=>o.default.Children.map(d,(a=>e.jsx(l.MenuItem,{style:{fontSize:"16px"},onClick:()=>g(a.props),children:a.props.label})))),[d,g]);return a.useEffect((()=>{f(b===u)}),[b,m,u]),e.jsxs(e.Fragment,{children:[e.jsx(s.default,Object.assign({ref:p,wrapped:!0,onClick:T,smallSize:h,isActive:m,value:u,tabIndex:1,label:w||n},S(u),{icon:e.jsx(r.Icon,{className:j?"chevron-up":"chevron-down"}),iconPosition:"end",className:"MuiTab-more"})),e.jsx(l.Popper,{open:j,anchorEl:C,placement:"bottom",transition:!0,children:({TransitionProps:a})=>e.jsx(l.ClickAwayListener,{onClickAway:()=>v(!1),children:e.jsx(l.Fade,Object.assign({},a,{timeout:350,children:e.jsx(c,{id:"more-tabs-menu",children:q()})}))})})]})})),c=l.styled(l.MenuList)((()=>({top:"13px",left:"27px",boxShadow:"rgb(0 0 0 / 15%) 0px 3px 8px",borderRadius:"4px",padding:"0px",width:"131px",maxHeight:"240px",overflow:"overlay"})));exports.MenuTab=u;
1
+ "use strict";var e=require("react/jsx-runtime"),a=require("react"),t=require("./tabs.js"),r=require("@mui/material"),i=require("../icon/icon.js");require("../icon/icon.definitions.js");var l=require("./tabStyled.js"),n=require("./hook/useTabs.js");function s(e){return e&&e.__esModule?e:{default:e}}var o=s(a);const u=a.forwardRef((({label:s,value:u,children:d},p)=>{const{activeTab:b,updateActiveTab:x,smallSize:h}=a.useContext(t.TabsContext),[m,f]=a.useState(!1),[j,v]=a.useState(!1),[C,k]=a.useState(null),[w,y]=a.useState(null),{a11yProps:S}=n.default(),g=a.useCallback((e=>{e.href?window.open(e.href,e.target):x(e.value,!0),v(!1),e.onClick&&e.onClick(e.value),e.analyticsCallback&&e.analyticsCallback(e.value),y(e.label)}),[x]),q=a.useCallback((e=>{v(!j),k(e.currentTarget)}),[j]),T=a.useCallback((()=>o.default.Children.map(d,(a=>e.jsx(r.MenuItem,{style:{fontSize:"16px"},onClick:()=>g(a.props),children:a.props.label})))),[d,g]);return a.useEffect((()=>{f(b===u)}),[b,m,u]),e.jsxs(e.Fragment,{children:[e.jsx(l.default,Object.assign({ref:p,wrapped:!0,onClick:q,smallSize:h,isActive:m,value:u,tabIndex:1,label:w||s},S(u),{icon:e.jsx(i.Icon,{name:j?"chevron-up":"chevron-down"}),iconPosition:"end",className:"MuiTab-more"})),e.jsx(r.Popper,{open:j,anchorEl:C,placement:"bottom",transition:!0,children:({TransitionProps:a})=>e.jsx(r.ClickAwayListener,{onClickAway:()=>v(!1),children:e.jsx(r.Fade,Object.assign({},a,{timeout:350,children:e.jsx(c,{id:"more-tabs-menu",children:T()})}))})})]})})),c=r.styled(r.MenuList)((()=>({top:"13px",left:"27px",boxShadow:"rgb(0 0 0 / 15%) 0px 3px 8px",borderRadius:"4px",padding:"0px",width:"131px",maxHeight:"240px",overflow:"overlay"})));exports.MenuTab=u;
2
2
  //# sourceMappingURL=menuTab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menuTab.js","sources":["../../../../src/components/tab/menuTab.tsx"],"sourcesContent":["import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useState, useContext, useEffect, useCallback, forwardRef } from 'react';\nimport { TabsContext } from './tabs';\nimport { ClickAwayListener, Fade, MenuItem, MenuList, Popper, styled } from '@mui/material';\nimport { Icon } from '../icon';\nimport TabStyled from './tabStyled';\nimport useTabs from './hook/useTabs';\n/**\n * @description SkodaFlow Tab component.\n * @param props TabProps\n * @returns React Functional Component\n */\nexport const MenuTab = forwardRef(({ label, value, children }, ref) => {\n const { activeTab, updateActiveTab, smallSize } = useContext(TabsContext);\n const [isActive, setIsActive] = useState(false);\n const [open, setOpen] = useState(false);\n const [anchorEl, setAnchorEl] = useState(null);\n const [selectedLabel, setSelectedLabel] = useState(null);\n const { a11yProps } = useTabs();\n //On tab clicked: set the new activeTab selected\n //if is a menu tab: set the anchor element for the menu and set the width of the menu equal to the tab component\n //then call the onClick from outside\n const handleOnClick = useCallback((_props) => {\n if (!_props.href) {\n updateActiveTab(_props.value, true);\n }\n else {\n window.open(_props.href, _props.target);\n }\n setOpen(false);\n _props.onClick && _props.onClick(_props.value);\n _props.analyticsCallback && _props.analyticsCallback(_props.value);\n setSelectedLabel(_props.label);\n }, [updateActiveTab]);\n const handleOpenMenu = useCallback((e) => {\n setOpen(!open);\n setAnchorEl(e.currentTarget);\n }, [open]);\n //RETURNS ALL THE TABS OVERFLOWING AS MENU ITEMS\n const handleMenuItems = useCallback(() => {\n return React.Children.map(children, (child) => {\n return (_jsx(MenuItem, { style: { fontSize: '16px' }, onClick: () => handleOnClick(child.props), children: child.props.label }));\n });\n }, [children, handleOnClick]);\n //If the activeTab is equal to the current tab, set active\n useEffect(() => {\n if (activeTab === value) {\n setIsActive(true);\n }\n else {\n setIsActive(false);\n }\n }, [activeTab, isActive, value]);\n return (_jsxs(_Fragment, { children: [_jsx(TabStyled, Object.assign({ ref: ref, wrapped: true, onClick: handleOpenMenu, smallSize: smallSize, isActive: isActive, value: value, tabIndex: 1, label: selectedLabel || label }, a11yProps(value), { icon: _jsx(Icon, { className: open ? 'chevron-up' : 'chevron-down' }), iconPosition: \"end\", className: \"MuiTab-more\" })), _jsx(Popper, { open: open, anchorEl: anchorEl, placement: \"bottom\", transition: true, children: ({ TransitionProps }) => (_jsx(ClickAwayListener, { onClickAway: () => setOpen(false), children: _jsx(Fade, Object.assign({}, TransitionProps, { timeout: 350, children: _jsx(MenuStyled, { id: \"more-tabs-menu\", children: handleMenuItems() }) })) })) })] }));\n});\nconst MenuStyled = styled(MenuList)(() => {\n return {\n top: '13px',\n left: '27px',\n boxShadow: 'rgb(0 0 0 / 15%) 0px 3px 8px',\n borderRadius: '4px',\n padding: '0px',\n width: '131px',\n maxHeight: '240px',\n overflow: 'overlay',\n };\n});\n//# sourceMappingURL=menuTab.js.map"],"names":["MenuTab","forwardRef","label","value","children","ref","activeTab","updateActiveTab","smallSize","useContext","TabsContext","isActive","setIsActive","useState","open","setOpen","anchorEl","setAnchorEl","selectedLabel","setSelectedLabel","a11yProps","useTabs","handleOnClick","useCallback","_props","href","window","target","onClick","analyticsCallback","handleOpenMenu","e","currentTarget","handleMenuItems","React","default","Children","map","child","_jsx","MenuItem","style","fontSize","props","useEffect","_jsxs","jsxs","_Fragment","jsx","TabStyled","Object","assign","wrapped","tabIndex","icon","Icon","className","iconPosition","Popper","placement","transition","TransitionProps","ClickAwayListener","onClickAway","Fade","timeout","MenuStyled","id","styled","MenuList","top","left","boxShadow","borderRadius","padding","width","maxHeight","overflow"],"mappings":"2QAYY,MAACA,EAAUC,EAAUA,YAAC,EAAGC,QAAOC,QAAOC,YAAYC,KAC3D,MAAMC,UAAEA,EAASC,gBAAEA,EAAeC,UAAEA,GAAcC,EAAAA,WAAWC,EAAAA,cACtDC,EAAUC,GAAeC,EAAQA,UAAC,IAClCC,EAAMC,GAAWF,EAAQA,UAAC,IAC1BG,EAAUC,GAAeJ,EAAQA,SAAC,OAClCK,EAAeC,GAAoBN,EAAQA,SAAC,OAC7CO,UAAEA,GAAcC,EAAAA,UAIhBC,EAAgBC,eAAaC,IAC1BA,EAAOC,KAIRC,OAAOZ,KAAKU,EAAOC,KAAMD,EAAOG,QAHhC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B,eAAqC,IAE3sBiC,EAAaE,EAAAA,OAAOC,EAAQA,SAAfD,EAAiB,KACzB,CACHE,IAAK,OACLC,KAAM,OACNC,UAAW,+BACXC,aAAc,MACdC,QAAS,MACTC,MAAO,QACPC,UAAW,QACXC,SAAU"}
1
+ {"version":3,"file":"menuTab.js","sources":["../../../../src/components/tab/menuTab.tsx"],"sourcesContent":["import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useState, useContext, useEffect, useCallback, forwardRef } from 'react';\nimport { TabsContext } from './tabs';\nimport { ClickAwayListener, Fade, MenuItem, MenuList, Popper, styled } from '@mui/material';\nimport { Icon } from '../icon';\nimport TabStyled from './tabStyled';\nimport useTabs from './hook/useTabs';\n/**\n * @description SkodaFlow Tab component.\n * @param props TabProps\n * @returns React Functional Component\n * @deprecated use Tab component from @mui/material instead\n */\nexport const MenuTab = forwardRef(({ label, value, children }, ref) => {\n const { activeTab, updateActiveTab, smallSize } = useContext(TabsContext);\n const [isActive, setIsActive] = useState(false);\n const [open, setOpen] = useState(false);\n const [anchorEl, setAnchorEl] = useState(null);\n const [selectedLabel, setSelectedLabel] = useState(null);\n const { a11yProps } = useTabs();\n //On tab clicked: set the new activeTab selected\n //if is a menu tab: set the anchor element for the menu and set the width of the menu equal to the tab component\n //then call the onClick from outside\n const handleOnClick = useCallback((_props) => {\n if (!_props.href) {\n updateActiveTab(_props.value, true);\n }\n else {\n window.open(_props.href, _props.target);\n }\n setOpen(false);\n _props.onClick && _props.onClick(_props.value);\n _props.analyticsCallback && _props.analyticsCallback(_props.value);\n setSelectedLabel(_props.label);\n }, [updateActiveTab]);\n const handleOpenMenu = useCallback((e) => {\n setOpen(!open);\n setAnchorEl(e.currentTarget);\n }, [open]);\n //RETURNS ALL THE TABS OVERFLOWING AS MENU ITEMS\n const handleMenuItems = useCallback(() => {\n return React.Children.map(children, (child) => {\n return (_jsx(MenuItem, { style: { fontSize: '16px' }, onClick: () => handleOnClick(child.props), children: child.props.label }));\n });\n }, [children, handleOnClick]);\n //If the activeTab is equal to the current tab, set active\n useEffect(() => {\n if (activeTab === value) {\n setIsActive(true);\n }\n else {\n setIsActive(false);\n }\n }, [activeTab, isActive, value]);\n return (_jsxs(_Fragment, { children: [_jsx(TabStyled, Object.assign({ ref: ref, wrapped: true, onClick: handleOpenMenu, smallSize: smallSize, isActive: isActive, value: value, tabIndex: 1, label: selectedLabel || label }, a11yProps(value), { icon: _jsx(Icon, { name: open ? 'chevron-up' : 'chevron-down' }), iconPosition: \"end\", className: \"MuiTab-more\" })), _jsx(Popper, { open: open, anchorEl: anchorEl, placement: \"bottom\", transition: true, children: ({ TransitionProps }) => (_jsx(ClickAwayListener, { onClickAway: () => setOpen(false), children: _jsx(Fade, Object.assign({}, TransitionProps, { timeout: 350, children: _jsx(MenuStyled, { id: \"more-tabs-menu\", children: handleMenuItems() }) })) })) })] }));\n});\nconst MenuStyled = styled(MenuList)(() => {\n return {\n top: '13px',\n left: '27px',\n boxShadow: 'rgb(0 0 0 / 15%) 0px 3px 8px',\n borderRadius: '4px',\n padding: '0px',\n width: '131px',\n maxHeight: '240px',\n overflow: 'overlay',\n };\n});\n//# sourceMappingURL=menuTab.js.map"],"names":["MenuTab","forwardRef","label","value","children","ref","activeTab","updateActiveTab","smallSize","useContext","TabsContext","isActive","setIsActive","useState","open","setOpen","anchorEl","setAnchorEl","selectedLabel","setSelectedLabel","a11yProps","useTabs","handleOnClick","useCallback","_props","href","window","target","onClick","analyticsCallback","handleOpenMenu","e","currentTarget","handleMenuItems","React","default","Children","map","child","_jsx","MenuItem","style","fontSize","props","useEffect","_jsxs","jsxs","_Fragment","jsx","TabStyled","Object","assign","wrapped","tabIndex","icon","Icon","name","iconPosition","className","Popper","placement","transition","TransitionProps","ClickAwayListener","onClickAway","Fade","timeout","MenuStyled","id","styled","MenuList","top","left","boxShadow","borderRadius","padding","width","maxHeight","overflow"],"mappings":"sTAaY,MAACA,EAAUC,EAAUA,YAAC,EA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O,aAAe,iBAAmB2C,aAAc,MAAOC,UAAW,iBAAmBnB,EAAIS,IAACW,SAAQ,CAAE7C,KAAMA,EAAME,SAAUA,EAAU4C,UAAW,SAAUC,YAAY,EAAMzD,SAAU,EAAG0D,qBAAuBvB,EAAIS,IAACe,oBAAmB,CAAEC,YAAa,IAAMjD,GAAQ,GAAQX,SAAUmC,EAAIS,IAACiB,EAAIA,KAAEf,OAAOC,OAAO,CAAE,EAAEW,EAAiB,CAAEI,QAAS,IAAK9D,SAAUmC,EAAIS,IAACmB,EAAY,CAAEC,GAAI,iBAAkBhE,SAAU6B,eAAqC,IAEtsBkC,EAAaE,EAAAA,OAAOC,EAAQA,SAAfD,EAAiB,KACzB,CACHE,IAAK,OACLC,KAAM,OACNC,UAAW,+BACXC,aAAc,MACdC,QAAS,MACTC,MAAO,QACPC,UAAW,QACXC,SAAU"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),o=require("@mui/material/AppBar"),i=require("@mui/material/Toolbar"),t=require("../../icon/icon.js"),a=require("./secondaryTabStyled.js"),n=require("@mui/material"),s=require("../../divider/divider.js"),l=require("../../../design/skoda/palette.theme.js");function d(e){return e&&e.__esModule?e:{default:e}}var p=d(r),c=d(o),u=d(i);const x=n.styled(n.Backdrop)((()=>({zIndex:2e3}))),b=n.styled(n.Popper)((()=>({transform:"unset !important",position:"static !important",zIndex:2e3}))),h=n.styled(n.MenuList)((({theme:e})=>({position:"absolute",bottom:"0",left:0,width:"100%",padding:"26px 0px 27px 0px",background:"white",boxSizing:"border-box",borderTopLeftRadius:"16px",borderTopRightRadius:"16px",zIndex:2e3,boxShadow:"rgb(0 0 0 / 15%) 0px 3px 8px","& .MuiDivider-root":{display:"block",marginTop:"0px !important",marginBottom:"0px !important"},"& div:first-of-type":{"& > li":{borderTopLeftRadius:"16px",borderTopRightRadius:"16px"}},"& > div > li":{fontSize:"16px",fontWeight:"400",color:e.palette.onSurface.os900,paddingTop:"11px",paddingBottom:"11px"}}))),m=n.styled(c.default)((()=>({maxHeigth:"56px",padding:"0px",top:"auto",bottom:0,boxShadow:"none",borderTop:`1px solid ${l.flowColors.transparent.secondary}`,backgroundColor:l.flowColors.background.primary,"& > div.MuiToolbar-root":{maxHeight:"56px",padding:"0px","& > div":{width:"100%",justifyContent:"space-evenly","& > div":{"&> a":{padding:0,textDecoration:"none"}}}}})));exports.SecondaryNavigationTabs=({currentActiveTab:o,setCurrentActiveTab:i,children:l})=>{const[d,c]=r.useState(null),[g,j]=r.useState(null),[f,v]=r.useState(!1),[k,C]=r.useState(null),y=r.useCallback((e=>{i(e.value),e.onClick&&e.onClick()}),[i]),T=r.useCallback((e=>{v(!f),j(e.currentTarget)}),[f]),A=r.useCallback((r=>r.href?e.jsxs("a",{href:r.href,target:r.target||null,children:[e.jsx(t.Icon,{color:"inherit",className:r.icon||"more-horizontal"}),r.label]}):e.jsxs(e.Fragment,{children:[e.jsx(t.Icon,{color:"inherit",className:r.icon||"more-horizontal"}),r.label]})),[]),w=r.useCallback((e=>{C(e.label),e.href?window.open(e.href,e.target):i(e.value),v(!1),e.onClick&&e.onClick(e.value)}),[i]),S=r.useCallback((()=>d.slice(3).map(((r,o)=>e.jsxs("div",{children:[e.jsx(n.MenuItem,{onClick:()=>w(r.props),children:r.props.label},o),e.jsx(s.Divider,{orientation:"horizontal",textAlign:"center",variant:"middle"})]},r.props.label)))),[d,w]);return r.useEffect((()=>{c(p.default.Children.toArray(l))}),[l]),e.jsx(m,{position:"fixed",color:"transparent",children:e.jsx(u.default,{children:e.jsx(n.Box,{sx:{display:"flex"},children:d&&e.jsxs(e.Fragment,{children:[e.jsx(a.default,Object.assign({},d[0].props,{isActive:o===d[0].props.value,onClick:()=>{y(d[0].props)},children:A(d[0].props)}),"secondary-tab-0"),e.jsx(a.default,Object.assign({},d[1].props,{isActive:o===d[1].props.value,onClick:()=>{y(d[1].props)},children:A(d[1].props)}),"secondary-tab-1"),e.jsx(a.default,Object.assign({},d[2].props,{isActive:o===d[2].props.value,onClick:()=>{y(d[2].props)},children:A(d[2].props)}),"secondary-tab-2"),d.length>4&&e.jsxs(e.Fragment,{children:[e.jsxs(a.default,{isActive:f,moreTab:!0,selectedMenuLabel:k,onClick:T,children:[e.jsx(t.Icon,{color:"inherit",className:"more-vertical"}),k]},"secondary-tab-more"),e.jsx(b,{open:f,anchorEl:g,placement:"top",transition:!0,disablePortal:!1,children:({TransitionProps:r})=>e.jsx(n.ClickAwayListener,{onClickAway:()=>v(!1),children:e.jsx(x,{open:f,onClick:()=>v(!1),children:e.jsx(n.Fade,Object.assign({},r,{timeout:350,children:e.jsx(h,{id:"more-tabs-menu",children:S()})}))})})})]}),d.length<=4&&e.jsx(a.default,Object.assign({},d[3].props,{isActive:o===d[3].props.value,onClick:()=>{y(d[3].props)},children:A(d[3].props)}),"secondary-tab-3")]})})})})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),o=require("@mui/material/AppBar"),i=require("@mui/material/Toolbar"),t=require("../../icon/icon.js");require("../../icon/icon.definitions.js");var a=require("./secondaryTabStyled.js"),n=require("@mui/material"),s=require("../../../design/skoda/palette.theme.js");function l(e){return e&&e.__esModule?e:{default:e}}var p=l(r),d=l(o),c=l(i);const u=n.styled(n.Backdrop)((()=>({zIndex:2e3}))),x=n.styled(n.Popper)((()=>({transform:"unset !important",position:"static !important",zIndex:2e3}))),b=n.styled(n.MenuList)((({theme:e})=>({position:"absolute",bottom:"0",left:0,width:"100%",padding:"26px 0px 27px 0px",background:"white",boxSizing:"border-box",borderTopLeftRadius:"16px",borderTopRightRadius:"16px",zIndex:2e3,boxShadow:"rgb(0 0 0 / 15%) 0px 3px 8px","& .MuiDivider-root":{display:"block",marginTop:"0px !important",marginBottom:"0px !important"},"& div:first-of-type":{"& > li":{borderTopLeftRadius:"16px",borderTopRightRadius:"16px"}},"& > div > li":{fontSize:"16px",fontWeight:"400",color:e.palette.onSurface.os900,paddingTop:"11px",paddingBottom:"11px"}}))),h=n.styled(d.default)((()=>({maxHeigth:"56px",padding:"0px",top:"auto",bottom:0,boxShadow:"none",borderTop:`1px solid ${s.flowColors.transparent.secondary}`,backgroundColor:s.flowColors.background.primary,"& > div.MuiToolbar-root":{maxHeight:"56px",padding:"0px","& > div":{width:"100%",justifyContent:"space-evenly","& > div":{"&> a":{padding:0,textDecoration:"none"}}}}})));exports.SecondaryNavigationTabs=({currentActiveTab:o,setCurrentActiveTab:i,children:s})=>{const[l,d]=r.useState(null),[m,g]=r.useState(null),[j,f]=r.useState(!1),[v,k]=r.useState(null),C=r.useCallback((e=>{i(e.value),e.onClick&&e.onClick()}),[i]),y=r.useCallback((e=>{f(!j),g(e.currentTarget)}),[j]),T=r.useCallback((r=>r.href?e.jsxs("a",{href:r.href,target:r.target||null,children:[e.jsx(t.Icon,{color:"inherit",name:r.icon||"more-horizontal"}),r.label]}):e.jsxs(e.Fragment,{children:[e.jsx(t.Icon,{color:"inherit",name:r.icon||"more-horizontal"}),r.label]})),[]),A=r.useCallback((e=>{k(e.label),e.href?window.open(e.href,e.target):i(e.value),f(!1),e.onClick&&e.onClick(e.value)}),[i]),w=r.useCallback((()=>l.slice(3).map(((r,o)=>e.jsxs("div",{children:[e.jsx(n.MenuItem,{onClick:()=>A(r.props),children:r.props.label},o),e.jsx(n.Divider,{orientation:"horizontal",textAlign:"center",variant:"middle"})]},r.props.label)))),[l,A]);return r.useEffect((()=>{d(p.default.Children.toArray(s))}),[s]),e.jsx(h,{position:"fixed",color:"transparent",children:e.jsx(c.default,{children:e.jsx(n.Box,{sx:{display:"flex"},children:l&&e.jsxs(e.Fragment,{children:[e.jsx(a.default,Object.assign({},l[0].props,{isActive:o===l[0].props.value,onClick:()=>{C(l[0].props)},children:T(l[0].props)}),"secondary-tab-0"),e.jsx(a.default,Object.assign({},l[1].props,{isActive:o===l[1].props.value,onClick:()=>{C(l[1].props)},children:T(l[1].props)}),"secondary-tab-1"),e.jsx(a.default,Object.assign({},l[2].props,{isActive:o===l[2].props.value,onClick:()=>{C(l[2].props)},children:T(l[2].props)}),"secondary-tab-2"),l.length>4&&e.jsxs(e.Fragment,{children:[e.jsxs(a.default,{isActive:j,moreTab:!0,selectedMenuLabel:v,onClick:y,children:[e.jsx(t.Icon,{color:"inherit",name:"vertical"}),v]},"secondary-tab-more"),e.jsx(x,{open:j,anchorEl:m,placement:"top",transition:!0,disablePortal:!1,children:({TransitionProps:r})=>e.jsx(n.ClickAwayListener,{onClickAway:()=>f(!1),children:e.jsx(u,{open:j,onClick:()=>f(!1),children:e.jsx(n.Fade,Object.assign({},r,{timeout:350,children:e.jsx(b,{id:"more-tabs-menu",children:w()})}))})})})]}),l.length<=4&&e.jsx(a.default,Object.assign({},l[3].props,{isActive:o===l[3].props.value,onClick:()=>{C(l[3].props)},children:T(l[3].props)}),"secondary-tab-3")]})})})})};
2
2
  //# sourceMappingURL=secondaryNavigationTabs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"secondaryNavigationTabs.js","sources":["../../../../../src/components/tab/secondaryNavigation/secondaryNavigationTabs.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { useCallback, useEffect, useState } from 'react';\nimport MuiAppBar from '@mui/material/AppBar';\nimport Toolbar from '@mui/material/Toolbar';\nimport { Icon } from '../../icon';\nimport SecondaryTabStyled from './secondaryTabStyled';\nimport { MenuItem, ClickAwayListener, Fade, MenuList, Popper, styled, Box, Backdrop } from '@mui/material';\nimport { Divider } from '../../divider';\nimport { flowColors } from '../../../design/skoda/palette.theme';\n/**\n * @description SkodaFlow Checkbox component.\n * Properties are inherited from HTML Button element.\n * @param props AppBarProps\n * @returns React Functional Component\n */\nexport const SecondaryNavigationTabs = ({ currentActiveTab, setCurrentActiveTab, children }) => {\n const [childrenArr, setChildrenArr] = useState(null);\n const [anchorEl, setAnchorEl] = useState(null);\n const [open, setOpen] = useState(false);\n const [selectedMenuLabel, setSelectedMenuLabel] = useState(null);\n //handle the active tab selected\n const handleActiveTab = useCallback((_props) => {\n setCurrentActiveTab(_props.value);\n _props.onClick && _props.onClick();\n }, [setCurrentActiveTab]);\n //handle the click on tab of type menu\n const handleMenuTabClick = useCallback((e) => {\n setOpen(!open);\n setAnchorEl(e.currentTarget);\n }, [open]);\n //render a link tab or not based on type\n const handleRenderTabType = useCallback((_props) => {\n if (_props.href) {\n return (_jsxs(\"a\", { href: _props.href, target: _props.target || null, children: [_jsx(Icon, { color: \"inherit\", className: _props.icon || 'more-horizontal' }), _props.label] }));\n }\n else {\n return (_jsxs(_Fragment, { children: [_jsx(Icon, { color: \"inherit\", className: _props.icon || 'more-horizontal' }), _props.label] }));\n }\n }, []);\n //handle the event triggered on onclick based on tab type (link or tab)\n const onClickMenuItem = useCallback((_props) => {\n setSelectedMenuLabel(_props.label);\n if (!_props.href) {\n setCurrentActiveTab(_props.value);\n }\n else {\n window.open(_props.href, _props.target);\n }\n setOpen(false);\n _props.onClick && _props.onClick(_props.value);\n }, [setCurrentActiveTab]);\n //returns the list of menu items\n const handleMenuItems = useCallback(() => {\n const menuItems = childrenArr.slice(3);\n return menuItems.map((item, i) => {\n return (_jsxs(\"div\", { children: [_jsx(MenuItem, { onClick: () => onClickMenuItem(item.props), children: item.props.label }, i), _jsx(Divider, { orientation: \"horizontal\", textAlign: \"center\", variant: \"middle\" })] }, item.props.label));\n });\n }, [childrenArr, onClickMenuItem]);\n useEffect(() => {\n setChildrenArr(React.Children.toArray(children));\n }, [children]);\n return (_jsx(AppBarStyled, { position: \"fixed\", color: \"transparent\", children: _jsx(Toolbar, { children: _jsx(Box, { sx: { display: 'flex' }, children: childrenArr && (_jsxs(_Fragment, { children: [_jsx(SecondaryTabStyled, Object.assign({}, childrenArr[0].props, { isActive: currentActiveTab === childrenArr[0].props.value, onClick: () => {\n handleActiveTab(childrenArr[0].props);\n }, children: handleRenderTabType(childrenArr[0].props) }), `secondary-tab-0`), _jsx(SecondaryTabStyled, Object.assign({}, childrenArr[1].props, { isActive: currentActiveTab === childrenArr[1].props.value, onClick: () => {\n handleActiveTab(childrenArr[1].props);\n }, children: handleRenderTabType(childrenArr[1].props) }), `secondary-tab-1`), _jsx(SecondaryTabStyled, Object.assign({}, childrenArr[2].props, { isActive: currentActiveTab === childrenArr[2].props.value, onClick: () => {\n handleActiveTab(childrenArr[2].props);\n }, children: handleRenderTabType(childrenArr[2].props) }), `secondary-tab-2`), childrenArr.length > 4 && (_jsxs(_Fragment, { children: [_jsxs(SecondaryTabStyled, { isActive: open, moreTab: true, selectedMenuLabel: selectedMenuLabel, onClick: handleMenuTabClick, children: [_jsx(Icon, { color: \"inherit\", className: 'more-vertical' }), selectedMenuLabel] }, `secondary-tab-more`), _jsx(PopperStyled, { open: open, anchorEl: anchorEl, placement: \"top\", transition: true, disablePortal: false, children: ({ TransitionProps }) => (_jsx(ClickAwayListener, { onClickAway: () => setOpen(false), children: _jsx(BackdropStyled, { open: open, onClick: () => setOpen(false), children: _jsx(Fade, Object.assign({}, TransitionProps, { timeout: 350, children: _jsx(MenuStyled, { id: \"more-tabs-menu\", children: handleMenuItems() }) })) }) })) })] })), childrenArr.length <= 4 && (_jsx(SecondaryTabStyled, Object.assign({}, childrenArr[3].props, { isActive: currentActiveTab === childrenArr[3].props.value, onClick: () => {\n handleActiveTab(childrenArr[3].props);\n }, children: handleRenderTabType(childrenArr[3].props) }), `secondary-tab-3`))] })) }) }) }));\n};\nconst BackdropStyled = styled(Backdrop)(() => {\n return {\n zIndex: 2000,\n };\n});\nconst PopperStyled = styled(Popper)(() => {\n const style = {\n transform: 'unset !important',\n position: 'static !important',\n zIndex: 2000,\n };\n return style;\n});\nconst MenuStyled = styled(MenuList)(({ theme }) => {\n return {\n position: 'absolute',\n bottom: '0',\n left: 0,\n width: '100%',\n padding: '26px 0px 27px 0px',\n background: 'white',\n boxSizing: 'border-box',\n borderTopLeftRadius: '16px',\n borderTopRightRadius: '16px',\n zIndex: 2000,\n boxShadow: 'rgb(0 0 0 / 15%) 0px 3px 8px',\n '& .MuiDivider-root': {\n display: 'block',\n marginTop: '0px !important',\n marginBottom: '0px !important',\n },\n '& div:first-of-type': {\n '& > li': {\n borderTopLeftRadius: '16px',\n borderTopRightRadius: '16px',\n },\n },\n '& > div > li': {\n fontSize: '16px',\n fontWeight: '400',\n color: theme.palette.onSurface.os900,\n paddingTop: '11px',\n paddingBottom: '11px',\n },\n };\n});\n/**\n * @description Tabs styling definition based on props\n */\nconst AppBarStyled = styled(MuiAppBar)(() => {\n return {\n maxHeigth: '56px',\n padding: '0px',\n top: 'auto',\n bottom: 0,\n boxShadow: 'none',\n borderTop: `1px solid ${flowColors.transparent.secondary}`,\n backgroundColor: flowColors.background.primary,\n '& > div.MuiToolbar-root': {\n maxHeight: '56px',\n padding: '0px',\n '& > div': {\n width: '100%',\n justifyContent: 'space-evenly',\n '& > div': {\n '&> a': {\n padding: 0,\n textDecoration: 'none',\n },\n },\n },\n },\n };\n});\n//# sourceMappingURL=secondaryNavigationTabs.js.map"],"names":["BackdropStyled","styled","Backdrop","zIndex","PopperStyled","Popper","transform","position","MenuStyled","MenuList","theme","bottom","left","width","padding","background","boxSizing","borderTopLeftRadius","borderTopRightRadius","boxShadow","display","marginTop","marginBottom","fontSize","fontWeight","color","palette","onSurface","os900","paddingTop","paddingBottom","AppBarStyled","MuiAppBar","default","maxHeigth","top","borderTop","flowColors","transparent","secondary","backgroundColor","primary","maxHeight","justifyContent","textDecoration","currentActiveTab","setCurrentActiveTab","children","childrenArr","setChildrenArr","useState","anchorEl","setAnchorEl","open","setOpen","selectedMenuLabel","setSelectedMenuLabel","handleActiveTab","useCallback","_props","value","onClick","handleMenuTabClick","e","currentTarget","handleRenderTabType","href","_jsxs","target","_jsx","Icon","className","icon","label","_Fragment","onClickMenuItem","window","handleMenuItems","slice","map","item","i","MenuItem","props","Divider","orientation","textAlign","variant","useEffect","React","Children","toArray","jsx","Toolbar","Box","sx","jsxs","SecondaryTabStyled","Object","assign","isActive","length","moreTab","placement","transition","disablePortal","TransitionProps","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AiBA,kBAAE,CAAEC,YAAa,IAAMtD,GAAQ,GAAQP,SAAUsB,EAAIuB,IAAC5F,EAAgB,CAAEqD,KAAMA,EAAMQ,QAAS,IAAMP,GAAQ,GAAQP,SAAUsB,MAAKwC,EAAAA,KAAMX,OAAOC,OAAO,CAAA,EAAIO,EAAiB,CAAEI,QAAS,IAAK/D,SAAUsB,EAAAA,IAAK7D,EAAY,CAAEuG,GAAI,iBAAkBhE,SAAU8B,kBAAyC7B,EAAYqD,QAAU,GAAMhC,EAAAA,IAAK4B,EAAAA,QAAoBC,OAAOC,OAAO,CAAE,EAAEnD,EAAY,GAAGmC,MAAO,CAAEiB,SAAUvD,IAAqBG,EAAY,GAAGmC,MAAMvB,MAAOC,QAAS,KACr+BJ,EAAgBT,EAAY,GAAGmC,MAAM,EACtCpC,SAAUkB,EAAoBjB,EAAY,GAAGmC,SAAW,2BAAmC"}
1
+ {"version":3,"file":"secondaryNavigationTabs.js","sources":["../../../../../src/components/tab/secondaryNavigation/secondaryNavigationTabs.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { useCallback, useEffect, useState } from 'react';\nimport MuiAppBar from '@mui/material/AppBar';\nimport Toolbar from '@mui/material/Toolbar';\nimport { Icon } from '../../icon';\nimport SecondaryTabStyled from './secondaryTabStyled';\nimport { MenuItem, ClickAwayListener, Fade, MenuList, Popper, styled, Box, Backdrop, Divider } from '@mui/material';\nimport { flowColors } from '../../../design/skoda/palette.theme';\n/**\n * @description SkodaFlow Checkbox component.\n * Properties are inherited from HTML Button element.\n * @param props AppBarProps\n * @returns React Functional Component\n */\nexport const SecondaryNavigationTabs = ({ currentActiveTab, setCurrentActiveTab, children }) => {\n const [childrenArr, setChildrenArr] = useState(null);\n const [anchorEl, setAnchorEl] = useState(null);\n const [open, setOpen] = useState(false);\n const [selectedMenuLabel, setSelectedMenuLabel] = useState(null);\n //handle the active tab selected\n const handleActiveTab = useCallback((_props) => {\n setCurrentActiveTab(_props.value);\n _props.onClick && _props.onClick();\n }, [setCurrentActiveTab]);\n //handle the click on tab of type menu\n const handleMenuTabClick = useCallback((e) => {\n setOpen(!open);\n setAnchorEl(e.currentTarget);\n }, [open]);\n //render a link tab or not based on type\n const handleRenderTabType = useCallback((_props) => {\n if (_props.href) {\n return (_jsxs(\"a\", { href: _props.href, target: _props.target || null, children: [_jsx(Icon, { color: \"inherit\", name: _props.icon || 'more-horizontal' }), _props.label] }));\n }\n else {\n return (_jsxs(_Fragment, { children: [_jsx(Icon, { color: \"inherit\", name: _props.icon || 'more-horizontal' }), _props.label] }));\n }\n }, []);\n //handle the event triggered on onclick based on tab type (link or tab)\n const onClickMenuItem = useCallback((_props) => {\n setSelectedMenuLabel(_props.label);\n if (!_props.href) {\n setCurrentActiveTab(_props.value);\n }\n else {\n window.open(_props.href, _props.target);\n }\n setOpen(false);\n _props.onClick && _props.onClick(_props.value);\n }, [setCurrentActiveTab]);\n //returns the list of menu items\n const handleMenuItems = useCallback(() => {\n const menuItems = childrenArr.slice(3);\n return menuItems.map((item, i) => {\n return (_jsxs(\"div\", { children: [_jsx(MenuItem, { onClick: () => onClickMenuItem(item.props), children: item.props.label }, i), _jsx(Divider, { orientation: \"horizontal\", textAlign: \"center\", variant: \"middle\" })] }, item.props.label));\n });\n }, [childrenArr, onClickMenuItem]);\n useEffect(() => {\n setChildrenArr(React.Children.toArray(children));\n }, [children]);\n return (_jsx(AppBarStyled, { position: \"fixed\", color: \"transparent\", children: _jsx(Toolbar, { children: _jsx(Box, { sx: { display: 'flex' }, children: childrenArr && (_jsxs(_Fragment, { children: [_jsx(SecondaryTabStyled, Object.assign({}, childrenArr[0].props, { isActive: currentActiveTab === childrenArr[0].props.value, onClick: () => {\n handleActiveTab(childrenArr[0].props);\n }, children: handleRenderTabType(childrenArr[0].props) }), `secondary-tab-0`), _jsx(SecondaryTabStyled, Object.assign({}, childrenArr[1].props, { isActive: currentActiveTab === childrenArr[1].props.value, onClick: () => {\n handleActiveTab(childrenArr[1].props);\n }, children: handleRenderTabType(childrenArr[1].props) }), `secondary-tab-1`), _jsx(SecondaryTabStyled, Object.assign({}, childrenArr[2].props, { isActive: currentActiveTab === childrenArr[2].props.value, onClick: () => {\n handleActiveTab(childrenArr[2].props);\n }, children: handleRenderTabType(childrenArr[2].props) }), `secondary-tab-2`), childrenArr.length > 4 && (_jsxs(_Fragment, { children: [_jsxs(SecondaryTabStyled, { isActive: open, moreTab: true, selectedMenuLabel: selectedMenuLabel, onClick: handleMenuTabClick, children: [_jsx(Icon, { color: \"inherit\", name: \"vertical\" }), selectedMenuLabel] }, `secondary-tab-more`), _jsx(PopperStyled, { open: open, anchorEl: anchorEl, placement: \"top\", transition: true, disablePortal: false, children: ({ TransitionProps }) => (_jsx(ClickAwayListener, { onClickAway: () => setOpen(false), children: _jsx(BackdropStyled, { open: open, onClick: () => setOpen(false), children: _jsx(Fade, Object.assign({}, TransitionProps, { timeout: 350, children: _jsx(MenuStyled, { id: \"more-tabs-menu\", children: handleMenuItems() }) })) }) })) })] })), childrenArr.length <= 4 && (_jsx(SecondaryTabStyled, Object.assign({}, childrenArr[3].props, { isActive: currentActiveTab === childrenArr[3].props.value, onClick: () => {\n handleActiveTab(childrenArr[3].props);\n }, children: handleRenderTabType(childrenArr[3].props) }), `secondary-tab-3`))] })) }) }) }));\n};\nconst BackdropStyled = styled(Backdrop)(() => {\n return {\n zIndex: 2000,\n };\n});\nconst PopperStyled = styled(Popper)(() => {\n const style = {\n transform: 'unset !important',\n position: 'static !important',\n zIndex: 2000,\n };\n return style;\n});\nconst MenuStyled = styled(MenuList)(({ theme }) => {\n return {\n position: 'absolute',\n bottom: '0',\n left: 0,\n width: '100%',\n padding: '26px 0px 27px 0px',\n background: 'white',\n boxSizing: 'border-box',\n borderTopLeftRadius: '16px',\n borderTopRightRadius: '16px',\n zIndex: 2000,\n boxShadow: 'rgb(0 0 0 / 15%) 0px 3px 8px',\n '& .MuiDivider-root': {\n display: 'block',\n marginTop: '0px !important',\n marginBottom: '0px !important',\n },\n '& div:first-of-type': {\n '& > li': {\n borderTopLeftRadius: '16px',\n borderTopRightRadius: '16px',\n },\n },\n '& > div > li': {\n fontSize: '16px',\n fontWeight: '400',\n color: theme.palette.onSurface.os900,\n paddingTop: '11px',\n paddingBottom: '11px',\n },\n };\n});\n/**\n * @description Tabs styling definition based on props\n */\nconst AppBarStyled = styled(MuiAppBar)(() => {\n return {\n maxHeigth: '56px',\n padding: '0px',\n top: 'auto',\n bottom: 0,\n boxShadow: 'none',\n borderTop: `1px solid ${flowColors.transparent.secondary}`,\n backgroundColor: flowColors.background.primary,\n '& > div.MuiToolbar-root': {\n maxHeight: '56px',\n padding: '0px',\n '& > div': {\n width: '100%',\n justifyContent: 'space-evenly',\n '& > div': {\n '&> a': {\n padding: 0,\n textDecoration: 'none',\n },\n },\n },\n },\n };\n});\n//# sourceMappingURL=secondaryNavigationTabs.js.map"],"names":["BackdropStyled","styled","Backdrop","zIndex","PopperStyled","Popper","transform","position","MenuStyled","MenuList","theme","bottom","left","width","padding","background","boxSizing","borderTopLeftRadius","borderTopRightRadius","boxShadow","display","marginTop","marginBottom","fontSize","fontWeight","color","palette","onSurface","os900","paddingTop","paddingBottom","AppBarStyled","MuiAppBar","default","maxHeigth","top","borderTop","flowColors","transparent","secondary","backgroundColor","primary","maxHeight","justifyContent","textDecoration","currentActiveTab","setCurrentActiveTab","children","childrenArr","setChildrenArr","useState","anchorEl","setAnchorEl","open","setOpen","selectedMenuLabel","setSelectedMenuLabel","handleActiveTab","useCallback","_props","value","onClick","handleMenuTabClick","e","currentTarget","handleRenderTabType","href","_jsxs","target","_jsx","Icon","name","icon","label","_Fragment","onClickMenuItem","window","handleMenuItems","slice","map","item","i","MenuItem","props","Divider","orientation","textAlign","variant","useEffect","React","Children","toArray","jsx","Toolbar","Box","sx","jsxs","SecondaryTabStyled","Object","assign","isActive","length","moreTab","placement","transition","disablePortal","TransitionProps","ClickAwayListener","onClickAway","F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a,IAAMtD,GAAQ,GAAQP,SAAUsB,EAAIuB,IAAC5F,EAAgB,CAAEqD,KAAMA,EAAMQ,QAAS,IAAMP,GAAQ,GAAQP,SAAUsB,MAAKwC,EAAAA,KAAMX,OAAOC,OAAO,CAAA,EAAIO,EAAiB,CAAEI,QAAS,IAAK/D,SAAUsB,EAAAA,IAAK7D,EAAY,CAAEuG,GAAI,iBAAkBhE,SAAU8B,kBAAyC7B,EAAYqD,QAAU,GAAMhC,EAAAA,IAAK4B,EAAAA,QAAoBC,OAAOC,OAAO,CAAE,EAAEnD,EAAY,GAAGmC,MAAO,CAAEiB,SAAUvD,IAAqBG,EAAY,GAAGmC,MAAMvB,MAAOC,QAAS,KAC39BJ,EAAgBT,EAAY,GAAGmC,MAAM,EACtCpC,SAAUkB,EAAoBjB,EAAY,GAAGmC,SAAW,2BAAmC"}
@@ -45,5 +45,6 @@ export interface TabProps {
45
45
  * @description SkodaFlow Tab component.
46
46
  * @param props TabProps
47
47
  * @returns React Functional Component
48
+ * @deprecated use Tab component from @mui/material instead
48
49
  */
49
50
  export declare const Tab: React.ForwardRefExoticComponent<TabProps & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"tab.js","sources":["../../../../src/components/tab/tab.tsx"],"sourcesContent":["import { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useState, useContext, useEffect, useCallback, forwardRef } from 'react';\nimport useTabs from './hook/useTabs';\nimport { TabsContext } from './tabs';\nimport TabStyled from './tabStyled';\n/**\n * @description SkodaFlow Tab component.\n * @param props TabProps\n * @returns React Functional Component\n */\nexport const Tab = forwardRef(({ label, value, onClick, analyticsCallback, href, target, ariaLabel }, ref) => {\n const { activeTab, updateActiveTab, smallSize } = useContext(TabsContext);\n const [isActive, setIsActive] = useState(false);\n const { a11yProps } = useTabs();\n //On tab clicked: set the new activeTab selected\n //if is a menu tab: set the anchor element for the menu and set the width of the menu equal to the tab component\n //then call the onClick from outside\n const handleOnClick = useCallback((e) => {\n updateActiveTab(value, false);\n analyticsCallback && analyticsCallback(e);\n onClick && onClick(e);\n }, [value, onClick, updateActiveTab, analyticsCallback]);\n //IF href prop is present: render the Link Tab\n //Otherwise render the default tab\n const handleTabType = useCallback(() => {\n if (href) {\n return (_jsx(TabStyled, Object.assign({ wrapped: true, ref: ref, smallSize: smallSize, isActive: isActive, \"aria-label\": ariaLabel, value: value, label: label, tabIndex: isActive ? 0 : -1 }, a11yProps(value), { component: 'a', href: href, target: target, onClick: (e) => handleOnClick(e) })));\n }\n else {\n return (_jsx(TabStyled, Object.assign({ wrapped: true, ref: ref, \"aria-label\": ariaLabel, tabIndex: isActive ? 0 : -1, smallSize: smallSize, isActive: isActive, onClick: (e) => handleOnClick(e), value: value, label: label }, a11yProps(value))));\n }\n }, [href, smallSize, isActive, target, value, label, a11yProps, ariaLabel, handleOnClick, ref]);\n //If the activeTab is equal to the current tab, set active\n useEffect(() => {\n if (activeTab === value) {\n setIsActive(true);\n }\n else {\n setIsActive(false);\n }\n }, [activeTab, value]);\n return _jsx(_Fragment, { children: handleTabType() });\n});\n//# sourceMappingURL=tab.js.map"],"names":["Tab","forwardRef","label","value","onClick","analyticsCallback","href","target","ariaLabel","ref","activeTab","updateActiveTab","smallSize","useContext","TabsContext","isActive","setIsActive","useState","a11yProps","useTabs","handleOnClick","useCallback","e","handleTabType","_jsx","jsx","TabStyled","default","Object","assign","wrapped","tabIndex","component","useEffect","_Fragment","children"],"mappings":"qJAUY,MAACA,EAAMC,EAAUA,YAAC,EAAGC,QAAOC,QAAOC,UAASC,oBAAmBC,OAAMC,SAAQC,aAAaC,KAClG,MAAMC,UAAEA,EAASC,gBAAEA,EAAeC,UAAEA,GAAcC,EAAAA,WAAWC,EAAAA,cACtDC,EAAUC,GAAeC,EAAQA,UAAC,IACnCC,UAAEA,GAAcC,EAAAA,UAIhBC,EAAgBC,eAAaC,IAC/BX,EAAgBR,GAAO,GACvBE,GAAqBA,EAAkBiB,GACvClB,GAAWA,EAAQkB,EAAE,GACtB,CAACnB,EAAOC,EAASO,EAAiBN,IAG/BkB,EAAgBF,EAAAA,aAAY,IAC1Bf,EACQkB,EAAIC,IAACC,EAASC,QAAEC,OAAOC,OAAO,CAAEC,SAAS,EAAMrB,IAAKA,EAAKG,UAAWA,EAAWG,SAAUA,EAAU,aAAcP,EAAWL,MAAOA,EAAOD,MAAOA,EAAO6B,SAAUhB,EAAW,GAAK,GAAKG,EAAUf,GAAQ,CAAE6B,UAAW,IAAK1B,KAAMA,EAAMC,OAAQA,EAAQH,QAAUkB,GAAMF,EAAcE,MAGrRE,EAAAA,IAAKE,EAAAA,QAAWE,OAAOC,OAAO,CAAEC,SAAS,EAAMrB,IAAKA,EAAK,aAAcD,EAAWuB,SAAUhB,EAAW,GAAK,EAAGH,UAAWA,EAAWG,SAAUA,EAAUX,QAAUkB,GAAMF,EAAcE,GAAInB,MAAOA,EAAOD,MAAOA,GAASgB,EAAUf,MAEhP,CAACG,EAAMM,EAAWG,EAAUR,EAAQJ,EAAOD,EAAOgB,EAAWV,EAAWY,EAAeX,IAU1F,OARAwB,EAAAA,WAAU,KAEFjB,EADAN,IAAcP,EAKjB,GACF,CAACO,EAAWP,IACRqB,EAAAA,IAAKU,EAAAA,SAAW,CAAEC,SAAUZ,KAAkB"}
1
+ {"version":3,"file":"tab.js","sources":["../../../../src/components/tab/tab.tsx"],"sourcesContent":["import { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useState, useContext, useEffect, useCallback, forwardRef } from 'react';\nimport useTabs from './hook/useTabs';\nimport { TabsContext } from './tabs';\nimport TabStyled from './tabStyled';\n/**\n * @description SkodaFlow Tab component.\n * @param props TabProps\n * @returns React Functional Component\n * @deprecated use Tab component from @mui/material instead\n */\nexport const Tab = forwardRef(({ label, value, onClick, analyticsCallback, href, target, ariaLabel }, ref) => {\n const { activeTab, updateActiveTab, smallSize } = useContext(TabsContext);\n const [isActive, setIsActive] = useState(false);\n const { a11yProps } = useTabs();\n //On tab clicked: set the new activeTab selected\n //if is a menu tab: set the anchor element for the menu and set the width of the menu equal to the tab component\n //then call the onClick from outside\n const handleOnClick = useCallback((e) => {\n updateActiveTab(value, false);\n analyticsCallback && analyticsCallback(e);\n onClick && onClick(e);\n }, [value, onClick, updateActiveTab, analyticsCallback]);\n //IF href prop is present: render the Link Tab\n //Otherwise render the default tab\n const handleTabType = useCallback(() => {\n if (href) {\n return (_jsx(TabStyled, Object.assign({ wrapped: true, ref: ref, smallSize: smallSize, isActive: isActive, \"aria-label\": ariaLabel, value: value, label: label, tabIndex: isActive ? 0 : -1 }, a11yProps(value), { component: 'a', href: href, target: target, onClick: (e) => handleOnClick(e) })));\n }\n else {\n return (_jsx(TabStyled, Object.assign({ wrapped: true, ref: ref, \"aria-label\": ariaLabel, tabIndex: isActive ? 0 : -1, smallSize: smallSize, isActive: isActive, onClick: (e) => handleOnClick(e), value: value, label: label }, a11yProps(value))));\n }\n }, [href, smallSize, isActive, target, value, label, a11yProps, ariaLabel, handleOnClick, ref]);\n //If the activeTab is equal to the current tab, set active\n useEffect(() => {\n if (activeTab === value) {\n setIsActive(true);\n }\n else {\n setIsActive(false);\n }\n }, [activeTab, value]);\n return _jsx(_Fragment, { children: handleTabType() });\n});\n//# sourceMappingURL=tab.js.map"],"names":["Tab","forwardRef","label","value","onClick","analyticsCallback","href","target","ariaLabel","ref","activeTab","updateActiveTab","smallSize","useContext","TabsContext","isActive","setIsActive","useState","a11yProps","useTabs","handleOnClick","useCallback","e","handleTabType","_jsx","jsx","TabStyled","default","Object","assign","wrapped","tabIndex","component","useEffect","_Fragment","children"],"mappings":"qJAWY,MAACA,EAAMC,EAAUA,YAAC,EAAGC,QAAOC,QAAOC,UAASC,oBAAmBC,OAAMC,SAAQC,aAAaC,KAClG,MAAMC,UAAEA,EAASC,gBAAEA,EAAeC,UAAEA,GAAcC,EAAAA,WAAWC,EAAAA,cACtDC,EAAUC,GAAeC,EAAQA,UAAC,IACnCC,UAAEA,GAAcC,EAAAA,UAIhBC,EAAgBC,eAAaC,IAC/BX,EAAgBR,GAAO,GACvBE,GAAqBA,EAAkBiB,GACvClB,GAAWA,EAAQkB,EAAE,GACtB,CAACnB,EAAOC,EAASO,EAAiBN,IAG/BkB,EAAgBF,EAAAA,aAAY,IAC1Bf,EACQkB,EAAIC,IAACC,EAASC,QAAEC,OAAOC,OAAO,CAAEC,SAAS,EAAMrB,IAAKA,EAAKG,UAAWA,EAAWG,SAAUA,EAAU,aAAcP,EAAWL,MAAOA,EAAOD,MAAOA,EAAO6B,SAAUhB,EAAW,GAAK,GAAKG,EAAUf,GAAQ,CAAE6B,UAAW,IAAK1B,KAAMA,EAAMC,OAAQA,EAAQH,QAAUkB,GAAMF,EAAcE,MAGrRE,EAAAA,IAAKE,EAAAA,QAAWE,OAAOC,OAAO,CAAEC,SAAS,EAAMrB,IAAKA,EAAK,aAAcD,EAAWuB,SAAUhB,EAAW,GAAK,EAAGH,UAAWA,EAAWG,SAAUA,EAAUX,QAAUkB,GAAMF,EAAcE,GAAInB,MAAOA,EAAOD,MAAOA,GAASgB,EAAUf,MAEhP,CAACG,EAAMM,EAAWG,EAAUR,EAAQJ,EAAOD,EAAOgB,EAAWV,EAAWY,EAAeX,IAU1F,OARAwB,EAAAA,WAAU,KAEFjB,EADAN,IAAcP,EAKjB,GACF,CAACO,EAAWP,IACRqB,EAAAA,IAAKU,EAAAA,SAAW,CAAEC,SAAUZ,KAAkB"}
@@ -17,4 +17,5 @@ export interface TabPanelProps {
17
17
  */
18
18
  index?: number | string;
19
19
  }
20
+ /** @deprecated use Tab component from @mui/material instead */
20
21
  export declare const TabPanel: React.FC<TabPanelProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"tabPanel.js","sources":["../../../../src/components/tab/tabPanel.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const TabPanel = (props) => {\n const { children, value, index } = props, other = __rest(props, [\"children\", \"value\", \"index\"]);\n return (_jsx(\"div\", Object.assign({ role: \"tabpanel\", hidden: value !== index, id: `simple-tabpanel-${index}`, \"aria-labelledby\": `simple-tab-${index}` }, other, { children: value === index && children })));\n};\n//# sourceMappingURL=tabPanel.js.map"],"names":["props","children","value","index","other","__rest","_jsx","jsx","Object","assign","role","hidden","id"],"mappings":"oFAEyBA,IACrB,MAAMC,SAAEA,EAAQC,MAAEA,EAAKC,MAAEA,GAAUH,EAAOI,EAAQC,EAAMA,OAACL,EAAO,CAAC,WAAY,QAAS,UACtF,OAAQM,EAAIC,IAAC,MAAOC,OAAOC,OAAO,CAAEC,KAAM,WAAYC,OAAQT,IAAUC,EAAOS,GAAI,mBAAmBT,IAAS,kBAAmB,cAAcA,KAAWC,EAAO,CAAEH,SAAUC,IAAUC,GAASF,IAAc"}
1
+ {"version":3,"file":"tabPanel.js","sources":["../../../../src/components/tab/tabPanel.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/** @deprecated use Tab component from @mui/material instead */\nexport const TabPanel = (props) => {\n const { children, value, index } = props, other = __rest(props, [\"children\", \"value\", \"index\"]);\n return (_jsx(\"div\", Object.assign({ role: \"tabpanel\", hidden: value !== index, id: `simple-tabpanel-${index}`, \"aria-labelledby\": `simple-tab-${index}` }, other, { children: value === index && children })));\n};\n//# sourceMappingURL=tabPanel.js.map"],"names":["props","children","value","index","other","__rest","_jsx","jsx","Object","assign","role","hidden","id"],"mappings":"oFAGyBA,IACrB,MAAMC,SAAEA,EAAQC,MAAEA,EAAKC,MAAEA,GAAUH,EAAOI,EAAQC,EAAMA,OAACL,EAAO,CAAC,WAAY,QAAS,UACtF,OAAQM,EAAIC,IAAC,MAAOC,OAAOC,OAAO,CAAEC,KAAM,WAAYC,OAAQT,IAAUC,EAAOS,GAAI,mBAAmBT,IAAS,kBAAmB,cAAcA,KAAWC,EAAO,CAAEH,SAAUC,IAAUC,GAASF,IAAc"}
@@ -1,10 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  /**
3
3
  * @description Tabs styling definition based on props
4
+ * @deprecated use Tab component from @mui/material instead
4
5
  */
5
6
  declare const TabStyled: import("@emotion/styled").StyledComponent<import("@mui/material/Tab").TabOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
7
  ref?: import("react").Ref<HTMLDivElement>;
7
- }, "disabled" | "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "icon" | "iconPosition" | "label" | "value" | "wrapped"> & {
8
+ }, "disabled" | "className" | "style" | "classes" | "children" | "sx" | "label" | "tabIndex" | "action" | "value" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "icon" | "iconPosition" | "wrapped"> & {
8
9
  theme?: import("@emotion/react").Theme;
9
10
  } & {
10
11
  component?: import("react").ElementType<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"tabStyled.js","sources":["../../../../src/components/tab/tabStyled.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport MuiTab from '@mui/material/Tab';\n/**\n * @description Tabs styling definition based on props\n */\nconst TabStyled = styled(MuiTab, {\n shouldForwardProp: (prop) => prop !== 'isActive' && prop !== 'smallSize' && prop !== 'ref',\n})(({ isActive, smallSize, theme }) => {\n let styles = {\n minWidth: 'fit-content',\n fontWeight: '700',\n padding: 0,\n color: theme.palette.onSurface.os500,\n opacity: 1,\n fontSize: '20px',\n textTransform: 'none',\n transition: 'color .3s ease-out',\n minHeight: '32px',\n maxHeight: '32px',\n marginTop: '4px',\n fontFamily: 'SKODA Next',\n letterSpacing: '0.02857em',\n '&:focus': {\n paddingLeft: '5px',\n paddingRight: '5px',\n border: `2px solid ${theme.palette.text.primary}`,\n boxSizing: ' border-box',\n },\n '&:hover': {\n color: theme.palette.text.primary,\n position: 'relative',\n overflow: 'visible',\n '& > .MuiIcon-root': {\n color: theme.palette.text.primary,\n },\n '&:after': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n height: '3px',\n backgroundColor: theme.palette.brand.primary,\n width: '100%',\n bottom: '-12px',\n left: 0,\n },\n },\n '&:active': {\n color: theme.palette.text.primary,\n },\n '& > .MuiIcon-root': {\n fontSize: '20px !Important',\n width: '20px',\n height: '30px',\n color: theme.palette.onSurface.os500,\n },\n };\n styles = Object.assign(Object.assign({}, styles), { [theme.breakpoints.down('sm')]: {\n fontSize: '14px',\n minWidth: '56px',\n marginTop: '6px',\n } });\n if (isActive) {\n styles = Object.assign(Object.assign({}, styles), { color: theme.palette.text.primary });\n }\n if (smallSize) {\n styles = Object.assign(Object.assign({}, styles), { fontSize: '14px', minWidth: '56px', marginTop: '6px', '& > .MuiIcon-root': {\n fontSize: '15px !important',\n width: '15px',\n height: '22px',\n } });\n }\n return styles;\n});\nexport default TabStyled;\n//# sourceMappingURL=tabStyled.js.map"],"names":["TabStyled","styled","default","MuiTab","shouldForwardProp","prop","isActive","smallSize","theme","styles","minWidth","fontWeight","padding","color","palette","onSurface","os500","opacity","fontSize","textTransform","transition","minHeight","maxHeight","marginTop","fontFamily","letterSpacing","paddingLeft","paddingRight","border","text","primary","boxSizing","position","overflow","content","display","height","backgroundColor","brand","width","bottom","left","Object","assign","breakpoints","down"],"mappings":"yMAKK,MAACA,EAAYC,EAAMC,QAACC,UAAQ,CAC7BC,kBAAoBC,GAAkB,aAATA,GAAgC,cAATA,GAAiC,QAATA,GAD9DJ,EAEf,EAAGK,WAAUC,YAAWC,YACvB,IAAIC,EAAS,CACTC,SAAU,cACVC,WAAY,MACZC,QAAS,EACTC,MAAOL,EAAMM,QAAQC,UAAUC,MAC/BC,QAAS,EACTC,SAAU,OACVC,cAAe,OACfC,WAAY,qBACZC,UAAW,OACXC,UAAW,OACXC,UAAW,MACXC,WAAY,aACZC,cAAe,YACf,UAAW,CACPC,YAAa,MACbC,aAAc,MACdC,OAAQ,aAAapB,EAAMM,QAAQe,KAAKC,UACxCC,UAAW,eAEf,UAAW,CACPlB,MAAOL,EAAMM,QAAQe,KAAKC,QAC1BE,SAAU,WACVC,SAAU,UACV,oBAAqB,CACjBpB,MAAOL,EAAMM,QAAQe,KAAKC,SAE9B,UAAW,CACPI,QAAS,KACTC,QAAS,QACTH,SAAU,WACVI,OAAQ,MACRC,gBAAiB7B,EAAMM,QAAQwB,MAAMR,QACrCS,MAAO,OACPC,OAAQ,QACRC,KAAM,IAGd,WAAY,CACR5B,MAAOL,EAAMM,QAAQe,KAAKC,SAE9B,oBAAqB,CACjBZ,SAAU,kBACVqB,MAAO,OACPH,OAAQ,OACRvB,MAAOL,EAAMM,QAAQC,UAAUC,QAkBvC,OAfAP,EAASiC,OAAOC,OAAOD,OAAOC,OAAO,CAAE,EAAElC,GAAS,CAAE,CAACD,EAAMoC,YAAYC,KAAK,OAAQ,CAC5E3B,SAAU,OACVR,SAAU,OACVa,UAAW,SAEfjB,IACAG,EAASiC,OAAOC,OAAOD,OAAOC,OAAO,CAAA,EAAIlC,GAAS,CAAEI,MAAOL,EAAMM,QAAQe,KAAKC,WAE9EvB,IACAE,EAASiC,OAAOC,OAAOD,OAAOC,OAAO,CAAE,EAAElC,GAAS,CAAES,SAAU,OAAQR,SAAU,OAAQa,UAAW,MAAO,oBAAqB,CACvHL,SAAU,kBACVqB,MAAO,OACPH,OAAQ,WAGb3B,CAAM"}
1
+ {"version":3,"file":"tabStyled.js","sources":["../../../../src/components/tab/tabStyled.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport MuiTab from '@mui/material/Tab';\n/**\n * @description Tabs styling definition based on props\n * @deprecated use Tab component from @mui/material instead\n */\nconst TabStyled = styled(MuiTab, {\n shouldForwardProp: (prop) => prop !== 'isActive' && prop !== 'smallSize' && prop !== 'ref',\n})(({ isActive, smallSize, theme }) => {\n let styles = {\n minWidth: 'fit-content',\n fontWeight: '700',\n padding: 0,\n color: theme.palette.onSurface.os500,\n opacity: 1,\n fontSize: '20px',\n textTransform: 'none',\n transition: 'color .3s ease-out',\n minHeight: '32px',\n maxHeight: '32px',\n marginTop: '4px',\n fontFamily: 'SKODA Next',\n letterSpacing: '0.02857em',\n '&:focus': {\n paddingLeft: '5px',\n paddingRight: '5px',\n border: `2px solid ${theme.palette.text.primary}`,\n boxSizing: ' border-box',\n },\n '&:hover': {\n color: theme.palette.text.primary,\n position: 'relative',\n overflow: 'visible',\n '& > .MuiIcon-root': {\n color: theme.palette.text.primary,\n },\n '&:after': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n height: '3px',\n backgroundColor: theme.palette.brand.primary,\n width: '100%',\n bottom: '-12px',\n left: 0,\n },\n },\n '&:active': {\n color: theme.palette.text.primary,\n },\n '& > .MuiIcon-root': {\n fontSize: '20px !Important',\n width: '20px',\n height: '30px',\n color: theme.palette.onSurface.os500,\n },\n };\n styles = Object.assign(Object.assign({}, styles), { [theme.breakpoints.down('sm')]: {\n fontSize: '14px',\n minWidth: '56px',\n marginTop: '6px',\n } });\n if (isActive) {\n styles = Object.assign(Object.assign({}, styles), { color: theme.palette.text.primary });\n }\n if (smallSize) {\n styles = Object.assign(Object.assign({}, styles), { fontSize: '14px', minWidth: '56px', marginTop: '6px', '& > .MuiIcon-root': {\n fontSize: '15px !important',\n width: '15px',\n height: '22px',\n } });\n }\n return styles;\n});\nexport default TabStyled;\n//# sourceMappingURL=tabStyled.js.map"],"names":["TabStyled","styled","default","MuiTab","shouldForwardProp","prop","isActive","smallSize","theme","styles","minWidth","fontWeight","padding","color","palette","onSurface","os500","opacity","fontSize","textTransform","transition","minHeight","maxHeight","marginTop","fontFamily","letterSpacing","paddingLeft","paddingRight","border","text","primary","boxSizing","position","overflow","content","display","height","backgroundColor","brand","width","bottom","left","Object","assign","breakpoints","down"],"mappings":"yMAMK,MAACA,EAAYC,EAAMC,QAACC,UAAQ,CAC7BC,kBAAoBC,GAAkB,aAATA,GAAgC,cAATA,GAAiC,QAATA,GAD9DJ,EAEf,EAAGK,WAAUC,YAAWC,YACvB,IAAIC,EAAS,CACTC,SAAU,cACVC,WAAY,MACZC,QAAS,EACTC,MAAOL,EAAMM,QAAQC,UAAUC,MAC/BC,QAAS,EACTC,SAAU,OACVC,cAAe,OACfC,WAAY,qBACZC,UAAW,OACXC,UAAW,OACXC,UAAW,MACXC,WAAY,aACZC,cAAe,YACf,UAAW,CACPC,YAAa,MACbC,aAAc,MACdC,OAAQ,aAAapB,EAAMM,QAAQe,KAAKC,UACxCC,UAAW,eAEf,UAAW,CACPlB,MAAOL,EAAMM,QAAQe,KAAKC,QAC1BE,SAAU,WACVC,SAAU,UACV,oBAAqB,CACjBpB,MAAOL,EAAMM,QAAQe,KAAKC,SAE9B,UAAW,CACPI,QAAS,KACTC,QAAS,QACTH,SAAU,WACVI,OAAQ,MACRC,gBAAiB7B,EAAMM,QAAQwB,MAAMR,QACrCS,MAAO,OACPC,OAAQ,QACRC,KAAM,IAGd,WAAY,CACR5B,MAAOL,EAAMM,QAAQe,KAAKC,SAE9B,oBAAqB,CACjBZ,SAAU,kBACVqB,MAAO,OACPH,OAAQ,OACRvB,MAAOL,EAAMM,QAAQC,UAAUC,QAkBvC,OAfAP,EAASiC,OAAOC,OAAOD,OAAOC,OAAO,CAAE,EAAElC,GAAS,CAAE,CAACD,EAAMoC,YAAYC,KAAK,OAAQ,CAC5E3B,SAAU,OACVR,SAAU,OACVa,UAAW,SAEfjB,IACAG,EAASiC,OAAOC,OAAOD,OAAOC,OAAO,CAAA,EAAIlC,GAAS,CAAEI,MAAOL,EAAMM,QAAQe,KAAKC,WAE9EvB,IACAE,EAASiC,OAAOC,OAAOD,OAAOC,OAAO,CAAE,EAAElC,GAAS,CAAES,SAAU,OAAQR,SAAU,OAAQa,UAAW,MAAO,oBAAqB,CACvHL,SAAU,kBACVqB,MAAO,OACPH,OAAQ,WAGb3B,CAAM"}
@@ -51,5 +51,6 @@ export interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChang
51
51
  * Properties are inherited from HTML Button element.
52
52
  * @param props TabsProps
53
53
  * @returns React Functional Component
54
+ * @deprecated use Tab component from @mui/material instead
54
55
  */
55
56
  export declare const Tabs: FC<TabsProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.js","sources":["../../../../src/components/tab/tabs.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport MuiTabs from '@mui/material/Tabs';\nimport { styled } from '@mui/material/styles';\nimport { SecondaryNavigationTabs } from './secondaryNavigation/secondaryNavigationTabs';\nimport { MenuTab } from './menuTab';\nimport useTabs from './hook/useTabs';\nimport { useTheme } from '@mui/material';\nimport { flowColors } from '../../design/skoda/palette.theme';\nimport noop from 'lodash/noop';\nexport const TabsContext = React.createContext({\n activeTab: null,\n updateActiveTab: noop,\n smallSize: false,\n});\n/**\n * @description SkodaFlow Checkbox component.\n * Properties are inherited from HTML Button element.\n * @param props TabsProps\n * @returns React Functional Component\n */\nexport const Tabs = (_a) => {\n var { handleChange, defaultActiveTab, smallSize, variantSecondaryNavigation, children, sx, classes, labelMoreItem = 'More', activeTab } = _a, props = __rest(_a, [\"handleChange\", \"defaultActiveTab\", \"smallSize\", \"variantSecondaryNavigation\", \"children\", \"sx\", \"classes\", \"labelMoreItem\", \"activeTab\"]);\n const [currentActiveTab, setCurrentActiveTab] = useState(activeTab !== null && activeTab !== void 0 ? activeTab : defaultActiveTab);\n const [windowWidth, setWindowWidth] = useState(null);\n const [isMobileView, setIsMobileView] = useState(false);\n const [menuChildren, setMenuChildren] = useState([]);\n const [mouseDown, setMouseDown] = useState(false);\n const [activeMenuItem, setActiveMenuItem] = useState(false);\n const moreBtnRef = useRef(null);\n const tabsRef = useRef(null);\n const { handleOverflowingTabs, handleIsMobileView } = useTabs();\n const theme = useTheme();\n const updateActiveTab = useCallback((value, fromMenu) => {\n setActiveMenuItem(fromMenu);\n setCurrentActiveTab(value);\n }, []);\n const handleMobileView = useCallback(() => {\n handleIsMobileView(variantSecondaryNavigation, isMobileView, setIsMobileView, setWindowWidth);\n }, [handleIsMobileView, isMobileView, variantSecondaryNavigation]);\n useEffect(() => {\n setCurrentActiveTab(activeTab !== null && activeTab !== void 0 ? activeTab : defaultActiveTab);\n }, [activeTab, defaultActiveTab]);\n useEffect(() => {\n handleMobileView();\n window.addEventListener('resize', handleMobileView);\n return () => {\n window.removeEventListener('resize', handleMobileView);\n };\n });\n useEffect(() => {\n handleChange && handleChange(currentActiveTab);\n }, [currentActiveTab, handleChange]);\n //Set the initial more btn menu list\n useEffect(() => {\n setMenuChildren(React.Children.toArray(children));\n }, [children]);\n //on screen resize: if the more btn is rendered, handle the more btn menu and the overflowing tabs\n useEffect(() => {\n if (moreBtnRef && moreBtnRef.current) {\n handleOverflowingTabs(tabsRef, windowWidth, children, setMenuChildren);\n }\n }, [windowWidth, handleOverflowingTabs, children]);\n useEffect(() => {\n document.addEventListener('mousedown', function () {\n setMouseDown(true);\n });\n document.addEventListener('keydown', function () {\n setMouseDown(false);\n });\n }, []);\n useEffect(() => { }, [props]);\n return (_jsx(_Fragment, { children: variantSecondaryNavigation && isMobileView ? (_jsx(SecondaryNavigationTabs, { labelMoreItem: labelMoreItem, currentActiveTab: currentActiveTab, setCurrentActiveTab: (val) => setCurrentActiveTab(val), children: children })) : (_jsx(TabsContext.Provider, { value: { activeTab: currentActiveTab, updateActiveTab, smallSize }, children: _jsxs(TabsStyled, { ref: tabsRef, variant: windowWidth <= theme.breakpoints.values.lg ? 'scrollable' : 'fullWidth', scrollButtons: false, smallSize: smallSize, value: activeMenuItem ? 'more' : currentActiveTab, mouseDown: mouseDown, sx: sx, classes: classes, children: [children, _jsx(MenuTab, { value: \"more\", ref: moreBtnRef, label: labelMoreItem, children: menuChildren })] }) })) }));\n};\n/**\n * @description Tabs styling definition based on props\n */\nconst TabsStyled = styled(MuiTabs, {\n shouldForwardProp: (prop) => prop !== 'variantSecondaryNavigation' && prop !== 'smallSize' && prop !== 'mouseDown',\n})((_a) => {\n var { isActive, theme } = _a, props = __rest(_a, [\"isActive\", \"theme\"]);\n let styles = {};\n styles = Object.assign(Object.assign({}, styles), { boxSizing: 'border-box', '& *': {\n boxSizing: 'border-box',\n }, '& > div': {\n '& > div > .MuiTab-root:last-child': {\n marginRight: '10px',\n },\n '& > div': {\n marginLeft: '2px',\n width: '100%',\n },\n '& > .MuiTabs-indicator': {\n height: '3px',\n backgroundColor: flowColors.brand.primary,\n },\n '& > div > .MuiTab-root': {\n marginLeft: '56px',\n },\n } });\n if (props.smallSize) {\n styles = Object.assign(Object.assign({}, styles), { '& > div': {\n '& > div > .MuiTab-root:last-child': {\n marginRight: '10px',\n },\n '& > div': {\n marginLeft: '2px',\n },\n '& > div > .MuiTab-root': {\n marginLeft: '40px',\n '&:after': {\n bottom: '-11px',\n },\n },\n }, '& .MuiTabs-indicator': {\n backgroundColor: flowColors.brand.primary,\n } });\n }\n if (props.mouseDown) {\n styles = Object.assign(Object.assign({}, styles), { '& > div': Object.assign(Object.assign({}, styles['& > div']), { '& > div > .MuiTab-root': Object.assign(Object.assign({}, styles['& > div']['& > div > .MuiTab-root']), { '&:focus': {\n border: 0,\n paddingLeft: 0,\n paddingRight: 0,\n } }) }) });\n }\n return styles;\n});\n//# sourceMappingURL=tabs.js.map"],"names":["TabsContext","React","default","createContext","activeTab","updateActiveTab","noop","smallSize","TabsStyled","styled","MuiTabs","shouldForwardProp","prop","_a","props","__rest","styles","Object","assign","boxSizing","marginRight","marginLeft","width","height","backgroundColor","flowColors","brand","primary","bottom","mouseDown","border","paddingLeft","paddingRight","handleChange","defaultActiveTab","variantSecondaryNavigation","children","sx","classes","labelMoreItem","currentActiveTab","setCurrentActiveTab","useState","windowWidth","setWindowWidth","isMobileView","setIsMobileView","menuChildren","setMenuChildren","setMouseDown","activeMenuItem","setActiveMenuItem","moreBtnRef","useRef","tabsRef","handleOverflowingTabs","handleIsMobileView","useTabs","theme","useTheme","useCallback","value","fromMenu","handleMobileView","useEffect","window","addEventListener","removeEventListener","Children","toArray","current","document","_jsx","_Fragment","jsx","SecondaryNavigationTabs","val","Provider","_jsxs","ref","variant","breakpoints","values","lg","scrollButtons","MenuTab","label"],"mappings":"gcAWY,MAACA,EAAcC,EAAKC,QAACC,cAAc,CAC3CC,UAAW,KACXC,gBAAiBC,EAAIJ,QACrBK,WAAW,IAgETC,EAAaC,EAAMA,OAACC,UAAS,CAC/BC,kBAAoBC,GAAkB,+BAATA,GAAkD,cAATA,GAAiC,cAATA,GAD/EH,EAEfI,IACG,IAA2BC,EAAQC,EAAAA,OAAOF,EAAI,CAAC,WAAY,UAC9D,IAAIG,EAAS,CAAA,EA4Cb,OA3CAA,EAASC,OAAOC,OAAOD,OAAOC,OAAO,GAAIF,GAAS,CAAEG,UAAW,aAAc,MAAO,CAC5EA,UAAW,cACZ,UAAW,CACV,oCAAqC,CACjCC,YAAa,QAEjB,UAAW,CACPC,WAAY,MACZC,MAAO,QAEX,yBAA0B,CACtBC,OAAQ,MACRC,gBAAiBC,EAAAA,WAAWC,MAAMC,SAEtC,yBAA0B,CACtBN,WAAY,WAGpBP,EAAMP,YACNS,EAASC,OAAOC,OAAOD,OAAOC,OAAO,GAAIF,GAAS,CAAE,UAAW,CACvD,oCAAqC,CACjCI,YAAa,QAEjB,UAAW,CACPC,WAAY,OAEhB,yBAA0B,CACtBA,WAAY,OACZ,UAAW,CACPO,OAAQ,WAGjB,uBAAwB,CACvBJ,gBAAiBC,EAAAA,WAAWC,MAAMC,YAG1Cb,EAAMe,YACNb,EAASC,OAAOC,OAAOD,OAAOC,OAAO,CAAA,EAAIF,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J,EAAiB,KAG9DC,EAAAA,WAAU,KACN/B,GAAgBA,EAAaO,EAAiB,GAC/C,CAACA,EAAkBP,IAEtB+B,EAAAA,WAAU,KACNhB,EAAgB/C,EAAAA,QAAMmE,SAASC,QAAQjC,GAAU,GAClD,CAACA,IAEJ4B,EAAAA,WAAU,KACFZ,GAAcA,EAAWkB,SACzBf,EAAsBD,EAASX,EAAaP,EAAUY,EACzD,GACF,CAACL,EAAaY,EAAuBnB,IACxC4B,EAAAA,WAAU,KACNO,SAASL,iBAAiB,aAAa,WACnCjB,GAAa,EACzB,IACQsB,SAASL,iBAAiB,WAAW,WACjCjB,GAAa,EACzB,GAAU,GACH,IACHe,EAAAA,WAAU,QAAW,CAAClD,IACd0D,EAAAA,IAAKC,EAAAA,SAAW,CAAErC,SAAUD,GAA8BU,EAAgB2B,EAAIE,IAACC,0BAAyB,CAAEpC,cAAeA,EAAeC,iBAAkBA,EAAkBC,oBAAsBmC,GAAQnC,EAAoBmC,GAAMxC,SAAUA,IAAgBoC,EAAAA,IAAKxE,EAAY6E,SAAU,CAAEhB,MAAO,CAAEzD,UAAWoC,EAAkBnC,kBAAiBE,aAAa6B,SAAU0C,OAAMtE,EAAY,CAAEuE,IAAKzB,EAAS0B,QAASrC,GAAee,EAAMuB,YAAYC,OAAOC,GAAK,aAAe,YAAaC,eAAe,EAAO7E,UAAWA,EAAWsD,MAAOX,EAAiB,OAASV,EAAkBX,UAAWA,EAAWQ,GAAIA,EAAIC,QAASA,EAASF,SAAU,CAACA,EAAUoC,EAAIE,IAACW,EAAOA,QAAE,CAAExB,MAAO,OAAQkB,IAAK3B,EAAYkC,MAAO/C,EAAeH,SAAUW,UAA4B"}
1
+ {"version":3,"file":"tabs.js","sources":["../../../../src/components/tab/tabs.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport MuiTabs from '@mui/material/Tabs';\nimport { styled } from '@mui/material/styles';\nimport { SecondaryNavigationTabs } from './secondaryNavigation/secondaryNavigationTabs';\nimport { MenuTab } from './menuTab';\nimport useTabs from './hook/useTabs';\nimport { useTheme } from '@mui/material';\nimport { flowColors } from '../../design/skoda/palette.theme';\nimport noop from 'lodash/noop';\nexport const TabsContext = React.createContext({\n activeTab: null,\n updateActiveTab: noop,\n smallSize: false,\n});\n/**\n * @description SkodaFlow Checkbox component.\n * Properties are inherited from HTML Button element.\n * @param props TabsProps\n * @returns React Functional Component\n * @deprecated use Tab component from @mui/material instead\n */\nexport const Tabs = (_a) => {\n var { handleChange, defaultActiveTab, smallSize, variantSecondaryNavigation, children, sx, classes, labelMoreItem = 'More', activeTab } = _a, props = __rest(_a, [\"handleChange\", \"defaultActiveTab\", \"smallSize\", \"variantSecondaryNavigation\", \"children\", \"sx\", \"classes\", \"labelMoreItem\", \"activeTab\"]);\n const [currentActiveTab, setCurrentActiveTab] = useState(activeTab !== null && activeTab !== void 0 ? activeTab : defaultActiveTab);\n const [windowWidth, setWindowWidth] = useState(null);\n const [isMobileView, setIsMobileView] = useState(false);\n const [menuChildren, setMenuChildren] = useState([]);\n const [mouseDown, setMouseDown] = useState(false);\n const [activeMenuItem, setActiveMenuItem] = useState(false);\n const moreBtnRef = useRef(null);\n const tabsRef = useRef(null);\n const { handleOverflowingTabs, handleIsMobileView } = useTabs();\n const theme = useTheme();\n const updateActiveTab = useCallback((value, fromMenu) => {\n setActiveMenuItem(fromMenu);\n setCurrentActiveTab(value);\n }, []);\n const handleMobileView = useCallback(() => {\n handleIsMobileView(variantSecondaryNavigation, isMobileView, setIsMobileView, setWindowWidth);\n }, [handleIsMobileView, isMobileView, variantSecondaryNavigation]);\n useEffect(() => {\n setCurrentActiveTab(activeTab !== null && activeTab !== void 0 ? activeTab : defaultActiveTab);\n }, [activeTab, defaultActiveTab]);\n useEffect(() => {\n handleMobileView();\n window.addEventListener('resize', handleMobileView);\n return () => {\n window.removeEventListener('resize', handleMobileView);\n };\n });\n useEffect(() => {\n handleChange && handleChange(currentActiveTab);\n }, [currentActiveTab, handleChange]);\n //Set the initial more btn menu list\n useEffect(() => {\n setMenuChildren(React.Children.toArray(children));\n }, [children]);\n //on screen resize: if the more btn is rendered, handle the more btn menu and the overflowing tabs\n useEffect(() => {\n if (moreBtnRef && moreBtnRef.current) {\n handleOverflowingTabs(tabsRef, windowWidth, children, setMenuChildren);\n }\n }, [windowWidth, handleOverflowingTabs, children]);\n useEffect(() => {\n document.addEventListener('mousedown', function () {\n setMouseDown(true);\n });\n document.addEventListener('keydown', function () {\n setMouseDown(false);\n });\n }, []);\n useEffect(() => { }, [props]);\n return (_jsx(_Fragment, { children: variantSecondaryNavigation && isMobileView ? (_jsx(SecondaryNavigationTabs, { labelMoreItem: labelMoreItem, currentActiveTab: currentActiveTab, setCurrentActiveTab: (val) => setCurrentActiveTab(val), children: children })) : (_jsx(TabsContext.Provider, { value: { activeTab: currentActiveTab, updateActiveTab, smallSize }, children: _jsxs(TabsStyled, { ref: tabsRef, variant: windowWidth <= theme.breakpoints.values.lg ? 'scrollable' : 'fullWidth', scrollButtons: false, smallSize: smallSize, value: activeMenuItem ? 'more' : currentActiveTab, mouseDown: mouseDown, sx: sx, classes: classes, children: [children, _jsx(MenuTab, { value: \"more\", ref: moreBtnRef, label: labelMoreItem, children: menuChildren })] }) })) }));\n};\n/**\n * @description Tabs styling definition based on props\n */\nconst TabsStyled = styled(MuiTabs, {\n shouldForwardProp: (prop) => prop !== 'variantSecondaryNavigation' && prop !== 'smallSize' && prop !== 'mouseDown',\n})((_a) => {\n var { isActive, theme } = _a, props = __rest(_a, [\"isActive\", \"theme\"]);\n let styles = {};\n styles = Object.assign(Object.assign({}, styles), { boxSizing: 'border-box', '& *': {\n boxSizing: 'border-box',\n }, '& > div': {\n '& > div > .MuiTab-root:last-child': {\n marginRight: '10px',\n },\n '& > div': {\n marginLeft: '2px',\n width: '100%',\n },\n '& > .MuiTabs-indicator': {\n height: '3px',\n backgroundColor: flowColors.brand.primary,\n },\n '& > div > .MuiTab-root': {\n marginLeft: '56px',\n },\n } });\n if (props.smallSize) {\n styles = Object.assign(Object.assign({}, styles), { '& > div': {\n '& > div > .MuiTab-root:last-child': {\n marginRight: '10px',\n },\n '& > div': {\n marginLeft: '2px',\n },\n '& > div > .MuiTab-root': {\n marginLeft: '40px',\n '&:after': {\n bottom: '-11px',\n },\n },\n }, '& .MuiTabs-indicator': {\n backgroundColor: flowColors.brand.primary,\n } });\n }\n if (props.mouseDown) {\n styles = Object.assign(Object.assign({}, styles), { '& > div': Object.assign(Object.assign({}, styles['& > div']), { '& > div > .MuiTab-root': Object.assign(Object.assign({}, styles['& > div']['& > div > .MuiTab-root']), { '&:focus': {\n border: 0,\n paddingLeft: 0,\n paddingRight: 0,\n } }) }) });\n }\n return styles;\n});\n//# sourceMappingURL=tabs.js.map"],"names":["TabsContext","React","default","createContext","activeTab","updateActiveTab","noop","smallSize","TabsStyled","styled","MuiTabs","shouldForwardProp","prop","_a","props","__rest","styles","Object","assign","boxSizing","marginRight","marginLeft","width","height","backgroundColor","flowColors","brand","primary","bottom","mouseDown","border","paddingLeft","paddingRight","handleChange","defaultActiveTab","variantSecondaryNavigation","children","sx","classes","labelMoreItem","currentActiveTab","setCurrentActiveTab","useState","windowWidth","setWindowWidth","isMobileView","setIsMobileView","menuChildren","setMenuChildren","setMouseDown","activeMenuItem","setActiveMenuItem","moreBtnRef","useRef","tabsRef","handleOverflowingTabs","handleIsMobileView","useTabs","theme","useTheme","useCallback","value","fromMenu","handleMobileView","useEffect","window","addEventListener","removeEventListener","Children","toArray","current","document","_jsx","_Fragment","jsx","SecondaryNavigationTabs","val","Provider","_jsxs","ref","variant","breakpoints","values","lg","scrollButtons","MenuTab","label"],"mappings":"gcAWY,MAACA,EAAcC,EAAKC,QAACC,cAAc,CAC3CC,UAAW,KACXC,gBAAiBC,EAAIJ,QACrBK,WAAW,IAiETC,EAAaC,EAAMA,OAACC,UA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C,SAAUD,GAA8BU,EAAgB2B,EAAIE,IAACC,0BAAyB,CAAEpC,cAAeA,EAAeC,iBAAkBA,EAAkBC,oBAAsBmC,GAAQnC,EAAoBmC,GAAMxC,SAAUA,IAAgBoC,EAAAA,IAAKxE,EAAY6E,SAAU,CAAEhB,MAAO,CAAEzD,UAAWoC,EAAkBnC,kBAAiBE,aAAa6B,SAAU0C,OAAMtE,EAAY,CAAEuE,IAAKzB,EAAS0B,QAASrC,GAAee,EAAMuB,YAAYC,OAAOC,GAAK,aAAe,YAAaC,eAAe,EAAO7E,UAAWA,EAAWsD,MAAOX,EAAiB,OAASV,EAAkBX,UAAWA,EAAWQ,GAAIA,EAAIC,QAASA,EAASF,SAAU,CAACA,EAAUoC,EAAIE,IAACW,EAAOA,QAAE,CAAExB,MAAO,OAAQkB,IAAK3B,EAAYkC,MAAO/C,EAAeH,SAAUW,UAA4B"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),r=require("react/jsx-runtime"),l=require("react"),n=require("../icon/icon.js"),t=require("@mui/material"),a=require("../common/styled/textFieldStyled.js"),o=require("./hook/useTextInput.js"),u=require("../common/hook/useWindowSize.js"),s=require("./hook/useTextInputEffect.js"),i=require("../common/helperText.js");function d(e){return e&&e.__esModule?e:{default:e}}var h=d(require("lodash/noop"));exports.TextInput=d=>{var{name:c,id:x,label:p=null,onChange:m,onBlur:f,onFocus:j,value:b,placeholder:q,hasError:C,fullWidth:v=!0,excludeChars:I}=d,T=e.__rest(d,["name","id","label","onChange","onBlur","onFocus","value","placeholder","hasError","fullWidth","excludeChars"]);const[F,k]=l.useState(b||""),[y,S]=l.useState(!1),[g,w]=l.useState(!1),[E,L]=l.useState(!1),[B,D]=l.useState(!1),{handleOnBlur:O,handleOnFocus:W,handleOnChange:_,handlePlaceholder:K}=o.useTextInput(p,B,q,T.type),M=l.useRef(null),{width:N}=u.default();return s.useTextInputEffect(M,h.default,v,N,F,b,T.maxChars,T.required,S,k,D),r.jsx("div",{children:r.jsx(a.default,Object.assign({},T,{className:[T.icon?"textField-Icon":"",p?"textField-Label":"textField-NoLabel"].join(" "),InputLabelProps:{shrink:y},InputProps:T.icon?{startAdornment:r.jsx(t.InputAdornment,{position:"start",children:r.jsx(n.Icon,{color:T.disabled?"disabled":"inherit",className:T.icon})})}:{},onChange:e=>_(e,T.maxChars,m,k),value:F,onFocus:e=>W(e,w,S,j),onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),hovered:E,onBlur:e=>O(e,S,w,f,F),focused:g,placeholder:K,label:q?null:p,hiddenLabel:!!q,name:c,ref:M,id:x,error:C,fullWidth:v,onKeyDown:e=>{T.onKeyDownCallback&&T.onKeyDownCallback(e),I&&I.length>0&&I.includes(e.key)&&e.preventDefault()},helperText:r.jsx(i.default,{maxChars:T.maxChars,currentValue:F,helpText:T.helpText})}))})};
1
+ "use strict";var e=require("tslib"),r=require("react/jsx-runtime"),n=require("react"),t=require("../icon/icon.js");require("../icon/icon.definitions.js");var l=require("@mui/material"),o=require("../common/styled/textFieldStyled.js"),a=require("./hook/useTextInput.js"),u=require("../common/hook/useWindowSize.js"),s=require("./hook/useTextInputEffect.js"),i=require("../common/helperText.js");function d(e){return e&&e.__esModule?e:{default:e}}var c=d(require("lodash/noop"));exports.TextInput=d=>{var{name:h,id:x,label:p=null,onChange:m,onBlur:f,onFocus:j,value:b,placeholder:q,hasError:C,fullWidth:v=!0,excludeChars:I}=d,T=e.__rest(d,["name","id","label","onChange","onBlur","onFocus","value","placeholder","hasError","fullWidth","excludeChars"]);const[F,k]=n.useState(b||""),[y,S]=n.useState(!1),[g,w]=n.useState(!1),[E,L]=n.useState(!1),[B,D]=n.useState(!1),{handleOnBlur:O,handleOnFocus:W,handleOnChange:_,handlePlaceholder:K}=a.useTextInput(p,B,q,T.type),M=n.useRef(null),{width:P}=u.default();return s.useTextInputEffect(M,c.default,v,P,F,b,T.maxChars,T.required,S,k,D),r.jsx("div",{children:r.jsx(o.default,Object.assign({},T,{className:[T.icon?"textField-Icon":"",p?"textField-Label":"textField-NoLabel"].join(" "),InputLabelProps:{shrink:y},InputProps:T.icon?{startAdornment:r.jsx(l.InputAdornment,{position:"start",children:r.jsx(t.Icon,{color:T.disabled?"disabled":"inherit",name:T.icon})})}:{},onChange:e=>_(e,T.maxChars,m,k),value:F,onFocus:e=>W(e,w,S,j),onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),hovered:E,onBlur:e=>O(e,S,w,f,F),focused:g,placeholder:K,label:q?null:p,hiddenLabel:!!q,name:h,ref:M,id:x,error:C,fullWidth:v,onKeyDown:e=>{T.onKeyDownCallback&&T.onKeyDownCallback(e),I&&I.length>0&&I.includes(e.key)&&e.preventDefault()},helperText:r.jsx(i.default,{maxChars:T.maxChars,currentValue:F,helpText:T.helpText})}))})};
2
2
  //# sourceMappingURL=textInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textInput.js","sources":["../../../../src/components/textInput/textInput.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useRef, useState } from 'react';\nimport { Icon } from '../icon';\nimport { InputAdornment } from '@mui/material';\nimport TextFieldStyled from '../common/styled/textFieldStyled';\nimport { useTextInput } from './hook/useTextInput';\nimport useWindowSize from '../common/hook/useWindowSize';\nimport { useTextInputEffect } from './hook/useTextInputEffect';\nimport HelperText from '../common/helperText';\nimport noop from 'lodash/noop';\n/**\n * @description SkodaFlow TextInput component.\n * Properties are inherited from HTML input element.\n * @param props TextInputProps\n * @returns React Functional Component\n * @deprecated this component is deprecated. Use themed TextField component from @mui/material instead.\n */\nexport const TextInput = (_a) => {\n var { name, id, label = null, onChange, onBlur, onFocus, value, placeholder, hasError, fullWidth = true, excludeChars } = _a, props = __rest(_a, [\"name\", \"id\", \"label\", \"onChange\", \"onBlur\", \"onFocus\", \"value\", \"placeholder\", \"hasError\", \"fullWidth\", \"excludeChars\"]);\n const [currentValue, setCurrentValue] = useState(value || '');\n const [isShrunk, setIsShrunk] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n const [hovered, setHovered] = useState(false);\n const [isRequired, setIsRequired] = useState(false);\n const { handleOnBlur, handleOnFocus, handleOnChange, handlePlaceholder } = useTextInput(label, isRequired, placeholder, props.type);\n const inputRef = useRef(null);\n const { width } = useWindowSize();\n useTextInputEffect(inputRef, noop, fullWidth, width, currentValue, value, props.maxChars, props.required, setIsShrunk, setCurrentValue, setIsRequired);\n return (_jsx(\"div\", { children: _jsx(TextFieldStyled, Object.assign({}, props, { className: [props.icon ? 'textField-Icon' : '', label ? 'textField-Label' : 'textField-NoLabel'].join(' '), InputLabelProps: {\n shrink: isShrunk,\n }, InputProps: props.icon\n ? {\n startAdornment: (_jsx(InputAdornment, { position: \"start\", children: _jsx(Icon, { color: props.disabled ? 'disabled' : 'inherit', className: props.icon }) })),\n }\n : {}, onChange: (event) => handleOnChange(event, props.maxChars, onChange, setCurrentValue), value: currentValue, onFocus: (event) => handleOnFocus(event, setIsFocused, setIsShrunk, onFocus), onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), hovered: hovered, onBlur: (event) => handleOnBlur(event, setIsShrunk, setIsFocused, onBlur, currentValue), focused: isFocused, placeholder: handlePlaceholder, label: placeholder ? null : label, hiddenLabel: !!placeholder, name: name, ref: inputRef, id: id, error: hasError, fullWidth: fullWidth, onKeyDown: (event) => {\n if (props.onKeyDownCallback)\n props.onKeyDownCallback(event);\n if (excludeChars && excludeChars.length > 0 && excludeChars.includes(event.key)) {\n event.preventDefault();\n }\n }, helperText: _jsx(HelperText, { maxChars: props.maxChars, currentValue: currentValue, helpText: props.helpText }) })) }));\n};\n//# sourceMappingURL=textInput.js.map"],"names":["_a","name","id","label","onChange","onBlur","onFocus","value","placeholder","hasError","fullWidth","excludeChars","props","__rest","currentValue","setCurrentValue","useState","isShrunk","setIsShrunk","isFocused","setIsFocused","hovered","setHovered","isRequired","setIsRequired","handleOnBlur","handleOnFocus","handleOnChange","handlePlaceholder","useTextInput","type","inputRef","useRef","width","useWindowSize","useTextInputEffect","noop","default","maxChars","required","_jsx","children","jsx","TextFieldStyled","Object","assign","className","icon","join","InputLabelProps","shrink","InputProps","startAdornment","InputAdornment","position","Icon","color","disabled","event","onMouseEnter","onMouseLeave","focused","hiddenLabel","ref","error","onKeyDown","onKeyDownCallback","length","includes","key","preventDefault","helperText","HelperText","helpText"],"mappings":"ocAkB0BA,IACtB,IAAIC,KAAEA,EAAIC,GAAEA,EAAEC,MAAEA,EAAQ,KAAIC,SAAEA,EAAQC,OAAEA,EAAMC,QAAEA,EAAOC,MAAEA,EAAKC,YAAEA,EAAWC,SAAEA,EAAQC,UAAEA,GAAY,EAAIC,aAAEA,GAAiBX,EAAIY,EAAQC,EAAAA,OAAOb,EAAI,CAAC,OAAQ,KAAM,QAAS,WAAY,SAAU,UAAW,QAAS,cAAe,WAAY,YAAa,iBAC3P,MAAOc,EAAcC,GAAmBC,EAAAA,SAAST,GAAS,KACnDU,EAAUC,GAAeF,EAAQA,UAAC,IAClCG,EAAWC,GAAgBJ,EAAQA,UAAC,IACpCK,EAASC,GAAcN,EAAQA,UAAC,IAChCO,EAAYC,GAAiBR,EAAQA,UAAC,IACvCS,aAAEA,EAAYC,cAAEA,EAAaC,eAAEA,EAAcC,kBAAEA,GAAsBC,eAAa1B,EAAOoB,EAAYf,EAAaI,EAAMkB,MACxHC,EAAWC,SAAO,OAClBC,MAAEA,GAAUC,EAAAA,UAElB,OADAC,EAAkBA,mBAACJ,EAAUK,EAAIC,QAAE3B,EAAWuB,EAAOnB,EAAcP,EAAOK,EAAM0B,SAAU1B,EAAM2B,SAAUrB,EAAaH,EAAiBS,GAChIgB,MAAK,MAAO,CAAEC,SAAUD,EAAIE,IAACC,UAAiBC,OAAOC,OAAO,GAAIjC,EAAO,CAAEkC,UAAW,CAAClC,EAAMmC,KAAO,iBAAmB,GAAI5C,EAAQ,kBAAoB,qBAAqB6C,KAAK,KAAMC,gBAAiB,CAClMC,OAAQjC,GACTkC,WAAYvC,EAAMmC,KACf,CACEK,eAAiBZ,EAAAA,IAAKa,EAAAA,eAAgB,CAAEC,SAAU,QAASb,SAAUD,EAAIE,IAACa,OAAM,CAAEC,MAAO5C,EAAM6C,SAAW,WAAa,UAAWX,UAAWlC,EAAMmC,UAErJ,CAAE,EAAE3C,SAAWsD,GAAU/B,EAAe+B,EAAO9C,EAAM0B,SAAUlC,EAAUW,GAAkBR,MAAOO,EAAcR,QAAUoD,GAAUhC,EAAcgC,EAAOtC,EAAcF,EAAaZ,GAAUqD,aAAc,IAAMrC,GAAW,GAAOsC,aAAc,IAAMtC,GAAW,GAAQD,QAASA,EAAShB,OAASqD,GAAUjC,EAAaiC,EAAOxC,EAAaE,EAAcf,EAAQS,GAAe+C,QAAS1C,EAAWX,YAAaoB,EAAmBzB,MAAOK,EAAc,KAAOL,EAAO2D,cAAetD,EAAaP,KAAMA,EAAM8D,IAAKhC,EAAU7B,GAAIA,EAAI8D,MAAOvD,EAAUC,UAAWA,EAAWuD,UAAYP,IAC7jB9C,EAAMsD,mBACNtD,EAAMsD,kBAAkBR,GACxB/C,GAAgBA,EAAawD,OAAS,GAAKxD,EAAayD,SAASV,EAAMW,MACvEX,EAAMY,gBACT,EACFC,WAAY/B,EAAAA,IAAKgC,EAAAA,QAAY,CAAElC,SAAU1B,EAAM0B,SAAUxB,aAAcA,EAAc2D,SAAU7D,EAAM6D,eAAoB"}
1
+ {"version":3,"file":"textInput.js","sources":["../../../../src/components/textInput/textInput.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useRef, useState } from 'react';\nimport { Icon } from '../icon';\nimport { InputAdornment } from '@mui/material';\nimport TextFieldStyled from '../common/styled/textFieldStyled';\nimport { useTextInput } from './hook/useTextInput';\nimport useWindowSize from '../common/hook/useWindowSize';\nimport { useTextInputEffect } from './hook/useTextInputEffect';\nimport HelperText from '../common/helperText';\nimport noop from 'lodash/noop';\n/**\n * @description SkodaFlow TextInput component.\n * Properties are inherited from HTML input element.\n * @param props TextInputProps\n * @returns React Functional Component\n * @deprecated this component is deprecated. Use themed TextField component from @mui/material instead.\n */\nexport const TextInput = (_a) => {\n var { name, id, label = null, onChange, onBlur, onFocus, value, placeholder, hasError, fullWidth = true, excludeChars } = _a, props = __rest(_a, [\"name\", \"id\", \"label\", \"onChange\", \"onBlur\", \"onFocus\", \"value\", \"placeholder\", \"hasError\", \"fullWidth\", \"excludeChars\"]);\n const [currentValue, setCurrentValue] = useState(value || '');\n const [isShrunk, setIsShrunk] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n const [hovered, setHovered] = useState(false);\n const [isRequired, setIsRequired] = useState(false);\n const { handleOnBlur, handleOnFocus, handleOnChange, handlePlaceholder } = useTextInput(label, isRequired, placeholder, props.type);\n const inputRef = useRef(null);\n const { width } = useWindowSize();\n useTextInputEffect(inputRef, noop, fullWidth, width, currentValue, value, props.maxChars, props.required, setIsShrunk, setCurrentValue, setIsRequired);\n return (_jsx(\"div\", { children: _jsx(TextFieldStyled, Object.assign({}, props, { className: [props.icon ? 'textField-Icon' : '', label ? 'textField-Label' : 'textField-NoLabel'].join(' '), InputLabelProps: {\n shrink: isShrunk,\n }, InputProps: props.icon\n ? {\n startAdornment: (_jsx(InputAdornment, { position: \"start\", children: _jsx(Icon, { color: props.disabled ? 'disabled' : 'inherit', name: props.icon }) })),\n }\n : {}, onChange: (event) => handleOnChange(event, props.maxChars, onChange, setCurrentValue), value: currentValue, onFocus: (event) => handleOnFocus(event, setIsFocused, setIsShrunk, onFocus), onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), hovered: hovered, onBlur: (event) => handleOnBlur(event, setIsShrunk, setIsFocused, onBlur, currentValue), focused: isFocused, placeholder: handlePlaceholder, label: placeholder ? null : label, hiddenLabel: !!placeholder, name: name, ref: inputRef, id: id, error: hasError, fullWidth: fullWidth, onKeyDown: (event) => {\n if (props.onKeyDownCallback)\n props.onKeyDownCallback(event);\n if (excludeChars && excludeChars.length > 0 && excludeChars.includes(event.key)) {\n event.preventDefault();\n }\n }, helperText: _jsx(HelperText, { maxChars: props.maxChars, currentValue: currentValue, helpText: props.helpText }) })) }));\n};\n//# sourceMappingURL=textInput.js.map"],"names":["_a","name","id","label","onChange","onBlur","onFocus","value","placeholder","hasError","fullWidth","excludeChars","props","__rest","currentValue","setCurrentValue","useState","isShrunk","setIsShrunk","isFocused","setIsFocused","hovered","setHovered","isRequired","setIsRequired","handleOnBlur","handleOnFocus","handleOnChange","handlePlaceholder","useTextInput","type","inputRef","useRef","width","useWindowSize","useTextInputEffect","noop","default","maxChars","required","_jsx","children","jsx","TextFieldStyled","Object","assign","className","icon","join","InputLabelProps","shrink","InputProps","startAdornment","InputAdornment","position","Icon","color","disabled","event","onMouseEnter","onMouseLeave","focused","hiddenLabel","ref","error","onKeyDown","onKeyDownCallback","length","includes","key","preventDefault","helperText","HelperText","helpText"],"mappings":"+eAkB0BA,IACtB,IAAIC,KAAEA,EAAIC,GAAEA,EAAEC,MAAEA,EAAQ,KAAIC,SAAEA,EAAQC,OAAEA,EAAMC,QAAEA,EAAOC,MAAEA,EAAKC,YAAEA,EAAWC,SAAEA,EAAQC,UAAEA,GAAY,EAAIC,aAAEA,GAAiBX,EAAIY,EAAQC,EAAAA,OAAOb,EAAI,CAAC,OAAQ,KAAM,QAAS,WAAY,SAAU,UAAW,QAAS,cAAe,WAAY,YAAa,iBAC3P,MAAOc,EAAcC,GAAmBC,EAAAA,SAAST,GAAS,KACnDU,EAAUC,GAAeF,EAAQA,UAAC,IAClCG,EAAWC,GAAgBJ,EAAQA,UAAC,IACpCK,EAASC,GAAcN,EAAQA,UAAC,IAChCO,EAAYC,GAAiBR,EAAQA,UAAC,IACvCS,aAAEA,EAAYC,cAAEA,EAAaC,eAAEA,EAAcC,kBAAEA,GAAsBC,eAAa1B,EAAOoB,EAAYf,EAAaI,EAAMkB,MACxHC,EAAWC,SAAO,OAClBC,MAAEA,GAAUC,EAAAA,UAElB,O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{ FC, ReactNode } from 'react';
2
- import { availableIcons } from '../icon';
2
+ import { IconNameProp } from '../icon';
3
3
  export type UploadFieldProps = {
4
4
  /**
5
5
  * Glob string that specifies which file types are accepted by upload
@@ -27,7 +27,7 @@ export type UploadFieldProps = {
27
27
  * Icon name of the upload button.
28
28
  * @default undefined
29
29
  */
30
- uploadIcon?: (typeof availableIcons)[number];
30
+ uploadIcon?: IconNameProp;
31
31
  /**
32
32
  * Label of the upload button.
33
33
  * @default Upload
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("./UploadBox.js"),a=require("../icon/icon.js"),n=require("@mui/material"),l=require("minimatch");exports.UploadField=({uploadIcon:i="plus",maxFiles:o=1,uploadLabel:s="Upload",accept:c="*",onFileDrop:p})=>{const u=t.useRef(null),[d,f]=t.useState(!1),[g,h]=t.useState(!1),m=t.useCallback((e=>{e.stopPropagation(),e.preventDefault()}),[]),x=t.useCallback((e=>{[...e.dataTransfer.files].filter((e=>l.minimatch(e.type,c))).length>0?f(!0):h(!0)}),[f,h]),y=t.useCallback((()=>{f(!1),h(!1)}),[f,h]),j=t.useCallback((()=>{var e;null===(e=u.current)||void 0===e||e.click()}),[]),v=t.useCallback((e=>{e.preventDefault(),e.stopPropagation();const t=[...e.dataTransfer.files].filter((e=>l.minimatch(e.type,c))).slice(0,o);f(!1),h(!1),t.length>0&&p(t)}),[f,h]),C=t.useCallback((e=>{e.preventDefault(),e.stopPropagation();const t=[...e.target.files].filter((e=>l.minimatch(e.type,c))).slice(0,o);t.length>0&&(p([...t]),u.current&&(u.current.value=""))}),[]);return e.jsx(r.UploadBox,{color:d?"primary":"secondary",children:e.jsxs(n.Box,{sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",gap:"8px","& *":{pointerEvents:"none"},cursor:g?"no-drop":"pointer"},onDragOver:m,onDrop:v,onDragEnter:x,onDragLeave:y,onClick:j,children:[e.jsx(n.IconButton,{children:e.jsx(a.Icon,{className:i})}),"string"==typeof s?e.jsx(n.Typography,{children:s}):s,e.jsx("input",{ref:u,hidden:!0,type:"file",multiple:o>1,accept:c,onChange:C})]})})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./UploadBox.js"),a=require("../icon/icon.js");require("../icon/icon.definitions.js");var n=require("@mui/material"),i=require("minimatch");exports.UploadField=({uploadIcon:l="plus",maxFiles:o=1,uploadLabel:s="Upload",accept:c="*",onFileDrop:p})=>{const u=r.useRef(null),[d,f]=r.useState(!1),[g,h]=r.useState(!1),m=r.useCallback((e=>{e.stopPropagation(),e.preventDefault()}),[]),x=r.useCallback((e=>{[...e.dataTransfer.files].filter((e=>i.minimatch(e.type,c))).length>0?f(!0):h(!0)}),[f,h]),j=r.useCallback((()=>{f(!1),h(!1)}),[f,h]),v=r.useCallback((()=>{var e;null===(e=u.current)||void 0===e||e.click()}),[]),y=r.useCallback((e=>{e.preventDefault(),e.stopPropagation();const r=[...e.dataTransfer.files].filter((e=>i.minimatch(e.type,c))).slice(0,o);f(!1),h(!1),r.length>0&&p(r)}),[f,h]),C=r.useCallback((e=>{e.preventDefault(),e.stopPropagation();const r=[...e.target.files].filter((e=>i.minimatch(e.type,c))).slice(0,o);r.length>0&&(p([...r]),u.current&&(u.current.value=""))}),[]);return e.jsx(t.UploadBox,{color:d?"primary":"secondary",children:e.jsxs(n.Box,{sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",gap:"8px","& *":{pointerEvents:"none"},cursor:g?"no-drop":"pointer"},onDragOver:m,onDrop:y,onDragEnter:x,onDragLeave:j,onClick:v,children:[e.jsx(n.IconButton,{children:e.jsx(a.Icon,{name:l})}),"string"==typeof s?e.jsx(n.Typography,{children:s}):s,e.jsx("input",{ref:u,hidden:!0,type:"file",multiple:o>1,accept:c,onChange:C})]})})};
2
2
  //# sourceMappingURL=UploadField.js.map