@skodaflow/web-library 6.0.0 → 7.0.1

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 (443) hide show
  1. package/README.md +3 -48
  2. package/cjs/components/backdrop/backdrop.js +1 -1
  3. package/cjs/components/backdrop/backdrop.js.map +1 -1
  4. package/cjs/components/banner/banner.d.ts +3 -0
  5. package/cjs/components/banner/banner.js +1 -1
  6. package/cjs/components/banner/banner.js.map +1 -1
  7. package/cjs/components/button/button.js +1 -1
  8. package/cjs/components/button/button.js.map +1 -1
  9. package/cjs/components/cardContainer/cardContainer.js +1 -1
  10. package/cjs/components/cardContainer/cardContainer.js.map +1 -1
  11. package/cjs/components/cardMenu/cardMenu.d.ts +1 -0
  12. package/cjs/components/cardMenu/cardMenu.js.map +1 -1
  13. package/cjs/components/cardMenu/styled/menuListStyled.js +1 -1
  14. package/cjs/components/cardMenu/styled/menuListStyled.js.map +1 -1
  15. package/cjs/components/common/styled/textFieldStyled.js +1 -1
  16. package/cjs/components/common/styled/textFieldStyled.js.map +1 -1
  17. package/cjs/components/controls/controls.js +1 -1
  18. package/cjs/components/controls/controls.js.map +1 -1
  19. package/cjs/components/icon/icon.d.ts +8 -9
  20. package/cjs/components/icon/icon.definitions.d.ts +8 -846
  21. package/cjs/components/icon/icon.definitions.js +1 -1
  22. package/cjs/components/icon/icon.definitions.js.map +1 -1
  23. package/cjs/components/icon/icon.js +1 -1
  24. package/cjs/components/icon/icon.js.map +1 -1
  25. package/cjs/components/index.d.ts +0 -3
  26. package/cjs/components/indicator/indicator.js +1 -1
  27. package/cjs/components/indicator/indicator.js.map +1 -1
  28. package/cjs/components/label/label.js +3 -3
  29. package/cjs/components/label/label.js.map +1 -1
  30. package/cjs/components/labelFeature/labelFeature.js +4 -4
  31. package/cjs/components/labelFeature/labelFeature.js.map +1 -1
  32. package/cjs/components/labelPromotional/labelPromotional.js +1 -1
  33. package/cjs/components/labelPromotional/labelPromotional.js.map +1 -1
  34. package/cjs/components/labelStatus/labelStatus.js +4 -4
  35. package/cjs/components/labelStatus/labelStatus.js.map +1 -1
  36. package/cjs/components/numbering/numbering.js +1 -1
  37. package/cjs/components/numbering/numbering.js.map +1 -1
  38. package/cjs/components/pagination/pagination.js +1 -1
  39. package/cjs/components/pagination/pagination.js.map +1 -1
  40. package/cjs/components/selectInput/formControlSelectStyled.js +1 -1
  41. package/cjs/components/selectInput/formControlSelectStyled.js.map +1 -1
  42. package/cjs/components/selectInput/selectInput.js +1 -1
  43. package/cjs/components/selectInput/selectInput.js.map +1 -1
  44. package/cjs/components/stepper/stepper.js +1 -1
  45. package/cjs/components/stepper/stepper.js.map +1 -1
  46. package/cjs/components/textArea/textArea.js +1 -1
  47. package/cjs/components/textArea/textArea.js.map +1 -1
  48. package/cjs/components/textInput/textInput.js +1 -1
  49. package/cjs/components/textInput/textInput.js.map +1 -1
  50. package/cjs/design/skoda/SkodaThemeProvider.d.ts +8 -1
  51. package/cjs/design/skoda/SkodaThemeProvider.js +1 -1
  52. package/cjs/design/skoda/SkodaThemeProvider.js.map +1 -1
  53. package/cjs/design/skoda/SkodaThemeWidgetProvider.d.ts +5 -7
  54. package/cjs/design/skoda/SkodaThemeWidgetProvider.js +1 -1
  55. package/cjs/design/skoda/SkodaThemeWidgetProvider.js.map +1 -1
  56. package/cjs/design/skoda/components/accordion/accordion.theme.js +1 -1
  57. package/cjs/design/skoda/components/accordion/accordion.theme.js.map +1 -1
  58. package/cjs/design/skoda/components/accordion/accordionSummary.theme.js +1 -1
  59. package/cjs/design/skoda/components/accordion/accordionSummary.theme.js.map +1 -1
  60. package/cjs/design/skoda/components/autocomplete.theme.js +1 -1
  61. package/cjs/design/skoda/components/autocomplete.theme.js.map +1 -1
  62. package/cjs/design/skoda/components/backdrop.theme.js +1 -1
  63. package/cjs/design/skoda/components/backdrop.theme.js.map +1 -1
  64. package/cjs/design/skoda/components/baseline.theme.d.ts +3 -3
  65. package/cjs/design/skoda/components/baseline.theme.js +1 -1
  66. package/cjs/design/skoda/components/baseline.theme.js.map +1 -1
  67. package/cjs/design/skoda/components/breadcrumbs.theme.js +1 -1
  68. package/cjs/design/skoda/components/breadcrumbs.theme.js.map +1 -1
  69. package/cjs/design/skoda/components/checkbox.theme.js +1 -1
  70. package/cjs/design/skoda/components/checkbox.theme.js.map +1 -1
  71. package/cjs/design/skoda/components/datePickers/desktopDateTimePicker.theme.js +1 -1
  72. package/cjs/design/skoda/components/datePickers/desktopDateTimePicker.theme.js.map +1 -1
  73. package/cjs/design/skoda/components/divider.theme.js +1 -1
  74. package/cjs/design/skoda/components/divider.theme.js.map +1 -1
  75. package/cjs/design/skoda/components/drawer.theme.js +1 -1
  76. package/cjs/design/skoda/components/drawer.theme.js.map +1 -1
  77. package/cjs/design/skoda/components/form/radio.theme.js +1 -1
  78. package/cjs/design/skoda/components/form/radio.theme.js.map +1 -1
  79. package/cjs/design/skoda/components/form/select.theme.js +1 -1
  80. package/cjs/design/skoda/components/form/select.theme.js.map +1 -1
  81. package/cjs/design/skoda/components/form/slider.theme.js +1 -1
  82. package/cjs/design/skoda/components/form/slider.theme.js.map +1 -1
  83. package/cjs/design/skoda/components/icon.theme.js +1 -1
  84. package/cjs/design/skoda/components/icon.theme.js.map +1 -1
  85. package/cjs/design/skoda/components/mobileStepper.theme.js +1 -1
  86. package/cjs/design/skoda/components/mobileStepper.theme.js.map +1 -1
  87. package/cjs/design/skoda/components/modal.theme.js +1 -1
  88. package/cjs/design/skoda/components/modal.theme.js.map +1 -1
  89. package/cjs/design/skoda/components/pagination.theme.js +1 -1
  90. package/cjs/design/skoda/components/pagination.theme.js.map +1 -1
  91. package/cjs/design/skoda/components/snackbar.theme.js +1 -1
  92. package/cjs/design/skoda/components/snackbar.theme.js.map +1 -1
  93. package/cjs/design/skoda/components/stepper/stepIcon/qontoStepIcon.js +1 -1
  94. package/cjs/design/skoda/components/stepper/stepIcon/qontoStepIcon.js.map +1 -1
  95. package/cjs/design/skoda/components/stepper/stepper.theme.js +1 -1
  96. package/cjs/design/skoda/components/stepper/stepper.theme.js.map +1 -1
  97. package/cjs/design/skoda/components/tabs/tab.theme.js +1 -1
  98. package/cjs/design/skoda/components/tabs/tab.theme.js.map +1 -1
  99. package/cjs/design/skoda/components/tabs/tabs.theme.js +1 -1
  100. package/cjs/design/skoda/components/tabs/tabs.theme.js.map +1 -1
  101. package/cjs/design/skoda/components/tooltip.theme.js +1 -1
  102. package/cjs/design/skoda/components/tooltip.theme.js.map +1 -1
  103. package/cjs/design/skoda/index.d.ts +1 -0
  104. package/cjs/design/skoda/{palette.theme.d.ts → paletteDark.theme.d.ts} +1 -1
  105. package/cjs/design/skoda/paletteDark.theme.js +2 -0
  106. package/cjs/design/skoda/paletteDark.theme.js.map +1 -0
  107. package/cjs/design/skoda/paletteLight.theme.d.ts +2 -0
  108. package/cjs/design/skoda/paletteLight.theme.js +2 -0
  109. package/cjs/design/skoda/paletteLight.theme.js.map +1 -0
  110. package/cjs/design/skoda/theme.constants.js +1 -1
  111. package/cjs/design/skoda/theme.constants.js.map +1 -1
  112. package/cjs/design/skoda/theme.d.ts +8 -2
  113. package/cjs/design/skoda/theme.js +1 -1
  114. package/cjs/design/skoda/theme.js.map +1 -1
  115. package/cjs/design/skoda/theme.typography.d.ts +10 -7
  116. package/cjs/design/skoda/theme.typography.js +1 -1
  117. package/cjs/design/skoda/theme.typography.js.map +1 -1
  118. package/cjs/index.js +1 -1
  119. package/cjs/layout/Header/HeaderButton.js +1 -1
  120. package/cjs/layout/Header/HeaderButton.js.map +1 -1
  121. package/cjs/layout/Header/HeaderNavigationLink.d.ts +1 -1
  122. package/cjs/layout/Header/HeaderNavigationLink.js +1 -1
  123. package/cjs/layout/Header/HeaderNavigationLink.js.map +1 -1
  124. package/cjs/layout/Header/HeaderNavigationMenu.d.ts +1 -0
  125. package/cjs/layout/Header/HeaderNavigationMenu.js +1 -1
  126. package/cjs/layout/Header/HeaderNavigationMenu.js.map +1 -1
  127. package/cjs/layout/container/container.js.map +1 -0
  128. package/cjs/layout/index.d.ts +1 -0
  129. package/cjs/organisms/cardPromoVehicle/cardPromoVehicleComponent.js +1 -1
  130. package/cjs/organisms/cardPromoVehicle/cardPromoVehicleComponent.js.map +1 -1
  131. package/cjs/organisms/carousel/carousel.d.ts +3 -0
  132. package/cjs/organisms/carousel/carousel.js.map +1 -1
  133. package/cjs/organisms/carousel/styledComponents/styledCarouselHorizontal.js +1 -1
  134. package/cjs/organisms/carousel/styledComponents/styledCarouselHorizontal.js.map +1 -1
  135. package/cjs/organisms/carousel/styledComponents/styledCarouselVertical.js +1 -1
  136. package/cjs/organisms/carousel/styledComponents/styledCarouselVertical.js.map +1 -1
  137. package/cjs/organisms/carousel2/cardCarousel/cardCarousel.d.ts +3 -0
  138. package/cjs/organisms/carousel2/cardCarousel/cardCarousel.js.map +1 -1
  139. package/cjs/organisms/carousel2/components/NavButton.js +1 -1
  140. package/cjs/organisms/carousel2/components/NavButton.js.map +1 -1
  141. package/cjs/organisms/carousel2/galleryCarousel/galleryCarousel.d.ts +3 -0
  142. package/cjs/organisms/carousel2/galleryCarousel/galleryCarousel.js +1 -1
  143. package/cjs/organisms/carousel2/galleryCarousel/galleryCarousel.js.map +1 -1
  144. package/cjs/organisms/carousel2/galleryCarousel/galleryContext.js +1 -1
  145. package/cjs/organisms/carousel2/galleryCarousel/galleryContext.js.map +1 -1
  146. package/cjs/organisms/carousel2/heroCarousel/heroCarousel.d.ts +3 -0
  147. package/cjs/organisms/carousel2/heroCarousel/heroCarousel.js +1 -1
  148. package/cjs/organisms/carousel2/heroCarousel/heroCarousel.js.map +1 -1
  149. package/cjs/organisms/carousel2/heroCarousel/heroCarouselContext.js +1 -1
  150. package/cjs/organisms/carousel2/heroCarousel/heroCarouselContext.js.map +1 -1
  151. package/cjs/organisms/gallery/Gallery.js +1 -1
  152. package/cjs/organisms/gallery/Gallery.js.map +1 -1
  153. package/cjs/organisms/gallery/GalleryTrigger.js +1 -1
  154. package/cjs/organisms/gallery/GalleryTrigger.js.map +1 -1
  155. package/cjs/organisms/maps/mapComponents/mapComponent.d.ts +2 -2
  156. package/cjs/organisms/maps/mapComponents/mapComponent.js.map +1 -1
  157. package/cjs/organisms/maps/mapComponents/mapStyled.js +1 -1
  158. package/cjs/organisms/maps/mapComponents/mapStyled.js.map +1 -1
  159. package/cjs/organisms/notification/Notification.js +1 -1
  160. package/cjs/organisms/notification/Notification.js.map +1 -1
  161. package/cjs/organisms/tile/tile.js +1 -1
  162. package/cjs/organisms/tile/tile.js.map +1 -1
  163. package/cjs/utils/copyToClipboard/copyToClipboard.d.ts +6 -0
  164. package/cjs/utils/useClosure/useClosure.d.ts +1 -0
  165. package/cjs/utils/useClosure/useClosure.js.map +1 -1
  166. package/cjs/utils/useDebounce/useDebounce.d.ts +12 -0
  167. package/cjs/utils/useFeatureFlag/useFeatureFlag.d.ts +26 -0
  168. package/cjs/utils/useFeatureFlag/useFeatureFlag.js +2 -0
  169. package/cjs/utils/useFeatureFlag/useFeatureFlag.js.map +1 -0
  170. package/components/backdrop/backdrop.js +1 -1
  171. package/components/backdrop/backdrop.js.map +1 -1
  172. package/components/banner/banner.d.ts +3 -0
  173. package/components/banner/banner.js +1 -1
  174. package/components/banner/banner.js.map +1 -1
  175. package/components/button/button.js +1 -1
  176. package/components/button/button.js.map +1 -1
  177. package/components/cardContainer/cardContainer.js +1 -1
  178. package/components/cardContainer/cardContainer.js.map +1 -1
  179. package/components/cardMenu/cardMenu.d.ts +1 -0
  180. package/components/cardMenu/cardMenu.js.map +1 -1
  181. package/components/cardMenu/styled/menuListStyled.js +1 -1
  182. package/components/cardMenu/styled/menuListStyled.js.map +1 -1
  183. package/components/common/styled/textFieldStyled.js +1 -1
  184. package/components/common/styled/textFieldStyled.js.map +1 -1
  185. package/components/controls/controls.js +1 -1
  186. package/components/controls/controls.js.map +1 -1
  187. package/components/icon/icon.d.ts +8 -9
  188. package/components/icon/icon.definitions.d.ts +8 -846
  189. package/components/icon/icon.definitions.js +1 -1
  190. package/components/icon/icon.definitions.js.map +1 -1
  191. package/components/icon/icon.js +1 -1
  192. package/components/icon/icon.js.map +1 -1
  193. package/components/index.d.ts +0 -3
  194. package/components/indicator/indicator.js +1 -1
  195. package/components/indicator/indicator.js.map +1 -1
  196. package/components/label/label.js +2 -2
  197. package/components/label/label.js.map +1 -1
  198. package/components/labelFeature/labelFeature.js +1 -1
  199. package/components/labelFeature/labelFeature.js.map +1 -1
  200. package/components/labelPromotional/labelPromotional.js +1 -1
  201. package/components/labelPromotional/labelPromotional.js.map +1 -1
  202. package/components/labelStatus/labelStatus.js +1 -1
  203. package/components/labelStatus/labelStatus.js.map +1 -1
  204. package/components/numbering/numbering.js +1 -1
  205. package/components/numbering/numbering.js.map +1 -1
  206. package/components/pagination/pagination.js +1 -1
  207. package/components/pagination/pagination.js.map +1 -1
  208. package/components/selectInput/formControlSelectStyled.js +1 -1
  209. package/components/selectInput/formControlSelectStyled.js.map +1 -1
  210. package/components/selectInput/selectInput.js +1 -1
  211. package/components/selectInput/selectInput.js.map +1 -1
  212. package/components/stepper/stepper.js +1 -1
  213. package/components/stepper/stepper.js.map +1 -1
  214. package/components/textArea/textArea.js +1 -1
  215. package/components/textArea/textArea.js.map +1 -1
  216. package/components/textInput/textInput.js +1 -1
  217. package/components/textInput/textInput.js.map +1 -1
  218. package/design/skoda/SkodaThemeProvider.d.ts +8 -1
  219. package/design/skoda/SkodaThemeProvider.js +1 -1
  220. package/design/skoda/SkodaThemeProvider.js.map +1 -1
  221. package/design/skoda/SkodaThemeWidgetProvider.d.ts +5 -7
  222. package/design/skoda/SkodaThemeWidgetProvider.js +1 -1
  223. package/design/skoda/SkodaThemeWidgetProvider.js.map +1 -1
  224. package/design/skoda/components/accordion/accordion.theme.js +1 -1
  225. package/design/skoda/components/accordion/accordion.theme.js.map +1 -1
  226. package/design/skoda/components/accordion/accordionSummary.theme.js +1 -1
  227. package/design/skoda/components/accordion/accordionSummary.theme.js.map +1 -1
  228. package/design/skoda/components/autocomplete.theme.js +1 -1
  229. package/design/skoda/components/autocomplete.theme.js.map +1 -1
  230. package/design/skoda/components/backdrop.theme.js +1 -1
  231. package/design/skoda/components/backdrop.theme.js.map +1 -1
  232. package/design/skoda/components/baseline.theme.d.ts +3 -3
  233. package/design/skoda/components/baseline.theme.js +1 -1
  234. package/design/skoda/components/baseline.theme.js.map +1 -1
  235. package/design/skoda/components/breadcrumbs.theme.js +1 -1
  236. package/design/skoda/components/breadcrumbs.theme.js.map +1 -1
  237. package/design/skoda/components/checkbox.theme.js +1 -1
  238. package/design/skoda/components/checkbox.theme.js.map +1 -1
  239. package/design/skoda/components/datePickers/desktopDateTimePicker.theme.js +1 -1
  240. package/design/skoda/components/datePickers/desktopDateTimePicker.theme.js.map +1 -1
  241. package/design/skoda/components/divider.theme.js +1 -1
  242. package/design/skoda/components/divider.theme.js.map +1 -1
  243. package/design/skoda/components/drawer.theme.js +1 -1
  244. package/design/skoda/components/drawer.theme.js.map +1 -1
  245. package/design/skoda/components/form/radio.theme.js +1 -1
  246. package/design/skoda/components/form/radio.theme.js.map +1 -1
  247. package/design/skoda/components/form/select.theme.js +1 -1
  248. package/design/skoda/components/form/select.theme.js.map +1 -1
  249. package/design/skoda/components/form/slider.theme.js +1 -1
  250. package/design/skoda/components/form/slider.theme.js.map +1 -1
  251. package/design/skoda/components/icon.theme.js +1 -1
  252. package/design/skoda/components/icon.theme.js.map +1 -1
  253. package/design/skoda/components/mobileStepper.theme.js +1 -1
  254. package/design/skoda/components/mobileStepper.theme.js.map +1 -1
  255. package/design/skoda/components/modal.theme.js +1 -1
  256. package/design/skoda/components/modal.theme.js.map +1 -1
  257. package/design/skoda/components/pagination.theme.js +1 -1
  258. package/design/skoda/components/pagination.theme.js.map +1 -1
  259. package/design/skoda/components/snackbar.theme.js +1 -1
  260. package/design/skoda/components/snackbar.theme.js.map +1 -1
  261. package/design/skoda/components/stepper/stepIcon/qontoStepIcon.js +1 -1
  262. package/design/skoda/components/stepper/stepIcon/qontoStepIcon.js.map +1 -1
  263. package/design/skoda/components/stepper/stepper.theme.js +1 -1
  264. package/design/skoda/components/stepper/stepper.theme.js.map +1 -1
  265. package/design/skoda/components/tabs/tab.theme.js +1 -1
  266. package/design/skoda/components/tabs/tab.theme.js.map +1 -1
  267. package/design/skoda/components/tabs/tabs.theme.js +1 -1
  268. package/design/skoda/components/tabs/tabs.theme.js.map +1 -1
  269. package/design/skoda/components/tooltip.theme.js +1 -1
  270. package/design/skoda/components/tooltip.theme.js.map +1 -1
  271. package/design/skoda/index.d.ts +1 -0
  272. package/design/skoda/{palette.theme.d.ts → paletteDark.theme.d.ts} +1 -1
  273. package/design/skoda/paletteDark.theme.js +2 -0
  274. package/design/skoda/paletteDark.theme.js.map +1 -0
  275. package/design/skoda/paletteLight.theme.d.ts +2 -0
  276. package/design/skoda/paletteLight.theme.js +2 -0
  277. package/design/skoda/paletteLight.theme.js.map +1 -0
  278. package/design/skoda/theme.constants.js +1 -1
  279. package/design/skoda/theme.constants.js.map +1 -1
  280. package/design/skoda/theme.d.ts +8 -2
  281. package/design/skoda/theme.js +1 -1
  282. package/design/skoda/theme.js.map +1 -1
  283. package/design/skoda/theme.typography.d.ts +10 -7
  284. package/design/skoda/theme.typography.js +1 -1
  285. package/design/skoda/theme.typography.js.map +1 -1
  286. package/index.js +1 -1
  287. package/layout/Header/HeaderButton.js +1 -1
  288. package/layout/Header/HeaderButton.js.map +1 -1
  289. package/layout/Header/HeaderNavigationLink.d.ts +1 -1
  290. package/layout/Header/HeaderNavigationLink.js +1 -1
  291. package/layout/Header/HeaderNavigationLink.js.map +1 -1
  292. package/layout/Header/HeaderNavigationMenu.d.ts +1 -0
  293. package/layout/Header/HeaderNavigationMenu.js +1 -1
  294. package/layout/Header/HeaderNavigationMenu.js.map +1 -1
  295. package/layout/container/container.js.map +1 -0
  296. package/layout/index.d.ts +1 -0
  297. package/organisms/cardPromoVehicle/cardPromoVehicleComponent.js +1 -1
  298. package/organisms/cardPromoVehicle/cardPromoVehicleComponent.js.map +1 -1
  299. package/organisms/carousel/carousel.d.ts +3 -0
  300. package/organisms/carousel/carousel.js.map +1 -1
  301. package/organisms/carousel/styledComponents/styledCarouselHorizontal.js +1 -1
  302. package/organisms/carousel/styledComponents/styledCarouselHorizontal.js.map +1 -1
  303. package/organisms/carousel/styledComponents/styledCarouselVertical.js +1 -1
  304. package/organisms/carousel/styledComponents/styledCarouselVertical.js.map +1 -1
  305. package/organisms/carousel2/cardCarousel/cardCarousel.d.ts +3 -0
  306. package/organisms/carousel2/cardCarousel/cardCarousel.js.map +1 -1
  307. package/organisms/carousel2/components/NavButton.js +1 -1
  308. package/organisms/carousel2/components/NavButton.js.map +1 -1
  309. package/organisms/carousel2/galleryCarousel/galleryCarousel.d.ts +3 -0
  310. package/organisms/carousel2/galleryCarousel/galleryCarousel.js +1 -1
  311. package/organisms/carousel2/galleryCarousel/galleryCarousel.js.map +1 -1
  312. package/organisms/carousel2/galleryCarousel/galleryContext.js +1 -1
  313. package/organisms/carousel2/galleryCarousel/galleryContext.js.map +1 -1
  314. package/organisms/carousel2/heroCarousel/heroCarousel.d.ts +3 -0
  315. package/organisms/carousel2/heroCarousel/heroCarousel.js +1 -1
  316. package/organisms/carousel2/heroCarousel/heroCarousel.js.map +1 -1
  317. package/organisms/carousel2/heroCarousel/heroCarouselContext.js +1 -1
  318. package/organisms/carousel2/heroCarousel/heroCarouselContext.js.map +1 -1
  319. package/organisms/gallery/Gallery.js +1 -1
  320. package/organisms/gallery/Gallery.js.map +1 -1
  321. package/organisms/gallery/GalleryTrigger.js +1 -1
  322. package/organisms/gallery/GalleryTrigger.js.map +1 -1
  323. package/organisms/maps/mapComponents/mapComponent.d.ts +2 -2
  324. package/organisms/maps/mapComponents/mapComponent.js.map +1 -1
  325. package/organisms/maps/mapComponents/mapStyled.js +1 -1
  326. package/organisms/maps/mapComponents/mapStyled.js.map +1 -1
  327. package/organisms/notification/Notification.js +1 -1
  328. package/organisms/notification/Notification.js.map +1 -1
  329. package/organisms/tile/tile.js +1 -1
  330. package/organisms/tile/tile.js.map +1 -1
  331. package/package.json +1 -1
  332. package/utils/copyToClipboard/copyToClipboard.d.ts +6 -0
  333. package/utils/useClosure/useClosure.d.ts +1 -0
  334. package/utils/useClosure/useClosure.js.map +1 -1
  335. package/utils/useDebounce/useDebounce.d.ts +12 -0
  336. package/utils/useFeatureFlag/useFeatureFlag.d.ts +26 -0
  337. package/utils/useFeatureFlag/useFeatureFlag.js +2 -0
  338. package/utils/useFeatureFlag/useFeatureFlag.js.map +1 -0
  339. package/cjs/components/agGrid/CustomRenderer.d.ts +0 -1
  340. package/cjs/components/agGrid/ImageRenderer.d.ts +0 -1
  341. package/cjs/components/agGrid/agGrid.d.ts +0 -8
  342. package/cjs/components/agGrid/agGrid.js +0 -2
  343. package/cjs/components/agGrid/agGrid.js.map +0 -1
  344. package/cjs/components/agGrid/agGridStyled.d.ts +0 -7
  345. package/cjs/components/agGrid/agGridStyled.js +0 -2
  346. package/cjs/components/agGrid/agGridStyled.js.map +0 -1
  347. package/cjs/components/agGrid/index.d.ts +0 -1
  348. package/cjs/components/agGrid/mock.d.ts +0 -70
  349. package/cjs/components/container/container.js.map +0 -1
  350. package/cjs/components/tab/hook/useTabs.d.ts +0 -10
  351. package/cjs/components/tab/hook/useTabs.js +0 -2
  352. package/cjs/components/tab/hook/useTabs.js.map +0 -1
  353. package/cjs/components/tab/index.d.ts +0 -4
  354. package/cjs/components/tab/menuTab.d.ts +0 -37
  355. package/cjs/components/tab/menuTab.js +0 -2
  356. package/cjs/components/tab/menuTab.js.map +0 -1
  357. package/cjs/components/tab/secondaryNavigation/secondaryNavigationTabs.d.ts +0 -29
  358. package/cjs/components/tab/secondaryNavigation/secondaryNavigationTabs.js +0 -2
  359. package/cjs/components/tab/secondaryNavigation/secondaryNavigationTabs.js.map +0 -1
  360. package/cjs/components/tab/secondaryNavigation/secondaryTabStyled.d.ts +0 -14
  361. package/cjs/components/tab/secondaryNavigation/secondaryTabStyled.js +0 -2
  362. package/cjs/components/tab/secondaryNavigation/secondaryTabStyled.js.map +0 -1
  363. package/cjs/components/tab/tab.d.ts +0 -50
  364. package/cjs/components/tab/tab.js +0 -2
  365. package/cjs/components/tab/tab.js.map +0 -1
  366. package/cjs/components/tab/tabPanel.d.ts +0 -21
  367. package/cjs/components/tab/tabPanel.js +0 -2
  368. package/cjs/components/tab/tabPanel.js.map +0 -1
  369. package/cjs/components/tab/tabStyled.d.ts +0 -20
  370. package/cjs/components/tab/tabStyled.js +0 -2
  371. package/cjs/components/tab/tabStyled.js.map +0 -1
  372. package/cjs/components/tab/tabs.d.ts +0 -56
  373. package/cjs/components/tab/tabs.js +0 -2
  374. package/cjs/components/tab/tabs.js.map +0 -1
  375. package/cjs/design/skoda/palette.theme.js +0 -2
  376. package/cjs/design/skoda/palette.theme.js.map +0 -1
  377. package/cjs/utils/icons.js +0 -2
  378. package/cjs/utils/icons.js.map +0 -1
  379. package/components/agGrid/CustomRenderer.d.ts +0 -1
  380. package/components/agGrid/ImageRenderer.d.ts +0 -1
  381. package/components/agGrid/agGrid.d.ts +0 -8
  382. package/components/agGrid/agGrid.js +0 -2
  383. package/components/agGrid/agGrid.js.map +0 -1
  384. package/components/agGrid/agGridStyled.d.ts +0 -7
  385. package/components/agGrid/agGridStyled.js +0 -2
  386. package/components/agGrid/agGridStyled.js.map +0 -1
  387. package/components/agGrid/index.d.ts +0 -1
  388. package/components/agGrid/mock.d.ts +0 -70
  389. package/components/container/container.js.map +0 -1
  390. package/components/tab/hook/useTabs.d.ts +0 -10
  391. package/components/tab/hook/useTabs.js +0 -2
  392. package/components/tab/hook/useTabs.js.map +0 -1
  393. package/components/tab/index.d.ts +0 -4
  394. package/components/tab/menuTab.d.ts +0 -37
  395. package/components/tab/menuTab.js +0 -2
  396. package/components/tab/menuTab.js.map +0 -1
  397. package/components/tab/secondaryNavigation/secondaryNavigationTabs.d.ts +0 -29
  398. package/components/tab/secondaryNavigation/secondaryNavigationTabs.js +0 -2
  399. package/components/tab/secondaryNavigation/secondaryNavigationTabs.js.map +0 -1
  400. package/components/tab/secondaryNavigation/secondaryTabStyled.d.ts +0 -14
  401. package/components/tab/secondaryNavigation/secondaryTabStyled.js +0 -2
  402. package/components/tab/secondaryNavigation/secondaryTabStyled.js.map +0 -1
  403. package/components/tab/tab.d.ts +0 -50
  404. package/components/tab/tab.js +0 -2
  405. package/components/tab/tab.js.map +0 -1
  406. package/components/tab/tabPanel.d.ts +0 -21
  407. package/components/tab/tabPanel.js +0 -2
  408. package/components/tab/tabPanel.js.map +0 -1
  409. package/components/tab/tabStyled.d.ts +0 -20
  410. package/components/tab/tabStyled.js +0 -2
  411. package/components/tab/tabStyled.js.map +0 -1
  412. package/components/tab/tabs.d.ts +0 -56
  413. package/components/tab/tabs.js +0 -2
  414. package/components/tab/tabs.js.map +0 -1
  415. package/design/skoda/palette.theme.js +0 -2
  416. package/design/skoda/palette.theme.js.map +0 -1
  417. package/theme/skoda/assets/@skodaflow/web-tokens/src/fonts/SKODANext-Black.ttf +0 -0
  418. package/theme/skoda/assets/@skodaflow/web-tokens/src/fonts/SKODANext-Black.woff +0 -0
  419. package/theme/skoda/assets/@skodaflow/web-tokens/src/fonts/SKODANext-Black.woff2 +0 -0
  420. package/theme/skoda/assets/@skodaflow/web-tokens/src/fonts/SKODANext-Bold.ttf +0 -0
  421. package/theme/skoda/assets/@skodaflow/web-tokens/src/fonts/SKODANext-Bold.woff +0 -0
  422. package/theme/skoda/assets/@skodaflow/web-tokens/src/fonts/SKODANext-Bold.woff2 +0 -0
  423. package/theme/skoda/assets/@skodaflow/web-tokens/src/fonts/SKODANext-Light.ttf +0 -0
  424. package/theme/skoda/assets/@skodaflow/web-tokens/src/fonts/SKODANext-Light.woff +0 -0
  425. package/theme/skoda/assets/@skodaflow/web-tokens/src/fonts/SKODANext-Light.woff2 +0 -0
  426. package/theme/skoda/assets/@skodaflow/web-tokens/src/fonts/SKODANext-Regular.ttf +0 -0
  427. package/theme/skoda/assets/@skodaflow/web-tokens/src/fonts/SKODANext-Regular.woff +0 -0
  428. package/theme/skoda/assets/@skodaflow/web-tokens/src/fonts/SKODANext-Regular.woff2 +0 -0
  429. package/theme/skoda/fonts/SKODANextIcons-Filled.eot +0 -0
  430. package/theme/skoda/fonts/SKODANextIcons-Filled.woff +0 -0
  431. package/theme/skoda/fonts/SKODANextIcons-Regular.eot +0 -0
  432. package/theme/skoda/fonts/SKODANextIcons-Regular.woff +0 -0
  433. package/theme/skoda/fonts.css +0 -1
  434. package/theme/skoda/globals.css +0 -1
  435. package/theme/skoda/icons.css +0 -1
  436. package/utils/icons.js +0 -2
  437. package/utils/icons.js.map +0 -1
  438. /package/cjs/{components → layout}/container/container.d.ts +0 -0
  439. /package/cjs/{components → layout}/container/container.js +0 -0
  440. /package/cjs/{components → layout}/container/index.d.ts +0 -0
  441. /package/{components → layout}/container/container.d.ts +0 -0
  442. /package/{components → layout}/container/container.js +0 -0
  443. /package/{components → layout}/container/index.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"numbering.js","sources":["../../../../src/components/numbering/numbering.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nimport { styled } from '@mui/material/styles';\nimport { NumberingColors, NumberingSizes } from '../../utils/enum';\nimport { flowColors } from '../../design/skoda/palette.theme';\n/**\n * @description SkodaFlow Numbering component.\n * @param props NumberingProps\n * @returns React Functional Component\n */\nexport const Numbering = (_a) => {\n var props = __rest(_a, []);\n return (_jsxs(NumberingStyled, Object.assign({}, props, { style: props.customStyle, \"data-testid\": \"Numbering\", children: [_jsxs(\"span\", { className: \"index-container\", \"data-testid\": \"Numbering.index\", children: [props.index, ' '] }), _jsxs(\"span\", { className: \"separator-container\", \"data-testid\": \"Numbering.separator\", children: [props.customSeparator ? props.customSeparator : '/', ' '] }), _jsx(\"span\", { className: \"total-container\", \"data-testid\": \"Numbering.total\", children: props.total })] })));\n};\n/**\n * @description Controls styling definition based on props\n */\nconst NumberingStyled = styled('div', {\n shouldForwardProp: (prop) => prop !== 'customSeparator' && prop !== 'colorTheme',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n let styles = {};\n styles = {\n fontFamily: 'SKODA Next',\n fontStyle: 'normal',\n fontWeight: '700',\n fontSize: args.size === NumberingSizes.LARGE ? '18px' : '16px',\n lineHeight: args.size === NumberingSizes.LARGE ? '28px' : '24px',\n letterSpacing: '0.02em',\n '& .index-container': {\n color: args.colorTheme === NumberingColors.DARK ? flowColors.text.primary : flowColors.onSurface.os0,\n },\n '& .separator-container': {\n color: flowColors.onSurface.os600,\n },\n '& .total-container': {\n color: flowColors.onSurface.os600,\n },\n };\n return styles;\n});\n//# sourceMappingURL=numbering.js.map"],"names":["NumberingStyled","styled","shouldForwardProp","prop","_a","args","__rest","styles","fontFamily","fontStyle","fontWeight","fontSize","size","NumberingSizes","LARGE","lineHeight","letterSpacing","color","colorTheme","NumberingColors","DARK","flowColors","text","primary","onSurface","os0","os600","props","_jsxs","Object","assign","style","customStyle","children","className","index","customSeparator","_jsx","total"],"mappings":"uLAUY,MAONA,EAAkBC,EAAMA,OAAC,MAAO,CAClCC,kBAAoBC,GAAkB,oBAATA,GAAuC,eAATA,GADvCF,EAEpBG,IACG,IAAiBC,EAAOC,EAAMA,OAACF,EAAI,CAAC,UACvC,IAAIG,EAAS,CAAA,EAkBb,OAjBAA,EAAS,CACLC,WAAY,aACZC,UAAW,SACXC,WAAY,MACZC,SAAUN,EAAKO,OAASC,EAAcA,eAACC,MAAQ,OAAS,OACxDC,WAAYV,EAAKO,OAASC,EAAcA,eAACC,MAAQ,OAAS,OAC1DE,cAAe,SACf,qBAAsB,CAClBC,MAAOZ,EAAKa,aAAeC,EAAAA,gBAAgBC,KAAOC,aAAWC,KAAKC,QAAUF,aAAWG,UAAUC,KAErG,yBAA0B,CACtBR,MAAOI,EAAAA,WAAWG,UAAUE,OAEhC,qBAAsB,CAClBT,MAAOI,EAAAA,WAAWG,UAAUE,QAG7BnB,CAAM,sBA7BSH,IACtB,IAAIuB,EAAQrB,EAAAA,OAAOF,EAAI,IACvB,OAAQwB,OAAM5B,EAAiB6B,OAAOC,OAAO,CAAE,EAAEH,EAAO,CAAEI,MAAOJ,EAAMK,YAAa,cAAe,YAAaC,SAAU,CAACL,EAAAA,KAAM,OAAQ,CAAEM,UAAW,kBAAmB,cAAe,kBAAmBD,SAAU,CAACN,EAAMQ,MAAO,OAASP,EAAAA,KAAM,OAAQ,CAAEM,UAAW,sBAAuB,cAAe,sBAAuBD,SAAU,CAACN,EAAMS,gBAAkBT,EAAMS,gBAAkB,IAAK,OAASC,EAAAA,IAAK,OAAQ,CAAEH,UAAW,kBAAmB,cAAe,kBAAmBD,SAAUN,EAAMW,WAAe"}
1
+ {"version":3,"file":"numbering.js","sources":["../../../../src/components/numbering/numbering.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nimport { styled } from '@mui/material/styles';\nimport { NumberingColors, NumberingSizes } from '../../utils/enum';\nimport { paletteLight as flowColors } from '../../design/skoda/paletteLight.theme';\n/**\n * @description SkodaFlow Numbering component.\n * @param props NumberingProps\n * @returns React Functional Component\n */\nexport const Numbering = (_a) => {\n var props = __rest(_a, []);\n return (_jsxs(NumberingStyled, Object.assign({}, props, { style: props.customStyle, \"data-testid\": \"Numbering\", children: [_jsxs(\"span\", { className: \"index-container\", \"data-testid\": \"Numbering.index\", children: [props.index, ' '] }), _jsxs(\"span\", { className: \"separator-container\", \"data-testid\": \"Numbering.separator\", children: [props.customSeparator ? props.customSeparator : '/', ' '] }), _jsx(\"span\", { className: \"total-container\", \"data-testid\": \"Numbering.total\", children: props.total })] })));\n};\n/**\n * @description Controls styling definition based on props\n */\nconst NumberingStyled = styled('div', {\n shouldForwardProp: (prop) => prop !== 'customSeparator' && prop !== 'colorTheme',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n let styles = {};\n styles = {\n fontFamily: 'SKODA Next',\n fontStyle: 'normal',\n fontWeight: '700',\n fontSize: args.size === NumberingSizes.LARGE ? '18px' : '16px',\n lineHeight: args.size === NumberingSizes.LARGE ? '28px' : '24px',\n letterSpacing: '0.02em',\n '& .index-container': {\n color: args.colorTheme === NumberingColors.DARK ? flowColors.text.primary : flowColors.onSurface.os0,\n },\n '& .separator-container': {\n color: flowColors.onSurface.os600,\n },\n '& .total-container': {\n color: flowColors.onSurface.os600,\n },\n };\n return styles;\n});\n//# sourceMappingURL=numbering.js.map"],"names":["NumberingStyled","styled","shouldForwardProp","prop","_a","args","__rest","styles","fontFamily","fontStyle","fontWeight","fontSize","size","NumberingSizes","LARGE","lineHeight","letterSpacing","color","colorTheme","NumberingColors","DARK","flowColors","text","primary","onSurface","os0","os600","props","_jsxs","Object","assign","style","customStyle","children","className","index","customSeparator","_jsx","total"],"mappings":"4LAUY,MAONA,EAAkBC,EAAMA,OAAC,MAAO,CAClCC,kBAAoBC,GAAkB,oBAATA,GAAuC,eAATA,GADvCF,EAEpBG,IACG,IAAiBC,EAAOC,EAAMA,OAACF,EAAI,CAAC,UACvC,IAAIG,EAAS,CAAA,EAkBb,OAjBAA,EAAS,CACLC,WAAY,aACZC,UAAW,SACXC,WAAY,MACZC,SAAUN,EAAKO,OAASC,EAAcA,eAACC,MAAQ,OAAS,OACxDC,WAAYV,EAAKO,OAASC,EAAcA,eAACC,MAAQ,OAAS,OAC1DE,cAAe,SACf,qBAAsB,CAClBC,MAAOZ,EAAKa,aAAeC,EAAAA,gBAAgBC,KAAOC,eAAWC,KAAKC,QAAUF,eAAWG,UAAUC,KAErG,yBAA0B,CACtBR,MAAOI,EAAAA,aAAWG,UAAUE,OAEhC,qBAAsB,CAClBT,MAAOI,EAAAA,aAAWG,UAAUE,QAG7BnB,CAAM,sBA7BSH,IACtB,IAAIuB,EAAQrB,EAAAA,OAAOF,EAAI,IACvB,OAAQwB,OAAM5B,EAAiB6B,OAAOC,OAAO,CAAE,EAAEH,EAAO,CAAEI,MAAOJ,EAAMK,YAAa,cAAe,YAAaC,SAAU,CAACL,EAAAA,KAAM,OAAQ,CAAEM,UAAW,kBAAmB,cAAe,kBAAmBD,SAAU,CAACN,EAAMQ,MAAO,OAASP,EAAAA,KAAM,OAAQ,CAAEM,UAAW,sBAAuB,cAAe,sBAAuBD,SAAU,CAACN,EAAMS,gBAAkBT,EAAMS,gBAAkB,IAAK,OAASC,EAAAA,IAAK,OAAQ,CAAEH,UAAW,kBAAmB,cAAe,kBAAmBD,SAAUN,EAAMW,WAAe"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),t=require("react/jsx-runtime"),i=require("@mui/material/Pagination"),n=require("@mui/material/PaginationItem"),o=require("@mui/material/TextField"),r=require("@mui/material/styles"),a=require("react"),s=require("../../design/skoda/palette.theme.js"),l=require("../../utils/utilities.js"),d=require("../iconButton/index.js"),u=require("../icon/icon.js");function p(e){return e&&e.__esModule?e:{default:e}}require("../icon/icon.definitions.js");var c=p(i),x=p(n),m=p(o);const f=(e,t)=>""===e||"number"==typeof e&&e-1>0&&e+1<=t||"number"==typeof parseInt(e)&&parseInt(e)>0&&parseInt(e)<=t,h=(e,i,n,o,r,a)=>t.jsxs(d.IconButton,{variant:"standard",onClick:i,disabled:n,children:["forward"===o&&!r&&a,t.jsx(u.Icon,{name:e}),"back"===o&&!r&&a]}),g=a.forwardRef(((i,n)=>{var{count:o,isDisabled:r,page:s,prevButtonLabel:d,nextButtonLabel:p,defaultPage:g,hideNextButton:j,hidePrevButton:v,hideFirstButton:B,hideLastButton:w,hideLabels:y,onValueChange:C}=i,I=e.__rest(i,["count","isDisabled","page","prevButtonLabel","nextButtonLabel","defaultPage","hideNextButton","hidePrevButton","hideFirstButton","hideLastButton","hideLabels","onValueChange"]);const L=g||1,[q,k]=a.useState(L),[P,S]=a.useState(!0),[F,M]=a.useState();a.useEffect((()=>{q&&C&&C(q)}),[q,C]),a.useEffect((()=>{P?S(!1):s&&!r&&k(s)}),[r,P,s]);const z=a.useCallback(((e,t)=>{k(t)}),[]);return t.jsxs(b,{"data-testid":"Pagination-wrapper",children:[t.jsx(c.default,Object.assign({className:"desktopView"},I,{shape:"rounded",count:o,disabled:r,page:q,hideNextButton:j,hidePrevButton:v,showFirstButton:!B,showLastButton:!w,ref:n,onChange:z,renderItem:e=>t.jsx(x.default,Object.assign({className:l.ternaryCondition(v,!1,"MuiPagination-prev",""),components:{first:()=>t.jsx(u.Icon,{name:"previous",fontSize:"small"}),last:()=>t.jsx(u.Icon,{name:"next",fontSize:"small"}),previous:()=>t.jsxs(t.Fragment,{children:[t.jsx(u.Icon,{name:"chevron-left",fontSize:"small"}),t.jsx(t.Fragment,{children:d})]}),next:()=>t.jsxs(t.Fragment,{children:[t.jsx(t.Fragment,{children:p}),t.jsx(u.Icon,{name:"chevron-right",fontSize:"small"})]})}},e))}))," ",t.jsx("div",{style:{display:"flex",flexDirection:"column"},className:"mobileView "+(r?"paginationDisabled":""),children:t.jsxs("div",{className:"mobileContainer",children:[h("chevron-previous",(()=>f(q-1,o)&&k(1)),!f(q-1,o)),h("chevron-left",(()=>f(q-1,o)&&k(q-1)),!f(q-1,o),"back",y,d),t.jsx(m.default,{className:"textFieldContainer",value:q,inputProps:{inputMode:"numeric",pattern:`[1-${o}]*`},onChange:e=>(e=>{""===e&&(M(q),k(e));const t=parseInt(e);"number"==typeof t&&f(t,o)&&(M(t),k(t))})(e.target.value),onBlur:()=>""===q&&k(F)}),h("chevron-right",(()=>f(q+1,o)&&k(q+1)),!f(q+1,o),"forward",y,p),h("chevron-next",(()=>f(q+1,o)&&k(o)),!f(q+1,o))]})})]})})),b=r.styled("div")((({theme:e})=>{let t={};const i={alignItems:"center",display:"flex",justifyContent:"center",width:"100%"};return t={[e.breakpoints.up("md")]:{"& .mobileView":{display:"none!important"}},[e.breakpoints.down("md")]:{"& .desktopView":{display:"none!important"}},"& .desktopView":{"& .MuiButton-startIcon":{marginRight:"8px",display:"inline-flex"},"& .MuiButton-endIcon":{marginLeft:"8px",display:"inline-flex"}},"& .mobileView":Object.assign(Object.assign({},i),{flexDirection:"column",flexWrap:"nowrap","& .mobileContainer":Object.assign(Object.assign({},i),{flexWrap:"nowrap"}),"& .textFieldContainer":{height:"36px",margin:"0 34px","& input, fieldset":{backgroundColor:s.flowColors.transparent.primary,border:0,borderRadius:"4px",fontSize:"16px",fontWeight:"400",height:"36px",lineHeight:"36px",minWidth:"44px",maxWidth:"50px",padding:"0 4px",textAlign:"center",color:s.flowColors.text.primary},"& fieldset":{visibility:"hidden"},"& div":{"&::before":{borderBottom:0},"&::after":{borderBottom:0}}},"& .controllerContainer":{"& .arrowLabel":{color:s.flowColors.text.primary,fontSize:"16px",fontWeight:"400",lineHeight:"16px"},"& .MuiButton-startIcon":{marginRight:"8px",display:"inline-flex"},"& .MuiButton-endIcon":{marginLeft:"8px",display:"inline-flex"},"& .MuiIcon-root":{fontSize:"16px",width:"20px",height:"20px"}},"& .counter_label":{color:s.flowColors.text.primary,fontSize:"12px",fontWeight:"400",lineHeight:"24px",marginTop:"4px"},"&.paginationDisabled":{pointerEvents:"none","& .counter_label, .MuiIcon-root,.arrowLabel, input, fieldset":{color:s.flowColors.disabled.primary}}})},t}));exports.Pagination=g;
1
+ "use strict";var e=require("tslib"),t=require("react/jsx-runtime"),i=require("@mui/material/Pagination"),n=require("@mui/material/PaginationItem"),a=require("@mui/material/TextField"),r=require("@mui/material/styles"),o=require("react"),s=require("../../design/skoda/paletteLight.theme.js"),l=require("../../utils/utilities.js"),d=require("../iconButton/index.js"),u=require("../icon/icon.js");function p(e){return e&&e.__esModule?e:{default:e}}require("../icon/icon.definitions.js");var c=p(i),x=p(n),m=p(a);const h=(e,t)=>""===e||"number"==typeof e&&e-1>0&&e+1<=t||"number"==typeof parseInt(e)&&parseInt(e)>0&&parseInt(e)<=t,g=(e,i,n,a,r,o)=>t.jsxs(d.IconButton,{variant:"standard",onClick:i,disabled:n,children:["forward"===a&&!r&&o,t.jsx(u.Icon,{name:e}),"back"===a&&!r&&o]}),f=o.forwardRef(((i,n)=>{var{count:a,isDisabled:r,page:s,prevButtonLabel:d,nextButtonLabel:p,defaultPage:f,hideNextButton:j,hidePrevButton:v,hideFirstButton:B,hideLastButton:y,hideLabels:w,onValueChange:I}=i,L=e.__rest(i,["count","isDisabled","page","prevButtonLabel","nextButtonLabel","defaultPage","hideNextButton","hidePrevButton","hideFirstButton","hideLastButton","hideLabels","onValueChange"]);const C=f||1,[q,k]=o.useState(C),[P,S]=o.useState(!0),[F,M]=o.useState();o.useEffect((()=>{q&&I&&I(q)}),[q,I]),o.useEffect((()=>{P?S(!1):s&&!r&&k(s)}),[r,P,s]);const z=o.useCallback(((e,t)=>{k(t)}),[]);return t.jsxs(b,{"data-testid":"Pagination-wrapper",children:[t.jsx(c.default,Object.assign({className:"desktopView"},L,{shape:"rounded",count:a,disabled:r,page:q,hideNextButton:j,hidePrevButton:v,showFirstButton:!B,showLastButton:!y,ref:n,onChange:z,renderItem:e=>t.jsx(x.default,Object.assign({className:l.ternaryCondition(v,!1,"MuiPagination-prev",""),components:{first:()=>t.jsx(u.Icon,{name:"previous",fontSize:"small"}),last:()=>t.jsx(u.Icon,{name:"next",fontSize:"small"}),previous:()=>t.jsxs(t.Fragment,{children:[t.jsx(u.Icon,{name:"chevron-left",fontSize:"small"}),t.jsx(t.Fragment,{children:d})]}),next:()=>t.jsxs(t.Fragment,{children:[t.jsx(t.Fragment,{children:p}),t.jsx(u.Icon,{name:"chevron-right",fontSize:"small"})]})}},e))}))," ",t.jsx("div",{style:{display:"flex",flexDirection:"column"},className:"mobileView "+(r?"paginationDisabled":""),children:t.jsxs("div",{className:"mobileContainer",children:[g("chevron-previous",(()=>h(q-1,a)&&k(1)),!h(q-1,a)),g("chevron-left",(()=>h(q-1,a)&&k(q-1)),!h(q-1,a),"back",w,d),t.jsx(m.default,{className:"textFieldContainer",value:q,inputProps:{inputMode:"numeric",pattern:`[1-${a}]*`},onChange:e=>(e=>{""===e&&(M(q),k(e));const t=parseInt(e);"number"==typeof t&&h(t,a)&&(M(t),k(t))})(e.target.value),onBlur:()=>""===q&&k(F)}),g("chevron-right",(()=>h(q+1,a)&&k(q+1)),!h(q+1,a),"forward",w,p),g("chevron-next",(()=>h(q+1,a)&&k(a)),!h(q+1,a))]})})]})})),b=r.styled("div")((({theme:e})=>{let t={};const i={alignItems:"center",display:"flex",justifyContent:"center",width:"100%"};return t={[e.breakpoints.up("md")]:{"& .mobileView":{display:"none!important"}},[e.breakpoints.down("md")]:{"& .desktopView":{display:"none!important"}},"& .desktopView":{"& .MuiButton-startIcon":{marginRight:"8px",display:"inline-flex"},"& .MuiButton-endIcon":{marginLeft:"8px",display:"inline-flex"}},"& .mobileView":Object.assign(Object.assign({},i),{flexDirection:"column",flexWrap:"nowrap","& .mobileContainer":Object.assign(Object.assign({},i),{flexWrap:"nowrap"}),"& .textFieldContainer":{height:"36px",margin:"0 34px","& input, fieldset":{backgroundColor:s.paletteLight.transparent.primary,border:0,borderRadius:"4px",fontSize:"16px",fontWeight:"400",height:"36px",lineHeight:"36px",minWidth:"44px",maxWidth:"50px",padding:"0 4px",textAlign:"center",color:s.paletteLight.text.primary},"& fieldset":{visibility:"hidden"},"& div":{"&::before":{borderBottom:0},"&::after":{borderBottom:0}}},"& .controllerContainer":{"& .arrowLabel":{color:s.paletteLight.text.primary,fontSize:"16px",fontWeight:"400",lineHeight:"16px"},"& .MuiButton-startIcon":{marginRight:"8px",display:"inline-flex"},"& .MuiButton-endIcon":{marginLeft:"8px",display:"inline-flex"},"& .MuiIcon-root":{fontSize:"16px",width:"20px",height:"20px"}},"& .counter_label":{color:s.paletteLight.text.primary,fontSize:"12px",fontWeight:"400",lineHeight:"24px",marginTop:"4px"},"&.paginationDisabled":{pointerEvents:"none","& .counter_label, .MuiIcon-root,.arrowLabel, input, fieldset":{color:s.paletteLight.disabled.primary}}})},t}));exports.Pagination=f;
2
2
  //# sourceMappingURL=pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.js","sources":["../../../../src/components/pagination/pagination.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport MuiPagination from '@mui/material/Pagination';\nimport MuiPaginationItem from '@mui/material/PaginationItem';\nimport TextField from '@mui/material/TextField';\nimport { styled } from '@mui/material/styles';\nimport { forwardRef, useCallback, useEffect, useState } from 'react';\nimport { flowColors } from '../../design/skoda/palette.theme';\nimport { ternaryCondition } from '../../utils/utilities';\nimport { IconButton } from '../iconButton';\nimport { Icon } from '../icon';\n/**\n * @description SkodaFlow Pagination component.\n * Properties are inherited from HTML div Attribetes element.\n * @param props PaginationProps\n * @returns React Functional Component\n */\nconst isPageNumberValid = (pageNumber, count) => {\n return (pageNumber === '' ||\n (typeof pageNumber === 'number' && pageNumber - 1 > 0 && pageNumber + 1 <= count) ||\n (typeof parseInt(pageNumber) === 'number' && parseInt(pageNumber) > 0 && parseInt(pageNumber) <= count));\n};\nconst mobileIconButton = (muiIcon, onClick, disabled, direction, hideLabel, label) => (_jsxs(IconButton, { variant: \"standard\", onClick: onClick, disabled: disabled, children: [direction === 'forward' && !hideLabel && label, _jsx(Icon, { name: muiIcon }), direction === 'back' && !hideLabel && label] }));\nexport const Pagination = forwardRef((_a, ref) => {\n var { count, isDisabled, page, prevButtonLabel, nextButtonLabel, defaultPage, hideNextButton, hidePrevButton, hideFirstButton, hideLastButton, hideLabels, onValueChange } = _a, props = __rest(_a, [\"count\", \"isDisabled\", \"page\", \"prevButtonLabel\", \"nextButtonLabel\", \"defaultPage\", \"hideNextButton\", \"hidePrevButton\", \"hideFirstButton\", \"hideLastButton\", \"hideLabels\", \"onValueChange\"]);\n const initialPage = defaultPage || 1;\n const [currentPageNumber, setCurrentPageNumber] = useState(initialPage);\n const [isFirstMount, setIsFirstMount] = useState(true);\n const [prevStatePageNumber, setPrevStatePageNumber] = useState();\n useEffect(() => {\n currentPageNumber && onValueChange && onValueChange(currentPageNumber);\n }, [currentPageNumber, onValueChange]);\n useEffect(() => {\n isFirstMount ? setIsFirstMount(false) : page && !isDisabled && setCurrentPageNumber(page);\n }, [isDisabled, isFirstMount, page]);\n const handleChange = useCallback((event, pageNumber) => {\n setCurrentPageNumber(pageNumber);\n }, []);\n const handleValueChange = (payload) => {\n if (payload === '') {\n setPrevStatePageNumber(currentPageNumber);\n setCurrentPageNumber(payload);\n }\n const castToNum = parseInt(payload);\n if (typeof castToNum === 'number' && isPageNumberValid(castToNum, count)) {\n setPrevStatePageNumber(castToNum);\n setCurrentPageNumber(castToNum);\n }\n };\n const mobilePagination = () => (_jsx(\"div\", { style: { display: 'flex', flexDirection: 'column' }, className: `mobileView ${isDisabled ? 'paginationDisabled' : ''}`, children: _jsxs(\"div\", { className: \"mobileContainer\", children: [mobileIconButton('chevron-previous', () => isPageNumberValid(currentPageNumber - 1, count) && setCurrentPageNumber(1), !isPageNumberValid(currentPageNumber - 1, count)), mobileIconButton('chevron-left', () => isPageNumberValid(currentPageNumber - 1, count) && setCurrentPageNumber(currentPageNumber - 1), !isPageNumberValid(currentPageNumber - 1, count), 'back', hideLabels, prevButtonLabel), _jsx(TextField, { className: \"textFieldContainer\", value: currentPageNumber, inputProps: { inputMode: 'numeric', pattern: `[1-${count}]*` }, onChange: (val) => handleValueChange(val.target.value), onBlur: () => currentPageNumber === '' && setCurrentPageNumber(prevStatePageNumber) }), mobileIconButton('chevron-right', () => isPageNumberValid(currentPageNumber + 1, count) && setCurrentPageNumber(currentPageNumber + 1), !isPageNumberValid(currentPageNumber + 1, count), 'forward', hideLabels, nextButtonLabel), mobileIconButton('chevron-next', () => isPageNumberValid(currentPageNumber + 1, count) && setCurrentPageNumber(count), !isPageNumberValid(currentPageNumber + 1, count))] }) }));\n const desktopPagination = () => (_jsx(MuiPagination, Object.assign({ className: \"desktopView\" }, props, { shape: \"rounded\", count: count, disabled: isDisabled, page: currentPageNumber, hideNextButton: hideNextButton, hidePrevButton: hidePrevButton, showFirstButton: !hideFirstButton, showLastButton: !hideLastButton, ref: ref, onChange: handleChange, renderItem: (item) => (_jsx(MuiPaginationItem, Object.assign({ className: ternaryCondition(hidePrevButton, false, 'MuiPagination-prev', ''), components: {\n first: () => _jsx(Icon, { name: \"previous\", fontSize: \"small\" }),\n last: () => _jsx(Icon, { name: \"next\", fontSize: \"small\" }),\n previous: () => (_jsxs(_Fragment, { children: [_jsx(Icon, { name: \"chevron-left\", fontSize: \"small\" }), _jsx(_Fragment, { children: prevButtonLabel })] })),\n next: () => (_jsxs(_Fragment, { children: [_jsx(_Fragment, { children: nextButtonLabel }), _jsx(Icon, { name: \"chevron-right\", fontSize: \"small\" })] })),\n } }, item))) })));\n return (_jsxs(PaginationStyled, { \"data-testid\": \"Pagination-wrapper\", children: [desktopPagination(), \" \", mobilePagination()] }));\n});\n/**\n * @description Pagination styling definition based on props\n */\nconst PaginationStyled = styled('div')(({ theme }) => {\n let style = {};\n const flexStyle = {\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'center',\n width: '100%',\n };\n style = {\n [theme.breakpoints.up('md')]: {\n '& .mobileView': {\n display: 'none!important',\n },\n },\n [theme.breakpoints.down('md')]: {\n '& .desktopView': {\n display: 'none!important',\n },\n },\n '& .desktopView': {\n '& .MuiButton-startIcon': {\n marginRight: '8px',\n display: 'inline-flex',\n },\n '& .MuiButton-endIcon': {\n marginLeft: '8px',\n display: 'inline-flex',\n },\n },\n '& .mobileView': Object.assign(Object.assign({}, flexStyle), { flexDirection: 'column', flexWrap: 'nowrap', '& .mobileContainer': Object.assign(Object.assign({}, flexStyle), { flexWrap: 'nowrap' }), '& .textFieldContainer': {\n height: '36px',\n margin: '0 34px',\n '& input, fieldset': {\n backgroundColor: flowColors.transparent.primary,\n border: 0,\n borderRadius: '4px',\n fontSize: '16px',\n fontWeight: '400',\n height: '36px',\n lineHeight: '36px',\n minWidth: '44px',\n maxWidth: '50px',\n padding: '0 4px',\n textAlign: 'center',\n color: flowColors.text.primary,\n },\n '& fieldset': {\n visibility: 'hidden',\n },\n '& div': {\n '&::before': {\n borderBottom: 0,\n },\n '&::after': {\n borderBottom: 0,\n },\n },\n }, '& .controllerContainer': {\n '& .arrowLabel': {\n color: flowColors.text.primary,\n fontSize: '16px',\n fontWeight: '400',\n lineHeight: '16px',\n },\n '& .MuiButton-startIcon': {\n marginRight: '8px',\n display: 'inline-flex',\n },\n '& .MuiButton-endIcon': {\n marginLeft: '8px',\n display: 'inline-flex',\n },\n '& .MuiIcon-root': {\n fontSize: '16px',\n width: '20px',\n height: '20px',\n },\n }, '& .counter_label': {\n color: flowColors.text.primary,\n fontSize: '12px',\n fontWeight: '400',\n lineHeight: '24px',\n marginTop: '4px',\n }, '&.paginationDisabled': {\n pointerEvents: 'none',\n '& .counter_label, .MuiIcon-root,.arrowLabel, input, fieldset': {\n color: flowColors.disabled.primary,\n },\n } }),\n };\n return style;\n});\n//# sourceMappingURL=pagination.js.map"],"names":["isPageNumberValid","pageNumber","count","parseInt","mobileIconButton","muiIcon","onClick","disabled","direction","hideLabel","label","_jsxs","jsxs","IconButton","variant","children","_jsx","jsx","Icon","name","Pagination","forwardRef","_a","ref","isDisabled","page","prevButtonLabel","nextButtonLabel","defaultPage","hideNextButton","hidePrevButton","hideFirstButton","hideLastButton","hideLabels","onValueChange","props","__rest","initialPage","currentPageNumber","setCurrentPageNumber","useState","isFirstMount","setIsFirstMount","prevStatePageNumber","setPrevStatePageNumber","useEffect","handleChange","useCallback","event","PaginationStyled","MuiPagination","Object","assign","className","shape","showFirstButton","showLastButton","onChange","renderItem","item","MuiPaginationItem","default","ternaryCondition","components","first","fontSize","last","previous","_Fragment","Fragment","next","style","display","flexDirection","TextField","value","inputProps","inputMode","pattern","val","payload","castToNum","handleValueChange","target","onBlur","styled","theme","flexStyle","alignItems","justifyContent","width","breakpoints","up","down","marginRight","marginLeft","flexWrap","height","margin","backgroundColor","flowColors","transparent","primary","border","borderRadius","fontWeight","lineHeight","minWidth","maxWidth","pad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AsB7C,OAAOC,OAAOD,OAAOC,OAAO,CAAE,EAAEmC,GAAY,CAAES,SAAU,WAAa,wBAAyB,CACxNC,OAAQ,OACRC,OAAQ,SACR,oBAAqB,CACjBC,gBAAiBC,EAAAA,WAAWC,YAAYC,QACxCC,OAAQ,EACRC,aAAc,MACdvC,SAAU,OACVwC,WAAY,MACZR,OAAQ,OACRS,WAAY,OACZC,SAAU,OACVC,SAAU,OACVC,QAAS,QACTC,UAAW,SACXC,MAAOX,EAAAA,WAAWY,KAAKV,SAE3B,aAAc,CACVW,WAAY,UAEhB,QAAS,CACL,YAAa,CACTC,aAAc,GAElB,WAAY,CACRA,aAAc,KAGvB,yBAA0B,CACzB,gBAAiB,CACbH,MAAOX,EAAAA,WAAWY,KAAKV,QACvBrC,SAAU,OACVwC,WAAY,MACZC,WAAY,QAEhB,yBAA0B,CACtBZ,YAAa,MACbtB,QAAS,eAEb,uBAAwB,CACpBuB,WAAY,MACZvB,QAAS,eAEb,kBAAmB,CACfP,SAAU,OACVyB,MAAO,OACPO,OAAQ,SAEb,mBAAoB,CACnBc,MAAOX,EAAAA,WAAWY,KAAKV,QACvBrC,SAAU,OACVwC,WAAY,MACZC,WAAY,OACZS,UAAW,OACZ,uBAAwB,CACvBC,cAAe,OACf,+DAAgE,CAC5DL,MAAOX,EAAAA,WAAW7F,SAAS+F,aAIpC/B,CAAK"}
1
+ {"version":3,"file":"pagination.js","sources":["../../../../src/components/pagination/pagination.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport MuiPagination from '@mui/material/Pagination';\nimport MuiPaginationItem from '@mui/material/PaginationItem';\nimport TextField from '@mui/material/TextField';\nimport { styled } from '@mui/material/styles';\nimport { forwardRef, useCallback, useEffect, useState } from 'react';\nimport { paletteLight as flowColors } from '../../design/skoda/paletteLight.theme';\nimport { ternaryCondition } from '../../utils/utilities';\nimport { IconButton } from '../iconButton';\nimport { Icon } from '../icon';\n/**\n * @description SkodaFlow Pagination component.\n * Properties are inherited from HTML div Attribetes element.\n * @param props PaginationProps\n * @returns React Functional Component\n */\nconst isPageNumberValid = (pageNumber, count) => {\n return (pageNumber === '' ||\n (typeof pageNumber === 'number' && pageNumber - 1 > 0 && pageNumber + 1 <= count) ||\n (typeof parseInt(pageNumber) === 'number' && parseInt(pageNumber) > 0 && parseInt(pageNumber) <= count));\n};\nconst mobileIconButton = (muiIcon, onClick, disabled, direction, hideLabel, label) => (_jsxs(IconButton, { variant: \"standard\", onClick: onClick, disabled: disabled, children: [direction === 'forward' && !hideLabel && label, _jsx(Icon, { name: muiIcon }), direction === 'back' && !hideLabel && label] }));\nexport const Pagination = forwardRef((_a, ref) => {\n var { count, isDisabled, page, prevButtonLabel, nextButtonLabel, defaultPage, hideNextButton, hidePrevButton, hideFirstButton, hideLastButton, hideLabels, onValueChange } = _a, props = __rest(_a, [\"count\", \"isDisabled\", \"page\", \"prevButtonLabel\", \"nextButtonLabel\", \"defaultPage\", \"hideNextButton\", \"hidePrevButton\", \"hideFirstButton\", \"hideLastButton\", \"hideLabels\", \"onValueChange\"]);\n const initialPage = defaultPage || 1;\n const [currentPageNumber, setCurrentPageNumber] = useState(initialPage);\n const [isFirstMount, setIsFirstMount] = useState(true);\n const [prevStatePageNumber, setPrevStatePageNumber] = useState();\n useEffect(() => {\n currentPageNumber && onValueChange && onValueChange(currentPageNumber);\n }, [currentPageNumber, onValueChange]);\n useEffect(() => {\n isFirstMount ? setIsFirstMount(false) : page && !isDisabled && setCurrentPageNumber(page);\n }, [isDisabled, isFirstMount, page]);\n const handleChange = useCallback((event, pageNumber) => {\n setCurrentPageNumber(pageNumber);\n }, []);\n const handleValueChange = (payload) => {\n if (payload === '') {\n setPrevStatePageNumber(currentPageNumber);\n setCurrentPageNumber(payload);\n }\n const castToNum = parseInt(payload);\n if (typeof castToNum === 'number' && isPageNumberValid(castToNum, count)) {\n setPrevStatePageNumber(castToNum);\n setCurrentPageNumber(castToNum);\n }\n };\n const mobilePagination = () => (_jsx(\"div\", { style: { display: 'flex', flexDirection: 'column' }, className: `mobileView ${isDisabled ? 'paginationDisabled' : ''}`, children: _jsxs(\"div\", { className: \"mobileContainer\", children: [mobileIconButton('chevron-previous', () => isPageNumberValid(currentPageNumber - 1, count) && setCurrentPageNumber(1), !isPageNumberValid(currentPageNumber - 1, count)), mobileIconButton('chevron-left', () => isPageNumberValid(currentPageNumber - 1, count) && setCurrentPageNumber(currentPageNumber - 1), !isPageNumberValid(currentPageNumber - 1, count), 'back', hideLabels, prevButtonLabel), _jsx(TextField, { className: \"textFieldContainer\", value: currentPageNumber, inputProps: { inputMode: 'numeric', pattern: `[1-${count}]*` }, onChange: (val) => handleValueChange(val.target.value), onBlur: () => currentPageNumber === '' && setCurrentPageNumber(prevStatePageNumber) }), mobileIconButton('chevron-right', () => isPageNumberValid(currentPageNumber + 1, count) && setCurrentPageNumber(currentPageNumber + 1), !isPageNumberValid(currentPageNumber + 1, count), 'forward', hideLabels, nextButtonLabel), mobileIconButton('chevron-next', () => isPageNumberValid(currentPageNumber + 1, count) && setCurrentPageNumber(count), !isPageNumberValid(currentPageNumber + 1, count))] }) }));\n const desktopPagination = () => (_jsx(MuiPagination, Object.assign({ className: \"desktopView\" }, props, { shape: \"rounded\", count: count, disabled: isDisabled, page: currentPageNumber, hideNextButton: hideNextButton, hidePrevButton: hidePrevButton, showFirstButton: !hideFirstButton, showLastButton: !hideLastButton, ref: ref, onChange: handleChange, renderItem: (item) => (_jsx(MuiPaginationItem, Object.assign({ className: ternaryCondition(hidePrevButton, false, 'MuiPagination-prev', ''), components: {\n first: () => _jsx(Icon, { name: \"previous\", fontSize: \"small\" }),\n last: () => _jsx(Icon, { name: \"next\", fontSize: \"small\" }),\n previous: () => (_jsxs(_Fragment, { children: [_jsx(Icon, { name: \"chevron-left\", fontSize: \"small\" }), _jsx(_Fragment, { children: prevButtonLabel })] })),\n next: () => (_jsxs(_Fragment, { children: [_jsx(_Fragment, { children: nextButtonLabel }), _jsx(Icon, { name: \"chevron-right\", fontSize: \"small\" })] })),\n } }, item))) })));\n return (_jsxs(PaginationStyled, { \"data-testid\": \"Pagination-wrapper\", children: [desktopPagination(), \" \", mobilePagination()] }));\n});\n/**\n * @description Pagination styling definition based on props\n */\nconst PaginationStyled = styled('div')(({ theme }) => {\n let style = {};\n const flexStyle = {\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'center',\n width: '100%',\n };\n style = {\n [theme.breakpoints.up('md')]: {\n '& .mobileView': {\n display: 'none!important',\n },\n },\n [theme.breakpoints.down('md')]: {\n '& .desktopView': {\n display: 'none!important',\n },\n },\n '& .desktopView': {\n '& .MuiButton-startIcon': {\n marginRight: '8px',\n display: 'inline-flex',\n },\n '& .MuiButton-endIcon': {\n marginLeft: '8px',\n display: 'inline-flex',\n },\n },\n '& .mobileView': Object.assign(Object.assign({}, flexStyle), { flexDirection: 'column', flexWrap: 'nowrap', '& .mobileContainer': Object.assign(Object.assign({}, flexStyle), { flexWrap: 'nowrap' }), '& .textFieldContainer': {\n height: '36px',\n margin: '0 34px',\n '& input, fieldset': {\n backgroundColor: flowColors.transparent.primary,\n border: 0,\n borderRadius: '4px',\n fontSize: '16px',\n fontWeight: '400',\n height: '36px',\n lineHeight: '36px',\n minWidth: '44px',\n maxWidth: '50px',\n padding: '0 4px',\n textAlign: 'center',\n color: flowColors.text.primary,\n },\n '& fieldset': {\n visibility: 'hidden',\n },\n '& div': {\n '&::before': {\n borderBottom: 0,\n },\n '&::after': {\n borderBottom: 0,\n },\n },\n }, '& .controllerContainer': {\n '& .arrowLabel': {\n color: flowColors.text.primary,\n fontSize: '16px',\n fontWeight: '400',\n lineHeight: '16px',\n },\n '& .MuiButton-startIcon': {\n marginRight: '8px',\n display: 'inline-flex',\n },\n '& .MuiButton-endIcon': {\n marginLeft: '8px',\n display: 'inline-flex',\n },\n '& .MuiIcon-root': {\n fontSize: '16px',\n width: '20px',\n height: '20px',\n },\n }, '& .counter_label': {\n color: flowColors.text.primary,\n fontSize: '12px',\n fontWeight: '400',\n lineHeight: '24px',\n marginTop: '4px',\n }, '&.paginationDisabled': {\n pointerEvents: 'none',\n '& .counter_label, .MuiIcon-root,.arrowLabel, input, fieldset': {\n color: flowColors.disabled.primary,\n },\n } }),\n };\n return style;\n});\n//# sourceMappingURL=pagination.js.map"],"names":["isPageNumberValid","pageNumber","count","parseInt","mobileIconButton","muiIcon","onClick","disabled","direction","hideLabel","label","_jsxs","jsxs","IconButton","variant","children","_jsx","jsx","Icon","name","Pagination","forwardRef","_a","ref","isDisabled","page","prevButtonLabel","nextButtonLabel","defaultPage","hideNextButton","hidePrevButton","hideFirstButton","hideLastButton","hideLabels","onValueChange","props","__rest","initialPage","currentPageNumber","setCurrentPageNumber","useState","isFirstMount","setIsFirstMount","prevStatePageNumber","setPrevStatePageNumber","useEffect","handleChange","useCallback","event","PaginationStyled","MuiPagination","Object","assign","className","shape","showFirstButton","showLastButton","onChange","renderItem","item","MuiPaginationItem","default","ternaryCondition","components","first","fontSize","last","previous","_Fragment","Fragment","next","style","display","flexDirection","TextField","value","inputProps","inputMode","pattern","val","payload","castToNum","handleValueChange","target","onBlur","styled","theme","flexStyle","alignItems","justifyContent","width","breakpoints","up","down","marginRight","marginLeft","flexWrap","height","margin","backgroundColor","flowColors","transparent","primary","border","borderRadius","fontWeight","lineHeight","minWidth","maxWidth","padding","textAlign","color","text","visibility","borderBottom","marginTop","pointerEvents"],"mappings":"6fAiBA,MAAMA,EAAoB,CAACC,EAAYC,IACZ,KAAfD,GACmB,iBAAfA,GAA2BA,EAAa,EAAI,GAAKA,EAAa,GAAKC,GAC1C,iBAAzBC,SAASF,IAA4BE,SAASF,GAAc,GAAKE,SAASF,IAAeC,EAEnGE,EAAmB,CAACC,EAASC,EAASC,EAAUC,EAAWC,EAAWC,IAAWC,EAAKC,KAACC,EAAUA,WAAE,CAAEC,QAAS,WAAYR,QAASA,EAASC,SAAUA,EAAUQ,SAAU,CAAe,Y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AAa,CACTC,aAAc,GAElB,WAAY,CACRA,aAAc,KAGvB,yBAA0B,CACzB,gBAAiB,CACbH,MAAOX,EAAAA,aAAWY,KAAKV,QACvBrC,SAAU,OACVwC,WAAY,MACZC,WAAY,QAEhB,yBAA0B,CACtBZ,YAAa,MACbtB,QAAS,eAEb,uBAAwB,CACpBuB,WAAY,MACZvB,QAAS,eAEb,kBAAmB,CACfP,SAAU,OACVyB,MAAO,OACPO,OAAQ,SAEb,mBAAoB,CACnBc,MAAOX,EAAAA,aAAWY,KAAKV,QACvBrC,SAAU,OACVwC,WAAY,MACZC,WAAY,OACZS,UAAW,OACZ,uBAAwB,CACvBC,cAAe,OACf,+DAAgE,CAC5DL,MAAOX,EAAAA,aAAW7F,SAAS+F,aAIpC/B,CAAK"}
@@ -1,2 +1,2 @@
1
- "use strict";var o=require("tslib"),t=require("@mui/material/FormControl"),e=require("@mui/material/styles"),i=require("../../design/skoda/palette.theme.js");function r(o){return o&&o.__esModule?o:{default:o}}var a=r(t);const n=e.styled(a.default,{shouldForwardProp:o=>"helpText"!==o&&"hideBg"!==o&&"hasError"!==o&&"hovered"!==o&&"value"!==o&&"staticLabel"!==o})((t=>{var{theme:e}=t,r=o.__rest(t,["theme"]);let a={};const n=(o=>({fontSize:"24px !important",position:"absolute",flexShrink:0,pointerEvents:"none",display:"block",color:o.focused||o.value||o.hovered?"inherit":"rgba(0, 0, 0, 0.54)"}))(r),s={paddingBottom:r.staticLabel?"16px":"6px",paddingTop:r.staticLabel?"16px":"26px"};a={height:"56px",minWidth:"200px !important",background:i.flowColors.transparent.primary,borderRadius:"4px 4px 0px 0px",borderBottom:r.focused?`2px solid ${i.flowColors.brand.primary}`:r.value?`1px solid ${i.flowColors.onSurface.os900}`:`1px solid ${i.flowColors.onSurface.os500}`,"& > .MuiIcon-root":Object.assign(Object.assign({},n),{width:"50px",top:"16px"}),"& > .MuiFilledInput-root":{position:"relative",height:"56px"},"& > label.MuiInputLabel-root":{paddingLeft:0,fontWeight:400,marginLeft:"0px",transform:"translate(12, 18px) scale(1)",color:r.hovered||r.focused?i.flowColors.text.primary:i.flowColors.onSurface.os500,maxWidth:"calc(100% - 56px)","&:hover":{color:i.flowColors.text.primary}},"& > label.MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(14px, 8px) scale(0.75)",paddingLeft:0,fontWeight:400,color:r.focused?i.flowColors.brand.primary:i.flowColors.onSurface.os500},"& > label.MuiInputLabel-root.MuiInputLabel-shrink.Mui-disabled":{color:i.flowColors.disabled.primary},"& > .MuiInputBase-root":{background:"transparent",width:"100%",paddingLeft:"1px",paddingTop:"0px","&::after":{display:"none"},"&::before":{display:"none"},"& > div.MuiSelect-select":Object.assign(Object.assign({},s),{fontSize:"16px",lineHeight:"24px",color:i.flowColors.onSurface.os900,fontWeight:"500",paddingRight:"50px",overflow:"hidden",textOverflow:"ellipsis",width:"100%",boxSizing:"content-box!important","&:focus":{background:"transparent"},"& > div.MuiListItemText-root":{marginTop:0}}),"& > .MuiIcon-root":Object.assign(Object.assign({},n),{right:"15.5px",width:"24px",top:"19px"})}};const l=a["& > label.MuiInputLabel-root"];if(r.icon&&(a=Object.assign(Object.assign({},a),{"& > label.MuiInputLabel-root":Object.assign(Object.assign({},l),{paddingLeft:"40px"}),"& > label.MuiInputLabel-root.MuiInputLabel-shrink":Object.assign(Object.assign({},a["& > label.MuiInputLabel-root.MuiInputLabel-shrink"]),{transform:"translate(24px, 8px) scale(0.75)",paddingLeft:"40px"}),"& > .MuiInputBase-root":{background:"transparent",width:"100%",paddingLeft:"1px",paddingTop:"0px","& > div.MuiSelect-select":Object.assign(Object.assign({},s),{fontSize:"16px",lineHeight:"24px",color:i.flowColors.onSurface.os900,fontWeight:"500",paddingRight:"56px",paddingLeft:"52px",overflow:"hidden",textOverflow:"ellipsis",width:"100%",boxSizing:"content-box!important","&:focus":{background:"transparent"},"& > div.MuiListItemText-root":{marginTop:"14px"}}),"&::after":{display:"none"},"&::before":{display:"none"},"& > .MuiIcon-root":Object.assign(Object.assign({},n),{right:"12.5px",width:"24px",top:"19px","&:hovered":{}})}})),r.disabled&&(l.color=i.flowColors.disabled.primary,a=Object.assign(Object.assign({},a),{borderBottom:`1px solid ${i.flowColors.disabled.primary}`,"& > .MuiIcon-root":Object.assign(Object.assign({},n),{width:"50px",height:"56px",display:"inline-flex",top:"0",alignItems:"center",justifyContent:"center",paddingBottom:"8px",color:e.palette.disabled.primary}),"& > .MuiInputBase-root":Object.assign(Object.assign({},a["& > .MuiInputBase-root"]),{"& > .MuiIcon-root":Object.assign(Object.assign({},n),{right:"12.5px",top:"19px",color:e.palette.disabled.primary})})})),r.error){const o=r.focused||r.hovered?e.palette.alert.main:e.palette.onSurface.os500;l.color=o,a=Object.assign(Object.assign({},a),{borderBottom:`2px solid ${e.palette.alert.main}`,"& > label.MuiInputLabel-root.MuiInputLabel-shrink":Object.assign(Object.assign({},a["& > label.MuiInputLabel-root.MuiInputLabel-shrink"]),{color:o})})}return a}));exports.FormControlSelectStyled=n;
1
+ "use strict";var t=require("tslib"),e=require("@mui/material/FormControl"),i=require("@mui/material/styles"),o=require("../../design/skoda/paletteLight.theme.js");function a(t){return t&&t.__esModule?t:{default:t}}var r=a(e);const n=i.styled(r.default,{shouldForwardProp:t=>"helpText"!==t&&"hideBg"!==t&&"hasError"!==t&&"hovered"!==t&&"value"!==t&&"staticLabel"!==t})((e=>{var{theme:i}=e,a=t.__rest(e,["theme"]);let r={};const n=(t=>({fontSize:"24px !important",position:"absolute",flexShrink:0,pointerEvents:"none",display:"block",color:t.focused||t.value||t.hovered?"inherit":"rgba(0, 0, 0, 0.54)"}))(a),p={paddingBottom:a.staticLabel?"16px":"6px",paddingTop:a.staticLabel?"16px":"26px"};r={height:"56px",minWidth:"200px !important",background:o.paletteLight.transparent.primary,borderRadius:"4px 4px 0px 0px",borderBottom:a.focused?`2px solid ${o.paletteLight.brand.primary}`:a.value?`1px solid ${o.paletteLight.onSurface.os900}`:`1px solid ${o.paletteLight.onSurface.os500}`,"& > .MuiIcon-root":Object.assign(Object.assign({},n),{width:"50px",top:"16px"}),"& > .MuiFilledInput-root":{position:"relative",height:"56px"},"& > label.MuiInputLabel-root":{paddingLeft:0,fontWeight:400,marginLeft:"0px",transform:"translate(12, 18px) scale(1)",color:a.hovered||a.focused?o.paletteLight.text.primary:o.paletteLight.onSurface.os500,maxWidth:"calc(100% - 56px)","&:hover":{color:o.paletteLight.text.primary}},"& > label.MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(14px, 8px) scale(0.75)",paddingLeft:0,fontWeight:400,color:a.focused?o.paletteLight.brand.primary:o.paletteLight.onSurface.os500},"& > label.MuiInputLabel-root.MuiInputLabel-shrink.Mui-disabled":{color:o.paletteLight.disabled.primary},"& > .MuiInputBase-root":{background:"transparent",width:"100%",paddingLeft:"1px",paddingTop:"0px","&::after":{display:"none"},"&::before":{display:"none"},"& > div.MuiSelect-select":Object.assign(Object.assign({},p),{fontSize:"16px",lineHeight:"24px",color:o.paletteLight.onSurface.os900,fontWeight:"500",paddingRight:"50px",overflow:"hidden",textOverflow:"ellipsis",width:"100%",boxSizing:"content-box!important","&:focus":{background:"transparent"},"& > div.MuiListItemText-root":{marginTop:0}}),"& > .MuiIcon-root":Object.assign(Object.assign({},n),{right:"15.5px",width:"24px",top:"19px"})}};const s=r["& > label.MuiInputLabel-root"];if(a.icon&&(r=Object.assign(Object.assign({},r),{"& > label.MuiInputLabel-root":Object.assign(Object.assign({},s),{paddingLeft:"40px"}),"& > label.MuiInputLabel-root.MuiInputLabel-shrink":Object.assign(Object.assign({},r["& > label.MuiInputLabel-root.MuiInputLabel-shrink"]),{transform:"translate(24px, 8px) scale(0.75)",paddingLeft:"40px"}),"& > .MuiInputBase-root":{background:"transparent",width:"100%",paddingLeft:"1px",paddingTop:"0px","& > div.MuiSelect-select":Object.assign(Object.assign({},p),{fontSize:"16px",lineHeight:"24px",color:o.paletteLight.onSurface.os900,fontWeight:"500",paddingRight:"56px",paddingLeft:"52px",overflow:"hidden",textOverflow:"ellipsis",width:"100%",boxSizing:"content-box!important","&:focus":{background:"transparent"},"& > div.MuiListItemText-root":{marginTop:"14px"}}),"&::after":{display:"none"},"&::before":{display:"none"},"& > .MuiIcon-root":Object.assign(Object.assign({},n),{right:"12.5px",width:"24px",top:"19px","&:hovered":{}})}})),a.disabled&&(s.color=o.paletteLight.disabled.primary,r=Object.assign(Object.assign({},r),{borderBottom:`1px solid ${o.paletteLight.disabled.primary}`,"& > .MuiIcon-root":Object.assign(Object.assign({},n),{width:"50px",height:"56px",display:"inline-flex",top:"0",alignItems:"center",justifyContent:"center",paddingBottom:"8px",color:i.palette.disabled.primary}),"& > .MuiInputBase-root":Object.assign(Object.assign({},r["& > .MuiInputBase-root"]),{"& > .MuiIcon-root":Object.assign(Object.assign({},n),{right:"12.5px",top:"19px",color:i.palette.disabled.primary})})})),a.error){const t=a.focused||a.hovered?i.palette.alert.main:i.palette.onSurface.os500;s.color=t,r=Object.assign(Object.assign({},r),{borderBottom:`2px solid ${i.palette.alert.main}`,"& > label.MuiInputLabel-root.MuiInputLabel-shrink":Object.assign(Object.assign({},r["& > label.MuiInputLabel-root.MuiInputLabel-shrink"]),{color:t})})}return r}));exports.FormControlSelectStyled=n;
2
2
  //# sourceMappingURL=formControlSelectStyled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formControlSelectStyled.js","sources":["../../../../src/components/selectInput/formControlSelectStyled.ts"],"sourcesContent":["import { __rest } from \"tslib\";\nimport MuiFormControl from '@mui/material/FormControl';\nimport { styled } from '@mui/material/styles';\nimport { flowColors } from '../../design/skoda/palette.theme';\n/**\n * @description SelectInput styling definition based on props\n */\nconst handleStyleIcon = (props) => {\n return {\n fontSize: '24px !important',\n position: 'absolute',\n flexShrink: 0,\n pointerEvents: 'none',\n display: 'block',\n color: props.focused || props.value || props.hovered ? 'inherit' : 'rgba(0, 0, 0, 0.54)',\n };\n};\nexport const FormControlSelectStyled = styled(MuiFormControl, {\n shouldForwardProp: (prop) => prop !== 'helpText' &&\n prop !== 'hideBg' &&\n prop !== 'hasError' &&\n prop !== 'hovered' &&\n prop !== 'value' &&\n prop !== 'staticLabel',\n})((_a) => {\n var { theme } = _a, props = __rest(_a, [\"theme\"]);\n let styles = {};\n const styleIcon = handleStyleIcon(props);\n const styleSelect = {\n paddingBottom: props.staticLabel ? '16px' : '6px',\n paddingTop: props.staticLabel ? '16px' : '26px',\n };\n styles = {\n height: '56px',\n minWidth: '200px !important',\n background: flowColors.transparent.primary,\n borderRadius: '4px 4px 0px 0px',\n borderBottom: props.focused\n ? `2px solid ${flowColors.brand.primary}`\n : props.value\n ? `1px solid ${flowColors.onSurface.os900}`\n : `1px solid ${flowColors.onSurface.os500}`,\n '& > .MuiIcon-root': Object.assign(Object.assign({}, styleIcon), { width: '50px', top: '16px' }),\n '& > .MuiFilledInput-root': {\n position: 'relative',\n height: '56px',\n },\n '& > label.MuiInputLabel-root': {\n paddingLeft: 0,\n fontWeight: 400,\n marginLeft: '0px',\n transform: 'translate(12, 18px) scale(1)',\n color: props.hovered || props.focused ? flowColors.text.primary : flowColors.onSurface.os500,\n maxWidth: 'calc(100% - 56px)',\n '&:hover': {\n color: flowColors.text.primary,\n },\n },\n '& > label.MuiInputLabel-root.MuiInputLabel-shrink': {\n transform: 'translate(14px, 8px) scale(0.75)',\n paddingLeft: 0,\n fontWeight: 400,\n color: props.focused ? flowColors.brand.primary : flowColors.onSurface.os500,\n },\n '& > label.MuiInputLabel-root.MuiInputLabel-shrink.Mui-disabled': {\n color: flowColors.disabled.primary,\n },\n '& > .MuiInputBase-root': {\n background: 'transparent',\n width: '100%',\n paddingLeft: '1px',\n paddingTop: '0px',\n '&::after': {\n display: 'none',\n },\n '&::before': {\n display: 'none',\n },\n '& > div.MuiSelect-select': Object.assign(Object.assign({}, styleSelect), { fontSize: '16px', lineHeight: '24px', color: flowColors.onSurface.os900, fontWeight: '500', paddingRight: '50px', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', boxSizing: 'content-box!important', '&:focus': {\n background: 'transparent',\n }, '& > div.MuiListItemText-root': {\n marginTop: 0,\n } }),\n '& > .MuiIcon-root': Object.assign(Object.assign({}, styleIcon), { right: '15.5px', width: '24px', top: '19px' }),\n },\n };\n const labelStyle = styles['& > label.MuiInputLabel-root'];\n if (props.icon) {\n styles = Object.assign(Object.assign({}, styles), { '& > label.MuiInputLabel-root': Object.assign(Object.assign({}, labelStyle), { paddingLeft: '40px' }), '& > label.MuiInputLabel-root.MuiInputLabel-shrink': Object.assign(Object.assign({}, styles['& > label.MuiInputLabel-root.MuiInputLabel-shrink']), { transform: 'translate(24px, 8px) scale(0.75)', paddingLeft: '40px' }), '& > .MuiInputBase-root': {\n background: 'transparent',\n width: '100%',\n paddingLeft: '1px',\n paddingTop: '0px',\n '& > div.MuiSelect-select': Object.assign(Object.assign({}, styleSelect), { fontSize: '16px', lineHeight: '24px', color: flowColors.onSurface.os900, fontWeight: '500', paddingRight: '56px', paddingLeft: '52px', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', boxSizing: 'content-box!important', '&:focus': {\n background: 'transparent',\n }, '& > div.MuiListItemText-root': {\n marginTop: '14px',\n } }),\n '&::after': {\n display: 'none',\n },\n '&::before': {\n display: 'none',\n },\n '& > .MuiIcon-root': Object.assign(Object.assign({}, styleIcon), { right: '12.5px', width: '24px', top: '19px', '&:hovered': {} }),\n } });\n }\n if (props.disabled) {\n labelStyle.color = flowColors.disabled.primary;\n styles = Object.assign(Object.assign({}, styles), { borderBottom: `1px solid ${flowColors.disabled.primary}`, '& > .MuiIcon-root': Object.assign(Object.assign({}, styleIcon), { width: '50px', height: '56px', display: 'inline-flex', top: '0', alignItems: 'center', justifyContent: 'center', paddingBottom: '8px', color: theme.palette.disabled.primary }), '& > .MuiInputBase-root': Object.assign(Object.assign({}, styles['& > .MuiInputBase-root']), { '& > .MuiIcon-root': Object.assign(Object.assign({}, styleIcon), { right: '12.5px', top: '19px', color: theme.palette.disabled.primary }) }) });\n }\n if (props.error) {\n const errorColor = props.focused || props.hovered ? theme.palette.alert['main'] : theme.palette.onSurface.os500;\n labelStyle.color = errorColor;\n styles = Object.assign(Object.assign({}, styles), { borderBottom: `2px solid ${theme.palette.alert['main']}`, '& > label.MuiInputLabel-root.MuiInputLabel-shrink': Object.assign(Object.assign({}, styles['& > label.MuiInputLabel-root.MuiInputLabel-shrink']), { color: errorColor }) });\n }\n return styles;\n});\n//# sourceMappingURL=formControlSelectStyled.js.map"],"names":["FormControlSelectStyled","styled","MuiFormControl","shouldForwardProp","prop","_a","theme","props","__rest","styles","styleIcon","fontSize","position","flexShrink","pointerEvents","display","color","focused","value","hovered","handleStyleIcon","styleSelect","paddingBottom","staticLabel","paddingTop","height","minWidth","background","flowColors","transparent","primary","borderRadius","borderBottom","brand","onSurface","os900","os500","Object","assign","width","top","paddingLeft","fontWeight","marginLeft","transform","text","maxWidth","disabled","lineHeight","paddingRight","overflow","textOverflow","boxSizing","marginTop","right","labelStyle","icon","alignItems","justifyContent","palette","error","errorColor","alert"],"mappings":"4NAOA,MAUaA,EAA0BC,EAAMA,OAACC,UAAgB,CAC1DC,kBAAoBC,GAAkB,aAATA,GAChB,WAATA,GACS,aAATA,GACS,YAATA,GACS,UAATA,GACS,gBAATA,GAN+BH,EAOnCI,IACA,IAAIC,MAAEA,GAAUD,EAAIE,EAAQC,EAAAA,OAAOH,EAAI,CAAC,UACxC,IAAII,EAAS,CAAA,EACb,MAAMC,EApBc,CAACH,IACd,CACHI,SAAU,kBACVC,SAAU,WACVC,WAAY,EACZC,cAAe,OACfC,QAAS,QACTC,MAAOT,EAAMU,SAAWV,EAAMW,OAASX,EAAMY,QAAU,UAAY,wBAarDC,CAAgBb,GAC5Bc,EAAc,CAChBC,cAAef,EAAMgB,YAAc,OAAS,MAC5CC,WAAYjB,EAAMgB,YAAc,OAAS,QAE7Cd,EAAS,CACLgB,OAAQ,OACRC,SAAU,mBACVC,WAAYC,EAAAA,WAAWC,YAAYC,QACnCC,aAAc,kBACdC,aAAczB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AY,CAAE4C,MAAO,SAAUd,IAAK,OAAQxB,MAAOV,EAAMqD,QAAQZ,SAASjB,eAEhkBvB,EAAMqD,MAAO,CACb,MAAMC,EAAatD,EAAMU,SAAWV,EAAMY,QAAUb,EAAMqD,QAAQG,MAAY,KAAIxD,EAAMqD,QAAQzB,UAAUE,MAC1GmB,EAAWvC,MAAQ6C,EACnBpD,EAAS4B,OAAOC,OAAOD,OAAOC,OAAO,CAAA,EAAI7B,GAAS,CAAEuB,aAAc,aAAa1B,EAAMqD,QAAQG,MAAY,OAAK,oDAAqDzB,OAAOC,OAAOD,OAAOC,OAAO,CAAE,EAAE7B,EAAO,sDAAuD,CAAEO,MAAO6C,KAC7Q,CACD,OAAOpD,CAAM"}
1
+ {"version":3,"file":"formControlSelectStyled.js","sources":["../../../../src/components/selectInput/formControlSelectStyled.ts"],"sourcesContent":["import { __rest } from \"tslib\";\nimport MuiFormControl from '@mui/material/FormControl';\nimport { styled } from '@mui/material/styles';\nimport { paletteLight as flowColors } from '../../design/skoda/paletteLight.theme';\n/**\n * @description SelectInput styling definition based on props\n */\nconst handleStyleIcon = (props) => {\n return {\n fontSize: '24px !important',\n position: 'absolute',\n flexShrink: 0,\n pointerEvents: 'none',\n display: 'block',\n color: props.focused || props.value || props.hovered ? 'inherit' : 'rgba(0, 0, 0, 0.54)',\n };\n};\nexport const FormControlSelectStyled = styled(MuiFormControl, {\n shouldForwardProp: (prop) => prop !== 'helpText' &&\n prop !== 'hideBg' &&\n prop !== 'hasError' &&\n prop !== 'hovered' &&\n prop !== 'value' &&\n prop !== 'staticLabel',\n})((_a) => {\n var { theme } = _a, props = __rest(_a, [\"theme\"]);\n let styles = {};\n const styleIcon = handleStyleIcon(props);\n const styleSelect = {\n paddingBottom: props.staticLabel ? '16px' : '6px',\n paddingTop: props.staticLabel ? '16px' : '26px',\n };\n styles = {\n height: '56px',\n minWidth: '200px !important',\n background: flowColors.transparent.primary,\n borderRadius: '4px 4px 0px 0px',\n borderBottom: props.focused\n ? `2px solid ${flowColors.brand.primary}`\n : props.value\n ? `1px solid ${flowColors.onSurface.os900}`\n : `1px solid ${flowColors.onSurface.os500}`,\n '& > .MuiIcon-root': Object.assign(Object.assign({}, styleIcon), { width: '50px', top: '16px' }),\n '& > .MuiFilledInput-root': {\n position: 'relative',\n height: '56px',\n },\n '& > label.MuiInputLabel-root': {\n paddingLeft: 0,\n fontWeight: 400,\n marginLeft: '0px',\n transform: 'translate(12, 18px) scale(1)',\n color: props.hovered || props.focused ? flowColors.text.primary : flowColors.onSurface.os500,\n maxWidth: 'calc(100% - 56px)',\n '&:hover': {\n color: flowColors.text.primary,\n },\n },\n '& > label.MuiInputLabel-root.MuiInputLabel-shrink': {\n transform: 'translate(14px, 8px) scale(0.75)',\n paddingLeft: 0,\n fontWeight: 400,\n color: props.focused ? flowColors.brand.primary : flowColors.onSurface.os500,\n },\n '& > label.MuiInputLabel-root.MuiInputLabel-shrink.Mui-disabled': {\n color: flowColors.disabled.primary,\n },\n '& > .MuiInputBase-root': {\n background: 'transparent',\n width: '100%',\n paddingLeft: '1px',\n paddingTop: '0px',\n '&::after': {\n display: 'none',\n },\n '&::before': {\n display: 'none',\n },\n '& > div.MuiSelect-select': Object.assign(Object.assign({}, styleSelect), { fontSize: '16px', lineHeight: '24px', color: flowColors.onSurface.os900, fontWeight: '500', paddingRight: '50px', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', boxSizing: 'content-box!important', '&:focus': {\n background: 'transparent',\n }, '& > div.MuiListItemText-root': {\n marginTop: 0,\n } }),\n '& > .MuiIcon-root': Object.assign(Object.assign({}, styleIcon), { right: '15.5px', width: '24px', top: '19px' }),\n },\n };\n const labelStyle = styles['& > label.MuiInputLabel-root'];\n if (props.icon) {\n styles = Object.assign(Object.assign({}, styles), { '& > label.MuiInputLabel-root': Object.assign(Object.assign({}, labelStyle), { paddingLeft: '40px' }), '& > label.MuiInputLabel-root.MuiInputLabel-shrink': Object.assign(Object.assign({}, styles['& > label.MuiInputLabel-root.MuiInputLabel-shrink']), { transform: 'translate(24px, 8px) scale(0.75)', paddingLeft: '40px' }), '& > .MuiInputBase-root': {\n background: 'transparent',\n width: '100%',\n paddingLeft: '1px',\n paddingTop: '0px',\n '& > div.MuiSelect-select': Object.assign(Object.assign({}, styleSelect), { fontSize: '16px', lineHeight: '24px', color: flowColors.onSurface.os900, fontWeight: '500', paddingRight: '56px', paddingLeft: '52px', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', boxSizing: 'content-box!important', '&:focus': {\n background: 'transparent',\n }, '& > div.MuiListItemText-root': {\n marginTop: '14px',\n } }),\n '&::after': {\n display: 'none',\n },\n '&::before': {\n display: 'none',\n },\n '& > .MuiIcon-root': Object.assign(Object.assign({}, styleIcon), { right: '12.5px', width: '24px', top: '19px', '&:hovered': {} }),\n } });\n }\n if (props.disabled) {\n labelStyle.color = flowColors.disabled.primary;\n styles = Object.assign(Object.assign({}, styles), { borderBottom: `1px solid ${flowColors.disabled.primary}`, '& > .MuiIcon-root': Object.assign(Object.assign({}, styleIcon), { width: '50px', height: '56px', display: 'inline-flex', top: '0', alignItems: 'center', justifyContent: 'center', paddingBottom: '8px', color: theme.palette.disabled.primary }), '& > .MuiInputBase-root': Object.assign(Object.assign({}, styles['& > .MuiInputBase-root']), { '& > .MuiIcon-root': Object.assign(Object.assign({}, styleIcon), { right: '12.5px', top: '19px', color: theme.palette.disabled.primary }) }) });\n }\n if (props.error) {\n const errorColor = props.focused || props.hovered ? theme.palette.alert['main'] : theme.palette.onSurface.os500;\n labelStyle.color = errorColor;\n styles = Object.assign(Object.assign({}, styles), { borderBottom: `2px solid ${theme.palette.alert['main']}`, '& > label.MuiInputLabel-root.MuiInputLabel-shrink': Object.assign(Object.assign({}, styles['& > label.MuiInputLabel-root.MuiInputLabel-shrink']), { color: errorColor }) });\n }\n return styles;\n});\n//# sourceMappingURL=formControlSelectStyled.js.map"],"names":["FormControlSelectStyled","styled","MuiFormControl","shouldForwardProp","prop","_a","theme","props","__rest","styles","styleIcon","fontSize","position","flexShrink","pointerEvents","display","color","focused","value","hovered","handleStyleIcon","styleSelect","paddingBottom","staticLabel","paddingTop","height","minWidth","background","flowColors","transparent","primary","borderRadius","borderBottom","brand","onSurface","os900","os500","Object","assign","width","top","paddingLeft","fontWeight","marginLeft","transform","text","maxWidth","paletteLight","disabled","lineHeight","paddingRight","overflow","textOverflow","boxSizing","marginTop","right","labelStyle","icon","alignItems","justifyContent","palette","error","errorColor","alert"],"mappings":"iOAOA,MAUaA,EAA0BC,EAAMA,OAACC,UAAgB,CAC1DC,kBAAoBC,GAAkB,aAATA,GAChB,WAATA,GACS,aAATA,GACS,YAATA,GACS,UAATA,GACS,gBAATA,GAN+BH,EAOnCI,IACA,IAAIC,MAAEA,GAAUD,EAAIE,EAAQC,EAAAA,OAAOH,EAAI,CAAC,UACxC,IAAII,EAAS,CAAA,EACb,MAAMC,EApBc,CAACH,IACd,CACHI,SAAU,kBACVC,SAAU,WACVC,WAAY,EACZC,cAAe,OACfC,QAAS,QACTC,MAAOT,EAAMU,SAAWV,EAAMW,OAASX,EAAMY,QAAU,UAAY,wBAarDC,CAAgBb,GAC5Bc,EAAc,CAChBC,cAAef,EAAMgB,YAAc,OAAS,MAC5CC,WAAYjB,EAAMgB,YAAc,OAAS,QAE7Cd,EAAS,CACLgB,OAAQ,OACRC,SAAU,mBACVC,WAAYC,EAAAA,aAAWC,YAAYC,QACnCC,aAAc,kBACdC,aAAczB,EAAMU,QACd,aAAaW,EAAAA,aAAWK,MAAMH,UAC9BvB,EAAMW,MACF,aAAaU,EAAAA,aAAWM,UAAUC,QAClC,aAAaP,EAAAA,aAAWM,UAAUE,QAC5C,oBAAqBC,OAAOC,OAAOD,OAAOC,OAAO,CAAE,EAAE5B,GAAY,CAAE6B,MAAO,OAAQC,IAAK,SACvF,2BAA4B,CACxB5B,SAAU,WACVa,OAAQ,QAEZ,+BAAgC,CAC5BgB,YAAa,EACbC,WAAY,IACZC,WAAY,MACZC,UAAW,+BACX5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G,MAAY,OAAK,oDAAqD1B,OAAOC,OAAOD,OAAOC,OAAO,CAAE,EAAE7B,EAAO,sDAAuD,CAAEO,MAAO8C,KAC7Q,CACD,OAAOrD,CAAM"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react"),n=require("./formControlSelectStyled.js"),l=require("@mui/material/Select"),o=require("../icon/icon.js");require("../icon/icon.definitions.js");var u=require("./hook/useSelectInput.js"),a=require("@mui/material/styles"),i=require("./inputLabelSelect.js"),s=require("@mui/material"),c=require("../common/helperText.js"),d=require("lodash/noop");function h(e){return e&&e.__esModule?e:{default:e}}var p=h(l),x=h(d);const f=a.styled(p.default,{shouldForwardProp:e=>"hasIcon"!==e&&"fullWidth"!==e})((r=>{var t=e.__rest(r,["theme"]);if(!t.fullWidth)return null;return{"& > .MuiSelect-filled":{position:"absolute",left:0,top:0,width:t.hasIcon?"calc(100% - 102px) !important":"calc(100% - 62px) !important"}}}));exports.SelectInput=l=>{var{label:a=null,onChange:d,onBlur:h,onFocus:p,value:m,children:b,staticLabel:S,InputProps:j,fullWidth:v=!0,removeSelectMenuMaxWidth:q}=l,I=e.__rest(l,["label","onChange","onBlur","onFocus","value","children","staticLabel","InputProps","fullWidth","removeSelectMenuMaxWidth"]);const[M,g]=t.useState(""),[F,W]=t.useState(!1),[C,B]=t.useState(!1),[k,L]=t.useState(!1),[T,_]=t.useState(!1),[w,O]=t.useState(null),{handleOnBlur:y,handleOnChange:P,handleOnFocus:E}=u.useSelectInput(F,x.default,x.default,v,I.helpText,m,g,I.required,L),R=t.useRef(null),V=t.useRef(null),D={sx:w?{maxWidth:q?"unset":w,"& .MuiBackdrop-root":{background:"transparent",backdropFilter:"blur(0px)"}}:{"& .MuiBackdrop-root":{background:"transparent",backdropFilter:"blur(0px)"}}};return r.jsx(r.Fragment,{children:r.jsxs(n.FormControlSelectStyled,Object.assign({},I,{ref:V,staticLabel:S,sx:v?{}:{width:"200px"},disabled:I.disabled,error:I.hasError,value:M,hideBg:I.hideBg,onMouseEnter:()=>{!C&&!T&&B(!0)},onMouseLeave:()=>{C&&!T&&B(!1)},onMouseDown:e=>{const r=e.currentTarget.offsetWidth;O(r)},icon:I.icon,hovered:C,focused:F,variant:"filled",fullWidth:v,children:[I.icon&&r.jsx(o.Icon,{color:I.disabled?"disabled":"inherit",name:I.icon}),r.jsx(i.default,{staticLabel:S,label:a,opened:T,currentValue:M}),r.jsx(f,{MenuProps:D,required:k,onOpen:()=>{_(!0)},onClose:()=>{W(!1),B(!1),_(!1)},onBlur:()=>y(W,h),onFocus:()=>E(W,p),IconComponent:()=>T?r.jsx(o.Icon,{name:"chevron-up"}):r.jsx(o.Icon,{name:"chevron-down"}),labelId:a,id:I.id,name:I.name,value:M,onChange:e=>P(e,d,g),ref:R,hasIcon:!!I.icon,fullWidth:v,children:b}),r.jsx(s.FormHelperText,{children:r.jsx(c.default,{maxChars:0,currentValue:M,helpText:I.helpText})})]}))})};
1
+ "use strict";var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react"),n=require("./formControlSelectStyled.js"),l=require("@mui/material/Select"),o=require("../icon/icon.js");require("../icon/icon.definitions.js");var u=require("./hook/useSelectInput.js"),a=require("@mui/material/styles"),i=require("./inputLabelSelect.js"),s=require("@mui/material"),c=require("../common/helperText.js");function d(e){return e&&e.__esModule?e:{default:e}}var h=d(l);const p=a.styled(h.default,{shouldForwardProp:e=>"hasIcon"!==e&&"fullWidth"!==e})((r=>{var t=e.__rest(r,["theme"]);if(!t.fullWidth)return null;return{"& > .MuiSelect-filled":{position:"absolute",left:0,top:0,width:t.hasIcon?"calc(100% - 102px) !important":"calc(100% - 62px) !important"}}}));exports.SelectInput=l=>{var{label:a=null,onChange:d,onBlur:h,onFocus:x,value:m,children:f,staticLabel:b,InputProps:S,fullWidth:j=!0,removeSelectMenuMaxWidth:v}=l,q=e.__rest(l,["label","onChange","onBlur","onFocus","value","children","staticLabel","InputProps","fullWidth","removeSelectMenuMaxWidth"]);const[I,M]=t.useState(""),[g,F]=t.useState(!1),[W,C]=t.useState(!1),[B,k]=t.useState(!1),[L,T]=t.useState(!1),[_,w]=t.useState(null),{handleOnBlur:O,handleOnChange:y,handleOnFocus:P}=u.useSelectInput(g,(()=>{}),(()=>{}),j,q.helpText,m,M,q.required,k),E=t.useRef(null),R=t.useRef(null),V={sx:_?{maxWidth:v?"unset":_,"& .MuiBackdrop-root":{background:"transparent",backdropFilter:"blur(0px)"}}:{"& .MuiBackdrop-root":{background:"transparent",backdropFilter:"blur(0px)"}}};return r.jsx(r.Fragment,{children:r.jsxs(n.FormControlSelectStyled,Object.assign({},q,{ref:R,staticLabel:b,sx:j?{}:{width:"200px"},disabled:q.disabled,error:q.hasError,value:I,hideBg:q.hideBg,onMouseEnter:()=>{!W&&!L&&C(!0)},onMouseLeave:()=>{W&&!L&&C(!1)},onMouseDown:e=>{const r=e.currentTarget.offsetWidth;w(r)},icon:q.icon,hovered:W,focused:g,variant:"filled",fullWidth:j,children:[q.icon&&r.jsx(o.Icon,{color:q.disabled?"disabled":"inherit",name:q.icon}),r.jsx(i.default,{staticLabel:b,label:a,opened:L,currentValue:I}),r.jsx(p,{MenuProps:V,required:B,onOpen:()=>{T(!0)},onClose:()=>{F(!1),C(!1),T(!1)},onBlur:()=>O(F,h),onFocus:()=>P(F,x),IconComponent:()=>L?r.jsx(o.Icon,{name:"chevron-up"}):r.jsx(o.Icon,{name:"chevron-down"}),labelId:a,id:q.id,name:q.name,value:I,onChange:e=>y(e,d,M),ref:E,hasIcon:!!q.icon,fullWidth:j,children:f}),r.jsx(s.FormHelperText,{children:r.jsx(c.default,{maxChars:0,currentValue:I,helpText:q.helpText})})]}))})};
2
2
  //# sourceMappingURL=selectInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectInput.js","sources":["../../../../src/components/selectInput/selectInput.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useRef, useState } from 'react';\nimport { FormControlSelectStyled } from './formControlSelectStyled';\nimport MuiSelect from '@mui/material/Select';\nimport { Icon } from '../icon';\nimport { useSelectInput } from './hook/useSelectInput';\nimport { styled } from '@mui/material/styles';\nimport InputLabelSelect from './inputLabelSelect';\nimport { FormHelperText } from '@mui/material';\nimport HelperText from '../common/helperText';\nimport noop from 'lodash/noop';\n/**\n * @description SkodaFlow SelectInput component.\n * Properties are inherited from HTML input element.\n * @param props SelectInputProps\n * @returns React Functional Component\n * @deprecated This component is deprecated. Use themed Select component from @mui/material instead.\n */\nexport const SelectInput = (_a) => {\n var { label = null, onChange, onBlur, onFocus, value, children, staticLabel, InputProps, fullWidth = true, removeSelectMenuMaxWidth } = _a, props = __rest(_a, [\"label\", \"onChange\", \"onBlur\", \"onFocus\", \"value\", \"children\", \"staticLabel\", \"InputProps\", \"fullWidth\", \"removeSelectMenuMaxWidth\"]);\n const [currentValue, setCurrentValue] = useState('');\n const [isFocused, setIsFocused] = useState(false);\n const [hovered, setHovered] = useState(false);\n const [isRequired, setIsRequired] = useState(false);\n const [opened, setOpened] = useState(false);\n const [inputWidth, setInputWidth] = useState(null);\n const { handleOnBlur, handleOnChange, handleOnFocus } = useSelectInput(isFocused, noop, noop, fullWidth, props.helpText, value, setCurrentValue, props.required, setIsRequired);\n const inputRef = useRef(null);\n const formControlSelectRef = useRef(null);\n const menuProps = {\n sx: inputWidth\n ? {\n maxWidth: removeSelectMenuMaxWidth ? 'unset' : inputWidth,\n '& .MuiBackdrop-root': {\n background: 'transparent',\n backdropFilter: 'blur(0px)',\n },\n }\n : {\n '& .MuiBackdrop-root': {\n background: 'transparent',\n backdropFilter: 'blur(0px)',\n },\n },\n };\n return (_jsx(_Fragment, { children: _jsxs(FormControlSelectStyled, Object.assign({}, props, { ref: formControlSelectRef, staticLabel: staticLabel, sx: !fullWidth ? { width: '200px' } : {}, disabled: props.disabled, error: props.hasError, value: currentValue, hideBg: props.hideBg, onMouseEnter: () => {\n !hovered && !opened && setHovered(true);\n }, onMouseLeave: () => {\n hovered && !opened && setHovered(false);\n }, onMouseDown: (e) => {\n const elemWidth = e.currentTarget.offsetWidth;\n setInputWidth(elemWidth);\n }, icon: props.icon, hovered: hovered, focused: isFocused, variant: \"filled\", fullWidth: fullWidth, children: [props.icon && _jsx(Icon, { color: props.disabled ? 'disabled' : 'inherit', name: props.icon }), _jsx(InputLabelSelect, { staticLabel: staticLabel, label: label, opened: opened, currentValue: currentValue }), _jsx(SelectInputStyled, { MenuProps: menuProps, required: isRequired, onOpen: () => {\n setOpened(true);\n }, onClose: () => {\n setIsFocused(false);\n setHovered(false);\n setOpened(false);\n }, onBlur: () => handleOnBlur(setIsFocused, onBlur), onFocus: () => handleOnFocus(setIsFocused, onFocus), IconComponent: () => (opened ? _jsx(Icon, { name: \"chevron-up\" }) : _jsx(Icon, { name: \"chevron-down\" })), labelId: label, id: props.id, name: props.name, value: currentValue, onChange: (e) => handleOnChange(e, onChange, setCurrentValue), ref: inputRef, hasIcon: !!props.icon, fullWidth: fullWidth, children: children }), _jsx(FormHelperText, { children: _jsx(HelperText, { maxChars: 0, currentValue: currentValue, helpText: props.helpText }) })] })) }));\n};\n/**\n * @description Button styling defintion based on props\n */\nconst SelectInputStyled = styled(MuiSelect, {\n shouldForwardProp: (prop) => prop !== 'hasIcon' && prop !== 'fullWidth',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n if (!args.fullWidth)\n return null;\n const width = args.hasIcon ? 'calc(100% - 102px) !important' : 'calc(100% - 62px) !important';\n return {\n '& > .MuiSelect-filled': {\n position: 'absolute',\n left: 0,\n top: 0,\n width: width,\n },\n };\n});\n//# sourceMappingURL=selectInput.js.map"],"names":["SelectInputStyled","styled","MuiSelect","shouldForwardProp","prop","_a","args","__rest","fullWidth","position","left","top","width","hasIcon","label","onChange","onBlur","onFocus","value","children","staticLabel","InputProps","removeSelectMenuMaxWidth","props","currentValue","setCurrentValue","useState","isFocused","setIsFocused","hovered","setHovered","isRequired","setIsRequired","opened","setOpened","inputWidth","setInputWidth","handleOnBlur","handleOnChange","handleOnFocus","useSelectInput","noop","helpText","required","inputRef","useRef","formControlSelectRef","menuProps","sx","maxWidth","background","backdropFilter","_jsx","_Fragment","_jsxs","jsxs","FormControlSelectStyled","Object","assign","ref","disabled","error","hasError","hideBg","onMouseEnter","onMouseLeave","onMouseDown","e","elemWidth","currentTarget","offsetWidth","icon","focused","variant","Icon","color","name","InputLabelSelect","default","jsx","MenuProps","onOpen","onClose","IconComponent","labelId","id","FormHelperText","HelperText","maxChars"],"mappings":"mfAmBY,MA6CNA,EAAoBC,EAAMA,OAACC,UAAW,CACxCC,kBAAoBC,GAAkB,YAATA,GAA+B,cAATA,GAD7BH,EAEtBI,IACG,IAAiBC,EAAOC,EAAMA,OAACF,EAAI,CAAC,UACvC,IAAKC,EAAKE,UACN,OAAO,KAEX,MAAO,CACH,wBAAyB,CACrBC,SAAU,WACVC,KAAM,EACNC,IAAK,EACLC,MANMN,EAAKO,QAAU,gCAAkC,gCAQ9D,wBA3DuBR,IACxB,IAAIS,MAAEA,EAAQ,KAAIC,SAAEA,EAAQC,OAAEA,EAAMC,QAAEA,EAAOC,MAAEA,EAAKC,SAAEA,EAAQC,YAAEA,EAAWC,WAAEA,EAAUb,UAAEA,GAAY,EAAIc,yBAAEA,GAA6BjB,EAAIkB,EAAQhB,EAAMA,OAACF,EAAI,CAAC,QAAS,WAAY,SAAU,UAAW,QAAS,WAAY,cAAe,aAAc,YAAa,6BACzQ,MAAOmB,EAAcC,GAAmBC,EAAQA,SAAC,KAC1CC,EAAWC,GAAgBF,EAAQA,UAAC,IACpCG,EAASC,GAAcJ,EAAQA,UAAC,IAChCK,EAAYC,GAAiBN,EAAQA,UAAC,IACtCO,EAAQC,GAAaR,EAAQA,UAAC,IAC9BS,EAAYC,GAAiBV,EAAQA,SAAC,OACvCW,aAAEA,EAAYC,eAAEA,EAAcC,cAAEA,GAAkBC,EAAcA,eAACb,EA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,EAAcZ,GAASC,QAAS,IAAMsB,EAAcX,EAAcX,GAAUkE,cAAe,IAAOlD,EAASmB,EAAAA,IAAKsB,EAAAA,KAAM,CAAEE,KAAM,eAAkBxB,EAAAA,IAAKsB,EAAAA,KAAM,CAAEE,KAAM,iBAAoBQ,QAAStE,EAAOuE,GAAI9D,EAAM8D,GAAIT,KAAMrD,EAAMqD,KAAM1D,MAAOM,EAAcT,SAAWoD,GAAM7B,EAAe6B,EAAGpD,EAAUU,GAAkBkC,IAAKf,EAAU/B,UAAWU,EAAMgD,KAAM/D,UAAWA,EAAWW,SAAUA,IAAaiC,EAAAA,IAAKkC,EAAAA,eAAgB,CAAEnE,SAAUiC,MAAKmC,EAAAA,QAAY,CAAEC,SAAU,EAAGhE,aAAcA,EAAckB,SAAUnB,EAAMmB,kBAAwB"}
1
+ {"version":3,"file":"selectInput.js","sources":["../../../../src/components/selectInput/selectInput.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useRef, useState } from 'react';\nimport { FormControlSelectStyled } from './formControlSelectStyled';\nimport MuiSelect from '@mui/material/Select';\nimport { Icon } from '../icon';\nimport { useSelectInput } from './hook/useSelectInput';\nimport { styled } from '@mui/material/styles';\nimport InputLabelSelect from './inputLabelSelect';\nimport { FormHelperText } from '@mui/material';\nimport HelperText from '../common/helperText';\n/**\n * @description SkodaFlow SelectInput component.\n * Properties are inherited from HTML input element.\n * @param props SelectInputProps\n * @returns React Functional Component\n * @deprecated This component is deprecated. Use themed Select component from @mui/material instead.\n */\nexport const SelectInput = (_a) => {\n var { label = null, onChange, onBlur, onFocus, value, children, staticLabel, InputProps, fullWidth = true, removeSelectMenuMaxWidth } = _a, props = __rest(_a, [\"label\", \"onChange\", \"onBlur\", \"onFocus\", \"value\", \"children\", \"staticLabel\", \"InputProps\", \"fullWidth\", \"removeSelectMenuMaxWidth\"]);\n const [currentValue, setCurrentValue] = useState('');\n const [isFocused, setIsFocused] = useState(false);\n const [hovered, setHovered] = useState(false);\n const [isRequired, setIsRequired] = useState(false);\n const [opened, setOpened] = useState(false);\n const [inputWidth, setInputWidth] = useState(null);\n const { handleOnBlur, handleOnChange, handleOnFocus } = useSelectInput(isFocused, () => { }, () => { }, fullWidth, props.helpText, value, setCurrentValue, props.required, setIsRequired);\n const inputRef = useRef(null);\n const formControlSelectRef = useRef(null);\n const menuProps = {\n sx: inputWidth\n ? {\n maxWidth: removeSelectMenuMaxWidth ? 'unset' : inputWidth,\n '& .MuiBackdrop-root': {\n background: 'transparent',\n backdropFilter: 'blur(0px)',\n },\n }\n : {\n '& .MuiBackdrop-root': {\n background: 'transparent',\n backdropFilter: 'blur(0px)',\n },\n },\n };\n return (_jsx(_Fragment, { children: _jsxs(FormControlSelectStyled, Object.assign({}, props, { ref: formControlSelectRef, staticLabel: staticLabel, sx: !fullWidth ? { width: '200px' } : {}, disabled: props.disabled, error: props.hasError, value: currentValue, hideBg: props.hideBg, onMouseEnter: () => {\n !hovered && !opened && setHovered(true);\n }, onMouseLeave: () => {\n hovered && !opened && setHovered(false);\n }, onMouseDown: (e) => {\n const elemWidth = e.currentTarget.offsetWidth;\n setInputWidth(elemWidth);\n }, icon: props.icon, hovered: hovered, focused: isFocused, variant: \"filled\", fullWidth: fullWidth, children: [props.icon && _jsx(Icon, { color: props.disabled ? 'disabled' : 'inherit', name: props.icon }), _jsx(InputLabelSelect, { staticLabel: staticLabel, label: label, opened: opened, currentValue: currentValue }), _jsx(SelectInputStyled, { MenuProps: menuProps, required: isRequired, onOpen: () => {\n setOpened(true);\n }, onClose: () => {\n setIsFocused(false);\n setHovered(false);\n setOpened(false);\n }, onBlur: () => handleOnBlur(setIsFocused, onBlur), onFocus: () => handleOnFocus(setIsFocused, onFocus), IconComponent: () => (opened ? _jsx(Icon, { name: \"chevron-up\" }) : _jsx(Icon, { name: \"chevron-down\" })), labelId: label, id: props.id, name: props.name, value: currentValue, onChange: (e) => handleOnChange(e, onChange, setCurrentValue), ref: inputRef, hasIcon: !!props.icon, fullWidth: fullWidth, children: children }), _jsx(FormHelperText, { children: _jsx(HelperText, { maxChars: 0, currentValue: currentValue, helpText: props.helpText }) })] })) }));\n};\n/**\n * @description Button styling defintion based on props\n */\nconst SelectInputStyled = styled(MuiSelect, {\n shouldForwardProp: (prop) => prop !== 'hasIcon' && prop !== 'fullWidth',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n if (!args.fullWidth)\n return null;\n const width = args.hasIcon ? 'calc(100% - 102px) !important' : 'calc(100% - 62px) !important';\n return {\n '& > .MuiSelect-filled': {\n position: 'absolute',\n left: 0,\n top: 0,\n width: width,\n },\n };\n});\n//# sourceMappingURL=selectInput.js.map"],"names":["SelectInputStyled","styled","MuiSelect","shouldForwardProp","prop","_a","args","__rest","fullWidth","position","left","top","width","hasIcon","label","onChange","onBlur","onFocus","value","children","staticLabel","InputProps","removeSelectMenuMaxWidth","props","currentValue","setCurrentValue","useState","isFocused","setIsFocused","hovered","setHovered","isRequired","setIsRequired","opened","setOpened","inputWidth","setInputWidth","handleOnBlur","handleOnChange","handleOnFocus","useSelectInput","helpText","required","inputRef","useRef","formControlSelectRef","menuProps","sx","maxWidth","background","backdropFilter","_jsx","_Fragment","_jsxs","jsxs","FormControlSelectStyled","Object","assign","ref","disabled","error","hasError","hideBg","onMouseEnter","onMouseLeave","onMouseDown","e","elemWidth","currentTarget","offsetWidth","icon","focused","variant","Icon","color","name","InputLabelSelect","default","jsx","MenuProps","onOpen","onClose","IconComponent","labelId","id","FormHelperText","HelperText","maxChars"],"mappings":"mdAkBY,MA6CNA,EAAoBC,EAAMA,OAACC,UAAW,CACxCC,kBAAoBC,GAAkB,YAATA,GAA+B,cAATA,GAD7BH,EAEtBI,IACG,IAAiBC,EAAOC,EAAMA,OAACF,EAAI,CAAC,UACvC,IAAKC,EAAKE,UACN,OAAO,KAEX,MAAO,CACH,wBAAyB,CACrBC,SAAU,WACVC,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ui/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)))}))})})};
1
+ "use strict";var e=require("tslib"),t=require("react/jsx-runtime"),r=require("@mui/material"),o=require("@mui/material/Stepper"),a=require("@mui/material/styles"),n=require("../../design/skoda/paletteLight.theme.js");function i(e){return e&&e.__esModule?e:{default:e}}var l=i(o);function s(e){const{active:r,completed:o,className:a}=e;return t.jsx(c,{className:a,children:r?t.jsx("div",{className:"QontoStepIcon-active"}):o?t.jsx("div",{className:"QontoStepIcon-completedIcon"}):t.jsx("div",{className:"QontoStepIcon-circle"})})}const c=a.styled("div")((({theme:e})=>{let t={};return t={color:"dark"===e.palette.mode?e.palette.grey[700]:"#464748",display:"flex",height:22,alignItems:"center","& .QontoStepIcon-completedIcon":{color:n.paletteLight.onSurface.os700,width:12,height:12,borderRadius:"50%",backgroundColor:"currentColor","&:hover":{borderRadius:"50%",border:`1.5px solid ${n.paletteLight.onSurface.os700}`,color:n.paletteLight.brand.secondary}},"& .QontoStepIcon-active":{color:n.paletteLight.onSurface.os700,width:18,height:18,borderRadius:"50%",marginRight:"5.25px",marginLeft:"0px",backgroundColor:"currentColor","&:hover":{borderRadius:"50%",border:`1.5px solid ${n.paletteLight.onSurface.os700}`,color:n.paletteLight.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.paletteLight.disabled.tertiary}`,backgroundColor:n.paletteLight.disabled.secondary}}},t})),d=a.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.paletteLight.onSurface.os700,width:"60px"}},[`&.${r.stepConnectorClasses.completed}`]:{[`& .${r.stepConnectorClasses.line}`]:{borderColor:n.paletteLight.onSurface.os700}},[`& .${r.stepConnectorClasses.line}`]:{borderColor:"dark"===e.palette.mode?e.palette.grey[800]:n.paletteLight.disabled.primary,borderTopWidth:3,borderRadius:1}}))),p=a.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=o=>{var{activeStep:a,alternativeLabel:n,children:i,classes:c,connector:h,nonLinear:u,orientation:g,step:m}=o,x=e.__rest(o,["activeStep","alternativeLabel","children","classes","connector","nonLinear","orientation","step"]);const b={lineHeight:"16px",fontSize:"12px",fontWeight:"400"};return t.jsx(p,{children:t.jsx("div",{children:t.jsx(l.default,Object.assign({className:"controllerContainer"},x,{activeStep:a,sx:{maxWidth:800,display:"flex",alignItems:"center",spacing:4},alternativeLabel:n,connector:t.jsx(d,{}),children:m.map((e=>t.jsx(r.Step,{children:t.jsx(r.StepLabel,{style:b,StepIconComponent:s,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 { 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,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,EAAUA,WAACC,UAAUC,QAC5CT,MAAOO,EAAAA,WAAWO,MAAMC,YAGhC,0BAA2B,CACvBL,MAAO,GACPL,OAAQ,GACRM,aAAc,MACdE,OAAQ,sBACRb,MAAO,cACP,UAAW,CACPkB,OAAQ,UACRP,aAAc,MACdE,OAAQ,eAAeN,EAAUA,WAACY,SAASC,WAC3CR,gBAAiBL,EAAAA,WAAWY,SAASJ,aAI1ChB,CAAK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AAS,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 { paletteLight as flowColors } from '../../design/skoda/paletteLight.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","paletteLight","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":"uRAqBA,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,aAAWC,UAAUC,MAC5BC,MAAO,GACPL,OAAQ,GACRM,aAAc,MACdC,gBAAiB,eACjB,UAAW,CACPD,aAAc,MACdE,OAAQ,eAAeN,EAAUO,aAACN,UAAUC,QAC5CT,MAAOO,EAAAA,aAAWQ,MAAMC,YA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Uf,iBAAEA,EAAgB9B,SAAEA,EAAQ8C,QAAEA,EAAOC,UAAEA,EAASC,UAAEA,EAASC,YAAEA,EAAWC,KAAEA,GAASN,EAAIlD,EAAQyD,EAAMA,OAACP,EAAI,CAAC,aAAc,mBAAoB,WAAY,UAAW,YAAa,YAAa,cAAe,SAC7N,MAAMQ,EAAS,CACXT,WAAY,OACZD,SAAU,OACVD,WAAY,OAQhB,OAAO3C,EAAAA,IAAKwC,EAAe,CAAEtC,SANCF,MAAK,MAAO,CAAEE,SAAUF,EAAIG,IAACoD,UAAYC,OAAOC,OAAO,CAAE1D,UAAW,uBAAyBH,EAAO,CAAEmD,WAAYA,EAAYW,GAAI,CACpJC,SAAU,IACVhD,QAAS,OACTE,WAAY,SACZ+C,QAAS,GACV5B,iBAAkBA,EAAkBiB,UAAWjD,EAAAA,IAAK6B,EAAgB,CAAA,GAAK3B,SAAUkD,EAAKS,KAAKC,GAAW9D,EAAAA,IAAK+D,EAAAA,KAAM,CAAE7D,SAAUF,EAAIG,IAAC6D,EAASA,UAAE,CAAE1D,MAAOgD,EAAQW,kBAAmBtE,EAAeO,SAAU4D,KAAYA,WACzK"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),a=require("react/jsx-runtime"),r=require("@mui/material"),u=require("lodash/noop"),l=require("react"),t=require("../common/helperText.js"),s=require("./hook/useTextAreaEffect.js");function n(e){return e&&e.__esModule?e:{default:e}}var o=n(u);const i=l.forwardRef(((u,n)=>{var{name:i,id:c,label:d=null,onChange:h,onBlur:x,onFocus:m,value:f}=u,b=e.__rest(u,["name","id","label","onChange","onBlur","onFocus","value"]);const[C,p]=l.useState(""),[q,T]=l.useState(!1),[v,g]=l.useState(!1),[,j]=l.useState(!1),k=l.useCallback((e=>{((e,a,r,u)=>{const l=e.target.value;(!a||a<0||a&&l.length<=a)&&(r(l),u&&u(e))})(e,b.maxChars,p,h)}),[b.maxChars,h]),F=l.useCallback((e=>{((e,a,r,u)=>{a(!!e),r(!1),u&&u()})(C,T,g,(()=>x?x(e):o.default()))}),[C,x]),S=l.useCallback((e=>{((e,a,r)=>{a(!0),e(!0),r&&r()})(T,g,(()=>m?m(e):o.default()))}),[m]);return s.useTextAreaEffect(C,f,b.maxChars,b.required,T,p,j),a.jsx(r.TextField,Object.assign({},b,{onChange:k,value:C,onFocus:S,multiline:!0,InputLabelProps:{shrink:q},onBlur:F,focused:v,label:d||null,hiddenLabel:!d,name:i,ref:n,id:c,error:b.hasError,disabled:b.disabled,helperText:a.jsx(t.default,{maxChars:b.maxChars,currentValue:C,helpText:b.helpText})}))}));exports.TextArea=i;
1
+ "use strict";var e=require("tslib"),a=require("react/jsx-runtime"),r=require("@mui/material"),l=require("react"),t=require("../common/helperText.js"),s=require("./hook/useTextAreaEffect.js");const u=l.forwardRef(((u,n)=>{var{name:o,id:i,label:c=null,onChange:h,onBlur:x,onFocus:d,value:m}=u,b=e.__rest(u,["name","id","label","onChange","onBlur","onFocus","value"]);const[C,f]=l.useState(""),[T,p]=l.useState(!1),[q,g]=l.useState(!1),[,j]=l.useState(!1),v=l.useCallback((e=>{((e,a,r,l)=>{const t=e.target.value;(!a||a<0||a&&t.length<=a)&&(r(t),l&&l(e))})(e,b.maxChars,f,h)}),[b.maxChars,h]),k=l.useCallback((e=>{((e,a,r,l)=>{a(!!e),r(!1),l&&l()})(C,p,g,(()=>x?x(e):()=>{}))}),[C,x]),F=l.useCallback((e=>{((e,a,r)=>{a(!0),e(!0),r&&r()})(p,g,(()=>d?d(e):()=>{}))}),[d]);return s.useTextAreaEffect(C,m,b.maxChars,b.required,p,f,j),a.jsx(r.TextField,Object.assign({},b,{onChange:v,value:C,onFocus:F,multiline:!0,InputLabelProps:{shrink:T},onBlur:k,focused:q,label:c||null,hiddenLabel:!c,name:o,ref:n,id:i,error:b.hasError,disabled:b.disabled,helperText:a.jsx(t.default,{maxChars:b.maxChars,currentValue:C,helpText:b.helpText})}))}));exports.TextArea=u;
2
2
  //# sourceMappingURL=textArea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textArea.js","sources":["../../../../src/components/textArea/textArea.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { TextField } from '@mui/material';\nimport noop from 'lodash/noop';\nimport { forwardRef, useCallback, useState } from 'react';\nimport HelperText from '../common/helperText';\nimport { useTextAreaEffect } from './hook/useTextAreaEffect';\n/**\n * @description SkodaFlow TextArea component.\n * Properties are inherited from HTML Div element.\n * @param props TextInputProps\n * @returns React Functional Component\n */\n//-Set the currentValue state useful for:\n//1. Count the number of the characters in the helpertext\n//2. make the label shrinked while the text input is filled\n//- trigger onChange callblack from outside\nconst onChangeHandler = (e, maxChars, setCurrentValue, onChange) => {\n const inputValue = e.target.value;\n if (!maxChars || maxChars < 0 || (maxChars && inputValue.length <= maxChars)) {\n setCurrentValue(inputValue);\n onChange && onChange(e);\n }\n};\n//Set the label shrinked if there's value in the input\n//Then call the onBlur callback from the outside\nconst onBlurHandler = (currentValue, setIsShrunk, setIsFocused, onBlur) => {\n setIsShrunk(currentValue ? true : false);\n setIsFocused(false);\n onBlur && onBlur();\n};\n//Set the label shrinked\n//Then call the onFocus callback from outside\nconst onFocusHandler = (setIsShrunk, setIsFocused, onFocus) => {\n setIsFocused(true);\n setIsShrunk(true);\n onFocus && onFocus();\n};\n/**\n * @deprecated This component is deprecated. Use themed TextField component from @mui/material with multiline prop set to true.\n */\nexport const TextArea = forwardRef((_a, ref) => {\n var { name, id, label = null, onChange, onBlur, onFocus, value } = _a, props = __rest(_a, [\"name\", \"id\", \"label\", \"onChange\", \"onBlur\", \"onFocus\", \"value\"]);\n const [currentValue, setCurrentValue] = useState('');\n const [isShrunk, setIsShrunk] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n const [, setIsRequired] = useState(false);\n const handleOnChangeWithUseCallback = useCallback((e) => {\n onChangeHandler(e, props.maxChars, setCurrentValue, onChange);\n }, [props.maxChars, onChange]);\n const handleOnBlurWithUseCallback = useCallback((event) => {\n onBlurHandler(currentValue, setIsShrunk, setIsFocused, () => (onBlur ? onBlur(event) : noop()));\n }, [currentValue, onBlur]);\n const handleOnFocusWithUseCallback = useCallback((event) => {\n onFocusHandler(setIsShrunk, setIsFocused, () => (onFocus ? onFocus(event) : noop()));\n }, [onFocus]);\n useTextAreaEffect(currentValue, value, props.maxChars, props.required, setIsShrunk, setCurrentValue, setIsRequired);\n return (_jsx(TextField, Object.assign({}, props, { onChange: handleOnChangeWithUseCallback, value: currentValue, onFocus: handleOnFocusWithUseCallback, multiline: true, InputLabelProps: {\n shrink: isShrunk,\n }, onBlur: handleOnBlurWithUseCallback, focused: isFocused, label: label ? label : null, hiddenLabel: !label, name: name, ref: ref, id: id, error: props.hasError, disabled: props.disabled, helperText: _jsx(HelperText, { maxChars: props.maxChars, currentValue: currentValue, helpText: props.helpText }) })));\n});\n//# sourceMappingURL=textArea.js.map"],"names":["TextArea","forwardRef","_a","ref","name","id","label","onChange","onBlur","onFocus","value","props","__rest","currentValue","setCurrentValue","useState","isShrunk","setIsShrunk","isFocused","setIsFocused","setIsRequired","handleOnChangeWithUseCallback","useCallback","e","maxChars","inputValue","target","length","onChangeHandler","handleOnBlurWithUseCallback","event","onBlurHandler","noop","handleOnFocusWithUseCallback","onFocusHandler","useTextAreaEffect","required","_jsx","TextField","Object","assign","multiline","InputLabelProps","shrink","focused","hiddenLabel","error","hasError","disabled","helperText","jsx","HelperText","default","helpText"],"mappings":"sRAiBA,MAwBaA,EAAWC,EAAUA,YAAC,CAACC,EAAIC,KACpC,IAAIC,KAAEA,EAAIC,GAAEA,EAAEC,MAAEA,EAAQ,KAAIC,SAAEA,EAAQC,OAAEA,EAAMC,QAAEA,EAAOC,MAAEA,GAAUR,EAAIS,EAAQC,EAAAA,OAAOV,EAAI,CAAC,OAAQ,KAAM,QAAS,WAAY,SAAU,UAAW,UACnJ,MAAOW,EAAcC,GAAmBC,EAAQA,SAAC,KAC1CC,EAAUC,GAAeF,EAAQA,U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AAcwC,SAAU1C,EAAM0C,aAAiB"}
1
+ {"version":3,"file":"textArea.js","sources":["../../../../src/components/textArea/textArea.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { TextField } from '@mui/material';\nimport { forwardRef, useCallback, useState } from 'react';\nimport HelperText from '../common/helperText';\nimport { useTextAreaEffect } from './hook/useTextAreaEffect';\n/**\n * @description SkodaFlow TextArea component.\n * Properties are inherited from HTML Div element.\n * @param props TextInputProps\n * @returns React Functional Component\n */\n//-Set the currentValue state useful for:\n//1. Count the number of the characters in the helpertext\n//2. make the label shrinked while the text input is filled\n//- trigger onChange callblack from outside\nconst onChangeHandler = (e, maxChars, setCurrentValue, onChange) => {\n const inputValue = e.target.value;\n if (!maxChars || maxChars < 0 || (maxChars && inputValue.length <= maxChars)) {\n setCurrentValue(inputValue);\n onChange && onChange(e);\n }\n};\n//Set the label shrinked if there's value in the input\n//Then call the onBlur callback from the outside\nconst onBlurHandler = (currentValue, setIsShrunk, setIsFocused, onBlur) => {\n setIsShrunk(currentValue ? true : false);\n setIsFocused(false);\n onBlur && onBlur();\n};\n//Set the label shrinked\n//Then call the onFocus callback from outside\nconst onFocusHandler = (setIsShrunk, setIsFocused, onFocus) => {\n setIsFocused(true);\n setIsShrunk(true);\n onFocus && onFocus();\n};\n/**\n * @deprecated This component is deprecated. Use themed TextField component from @mui/material with multiline prop set to true.\n */\nexport const TextArea = forwardRef((_a, ref) => {\n var { name, id, label = null, onChange, onBlur, onFocus, value } = _a, props = __rest(_a, [\"name\", \"id\", \"label\", \"onChange\", \"onBlur\", \"onFocus\", \"value\"]);\n const [currentValue, setCurrentValue] = useState('');\n const [isShrunk, setIsShrunk] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n const [, setIsRequired] = useState(false);\n const handleOnChangeWithUseCallback = useCallback((e) => {\n onChangeHandler(e, props.maxChars, setCurrentValue, onChange);\n }, [props.maxChars, onChange]);\n const handleOnBlurWithUseCallback = useCallback((event) => {\n onBlurHandler(currentValue, setIsShrunk, setIsFocused, () => (onBlur ? onBlur(event) : () => { }));\n }, [currentValue, onBlur]);\n const handleOnFocusWithUseCallback = useCallback((event) => {\n onFocusHandler(setIsShrunk, setIsFocused, () => (onFocus ? onFocus(event) : () => { }));\n }, [onFocus]);\n useTextAreaEffect(currentValue, value, props.maxChars, props.required, setIsShrunk, setCurrentValue, setIsRequired);\n return (_jsx(TextField, Object.assign({}, props, { onChange: handleOnChangeWithUseCallback, value: currentValue, onFocus: handleOnFocusWithUseCallback, multiline: true, InputLabelProps: {\n shrink: isShrunk,\n }, onBlur: handleOnBlurWithUseCallback, focused: isFocused, label: label ? label : null, hiddenLabel: !label, name: name, ref: ref, id: id, error: props.hasError, disabled: props.disabled, helperText: _jsx(HelperText, { maxChars: props.maxChars, currentValue: currentValue, helpText: props.helpText }) })));\n});\n//# sourceMappingURL=textArea.js.map"],"names":["TextArea","forwardRef","_a","ref","name","id","label","onChange","onBlur","onFocus","value","props","__rest","currentValue","setCurrentValue","useState","isShrunk","setIsShrunk","isFocused","setIsFocused","setIsRequired","handleOnChangeWithUseCallback","useCallback","e","maxChars","inputValue","target","length","onChangeHandler","handleOnBlurWithUseCallback","event","onBlurHandler","handleOnFocusWithUseCallback","onFocusHandler","useTextAreaEffect","required","_jsx","TextField","Object","assign","multiline","InputLabelProps","shrink","focused","hiddenLabel","error","hasError","disabled","helperText","jsx","HelperText","default","helpText"],"mappings":"+LAgBA,MAwBaA,EAAWC,EAAUA,YAAC,CAACC,EAAIC,KACpC,IAAIC,KAAEA,EAAIC,GAAEA,EAAEC,MAAEA,EAAQ,KAAIC,SAAEA,EAAQC,OAAEA,EAAMC,QAAEA,EAAOC,MAAEA,GAAUR,EAAIS,EAAQC,EAAAA,OAAOV,EAAI,CAAC,OAAQ,KAAM,QAAS,WAAY,SAAU,UAAW,UACnJ,MAAOW,EAAcC,GAAmBC,EAAQA,SAAC,KAC1CC,EAAUC,GAAeF,EAAQA,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cuC,SAAUzC,EAAMyC,aAAiB"}
@@ -1,2 +1,2 @@
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})}))})};
1
+ "use strict";var e=require("tslib"),n=require("react/jsx-runtime"),r=require("react"),t=require("../icon/icon.js");require("../icon/icon.definitions.js");var l=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");exports.TextInput=d=>{var{name:c,id:h,label:x=null,onChange:p,onBlur:m,onFocus:f,value:j,placeholder:b,hasError:q,fullWidth:C=!0,excludeChars:v}=d,I=e.__rest(d,["name","id","label","onChange","onBlur","onFocus","value","placeholder","hasError","fullWidth","excludeChars"]);const[T,F]=r.useState(j||""),[k,y]=r.useState(!1),[S,g]=r.useState(!1),[w,E]=r.useState(!1),[L,B]=r.useState(!1),{handleOnBlur:D,handleOnFocus:O,handleOnChange:W,handlePlaceholder:K}=o.useTextInput(x,L,b,I.type),P=r.useRef(null),{width:A}=u.default();return s.useTextInputEffect(P,(()=>{}),C,A,T,j,I.maxChars,I.required,y,F,B),n.jsx("div",{children:n.jsx(a.default,Object.assign({},I,{className:[I.icon?"textField-Icon":"",x?"textField-Label":"textField-NoLabel"].join(" "),InputLabelProps:{shrink:k},InputProps:I.icon?{startAdornment:n.jsx(l.InputAdornment,{position:"start",children:n.jsx(t.Icon,{color:I.disabled?"disabled":"inherit",name:I.icon})})}:{},onChange:e=>W(e,I.maxChars,p,F),value:T,onFocus:e=>O(e,g,y,f),onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),hovered:w,onBlur:e=>D(e,y,g,m,T),focused:S,placeholder:K,label:b?null:x,hiddenLabel:!!b,name:c,ref:P,id:h,error:q,fullWidth:C,onKeyDown:e=>{I.onKeyDownCallback&&I.onKeyDownCallback(e),v&&v.length>0&&v.includes(e.key)&&e.preventDefault()},helperText:n.jsx(i.default,{maxChars:I.maxChars,currentValue:T,helpText:I.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', 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,M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AM8D,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';\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, () => { }, 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","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"],"m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EAAUW,GAAkBR,MAAOO,EAAcR,QAAUkD,GAAU9B,EAAc8B,EAAOpC,EAAcF,EAAaZ,GAAUmD,aAAc,IAAMnC,GAAW,GAAOoC,aAAc,IAAMpC,GAAW,GAAQD,QAASA,EAAShB,OAASmD,GAAU/B,EAAa+B,EAAOtC,EAAaE,EAAcf,EAAQS,GAAe6C,QAASxC,EAAWX,YAAaoB,EAAmBzB,MAAOK,EAAc,KAAOL,EAAOyD,cAAepD,EAAaP,KAAMA,EAAM4D,IAAK9B,EAAU7B,GAAIA,EAAI4D,MAAOrD,EAAUC,UAAWA,EAAWqD,UAAYP,IAC7jB5C,EAAMoD,mBACNpD,EAAMoD,kBAAkBR,GACxB7C,GAAgBA,EAAasD,OAAS,GAAKtD,EAAauD,SAASV,EAAMW,MACvEX,EAAMY,gBACT,EACFC,WAAY/B,EAAAA,IAAKgC,EAAAA,QAAY,CAAElC,SAAUxB,EAAMwB,SAAUtB,aAAcA,EAAcyD,SAAU3D,EAAM2D,eAAoB"}
@@ -1,6 +1,13 @@
1
1
  import React from 'react';
2
+ import { ScopedCssBaselineProps } from '@mui/material';
3
+ import { DefaultTheme } from '@mui/system';
2
4
  import './theme.extensions';
3
5
  export type SkodaThemeProviderProps = {
4
6
  children?: React.ReactNode;
5
- };
7
+ theme?: Partial<DefaultTheme>;
8
+ globalBaseline?: boolean;
9
+ } & ScopedCssBaselineProps;
10
+ /**
11
+ * Wrapper of ThemeProvider that additionally provide Scoped CssBaseline
12
+ */
6
13
  export declare const SkodaThemeProvider: React.FC<SkodaThemeProviderProps>;
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("@mui/material"),t=require("./theme.js"),s=require("./theme.typography.js");exports.SkodaThemeProvider=h=>{const a=s.useTypographySize(),c=r.useMemo((()=>t.createSkodaTheme(a)),[a]);return e.jsx(i.StyledEngineProvider,{injectFirst:!0,children:e.jsx(i.ThemeProvider,{theme:c,children:e.jsx(i.ScopedCssBaseline,{children:h.children})})})};
1
+ "use strict";var e=require("tslib"),r=require("react/jsx-runtime"),i=require("@mui/material"),s=require("./theme.js");exports.SkodaThemeProvider=t=>{var{children:l,theme:n=s.theme,globalBaseline:a=!1}=t,h=e.__rest(t,["children","theme","globalBaseline"]);return r.jsx(i.StyledEngineProvider,{injectFirst:!0,children:r.jsx(i.ThemeProvider,{theme:n,children:a?l:r.jsx(i.ScopedCssBaseline,Object.assign({},h,{children:l}))})})};
2
2
  //# sourceMappingURL=SkodaThemeProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SkodaThemeProvider.js","sources":["../../../../src/design/skoda/SkodaThemeProvider.tsx"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useMemo } from 'react';\nimport { ScopedCssBaseline, StyledEngineProvider, ThemeProvider } from '@mui/material';\nimport { createSkodaTheme } from './theme';\nimport { useTypographySize } from './theme.typography';\nimport './theme.extensions';\nexport const SkodaThemeProvider = (props) => {\n const typographySize = useTypographySize();\n const theme = useMemo(() => createSkodaTheme(typographySize), [typographySize]);\n return (_jsx(StyledEngineProvider, { injectFirst: true, children: _jsx(ThemeProvider, { theme: theme, children: _jsx(ScopedCssBaseline, { children: props.children }) }) }));\n};\n//# sourceMappingURL=SkodaThemeProvider.js.map"],"names":["props","typographySize","useTypographySize","theme","useMemo","createSkodaTheme","_jsx","jsx","StyledEngineProvider","injectFirst","children","ThemeProvider","ScopedCssBaseline"],"mappings":"oLAMmCA,IAC/B,MAAMC,EAAiBC,EAAAA,oBACjBC,EAAQC,EAAAA,SAAQ,IAAMC,EAAAA,iBAAiBJ,IAAiB,CAACA,IAC/D,OAAQK,EAAIC,IAACC,EAAoBA,qBAAE,CAAEC,aAAa,EAAMC,SAAUJ,EAAAA,IAAKK,EAAaA,cAAE,CAAER,MAAOA,EAAOO,SAAUJ,EAAAA,IAAKM,EAAiBA,kBAAE,CAAEF,SAAUV,EAAMU,cAAmB"}
1
+ {"version":3,"file":"SkodaThemeProvider.js","sources":["../../../../src/design/skoda/SkodaThemeProvider.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { ScopedCssBaseline, StyledEngineProvider, ThemeProvider } from '@mui/material';\nimport { theme as skodaTheme } from './theme';\nimport './theme.extensions';\n/**\n * Wrapper of ThemeProvider that additionally provide Scoped CssBaseline\n */\nexport const SkodaThemeProvider = (_a) => {\n var { children, theme = skodaTheme, globalBaseline = false } = _a, rest = __rest(_a, [\"children\", \"theme\", \"globalBaseline\"]);\n return (_jsx(StyledEngineProvider, { injectFirst: true, children: _jsx(ThemeProvider, { theme: theme, children: globalBaseline ? children : _jsx(ScopedCssBaseline, Object.assign({}, rest, { children: children })) }) }));\n};\n//# sourceMappingURL=SkodaThemeProvider.js.map"],"names":["_a","children","theme","skodaTheme","globalBaseline","rest","__rest","_jsx","StyledEngineProvider","injectFirst","jsx","ThemeProvider","ScopedCssBaseline","Object","assign"],"mappings":"iJAQmCA,IAC/B,IAAIC,SAAEA,EAAQC,MAAEA,EAAQC,EAAUD,MAAAE,eAAEA,GAAiB,GAAUJ,EAAIK,EAAOC,EAAAA,OAAON,EAAI,CAAC,WAAY,QAAS,mBAC3G,OAAQO,MAAKC,EAAAA,qBAAsB,CAAEC,aAAa,EAAMR,SAAUM,EAAIG,IAACC,EAAaA,cAAE,CAAET,MAAOA,EAAOD,SAAUG,EAAiBH,EAAWM,EAAAA,IAAKK,EAAiBA,kBAAEC,OAAOC,OAAO,CAAA,EAAIT,EAAM,CAAEJ,SAAUA,QAAoB"}
@@ -1,7 +1,5 @@
1
- import React from 'react';
2
- import './theme.extensions';
3
- type SkodaThemeProviderProps = {
4
- children?: React.ReactNode;
5
- };
6
- export declare const SkodaThemeWidgetProvider: (props: SkodaThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
7
- export {};
1
+ import { SkodaThemeProviderProps } from './SkodaThemeProvider';
2
+ /**
3
+ * Alternative theme provider when the responsive style should be applied based on the container and not window
4
+ */
5
+ export declare const SkodaThemeWidgetProvider: ({ theme, ...rest }: SkodaThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material"),i=require("@mui/material/styles"),s=require("@mui/system"),t=require("react"),a=require("react-use"),n=require("./theme.breakpoints.js"),u=require("./theme.typography.js"),o=require("./theme.js");const c=()=>{const e=t.useMemo((()=>s.createBreakpoints(n.flowBreakpoints)),[]),[i,u]=t.useState(n.flowBreakpoints),[o,{width:c}]=a.useMeasure(),{width:d}=a.useWindowSize(),m=t.useCallback(((r,i)=>{const s=r-i,t=e.keys.reduce(((r,i)=>Object.assign(Object.assign({},r),{[i]:e.values[i]+s})),{});u({values:t})}),[e]),h=t.useMemo((()=>r.debounce(m,250)),[m]);return t.useLayoutEffect((()=>{h(d,c)}),[d,c,m]),{containerBreakpoints:i,containerRef:o}};exports.SkodaThemeWidgetProvider=s=>{const{children:a}=s,{containerBreakpoints:n,containerRef:d}=c(),m=u.useTypographySize(n),h=t.useMemo((()=>o.createSkodaTheme(m,n)),[m,n]);return e.jsx("div",{ref:d,children:e.jsx(i.StyledEngineProvider,{injectFirst:!0,children:e.jsx(i.ThemeProvider,{theme:h,children:e.jsx(r.ScopedCssBaseline,{children:a})})})})};
1
+ "use strict";var e=require("tslib"),r=require("react/jsx-runtime"),i=require("react"),t=require("./SkodaThemeProvider.js"),s=require("./theme.js"),a=require("@mui/material"),m=require("@mui/material/styles");exports.SkodaThemeWidgetProvider=u=>{var{theme:o}=u,n=e.__rest(u,["theme"]);const c=i.useMemo((()=>{const e=s.createSkodaTheme({widget:!0});return o?m.createTheme(e,o):e}),[o]);return r.jsx(a.Box,{sx:{containerType:"inline-size"},children:r.jsx(t.SkodaThemeProvider,Object.assign({},n,{theme:c}))})};
2
2
  //# sourceMappingURL=SkodaThemeWidgetProvider.js.map