@skodaflow/web-library 8.2.0 → 8.3.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 (121) hide show
  1. package/cjs/components/advancedTable/agGridSkodaTheme.js +1 -1
  2. package/cjs/components/advancedTable/agGridSkodaTheme.js.map +1 -1
  3. package/cjs/components/carousel/Autoplay.d.ts +7 -2
  4. package/cjs/components/carousel/Autoplay.js +1 -1
  5. package/cjs/components/carousel/Autoplay.js.map +1 -1
  6. package/cjs/components/carousel/hooks.js +1 -1
  7. package/cjs/components/carousel/hooks.js.map +1 -1
  8. package/cjs/components/icon/filled/CarChargingFilledIcon.d.ts +6 -0
  9. package/cjs/components/icon/filled/CarChargingFilledIcon.js +2 -0
  10. package/cjs/components/icon/filled/CarChargingFilledIcon.js.map +1 -0
  11. package/cjs/components/icon/filled/EmissionLabelFilledIcon.d.ts +6 -0
  12. package/cjs/components/icon/filled/EmissionLabelFilledIcon.js +2 -0
  13. package/cjs/components/icon/filled/EmissionLabelFilledIcon.js.map +1 -0
  14. package/cjs/components/icon/filled/PictureErrorFilledIcon.d.ts +6 -0
  15. package/cjs/components/icon/filled/PictureErrorFilledIcon.js +2 -0
  16. package/cjs/components/icon/filled/PictureErrorFilledIcon.js.map +1 -0
  17. package/cjs/components/icon/filled/PowerpassFilledIcon.d.ts +6 -0
  18. package/cjs/components/icon/filled/PowerpassFilledIcon.js +2 -0
  19. package/cjs/components/icon/filled/PowerpassFilledIcon.js.map +1 -0
  20. package/cjs/components/icon/filled/index.d.ts +4 -0
  21. package/cjs/components/icon/icon.definitions.js +1 -1
  22. package/cjs/components/icon/icon.definitions.js.map +1 -1
  23. package/cjs/components/icon/stroke/CarChargingIcon.d.ts +6 -0
  24. package/cjs/components/icon/stroke/CarChargingIcon.js +2 -0
  25. package/cjs/components/icon/stroke/CarChargingIcon.js.map +1 -0
  26. package/cjs/components/icon/stroke/EmissionLabelIcon.d.ts +6 -0
  27. package/cjs/components/icon/stroke/EmissionLabelIcon.js +2 -0
  28. package/cjs/components/icon/stroke/EmissionLabelIcon.js.map +1 -0
  29. package/cjs/components/icon/stroke/PictureErrorIcon.d.ts +6 -0
  30. package/cjs/components/icon/stroke/PictureErrorIcon.js +2 -0
  31. package/cjs/components/icon/stroke/PictureErrorIcon.js.map +1 -0
  32. package/cjs/components/icon/stroke/PowerpassIcon.d.ts +6 -0
  33. package/cjs/components/icon/stroke/PowerpassIcon.js +2 -0
  34. package/cjs/components/icon/stroke/PowerpassIcon.js.map +1 -0
  35. package/cjs/components/icon/stroke/index.d.ts +4 -0
  36. package/cjs/components/promptBar/PromptSubmitIconButton.js +1 -1
  37. package/cjs/components/promptBar/PromptSubmitIconButton.js.map +1 -1
  38. package/cjs/index.js +1 -1
  39. package/cjs/materialui/autocomplete/autocomplete.theme.js +1 -1
  40. package/cjs/materialui/autocomplete/autocomplete.theme.js.map +1 -1
  41. package/cjs/materialui/card/Card.js +1 -1
  42. package/cjs/materialui/card/Card.js.map +1 -1
  43. package/cjs/materialui/card/card.theme.js +1 -1
  44. package/cjs/materialui/card/card.theme.js.map +1 -1
  45. package/cjs/materialui/datepicker/datecalendar.theme.d.ts +1178 -1178
  46. package/cjs/materialui/datepicker/digitalclock.theme.d.ts +1176 -1176
  47. package/cjs/materialui/switch/switch.theme.js +1 -1
  48. package/cjs/materialui/switch/switch.theme.js.map +1 -1
  49. package/cjs/materialui/table/tablePagination.theme.js +1 -1
  50. package/cjs/materialui/table/tablePagination.theme.js.map +1 -1
  51. package/cjs/materialui/textfield/inputLabel.theme.js +1 -1
  52. package/cjs/materialui/textfield/inputLabel.theme.js.map +1 -1
  53. package/cjs/materialui/theme/paletteDark.theme.js +1 -1
  54. package/cjs/materialui/theme/paletteDark.theme.js.map +1 -1
  55. package/cjs/materialui/theme/theme.extensions.d.ts +10 -0
  56. package/cjs/materialui/themeProvider/baseline.theme.js +1 -1
  57. package/cjs/materialui/themeProvider/baseline.theme.js.map +1 -1
  58. package/cjs/materialui/typography/typography.theme.d.ts +4 -0
  59. package/cjs/materialui/typography/typography.theme.js +1 -1
  60. package/cjs/materialui/typography/typography.theme.js.map +1 -1
  61. package/components/advancedTable/agGridSkodaTheme.js +1 -1
  62. package/components/advancedTable/agGridSkodaTheme.js.map +1 -1
  63. package/components/carousel/Autoplay.d.ts +7 -2
  64. package/components/carousel/Autoplay.js +1 -1
  65. package/components/carousel/Autoplay.js.map +1 -1
  66. package/components/carousel/hooks.js +1 -1
  67. package/components/carousel/hooks.js.map +1 -1
  68. package/components/icon/filled/CarChargingFilledIcon.d.ts +6 -0
  69. package/components/icon/filled/CarChargingFilledIcon.js +2 -0
  70. package/components/icon/filled/CarChargingFilledIcon.js.map +1 -0
  71. package/components/icon/filled/EmissionLabelFilledIcon.d.ts +6 -0
  72. package/components/icon/filled/EmissionLabelFilledIcon.js +2 -0
  73. package/components/icon/filled/EmissionLabelFilledIcon.js.map +1 -0
  74. package/components/icon/filled/PictureErrorFilledIcon.d.ts +6 -0
  75. package/components/icon/filled/PictureErrorFilledIcon.js +2 -0
  76. package/components/icon/filled/PictureErrorFilledIcon.js.map +1 -0
  77. package/components/icon/filled/PowerpassFilledIcon.d.ts +6 -0
  78. package/components/icon/filled/PowerpassFilledIcon.js +2 -0
  79. package/components/icon/filled/PowerpassFilledIcon.js.map +1 -0
  80. package/components/icon/filled/index.d.ts +4 -0
  81. package/components/icon/icon.definitions.js +1 -1
  82. package/components/icon/icon.definitions.js.map +1 -1
  83. package/components/icon/stroke/CarChargingIcon.d.ts +6 -0
  84. package/components/icon/stroke/CarChargingIcon.js +2 -0
  85. package/components/icon/stroke/CarChargingIcon.js.map +1 -0
  86. package/components/icon/stroke/EmissionLabelIcon.d.ts +6 -0
  87. package/components/icon/stroke/EmissionLabelIcon.js +2 -0
  88. package/components/icon/stroke/EmissionLabelIcon.js.map +1 -0
  89. package/components/icon/stroke/PictureErrorIcon.d.ts +6 -0
  90. package/components/icon/stroke/PictureErrorIcon.js +2 -0
  91. package/components/icon/stroke/PictureErrorIcon.js.map +1 -0
  92. package/components/icon/stroke/PowerpassIcon.d.ts +6 -0
  93. package/components/icon/stroke/PowerpassIcon.js +2 -0
  94. package/components/icon/stroke/PowerpassIcon.js.map +1 -0
  95. package/components/icon/stroke/index.d.ts +4 -0
  96. package/components/promptBar/PromptSubmitIconButton.js +1 -1
  97. package/components/promptBar/PromptSubmitIconButton.js.map +1 -1
  98. package/index.js +1 -1
  99. package/materialui/autocomplete/autocomplete.theme.js +1 -1
  100. package/materialui/autocomplete/autocomplete.theme.js.map +1 -1
  101. package/materialui/card/Card.js +1 -1
  102. package/materialui/card/Card.js.map +1 -1
  103. package/materialui/card/card.theme.js +1 -1
  104. package/materialui/card/card.theme.js.map +1 -1
  105. package/materialui/datepicker/datecalendar.theme.d.ts +1178 -1178
  106. package/materialui/datepicker/digitalclock.theme.d.ts +1176 -1176
  107. package/materialui/switch/switch.theme.js +1 -1
  108. package/materialui/switch/switch.theme.js.map +1 -1
  109. package/materialui/table/tablePagination.theme.js +1 -1
  110. package/materialui/table/tablePagination.theme.js.map +1 -1
  111. package/materialui/textfield/inputLabel.theme.js +1 -1
  112. package/materialui/textfield/inputLabel.theme.js.map +1 -1
  113. package/materialui/theme/paletteDark.theme.js +1 -1
  114. package/materialui/theme/paletteDark.theme.js.map +1 -1
  115. package/materialui/theme/theme.extensions.d.ts +10 -0
  116. package/materialui/themeProvider/baseline.theme.js +1 -1
  117. package/materialui/themeProvider/baseline.theme.js.map +1 -1
  118. package/materialui/typography/typography.theme.d.ts +4 -0
  119. package/materialui/typography/typography.theme.js +1 -1
  120. package/materialui/typography/typography.theme.js.map +1 -1
  121. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";exports.skodaAgThemeParams=e=>({fontFamily:"rtl"===e.direction?"SKODA Next R2L":"SKODA Next",fontSize:14,iconSize:17,backgroundColor:"transparent",foregroundColor:e.palette.text.primary,dataColor:e.palette.text.primary,headerForegroundColor:e.palette.text.primary,headerBackgroundColor:"transparent",subHeaderBackgroundColor:"transparent",subHeaderToolbarBackgroundColor:"transparent",secondaryForegroundColor:e.palette.onSurface.os500,disabledForegroundColor:e.palette.disabled.tertiary,checkboxCheckedColor:e.palette.brand.primary,checkboxIndeterminateColor:e.palette.brand.primary,rowHoverColor:e.palette.surface.primary,oddRowBackgroundColor:"transparent",rowBorderColor:e.palette.surface.secondary,selectedRowBackgroundColor:e.palette.surface.primary,headerFontSize:14,headerFontWeight:700,headerHeight:54,rowHeight:56,paginationPanelHeight:70,cellHorizontalPadding:16,cellVerticalPadding:4,rowVerticalPaddingScale:.04,borderRadius:8,headerColumnSeparatorColor:e.palette.surface.secondary,headerColumnResizeHandleColor:e.palette.surface.secondary,headerColumnSeparatorDisplay:"block",headerColumnResizeHandleDisplay:"block"});
1
+ "use strict";var e=require("../../materialui/typography/typography.theme.js");exports.skodaAgThemeParams=r=>({fontFamily:e.getFontFamily("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"});
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';\n\n/** AG Grid Theme parameters (replaces variables since AG Grid v32) */\nexport const skodaAgThemeParams = (theme: Theme) => ({\n // typography\n fontFamily: theme.direction === 'rtl' ? 'SKODA Next R2L' : 'SKODA Next',\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":["theme","fontFamily","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":"wCAGmCA,IAAY,CAE7CC,WAAgC,QAApBD,EAAME,UAAsB,iBAAmB,aAC3DC,SAAU,GACVC,SAAU,GAGVC,gBAAiB,cACjBC,gBAAiBN,EAAMO,QAAQC,KAAKC,QACpCC,UAAWV,EAAMO,QAAQC,KAAKC,QAC9BE,sBAAuBX,EAAMO,QAAQC,KAAKC,QAC1CG,sBAAuB,cACvBC,yBAA0B,cAC1BC,gCAAiC,cACjCC,yBAA0Bf,EAAMO,QAAQS,UAAUC,MAClDC,wBAAyBlB,EAAMO,QAAQY,SAASC,SAChDC,qBAAsBrB,EAAMO,QAAQe,MAAMb,QAC1Cc,2BAA4BvB,EAAMO,QAAQe,MAAMb,QAGhDe,cAAexB,EAAMO,QAAQkB,QAAQhB,QACrCiB,sBAAuB,cACvBC,eAAgB3B,EAAMO,QAAQkB,QAAQG,UACtCC,2BAA4B7B,EAAMO,QAAQkB,QAAQhB,QAGlDqB,eAAgB,GAChBC,iBAAkB,IAClBC,aAAc,GACdC,UAAW,GACXC,sBAAuB,GACvBC,sBAAuB,GACvBC,oBAAqB,EACrBC,wBAAyB,IACzBC,aAAc,EAGdC,2BAA4BvC,EAAMO,QAAQkB,QAAQG,UAClDY,8BAA+BxC,EAAMO,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';\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":["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":"yGAImCA,IAAY,CAE7CC,WAAYC,EAAAA,cAAkC,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"}
@@ -20,13 +20,18 @@ export interface CarouselAutoplayProgressProps extends Omit<BoxProps, 'children'
20
20
  * Spinner with autoplay progress value
21
21
  */
22
22
  export declare const CarouselAutoplayProgress: ({ carousel: carouselProp, sx, spinnerProps, position, ...rest }: CarouselAutoplayProgressProps) => import("react/jsx-runtime").JSX.Element;
23
- export interface CarouselAutoplayIconButtonProps extends Partial<PlayPauseButtonProps> {
23
+ export interface CarouselAutoplayIconButtonProps extends Omit<Partial<PlayPauseButtonProps>, 'aria-label'> {
24
24
  /**
25
25
  * Optional Carousel instance from useCarouselInstance hook
26
26
  */
27
27
  carousel?: CarouselInstance;
28
+ /**
29
+ * Accessible label for the button. Accepts a plain string or a function called with the current playing state.
30
+ * @default (isPlaying) => isPlaying ? 'Pause carousel autoplay' : 'Play carousel autoplay'
31
+ */
32
+ 'aria-label'?: string | ((isPlaying: boolean) => string);
28
33
  }
29
34
  /**
30
35
  * IconButton controlling play/paused state of the autoplay
31
36
  */
32
- export declare function CarouselAutoplayIconButton({ carousel: carouselProp, ...rest }: CarouselAutoplayIconButtonProps): import("react/jsx-runtime").JSX.Element;
37
+ export declare function CarouselAutoplayIconButton({ carousel: carouselProp, 'aria-label': ariaLabel, ...rest }: CarouselAutoplayIconButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material"),a=require("../../utils/sxOverride/sxOverride.js"),s=require("./hooks.js"),t=require("../../node_modules/swiper/swiper-react.js"),u=require("react"),o=require("../playPauseButton/PlayPauseButton.js"),i=require("../progress/Spinner.js");exports.CarouselAutoplayIconButton=function({carousel:r,...a}){const t=s.useCarousel(),i=r||t,[l,n]=u.useState(0);return u.useEffect(()=>{i?.autoplay&&i.on("autoplayTimeLeft",(e,r,a)=>{n(e.autoplay.paused?0:Math.round(100-100*a))})},[!!i]),e.jsx(o.PlayPauseButton,{"aria-label":i?.autoplay?.running?"Pause carousel autoplay":"Play carousel autoplay",isPlaying:!!i?.autoplay?.running,progress:l,onClick:()=>{i?.autoplay?.[i?.autoplay?.running?"stop":"start"]()},...a})},exports.CarouselAutoplayProgress=({carousel:s,sx:o,spinnerProps:l,position:n="outside",...p})=>{const[y,c]=u.useState(0),d=t.useSwiper(),x=s||d;return u.useEffect(()=>{x?.autoplay&&x.on("autoplayTimeLeft",(e,r,a)=>{c(e.autoplay.paused?0:Math.round(100-100*a))})},[!!x]),e.jsx(r.Box,{sx:a.sxOverride({position:"relative",display:"flex",m:2,..."inside"===n&&{position:"absolute",zIndex:"90",bottom:"0",left:"0",right:"0",m:2}},o),"data-testid":"CarouselAutoplayProgress",...p,children:e.jsx(i.Spinner,{value:y,...l})})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material"),a=require("../../utils/sxOverride/sxOverride.js"),s=require("./hooks.js"),t=require("../../node_modules/swiper/swiper-react.js"),u=require("react"),o=require("../playPauseButton/PlayPauseButton.js"),i=require("../progress/Spinner.js");exports.CarouselAutoplayIconButton=function({carousel:r,"aria-label":a=e=>e?"Pause carousel autoplay":"Play carousel autoplay",...t}){const i=s.useCarousel(),l=r||i,[n,p]=u.useState(0),y=!!l?.autoplay?.running;return u.useEffect(()=>{l?.autoplay&&l.on("autoplayTimeLeft",(e,r,a)=>{p(e.autoplay.paused?0:Math.round(100-100*a))})},[!!l]),e.jsx(o.PlayPauseButton,{"aria-label":"function"==typeof a?a(y):a,isPlaying:y,progress:n,onClick:()=>{l?.autoplay?.[l?.autoplay?.running?"stop":"start"]()},...t})},exports.CarouselAutoplayProgress=({carousel:s,sx:o,spinnerProps:l,position:n="outside",...p})=>{const[y,c]=u.useState(0),d=t.useSwiper(),x=s||d;return u.useEffect(()=>{x?.autoplay&&x.on("autoplayTimeLeft",(e,r,a)=>{c(e.autoplay.paused?0:Math.round(100-100*a))})},[!!x]),e.jsx(r.Box,{sx:a.sxOverride({position:"relative",display:"flex",m:2,..."inside"===n&&{position:"absolute",zIndex:"90",bottom:"0",left:"0",right:"0",m:2}},o),"data-testid":"CarouselAutoplayProgress",...p,children:e.jsx(i.Spinner,{value:y,...l})})};
2
2
  //# sourceMappingURL=Autoplay.js.map
@@ -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 Partial<PlayPauseButtonProps> {\n /**\n * Optional Carousel instance from useCarouselInstance hook\n */\n carousel?: CarouselInstance;\n}\n\n/**\n * IconButton controlling play/paused state of the autoplay\n */\nexport function CarouselAutoplayIconButton({ carousel: carouselProp, ...rest }: CarouselAutoplayIconButtonProps) {\n const carouselHook = useCarousel();\n const carousel = carouselProp || carouselHook;\n const [value, setValue] = useState<number>(0);\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={carousel?.autoplay?.running ? 'Pause carousel autoplay' : 'Play carousel autoplay'}\n isPlaying={!!carousel?.autoplay?.running}\n progress={value}\n onClick={() => {\n carousel?.autoplay?.[carousel?.autoplay?.running ? 'stop' : 'start']();\n }}\n {...rest}\n />\n );\n}\n"],"names":["carousel","carouselProp","rest","carouselHook","useCarousel","value","setValue","useState","useEffect","autoplay","on","instance","_timeLeft","percentage","paused","Math","round","_jsx","PlayPauseButton","running","isPlaying","progress","onClick","sx","spinnerProps","position","useSwiper","Box","sxOverride","display","m","zIndex","bottom","left","right","Spinner"],"mappings":"yVAmFM,UAAuCA,SAAUC,KAAiBC,IACtE,MAAMC,EAAeC,EAAAA,cACfJ,EAAWC,GAAgBE,GAC1BE,EAAOC,GAAYC,EAAAA,SAAiB,GAW3C,OATAC,EAAAA,UAAU,KAEJR,GAAUS,UACZT,EAASU,GAAG,mBAAoB,CAACC,EAAUC,EAAWC,KACpDP,EAASK,EAASF,SAASK,OAAS,EAAIC,KAAKC,MAAM,IAAmB,IAAbH,OAG5D,GAAGb,IAGJiB,EAAAA,IAACC,EAAAA,gBAAe,CAAA,aACFlB,GAAUS,UAAUU,QAAU,0BAA4B,yBACtEC,YAAapB,GAAUS,UAAUU,QACjCE,SAAUhB,EACViB,QAAS,KACPtB,GAAUS,WAAWT,GAAUS,UAAUU,QAAU,OAAS,eAE1DjB,GAGV,mCAjFwC,EACtCF,SAAUC,EACVsB,KACAC,eACAC,WAAW,aACRvB,MAEH,MAAOG,EAAOC,GAAYC,EAAAA,SAAiB,GACrCJ,EAAeuB,EAAAA,YACf1B,EAAWC,GAAgBE,EAWjC,OATAK,EAAAA,UAAU,KAEJR,GAAUS,UACZT,EAASU,GAAG,mBAAoB,CAACC,EAAUC,EAAWC,KACpDP,EAASK,EAASF,SAASK,OAAS,EAAIC,KAAKC,MAAM,IAAmB,IAAbH,OAG5D,GAAGb,IAGJiB,MAACU,EAAAA,KACCJ,GAAIK,EAAAA,WACF,CACEH,SAAU,WACVI,QAAS,OACTC,EAAG,KACc,WAAbL,GAAyB,CAC3BA,SAAU,WACVM,OAAQ,KACRC,OAAQ,IACRC,KAAM,IACNC,MAAO,IACPJ,EAAG,IAGPP,GACD,cACW,8BACRrB,WAEJe,EAAAA,IAACkB,EAAAA,QAAO,CAAC9B,MAAOA,KAAWmB"}
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":["carousel","carouselProp","ariaLabel","isPlaying","rest","carouselHook","useCarousel","value","setValue","useState","autoplay","running","useEffect","on","instance","_timeLeft","percentage","paused","Math","round","_jsx","PlayPauseButton","progress","onClick","sx","spinnerProps","position","useSwiper","Box","sxOverride","display","m","zIndex","bottom","left","right","Spinner"],"mappings":"yVAwFM,UACJA,SAAUC,EACV,aAAcC,EAAaC,GAAcA,EAAY,0BAA4B,4BAC9EC,IAEH,MAAMC,EAAeC,EAAAA,cACfN,EAAWC,GAAgBI,GAC1BE,EAAOC,GAAYC,EAAAA,SAAiB,GACrCN,IAAcH,GAAUU,UAAUC,QAWxC,OATAC,EAAAA,UAAU,KAEJZ,GAAUU,UACZV,EAASa,GAAG,mBAAoB,CAACC,EAAUC,EAAWC,KACpDR,EAASM,EAASJ,SAASO,OAAS,EAAIC,KAAKC,MAAM,IAAmB,IAAbH,OAG5D,GAAGhB,IAGJoB,EAAAA,IAACC,EAAAA,gBAAe,CAAA,aACmB,mBAAdnB,EAA2BA,EAAUC,GAAaD,EACrEC,UAAWA,EACXmB,SAAUf,EACVgB,QAAS,KACPvB,GAAUU,WAAWV,GAAUU,UAAUC,QAAU,OAAS,eAE1DP,GAGV,mCA3FwC,EACtCJ,SAAUC,EACVuB,KACAC,eACAC,WAAW,aACRtB,MAEH,MAAOG,EAAOC,GAAYC,EAAAA,SAAiB,GACrCJ,EAAesB,EAAAA,YACf3B,EAAWC,GAAgBI,EAWjC,OATAO,EAAAA,UAAU,KAEJZ,GAAUU,UACZV,EAASa,GAAG,mBAAoB,CAACC,EAAUC,EAAWC,KACpDR,EAASM,EAASJ,SAASO,OAAS,EAAIC,KAAKC,MAAM,IAAmB,IAAbH,OAG5D,GAAGhB,IAGJoB,MAACQ,EAAAA,KACCJ,GAAIK,EAAAA,WACF,CACEH,SAAU,WACVI,QAAS,OACTC,EAAG,KACc,WAAbL,GAAyB,CAC3BA,SAAU,WACVM,OAAQ,KACRC,OAAQ,IACRC,KAAM,IACNC,MAAO,IACPJ,EAAG,IAGPP,GACD,cACW,8BACRpB,WAEJgB,EAAAA,IAACgB,EAAAA,QAAO,CAAC7B,MAAOA,KAAWkB"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react"),t=require("../../node_modules/swiper/swiper-react.js");function s(t,s){const[,r]=e.useState({});e.useEffect(()=>{t&&(s??["slideChange","afterInit","reachBeginning","reachEnd","autoplayStart","autoplayStop","lock","unlock"]).forEach(e=>{t.on(e,()=>{r({})})})},[t]),e.useLayoutEffect(()=>{r({})},[])}exports.useCarousel=function(e){const r=t.useSwiper();return s(r,e),r},exports.useCarouselInstance=function(t){const[r,u]=e.useState(null);return s(r,t),[r,u]},exports.useCarouselPeekEffect=function(t){const[s,r]=e.useState(null),u=e.useRef(null),[n,l]=e.useState(!1);return e.useEffect(()=>("reset"===s?(t?.el?.classList.remove("peek-prev"),t?.el?.classList.remove("peek-next"),u.current=setTimeout(()=>{r(null)},+(t?.el?.dataset?.peekspeed??150))):s?n||(t?.slideReset(0),"prev"===s?(t?.slidePrev(0),t?.slideNext(0)):(t?.slideNext(0),t?.slidePrev(0)),t?.el?.classList.add("peeking"),t?.el?.classList.add(`peek-${s}`)):(t?.el?.classList.remove("peeking"),t?.el?.classList.remove("peek-prev"),t?.el?.classList.remove("peek-next")),()=>{u.current&&clearTimeout(u.current)}),[s]),e.useEffect(()=>{t?.on("touchStart",()=>{r("reset"),l(!0)}),t?.on("touchEnd",()=>{r("reset"),l(!1)})},[!!t]),[s,r]};
1
+ "use strict";var e=require("react"),t=require("../../node_modules/swiper/swiper-react.js");function s(t,s){const[r,u]=e.useState(0);return e.useEffect(()=>{t&&(s??["slideChange","afterInit","reachBeginning","reachEnd","fromEdge","autoplayStart","autoplayStop","lock","unlock"]).forEach(e=>{t.on(e,()=>{u(e=>e+1)})})},[t]),e.useLayoutEffect(()=>{u(e=>e+1)},[]),r}exports.useCarousel=function(r){const u=t.useSwiper(),n=s(u,r);return e.useMemo(()=>u?new Proxy(u,{_t:n}):u,[u,n])},exports.useCarouselInstance=function(t){const[r,u]=e.useState(null),n=s(r,t);return[e.useMemo(()=>r?new Proxy(r,{_t:n}):r,[r,n]),u]},exports.useCarouselPeekEffect=function(t){const[s,r]=e.useState(null),u=e.useRef(null),[n,o]=e.useState(!1);return e.useEffect(()=>("reset"===s?(t?.el?.classList.remove("peek-prev"),t?.el?.classList.remove("peek-next"),u.current=setTimeout(()=>{r(null)},+(t?.el?.dataset?.peekspeed??150))):s?n||(t?.slideReset(0),"prev"===s?(t?.slidePrev(0),t?.slideNext(0)):(t?.slideNext(0),t?.slidePrev(0)),t?.el?.classList.add("peeking"),t?.el?.classList.add(`peek-${s}`)):(t?.el?.classList.remove("peeking"),t?.el?.classList.remove("peek-prev"),t?.el?.classList.remove("peek-next")),()=>{u.current&&clearTimeout(u.current)}),[s]),e.useEffect(()=>{t?.on("touchStart",()=>{r("reset"),o(!0)}),t?.on("touchEnd",()=>{r("reset"),o(!1)})},[!!t]),[s,r]};
2
2
  //# sourceMappingURL=hooks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sources":["../../../../../src/components/carousel/hooks.ts"],"sourcesContent":["import { useState, useEffect, useLayoutEffect, useRef } from 'react';\nimport type { Swiper as CarouselInstance } from 'swiper';\nimport { useSwiper } from 'swiper/react';\nimport { SwiperEvents } from 'swiper/types';\n\n/**\n * Hook to obtain and manage CarouselInstance\n * */\nexport function useCarouselInstance(events?: (keyof SwiperEvents)[]) {\n const [carousel, setCarousel] = useState<CarouselInstance | null>(null);\n useRefreshInstance(carousel, events);\n\n return [carousel, setCarousel] as const;\n}\n\n/**\n * Hook to obtain CarouselInstance inside the Carousel component\n */\nexport function useCarousel(events?: (keyof SwiperEvents)[]) {\n const carousel = useSwiper();\n useRefreshInstance(carousel, events);\n\n return carousel;\n}\n\n/**\n * Internal hook that forces re-renders on events like slideChange, so the carousel.realIndex is correct\n * https://github.com/nolimits4web/swiper/issues/5577\n */\nfunction useRefreshInstance(carousel: CarouselInstance, events?: (keyof SwiperEvents)[]) {\n // force re-render\n const [, setRerender] = useState({});\n useEffect(() => {\n if (carousel) {\n // subscribe to carousel events to trigger re-render\n (\n events ?? [\n 'slideChange',\n 'afterInit',\n 'reachBeginning',\n 'reachEnd',\n 'autoplayStart',\n 'autoplayStop',\n 'lock',\n 'unlock',\n ]\n ).forEach((evt: keyof SwiperEvents) => {\n carousel.on(evt, () => {\n setRerender({});\n });\n });\n }\n }, [carousel]);\n // once everything is rendered, make sure to re-render to have proper data (initialization)\n useLayoutEffect(() => {\n setRerender({});\n }, []);\n}\n\n/**\n * Manage peek effect in the Carousel by adding classes to the Carousel instance\n */\nexport function useCarouselPeekEffect(carousel: CarouselInstance) {\n const [peek, setPeek] = useState<'prev' | 'next' | 'reset' | null>(null);\n const peekTimeout = useRef<NodeJS.Timeout | null>(null);\n const [disabled, setDisabled] = useState<boolean>(false);\n\n useEffect(() => {\n if (peek === 'reset') {\n carousel?.el?.classList.remove('peek-prev');\n carousel?.el?.classList.remove('peek-next');\n peekTimeout.current = setTimeout(\n () => {\n setPeek(null);\n },\n +(carousel?.el?.dataset?.peekspeed ?? 150),\n ); // matches transitionDuration in the Carousel\n } else if (peek) {\n if (!disabled) {\n // make sure prev/next slide is visible (loop)\n carousel?.slideReset(0);\n if (peek === 'prev') {\n carousel?.slidePrev(0);\n carousel?.slideNext(0);\n } else {\n carousel?.slideNext(0);\n carousel?.slidePrev(0);\n }\n carousel?.el?.classList.add('peeking');\n carousel?.el?.classList.add(`peek-${peek}`);\n }\n } else {\n carousel?.el?.classList.remove('peeking');\n carousel?.el?.classList.remove('peek-prev');\n carousel?.el?.classList.remove('peek-next');\n }\n\n return () => {\n if (peekTimeout.current) {\n clearTimeout(peekTimeout.current);\n }\n };\n }, [peek]);\n\n /**\n * Watch carousel instance\n */\n useEffect(() => {\n // once carousel is being dragged, reset and disable peek effect\n carousel?.on('touchStart', () => {\n setPeek('reset');\n setDisabled(true);\n });\n carousel?.on('touchEnd', () => {\n setPeek('reset');\n setDisabled(false);\n });\n }, [!!carousel]);\n\n return [peek, setPeek] as const;\n}\n"],"names":["useRefreshInstance","carousel","events","setRerender","useState","useEffect","forEach","evt","on","useLayoutEffect","useSwiper","setCarousel","peek","setPeek","peekTimeout","useRef","disabled","setDisabled","el","classList","remove","current","setTimeout","dataset","peekspeed","slideReset","slidePrev","slideNext","add","clearTimeout"],"mappings":"2FA6BA,SAASA,EAAmBC,EAA4BC,GAEtD,OAASC,GAAeC,EAAAA,SAAS,IACjCC,EAAAA,UAAU,KACJJ,IAGAC,GAAU,CACR,cACA,YACA,iBACA,WACA,gBACA,eACA,OACA,WAEFI,QAASC,IACTN,EAASO,GAAGD,EAAK,KACfJ,EAAY,CAAA,QAIjB,CAACF,IAEJQ,EAAAA,gBAAgB,KACdN,EAAY,CAAA,IACX,GACL,qBAvCM,SAAsBD,GAC1B,MAAMD,EAAWS,EAAAA,YAGjB,OAFAV,EAAmBC,EAAUC,GAEtBD,CACT,8BAfM,SAA8BC,GAClC,MAAOD,EAAUU,GAAeP,EAAAA,SAAkC,MAGlE,OAFAJ,EAAmBC,EAAUC,GAEtB,CAACD,EAAUU,EACpB,gCAiDM,SAAgCV,GACpC,MAAOW,EAAMC,GAAWT,EAAAA,SAA2C,MAC7DU,EAAcC,EAAAA,OAA8B,OAC3CC,EAAUC,GAAeb,EAAAA,UAAkB,GAsDlD,OApDAC,EAAAA,UAAU,KACK,UAATO,GACFX,GAAUiB,IAAIC,UAAUC,OAAO,aAC/BnB,GAAUiB,IAAIC,UAAUC,OAAO,aAC/BN,EAAYO,QAAUC,WACpB,KACET,EAAQ,SAERZ,GAAUiB,IAAIK,SAASC,WAAa,OAE/BZ,EACJI,IAEHf,GAAUwB,WAAW,GACR,SAATb,GACFX,GAAUyB,UAAU,GACpBzB,GAAU0B,UAAU,KAEpB1B,GAAU0B,UAAU,GACpB1B,GAAUyB,UAAU,IAEtBzB,GAAUiB,IAAIC,UAAUS,IAAI,WAC5B3B,GAAUiB,IAAIC,UAAUS,IAAI,QAAQhB,OAGtCX,GAAUiB,IAAIC,UAAUC,OAAO,WAC/BnB,GAAUiB,IAAIC,UAAUC,OAAO,aAC/BnB,GAAUiB,IAAIC,UAAUC,OAAO,cAG1B,KACDN,EAAYO,SACdQ,aAAaf,EAAYO,WAG5B,CAACT,IAKJP,EAAAA,UAAU,KAERJ,GAAUO,GAAG,aAAc,KACzBK,EAAQ,SACRI,GAAY,KAEdhB,GAAUO,GAAG,WAAY,KACvBK,EAAQ,SACRI,GAAY,MAEb,GAAGhB,IAEC,CAACW,EAAMC,EAChB"}
1
+ {"version":3,"file":"hooks.js","sources":["../../../../../src/components/carousel/hooks.ts"],"sourcesContent":["import { useState, useEffect, useLayoutEffect, useMemo, useRef } from 'react';\nimport type { Swiper as CarouselInstance } from 'swiper';\nimport { useSwiper } from 'swiper/react';\nimport { SwiperEvents } from 'swiper/types';\n\n/**\n * Hook to obtain and manage CarouselInstance\n * */\nexport function useCarouselInstance(events?: (keyof SwiperEvents)[]) {\n const [carousel, setCarousel] = useState<CarouselInstance | null>(null);\n const renderCount = useRefreshInstance(carousel, events);\n\n const proxiedCarousel = useMemo(\n () => (carousel ? new Proxy(carousel, { _t: renderCount } as unknown as ProxyHandler<CarouselInstance>) : carousel),\n [carousel, renderCount],\n );\n\n return [proxiedCarousel, setCarousel] as const;\n}\n\n/**\n * Hook to obtain CarouselInstance inside the Carousel component\n */\nexport function useCarousel(events?: (keyof SwiperEvents)[]) {\n const carousel = useSwiper();\n const renderCount = useRefreshInstance(carousel, events);\n\n return useMemo(\n () =>\n carousel\n ? (new Proxy(carousel, { _t: renderCount } as unknown as ProxyHandler<CarouselInstance>) as CarouselInstance)\n : carousel,\n [carousel, renderCount],\n );\n}\n\n/**\n * Internal hook that forces re-renders on events like slideChange, so the carousel.realIndex is correct\n * https://github.com/nolimits4web/swiper/issues/5577\n */\nfunction useRefreshInstance(carousel: CarouselInstance, events?: (keyof SwiperEvents)[]): number {\n // force re-render\n const [renderCount, setRerender] = useState(0);\n useEffect(() => {\n if (carousel) {\n // subscribe to carousel events to trigger re-render\n // https://swiperjs.com/swiper-api#events\n (\n events ?? [\n 'slideChange',\n 'afterInit',\n 'reachBeginning',\n 'reachEnd',\n 'fromEdge',\n 'autoplayStart',\n 'autoplayStop',\n 'lock',\n 'unlock',\n ]\n ).forEach((evt: keyof SwiperEvents) => {\n carousel.on(evt, () => {\n setRerender((t) => t + 1);\n });\n });\n }\n }, [carousel]);\n // once everything is rendered, make sure to re-render to have proper data (initialization)\n useLayoutEffect(() => {\n setRerender((t) => t + 1);\n }, []);\n\n return renderCount;\n}\n\n/**\n * Manage peek effect in the Carousel by adding classes to the Carousel instance\n */\nexport function useCarouselPeekEffect(carousel: CarouselInstance) {\n const [peek, setPeek] = useState<'prev' | 'next' | 'reset' | null>(null);\n const peekTimeout = useRef<NodeJS.Timeout | null>(null);\n const [disabled, setDisabled] = useState<boolean>(false);\n\n useEffect(() => {\n if (peek === 'reset') {\n carousel?.el?.classList.remove('peek-prev');\n carousel?.el?.classList.remove('peek-next');\n peekTimeout.current = setTimeout(\n () => {\n setPeek(null);\n },\n +(carousel?.el?.dataset?.peekspeed ?? 150),\n ); // matches transitionDuration in the Carousel\n } else if (peek) {\n if (!disabled) {\n // make sure prev/next slide is visible (loop)\n carousel?.slideReset(0);\n if (peek === 'prev') {\n carousel?.slidePrev(0);\n carousel?.slideNext(0);\n } else {\n carousel?.slideNext(0);\n carousel?.slidePrev(0);\n }\n carousel?.el?.classList.add('peeking');\n carousel?.el?.classList.add(`peek-${peek}`);\n }\n } else {\n carousel?.el?.classList.remove('peeking');\n carousel?.el?.classList.remove('peek-prev');\n carousel?.el?.classList.remove('peek-next');\n }\n\n return () => {\n if (peekTimeout.current) {\n clearTimeout(peekTimeout.current);\n }\n };\n }, [peek]);\n\n /**\n * Watch carousel instance\n */\n useEffect(() => {\n // once carousel is being dragged, reset and disable peek effect\n carousel?.on('touchStart', () => {\n setPeek('reset');\n setDisabled(true);\n });\n carousel?.on('touchEnd', () => {\n setPeek('reset');\n setDisabled(false);\n });\n }, [!!carousel]);\n\n return [peek, setPeek] as const;\n}\n"],"names":["useRefreshInstance","carousel","events","renderCount","setRerender","useState","useEffect","forEach","evt","on","t","useLayoutEffect","useSwiper","useMemo","Proxy","_t","setCarousel","peek","setPeek","peekTimeout","useRef","disabled","setDisabled","el","classList","remove","current","setTimeout","dataset","peekspeed","slideReset","slidePrev","slideNext","add","clearTimeout"],"mappings":"2FAwCA,SAASA,EAAmBC,EAA4BC,GAEtD,MAAOC,EAAaC,GAAeC,EAAAA,SAAS,GA6B5C,OA5BAC,EAAAA,UAAU,KACJL,IAIAC,GAAU,CACR,cACA,YACA,iBACA,WACA,WACA,gBACA,eACA,OACA,WAEFK,QAASC,IACTP,EAASQ,GAAGD,EAAK,KACfJ,EAAaM,GAAMA,EAAI,QAI5B,CAACT,IAEJU,EAAAA,gBAAgB,KACdP,EAAaM,GAAMA,EAAI,IACtB,IAEIP,CACT,qBAjDM,SAAsBD,GAC1B,MAAMD,EAAWW,EAAAA,YACXT,EAAcH,EAAmBC,EAAUC,GAEjD,OAAOW,EAAAA,QACL,IACEZ,EACK,IAAIa,MAAMb,EAAU,CAAEc,GAAIZ,IAC3BF,EACN,CAACA,EAAUE,GAEf,8BA1BM,SAA8BD,GAClC,MAAOD,EAAUe,GAAeX,EAAAA,SAAkC,MAC5DF,EAAcH,EAAmBC,EAAUC,GAOjD,MAAO,CALiBW,EAAAA,QACtB,IAAOZ,EAAW,IAAIa,MAAMb,EAAU,CAAEc,GAAIZ,IAA8DF,EAC1G,CAACA,EAAUE,IAGYa,EAC3B,gCA2DM,SAAgCf,GACpC,MAAOgB,EAAMC,GAAWb,EAAAA,SAA2C,MAC7Dc,EAAcC,EAAAA,OAA8B,OAC3CC,EAAUC,GAAejB,EAAAA,UAAkB,GAsDlD,OApDAC,EAAAA,UAAU,KACK,UAATW,GACFhB,GAAUsB,IAAIC,UAAUC,OAAO,aAC/BxB,GAAUsB,IAAIC,UAAUC,OAAO,aAC/BN,EAAYO,QAAUC,WACpB,KACET,EAAQ,SAERjB,GAAUsB,IAAIK,SAASC,WAAa,OAE/BZ,EACJI,IAEHpB,GAAU6B,WAAW,GACR,SAATb,GACFhB,GAAU8B,UAAU,GACpB9B,GAAU+B,UAAU,KAEpB/B,GAAU+B,UAAU,GACpB/B,GAAU8B,UAAU,IAEtB9B,GAAUsB,IAAIC,UAAUS,IAAI,WAC5BhC,GAAUsB,IAAIC,UAAUS,IAAI,QAAQhB,OAGtChB,GAAUsB,IAAIC,UAAUC,OAAO,WAC/BxB,GAAUsB,IAAIC,UAAUC,OAAO,aAC/BxB,GAAUsB,IAAIC,UAAUC,OAAO,cAG1B,KACDN,EAAYO,SACdQ,aAAaf,EAAYO,WAG5B,CAACT,IAKJX,EAAAA,UAAU,KAERL,GAAUQ,GAAG,aAAc,KACzBS,EAAQ,SACRI,GAAY,KAEdrB,GAAUQ,GAAG,WAAY,KACvBS,EAAQ,SACRI,GAAY,MAEb,GAAGrB,IAEC,CAACgB,EAAMC,EAChB"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ /**
4
+ * Flow brand exclusive icon
5
+ */
6
+ export declare const CarChargingFilledIcon: React.FC<SvgIconProps>;
@@ -0,0 +1,2 @@
1
+ "use strict";var r=require("react/jsx-runtime"),e=require("react"),C=require("@mui/material");const H=e.forwardRef((e,H)=>r.jsxs(C.SvgIcon,{viewBox:"2 2 20 20",ref:H,...e,children:[r.jsx("path",{d:"M10.7998 5.40039C10.7999 9.04523 13.7546 12.0008 17.3994 12.001C18.3073 12.001 19.1727 11.817 19.96 11.4854V17.1016C19.9596 18.2011 19.0801 19.1013 17.9805 19.1016C17.1205 19.1016 16.2406 18.5808 16.0205 17.501H7.98047C7.76043 18.5806 6.88031 19.1014 6.02051 19.1016C4.92072 19.1016 4.04038 18.2013 4.04004 17.1016V11.2607L4.52051 10.2812H3.08008V8.68164H5.28027L6.95996 5.20117H10.8047C10.8027 5.26728 10.7998 5.33381 10.7998 5.40039ZM7.08008 14.0615H9.58008C10.24 14.6214 11.0802 14.9814 12 14.9814C12.9198 14.9814 13.76 14.6213 14.4199 14.0615H16.9199V12.5615H13.8398C13.4198 13.1412 12.7598 13.5215 12 13.5215C11.2402 13.5215 10.5802 13.1413 10.1602 12.5615H7.08008V14.0615Z"}),r.jsx("path",{d:"M16.4912 10.4764L21.2367 4.69855H17.6224L19.2778 1.08008H17.7604L13.0149 6.85796H16.6292L14.9738 10.4764H16.4912Z"})]}));exports.CarChargingFilledIcon=H;
2
+ //# sourceMappingURL=CarChargingFilledIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CarChargingFilledIcon.js","sources":["../../../../../../src/components/icon/filled/CarChargingFilledIcon.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\n/**\n * Flow brand exclusive icon\n */\nexport const CarChargingFilledIcon: React.FC<SvgIconProps> = forwardRef((props, ref) => {\n return (\n <SvgIcon viewBox=\"2 2 20 20\" ref={ref} {...props}>\n <path d=\"M10.7998 5.40039C10.7999 9.04523 13.7546 12.0008 17.3994 12.001C18.3073 12.001 19.1727 11.817 19.96 11.4854V17.1016C19.9596 18.2011 19.0801 19.1013 17.9805 19.1016C17.1205 19.1016 16.2406 18.5808 16.0205 17.501H7.98047C7.76043 18.5806 6.88031 19.1014 6.02051 19.1016C4.92072 19.1016 4.04038 18.2013 4.04004 17.1016V11.2607L4.52051 10.2812H3.08008V8.68164H5.28027L6.95996 5.20117H10.8047C10.8027 5.26728 10.7998 5.33381 10.7998 5.40039ZM7.08008 14.0615H9.58008C10.24 14.6214 11.0802 14.9814 12 14.9814C12.9198 14.9814 13.76 14.6213 14.4199 14.0615H16.9199V12.5615H13.8398C13.4198 13.1412 12.7598 13.5215 12 13.5215C11.2402 13.5215 10.5802 13.1413 10.1602 12.5615H7.08008V14.0615Z\" />\n <path d=\"M16.4912 10.4764L21.2367 4.69855H17.6224L19.2778 1.08008H17.7604L13.0149 6.85796H16.6292L14.9738 10.4764H16.4912Z\" />\n </SvgIcon>\n );\n});\n"],"names":["CarChargingFilledIcon","forwardRef","props","ref","_jsxs","SvgIcon","viewBox","children","_jsx","d"],"mappings":"8FAMO,MAAMA,EAAgDC,EAAAA,WAAW,CAACC,EAAOC,IAE5EC,EAAAA,KAACC,UAAO,CAACC,QAAQ,YAAYH,IAAKA,KAASD,EAAKK,SAAA,CAC9CC,EAAAA,IAAA,OAAA,CAAMC,EAAE,2qBACRD,EAAAA,IAAA,OAAA,CAAMC,EAAE"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ /**
4
+ * Flow brand exclusive icon
5
+ */
6
+ export declare const EmissionLabelFilledIcon: React.FC<SvgIconProps>;
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("@mui/material");const L=r.forwardRef((r,L)=>e.jsx(i.SvgIcon,{viewBox:"2 2 20 20",ref:L,...r,children:e.jsx("path",{d:"M20.5986 15.7471L21 16.2266L20.5986 16.7061L16.8506 21.1992L16.627 21.4678H3V12.4805H17.873L20.5986 15.7471ZM12.3564 2.27344L16.1045 6.82422L16.502 7.30566L13.3887 10.9854H16.627L16.6289 10.9883H3V2H12.1318L12.3564 2.27344Z"})}));exports.EmissionLabelFilledIcon=L;
2
+ //# sourceMappingURL=EmissionLabelFilledIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmissionLabelFilledIcon.js","sources":["../../../../../../src/components/icon/filled/EmissionLabelFilledIcon.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\n/**\n * Flow brand exclusive icon\n */\nexport const EmissionLabelFilledIcon: React.FC<SvgIconProps> = forwardRef((props, ref) => {\n return (\n <SvgIcon viewBox=\"2 2 20 20\" ref={ref} {...props}>\n <path d=\"M20.5986 15.7471L21 16.2266L20.5986 16.7061L16.8506 21.1992L16.627 21.4678H3V12.4805H17.873L20.5986 15.7471ZM12.3564 2.27344L16.1045 6.82422L16.502 7.30566L13.3887 10.9854H16.627L16.6289 10.9883H3V2H12.1318L12.3564 2.27344Z\" />\n </SvgIcon>\n );\n});\n"],"names":["EmissionLabelFilledIcon","forwardRef","props","ref","_jsx","SvgIcon","viewBox","d"],"mappings":"8FAMO,MAAMA,EAAkDC,EAAAA,WAAW,CAACC,EAAOC,IAE9EC,EAAAA,IAACC,EAAAA,QAAO,CAACC,QAAQ,YAAYH,IAAKA,KAASD,WACzCE,EAAAA,IAAA,OAAA,CAAMG,EAAE"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ /**
4
+ * Flow brand exclusive icon
5
+ */
6
+ export declare const PictureErrorFilledIcon: React.FC<SvgIconProps>;
@@ -0,0 +1,2 @@
1
+ "use strict";var r=require("react/jsx-runtime"),e=require("react"),i=require("@mui/material");const t=e.forwardRef((e,t)=>r.jsx(i.SvgIcon,{viewBox:"2 2 20 20",ref:t,...e,children:r.jsx("path",{d:"M22.0459 3.03418L2.9707 22.1094L1.69727 20.8369L4.12012 18.4141V4.0791H18.4551L20.7725 1.76172L22.0459 3.03418ZM19.8799 19.8389H7.78711L9.42676 18.1992H18.2402V9.38574L19.8799 7.74609V19.8389ZM5.75977 16.7744L16.8154 5.71875H5.75977V16.7744ZM17.7803 16.4395H11.1865L14.6338 12.9912L17.7803 16.4395ZM9.28027 7.81934C10.0201 7.81942 10.6599 8.43894 10.6602 9.17871C10.6602 9.91866 10.0202 10.539 9.28027 10.5391C8.54027 10.5391 7.90039 9.91871 7.90039 9.17871C7.90062 8.43888 8.5404 7.81934 9.28027 7.81934Z"})}));exports.PictureErrorFilledIcon=t;
2
+ //# sourceMappingURL=PictureErrorFilledIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PictureErrorFilledIcon.js","sources":["../../../../../../src/components/icon/filled/PictureErrorFilledIcon.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\n/**\n * Flow brand exclusive icon\n */\nexport const PictureErrorFilledIcon: React.FC<SvgIconProps> = forwardRef((props, ref) => {\n return (\n <SvgIcon viewBox=\"2 2 20 20\" ref={ref} {...props}>\n <path d=\"M22.0459 3.03418L2.9707 22.1094L1.69727 20.8369L4.12012 18.4141V4.0791H18.4551L20.7725 1.76172L22.0459 3.03418ZM19.8799 19.8389H7.78711L9.42676 18.1992H18.2402V9.38574L19.8799 7.74609V19.8389ZM5.75977 16.7744L16.8154 5.71875H5.75977V16.7744ZM17.7803 16.4395H11.1865L14.6338 12.9912L17.7803 16.4395ZM9.28027 7.81934C10.0201 7.81942 10.6599 8.43894 10.6602 9.17871C10.6602 9.91866 10.0202 10.539 9.28027 10.5391C8.54027 10.5391 7.90039 9.91871 7.90039 9.17871C7.90062 8.43888 8.5404 7.81934 9.28027 7.81934Z\" />\n </SvgIcon>\n );\n});\n"],"names":["PictureErrorFilledIcon","forwardRef","props","ref","_jsx","SvgIcon","viewBox","d"],"mappings":"8FAMO,MAAMA,EAAiDC,EAAAA,WAAW,CAACC,EAAOC,IAE7EC,EAAAA,IAACC,EAAAA,QAAO,CAACC,QAAQ,YAAYH,IAAKA,KAASD,WACzCE,EAAAA,IAAA,OAAA,CAAMG,EAAE"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ /**
4
+ * Flow brand exclusive icon
5
+ */
6
+ export declare const PowerpassFilledIcon: React.FC<SvgIconProps>;
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("@mui/material");const s=r.forwardRef((r,s)=>e.jsx(i.SvgIcon,{viewBox:"2 2 20 20",ref:s,...r,children:e.jsx("path",{d:"M11.6046 6.75L17.25 12.3449L11.6035 17.9914H6.75L12.0906 12.6507L12.3992 12.3421L12.0893 12.0349L6.7567 6.75H11.6046Z"})}));exports.PowerpassFilledIcon=s;
2
+ //# sourceMappingURL=PowerpassFilledIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PowerpassFilledIcon.js","sources":["../../../../../../src/components/icon/filled/PowerpassFilledIcon.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\n/**\n * Flow brand exclusive icon\n */\nexport const PowerpassFilledIcon: React.FC<SvgIconProps> = forwardRef((props, ref) => {\n return (\n <SvgIcon viewBox=\"2 2 20 20\" ref={ref} {...props}>\n <path d=\"M11.6046 6.75L17.25 12.3449L11.6035 17.9914H6.75L12.0906 12.6507L12.3992 12.3421L12.0893 12.0349L6.7567 6.75H11.6046Z\" />\n </SvgIcon>\n );\n});\n"],"names":["PowerpassFilledIcon","forwardRef","props","ref","_jsx","SvgIcon","viewBox","d"],"mappings":"8FAMO,MAAMA,EAA8CC,EAAAA,WAAW,CAACC,EAAOC,IAE1EC,EAAAA,IAACC,EAAAA,QAAO,CAACC,QAAQ,YAAYH,IAAKA,KAASD,WACzCE,EAAAA,IAAA,OAAA,CAAMG,EAAE"}
@@ -82,6 +82,7 @@ export * from './CameraFilledIcon';
82
82
  export * from './CampingFilledIcon';
83
83
  export * from './CarAccidentFilledIcon';
84
84
  export * from './CarBackFilledIcon';
85
+ export * from './CarChargingFilledIcon';
85
86
  export * from './CarComparisonFilledIcon';
86
87
  export * from './CarHandFilledIcon';
87
88
  export * from './CarInfoFilledIcon';
@@ -159,6 +160,7 @@ export * from './DraghandleFilledIcon';
159
160
  export * from './EditFilledIcon';
160
161
  export * from './ElectricChargerFilledIcon';
161
162
  export * from './ElectricChargerOffFilledIcon';
163
+ export * from './EmissionLabelFilledIcon';
162
164
  export * from './EmptystateFilledIcon';
163
165
  export * from './EngineFilledIcon';
164
166
  export * from './EngineOilFilledIcon';
@@ -242,6 +244,7 @@ export * from './PasteFilledIcon';
242
244
  export * from './PercentageFilledIcon';
243
245
  export * from './PetFilledIcon';
244
246
  export * from './PhoneFilledIcon';
247
+ export * from './PictureErrorFilledIcon';
245
248
  export * from './PictureFilledIcon';
246
249
  export * from './PiggybankFilledIcon';
247
250
  export * from './PlugCCSType1FilledIcon';
@@ -251,6 +254,7 @@ export * from './PlugType1FilledIcon';
251
254
  export * from './PlugType2FilledIcon';
252
255
  export * from './PlugFilledIcon';
253
256
  export * from './PlusFilledIcon';
257
+ export * from './PowerpassFilledIcon';
254
258
  export * from './PremiumLFilledIcon';
255
259
  export * from './PremiumMFilledIcon';
256
260
  export * from './PremiumSFilledIcon';