@skodaflow/web-library 4.2.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (424) hide show
  1. package/README.md +61 -47
  2. package/cjs/components/accordion/accordion.d.ts +2 -2
  3. package/cjs/components/accordion/accordion.js +1 -1
  4. package/cjs/components/accordion/accordion.js.map +1 -1
  5. package/cjs/components/banner/banner.d.ts +2 -2
  6. package/cjs/components/banner/banner.js +1 -1
  7. package/cjs/components/banner/banner.js.map +1 -1
  8. package/cjs/components/cardMenu/cardMenu.js +1 -1
  9. package/cjs/components/cardMenu/cardMenu.js.map +1 -1
  10. package/cjs/components/cardMenu/styled/menuListStyled.d.ts +1 -1
  11. package/cjs/components/common/hook/useWindowSize.js +1 -1
  12. package/cjs/components/common/hook/useWindowSize.js.map +1 -1
  13. package/cjs/components/common/styled/textFieldStyled.d.ts +1 -1
  14. package/cjs/components/iconButton/index.d.ts +1 -1
  15. package/cjs/components/indicator/indicator.js.map +1 -1
  16. package/cjs/components/label/label.js.map +1 -1
  17. package/cjs/components/labelFeature/labelFeature.js.map +1 -1
  18. package/cjs/components/labelStatus/labelStatus.js.map +1 -1
  19. package/cjs/components/mobileStepper/index.d.ts +1 -0
  20. package/cjs/components/mobileStepper/mobileStepper.d.ts +1 -1
  21. package/cjs/components/mobileStepper/mobileStepper.js +1 -1
  22. package/cjs/components/mobileStepper/mobileStepper.js.map +1 -1
  23. package/cjs/components/mobileStepper/mobileStepperButton.d.ts +4 -0
  24. package/cjs/components/mobileStepper/mobileStepperButton.js +2 -0
  25. package/cjs/components/mobileStepper/mobileStepperButton.js.map +1 -0
  26. package/cjs/components/modal/modal.d.ts +12 -0
  27. package/cjs/components/modal/modal.js +1 -1
  28. package/cjs/components/modal/modal.js.map +1 -1
  29. package/cjs/components/selectInput/formControlSelectStyled.d.ts +1 -1
  30. package/cjs/components/slider/slider.d.ts +3 -3
  31. package/cjs/components/slider/slider.js +1 -1
  32. package/cjs/components/slider/slider.js.map +1 -1
  33. package/cjs/components/snackbar/snackbarMessage.js +1 -1
  34. package/cjs/components/snackbar/snackbarMessage.js.map +1 -1
  35. package/cjs/components/stepper/stepper.d.ts +2 -2
  36. package/cjs/components/stepper/stepper.js +1 -1
  37. package/cjs/components/stepper/stepper.js.map +1 -1
  38. package/cjs/components/tab/secondaryNavigation/secondaryNavigationTabs.js +1 -1
  39. package/cjs/components/tab/secondaryNavigation/secondaryNavigationTabs.js.map +1 -1
  40. package/cjs/components/tab/tabStyled.d.ts +1 -1
  41. package/cjs/design/skoda/components/accordion/accordion.theme.js +1 -1
  42. package/cjs/design/skoda/components/accordion/accordion.theme.js.map +1 -1
  43. package/cjs/design/skoda/components/accordion/accordionSummary.theme.js +1 -1
  44. package/cjs/design/skoda/components/accordion/accordionSummary.theme.js.map +1 -1
  45. package/cjs/design/skoda/components/autocomplete.theme.js +1 -1
  46. package/cjs/design/skoda/components/autocomplete.theme.js.map +1 -1
  47. package/cjs/design/skoda/components/dialog/dialog.theme.js.map +1 -0
  48. package/cjs/design/skoda/components/dialog/dialogActions.theme.js.map +1 -0
  49. package/cjs/design/skoda/components/dialog/dialogTitle.theme.js.map +1 -0
  50. package/cjs/design/skoda/components/form/filledInput.theme.js.map +1 -0
  51. package/cjs/design/skoda/components/form/formControl.theme.js.map +1 -0
  52. package/cjs/design/skoda/components/form/formControlLabel.theme.js.map +1 -0
  53. package/cjs/design/skoda/components/form/formHelperText.theme.js.map +1 -0
  54. package/cjs/design/skoda/components/form/formLabel.theme.js.map +1 -0
  55. package/cjs/design/skoda/components/form/input.theme.js.map +1 -0
  56. package/cjs/design/skoda/components/form/inputAdornment.theme.js.map +1 -0
  57. package/cjs/design/skoda/components/form/inputBase.theme.js.map +1 -0
  58. package/cjs/design/skoda/components/form/inputLabel.theme.js.map +1 -0
  59. package/cjs/design/skoda/components/form/radio.theme.js +2 -0
  60. package/cjs/design/skoda/components/form/radio.theme.js.map +1 -0
  61. package/cjs/design/skoda/components/form/select.theme.js +2 -0
  62. package/cjs/design/skoda/components/form/select.theme.js.map +1 -0
  63. package/cjs/design/skoda/components/form/slider.theme.js +2 -0
  64. package/cjs/design/skoda/components/form/slider.theme.js.map +1 -0
  65. package/cjs/design/skoda/components/form/switch.theme.js.map +1 -0
  66. package/cjs/design/skoda/components/form/textField.theme.js.map +1 -0
  67. package/cjs/design/skoda/components/layout/breakpoints.theme.js.map +1 -0
  68. package/cjs/design/skoda/components/layout/container.theme.js.map +1 -0
  69. package/cjs/design/skoda/components/layout/grid.theme.js.map +1 -0
  70. package/cjs/design/skoda/components/mobileStepper.theme.js +1 -1
  71. package/cjs/design/skoda/components/mobileStepper.theme.js.map +1 -1
  72. package/cjs/design/skoda/components/stepper/index.d.ts +1 -0
  73. package/cjs/design/skoda/components/stepper/stepIcon/errorStepIcon.d.ts +3 -0
  74. package/cjs/design/skoda/components/stepper/stepIcon/errorStepIcon.js +2 -0
  75. package/cjs/design/skoda/components/stepper/stepIcon/errorStepIcon.js.map +1 -0
  76. package/cjs/design/skoda/components/stepper/stepIcon/index.d.ts +2 -0
  77. package/cjs/design/skoda/components/stepper/stepIcon/index.js +2 -0
  78. package/cjs/design/skoda/components/stepper/stepIcon/index.js.map +1 -0
  79. package/cjs/design/skoda/components/stepper/stepIcon/qontoStepIcon.d.ts +2 -0
  80. package/cjs/design/skoda/components/stepper/stepIcon/qontoStepIcon.js +2 -0
  81. package/cjs/design/skoda/components/stepper/stepIcon/qontoStepIcon.js.map +1 -0
  82. package/cjs/design/skoda/components/stepper/stepper.theme.d.ts +3 -0
  83. package/cjs/design/skoda/components/stepper/stepper.theme.js +2 -0
  84. package/cjs/design/skoda/components/stepper/stepper.theme.js.map +1 -0
  85. package/cjs/design/skoda/components/tabs/tabs.theme.js +1 -1
  86. package/cjs/design/skoda/components/tabs/tabs.theme.js.map +1 -1
  87. package/cjs/design/skoda/theme.js +1 -1
  88. package/cjs/design/skoda/theme.js.map +1 -1
  89. package/cjs/index.js +1 -1
  90. package/cjs/layout/Error/ErrorContent.d.ts +6 -6
  91. package/cjs/layout/Error/ErrorContent.js +1 -1
  92. package/cjs/layout/Error/ErrorContent.js.map +1 -1
  93. package/cjs/layout/Footer/Footer.d.ts +3 -14
  94. package/cjs/layout/Footer/Footer.js +1 -1
  95. package/cjs/layout/Footer/Footer.js.map +1 -1
  96. package/cjs/layout/Footer/FooterAccordion.d.ts +18 -0
  97. package/cjs/layout/Footer/FooterAccordion.js +2 -0
  98. package/cjs/layout/Footer/FooterAccordion.js.map +1 -0
  99. package/cjs/layout/Footer/FooterIconButton.d.ts +6 -2
  100. package/cjs/layout/Footer/FooterIconButton.js +1 -1
  101. package/cjs/layout/Footer/FooterIconButton.js.map +1 -1
  102. package/cjs/layout/Footer/FooterLink.d.ts +15 -0
  103. package/cjs/layout/Footer/FooterLink.js +2 -0
  104. package/cjs/layout/Footer/FooterLink.js.map +1 -0
  105. package/cjs/layout/Footer/FooterMenu.d.ts +21 -0
  106. package/cjs/layout/Footer/FooterMenu.js +2 -0
  107. package/cjs/layout/Footer/FooterMenu.js.map +1 -0
  108. package/cjs/layout/Footer/FooterSectionContact.d.ts +12 -0
  109. package/cjs/layout/Footer/FooterSectionContact.js +2 -0
  110. package/cjs/layout/Footer/FooterSectionContact.js.map +1 -0
  111. package/cjs/layout/Footer/FooterSectionMenu.d.ts +5 -0
  112. package/cjs/layout/Footer/FooterSectionMenu.js +2 -0
  113. package/cjs/layout/Footer/FooterSectionMenu.js.map +1 -0
  114. package/cjs/layout/Footer/PredefinedFooterIconButtons.d.ts +5 -4
  115. package/cjs/layout/Footer/PredefinedFooterIconButtons.js +1 -1
  116. package/cjs/layout/Footer/PredefinedFooterIconButtons.js.map +1 -1
  117. package/cjs/layout/Footer/index.d.ts +5 -1
  118. package/cjs/layout/Header/HeaderButton.js +1 -1
  119. package/cjs/layout/Header/HeaderButton.js.map +1 -1
  120. package/cjs/organisms/cardPhotoAdjustable/cardPhotoAdjustable.js.map +1 -1
  121. package/cjs/organisms/cardPhotoFixed/cardPhotoFixed.js.map +1 -1
  122. package/cjs/organisms/cardTypeOnly/cardTypeOnly.js.map +1 -1
  123. package/cjs/organisms/carousel2/cardCarousel/cardCarousel.js +1 -1
  124. package/cjs/organisms/carousel2/cardCarousel/cardCarousel.js.map +1 -1
  125. package/cjs/organisms/carousel2/components/NavButton.js +1 -1
  126. package/cjs/organisms/carousel2/components/NavButton.js.map +1 -1
  127. package/cjs/organisms/carousel2/heroCarousel/heroCarousel.js +1 -1
  128. package/cjs/organisms/carousel2/heroCarousel/heroCarousel.js.map +1 -1
  129. package/cjs/organisms/common/styled/cardStandardWrapperStyled.d.ts +1 -1
  130. package/cjs/organisms/gallery/Gallery.js +1 -1
  131. package/cjs/organisms/gallery/Gallery.js.map +1 -1
  132. package/cjs/organisms/gallery/GalleryTrigger.js +1 -1
  133. package/cjs/organisms/gallery/GalleryTrigger.js.map +1 -1
  134. package/cjs/organisms/heroImageCard/heroImageCard.js.map +1 -1
  135. package/cjs/organisms/hotspotCard/hotspotCard.d.ts +5 -12
  136. package/cjs/organisms/maps/mapComponents/infoWindowConfig.js.map +1 -1
  137. package/cjs/organisms/maps/maps.js.map +1 -1
  138. package/cjs/organisms/notification/Notification.js +1 -1
  139. package/cjs/organisms/notification/Notification.js.map +1 -1
  140. package/cjs/production/{Button.d.ts → Button/Button.d.ts} +1 -1
  141. package/cjs/production/Button/Button.js.map +1 -0
  142. package/cjs/production/Button/index.d.ts +1 -0
  143. package/cjs/production/index.js +1 -1
  144. package/cjs/utils/utilities.d.ts +1 -1
  145. package/components/accordion/accordion.d.ts +2 -2
  146. package/components/accordion/accordion.js +1 -1
  147. package/components/accordion/accordion.js.map +1 -1
  148. package/components/banner/banner.d.ts +2 -2
  149. package/components/banner/banner.js +1 -1
  150. package/components/banner/banner.js.map +1 -1
  151. package/components/cardMenu/cardMenu.js +1 -1
  152. package/components/cardMenu/cardMenu.js.map +1 -1
  153. package/components/cardMenu/styled/menuListStyled.d.ts +1 -1
  154. package/components/common/hook/useWindowSize.js +1 -1
  155. package/components/common/hook/useWindowSize.js.map +1 -1
  156. package/components/common/styled/textFieldStyled.d.ts +1 -1
  157. package/components/iconButton/index.d.ts +1 -1
  158. package/components/indicator/indicator.js.map +1 -1
  159. package/components/label/label.js.map +1 -1
  160. package/components/labelFeature/labelFeature.js.map +1 -1
  161. package/components/labelStatus/labelStatus.js.map +1 -1
  162. package/components/mobileStepper/index.d.ts +1 -0
  163. package/components/mobileStepper/mobileStepper.d.ts +1 -1
  164. package/components/mobileStepper/mobileStepper.js +1 -1
  165. package/components/mobileStepper/mobileStepper.js.map +1 -1
  166. package/components/mobileStepper/mobileStepperButton.d.ts +4 -0
  167. package/components/mobileStepper/mobileStepperButton.js +2 -0
  168. package/components/mobileStepper/mobileStepperButton.js.map +1 -0
  169. package/components/modal/modal.d.ts +12 -0
  170. package/components/modal/modal.js +1 -1
  171. package/components/modal/modal.js.map +1 -1
  172. package/components/selectInput/formControlSelectStyled.d.ts +1 -1
  173. package/components/slider/slider.d.ts +3 -3
  174. package/components/slider/slider.js +1 -1
  175. package/components/slider/slider.js.map +1 -1
  176. package/components/snackbar/snackbarMessage.js +1 -1
  177. package/components/snackbar/snackbarMessage.js.map +1 -1
  178. package/components/stepper/stepper.d.ts +2 -2
  179. package/components/stepper/stepper.js +1 -1
  180. package/components/stepper/stepper.js.map +1 -1
  181. package/components/tab/secondaryNavigation/secondaryNavigationTabs.js +1 -1
  182. package/components/tab/secondaryNavigation/secondaryNavigationTabs.js.map +1 -1
  183. package/components/tab/tabStyled.d.ts +1 -1
  184. package/design/skoda/components/accordion/accordion.theme.js +1 -1
  185. package/design/skoda/components/accordion/accordion.theme.js.map +1 -1
  186. package/design/skoda/components/accordion/accordionSummary.theme.js +1 -1
  187. package/design/skoda/components/accordion/accordionSummary.theme.js.map +1 -1
  188. package/design/skoda/components/autocomplete.theme.js +1 -1
  189. package/design/skoda/components/autocomplete.theme.js.map +1 -1
  190. package/design/skoda/components/dialog/dialog.theme.js.map +1 -0
  191. package/design/skoda/components/dialog/dialogActions.theme.js.map +1 -0
  192. package/design/skoda/components/dialog/dialogTitle.theme.js.map +1 -0
  193. package/design/skoda/components/form/filledInput.theme.js.map +1 -0
  194. package/design/skoda/components/form/formControl.theme.js.map +1 -0
  195. package/design/skoda/components/form/formControlLabel.theme.js.map +1 -0
  196. package/design/skoda/components/form/formHelperText.theme.js.map +1 -0
  197. package/design/skoda/components/form/formLabel.theme.js.map +1 -0
  198. package/design/skoda/components/form/input.theme.js.map +1 -0
  199. package/design/skoda/components/form/inputAdornment.theme.js.map +1 -0
  200. package/design/skoda/components/form/inputBase.theme.js.map +1 -0
  201. package/design/skoda/components/form/inputLabel.theme.js.map +1 -0
  202. package/design/skoda/components/form/radio.theme.js +2 -0
  203. package/design/skoda/components/form/radio.theme.js.map +1 -0
  204. package/design/skoda/components/form/select.theme.js +2 -0
  205. package/design/skoda/components/form/select.theme.js.map +1 -0
  206. package/design/skoda/components/form/slider.theme.js +2 -0
  207. package/design/skoda/components/form/slider.theme.js.map +1 -0
  208. package/design/skoda/components/form/switch.theme.js.map +1 -0
  209. package/design/skoda/components/form/textField.theme.js.map +1 -0
  210. package/design/skoda/components/layout/breakpoints.theme.js.map +1 -0
  211. package/design/skoda/components/layout/container.theme.js.map +1 -0
  212. package/design/skoda/components/layout/grid.theme.js.map +1 -0
  213. package/design/skoda/components/mobileStepper.theme.js +1 -1
  214. package/design/skoda/components/mobileStepper.theme.js.map +1 -1
  215. package/design/skoda/components/stepper/index.d.ts +1 -0
  216. package/design/skoda/components/stepper/stepIcon/errorStepIcon.d.ts +3 -0
  217. package/design/skoda/components/stepper/stepIcon/errorStepIcon.js +2 -0
  218. package/design/skoda/components/stepper/stepIcon/errorStepIcon.js.map +1 -0
  219. package/design/skoda/components/stepper/stepIcon/index.d.ts +2 -0
  220. package/design/skoda/components/stepper/stepIcon/index.js +2 -0
  221. package/design/skoda/components/stepper/stepIcon/index.js.map +1 -0
  222. package/design/skoda/components/stepper/stepIcon/qontoStepIcon.d.ts +2 -0
  223. package/design/skoda/components/stepper/stepIcon/qontoStepIcon.js +2 -0
  224. package/design/skoda/components/stepper/stepIcon/qontoStepIcon.js.map +1 -0
  225. package/design/skoda/components/stepper/stepper.theme.d.ts +3 -0
  226. package/design/skoda/components/stepper/stepper.theme.js +2 -0
  227. package/design/skoda/components/stepper/stepper.theme.js.map +1 -0
  228. package/design/skoda/components/tabs/tabs.theme.js +1 -1
  229. package/design/skoda/components/tabs/tabs.theme.js.map +1 -1
  230. package/design/skoda/theme.js +1 -1
  231. package/design/skoda/theme.js.map +1 -1
  232. package/index.js +1 -1
  233. package/layout/Error/ErrorContent.d.ts +6 -6
  234. package/layout/Error/ErrorContent.js +1 -1
  235. package/layout/Error/ErrorContent.js.map +1 -1
  236. package/layout/Footer/Footer.d.ts +3 -14
  237. package/layout/Footer/Footer.js +1 -1
  238. package/layout/Footer/Footer.js.map +1 -1
  239. package/layout/Footer/FooterAccordion.d.ts +18 -0
  240. package/layout/Footer/FooterAccordion.js +2 -0
  241. package/layout/Footer/FooterAccordion.js.map +1 -0
  242. package/layout/Footer/FooterIconButton.d.ts +6 -2
  243. package/layout/Footer/FooterIconButton.js +1 -1
  244. package/layout/Footer/FooterIconButton.js.map +1 -1
  245. package/layout/Footer/FooterLink.d.ts +15 -0
  246. package/layout/Footer/FooterLink.js +2 -0
  247. package/layout/Footer/FooterLink.js.map +1 -0
  248. package/layout/Footer/FooterMenu.d.ts +21 -0
  249. package/layout/Footer/FooterMenu.js +2 -0
  250. package/layout/Footer/FooterMenu.js.map +1 -0
  251. package/layout/Footer/FooterSectionContact.d.ts +12 -0
  252. package/layout/Footer/FooterSectionContact.js +2 -0
  253. package/layout/Footer/FooterSectionContact.js.map +1 -0
  254. package/layout/Footer/FooterSectionMenu.d.ts +5 -0
  255. package/layout/Footer/FooterSectionMenu.js +2 -0
  256. package/layout/Footer/FooterSectionMenu.js.map +1 -0
  257. package/layout/Footer/PredefinedFooterIconButtons.d.ts +5 -4
  258. package/layout/Footer/PredefinedFooterIconButtons.js +1 -1
  259. package/layout/Footer/PredefinedFooterIconButtons.js.map +1 -1
  260. package/layout/Footer/index.d.ts +5 -1
  261. package/layout/Header/HeaderButton.js +1 -1
  262. package/layout/Header/HeaderButton.js.map +1 -1
  263. package/organisms/cardPhotoAdjustable/cardPhotoAdjustable.js.map +1 -1
  264. package/organisms/cardPhotoFixed/cardPhotoFixed.js.map +1 -1
  265. package/organisms/cardTypeOnly/cardTypeOnly.js.map +1 -1
  266. package/organisms/carousel2/cardCarousel/cardCarousel.js +1 -1
  267. package/organisms/carousel2/cardCarousel/cardCarousel.js.map +1 -1
  268. package/organisms/carousel2/components/NavButton.js +1 -1
  269. package/organisms/carousel2/components/NavButton.js.map +1 -1
  270. package/organisms/carousel2/heroCarousel/heroCarousel.js +1 -1
  271. package/organisms/carousel2/heroCarousel/heroCarousel.js.map +1 -1
  272. package/organisms/common/styled/cardStandardWrapperStyled.d.ts +1 -1
  273. package/organisms/gallery/Gallery.js +1 -1
  274. package/organisms/gallery/Gallery.js.map +1 -1
  275. package/organisms/gallery/GalleryTrigger.js +1 -1
  276. package/organisms/gallery/GalleryTrigger.js.map +1 -1
  277. package/organisms/heroImageCard/heroImageCard.js.map +1 -1
  278. package/organisms/hotspotCard/hotspotCard.d.ts +5 -12
  279. package/organisms/maps/mapComponents/infoWindowConfig.js.map +1 -1
  280. package/organisms/maps/maps.js.map +1 -1
  281. package/organisms/notification/Notification.js +1 -1
  282. package/organisms/notification/Notification.js.map +1 -1
  283. package/package.json +1 -1
  284. package/production/{Button.d.ts → Button/Button.d.ts} +1 -1
  285. package/production/Button/Button.js.map +1 -0
  286. package/production/Button/index.d.ts +1 -0
  287. package/production/index.js +1 -1
  288. package/utils/utilities.d.ts +1 -1
  289. package/cjs/design/skoda/components/breakpoints.theme.js.map +0 -1
  290. package/cjs/design/skoda/components/container.theme.js.map +0 -1
  291. package/cjs/design/skoda/components/dialog.theme.js.map +0 -1
  292. package/cjs/design/skoda/components/dialogActions.theme.js.map +0 -1
  293. package/cjs/design/skoda/components/dialogTitle.theme.js.map +0 -1
  294. package/cjs/design/skoda/components/filledInput.theme.js.map +0 -1
  295. package/cjs/design/skoda/components/formControl.theme.js.map +0 -1
  296. package/cjs/design/skoda/components/formControlLabel.theme.js.map +0 -1
  297. package/cjs/design/skoda/components/formHelperText.theme.js.map +0 -1
  298. package/cjs/design/skoda/components/formLabel.theme.js.map +0 -1
  299. package/cjs/design/skoda/components/grid.theme.js.map +0 -1
  300. package/cjs/design/skoda/components/input.theme.js.map +0 -1
  301. package/cjs/design/skoda/components/inputAdornment.theme.js.map +0 -1
  302. package/cjs/design/skoda/components/inputBase.theme.js.map +0 -1
  303. package/cjs/design/skoda/components/inputLabel.theme.js.map +0 -1
  304. package/cjs/design/skoda/components/radio.theme.js +0 -2
  305. package/cjs/design/skoda/components/radio.theme.js.map +0 -1
  306. package/cjs/design/skoda/components/select.theme.js +0 -2
  307. package/cjs/design/skoda/components/select.theme.js.map +0 -1
  308. package/cjs/design/skoda/components/slider.theme.js +0 -2
  309. package/cjs/design/skoda/components/slider.theme.js.map +0 -1
  310. package/cjs/design/skoda/components/stepper.theme.d.ts +0 -2
  311. package/cjs/design/skoda/components/stepper.theme.js +0 -2
  312. package/cjs/design/skoda/components/stepper.theme.js.map +0 -1
  313. package/cjs/design/skoda/components/switch.theme.js.map +0 -1
  314. package/cjs/design/skoda/components/textField.theme.js.map +0 -1
  315. package/cjs/layout/Footer/FooterNavItem.d.ts +0 -14
  316. package/cjs/layout/Footer/FooterNavItem.js +0 -2
  317. package/cjs/layout/Footer/FooterNavItem.js.map +0 -1
  318. package/cjs/production/Button.js.map +0 -1
  319. package/design/skoda/components/breakpoints.theme.js.map +0 -1
  320. package/design/skoda/components/container.theme.js.map +0 -1
  321. package/design/skoda/components/dialog.theme.js.map +0 -1
  322. package/design/skoda/components/dialogActions.theme.js.map +0 -1
  323. package/design/skoda/components/dialogTitle.theme.js.map +0 -1
  324. package/design/skoda/components/filledInput.theme.js.map +0 -1
  325. package/design/skoda/components/formControl.theme.js.map +0 -1
  326. package/design/skoda/components/formControlLabel.theme.js.map +0 -1
  327. package/design/skoda/components/formHelperText.theme.js.map +0 -1
  328. package/design/skoda/components/formLabel.theme.js.map +0 -1
  329. package/design/skoda/components/grid.theme.js.map +0 -1
  330. package/design/skoda/components/input.theme.js.map +0 -1
  331. package/design/skoda/components/inputAdornment.theme.js.map +0 -1
  332. package/design/skoda/components/inputBase.theme.js.map +0 -1
  333. package/design/skoda/components/inputLabel.theme.js.map +0 -1
  334. package/design/skoda/components/radio.theme.js +0 -2
  335. package/design/skoda/components/radio.theme.js.map +0 -1
  336. package/design/skoda/components/select.theme.js +0 -2
  337. package/design/skoda/components/select.theme.js.map +0 -1
  338. package/design/skoda/components/slider.theme.js +0 -2
  339. package/design/skoda/components/slider.theme.js.map +0 -1
  340. package/design/skoda/components/stepper.theme.d.ts +0 -2
  341. package/design/skoda/components/stepper.theme.js +0 -2
  342. package/design/skoda/components/stepper.theme.js.map +0 -1
  343. package/design/skoda/components/switch.theme.js.map +0 -1
  344. package/design/skoda/components/textField.theme.js.map +0 -1
  345. package/layout/Footer/FooterNavItem.d.ts +0 -14
  346. package/layout/Footer/FooterNavItem.js +0 -2
  347. package/layout/Footer/FooterNavItem.js.map +0 -1
  348. package/production/Button.js.map +0 -1
  349. /package/cjs/design/skoda/components/{dialog.theme.d.ts → dialog/dialog.theme.d.ts} +0 -0
  350. /package/cjs/design/skoda/components/{dialog.theme.js → dialog/dialog.theme.js} +0 -0
  351. /package/cjs/design/skoda/components/{dialogActions.theme.d.ts → dialog/dialogActions.theme.d.ts} +0 -0
  352. /package/cjs/design/skoda/components/{dialogActions.theme.js → dialog/dialogActions.theme.js} +0 -0
  353. /package/cjs/design/skoda/components/{dialogTitle.theme.d.ts → dialog/dialogTitle.theme.d.ts} +0 -0
  354. /package/cjs/design/skoda/components/{dialogTitle.theme.js → dialog/dialogTitle.theme.js} +0 -0
  355. /package/cjs/design/skoda/components/{filledInput.theme.d.ts → form/filledInput.theme.d.ts} +0 -0
  356. /package/cjs/design/skoda/components/{filledInput.theme.js → form/filledInput.theme.js} +0 -0
  357. /package/cjs/design/skoda/components/{formControl.theme.d.ts → form/formControl.theme.d.ts} +0 -0
  358. /package/cjs/design/skoda/components/{formControl.theme.js → form/formControl.theme.js} +0 -0
  359. /package/cjs/design/skoda/components/{formControlLabel.theme.d.ts → form/formControlLabel.theme.d.ts} +0 -0
  360. /package/cjs/design/skoda/components/{formControlLabel.theme.js → form/formControlLabel.theme.js} +0 -0
  361. /package/cjs/design/skoda/components/{formHelperText.theme.d.ts → form/formHelperText.theme.d.ts} +0 -0
  362. /package/cjs/design/skoda/components/{formHelperText.theme.js → form/formHelperText.theme.js} +0 -0
  363. /package/cjs/design/skoda/components/{formLabel.theme.d.ts → form/formLabel.theme.d.ts} +0 -0
  364. /package/cjs/design/skoda/components/{formLabel.theme.js → form/formLabel.theme.js} +0 -0
  365. /package/cjs/design/skoda/components/{input.theme.d.ts → form/input.theme.d.ts} +0 -0
  366. /package/cjs/design/skoda/components/{input.theme.js → form/input.theme.js} +0 -0
  367. /package/cjs/design/skoda/components/{inputAdornment.theme.d.ts → form/inputAdornment.theme.d.ts} +0 -0
  368. /package/cjs/design/skoda/components/{inputAdornment.theme.js → form/inputAdornment.theme.js} +0 -0
  369. /package/cjs/design/skoda/components/{inputBase.theme.d.ts → form/inputBase.theme.d.ts} +0 -0
  370. /package/cjs/design/skoda/components/{inputBase.theme.js → form/inputBase.theme.js} +0 -0
  371. /package/cjs/design/skoda/components/{inputLabel.theme.d.ts → form/inputLabel.theme.d.ts} +0 -0
  372. /package/cjs/design/skoda/components/{inputLabel.theme.js → form/inputLabel.theme.js} +0 -0
  373. /package/cjs/design/skoda/components/{radio.theme.d.ts → form/radio.theme.d.ts} +0 -0
  374. /package/cjs/design/skoda/components/{select.theme.d.ts → form/select.theme.d.ts} +0 -0
  375. /package/cjs/design/skoda/components/{slider.theme.d.ts → form/slider.theme.d.ts} +0 -0
  376. /package/cjs/design/skoda/components/{switch.theme.d.ts → form/switch.theme.d.ts} +0 -0
  377. /package/cjs/design/skoda/components/{switch.theme.js → form/switch.theme.js} +0 -0
  378. /package/cjs/design/skoda/components/{textField.theme.d.ts → form/textField.theme.d.ts} +0 -0
  379. /package/cjs/design/skoda/components/{textField.theme.js → form/textField.theme.js} +0 -0
  380. /package/cjs/design/skoda/components/{breakpoints.theme.d.ts → layout/breakpoints.theme.d.ts} +0 -0
  381. /package/cjs/design/skoda/components/{breakpoints.theme.js → layout/breakpoints.theme.js} +0 -0
  382. /package/cjs/design/skoda/components/{container.theme.d.ts → layout/container.theme.d.ts} +0 -0
  383. /package/cjs/design/skoda/components/{container.theme.js → layout/container.theme.js} +0 -0
  384. /package/cjs/design/skoda/components/{grid.theme.d.ts → layout/grid.theme.d.ts} +0 -0
  385. /package/cjs/design/skoda/components/{grid.theme.js → layout/grid.theme.js} +0 -0
  386. /package/cjs/production/{Button.js → Button/Button.js} +0 -0
  387. /package/design/skoda/components/{dialog.theme.d.ts → dialog/dialog.theme.d.ts} +0 -0
  388. /package/design/skoda/components/{dialog.theme.js → dialog/dialog.theme.js} +0 -0
  389. /package/design/skoda/components/{dialogActions.theme.d.ts → dialog/dialogActions.theme.d.ts} +0 -0
  390. /package/design/skoda/components/{dialogActions.theme.js → dialog/dialogActions.theme.js} +0 -0
  391. /package/design/skoda/components/{dialogTitle.theme.d.ts → dialog/dialogTitle.theme.d.ts} +0 -0
  392. /package/design/skoda/components/{dialogTitle.theme.js → dialog/dialogTitle.theme.js} +0 -0
  393. /package/design/skoda/components/{filledInput.theme.d.ts → form/filledInput.theme.d.ts} +0 -0
  394. /package/design/skoda/components/{filledInput.theme.js → form/filledInput.theme.js} +0 -0
  395. /package/design/skoda/components/{formControl.theme.d.ts → form/formControl.theme.d.ts} +0 -0
  396. /package/design/skoda/components/{formControl.theme.js → form/formControl.theme.js} +0 -0
  397. /package/design/skoda/components/{formControlLabel.theme.d.ts → form/formControlLabel.theme.d.ts} +0 -0
  398. /package/design/skoda/components/{formControlLabel.theme.js → form/formControlLabel.theme.js} +0 -0
  399. /package/design/skoda/components/{formHelperText.theme.d.ts → form/formHelperText.theme.d.ts} +0 -0
  400. /package/design/skoda/components/{formHelperText.theme.js → form/formHelperText.theme.js} +0 -0
  401. /package/design/skoda/components/{formLabel.theme.d.ts → form/formLabel.theme.d.ts} +0 -0
  402. /package/design/skoda/components/{formLabel.theme.js → form/formLabel.theme.js} +0 -0
  403. /package/design/skoda/components/{input.theme.d.ts → form/input.theme.d.ts} +0 -0
  404. /package/design/skoda/components/{input.theme.js → form/input.theme.js} +0 -0
  405. /package/design/skoda/components/{inputAdornment.theme.d.ts → form/inputAdornment.theme.d.ts} +0 -0
  406. /package/design/skoda/components/{inputAdornment.theme.js → form/inputAdornment.theme.js} +0 -0
  407. /package/design/skoda/components/{inputBase.theme.d.ts → form/inputBase.theme.d.ts} +0 -0
  408. /package/design/skoda/components/{inputBase.theme.js → form/inputBase.theme.js} +0 -0
  409. /package/design/skoda/components/{inputLabel.theme.d.ts → form/inputLabel.theme.d.ts} +0 -0
  410. /package/design/skoda/components/{inputLabel.theme.js → form/inputLabel.theme.js} +0 -0
  411. /package/design/skoda/components/{radio.theme.d.ts → form/radio.theme.d.ts} +0 -0
  412. /package/design/skoda/components/{select.theme.d.ts → form/select.theme.d.ts} +0 -0
  413. /package/design/skoda/components/{slider.theme.d.ts → form/slider.theme.d.ts} +0 -0
  414. /package/design/skoda/components/{switch.theme.d.ts → form/switch.theme.d.ts} +0 -0
  415. /package/design/skoda/components/{switch.theme.js → form/switch.theme.js} +0 -0
  416. /package/design/skoda/components/{textField.theme.d.ts → form/textField.theme.d.ts} +0 -0
  417. /package/design/skoda/components/{textField.theme.js → form/textField.theme.js} +0 -0
  418. /package/design/skoda/components/{breakpoints.theme.d.ts → layout/breakpoints.theme.d.ts} +0 -0
  419. /package/design/skoda/components/{breakpoints.theme.js → layout/breakpoints.theme.js} +0 -0
  420. /package/design/skoda/components/{container.theme.d.ts → layout/container.theme.d.ts} +0 -0
  421. /package/design/skoda/components/{container.theme.js → layout/container.theme.js} +0 -0
  422. /package/design/skoda/components/{grid.theme.d.ts → layout/grid.theme.d.ts} +0 -0
  423. /package/design/skoda/components/{grid.theme.js → layout/grid.theme.js} +0 -0
  424. /package/production/{Button.js → Button/Button.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"banner.js","sources":["../../../src/components/banner/banner.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useEffect, useState, forwardRef } from 'react';\nimport styled from '@emotion/styled';\nimport { Icon } from '../../components/icon';\nimport { Button } from '../../components/button';\nimport { flowColors } from '../../design/skoda/palette.theme';\nimport { ColourSheme } from '../../utils/enum';\nexport const Banner = forwardRef((_a, ref) => {\n var props = __rest(_a, []);\n const [isBannerVisible, setIsBannerVisible] = useState(true);\n useEffect(() => {\n if (props.isVisible || props.isVisible === false) {\n setIsBannerVisible(props.isVisible);\n }\n }, [props.isVisible]);\n const onClickButtons = (ev, btnType) => {\n var _a, _b, _c;\n if (btnType === 'additional') {\n (_a = props.additionalButtonCallback) === null || _a === void 0 ? void 0 : _a.call(props, ev);\n }\n else {\n (_b = props.buttonCallback) === null || _b === void 0 ? void 0 : _b.call(props, ev);\n }\n (_c = props.analyticsCallback) === null || _c === void 0 ? void 0 : _c.call(props, ev);\n setIsBannerVisible(false);\n };\n const isFilled = props.iconIsFilled ? ' filled' : '';\n const buttonVariantMain = props.buttonVariant;\n const buttonVariantAdditional = props.additionalButtonVariant;\n return (_jsx(_Fragment, { children: isBannerVisible && (_jsx(BannerStyled, { className: props.variant, variant: props.variant, ref: ref, \"data-testid\": \"Banner\", children: _jsxs(\"div\", { className: \"bannerWrapper\", children: [_jsxs(\"div\", { className: \"bannerHeader\", children: [props.icon && (_jsx(Icon, { fontSize: \"medium\", className: `${props.icon} ${isFilled}`, \"data-testid\": \"Banner.icon\" })), _jsx(\"p\", { className: \"body\", \"data-testid\": \"Banner.body\", children: props.textContent })] }), _jsxs(\"div\", { className: \"bannerBtnContainer\", children: [props.additionalButton && (_jsx(Button, { variant: buttonVariantAdditional, compact: true, label: props.additionalButtonLabel, onClick: (ev) => onClickButtons(ev, 'additional'), \"data-testid\": \"Banner.btn2\" })), props.variant === 'secondary' ? (_jsx(Button, { variant: buttonVariantMain, colourScheme: ColourSheme.LIGHT_MODE, compact: true, label: props.additionalButtonLabel, onClick: (ev) => onClickButtons(ev, 'main'), \"data-testid\": \"Banner.btn1\" })) : (_jsx(Button, { variant: buttonVariantMain, compact: true, label: props.buttonLabel, onClick: (ev) => onClickButtons(ev, 'main'), \"data-testid\": \"Banner.btn1\" }))] })] }) })) }));\n});\nconst BannerStyled = styled.div((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n const props = args;\n let styles = {};\n styles = Object.assign(Object.assign({}, styles), { '& > .bannerWrapper': {\n boxSizing: 'border-box',\n padding: '16px',\n display: 'flex',\n flexDirection: 'column',\n flexWrap: 'nowrap',\n width: '100%',\n [theme.breakpoints.up('md')]: {\n padding: '7px 16px',\n flexDirection: 'row',\n },\n '& *': {\n boxSizing: 'border-box',\n },\n }, '& .bannerHeader': {\n display: 'flex',\n alignItems: 'flex-start',\n justifyContent: 'flex-items',\n width: '100%',\n marginBottom: '16px',\n [theme.breakpoints.up('md')]: {\n alignItems: 'center',\n marginBottom: '0',\n },\n '& .MuiIcon-root': {\n color: flowColors.brand.tertiary,\n fontSize: '20px',\n },\n }, '& .body': {\n margin: '0 0 0 8px',\n fontSize: '14px',\n fontWeight: '400',\n letterSpacing: '0.05px',\n }, '& .bannerBtnContainer': {\n display: 'flex',\n width: '100%',\n justifyContent: 'flex-start',\n [theme.breakpoints.up('md')]: {\n justifyContent: 'flex-end',\n },\n '& > div + div': {\n marginLeft: '16px',\n },\n } });\n switch (props.variant) {\n case 'primary':\n styles = Object.assign(Object.assign({}, styles), { backgroundColor: flowColors.brand.secondary, color: flowColors.onSurface.os900 });\n case 'secondary':\n styles = Object.assign(Object.assign({}, styles), { backgroundColor: flowColors.brand.tertiary, color: flowColors.onSurface.os0, '& .bannerHeader .MuiIcon-root': {\n color: flowColors.brand.secondary,\n } });\n case 'tertiary':\n styles = Object.assign(Object.assign({}, styles), { backgroundColor: flowColors.surface.secondary, color: flowColors.onSurface.os800, '& .bannerHeader .MuiIcon-root': {\n color: flowColors.brand.primary,\n } });\n }\n return styles;\n});\n//# sourceMappingURL=banner.js.map"],"names":["Banner","forwardRef","_a","ref","props","__rest","isBannerVisible","setIsBannerVisible","useState","useEffect","isVisible","onClickButtons","ev","btnType","_b","_c","additionalButtonCallback","call","buttonCallback","analyticsCallback","isFilled","iconIsFilled","buttonVariantMain","buttonVariant","buttonVariantAdditional","additionalButtonVariant","_jsx","_Fragment","children","BannerStyled","className","variant","_jsxs","icon","Icon","fontSize","textContent","additionalButton","Button","compact","label","additionalButtonLabel","onClick","colourScheme","ColourSheme","LIGHT_MODE","buttonLabel","styled","div","theme","styles","Object","assign","boxSizing","padding","display","flexDirection","flexWrap","width","breakpoints","up","alignItems","justifyContent","marginBottom","color","flowColors","brand","tertiary","margin","fontWeight","letterSpacing","marginLeft","backgroundColor","secondary","onSurface","os900","os0","surface","os800","primary"],"mappings":"qYAQY,MAACA,EAASC,GAAW,CAACC,EAAIC,KAClC,IAAIC,EAAQC,EAAOH,EAAI,IACvB,MAAOI,EAAiBC,GAAsBC,GAAS,GACvDC,GAAU,MACFL,EAAMM,YAAiC,IAApBN,EAAMM,YACzBH,EAAmBH,EAAMM,UAC5B,GACF,CAACN,EAAMM,YACV,MAAMC,EAAiB,CAACC,EAAIC,KACxB,IAAIX,EAAIY,EAAIC,EACI,eAAZF,EAC0C,QAAzCX,EAAKE,EAAMY,gCAA6C,IAAPd,GAAyBA,EAAGe,KAAKb,EAAOQ,GAG1D,QA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C,OAAO7B,CAAM"}
1
+ {"version":3,"file":"banner.js","sources":["../../../src/components/banner/banner.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useEffect, useState, forwardRef } from 'react';\nimport styled from '@emotion/styled';\nimport { Icon } from '../../components/icon';\nimport { Button } from '../../components/button';\nimport { flowColors } from '../../design/skoda/palette.theme';\nimport { ColourSheme } from '../../utils/enum';\nexport const Banner = forwardRef((_a, ref) => {\n var props = __rest(_a, []);\n const [isBannerVisible, setIsBannerVisible] = useState(true);\n useEffect(() => {\n if (props.isVisible || props.isVisible === false) {\n setIsBannerVisible(props.isVisible);\n }\n }, [props.isVisible]);\n const onClickButtons = (ev, btnType) => {\n var _a, _b, _c;\n if (btnType === 'additional') {\n (_a = props.additionalButtonCallback) === null || _a === void 0 ? void 0 : _a.call(props, ev);\n }\n else {\n (_b = props.buttonCallback) === null || _b === void 0 ? void 0 : _b.call(props, ev);\n }\n (_c = props.analyticsCallback) === null || _c === void 0 ? void 0 : _c.call(props, ev);\n setIsBannerVisible(false);\n };\n const isFilled = props.iconIsFilled ? ' filled' : '';\n const buttonVariantMain = props.buttonVariant;\n const buttonVariantAdditional = props.additionalButtonVariant;\n return (_jsx(_Fragment, { children: isBannerVisible && (_jsx(BannerStyled, { className: props.variant, variant: props.variant, ref: ref, \"data-testid\": \"Banner\", children: _jsxs(\"div\", { className: \"bannerWrapper\", children: [_jsxs(\"div\", { className: \"bannerHeader\", children: [props.icon && (_jsx(Icon, { fontSize: \"medium\", className: `${props.icon} ${isFilled}`, \"data-testid\": \"Banner.icon\" })), _jsx(\"p\", { className: \"body\", \"data-testid\": \"Banner.body\", children: props.textContent })] }), _jsxs(\"div\", { className: \"bannerBtnContainer\", children: [props.additionalButton && (_jsx(Button, { variant: buttonVariantAdditional, compact: true, label: props.additionalButtonLabel, onClick: (ev) => onClickButtons(ev, 'additional'), \"data-testid\": \"Banner.btn2\" })), props.variant === 'secondary' ? (_jsx(Button, { variant: buttonVariantMain, colourScheme: ColourSheme.LIGHT_MODE, compact: true, label: props.additionalButtonLabel, onClick: (ev) => onClickButtons(ev, 'main'), \"data-testid\": \"Banner.btn1\" })) : (_jsx(Button, { variant: buttonVariantMain, compact: true, label: props.buttonLabel, onClick: (ev) => onClickButtons(ev, 'main'), \"data-testid\": \"Banner.btn1\" }))] })] }) })) }));\n});\nconst BannerStyled = styled.div((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n const props = args;\n let styles = {};\n styles = Object.assign(Object.assign({}, styles), { '& > .bannerWrapper': {\n boxSizing: 'border-box',\n padding: '16px',\n display: 'flex',\n flexDirection: 'column',\n flexWrap: 'nowrap',\n width: '100%',\n [theme.breakpoints.up('md')]: {\n padding: '7px 16px',\n flexDirection: 'row',\n },\n '& *': {\n boxSizing: 'border-box',\n },\n }, '& .bannerHeader': {\n display: 'flex',\n alignItems: 'flex-start',\n justifyContent: 'flex-items',\n width: '100%',\n marginBottom: '16px',\n [theme.breakpoints.up('md')]: {\n alignItems: 'center',\n marginBottom: '0',\n },\n '& .MuiIcon-root': {\n color: flowColors.brand.tertiary,\n fontSize: '20px',\n },\n }, '& .body': {\n margin: '0 0 0 8px',\n fontSize: '14px',\n fontWeight: '400',\n letterSpacing: '0.05px',\n }, '& .bannerBtnContainer': {\n display: 'flex',\n width: '100%',\n justifyContent: 'flex-start',\n [theme.breakpoints.up('md')]: {\n justifyContent: 'flex-end',\n },\n '& > div + div': {\n marginLeft: '16px',\n },\n } });\n switch (props.variant) {\n case 'secondary':\n styles = Object.assign(Object.assign({}, styles), { backgroundColor: flowColors.brand.tertiary, color: flowColors.onSurface.os0, '& .bannerHeader .MuiIcon-root': {\n color: flowColors.brand.secondary,\n } });\n break;\n case 'tertiary':\n styles = Object.assign(Object.assign({}, styles), { backgroundColor: flowColors.surface.secondary, color: flowColors.onSurface.os800, '& .bannerHeader .MuiIcon-root': {\n color: flowColors.brand.primary,\n } });\n break;\n case 'primary':\n default:\n styles = Object.assign(Object.assign({}, styles), { backgroundColor: flowColors.brand.secondary, color: flowColors.onSurface.os900 });\n break;\n }\n return styles;\n});\n//# sourceMappingURL=banner.js.map"],"names":["Banner","forwardRef","_a","ref","props","__rest","isBannerVisible","setIsBannerVisible","useState","useEffect","isVisible","onClickButtons","ev","btnType","_b","_c","additionalButtonCallback","call","buttonCallback","analyticsCallback","isFilled","iconIsFilled","buttonVariantMain","buttonVariant","buttonVariantAdditional","additionalButtonVariant","_jsx","_Fragment","children","BannerStyled","className","variant","_jsxs","icon","Icon","fontSize","textContent","additionalButton","Button","compact","label","additionalButtonLabel","onClick","colourScheme","ColourSheme","LIGHT_MODE","buttonLabel","styled","div","theme","styles","Object","assign","boxSizing","padding","display","flexDirection","flexWrap","width","breakpoints","up","alignItems","justifyContent","marginBottom","color","flowColors","brand","tertiary","margin","fontWeight","letterSpacing","marginLeft","backgroundColor","onSurface","os0","secondary","surface","os800","primary","os900"],"mappings":"qYAQY,MAACA,EAASC,GAAW,CAACC,EAAIC,KAClC,IAAIC,EAAQC,EAAOH,EAAI,IACvB,MAAOI,EAAiBC,GAAsBC,GAAS,GACvDC,GAAU,MACFL,EAAMM,YAAiC,IAApBN,EAAMM,YACzBH,EAAmBH,EAAMM,UAC5B,GACF,CAACN,EAAMM,YACV,MAAMC,EAAiB,CAACC,EAAIC,KACxB,IAAIX,EAAIY,EAAIC,EACI,eAAZF,EAC0C,QAAzCX,EAAKE,EAAMY,gCAA6C,IAAPd,GAAyBA,EAAGe,KAAKb,EAAOQ,GAG1D,QAA/BE,EAAKV,EAAMc,sBAAmC,IAAPJ,GAAyBA,EAAGG,KAAKb,EAAOQ,GAEjD,QAAlCG,EAAKX,EAAMe,yBAAsC,IAAPJ,GAAyBA,EAAGE,KAAKb,EAAOQ,GACnFL,GAAmB,EAAM,EAEvBa,EAAWhB,EAAMiB,aAAe,UAAY,GAC5CC,EAAoBlB,EAAMmB,cAC1BC,EAA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AAYC,GAAG,OAAQ,CAC1BN,QAAS,WACTE,cAAe,OAEnB,MAAO,CACHH,UAAW,eAEhB,kBAAmB,CAClBE,QAAS,OACTM,WAAY,aACZC,eAAgB,aAChBJ,MAAO,OACPK,aAAc,OACd,CAACd,EAAMU,YAAYC,GAAG,OAAQ,CAC1BC,WAAY,SACZE,aAAc,KAElB,kBAAmB,CACfC,MAAOC,EAAWC,MAAMC,SACxBhC,SAAU,SAEf,UAAW,CACViC,OAAQ,YACRjC,SAAU,OACVkC,WAAY,MACZC,cAAe,UAChB,wBAAyB,CACxBf,QAAS,OACTG,MAAO,OACPI,eAAgB,aAChB,CAACb,EAAMU,YAAYC,GAAG,OAAQ,CAC1BE,eAAgB,YAEpB,gBAAiB,CACbS,WAAY,WAGhBnE,EAAM2B,SACV,IAAK,YACDmB,EAASC,OAAOC,OAAOD,OAAOC,OAAO,CAAA,EAAIF,GAAS,CAAEsB,gBAAiBP,EAAWC,MAAMC,SAAUH,MAAOC,EAAWQ,UAAUC,IAAK,gCAAiC,CAC1JV,MAAOC,EAAWC,MAAMS,aAEhC,MACJ,IAAK,WACDzB,EAASC,OAAOC,OAAOD,OAAOC,OAAO,CAAA,EAAIF,GAAS,CAAEsB,gBAAiBP,EAAWW,QAAQD,UAAWX,MAAOC,EAAWQ,UAAUI,MAAO,gCAAiC,CAC/Jb,MAAOC,EAAWC,MAAMY,WAEhC,MAEJ,QACI5B,EAASC,OAAOC,OAAOD,OAAOC,OAAO,CAAA,EAAIF,GAAS,CAAEsB,gBAAiBP,EAAWC,MAAMS,UAAWX,MAAOC,EAAWQ,UAAUM,QAGrI,OAAO7B,CAAM"}
@@ -1,2 +1,2 @@
1
- import{jsx as e,Fragment as a,jsxs as d}from"react/jsx-runtime";import r,{forwardRef as t}from"react";import i from"../common/hook/useWindowSize.js";import{List as o,ListItem as s,ListItemIcon as l,ListItemText as n,ClickAwayListener as c,MenuItem as m}from"@mui/material";import{Divider as p}from"../divider/divider.js";import{Icon as h}from"../icon/icon.js";import{Checkbox as u}from"../checkbox/checkbox.js";import{ToggleSwitch as C}from"../toggleSwitch/toggleSwitch.js";import{useCardMenu as y}from"./hooks/useCardMenu.js";import{PopperStyled as g}from"./styled/popperStyled.js";import{MenuListStyled as b}from"./styled/menuListStyled.js";import{DrawerStyled as f}from"./styled/drawerStyled.js";const k=t((({items:t,setItems:k,open:M,header:x,anchorRef:S,allowMultiselect:j,hasToggleSelection:v,onItemClick:w,onClose:N,sx:T,classes:W,placement:z,toggleLabel:P,rounded:H},I)=>{const{isMobile:L}=i(),{isToggleChecked:A,onClickHandler:E,onToggleChange:F}=y(t,j,k,w,N);return e(a,{children:L?d(f,{open:M,onClose:N,anchor:"bottom",sx:T,ref:I,classes:W,hasHeader:!!x,"data-testid":"CardMenu",children:[x&&e("div",{className:"drawer-header","data-testid":"CardMenu.header",children:x}),e(o,{children:t.map((a=>d(r.Fragment,{children:[d(s,{button:!0,disabled:a.disabled,onClick:()=>E(a),"data-testid":"CardMenu.item","data-state":a.disabled?"disabled":void 0,children:[a.icon&&e(l,{children:e(h,{className:a.icon,fontSize:"small"})}),e(n,{primaryTypographyProps:{noWrap:!0},primary:a.text}),j&&e(u,{checked:a.isChecked,disabled:a.disabled,"data-testid":"CardMenu.check"})]}),e(p,{variant:"middle"})]},a.text)))})]}):e(g,{open:M,anchorEl:S.current,placement:z,ref:I,rounded:H,"data-testid":"CardMenu",children:e(c,{onClickAway:N,children:d(b,{allowMultiselect:j,sx:T,classes:W,children:[x&&d(m,{className:"menu-item-header","data-testid":"CardMenu.header",children:[e(n,{primaryTypographyProps:{noWrap:!0},primary:x}),e(l,{onClick:N,"data-testid":"CardMenu.close",children:e(h,{className:"ballotx",fontSize:"small"})})]}),x&&e(p,{variant:"middle",className:"menu-item-divider"}),j&&v&&d(m,{className:"menu-select-all","data-testid":"CardMenu.toggle",children:[e(n,{primaryTypographyProps:{noWrap:!0},primary:P||"Select all"}),e(C,{onChange:F,checked:A,compact:!0})]}),e("div",{className:"menu-content-items",children:t.map((a=>d(m,{disabled:a.disabled,onClick:()=>E(a),"data-testid":"CardMenu.item","data-state":a.disabled?"disabled":void 0,children:[a.icon&&e(l,{children:e(h,{className:a.icon,fontSize:"small"})}),e(n,{primaryTypographyProps:{noWrap:!0},primary:a.text}),j&&e(u,{checked:a.isChecked,disabled:a.disabled,"data-testid":"CardMenu.check"})]},a.text)))})]})})})})}));export{k as CardMenu};
1
+ import{jsx as e,Fragment as a,jsxs as d}from"react/jsx-runtime";import r,{forwardRef as t}from"react";import i from"../common/hook/useWindowSize.js";import{List as o,ListItem as l,ListItemIcon as s,ListItemText as n,Divider as c,ClickAwayListener as m,MenuItem as p}from"@mui/material";import{Icon as h}from"../icon/icon.js";import{Checkbox as u}from"../checkbox/checkbox.js";import{ToggleSwitch as C}from"../toggleSwitch/toggleSwitch.js";import{useCardMenu as y}from"./hooks/useCardMenu.js";import{PopperStyled as g}from"./styled/popperStyled.js";import{MenuListStyled as b}from"./styled/menuListStyled.js";import{DrawerStyled as k}from"./styled/drawerStyled.js";const f=t((({items:t,setItems:f,open:M,header:x,anchorRef:S,allowMultiselect:j,hasToggleSelection:w,onItemClick:N,onClose:v,sx:T,classes:W,placement:z,toggleLabel:P,rounded:H},I)=>{const{isMobile:L}=i(),{isToggleChecked:A,onClickHandler:E,onToggleChange:F}=y(t,j,f,N,v);return e(a,{children:L?d(k,{open:M,onClose:v,anchor:"bottom",sx:T,ref:I,classes:W,hasHeader:!!x,"data-testid":"CardMenu",children:[x&&e("div",{className:"drawer-header","data-testid":"CardMenu.header",children:x}),e(o,{children:t.map((a=>d(r.Fragment,{children:[d(l,{button:!0,disabled:a.disabled,onClick:()=>E(a),"data-testid":"CardMenu.item","data-state":a.disabled?"disabled":void 0,children:[a.icon&&e(s,{children:e(h,{className:a.icon,fontSize:"small"})}),e(n,{primaryTypographyProps:{noWrap:!0},primary:a.text}),j&&e(u,{checked:a.isChecked,disabled:a.disabled,"data-testid":"CardMenu.check"})]}),e(c,{variant:"middle"})]},a.text)))})]}):e(g,{open:M,anchorEl:S.current,placement:z,ref:I,rounded:H,"data-testid":"CardMenu",children:e(m,{onClickAway:v,children:d(b,{allowMultiselect:j,sx:T,classes:W,children:[x&&d(p,{className:"menu-item-header","data-testid":"CardMenu.header",children:[e(n,{primaryTypographyProps:{noWrap:!0},primary:x}),e(s,{onClick:v,"data-testid":"CardMenu.close",children:e(h,{className:"ballotx",fontSize:"small"})})]}),x&&e(c,{variant:"middle",className:"menu-item-divider"}),j&&w&&d(p,{className:"menu-select-all","data-testid":"CardMenu.toggle",children:[e(n,{primaryTypographyProps:{noWrap:!0},primary:P||"Select all"}),e(C,{onChange:F,checked:A,compact:!0})]}),e("div",{className:"menu-content-items",children:t.map((a=>d(p,{disabled:a.disabled,onClick:()=>E(a),"data-testid":"CardMenu.item","data-state":a.disabled?"disabled":void 0,children:[a.icon&&e(s,{children:e(h,{className:a.icon,fontSize:"small"})}),e(n,{primaryTypographyProps:{noWrap:!0},primary:a.text}),j&&e(u,{checked:a.isChecked,disabled:a.disabled,"data-testid":"CardMenu.check"})]},a.text)))})]})})})})}));export{f as CardMenu};
2
2
  //# sourceMappingURL=cardMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cardMenu.js","sources":["../../../src/components/cardMenu/cardMenu.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { forwardRef } from 'react';\nimport useWindowSize from '../common/hook/useWindowSize';\nimport { List, ListItem, ListItemIcon, ListItemText, MenuItem, ClickAwayListener } from '@mui/material';\nimport { Divider } from '../divider/divider';\nimport { Icon } from '../icon';\nimport { Checkbox } from '../checkbox';\nimport { ToggleSwitch } from '../toggleSwitch';\nimport { useCardMenu } from './hooks/useCardMenu';\nimport { PopperStyled } from './styled/popperStyled';\nimport { MenuListStyled } from './styled/menuListStyled';\nimport { DrawerStyled } from './styled/drawerStyled';\nexport const CardMenu = forwardRef(({ items, setItems, open, header, anchorRef, allowMultiselect, hasToggleSelection, onItemClick, onClose, sx, classes, placement, toggleLabel, rounded, }, ref) => {\n const { isMobile } = useWindowSize();\n const { isToggleChecked, onClickHandler, onToggleChange } = useCardMenu(items, allowMultiselect, setItems, onItemClick, onClose);\n return (_jsx(_Fragment, { children: isMobile ? (_jsxs(DrawerStyled, { open: open, onClose: onClose, anchor: \"bottom\", sx: sx, ref: ref, classes: classes, hasHeader: !!header, \"data-testid\": \"CardMenu\", children: [header && (_jsx(\"div\", { className: \"drawer-header\", \"data-testid\": \"CardMenu.header\", children: header })), _jsx(List, { children: items.map((item) => {\n return (_jsxs(React.Fragment, { children: [_jsxs(ListItem, { button: true, disabled: item.disabled, onClick: () => onClickHandler(item), \"data-testid\": \"CardMenu.item\", \"data-state\": item.disabled ? 'disabled' : undefined, children: [item.icon && (_jsx(ListItemIcon, { children: _jsx(Icon, { className: item.icon, fontSize: \"small\" }) })), _jsx(ListItemText, { primaryTypographyProps: { noWrap: true }, primary: item.text }), allowMultiselect && (_jsx(Checkbox, { checked: item.isChecked, disabled: item.disabled, \"data-testid\": \"CardMenu.check\" }))] }), _jsx(Divider, { variant: \"middle\" })] }, item.text));\n }) })] })) : (_jsx(PopperStyled, { open: open, anchorEl: anchorRef.current, placement: placement, ref: ref, rounded: rounded, \"data-testid\": \"CardMenu\", children: _jsx(ClickAwayListener, { onClickAway: onClose, children: _jsxs(MenuListStyled, { allowMultiselect: allowMultiselect, sx: sx, classes: classes, children: [header && (_jsxs(MenuItem, { className: \"menu-item-header\", \"data-testid\": \"CardMenu.header\", children: [_jsx(ListItemText, { primaryTypographyProps: { noWrap: true }, primary: header }), _jsx(ListItemIcon, { onClick: onClose, \"data-testid\": \"CardMenu.close\", children: _jsx(Icon, { className: \"ballotx\", fontSize: \"small\" }) })] })), header && _jsx(Divider, { variant: \"middle\", className: \"menu-item-divider\" }), allowMultiselect && hasToggleSelection && (_jsxs(MenuItem, { className: \"menu-select-all\", \"data-testid\": \"CardMenu.toggle\", children: [_jsx(ListItemText, { primaryTypographyProps: { noWrap: true }, primary: toggleLabel ? toggleLabel : 'Select all' }), _jsx(ToggleSwitch, { onChange: onToggleChange, checked: isToggleChecked, compact: true })] })), _jsx(\"div\", { className: \"menu-content-items\", children: items.map((item) => {\n return (_jsxs(MenuItem, { disabled: item.disabled, onClick: () => onClickHandler(item), \"data-testid\": \"CardMenu.item\", \"data-state\": item.disabled ? 'disabled' : undefined, children: [item.icon && (_jsx(ListItemIcon, { children: _jsx(Icon, { className: item.icon, fontSize: \"small\" }) })), _jsx(ListItemText, { primaryTypographyProps: { noWrap: true }, primary: item.text }), allowMultiselect && (_jsx(Checkbox, { checked: item.isChecked, disabled: item.disabled, \"data-testid\": \"CardMenu.check\" }))] }, item.text));\n }) })] }) }) })) }));\n});\n//# sourceMappingURL=cardMenu.js.map"],"names":["CardMenu","forwardRef","items","setItems","open","header","anchorRef","allowMultiselect","hasToggleSelection","onItemClick","onClose","sx","classes","placement","toggleLabel","rounded","ref","isMobile","useWindowSize","isToggleChecked","onClickHandler","onToggleChange","useCardMenu","_jsx","_Fragment","children","_jsxs","DrawerStyled","anchor","hasHeader","className","List","map","item","React","Fragment","ListItem","button","disabled","onClick","undefined","icon","ListItemIcon","Icon","fontSize","ListItemText","primaryTypographyProps","noWrap","primary","text","Checkbox","checked","isChecked","Divider","variant","PopperStyled","anchorEl","current","ClickAwayListener","onClickAway","MenuListStyled","MenuItem","ToggleSwitch","onChange","compact"],"mappings":"2rBAYY,MAACA,EAAWC,GAAW,EAAGC,QAAOC,WAAUC,OAAMC,SAAQC,YAAWC,mBAAkBC,qBAAoBC,cAAaC,UAASC,KAAIC,UAASC,YAAWC,cAAaC,WAAYC,KACzL,MAAMC,SAAEA,GAAaC,KACfC,gBAAEA,EAAeC,eAAEA,EAAcC,eAAEA,GAAmBC,EAAYpB,EAAOK,EAAkBJ,EAAUM,EAAaC,GACxH,OAAQa,EAAKC,EAAW,CAAEC,SAAUR,EAAYS,EAAMC,EAAc,CAAEvB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,EAAM,CAAEb,UAAW,UAAWc,SAAU,eAAoBvC,GAAUkB,EAAK8B,EAAS,CAAEC,QAAS,SAAUxB,UAAW,sBAAwBvB,GAAoBC,GAAuBkB,EAAMmC,EAAU,CAAE/B,UAAW,kBAAmB,cAAe,kBAAmBL,SAAU,CAACF,EAAKsB,EAAc,CAAEC,uBAAwB,CAAEC,QAAQ,GAAQC,QAASlC,GAA4B,eAAiBS,EAAKuC,EAAc,CAAEC,SAAU1C,EAAgB8B,QAAShC,EAAiB6C,SAAS,OAAczC,EAAK,MAAO,CAAEO,UAAW,qBAAsBL,SAAUvB,EAAM8B,KAAKC,GAC1mCP,EAAMmC,EAAU,CAAEvB,SAAUL,EAAKK,SAAUC,QAAS,IAAMnB,EAAea,GAAO,cAAe,gBAAiB,aAAcA,EAAKK,SAAW,gBAAaE,EAAWf,SAAU,CAACQ,EAAKQ,MAASlB,EAAKmB,EAAc,CAAEjB,SAAUF,EAAKoB,EAAM,CAAEb,UAAWG,EAAKQ,KAAMG,SAAU,YAAgBrB,EAAKsB,EAAc,CAAEC,uBAAwB,CAAEC,QAAQ,GAAQC,QAASf,EAAKgB,OAAS1C,GAAqBgB,EAAK2B,EAAU,CAAEC,QAASlB,EAAKmB,UAAWd,SAAUL,EAAKK,SAAU,cAAe,qBAAyBL,EAAKgB,kBAC7e"}
1
+ {"version":3,"file":"cardMenu.js","sources":["../../../src/components/cardMenu/cardMenu.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { forwardRef } from 'react';\nimport useWindowSize from '../common/hook/useWindowSize';\nimport { List, ListItem, ListItemIcon, ListItemText, MenuItem, ClickAwayListener, Divider } from '@mui/material';\nimport { Icon } from '../icon';\nimport { Checkbox } from '../checkbox';\nimport { ToggleSwitch } from '../toggleSwitch';\nimport { useCardMenu } from './hooks/useCardMenu';\nimport { PopperStyled } from './styled/popperStyled';\nimport { MenuListStyled } from './styled/menuListStyled';\nimport { DrawerStyled } from './styled/drawerStyled';\nexport const CardMenu = forwardRef(({ items, setItems, open, header, anchorRef, allowMultiselect, hasToggleSelection, onItemClick, onClose, sx, classes, placement, toggleLabel, rounded, }, ref) => {\n const { isMobile } = useWindowSize();\n const { isToggleChecked, onClickHandler, onToggleChange } = useCardMenu(items, allowMultiselect, setItems, onItemClick, onClose);\n return (_jsx(_Fragment, { children: isMobile ? (_jsxs(DrawerStyled, { open: open, onClose: onClose, anchor: \"bottom\", sx: sx, ref: ref, classes: classes, hasHeader: !!header, \"data-testid\": \"CardMenu\", children: [header && (_jsx(\"div\", { className: \"drawer-header\", \"data-testid\": \"CardMenu.header\", children: header })), _jsx(List, { children: items.map((item) => {\n return (_jsxs(React.Fragment, { children: [_jsxs(ListItem, { button: true, disabled: item.disabled, onClick: () => onClickHandler(item), \"data-testid\": \"CardMenu.item\", \"data-state\": item.disabled ? 'disabled' : undefined, children: [item.icon && (_jsx(ListItemIcon, { children: _jsx(Icon, { className: item.icon, fontSize: \"small\" }) })), _jsx(ListItemText, { primaryTypographyProps: { noWrap: true }, primary: item.text }), allowMultiselect && (_jsx(Checkbox, { checked: item.isChecked, disabled: item.disabled, \"data-testid\": \"CardMenu.check\" }))] }), _jsx(Divider, { variant: \"middle\" })] }, item.text));\n }) })] })) : (_jsx(PopperStyled, { open: open, anchorEl: anchorRef.current, placement: placement, ref: ref, rounded: rounded, \"data-testid\": \"CardMenu\", children: _jsx(ClickAwayListener, { onClickAway: onClose, children: _jsxs(MenuListStyled, { allowMultiselect: allowMultiselect, sx: sx, classes: classes, children: [header && (_jsxs(MenuItem, { className: \"menu-item-header\", \"data-testid\": \"CardMenu.header\", children: [_jsx(ListItemText, { primaryTypographyProps: { noWrap: true }, primary: header }), _jsx(ListItemIcon, { onClick: onClose, \"data-testid\": \"CardMenu.close\", children: _jsx(Icon, { className: \"ballotx\", fontSize: \"small\" }) })] })), header && _jsx(Divider, { variant: \"middle\", className: \"menu-item-divider\" }), allowMultiselect && hasToggleSelection && (_jsxs(MenuItem, { className: \"menu-select-all\", \"data-testid\": \"CardMenu.toggle\", children: [_jsx(ListItemText, { primaryTypographyProps: { noWrap: true }, primary: toggleLabel ? toggleLabel : 'Select all' }), _jsx(ToggleSwitch, { onChange: onToggleChange, checked: isToggleChecked, compact: true })] })), _jsx(\"div\", { className: \"menu-content-items\", children: items.map((item) => {\n return (_jsxs(MenuItem, { disabled: item.disabled, onClick: () => onClickHandler(item), \"data-testid\": \"CardMenu.item\", \"data-state\": item.disabled ? 'disabled' : undefined, children: [item.icon && (_jsx(ListItemIcon, { children: _jsx(Icon, { className: item.icon, fontSize: \"small\" }) })), _jsx(ListItemText, { primaryTypographyProps: { noWrap: true }, primary: item.text }), allowMultiselect && (_jsx(Checkbox, { checked: item.isChecked, disabled: item.disabled, \"data-testid\": \"CardMenu.check\" }))] }, item.text));\n }) })] }) }) })) }));\n});\n//# sourceMappingURL=cardMenu.js.map"],"names":["CardMenu","forwardRef","items","setItems","open","header","anchorRef","allowMultiselect","hasToggleSelection","onItemClick","onClose","sx","classes","placement","toggleLabel","rounded","ref","isMobile","useWindowSize","isToggleChecked","onClickHandler","onToggleChange","useCardMenu","_jsx","_Fragment","children","_jsxs","DrawerStyled","anchor","hasHeader","className","List","map","item","React","Fragment","ListItem","button","disabled","onClick","undefined","icon","ListItemIcon","Icon","fontSize","ListItemText","primaryTypographyProps","noWrap","primary","text","Checkbox","checked","isChecked","Divider","variant","PopperStyled","anchorEl","current","ClickAwayListener","onClickAway","MenuListStyled","MenuItem","ToggleSwitch","onChange","compact"],"mappings":"wpBAWY,MAACA,EAAWC,GAAW,EAAGC,QAAOC,WAAUC,OAAMC,SAAQC,YAAWC,mBAAkBC,qBAAoBC,cAAaC,UAASC,KAAIC,UAASC,YAAWC,cAAaC,WAAYC,KACzL,MAAMC,SAAEA,GAAaC,KACfC,gBAAEA,EAAeC,eAAEA,EAAcC,eAAEA,GAAmBC,EAAYpB,EAAOK,EAAkBJ,EAAUM,EAAaC,GAC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EAAKmB,EAAc,CAAEH,QAAS7B,EAAS,cAAe,iBAAkBe,SAAUF,EAAKoB,EAAM,CAAEb,UAAW,UAAWc,SAAU,eAAoBvC,GAAUkB,EAAK8B,EAAS,CAAEC,QAAS,SAAUxB,UAAW,sBAAwBvB,GAAoBC,GAAuBkB,EAAMmC,EAAU,CAAE/B,UAAW,kBAAmB,cAAe,kBAAmBL,SAAU,CAACF,EAAKsB,EAAc,CAAEC,uBAAwB,CAAEC,QAAQ,GAAQC,QAASlC,GAA4B,eAAiBS,EAAKuC,EAAc,CAAEC,SAAU1C,EAAgB8B,QAAShC,EAAiB6C,SAAS,OAAczC,EAAK,MAAO,CAAEO,UAAW,qBAAsBL,SAAUvB,EAAM8B,KAAKC,GAC1mCP,EAAMmC,EAAU,CAAEvB,SAAUL,EAAKK,SAAUC,QAAS,IAAMnB,EAAea,GAAO,cAAe,gBAAiB,aAAcA,EAAKK,SAAW,gBAAaE,EAAWf,SAAU,CAACQ,EAAKQ,MAASlB,EAAKmB,EAAc,CAAEjB,SAAUF,EAAKoB,EAAM,CAAEb,UAAWG,EAAKQ,KAAMG,SAAU,YAAgBrB,EAAKsB,EAAc,CAAEC,uBAAwB,CAAEC,QAAQ,GAAQC,QAASf,EAAKgB,OAAS1C,GAAqBgB,EAAK2B,EAAU,CAAEC,QAASlB,EAAKmB,UAAWd,SAAUL,EAAKK,SAAU,cAAe,qBAAyBL,EAAKgB,kBAC7e"}
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare const MenuListStyled: import("@emotion/styled").StyledComponent<import("@mui/material/MenuList").MenuListOwnProps & import("@mui/material").ListOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & {
3
3
  ref?: import("react").Ref<HTMLUListElement>;
4
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "autoFocus" | "variant" | "dense" | "autoFocusItem" | "disabledItemsFocusable" | "disableListWrap" | "disablePadding" | "subheader"> & {
4
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "autoFocus" | "dense" | "autoFocusItem" | "disabledItemsFocusable" | "disableListWrap" | "disablePadding" | "subheader"> & {
5
5
  theme?: import("@emotion/react").Theme;
6
6
  } & {
7
7
  theme?: any;
@@ -1,2 +1,2 @@
1
- import{useState as i,useEffect as e}from"react";import{customBreakpoints as n}from"../../../design/skoda/components/breakpoints.theme.js";function t(){const t="undefined"!=typeof window,[o,d]=i({width:t?1440:window.innerWidth,height:t?800:window.innerHeight,isMobile:!1});function r(){d({width:window.innerWidth,height:window.innerHeight,isMobile:window.innerWidth<n.values.md})}return e((()=>(r(),window.addEventListener("resize",r),()=>{r(),window.removeEventListener("resize",r)})),[]),o}export{t as default};
1
+ import{useState as i,useEffect as e}from"react";import{customBreakpoints as n}from"../../../design/skoda/components/layout/breakpoints.theme.js";function t(){const t="undefined"!=typeof window,[o,d]=i({width:t?1440:window.innerWidth,height:t?800:window.innerHeight,isMobile:!1});function r(){d({width:window.innerWidth,height:window.innerHeight,isMobile:window.innerWidth<n.values.md})}return e((()=>(r(),window.addEventListener("resize",r),()=>{r(),window.removeEventListener("resize",r)})),[]),o}export{t as default};
2
2
  //# sourceMappingURL=useWindowSize.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useWindowSize.js","sources":["../../../../src/components/common/hook/useWindowSize.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { customBreakpoints } from '../../../design/skoda/components/breakpoints.theme';\nexport default function useWindowSize() {\n const isSSR = typeof window !== 'undefined';\n const [windowSize, setWindowSize] = useState({\n width: isSSR ? 1440 : window.innerWidth,\n height: isSSR ? 800 : window.innerHeight,\n isMobile: false,\n });\n function changeWindowSize() {\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n isMobile: window.innerWidth < customBreakpoints.values['md'] ? true : false,\n });\n }\n useEffect(() => {\n changeWindowSize();\n window.addEventListener('resize', changeWindowSize);\n return () => {\n changeWindowSize();\n window.removeEventListener('resize', changeWindowSize);\n };\n }, []);\n return windowSize;\n}\n//# sourceMappingURL=useWindowSize.js.map"],"names":["useWindowSize","isSSR","window","windowSize","setWindowSize","useState","width","innerWidth","height","innerHeight","isMobile","changeWindowSize","customBreakpoints","values","useEffect","addEventListener","removeEventListener"],"mappings":"0IAEe,SAASA,IACpB,MAAMC,EAA0B,oBAAXC,QACdC,EAAYC,GAAiBC,EAAS,CACzCC,MAAOL,EAAQ,KAAOC,OAAOK,WAC7BC,OAAQP,EAAQ,IAAMC,OAAOO,YAC7BC,UAAU,IAEd,SAASC,IACLP,EAAc,CACVE,MAAOJ,OAAOK,WACdC,OAAQN,OAAOO,YACfC,SAAUR,OAAOK,WAAaK,EAAkBC,OAAW,IAElE,CASD,OARAC,GAAU,KACNH,IACAT,OAAOa,iBAAiB,SAAUJ,GAC3B,KACHA,IACAT,OAAOc,oBAAoB,SAAUL,EAAiB,IAE3D,IACIR,CACX"}
1
+ {"version":3,"file":"useWindowSize.js","sources":["../../../../src/components/common/hook/useWindowSize.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { customBreakpoints } from '../../../design/skoda/components/layout/breakpoints.theme';\nexport default function useWindowSize() {\n const isSSR = typeof window !== 'undefined';\n const [windowSize, setWindowSize] = useState({\n width: isSSR ? 1440 : window.innerWidth,\n height: isSSR ? 800 : window.innerHeight,\n isMobile: false,\n });\n function changeWindowSize() {\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n isMobile: window.innerWidth < customBreakpoints.values['md'] ? true : false,\n });\n }\n useEffect(() => {\n changeWindowSize();\n window.addEventListener('resize', changeWindowSize);\n return () => {\n changeWindowSize();\n window.removeEventListener('resize', changeWindowSize);\n };\n }, []);\n return windowSize;\n}\n//# sourceMappingURL=useWindowSize.js.map"],"names":["useWindowSize","isSSR","window","windowSize","setWindowSize","useState","width","innerWidth","height","innerHeight","isMobile","changeWindowSize","customBreakpoints","values","useEffect","addEventListener","removeEventListener"],"mappings":"iJAEe,SAASA,IACpB,MAAMC,EAA0B,oBAAXC,QACdC,EAAYC,GAAiBC,EAAS,CACzCC,MAAOL,EAAQ,KAAOC,OAAOK,WAC7BC,OAAQP,EAAQ,IAAMC,OAAOO,YAC7BC,UAAU,IAEd,SAASC,IACLP,EAAc,CACVE,MAAOJ,OAAOK,WACdC,OAAQN,OAAOO,YACfC,SAAUR,OAAOK,WAAaK,EAAkBC,OAAW,IAElE,CASD,OARAC,GAAU,KACNH,IACAT,OAAOa,iBAAiB,SAAUJ,GAC3B,KACHA,IACAT,OAAOc,oBAAoB,SAAUL,EAAiB,IAE3D,IACIR,CACX"}
@@ -4,7 +4,7 @@ import { TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';
4
4
  */
5
5
  declare const TextFieldStyled: import("@emotion/styled").StyledComponent<{
6
6
  variant?: import("@mui/material/TextField").TextFieldVariants;
7
- } & Omit<import("@mui/material/TextField").StandardTextFieldProps | import("@mui/material/TextField").FilledTextFieldProps | import("@mui/material/TextField").OutlinedTextFieldProps, "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & (MuiTextFieldProps & {
7
+ } & Omit<import("@mui/material/TextField").FilledTextFieldProps | import("@mui/material/TextField").OutlinedTextFieldProps | import("@mui/material/TextField").StandardTextFieldProps, "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & (MuiTextFieldProps & {
8
8
  isSelect?: boolean;
9
9
  disabled?: boolean;
10
10
  hasError?: boolean;
@@ -5,7 +5,7 @@ export type IconButtonProps = MuiIconButtonProps & {
5
5
  };
6
6
  export declare const IconButton: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
7
7
  ref?: import("react").Ref<HTMLButtonElement>;
8
- }, "disabled" | "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableFocusRipple" | "size" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
8
+ }, "disabled" | "className" | "style" | "classes" | "children" | "sx" | "color" | "tabIndex" | "action" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
9
9
  component?: import("react").ElementType<any>;
10
10
  } & {
11
11
  variant?: 'filled' | 'outlined' | 'standard';
@@ -1 +1 @@
1
- {"version":3,"file":"indicator.js","sources":["../../../src/components/indicator/indicator.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport styled from '@emotion/styled';\nimport { flowColors } from '../../design/skoda/palette.theme';\nimport { forwardRef } from 'react';\n/**\n * @description Styled SkodaFlow Indicator component\n * @param props IndicatorProps\n * @returns React Functional Component\n */\nexport const Indicator = forwardRef((_a, ref) => {\n var { children, label, variant = 'positive' } = _a, props = __rest(_a, [\"children\", \"label\", \"variant\"]);\n const text = label ? label : children;\n return (_jsx(IndicatorStyled, Object.assign({}, props, { ref: ref, className: \"disclamer\", variant: variant, \"data-testid\": \"Indicator\", children: text })));\n});\n/**\n * Indicator styling defintion\n */\nconst IndicatorStyled = styled.div `\r\n --flow-indicator-color: ${(props) => {\n switch (props.variant) {\n case 'alert':\n return flowColors.alert['main'];\n case 'warning':\n return flowColors.warning['main'];\n case 'positive':\n return flowColors.positive['main'];\n case 'neutral':\n return flowColors.onSurface.os200;\n default:\n return flowColors[props.variant] ? flowColors[props.variant] : props.variant;\n }\n}};\r\n color: ${flowColors.text.primary};\r\n font-weight: 300;\r\n line-height: 20px;\r\n letter-spacing: 0.2px;\r\n &::before {\r\n content: '';\r\n width: 14px;\r\n height: 14px;\r\n border-radius: 50%;\r\n margin-right: 8px;\r\n margin-top: -2px;\r\n display: inline-block;\r\n vertical-align: middle;\r\n background-color: var(--flow-indicator-color);\r\n }\r\n`;\n//# sourceMappingURL=indicator.js.map"],"names":["Indicator","forwardRef","_a","ref","children","label","variant","props","__rest","text","_jsx","IndicatorStyled","Object","assign","className","styled","div","flowColors","alert","warning","positive","onSurface","os200","primary"],"mappings":"0MAUY,MAACA,EAAYC,GAAW,CAACC,EAAIC,KACrC,IAAIC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,EAAU,YAAeJ,EAAIK,EAAQC,EAAON,EAAI,CAAC,WAAY,QAAS,YAC7F,MAAMO,EAAOJ,GAAgBD,EAC7B,OAAQM,EAAKC,EAAiBC,OAAOC,OAAO,CAAA,EAAIN,EAAO,CAAEJ,IAAKA,EAAKW,UAAW,YAAaR,QAASA,EAAS,cAAe,YAAaF,SAAUK,IAAU,IAK3JE,EAAkBI,EAAOC,GAAI;4BACNT,IACzB,OAAQA,EAAMD,SACV,IAAK,QACD,OAAOW,EAAWC,MAAY,KAClC,IAAK,UACD,OAAOD,EAAWE,QAAc,KACpC,IAAK,WACD,OAAOF,EAAWG,SAAe,KACrC,IAAK,UACD,OAAOH,EAAWI,UAAUC,MAChC,QACI,OAAOL,EAAWV,EAAMD,SAAWW,EAAWV,EAAMD,SAAWC,EAAMD,QAC5E;WAEMW,EAAWR,KAAKc;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"indicator.js","sources":["../../../src/components/indicator/indicator.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport styled from '@emotion/styled';\nimport { flowColors } from '../../design/skoda/palette.theme';\nimport { forwardRef } from 'react';\n/**\n * @description Styled SkodaFlow Indicator component\n * @param props IndicatorProps\n * @returns React Functional Component\n */\nexport const Indicator = forwardRef((_a, ref) => {\n var { children, label, variant = 'positive' } = _a, props = __rest(_a, [\"children\", \"label\", \"variant\"]);\n const text = label ? label : children;\n return (_jsx(IndicatorStyled, Object.assign({}, props, { ref: ref, className: \"disclamer\", variant: variant, \"data-testid\": \"Indicator\", children: text })));\n});\n/**\n * Indicator styling defintion\n */\nconst IndicatorStyled = styled.div `\n --flow-indicator-color: ${(props) => {\n switch (props.variant) {\n case 'alert':\n return flowColors.alert['main'];\n case 'warning':\n return flowColors.warning['main'];\n case 'positive':\n return flowColors.positive['main'];\n case 'neutral':\n return flowColors.onSurface.os200;\n default:\n return flowColors[props.variant] ? flowColors[props.variant] : props.variant;\n }\n}};\n color: ${flowColors.text.primary};\n font-weight: 300;\n line-height: 20px;\n letter-spacing: 0.2px;\n &::before {\n content: '';\n width: 14px;\n height: 14px;\n border-radius: 50%;\n margin-right: 8px;\n margin-top: -2px;\n display: inline-block;\n vertical-align: middle;\n background-color: var(--flow-indicator-color);\n }\n`;\n//# sourceMappingURL=indicator.js.map"],"names":["Indicator","forwardRef","_a","ref","children","label","variant","props","__rest","text","_jsx","IndicatorStyled","Object","assign","className","styled","div","flowColors","alert","warning","positive","onSurface","os200","primary"],"mappings":"0MAUY,MAACA,EAAYC,GAAW,CAACC,EAAIC,KACrC,IAAIC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,EAAU,YAAeJ,EAAIK,EAAQC,EAAON,EAAI,CAAC,WAAY,QAAS,YAC7F,MAAMO,EAAOJ,GAAgBD,EAC7B,OAAQM,EAAKC,EAAiBC,OAAOC,OAAO,CAAA,EAAIN,EAAO,CAAEJ,IAAKA,EAAKW,UAAW,YAAaR,QAASA,EAAS,cAAe,YAAaF,SAAUK,IAAU,IAK3JE,EAAkBI,EAAOC,GAAI;4BACNT,IACzB,OAAQA,EAAMD,SACV,IAAK,QACD,OAAOW,EAAWC,MAAY,KAClC,IAAK,UACD,OAAOD,EAAWE,QAAc,KACpC,IAAK,WACD,OAAOF,EAAWG,SAAe,KACrC,IAAK,UACD,OAAOH,EAAWI,UAAUC,MAChC,QACI,OAAOL,EAAWV,EAAMD,SAAWW,EAAWV,EAAMD,SAAWC,EAAMD,QAC5E;WAEMW,EAAWR,KAAKc;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"label.js","sources":["../../../src/components/label/label.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport styled from '@emotion/styled';\nimport { flowColors } from '../../design/skoda/palette.theme';\nimport { forwardRef, useEffect } from 'react';\n/**\n * @description SkodaFlow Label component.\n * @param props LabelProps\n * @returns React Functional component\n */\nexport const Label = forwardRef((_a, ref) => {\n var { label, children } = _a, props = __rest(_a, [\"label\", \"children\"]);\n const text = label ? label : children;\n useEffect(() => { }, [props]);\n return (_jsx(LabelStyled, Object.assign({}, props, { ref: ref, \"data-testid\": \"Label\", children: text })));\n});\n/**\n * @description Label styling definition\n */\nconst LabelStyled = styled.span `\r\n font-size: 11px;\r\n line-height: 12px;\r\n letter-spacing: 3px;\r\n text-transform: uppercase;\r\n font-weight: 900;\r\n margin: 0px 15px;\r\n white-space: nowrap;\r\n text-rendering: geometricPrecision;\r\n color: ${flowColors.onSurface.os500};\r\n`;\n//# sourceMappingURL=label.js.map"],"names":["Label","forwardRef","_a","ref","label","children","props","__rest","text","useEffect","_jsx","LabelStyled","Object","assign","styled","span","flowColors","onSurface","os500"],"mappings":"yNAUY,MAACA,EAAQC,GAAW,CAACC,EAAIC,KACjC,IAAIC,MAAEA,EAAKC,SAAEA,GAAaH,EAAII,EAAQC,EAAOL,EAAI,CAAC,QAAS,aAC3D,MAAMM,EAAOJ,GAAgBC,EAE7B,OADAI,GAAU,QAAW,CAACH,IACdI,EAAKC,EAAaC,OAAOC,OAAO,CAAA,EAAIP,EAAO,CAAEH,IAAKA,EAAK,cAAe,QAASE,SAAUG,IAAU,IAKzGG,EAAcG,EAAOC,IAAK;;;;;;;;;WASrBC,EAAWC,UAAUC;"}
1
+ {"version":3,"file":"label.js","sources":["../../../src/components/label/label.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport styled from '@emotion/styled';\nimport { flowColors } from '../../design/skoda/palette.theme';\nimport { forwardRef, useEffect } from 'react';\n/**\n * @description SkodaFlow Label component.\n * @param props LabelProps\n * @returns React Functional component\n */\nexport const Label = forwardRef((_a, ref) => {\n var { label, children } = _a, props = __rest(_a, [\"label\", \"children\"]);\n const text = label ? label : children;\n useEffect(() => { }, [props]);\n return (_jsx(LabelStyled, Object.assign({}, props, { ref: ref, \"data-testid\": \"Label\", children: text })));\n});\n/**\n * @description Label styling definition\n */\nconst LabelStyled = styled.span `\n font-size: 11px;\n line-height: 12px;\n letter-spacing: 3px;\n text-transform: uppercase;\n font-weight: 900;\n margin: 0px 15px;\n white-space: nowrap;\n text-rendering: geometricPrecision;\n color: ${flowColors.onSurface.os500};\n`;\n//# sourceMappingURL=label.js.map"],"names":["Label","forwardRef","_a","ref","label","children","props","__rest","text","useEffect","_jsx","LabelStyled","Object","assign","styled","span","flowColors","onSurface","os500"],"mappings":"yNAUY,MAACA,EAAQC,GAAW,CAACC,EAAIC,KACjC,IAAIC,MAAEA,EAAKC,SAAEA,GAAaH,EAAII,EAAQC,EAAOL,EAAI,CAAC,QAAS,aAC3D,MAAMM,EAAOJ,GAAgBC,EAE7B,OADAI,GAAU,QAAW,CAACH,IACdI,EAAKC,EAAaC,OAAOC,OAAO,CAAA,EAAIP,EAAO,CAAEH,IAAKA,EAAK,cAAe,QAASE,SAAUG,IAAU,IAKzGG,EAAcG,EAAOC,IAAK;;;;;;;;;WASrBC,EAAWC,UAAUC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"labelFeature.js","sources":["../../../src/components/labelFeature/labelFeature.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from 'react';\nimport styled from '@emotion/styled';\nimport { Label } from '../label';\nimport { flowColors } from '../../design/skoda/palette.theme';\nimport { VariantType } from '../../utils/enum';\n/**\n * @description Styled SkodaFlow LabelFeature component.\n * @param props LabelFeatureProps\n * @returns React Function Component\n */\nexport const LabelFeature = forwardRef((_a, ref) => {\n var { children, label, variant = 'primary' } = _a, props = __rest(_a, [\"children\", \"label\", \"variant\"]);\n return (_jsx(LabelFeatureStyled, Object.assign({}, props, { ref: ref, variant: variant, label: label, children: children })));\n});\n/**\n * @description LabelFeature styling defintion\n */\nconst LabelFeatureStyled = styled(Label) `\r\n --flow-label-color: ${(props) => {\n switch (props.variant) {\n case VariantType.PRIMARY:\n return flowColors.brand.tertiary;\n case VariantType.NEUTRAL:\n return flowColors.onSurface.os500;\n default:\n return flowColors[props.variant] ? flowColors[props.variant] : flowColors.brand.secondary;\n }\n}};\r\n color: ${flowColors.onSurface.os0};\r\n background-color: var(--flow-label-color);\r\n padding: 4px 8px 4px 10px;\r\n border-radius: 2px;\r\n display: inline;\r\n`;\n//# sourceMappingURL=labelFeature.js.map"],"names":["LabelFeature","forwardRef","_a","ref","children","label","variant","props","__rest","_jsx","LabelFeatureStyled","Object","assign","styled","Label","VariantType","PRIMARY","flowColors","brand","tertiary","NEUTRAL","onSurface","os500","secondary","os0"],"mappings":"sSAYY,MAACA,EAAeC,GAAW,CAACC,EAAIC,KACxC,IAAIC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,EAAU,WAAcJ,EAAIK,EAAQC,EAAON,EAAI,CAAC,WAAY,QAAS,YAC5F,OAAQO,EAAKC,EAAoBC,OAAOC,OAAO,CAAE,EAAEL,EAAO,CAAEJ,IAAKA,EAAKG,QAASA,EAASD,MAAOA,EAAOD,SAAUA,IAAc,IAK5HM,EAAqBG,EAAOC,EAAO;wBAChBP,IACrB,OAAQA,EAAMD,SACV,KAAKS,EAAYC,QACb,OAAOC,EAAWC,MAAMC,SAC5B,KAAKJ,EAAYK,QACb,OAAOH,EAAWI,UAAUC,MAChC,QACI,OAAOL,EAAWV,EAAMD,SAAWW,EAAWV,EAAMD,SAAWW,EAAWC,MAAMK,UACvF;WAEMN,EAAWI,UAAUG;;;;;"}
1
+ {"version":3,"file":"labelFeature.js","sources":["../../../src/components/labelFeature/labelFeature.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from 'react';\nimport styled from '@emotion/styled';\nimport { Label } from '../label';\nimport { flowColors } from '../../design/skoda/palette.theme';\nimport { VariantType } from '../../utils/enum';\n/**\n * @description Styled SkodaFlow LabelFeature component.\n * @param props LabelFeatureProps\n * @returns React Function Component\n */\nexport const LabelFeature = forwardRef((_a, ref) => {\n var { children, label, variant = 'primary' } = _a, props = __rest(_a, [\"children\", \"label\", \"variant\"]);\n return (_jsx(LabelFeatureStyled, Object.assign({}, props, { ref: ref, variant: variant, label: label, children: children })));\n});\n/**\n * @description LabelFeature styling defintion\n */\nconst LabelFeatureStyled = styled(Label) `\n --flow-label-color: ${(props) => {\n switch (props.variant) {\n case VariantType.PRIMARY:\n return flowColors.brand.tertiary;\n case VariantType.NEUTRAL:\n return flowColors.onSurface.os500;\n default:\n return flowColors[props.variant] ? flowColors[props.variant] : flowColors.brand.secondary;\n }\n}};\n color: ${flowColors.onSurface.os0};\n background-color: var(--flow-label-color);\n padding: 4px 8px 4px 10px;\n border-radius: 2px;\n display: inline;\n`;\n//# sourceMappingURL=labelFeature.js.map"],"names":["LabelFeature","forwardRef","_a","ref","children","label","variant","props","__rest","_jsx","LabelFeatureStyled","Object","assign","styled","Label","VariantType","PRIMARY","flowColors","brand","tertiary","NEUTRAL","onSurface","os500","secondary","os0"],"mappings":"sSAYY,MAACA,EAAeC,GAAW,CAACC,EAAIC,KACxC,IAAIC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,EAAU,WAAcJ,EAAIK,EAAQC,EAAON,EAAI,CAAC,WAAY,QAAS,YAC5F,OAAQO,EAAKC,EAAoBC,OAAOC,OAAO,CAAE,EAAEL,EAAO,CAAEJ,IAAKA,EAAKG,QAASA,EAASD,MAAOA,EAAOD,SAAUA,IAAc,IAK5HM,EAAqBG,EAAOC,EAAO;wBAChBP,IACrB,OAAQA,EAAMD,SACV,KAAKS,EAAYC,QACb,OAAOC,EAAWC,MAAMC,SAC5B,KAAKJ,EAAYK,QACb,OAAOH,EAAWI,UAAUC,MAChC,QACI,OAAOL,EAAWV,EAAMD,SAAWW,EAAWV,EAAMD,SAAWW,EAAWC,MAAMK,UACvF;WAEMN,EAAWI,UAAUG;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"labelStatus.js","sources":["../../../src/components/labelStatus/labelStatus.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from 'react';\nimport styled from '@emotion/styled';\nimport { Label } from '../label';\nimport { flowColors } from '../../design/skoda/palette.theme';\n/**\n * @description Styled SkodaFlow LabelStatus component\n * @param props LabelStatusProps\n * @returns React Functional Component\n */\nexport const LabelStatus = forwardRef((_a, ref) => {\n var { children, label, variant = 'positive' } = _a, props = __rest(_a, [\"children\", \"label\", \"variant\"]);\n return (_jsx(LabelStatusStyled, Object.assign({ className: 'labelStatus' }, props, { ref: ref, variant: variant, label: label, \"data-testid\": \"LabelStatus\", children: children })));\n});\n/**\n * LabelStatus styling defintion\n */\nconst LabelStatusStyled = styled(Label) `\r\n --flow-label-color: ${(props) => {\n switch (props.variant) {\n case 'alert':\n return flowColors.alert['main'];\n case 'warning':\n return flowColors.warning['main'];\n case 'positive':\n return flowColors.positive['main'];\n default:\n return flowColors[props.variant] ? flowColors[props.variant] : props.variant;\n }\n}};\r\n color: ${flowColors.text.primary};\r\n &::before {\r\n content: '';\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n margin-right: 8px;\r\n margin-top: -2px;\r\n display: inline-block;\r\n vertical-align: middle;\r\n background-color: var(--flow-label-color);\r\n }\r\n`;\n//# sourceMappingURL=labelStatus.js.map"],"names":["LabelStatus","forwardRef","_a","ref","children","label","variant","props","__rest","_jsx","LabelStatusStyled","Object","assign","className","styled","Label","flowColors","alert","warning","positive","text","primary"],"mappings":"oPAWY,MAACA,EAAcC,GAAW,CAACC,EAAIC,KACvC,IAAIC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,EAAU,YAAeJ,EAAIK,EAAQC,EAAON,EAAI,CAAC,WAAY,QAAS,YAC7F,OAAQO,EAAKC,EAAmBC,OAAOC,OAAO,CAAEC,UAAW,eAAiBN,EAAO,CAAEJ,IAAKA,EAAKG,QAASA,EAASD,MAAOA,EAAO,cAAe,cAAeD,SAAUA,IAAc,IAKnLM,EAAoBI,EAAOC,EAAO;wBACfR,IACrB,OAAQA,EAAMD,SACV,IAAK,QACD,OAAOU,EAAWC,MAAY,KAClC,IAAK,UACD,OAAOD,EAAWE,QAAc,KACpC,IAAK,WACD,OAAOF,EAAWG,SAAe,KACrC,QACI,OAAOH,EAAWT,EAAMD,SAAWU,EAAWT,EAAMD,SAAWC,EAAMD,QAC5E;WAEMU,EAAWI,KAAKC;;;;;;;;;;;;"}
1
+ {"version":3,"file":"labelStatus.js","sources":["../../../src/components/labelStatus/labelStatus.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from 'react';\nimport styled from '@emotion/styled';\nimport { Label } from '../label';\nimport { flowColors } from '../../design/skoda/palette.theme';\n/**\n * @description Styled SkodaFlow LabelStatus component\n * @param props LabelStatusProps\n * @returns React Functional Component\n */\nexport const LabelStatus = forwardRef((_a, ref) => {\n var { children, label, variant = 'positive' } = _a, props = __rest(_a, [\"children\", \"label\", \"variant\"]);\n return (_jsx(LabelStatusStyled, Object.assign({ className: 'labelStatus' }, props, { ref: ref, variant: variant, label: label, \"data-testid\": \"LabelStatus\", children: children })));\n});\n/**\n * LabelStatus styling defintion\n */\nconst LabelStatusStyled = styled(Label) `\n --flow-label-color: ${(props) => {\n switch (props.variant) {\n case 'alert':\n return flowColors.alert['main'];\n case 'warning':\n return flowColors.warning['main'];\n case 'positive':\n return flowColors.positive['main'];\n default:\n return flowColors[props.variant] ? flowColors[props.variant] : props.variant;\n }\n}};\n color: ${flowColors.text.primary};\n &::before {\n content: '';\n width: 10px;\n height: 10px;\n border-radius: 50%;\n margin-right: 8px;\n margin-top: -2px;\n display: inline-block;\n vertical-align: middle;\n background-color: var(--flow-label-color);\n }\n`;\n//# sourceMappingURL=labelStatus.js.map"],"names":["LabelStatus","forwardRef","_a","ref","children","label","variant","props","__rest","_jsx","LabelStatusStyled","Object","assign","className","styled","Label","flowColors","alert","warning","positive","text","primary"],"mappings":"oPAWY,MAACA,EAAcC,GAAW,CAACC,EAAIC,KACvC,IAAIC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,EAAU,YAAeJ,EAAIK,EAAQC,EAAON,EAAI,CAAC,WAAY,QAAS,YAC7F,OAAQO,EAAKC,EAAmBC,OAAOC,OAAO,CAAEC,UAAW,eAAiBN,EAAO,CAAEJ,IAAKA,EAAKG,QAASA,EAASD,MAAOA,EAAO,cAAe,cAAeD,SAAUA,IAAc,IAKnLM,EAAoBI,EAAOC,EAAO;wBACfR,IACrB,OAAQA,EAAMD,SACV,IAAK,QACD,OAAOU,EAAWC,MAAY,KAClC,IAAK,UACD,OAAOD,EAAWE,QAAc,KACpC,IAAK,WACD,OAAOF,EAAWG,SAAe,KACrC,QACI,OAAOH,EAAWT,EAAMD,SAAWU,EAAWT,EAAMD,SAAWC,EAAMD,QAC5E;WAEMU,EAAWI,KAAKC;;;;;;;;;;;;"}
@@ -1 +1,2 @@
1
1
  export * from './mobileStepper';
2
+ export * from './mobileStepperButton';
@@ -1,5 +1,5 @@
1
- import { FC, HTMLAttributes } from 'react';
2
1
  import { SxProps, Theme } from '@mui/material';
2
+ import { FC, HTMLAttributes } from 'react';
3
3
  export interface MobileStepperProps extends HTMLAttributes<HTMLDivElement> {
4
4
  /**
5
5
  * The number of steps.
@@ -1,2 +1,2 @@
1
- import{__rest as t}from"tslib";import{jsx as e,Fragment as n,jsxs as r}from"react/jsx-runtime";import{useState as a,useEffect as i}from"react";import o from"@mui/material/MobileStepper";import{styled as l,Icon as s}from"@mui/material";import{flowColors as c}from"../../design/skoda/palette.theme.js";const p=l=>{var{steps:p,activeStep:d,variant:u,backButton:x,nextButton:f,prevButtonLabel:h,nextButtonLabel:b,LinearProgressProps:S,sx:B}=l,g=t(l,["steps","activeStep","variant","backButton","nextButton","prevButtonLabel","nextButtonLabel","LinearProgressProps","sx"]);const[v,y]=a(d),N=(t,e)=>t>=0&&t<e,L={color:c.onSurface.os900};v<=0&&(L.color=c.disabled.primary);const M={color:c.onSurface.os900};v>=p-1&&(M.color=c.disabled.primary),i((()=>{y(d)}),[d]);return e(m,{children:e("div",{children:e(o,Object.assign({},g,{steps:p,activeStep:v,variant:u,sx:{maxWidth:380,display:"flex",alignItems:"center",position:"static",fontWeight:"400",fontSize:"16px",lineHeight:"16px",letterSpacing:"0.02em"},backButton:e(n,{children:(I=h,e(n,{children:r("div",{className:"controllerContainer","data-testid":"MobileStepper.prevBtn",style:L,onClick:()=>{N(v-1,p)&&y(v-1)},children:[e("span",{className:"MuiButton-startIcon",children:e(s,{fontSize:"small",style:L,className:"arrow-left"})}),e("span",{className:"arrowLabel",children:I})]})}))}),nextButton:e(n,{children:(k=b,e(n,{children:r("div",{className:"controllerContainer","data-testid":"MobileStepper.nextBtn",style:M,onClick:()=>{N(v+1,p)&&y(v+1)},children:[e("span",{className:"arrowLabel",children:k}),e("span",{className:"MuiButton-endIcon",children:e(s,{fontSize:"small",style:M,className:"arrow-right"})})]})}))}),"data-testid":"MobileStepper"}))})});var k,I},m=l("div")((()=>{let t={};return t={"& .controllerContainer":{display:"flex",alignItems:"center",fontFamily:"SKODA Next",fontStyle:"normal",fontWeight:"400",fontSize:"16px",lineHeight:"16px","& .MuiButton-endIcon, .MuiButton-startIcon":{marginTop:"0px",fontWeight:"400",fontSize:"17px",lineHeight:"19px"}}},t}));export{p as MobileStepper};
1
+ import{__rest as t}from"tslib";import{jsx as e}from"react/jsx-runtime";import i from"@mui/material/MobileStepper";import{useState as r,useEffect as n}from"react";import{MobileStepperButtonBack as o,MobileStepperButtonNext as a}from"./mobileStepperButton.js";const p=p=>{var{steps:s,activeStep:l,variant:c,backButton:m,nextButton:b,prevButtonLabel:x,nextButtonLabel:d,LinearProgressProps:u,sx:B}=p,v=t(p,["steps","activeStep","variant","backButton","nextButton","prevButtonLabel","nextButtonLabel","LinearProgressProps","sx"]);const[S,f]=r(l);return n((()=>{f(l)}),[l]),e(i,Object.assign({},v,{steps:s,activeStep:S,variant:c,sx:{maxWidth:380,display:"flex",alignItems:"center",position:"static",fontWeight:"400",fontSize:"16px",lineHeight:"16px",letterSpacing:"0.02em"},backButton:e(o,{"data-testid":"MobileStepper.prevBtn",disabled:S<=0,onClick:()=>f((t=>t-1)),children:x}),nextButton:e(a,{"data-testid":"MobileStepper.nextBtn",disabled:S>=s-1,onClick:()=>f((t=>t+1)),children:d}),"data-testid":"MobileStepper"}))};export{p as MobileStepper};
2
2
  //# sourceMappingURL=mobileStepper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mobileStepper.js","sources":["../../../src/components/mobileStepper/mobileStepper.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useEffect, useState } from 'react';\nimport MuiMobileStepper from '@mui/material/MobileStepper';\nimport { Icon, styled } from '@mui/material';\nimport { flowColors } from '../../design/skoda/palette.theme';\nexport const MobileStepper = (_a) => {\n var { steps, activeStep, variant, backButton, nextButton, prevButtonLabel, nextButtonLabel, LinearProgressProps, sx } = _a, props = __rest(_a, [\"steps\", \"activeStep\", \"variant\", \"backButton\", \"nextButton\", \"prevButtonLabel\", \"nextButtonLabel\", \"LinearProgressProps\", \"sx\"]);\n const [currentStep, setCurrentStep] = useState(activeStep);\n const isStepValid = (stepNumber, _steps) => {\n return stepNumber >= 0 && stepNumber < _steps ? true : false;\n };\n const colorp = {\n color: flowColors.onSurface.os900,\n };\n if (currentStep <= 0) {\n colorp.color = flowColors.disabled.primary;\n }\n const colorn = {\n color: flowColors.onSurface.os900,\n };\n if (currentStep >= steps - 1) {\n colorn.color = flowColors.disabled.primary;\n }\n // change current step on change of active step\n useEffect(() => {\n setCurrentStep(activeStep);\n }, [activeStep]);\n const previousArrow = (_prevButtonLabel) => (_jsx(_Fragment, { children: _jsxs(\"div\", { className: \"controllerContainer\", \"data-testid\": \"MobileStepper.prevBtn\", style: colorp, onClick: () => {\n isStepValid(currentStep - 1, steps) && setCurrentStep(currentStep - 1);\n }, children: [_jsx(\"span\", { className: 'MuiButton-startIcon', children: _jsx(Icon, { fontSize: 'small', style: colorp, className: 'arrow-left' }) }), _jsx(\"span\", { className: \"arrowLabel\", children: _prevButtonLabel })] }) }));\n const nextArrow = (_nextButtonLabel) => (_jsx(_Fragment, { children: _jsxs(\"div\", { className: \"controllerContainer\", \"data-testid\": \"MobileStepper.nextBtn\", style: colorn, onClick: () => {\n isStepValid(currentStep + 1, steps) && setCurrentStep(currentStep + 1);\n }, children: [_jsx(\"span\", { className: \"arrowLabel\", children: _nextButtonLabel }), _jsx(\"span\", { className: 'MuiButton-endIcon', children: _jsx(Icon, { fontSize: 'small', style: colorn, className: 'arrow-right' }) })] }) }));\n const mobileStepper = () => (_jsx(\"div\", { children: _jsx(MuiMobileStepper, Object.assign({}, props, { steps: steps, activeStep: currentStep, variant: variant, sx: {\n maxWidth: 380,\n display: 'flex',\n alignItems: 'center',\n position: 'static',\n fontWeight: '400',\n fontSize: '16px',\n lineHeight: '16px',\n letterSpacing: '0.02em',\n }, backButton: _jsx(_Fragment, { children: previousArrow(prevButtonLabel) }), nextButton: _jsx(_Fragment, { children: nextArrow(nextButtonLabel) }), \"data-testid\": \"MobileStepper\" })) }));\n return _jsx(MobileStepperStyle, { children: mobileStepper() });\n};\nconst MobileStepperStyle = 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: '400',\n fontSize: '16px',\n lineHeight: '16px',\n '& .MuiButton-endIcon, .MuiButton-startIcon': {\n marginTop: '0px',\n fontWeight: '400',\n fontSize: '17px',\n lineHeight: '19px',\n },\n },\n };\n return style;\n});\n//# sourceMappingURL=mobileStepper.js.map"],"names":["MobileStepper","_a","steps","activeStep","variant","backButton","nextButton","prevButtonLabel","nextButtonLabel","LinearProgressProps","sx","props","__rest","currentStep","setCurrentStep","useState","isStepValid","stepNumber","_steps","colorp","color","flowColors","onSurface","os900","disabled","primary","colorn","useEffect","_jsx","MobileStepperStyle","children","MuiMobileStepper","Object","assign","maxWidth","display","alignItems","position","fontWeight","fontSize","lineHeight","letterSpacing","_Fragment","_prevButtonLabel","_jsxs","className","style","onClick","Icon","_nextButtonLabel","styled","fontFamily","fontStyle","marginTop"],"mappings":"4SAMY,MAACA,EAAiBC,IAC1B,IAAIC,MAAEA,EAAKC,WAAEA,EAAUC,QAAEA,EAAOC,WAAEA,EAAUC,WAAEA,EAAUC,gBAAEA,EAAeC,gBAAEA,EAAeC,oBAAEA,EAAmBC,GAAEA,GAAOT,EAAIU,EAAQC,EAAOX,EAAI,CAAC,QAAS,aAAc,UAAW,aAAc,aAAc,kBAAmB,kBAAmB,sBAAuB,OAC3Q,MAAOY,EAAaC,GAAkBC,EAASZ,GACzCa,EAAc,CAACC,EAAYC,IACtBD,GAAc,GAAKA,EAAaC,EAErCC,EAAS,CACXC,MAAOC,EAAWC,UAAUC,OAE5BV,GAAe,IACfM,EAAOC,MAAQC,EAAWG,SAASC,SAEvC,MAAMC,EAAS,CACXN,MAAOC,EAAWC,UAAUC,O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AqBqB,EAAO,MAAPA,EAAc,KACrC,IAAIJ,EAAQ,CAAA,EAmBZ,OAjBAA,EAAQ,CACJ,yBAA0B,CACtBX,QAAS,OACTC,WAAY,SACZe,WALW,aAMXC,UAAW,SACXd,WAAY,MACZC,SAAU,OACVC,WAAY,OACZ,6CAA8C,CAC1Ca,UAAW,MACXf,WAAY,MACZC,SAAU,OACVC,WAAY,UAIjBM,CAAK"}
1
+ {"version":3,"file":"mobileStepper.js","sources":["../../../src/components/mobileStepper/mobileStepper.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport MuiMobileStepper from '@mui/material/MobileStepper';\nimport { useEffect, useState } from 'react';\nimport { MobileStepperButtonBack, MobileStepperButtonNext } from './mobileStepperButton';\nexport const MobileStepper = (_a) => {\n var { steps, activeStep, variant, backButton, nextButton, prevButtonLabel, nextButtonLabel, LinearProgressProps, sx } = _a, props = __rest(_a, [\"steps\", \"activeStep\", \"variant\", \"backButton\", \"nextButton\", \"prevButtonLabel\", \"nextButtonLabel\", \"LinearProgressProps\", \"sx\"]);\n const [currentStep, setCurrentStep] = useState(activeStep);\n // change current step on change of active step\n useEffect(() => {\n setCurrentStep(activeStep);\n }, [activeStep]);\n return (_jsx(MuiMobileStepper, Object.assign({}, props, { steps: steps, activeStep: currentStep, variant: variant, sx: {\n maxWidth: 380,\n display: 'flex',\n alignItems: 'center',\n position: 'static',\n fontWeight: '400',\n fontSize: '16px',\n lineHeight: '16px',\n letterSpacing: '0.02em',\n }, backButton: _jsx(MobileStepperButtonBack, { \"data-testid\": \"MobileStepper.prevBtn\", disabled: currentStep <= 0, onClick: () => setCurrentStep((prev) => prev - 1), children: prevButtonLabel }), nextButton: _jsx(MobileStepperButtonNext, { \"data-testid\": \"MobileStepper.nextBtn\", disabled: currentStep >= steps - 1, onClick: () => setCurrentStep((prev) => prev + 1), children: nextButtonLabel }), \"data-testid\": \"MobileStepper\" })));\n};\n//# sourceMappingURL=mobileStepper.js.map"],"names":["MobileStepper","_a","steps","activeStep","variant","backButton","nextButton","prevButtonLabel","nextButtonLabel","LinearProgressProps","sx","props","__rest","currentStep","setCurrentStep","useState","useEffect","_jsx","MuiMobileStepper","Object","assign","maxWidth","display","alignItems","position","fontWeight","fontSize","lineHeight","letterSpacing","MobileStepperButtonBack","disabled","onClick","prev","children","MobileStepperButtonNext"],"mappings":"kQAKY,MAACA,EAAiBC,IAC1B,IAAIC,MAAEA,EAAKC,WAAEA,EAAUC,QAAEA,EAAOC,WAAEA,EAAUC,WAAEA,EAAUC,gBAAEA,EAAeC,gBAAEA,EAAeC,oBAAEA,EAAmBC,GAAEA,GAAOT,EAAIU,EAAQC,EAAOX,EAAI,CAAC,QAAS,aAAc,UAAW,aAAc,aAAc,kBAAmB,kBAAmB,sBAAuB,OAC3Q,MAAOY,EAAaC,GAAkBC,EAASZ,GAK/C,OAHAa,GAAU,KACNF,EAAeX,EAAW,GAC3B,CAACA,IACIc,EAAKC,EAAkBC,OAAOC,OAAO,CAAE,EAAET,EAAO,CAAET,MAAOA,EAAOC,WAAYU,EAAaT,QAASA,EAASM,GAAI,CAC/GW,SAAU,IACVC,QAAS,OACTC,WAAY,SACZC,SAAU,SACVC,WAAY,MACZC,SAAU,OACVC,WAAY,OACZC,cAAe,UAChBvB,WAAYY,EAAKY,EAAyB,CAAE,cAAe,wBAAyBC,SAAUjB,GAAe,EAAGkB,QAAS,IAAMjB,GAAgBkB,GAASA,EAAO,IAAIC,SAAU1B,IAAoBD,WAAYW,EAAKiB,EAAyB,CAAE,cAAe,wBAAyBJ,SAAUjB,GAAeX,EAAQ,EAAG6B,QAAS,IAAMjB,GAAgBkB,GAASA,EAAO,IAAIC,SAAUzB,IAAoB,cAAe,kBAAqB"}
@@ -0,0 +1,4 @@
1
+ import { ButtonProps } from '@mui/material';
2
+ export declare const MobileStepperButton: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const MobileStepperButtonNext: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const MobileStepperButtonBack: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{styled as i,Button as o}from"@mui/material";import{Icon as r}from"../icon/icon.js";const a=t=>e(s,Object.assign({variant:"text",color:"secondary",disableFocusRipple:!0,disableRipple:!0,"data-testid":"MobileStepperButton"},t)),l=i=>t(a,Object.assign({},i,{children:[i.children,e(r,{fontSize:"small",className:"arrow-right"})]})),n=i=>t(a,Object.assign({},i,{children:[e(r,{fontSize:"small",className:"arrow-left"}),i.children]})),s=i(o)((({theme:e})=>({borderRadius:"none",padding:0,display:"flex",alignItems:"center",gap:8,fontStyle:"normal",fontWeight:"400",fontSize:"16px",lineHeight:"16px",height:"auto",color:e.palette.text.primary,"&:hover":{backgroundColor:"transparent"},"& .MuiIcon-root":{fontSize:"17px",lineHeight:"19px"},"&.Mui-disabled":{color:e.palette.disabled.primary}})));export{a as MobileStepperButton,n as MobileStepperButtonBack,l as MobileStepperButtonNext};
2
+ //# sourceMappingURL=mobileStepperButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobileStepperButton.js","sources":["../../../src/components/mobileStepper/mobileStepperButton.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Button, styled } from '@mui/material';\nimport { Icon } from '../icon';\nexport const MobileStepperButton = (props) => {\n return (_jsx(MobileStepperButtonStyled, Object.assign({ variant: \"text\", color: \"secondary\", disableFocusRipple: true, disableRipple: true, \"data-testid\": \"MobileStepperButton\" }, props)));\n};\nexport const MobileStepperButtonNext = (props) => (_jsxs(MobileStepperButton, Object.assign({}, props, { children: [props.children, _jsx(Icon, { fontSize: 'small', className: 'arrow-right' })] })));\nexport const MobileStepperButtonBack = (props) => (_jsxs(MobileStepperButton, Object.assign({}, props, { children: [_jsx(Icon, { fontSize: 'small', className: 'arrow-left' }), props.children] })));\nconst MobileStepperButtonStyled = styled(Button)(({ theme }) => ({\n borderRadius: 'none',\n padding: 0,\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n fontStyle: 'normal',\n fontWeight: '400',\n fontSize: '16px',\n lineHeight: '16px',\n height: 'auto',\n color: theme.palette.text.primary,\n '&:hover': {\n backgroundColor: 'transparent',\n },\n '& .MuiIcon-root': {\n fontSize: '17px',\n lineHeight: '19px',\n },\n '&.Mui-disabled': {\n color: theme.palette.disabled.primary,\n },\n}));\n//# sourceMappingURL=mobileStepperButton.js.map"],"names":["MobileStepperButton","props","_jsx","MobileStepperButtonStyled","Object","assign","variant","color","disableFocusRipple","disableRipple","MobileStepperButtonNext","_jsxs","children","Icon","fontSize","className","MobileStepperButtonBack","styled","Button","theme","borderRadius","padding","display","alignItems","gap","fontStyle","fontWeight","lineHeight","height","palette","text","primary","backgroundColor","disabled"],"mappings":"4IAGY,MAACA,EAAuBC,GACxBC,EAAKC,EAA2BC,OAAOC,OAAO,CAAEC,QAAS,OAAQC,MAAO,YAAaC,oBAAoB,EAAMC,eAAe,EAAM,cAAe,uBAAyBR,IAE3KS,EAA2BT,GAAWU,EAAMX,EAAqBI,OAAOC,OAAO,CAAE,EAAEJ,EAAO,CAAEW,SAAU,CAACX,EAAMW,SAAUV,EAAKW,EAAM,CAAEC,SAAU,QAASC,UAAW,oBAClKC,EAA2Bf,GAAWU,EAAMX,EAAqBI,OAAOC,OAAO,CAAE,EAAEJ,EAAO,CAAEW,SAAU,CAACV,EAAKW,EAAM,CAAEC,SAAU,QAASC,UAAW,eAAiBd,EAAMW,aAChLT,EAA4Bc,EAAOC,EAAPD,EAAe,EAAGE,YAAa,CAC7DC,aAAc,OACdC,QAAS,EACTC,QAAS,OACTC,WAAY,SACZC,IAAK,EACLC,UAAW,SACXC,WAAY,MACZZ,SAAU,OACVa,WAAY,OACZC,OAAQ,OACRrB,MAAOY,EAAMU,QAAQC,KAAKC,QAC1B,UAAW,CACPC,gBAAiB,eAErB,kBAAmB,CACflB,SAAU,OACVa,WAAY,QAEhB,iBAAkB,CACdpB,MAAOY,EAAMU,QAAQI,SAASF"}
@@ -62,6 +62,18 @@ export interface ModalProps extends HTMLAttributes<HTMLDivElement> {
62
62
  * A callback used to track if the modal is fully loaded. When the modal is closed isLoaded is set to false.
63
63
  */
64
64
  modalLoadedCallback?: (isLoaded: boolean) => void;
65
+ /**
66
+ * If true, the modal will not prevent focus from leaving the modal while open.
67
+ * Generally this should never be set to true as it makes the modal less accessible to assistive technologies, like screen readers.
68
+ * @default false
69
+ */
70
+ disableEnforceFocus?: boolean;
71
+ /**
72
+ * If true, the modal will not automatically shift focus to itself when it opens, and replace it to the last focused element when it closes. This also works correctly with any modal children that have the disableAutoFocus prop.
73
+ * Generally this should never be set to true as it makes the modal less accessible to assistive technologies, like screen readers.
74
+ * @default false
75
+ */
76
+ disableAutoFocus?: boolean;
65
77
  }
66
78
  /**
67
79
  * @description Styled SkodaFlow Modal component
@@ -1,2 +1,2 @@
1
- import{__rest as t}from"tslib";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{forwardRef as i,useState as n,useEffect as e,useCallback as d}from"react";import{styled as l}from"@mui/material/styles";import r from"@mui/material/Modal";import{Button as m}from"../button/button.js";import{Icon as s}from"../icon/icon.js";import{ContentDiv as c}from"./contentDiv.js";import{useTheme as p}from"@mui/material";const u=i(((i,l)=>{var{children:r,open:u,handleClose:h,onClickTopButton:b,onClickBottomButton:g,ariaLabelledby:B,ariaDescribedBy:f,firstButton:v,secondButton:C,hasCloseButton:k,size:w,firstButtonVariant:W,secondButtonVariant:y,secondButtonVisible:M,defaultButtonSection:T=!0,maxWidth:z,modalLoadedCallback:V}=i,j=t(i,["children","open","handleClose","onClickTopButton","onClickBottomButton","ariaLabelledby","ariaDescribedBy","firstButton","secondButton","hasCloseButton","size","firstButtonVariant","secondButtonVariant","secondButtonVisible","defaultButtonSection","maxWidth","modalLoadedCallback"]);const[F,L]=n(!1),[O,D]=n(!1),N=p();e((()=>{const t=window.matchMedia(`(min-width: ${N.breakpoints.values.md}px)`);D(t.matches)}),[N.breakpoints.values.md]);const S=d((()=>{if(O&&"large"===(w||"large"))return!1}),[O,w]);return a(x,Object.assign({},j,{ref:l,open:u,size:w,onClose:h,isOverFlowing:F,"aria-labelledby":B,"aria-describedby":f,compactButtons:S(),maxWidth:z,"data-testid":"Modal",children:o("div",{className:"modal-container","data-testid":"Modal.container",children:[k&&a("button",{onClick:h,"data-testid":"Modal.close",children:a(s,{className:"ballotx",fontSize:"medium"})}),a(c,{setIsOverFlowing:L,className:"modal-container--content",modalLoadedCallback:V,"data-testid":"Modal.content",children:r}),T&&o("div",{className:"modal-container--action-buttons","data-testid":"Modal.buttons",children:[a(m,{label:v,onClick:b,fullWidth:!0,variant:W,compact:S(),"data-testid":"Modal.button1","data-variant":W}),M&&a(m,{label:C,onClick:g,fullWidth:!0,variant:y,compact:S(),"data-testid":"Modal.button2","data-variant":y})]})]})}))})),x=l(r,{shouldForwardProp:t=>"compactButtons"!==t&&"isOverFlowing"!==t&&"maxWidth"!==t})((a=>{var{theme:o}=a,i=t(a,["theme"]);const n=i.compactButtons?"16px":"24px",e=i.maxWidth?i.maxWidth:"calc(100% - 40px)",d="large"===(i.size||"large"),l=i.size&&"full-width"===i.size,r=d?{maxWidth:"624px",marginTop:"40px",padding:"40px"}:l?{maxWidth:e,marginTop:"40px",padding:"40px"}:{maxWidth:"408px",marginTop:"48px",padding:"24px 40px 40px 40px"};return{"& .modal-container":{maxHeight:"calc(100vh - 64px)",minHeight:"300px",display:"flex",flexDirection:"column","&--content":{overflowX:"hidden",overflowY:"overlay",marginTop:"48px",padding:"0px 24px"},"&--action-buttons":{padding:"32px 24px",paddingBottom:n,boxShadow:i.isOverFlowing?"0px 0px 32px rgba(0, 0, 0, 0.15)":null,"div:first-of-type":{marginBottom:"15px"}}},[o.breakpoints.up("md")]:{"& .modal-container":{maxHeight:"calc(100vh - 160px)",margin:"0px",width:"100%",maxWidth:r.maxWidth,"&--content":{marginTop:r.marginTop,padding:"0px 40px"},"&--action-buttons":{padding:r.padding,paddingBottom:n}}}}}));export{u as Modal};
1
+ import{__rest as t}from"tslib";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{forwardRef as i,useState as n,useEffect as e,useCallback as d}from"react";import{styled as l}from"@mui/material/styles";import r from"@mui/material/Modal";import{Button as s}from"../button/button.js";import{Icon as c}from"../icon/icon.js";import{ContentDiv as m}from"./contentDiv.js";import{useTheme as p}from"@mui/material";const u=i(((i,l)=>{var{children:r,open:u,handleClose:b,onClickTopButton:h,onClickBottomButton:g,ariaLabelledby:f,ariaDescribedBy:B,firstButton:v,secondButton:C,hasCloseButton:k,size:w,firstButtonVariant:W,secondButtonVariant:F,secondButtonVisible:y,defaultButtonSection:M=!0,maxWidth:T,modalLoadedCallback:z,disableAutoFocus:V,disableEnforceFocus:j}=i,L=t(i,["children","open","handleClose","onClickTopButton","onClickBottomButton","ariaLabelledby","ariaDescribedBy","firstButton","secondButton","hasCloseButton","size","firstButtonVariant","secondButtonVariant","secondButtonVisible","defaultButtonSection","maxWidth","modalLoadedCallback","disableAutoFocus","disableEnforceFocus"]);const[O,D]=n(!1),[N,S]=n(!1),A=p();e((()=>{const t=window.matchMedia(`(min-width: ${A.breakpoints.values.md}px)`);S(t.matches)}),[A.breakpoints.values.md]);const E=d((()=>{if(N&&"large"===(w||"large"))return!1}),[N,w]);return a(x,Object.assign({},L,{ref:l,open:u,size:w,onClose:b,isOverFlowing:O,"aria-labelledby":f,"aria-describedby":B,compactButtons:E(),maxWidth:T,"data-testid":"Modal",disableEnforceFocus:j,disableAutoFocus:V,children:o("div",{className:"modal-container","data-testid":"Modal.container",children:[k&&a("button",{onClick:b,"data-testid":"Modal.close",children:a(c,{className:"ballotx",fontSize:"medium"})}),a(m,{setIsOverFlowing:D,className:"modal-container--content",modalLoadedCallback:z,"data-testid":"Modal.content",children:r}),M&&o("div",{className:"modal-container--action-buttons","data-testid":"Modal.buttons",children:[a(s,{label:v,onClick:h,fullWidth:!0,variant:W,compact:E(),"data-testid":"Modal.button1","data-variant":W}),y&&a(s,{label:C,onClick:g,fullWidth:!0,variant:F,compact:E(),"data-testid":"Modal.button2","data-variant":F})]})]})}))})),x=l(r,{shouldForwardProp:t=>"compactButtons"!==t&&"isOverFlowing"!==t&&"maxWidth"!==t})((a=>{var{theme:o}=a,i=t(a,["theme"]);const n=i.compactButtons?"16px":"24px",e=i.maxWidth?i.maxWidth:"calc(100% - 40px)",d="large"===(i.size||"large"),l=i.size&&"full-width"===i.size,r=d?{maxWidth:"624px",marginTop:"40px",padding:"40px"}:l?{maxWidth:e,marginTop:"40px",padding:"40px"}:{maxWidth:"408px",marginTop:"48px",padding:"24px 40px 40px 40px"};return{"& .modal-container":{maxHeight:"calc(100vh - 64px)",minHeight:"300px",display:"flex",flexDirection:"column","&--content":{overflowX:"hidden",overflowY:"overlay",marginTop:"48px",padding:"0px 24px"},"&--action-buttons":{padding:"32px 24px",paddingBottom:n,boxShadow:i.isOverFlowing?"0px 0px 32px rgba(0, 0, 0, 0.15)":null,"div:first-of-type":{marginBottom:"15px"}}},[o.breakpoints.up("md")]:{"& .modal-container":{maxHeight:"calc(100vh - 160px)",margin:"0px",width:"100%",maxWidth:r.maxWidth,"&--content":{marginTop:r.marginTop,padding:"0px 40px"},"&--action-buttons":{padding:r.padding,paddingBottom:n}}}}}));export{u as Modal};
2
2
  //# sourceMappingURL=modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal.js","sources":["../../../src/components/modal/modal.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useCallback, useEffect, useState, forwardRef } from 'react';\nimport { styled } from '@mui/material/styles';\nimport MuiModal from '@mui/material/Modal';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { ContentDiv } from './contentDiv';\nimport { useTheme } from '@mui/material';\n/**\n * @description Styled SkodaFlow Modal component\n * @param props ModalProps\n * @returns React Functional Component\n */\nexport const Modal = forwardRef((_a, ref) => {\n var { children, open, handleClose, onClickTopButton, onClickBottomButton, ariaLabelledby, ariaDescribedBy, firstButton, secondButton, hasCloseButton, size, firstButtonVariant, secondButtonVariant, secondButtonVisible, defaultButtonSection = true, maxWidth, modalLoadedCallback } = _a, props = __rest(_a, [\"children\", \"open\", \"handleClose\", \"onClickTopButton\", \"onClickBottomButton\", \"ariaLabelledby\", \"ariaDescribedBy\", \"firstButton\", \"secondButton\", \"hasCloseButton\", \"size\", \"firstButtonVariant\", \"secondButtonVariant\", \"secondButtonVisible\", \"defaultButtonSection\", \"maxWidth\", \"modalLoadedCallback\"]);\n const [isOverFlowing, setIsOverFlowing] = useState(false);\n const [desktopView, setDesktopView] = useState(false);\n const theme = useTheme();\n useEffect(() => {\n const mq = window.matchMedia(`(min-width: ${theme.breakpoints.values.md}px)`);\n setDesktopView(mq.matches);\n }, [theme.breakpoints.values.md]);\n const isCompactButton = useCallback(() => {\n const isModalLarge = (size || 'large') === 'large';\n if (desktopView && isModalLarge)\n return false;\n }, [desktopView, size]);\n return (_jsx(ModalStyled, Object.assign({}, props, { ref: ref, open: open, size: size, onClose: handleClose, isOverFlowing: isOverFlowing, \"aria-labelledby\": ariaLabelledby, \"aria-describedby\": ariaDescribedBy, compactButtons: isCompactButton(), maxWidth: maxWidth, \"data-testid\": \"Modal\", children: _jsxs(\"div\", { className: \"modal-container\", \"data-testid\": \"Modal.container\", children: [hasCloseButton && (_jsx(\"button\", { onClick: handleClose, \"data-testid\": \"Modal.close\", children: _jsx(Icon, { className: \"ballotx\", fontSize: \"medium\" }) })), _jsx(ContentDiv, { setIsOverFlowing: setIsOverFlowing, className: \"modal-container--content\", modalLoadedCallback: modalLoadedCallback, \"data-testid\": \"Modal.content\", children: children }), defaultButtonSection && (_jsxs(\"div\", { className: \"modal-container--action-buttons\", \"data-testid\": \"Modal.buttons\", children: [_jsx(Button, { label: firstButton, onClick: onClickTopButton, fullWidth: true, variant: firstButtonVariant, compact: isCompactButton(), \"data-testid\": \"Modal.button1\", \"data-variant\": firstButtonVariant }), secondButtonVisible && (_jsx(Button, { label: secondButton, onClick: onClickBottomButton, fullWidth: true, variant: secondButtonVariant, compact: isCompactButton(), \"data-testid\": \"Modal.button2\", \"data-variant\": secondButtonVariant }))] }))] }) })));\n});\n/**\n * @description Modal styling definition\n */\nconst ModalStyled = styled(MuiModal, {\n shouldForwardProp: (prop) => prop !== 'compactButtons' && prop !== 'isOverFlowing' && prop !== 'maxWidth',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n const bottomButtonPadding = args.compactButtons ? '16px' : '24px';\n const smallModalWidth = '408px';\n const largeModalWidth = '624px';\n const fullWidthModal = args.maxWidth ? args.maxWidth : 'calc(100% - 40px)';\n const isModalLarge = (args.size || 'large') === 'large';\n const isModalFullWidth = args.size && args.size === 'full-width';\n const sizeBasedStyles = isModalLarge\n ? { maxWidth: largeModalWidth, marginTop: '40px', padding: '40px' }\n : isModalFullWidth\n ? { maxWidth: fullWidthModal, marginTop: '40px', padding: '40px' }\n : {\n maxWidth: smallModalWidth,\n marginTop: '48px',\n padding: '24px 40px 40px 40px',\n };\n return {\n '& .modal-container': {\n maxHeight: 'calc(100vh - 64px)',\n minHeight: '300px',\n display: 'flex',\n flexDirection: 'column',\n '&--content': {\n overflowX: 'hidden',\n overflowY: 'overlay',\n marginTop: '48px',\n padding: '0px 24px',\n },\n '&--action-buttons': {\n padding: '32px 24px',\n paddingBottom: bottomButtonPadding,\n boxShadow: args.isOverFlowing ? '0px 0px 32px rgba(0, 0, 0, 0.15)' : null,\n 'div:first-of-type': {\n marginBottom: '15px',\n },\n },\n },\n [theme.breakpoints.up('md')]: {\n '& .modal-container': {\n maxHeight: 'calc(100vh - 160px)',\n margin: '0px',\n width: '100%',\n maxWidth: sizeBasedStyles.maxWidth,\n '&--content': {\n marginTop: sizeBasedStyles.marginTop,\n padding: '0px 40px',\n },\n '&--action-buttons': {\n padding: sizeBasedStyles.padding,\n paddingBottom: bottomButtonPadding,\n },\n },\n },\n };\n});\n//# sourceMappingURL=modal.js.map"],"names":["Modal","forwardRef","_a","ref","children","open","handleClose","onClickTopButton","onClickBottomButton","ariaLabelledby","ariaDescribedBy","firstButton","secondButton","hasCloseButton","size","firstButtonVariant","secondButtonVariant","secondButtonVisible","defaultButtonSection","maxWidth","modalLoadedCallback","props","__rest","isOverFlowing","setIsOverFlowing","useState","desktopView","setDesktopView","theme","useTheme","useEffect","mq","window","matchMedia","breakpoints","values","md","matches","isCompactButton","useCallback","_jsx","ModalStyled","Object","assign","onClose","compactButtons","_jsxs","className","onClick","Icon","fontSize","ContentDiv","Button","label","fullWidth","variant","compact","styled","MuiModal","shouldForwardProp","prop","args","bottomButtonPadding","fullWidthModal","isModalLarge","isModalFullWidth","sizeBasedStyles","marginTop","padding","maxHeight","minHeight","display","flexDirection","overflowX","overflowY","paddingBottom","boxShadow","marginBottom","up","margin","width"],"mappings":"6ZAcY,MAACA,EAAQC,GAAW,CAACC,EAAIC,KACjC,IAAIC,SAAEA,EAAQC,KAAEA,EAAIC,YAAEA,EAAWC,iBAAEA,EAAgBC,oBAAEA,EAAmBC,eAAEA,EAAcC,gBAAEA,EAAeC,YAAEA,EAAWC,aAAEA,EAAYC,eAAEA,EAAcC,KAAEA,EAAIC,mBAAEA,EAAkBC,oBAAEA,EAAmBC,oBAAEA,EAAmBC,qBAAEA,GAAuB,EAAIC,SAAEA,EAAQC,oBAAEA,GAAwBlB,EAAImB,EAAQC,EAAOpB,EAAI,CAAC,WAAY,OAAQ,cAAe,mBAAoB,sBAAuB,iBAAkB,kBAAmB,cAAe,eAAgB,iBAAkB,OAAQ,qBAAsB,sBAAuB,sBAAuB,uBAAwB,WAAY,wBACrkB,MAAOqB,EAAeC,GAAoBC,GAAS,IAC5CC,EAAaC,GAAkBF,GAAS,GACzCG,EAAQC,IACdC,GAAU,KACN,MAAMC,EAAKC,OAAOC,WAAW,eAAeL,EAAMM,YAAYC,OAAO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,eAAiB,OAAS,OAGrDkB,EAAiBF,EAAK1C,SAAW0C,EAAK1C,SAAW,oBACjD6C,EAA0C,WAA1BH,EAAK/C,MAAQ,SAC7BmD,EAAmBJ,EAAK/C,MAAsB,eAAd+C,EAAK/C,KACrCoD,EAAkBF,EAClB,CAAE7C,SALgB,QAKWgD,UAAW,OAAQC,QAAS,QACzDH,EACI,CAAE9C,SAAU4C,EAAgBI,UAAW,OAAQC,QAAS,QACxD,CACEjD,SAVY,QAWZgD,UAAW,OACXC,QAAS,uBAErB,MAAO,CACH,qBAAsB,CAClBC,UAAW,qBACXC,UAAW,QACXC,QAAS,OACTC,cAAe,SACf,aAAc,CACVC,UAAW,SACXC,UAAW,UACXP,UAAW,OACXC,QAAS,YAEb,oBAAqB,CACjBA,QAAS,YACTO,cAAeb,EACfc,UAAWf,EAAKtC,cAAgB,mCAAqC,KACrE,oBAAqB,CACjBsD,aAAc,UAI1B,CAACjD,EAAMM,YAAY4C,GAAG,OAAQ,CAC1B,qBAAsB,CAClBT,UAAW,sBACXU,OAAQ,MACRC,MAAO,OACP7D,SAAU+C,EAAgB/C,SAC1B,aAAc,CACVgD,UAAWD,EAAgBC,UAC3BC,QAAS,YAEb,oBAAqB,CACjBA,QAASF,EAAgBE,QACzBO,cAAeb,KAI9B"}
1
+ {"version":3,"file":"modal.js","sources":["../../../src/components/modal/modal.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useCallback, useEffect, useState, forwardRef } from 'react';\nimport { styled } from '@mui/material/styles';\nimport MuiModal from '@mui/material/Modal';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { ContentDiv } from './contentDiv';\nimport { useTheme } from '@mui/material';\n/**\n * @description Styled SkodaFlow Modal component\n * @param props ModalProps\n * @returns React Functional Component\n */\nexport const Modal = forwardRef((_a, ref) => {\n var { children, open, handleClose, onClickTopButton, onClickBottomButton, ariaLabelledby, ariaDescribedBy, firstButton, secondButton, hasCloseButton, size, firstButtonVariant, secondButtonVariant, secondButtonVisible, defaultButtonSection = true, maxWidth, modalLoadedCallback, disableAutoFocus, disableEnforceFocus } = _a, props = __rest(_a, [\"children\", \"open\", \"handleClose\", \"onClickTopButton\", \"onClickBottomButton\", \"ariaLabelledby\", \"ariaDescribedBy\", \"firstButton\", \"secondButton\", \"hasCloseButton\", \"size\", \"firstButtonVariant\", \"secondButtonVariant\", \"secondButtonVisible\", \"defaultButtonSection\", \"maxWidth\", \"modalLoadedCallback\", \"disableAutoFocus\", \"disableEnforceFocus\"]);\n const [isOverFlowing, setIsOverFlowing] = useState(false);\n const [desktopView, setDesktopView] = useState(false);\n const theme = useTheme();\n useEffect(() => {\n const mq = window.matchMedia(`(min-width: ${theme.breakpoints.values.md}px)`);\n setDesktopView(mq.matches);\n }, [theme.breakpoints.values.md]);\n const isCompactButton = useCallback(() => {\n const isModalLarge = (size || 'large') === 'large';\n if (desktopView && isModalLarge)\n return false;\n }, [desktopView, size]);\n return (_jsx(ModalStyled, Object.assign({}, props, { ref: ref, open: open, size: size, onClose: handleClose, isOverFlowing: isOverFlowing, \"aria-labelledby\": ariaLabelledby, \"aria-describedby\": ariaDescribedBy, compactButtons: isCompactButton(), maxWidth: maxWidth, \"data-testid\": \"Modal\", disableEnforceFocus: disableEnforceFocus, disableAutoFocus: disableAutoFocus, children: _jsxs(\"div\", { className: \"modal-container\", \"data-testid\": \"Modal.container\", children: [hasCloseButton && (_jsx(\"button\", { onClick: handleClose, \"data-testid\": \"Modal.close\", children: _jsx(Icon, { className: \"ballotx\", fontSize: \"medium\" }) })), _jsx(ContentDiv, { setIsOverFlowing: setIsOverFlowing, className: \"modal-container--content\", modalLoadedCallback: modalLoadedCallback, \"data-testid\": \"Modal.content\", children: children }), defaultButtonSection && (_jsxs(\"div\", { className: \"modal-container--action-buttons\", \"data-testid\": \"Modal.buttons\", children: [_jsx(Button, { label: firstButton, onClick: onClickTopButton, fullWidth: true, variant: firstButtonVariant, compact: isCompactButton(), \"data-testid\": \"Modal.button1\", \"data-variant\": firstButtonVariant }), secondButtonVisible && (_jsx(Button, { label: secondButton, onClick: onClickBottomButton, fullWidth: true, variant: secondButtonVariant, compact: isCompactButton(), \"data-testid\": \"Modal.button2\", \"data-variant\": secondButtonVariant }))] }))] }) })));\n});\n/**\n * @description Modal styling definition\n */\nconst ModalStyled = styled(MuiModal, {\n shouldForwardProp: (prop) => prop !== 'compactButtons' && prop !== 'isOverFlowing' && prop !== 'maxWidth',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n const bottomButtonPadding = args.compactButtons ? '16px' : '24px';\n const smallModalWidth = '408px';\n const largeModalWidth = '624px';\n const fullWidthModal = args.maxWidth ? args.maxWidth : 'calc(100% - 40px)';\n const isModalLarge = (args.size || 'large') === 'large';\n const isModalFullWidth = args.size && args.size === 'full-width';\n const sizeBasedStyles = isModalLarge\n ? { maxWidth: largeModalWidth, marginTop: '40px', padding: '40px' }\n : isModalFullWidth\n ? { maxWidth: fullWidthModal, marginTop: '40px', padding: '40px' }\n : {\n maxWidth: smallModalWidth,\n marginTop: '48px',\n padding: '24px 40px 40px 40px',\n };\n return {\n '& .modal-container': {\n maxHeight: 'calc(100vh - 64px)',\n minHeight: '300px',\n display: 'flex',\n flexDirection: 'column',\n '&--content': {\n overflowX: 'hidden',\n overflowY: 'overlay',\n marginTop: '48px',\n padding: '0px 24px',\n },\n '&--action-buttons': {\n padding: '32px 24px',\n paddingBottom: bottomButtonPadding,\n boxShadow: args.isOverFlowing ? '0px 0px 32px rgba(0, 0, 0, 0.15)' : null,\n 'div:first-of-type': {\n marginBottom: '15px',\n },\n },\n },\n [theme.breakpoints.up('md')]: {\n '& .modal-container': {\n maxHeight: 'calc(100vh - 160px)',\n margin: '0px',\n width: '100%',\n maxWidth: sizeBasedStyles.maxWidth,\n '&--content': {\n marginTop: sizeBasedStyles.marginTop,\n padding: '0px 40px',\n },\n '&--action-buttons': {\n padding: sizeBasedStyles.padding,\n paddingBottom: bottomButtonPadding,\n },\n },\n },\n };\n});\n//# sourceMappingURL=modal.js.map"],"names":["Modal","forwardRef","_a","ref","children","open","handleClose","onClickTopButton","onClickBottomButton","ariaLabelledby","ariaDescribedBy","firstButton","secondButton","hasCloseButton","size","firstButtonVariant","secondButtonVariant","secondButtonVisible","defaultButtonSection","maxWidth","modalLoadedCallback","disableAutoFocus","disableEnforceFocus","props","__rest","isOverFlowing","setIsOverFlowing","useState","desktopView","setDesktopView","theme","useTheme","useEffect","mq","window","matchMedia","breakpoints","values","md","matches","isCompactButton","useCallback","_jsx","ModalStyled","Object","assign","onClose","compactButtons","_jsxs","className","onClick","Icon","fontSize","ContentDiv","Button","label","fullWidth","variant","compact","styled","MuiModal","shouldForwardProp","prop","args","bottomButtonPadding","fullWidthModal","isModalLarge","isModalFullWidth","sizeBasedStyles","marginTop","padding","maxHeight","minHeight","display","flexDirection","overflowX","overflowY","paddingBottom","boxShadow","marginBottom","up","margin","width"],"mappings":"6ZAcY,MAACA,EAAQC,GAAW,CAACC,EAAIC,KACjC,IAAIC,SAAEA,EAAQC,KAAEA,EAAIC,YAAEA,EAAWC,iBAAEA,EAAgBC,oBAAEA,EAAmBC,eAAEA,EAAcC,gBAAEA,EAAeC,YAAEA,EAAWC,aAAEA,EAAYC,eAAEA,EAAcC,KAAEA,EAAIC,mBAAEA,EAAkBC,oBAAEA,EAAmBC,oBAAEA,EAAmBC,qBAAEA,GAAuB,EAAIC,SAAEA,EAAQC,oBAAEA,EAAmBC,iBAAEA,EAAgBC,oBAAEA,GAAwBpB,EAAIqB,EAAQC,EAAOtB,EAAI,CAAC,WAAY,OAAQ,cAAe,mBAAoB,sBAAuB,iBAAkB,kBAAmB,cAAe,eAAgB,iBAAkB,OAAQ,qBAAsB,sBAAuB,sBAAuB,uBAAwB,WAAY,sBAAuB,mBAAoB,wBACvpB,MAAOuB,EAAeC,GAAoBC,GAAS,IAC5CC,EAAaC,GAAkBF,GAAS,GACzCG,EA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ADtEH,EAEhBzD,IACA,IAAI4B,MAAEA,GAAU5B,EAAI6D,EAAOvC,EAAOtB,EAAI,CAAC,UACvC,MAAM8D,EAAsBD,EAAKhB,eAAiB,OAAS,OAGrDkB,EAAiBF,EAAK5C,SAAW4C,EAAK5C,SAAW,oBACjD+C,EAA0C,WAA1BH,EAAKjD,MAAQ,SAC7BqD,EAAmBJ,EAAKjD,MAAsB,eAAdiD,EAAKjD,KACrCsD,EAAkBF,EAClB,CAAE/C,SALgB,QAKWkD,UAAW,OAAQC,QAAS,QACzDH,EACI,CAAEhD,SAAU8C,EAAgBI,UAAW,OAAQC,QAAS,QACxD,CACEnD,SAVY,QAWZkD,UAAW,OACXC,QAAS,uBAErB,MAAO,CACH,qBAAsB,CAClBC,UAAW,qBACXC,UAAW,QACXC,QAAS,OACTC,cAAe,SACf,aAAc,CACVC,UAAW,SACXC,UAAW,UACXP,UAAW,OACXC,QAAS,YAEb,oBAAqB,CACjBA,QAAS,YACTO,cAAeb,EACfc,UAAWf,EAAKtC,cAAgB,mCAAqC,KACrE,oBAAqB,CACjBsD,aAAc,UAI1B,CAACjD,EAAMM,YAAY4C,GAAG,OAAQ,CAC1B,qBAAsB,CAClBT,UAAW,sBACXU,OAAQ,MACRC,MAAO,OACP/D,SAAUiD,EAAgBjD,SAC1B,aAAc,CACVkD,UAAWD,EAAgBC,UAC3BC,QAAS,YAEb,oBAAqB,CACjBA,QAASF,EAAgBE,QACzBO,cAAeb,KAI9B"}
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare const FormControlSelectStyled: import("@emotion/styled").StyledComponent<import("@mui/material/FormControl").FormControlOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
3
  ref?: import("react").Ref<HTMLDivElement>;
4
- }, "disabled" | "className" | "style" | "classes" | "children" | "sx" | "color" | "margin" | "fullWidth" | "error" | "variant" | "required" | "size" | "focused" | "hiddenLabel"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
4
+ }, "disabled" | "className" | "style" | "classes" | "children" | "sx" | "variant" | "color" | "margin" | "error" | "required" | "size" | "fullWidth" | "focused" | "hiddenLabel"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
5
5
  component?: import("react").ElementType<any>;
6
6
  } & {
7
7
  disabled?: boolean;
@@ -1,6 +1,6 @@
1
- import { HTMLAttributes } from 'react';
2
- import React from 'react';
1
+ import React, { HTMLAttributes } from 'react';
3
2
  export type ValueComponentType = 'default' | 'input' | 'labeledInput' | null;
3
+ export type SliderThousandsSeparatorType = '.' | ',' | ' ';
4
4
  /**
5
5
  * @interface Base defintion of SkodaFlow Slider component independent on core implementation.
6
6
  * Properties are inherited from HTML Span element and component functionality is taken from @mui/material/Slider v5.0.1.
@@ -131,7 +131,7 @@ export interface SliderProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'colo
131
131
  /**
132
132
  * Thousands separator variants for formatting currency
133
133
  */
134
- thousandsSeparator?: '.' | ',' | ' ';
134
+ thousandsSeparator?: SliderThousandsSeparatorType;
135
135
  /**
136
136
  * Decimal separator variants for formatting currency
137
137
  */
@@ -1,2 +1,2 @@
1
- import{__rest as e}from"tslib";import{jsxs as a,jsx as r}from"react/jsx-runtime";import{forwardRef as t,useMemo as i,useState as l,useEffect as n,useCallback as d}from"react";import s from"@mui/material/Slider";import{styled as o}from"@mui/material/styles";import u from"../common/resizableSliderInput.js";import m from"../common/styled/sliderValuesStyled.js";import{ContainerStyled as p}from"./containerStyled.js";const c=t(((t,s)=>{var{min:o,max:c,defaultValue:h,valueComponentType:v,leftSideLabel:x,rightSideLabel:f,disabled:g,disableSwap:y,step:C,value:D,isCurrencyInFront:I,minTextDescription:T="",maxTextDescription:$="",onChange:F,onInputBlur:V,thousandsSeparator:j=" ",decimalSeparator:B=",",hiddenDecimalSeparator:L=!0}=t,A=e(t,["min","max","defaultValue","valueComponentType","leftSideLabel","rightSideLabel","disabled","disableSwap","step","value","isCurrencyInFront","minTextDescription","maxTextDescription","onChange","onInputBlur","thousandsSeparator","decimalSeparator","hiddenDecimalSeparator"]);const N=i((()=>((e,a,r,t)=>void 0!==t?t:void 0!==r?r:a&&!e?[0,a]:!a&&e?e:0)(o,c,h,D)),[o,c,h,D]),[k,w]=l(N);n((()=>{D&&w((()=>D))}),[D]);const M=d((e=>(e=>{let a=e?parseInt(e):-1;return isNaN(a)&&(a=-1),a})(e)),[]),O=d(((e,a,r)=>{if(!Array.isArray(a))return w(a),void(F&&F(e,a,r));w(0===r?[Math.min(a[0],a[1]-C-1),a[1]]:[a[0],Math.max(a[1],a[0]+C+1)]),F&&F(e,a,r)}),[F,C]),z=d((e=>{let a=M(e.target.value);a>c&&(a=c),F&&F(e,a),w((()=>a))}),[M,c,F]),P=d(((e,a)=>{let r=M(e.target.value);1===a&&r>c?r=c:0===a&&r>k[1]&&(r=k[1]),w((t=>{let i=[...t];return i[a]=r,i[0]>i[1]&&(i=[0,C+1]),F&&F(e,i,a),i}))}),[M,c,F,C,k]),R=i((()=>Array.isArray(k)?((e,t,i,l,n,d,s,o,m,p,c,b,h)=>{if("default"===e||!e){const e=S("number"==typeof t[0]?t[0]:parseInt(t[0]),b,c,h),i=S("number"==typeof t[1]?t[1]:parseInt(t[1]),b,c,h);return a("div",{className:"range-values",children:[r("div",{"data-testid":"Slider.minVal",children:p?`${n} ${e}`:`${e} ${n}`}),r("div",{className:"middle-side"}),r("div",{"data-testid":"Slider.maxVal",children:p?`${d} ${i}`:`${i} ${d}`})]})}return a("div",{className:"range-values",children:[r(u,{id:"slider-double-value-left-label-input",onChange:s,onBlur:o,value:t[0],thousandsSeparator:c,decimalSeparator:b,hiddenDecimalSeparator:h,thumb:0,disabled:m,textDescription:n,labelText:"input"===e?null:i,isCurrencyInFront:p,"data-testid":"Slider.minVal"}),r("div",{className:"middle-side"}),r(u,{id:"slider-double-value-right-label-input",onChange:s,onBlur:o,value:t[1],thousandsSeparator:c,decimalSeparator:b,hiddenDecimalSeparator:h,thumb:1,disabled:m,textDescription:d,labelText:"labeledInput"===e?l:null,isCurrencyInFront:p,"data-testid":"Slider.maxVal"})]})})(v,k,x,f,T,$,P,V,g,I,j,B,L):((e,t,i,l,n,d,s,o,m,p,c)=>{if("default"===e||!e){const e=S("number"==typeof t?t:parseInt(t),p,m,c);return a("div",{"data-testid":"Slider.minVal",children:[l&&o?`${l} ${e}`:l?`${e} ${l}`:e," "]})}return r(u,{id:"slider-single-value-label-input",value:t,thousandsSeparator:m,decimalSeparator:p,hiddenDecimalSeparator:c,onChange:n,onBlur:d,disabled:s,textDescription:l,labelText:"labeledInput"===e?i:null,isCurrencyInFront:o})})(v,k,x,T,z,V,g,I,j,B,L)),[g,I,x,$,T,P,z,V,f,v,k,j,B,L]);return a(p,{value:k,marks:A.marks,"data-testid":"Slider","data-state":g?"disabled":void 0,children:[r(b,Object.assign({},A,{disabled:g,ref:s,onChange:O,min:o,max:c,step:C,disableSwap:y,valueLabelFormat:e=>S(e,B,j,L),value:k})),r(m,{disabled:g,children:R})]})})),b=o(s,{shouldForwardProp:e=>"minTextDescription"!==e&&"maxTextDescription"!==e&&"leftSideLabel"!==e&&"rightSideLabel"!==e&&"valueComponentType"!==e})((a=>{var r=e(a,["theme"]);if(!r.marks)return null;let t={};Array.isArray(r.value)||(t={"& .MuiSlider-track":{left:"-3px !important"}});let i={"& .MuiSlider-rail":{left:"-3px",paddingRight:"6px"}};return i=Object.assign(Object.assign({},i),t),i})),S=(e,a,r,t)=>t?e.toFixed().replace(/\B(?=(\d{3})+(?!\d))/g,r):e.toFixed(2).replace(".",a).replace(/\B(?=(\d{3})+(?!\d))/g,r);export{c as Slider};
1
+ import{__rest as e}from"tslib";import{jsxs as a,jsx as r}from"react/jsx-runtime";import{forwardRef as t,useMemo as i,useState as l,useEffect as n,useCallback as d}from"react";import s from"@mui/material/Slider";import{styled as o}from"@mui/material/styles";import u from"../common/resizableSliderInput.js";import m from"../common/styled/sliderValuesStyled.js";import{ContainerStyled as p}from"./containerStyled.js";const c=t(((t,s)=>{var{min:o,max:c,defaultValue:h,valueComponentType:v,leftSideLabel:x,rightSideLabel:f,disabled:g,disableSwap:y,step:C,value:D,isCurrencyInFront:I,minTextDescription:T="",maxTextDescription:$="",onChange:F,onInputBlur:V,thousandsSeparator:j=" ",decimalSeparator:B=",",hiddenDecimalSeparator:L=!0}=t,A=e(t,["min","max","defaultValue","valueComponentType","leftSideLabel","rightSideLabel","disabled","disableSwap","step","value","isCurrencyInFront","minTextDescription","maxTextDescription","onChange","onInputBlur","thousandsSeparator","decimalSeparator","hiddenDecimalSeparator"]);const N=i((()=>((e,a,r,t)=>void 0!==t?t:void 0!==r?r:a&&!e?[0,a]:!a&&e?e:0)(o,c,h,D)),[o,c,h,D]),[k,w]=l(N);n((()=>{D&&w((()=>D))}),[D]);const M=d((e=>(e=>{let a=e?parseInt(e):-1;return isNaN(a)&&(a=-1),a})(e)),[]),O=d(((e,a,r)=>{if(!Array.isArray(a))return w(a),void(F&&F(e,a,r));w(0===r?[Math.min(a[0],a[1]-C),a[1]]:[a[0],Math.max(a[1],a[0]+C)]),F&&F(e,a,r)}),[F,C]),z=d((e=>{let a=M(e.target.value);a>c&&(a=c),F&&F(e,a),w((()=>a))}),[M,c,F]),P=d(((e,a)=>{let r=M(e.target.value);1===a&&r>c?r=c:0===a&&r>k[1]&&(r=k[1]),w((t=>{let i=[...t];return i[a]=r,i[0]>i[1]&&(i=[0,C]),F&&F(e,i,a),i}))}),[M,c,F,C,k]),R=i((()=>Array.isArray(k)?((e,t,i,l,n,d,s,o,m,p,c,b,h)=>{if("default"===e||!e){const e=S("number"==typeof t[0]?t[0]:parseInt(t[0]),b,c,h),i=S("number"==typeof t[1]?t[1]:parseInt(t[1]),b,c,h);return a("div",{className:"range-values",children:[r("div",{"data-testid":"Slider.minVal",children:p?`${n} ${e}`:`${e} ${n}`}),r("div",{className:"middle-side"}),r("div",{"data-testid":"Slider.maxVal",children:p?`${d} ${i}`:`${i} ${d}`})]})}return a("div",{className:"range-values",children:[r(u,{id:"slider-double-value-left-label-input",onChange:s,onBlur:o,value:t[0],thousandsSeparator:c,decimalSeparator:b,hiddenDecimalSeparator:h,thumb:0,disabled:m,textDescription:n,labelText:"input"===e?null:i,isCurrencyInFront:p,"data-testid":"Slider.minVal"}),r("div",{className:"middle-side"}),r(u,{id:"slider-double-value-right-label-input",onChange:s,onBlur:o,value:t[1],thousandsSeparator:c,decimalSeparator:b,hiddenDecimalSeparator:h,thumb:1,disabled:m,textDescription:d,labelText:"labeledInput"===e?l:null,isCurrencyInFront:p,"data-testid":"Slider.maxVal"})]})})(v,k,x,f,T,$,P,V,g,I,j,B,L):((e,t,i,l,n,d,s,o,m,p,c)=>{if("default"===e||!e){const e=S("number"==typeof t?t:parseInt(t),p,m,c);return a("div",{"data-testid":"Slider.minVal",children:[l&&o?`${l} ${e}`:l?`${e} ${l}`:e," "]})}return r(u,{id:"slider-single-value-label-input",value:t,thousandsSeparator:m,decimalSeparator:p,hiddenDecimalSeparator:c,onChange:n,onBlur:d,disabled:s,textDescription:l,labelText:"labeledInput"===e?i:null,isCurrencyInFront:o})})(v,k,x,T,z,V,g,I,j,B,L)),[g,I,x,$,T,P,z,V,f,v,k,j,B,L]);return a(p,{value:k,marks:A.marks,"data-testid":"Slider","data-state":g?"disabled":void 0,children:[r(b,Object.assign({},A,{disabled:g,ref:s,onChange:O,min:o,max:c,step:C,disableSwap:y,valueLabelFormat:e=>S(e,B,j,L),value:k})),r(m,{disabled:g,children:R})]})})),b=o(s,{shouldForwardProp:e=>"minTextDescription"!==e&&"maxTextDescription"!==e&&"leftSideLabel"!==e&&"rightSideLabel"!==e&&"valueComponentType"!==e})((a=>{var r=e(a,["theme"]);if(!r.marks)return null;let t={};Array.isArray(r.value)||(t={"& .MuiSlider-track":{left:"-3px !important"}});let i={"& .MuiSlider-rail":{left:"-3px",paddingRight:"6px"}};return i=Object.assign(Object.assign({},i),t),i})),S=(e,a,r,t)=>t?e.toFixed().replace(/\B(?=(\d{3})+(?!\d))/g,r):e.toFixed(2).replace(".",a).replace(/\B(?=(\d{3})+(?!\d))/g,r);export{c as Slider};
2
2
  //# sourceMappingURL=slider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slider.js","sources":["../../../src/components/slider/slider.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/* eslint-disable sonarjs/cognitive-complexity */\nimport { forwardRef } from 'react';\nimport MuiSlider from '@mui/material/Slider';\nimport { styled } from '@mui/material/styles';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport ResizableSliderInput from '../common/resizableSliderInput';\nimport SliderValuesStyled from '../common/styled/sliderValuesStyled';\nimport { ContainerStyled } from './containerStyled';\nconst getDoubleValueComponent = (type, values, leftSideLabel, rightSideLabel, minTextDescription, maxTextDescription, onChange, onBlur, disabled, isCurrencyInFront, thousandsSeparator, decimalSeparator, hiddenDecimalSeparator) => {\n if (type === 'default' || !type) {\n const minVal = getFormattedString(typeof values[0] === 'number' ? values[0] : parseInt(values[0]), decimalSeparator, thousandsSeparator, hiddenDecimalSeparator);\n const maxVal = getFormattedString(typeof values[1] === 'number' ? values[1] : parseInt(values[1]), decimalSeparator, thousandsSeparator, hiddenDecimalSeparator);\n return (_jsxs(\"div\", { className: \"range-values\", children: [_jsx(\"div\", { \"data-testid\": \"Slider.minVal\", children: isCurrencyInFront ? `${minTextDescription} ${minVal}` : `${minVal} ${minTextDescription}` }), _jsx(\"div\", { className: \"middle-side\" }), _jsx(\"div\", { \"data-testid\": \"Slider.maxVal\", children: isCurrencyInFront ? `${maxTextDescription} ${maxVal}` : `${maxVal} ${maxTextDescription}` })] }));\n }\n return (_jsxs(\"div\", { className: \"range-values\", children: [_jsx(ResizableSliderInput, { id: \"slider-double-value-left-label-input\", onChange: onChange, onBlur: onBlur, value: values[0], thousandsSeparator: thousandsSeparator, decimalSeparator: decimalSeparator, hiddenDecimalSeparator: hiddenDecimalSeparator, thumb: 0, disabled: disabled, textDescription: minTextDescription, labelText: type === 'input' ? null : leftSideLabel, isCurrencyInFront: isCurrencyInFront, \"data-testid\": \"Slider.minVal\" }), _jsx(\"div\", { className: \"middle-side\" }), _jsx(ResizableSliderInput, { id: \"slider-double-value-right-label-input\", onChange: onChange, onBlur: onBlur, value: values[1], thousandsSeparator: thousandsSeparator, decimalSeparator: decimalSeparator, hiddenDecimalSeparator: hiddenDecimalSeparator, thumb: 1, disabled: disabled, textDescription: maxTextDescription, labelText: type === 'labeledInput' ? rightSideLabel : null, isCurrencyInFront: isCurrencyInFront, \"data-testid\": \"Slider.maxVal\" })] }));\n};\nconst getSingleValueComponent = (type, values, leftSideLabel, minTextDescription, onChange, onBlur, disabled, isCurrencyInFront, thousandsSeparator, decimalSeparator, hiddenDecimalSeparator) => {\n if (type === 'default' || !type) {\n const val = getFormattedString(typeof values === 'number' ? values : parseInt(values), decimalSeparator, thousandsSeparator, hiddenDecimalSeparator);\n return (_jsxs(\"div\", { \"data-testid\": \"Slider.minVal\", children: [minTextDescription && isCurrencyInFront\n ? `${minTextDescription} ${val}`\n : minTextDescription\n ? `${val} ${minTextDescription}`\n : val, ' '] }));\n }\n return (_jsx(ResizableSliderInput, { id: \"slider-single-value-label-input\", value: values, thousandsSeparator: thousandsSeparator, decimalSeparator: decimalSeparator, hiddenDecimalSeparator: hiddenDecimalSeparator, onChange: onChange, onBlur: onBlur, disabled: disabled, textDescription: minTextDescription, labelText: type === 'labeledInput' ? leftSideLabel : null, isCurrencyInFront: isCurrencyInFront }));\n};\nconst getFormattedValue = (value) => {\n let result = value ? parseInt(value) : -1;\n if (isNaN(result))\n result = -1;\n return result;\n};\nconst getInitialValue = (min, max, defaultValue, value) => {\n if (value !== undefined)\n return value;\n if (defaultValue !== undefined)\n return defaultValue;\n if (max && !min)\n return [0, max];\n if (!max && min)\n return min;\n return 0;\n};\n/**\n * @description Styled SkodaFlow Slider component\n * @param props SliderProps\n * @returns React Functional Component\n */\nexport const Slider = forwardRef((_a, ref) => {\n var { min, max, defaultValue, valueComponentType, leftSideLabel, rightSideLabel, disabled, disableSwap, step, value, isCurrencyInFront, minTextDescription = '', maxTextDescription = '', onChange, onInputBlur, thousandsSeparator = ' ', decimalSeparator = ',', hiddenDecimalSeparator = true } = _a, props = __rest(_a, [\"min\", \"max\", \"defaultValue\", \"valueComponentType\", \"leftSideLabel\", \"rightSideLabel\", \"disabled\", \"disableSwap\", \"step\", \"value\", \"isCurrencyInFront\", \"minTextDescription\", \"maxTextDescription\", \"onChange\", \"onInputBlur\", \"thousandsSeparator\", \"decimalSeparator\", \"hiddenDecimalSeparator\"]);\n const getInitialValueWithUseCallBack = useMemo(() => {\n return getInitialValue(min, max, defaultValue, value);\n }, [min, max, defaultValue, value]);\n const [values, setValues] = useState(getInitialValueWithUseCallBack);\n useEffect(() => {\n if (value)\n setValues(() => value);\n }, [value]);\n const getFormattedValueWithUseCallBack = useCallback((_value) => {\n return getFormattedValue(_value);\n }, []);\n const onChangeHandler = useCallback((event, _value, activeThumb) => {\n if (!Array.isArray(_value)) {\n setValues(_value);\n onChange && onChange(event, _value, activeThumb);\n return;\n }\n if (activeThumb === 0) {\n setValues([Math.min(_value[0], _value[1] - step - 1), _value[1]]);\n }\n else {\n setValues([_value[0], Math.max(_value[1], _value[0] + step + 1)]);\n }\n onChange && onChange(event, _value, activeThumb);\n }, [onChange, step]);\n const onChangeSingleValue = useCallback((e) => {\n let newValue = getFormattedValueWithUseCallBack(e.target.value);\n if (newValue > max)\n newValue = max;\n onChange && onChange(e, newValue);\n setValues(() => newValue);\n }, [getFormattedValueWithUseCallBack, max, onChange]);\n const onChangeDoubleValue = useCallback((e, thumb) => {\n let newValue = getFormattedValueWithUseCallBack(e.target.value);\n if (thumb === 1 && newValue > max)\n newValue = max;\n else if (thumb === 0 && newValue > values[1])\n newValue = values[1];\n setValues((curr) => {\n let newArrayValue = [...curr];\n newArrayValue[thumb] = newValue;\n if (newArrayValue[0] > newArrayValue[1]) {\n newArrayValue = [0, step + 1];\n }\n onChange && onChange(e, newArrayValue, thumb);\n return newArrayValue;\n });\n }, [getFormattedValueWithUseCallBack, max, onChange, step, values]);\n const valuesComponent = useMemo(() => {\n return Array.isArray(values)\n ? getDoubleValueComponent(valueComponentType, values, leftSideLabel, rightSideLabel, minTextDescription, maxTextDescription, onChangeDoubleValue, onInputBlur, disabled, isCurrencyInFront, thousandsSeparator, decimalSeparator, hiddenDecimalSeparator)\n : getSingleValueComponent(valueComponentType, values, leftSideLabel, minTextDescription, onChangeSingleValue, onInputBlur, disabled, isCurrencyInFront, thousandsSeparator, decimalSeparator, hiddenDecimalSeparator);\n }, [\n disabled,\n isCurrencyInFront,\n leftSideLabel,\n maxTextDescription,\n minTextDescription,\n onChangeDoubleValue,\n onChangeSingleValue,\n onInputBlur,\n rightSideLabel,\n valueComponentType,\n values,\n thousandsSeparator,\n decimalSeparator,\n hiddenDecimalSeparator,\n ]);\n return (_jsxs(ContainerStyled, { value: values, marks: props.marks, \"data-testid\": \"Slider\", \"data-state\": disabled ? 'disabled' : undefined, children: [_jsx(SliderStyled, Object.assign({}, props, { disabled: disabled, ref: ref, onChange: onChangeHandler, min: min, max: max, step: step, disableSwap: disableSwap, valueLabelFormat: (v) => getFormattedString(v, decimalSeparator, thousandsSeparator, hiddenDecimalSeparator), value: values })), _jsx(SliderValuesStyled, { disabled: disabled, children: valuesComponent })] }));\n});\n/**\n * @description Slider styling definition\n */\nconst SliderStyled = styled(MuiSlider, {\n shouldForwardProp: (prop) => prop !== 'minTextDescription' &&\n prop !== 'maxTextDescription' &&\n prop !== 'leftSideLabel' &&\n prop !== 'rightSideLabel' &&\n prop !== 'valueComponentType',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n if (!args.marks)\n return null;\n let rule = {};\n const isArray = Array.isArray(args.value);\n if (!isArray)\n rule = {\n '& .MuiSlider-track': {\n left: '-3px !important',\n },\n };\n let style = {\n '& .MuiSlider-rail': {\n left: '-3px',\n paddingRight: '6px',\n },\n };\n style = Object.assign(Object.assign({}, style), rule);\n return style;\n});\nconst getFormattedString = (num, decimalSeparator, thousandsSeparator, hiddenDecimalSeparator) => {\n if (hiddenDecimalSeparator)\n return num.toFixed().replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparator);\n return num\n .toFixed(2)\n .replace('.', decimalSeparator)\n .replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparator);\n};\n//# sourceMappingURL=slider.js.map"],"names":["Slider","forwardRef","_a","ref","min","max","defaultValue","valueComponentType","leftSideLabel","rightSideLabel","disabled","disableSwap","step","value","isCurrencyInFront","minTextDescription","maxTextDescription","onChange","onInputBlur","thousandsSeparator","decimalSeparator","hiddenDecimalSeparator","props","__rest","getInitialValueWithUseCallBack","useMemo","undefined","getInitialValue","values","setValues","useState","useEffect","getFormattedValueWithUseCallBack","useCallback","_value","result","parseInt","isNaN","getFormattedValue","onChangeHandler","event","activeThumb","Array","isArray","Math","onChangeSingleValue","e","newValue","target","onChangeDoubleValue","thumb","curr","newArrayValue","valuesComponent","type","onBlur","minVal","getFormattedString","maxVal","_jsxs","className","children","_jsx","ResizableSliderInput","id","textDescription","labelText","getDoubleValueComponent","val","getSingleValueComponent","ContainerStyled","marks","SliderStyled","Object","assign","valueLabelFormat","v","SliderValuesStyled","styled","MuiSlider","shouldForwardProp","prop","args","rule","left","style","paddingRight","num","toFixed","replace"],"mappings":"+ZAUA,MAyCaA,EAASC,GAAW,CAACC,EAAIC,KAClC,IAAIC,IAAEA,EAAGC,IAAEA,EAAGC,aAAEA,EAAYC,mBAAEA,EAAkBC,cAAEA,EAAaC,eAAEA,EAAcC,SAAEA,EAAQC,YAAEA,EAAWC,KAAEA,EAAIC,MAAEA,EAAKC,kBAAEA,EAAiBC,mBAAEA,EAAqB,GAAEC,mBAAEA,EAAqB,GAAEC,SAAEA,EAAQC,YAAEA,EAA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AAQ,IAAKrE,GACbqE,QAAQ,wBAAyBtE"}
1
+ {"version":3,"file":"slider.js","sources":["../../../src/components/slider/slider.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/* eslint-disable sonarjs/cognitive-complexity */\nimport { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';\nimport MuiSlider from '@mui/material/Slider';\nimport { styled } from '@mui/material/styles';\nimport ResizableSliderInput from '../common/resizableSliderInput';\nimport SliderValuesStyled from '../common/styled/sliderValuesStyled';\nimport { ContainerStyled } from './containerStyled';\nconst getDoubleValueComponent = (type, values, leftSideLabel, rightSideLabel, minTextDescription, maxTextDescription, onChange, onBlur, disabled, isCurrencyInFront, thousandsSeparator, decimalSeparator, hiddenDecimalSeparator) => {\n if (type === 'default' || !type) {\n const minVal = getFormattedString(typeof values[0] === 'number' ? values[0] : parseInt(values[0]), decimalSeparator, thousandsSeparator, hiddenDecimalSeparator);\n const maxVal = getFormattedString(typeof values[1] === 'number' ? values[1] : parseInt(values[1]), decimalSeparator, thousandsSeparator, hiddenDecimalSeparator);\n return (_jsxs(\"div\", { className: \"range-values\", children: [_jsx(\"div\", { \"data-testid\": \"Slider.minVal\", children: isCurrencyInFront ? `${minTextDescription} ${minVal}` : `${minVal} ${minTextDescription}` }), _jsx(\"div\", { className: \"middle-side\" }), _jsx(\"div\", { \"data-testid\": \"Slider.maxVal\", children: isCurrencyInFront ? `${maxTextDescription} ${maxVal}` : `${maxVal} ${maxTextDescription}` })] }));\n }\n return (_jsxs(\"div\", { className: \"range-values\", children: [_jsx(ResizableSliderInput, { id: \"slider-double-value-left-label-input\", onChange: onChange, onBlur: onBlur, value: values[0], thousandsSeparator: thousandsSeparator, decimalSeparator: decimalSeparator, hiddenDecimalSeparator: hiddenDecimalSeparator, thumb: 0, disabled: disabled, textDescription: minTextDescription, labelText: type === 'input' ? null : leftSideLabel, isCurrencyInFront: isCurrencyInFront, \"data-testid\": \"Slider.minVal\" }), _jsx(\"div\", { className: \"middle-side\" }), _jsx(ResizableSliderInput, { id: \"slider-double-value-right-label-input\", onChange: onChange, onBlur: onBlur, value: values[1], thousandsSeparator: thousandsSeparator, decimalSeparator: decimalSeparator, hiddenDecimalSeparator: hiddenDecimalSeparator, thumb: 1, disabled: disabled, textDescription: maxTextDescription, labelText: type === 'labeledInput' ? rightSideLabel : null, isCurrencyInFront: isCurrencyInFront, \"data-testid\": \"Slider.maxVal\" })] }));\n};\nconst getSingleValueComponent = (type, values, leftSideLabel, minTextDescription, onChange, onBlur, disabled, isCurrencyInFront, thousandsSeparator, decimalSeparator, hiddenDecimalSeparator) => {\n if (type === 'default' || !type) {\n const val = getFormattedString(typeof values === 'number' ? values : parseInt(values), decimalSeparator, thousandsSeparator, hiddenDecimalSeparator);\n return (_jsxs(\"div\", { \"data-testid\": \"Slider.minVal\", children: [minTextDescription && isCurrencyInFront\n ? `${minTextDescription} ${val}`\n : minTextDescription\n ? `${val} ${minTextDescription}`\n : val, ' '] }));\n }\n return (_jsx(ResizableSliderInput, { id: \"slider-single-value-label-input\", value: values, thousandsSeparator: thousandsSeparator, decimalSeparator: decimalSeparator, hiddenDecimalSeparator: hiddenDecimalSeparator, onChange: onChange, onBlur: onBlur, disabled: disabled, textDescription: minTextDescription, labelText: type === 'labeledInput' ? leftSideLabel : null, isCurrencyInFront: isCurrencyInFront }));\n};\nconst getFormattedValue = (value) => {\n let result = value ? parseInt(value) : -1;\n if (isNaN(result))\n result = -1;\n return result;\n};\nconst getInitialValue = (min, max, defaultValue, value) => {\n if (value !== undefined)\n return value;\n if (defaultValue !== undefined)\n return defaultValue;\n if (max && !min)\n return [0, max];\n if (!max && min)\n return min;\n return 0;\n};\n/**\n * @description Styled SkodaFlow Slider component\n * @param props SliderProps\n * @returns React Functional Component\n */\nexport const Slider = forwardRef((_a, ref) => {\n var { min, max, defaultValue, valueComponentType, leftSideLabel, rightSideLabel, disabled, disableSwap, step, value, isCurrencyInFront, minTextDescription = '', maxTextDescription = '', onChange, onInputBlur, thousandsSeparator = ' ', decimalSeparator = ',', hiddenDecimalSeparator = true } = _a, props = __rest(_a, [\"min\", \"max\", \"defaultValue\", \"valueComponentType\", \"leftSideLabel\", \"rightSideLabel\", \"disabled\", \"disableSwap\", \"step\", \"value\", \"isCurrencyInFront\", \"minTextDescription\", \"maxTextDescription\", \"onChange\", \"onInputBlur\", \"thousandsSeparator\", \"decimalSeparator\", \"hiddenDecimalSeparator\"]);\n const getInitialValueWithUseCallBack = useMemo(() => {\n return getInitialValue(min, max, defaultValue, value);\n }, [min, max, defaultValue, value]);\n const [values, setValues] = useState(getInitialValueWithUseCallBack);\n useEffect(() => {\n if (value)\n setValues(() => value);\n }, [value]);\n const getFormattedValueWithUseCallBack = useCallback((_value) => {\n return getFormattedValue(_value);\n }, []);\n const onChangeHandler = useCallback((event, _value, activeThumb) => {\n if (!Array.isArray(_value)) {\n setValues(_value);\n onChange && onChange(event, _value, activeThumb);\n return;\n }\n if (activeThumb === 0) {\n setValues([Math.min(_value[0], _value[1] - step), _value[1]]);\n }\n else {\n setValues([_value[0], Math.max(_value[1], _value[0] + step)]);\n }\n onChange && onChange(event, _value, activeThumb);\n }, [onChange, step]);\n const onChangeSingleValue = useCallback((e) => {\n let newValue = getFormattedValueWithUseCallBack(e.target.value);\n if (newValue > max)\n newValue = max;\n onChange && onChange(e, newValue);\n setValues(() => newValue);\n }, [getFormattedValueWithUseCallBack, max, onChange]);\n const onChangeDoubleValue = useCallback((e, thumb) => {\n let newValue = getFormattedValueWithUseCallBack(e.target.value);\n if (thumb === 1 && newValue > max)\n newValue = max;\n else if (thumb === 0 && newValue > values[1])\n newValue = values[1];\n setValues((curr) => {\n let newArrayValue = [...curr];\n newArrayValue[thumb] = newValue;\n if (newArrayValue[0] > newArrayValue[1]) {\n newArrayValue = [0, step];\n }\n onChange && onChange(e, newArrayValue, thumb);\n return newArrayValue;\n });\n }, [getFormattedValueWithUseCallBack, max, onChange, step, values]);\n const valuesComponent = useMemo(() => {\n return Array.isArray(values)\n ? getDoubleValueComponent(valueComponentType, values, leftSideLabel, rightSideLabel, minTextDescription, maxTextDescription, onChangeDoubleValue, onInputBlur, disabled, isCurrencyInFront, thousandsSeparator, decimalSeparator, hiddenDecimalSeparator)\n : getSingleValueComponent(valueComponentType, values, leftSideLabel, minTextDescription, onChangeSingleValue, onInputBlur, disabled, isCurrencyInFront, thousandsSeparator, decimalSeparator, hiddenDecimalSeparator);\n }, [\n disabled,\n isCurrencyInFront,\n leftSideLabel,\n maxTextDescription,\n minTextDescription,\n onChangeDoubleValue,\n onChangeSingleValue,\n onInputBlur,\n rightSideLabel,\n valueComponentType,\n values,\n thousandsSeparator,\n decimalSeparator,\n hiddenDecimalSeparator,\n ]);\n return (_jsxs(ContainerStyled, { value: values, marks: props.marks, \"data-testid\": \"Slider\", \"data-state\": disabled ? 'disabled' : undefined, children: [_jsx(SliderStyled, Object.assign({}, props, { disabled: disabled, ref: ref, onChange: onChangeHandler, min: min, max: max, step: step, disableSwap: disableSwap, valueLabelFormat: (v) => getFormattedString(v, decimalSeparator, thousandsSeparator, hiddenDecimalSeparator), value: values })), _jsx(SliderValuesStyled, { disabled: disabled, children: valuesComponent })] }));\n});\n/**\n * @description Slider styling definition\n */\nconst SliderStyled = styled(MuiSlider, {\n shouldForwardProp: (prop) => prop !== 'minTextDescription' &&\n prop !== 'maxTextDescription' &&\n prop !== 'leftSideLabel' &&\n prop !== 'rightSideLabel' &&\n prop !== 'valueComponentType',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n if (!args.marks)\n return null;\n let rule = {};\n const isArray = Array.isArray(args.value);\n if (!isArray)\n rule = {\n '& .MuiSlider-track': {\n left: '-3px !important',\n },\n };\n let style = {\n '& .MuiSlider-rail': {\n left: '-3px',\n paddingRight: '6px',\n },\n };\n style = Object.assign(Object.assign({}, style), rule);\n return style;\n});\nconst getFormattedString = (num, decimalSeparator, thousandsSeparator, hiddenDecimalSeparator) => {\n if (hiddenDecimalSeparator)\n return num.toFixed().replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparator);\n return num\n .toFixed(2)\n .replace('.', decimalSeparator)\n .replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparator);\n};\n//# sourceMappingURL=slider.js.map"],"names":["Slider","forwardRef","_a","ref","min","max","defaultValue","valueComponentType","leftSideLabel","rightSideLabel","disabled","disableSwap","step","value","isCurrencyInFront","minTextDescription","maxTextDescription","onChange","onInputBlur","thousandsSeparator","decimalSeparator","hiddenDecimalSeparator","props","__rest","getInitialValueWithUseCallBack","useMemo","undefined","getInitialValue","values","setValues","useState","useEffect","getFormattedValueWithUseCallBack","useCallback","_value","result","parseInt","isNaN","getFormattedValue","onChangeHandler","event","activeThumb","Array","isArray","Math","onChangeSingleValue","e","newValue","target","onChangeDoubleValue","thumb","curr","newArrayValue","valuesComponent","type","onBlur","minVal","getFormattedString","maxVal","_jsxs","className","children","_jsx","ResizableSliderInput","id","textDescription","labelText","getDoubleValueComponent","val","getSingleValueComponent","ContainerStyled","marks","SliderStyled","Object","assign","valueLabelFormat","v","SliderValuesStyled","styled","MuiSlider","shouldForwardProp","prop","args","rule","left","style","paddingRight","num","toFixed","replace"],"mappings":"+ZASA,MAyCaA,EAASC,GAAW,CAACC,EAAIC,KAClC,IAAIC,IAAEA,EAAGC,IAAEA,EAAGC,aAAEA,EAAYC,mBAAEA,EAAkBC,cAAEA,EAAaC,eAAEA,EAAcC,SAAEA,EAAQC,YAAEA,EAAWC,KAAEA,EAAIC,MAAEA,EAAKC,kBAAEA,EAAiBC,mBAAEA,EAAqB,GAAEC,mBAAEA,EAAqB,GAAEC,SAAEA,EAAQC,YAAEA,EAAWC,mBAAEA,EAAqB,IAAGC,iBAAEA,EAAmB,IAAGC,uBAAEA,GAAyB,GAASnB,EAAIoB,EAAQC,EAAOrB,EAAI,CAAC,MAAO,MAAO,eAAgB,qBAAsB,gBAAiB,iBAAkB,WAAY,cAAe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