@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,2 +1,2 @@
1
- import{__rest as e}from"tslib";import{jsxs as t,jsx as i,Fragment as n}from"react/jsx-runtime";import o from"@mui/material/Pagination";import r from"@mui/material/PaginationItem";import a from"@mui/material/TextField";import{styled as l}from"@mui/material/styles";import{forwardRef as s,useState as p,useEffect as d,useCallback as m}from"react";import{flowColors as u}from"../../design/skoda/palette.theme.js";import{ternaryCondition as c}from"../../utils/utilities.js";import{IconButton as h}from"../iconButton/index.js";import{Icon as f}from"../icon/icon.js";import"../icon/icon.definitions.js";const x=(e,t)=>""===e||"number"==typeof e&&e-1>0&&e+1<=t||"number"==typeof parseInt(e)&&parseInt(e)>0&&parseInt(e)<=t,g=(e,n,o,r,a,l)=>t(h,{variant:"standard",onClick:n,disabled:o,children:["forward"===r&&!a&&l,i(f,{name:e}),"back"===r&&!a&&l]}),b=s(((l,s)=>{var{count:u,isDisabled:h,page:b,prevButtonLabel:B,nextButtonLabel:y,defaultPage:w,hideNextButton:j,hidePrevButton:I,hideFirstButton:L,hideLastButton:C,hideLabels:k,onValueChange:P}=l,z=e(l,["count","isDisabled","page","prevButtonLabel","nextButtonLabel","defaultPage","hideNextButton","hidePrevButton","hideFirstButton","hideLastButton","hideLabels","onValueChange"]);const M=w||1,[N,S]=p(M),[V,W]=p(!0),[D,F]=p();d((()=>{N&&P&&P(N)}),[N,P]),d((()=>{V?W(!1):b&&!h&&S(b)}),[h,V,b]);const O=m(((e,t)=>{S(t)}),[]);return t(v,{"data-testid":"Pagination-wrapper",children:[i(o,Object.assign({className:"desktopView"},z,{shape:"rounded",count:u,disabled:h,page:N,hideNextButton:j,hidePrevButton:I,showFirstButton:!L,showLastButton:!C,ref:s,onChange:O,renderItem:e=>i(r,Object.assign({className:c(I,!1,"MuiPagination-prev",""),components:{first:()=>i(f,{name:"previous",fontSize:"small"}),last:()=>i(f,{name:"next",fontSize:"small"}),previous:()=>t(n,{children:[i(f,{name:"chevron-left",fontSize:"small"}),i(n,{children:B})]}),next:()=>t(n,{children:[i(n,{children:y}),i(f,{name:"chevron-right",fontSize:"small"})]})}},e))}))," ",i("div",{style:{display:"flex",flexDirection:"column"},className:"mobileView "+(h?"paginationDisabled":""),children:t("div",{className:"mobileContainer",children:[g("chevron-previous",(()=>x(N-1,u)&&S(1)),!x(N-1,u)),g("chevron-left",(()=>x(N-1,u)&&S(N-1)),!x(N-1,u),"back",k,B),i(a,{className:"textFieldContainer",value:N,inputProps:{inputMode:"numeric",pattern:`[1-${u}]*`},onChange:e=>(e=>{""===e&&(F(N),S(e));const t=parseInt(e);"number"==typeof t&&x(t,u)&&(F(t),S(t))})(e.target.value),onBlur:()=>""===N&&S(D)}),g("chevron-right",(()=>x(N+1,u)&&S(N+1)),!x(N+1,u),"forward",k,y),g("chevron-next",(()=>x(N+1,u)&&S(u)),!x(N+1,u))]})})]})})),v=l("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:u.transparent.primary,border:0,borderRadius:"4px",fontSize:"16px",fontWeight:"400",height:"36px",lineHeight:"36px",minWidth:"44px",maxWidth:"50px",padding:"0 4px",textAlign:"center",color:u.text.primary},"& fieldset":{visibility:"hidden"},"& div":{"&::before":{borderBottom:0},"&::after":{borderBottom:0}}},"& .controllerContainer":{"& .arrowLabel":{color:u.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:u.text.primary,fontSize:"12px",fontWeight:"400",lineHeight:"24px",marginTop:"4px"},"&.paginationDisabled":{pointerEvents:"none","& .counter_label, .MuiIcon-root,.arrowLabel, input, fieldset":{color:u.disabled.primary}}})},t}));export{b as Pagination};
1
+ import{__rest as e}from"tslib";import{jsxs as t,jsx as i,Fragment as n}from"react/jsx-runtime";import o from"@mui/material/Pagination";import r from"@mui/material/PaginationItem";import a from"@mui/material/TextField";import{styled as l}from"@mui/material/styles";import{forwardRef as s,useState as p,useEffect as d,useCallback as m}from"react";import{paletteLight as u}from"../../design/skoda/paletteLight.theme.js";import{ternaryCondition as c}from"../../utils/utilities.js";import{IconButton as h}from"../iconButton/index.js";import{Icon as f}from"../icon/icon.js";import"../icon/icon.definitions.js";const x=(e,t)=>""===e||"number"==typeof e&&e-1>0&&e+1<=t||"number"==typeof parseInt(e)&&parseInt(e)>0&&parseInt(e)<=t,g=(e,n,o,r,a,l)=>t(h,{variant:"standard",onClick:n,disabled:o,children:["forward"===r&&!a&&l,i(f,{name:e}),"back"===r&&!a&&l]}),b=s(((l,s)=>{var{count:u,isDisabled:h,page:b,prevButtonLabel:B,nextButtonLabel:y,defaultPage:w,hideNextButton:L,hidePrevButton:j,hideFirstButton:I,hideLastButton:C,hideLabels:k,onValueChange:P}=l,z=e(l,["count","isDisabled","page","prevButtonLabel","nextButtonLabel","defaultPage","hideNextButton","hidePrevButton","hideFirstButton","hideLastButton","hideLabels","onValueChange"]);const M=w||1,[N,S]=p(M),[V,W]=p(!0),[D,F]=p();d((()=>{N&&P&&P(N)}),[N,P]),d((()=>{V?W(!1):b&&!h&&S(b)}),[h,V,b]);const O=m(((e,t)=>{S(t)}),[]);return t(v,{"data-testid":"Pagination-wrapper",children:[i(o,Object.assign({className:"desktopView"},z,{shape:"rounded",count:u,disabled:h,page:N,hideNextButton:L,hidePrevButton:j,showFirstButton:!I,showLastButton:!C,ref:s,onChange:O,renderItem:e=>i(r,Object.assign({className:c(j,!1,"MuiPagination-prev",""),components:{first:()=>i(f,{name:"previous",fontSize:"small"}),last:()=>i(f,{name:"next",fontSize:"small"}),previous:()=>t(n,{children:[i(f,{name:"chevron-left",fontSize:"small"}),i(n,{children:B})]}),next:()=>t(n,{children:[i(n,{children:y}),i(f,{name:"chevron-right",fontSize:"small"})]})}},e))}))," ",i("div",{style:{display:"flex",flexDirection:"column"},className:"mobileView "+(h?"paginationDisabled":""),children:t("div",{className:"mobileContainer",children:[g("chevron-previous",(()=>x(N-1,u)&&S(1)),!x(N-1,u)),g("chevron-left",(()=>x(N-1,u)&&S(N-1)),!x(N-1,u),"back",k,B),i(a,{className:"textFieldContainer",value:N,inputProps:{inputMode:"numeric",pattern:`[1-${u}]*`},onChange:e=>(e=>{""===e&&(F(N),S(e));const t=parseInt(e);"number"==typeof t&&x(t,u)&&(F(t),S(t))})(e.target.value),onBlur:()=>""===N&&S(D)}),g("chevron-right",(()=>x(N+1,u)&&S(N+1)),!x(N+1,u),"forward",k,y),g("chevron-next",(()=>x(N+1,u)&&S(u)),!x(N+1,u))]})})]})})),v=l("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:u.transparent.primary,border:0,borderRadius:"4px",fontSize:"16px",fontWeight:"400",height:"36px",lineHeight:"36px",minWidth:"44px",maxWidth:"50px",padding:"0 4px",textAlign:"center",color:u.text.primary},"& fieldset":{visibility:"hidden"},"& div":{"&::before":{borderBottom:0},"&::after":{borderBottom:0}}},"& .controllerContainer":{"& .arrowLabel":{color:u.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:u.text.primary,fontSize:"12px",fontWeight:"400",lineHeight:"24px",marginTop:"4px"},"&.paginationDisabled":{pointerEvents:"none","& .counter_label, .MuiIcon-root,.arrowLabel, input, fieldset":{color:u.disabled.primary}}})},t}));export{b as Pagination};
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","IconButton","variant","children","_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","ternaryCondition","components","first","fontSize","last","previous","_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":"qlBAiBA,MAAMA,EAAoB,CAACC,EAAYC,IACZ,KAAfD,GACmB,iBAAfA,GAA2BA,EAAa,EAAI,GAAKA,EAAa,GAAKC,GAC1C,iBAAzBC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,aAAc,GAElB,WAAY,CACRA,aAAc,KAGvB,yBAA0B,CACzB,gBAAiB,CACbH,MAAOX,EAAWY,KAAKV,QACvBpC,SAAU,OACVuC,WAAY,MACZC,WAAY,QAEhB,yBAA0B,CACtBZ,YAAa,MACbtB,QAAS,eAEb,uBAAwB,CACpBuB,WAAY,MACZvB,QAAS,eAEb,kBAAmB,CACfN,SAAU,OACVwB,MAAO,OACPO,OAAQ,SAEb,mBAAoB,CACnBc,MAAOX,EAAWY,KAAKV,QACvBpC,SAAU,OACVuC,WAAY,MACZC,WAAY,OACZS,UAAW,OACZ,uBAAwB,CACvBC,cAAe,OACf,+DAAgE,CAC5DL,MAAOX,EAAWzF,SAAS2F,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","IconButton","variant","children","_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","ternaryCondition","components","first","fontSize","last","previous","_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":"4lBAiBA,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,EAAMC,EAAY,CAAEC,QAAS,WAAYP,QAASA,EAASC,SAAUA,EAAUO,SAAU,CAAe,YAAdN,IAA4BC,GAAaC,EAAOK,EAAKC,EAAM,CAAEC,KAAMZ,IAA0B,SAAdG,IAAyBC,GAAaC,KACzRQ,EAAaC,GAAW,CAACC,EAAIC,KACtC,IAAInB,MAAEA,EAAKoB,WAAEA,EAAUC,KAAEA,EAAIC,gBAAEA,EAAeC,gBAAEA,EAAeC,YAAEA,EAAWC,eAAEA,EAAcC,eAAEA,EAAcC,gBAAEA,EAAeC,eAAEA,EAAcC,WAAEA,EAAUC,cAAEA,GAAkBZ,EAAIa,EAAQC,EAAOd,EAAI,CAAC,QAAS,aAAc,OAAQ,kBAAmB,kBAAmB,cAAe,iBAAkB,iBAAkB,kBAAmB,iBAAkB,aAAc,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AAMK,YAAYE,KAAK,OAAQ,CAC5B,iBAAkB,CACdrB,QAAS,mBAGjB,iBAAkB,CACd,yBAA0B,CACtBsB,YAAa,MACbtB,QAAS,eAEb,uBAAwB,CACpBuB,WAAY,MACZvB,QAAS,gBAGjB,gBAAiBnB,OAAOC,OAAOD,OAAOC,OAAO,GAAIiC,GAAY,CAAEd,cAAe,SAAUuB,SAAU,SAAU,qBAAsB3C,OAAOC,OAAOD,OAAOC,OAAO,CAAE,EAAEiC,GAAY,CAAES,SAAU,WAAa,wBAAyB,CACxNC,OAAQ,OACRC,OAAQ,SACR,oBAAqB,CACjBC,gBAAiBC,EAAWC,YAAYC,QACxCC,OAAQ,EACRC,aAAc,MACdtC,SAAU,OACVuC,WAAY,MACZR,OAAQ,OACRS,WAAY,OACZC,SAAU,OACVC,SAAU,OACVC,QAAS,QACTC,UAAW,SACXC,MAAOX,EAAWY,KAAKV,SAE3B,aAAc,CACVW,WAAY,UAEhB,QAAS,CACL,YAAa,CACTC,aAAc,GAElB,WAAY,CACRA,aAAc,KAGvB,yBAA0B,CACzB,gBAAiB,CACbH,MAAOX,EAAWY,KAAKV,QACvBpC,SAAU,OACVuC,WAAY,MACZC,WAAY,QAEhB,yBAA0B,CACtBZ,YAAa,MACbtB,QAAS,eAEb,uBAAwB,CACpBuB,WAAY,MACZvB,QAAS,eAEb,kBAAmB,CACfN,SAAU,OACVwB,MAAO,OACPO,OAAQ,SAEb,mBAAoB,CACnBc,MAAOX,EAAWY,KAAKV,QACvBpC,SAAU,OACVuC,WAAY,MACZC,WAAY,OACZS,UAAW,OACZ,uBAAwB,CACvBC,cAAe,OACf,+DAAgE,CAC5DL,MAAOX,EAAWzF,SAAS2F,aAIpC/B,CAAK"}
@@ -1,2 +1,2 @@
1
- import{__rest as t}from"tslib";import e from"@mui/material/FormControl";import{styled as o}from"@mui/material/styles";import{flowColors as i}from"../../design/skoda/palette.theme.js";const a=o(e,{shouldForwardProp:t=>"helpText"!==t&&"hideBg"!==t&&"hasError"!==t&&"hovered"!==t&&"value"!==t&&"staticLabel"!==t})((e=>{var{theme:o}=e,a=t(e,["theme"]);let n={};const r=(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),s={paddingBottom:a.staticLabel?"16px":"6px",paddingTop:a.staticLabel?"16px":"26px"};n={height:"56px",minWidth:"200px !important",background:i.transparent.primary,borderRadius:"4px 4px 0px 0px",borderBottom:a.focused?`2px solid ${i.brand.primary}`:a.value?`1px solid ${i.onSurface.os900}`:`1px solid ${i.onSurface.os500}`,"& > .MuiIcon-root":Object.assign(Object.assign({},r),{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?i.text.primary:i.onSurface.os500,maxWidth:"calc(100% - 56px)","&:hover":{color:i.text.primary}},"& > label.MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(14px, 8px) scale(0.75)",paddingLeft:0,fontWeight:400,color:a.focused?i.brand.primary:i.onSurface.os500},"& > label.MuiInputLabel-root.MuiInputLabel-shrink.Mui-disabled":{color:i.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.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({},r),{right:"15.5px",width:"24px",top:"19px"})}};const p=n["& > label.MuiInputLabel-root"];if(a.icon&&(n=Object.assign(Object.assign({},n),{"& > label.MuiInputLabel-root":Object.assign(Object.assign({},p),{paddingLeft:"40px"}),"& > label.MuiInputLabel-root.MuiInputLabel-shrink":Object.assign(Object.assign({},n["& > 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.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({},r),{right:"12.5px",width:"24px",top:"19px","&:hovered":{}})}})),a.disabled&&(p.color=i.disabled.primary,n=Object.assign(Object.assign({},n),{borderBottom:`1px solid ${i.disabled.primary}`,"& > .MuiIcon-root":Object.assign(Object.assign({},r),{width:"50px",height:"56px",display:"inline-flex",top:"0",alignItems:"center",justifyContent:"center",paddingBottom:"8px",color:o.palette.disabled.primary}),"& > .MuiInputBase-root":Object.assign(Object.assign({},n["& > .MuiInputBase-root"]),{"& > .MuiIcon-root":Object.assign(Object.assign({},r),{right:"12.5px",top:"19px",color:o.palette.disabled.primary})})})),a.error){const t=a.focused||a.hovered?o.palette.alert.main:o.palette.onSurface.os500;p.color=t,n=Object.assign(Object.assign({},n),{borderBottom:`2px solid ${o.palette.alert.main}`,"& > label.MuiInputLabel-root.MuiInputLabel-shrink":Object.assign(Object.assign({},n["& > label.MuiInputLabel-root.MuiInputLabel-shrink"]),{color:t})})}return n}));export{a as FormControlSelectStyled};
1
+ import{__rest as t}from"tslib";import e from"@mui/material/FormControl";import{styled as o}from"@mui/material/styles";import{paletteLight as i}from"../../design/skoda/paletteLight.theme.js";const a=o(e,{shouldForwardProp:t=>"helpText"!==t&&"hideBg"!==t&&"hasError"!==t&&"hovered"!==t&&"value"!==t&&"staticLabel"!==t})((e=>{var{theme:o}=e,a=t(e,["theme"]);let n={};const r=(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),s={paddingBottom:a.staticLabel?"16px":"6px",paddingTop:a.staticLabel?"16px":"26px"};n={height:"56px",minWidth:"200px !important",background:i.transparent.primary,borderRadius:"4px 4px 0px 0px",borderBottom:a.focused?`2px solid ${i.brand.primary}`:a.value?`1px solid ${i.onSurface.os900}`:`1px solid ${i.onSurface.os500}`,"& > .MuiIcon-root":Object.assign(Object.assign({},r),{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?i.text.primary:i.onSurface.os500,maxWidth:"calc(100% - 56px)","&:hover":{color:i.text.primary}},"& > label.MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(14px, 8px) scale(0.75)",paddingLeft:0,fontWeight:400,color:a.focused?i.brand.primary:i.onSurface.os500},"& > label.MuiInputLabel-root.MuiInputLabel-shrink.Mui-disabled":{color:i.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.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({},r),{right:"15.5px",width:"24px",top:"19px"})}};const p=n["& > label.MuiInputLabel-root"];if(a.icon&&(n=Object.assign(Object.assign({},n),{"& > label.MuiInputLabel-root":Object.assign(Object.assign({},p),{paddingLeft:"40px"}),"& > label.MuiInputLabel-root.MuiInputLabel-shrink":Object.assign(Object.assign({},n["& > 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.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({},r),{right:"12.5px",width:"24px",top:"19px","&:hovered":{}})}})),a.disabled&&(p.color=i.disabled.primary,n=Object.assign(Object.assign({},n),{borderBottom:`1px solid ${i.disabled.primary}`,"& > .MuiIcon-root":Object.assign(Object.assign({},r),{width:"50px",height:"56px",display:"inline-flex",top:"0",alignItems:"center",justifyContent:"center",paddingBottom:"8px",color:o.palette.disabled.primary}),"& > .MuiInputBase-root":Object.assign(Object.assign({},n["& > .MuiInputBase-root"]),{"& > .MuiIcon-root":Object.assign(Object.assign({},r),{right:"12.5px",top:"19px",color:o.palette.disabled.primary})})})),a.error){const t=a.focused||a.hovered?o.palette.alert.main:o.palette.onSurface.os500;p.color=t,n=Object.assign(Object.assign({},n),{borderBottom:`2px solid ${o.palette.alert.main}`,"& > label.MuiInputLabel-root.MuiInputLabel-shrink":Object.assign(Object.assign({},n["& > label.MuiInputLabel-root.MuiInputLabel-shrink"]),{color:t})})}return n}));export{a as FormControlSelectStyled};
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":"uLAOA,MAUaA,EAA0BC,EAAOC,EAAgB,CAC1DC,kBAAoBC,GAAkB,aAATA,GAChB,WAATA,GACS,aAATA,GACS,YAATA,GACS,UAATA,GACS,gBAATA,GAN+BH,EAOnCI,IACA,IAAIC,MAAEA,GAAUD,EAAIE,EAAQC,EAAOH,EAAI,CAAC,UACxC,IAAII,EAAS,CAAA,EACb,MAAMC,EApBc,CAACH,IACd,CACHI,SAAU,kBACVC,S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Q,OAAQV,QAAS,cAAeyB,IAAK,IAAKiB,WAAY,SAAUC,eAAgB,SAAUpC,cAAe,MAAON,MAAOV,EAAMqD,QAAQZ,SAASjB,UAAY,yBAA0BO,OAAOC,OAAOD,OAAOC,OAAO,GAAI7B,EAAO,2BAA4B,CAAE,oBAAqB4B,OAAOC,OAAOD,OAAOC,OAAO,GAAI5B,GAAY,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","disabled","lineHeight","paddingRight","overflow","textOverflow","boxSizing","marginTop","right","labelStyle","icon","alignItems","justifyContent","palette","error","errorColor","alert"],"mappings":"8LAOA,MAUaA,EAA0BC,EAAOC,EAAgB,CAC1DC,kBAAoBC,GAAkB,aAATA,GAChB,WAATA,GACS,aAATA,GACS,YAATA,GACS,UAATA,GACS,gBAATA,GAN+BH,EAOnCI,IACA,IAAIC,MAAEA,GAAUD,EAAIE,EAAQC,EAAOH,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,EAAWC,YAAYC,QACnCC,aAAc,kBACdC,aAAczB,EAAMU,QACd,aAAaW,EAAWK,MAAMH,UAC9BvB,EAAMW,MACF,aAAaU,EAAWM,UAAUC,QAClC,aAAaP,EAAWM,UAAUE,QAC5C,oBAAqBC,OAAOC,O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AC1GmB,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,2 +1,2 @@
1
- import{__rest as e}from"tslib";import{jsx as o,Fragment as r,jsxs as n}from"react/jsx-runtime";import{useState as t,useRef as l}from"react";import{FormControlSelectStyled as i}from"./formControlSelectStyled.js";import a from"@mui/material/Select";import{Icon as u}from"../icon/icon.js";import"../icon/icon.definitions.js";import{useSelectInput as c}from"./hook/useSelectInput.js";import{styled as d}from"@mui/material/styles";import s from"./inputLabelSelect.js";import{FormHelperText as m}from"@mui/material";import p from"../common/helperText.js";import h from"lodash/noop";const f=a=>{var{label:d=null,onChange:f,onBlur:x,onFocus:v,value:M,children:g,staticLabel:W,InputProps:j,fullWidth:B=!0,removeSelectMenuMaxWidth:C}=a,I=e(a,["label","onChange","onBlur","onFocus","value","children","staticLabel","InputProps","fullWidth","removeSelectMenuMaxWidth"]);const[S,k]=t(""),[F,L]=t(!1),[w,O]=t(!1),[T,P]=t(!1),[q,y]=t(!1),[E,V]=t(null),{handleOnBlur:D,handleOnChange:z,handleOnFocus:A}=c(F,h,h,B,I.helpText,M,k,I.required,P),G=l(null),H=l(null),J={sx:E?{maxWidth:C?"unset":E,"& .MuiBackdrop-root":{background:"transparent",backdropFilter:"blur(0px)"}}:{"& .MuiBackdrop-root":{background:"transparent",backdropFilter:"blur(0px)"}}};return o(r,{children:n(i,Object.assign({},I,{ref:H,staticLabel:W,sx:B?{}:{width:"200px"},disabled:I.disabled,error:I.hasError,value:S,hideBg:I.hideBg,onMouseEnter:()=>{!w&&!q&&O(!0)},onMouseLeave:()=>{w&&!q&&O(!1)},onMouseDown:e=>{const o=e.currentTarget.offsetWidth;V(o)},icon:I.icon,hovered:w,focused:F,variant:"filled",fullWidth:B,children:[I.icon&&o(u,{color:I.disabled?"disabled":"inherit",name:I.icon}),o(s,{staticLabel:W,label:d,opened:q,currentValue:S}),o(b,{MenuProps:J,required:T,onOpen:()=>{y(!0)},onClose:()=>{L(!1),O(!1),y(!1)},onBlur:()=>D(L,x),onFocus:()=>A(L,v),IconComponent:()=>o(u,q?{name:"chevron-up"}:{name:"chevron-down"}),labelId:d,id:I.id,name:I.name,value:S,onChange:e=>z(e,f,k),ref:G,hasIcon:!!I.icon,fullWidth:B,children:g}),o(m,{children:o(p,{maxChars:0,currentValue:S,helpText:I.helpText})})]}))})},b=d(a,{shouldForwardProp:e=>"hasIcon"!==e&&"fullWidth"!==e})((o=>{var r=e(o,["theme"]);if(!r.fullWidth)return null;return{"& > .MuiSelect-filled":{position:"absolute",left:0,top:0,width:r.hasIcon?"calc(100% - 102px) !important":"calc(100% - 62px) !important"}}}));export{f as SelectInput};
1
+ import{__rest as e}from"tslib";import{jsx as o,Fragment as r,jsxs as n}from"react/jsx-runtime";import{useState as t,useRef as l}from"react";import{FormControlSelectStyled as i}from"./formControlSelectStyled.js";import a from"@mui/material/Select";import{Icon as u}from"../icon/icon.js";import"../icon/icon.definitions.js";import{useSelectInput as c}from"./hook/useSelectInput.js";import{styled as d}from"@mui/material/styles";import s from"./inputLabelSelect.js";import{FormHelperText as m}from"@mui/material";import p from"../common/helperText.js";const h=a=>{var{label:d=null,onChange:h,onBlur:b,onFocus:x,value:v,children:M,staticLabel:g,InputProps:W,fullWidth:j=!0,removeSelectMenuMaxWidth:B}=a,C=e(a,["label","onChange","onBlur","onFocus","value","children","staticLabel","InputProps","fullWidth","removeSelectMenuMaxWidth"]);const[I,S]=t(""),[k,F]=t(!1),[L,w]=t(!1),[O,T]=t(!1),[P,q]=t(!1),[y,E]=t(null),{handleOnBlur:V,handleOnChange:D,handleOnFocus:z}=c(k,(()=>{}),(()=>{}),j,C.helpText,v,S,C.required,T),A=l(null),G=l(null),H={sx:y?{maxWidth:B?"unset":y,"& .MuiBackdrop-root":{background:"transparent",backdropFilter:"blur(0px)"}}:{"& .MuiBackdrop-root":{background:"transparent",backdropFilter:"blur(0px)"}}};return o(r,{children:n(i,Object.assign({},C,{ref:G,staticLabel:g,sx:j?{}:{width:"200px"},disabled:C.disabled,error:C.hasError,value:I,hideBg:C.hideBg,onMouseEnter:()=>{!L&&!P&&w(!0)},onMouseLeave:()=>{L&&!P&&w(!1)},onMouseDown:e=>{const o=e.currentTarget.offsetWidth;E(o)},icon:C.icon,hovered:L,focused:k,variant:"filled",fullWidth:j,children:[C.icon&&o(u,{color:C.disabled?"disabled":"inherit",name:C.icon}),o(s,{staticLabel:g,label:d,opened:P,currentValue:I}),o(f,{MenuProps:H,required:O,onOpen:()=>{q(!0)},onClose:()=>{F(!1),w(!1),q(!1)},onBlur:()=>V(F,b),onFocus:()=>z(F,x),IconComponent:()=>o(u,P?{name:"chevron-up"}:{name:"chevron-down"}),labelId:d,id:C.id,name:C.name,value:I,onChange:e=>D(e,h,S),ref:A,hasIcon:!!C.icon,fullWidth:j,children:M}),o(m,{children:o(p,{maxChars:0,currentValue:I,helpText:C.helpText})})]}))})},f=d(a,{shouldForwardProp:e=>"hasIcon"!==e&&"fullWidth"!==e})((o=>{var r=e(o,["theme"]);if(!r.fullWidth)return null;return{"& > .MuiSelect-filled":{position:"absolute",left:0,top:0,width:r.hasIcon?"calc(100% - 102px) !important":"calc(100% - 62px) !important"}}}));export{h as SelectInput};
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":["SelectInput","_a","label","onChange","onBlur","onFocus","value","children","staticLabel","InputProps","fullWidth","removeSelectMenuMaxWidth","props","__rest","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","FormControlSelectStyled","Object","assign","ref","width","disabled","error","hasError","hideBg","onMouseEnter","onMouseLeave","onMouseDown","e","elemWidth","currentTarget","offsetWidth","icon","focused","variant","Icon","color","name","InputLabelSelect","SelectInputStyled","MenuProps","onOpen","onClose","IconComponent","labelId","id","hasIcon","FormHelperText","HelperText","maxChars","styled","MuiSelect","shouldForwardProp","prop","args","position","left","top"],"mappings":"gkBAmBY,MAACA,EAAeC,IACxB,IAAIC,MAAEA,EAAQ,KAAIC,SAAEA,EAAQC,OAAEA,EAAMC,QAAEA,EAAOC,MAAEA,EAAKC,SAAEA,EAAQC,YAAEA,EAAWC,WAAEA,EAAUC,UAAEA,GAAY,EAAIC,yBAAEA,GAA6BV,EAAIW,EAAQC,EAAOZ,EAAI,CAAC,QAAS,WAAY,SAAU,UAAW,QAAS,WAAY,cAAe,aAAc,YAAa,6BACzQ,MAAOa,EAAcC,GAAmBC,EAAS,KAC1CC,EAAWC,GAAgBF,GAAS,IACpCG,EAASC,GAAcJ,GAAS,IAChCK,EAAYC,GAAiBN,GAAS,IACtCO,EAAQC,GAAaR,GAAS,IAC9BS,EAAYC,GAAiBV,EAAS,OACvCW,aAAEA,EAAYC,eAAEA,EAAcC,cAAEA,GAAkBC,EAAeb,EAAWc,EAAMA,EAAMrB,EAAWE,EAAMoB,SAAU1B,EAAOS,EAAiBH,EAAMqB,SAAUX,GAC3JY,EAAWC,EAAO,MAClBC,EAAuBD,EAAO,MAC9BE,EAAY,CACdC,GAAIb,EACE,CACEc,SAAU5B,EAA2B,QAAUc,EAC/C,sBAAuB,CACnBe,WAAY,cACZC,eAAgB,cAGtB,CACE,sBAAuB,CACnBD,WAAY,cACZC,eAAgB,eAIhC,OAAQC,EAAKC,EAAW,CAAEpC,SAAUqC,EAAMC,EAAyBC,OAAOC,OAAO,CAAA,EAAInC,EAAO,CAAEoC,IAAKZ,EAAsB5B,YAAaA,EAAa8B,GAAK5B,EAAiC,CAAA,EAArB,CAAEuC,MAAO,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+B,cAATA,GAD7BH,EAEtB9E,IACG,IAAiBkF,EAAOtE,EAAOZ,EAAI,CAAC,UACvC,IAAKkF,EAAKzE,UACN,OAAO,KAEX,MAAO,CACH,wBAAyB,CACrB0E,SAAU,WACVC,KAAM,EACNC,IAAK,EACLrC,MANMkC,EAAKR,QAAU,gCAAkC,gCAQ9D"}
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":["SelectInput","_a","label","onChange","onBlur","onFocus","value","children","staticLabel","InputProps","fullWidth","removeSelectMenuMaxWidth","props","__rest","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","FormControlSelectStyled","Object","assign","ref","width","disabled","error","hasError","hideBg","onMouseEnter","onMouseLeave","onMouseDown","e","elemWidth","currentTarget","offsetWidth","icon","focused","variant","Icon","color","name","InputLabelSelect","SelectInputStyled","MenuProps","onOpen","onClose","IconComponent","labelId","id","hasIcon","FormHelperText","HelperText","maxChars","styled","MuiSelect","shouldForwardProp","prop","args","position","left","top"],"mappings":"qiBAkBY,MAACA,EAAeC,IACxB,IAAIC,MAAEA,EAAQ,KAAIC,SAAEA,EAAQC,OAAEA,EAAMC,QAAEA,EAAOC,MAAEA,EAAKC,SAAEA,EAAQC,YAAEA,EAAWC,WAAEA,EAAUC,UAAEA,GAAY,EAAIC,yBAAEA,GAA6BV,EAAIW,EAAQC,EAAOZ,EAAI,CAAC,QAAS,WAAY,SAAU,UAAW,QAAS,WAAY,cAAe,aAAc,YAAa,6BACzQ,MAAOa,EAAcC,GAAmBC,EAAS,KAC1CC,EAAWC,GAAgBF,GAAS,IACpCG,EAASC,GAAcJ,GAAS,IAChCK,EAAYC,GAAiBN,GAAS,IACtCO,EAAQC,GAAaR,GAAS,IAC9BS,EAAYC,GAAiBV,EAAS,OACvCW,aAAEA,EAAYC,eAAEA,EAAcC,cAAEA,GAAkBC,EAAeb,GA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,EAAKsB,EAAdxC,EAAoB,CAAE0C,KAAM,cAA6B,CAAEA,KAAM,iBAAoBO,QAAStE,EAAOuE,GAAI7D,EAAM6D,GAAIR,KAAMrD,EAAMqD,KAAM3D,MAAOQ,EAAcX,SAAWqD,GAAM5B,EAAe4B,EAAGrD,EAAUY,GAAkBgC,IAAKd,EAAUyC,UAAW9D,EAAMgD,KAAMlD,UAAWA,EAAWH,SAAUA,IAAakC,EAAKkC,EAAgB,CAAEpE,SAAUkC,EAAKmC,EAAY,CAAEC,SAAU,EAAG/D,aAAcA,EAAciB,SAAUnB,EAAMmB,kBAAwB,EAK/jBoC,EAAoBW,EAAOC,EAAW,CACxCC,kBAAoBC,GAAkB,YAATA,GAA+B,cAATA,GAD7BH,EAEtB7E,IACG,IAAiBiF,EAAOrE,EAAOZ,EAAI,CAAC,UACvC,IAAKiF,EAAKxE,UACN,OAAO,KAEX,MAAO,CACH,wBAAyB,CACrByE,SAAU,WACVC,KAAM,EACNC,IAAK,EACLrC,MANMkC,EAAKR,QAAU,gCAAkC,gCAQ9D"}
@@ -1,2 +1,2 @@
1
- import{__rest as e}from"tslib";import{jsx as o}from"react/jsx-runtime";import{StepConnector as r,stepConnectorClasses as t,Step as n,StepLabel as i}from"@mui/material";import a from"@mui/material/Stepper";import{styled as l}from"@mui/material/styles";import{flowColors as c}from"../../design/skoda/palette.theme.js";const d=r=>{var{activeStep:t,alternativeLabel:l,children:c,classes:d,connector:p,nonLinear:b,orientation:u,step:f}=r,g=e(r,["activeStep","alternativeLabel","children","classes","connector","nonLinear","orientation","step"]);const x={lineHeight:"16px",fontSize:"12px",fontWeight:"400"};return o(h,{children:o("div",{children:o(a,Object.assign({className:"controllerContainer"},g,{activeStep:t,sx:{maxWidth:800,display:"flex",alignItems:"center",spacing:4},alternativeLabel:l,connector:o(m,{}),children:f.map((e=>o(n,{children:o(i,{style:x,StepIconComponent:s,children:e})},e)))}))})})};function s(e){const{active:r,completed:t,className:n}=e;return o(p,{className:n,children:o("div",r?{className:"QontoStepIcon-active"}:t?{className:"QontoStepIcon-completedIcon"}:{className:"QontoStepIcon-circle"})})}const p=l("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:c.onSurface.os700,width:12,height:12,borderRadius:"50%",backgroundColor:"currentColor","&:hover":{borderRadius:"50%",border:`1.5px solid ${c.onSurface.os700}`,color:c.brand.secondary}},"& .QontoStepIcon-active":{color:c.onSurface.os700,width:18,height:18,borderRadius:"50%",marginRight:"5.25px",marginLeft:"0px",backgroundColor:"currentColor","&:hover":{borderRadius:"50%",border:`1.5px solid ${c.onSurface.os700}`,color:c.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 ${c.disabled.tertiary}`,backgroundColor:c.disabled.secondary}}},o})),m=l(r)((({theme:e})=>({[`&.${t.alternativeLabel}`]:{top:10,left:"calc(-50% + 9px)",right:"calc(50% + 9px)"},[`&.${t.active}`]:{[`& .${t.line}`]:{borderColor:c.onSurface.os700,width:"60px"}},[`&.${t.completed}`]:{[`& .${t.line}`]:{borderColor:c.onSurface.os700}},[`& .${t.line}`]:{borderColor:"dark"===e.palette.mode?e.palette.grey[800]:c.disabled.primary,borderTopWidth:3,borderRadius:1}}))),h=l("div")((()=>{let e={};return e={"& .controllerContainer":{display:"flex",alignItems:"center",fontFamily:"SKODA Next",fontStyle:"normal",fontWeight:"700",fontSize:"12px",lineHeight:"16px"}},e}));export{d as Stepper};
1
+ import{__rest as e}from"tslib";import{jsx as o}from"react/jsx-runtime";import{StepConnector as r,stepConnectorClasses as t,Step as n,StepLabel as i}from"@mui/material";import a from"@mui/material/Stepper";import{styled as l}from"@mui/material/styles";import{paletteLight as c}from"../../design/skoda/paletteLight.theme.js";const d=r=>{var{activeStep:t,alternativeLabel:l,children:c,classes:d,connector:p,nonLinear:b,orientation:u,step:f}=r,g=e(r,["activeStep","alternativeLabel","children","classes","connector","nonLinear","orientation","step"]);const x={lineHeight:"16px",fontSize:"12px",fontWeight:"400"};return o(h,{children:o("div",{children:o(a,Object.assign({className:"controllerContainer"},g,{activeStep:t,sx:{maxWidth:800,display:"flex",alignItems:"center",spacing:4},alternativeLabel:l,connector:o(m,{}),children:f.map((e=>o(n,{children:o(i,{style:x,StepIconComponent:s,children:e})},e)))}))})})};function s(e){const{active:r,completed:t,className:n}=e;return o(p,{className:n,children:o("div",r?{className:"QontoStepIcon-active"}:t?{className:"QontoStepIcon-completedIcon"}:{className:"QontoStepIcon-circle"})})}const p=l("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:c.onSurface.os700,width:12,height:12,borderRadius:"50%",backgroundColor:"currentColor","&:hover":{borderRadius:"50%",border:`1.5px solid ${c.onSurface.os700}`,color:c.brand.secondary}},"& .QontoStepIcon-active":{color:c.onSurface.os700,width:18,height:18,borderRadius:"50%",marginRight:"5.25px",marginLeft:"0px",backgroundColor:"currentColor","&:hover":{borderRadius:"50%",border:`1.5px solid ${c.onSurface.os700}`,color:c.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 ${c.disabled.tertiary}`,backgroundColor:c.disabled.secondary}}},o})),m=l(r)((({theme:e})=>({[`&.${t.alternativeLabel}`]:{top:10,left:"calc(-50% + 9px)",right:"calc(50% + 9px)"},[`&.${t.active}`]:{[`& .${t.line}`]:{borderColor:c.onSurface.os700,width:"60px"}},[`&.${t.completed}`]:{[`& .${t.line}`]:{borderColor:c.onSurface.os700}},[`& .${t.line}`]:{borderColor:"dark"===e.palette.mode?e.palette.grey[800]:c.disabled.primary,borderTopWidth:3,borderRadius:1}}))),h=l("div")((()=>{let e={};return e={"& .controllerContainer":{display:"flex",alignItems:"center",fontFamily:"SKODA Next",fontStyle:"normal",fontWeight:"700",fontSize:"12px",lineHeight:"16px"}},e}));export{d as Stepper};
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":["Stepper","_a","activeStep","alternativeLabel","children","classes","connector","nonLinear","orientation","step","props","__rest","styles","lineHeight","fontSize","fontWeight","_jsx","StepperStyled","MuiStepper","Object","assign","className","sx","maxWidth","display","alignItems","spacing","QontoConnector","map","label","Step","StepLabel","style","StepIconComponent","QontoStepIcon","active","completed","QontoStepIconRoot","styled","theme","color","palette","mode","grey","height","flowColors","onSurface","os700","width","borderRadius","backgroundColor","border","brand","secondary","marginRight","marginLeft","cursor","disabled","tertiary","StepConnector","stepConnectorClasses","top","left","right","line","borderColor","primary","borderTopWidth","fontFamily","fontStyle"],"mappings":"4TAMY,MAACA,EAAWC,IACpB,IAAIC,WAAEA,EAAUC,iBAAEA,EAAgBC,SAAEA,EAAQC,QAAEA,EAAOC,UAAEA,EAASC,UAAEA,EAASC,YAAEA,EAAWC,KAAEA,GAASR,EAAIS,EAAQC,EAAOV,EAAI,CAAC,aAAc,mBAAoB,WAAY,UAAW,YAAa,YAAa,cAAe,SAC7N,MAAMW,EAAS,CACXC,WAAY,OACZC,SAAU,OACVC,WAAY,OAQhB,OAAOC,EAAKC,EAAe,CAAEb,SANCY,EAAK,MAAO,CAAEZ,SAAUY,EAAKE,EAAYC,OAAOC,OAAO,CAAEC,UAAW,uBAAyBX,EAAO,CAAER,WAAYA,EAAYoB,GAAI,CACpJC,SAAU,IACVC,QAAS,OACTC,WAAY,SACZC,QAAS,GACVvB,iBAAkBA,EAAkBG,UAAWU,EAAKW,EAAgB,CAAA,GAAKvB,SAAUK,EAAKmB,KAAKC,GAAWb,EAAKc,EAAM,CAAE1B,SAAUY,EAAKe,EAAW,CAAEC,MAAOpB,EAAQqB,kBAAmBC,EAAe9B,SAAUyB,KAAYA,WACzK,EAE9D,SAASK,EAAcxB,GACnB,MAAMyB,OAAEA,EAAMC,UAAEA,EAASf,UAAEA,GAAcX,EACzC,OAAQM,EAAKqB,EAAmB,CAAEhB,UAAWA,EAAW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S,CACjCC,YAAapB,EAAWC,UAAUC,QAG1C,CAAC,MAAMa,EAAqBI,QAAS,CACjCC,YAAoC,SAAvB1B,EAAME,QAAQC,KAAkBH,EAAME,QAAQE,KAAK,KAAOE,EAAWY,SAASS,QAC3FC,eAAgB,EAChBlB,aAAc,OAGhBhC,EAAgBqB,EAAO,MAAPA,EAAc,KAChC,IAAIN,EAAQ,CAAA,EAaZ,OAXAA,EAAQ,CACJ,yBAA0B,CACtBR,QAAS,OACTC,WAAY,SACZ2C,WALW,aAMXC,UAAW,SACXtD,WAAY,MACZD,SAAU,OACVD,WAAY,SAGbmB,CAAK"}
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":["Stepper","_a","activeStep","alternativeLabel","children","classes","connector","nonLinear","orientation","step","props","__rest","styles","lineHeight","fontSize","fontWeight","_jsx","StepperStyled","MuiStepper","Object","assign","className","sx","maxWidth","display","alignItems","spacing","QontoConnector","map","label","Step","StepLabel","style","StepIconComponent","QontoStepIcon","active","completed","QontoStepIconRoot","styled","theme","color","palette","mode","grey","height","flowColors","onSurface","os700","width","borderRadius","backgroundColor","border","brand","secondary","marginRight","marginLeft","cursor","disabled","tertiary","StepConnector","stepConnectorClasses","top","left","right","line","borderColor","primary","borderTopWidth","fontFamily","fontStyle"],"mappings":"mUAMY,MAACA,EAAWC,IACpB,IAAIC,WAAEA,EAAUC,iBAAEA,EAAgBC,SAAEA,EAAQC,QAAEA,EAAOC,UAAEA,EAASC,UAAEA,EAASC,YAAEA,EAAWC,KAAEA,GAASR,EAAIS,EAAQC,EAAOV,EAAI,CAAC,aAAc,mBAAoB,WAAY,UAAW,YAAa,YAAa,cAAe,SAC7N,MAAMW,EAAS,CACXC,WAAY,OACZC,SAAU,OACVC,WAAY,OAQhB,OAAOC,EAAKC,EAAe,CAAEb,SANCY,EAAK,MAAO,CAAEZ,SAAUY,EAAKE,EAAYC,OAAOC,OAAO,CAAEC,UAAW,uBAAyBX,EAAO,CAAER,WAAYA,EAAYoB,GAAI,CACpJC,SAAU,IACVC,QAAS,OACTC,WAAY,SACZC,QAAS,GACVvB,iBAAkBA,EAAkBG,UAAWU,EAAKW,EAAgB,CAAA,GAAKvB,SAAUK,EAAKmB,KAAKC,GAAWb,EAAKc,EAAM,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AC5C0D,IAAK,GACLC,KAAM,mBACNC,MAAO,mBAEX,CAAC,KAAKH,EAAqBzB,UAAW,CAClC,CAAC,MAAMyB,EAAqBI,QAAS,CACjCC,YAAapB,EAAWC,UAAUC,MAClCC,MAAO,SAGf,CAAC,KAAKY,EAAqBxB,aAAc,CACrC,CAAC,MAAMwB,EAAqBI,QAAS,CACjCC,YAAapB,EAAWC,UAAUC,QAG1C,CAAC,MAAMa,EAAqBI,QAAS,CACjCC,YAAoC,SAAvB1B,EAAME,QAAQC,KAAkBH,EAAME,QAAQE,KAAK,KAAOE,EAAWY,SAASS,QAC3FC,eAAgB,EAChBlB,aAAc,OAGhBhC,EAAgBqB,EAAO,MAAPA,EAAc,KAChC,IAAIN,EAAQ,CAAA,EAaZ,OAXAA,EAAQ,CACJ,yBAA0B,CACtBR,QAAS,OACTC,WAAY,SACZ2C,WALW,aAMXC,UAAW,SACXtD,WAAY,MACZD,SAAU,OACVD,WAAY,SAGbmB,CAAK"}
@@ -1,2 +1,2 @@
1
- import{__rest as e}from"tslib";import{jsx as r}from"react/jsx-runtime";import{TextField as o}from"@mui/material";import a from"lodash/noop";import{forwardRef as l,useState as n,useCallback as t}from"react";import m from"../common/helperText.js";import{useTextAreaEffect as s}from"./hook/useTextAreaEffect.js";const i=l(((l,i)=>{var{name:u,id:h,label:p=null,onChange:c,onBlur:d,onFocus:x,value:f}=l,b=e(l,["name","id","label","onChange","onBlur","onFocus","value"]);const[C,g]=n(""),[v,T]=n(!1),[j,B]=n(!1),[,F]=n(!1),k=t((e=>{((e,r,o,a)=>{const l=e.target.value;(!r||r<0||r&&l.length<=r)&&(o(l),a&&a(e))})(e,b.maxChars,g,c)}),[b.maxChars,c]),E=t((e=>{((e,r,o,a)=>{r(!!e),o(!1),a&&a()})(C,T,B,(()=>d?d(e):a()))}),[C,d]),L=t((e=>{((e,r,o)=>{r(!0),e(!0),o&&o()})(T,B,(()=>x?x(e):a()))}),[x]);return s(C,f,b.maxChars,b.required,T,g,F),r(o,Object.assign({},b,{onChange:k,value:C,onFocus:L,multiline:!0,InputLabelProps:{shrink:v},onBlur:E,focused:j,label:p||null,hiddenLabel:!p,name:u,ref:i,id:h,error:b.hasError,disabled:b.disabled,helperText:r(m,{maxChars:b.maxChars,currentValue:C,helpText:b.helpText})}))}));export{i as TextArea};
1
+ import{__rest as e}from"tslib";import{jsx as r}from"react/jsx-runtime";import{TextField as a}from"@mui/material";import{forwardRef as o,useState as l,useCallback as n}from"react";import t from"../common/helperText.js";import{useTextAreaEffect as m}from"./hook/useTextAreaEffect.js";const s=o(((o,s)=>{var{name:u,id:i,label:h=null,onChange:c,onBlur:p,onFocus:x,value:d}=o,f=e(o,["name","id","label","onChange","onBlur","onFocus","value"]);const[b,C]=l(""),[g,v]=l(!1),[T,j]=l(!1),[,B]=l(!1),F=n((e=>{((e,r,a,o)=>{const l=e.target.value;(!r||r<0||r&&l.length<=r)&&(a(l),o&&o(e))})(e,f.maxChars,C,c)}),[f.maxChars,c]),k=n((e=>{((e,r,a,o)=>{r(!!e),a(!1),o&&o()})(b,v,j,(()=>p?p(e):()=>{}))}),[b,p]),E=n((e=>{((e,r,a)=>{r(!0),e(!0),a&&a()})(v,j,(()=>x?x(e):()=>{}))}),[x]);return m(b,d,f.maxChars,f.required,v,C,B),r(a,Object.assign({},f,{onChange:F,value:b,onFocus:E,multiline:!0,InputLabelProps:{shrink:g},onBlur:k,focused:T,label:h||null,hiddenLabel:!h,name:u,ref:s,id:i,error:f.hasError,disabled:f.disabled,helperText:r(t,{maxChars:f.maxChars,currentValue:b,helpText:f.helpText})}))}));export{s as TextArea};
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","HelperText","helpText"],"mappings":"qTAiBA,MAwBaA,EAAWC,GAAW,CAACC,EAAIC,KACpC,IAAIC,KAAEA,EAAIC,GAAEA,EAAEC,MAAEA,EAAQ,KAAIC,SAAEA,EAAQC,OAAEA,EAAMC,QAAEA,EAAOC,MAAEA,GAAUR,EAAIS,EAAQC,EAAOV,EAAI,CAAC,OAAQ,KAAM,QAAS,WAAY,SAAU,UAAW,UACnJ,MAAOW,EAAcC,GAAmBC,EAAS,KAC1CC,EAAUC,GAAeF,GAAS,IAClCG,EAAWC,GAAgBJ,GAAS,KAClCK,GAAiBL,GAAS,GAC7BM,EAAgCC,GAAaC,IA9B/B,EAACA,EAAGC,EAAUV,EAAiBP,KACnD,MAAMkB,EAAaF,EAAEG,OAAOhB,QACvBc,GAAYA,EAAW,GAAMA,GAAYC,EAAWE,QAAUH,KAC/DV,EAAgBW,GAChBlB,GAAYA,EAASgB,GACxB,EA0BGK,CAAgBL,EAAGZ,EAAMa,SAAUV,EAAiBP,EAAS,GAC9D,CAACI,EAAMa,SAAUjB,IACdsB,EAA8BP,GAAaQ,IAxB/B,EAACjB,EAAcI,EAAaE,EAAcX,KAC5DS,IAAYJ,GACZM,GAAa,GACbX,GAAUA,GAAQ,EAsBduB,CAAclB,EAAcI,EAAaE,GAAc,IAAOX,EAASA,EAAOsB,GAASE,KAAQ,GAChG,CAACnB,EAAcL,IACZyB,EAA+BX,GAAaQ,IApB/B,EAACb,EAAaE,EAAcV,KAC/CU,GAAa,GACbF,GAAY,GACZR,GAAWA,GAAS,EAkBhByB,CAAejB,EAAaE,GAAc,IAAOV,EAAUA,EAAQqB,GAASE,KAAQ,GACrF,CAACvB,IAEJ,OADA0B,EAAkBtB,EAAcH,EAAOC,EAAMa,SAAUb,EAAMyB,SAAUnB,EAAaH,EAAiBM,GAC7FiB,EAAKC,EAAWC,OAAOC,OAAO,CAAA,EAAI7B,EAAO,CAAEJ,SAAUc,EAA+BX,MAAOG,EAAcJ,QAASwB,EAA8BQ,WAAW,EAAMC,gBAAiB,CAClLC,OAAQ3B,GACTR,OAAQqB,EAA6Be,QAAS1B,EAAWZ,MAAOA,GAAgB,KAAMuC,aAAcvC,EAAOF,KAAMA,EAAMD,IAAKA,EAAKE,GAAIA,EAAIyC,MAAOnC,EAAMoC,SAAUC,SAAUrC,EAAMqC,SAAUC,WAAYZ,EAAKa,EAAY,CAAE1B,SAAUb,EAAMa,SAAUX,aAAcA,EAAcsC,SAAUxC,EAAMwC,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","HelperText","helpText"],"mappings":"0RAgBA,MAwBaA,EAAWC,GAAW,CAACC,EAAIC,KACpC,IAAIC,KAAEA,EAAIC,GAAEA,EAAEC,MAAEA,EAAQ,KAAIC,SAAEA,EAAQC,OAAEA,EAAMC,QAAEA,EAAOC,MAAEA,GAAUR,EAAIS,EAAQC,EAAOV,EAAI,CAAC,OAAQ,KAAM,QAAS,WAAY,SAAU,UAAW,UACnJ,MAAOW,EAAcC,GAAmBC,EAAS,KAC1CC,EAAUC,GAAeF,GAAS,IAClCG,EAAWC,GAAgBJ,GAAS,KAClCK,GAAiBL,GAAS,GAC7BM,EAAgCC,GAAaC,IA9B/B,EAACA,EAAGC,EAAUV,EAAiBP,KACnD,MAAMkB,EAAaF,EAAEG,OAAOhB,QACvBc,GAAYA,EAAW,GAAMA,GAAYC,EAAWE,QAAUH,KAC/DV,EAAgBW,GAChBlB,GAAYA,EAASgB,GACxB,EA0BGK,CAAgBL,EAAGZ,EAAMa,SAAUV,EAAiBP,EAAS,GAC9D,CAACI,EAAMa,SAAUjB,IACdsB,EAA8BP,GAAaQ,IAxB/B,EAACjB,EAAcI,EAAaE,EAAcX,KAC5DS,IAAYJ,GACZM,GAAa,GACbX,GAAUA,GAAQ,EAsBduB,CAAclB,EAAcI,EAAaE,GAAc,IAAOX,EAASA,EAAOsB,GAAS,QAAW,GACnG,CAACjB,EAAcL,IACZwB,EAA+BV,GAAaQ,IApB/B,EAACb,EAAaE,EAAcV,KAC/CU,GAAa,GACbF,GAAY,GACZR,GAAWA,GAAS,EAkBhBwB,CAAehB,EAAaE,GAAc,IAAOV,EAAUA,EAAQqB,GAAS,QAAW,GACxF,CAACrB,IAEJ,OADAyB,EAAkBrB,EAAcH,EAAOC,EAAMa,SAAUb,EAAMwB,SAAUlB,EAAaH,EAAiBM,GAC7FgB,EAAKC,EAAWC,OAAOC,OAAO,CAAA,EAAI5B,EAAO,CAAEJ,SAAUc,EAA+BX,MAAOG,EAAcJ,QAASuB,EAA8BQ,WAAW,EAAMC,gBAAiB,CAClLC,OAAQ1B,GACTR,OAAQqB,EAA6Bc,QAASzB,EAAWZ,MAAOA,GAAgB,KAAMsC,aAActC,EAAOF,KAAMA,EAAMD,IAAKA,EAAKE,GAAIA,EAAIwC,MAAOlC,EAAMmC,SAAUC,SAAUpC,EAAMoC,SAAUC,WAAYZ,EAAKa,EAAY,CAAEzB,SAAUb,EAAMa,SAAUX,aAAcA,EAAcqC,SAAUvC,EAAMuC,aAAiB"}
@@ -1,2 +1,2 @@
1
- import{__rest as e}from"tslib";import{jsx as o}from"react/jsx-runtime";import{useState as r,useRef as n}from"react";import{Icon as l}from"../icon/icon.js";import"../icon/icon.definitions.js";import{InputAdornment as t}from"@mui/material";import a from"../common/styled/textFieldStyled.js";import{useTextInput as i}from"./hook/useTextInput.js";import s from"../common/hook/useWindowSize.js";import{useTextInputEffect as m}from"./hook/useTextInputEffect.js";import d from"../common/helperText.js";import h from"lodash/noop";const u=u=>{var{name:c,id:p,label:f=null,onChange:x,onBlur:b,onFocus:C,value:j,placeholder:v,hasError:F,fullWidth:k=!0,excludeChars:y}=u,g=e(u,["name","id","label","onChange","onBlur","onFocus","value","placeholder","hasError","fullWidth","excludeChars"]);const[T,w]=r(j||""),[I,L]=r(!1),[B,D]=r(!1),[E,O]=r(!1),[W,K]=r(!1),{handleOnBlur:P,handleOnFocus:M,handleOnChange:N,handlePlaceholder:S}=i(f,W,v,g.type),q=n(null),{width:z}=s();return m(q,h,k,z,T,j,g.maxChars,g.required,L,w,K),o("div",{children:o(a,Object.assign({},g,{className:[g.icon?"textField-Icon":"",f?"textField-Label":"textField-NoLabel"].join(" "),InputLabelProps:{shrink:I},InputProps:g.icon?{startAdornment:o(t,{position:"start",children:o(l,{color:g.disabled?"disabled":"inherit",name:g.icon})})}:{},onChange:e=>N(e,g.maxChars,x,w),value:T,onFocus:e=>M(e,D,L,C),onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),hovered:E,onBlur:e=>P(e,L,D,b,T),focused:B,placeholder:S,label:v?null:f,hiddenLabel:!!v,name:c,ref:q,id:p,error:F,fullWidth:k,onKeyDown:e=>{g.onKeyDownCallback&&g.onKeyDownCallback(e),y&&y.length>0&&y.includes(e.key)&&e.preventDefault()},helperText:o(d,{maxChars:g.maxChars,currentValue:T,helpText:g.helpText})}))})};export{u as TextInput};
1
+ import{__rest as e}from"tslib";import{jsx as o}from"react/jsx-runtime";import{useState as n,useRef as r}from"react";import{Icon as l}from"../icon/icon.js";import"../icon/icon.definitions.js";import{InputAdornment as t}from"@mui/material";import a from"../common/styled/textFieldStyled.js";import{useTextInput as i}from"./hook/useTextInput.js";import s from"../common/hook/useWindowSize.js";import{useTextInputEffect as m}from"./hook/useTextInputEffect.js";import d from"../common/helperText.js";const h=h=>{var{name:u,id:c,label:p=null,onChange:f,onBlur:x,onFocus:b,value:C,placeholder:j,hasError:v,fullWidth:F=!0,excludeChars:k}=h,y=e(h,["name","id","label","onChange","onBlur","onFocus","value","placeholder","hasError","fullWidth","excludeChars"]);const[g,T]=n(C||""),[w,I]=n(!1),[L,B]=n(!1),[D,E]=n(!1),[O,W]=n(!1),{handleOnBlur:K,handleOnFocus:P,handleOnChange:M,handlePlaceholder:N}=i(p,O,j,y.type),S=r(null),{width:q}=s();return m(S,(()=>{}),F,q,g,C,y.maxChars,y.required,I,T,W),o("div",{children:o(a,Object.assign({},y,{className:[y.icon?"textField-Icon":"",p?"textField-Label":"textField-NoLabel"].join(" "),InputLabelProps:{shrink:w},InputProps:y.icon?{startAdornment:o(t,{position:"start",children:o(l,{color:y.disabled?"disabled":"inherit",name:y.icon})})}:{},onChange:e=>M(e,y.maxChars,f,T),value:g,onFocus:e=>P(e,B,I,b),onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),hovered:D,onBlur:e=>K(e,I,B,x,g),focused:L,placeholder:N,label:j?null:p,hiddenLabel:!!j,name:u,ref:S,id:c,error:v,fullWidth:F,onKeyDown:e=>{y.onKeyDownCallback&&y.onKeyDownCallback(e),k&&k.length>0&&k.includes(e.key)&&e.preventDefault()},helperText:o(d,{maxChars:y.maxChars,currentValue:g,helpText:y.helpText})}))})};export{h as TextInput};
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":["TextInput","_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","maxChars","required","_jsx","children","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":"0gBAkBY,MAACA,EAAaC,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,EAAOb,EAAI,CAAC,OAAQ,KAAM,QAAS,WAAY,SAAU,UAAW,QAAS,cAAe,WAAY,YAAa,iBAC3P,MAAOc,EAAcC,GAAmBC,EAAST,GAAS,KACnDU,EAAUC,GAAeF,GAAS,IAClCG,EAAWC,GAAgBJ,GAAS,IACpCK,EAASC,GAAcN,GAAS,IAChCO,EAAYC,GAAiBR,GAAS,IACvCS,aAAEA,EAAYC,cAAEA,EAAaC,eAAEA,EAAcC,kBAAEA,GAAsBC,EAAa1B,EAAOoB,EAAYf,EAAaI,EAAMkB,MACxHC,EAAWC,EAAO,OAClBC,MAAEA,GAAUC,IAElB,OADAC,EAAmBJ,EAAUK,EAAM1B,EAAWuB,EAAOnB,EAAcP,EAAOK,EAAMyB,SAAUzB,EAAM0B,SAAUpB,EAAaH,EAAiBS,GAChIe,EAAK,MAAO,CAAEC,SAAUD,EAAKE,EAAiBC,OAAOC,OAAO,GAAI/B,EAAO,CAAEgC,UAAW,CAAChC,EAAMiC,KAAO,iBAAmB,GAAI1C,EAAQ,kBAAoB,qBAAqB2C,KAAK,KAAMC,gBAAiB,CAClMC,OAAQ/B,GACTgC,WAAYrC,EAAMiC,KACf,CACEK,eAAiBX,EAAKY,EAAgB,CAAEC,SAAU,QAASZ,SAAUD,EAAKc,EAAM,CAAEC,MAAO1C,EAAM2C,SAAW,WAAa,UAAWtD,KAAMW,EAAMiC,UAEhJ,CAAE,EAAEzC,SAAWoD,GAAU7B,EAAe6B,EAAO5C,EAAMyB,SAAUjC,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,WAAY9B,EAAK+B,EAAY,CAAEjC,SAAUzB,EAAMyB,SAAUvB,aAAcA,EAAcyD,SAAU3D,EAAM2D,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":["TextInput","_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","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":"+eAiBY,MAACA,EAAaC,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,EAAOb,EAAI,CAAC,OAAQ,KAAM,QAAS,WAAY,SAAU,UAAW,QAAS,cAAe,WAAY,YAAa,iBAC3P,MAAOc,EAAcC,GAAmBC,EAAST,GAAS,KACnDU,EAAUC,GAAeF,GAAS,IAClCG,EAAWC,GAAgBJ,GAAS,IACpCK,EAASC,GAAcN,GAAS,IAChCO,EAAYC,GAAiBR,GAAS,IACvCS,aAAEA,EAAYC,cAAEA,EAAaC,eAAEA,EAAcC,kBAAEA,GAAsBC,EAAa1B,EAAOoB,EAAYf,EAAaI,EAAMkB,MACxHC,EAAWC,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CssBaselineProps } 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
- import{jsx as r}from"react/jsx-runtime";import{useMemo as t}from"react";import{StyledEngineProvider as e,ThemeProvider as m,ScopedCssBaseline as i}from"@mui/material";import{createSkodaTheme as o}from"./theme.js";import{useTypographySize as c}from"./theme.typography.js";const n=n=>{const h=c(),p=t((()=>o(h)),[h]);return r(e,{injectFirst:!0,children:r(m,{theme:p,children:r(i,{children:n.children})})})};export{n as SkodaThemeProvider};
1
+ import{__rest as e}from"tslib";import{jsx as r}from"react/jsx-runtime";import{StyledEngineProvider as i,ThemeProvider as t,ScopedCssBaseline as m}from"@mui/material";import{theme as l}from"./theme.js";const n=n=>{var{children:o,theme:a=l,globalBaseline:c=!1}=n,h=e(n,["children","theme","globalBaseline"]);return r(i,{injectFirst:!0,children:r(t,{theme:a,children:c?o:r(m,Object.assign({},h,{children:o}))})})};export{n as SkodaThemeProvider};
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":["SkodaThemeProvider","props","typographySize","useTypographySize","theme","useMemo","createSkodaTheme","_jsx","StyledEngineProvider","injectFirst","children","ThemeProvider","ScopedCssBaseline"],"mappings":"+QAMY,MAACA,EAAsBC,IAC/B,MAAMC,EAAiBC,IACjBC,EAAQC,GAAQ,IAAMC,EAAiBJ,IAAiB,CAACA,IAC/D,OAAQK,EAAKC,EAAsB,CAAEC,aAAa,EAAMC,SAAUH,EAAKI,EAAe,CAAEP,MAAOA,EAAOM,SAAUH,EAAKK,EAAmB,CAAEF,SAAUT,EAAMS,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":["SkodaThemeProvider","_a","children","theme","skodaTheme","globalBaseline","rest","__rest","_jsx","StyledEngineProvider","injectFirst","ThemeProvider","ScopedCssBaseline","Object","assign"],"mappings":"yMAQY,MAACA,EAAsBC,IAC/B,IAAIC,SAAEA,EAAQC,MAAEA,EAAQC,EAAUC,eAAEA,GAAiB,GAAUJ,EAAIK,EAAOC,EAAON,EAAI,CAAC,WAAY,QAAS,mBAC3G,OAAQO,EAAKC,EAAsB,CAAEC,aAAa,EAAMR,SAAUM,EAAKG,EAAe,CAAER,MAAOA,EAAOD,SAAUG,EAAiBH,EAAWM,EAAKI,EAAmBC,OAAOC,OAAO,CAAA,EAAIR,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
- import{jsx as r}from"react/jsx-runtime";import{ScopedCssBaseline as e,debounce as t}from"@mui/material";import{StyledEngineProvider as i,ThemeProvider as o}from"@mui/material/styles";import{createBreakpoints as m}from"@mui/system";import{useMemo as n,useState as s,useCallback as c,useLayoutEffect as a}from"react";import{useMeasure as p,useWindowSize as f}from"react-use";import{flowBreakpoints as h}from"./theme.breakpoints.js";import{useTypographySize as l}from"./theme.typography.js";import{createSkodaTheme as u}from"./theme.js";const d=t=>{const{children:m}=t,{containerBreakpoints:s,containerRef:c}=j(),a=l(s),p=n((()=>u(a,s)),[a,s]);return r("div",{ref:c,children:r(i,{injectFirst:!0,children:r(o,{theme:p,children:r(e,{children:m})})})})},j=()=>{const r=n((()=>m(h)),[]),[e,i]=s(h),[o,{width:l}]=p(),{width:u}=f(),d=c(((e,t)=>{const o=e-t,m=r.keys.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:r.values[t]+o})),{});i({values:m})}),[r]),j=n((()=>t(d,250)),[d]);return a((()=>{j(u,l)}),[u,l,d]),{containerBreakpoints:e,containerRef:o}};export{d as SkodaThemeWidgetProvider};
1
+ import{__rest as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import{useMemo as t}from"react";import{SkodaThemeProvider as m}from"./SkodaThemeProvider.js";import{createSkodaTheme as i}from"./theme.js";import{Box as o}from"@mui/material";import{createTheme as s}from"@mui/material/styles";const n=n=>{var{theme:a}=n,p=r(n,["theme"]);const c=t((()=>{const r=i({widget:!0});return a?s(r,a):r}),[a]);return e(o,{sx:{containerType:"inline-size"},children:e(m,Object.assign({},p,{theme:c}))})};export{n as SkodaThemeWidgetProvider};
2
2
  //# sourceMappingURL=SkodaThemeWidgetProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SkodaThemeWidgetProvider.js","sources":["../../../src/design/skoda/SkodaThemeWidgetProvider.tsx"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { debounce, ScopedCssBaseline } from '@mui/material';\nimport { StyledEngineProvider, ThemeProvider } from '@mui/material/styles';\nimport { createBreakpoints } from '@mui/system';\nimport { useCallback, useLayoutEffect, useMemo, useState } from 'react';\nimport { useMeasure, useWindowSize } from 'react-use';\nimport { flowBreakpoints } from './theme.breakpoints';\nimport { useTypographySize } from './theme.typography';\nimport './theme.extensions';\nimport { createSkodaTheme } from './theme';\nexport const SkodaThemeWidgetProvider = (props) => {\n const { children } = props;\n const { containerBreakpoints, containerRef } = useContainerBreakpoints();\n const typographySize = useTypographySize(containerBreakpoints);\n const theme = useMemo(() => createSkodaTheme(typographySize, containerBreakpoints), [typographySize, containerBreakpoints]);\n return (_jsx(\"div\", { ref: containerRef, children: _jsx(StyledEngineProvider, { injectFirst: true, children: _jsx(ThemeProvider, { theme: theme, children: _jsx(ScopedCssBaseline, { children: children }) }) }) }));\n};\nconst useContainerBreakpoints = () => {\n const windowBreakpoints = useMemo(() => createBreakpoints(flowBreakpoints), []);\n const [containerBreakpoints, setContainerBreakpoints] = useState(flowBreakpoints);\n const [containerRef, { width: containerWidth }] = useMeasure();\n const { width: windowWidth } = useWindowSize();\n const handleResize = useCallback((window, container) => {\n const difference = window - container;\n const newContainerBreakpoints = windowBreakpoints.keys.reduce((prev, curr) => (Object.assign(Object.assign({}, prev), { [curr]: windowBreakpoints.values[curr] + difference })), {});\n setContainerBreakpoints({ values: newContainerBreakpoints });\n }, [windowBreakpoints]);\n const debounceHandleResize = useMemo(() => debounce(handleResize, 250), [handleResize]);\n useLayoutEffect(() => {\n debounceHandleResize(windowWidth, containerWidth);\n }, [windowWidth, containerWidth, handleResize]);\n return { containerBreakpoints, containerRef };\n};\n//# sourceMappingURL=SkodaThemeWidgetProvider.js.map"],"names":["SkodaThemeWidgetProvider","props","children","containerBreakpoints","containerRef","useContainerBreakpoints","typographySize","useTypographySize","theme","useMemo","createSkodaTheme","_jsx","ref","StyledEngineProvider","injectFirst","ThemeProvider","ScopedCssBaseline","windowBreakpoints","createBreakpoints","flowBreakpoints","setContainerBreakpoints","useState","width","containerWidth","useMeasure","windowWidth","useWindowSize","handleResize","useCallback","window","container","difference","newContainerBreakpoints","keys","reduce","prev","curr","Object","assign","values","debounceHandleResize","debounce","useLayoutEffect"],"mappings":"shBAUY,MAACA,EAA4BC,IACrC,MAAMC,SAAEA,GAAaD,GACfE,qBAAEA,EAAoBC,aAAEA,GAAiBC,IACzCC,EAAiBC,EAAkBJ,GACnCK,EAAQC,GAAQ,IAAMC,EAAiBJ,EAAgBH,IAAuB,CAACG,EAAgBH,IACrG,OAAQQ,EAAK,MAAO,CAAEC,IAAKR,EAAcF,SAAUS,EAAKE,EAAsB,CAAEC,aAAa,EAAMZ,SAAUS,EAAKI,EAAe,CAAEP,MAAOA,EAAON,SAAUS,EAAKK,EAAmB,CAAEd,SAAUA,SAAsB,EAEnNG,EAA0B,KAC5B,MAAMY,EAAoBR,GAAQ,IAAMS,EAAkBC,IAAkB,KACrEhB,EAAsBiB,GAA2BC,EAASF,IAC1Df,GAAgBkB,MAAOC,IAAoBC,KAC1CF,MAAOG,GAAgBC,IACzBC,EAAeC,GAAY,CAACC,EAAQC,KACtC,MAAMC,EAAaF,EAASC,EACtBE,EAA0Bf,EAAkBgB,KAAKC,QAAO,CAACC,EAAMC,IAAUC,OAAOC,OAAOD,OAAOC,OAAO,GAAIH,GAAO,CAAEC,CAACA,GAAOnB,EAAkBsB,OAAOH,GAAQL,KAAgB,CAAE,GACnLX,EAAwB,CAAEmB,OAAQP,GAA0B,GAC7D,CAACf,IACEuB,EAAuB/B,GAAQ,IAAMgC,EAASd,EAAc,MAAM,CAACA,IAIzE,OAHAe,GAAgB,KACZF,EAAqBf,EAAaF,EAAe,GAClD,CAACE,EAAaF,EAAgBI,IAC1B,CAAExB,uBAAsBC,eAAc"}
1
+ {"version":3,"file":"SkodaThemeWidgetProvider.js","sources":["../../../src/design/skoda/SkodaThemeWidgetProvider.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useMemo } from 'react';\nimport { SkodaThemeProvider } from './SkodaThemeProvider';\nimport { createSkodaTheme } from './theme';\nimport { Box } from '@mui/material';\nimport { createTheme } from '@mui/material/styles';\n/**\n * Alternative theme provider when the responsive style should be applied based on the container and not window\n */\nexport const SkodaThemeWidgetProvider = (_a) => {\n var { theme } = _a, rest = __rest(_a, [\"theme\"]);\n const composedTheme = useMemo(() => {\n const containerTheme = createSkodaTheme({ widget: true });\n // in case theme is provided, make composition\n if (theme) {\n return createTheme(containerTheme, theme);\n }\n return containerTheme;\n }, [theme]);\n return (_jsx(Box, { sx: { containerType: 'inline-size' }, children: _jsx(SkodaThemeProvider, Object.assign({}, rest, { theme: composedTheme })) }));\n};\n//# sourceMappingURL=SkodaThemeWidgetProvider.js.map"],"names":["SkodaThemeWidgetProvider","_a","theme","rest","__rest","composedTheme","useMemo","containerTheme","createSkodaTheme","widget","createTheme","_jsx","Box","sx","containerType","children","SkodaThemeProvider","Object","assign"],"mappings":"ySAUY,MAACA,EAA4BC,IACrC,IAAIC,MAAEA,GAAUD,EAAIE,EAAOC,EAAOH,EAAI,CAAC,UACvC,MAAMI,EAAgBC,GAAQ,KAC1B,MAAMC,EAAiBC,EAAiB,CAAEC,QAAQ,IAElD,OAAIP,EACOQ,EAAYH,EAAgBL,GAEhCK,CAAc,GACtB,CAACL,IACJ,OAAQS,EAAKC,EAAK,CAAEC,GAAI,CAAEC,cAAe,eAAiBC,SAAUJ,EAAKK,EAAoBC,OAAOC,OAAO,CAAA,EAAIf,EAAM,CAAED,MAAOG,MAAsB"}
@@ -1,2 +1,2 @@
1
- import{flowColors as o}from"../../palette.theme.js";const r={defaultProps:{disableGutters:!0,square:!0},styleOverrides:{root:({theme:r})=>({boxShadow:"unset",borderRadius:"0px",borderTop:`1px solid ${r.palette.divider}`,borderBottom:0,"&::before":{display:"none"},"& .MuiAccordionSummary-root":{lineHeight:"24px",fontWeight:700,fontSize:"16px",color:o.onSurface.os900,letterSpacing:"0.3px",padding:"0px 24px",display:"flex",alignItems:"center","& > .MuiAccordionSummary-expandIconWrapper > .MuiIcon-root":{color:o.onSurface.os900},"& > .MuiAccordionSummary-content":{flexDirection:"column",margin:"24px 20px 24px 0px","& > .accordion-panel-title--sneak-peak":{marginTop:"8px",fontWeight:300}},"&:hover":{"& > .MuiAccordionSummary-expandIconWrapper > div > button":{background:o.transparent.primary}},"&:focus":{backgroundColor:"transparent"}},"& .text":{fontWeight:300,fontSize:"16px",lineHeight:"24px",letterSpacing:"0.3px",color:o.onSurface.os900},"& .MuiAccordionDetails-root":{padding:"0px 24px 16px"},"& .MuiAccordionSummary-expandIconWrapper":{transform:"unset !important","& .MuiIcon-root":{borderRadius:"50%",position:"relative !important",fontSize:"18px"},"& > div":{transform:"unset","& > button":{backgroundColor:"transparent",width:"24px",height:"24px",outline:"none","& .MuiIcon-root":{transform:"rotate(0deg)",transition:"all 0.3s",transformOrigin:"50%","&:before":{fontSize:"16px"}}}},"&.Mui-expanded":{"& .MuiIcon-root":{transform:"rotate(180deg)"}}}})}};export{r as flowAccordion};
1
+ import{paletteLight as o}from"../../paletteLight.theme.js";const r={defaultProps:{disableGutters:!0,square:!0},styleOverrides:{root:({theme:r})=>({boxShadow:"unset",borderRadius:"0px",borderTop:`1px solid ${r.palette.divider}`,borderBottom:0,"&::before":{display:"none"},"& .MuiAccordionSummary-root":{lineHeight:"24px",fontWeight:700,fontSize:"16px",color:o.onSurface.os900,letterSpacing:"0.3px",padding:"0px 24px",display:"flex",alignItems:"center","& > .MuiAccordionSummary-expandIconWrapper > .MuiIcon-root":{color:o.onSurface.os900},"& > .MuiAccordionSummary-content":{flexDirection:"column",margin:"24px 20px 24px 0px","& > .accordion-panel-title--sneak-peak":{marginTop:"8px",fontWeight:300}},"&:hover":{"& > .MuiAccordionSummary-expandIconWrapper > div > button":{background:o.transparent.primary}},"&:focus":{backgroundColor:"transparent"}},"& .text":{fontWeight:300,fontSize:"16px",lineHeight:"24px",letterSpacing:"0.3px",color:o.onSurface.os900},"& .MuiAccordionDetails-root":{padding:"0px 24px 16px"},"& .MuiAccordionSummary-expandIconWrapper":{transform:"unset !important","& .MuiIcon-root":{borderRadius:"50%",position:"relative !important",fontSize:"18px"},"& > div":{transform:"unset","& > button":{backgroundColor:"transparent",width:"24px",height:"24px",outline:"none","& .MuiIcon-root":{transform:"rotate(0deg)",transition:"all 0.3s",transformOrigin:"50%","&:before":{fontSize:"16px"}}}},"&.Mui-expanded":{"& .MuiIcon-root":{transform:"rotate(180deg)"}}}})}};export{r as flowAccordion};
2
2
  //# sourceMappingURL=accordion.theme.js.map