@skodaflow/web-library 8.3.2 → 8.5.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 (308) hide show
  1. package/cjs/components/advancedTable/agGrid.js +1 -1
  2. package/cjs/components/advancedTable/agGrid.js.map +1 -1
  3. package/cjs/components/advancedTable/agGridSkodaTheme.d.ts +3 -0
  4. package/cjs/components/advancedTable/agGridSkodaTheme.js +1 -1
  5. package/cjs/components/advancedTable/agGridSkodaTheme.js.map +1 -1
  6. package/cjs/components/advancedTable/agGridUniformRowHeight.d.ts +36 -0
  7. package/cjs/components/advancedTable/agGridUniformRowHeight.js +2 -0
  8. package/cjs/components/advancedTable/agGridUniformRowHeight.js.map +1 -0
  9. package/cjs/components/advancedTable/agGridVariables.js +1 -1
  10. package/cjs/components/advancedTable/agGridVariables.js.map +1 -1
  11. package/cjs/components/advancedTable/index.d.ts +1 -0
  12. package/cjs/components/alert/AlertIconButton.d.ts +8 -0
  13. package/cjs/components/alert/AlertIconButton.js +2 -0
  14. package/cjs/components/alert/AlertIconButton.js.map +1 -0
  15. package/cjs/components/alert/index.d.ts +1 -0
  16. package/cjs/components/carousel/Autoplay.js.map +1 -1
  17. package/cjs/components/carousel/Carousel.js +1 -1
  18. package/cjs/components/carousel/Carousel.js.map +1 -1
  19. package/cjs/components/carousel/Navigation.js +1 -1
  20. package/cjs/components/carousel/Navigation.js.map +1 -1
  21. package/cjs/components/carousel/Pagination.js +1 -1
  22. package/cjs/components/carousel/Pagination.js.map +1 -1
  23. package/cjs/components/copyButton/CopyButton.d.ts +39 -0
  24. package/cjs/components/copyButton/CopyButton.js +2 -0
  25. package/cjs/components/copyButton/CopyButton.js.map +1 -0
  26. package/cjs/components/copyButton/CopyIconButton.d.ts +8 -0
  27. package/cjs/components/copyButton/CopyIconButton.js +2 -0
  28. package/cjs/components/copyButton/CopyIconButton.js.map +1 -0
  29. package/cjs/components/copyButton/index.d.ts +3 -0
  30. package/cjs/components/copyButton/useCopyAction.d.ts +31 -0
  31. package/cjs/components/copyButton/useCopyAction.js +2 -0
  32. package/cjs/components/copyButton/useCopyAction.js.map +1 -0
  33. package/cjs/components/footer/FooterMenuCollapse.js +1 -1
  34. package/cjs/components/footer/FooterMenuCollapse.js.map +1 -1
  35. package/cjs/components/header/Header.js +1 -1
  36. package/cjs/components/header/Header.js.map +1 -1
  37. package/cjs/components/header/HeaderNavigationHero.js +1 -1
  38. package/cjs/components/header/HeaderNavigationHero.js.map +1 -1
  39. package/cjs/components/header/HeaderNavigationMenu.js +1 -1
  40. package/cjs/components/header/HeaderNavigationMenu.js.map +1 -1
  41. package/cjs/components/hotspotCard/HotspotCard.js +1 -1
  42. package/cjs/components/hotspotCard/HotspotCard.js.map +1 -1
  43. package/cjs/components/icon/stroke/EmissionLabelIcon.js.map +1 -1
  44. package/cjs/components/image/Image.d.ts +38 -14
  45. package/cjs/components/image/Image.js +1 -1
  46. package/cjs/components/image/Image.js.map +1 -1
  47. package/cjs/components/index.d.ts +2 -0
  48. package/cjs/components/label/Label.js.map +1 -1
  49. package/cjs/components/overlay/Overlay.js +1 -1
  50. package/cjs/components/overlay/Overlay.js.map +1 -1
  51. package/cjs/components/video/Video.d.ts +9 -8
  52. package/cjs/components/video/Video.js +1 -1
  53. package/cjs/components/video/Video.js.map +1 -1
  54. package/cjs/components/video/index.d.ts +5 -1
  55. package/cjs/components/video/useVideoFullscreen.d.ts +13 -0
  56. package/cjs/components/video/useVideoFullscreen.js +2 -0
  57. package/cjs/components/video/useVideoFullscreen.js.map +1 -0
  58. package/cjs/components/video/useVideoPlayPause.d.ts +13 -0
  59. package/cjs/components/video/useVideoPlayPause.js +2 -0
  60. package/cjs/components/video/useVideoPlayPause.js.map +1 -0
  61. package/cjs/components/video/useVideoReady.d.ts +6 -0
  62. package/cjs/components/video/useVideoReady.js +2 -0
  63. package/cjs/components/video/useVideoReady.js.map +1 -0
  64. package/cjs/components/video/useVideoSoundControls.d.ts +17 -0
  65. package/cjs/components/video/useVideoSoundControls.js +2 -0
  66. package/cjs/components/video/useVideoSoundControls.js.map +1 -0
  67. package/cjs/components/video/useVideoTime.d.ts +22 -0
  68. package/cjs/components/video/useVideoTime.js +2 -0
  69. package/cjs/components/video/useVideoTime.js.map +1 -0
  70. package/cjs/components/videoPlayer/VideoPlayer.d.ts +125 -0
  71. package/cjs/components/videoPlayer/VideoPlayer.js +2 -0
  72. package/cjs/components/videoPlayer/VideoPlayer.js.map +1 -0
  73. package/cjs/components/videoPlayer/VideoPlayerFullscreenButton.d.ts +31 -0
  74. package/cjs/components/videoPlayer/VideoPlayerFullscreenButton.js +2 -0
  75. package/cjs/components/videoPlayer/VideoPlayerFullscreenButton.js.map +1 -0
  76. package/cjs/components/videoPlayer/VideoPlayerIconButton.d.ts +16 -0
  77. package/cjs/components/videoPlayer/VideoPlayerIconButton.js +2 -0
  78. package/cjs/components/videoPlayer/VideoPlayerIconButton.js.map +1 -0
  79. package/cjs/components/videoPlayer/VideoPlayerPlayPauseButton.d.ts +31 -0
  80. package/cjs/components/videoPlayer/VideoPlayerPlayPauseButton.js +2 -0
  81. package/cjs/components/videoPlayer/VideoPlayerPlayPauseButton.js.map +1 -0
  82. package/cjs/components/videoPlayer/VideoPlayerSkipButton.d.ts +23 -0
  83. package/cjs/components/videoPlayer/VideoPlayerSkipButton.js +2 -0
  84. package/cjs/components/videoPlayer/VideoPlayerSkipButton.js.map +1 -0
  85. package/cjs/components/videoPlayer/VideoPlayerSlider.d.ts +12 -0
  86. package/cjs/components/videoPlayer/VideoPlayerSlider.js +2 -0
  87. package/cjs/components/videoPlayer/VideoPlayerSlider.js.map +1 -0
  88. package/cjs/components/videoPlayer/VideoPlayerSoundButton.d.ts +31 -0
  89. package/cjs/components/videoPlayer/VideoPlayerSoundButton.js +2 -0
  90. package/cjs/components/videoPlayer/VideoPlayerSoundButton.js.map +1 -0
  91. package/cjs/components/videoPlayer/VideoPlayerTime.d.ts +17 -0
  92. package/cjs/components/videoPlayer/VideoPlayerTime.js +2 -0
  93. package/cjs/components/videoPlayer/VideoPlayerTime.js.map +1 -0
  94. package/cjs/components/videoPlayer/formatVideoTime.d.ts +5 -0
  95. package/cjs/components/videoPlayer/formatVideoTime.js +2 -0
  96. package/cjs/components/videoPlayer/formatVideoTime.js.map +1 -0
  97. package/cjs/components/videoPlayer/index.d.ts +10 -0
  98. package/cjs/components/videoPlayer/useVideoPlayerVisibility.d.ts +24 -0
  99. package/cjs/components/videoPlayer/useVideoPlayerVisibility.js +2 -0
  100. package/cjs/components/videoPlayer/useVideoPlayerVisibility.js.map +1 -0
  101. package/cjs/index.js +1 -1
  102. package/cjs/materialui/accordion/AccordionSummaryExpandWrapper.d.ts +5 -1
  103. package/cjs/materialui/accordion/AccordionSummaryExpandWrapper.js +1 -1
  104. package/cjs/materialui/accordion/AccordionSummaryExpandWrapper.js.map +1 -1
  105. package/cjs/materialui/alert/alert.theme.js +1 -1
  106. package/cjs/materialui/alert/alert.theme.js.map +1 -1
  107. package/cjs/materialui/alert/alertTitle.theme.js +1 -1
  108. package/cjs/materialui/alert/alertTitle.theme.js.map +1 -1
  109. package/cjs/materialui/card/Card.js.map +1 -1
  110. package/cjs/materialui/card/card.theme.js +1 -1
  111. package/cjs/materialui/card/card.theme.js.map +1 -1
  112. package/cjs/materialui/datepicker/datecalendar.theme.d.ts +102 -102
  113. package/cjs/materialui/datepicker/digitalclock.theme.d.ts +102 -102
  114. package/cjs/materialui/divider/divider.theme.js +1 -1
  115. package/cjs/materialui/divider/divider.theme.js.map +1 -1
  116. package/cjs/materialui/iconButton/iconButton.theme.js.map +1 -1
  117. package/cjs/materialui/skeleton/skeleton.theme.js +1 -1
  118. package/cjs/materialui/skeleton/skeleton.theme.js.map +1 -1
  119. package/cjs/materialui/slider/slider.theme.js +1 -1
  120. package/cjs/materialui/slider/slider.theme.js.map +1 -1
  121. package/cjs/materialui/table/tablePagination.theme.js.map +1 -1
  122. package/cjs/materialui/tabs/Tab.d.ts +1 -0
  123. package/cjs/materialui/tabs/Tab.js +1 -1
  124. package/cjs/materialui/tabs/Tab.js.map +1 -1
  125. package/cjs/materialui/tabs/TabsScrollButton.d.ts +3 -1
  126. package/cjs/materialui/tabs/TabsScrollButton.js +1 -1
  127. package/cjs/materialui/tabs/TabsScrollButton.js.map +1 -1
  128. package/cjs/materialui/textfield/FormControl.js +1 -1
  129. package/cjs/materialui/textfield/FormControl.js.map +1 -1
  130. package/cjs/materialui/textfield/FormHelperText.js +1 -1
  131. package/cjs/materialui/textfield/FormHelperText.js.map +1 -1
  132. package/cjs/materialui/theme/sxConfig.js.map +1 -1
  133. package/cjs/materialui/theme/theme.extensions.d.ts +40 -1
  134. package/cjs/materialui/typography/typography.theme.js +1 -1
  135. package/cjs/materialui/typography/typography.theme.js.map +1 -1
  136. package/cjs/node_modules/swiper/modules/a11y.js +2 -0
  137. package/cjs/node_modules/swiper/modules/a11y.js.map +1 -0
  138. package/cjs/node_modules/swiper/modules/autoplay.js +1 -1
  139. package/cjs/node_modules/swiper/modules/autoplay.js.map +1 -1
  140. package/cjs/node_modules/swiper/modules/effect-fade.js +1 -1
  141. package/cjs/node_modules/swiper/modules/effect-fade.js.map +1 -1
  142. package/cjs/node_modules/swiper/modules/keyboard.js +1 -1
  143. package/cjs/node_modules/swiper/modules/keyboard.js.map +1 -1
  144. package/cjs/node_modules/swiper/modules/parallax.js +1 -1
  145. package/cjs/node_modules/swiper/modules/parallax.js.map +1 -1
  146. package/cjs/node_modules/swiper/shared/classes-to-selector.js +2 -0
  147. package/cjs/node_modules/swiper/shared/classes-to-selector.js.map +1 -0
  148. package/cjs/node_modules/swiper/shared/effect-init.js +1 -1
  149. package/cjs/node_modules/swiper/shared/effect-init.js.map +1 -1
  150. package/cjs/node_modules/swiper/shared/effect-target.js +1 -1
  151. package/cjs/node_modules/swiper/shared/effect-target.js.map +1 -1
  152. package/cjs/node_modules/swiper/shared/effect-virtual-transition-end.js +1 -1
  153. package/cjs/node_modules/swiper/shared/effect-virtual-transition-end.js.map +1 -1
  154. package/cjs/node_modules/swiper/shared/swiper-core.js +1 -1
  155. package/cjs/node_modules/swiper/shared/swiper-core.js.map +1 -1
  156. package/cjs/node_modules/swiper/shared/update-on-virtual-data.js +1 -1
  157. package/cjs/node_modules/swiper/shared/update-on-virtual-data.js.map +1 -1
  158. package/cjs/node_modules/swiper/shared/update-swiper.js +1 -1
  159. package/cjs/node_modules/swiper/shared/update-swiper.js.map +1 -1
  160. package/cjs/node_modules/swiper/shared/utils.js +1 -1
  161. package/cjs/node_modules/swiper/shared/utils.js.map +1 -1
  162. package/cjs/node_modules/swiper/swiper-react.js +1 -1
  163. package/cjs/node_modules/swiper/swiper-react.js.map +1 -1
  164. package/cjs/package.json +1 -0
  165. package/components/advancedTable/agGrid.js +1 -1
  166. package/components/advancedTable/agGrid.js.map +1 -1
  167. package/components/advancedTable/agGridSkodaTheme.d.ts +3 -0
  168. package/components/advancedTable/agGridSkodaTheme.js +1 -1
  169. package/components/advancedTable/agGridSkodaTheme.js.map +1 -1
  170. package/components/advancedTable/agGridUniformRowHeight.d.ts +36 -0
  171. package/components/advancedTable/agGridUniformRowHeight.js +2 -0
  172. package/components/advancedTable/agGridUniformRowHeight.js.map +1 -0
  173. package/components/advancedTable/agGridVariables.js +1 -1
  174. package/components/advancedTable/agGridVariables.js.map +1 -1
  175. package/components/advancedTable/index.d.ts +1 -0
  176. package/components/alert/AlertIconButton.d.ts +8 -0
  177. package/components/alert/AlertIconButton.js +2 -0
  178. package/components/alert/AlertIconButton.js.map +1 -0
  179. package/components/alert/index.d.ts +1 -0
  180. package/components/carousel/Autoplay.js.map +1 -1
  181. package/components/carousel/Carousel.js +1 -1
  182. package/components/carousel/Carousel.js.map +1 -1
  183. package/components/carousel/Navigation.js +1 -1
  184. package/components/carousel/Navigation.js.map +1 -1
  185. package/components/carousel/Pagination.js +1 -1
  186. package/components/carousel/Pagination.js.map +1 -1
  187. package/components/copyButton/CopyButton.d.ts +39 -0
  188. package/components/copyButton/CopyButton.js +2 -0
  189. package/components/copyButton/CopyButton.js.map +1 -0
  190. package/components/copyButton/CopyIconButton.d.ts +8 -0
  191. package/components/copyButton/CopyIconButton.js +2 -0
  192. package/components/copyButton/CopyIconButton.js.map +1 -0
  193. package/components/copyButton/index.d.ts +3 -0
  194. package/components/copyButton/useCopyAction.d.ts +31 -0
  195. package/components/copyButton/useCopyAction.js +2 -0
  196. package/components/copyButton/useCopyAction.js.map +1 -0
  197. package/components/footer/FooterMenuCollapse.js +1 -1
  198. package/components/footer/FooterMenuCollapse.js.map +1 -1
  199. package/components/header/Header.js +1 -1
  200. package/components/header/Header.js.map +1 -1
  201. package/components/header/HeaderNavigationHero.js +1 -1
  202. package/components/header/HeaderNavigationHero.js.map +1 -1
  203. package/components/header/HeaderNavigationMenu.js +1 -1
  204. package/components/header/HeaderNavigationMenu.js.map +1 -1
  205. package/components/hotspotCard/HotspotCard.js +1 -1
  206. package/components/hotspotCard/HotspotCard.js.map +1 -1
  207. package/components/icon/stroke/EmissionLabelIcon.js.map +1 -1
  208. package/components/image/Image.d.ts +38 -14
  209. package/components/image/Image.js +1 -1
  210. package/components/image/Image.js.map +1 -1
  211. package/components/index.d.ts +2 -0
  212. package/components/label/Label.js.map +1 -1
  213. package/components/overlay/Overlay.js +1 -1
  214. package/components/overlay/Overlay.js.map +1 -1
  215. package/components/video/Video.d.ts +9 -8
  216. package/components/video/Video.js +1 -1
  217. package/components/video/Video.js.map +1 -1
  218. package/components/video/index.d.ts +5 -1
  219. package/components/video/useVideoFullscreen.d.ts +13 -0
  220. package/components/video/useVideoFullscreen.js +2 -0
  221. package/components/video/useVideoFullscreen.js.map +1 -0
  222. package/components/video/useVideoPlayPause.d.ts +13 -0
  223. package/components/video/useVideoPlayPause.js +2 -0
  224. package/components/video/useVideoPlayPause.js.map +1 -0
  225. package/components/video/useVideoReady.d.ts +6 -0
  226. package/components/video/useVideoReady.js +2 -0
  227. package/components/video/useVideoReady.js.map +1 -0
  228. package/components/video/useVideoSoundControls.d.ts +17 -0
  229. package/components/video/useVideoSoundControls.js +2 -0
  230. package/components/video/useVideoSoundControls.js.map +1 -0
  231. package/components/video/useVideoTime.d.ts +22 -0
  232. package/components/video/useVideoTime.js +2 -0
  233. package/components/video/useVideoTime.js.map +1 -0
  234. package/components/videoPlayer/VideoPlayer.d.ts +125 -0
  235. package/components/videoPlayer/VideoPlayer.js +2 -0
  236. package/components/videoPlayer/VideoPlayer.js.map +1 -0
  237. package/components/videoPlayer/VideoPlayerFullscreenButton.d.ts +31 -0
  238. package/components/videoPlayer/VideoPlayerFullscreenButton.js +2 -0
  239. package/components/videoPlayer/VideoPlayerFullscreenButton.js.map +1 -0
  240. package/components/videoPlayer/VideoPlayerIconButton.d.ts +16 -0
  241. package/components/videoPlayer/VideoPlayerIconButton.js +2 -0
  242. package/components/videoPlayer/VideoPlayerIconButton.js.map +1 -0
  243. package/components/videoPlayer/VideoPlayerPlayPauseButton.d.ts +31 -0
  244. package/components/videoPlayer/VideoPlayerPlayPauseButton.js +2 -0
  245. package/components/videoPlayer/VideoPlayerPlayPauseButton.js.map +1 -0
  246. package/components/videoPlayer/VideoPlayerSkipButton.d.ts +23 -0
  247. package/components/videoPlayer/VideoPlayerSkipButton.js +2 -0
  248. package/components/videoPlayer/VideoPlayerSkipButton.js.map +1 -0
  249. package/components/videoPlayer/VideoPlayerSlider.d.ts +12 -0
  250. package/components/videoPlayer/VideoPlayerSlider.js +2 -0
  251. package/components/videoPlayer/VideoPlayerSlider.js.map +1 -0
  252. package/components/videoPlayer/VideoPlayerSoundButton.d.ts +31 -0
  253. package/components/videoPlayer/VideoPlayerSoundButton.js +2 -0
  254. package/components/videoPlayer/VideoPlayerSoundButton.js.map +1 -0
  255. package/components/videoPlayer/VideoPlayerTime.d.ts +17 -0
  256. package/components/videoPlayer/VideoPlayerTime.js +2 -0
  257. package/components/videoPlayer/VideoPlayerTime.js.map +1 -0
  258. package/components/videoPlayer/formatVideoTime.d.ts +5 -0
  259. package/components/videoPlayer/formatVideoTime.js +2 -0
  260. package/components/videoPlayer/formatVideoTime.js.map +1 -0
  261. package/components/videoPlayer/index.d.ts +10 -0
  262. package/components/videoPlayer/useVideoPlayerVisibility.d.ts +24 -0
  263. package/components/videoPlayer/useVideoPlayerVisibility.js +2 -0
  264. package/components/videoPlayer/useVideoPlayerVisibility.js.map +1 -0
  265. package/index.js +1 -1
  266. package/materialui/accordion/AccordionSummaryExpandWrapper.d.ts +5 -1
  267. package/materialui/accordion/AccordionSummaryExpandWrapper.js +1 -1
  268. package/materialui/accordion/AccordionSummaryExpandWrapper.js.map +1 -1
  269. package/materialui/alert/alert.theme.js +1 -1
  270. package/materialui/alert/alert.theme.js.map +1 -1
  271. package/materialui/alert/alertTitle.theme.js +1 -1
  272. package/materialui/alert/alertTitle.theme.js.map +1 -1
  273. package/materialui/card/Card.js.map +1 -1
  274. package/materialui/card/card.theme.js +1 -1
  275. package/materialui/card/card.theme.js.map +1 -1
  276. package/materialui/datepicker/datecalendar.theme.d.ts +102 -102
  277. package/materialui/datepicker/digitalclock.theme.d.ts +102 -102
  278. package/materialui/divider/divider.theme.js +1 -1
  279. package/materialui/divider/divider.theme.js.map +1 -1
  280. package/materialui/iconButton/iconButton.theme.js.map +1 -1
  281. package/materialui/skeleton/skeleton.theme.js +1 -1
  282. package/materialui/skeleton/skeleton.theme.js.map +1 -1
  283. package/materialui/slider/slider.theme.js +1 -1
  284. package/materialui/slider/slider.theme.js.map +1 -1
  285. package/materialui/table/tablePagination.theme.js.map +1 -1
  286. package/materialui/tabs/Tab.d.ts +1 -0
  287. package/materialui/tabs/Tab.js +1 -1
  288. package/materialui/tabs/Tab.js.map +1 -1
  289. package/materialui/tabs/TabsScrollButton.d.ts +3 -1
  290. package/materialui/tabs/TabsScrollButton.js +1 -1
  291. package/materialui/tabs/TabsScrollButton.js.map +1 -1
  292. package/materialui/textfield/FormControl.js +1 -1
  293. package/materialui/textfield/FormControl.js.map +1 -1
  294. package/materialui/textfield/FormHelperText.js +1 -1
  295. package/materialui/textfield/FormHelperText.js.map +1 -1
  296. package/materialui/theme/sxConfig.js.map +1 -1
  297. package/materialui/theme/theme.extensions.d.ts +40 -1
  298. package/materialui/typography/typography.theme.js +1 -1
  299. package/materialui/typography/typography.theme.js.map +1 -1
  300. package/package.json +1 -1
  301. package/cjs/components/video/hooks.d.ts +0 -43
  302. package/cjs/components/video/hooks.js +0 -2
  303. package/cjs/components/video/hooks.js.map +0 -1
  304. package/cjs/node_modules/swiper/shared/ssr-window.esm.js +0 -2
  305. package/cjs/node_modules/swiper/shared/ssr-window.esm.js.map +0 -1
  306. package/components/video/hooks.d.ts +0 -43
  307. package/components/video/hooks.js +0 -2
  308. package/components/video/hooks.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{jsx as a}from"react/jsx-runtime";import{Box as e,useTheme as o}from"@mui/material";import{forwardRef as r}from"react";import{agGridVariables as i}from"./agGridVariables.js";import{skodaAgThemeParams as t}from"./agGridSkodaTheme.js";import{agGridCssIcons as n}from"./agGridIcons.js";import{sxOverride as l}from"../../utils/sxOverride/sxOverride.js";const g=a=>{const e=t(a);return{width:"100%","*":{maxWidth:"none"},'&:not(:has([class*="ag-theme-params-"])),&.ag-theme-material':{...i(a)},".ag-row-last":{borderBottom:"none"},".ag-column-last .ag-header-cell-resize":{display:"none"},..."ltr"===a.direction&&{".ag-center-cols-container":{minWidth:"100%"}},".ag-center-cols-viewport":{minHeight:"56px"},"& .ag-header-cell .ag-header-cell-text":{fontWeight:`${e.headerFontWeight}`},"& .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden":{display:"block !important",cursor:"initial"},"& .ag-pinned-left-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-pinned-right-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden":{display:"none !important"},"@supports selector(::-webkit-scrollbar)":{"& .ag-body-horizontal-scroll":{alignItems:"center",borderTop:"1px solid",borderTopColor:a.palette.surface.secondary,maxHeight:"none !important",height:"auto !important"},"& .ag-body-horizontal-scroll .ag-body-horizontal-scroll-viewport":{height:"48px !important",maxHeight:"48px !important",minHeight:"48px !important"},"& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar:horizontal":{height:"48px"},"& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:horizontal, & .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track:horizontal":{borderWidth:"22px"},"& .ag-body-horizontal-scroll.ag-invisible .ag-body-horizontal-scroll-viewport":{height:"0 !important",maxHeight:"0 !important",minHeight:"0 !important",overflow:"hidden"},"& .ag-body-horizontal-scroll .ag-horizontal-left-spacer, & .ag-body-horizontal-scroll .ag-horizontal-right-spacer":{overflow:"hidden"}},"& .ag-paging-panel":{justifyContent:"center",px:"24px"},"& .ag-paging-panel .ag-paging-page-size":{position:"absolute"},"& .ag-paging-panel .ag-paging-page-summary-panel":{marginLeft:"auto"},"& .ag-paging-row-summary-panel":{display:"none"},"& .ag-paging-description":{fontSize:"18px",px:"18px"},"& .ag-paging-panel .ag-paging-description span":{color:"text.primary",px:"2px"},"& .ag-paging-panel .ag-paging-description .ag-paging-number":{fontWeight:"700"},"& .ag-paging-panel .ag-paging-description span:last-child":{fontWeight:"300"},"& .ag-paging-panel .ag-icon-first, & .ag-paging-panel .ag-icon-last":{display:"none"},"& .ag-paging-panel .ag-picker-field-wrapper":{border:"none",px:"0",cursor:"pointer",minWidth:"auto"},"& .ag-paging-panel .ag-picker-field-display":{minWidth:"28px",width:"auto",pr:"6px",fontSize:"18px",fontWeight:"700",textAlign:"center"},"& .ag-paging-panel .ag-label":{mr:"6px",fontSize:"18px"},"& .ag-popup > *":{backgroundColor:"onSurface.os0",cursor:"pointer",borderRadius:"0px"},"& .ag-selectable .ag-cell":{cursor:"auto"},"& .skoda-ag-row-pointer .ag-row:hover, & .skoda-ag-row-pointer .ag-row:hover .ag-cell":{cursor:"pointer"},...n,"& .ag-icon-asc, & .ag-icon-desc":{color:a.palette.onSurface.os600},"& .ag-icon-asc:hover, & .ag-icon-desc:hover":{color:a.palette.text.primary},"& .ag-header-cell-sortable .ag-sort-indicator-container:has(.ag-sort-descending-icon.ag-hidden) .ag-hidden:has(.ag-icon-asc)":{display:"inline-block !important"},fontFamily:e.fontFamily}},p=()=>({domLayout:"autoHeight",animateRows:!1,suppressDragLeaveHidesColumns:!0,enableRtl:"rtl"===o().direction,enableCellTextSelection:!0}),s=r(({sx:o,children:r,...i},t)=>a(e,{sx:l(a=>({...g(a)}),o),ref:t,...i,children:r}));export{s as SkodaAgGridProvider,g as agGridStyles,p as useSkodaAgGridProps};
1
+ import{jsx as a}from"react/jsx-runtime";import{Box as e,useTheme as o}from"@mui/material";import{forwardRef as t}from"react";import{agGridVariables as r}from"./agGridVariables.js";import{skodaAgThemeParams as i}from"./agGridSkodaTheme.js";import{agGridCssIcons as n}from"./agGridIcons.js";import{sxOverride as l}from"../../utils/sxOverride/sxOverride.js";import{getInteractiveStyle as g}from"../../materialui/button/interactive.js";import{getFocusRingStyle as p}from"../focusring/focusring.js";const d=a=>{const e=i(a);return{width:"100%","*":{maxWidth:"none"},'&:not(:has([class*="ag-theme-params-"])),&.ag-theme-material':{...r(a)},".ag-row-last":{borderBottom:"none"},".ag-row-last > .ag-grid-pinned-left-cells, .ag-row-last > .ag-grid-scrolling-cells, .ag-row-last > .ag-grid-pinned-right-cells":{borderBottom:"none"},".ag-column-last .ag-header-cell-resize":{display:"none"},..."ltr"===a.direction&&{".ag-center-cols-container":{minWidth:"100%"},".ag-row:not(.ag-full-width-row, .ag-row-last)::after":{borderBottom:"var(--ag-row-border)"}},".ag-row-selected:not(.ag-full-width-row)::after":{backgroundColor:"var(--ag-selected-row-background-color)",backgroundClip:"padding-box"},".ag-row-hover:not(.ag-full-width-row)::after":{backgroundColor:"var(--ag-row-hover-color)",backgroundClip:"padding-box"},".ag-center-cols-viewport":{minHeight:`${e.autoHeightMinBodyHeight}px`},"& .ag-header-cell .ag-header-cell-text":{fontWeight:`${e.headerFontWeight}`},"& .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden":{display:"block !important",cursor:"initial"},"& .ag-pinned-left-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-pinned-right-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-header .ag-grid-pinned-left-cells .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-header .ag-grid-pinned-right-cells .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden":{display:"none !important"},"@supports selector(::-webkit-scrollbar)":{"& .ag-body-horizontal-scroll":{alignItems:"center",borderTop:"1px solid",borderTopColor:a.palette.surface.secondary,maxHeight:"none !important",height:"auto !important"},"& .ag-body-horizontal-scroll.ag-scrollbar-invisible":{position:"static",opacity:"1"},"& .ag-body-horizontal-scroll .ag-body-horizontal-scroll-viewport":{height:"48px !important",maxHeight:"48px !important",minHeight:"48px !important"},"& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar:horizontal":{height:"48px"},"& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:horizontal, & .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track:horizontal":{borderWidth:"22px"},"& .ag-body-horizontal-scroll.ag-invisible":{borderTop:"none"},"& .ag-body-horizontal-scroll.ag-invisible .ag-body-horizontal-scroll-viewport":{height:"0 !important",maxHeight:"0 !important",minHeight:"0 !important",overflow:"hidden"},"& .ag-body-horizontal-scroll .ag-horizontal-left-spacer, & .ag-body-horizontal-scroll .ag-horizontal-right-spacer, & .ag-body-horizontal-scroll .ag-body-horizontal-scroll-end-spacer":{overflow:"hidden"}},"& .ag-paging-panel":{height:"auto"},"& .ag-paging-panel .ag-paging-panel-content":{position:"relative",justifyContent:"center",width:"100%",gap:"16px",[a.breakpoints.up("md")]:{minHeight:"var(--ag-pagination-panel-height)",padding:"4px 24px"},[a.breakpoints.down("md")]:{flexWrap:"wrap",minHeight:"0",padding:"8px 16px"}},"& .ag-paging-panel .ag-paging-panel-content::before, & .ag-paging-panel:not(:has(.ag-paging-panel-content))::before":{content:'""',flexGrow:"1",flexBasis:"auto"},"& .ag-paging-panel .ag-paging-page-summary-panel":{m:"0",display:"flex",alignItems:"center",justifyContent:"flex-end",flexGrow:"1",gap:"0",[a.breakpoints.down("md")]:{flexBasis:"100%",justifyContent:"center"}},"& .ag-paging-row-summary-panel":{display:"none"},"& .ag-paging-panel .ag-paging-description":{...a.typography.body,minWidth:"82px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",mx:"4px",p:"0",color:"dark"===a.palette.mode?a.palette.onSurface.os300:a.palette.onSurface.os700},"& .ag-paging-panel .ag-paging-description .ag-paging-number":{color:"text.primary",fontWeight:"700"},"& .ag-paging-panel .ag-paging-description .ag-number-field-input":{border:"none",p:"0",height:"auto",textAlign:"center",fontWeight:"700",mx:"-1.25ch",background:"transparent","&:focus":{boxShadow:"none"}},'& .ag-paging-panel .ag-paging-description [id$="-of-page"]:not(:empty)':{fontWeight:"400",m:"0 4px"},'& .ag-paging-panel .ag-paging-description [id$="-start-page"]:not(:empty)':{mr:"4px"},"& .ag-paging-panel .ag-paging-description span:last-child":{color:"inherit",fontWeight:"300"},"& .ag-paging-panel .ag-paging-button":{position:"relative",boxShadow:"none",outline:"none",width:"44px",height:"44px",borderRadius:"1000px",maxWidth:"none",transition:"all 0.3s ease-out",flexShrink:"0","&:hover":{boxShadow:"none"},"&&:active":{boxShadow:"none"},...g({backgroundColor:"transparent"},{backgroundColor:a.palette.transparent.secondary},void 0,void 0,":focus-visible:not(.ag-disabled)"),...p(a,!0,0,":focus-visible:not(.ag-disabled)"),"&.ag-disabled":{opacity:"1",color:a.palette.disabled.primary,pointerEvents:"none"},display:"flex",alignItems:"center",justifyContent:"center","--ag-icon-size":"20px","&:first-of-type, &:last-of-type":{display:"none"}},"& .ag-paging-panel .ag-picker-field-wrapper":{border:"none",px:"0",cursor:"pointer",minWidth:"auto",borderRadius:"4px"},"& .ag-paging-panel .ag-picker-field-display":{fontSize:"16px",fontWeight:700,pl:"4px"},"& .ag-paging-panel .ag-picker-field-icon":{ml:"8px",mr:"12px"},"& .ag-paging-panel .ag-label":{...a.typography.body,mr:"16px"},"& .ag-popup > *":{backgroundColor:"onSurface.os0",cursor:"pointer",borderRadius:"0px"},"& .ag-popup .ag-select-list":{border:"none",p:"0",boxShadow:"0px 2px 25px 0px rgba(0, 0, 0, 0.15)","--ag-list-item-height":"48px"},"& .ag-popup .ag-select-list .ag-list-item-text":{overflow:"visible",textOverflow:"clip"},"& .ag-popup .ag-select-list .ag-list-item":{p:"12px",cursor:"pointer",color:a.palette.text.primary,fontSize:"16px",lineHeight:"24px",fontWeight:"400",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",...g({backgroundColor:"dark"===a.palette.mode?a.palette.onSurface.os800:a.palette.background.primary},{backgroundColor:a.palette.surface.primary},{backgroundColor:a.palette.surface.secondary},void 0,".ag-active-item")},"& .ag-selectable .ag-cell":{cursor:"auto"},"& .skoda-ag-row-pointer .ag-row:hover, & .skoda-ag-row-pointer .ag-row:hover .ag-cell":{cursor:"pointer"},"& .ag-row:has(.ag-cell-wrap-text)":{"--ag-line-height":"24px","& .ag-cell":{py:"15px"}},...n,"& .ag-icon-asc, & .ag-icon-desc":{color:a.palette.onSurface.os600},"& .ag-icon-asc:hover, & .ag-icon-desc:hover":{color:a.palette.text.primary},"& .ag-header-cell-sortable .ag-sort-indicator-container:has(.ag-sort-descending-icon.ag-hidden) .ag-hidden:has(.ag-icon-asc)":{display:"inline-block !important"},fontFamily:e.fontFamily}},s=()=>({domLayout:"autoHeight",animateRows:!1,suppressDragLeaveHidesColumns:!0,enableRtl:"rtl"===o().direction,enableCellTextSelection:!0}),c=t(({sx:o,children:t,...r},i)=>a(e,{sx:l(a=>({...d(a)}),o),ref:i,...r,children:t}));export{c as SkodaAgGridProvider,d as agGridStyles,s as useSkodaAgGridProps};
2
2
  //# sourceMappingURL=agGrid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agGrid.js","sources":["../../../src/components/advancedTable/agGrid.tsx"],"sourcesContent":["import { Box, BoxProps, CSSObject, Theme, useTheme } from '@mui/material';\nimport React, { forwardRef } from 'react';\nimport { agGridVariables } from './agGridVariables';\nimport { skodaAgThemeParams } from './agGridSkodaTheme';\nimport { agGridCssIcons } from './agGridIcons';\nimport { sxOverride } from '@/src/utils/sxOverride';\n\nexport const agGridStyles = (theme: Theme): CSSObject => {\n const agTheme = skodaAgThemeParams(theme);\n\n return {\n width: '100%',\n // support applying global style on all elements maxWidth: '100%'\n '*': {\n maxWidth: 'none',\n },\n // Apply CSS variables only for non-themed tables of the old versions of ag grid (old versions of ag-grid, <v33, themes does not have ag-theme-params-* class)\n '&:not(:has([class*=\"ag-theme-params-\"])),&.ag-theme-material': {\n ...agGridVariables(theme),\n },\n\n '.ag-row-last': { borderBottom: 'none' },\n '.ag-column-last .ag-header-cell-resize': { display: 'none' },\n\n // Row lines full width (not in RTL where it causes layout issues)\n ...(theme.direction === 'ltr' && {\n '.ag-center-cols-container': {\n minWidth: '100%',\n },\n }),\n\n '.ag-center-cols-viewport': {\n // reduce to 1 row from default 150px\n minHeight: '56px',\n },\n\n // # Header styles\n '& .ag-header-cell .ag-header-cell-text': {\n fontWeight: `${agTheme.headerFontWeight}`,\n },\n\n // # Header Separators (only when column resizing is not activated and not for the last column)\n '& .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden': {\n display: 'block !important', // beats AG Grid's .ag-hidden display: none !important\n cursor: 'initial',\n },\n // No separator on pinned columns - ag-column-last only marks the grid's last column, so the rule\n // above would otherwise force one onto them. The pinned section already has its own divider.\n '& .ag-pinned-left-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-pinned-right-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden':\n {\n display: 'none !important',\n },\n\n // # Horizontal Scrollbar\n // Webkit only: relies on ::-webkit-scrollbar. Firefox falls back to the baseline thin scrollbar.\n '@supports selector(::-webkit-scrollbar)': {\n '& .ag-body-horizontal-scroll': {\n alignItems: 'center',\n borderTop: '1px solid',\n borderTopColor: theme.palette.surface.secondary,\n maxHeight: 'none !important',\n height: 'auto !important',\n },\n // Tall scrollbar inset via the thumb/track border (like MuiTableContainer), so the viewport\n // keeps full width and the proxy stays in sync with the grid body. !important beats AG Grid's\n // inline height, which it pins to the ~8px scrollbar width.\n '& .ag-body-horizontal-scroll .ag-body-horizontal-scroll-viewport': {\n // 4px visible bar + 2x 22px transparent margin\n height: '48px !important',\n maxHeight: '48px !important',\n minHeight: '48px !important',\n },\n '& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar:horizontal': {\n height: '48px',\n },\n '& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:horizontal, & .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track:horizontal':\n {\n borderWidth: '22px',\n },\n // No overflow: re-collapse the viewport, otherwise our !important height keeps a tall empty band.\n '& .ag-body-horizontal-scroll.ag-invisible .ag-body-horizontal-scroll-viewport': {\n height: '0 !important',\n maxHeight: '0 !important',\n minHeight: '0 !important',\n overflow: 'hidden',\n },\n // Hide the stray scrollbar the pinned spacers render via their own overflow-x: scroll.\n '& .ag-body-horizontal-scroll .ag-horizontal-left-spacer, & .ag-body-horizontal-scroll .ag-horizontal-right-spacer':\n {\n overflow: 'hidden',\n },\n },\n\n // # Pagination styles\n '& .ag-paging-panel': {\n justifyContent: 'center',\n px: '24px',\n },\n\n // Pagination layout - rows per page centered, arrows right-aligned\n '& .ag-paging-panel .ag-paging-page-size': {\n position: 'absolute',\n },\n '& .ag-paging-panel .ag-paging-page-summary-panel': {\n marginLeft: 'auto',\n },\n\n // Disable pagination summary\n '& .ag-paging-row-summary-panel': {\n display: 'none',\n },\n\n // Text styling within pagination arrows\n '& .ag-paging-description': {\n fontSize: '18px',\n px: '18px',\n },\n '& .ag-paging-panel .ag-paging-description span': {\n color: 'text.primary',\n px: '2px',\n },\n '& .ag-paging-panel .ag-paging-description .ag-paging-number': {\n fontWeight: '700',\n },\n '& .ag-paging-panel .ag-paging-description span:last-child': {\n fontWeight: '300',\n },\n\n // Disable AG-grid pagination icons - start, end\n '& .ag-paging-panel .ag-icon-first, & .ag-paging-panel .ag-icon-last': {\n display: 'none',\n },\n\n // Pagination - rows per page\n '& .ag-paging-panel .ag-picker-field-wrapper': {\n border: 'none',\n px: '0',\n cursor: 'pointer',\n minWidth: 'auto',\n },\n '& .ag-paging-panel .ag-picker-field-display': {\n minWidth: '28px',\n width: 'auto',\n pr: '6px',\n fontSize: '18px',\n fontWeight: '700',\n textAlign: 'center',\n },\n '& .ag-paging-panel .ag-label': {\n mr: '6px',\n fontSize: '18px',\n },\n\n '& .ag-popup > *': {\n backgroundColor: 'onSurface.os0',\n cursor: 'pointer',\n borderRadius: '0px',\n },\n\n // Let the cursor reflect content (I-beam over text, default elsewhere) - AG Grid forces\n // cursor: default on the root. ag-selectable is present only when enableCellTextSelection is on.\n '& .ag-selectable .ag-cell': {\n cursor: 'auto',\n },\n\n // # Opt-in className=\"skoda-ag-pointer\"\n // Cell-level so it wins over the .ag-cell text cursor above (the cell sets its own cursor).\n '& .skoda-ag-row-pointer .ag-row:hover, & .skoda-ag-row-pointer .ag-row:hover .ag-cell': {\n cursor: 'pointer',\n },\n\n // Additional icons\n ...agGridCssIcons,\n\n // Show icons according to the SkodaFlow design\n '& .ag-icon-asc, & .ag-icon-desc': {\n color: theme.palette.onSurface.os600,\n },\n '& .ag-icon-asc:hover, & .ag-icon-desc:hover': {\n color: theme.palette.text.primary,\n },\n '& .ag-header-cell-sortable .ag-sort-indicator-container:has(.ag-sort-descending-icon.ag-hidden) .ag-hidden:has(.ag-icon-asc)':\n {\n display: 'inline-block !important', // Ag grid also uses !important so we have to override it\n },\n\n // Legacy class approach, no theme\n fontFamily: agTheme.fontFamily,\n };\n};\n\n/**\n * Pre-configured SkodaFlow AG Grid props.\n *\n * Note: the AG Grid `theme` is intentionally NOT provided here. Building the theme requires\n * imports from `ag-grid-community` (`themeQuartz`, `iconOverrides`), which we do not want to pull\n * in as a direct dependency of the library. The consuming project should build the theme with the\n * exported `skodaAgThemeParams` and `skodaAgGridIconOverrides` helpers and pass it to `AgGridReact`.\n */\nexport const useSkodaAgGridProps = () => {\n const theme = useTheme();\n\n return {\n domLayout: 'autoHeight' as const,\n animateRows: false,\n suppressDragLeaveHidesColumns: true,\n enableRtl: theme.direction === 'rtl',\n // allow selecting/copying cell text (off in AG Grid by default)\n enableCellTextSelection: true,\n };\n};\n\ninterface SkodaAgGridProviderProps extends BoxProps {}\n\n/**\n * A provider wrapper that applies Skoda AG Grid theming via sx.\n */\nexport const SkodaAgGridProvider: React.FC<SkodaAgGridProviderProps> = forwardRef(({ sx, children, ...rest }, ref) => {\n return (\n <Box\n sx={sxOverride(\n (theme) => ({\n ...agGridStyles(theme),\n }),\n sx,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Box>\n );\n});\n"],"names":["agGridStyles","theme","agTheme","skodaAgThemeParams","width","maxWidth","agGridVariables","borderBottom","display","direction","minWidth","minHeight","fontWeight","headerFontWeight","cursor","alignItems","borderTop","borderTopColor","palette","surface","secondary","maxHeight","height","borderWidth","overflow","justifyContent","px","position","marginLeft","fontSize","color","border","pr","textAlign","mr","backgroundColor","borderRadius","agGridCssIcons","onSurface","os600","text","primary","fontFamily","useSkodaAgGridProps","domLayout","animateRows","suppressDragLeaveHidesColumns","enableRtl","useTheme","enableCellTextSelection","SkodaAgGridProvider","forwardRef","sx","children","rest","ref","_jsx","Box","sxOverride"],"mappings":"mWAOO,MAAMA,EAAgBC,IAC3B,MAAMC,EAAUC,EAAmBF,GAEnC,MAAO,CACLG,MAAO,OAEP,IAAK,CACHC,SAAU,QAGZ,+DAAgE,IAC3DC,EAAgBL,IAGrB,eAAgB,CAAEM,aAAc,QAChC,yCAA0C,CAAEC,QAAS,WAG7B,QAApBP,EAAMQ,WAAuB,CAC/B,4BAA6B,CAC3BC,SAAU,SAId,2BAA4B,CAE1BC,UAAW,QAIb,yCAA0C,CACxCC,WAAY,GAAGV,EAAQW,oBAIzB,4EAA6E,CAC3EL,QAAS,mBACTM,OAAQ,WAIV,sMACE,CACEN,QAAS,mBAKb,0CAA2C,CACzC,+BAAgC,CAC9BO,WAAY,SACZC,UAAW,YACXC,eAAgBhB,EAAMiB,QAAQC,QAAQC,UACtCC,UAAW,kBACXC,OAAQ,mBAKV,mEAAoE,CAElEA,OAAQ,kBACRD,UAAW,kBACXV,UAAW,mBAEb,sEAAuE,CACrEW,OAAQ,QAEV,uJACE,CACEC,YAAa,QAGjB,gFAAiF,CAC/ED,OAAQ,eACRD,UAAW,eACXV,UAAW,eACXa,SAAU,UAGZ,oHACE,CACEA,SAAU,WAKhB,qBAAsB,CACpBC,eAAgB,SAChBC,GAAI,QAIN,0CAA2C,CACzCC,SAAU,YAEZ,mDAAoD,CAClDC,WAAY,QAId,iCAAkC,CAChCpB,QAAS,QAIX,2BAA4B,CAC1BqB,SAAU,OACVH,GAAI,QAEN,iDAAkD,CAChDI,MAAO,eACPJ,GAAI,OAEN,8DAA+D,CAC7Dd,WAAY,OAEd,4DAA6D,CAC3DA,WAAY,OAId,sEAAuE,CACrEJ,QAAS,QAIX,8CAA+C,CAC7CuB,OAAQ,OACRL,GAAI,IACJZ,OAAQ,UACRJ,SAAU,QAEZ,8CAA+C,CAC7CA,SAAU,OACVN,MAAO,OACP4B,GAAI,MACJH,SAAU,OACVjB,WAAY,MACZqB,UAAW,UAEb,+BAAgC,CAC9BC,GAAI,MACJL,SAAU,QAGZ,kBAAmB,CACjBM,gBAAiB,gBACjBrB,OAAQ,UACRsB,aAAc,OAKhB,4BAA6B,CAC3BtB,OAAQ,QAKV,wFAAyF,CACvFA,OAAQ,cAIPuB,EAGH,kCAAmC,CACjCP,MAAO7B,EAAMiB,QAAQoB,UAAUC,OAEjC,8CAA+C,CAC7CT,MAAO7B,EAAMiB,QAAQsB,KAAKC,SAE5B,+HACE,CACEjC,QAAS,2BAIbkC,WAAYxC,EAAQwC,aAYXC,EAAsB,KAG1B,CACLC,UAAW,aACXC,aAAa,EACbC,+BAA+B,EAC/BC,UAA+B,QANnBC,IAMKvC,UAEjBwC,yBAAyB,IAShBC,EAA0DC,EAAW,EAAGC,KAAIC,cAAaC,GAAQC,IAE1GC,EAACC,EAAG,CACFL,GAAIM,EACDzD,IAAK,IACDD,EAAaC,KAElBmD,GAEFG,IAAKA,KACDD,EAAID,SAEPA"}
1
+ {"version":3,"file":"agGrid.js","sources":["../../../src/components/advancedTable/agGrid.tsx"],"sourcesContent":["import { Box, BoxProps, CSSObject, Theme, useTheme } from '@mui/material';\nimport React, { forwardRef } from 'react';\nimport { agGridVariables } from './agGridVariables';\nimport { skodaAgThemeParams } from './agGridSkodaTheme';\nimport { agGridCssIcons } from './agGridIcons';\nimport { sxOverride } from '@/src/utils/sxOverride';\nimport { getInteractiveStyle } from '@/src/materialui/button/interactive';\nimport { getFocusRingStyle } from '@/src/components/focusring/focusring';\n\nexport const agGridStyles = (theme: Theme): CSSObject => {\n const agTheme = skodaAgThemeParams(theme);\n\n return {\n width: '100%',\n // support applying global style on all elements maxWidth: '100%'\n '*': {\n maxWidth: 'none',\n },\n // Apply CSS variables only for non-themed tables of the old versions of ag grid (old versions of ag-grid, <v33, themes does not have ag-theme-params-* class)\n '&:not(:has([class*=\"ag-theme-params-\"])),&.ag-theme-material': {\n ...agGridVariables(theme),\n },\n\n '.ag-row-last': { borderBottom: 'none' },\n // support for AgGrid v36+\n '.ag-row-last > .ag-grid-pinned-left-cells, .ag-row-last > .ag-grid-scrolling-cells, .ag-row-last > .ag-grid-pinned-right-cells':\n {\n borderBottom: 'none',\n },\n '.ag-column-last .ag-header-cell-resize': { display: 'none' },\n\n // Row lines full width (not in RTL where it causes layout issues)\n ...(theme.direction === 'ltr' && {\n '.ag-center-cols-container': {\n minWidth: '100%',\n },\n // v36: the separator needs to be set also on pseudo-element to cover the rest of the width\n '.ag-row:not(.ag-full-width-row, .ag-row-last)::after': {\n borderBottom: 'var(--ag-row-border)',\n },\n }),\n\n // makes selected and hover cell full width, by also using :after element and not just :before\n '.ag-row-selected:not(.ag-full-width-row)::after': {\n backgroundColor: 'var(--ag-selected-row-background-color)',\n backgroundClip: 'padding-box',\n },\n '.ag-row-hover:not(.ag-full-width-row)::after': {\n backgroundColor: 'var(--ag-row-hover-color)',\n backgroundClip: 'padding-box',\n },\n\n '.ag-center-cols-viewport': {\n // up to v35 only - v36 moved this minimum onto autoHeightMinBodyHeight theme parameter\n minHeight: `${agTheme.autoHeightMinBodyHeight}px`,\n },\n\n // # Header styles\n '& .ag-header-cell .ag-header-cell-text': {\n fontWeight: `${agTheme.headerFontWeight}`,\n },\n\n // # Header Separators (only when column resizing is not activated and not for the last column)\n '& .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden': {\n display: 'block !important', // beats AG Grid's .ag-hidden display: none !important\n cursor: 'initial',\n },\n // No separator on pinned columns - ag-column-last only marks the grid's last column, so the rule\n // above would otherwise force one onto them. The pinned section already has its own divider.\n // up to v35: .ag-pinned-*-header, .ag-grid-pinned-*-cells from v36.\n '& .ag-pinned-left-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-pinned-right-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-header .ag-grid-pinned-left-cells .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-header .ag-grid-pinned-right-cells .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden':\n {\n display: 'none !important',\n },\n\n // # Horizontal Scrollbar\n // Webkit only: relies on ::-webkit-scrollbar. Firefox falls back to the baseline thin scrollbar.\n '@supports selector(::-webkit-scrollbar)': {\n '& .ag-body-horizontal-scroll': {\n alignItems: 'center',\n borderTop: '1px solid',\n borderTopColor: theme.palette.surface.secondary,\n maxHeight: 'none !important',\n height: 'auto !important',\n },\n // overlay scrollbar platforms (Android): keep the collapsed proxy in the layout,\n // our styled scrollbar renders there anyway\n '& .ag-body-horizontal-scroll.ag-scrollbar-invisible': {\n position: 'static',\n opacity: '1',\n },\n // Tall scrollbar inset via the thumb/track border (like MuiTableContainer), so the viewport\n // keeps full width and the proxy stays in sync with the grid body. !important beats AG Grid's\n // inline height, which it pins to the ~8px scrollbar width.\n '& .ag-body-horizontal-scroll .ag-body-horizontal-scroll-viewport': {\n // 4px visible bar + 2x 22px transparent margin\n height: '48px !important',\n maxHeight: '48px !important',\n minHeight: '48px !important',\n },\n '& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar:horizontal': {\n height: '48px',\n },\n '& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:horizontal, & .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track:horizontal':\n {\n borderWidth: '22px',\n },\n // No overflow: the separator above the scrollbar has nothing to separate\n '& .ag-body-horizontal-scroll.ag-invisible': {\n borderTop: 'none',\n },\n // No overflow: re-collapse the viewport, otherwise our !important height keeps a tall empty band.\n '& .ag-body-horizontal-scroll.ag-invisible .ag-body-horizontal-scroll-viewport': {\n height: '0 !important',\n maxHeight: '0 !important',\n minHeight: '0 !important',\n overflow: 'hidden',\n },\n // Hide the stray scrollbar the pinned spacers render via their own overflow-x: scroll.\n // v36: replaced the two pinned spacers with a single end spacer.\n '& .ag-body-horizontal-scroll .ag-horizontal-left-spacer, & .ag-body-horizontal-scroll .ag-horizontal-right-spacer, & .ag-body-horizontal-scroll .ag-body-horizontal-scroll-end-spacer':\n {\n overflow: 'hidden',\n },\n },\n\n // # Pagination styles\n '& .ag-paging-panel': {\n // v36 pins paginationPanelHeight here as a fixed height, which stops the toolbar from\n // wrapping onto a second row. The parameter drives min-height on the toolbar instead.\n height: 'auto',\n },\n\n '& .ag-paging-panel .ag-paging-panel-content': {\n position: 'relative',\n justifyContent: 'center',\n width: '100%',\n gap: '16px',\n [theme.breakpoints.up('md')]: {\n minHeight: 'var(--ag-pagination-panel-height)',\n padding: '4px 24px',\n },\n [theme.breakpoints.down('md')]: {\n flexWrap: 'wrap',\n minHeight: '0',\n padding: '8px 16px',\n },\n },\n\n // stands in for MuiTablePagination-spacer, it takes the free space on the left so that rows\n // per page stays on the right for as long as it fits.\n '& .ag-paging-panel .ag-paging-panel-content::before, & .ag-paging-panel:not(:has(.ag-paging-panel-content))::before':\n {\n content: '\"\"',\n flexGrow: '1',\n flexBasis: 'auto',\n },\n\n '& .ag-paging-panel .ag-paging-page-summary-panel': {\n m: '0',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n flexGrow: '1',\n gap: '0',\n [theme.breakpoints.down('md')]: {\n flexBasis: '100%',\n justifyContent: 'center',\n },\n },\n\n // Disable pagination summary\n '& .ag-paging-row-summary-panel': {\n display: 'none',\n },\n\n // Page indicator between the arrows, mirrors MuiTablePagination-displayedRows\n '& .ag-paging-panel .ag-paging-description': {\n ...theme.typography.body,\n // it keeps the arrows from jumping while the page number is\n // short, and lets the indicator push them apart once it outgrows it.\n minWidth: '82px',\n height: '44px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n whiteSpace: 'nowrap',\n mx: '4px',\n p: '0',\n color: theme.palette.mode === 'dark' ? theme.palette.onSurface.os300 : theme.palette.onSurface.os700,\n },\n // current page, the equivalent of the <strong> in displayedRows\n '& .ag-paging-panel .ag-paging-description .ag-paging-number': {\n color: 'text.primary',\n fontWeight: '700',\n },\n // v36 renders the pagination current page as a number input\n // make it look like the plain number\n '& .ag-paging-panel .ag-paging-description .ag-number-field-input': {\n border: 'none',\n p: '0',\n height: 'auto',\n textAlign: 'center',\n fontWeight: '700',\n // AG Grid sizes the input by JS to inline style, always 2.5ch wider than the number, to\n // leave room for the spinner we hide. Half of that spare width on each side is taken back\n // here, so the number\n mx: '-1.25ch',\n // the box still reaches over the divider, so it must not paint anything of its own\n background: 'transparent',\n '&:focus': {\n boxShadow: 'none',\n },\n },\n\n // the 'Page' prefix and the ' / ' divider around the numbers\n // AG Grid gives them no class, only ids ending in -start-page and -of-page\n '& .ag-paging-panel .ag-paging-description [id$=\"-of-page\"]:not(:empty)': {\n fontWeight: '400',\n m: '0 4px',\n },\n\n '& .ag-paging-panel .ag-paging-description [id$=\"-start-page\"]:not(:empty)': {\n mr: '4px',\n },\n\n // total page count stays muted\n '& .ag-paging-panel .ag-paging-description span:last-child': {\n color: 'inherit',\n fontWeight: '300',\n },\n\n // the arrows are plain divs by default, so they get the IconButton look through CSS\n // not shared, but copied on purpose\n '& .ag-paging-panel .ag-paging-button': {\n position: 'relative',\n boxShadow: 'none',\n outline: 'none',\n width: '44px',\n height: '44px',\n borderRadius: '1000px',\n maxWidth: 'none',\n transition: 'all 0.3s ease-out',\n flexShrink: '0',\n '&:hover': {\n boxShadow: 'none',\n },\n '&&:active': {\n boxShadow: 'none',\n },\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n },\n undefined,\n undefined,\n ':focus-visible:not(.ag-disabled)',\n ),\n ...getFocusRingStyle(theme, true, 0, ':focus-visible:not(.ag-disabled)'),\n // disabled style\n '&.ag-disabled': {\n opacity: '1',\n color: theme.palette.disabled.primary,\n pointerEvents: 'none',\n },\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n // scoped to the arrows so the rest of the grid keeps the iconSize theme parameter\n '--ag-icon-size': '20px',\n // by default, disable first and last icon (jump to first & last page)\n '&:first-of-type, &:last-of-type': {\n display: 'none',\n },\n },\n\n // Pagination - rows per page\n '& .ag-paging-panel .ag-picker-field-wrapper': {\n border: 'none',\n px: '0',\n cursor: 'pointer',\n minWidth: 'auto',\n borderRadius: '4px',\n },\n\n '& .ag-paging-panel .ag-picker-field-display': {\n fontSize: '16px',\n fontWeight: 700,\n pl: '4px',\n },\n\n // rows per page chevron icon indention\n '& .ag-paging-panel .ag-picker-field-icon': {\n ml: '8px',\n mr: '12px',\n },\n\n '& .ag-paging-panel .ag-label': {\n ...theme.typography.body,\n // the label and the value are one element here, this stands in for the toolbar gap that\n // separates MuiTablePagination-selectLabel from its input\n mr: '16px',\n },\n\n '& .ag-popup > *': {\n backgroundColor: 'onSurface.os0',\n cursor: 'pointer',\n borderRadius: '0px',\n },\n\n // rows per page dropdown, laid out like the MUI Select menu\n '& .ag-popup .ag-select-list': {\n border: 'none',\n p: '0',\n boxShadow: '0px 2px 25px 0px rgba(0, 0, 0, 0.15)',\n '--ag-list-item-height': '48px',\n },\n\n '& .ag-popup .ag-select-list .ag-list-item-text': {\n overflow: 'visible',\n textOverflow: 'clip',\n },\n '& .ag-popup .ag-select-list .ag-list-item': {\n // proportions, the height itself comes from listItemHeight\n p: '12px',\n cursor: 'pointer',\n color: theme.palette.text.primary,\n fontSize: '16px',\n lineHeight: '24px',\n fontWeight: '400',\n // 1 line ellipsis\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n // AG Grid marks the keyboard highlighted option with .ag-active-item, that is the closest\n // thing it has to the Mui-focusVisible state MuiMenuItem draws the same way as hover\n ...getInteractiveStyle(\n {\n backgroundColor:\n theme.palette.mode === 'dark' ? theme.palette.onSurface.os800 : theme.palette.background.primary,\n },\n { backgroundColor: theme.palette.surface.primary },\n { backgroundColor: theme.palette.surface.secondary },\n undefined,\n '.ag-active-item',\n ),\n },\n\n // Let the cursor reflect content (I-beam over text, default elsewhere) - AG Grid forces\n // cursor: default on the root. ag-selectable is present only when enableCellTextSelection is on.\n '& .ag-selectable .ag-cell': {\n cursor: 'auto',\n },\n\n // # Opt-in className=\"skoda-ag-pointer\"\n // Cell-level so it wins over the .ag-cell text cursor above (the cell sets its own cursor).\n '& .skoda-ag-row-pointer .ag-row:hover, & .skoda-ag-row-pointer .ag-row:hover .ag-cell': {\n cursor: 'pointer',\n },\n\n // # Rows with wrapText cells\n // line height must be set on the row, padding keeps the 56px single line row (24 + 30 + 2)\n '& .ag-row:has(.ag-cell-wrap-text)': {\n '--ag-line-height': '24px',\n '& .ag-cell': {\n py: '15px',\n },\n },\n\n // Additional icons\n ...agGridCssIcons,\n\n // Show icons according to the SkodaFlow design\n '& .ag-icon-asc, & .ag-icon-desc': {\n color: theme.palette.onSurface.os600,\n },\n '& .ag-icon-asc:hover, & .ag-icon-desc:hover': {\n color: theme.palette.text.primary,\n },\n '& .ag-header-cell-sortable .ag-sort-indicator-container:has(.ag-sort-descending-icon.ag-hidden) .ag-hidden:has(.ag-icon-asc)':\n {\n display: 'inline-block !important', // Ag grid also uses !important so we have to override it\n },\n\n // Legacy class approach, no theme\n fontFamily: agTheme.fontFamily,\n };\n};\n\n/**\n * Pre-configured SkodaFlow AG Grid props.\n *\n * Note: the AG Grid `theme` is intentionally NOT provided here. Building the theme requires\n * imports from `ag-grid-community` (`themeQuartz`, `iconOverrides`), which we do not want to pull\n * in as a direct dependency of the library. The consuming project should build the theme with the\n * exported `skodaAgThemeParams` and `skodaAgGridIconOverrides` helpers and pass it to `AgGridReact`.\n */\nexport const useSkodaAgGridProps = () => {\n const theme = useTheme();\n\n return {\n domLayout: 'autoHeight' as const,\n animateRows: false,\n suppressDragLeaveHidesColumns: true,\n enableRtl: theme.direction === 'rtl',\n // allow selecting/copying cell text (off in AG Grid by default)\n enableCellTextSelection: true,\n };\n};\n\ninterface SkodaAgGridProviderProps extends BoxProps {}\n\n/**\n * A provider wrapper that applies Skoda AG Grid theming via sx.\n */\nexport const SkodaAgGridProvider: React.FC<SkodaAgGridProviderProps> = forwardRef(({ sx, children, ...rest }, ref) => {\n return (\n <Box\n sx={sxOverride(\n (theme) => ({\n ...agGridStyles(theme),\n }),\n sx,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Box>\n );\n});\n"],"names":["agGridStyles","theme","agTheme","skodaAgThemeParams","width","maxWidth","agGridVariables","borderBottom","display","direction","minWidth","backgroundColor","backgroundClip","minHeight","autoHeightMinBodyHeight","fontWeight","headerFontWeight","cursor","alignItems","borderTop","borderTopColor","palette","surface","secondary","maxHeight","height","position","opacity","borderWidth","overflow","justifyContent","gap","breakpoints","up","padding","down","flexWrap","content","flexGrow","flexBasis","m","typography","body","whiteSpace","mx","p","color","mode","onSurface","os300","os700","border","textAlign","background","boxShadow","mr","outline","borderRadius","transition","flexShrink","getInteractiveStyle","transparent","undefined","getFocusRingStyle","disabled","primary","pointerEvents","px","fontSize","pl","ml","textOverflow","text","lineHeight","os800","py","agGridCssIcons","os600","fontFamily","useSkodaAgGridProps","domLayout","animateRows","suppressDragLeaveHidesColumns","enableRtl","useTheme","enableCellTextSelection","SkodaAgGridProvider","forwardRef","sx","children","rest","ref","_jsx","Box","sxOverride"],"mappings":"8eASO,MAAMA,EAAgBC,IAC3B,MAAMC,EAAUC,EAAmBF,GAEnC,MAAO,CACLG,MAAO,OAEP,IAAK,CACHC,SAAU,QAGZ,+DAAgE,IAC3DC,EAAgBL,IAGrB,eAAgB,CAAEM,aAAc,QAEhC,iIACE,CACEA,aAAc,QAElB,yCAA0C,CAAEC,QAAS,WAG7B,QAApBP,EAAMQ,WAAuB,CAC/B,4BAA6B,CAC3BC,SAAU,QAGZ,uDAAwD,CACtDH,aAAc,yBAKlB,kDAAmD,CACjDI,gBAAiB,0CACjBC,eAAgB,eAElB,+CAAgD,CAC9CD,gBAAiB,4BACjBC,eAAgB,eAGlB,2BAA4B,CAE1BC,UAAW,GAAGX,EAAQY,6BAIxB,yCAA0C,CACxCC,WAAY,GAAGb,EAAQc,oBAIzB,4EAA6E,CAC3ER,QAAS,mBACTS,OAAQ,WAKV,yaACE,CACET,QAAS,mBAKb,0CAA2C,CACzC,+BAAgC,CAC9BU,WAAY,SACZC,UAAW,YACXC,eAAgBnB,EAAMoB,QAAQC,QAAQC,UACtCC,UAAW,kBACXC,OAAQ,mBAIV,sDAAuD,CACrDC,SAAU,SACVC,QAAS,KAKX,mEAAoE,CAElEF,OAAQ,kBACRD,UAAW,kBACXX,UAAW,mBAEb,sEAAuE,CACrEY,OAAQ,QAEV,uJACE,CACEG,YAAa,QAGjB,4CAA6C,CAC3CT,UAAW,QAGb,gFAAiF,CAC/EM,OAAQ,eACRD,UAAW,eACXX,UAAW,eACXgB,SAAU,UAIZ,wLACE,CACEA,SAAU,WAKhB,qBAAsB,CAGpBJ,OAAQ,QAGV,8CAA+C,CAC7CC,SAAU,WACVI,eAAgB,SAChB1B,MAAO,OACP2B,IAAK,OACL,CAAC9B,EAAM+B,YAAYC,GAAG,OAAQ,CAC5BpB,UAAW,oCACXqB,QAAS,YAEX,CAACjC,EAAM+B,YAAYG,KAAK,OAAQ,CAC9BC,SAAU,OACVvB,UAAW,IACXqB,QAAS,aAMb,sHACE,CACEG,QAAS,KACTC,SAAU,IACVC,UAAW,QAGf,mDAAoD,CAClDC,EAAG,IACHhC,QAAS,OACTU,WAAY,SACZY,eAAgB,WAChBQ,SAAU,IACVP,IAAK,IACL,CAAC9B,EAAM+B,YAAYG,KAAK,OAAQ,CAC9BI,UAAW,OACXT,eAAgB,WAKpB,iCAAkC,CAChCtB,QAAS,QAIX,4CAA6C,IACxCP,EAAMwC,WAAWC,KAGpBhC,SAAU,OACVe,OAAQ,OACRjB,QAAS,OACTU,WAAY,SACZY,eAAgB,SAChBa,WAAY,SACZC,GAAI,MACJC,EAAG,IACHC,MAA8B,SAAvB7C,EAAMoB,QAAQ0B,KAAkB9C,EAAMoB,QAAQ2B,UAAUC,MAAQhD,EAAMoB,QAAQ2B,UAAUE,OAGjG,8DAA+D,CAC7DJ,MAAO,eACP/B,WAAY,OAId,mEAAoE,CAClEoC,OAAQ,OACRN,EAAG,IACHpB,OAAQ,OACR2B,UAAW,SACXrC,WAAY,MAIZ6B,GAAI,UAEJS,WAAY,cACZ,UAAW,CACTC,UAAW,SAMf,yEAA0E,CACxEvC,WAAY,MACZyB,EAAG,SAGL,4EAA6E,CAC3Ee,GAAI,OAIN,4DAA6D,CAC3DT,MAAO,UACP/B,WAAY,OAKd,uCAAwC,CACtCW,SAAU,WACV4B,UAAW,OACXE,QAAS,OACTpD,MAAO,OACPqB,OAAQ,OACRgC,aAAc,SACdpD,SAAU,OACVqD,WAAY,oBACZC,WAAY,IACZ,UAAW,CACTL,UAAW,QAEb,YAAa,CACXA,UAAW,WAEVM,EACD,CACEjD,gBAAiB,eAEnB,CACEA,gBAAiBV,EAAMoB,QAAQwC,YAAYtC,gBAE7CuC,OACAA,EACA,uCAECC,EAAkB9D,GAAO,EAAM,EAAG,oCAErC,gBAAiB,CACf0B,QAAS,IACTmB,MAAO7C,EAAMoB,QAAQ2C,SAASC,QAC9BC,cAAe,QAEjB1D,QAAS,OACTU,WAAY,SACZY,eAAgB,SAEhB,iBAAkB,OAElB,kCAAmC,CACjCtB,QAAS,SAKb,8CAA+C,CAC7C2C,OAAQ,OACRgB,GAAI,IACJlD,OAAQ,UACRP,SAAU,OACV+C,aAAc,OAGhB,8CAA+C,CAC7CW,SAAU,OACVrD,WAAY,IACZsD,GAAI,OAIN,2CAA4C,CAC1CC,GAAI,MACJf,GAAI,QAGN,+BAAgC,IAC3BtD,EAAMwC,WAAWC,KAGpBa,GAAI,QAGN,kBAAmB,CACjB5C,gBAAiB,gBACjBM,OAAQ,UACRwC,aAAc,OAIhB,8BAA+B,CAC7BN,OAAQ,OACRN,EAAG,IACHS,UAAW,uCACX,wBAAyB,QAG3B,iDAAkD,CAChDzB,SAAU,UACV0C,aAAc,QAEhB,4CAA6C,CAE3C1B,EAAG,OACH5B,OAAQ,UACR6B,MAAO7C,EAAMoB,QAAQmD,KAAKP,QAC1BG,SAAU,OACVK,WAAY,OACZ1D,WAAY,MAEZ4B,WAAY,SACZ4B,aAAc,WACd1C,SAAU,YAGP+B,EACD,CACEjD,gBACyB,SAAvBV,EAAMoB,QAAQ0B,KAAkB9C,EAAMoB,QAAQ2B,UAAU0B,MAAQzE,EAAMoB,QAAQgC,WAAWY,SAE7F,CAAEtD,gBAAiBV,EAAMoB,QAAQC,QAAQ2C,SACzC,CAAEtD,gBAAiBV,EAAMoB,QAAQC,QAAQC,gBACzCuC,EACA,oBAMJ,4BAA6B,CAC3B7C,OAAQ,QAKV,wFAAyF,CACvFA,OAAQ,WAKV,oCAAqC,CACnC,mBAAoB,OACpB,aAAc,CACZ0D,GAAI,YAKLC,EAGH,kCAAmC,CACjC9B,MAAO7C,EAAMoB,QAAQ2B,UAAU6B,OAEjC,8CAA+C,CAC7C/B,MAAO7C,EAAMoB,QAAQmD,KAAKP,SAE5B,+HACE,CACEzD,QAAS,2BAIbsE,WAAY5E,EAAQ4E,aAYXC,EAAsB,KAG1B,CACLC,UAAW,aACXC,aAAa,EACbC,+BAA+B,EAC/BC,UAA+B,QANnBC,IAMK3E,UAEjB4E,yBAAyB,IAShBC,EAA0DC,EAAW,EAAGC,KAAIC,cAAaC,GAAQC,IAE1GC,EAACC,EAAG,CACFL,GAAIM,EACD7F,IAAK,IACDD,EAAaC,KAElBuF,GAEFG,IAAKA,KACDD,EAAID,SAEPA"}
@@ -4,6 +4,7 @@ export declare const skodaAgThemeParams: (theme: Theme) => {
4
4
  fontFamily: string;
5
5
  fontSize: number;
6
6
  iconSize: number;
7
+ fontWeight: string;
7
8
  backgroundColor: string;
8
9
  foregroundColor: string;
9
10
  dataColor: string;
@@ -19,10 +20,12 @@ export declare const skodaAgThemeParams: (theme: Theme) => {
19
20
  oddRowBackgroundColor: string;
20
21
  rowBorderColor: string;
21
22
  selectedRowBackgroundColor: string;
23
+ focusShadow: string;
22
24
  headerFontSize: number;
23
25
  headerFontWeight: number;
24
26
  headerHeight: number;
25
27
  rowHeight: number;
28
+ autoHeightMinBodyHeight: number;
26
29
  paginationPanelHeight: number;
27
30
  cellHorizontalPadding: number;
28
31
  cellVerticalPadding: number;
@@ -1,2 +1,2 @@
1
- import{getFontFamily as e}from"../../materialui/typography/typography.theme.js";const r=r=>({fontFamily:e("rtl"===r.direction),fontSize:14,iconSize:17,backgroundColor:"transparent",foregroundColor:r.palette.text.primary,dataColor:r.palette.text.primary,headerForegroundColor:r.palette.text.primary,headerBackgroundColor:"transparent",subHeaderBackgroundColor:"transparent",subHeaderToolbarBackgroundColor:"transparent",secondaryForegroundColor:r.palette.onSurface.os500,disabledForegroundColor:r.palette.disabled.tertiary,checkboxCheckedColor:r.palette.brand.primary,checkboxIndeterminateColor:r.palette.brand.primary,rowHoverColor:r.palette.surface.primary,oddRowBackgroundColor:"transparent",rowBorderColor:r.palette.surface.secondary,selectedRowBackgroundColor:r.palette.surface.primary,headerFontSize:14,headerFontWeight:700,headerHeight:54,rowHeight:56,paginationPanelHeight:70,cellHorizontalPadding:16,cellVerticalPadding:4,rowVerticalPaddingScale:.04,borderRadius:8,headerColumnSeparatorColor:r.palette.surface.secondary,headerColumnResizeHandleColor:r.palette.surface.secondary,headerColumnSeparatorDisplay:"block",headerColumnResizeHandleDisplay:"block"});export{r as skodaAgThemeParams};
1
+ import{getFontFamily as e}from"../../materialui/typography/typography.theme.js";import{getFocusRingBoxShadow as r}from"../focusring/focusring.js";const o=o=>({fontFamily:e("rtl"===o.direction),fontSize:14,iconSize:17,fontWeight:"inherit",backgroundColor:o.palette.background.primary,foregroundColor:o.palette.text.primary,dataColor:o.palette.text.primary,headerForegroundColor:o.palette.text.primary,headerBackgroundColor:"transparent",subHeaderBackgroundColor:"transparent",subHeaderToolbarBackgroundColor:"transparent",secondaryForegroundColor:o.palette.onSurface.os500,disabledForegroundColor:o.palette.disabled.tertiary,checkboxCheckedColor:o.palette.brand.primary,checkboxIndeterminateColor:o.palette.brand.primary,rowHoverColor:o.palette.surface.primary,oddRowBackgroundColor:"transparent",rowBorderColor:o.palette.surface.secondary,selectedRowBackgroundColor:o.palette.surface.primary,focusShadow:r(o),headerFontSize:14,headerFontWeight:700,headerHeight:54,rowHeight:56,autoHeightMinBodyHeight:56,paginationPanelHeight:80,cellHorizontalPadding:16,cellVerticalPadding:4,rowVerticalPaddingScale:.04,borderRadius:8,headerColumnSeparatorColor:o.palette.surface.secondary,headerColumnResizeHandleColor:o.palette.surface.secondary,headerColumnSeparatorDisplay:"block",headerColumnResizeHandleDisplay:"block"});export{o as skodaAgThemeParams};
2
2
  //# sourceMappingURL=agGridSkodaTheme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agGridSkodaTheme.js","sources":["../../../src/components/advancedTable/agGridSkodaTheme.ts"],"sourcesContent":["import { Theme } from '@mui/material';\nimport { getFontFamily } from '@/src/materialui/typography/typography.theme';\n\n/** AG Grid Theme parameters (replaces variables since AG Grid v32) */\nexport const skodaAgThemeParams = (theme: Theme) => ({\n // typography\n fontFamily: getFontFamily(theme.direction === 'rtl'),\n fontSize: 14,\n iconSize: 17,\n\n // colors\n backgroundColor: 'transparent',\n foregroundColor: theme.palette.text.primary,\n dataColor: theme.palette.text.primary,\n headerForegroundColor: theme.palette.text.primary,\n headerBackgroundColor: 'transparent',\n subHeaderBackgroundColor: 'transparent',\n subHeaderToolbarBackgroundColor: 'transparent',\n secondaryForegroundColor: theme.palette.onSurface.os500,\n disabledForegroundColor: theme.palette.disabled.tertiary,\n checkboxCheckedColor: theme.palette.brand.primary,\n checkboxIndeterminateColor: theme.palette.brand.primary,\n\n // rows / hover / borders\n rowHoverColor: theme.palette.surface.primary,\n oddRowBackgroundColor: 'transparent',\n rowBorderColor: theme.palette.surface.secondary,\n selectedRowBackgroundColor: theme.palette.surface.primary,\n\n // sizing / spacing\n headerFontSize: 14,\n headerFontWeight: 700,\n headerHeight: 54,\n rowHeight: 56,\n paginationPanelHeight: 70,\n cellHorizontalPadding: 16,\n cellVerticalPadding: 4,\n rowVerticalPaddingScale: 0.04,\n borderRadius: 8,\n\n // header separators\n headerColumnSeparatorColor: theme.palette.surface.secondary,\n headerColumnResizeHandleColor: theme.palette.surface.secondary,\n headerColumnSeparatorDisplay: 'block',\n headerColumnResizeHandleDisplay: 'block',\n});\n"],"names":["skodaAgThemeParams","theme","fontFamily","getFontFamily","direction","fontSize","iconSize","backgroundColor","foregroundColor","palette","text","primary","dataColor","headerForegroundColor","headerBackgroundColor","subHeaderBackgroundColor","subHeaderToolbarBackgroundColor","secondaryForegroundColor","onSurface","os500","disabledForegroundColor","disabled","tertiary","checkboxCheckedColor","brand","checkboxIndeterminateColor","rowHoverColor","surface","oddRowBackgroundColor","rowBorderColor","secondary","selectedRowBackgroundColor","headerFontSize","headerFontWeight","headerHeight","rowHeight","paginationPanelHeight","cellHorizontalPadding","cellVerticalPadding","rowVerticalPaddingScale","borderRadius","headerColumnSeparatorColor","headerColumnResizeHandleColor","headerColumnSeparatorDisplay","headerColumnResizeHandleDisplay"],"mappings":"sFAIaA,EAAsBC,IAAY,CAE7CC,WAAYC,EAAkC,QAApBF,EAAMG,WAChCC,SAAU,GACVC,SAAU,GAGVC,gBAAiB,cACjBC,gBAAiBP,EAAMQ,QAAQC,KAAKC,QACpCC,UAAWX,EAAMQ,QAAQC,KAAKC,QAC9BE,sBAAuBZ,EAAMQ,QAAQC,KAAKC,QAC1CG,sBAAuB,cACvBC,yBAA0B,cAC1BC,gCAAiC,cACjCC,yBAA0BhB,EAAMQ,QAAQS,UAAUC,MAClDC,wBAAyBnB,EAAMQ,QAAQY,SAASC,SAChDC,qBAAsBtB,EAAMQ,QAAQe,MAAMb,QAC1Cc,2BAA4BxB,EAAMQ,QAAQe,MAAMb,QAGhDe,cAAezB,EAAMQ,QAAQkB,QAAQhB,QACrCiB,sBAAuB,cACvBC,eAAgB5B,EAAMQ,QAAQkB,QAAQG,UACtCC,2BAA4B9B,EAAMQ,QAAQkB,QAAQhB,QAGlDqB,eAAgB,GAChBC,iBAAkB,IAClBC,aAAc,GACdC,UAAW,GACXC,sBAAuB,GACvBC,sBAAuB,GACvBC,oBAAqB,EACrBC,wBAAyB,IACzBC,aAAc,EAGdC,2BAA4BxC,EAAMQ,QAAQkB,QAAQG,UAClDY,8BAA+BzC,EAAMQ,QAAQkB,QAAQG,UACrDa,6BAA8B,QAC9BC,gCAAiC"}
1
+ {"version":3,"file":"agGridSkodaTheme.js","sources":["../../../src/components/advancedTable/agGridSkodaTheme.ts"],"sourcesContent":["import { Theme } from '@mui/material';\nimport { getFontFamily } from '@/src/materialui/typography/typography.theme';\nimport { getFocusRingBoxShadow } from '@/src/components/focusring/focusring';\n\n/** AG Grid Theme parameters (replaces variables since AG Grid v32) */\nexport const skodaAgThemeParams = (theme: Theme) => ({\n // typography\n fontFamily: getFontFamily(theme.direction === 'rtl'),\n fontSize: 14,\n iconSize: 17,\n fontWeight: 'inherit',\n\n // colors\n backgroundColor: theme.palette.background.primary,\n foregroundColor: theme.palette.text.primary,\n dataColor: theme.palette.text.primary,\n headerForegroundColor: theme.palette.text.primary,\n headerBackgroundColor: 'transparent',\n subHeaderBackgroundColor: 'transparent',\n subHeaderToolbarBackgroundColor: 'transparent',\n secondaryForegroundColor: theme.palette.onSurface.os500,\n disabledForegroundColor: theme.palette.disabled.tertiary,\n checkboxCheckedColor: theme.palette.brand.primary,\n checkboxIndeterminateColor: theme.palette.brand.primary,\n\n // rows / hover / borders\n rowHoverColor: theme.palette.surface.primary,\n oddRowBackgroundColor: 'transparent',\n rowBorderColor: theme.palette.surface.secondary,\n selectedRowBackgroundColor: theme.palette.surface.primary,\n\n // shadows\n focusShadow: getFocusRingBoxShadow(theme),\n\n // sizing / spacing\n headerFontSize: 14,\n headerFontWeight: 700,\n headerHeight: 54,\n rowHeight: 56,\n autoHeightMinBodyHeight: 56,\n paginationPanelHeight: 80,\n cellHorizontalPadding: 16,\n cellVerticalPadding: 4,\n rowVerticalPaddingScale: 0.04,\n\n // radius\n borderRadius: 8,\n\n // header separators\n headerColumnSeparatorColor: theme.palette.surface.secondary,\n headerColumnResizeHandleColor: theme.palette.surface.secondary,\n headerColumnSeparatorDisplay: 'block',\n headerColumnResizeHandleDisplay: 'block',\n});\n"],"names":["skodaAgThemeParams","theme","fontFamily","getFontFamily","direction","fontSize","iconSize","fontWeight","backgroundColor","palette","background","primary","foregroundColor","text","dataColor","headerForegroundColor","headerBackgroundColor","subHeaderBackgroundColor","subHeaderToolbarBackgroundColor","secondaryForegroundColor","onSurface","os500","disabledForegroundColor","disabled","tertiary","checkboxCheckedColor","brand","checkboxIndeterminateColor","rowHoverColor","surface","oddRowBackgroundColor","rowBorderColor","secondary","selectedRowBackgroundColor","focusShadow","getFocusRingBoxShadow","headerFontSize","headerFontWeight","headerHeight","rowHeight","autoHeightMinBodyHeight","paginationPanelHeight","cellHorizontalPadding","cellVerticalPadding","rowVerticalPaddingScale","borderRadius","headerColumnSeparatorColor","headerColumnResizeHandleColor","headerColumnSeparatorDisplay","headerColumnResizeHandleDisplay"],"mappings":"wJAKaA,EAAsBC,IAAY,CAE7CC,WAAYC,EAAkC,QAApBF,EAAMG,WAChCC,SAAU,GACVC,SAAU,GACVC,WAAY,UAGZC,gBAAiBP,EAAMQ,QAAQC,WAAWC,QAC1CC,gBAAiBX,EAAMQ,QAAQI,KAAKF,QACpCG,UAAWb,EAAMQ,QAAQI,KAAKF,QAC9BI,sBAAuBd,EAAMQ,QAAQI,KAAKF,QAC1CK,sBAAuB,cACvBC,yBAA0B,cAC1BC,gCAAiC,cACjCC,yBAA0BlB,EAAMQ,QAAQW,UAAUC,MAClDC,wBAAyBrB,EAAMQ,QAAQc,SAASC,SAChDC,qBAAsBxB,EAAMQ,QAAQiB,MAAMf,QAC1CgB,2BAA4B1B,EAAMQ,QAAQiB,MAAMf,QAGhDiB,cAAe3B,EAAMQ,QAAQoB,QAAQlB,QACrCmB,sBAAuB,cACvBC,eAAgB9B,EAAMQ,QAAQoB,QAAQG,UACtCC,2BAA4BhC,EAAMQ,QAAQoB,QAAQlB,QAGlDuB,YAAaC,EAAsBlC,GAGnCmC,eAAgB,GAChBC,iBAAkB,IAClBC,aAAc,GACdC,UAAW,GACXC,wBAAyB,GACzBC,sBAAuB,GACvBC,sBAAuB,GACvBC,oBAAqB,EACrBC,wBAAyB,IAGzBC,aAAc,EAGdC,2BAA4B7C,EAAMQ,QAAQoB,QAAQG,UAClDe,8BAA+B9C,EAAMQ,QAAQoB,QAAQG,UACrDgB,6BAA8B,QAC9BC,gCAAiC"}
@@ -0,0 +1,36 @@
1
+ import { type RefObject } from 'react';
2
+ export interface AgGridRowNodeLike {
3
+ /**
4
+ * Current height of the row
5
+ */
6
+ rowHeight: number | null | undefined;
7
+ /**
8
+ * Sets new height of the row
9
+ */
10
+ setRowHeight(rowHeight: number | undefined | null, estimated?: boolean): void;
11
+ }
12
+ export interface AgGridEventLike {
13
+ /**
14
+ * Grid API of the event
15
+ */
16
+ api: {
17
+ forEachNode(callback: (rowNode: AgGridRowNodeLike, index: number) => void): void;
18
+ onRowHeightChanged(): void;
19
+ };
20
+ }
21
+ export interface SkodaAgGridUniformRowHeightProps {
22
+ /**
23
+ * Attach to SkodaAgGridProvider, rendered cells are measured inside it
24
+ */
25
+ ref: RefObject<HTMLDivElement | null>;
26
+ /**
27
+ * Pass to both the AgGridReact onFirstDataRendered and onColumnResized events
28
+ */
29
+ applyUniformRowHeight: (event: AgGridEventLike) => void;
30
+ }
31
+ /**
32
+ * Makes all rows share the height of the tallest one, measured from the wrapped cell content.
33
+ * Requires `wrapText` enabled on the column definitions. `autoHeight` must stay off, the hook
34
+ * controls the row heights itself, which also prevents scrollbar resize loops.
35
+ */
36
+ export declare const useSkodaAgGridUniformRowHeight: () => SkodaAgGridUniformRowHeightProps;
@@ -0,0 +1,2 @@
1
+ import{useRef as e,useCallback as r}from"react";const t=()=>{const t=e(null),n=e({frame:0,pending:0}),o=r(function e(r){const o=n.current;o.event=r,!o.observer&&t.current&&(o.observer=new MutationObserver(()=>o.event&&e(o.event)),o.observer.observe(t.current.querySelector(".ag-body")??t.current,{childList:!0,subtree:!0,characterData:!0}),document.fonts?.ready.then(()=>o.event&&e(o.event))),cancelAnimationFrame(o.frame),o.frame=requestAnimationFrame(function e(){const n=t.current?.querySelectorAll(".ag-cell");if(!n?.length)return;n.forEach(e=>e.style.setProperty("height","auto"));const a=Math.ceil(Math.max(...Array.from(n,e=>e.getBoundingClientRect().height)));if(n.forEach(e=>e.style.removeProperty("height")),a!==o.pending)return o.pending=a,void(o.frame=requestAnimationFrame(e));let i=!1;r.api.forEachNode(e=>{e.rowHeight!==a&&(e.setRowHeight(a),i=!0)}),i&&r.api.onRowHeightChanged()})},[]);return{ref:t,applyUniformRowHeight:o}};export{t as useSkodaAgGridUniformRowHeight};
2
+ //# sourceMappingURL=agGridUniformRowHeight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agGridUniformRowHeight.js","sources":["../../../src/components/advancedTable/agGridUniformRowHeight.ts"],"sourcesContent":["import { useCallback, useRef, type RefObject } from 'react';\n\n// structural types instead of AG Grid imports, the library must not depend on ag-grid-community\nexport interface AgGridRowNodeLike {\n /**\n * Current height of the row\n */\n rowHeight: number | null | undefined;\n /**\n * Sets new height of the row\n */\n setRowHeight(rowHeight: number | undefined | null, estimated?: boolean): void;\n}\n\nexport interface AgGridEventLike {\n /**\n * Grid API of the event\n */\n api: {\n forEachNode(callback: (rowNode: AgGridRowNodeLike, index: number) => void): void;\n onRowHeightChanged(): void;\n };\n}\n\nexport interface SkodaAgGridUniformRowHeightProps {\n /**\n * Attach to SkodaAgGridProvider, rendered cells are measured inside it\n */\n ref: RefObject<HTMLDivElement | null>;\n /**\n * Pass to both the AgGridReact onFirstDataRendered and onColumnResized events\n */\n applyUniformRowHeight: (event: AgGridEventLike) => void;\n}\n\n/**\n * Makes all rows share the height of the tallest one, measured from the wrapped cell content.\n * Requires `wrapText` enabled on the column definitions. `autoHeight` must stay off, the hook\n * controls the row heights itself, which also prevents scrollbar resize loops.\n */\nexport const useSkodaAgGridUniformRowHeight = (): SkodaAgGridUniformRowHeightProps => {\n const ref = useRef<HTMLDivElement>(null);\n // mutable state shared by the callbacks, the hook never rerenders\n const state = useRef<{\n frame: number;\n pending: number;\n event?: AgGridEventLike;\n observer?: MutationObserver;\n }>({ frame: 0, pending: 0 });\n\n const applyUniformRowHeight = useCallback(function apply(event: AgGridEventLike) {\n const current = state.current;\n current.event = event;\n\n if (!current.observer && ref.current) {\n current.observer = new MutationObserver(() => current.event && apply(current.event));\n current.observer.observe(ref.current.querySelector('.ag-body') ?? ref.current, {\n childList: true,\n subtree: true,\n characterData: true,\n });\n // fonts change text metrics without any DOM mutation, the observer cannot see that.\n void document.fonts?.ready.then(() => current.event && apply(current.event));\n }\n\n // a single measurement is scheduled before the next paint, when cell widths and wrapping\n // are already settled, a repeated trigger only replaces it\n cancelAnimationFrame(current.frame);\n current.frame = requestAnimationFrame(function measure() {\n // cells are stretched to the row height, release them to measure the natural content\n // height including custom paddings and margins, then restore\n const cells = ref.current?.querySelectorAll<HTMLElement>('.ag-cell');\n if (!cells?.length) {\n return;\n }\n cells.forEach((el) => el.style.setProperty('height', 'auto'));\n const max = Math.ceil(Math.max(...Array.from(cells, (el) => el.getBoundingClientRect().height)));\n cells.forEach((el) => el.style.removeProperty('height'));\n\n // apply only a measurement stable for two consecutive frames, partially mounted cell\n // renderers and resizing in progress would otherwise paint several intermediate heights\n if (max !== current.pending) {\n current.pending = max;\n current.frame = requestAnimationFrame(measure);\n return;\n }\n\n let changed = false;\n event.api.forEachNode((node) => {\n if (node.rowHeight !== max) {\n node.setRowHeight(max);\n changed = true;\n }\n });\n if (changed) {\n event.api.onRowHeightChanged();\n }\n });\n }, []);\n\n return { ref, applyUniformRowHeight };\n};\n"],"names":["useSkodaAgGridUniformRowHeight","ref","useRef","state","frame","pending","applyUniformRowHeight","useCallback","apply","event","current","observer","MutationObserver","observe","querySelector","childList","subtree","characterData","document","fonts","ready","then","cancelAnimationFrame","requestAnimationFrame","measure","cells","querySelectorAll","length","forEach","el","style","setProperty","max","Math","ceil","Array","from","getBoundingClientRect","height","removeProperty","changed","api","forEachNode","node","rowHeight","setRowHeight","onRowHeightChanged"],"mappings":"gDAwCO,MAAMA,EAAiC,KAC5C,MAAMC,EAAMC,EAAuB,MAE7BC,EAAQD,EAKX,CAAEE,MAAO,EAAGC,QAAS,IAElBC,EAAwBC,EAAY,SAASC,EAAMC,GACvD,MAAMC,EAAUP,EAAMO,QACtBA,EAAQD,MAAQA,GAEXC,EAAQC,UAAYV,EAAIS,UAC3BA,EAAQC,SAAW,IAAIC,iBAAiB,IAAMF,EAAQD,OAASD,EAAME,EAAQD,QAC7EC,EAAQC,SAASE,QAAQZ,EAAIS,QAAQI,cAAc,aAAeb,EAAIS,QAAS,CAC7EK,WAAW,EACXC,SAAS,EACTC,eAAe,IAGZC,SAASC,OAAOC,MAAMC,KAAK,IAAMX,EAAQD,OAASD,EAAME,EAAQD,SAKvEa,qBAAqBZ,EAAQN,OAC7BM,EAAQN,MAAQmB,sBAAsB,SAASC,IAG7C,MAAMC,EAAQxB,EAAIS,SAASgB,iBAA8B,YACzD,IAAKD,GAAOE,OACV,OAEFF,EAAMG,QAASC,GAAOA,EAAGC,MAAMC,YAAY,SAAU,SACrD,MAAMC,EAAMC,KAAKC,KAAKD,KAAKD,OAAOG,MAAMC,KAAKX,EAAQI,GAAOA,EAAGQ,wBAAwBC,UAKvF,GAJAb,EAAMG,QAASC,GAAOA,EAAGC,MAAMS,eAAe,WAI1CP,IAAQtB,EAAQL,QAGlB,OAFAK,EAAQL,QAAU2B,OAClBtB,EAAQN,MAAQmB,sBAAsBC,IAIxC,IAAIgB,GAAU,EACd/B,EAAMgC,IAAIC,YAAaC,IACjBA,EAAKC,YAAcZ,IACrBW,EAAKE,aAAab,GAClBQ,GAAU,KAGVA,GACF/B,EAAMgC,IAAIK,oBAEd,EACF,EAAG,IAEH,MAAO,CAAE7C,MAAKK"}
@@ -1,2 +1,2 @@
1
- import{skodaAgThemeParams as o}from"./agGridSkodaTheme.js";import{agGridCssIcons as e}from"./agGridIcons.js";const r=r=>{const a=o(r);return{"--ag-font-family":`${a.fontFamily}`,"--ag-foreground-color":`${a.foregroundColor}`,"--ag-header-foreground-color":`${a.headerForegroundColor}`,"--ag-background-color":`${a.backgroundColor}`,"--ag-header-background-color":`${a.headerBackgroundColor}`,"--ag-subheader-background-color":`${a.subHeaderBackgroundColor}`,"--ag-subheader-toolbar-background-color":`${a.subHeaderToolbarBackgroundColor}`,"--ag-disabled-foreground-color":`${a.disabledForegroundColor}`,"--ag-row-hover-color":`${a.rowHoverColor}`,"--ag-checkbox-checked-color":`${a.checkboxCheckedColor}`,"--ag-checkbox-indeterminate-color":`${a.checkboxIndeterminateColor}`,"--ag-header-height":`${a.headerHeight}px`,"--ag-header-column-resize-handle-color":`${a.headerColumnResizeHandleColor}`,"--ag-selected-row-background-color":`${a.selectedRowBackgroundColor}`,"--ag-cell-vertical-padding":`${a.cellVerticalPadding}px`,"--ag-row-height":`${a.rowHeight}px`,"--ag-pagination-panel-height":`${a.paginationPanelHeight}px`,"--ag-font-size":`${a.fontSize}px`,"--ag-header-font-size":`${a.headerFontSize}px`,"--ag-header-font-weight":`'${a.headerFontWeight}'`,"--ag-icon-size":`${a.iconSize}px`,...e}};export{r as agGridVariables};
1
+ import{skodaAgThemeParams as o}from"./agGridSkodaTheme.js";import{agGridCssIcons as e}from"./agGridIcons.js";const r=r=>{const a=o(r);return{"--ag-font-family":`${a.fontFamily}`,"--ag-foreground-color":`${a.foregroundColor}`,"--ag-header-foreground-color":`${a.headerForegroundColor}`,"--ag-background-color":`${a.backgroundColor}`,"--ag-header-background-color":`${a.headerBackgroundColor}`,"--ag-subheader-background-color":`${a.subHeaderBackgroundColor}`,"--ag-subheader-toolbar-background-color":`${a.subHeaderToolbarBackgroundColor}`,"--ag-disabled-foreground-color":`${a.disabledForegroundColor}`,"--ag-row-hover-color":`${a.rowHoverColor}`,"--ag-checkbox-checked-color":`${a.checkboxCheckedColor}`,"--ag-checkbox-indeterminate-color":`${a.checkboxIndeterminateColor}`,"--ag-header-height":`${a.headerHeight}px`,"--ag-header-column-resize-handle-color":`${a.headerColumnResizeHandleColor}`,"--ag-selected-row-background-color":`${a.selectedRowBackgroundColor}`,"--ag-cell-vertical-padding":`${a.cellVerticalPadding}px`,"--ag-row-height":`${a.rowHeight}px`,"--ag-pagination-panel-height":`${a.paginationPanelHeight}px`,"--ag-font-size":`${a.fontSize}px`,"--ag-header-font-size":`${a.headerFontSize}px`,"--ag-header-font-weight":`'${a.headerFontWeight}'`,"--ag-icon-size":`${a.iconSize}px`,"--ag-focus-shadow":`${a.focusShadow}`,".ag-styled-root":{"--ag-font-weight":"inherit","--ag-data-background-color":`${a.backgroundColor}`,"--ag-auto-height-min-body-height":`${a.autoHeightMinBodyHeight}px`},...e}};export{r as agGridVariables};
2
2
  //# sourceMappingURL=agGridVariables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agGridVariables.js","sources":["../../../src/components/advancedTable/agGridVariables.ts"],"sourcesContent":["import { CSSObject, Theme } from '@mui/material';\nimport { skodaAgThemeParams } from './agGridSkodaTheme';\nimport { agGridCssIcons } from './agGridIcons';\n\n/** agGrid CSS Variables */\nexport const agGridVariables = (theme: Theme): CSSObject => {\n const agTheme = skodaAgThemeParams(theme);\n\n return {\n '--ag-font-family': `${agTheme.fontFamily}`,\n '--ag-foreground-color': `${agTheme.foregroundColor}`,\n '--ag-header-foreground-color': `${agTheme.headerForegroundColor}`,\n '--ag-background-color': `${agTheme.backgroundColor}`,\n '--ag-header-background-color': `${agTheme.headerBackgroundColor}`,\n '--ag-subheader-background-color': `${agTheme.subHeaderBackgroundColor}`,\n '--ag-subheader-toolbar-background-color': `${agTheme.subHeaderToolbarBackgroundColor}`,\n '--ag-disabled-foreground-color': `${agTheme.disabledForegroundColor}`,\n '--ag-row-hover-color': `${agTheme.rowHoverColor}`,\n '--ag-checkbox-checked-color': `${agTheme.checkboxCheckedColor}`,\n '--ag-checkbox-indeterminate-color': `${agTheme.checkboxIndeterminateColor}`,\n '--ag-header-height': `${agTheme.headerHeight}px`,\n '--ag-header-column-resize-handle-color': `${agTheme.headerColumnResizeHandleColor}`,\n '--ag-selected-row-background-color': `${agTheme.selectedRowBackgroundColor}`,\n '--ag-cell-vertical-padding': `${agTheme.cellVerticalPadding}px`,\n '--ag-row-height': `${agTheme.rowHeight}px`,\n '--ag-pagination-panel-height': `${agTheme.paginationPanelHeight}px`,\n '--ag-font-size': `${agTheme.fontSize}px`,\n '--ag-header-font-size': `${agTheme.headerFontSize}px`,\n '--ag-header-font-weight': `'${agTheme.headerFontWeight}'`,\n '--ag-icon-size': `${agTheme.iconSize}px`,\n ...agGridCssIcons,\n };\n};\n"],"names":["agGridVariables","theme","agTheme","skodaAgThemeParams","fontFamily","foregroundColor","headerForegroundColor","backgroundColor","headerBackgroundColor","subHeaderBackgroundColor","subHeaderToolbarBackgroundColor","disabledForegroundColor","rowHoverColor","checkboxCheckedColor","checkboxIndeterminateColor","headerHeight","headerColumnResizeHandleColor","selectedRowBackgroundColor","cellVerticalPadding","rowHeight","paginationPanelHeight","fontSize","headerFontSize","headerFontWeight","iconSize","agGridCssIcons"],"mappings":"6GAKO,MAAMA,EAAmBC,IAC9B,MAAMC,EAAUC,EAAmBF,GAEnC,MAAO,CACL,mBAAoB,GAAGC,EAAQE,aAC/B,wBAAyB,GAAGF,EAAQG,kBACpC,+BAAgC,GAAGH,EAAQI,wBAC3C,wBAAyB,GAAGJ,EAAQK,kBACpC,+BAAgC,GAAGL,EAAQM,wBAC3C,kCAAmC,GAAGN,EAAQO,2BAC9C,0CAA2C,GAAGP,EAAQQ,kCACtD,iCAAkC,GAAGR,EAAQS,0BAC7C,uBAAwB,GAAGT,EAAQU,gBACnC,8BAA+B,GAAGV,EAAQW,uBAC1C,oCAAqC,GAAGX,EAAQY,6BAChD,qBAAsB,GAAGZ,EAAQa,iBACjC,yCAA0C,GAAGb,EAAQc,gCACrD,qCAAsC,GAAGd,EAAQe,6BACjD,6BAA8B,GAAGf,EAAQgB,wBACzC,kBAAmB,GAAGhB,EAAQiB,cAC9B,+BAAgC,GAAGjB,EAAQkB,0BAC3C,iBAAkB,GAAGlB,EAAQmB,aAC7B,wBAAyB,GAAGnB,EAAQoB,mBACpC,0BAA2B,IAAIpB,EAAQqB,oBACvC,iBAAkB,GAAGrB,EAAQsB,gBAC1BC"}
1
+ {"version":3,"file":"agGridVariables.js","sources":["../../../src/components/advancedTable/agGridVariables.ts"],"sourcesContent":["import { CSSObject, Theme } from '@mui/material';\nimport { skodaAgThemeParams } from './agGridSkodaTheme';\nimport { agGridCssIcons } from './agGridIcons';\n\n/** agGrid CSS Variables */\nexport const agGridVariables = (theme: Theme): CSSObject => {\n const agTheme = skodaAgThemeParams(theme);\n\n return {\n '--ag-font-family': `${agTheme.fontFamily}`,\n '--ag-foreground-color': `${agTheme.foregroundColor}`,\n '--ag-header-foreground-color': `${agTheme.headerForegroundColor}`,\n '--ag-background-color': `${agTheme.backgroundColor}`,\n '--ag-header-background-color': `${agTheme.headerBackgroundColor}`,\n '--ag-subheader-background-color': `${agTheme.subHeaderBackgroundColor}`,\n '--ag-subheader-toolbar-background-color': `${agTheme.subHeaderToolbarBackgroundColor}`,\n '--ag-disabled-foreground-color': `${agTheme.disabledForegroundColor}`,\n '--ag-row-hover-color': `${agTheme.rowHoverColor}`,\n '--ag-checkbox-checked-color': `${agTheme.checkboxCheckedColor}`,\n '--ag-checkbox-indeterminate-color': `${agTheme.checkboxIndeterminateColor}`,\n '--ag-header-height': `${agTheme.headerHeight}px`,\n '--ag-header-column-resize-handle-color': `${agTheme.headerColumnResizeHandleColor}`,\n '--ag-selected-row-background-color': `${agTheme.selectedRowBackgroundColor}`,\n '--ag-cell-vertical-padding': `${agTheme.cellVerticalPadding}px`,\n '--ag-row-height': `${agTheme.rowHeight}px`,\n '--ag-pagination-panel-height': `${agTheme.paginationPanelHeight}px`,\n '--ag-font-size': `${agTheme.fontSize}px`,\n '--ag-header-font-size': `${agTheme.headerFontSize}px`,\n '--ag-header-font-weight': `'${agTheme.headerFontWeight}'`,\n '--ag-icon-size': `${agTheme.iconSize}px`,\n '--ag-focus-shadow': `${agTheme.focusShadow}`,\n // v33+ compatibility\n '.ag-styled-root': {\n // v36 changed this default from 'inherit' to 400\n '--ag-font-weight': 'inherit',\n // the theme pins this to its own background instead of following --ag-background-color\n '--ag-data-background-color': `${agTheme.backgroundColor}`,\n // v36 moved the autoHeight body minimum here from .ag-center-cols-viewport\n '--ag-auto-height-min-body-height': `${agTheme.autoHeightMinBodyHeight}px`,\n },\n ...agGridCssIcons,\n };\n};\n"],"names":["agGridVariables","theme","agTheme","skodaAgThemeParams","fontFamily","foregroundColor","headerForegroundColor","backgroundColor","headerBackgroundColor","subHeaderBackgroundColor","subHeaderToolbarBackgroundColor","disabledForegroundColor","rowHoverColor","checkboxCheckedColor","checkboxIndeterminateColor","headerHeight","headerColumnResizeHandleColor","selectedRowBackgroundColor","cellVerticalPadding","rowHeight","paginationPanelHeight","fontSize","headerFontSize","headerFontWeight","iconSize","focusShadow","autoHeightMinBodyHeight","agGridCssIcons"],"mappings":"6GAKO,MAAMA,EAAmBC,IAC9B,MAAMC,EAAUC,EAAmBF,GAEnC,MAAO,CACL,mBAAoB,GAAGC,EAAQE,aAC/B,wBAAyB,GAAGF,EAAQG,kBACpC,+BAAgC,GAAGH,EAAQI,wBAC3C,wBAAyB,GAAGJ,EAAQK,kBACpC,+BAAgC,GAAGL,EAAQM,wBAC3C,kCAAmC,GAAGN,EAAQO,2BAC9C,0CAA2C,GAAGP,EAAQQ,kCACtD,iCAAkC,GAAGR,EAAQS,0BAC7C,uBAAwB,GAAGT,EAAQU,gBACnC,8BAA+B,GAAGV,EAAQW,uBAC1C,oCAAqC,GAAGX,EAAQY,6BAChD,qBAAsB,GAAGZ,EAAQa,iBACjC,yCAA0C,GAAGb,EAAQc,gCACrD,qCAAsC,GAAGd,EAAQe,6BACjD,6BAA8B,GAAGf,EAAQgB,wBACzC,kBAAmB,GAAGhB,EAAQiB,cAC9B,+BAAgC,GAAGjB,EAAQkB,0BAC3C,iBAAkB,GAAGlB,EAAQmB,aAC7B,wBAAyB,GAAGnB,EAAQoB,mBACpC,0BAA2B,IAAIpB,EAAQqB,oBACvC,iBAAkB,GAAGrB,EAAQsB,aAC7B,oBAAqB,GAAGtB,EAAQuB,cAEhC,kBAAmB,CAEjB,mBAAoB,UAEpB,6BAA8B,GAAGvB,EAAQK,kBAEzC,mCAAoC,GAAGL,EAAQwB,gCAE9CC"}
@@ -1,4 +1,5 @@
1
1
  export * from './agGrid';
2
2
  export * from './agGridIcons';
3
+ export * from './agGridUniformRowHeight';
3
4
  export * from './agGridSkodaTheme';
4
5
  export * from './agGridVariables';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { IconButtonProps } from '@mui/material';
3
+ export interface AlertIconButtonProps extends IconButtonProps {
4
+ }
5
+ /**
6
+ * AlertIconButton is a proxy component to <IconButton color="white" size="small" />
7
+ */
8
+ export declare const AlertIconButton: React.FC<AlertIconButtonProps>;
@@ -0,0 +1,2 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{forwardRef as m}from"react";import{IconButton as o}from"@mui/material";const t=m((m,t)=>r(o,{ref:t,color:"white",size:"small",...m}));export{t as AlertIconButton};
2
+ //# sourceMappingURL=AlertIconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertIconButton.js","sources":["../../../src/components/alert/AlertIconButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { IconButton, IconButtonProps } from '@mui/material';\n\nexport interface AlertIconButtonProps extends IconButtonProps {}\n\n/**\n * AlertIconButton is a proxy component to <IconButton color=\"white\" size=\"small\" />\n */\nexport const AlertIconButton: React.FC<AlertIconButtonProps> = forwardRef((props, ref) => {\n return <IconButton ref={ref} color=\"white\" size=\"small\" {...props} />;\n});\n"],"names":["AlertIconButton","forwardRef","props","ref","_jsx","IconButton","color","size"],"mappings":"sHAQO,MAAMA,EAAkDC,EAAW,CAACC,EAAOC,IACzEC,EAACC,EAAU,CAACF,IAAKA,EAAKG,MAAM,QAAQC,KAAK,WAAYL"}
@@ -1,2 +1,3 @@
1
1
  export * from './AlertButton';
2
+ export * from './AlertIconButton';
2
3
  export * from './AlertNotificationButton';
@@ -1 +1 @@
1
- {"version":3,"file":"Autoplay.js","sources":["../../../src/components/carousel/Autoplay.tsx"],"sourcesContent":["import { Box, BoxProps } from '@mui/material';\nimport { sxOverride } from '@/src/utils/sxOverride';\nimport { useCarousel } from './hooks';\nimport { Swiper as CarouselInstance } from 'swiper';\nimport { useSwiper } from 'swiper/react';\nimport { useEffect, useState } from 'react';\nimport { PlayPauseButton, PlayPauseButtonProps } from '@/src/components/playPauseButton/PlayPauseButton';\nimport { Spinner, SpinnerProps } from '@/src/components/progress/Spinner';\n\nexport interface CarouselAutoplayProgressProps extends Omit<BoxProps, 'children' | 'position'> {\n /**\n * Optional Carousel instance from useCarouselInstance hook\n */\n carousel?: CarouselInstance;\n /**\n * Progress Props\n */\n spinnerProps?: Omit<SpinnerProps, 'value'>;\n /**\n * Append style to wrapper box to change position of component\n */\n position?: 'outside' | 'inside';\n}\n\n/**\n * Spinner with autoplay progress value\n */\nexport const CarouselAutoplayProgress = ({\n carousel: carouselProp,\n sx,\n spinnerProps,\n position = 'outside',\n ...rest\n}: CarouselAutoplayProgressProps) => {\n const [value, setValue] = useState<number>(0);\n const carouselHook = useSwiper();\n const carousel = carouselProp || carouselHook;\n\n useEffect(() => {\n // attach listener that controls progress value based on swiper special event\n if (carousel?.autoplay) {\n carousel.on('autoplayTimeLeft', (instance, _timeLeft, percentage) => {\n setValue(instance.autoplay.paused ? 0 : Math.round(100 - percentage * 100));\n });\n }\n }, [!!carousel]);\n\n return (\n <Box\n sx={sxOverride(\n {\n position: 'relative',\n display: 'flex',\n m: 2,\n ...(position === 'inside' && {\n position: 'absolute',\n zIndex: '90',\n bottom: '0',\n left: '0',\n right: '0',\n m: 2,\n }),\n },\n sx,\n )}\n data-testid=\"CarouselAutoplayProgress\"\n {...rest}\n >\n <Spinner value={value} {...spinnerProps} />\n </Box>\n );\n};\n\nexport interface CarouselAutoplayIconButtonProps extends Omit<Partial<PlayPauseButtonProps>, 'aria-label'> {\n /**\n * Optional Carousel instance from useCarouselInstance hook\n */\n carousel?: CarouselInstance;\n /**\n * Accessible label for the button. Accepts a plain string or a function called with the current playing state.\n * @default (isPlaying) => isPlaying ? 'Pause carousel autoplay' : 'Play carousel autoplay'\n */\n 'aria-label'?: string | ((isPlaying: boolean) => string);\n}\n\n/**\n * IconButton controlling play/paused state of the autoplay\n */\nexport function CarouselAutoplayIconButton({\n carousel: carouselProp,\n 'aria-label': ariaLabel = (isPlaying) => isPlaying ? 'Pause carousel autoplay' : 'Play carousel autoplay',\n ...rest\n}: CarouselAutoplayIconButtonProps) {\n const carouselHook = useCarousel();\n const carousel = carouselProp || carouselHook;\n const [value, setValue] = useState<number>(0);\n const isPlaying = !!carousel?.autoplay?.running;\n\n useEffect(() => {\n // attach listener that controls progress value based on swiper special event\n if (carousel?.autoplay) {\n carousel.on('autoplayTimeLeft', (instance, _timeLeft, percentage) => {\n setValue(instance.autoplay.paused ? 0 : Math.round(100 - percentage * 100));\n });\n }\n }, [!!carousel]);\n\n return (\n <PlayPauseButton\n aria-label={typeof ariaLabel === 'function' ? ariaLabel(isPlaying) : ariaLabel}\n isPlaying={isPlaying}\n progress={value}\n onClick={() => {\n carousel?.autoplay?.[carousel?.autoplay?.running ? 'stop' : 'start']();\n }}\n {...rest}\n />\n );\n}\n"],"names":["CarouselAutoplayProgress","carousel","carouselProp","sx","spinnerProps","position","rest","value","setValue","useState","carouselHook","useSwiper","useEffect","autoplay","on","instance","_timeLeft","percentage","paused","Math","round","_jsx","Box","sxOverride","display","m","zIndex","bottom","left","right","Spinner","CarouselAutoplayIconButton","ariaLabel","isPlaying","useCarousel","running","PlayPauseButton","progress","onClick"],"mappings":"+YA2BaA,EAA2B,EACtCC,SAAUC,EACVC,KACAC,eACAC,WAAW,aACRC,MAEH,MAAOC,EAAOC,GAAYC,EAAiB,GACrCC,EAAeC,IACfV,EAAWC,GAAgBQ,EAWjC,OATAE,EAAU,KAEJX,GAAUY,UACZZ,EAASa,GAAG,mBAAoB,CAACC,EAAUC,EAAWC,KACpDT,EAASO,EAASF,SAASK,OAAS,EAAIC,KAAKC,MAAM,IAAmB,IAAbH,OAG5D,GAAGhB,IAGJoB,EAACC,GACCnB,GAAIoB,EACF,CACElB,SAAU,WACVmB,QAAS,OACTC,EAAG,KACc,WAAbpB,GAAyB,CAC3BA,SAAU,WACVqB,OAAQ,KACRC,OAAQ,IACRC,KAAM,IACNC,MAAO,IACPJ,EAAG,IAGPtB,GACD,cACW,8BACRG,WAEJe,EAACS,EAAO,CAACvB,MAAOA,KAAWH,OAoB3B,SAAU2B,GACd9B,SAAUC,EACV,aAAc8B,EAAaC,GAAcA,EAAY,0BAA4B,4BAC9E3B,IAEH,MAAMI,EAAewB,IACfjC,EAAWC,GAAgBQ,GAC1BH,EAAOC,GAAYC,EAAiB,GACrCwB,IAAchC,GAAUY,UAAUsB,QAWxC,OATAvB,EAAU,KAEJX,GAAUY,UACZZ,EAASa,GAAG,mBAAoB,CAACC,EAAUC,EAAWC,KACpDT,EAASO,EAASF,SAASK,OAAS,EAAIC,KAAKC,MAAM,IAAmB,IAAbH,OAG5D,GAAGhB,IAGJoB,EAACe,EAAe,CAAA,aACmB,mBAAdJ,EAA2BA,EAAUC,GAAaD,EACrEC,UAAWA,EACXI,SAAU9B,EACV+B,QAAS,KACPrC,GAAUY,WAAWZ,GAAUY,UAAUsB,QAAU,OAAS,eAE1D7B,GAGV"}
1
+ {"version":3,"file":"Autoplay.js","sources":["../../../src/components/carousel/Autoplay.tsx"],"sourcesContent":["import { Box, BoxProps } from '@mui/material';\nimport { sxOverride } from '@/src/utils/sxOverride';\nimport { useCarousel } from './hooks';\nimport { Swiper as CarouselInstance } from 'swiper';\nimport { useSwiper } from 'swiper/react';\nimport { useEffect, useState } from 'react';\nimport { PlayPauseButton, PlayPauseButtonProps } from '@/src/components/playPauseButton/PlayPauseButton';\nimport { Spinner, SpinnerProps } from '@/src/components/progress/Spinner';\n\nexport interface CarouselAutoplayProgressProps extends Omit<BoxProps, 'children' | 'position'> {\n /**\n * Optional Carousel instance from useCarouselInstance hook\n */\n carousel?: CarouselInstance;\n /**\n * Progress Props\n */\n spinnerProps?: Omit<SpinnerProps, 'value'>;\n /**\n * Append style to wrapper box to change position of component\n */\n position?: 'outside' | 'inside';\n}\n\n/**\n * Spinner with autoplay progress value\n */\nexport const CarouselAutoplayProgress = ({\n carousel: carouselProp,\n sx,\n spinnerProps,\n position = 'outside',\n ...rest\n}: CarouselAutoplayProgressProps) => {\n const [value, setValue] = useState<number>(0);\n const carouselHook = useSwiper();\n const carousel = carouselProp || carouselHook;\n\n useEffect(() => {\n // attach listener that controls progress value based on swiper special event\n if (carousel?.autoplay) {\n carousel.on('autoplayTimeLeft', (instance, _timeLeft, percentage) => {\n setValue(instance.autoplay.paused ? 0 : Math.round(100 - percentage * 100));\n });\n }\n }, [!!carousel]);\n\n return (\n <Box\n sx={sxOverride(\n {\n position: 'relative',\n display: 'flex',\n m: 2,\n ...(position === 'inside' && {\n position: 'absolute',\n zIndex: '90',\n bottom: '0',\n left: '0',\n right: '0',\n m: 2,\n }),\n },\n sx,\n )}\n data-testid=\"CarouselAutoplayProgress\"\n {...rest}\n >\n <Spinner value={value} {...spinnerProps} />\n </Box>\n );\n};\n\nexport interface CarouselAutoplayIconButtonProps extends Omit<Partial<PlayPauseButtonProps>, 'aria-label'> {\n /**\n * Optional Carousel instance from useCarouselInstance hook\n */\n carousel?: CarouselInstance;\n /**\n * Accessible label for the button. Accepts a plain string or a function called with the current playing state.\n * @default (isPlaying) => isPlaying ? 'Pause carousel autoplay' : 'Play carousel autoplay'\n */\n 'aria-label'?: string | ((isPlaying: boolean) => string);\n}\n\n/**\n * IconButton controlling play/paused state of the autoplay\n */\nexport function CarouselAutoplayIconButton({\n carousel: carouselProp,\n 'aria-label': ariaLabel = (isPlaying) => (isPlaying ? 'Pause carousel autoplay' : 'Play carousel autoplay'),\n ...rest\n}: CarouselAutoplayIconButtonProps) {\n const carouselHook = useCarousel();\n const carousel = carouselProp || carouselHook;\n const [value, setValue] = useState<number>(0);\n const isPlaying = !!carousel?.autoplay?.running;\n\n useEffect(() => {\n // attach listener that controls progress value based on swiper special event\n if (carousel?.autoplay) {\n carousel.on('autoplayTimeLeft', (instance, _timeLeft, percentage) => {\n setValue(instance.autoplay.paused ? 0 : Math.round(100 - percentage * 100));\n });\n }\n }, [!!carousel]);\n\n return (\n <PlayPauseButton\n aria-label={typeof ariaLabel === 'function' ? ariaLabel(isPlaying) : ariaLabel}\n isPlaying={isPlaying}\n progress={value}\n onClick={() => {\n carousel?.autoplay?.[carousel?.autoplay?.running ? 'stop' : 'start']();\n }}\n {...rest}\n />\n );\n}\n"],"names":["CarouselAutoplayProgress","carousel","carouselProp","sx","spinnerProps","position","rest","value","setValue","useState","carouselHook","useSwiper","useEffect","autoplay","on","instance","_timeLeft","percentage","paused","Math","round","_jsx","Box","sxOverride","display","m","zIndex","bottom","left","right","Spinner","CarouselAutoplayIconButton","ariaLabel","isPlaying","useCarousel","running","PlayPauseButton","progress","onClick"],"mappings":"+YA2BaA,EAA2B,EACtCC,SAAUC,EACVC,KACAC,eACAC,WAAW,aACRC,MAEH,MAAOC,EAAOC,GAAYC,EAAiB,GACrCC,EAAeC,IACfV,EAAWC,GAAgBQ,EAWjC,OATAE,EAAU,KAEJX,GAAUY,UACZZ,EAASa,GAAG,mBAAoB,CAACC,EAAUC,EAAWC,KACpDT,EAASO,EAASF,SAASK,OAAS,EAAIC,KAAKC,MAAM,IAAmB,IAAbH,OAG5D,GAAGhB,IAGJoB,EAACC,GACCnB,GAAIoB,EACF,CACElB,SAAU,WACVmB,QAAS,OACTC,EAAG,KACc,WAAbpB,GAAyB,CAC3BA,SAAU,WACVqB,OAAQ,KACRC,OAAQ,IACRC,KAAM,IACNC,MAAO,IACPJ,EAAG,IAGPtB,GACD,cACW,8BACRG,WAEJe,EAACS,EAAO,CAACvB,MAAOA,KAAWH,OAoB3B,SAAU2B,GACd9B,SAAUC,EACV,aAAc8B,EAAaC,GAAeA,EAAY,0BAA4B,4BAC/E3B,IAEH,MAAMI,EAAewB,IACfjC,EAAWC,GAAgBQ,GAC1BH,EAAOC,GAAYC,EAAiB,GACrCwB,IAAchC,GAAUY,UAAUsB,QAWxC,OATAvB,EAAU,KAEJX,GAAUY,UACZZ,EAASa,GAAG,mBAAoB,CAACC,EAAUC,EAAWC,KACpDT,EAASO,EAASF,SAASK,OAAS,EAAIC,KAAKC,MAAM,IAAmB,IAAbH,OAG5D,GAAGhB,IAGJoB,EAACe,EAAe,CAAA,aACmB,mBAAdJ,EAA2BA,EAAUC,GAAaD,EACrEC,UAAWA,EACXI,SAAU9B,EACV+B,QAAS,KACPrC,GAAUY,WAAWZ,GAAUY,UAAUsB,QAAU,OAAS,eAE1D7B,GAGV"}
@@ -1,2 +1,2 @@
1
- import{jsx as i}from"react/jsx-runtime";import{forwardRef as e}from"react";import{Box as r}from"@mui/material";import{sxOverride as t}from"../../utils/sxOverride/sxOverride.js";import{Swiper as a}from"swiper/react";import{Keyboard as n,EffectFade as o,Autoplay as p,Parallax as s}from"swiper/modules";const l=e(({children:e,sx:l,onInit:d,effect:m,autoplay:c,parallax:w,peekDistance:f=100,peekSpeed:x=150,...u},h)=>i(r,{component:a,spaceBetween:0,autoHeight:!0,loop:!0,keyboard:{enabled:!0},modules:[n,..."fade"===m?[o]:[],...c?[p]:[],...w?[s]:[]],parallax:w,effect:m,autoplay:c,ref:h,...u,onSwiper:d,"data-peekspeed":x,sx:t({display:"block",ml:"auto",mr:"auto",p:"0",maxWidth:"100%",position:"relative",zIndex:i=>i.zIndex.carousel,overflow:"hidden",listStyle:"none","&.swiper-horizontal":{touchAction:"pan-y"},"&.swiper-vertical":{touchAction:"pan-x","& > .swiper-wrapper":{flexDirection:"column"}},"&.swiper-autoheight":{height:"auto","& > .swiper-wrapper":{alignItems:"flex-start",transitionProperty:"transform, height"}},"& .swiper-wrapper":{position:"relative",width:"100%",height:"100%",zIndex:i=>i.zIndex.carousel,display:"flex",transitionProperty:"transform",transitionTimingFunction:"var(--swiper-wrapper-transition-timing-function, initial)",boxSizing:"content-box",transform:"translate3d(0px, 0, 0)"},..."fade"!==m&&{"&.peeking .swiper-wrapper > .swiper-slide":{transitionProperty:"transform",transitionDuration:`${x}ms`,transitionTimingFunction:"var(--swiper-wrapper-transition-timing-function, initial)"},"&.peek-next .swiper-wrapper > .swiper-slide":{transform:i=>`translate3D(${"rtl"===i.direction?"":"-"}${f}px, 0, 0)`},"&.peek-prev .swiper-wrapper > .swiper-slide":{transform:i=>`translate3D(${"rtl"===i.direction?"-":""}${f}px, 0, 0)`}},".swiper-slide-invisible-blank":{visibility:"hidden"},".swiper-backface-hidden .swiper-slide":{transform:"translateZ(0)",WebkitBackfaceVisibility:"hidden",backfaceVisibility:"hidden"}},l),children:e}));export{l as Carousel};
1
+ import{jsx as e}from"react/jsx-runtime";import{forwardRef as i,Children as r,isValidElement as t}from"react";import{Box as o}from"@mui/material";import{sxOverride as a}from"../../utils/sxOverride/sxOverride.js";import{Swiper as n}from"swiper/react";import{A11y as s,Keyboard as p,EffectFade as l,Autoplay as d,Parallax as c}from"swiper/modules";const m=i(({children:i,sx:m,onInit:f,effect:w,autoplay:u,parallax:x,a11y:h,peekDistance:y=100,peekSpeed:b=150,...v},g)=>{const k=r.toArray(i).filter(e=>t(e));return e(o,{component:n,spaceBetween:0,autoHeight:!0,loop:!0,keyboard:{enabled:!0},modules:[s,p,..."fade"===w?[l]:[],...u?[d]:[],...x?[c]:[]],parallax:x,effect:w,autoplay:u,a11y:"boolean"==typeof h?h:{...k.some(e=>void 0!==e.props?.role)&&{slideRole:""},...k.some(e=>void 0!==e.props?.["aria-label"])&&{slideLabelMessage:""},...h},ref:g,...v,onSwiper:f,"data-peekspeed":b,sx:a({display:"block",ml:"auto",mr:"auto",p:"0",maxWidth:"100%",position:"relative",zIndex:e=>e.zIndex.carousel,overflow:"hidden",listStyle:"none","&.swiper-horizontal":{touchAction:"pan-y"},"&.swiper-vertical":{touchAction:"pan-x","& > .swiper-wrapper":{flexDirection:"column"}},"&.swiper-autoheight":{height:"auto","& > .swiper-wrapper":{alignItems:"flex-start",transitionProperty:"transform, height"}},"& .swiper-wrapper":{position:"relative",width:"100%",height:"100%",zIndex:e=>e.zIndex.carousel,display:"flex",transitionProperty:"transform",transitionTimingFunction:"var(--swiper-wrapper-transition-timing-function, initial)",boxSizing:"content-box",transform:"translate3d(0px, 0, 0)"},..."fade"!==w&&{"&.peeking .swiper-wrapper > .swiper-slide":{transitionProperty:"transform",transitionDuration:`${b}ms`,transitionTimingFunction:"var(--swiper-wrapper-transition-timing-function, initial)"},"&.peek-next .swiper-wrapper > .swiper-slide":{transform:e=>`translate3D(${"rtl"===e.direction?"":"-"}${y}px, 0, 0)`},"&.peek-prev .swiper-wrapper > .swiper-slide":{transform:e=>`translate3D(${"rtl"===e.direction?"-":""}${y}px, 0, 0)`}},"& > .swiper-notification":{position:"absolute",left:"0",top:"0",pointerEvents:"none",opacity:"0",zIndex:"-1000"},".swiper-slide-invisible-blank":{visibility:"hidden"},".swiper-backface-hidden .swiper-slide":{transform:"translateZ(0)",WebkitBackfaceVisibility:"hidden",backfaceVisibility:"hidden"}},m),children:i})});export{m as Carousel};
2
2
  //# sourceMappingURL=Carousel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.js","sources":["../../../src/components/carousel/Carousel.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { Box, BoxProps } from '@mui/material';\nimport { sxOverride } from '@/src/utils/sxOverride';\nimport { Swiper, SwiperProps } from 'swiper/react';\nimport { Keyboard, EffectFade, Autoplay, Parallax } from 'swiper/modules';\n\nexport interface CarouselProps\n // `cssMode` not supported\n // instead of `navigation` use <CarouselNavigation />\n // instead of `pagination` use <CarouselPagination />\n // instead of `onSwiper` use `onInit`\n extends\n Omit<SwiperProps, 'children' | 'cssMode' | 'navigation' | 'pagination' | 'onSwiper'>,\n Omit<BoxProps, keyof Omit<SwiperProps, 'children'> | 'component'> {\n /**\n * Callback that receives Swiper instance\n */\n onInit?: SwiperProps['onSwiper'];\n /**\n * Travelled distance in px for peek effect\n * @default 100\n */\n peekDistance?: number;\n /**\n * Speed of peek effect\n * @default 150 (half of default Carousel's speed)\n */\n peekSpeed?: number;\n}\n\n/**\n * Modern mobile friendly carousel for slideshows, built with Swiper\n */\nexport const Carousel: React.FC<CarouselProps> = forwardRef(\n ({ children, sx, onInit, effect, autoplay, parallax, peekDistance = 100, peekSpeed = 150, ...rest }, ref) => {\n return (\n <Box\n component={Swiper}\n spaceBetween={0}\n autoHeight\n loop\n keyboard={{\n enabled: true,\n }}\n modules={[\n Keyboard,\n ...(effect === 'fade' ? [EffectFade] : []),\n ...(autoplay ? [Autoplay] : []),\n ...(parallax ? [Parallax] : []),\n ]}\n parallax={parallax}\n effect={effect}\n autoplay={autoplay}\n ref={ref}\n {...rest}\n onSwiper={onInit}\n data-peekspeed={peekSpeed}\n sx={sxOverride(\n {\n // generic root styling, based on the `import 'swiper/css'`\n display: 'block',\n ml: 'auto',\n mr: 'auto',\n p: '0',\n maxWidth: '100%',\n // ensure correct position\n position: 'relative',\n zIndex: (theme) => theme.zIndex.carousel,\n overflow: 'hidden',\n // support for ul-type\n listStyle: 'none',\n // variants\n '&.swiper-horizontal': {\n touchAction: 'pan-y',\n },\n '&.swiper-vertical': {\n touchAction: 'pan-x',\n '& > .swiper-wrapper': {\n flexDirection: 'column',\n },\n },\n '&.swiper-autoheight': {\n height: 'auto',\n '& > .swiper-wrapper': {\n alignItems: 'flex-start',\n transitionProperty: 'transform, height',\n },\n },\n // wrapper of all slides\n '& .swiper-wrapper': {\n position: 'relative',\n width: '100%',\n height: '100%',\n zIndex: (theme) => theme.zIndex.carousel,\n display: 'flex',\n transitionProperty: 'transform',\n transitionTimingFunction: 'var(--swiper-wrapper-transition-timing-function, initial)',\n boxSizing: 'content-box',\n transform: 'translate3d(0px, 0, 0)',\n },\n // peek effect\n ...(effect !== 'fade' && {\n '&.peeking .swiper-wrapper > .swiper-slide': {\n transitionProperty: 'transform',\n transitionDuration: `${peekSpeed}ms`,\n transitionTimingFunction: 'var(--swiper-wrapper-transition-timing-function, initial)',\n },\n '&.peek-next .swiper-wrapper > .swiper-slide': {\n transform: (theme) => `translate3D(${theme.direction === 'rtl' ? '' : '-'}${peekDistance}px, 0, 0)`,\n },\n '&.peek-prev .swiper-wrapper > .swiper-slide': {\n transform: (theme) => `translate3D(${theme.direction === 'rtl' ? '-' : ''}${peekDistance}px, 0, 0)`,\n },\n }),\n // swiper internal\n '.swiper-slide-invisible-blank': {\n visibility: 'hidden',\n },\n '.swiper-backface-hidden .swiper-slide': {\n transform: 'translateZ(0)',\n WebkitBackfaceVisibility: 'hidden',\n backfaceVisibility: 'hidden',\n },\n // does not include CSS Mode, 3D Shadows, lazy loading\n },\n sx,\n )}\n >\n {children}\n </Box>\n );\n },\n);\n"],"names":["Carousel","forwardRef","children","sx","onInit","effect","autoplay","parallax","peekDistance","peekSpeed","rest","ref","_jsx","Box","component","Swiper","spaceBetween","autoHeight","loop","keyboard","enabled","modules","Keyboard","EffectFade","Autoplay","Parallax","onSwiper","sxOverride","display","ml","mr","p","maxWidth","position","zIndex","theme","carousel","overflow","listStyle","touchAction","flexDirection","height","alignItems","transitionProperty","width","transitionTimingFunction","boxSizing","transform","transitionDuration","direction","visibility","WebkitBackfaceVisibility","backfaceVisibility"],"mappings":"6SAiCO,MAAMA,EAAoCC,EAC/C,EAAGC,WAAUC,KAAIC,SAAQC,SAAQC,WAAUC,WAAUC,eAAe,IAAKC,YAAY,OAAQC,GAAQC,IAEjGC,EAACC,EAAG,CACFC,UAAWC,EACXC,aAAc,EACdC,cACAC,MAAI,EACJC,SAAU,CACRC,SAAS,GAEXC,QAAS,CACPC,KACe,SAAXjB,EAAoB,CAACkB,GAAc,MACnCjB,EAAW,CAACkB,GAAY,MACxBjB,EAAW,CAACkB,GAAY,IAE9BlB,SAAUA,EACVF,OAAQA,EACRC,SAAUA,EACVK,IAAKA,KACDD,EACJgB,SAAUtB,EAAM,iBACAK,EAChBN,GAAIwB,EACF,CAEEC,QAAS,QACTC,GAAI,OACJC,GAAI,OACJC,EAAG,IACHC,SAAU,OAEVC,SAAU,WACVC,OAASC,GAAUA,EAAMD,OAAOE,SAChCC,SAAU,SAEVC,UAAW,OAEX,sBAAuB,CACrBC,YAAa,SAEf,oBAAqB,CACnBA,YAAa,QACb,sBAAuB,CACrBC,cAAe,WAGnB,sBAAuB,CACrBC,OAAQ,OACR,sBAAuB,CACrBC,WAAY,aACZC,mBAAoB,sBAIxB,oBAAqB,CACnBV,SAAU,WACVW,MAAO,OACPH,OAAQ,OACRP,OAASC,GAAUA,EAAMD,OAAOE,SAChCR,QAAS,OACTe,mBAAoB,YACpBE,yBAA0B,4DAC1BC,UAAW,cACXC,UAAW,6BAGE,SAAX1C,GAAqB,CACvB,4CAA6C,CAC3CsC,mBAAoB,YACpBK,mBAAoB,GAAGvC,MACvBoC,yBAA0B,6DAE5B,8CAA+C,CAC7CE,UAAYZ,GAAU,eAAmC,QAApBA,EAAMc,UAAsB,GAAK,MAAMzC,cAE9E,8CAA+C,CAC7CuC,UAAYZ,GAAU,eAAmC,QAApBA,EAAMc,UAAsB,IAAM,KAAKzC,eAIhF,gCAAiC,CAC/B0C,WAAY,UAEd,wCAAyC,CACvCH,UAAW,gBACXI,yBAA0B,SAC1BC,mBAAoB,WAIxBjD,GACDD,SAEAA"}
1
+ {"version":3,"file":"Carousel.js","sources":["../../../src/components/carousel/Carousel.tsx"],"sourcesContent":["import React, { Children, forwardRef, HTMLAttributes, isValidElement } from 'react';\nimport { Box, BoxProps } from '@mui/material';\nimport { sxOverride } from '@/src/utils/sxOverride';\nimport { Swiper, SwiperProps } from 'swiper/react';\nimport { A11y, Keyboard, EffectFade, Autoplay, Parallax } from 'swiper/modules';\n\nexport interface CarouselProps\n // `cssMode` not supported\n // instead of `navigation` use <CarouselNavigation />\n // instead of `pagination` use <CarouselPagination />\n // instead of `onSwiper` use `onInit`\n extends\n Omit<SwiperProps, 'children' | 'cssMode' | 'navigation' | 'pagination' | 'onSwiper'>,\n Omit<BoxProps, keyof Omit<SwiperProps, 'children'> | 'component'> {\n /**\n * Callback that receives Swiper instance\n */\n onInit?: SwiperProps['onSwiper'];\n /**\n * Travelled distance in px for peek effect\n * @default 100\n */\n peekDistance?: number;\n /**\n * Speed of peek effect\n * @default 150 (half of default Carousel's speed)\n */\n peekSpeed?: number;\n}\n\n/**\n * Modern mobile friendly carousel for slideshows, built with Swiper\n */\nexport const Carousel: React.FC<CarouselProps> = forwardRef(\n ({ children, sx, onInit, effect, autoplay, parallax, a11y, peekDistance = 100, peekSpeed = 150, ...rest }, ref) => {\n const slides = Children.toArray(children).filter((child) => isValidElement<HTMLAttributes<HTMLElement>>(child));\n\n return (\n <Box\n component={Swiper}\n spaceBetween={0}\n autoHeight\n loop\n keyboard={{\n enabled: true,\n }}\n modules={[\n A11y,\n Keyboard,\n ...(effect === 'fade' ? [EffectFade] : []),\n ...(autoplay ? [Autoplay] : []),\n ...(parallax ? [Parallax] : []),\n ]}\n parallax={parallax}\n effect={effect}\n autoplay={autoplay}\n a11y={\n typeof a11y === 'boolean'\n ? a11y\n : {\n // Swiper overwrites role and aria-label of every slide, keep the ones passed to a slide\n ...(slides.some((slide) => slide.props?.role !== undefined) && { slideRole: '' }),\n ...(slides.some((slide) => slide.props?.['aria-label'] !== undefined) && { slideLabelMessage: '' }),\n ...a11y,\n }\n }\n ref={ref}\n {...rest}\n onSwiper={onInit}\n data-peekspeed={peekSpeed}\n sx={sxOverride(\n {\n // generic root styling, based on the `import 'swiper/css'`\n display: 'block',\n ml: 'auto',\n mr: 'auto',\n p: '0',\n maxWidth: '100%',\n // ensure correct position\n position: 'relative',\n zIndex: (theme) => theme.zIndex.carousel,\n overflow: 'hidden',\n // support for ul-type\n listStyle: 'none',\n // variants\n '&.swiper-horizontal': {\n touchAction: 'pan-y',\n },\n '&.swiper-vertical': {\n touchAction: 'pan-x',\n '& > .swiper-wrapper': {\n flexDirection: 'column',\n },\n },\n '&.swiper-autoheight': {\n height: 'auto',\n '& > .swiper-wrapper': {\n alignItems: 'flex-start',\n transitionProperty: 'transform, height',\n },\n },\n // wrapper of all slides\n '& .swiper-wrapper': {\n position: 'relative',\n width: '100%',\n height: '100%',\n zIndex: (theme) => theme.zIndex.carousel,\n display: 'flex',\n transitionProperty: 'transform',\n transitionTimingFunction: 'var(--swiper-wrapper-transition-timing-function, initial)',\n boxSizing: 'content-box',\n transform: 'translate3d(0px, 0, 0)',\n },\n // peek effect\n ...(effect !== 'fade' && {\n '&.peeking .swiper-wrapper > .swiper-slide': {\n transitionProperty: 'transform',\n transitionDuration: `${peekSpeed}ms`,\n transitionTimingFunction: 'var(--swiper-wrapper-transition-timing-function, initial)',\n },\n '&.peek-next .swiper-wrapper > .swiper-slide': {\n transform: (theme) => `translate3D(${theme.direction === 'rtl' ? '' : '-'}${peekDistance}px, 0, 0)`,\n },\n '&.peek-prev .swiper-wrapper > .swiper-slide': {\n transform: (theme) => `translate3D(${theme.direction === 'rtl' ? '-' : ''}${peekDistance}px, 0, 0)`,\n },\n }),\n // swiper internal\n // live region of the Swiper A11y module, style taken from swiper/css/a11y\n '& > .swiper-notification': {\n position: 'absolute',\n left: '0',\n top: '0',\n pointerEvents: 'none',\n opacity: '0',\n zIndex: '-1000',\n },\n '.swiper-slide-invisible-blank': {\n visibility: 'hidden',\n },\n '.swiper-backface-hidden .swiper-slide': {\n transform: 'translateZ(0)',\n WebkitBackfaceVisibility: 'hidden',\n backfaceVisibility: 'hidden',\n },\n // does not include CSS Mode, 3D Shadows, lazy loading\n },\n sx,\n )}\n >\n {children}\n </Box>\n );\n },\n);\n"],"names":["Carousel","forwardRef","children","sx","onInit","effect","autoplay","parallax","a11y","peekDistance","peekSpeed","rest","ref","slides","Children","toArray","filter","child","isValidElement","_jsx","Box","component","Swiper","spaceBetween","autoHeight","loop","keyboard","enabled","modules","A11y","Keyboard","EffectFade","Autoplay","Parallax","some","slide","undefined","props","role","slideRole","slideLabelMessage","onSwiper","sxOverride","display","ml","mr","p","maxWidth","position","zIndex","theme","carousel","overflow","listStyle","touchAction","flexDirection","height","alignItems","transitionProperty","width","transitionTimingFunction","boxSizing","transform","transitionDuration","direction","left","top","pointerEvents","opacity","visibility","WebkitBackfaceVisibility","backfaceVisibility"],"mappings":"yVAiCO,MAAMA,EAAoCC,EAC/C,EAAGC,WAAUC,KAAIC,SAAQC,SAAQC,WAAUC,WAAUC,OAAMC,eAAe,IAAKC,YAAY,OAAQC,GAAQC,KACzG,MAAMC,EAASC,EAASC,QAAQb,GAAUc,OAAQC,GAAUC,EAA4CD,IAExG,OACEE,EAACC,EAAG,CACFC,UAAWC,EACXC,aAAc,EACdC,cACAC,MAAI,EACJC,SAAU,CACRC,SAAS,GAEXC,QAAS,CACPC,EACAC,KACe,SAAXzB,EAAoB,CAAC0B,GAAc,MACnCzB,EAAW,CAAC0B,GAAY,MACxBzB,EAAW,CAAC0B,GAAY,IAE9B1B,SAAUA,EACVF,OAAQA,EACRC,SAAUA,EACVE,KACkB,kBAATA,EACHA,EACA,IAEMK,EAAOqB,KAAMC,QAAgCC,IAAtBD,EAAME,OAAOC,OAAuB,CAAEC,UAAW,OACxE1B,EAAOqB,KAAMC,QAA0CC,IAAhCD,EAAME,QAAQ,gBAAgC,CAAEG,kBAAmB,OAC3FhC,GAGXI,IAAKA,KACDD,EACJ8B,SAAUrC,mBACMM,EAChBP,GAAIuC,EACF,CAEEC,QAAS,QACTC,GAAI,OACJC,GAAI,OACJC,EAAG,IACHC,SAAU,OAEVC,SAAU,WACVC,OAASC,GAAUA,EAAMD,OAAOE,SAChCC,SAAU,SAEVC,UAAW,OAEX,sBAAuB,CACrBC,YAAa,SAEf,oBAAqB,CACnBA,YAAa,QACb,sBAAuB,CACrBC,cAAe,WAGnB,sBAAuB,CACrBC,OAAQ,OACR,sBAAuB,CACrBC,WAAY,aACZC,mBAAoB,sBAIxB,oBAAqB,CACnBV,SAAU,WACVW,MAAO,OACPH,OAAQ,OACRP,OAASC,GAAUA,EAAMD,OAAOE,SAChCR,QAAS,OACTe,mBAAoB,YACpBE,yBAA0B,4DAC1BC,UAAW,cACXC,UAAW,6BAGE,SAAXzD,GAAqB,CACvB,4CAA6C,CAC3CqD,mBAAoB,YACpBK,mBAAoB,GAAGrD,MACvBkD,yBAA0B,6DAE5B,8CAA+C,CAC7CE,UAAYZ,GAAU,eAAmC,QAApBA,EAAMc,UAAsB,GAAK,MAAMvD,cAE9E,8CAA+C,CAC7CqD,UAAYZ,GAAU,eAAmC,QAApBA,EAAMc,UAAsB,IAAM,KAAKvD,eAKhF,2BAA4B,CAC1BuC,SAAU,WACViB,KAAM,IACNC,IAAK,IACLC,cAAe,OACfC,QAAS,IACTnB,OAAQ,SAEV,gCAAiC,CAC/BoB,WAAY,UAEd,wCAAyC,CACvCP,UAAW,gBACXQ,yBAA0B,SAC1BC,mBAAoB,WAIxBpE,GACDD,SAEAA"}
@@ -1,2 +1,2 @@
1
- import{jsxs as o,Fragment as r,jsx as e}from"react/jsx-runtime";import{useMemo as t}from"react";import{useCarousel as n,useCarouselPeekEffect as s}from"./hooks.js";import{useTheme as i,useMediaQuery as a,IconButton as c}from"@mui/material";import{ChevronLeftIcon as l}from"../icon/stroke/ChevronLeftIcon.js";import{ChevronRightIcon as p}from"../icon/stroke/ChevronRightIcon.js";import{ArrowLeftIcon as d}from"../icon/stroke/ArrowLeftIcon.js";import{ArrowRightIcon as m}from"../icon/stroke/ArrowRightIcon.js";import{getInteractiveStyle as x}from"../../materialui/button/interactive.js";import{sxOverride as u}from"../../utils/sxOverride/sxOverride.js";function f({carousel:f,peekEffect:b=!1,prevButtonProps:v,prevIconProps:k,PrevIconComponent:I,nextButtonProps:g,nextIconProps:h,NextIconComponent:C,arrows:j=!0,onBackground:P=!1,autoHideNavigation:y=!1}){const M=n(),E=f||M,L="fade"!==E?.params?.effect&&b,w=i(),B=a(w.breakpoints.up("md")),{sx:N,...S}=v||{},{sx:z,...A}=g||{},[O,R]=s(E),H=I||(j?d:l),q=C||(j?m:p),D=t(()=>({position:"absolute",zIndex:"100",top:"50%",width:{xs:"32px",md:"40px",xl:"44px"},height:{xs:"32px",md:"40px",xl:"44px"},mt:{xs:"-16px",md:"-20px",xl:"-22px"},"& .MuiSvgIcon-root":{fontSize:{xs:"17px",xl:"20px"}},...x({color:"text.primary",borderColor:P?"transparent":"onSurface.os100",backgroundColor:P?"transparent":"surface.primary"},{backgroundColor:"surface.secondary"}),"&.Mui-disabled":{color:"disabled.tertiary",borderColor:P?"transparent":"disabled.secondary",backgroundColor:P?"transparent":"disabled.secondary"}}),[]);return y&&E?.isLocked?null:o(r,{children:[e(c,{disabled:E&&!E.params?.loop&&E.isBeginning,onClick:()=>{E?.slidePrev(),L&&O&&R("reset")},onMouseEnter:()=>B&&L&&R("prev"),onMouseLeave:()=>L&&O&&R("reset"),sx:u({...D,insetInlineStart:"16px"},N),"aria-label":"Previous slide","aria-controls":"carousel",color:"surface",size:"medium",...S,children:"rtl"===w.direction?e(q,{...k}):e(H,{...k})}),e(c,{disabled:E&&!E.params?.loop&&E.isEnd,onClick:()=>{E?.slideNext(),L&&O&&R("reset")},onMouseEnter:()=>B&&L&&R("next"),onMouseLeave:()=>L&&O&&R("reset"),sx:u({...D,insetInlineEnd:"16px"},z),"aria-label":"Next slide","aria-controls":"carousel",color:"surface",...A,children:"rtl"===w.direction?e(H,{...h}):e(q,{...h})})]})}export{f as CarouselNavigation};
1
+ import{jsxs as r,Fragment as o,jsx as e}from"react/jsx-runtime";import{useRef as n,useMemo as t,useEffect as i}from"react";import{useCarousel as s,useCarouselPeekEffect as a}from"./hooks.js";import{useTheme as l,useMediaQuery as c,useForkRef as p,IconButton as u}from"@mui/material";import{ChevronLeftIcon as d}from"../icon/stroke/ChevronLeftIcon.js";import{ChevronRightIcon as x}from"../icon/stroke/ChevronRightIcon.js";import{ArrowLeftIcon as m}from"../icon/stroke/ArrowLeftIcon.js";import{ArrowRightIcon as f}from"../icon/stroke/ArrowRightIcon.js";import{getInteractiveStyle as v}from"../../materialui/button/interactive.js";import{sxOverride as b}from"../../utils/sxOverride/sxOverride.js";function k({carousel:k,peekEffect:C=!1,prevButtonProps:I,prevIconProps:g,PrevIconComponent:h,nextButtonProps:j,nextIconProps:P,NextIconComponent:y,arrows:M=!0,onBackground:E=!1,autoHideNavigation:L=!1}){const w=s(),B=k||w,N="fade"!==B?.params?.effect&&C,S=l(),z=c(S.breakpoints.up("md")),{sx:A,ref:O,onClick:R,...H}=I||{},{sx:q,ref:D,onClick:F,...G}=j||{},J=n(null),K=n(null),Q=p(O,J),T=p(D,K),U=n(null),V=!!B&&!B.params?.loop&&B.isBeginning,W=!!B&&!B.params?.loop&&B.isEnd,[X,Y]=a(B),Z=h||(M?m:d),$=y||(M?f:x),_=t(()=>({position:"absolute",zIndex:"100",top:"50%",width:{xs:"32px",md:"40px",xl:"44px"},height:{xs:"32px",md:"40px",xl:"44px"},mt:{xs:"-16px",md:"-20px",xl:"-22px"},"& .MuiSvgIcon-root":{fontSize:{xs:"17px",xl:"20px"}},...v({color:"text.primary",borderColor:E?"transparent":"onSurface.os100",backgroundColor:E?"transparent":"surface.primary"},{backgroundColor:"surface.secondary"}),"&.Mui-disabled":{color:"disabled.tertiary",borderColor:E?"transparent":"disabled.secondary",backgroundColor:E?"transparent":"disabled.secondary"}}),[]);return i(()=>{V&&!W&&"prev"===U.current&&K.current?.focus(),W&&!V&&"next"===U.current&&J.current?.focus(),U.current=null},[V,W]),L&&B?.isLocked?null:r(o,{children:[e(u,{disabled:V,onClick:r=>{R?.(r),U.current=0===r.detail?"prev":null,B?.slidePrev(),N&&X&&Y("reset")},onMouseEnter:()=>z&&N&&Y("prev"),onMouseLeave:()=>N&&X&&Y("reset"),sx:b({..._,insetInlineStart:"16px"},A),"aria-label":"Previous slide","aria-controls":"carousel",color:"surface",size:"medium",ref:Q,...H,children:"rtl"===S.direction?e($,{...g}):e(Z,{...g})}),e(u,{disabled:W,onClick:r=>{F?.(r),U.current=0===r.detail?"next":null,B?.slideNext(),N&&X&&Y("reset")},onMouseEnter:()=>z&&N&&Y("next"),onMouseLeave:()=>N&&X&&Y("reset"),sx:b({..._,insetInlineEnd:"16px"},q),"aria-label":"Next slide","aria-controls":"carousel",color:"surface",ref:T,...G,children:"rtl"===S.direction?e(Z,{...P}):e($,{...P})})]})}export{k as CarouselNavigation};
2
2
  //# sourceMappingURL=Navigation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation.js","sources":["../../../src/components/carousel/Navigation.tsx"],"sourcesContent":["import React, { useMemo, ComponentType } from 'react';\nimport { useCarousel, useCarouselPeekEffect } from './hooks';\nimport { useTheme, IconButton, IconButtonProps, SvgIconProps, useMediaQuery } from '@mui/material';\nimport type { Swiper as CarouselInstance } from 'swiper';\nimport { ChevronLeftIcon } from '@/src/components/icon/stroke/ChevronLeftIcon';\nimport { ChevronRightIcon } from '@/src/components/icon/stroke/ChevronRightIcon';\nimport { ArrowLeftIcon } from '@/src/components/icon/stroke/ArrowLeftIcon';\nimport { ArrowRightIcon } from '@/src/components/icon/stroke/ArrowRightIcon';\nimport { getInteractiveStyle } from '@/src/materialui/button/interactive';\nimport { sxOverride } from '@/src/utils/sxOverride';\n\nexport interface CarouselNavigationProps {\n /**\n * Optional Carousel instance from useCarouselInstance hook\n */\n carousel?: CarouselInstance;\n /**\n * Enable/disable peek effect on hover\n * @default: false\n */\n peekEffect?: boolean;\n /**\n * Previous Slide IconButton\n */\n prevButtonProps?: Partial<IconButtonProps>;\n /**\n * Previous icon props\n */\n prevIconProps?: SvgIconProps;\n /**\n * Previous icon node\n */\n PrevIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Next Slide IconButton\n */\n nextButtonProps?: Partial<IconButtonProps>;\n /**\n * Previous icon props\n */\n nextIconProps?: SvgIconProps;\n /**\n * Next icon node\n */\n NextIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Replaces Chevrons with Arrows\n * @default true\n */\n arrows?: boolean;\n /**\n * Enable if placing on a plain background (not on top of an image/video)\n * @default false\n */\n onBackground?: boolean;\n /**\n * Hide navigation buttons on case there are not enough slides for sliding\n * @default false\n */\n autoHideNavigation?: boolean;\n}\n\n/**\n * Left & Right navigation arrows\n */\nexport function CarouselNavigation({\n carousel: carouselProp,\n peekEffect: propPeekEffect = false,\n prevButtonProps,\n prevIconProps,\n PrevIconComponent,\n nextButtonProps,\n nextIconProps,\n NextIconComponent,\n arrows = true,\n onBackground = false,\n autoHideNavigation = false,\n}: CarouselNavigationProps) {\n const carouselHook = useCarousel();\n const carousel = carouselProp || carouselHook;\n const peekEffect = carousel?.params?.effect !== 'fade' && propPeekEffect;\n const theme = useTheme();\n const upMD = useMediaQuery(theme.breakpoints.up('md'));\n const { sx: prevSx, ...restPrev } = prevButtonProps || {};\n const { sx: nextSx, ...restNext } = nextButtonProps || {};\n const [peek, setPeek] = useCarouselPeekEffect(carousel);\n const PrevIcon = PrevIconComponent || (arrows ? ArrowLeftIcon : ChevronLeftIcon);\n const NextIcon = NextIconComponent || (arrows ? ArrowRightIcon : ChevronRightIcon);\n\n // shared style between buttons\n const sharedSx = useMemo(\n () => ({\n // absolute inside the carousel position\n position: 'absolute',\n zIndex: '100',\n top: '50%',\n // responsive\n width: { xs: '32px', md: '40px', xl: '44px' },\n height: { xs: '32px', md: '40px', xl: '44px' },\n // manual v-align, half the icon size\n mt: { xs: '-16px', md: '-20px', xl: '-22px' },\n '& .MuiSvgIcon-root': {\n fontSize: { xs: '17px', xl: '20px' },\n },\n // highlight border\n ...getInteractiveStyle(\n {\n color: 'text.primary',\n borderColor: onBackground ? 'transparent' : 'onSurface.os100',\n backgroundColor: onBackground ? 'transparent' : 'surface.primary',\n },\n {\n backgroundColor: 'surface.secondary',\n },\n ),\n // disabled state\n '&.Mui-disabled': {\n color: 'disabled.tertiary',\n borderColor: onBackground ? 'transparent' : 'disabled.secondary',\n backgroundColor: onBackground ? 'transparent' : 'disabled.secondary',\n },\n }),\n [],\n );\n\n // hide navigation when not needed\n if (autoHideNavigation && carousel?.isLocked) {\n return null;\n }\n return (\n <>\n <IconButton\n disabled={carousel && !carousel.params?.loop && carousel.isBeginning}\n onClick={() => {\n carousel?.slidePrev();\n peekEffect && peek && setPeek('reset');\n }}\n onMouseEnter={() => upMD && peekEffect && setPeek('prev')}\n onMouseLeave={() => peekEffect && peek && setPeek('reset')}\n sx={sxOverride(\n {\n ...sharedSx,\n insetInlineStart: '16px',\n },\n prevSx,\n )}\n aria-label=\"Previous slide\"\n aria-controls=\"carousel\"\n color=\"surface\"\n size=\"medium\"\n {...restPrev}\n >\n {theme.direction === 'rtl' ? <NextIcon {...prevIconProps} /> : <PrevIcon {...prevIconProps} />}\n </IconButton>\n <IconButton\n disabled={carousel && !carousel.params?.loop && carousel.isEnd}\n onClick={() => {\n carousel?.slideNext();\n peekEffect && peek && setPeek('reset');\n }}\n onMouseEnter={() => upMD && peekEffect && setPeek('next')}\n onMouseLeave={() => peekEffect && peek && setPeek('reset')}\n sx={sxOverride(\n {\n ...sharedSx,\n insetInlineEnd: '16px',\n },\n nextSx,\n )}\n aria-label=\"Next slide\"\n aria-controls=\"carousel\"\n color=\"surface\"\n {...restNext}\n >\n {theme.direction === 'rtl' ? <PrevIcon {...nextIconProps} /> : <NextIcon {...nextIconProps} />}\n </IconButton>\n </>\n );\n}\n"],"names":["CarouselNavigation","carousel","carouselProp","peekEffect","propPeekEffect","prevButtonProps","prevIconProps","PrevIconComponent","nextButtonProps","nextIconProps","NextIconComponent","arrows","onBackground","autoHideNavigation","carouselHook","useCarousel","params","effect","theme","useTheme","upMD","useMediaQuery","breakpoints","up","sx","prevSx","restPrev","nextSx","restNext","peek","setPeek","useCarouselPeekEffect","PrevIcon","ArrowLeftIcon","ChevronLeftIcon","NextIcon","ArrowRightIcon","ChevronRightIcon","sharedSx","useMemo","position","zIndex","top","width","xs","md","xl","height","mt","fontSize","getInteractiveStyle","color","borderColor","backgroundColor","isLocked","_jsxs","_jsx","IconButton","disabled","loop","isBeginning","onClick","slidePrev","onMouseEnter","onMouseLeave","sxOverride","insetInlineStart","size","children","direction","isEnd","slideNext","insetInlineEnd"],"mappings":"opBAiEgBA,GACdC,SAAUC,EACVC,WAAYC,GAAiB,EAAKC,gBAClCA,EAAeC,cACfA,EAAaC,kBACbA,EAAiBC,gBACjBA,EAAeC,cACfA,EAAaC,kBACbA,EAAiBC,OACjBA,GAAS,EAAIC,aACbA,GAAe,EAAKC,mBACpBA,GAAqB,IAErB,MAAMC,EAAeC,IACfd,EAAWC,GAAgBY,EAC3BX,EAA0C,SAA7BF,GAAUe,QAAQC,QAAqBb,EACpDc,EAAQC,IACRC,EAAOC,EAAcH,EAAMI,YAAYC,GAAG,QACxCC,GAAIC,KAAWC,GAAarB,GAAmB,CAAA,GAC/CmB,GAAIG,KAAWC,GAAapB,GAAmB,CAAA,GAChDqB,EAAMC,GAAWC,EAAsB9B,GACxC+B,EAAWzB,IAAsBI,EAASsB,EAAgBC,GAC1DC,EAAWzB,IAAsBC,EAASyB,EAAiBC,GAG3DC,EAAWC,EACf,KAAA,CAEEC,SAAU,WACVC,OAAQ,MACRC,IAAK,MAELC,MAAO,CAAEC,GAAI,OAAQC,GAAI,OAAQC,GAAI,QACrCC,OAAQ,CAAEH,GAAI,OAAQC,GAAI,OAAQC,GAAI,QAEtCE,GAAI,CAAEJ,GAAI,QAASC,GAAI,QAASC,GAAI,SACpC,qBAAsB,CACpBG,SAAU,CAAEL,GAAI,OAAQE,GAAI,YAG3BI,EACD,CACEC,MAAO,eACPC,YAAaxC,EAAe,cAAgB,kBAC5CyC,gBAAiBzC,EAAe,cAAgB,mBAElD,CACEyC,gBAAiB,sBAIrB,iBAAkB,CAChBF,MAAO,oBACPC,YAAaxC,EAAe,cAAgB,qBAC5CyC,gBAAiBzC,EAAe,cAAgB,wBAGpD,IAIF,OAAIC,GAAsBZ,GAAUqD,SAC3B,KAGPC,eACEC,EAACC,GACCC,SAAUzD,IAAaA,EAASe,QAAQ2C,MAAQ1D,EAAS2D,YACzDC,QAAS,KACP5D,GAAU6D,YACV3D,GAAc0B,GAAQC,EAAQ,UAEhCiC,aAAc,IAAM3C,GAAQjB,GAAc2B,EAAQ,QAClDkC,aAAc,IAAM7D,GAAc0B,GAAQC,EAAQ,SAClDN,GAAIyC,EACF,IACK3B,EACH4B,iBAAkB,QAEpBzC,GACD,aACU,iBAAgB,gBACb,WACd0B,MAAM,UACNgB,KAAK,YACDzC,EAAQ0C,SAES,QAApBlD,EAAMmD,UAAsBb,EAACrB,EAAQ,IAAK7B,IAAoBkD,EAACxB,EAAQ,IAAK1B,MAE/EkD,EAACC,EAAU,CACTC,SAAUzD,IAAaA,EAASe,QAAQ2C,MAAQ1D,EAASqE,MACzDT,QAAS,KACP5D,GAAUsE,YACVpE,GAAc0B,GAAQC,EAAQ,UAEhCiC,aAAc,IAAM3C,GAAQjB,GAAc2B,EAAQ,QAClDkC,aAAc,IAAM7D,GAAc0B,GAAQC,EAAQ,SAClDN,GAAIyC,EACF,IACK3B,EACHkC,eAAgB,QAElB7C,GACD,aACU,aAAY,gBACT,WACdwB,MAAM,aACFvB,EAAQwC,SAES,QAApBlD,EAAMmD,UAAsBb,EAACxB,EAAQ,IAAKvB,IAAoB+C,EAACrB,EAAQ,IAAK1B,QAIrF"}
1
+ {"version":3,"file":"Navigation.js","sources":["../../../src/components/carousel/Navigation.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useRef, ComponentType, MouseEvent } from 'react';\nimport { useCarousel, useCarouselPeekEffect } from './hooks';\nimport { useTheme, IconButton, IconButtonProps, SvgIconProps, useForkRef, useMediaQuery } from '@mui/material';\nimport type { Swiper as CarouselInstance } from 'swiper';\nimport { ChevronLeftIcon } from '@/src/components/icon/stroke/ChevronLeftIcon';\nimport { ChevronRightIcon } from '@/src/components/icon/stroke/ChevronRightIcon';\nimport { ArrowLeftIcon } from '@/src/components/icon/stroke/ArrowLeftIcon';\nimport { ArrowRightIcon } from '@/src/components/icon/stroke/ArrowRightIcon';\nimport { getInteractiveStyle } from '@/src/materialui/button/interactive';\nimport { sxOverride } from '@/src/utils/sxOverride';\n\nexport interface CarouselNavigationProps {\n /**\n * Optional Carousel instance from useCarouselInstance hook\n */\n carousel?: CarouselInstance;\n /**\n * Enable/disable peek effect on hover\n * @default: false\n */\n peekEffect?: boolean;\n /**\n * Previous Slide IconButton\n */\n prevButtonProps?: Partial<IconButtonProps>;\n /**\n * Previous icon props\n */\n prevIconProps?: SvgIconProps;\n /**\n * Previous icon node\n */\n PrevIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Next Slide IconButton\n */\n nextButtonProps?: Partial<IconButtonProps>;\n /**\n * Previous icon props\n */\n nextIconProps?: SvgIconProps;\n /**\n * Next icon node\n */\n NextIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Replaces Chevrons with Arrows\n * @default true\n */\n arrows?: boolean;\n /**\n * Enable if placing on a plain background (not on top of an image/video)\n * @default false\n */\n onBackground?: boolean;\n /**\n * Hide navigation buttons on case there are not enough slides for sliding\n * @default false\n */\n autoHideNavigation?: boolean;\n}\n\n/**\n * Left & Right navigation arrows\n */\nexport function CarouselNavigation({\n carousel: carouselProp,\n peekEffect: propPeekEffect = false,\n prevButtonProps,\n prevIconProps,\n PrevIconComponent,\n nextButtonProps,\n nextIconProps,\n NextIconComponent,\n arrows = true,\n onBackground = false,\n autoHideNavigation = false,\n}: CarouselNavigationProps) {\n const carouselHook = useCarousel();\n const carousel = carouselProp || carouselHook;\n const peekEffect = carousel?.params?.effect !== 'fade' && propPeekEffect;\n const theme = useTheme();\n const upMD = useMediaQuery(theme.breakpoints.up('md'));\n const { sx: prevSx, ref: prevRefProp, onClick: onPrevClick, ...restPrev } = prevButtonProps || {};\n const { sx: nextSx, ref: nextRefProp, onClick: onNextClick, ...restNext } = nextButtonProps || {};\n const prevRef = useRef<HTMLButtonElement>(null);\n const nextRef = useRef<HTMLButtonElement>(null);\n const handlePrevRef = useForkRef(prevRefProp, prevRef);\n const handleNextRef = useForkRef(nextRefProp, nextRef);\n // arrow activated by keyboard, it loses focus to the page once it gets disabled at the edge\n const keyboardArrow = useRef<'prev' | 'next' | null>(null);\n const prevDisabled = !!carousel && !carousel.params?.loop && carousel.isBeginning;\n const nextDisabled = !!carousel && !carousel.params?.loop && carousel.isEnd;\n const [peek, setPeek] = useCarouselPeekEffect(carousel);\n const PrevIcon = PrevIconComponent || (arrows ? ArrowLeftIcon : ChevronLeftIcon);\n const NextIcon = NextIconComponent || (arrows ? ArrowRightIcon : ChevronRightIcon);\n\n // shared style between buttons\n const sharedSx = useMemo(\n () => ({\n // absolute inside the carousel position\n position: 'absolute',\n zIndex: '100',\n top: '50%',\n // responsive\n width: { xs: '32px', md: '40px', xl: '44px' },\n height: { xs: '32px', md: '40px', xl: '44px' },\n // manual v-align, half the icon size\n mt: { xs: '-16px', md: '-20px', xl: '-22px' },\n '& .MuiSvgIcon-root': {\n fontSize: { xs: '17px', xl: '20px' },\n },\n // highlight border\n ...getInteractiveStyle(\n {\n color: 'text.primary',\n borderColor: onBackground ? 'transparent' : 'onSurface.os100',\n backgroundColor: onBackground ? 'transparent' : 'surface.primary',\n },\n {\n backgroundColor: 'surface.secondary',\n },\n ),\n // disabled state\n '&.Mui-disabled': {\n color: 'disabled.tertiary',\n borderColor: onBackground ? 'transparent' : 'disabled.secondary',\n backgroundColor: onBackground ? 'transparent' : 'disabled.secondary',\n },\n }),\n [],\n );\n\n // keep keyboard focus in the navigation, hand it over to the other arrow at the edge\n useEffect(() => {\n if (prevDisabled && !nextDisabled && keyboardArrow.current === 'prev') {\n nextRef.current?.focus();\n }\n if (nextDisabled && !prevDisabled && keyboardArrow.current === 'next') {\n prevRef.current?.focus();\n }\n keyboardArrow.current = null;\n }, [prevDisabled, nextDisabled]);\n\n // hide navigation when not needed\n if (autoHideNavigation && carousel?.isLocked) {\n return null;\n }\n return (\n <>\n <IconButton\n disabled={prevDisabled}\n onClick={(event: MouseEvent<HTMLButtonElement>) => {\n onPrevClick?.(event);\n // detail is 0 for a click triggered by Enter or Space\n keyboardArrow.current = event.detail === 0 ? 'prev' : null;\n carousel?.slidePrev();\n peekEffect && peek && setPeek('reset');\n }}\n onMouseEnter={() => upMD && peekEffect && setPeek('prev')}\n onMouseLeave={() => peekEffect && peek && setPeek('reset')}\n sx={sxOverride(\n {\n ...sharedSx,\n insetInlineStart: '16px',\n },\n prevSx,\n )}\n aria-label=\"Previous slide\"\n aria-controls=\"carousel\"\n color=\"surface\"\n size=\"medium\"\n ref={handlePrevRef}\n {...restPrev}\n >\n {theme.direction === 'rtl' ? <NextIcon {...prevIconProps} /> : <PrevIcon {...prevIconProps} />}\n </IconButton>\n <IconButton\n disabled={nextDisabled}\n onClick={(event: MouseEvent<HTMLButtonElement>) => {\n onNextClick?.(event);\n // detail is 0 for a click triggered by Enter or Space\n keyboardArrow.current = event.detail === 0 ? 'next' : null;\n carousel?.slideNext();\n peekEffect && peek && setPeek('reset');\n }}\n onMouseEnter={() => upMD && peekEffect && setPeek('next')}\n onMouseLeave={() => peekEffect && peek && setPeek('reset')}\n sx={sxOverride(\n {\n ...sharedSx,\n insetInlineEnd: '16px',\n },\n nextSx,\n )}\n aria-label=\"Next slide\"\n aria-controls=\"carousel\"\n color=\"surface\"\n ref={handleNextRef}\n {...restNext}\n >\n {theme.direction === 'rtl' ? <PrevIcon {...nextIconProps} /> : <NextIcon {...nextIconProps} />}\n </IconButton>\n </>\n );\n}\n"],"names":["CarouselNavigation","carousel","carouselProp","peekEffect","propPeekEffect","prevButtonProps","prevIconProps","PrevIconComponent","nextButtonProps","nextIconProps","NextIconComponent","arrows","onBackground","autoHideNavigation","carouselHook","useCarousel","params","effect","theme","useTheme","upMD","useMediaQuery","breakpoints","up","sx","prevSx","ref","prevRefProp","onClick","onPrevClick","restPrev","nextSx","nextRefProp","onNextClick","restNext","prevRef","useRef","nextRef","handlePrevRef","useForkRef","handleNextRef","keyboardArrow","prevDisabled","loop","isBeginning","nextDisabled","isEnd","peek","setPeek","useCarouselPeekEffect","PrevIcon","ArrowLeftIcon","ChevronLeftIcon","NextIcon","ArrowRightIcon","ChevronRightIcon","sharedSx","useMemo","position","zIndex","top","width","xs","md","xl","height","mt","fontSize","getInteractiveStyle","color","borderColor","backgroundColor","useEffect","current","focus","isLocked","_jsxs","_Fragment","children","_jsx","IconButton","disabled","event","detail","slidePrev","onMouseEnter","onMouseLeave","sxOverride","insetInlineStart","size","direction","slideNext","insetInlineEnd"],"mappings":"+rBAiEgBA,GACdC,SAAUC,EACVC,WAAYC,GAAiB,EAAKC,gBAClCA,EAAeC,cACfA,EAAaC,kBACbA,EAAiBC,gBACjBA,EAAeC,cACfA,EAAaC,kBACbA,EAAiBC,OACjBA,GAAS,EAAIC,aACbA,GAAe,EAAKC,mBACpBA,GAAqB,IAErB,MAAMC,EAAeC,IACfd,EAAWC,GAAgBY,EAC3BX,EAA0C,SAA7BF,GAAUe,QAAQC,QAAqBb,EACpDc,EAAQC,IACRC,EAAOC,EAAcH,EAAMI,YAAYC,GAAG,QACxCC,GAAIC,EAAQC,IAAKC,EAAaC,QAASC,KAAgBC,GAAazB,GAAmB,CAAA,GACvFmB,GAAIO,EAAQL,IAAKM,EAAaJ,QAASK,KAAgBC,GAAa1B,GAAmB,CAAA,EACzF2B,EAAUC,EAA0B,MACpCC,EAAUD,EAA0B,MACpCE,EAAgBC,EAAWZ,EAAaQ,GACxCK,EAAgBD,EAAWP,EAAaK,GAExCI,EAAgBL,EAA+B,MAC/CM,IAAiBzC,IAAaA,EAASe,QAAQ2B,MAAQ1C,EAAS2C,YAChEC,IAAiB5C,IAAaA,EAASe,QAAQ2B,MAAQ1C,EAAS6C,OAC/DC,EAAMC,GAAWC,EAAsBhD,GACxCiD,EAAW3C,IAAsBI,EAASwC,EAAgBC,GAC1DC,EAAW3C,IAAsBC,EAAS2C,EAAiBC,GAG3DC,EAAWC,EACf,KAAA,CAEEC,SAAU,WACVC,OAAQ,MACRC,IAAK,MAELC,MAAO,CAAEC,GAAI,OAAQC,GAAI,OAAQC,GAAI,QACrCC,OAAQ,CAAEH,GAAI,OAAQC,GAAI,OAAQC,GAAI,QAEtCE,GAAI,CAAEJ,GAAI,QAASC,GAAI,QAASC,GAAI,SACpC,qBAAsB,CACpBG,SAAU,CAAEL,GAAI,OAAQE,GAAI,YAG3BI,EACD,CACEC,MAAO,eACPC,YAAa1D,EAAe,cAAgB,kBAC5C2D,gBAAiB3D,EAAe,cAAgB,mBAElD,CACE2D,gBAAiB,sBAIrB,iBAAkB,CAChBF,MAAO,oBACPC,YAAa1D,EAAe,cAAgB,qBAC5C2D,gBAAiB3D,EAAe,cAAgB,wBAGpD,IAeF,OAXA4D,EAAU,KACJ9B,IAAiBG,GAA0C,SAA1BJ,EAAcgC,SACjDpC,EAAQoC,SAASC,QAEf7B,IAAiBH,GAA0C,SAA1BD,EAAcgC,SACjDtC,EAAQsC,SAASC,QAEnBjC,EAAcgC,QAAU,MACvB,CAAC/B,EAAcG,IAGdhC,GAAsBZ,GAAU0E,SAC3B,KAGPC,EAAAC,EAAA,CAAAC,SAAA,CACEC,EAACC,GACCC,SAAUvC,EACVd,QAAUsD,IACRrD,IAAcqD,GAEdzC,EAAcgC,QAA2B,IAAjBS,EAAMC,OAAe,OAAS,KACtDlF,GAAUmF,YACVjF,GAAc4C,GAAQC,EAAQ,UAEhCqC,aAAc,IAAMjE,GAAQjB,GAAc6C,EAAQ,QAClDsC,aAAc,IAAMnF,GAAc4C,GAAQC,EAAQ,SAClDxB,GAAI+D,EACF,IACK/B,EACHgC,iBAAkB,QAEpB/D,GACD,aACU,iBAAgB,gBACb,WACd4C,MAAM,UACNoB,KAAK,SACL/D,IAAKY,KACDR,EAAQgD,SAES,QAApB5D,EAAMwE,UAAsBX,EAAC1B,EAAQ,IAAK/C,IAAoByE,EAAC7B,EAAQ,IAAK5C,MAE/EyE,EAACC,EAAU,CACTC,SAAUpC,EACVjB,QAAUsD,IACRjD,IAAciD,GAEdzC,EAAcgC,QAA2B,IAAjBS,EAAMC,OAAe,OAAS,KACtDlF,GAAU0F,YACVxF,GAAc4C,GAAQC,EAAQ,UAEhCqC,aAAc,IAAMjE,GAAQjB,GAAc6C,EAAQ,QAClDsC,aAAc,IAAMnF,GAAc4C,GAAQC,EAAQ,SAClDxB,GAAI+D,EACF,IACK/B,EACHoC,eAAgB,QAElB7D,GACD,aACU,aAAY,gBACT,WACdsC,MAAM,UACN3C,IAAKc,KACDN,EAAQ4C,SAES,QAApB5D,EAAMwE,UAAsBX,EAAC7B,EAAQ,IAAKzC,IAAoBsE,EAAC1B,EAAQ,IAAK5C,QAIrF"}
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as o}from"react/jsx-runtime";import{forwardRef as e,useMemo as s,useState as t,useRef as n,useEffect as i}from"react";import{Box as a,Button as l,Slider as c}from"@mui/material";import{sxOverride as d}from"../../utils/sxOverride/sxOverride.js";import{useCarousel as p}from"./hooks.js";import{getInteractiveStyle as u}from"../../materialui/button/interactive.js";import{SliderContainer as x}from"../../materialui/slider/SliderContainer.js";const m=e(({carousel:o,position:e,variant:t,sx:n,...i},a)=>{const l=p(),c=o||l,u=s(()=>{switch(t){case"scrollbar":return y;case"slider":return b;case"fraction":return h;case"lines":return g;default:return f}},[t]);return r(u,{carousel:c,sx:d({..."inside"===e&&{position:"absolute",zIndex:"90",bottom:"0",left:"0",right:"0"}},n),ref:a,position:e,...i})}),f=e(({carousel:o,dotsWrapperProps:e,dotProps:s,position:t,sx:n,...i},l)=>{const{sx:c,...p}=e??{};return r(a,{sx:d({p:2,display:"flex",alignItems:"center",justifyContent:"center"},n),ref:l,...i,children:r(a,{sx:d({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"1000px",py:.5,px:1,gap:.5,width:12*(o?.slides.length||0)+4*((o?.slides.length||1)-1)+4+16+"px",..."inside"===t&&{backgroundColor:r=>"dark"===r.palette.mode?"surface.primary":"transparent.backdrop"}},c),...p,children:o?.slides?.map((e,t)=>{const n=!o?.params?.loop&&o?.isEnd&&t===(o?.slides.length||0)-1||(!o?.isEnd||o.params?.loop)&&t===o?.realIndex,{sx:i,...l}=("function"==typeof s?s(t,n):s)??{};return r(a,{className:n?"active":void 0,sx:d({p:"0",width:"12px",height:"12px",transform:"scale(0.6667)",borderRadius:"100%",backgroundColor:"onSurface.os500",transition:"transform 0.3s ease-out, background-color 0.3s ease-out, margin 0.3s ease-out","&.active":{transform:"scale(1)",backgroundColor:"text.primary",margin:"0 2px"}},i),...l},t)})})})}),h=e(({carousel:e,buttonProps:s,position:t,sx:n,...i},c)=>{const{sx:p,...x}=s??{};return r(a,{sx:d({display:"flex",alignItems:"center",justifyContent:"center",p:2},n),ref:c,...i,children:r(l,{variant:"text","aria-controls":"carousel",sx:d({px:2,py:.25,borderRadius:"4px",fontSize:"18px",lineHeight:"28px",letterSpacing:"0.02em",...u({backgroundColor:"transparent.backdrop"},{backgroundColor:"onSurface.os100"})},p),onClick:()=>e?.isEnd&&!e.params?.loop?e?.slideTo(0):e?.slideNext(),...x,children:o(a,{component:"span",children:[r(a,{component:"span",sx:{fontWeight:"700",color:"onSurface.os900"},children:`${(e?.realIndex||0)+1}`}),r(a,{component:"span",sx:{color:"onSurface.os700",fontWeight:"400",mx:.5},children:" / "}),r(a,{component:"span",sx:{color:"onSurface.os700",fontWeight:"300"},children:`${e?.slides.length||0}`})]})})})}),g=e(({carousel:e,sx:s,linesProps:t,lineProgress:n,lineProgressProps:i,position:c,...p},x)=>r(a,{sx:d({display:"flex",alignItems:"center",justifyContent:{xs:"stretch",md:"center"},flexGrow:{xs:"1",md:"0"},gap:1,p:2},s),ref:x,...p,children:e?.slides?.map((s,c)=>{const p=!e?.params?.loop&&e?.isEnd&&c===(e?.slides.length||0)-1||(!e?.isEnd||e.params?.loop)&&c===e?.realIndex,x=c<=(e?.realIndex||0),{sx:m,...f}=("function"==typeof t?t(c,p):t)??{},{sx:h,...g}=("function"==typeof i?i(c,p):i)??{};return o(l,{color:"inherit",className:p?"active":void 0,sx:d({p:0,minHeight:"0",height:p||x?"8px":"4px",borderRadius:p||x?"4px":"2px",width:{xs:"auto",md:"56px"},flexGrow:{xs:"1",md:"0"},justifyContent:"flex-start",...u({backgroundColor:"surface.primary","& .progress-line":{backgroundColor:"brand.secondary"}},{backgroundColor:"surface.secondary","& .progress-line":{backgroundColor:"brandHover.secondary"}})},m),"aria-controls":"carousel",onClick:()=>e?.[e.params?.loop?"slideToLoop":"slideTo"](c),...f,children:[r(a,{sx:{position:"absolute",top:"50%",left:"0",right:"0",height:"24px",transform:"translateY(-50%)",pointerEvents:"auto"}}),r(a,{sx:{borderRadius:"4px",height:"100%",width:"100%",overflow:"hidden"},children:r(a,{className:"progress-line",...p&&{role:"progressbar"},...p&&void 0!==n&&{"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100},sx:d({opacity:void 0!==n||x?"1":"0",width:"100%",backgroundColor:"brand.secondary",height:"100%",transformOrigin:"left",transform:`scaleX(${void 0!==n&&p?n/100:x?1:0})`,transition:(void 0!==n?"transform 300ms ease-in-out, ":"")+"opacity 300ms ease-out, background-color 300ms ease-out"},h),...g})})]},c)})})),b=e(({carousel:o,sliderProps:e,sx:s,progressProps:l,position:p,...u},x)=>{const{sx:m,...f}=e??{},[h,g]=t(Math.round(100*(o?.progress||0))),b=n(!1),[,y]=t({});return i(()=>{b.current||g(Math.round(100*(o?.progress||0)))},[o?.progress]),i(()=>{if(o){const r=()=>{b.current||y({})};return o.on("sliderMove",r),()=>{o.off("sliderMove",r)}}},[o]),r(a,{sx:d({my:2},s),ref:x,...u,children:r(c,{value:h,min:0,max:100,onChange:(r,e)=>{b.current=!0,o?.setProgress(e/100,150),g(e)},onChangeCommitted:()=>{o?.slideToClosest(300),b.current=!1},sx:d({display:"block",height:"4px",py:"14px",".MuiSlider-rail":{color:"surface.primary"},".MuiSlider-track":{color:"onSurface.os500",transitionDuration:`${o?.params?.speed??300}ms`},".MuiSlider-thumb":{display:"none"}},m),"aria-controls":"carousel",...f})})}),y=e(({carousel:o,sliderProps:e,position:n,...a},l)=>{const{sx:c,...p}=e??{},[u,m]=t(!1),[,f]=t({});i(()=>{if(o){const r=()=>m(!0),e=()=>m(!1),s=()=>f({});return o.on("touchStart",r),o.on("touchEnd",e),o.on("resize",s),()=>{o.off("touchStart",r),o.off("touchEnd",e),o.off("resize",s)}}},[o]);const h=s(()=>{if(o?.wrapperEl?.scrollWidth&&o?.width){const r=Math.ceil(o?.width**2/o?.wrapperEl?.scrollWidth);return Math.max(r,40)}return 40},[o?.wrapperEl?.scrollWidth,o?.width]);return r(b,{ref:l,carousel:o,component:x,thumbSize:h,sliderProps:{tabIndex:-1,valueLabelDisplay:"off",sx:d({".MuiSlider-rail, .MuiSlider-track":{color:"surface.primary"},".MuiSlider-thumb":{display:"flex",width:`${h}px`,maxWidth:"none",height:"4px",border:"none",backgroundColor:"onSurface.os500","&:after":{width:`${h}px`},...!u&&{transition:`left ${o?.params?.speed??300}ms ease-out`},"&.Mui-focusVisible":{boxShadow:"none","&:before":{content:"none"}}}},c),...p},...a})});export{m as CarouselPagination,f as DotsVariant,h as FractionVariant,g as LinesVariant,y as ScrollbarVariant,b as SliderVariant};
1
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";import{forwardRef as o,useMemo as s,useState as t,useRef as n,useEffect as i}from"react";import{Box as a,Button as l,Slider as c}from"@mui/material";import{sxOverride as d}from"../../utils/sxOverride/sxOverride.js";import{useCarousel as p}from"./hooks.js";import{getInteractiveStyle as u}from"../../materialui/button/interactive.js";import{SliderContainer as x}from"../../materialui/slider/SliderContainer.js";const m=o(({carousel:e,position:o,variant:t,sx:n,...i},a)=>{const l=p(),c=e||l,u=s(()=>{switch(t){case"scrollbar":return y;case"slider":return b;case"fraction":return h;case"lines":return g;default:return f}},[t]);return r(u,{carousel:c,sx:d({..."inside"===o&&{position:"absolute",zIndex:"90",bottom:"0",left:"0",right:"0"}},n),ref:a,position:o,...i})}),f=o(({carousel:e,dotsWrapperProps:o,dotProps:s,position:t,sx:n,...i},l)=>{const{sx:c,...p}=o??{};return r(a,{sx:d({p:2,display:"flex",alignItems:"center",justifyContent:"center"},n),ref:l,...i,children:r(a,{sx:d({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"1000px",py:.5,px:1,gap:.5,width:12*(e?.slides.length||0)+4*((e?.slides.length||1)-1)+4+16+"px",..."inside"===t&&{backgroundColor:r=>"dark"===r.palette.mode?"surface.primary":"transparent.backdrop"}},c),...p,children:e?.slides?.map((o,t)=>{const n=!e?.params?.loop&&e?.isEnd&&t===(e?.slides.length||0)-1||(!e?.isEnd||e.params?.loop)&&t===e?.realIndex,{sx:i,...l}=("function"==typeof s?s(t,n):s)??{};return r(a,{className:n?"active":void 0,sx:d({p:"0",width:"12px",height:"12px",transform:"scale(0.6667)",borderRadius:"100%",backgroundColor:"onSurface.os500",transition:"transform 0.3s ease-out, background-color 0.3s ease-out, margin 0.3s ease-out","&.active":{transform:"scale(1)",backgroundColor:"text.primary",margin:"0 2px"}},i),...l},t)})})})}),h=o(({carousel:o,buttonProps:s,position:t,sx:n,...i},c)=>{const{sx:p,...x}=s??{};return r(a,{sx:d({display:"flex",alignItems:"center",justifyContent:"center",p:2},n),ref:c,...i,children:r(l,{variant:"text","aria-controls":"carousel",sx:d({px:2,py:.25,borderRadius:"4px",fontSize:"18px",lineHeight:"28px",letterSpacing:"0.02em",...u({backgroundColor:"transparent.backdrop"},{backgroundColor:"onSurface.os100"})},p),onClick:()=>o?.isEnd&&!o.params?.loop?o?.slideTo(0):o?.slideNext(),...x,children:e(a,{component:"span",children:[r(a,{component:"span",sx:{fontWeight:"700",color:"onSurface.os900"},children:`${(o?.realIndex||0)+1}`}),r(a,{component:"span",sx:{color:"onSurface.os700",fontWeight:"400",mx:.5},children:" / "}),r(a,{component:"span",sx:{color:"onSurface.os700",fontWeight:"300"},children:`${o?.slides.length||0}`})]})})})}),g=o(({carousel:o,sx:s,linesProps:t,lineProgress:n,lineProgressProps:i,position:c,...p},x)=>r(a,{sx:d({display:"flex",alignItems:"center",justifyContent:{xs:"stretch",md:"center"},flexGrow:{xs:"1",md:"0"},gap:1,p:2},s),ref:x,...p,children:o?.slides?.map((s,c)=>{const p=!o?.params?.loop&&o?.isEnd&&c===(o?.slides.length||0)-1||(!o?.isEnd||o.params?.loop)&&c===o?.realIndex,x=c<=(o?.realIndex||0),{sx:m,...f}=("function"==typeof t?t(c,p):t)??{},{sx:h,...g}=("function"==typeof i?i(c,p):i)??{};return e(l,{color:"inherit",className:p?"active":void 0,sx:d({p:0,minHeight:"0",height:p||x?"8px":"4px",borderRadius:p||x?"4px":"2px",width:{xs:"auto",md:"56px"},flexGrow:{xs:"1",md:"0"},justifyContent:"flex-start",...u({backgroundColor:"surface.primary","& .progress-line":{backgroundColor:"brand.secondary"}},{backgroundColor:"surface.secondary","& .progress-line":{backgroundColor:"brandHover.secondary"}})},m),"aria-controls":"carousel","aria-label":`Go to slide ${c+1}`,...p&&{"aria-current":!0},onClick:()=>o?.[o.params?.loop?"slideToLoop":"slideTo"](c),...f,children:[r(a,{sx:{position:"absolute",top:"50%",left:"0",right:"0",height:"24px",transform:"translateY(-50%)",pointerEvents:"auto"}}),r(a,{sx:{borderRadius:"4px",height:"100%",width:"100%",overflow:"hidden"},children:r(a,{className:"progress-line",...p&&{role:"progressbar"},...p&&void 0!==n&&{"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100},sx:d({opacity:void 0!==n||x?"1":"0",width:"100%",backgroundColor:"brand.secondary",height:"100%",transformOrigin:"left",transform:`scaleX(${void 0!==n&&p?n/100:x?1:0})`,transition:(void 0!==n?"transform 300ms ease-in-out, ":"")+"opacity 300ms ease-out, background-color 300ms ease-out"},h),...g})})]},c)})})),b=o(({carousel:e,sliderProps:o,sx:s,progressProps:l,position:p,...u},x)=>{const{sx:m,...f}=o??{},[h,g]=t(Math.round(100*(e?.progress||0))),b=n(!1),[,y]=t({});return i(()=>{b.current||g(Math.round(100*(e?.progress||0)))},[e?.progress]),i(()=>{if(e){const r=()=>{b.current||y({})};return e.on("sliderMove",r),()=>{e.off("sliderMove",r)}}},[e]),r(a,{sx:d({my:2},s),ref:x,...u,children:r(c,{value:h,min:0,max:100,onChange:(r,o)=>{b.current=!0,e?.setProgress(o/100,150),g(o)},onChangeCommitted:()=>{e?.slideToClosest(300),b.current=!1},sx:d({display:"block",height:"4px",py:"14px",".MuiSlider-rail":{color:"surface.primary"},".MuiSlider-track":{color:"onSurface.os500",transitionDuration:`${e?.params?.speed??300}ms`},".MuiSlider-thumb":{display:"none"}},m),"aria-controls":"carousel",...f})})}),y=o(({carousel:e,sliderProps:o,position:n,...a},l)=>{const{sx:c,...p}=o??{},[u,m]=t(!1),[,f]=t({});i(()=>{if(e){const r=()=>m(!0),o=()=>m(!1),s=()=>f({});return e.on("touchStart",r),e.on("touchEnd",o),e.on("resize",s),()=>{e.off("touchStart",r),e.off("touchEnd",o),e.off("resize",s)}}},[e]);const h=s(()=>{if(e?.wrapperEl?.scrollWidth&&e?.width){const r=Math.ceil(e?.width**2/e?.wrapperEl?.scrollWidth);return Math.max(r,40)}return 40},[e?.wrapperEl?.scrollWidth,e?.width]);return r(b,{ref:l,carousel:e,component:x,thumbSize:h,sliderProps:{tabIndex:-1,valueLabelDisplay:"off",sx:d({".MuiSlider-rail, .MuiSlider-track":{color:"surface.primary"},".MuiSlider-thumb":{display:"flex",width:`${h}px`,maxWidth:"none",height:"4px",border:"none",backgroundColor:"onSurface.os500","&:after":{width:`${h}px`},...!u&&{transition:`left ${e?.params?.speed??300}ms ease-out`},"&.Mui-focusVisible":{boxShadow:"none","&:before":{content:"none"}}}},c),...p},...a})});export{m as CarouselPagination,f as DotsVariant,h as FractionVariant,g as LinesVariant,y as ScrollbarVariant,b as SliderVariant};
2
2
  //# sourceMappingURL=Pagination.js.map