@fluentui/react-carousel 9.9.15 → 9.9.16

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 (213) hide show
  1. package/CHANGELOG.md +11 -2
  2. package/lib/components/Carousel/Carousel.js.map +1 -1
  3. package/lib/components/Carousel/Carousel.types.js.map +1 -1
  4. package/lib/components/Carousel/index.js.map +1 -1
  5. package/lib/components/Carousel/renderCarousel.js +2 -2
  6. package/lib/components/Carousel/renderCarousel.js.map +1 -1
  7. package/lib/components/Carousel/useCarousel.js.map +1 -1
  8. package/lib/components/Carousel/useCarouselContextValues.js.map +1 -1
  9. package/lib/components/Carousel/useCarouselStyles.styles.raw.js.map +1 -1
  10. package/lib/components/CarouselAutoplayButton/CarouselAutoplayButton.js.map +1 -1
  11. package/lib/components/CarouselAutoplayButton/CarouselAutoplayButton.types.js.map +1 -1
  12. package/lib/components/CarouselAutoplayButton/index.js.map +1 -1
  13. package/lib/components/CarouselAutoplayButton/renderCarouselAutoplayButton.js.map +1 -1
  14. package/lib/components/CarouselAutoplayButton/useCarouselAutoplayButton.js.map +1 -1
  15. package/lib/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.raw.js.map +1 -1
  16. package/lib/components/CarouselButton/CarouselButton.js.map +1 -1
  17. package/lib/components/CarouselButton/CarouselButton.types.js.map +1 -1
  18. package/lib/components/CarouselButton/index.js.map +1 -1
  19. package/lib/components/CarouselButton/renderCarouselButton.js.map +1 -1
  20. package/lib/components/CarouselButton/useCarouselButton.js.map +1 -1
  21. package/lib/components/CarouselButton/useCarouselButtonStyles.styles.raw.js.map +1 -1
  22. package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
  23. package/lib/components/CarouselCard/CarouselCard.types.js.map +1 -1
  24. package/lib/components/CarouselCard/index.js.map +1 -1
  25. package/lib/components/CarouselCard/renderCarouselCard.js +2 -2
  26. package/lib/components/CarouselCard/renderCarouselCard.js.map +1 -1
  27. package/lib/components/CarouselCard/useCarouselCard.js.map +1 -1
  28. package/lib/components/CarouselCard/useCarouselCardStyles.styles.raw.js.map +1 -1
  29. package/lib/components/CarouselContext.js.map +1 -1
  30. package/lib/components/CarouselContext.types.js.map +1 -1
  31. package/lib/components/CarouselNav/CarouselNav.js.map +1 -1
  32. package/lib/components/CarouselNav/CarouselNav.types.js.map +1 -1
  33. package/lib/components/CarouselNav/CarouselNavContext.js.map +1 -1
  34. package/lib/components/CarouselNav/CarouselNavIndexContext.js.map +1 -1
  35. package/lib/components/CarouselNav/index.js.map +1 -1
  36. package/lib/components/CarouselNav/renderCarouselNav.js +2 -2
  37. package/lib/components/CarouselNav/renderCarouselNav.js.map +1 -1
  38. package/lib/components/CarouselNav/useCarouselNav.js.map +1 -1
  39. package/lib/components/CarouselNav/useCarouselNavContextValues.js.map +1 -1
  40. package/lib/components/CarouselNav/useCarouselNavStyles.styles.raw.js.map +1 -1
  41. package/lib/components/CarouselNavButton/CarouselNavButton.js.map +1 -1
  42. package/lib/components/CarouselNavButton/CarouselNavButton.types.js.map +1 -1
  43. package/lib/components/CarouselNavButton/index.js.map +1 -1
  44. package/lib/components/CarouselNavButton/renderCarouselNavButton.js +2 -2
  45. package/lib/components/CarouselNavButton/renderCarouselNavButton.js.map +1 -1
  46. package/lib/components/CarouselNavButton/useCarouselNavButton.js +2 -2
  47. package/lib/components/CarouselNavButton/useCarouselNavButton.js.map +1 -1
  48. package/lib/components/CarouselNavButton/useCarouselNavButtonStyles.styles.raw.js.map +1 -1
  49. package/lib/components/CarouselNavContainer/CarouselNavContainer.js.map +1 -1
  50. package/lib/components/CarouselNavContainer/CarouselNavContainer.types.js.map +1 -1
  51. package/lib/components/CarouselNavContainer/index.js.map +1 -1
  52. package/lib/components/CarouselNavContainer/renderCarouselNavContainer.js +2 -2
  53. package/lib/components/CarouselNavContainer/renderCarouselNavContainer.js.map +1 -1
  54. package/lib/components/CarouselNavContainer/useCarouselNavContainer.js.map +1 -1
  55. package/lib/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.raw.js.map +1 -1
  56. package/lib/components/CarouselNavImageButton/CarouselNavImageButton.js.map +1 -1
  57. package/lib/components/CarouselNavImageButton/CarouselNavImageButton.types.js.map +1 -1
  58. package/lib/components/CarouselNavImageButton/index.js.map +1 -1
  59. package/lib/components/CarouselNavImageButton/renderCarouselNavImageButton.js +2 -2
  60. package/lib/components/CarouselNavImageButton/renderCarouselNavImageButton.js.map +1 -1
  61. package/lib/components/CarouselNavImageButton/useCarouselNavImageButton.js +2 -2
  62. package/lib/components/CarouselNavImageButton/useCarouselNavImageButton.js.map +1 -1
  63. package/lib/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.raw.js.map +1 -1
  64. package/lib/components/CarouselSlider/CarouselSlider.js.map +1 -1
  65. package/lib/components/CarouselSlider/CarouselSlider.types.js.map +1 -1
  66. package/lib/components/CarouselSlider/CarouselSliderContext.js.map +1 -1
  67. package/lib/components/CarouselSlider/index.js.map +1 -1
  68. package/lib/components/CarouselSlider/renderCarouselSlider.js +2 -2
  69. package/lib/components/CarouselSlider/renderCarouselSlider.js.map +1 -1
  70. package/lib/components/CarouselSlider/useCarouselSlider.js.map +1 -1
  71. package/lib/components/CarouselSlider/useCarouselSliderContextValues.js.map +1 -1
  72. package/lib/components/CarouselSlider/useCarouselSliderStyles.styles.raw.js.map +1 -1
  73. package/lib/components/CarouselViewport/CarouselViewport.js.map +1 -1
  74. package/lib/components/CarouselViewport/CarouselViewport.types.js.map +1 -1
  75. package/lib/components/CarouselViewport/index.js.map +1 -1
  76. package/lib/components/CarouselViewport/renderCarouselViewport.js +2 -2
  77. package/lib/components/CarouselViewport/renderCarouselViewport.js.map +1 -1
  78. package/lib/components/CarouselViewport/useCarouselViewport.js.map +1 -1
  79. package/lib/components/CarouselViewport/useCarouselViewportStyles.styles.raw.js.map +1 -1
  80. package/lib/components/pointerEvents.js.map +1 -1
  81. package/lib/components/useEmblaCarousel.js +22 -28
  82. package/lib/components/useEmblaCarousel.js.map +1 -1
  83. package/lib-commonjs/Carousel.cjs +6 -6
  84. package/lib-commonjs/CarouselAutoplayButton.cjs +6 -6
  85. package/lib-commonjs/CarouselButton.cjs +6 -6
  86. package/lib-commonjs/CarouselCard.cjs +6 -6
  87. package/lib-commonjs/CarouselContext.cjs +4 -4
  88. package/lib-commonjs/CarouselNav.cjs +6 -6
  89. package/lib-commonjs/CarouselNavButton.cjs +6 -6
  90. package/lib-commonjs/CarouselNavContainer.cjs +6 -6
  91. package/lib-commonjs/CarouselNavImageButton.cjs +6 -6
  92. package/lib-commonjs/CarouselSlider.cjs +6 -6
  93. package/lib-commonjs/CarouselViewport.cjs +6 -6
  94. package/lib-commonjs/components/Carousel/Carousel.cjs.map +1 -1
  95. package/lib-commonjs/components/Carousel/Carousel.types.cjs.map +1 -1
  96. package/lib-commonjs/components/Carousel/index.cjs +6 -6
  97. package/lib-commonjs/components/Carousel/index.cjs.map +1 -1
  98. package/lib-commonjs/components/Carousel/renderCarousel.cjs.map +1 -1
  99. package/lib-commonjs/components/Carousel/useCarousel.cjs.map +1 -1
  100. package/lib-commonjs/components/Carousel/useCarouselContextValues.cjs.map +1 -1
  101. package/lib-commonjs/components/Carousel/useCarouselStyles.styles.cjs +3 -3
  102. package/lib-commonjs/components/Carousel/useCarouselStyles.styles.cjs.map +1 -1
  103. package/lib-commonjs/components/Carousel/useCarouselStyles.styles.raw.cjs +3 -3
  104. package/lib-commonjs/components/Carousel/useCarouselStyles.styles.raw.cjs.map +1 -1
  105. package/lib-commonjs/components/CarouselAutoplayButton/CarouselAutoplayButton.cjs.map +1 -1
  106. package/lib-commonjs/components/CarouselAutoplayButton/CarouselAutoplayButton.types.cjs.map +1 -1
  107. package/lib-commonjs/components/CarouselAutoplayButton/index.cjs +6 -6
  108. package/lib-commonjs/components/CarouselAutoplayButton/index.cjs.map +1 -1
  109. package/lib-commonjs/components/CarouselAutoplayButton/renderCarouselAutoplayButton.cjs.map +1 -1
  110. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButton.cjs.map +1 -1
  111. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.cjs +3 -3
  112. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.cjs.map +1 -1
  113. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.raw.cjs +3 -3
  114. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.raw.cjs.map +1 -1
  115. package/lib-commonjs/components/CarouselButton/CarouselButton.cjs.map +1 -1
  116. package/lib-commonjs/components/CarouselButton/CarouselButton.types.cjs.map +1 -1
  117. package/lib-commonjs/components/CarouselButton/index.cjs +6 -6
  118. package/lib-commonjs/components/CarouselButton/index.cjs.map +1 -1
  119. package/lib-commonjs/components/CarouselButton/renderCarouselButton.cjs.map +1 -1
  120. package/lib-commonjs/components/CarouselButton/useCarouselButton.cjs.map +1 -1
  121. package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.cjs +3 -3
  122. package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.cjs.map +1 -1
  123. package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.raw.cjs +3 -3
  124. package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.raw.cjs.map +1 -1
  125. package/lib-commonjs/components/CarouselCard/CarouselCard.cjs.map +1 -1
  126. package/lib-commonjs/components/CarouselCard/CarouselCard.types.cjs.map +1 -1
  127. package/lib-commonjs/components/CarouselCard/index.cjs +6 -6
  128. package/lib-commonjs/components/CarouselCard/index.cjs.map +1 -1
  129. package/lib-commonjs/components/CarouselCard/renderCarouselCard.cjs.map +1 -1
  130. package/lib-commonjs/components/CarouselCard/useCarouselCard.cjs.map +1 -1
  131. package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.cjs +3 -3
  132. package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.cjs.map +1 -1
  133. package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.raw.cjs +3 -3
  134. package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.raw.cjs.map +1 -1
  135. package/lib-commonjs/components/CarouselContext.cjs +4 -4
  136. package/lib-commonjs/components/CarouselContext.cjs.map +1 -1
  137. package/lib-commonjs/components/CarouselContext.types.cjs.map +1 -1
  138. package/lib-commonjs/components/CarouselNav/CarouselNav.cjs.map +1 -1
  139. package/lib-commonjs/components/CarouselNav/CarouselNav.types.cjs.map +1 -1
  140. package/lib-commonjs/components/CarouselNav/CarouselNavContext.cjs +4 -4
  141. package/lib-commonjs/components/CarouselNav/CarouselNavContext.cjs.map +1 -1
  142. package/lib-commonjs/components/CarouselNav/CarouselNavIndexContext.cjs +4 -4
  143. package/lib-commonjs/components/CarouselNav/CarouselNavIndexContext.cjs.map +1 -1
  144. package/lib-commonjs/components/CarouselNav/index.cjs +6 -6
  145. package/lib-commonjs/components/CarouselNav/index.cjs.map +1 -1
  146. package/lib-commonjs/components/CarouselNav/renderCarouselNav.cjs.map +1 -1
  147. package/lib-commonjs/components/CarouselNav/useCarouselNav.cjs.map +1 -1
  148. package/lib-commonjs/components/CarouselNav/useCarouselNavContextValues.cjs.map +1 -1
  149. package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.cjs +3 -3
  150. package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.cjs.map +1 -1
  151. package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.raw.cjs +3 -3
  152. package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.raw.cjs.map +1 -1
  153. package/lib-commonjs/components/CarouselNavButton/CarouselNavButton.cjs.map +1 -1
  154. package/lib-commonjs/components/CarouselNavButton/CarouselNavButton.types.cjs.map +1 -1
  155. package/lib-commonjs/components/CarouselNavButton/index.cjs +6 -6
  156. package/lib-commonjs/components/CarouselNavButton/index.cjs.map +1 -1
  157. package/lib-commonjs/components/CarouselNavButton/renderCarouselNavButton.cjs.map +1 -1
  158. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButton.cjs +2 -2
  159. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButton.cjs.map +1 -1
  160. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.cjs +3 -3
  161. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.cjs.map +1 -1
  162. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.raw.cjs +3 -3
  163. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.raw.cjs.map +1 -1
  164. package/lib-commonjs/components/CarouselNavContainer/CarouselNavContainer.cjs.map +1 -1
  165. package/lib-commonjs/components/CarouselNavContainer/CarouselNavContainer.types.cjs.map +1 -1
  166. package/lib-commonjs/components/CarouselNavContainer/index.cjs +6 -6
  167. package/lib-commonjs/components/CarouselNavContainer/index.cjs.map +1 -1
  168. package/lib-commonjs/components/CarouselNavContainer/renderCarouselNavContainer.cjs.map +1 -1
  169. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainer.cjs.map +1 -1
  170. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.cjs +3 -3
  171. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.cjs.map +1 -1
  172. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.raw.cjs +3 -3
  173. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.raw.cjs.map +1 -1
  174. package/lib-commonjs/components/CarouselNavImageButton/CarouselNavImageButton.cjs.map +1 -1
  175. package/lib-commonjs/components/CarouselNavImageButton/CarouselNavImageButton.types.cjs.map +1 -1
  176. package/lib-commonjs/components/CarouselNavImageButton/index.cjs +6 -6
  177. package/lib-commonjs/components/CarouselNavImageButton/index.cjs.map +1 -1
  178. package/lib-commonjs/components/CarouselNavImageButton/renderCarouselNavImageButton.cjs.map +1 -1
  179. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButton.cjs +2 -2
  180. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButton.cjs.map +1 -1
  181. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.cjs +3 -3
  182. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.cjs.map +1 -1
  183. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.raw.cjs +3 -3
  184. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.raw.cjs.map +1 -1
  185. package/lib-commonjs/components/CarouselSlider/CarouselSlider.cjs.map +1 -1
  186. package/lib-commonjs/components/CarouselSlider/CarouselSlider.types.cjs.map +1 -1
  187. package/lib-commonjs/components/CarouselSlider/CarouselSliderContext.cjs +4 -4
  188. package/lib-commonjs/components/CarouselSlider/CarouselSliderContext.cjs.map +1 -1
  189. package/lib-commonjs/components/CarouselSlider/index.cjs +6 -6
  190. package/lib-commonjs/components/CarouselSlider/index.cjs.map +1 -1
  191. package/lib-commonjs/components/CarouselSlider/renderCarouselSlider.cjs.map +1 -1
  192. package/lib-commonjs/components/CarouselSlider/useCarouselSlider.cjs.map +1 -1
  193. package/lib-commonjs/components/CarouselSlider/useCarouselSliderContextValues.cjs.map +1 -1
  194. package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.cjs +3 -3
  195. package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.cjs.map +1 -1
  196. package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.raw.cjs +3 -3
  197. package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.raw.cjs.map +1 -1
  198. package/lib-commonjs/components/CarouselViewport/CarouselViewport.cjs.map +1 -1
  199. package/lib-commonjs/components/CarouselViewport/CarouselViewport.types.cjs.map +1 -1
  200. package/lib-commonjs/components/CarouselViewport/index.cjs +6 -6
  201. package/lib-commonjs/components/CarouselViewport/index.cjs.map +1 -1
  202. package/lib-commonjs/components/CarouselViewport/renderCarouselViewport.cjs.map +1 -1
  203. package/lib-commonjs/components/CarouselViewport/useCarouselViewport.cjs.map +1 -1
  204. package/lib-commonjs/components/CarouselViewport/useCarouselViewportStyles.styles.cjs +3 -3
  205. package/lib-commonjs/components/CarouselViewport/useCarouselViewportStyles.styles.cjs.map +1 -1
  206. package/lib-commonjs/components/CarouselViewport/useCarouselViewportStyles.styles.raw.cjs +3 -3
  207. package/lib-commonjs/components/CarouselViewport/useCarouselViewportStyles.styles.raw.cjs.map +1 -1
  208. package/lib-commonjs/components/pointerEvents.cjs.map +1 -1
  209. package/lib-commonjs/components/useEmblaCarousel.cjs +26 -32
  210. package/lib-commonjs/components/useEmblaCarousel.cjs.map +1 -1
  211. package/lib-commonjs/index.cjs +54 -54
  212. package/lib-commonjs/index.cjs.map +1 -1
  213. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CarouselViewport/CarouselViewport.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCarouselViewport_unstable } from './useCarouselViewport';\nimport { renderCarouselViewport_unstable } from './renderCarouselViewport';\nimport { useCarouselViewportStyles_unstable } from './useCarouselViewportStyles.styles';\nimport type { CarouselViewportProps } from './CarouselViewport.types';\nimport { useCarouselSliderContextValues_unstable } from '../CarouselSlider/useCarouselSliderContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * CarouselViewport component - TODO: add more docs\n */\nexport const CarouselViewport: ForwardRefComponent<CarouselViewportProps> = React.forwardRef((props, ref) => {\n const state = useCarouselViewport_unstable(props, ref);\n\n useCarouselViewportStyles_unstable(state);\n useCustomStyleHook_unstable('useCarouselViewportStyles_unstable')(state);\n\n const context = useCarouselSliderContextValues_unstable(state);\n\n return renderCarouselViewport_unstable(state, context);\n});\n\nCarouselViewport.displayName = 'CarouselViewport';\n"],"names":["React","useCarouselViewport_unstable","renderCarouselViewport_unstable","useCarouselViewportStyles_unstable","useCarouselSliderContextValues_unstable","useCustomStyleHook_unstable","CarouselViewport","forwardRef","props","ref","state","context","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,+BAA+B,QAAQ,8BAA2B;AAC3E,SAASC,kCAAkC,QAAQ,wCAAqC;AAExF,SAASC,uCAAuC,QAAQ,sDAAmD;AAC3G,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,iCAA+DN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACnG,MAAMC,QAAQT,6BAA6BO,OAAOC;IAElDN,mCAAmCO;IACnCL,4BAA4B,sCAAsCK;IAElE,MAAMC,UAAUP,wCAAwCM;IAExD,OAAOR,gCAAgCQ,OAAOC;AAChD,GAAG;AAEHL,iBAAiBM,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/CarouselViewport/CarouselViewport.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCarouselViewport_unstable } from './useCarouselViewport';\nimport { renderCarouselViewport_unstable } from './renderCarouselViewport';\nimport { useCarouselViewportStyles_unstable } from './useCarouselViewportStyles.styles';\nimport type { CarouselViewportProps } from './CarouselViewport.types';\nimport { useCarouselSliderContextValues_unstable } from '../CarouselSlider/useCarouselSliderContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * CarouselViewport component - TODO: add more docs\n */\nexport const CarouselViewport: ForwardRefComponent<CarouselViewportProps> = React.forwardRef((props, ref) => {\n const state = useCarouselViewport_unstable(props, ref);\n\n useCarouselViewportStyles_unstable(state);\n useCustomStyleHook_unstable('useCarouselViewportStyles_unstable')(state);\n\n const context = useCarouselSliderContextValues_unstable(state);\n\n return renderCarouselViewport_unstable(state, context);\n});\n\nCarouselViewport.displayName = 'CarouselViewport';\n"],"names":["React","useCarouselViewport_unstable","renderCarouselViewport_unstable","useCarouselViewportStyles_unstable","useCarouselSliderContextValues_unstable","useCustomStyleHook_unstable","CarouselViewport","forwardRef","props","ref","state","context","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,+BAA+B,QAAQ,8BAA2B;AAC3E,SAASC,kCAAkC,QAAQ,wCAAqC;AAExF,SAASC,uCAAuC,QAAQ,sDAAmD;AAC3G,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,iCAA+DN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACnG,MAAMC,QAAQT,6BAA6BO,OAAOC;IAElDN,mCAAmCO;IACnCL,4BAA4B,sCAAsCK;IAElE,MAAMC,UAAUP,wCAAwCM;IAExD,OAAOR,gCAAgCQ,OAAOC;AAChD,GAAG;AAEHL,iBAAiBM,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CarouselViewport/CarouselViewport.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { CarouselSliderContextValue } from '../CarouselSlider/CarouselSlider.types';\n\nexport type CarouselViewportSlots = {\n /**\n * The viewport outer container, defining the size of the carousels visible and interactable area\n */\n root: Slot<'div'>;\n};\n\n/**\n * CarouselViewport Props\n */\nexport type CarouselViewportProps = ComponentProps<CarouselViewportSlots>;\n\n/**\n * State used in rendering CarouselViewport\n */\nexport type CarouselViewportState = ComponentState<Required<CarouselViewportSlots>> & CarouselSliderContextValue;\n"],"names":[],"mappings":"AAeA;;CAEC,GACD,WAAiH"}
1
+ {"version":3,"sources":["../../../src/components/CarouselViewport/CarouselViewport.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { CarouselSliderContextValue } from '../CarouselSlider/CarouselSlider.types';\n\nexport type CarouselViewportSlots = {\n /**\n * The viewport outer container, defining the size of the carousels visible and interactable area\n */\n root: Slot<'div'>;\n};\n\n/**\n * CarouselViewport Props\n */\nexport type CarouselViewportProps = ComponentProps<CarouselViewportSlots>;\n\n/**\n * State used in rendering CarouselViewport\n */\nexport type CarouselViewportState = ComponentState<Required<CarouselViewportSlots>> & CarouselSliderContextValue;\n"],"names":[],"mappings":"AAeA;;CAEC,GACD,WAAiH"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CarouselViewport/index.ts"],"sourcesContent":["export { CarouselViewport } from './CarouselViewport';\nexport type { CarouselViewportProps, CarouselViewportSlots, CarouselViewportState } from './CarouselViewport.types';\nexport { renderCarouselViewport_unstable } from './renderCarouselViewport';\nexport { useCarouselViewport_unstable } from './useCarouselViewport';\nexport { carouselViewportClassNames, useCarouselViewportStyles_unstable } from './useCarouselViewportStyles.styles';\n"],"names":["CarouselViewport","renderCarouselViewport_unstable","useCarouselViewport_unstable","carouselViewportClassNames","useCarouselViewportStyles_unstable"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,wBAAqB;AAEtD,SAASC,+BAA+B,QAAQ,8BAA2B;AAC3E,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,0BAA0B,EAAEC,kCAAkC,QAAQ,wCAAqC"}
1
+ {"version":3,"sources":["../../../src/components/CarouselViewport/index.ts"],"sourcesContent":["export { CarouselViewport } from './CarouselViewport';\nexport type { CarouselViewportProps, CarouselViewportSlots, CarouselViewportState } from './CarouselViewport.types';\nexport { renderCarouselViewport_unstable } from './renderCarouselViewport';\nexport { useCarouselViewport_unstable } from './useCarouselViewport';\nexport { carouselViewportClassNames, useCarouselViewportStyles_unstable } from './useCarouselViewportStyles.styles';\n"],"names":["CarouselViewport","renderCarouselViewport_unstable","useCarouselViewport_unstable","carouselViewportClassNames","useCarouselViewportStyles_unstable"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,wBAAqB;AAEtD,SAASC,+BAA+B,QAAQ,8BAA2B;AAC3E,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,0BAA0B,EAAEC,kCAAkC,QAAQ,wCAAqC"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  import { CarouselSliderContextProvider } from "../CarouselSlider/CarouselSliderContext.js";
4
4
  /**
5
5
  * Render the final JSX of CarouselViewport
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CarouselViewport/renderCarouselViewport.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { CarouselViewportState, CarouselViewportSlots } from './CarouselViewport.types';\nimport type { CarouselSliderContextValues } from '../CarouselSlider/CarouselSliderContext';\nimport { CarouselSliderContextProvider } from '../CarouselSlider/CarouselSliderContext';\n\n/**\n * Render the final JSX of CarouselViewport\n */\nexport const renderCarouselViewport_unstable = (\n state: CarouselViewportState,\n contextValues: CarouselSliderContextValues,\n): JSXElement => {\n assertSlots<CarouselViewportSlots>(state);\n\n return (\n <CarouselSliderContextProvider value={contextValues.carouselSlider}>\n <state.root />\n </CarouselSliderContextProvider>\n );\n};\n"],"names":["assertSlots","CarouselSliderContextProvider","renderCarouselViewport_unstable","state","contextValues","value","carouselSlider","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD,SAASC,6BAA6B,QAAQ,6CAA0C;AAExF;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAC7CC,OACAC;IAEAJ,YAAmCG;IAEnC,qBACE,KAACF;QAA8BI,OAAOD,cAAcE,cAAc;kBAChE,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/CarouselViewport/renderCarouselViewport.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { CarouselViewportState, CarouselViewportSlots } from './CarouselViewport.types';\nimport type { CarouselSliderContextValues } from '../CarouselSlider/CarouselSliderContext';\nimport { CarouselSliderContextProvider } from '../CarouselSlider/CarouselSliderContext';\n\n/**\n * Render the final JSX of CarouselViewport\n */\nexport const renderCarouselViewport_unstable = (\n state: CarouselViewportState,\n contextValues: CarouselSliderContextValues,\n): JSXElement => {\n assertSlots<CarouselViewportSlots>(state);\n\n return (\n <CarouselSliderContextProvider value={contextValues.carouselSlider}>\n <state.root />\n </CarouselSliderContextProvider>\n );\n};\n"],"names":["assertSlots","CarouselSliderContextProvider","renderCarouselViewport_unstable","state","contextValues","value","carouselSlider","root"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD,SAASC,6BAA6B,QAAQ,6CAA0C;AAExF;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAC7CC,OACAC;IAEAJ,YAAmCG;IAEnC,qBACE,KAACF;QAA8BI,OAAOD,cAAcE,cAAc;kBAChE,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CarouselViewport/useCarouselViewport.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot, useMergedRefs } from '@fluentui/react-utilities';\nimport type { CarouselViewportProps, CarouselViewportState } from './CarouselViewport.types';\nimport { useCarouselContext_unstable as useCarouselContext } from '../CarouselContext';\n\n/**\n * Create the state required to render CarouselViewport.\n *\n * The returned state can be modified with hooks such as useCarouselViewportStyles_unstable,\n * before being passed to renderCarouselViewport_unstable.\n *\n * @param props - props from this instance of CarouselViewport\n * @param ref - reference to root HTMLDivElement of CarouselViewport\n */\nexport const useCarouselViewport_unstable = (\n props: CarouselViewportProps,\n ref: React.Ref<HTMLDivElement>,\n): CarouselViewportState => {\n const hasFocus = React.useRef(false);\n const hasMouse = React.useRef(false);\n const viewportRef = useCarouselContext(ctx => ctx.viewportRef);\n const enableAutoplay = useCarouselContext(ctx => ctx.enableAutoplay);\n\n const handleFocusCapture = React.useCallback(() => {\n hasFocus.current = true;\n // Will pause autoplay when focus is captured within viewport (if autoplay is initialized)\n enableAutoplay(false, true);\n }, [enableAutoplay]);\n\n const handleBlurCapture = React.useCallback(\n (e: React.FocusEvent) => {\n // Will enable autoplay (if initialized) when focus exits viewport\n if (!e.currentTarget.contains(e.relatedTarget)) {\n hasFocus.current = false;\n if (!hasMouse.current) {\n enableAutoplay(true, true);\n }\n }\n },\n [enableAutoplay],\n );\n\n const handleMouseEnter = React.useCallback(() => {\n hasMouse.current = true;\n enableAutoplay(false, true);\n }, [enableAutoplay]);\n const handleMouseLeave = React.useCallback(() => {\n hasMouse.current = false;\n if (!hasFocus.current) {\n enableAutoplay(true, true);\n }\n }, [enableAutoplay]);\n\n // eslint-disable-next-line react-hooks/refs\n const onFocusCapture = mergeCallbacks(props.onFocusCapture, handleFocusCapture);\n // eslint-disable-next-line react-hooks/refs\n const onBlurCapture = mergeCallbacks(props.onBlurCapture, handleBlurCapture);\n // eslint-disable-next-line react-hooks/refs\n const onMouseEnter = mergeCallbacks(props.onMouseEnter, handleMouseEnter);\n // eslint-disable-next-line react-hooks/refs\n const onMouseLeave = mergeCallbacks(props.onMouseLeave, handleMouseLeave);\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, viewportRef),\n role: 'presentation',\n // Draggable ensures dragging is supported (even if not enabled)\n draggable: true,\n ...props,\n onFocusCapture,\n onBlurCapture,\n onMouseEnter,\n onMouseLeave,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","useMergedRefs","useCarouselContext_unstable","useCarouselContext","useCarouselViewport_unstable","props","ref","hasFocus","useRef","hasMouse","viewportRef","ctx","enableAutoplay","handleFocusCapture","useCallback","current","handleBlurCapture","e","currentTarget","contains","relatedTarget","handleMouseEnter","handleMouseLeave","onFocusCapture","onBlurCapture","onMouseEnter","onMouseLeave","components","root","always","role","draggable","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,EAAEC,aAAa,QAAQ,4BAA4B;AAE1G,SAASC,+BAA+BC,kBAAkB,QAAQ,wBAAqB;AAEvF;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;IAEA,MAAMC,WAAWV,MAAMW,MAAM,CAAC;IAC9B,MAAMC,WAAWZ,MAAMW,MAAM,CAAC;IAC9B,MAAME,cAAcP,mBAAmBQ,CAAAA,MAAOA,IAAID,WAAW;IAC7D,MAAME,iBAAiBT,mBAAmBQ,CAAAA,MAAOA,IAAIC,cAAc;IAEnE,MAAMC,qBAAqBhB,MAAMiB,WAAW,CAAC;QAC3CP,SAASQ,OAAO,GAAG;QACnB,0FAA0F;QAC1FH,eAAe,OAAO;IACxB,GAAG;QAACA;KAAe;IAEnB,MAAMI,oBAAoBnB,MAAMiB,WAAW,CACzC,CAACG;QACC,kEAAkE;QAClE,IAAI,CAACA,EAAEC,aAAa,CAACC,QAAQ,CAACF,EAAEG,aAAa,GAAG;YAC9Cb,SAASQ,OAAO,GAAG;YACnB,IAAI,CAACN,SAASM,OAAO,EAAE;gBACrBH,eAAe,MAAM;YACvB;QACF;IACF,GACA;QAACA;KAAe;IAGlB,MAAMS,mBAAmBxB,MAAMiB,WAAW,CAAC;QACzCL,SAASM,OAAO,GAAG;QACnBH,eAAe,OAAO;IACxB,GAAG;QAACA;KAAe;IACnB,MAAMU,mBAAmBzB,MAAMiB,WAAW,CAAC;QACzCL,SAASM,OAAO,GAAG;QACnB,IAAI,CAACR,SAASQ,OAAO,EAAE;YACrBH,eAAe,MAAM;QACvB;IACF,GAAG;QAACA;KAAe;IAEnB,4CAA4C;IAC5C,MAAMW,iBAAiBxB,eAAeM,MAAMkB,cAAc,EAAEV;IAC5D,4CAA4C;IAC5C,MAAMW,gBAAgBzB,eAAeM,MAAMmB,aAAa,EAAER;IAC1D,4CAA4C;IAC5C,MAAMS,eAAe1B,eAAeM,MAAMoB,YAAY,EAAEJ;IACxD,4CAA4C;IAC5C,MAAMK,eAAe3B,eAAeM,MAAMqB,YAAY,EAAEJ;IAExD,OAAO;QACLK,YAAY;YACVC,MAAM;QACR;QACAA,MAAM5B,KAAK6B,MAAM,CACf/B,yBAAyB,OAAO;YAC9BQ,KAAKL,cAAcK,KAAKI;YACxBoB,MAAM;YACN,gEAAgE;YAChEC,WAAW;YACX,GAAG1B,KAAK;YACRkB;YACAC;YACAC;YACAC;QACF,IACA;YAAEM,aAAa;QAAM;IAEzB;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/CarouselViewport/useCarouselViewport.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot, useMergedRefs } from '@fluentui/react-utilities';\nimport type { CarouselViewportProps, CarouselViewportState } from './CarouselViewport.types';\nimport { useCarouselContext_unstable as useCarouselContext } from '../CarouselContext';\n\n/**\n * Create the state required to render CarouselViewport.\n *\n * The returned state can be modified with hooks such as useCarouselViewportStyles_unstable,\n * before being passed to renderCarouselViewport_unstable.\n *\n * @param props - props from this instance of CarouselViewport\n * @param ref - reference to root HTMLDivElement of CarouselViewport\n */\nexport const useCarouselViewport_unstable = (\n props: CarouselViewportProps,\n ref: React.Ref<HTMLDivElement>,\n): CarouselViewportState => {\n const hasFocus = React.useRef(false);\n const hasMouse = React.useRef(false);\n const viewportRef = useCarouselContext(ctx => ctx.viewportRef);\n const enableAutoplay = useCarouselContext(ctx => ctx.enableAutoplay);\n\n const handleFocusCapture = React.useCallback(() => {\n hasFocus.current = true;\n // Will pause autoplay when focus is captured within viewport (if autoplay is initialized)\n enableAutoplay(false, true);\n }, [enableAutoplay]);\n\n const handleBlurCapture = React.useCallback(\n (e: React.FocusEvent) => {\n // Will enable autoplay (if initialized) when focus exits viewport\n if (!e.currentTarget.contains(e.relatedTarget)) {\n hasFocus.current = false;\n if (!hasMouse.current) {\n enableAutoplay(true, true);\n }\n }\n },\n [enableAutoplay],\n );\n\n const handleMouseEnter = React.useCallback(() => {\n hasMouse.current = true;\n enableAutoplay(false, true);\n }, [enableAutoplay]);\n const handleMouseLeave = React.useCallback(() => {\n hasMouse.current = false;\n if (!hasFocus.current) {\n enableAutoplay(true, true);\n }\n }, [enableAutoplay]);\n\n // eslint-disable-next-line react-hooks/refs\n const onFocusCapture = mergeCallbacks(props.onFocusCapture, handleFocusCapture);\n // eslint-disable-next-line react-hooks/refs\n const onBlurCapture = mergeCallbacks(props.onBlurCapture, handleBlurCapture);\n // eslint-disable-next-line react-hooks/refs\n const onMouseEnter = mergeCallbacks(props.onMouseEnter, handleMouseEnter);\n // eslint-disable-next-line react-hooks/refs\n const onMouseLeave = mergeCallbacks(props.onMouseLeave, handleMouseLeave);\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, viewportRef),\n role: 'presentation',\n // Draggable ensures dragging is supported (even if not enabled)\n draggable: true,\n ...props,\n onFocusCapture,\n onBlurCapture,\n onMouseEnter,\n onMouseLeave,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","useMergedRefs","useCarouselContext_unstable","useCarouselContext","useCarouselViewport_unstable","props","ref","hasFocus","useRef","hasMouse","viewportRef","ctx","enableAutoplay","handleFocusCapture","useCallback","current","handleBlurCapture","e","currentTarget","contains","relatedTarget","handleMouseEnter","handleMouseLeave","onFocusCapture","onBlurCapture","onMouseEnter","onMouseLeave","components","root","always","role","draggable","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,EAAEC,aAAa,QAAQ,4BAA4B;AAE1G,SAASC,+BAA+BC,kBAAkB,QAAQ,wBAAqB;AAEvF;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;IAEA,MAAMC,WAAWV,MAAMW,MAAM,CAAC;IAC9B,MAAMC,WAAWZ,MAAMW,MAAM,CAAC;IAC9B,MAAME,cAAcP,mBAAmBQ,CAAAA,MAAOA,IAAID,WAAW;IAC7D,MAAME,iBAAiBT,mBAAmBQ,CAAAA,MAAOA,IAAIC,cAAc;IAEnE,MAAMC,qBAAqBhB,MAAMiB,WAAW,CAAC;QAC3CP,SAASQ,OAAO,GAAG;QACnB,0FAA0F;QAC1FH,eAAe,OAAO;IACxB,GAAG;QAACA;KAAe;IAEnB,MAAMI,oBAAoBnB,MAAMiB,WAAW,CACzC,CAACG;QACC,kEAAkE;QAClE,IAAI,CAACA,EAAEC,aAAa,CAACC,QAAQ,CAACF,EAAEG,aAAa,GAAG;YAC9Cb,SAASQ,OAAO,GAAG;YACnB,IAAI,CAACN,SAASM,OAAO,EAAE;gBACrBH,eAAe,MAAM;YACvB;QACF;IACF,GACA;QAACA;KAAe;IAGlB,MAAMS,mBAAmBxB,MAAMiB,WAAW,CAAC;QACzCL,SAASM,OAAO,GAAG;QACnBH,eAAe,OAAO;IACxB,GAAG;QAACA;KAAe;IACnB,MAAMU,mBAAmBzB,MAAMiB,WAAW,CAAC;QACzCL,SAASM,OAAO,GAAG;QACnB,IAAI,CAACR,SAASQ,OAAO,EAAE;YACrBH,eAAe,MAAM;QACvB;IACF,GAAG;QAACA;KAAe;IAEnB,4CAA4C;IAC5C,MAAMW,iBAAiBxB,eAAeM,MAAMkB,cAAc,EAAEV;IAC5D,4CAA4C;IAC5C,MAAMW,gBAAgBzB,eAAeM,MAAMmB,aAAa,EAAER;IAC1D,4CAA4C;IAC5C,MAAMS,eAAe1B,eAAeM,MAAMoB,YAAY,EAAEJ;IACxD,4CAA4C;IAC5C,MAAMK,eAAe3B,eAAeM,MAAMqB,YAAY,EAAEJ;IAExD,OAAO;QACLK,YAAY;YACVC,MAAM;QACR;QACAA,MAAM5B,KAAK6B,MAAM,CACf/B,yBAAyB,OAAO;YAC9BQ,KAAKL,cAAcK,KAAKI;YACxBoB,MAAM;YACN,gEAAgE;YAChEC,WAAW;YACX,GAAG1B,KAAK;YACRkB;YACAC;YACAC;YACAC;QACF,IACA;YAAEM,aAAa;QAAM;IAEzB;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CarouselViewport/useCarouselViewportStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CarouselViewportSlots, CarouselViewportState } from './CarouselViewport.types';\n\nexport const carouselViewportClassNames: SlotClassNames<CarouselViewportSlots> = {\n root: 'fui-CarouselViewport',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n maxWidth: '100%',\n width: 'auto',\n },\n});\n\n/**\n * Apply styling to the CarouselViewport slots based on the state\n */\nexport const useCarouselViewportStyles_unstable = (state: CarouselViewportState): CarouselViewportState => {\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(carouselViewportClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","carouselViewportClassNames","root","useStyles","maxWidth","width","useCarouselViewportStyles_unstable","state","styles","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAI1D,OAAO,MAAMC,6BAAoE;IAC/EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYJ,WAAW;IAC3BG,MAAM;QACJE,UAAU;QACVC,OAAO;IACT;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,qCAAqC,CAACC;IACjD,MAAMC,SAASL;IACf,oDAAoD;IACpDI,MAAML,IAAI,CAACO,SAAS,GAAGT,aAAaC,2BAA2BC,IAAI,EAAEM,OAAON,IAAI,EAAEK,MAAML,IAAI,CAACO,SAAS;IAEtG,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/CarouselViewport/useCarouselViewportStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CarouselViewportSlots, CarouselViewportState } from './CarouselViewport.types';\n\nexport const carouselViewportClassNames: SlotClassNames<CarouselViewportSlots> = {\n root: 'fui-CarouselViewport',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n maxWidth: '100%',\n width: 'auto',\n },\n});\n\n/**\n * Apply styling to the CarouselViewport slots based on the state\n */\nexport const useCarouselViewportStyles_unstable = (state: CarouselViewportState): CarouselViewportState => {\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(carouselViewportClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","carouselViewportClassNames","root","useStyles","maxWidth","width","useCarouselViewportStyles_unstable","state","styles","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAI1D,OAAO,MAAMC,6BAAoE;IAC/EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYJ,WAAW;IAC3BG,MAAM;QACJE,UAAU;QACVC,OAAO;IACT;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,qCAAqC,CAACC;IACjD,MAAMC,SAASL;IACf,oDAAoD;IACpDI,MAAML,IAAI,CAACO,SAAS,GAAGT,aAAaC,2BAA2BC,IAAI,EAAEM,OAAON,IAAI,EAAEK,MAAML,IAAI,CAACO,SAAS;IAEtG,OAAOF;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/pointerEvents.ts"],"sourcesContent":["import type { CreatePluginType, EmblaCarouselType, OptionsHandlerType } from 'embla-carousel';\nimport { carouselClassNames } from '../Carousel';\n\nexport type PointerEventPluginOptions = {\n onSelectViaDrag: (event: PointerEvent | MouseEvent, index: number) => void;\n};\n\nexport type PointerEventPlugin = CreatePluginType<{}, PointerEventPluginOptions>;\n\nexport function pointerEventPlugin(options: PointerEventPluginOptions): PointerEventPlugin {\n let emblaApi: EmblaCarouselType;\n let pointerEvent: PointerEvent | MouseEvent | undefined;\n let carouselListenerTarget: HTMLElement | undefined;\n\n /**\n * Heads up!\n *\n * We don't use `emblaApi.on('pointerDown', ...)` as the callback does not provide the event.\n */\n function documentDownListener(event: PointerEvent | MouseEvent) {\n if (event.target) {\n const targetNode = event.target as Element;\n\n if (targetNode.classList.contains(carouselClassNames.root) || carouselListenerTarget?.contains(targetNode)) {\n pointerEvent = event;\n }\n }\n\n if (carouselListenerTarget) {\n carouselListenerTarget.removeEventListener('mousedown', documentDownListener);\n carouselListenerTarget.removeEventListener('pointerdown', documentDownListener);\n }\n }\n\n function pointerUpListener() {\n if (carouselListenerTarget) {\n carouselListenerTarget.addEventListener('mousedown', documentDownListener);\n carouselListenerTarget.addEventListener('pointerdown', documentDownListener);\n }\n }\n\n function clearPointerEvent() {\n pointerEvent = undefined;\n pointerUpListener();\n }\n\n function selectListener() {\n if (pointerEvent) {\n const newIndex = emblaApi.selectedScrollSnap() ?? 0;\n options.onSelectViaDrag(pointerEvent, newIndex);\n }\n }\n\n function init(emblaApiInstance: EmblaCarouselType, optionsHandler: OptionsHandlerType): void {\n emblaApi = emblaApiInstance;\n // Initialize the listener for first mouse/pointerDown event\n carouselListenerTarget = emblaApi.containerNode();\n\n carouselListenerTarget.addEventListener('mousedown', documentDownListener);\n carouselListenerTarget.addEventListener('pointerdown', documentDownListener);\n\n emblaApi.on('pointerUp', pointerUpListener);\n emblaApi.on('select', selectListener);\n // Settle is used to clear pointer and conclude drag event\n emblaApi.on('settle', clearPointerEvent);\n }\n\n function destroy(): void {\n if (carouselListenerTarget) {\n carouselListenerTarget.removeEventListener('mousedown', documentDownListener);\n carouselListenerTarget.removeEventListener('pointerdown', documentDownListener);\n }\n\n carouselListenerTarget = undefined;\n\n emblaApi.off('pointerUp', pointerUpListener);\n emblaApi.off('select', selectListener);\n emblaApi.off('settle', clearPointerEvent);\n }\n\n return {\n name: 'pointerEvent',\n options,\n init,\n destroy,\n };\n}\n"],"names":["carouselClassNames","pointerEventPlugin","options","emblaApi","pointerEvent","carouselListenerTarget","documentDownListener","event","target","targetNode","classList","contains","root","removeEventListener","pointerUpListener","addEventListener","clearPointerEvent","undefined","selectListener","newIndex","selectedScrollSnap","onSelectViaDrag","init","emblaApiInstance","optionsHandler","containerNode","on","destroy","off","name"],"mappings":"AACA,SAASA,kBAAkB,QAAQ,iBAAc;AAQjD,OAAO,SAASC,mBAAmBC,OAAkC;IACnE,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IAEJ;;;;GAIC,GACD,SAASC,qBAAqBC,KAAgC;QAC5D,IAAIA,MAAMC,MAAM,EAAE;YAChB,MAAMC,aAAaF,MAAMC,MAAM;YAE/B,IAAIC,WAAWC,SAAS,CAACC,QAAQ,CAACX,mBAAmBY,IAAI,MAAKP,mCAAAA,6CAAAA,uBAAwBM,QAAQ,CAACF,cAAa;gBAC1GL,eAAeG;YACjB;QACF;QAEA,IAAIF,wBAAwB;YAC1BA,uBAAuBQ,mBAAmB,CAAC,aAAaP;YACxDD,uBAAuBQ,mBAAmB,CAAC,eAAeP;QAC5D;IACF;IAEA,SAASQ;QACP,IAAIT,wBAAwB;YAC1BA,uBAAuBU,gBAAgB,CAAC,aAAaT;YACrDD,uBAAuBU,gBAAgB,CAAC,eAAeT;QACzD;IACF;IAEA,SAASU;QACPZ,eAAea;QACfH;IACF;IAEA,SAASI;QACP,IAAId,cAAc;gBACCD;YAAjB,MAAMgB,WAAWhB,CAAAA,+BAAAA,SAASiB,kBAAkB,gBAA3BjB,0CAAAA,+BAAiC;YAClDD,QAAQmB,eAAe,CAACjB,cAAce;QACxC;IACF;IAEA,SAASG,KAAKC,gBAAmC,EAAEC,cAAkC;QACnFrB,WAAWoB;QACX,4DAA4D;QAC5DlB,yBAAyBF,SAASsB,aAAa;QAE/CpB,uBAAuBU,gBAAgB,CAAC,aAAaT;QACrDD,uBAAuBU,gBAAgB,CAAC,eAAeT;QAEvDH,SAASuB,EAAE,CAAC,aAAaZ;QACzBX,SAASuB,EAAE,CAAC,UAAUR;QACtB,0DAA0D;QAC1Df,SAASuB,EAAE,CAAC,UAAUV;IACxB;IAEA,SAASW;QACP,IAAItB,wBAAwB;YAC1BA,uBAAuBQ,mBAAmB,CAAC,aAAaP;YACxDD,uBAAuBQ,mBAAmB,CAAC,eAAeP;QAC5D;QAEAD,yBAAyBY;QAEzBd,SAASyB,GAAG,CAAC,aAAad;QAC1BX,SAASyB,GAAG,CAAC,UAAUV;QACvBf,SAASyB,GAAG,CAAC,UAAUZ;IACzB;IAEA,OAAO;QACLa,MAAM;QACN3B;QACAoB;QACAK;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/components/pointerEvents.ts"],"sourcesContent":["import type { CreatePluginType, EmblaCarouselType, OptionsHandlerType } from 'embla-carousel';\nimport { carouselClassNames } from '../Carousel';\n\nexport type PointerEventPluginOptions = {\n onSelectViaDrag: (event: PointerEvent | MouseEvent, index: number) => void;\n};\n\nexport type PointerEventPlugin = CreatePluginType<{}, PointerEventPluginOptions>;\n\nexport function pointerEventPlugin(options: PointerEventPluginOptions): PointerEventPlugin {\n let emblaApi: EmblaCarouselType;\n let pointerEvent: PointerEvent | MouseEvent | undefined;\n let carouselListenerTarget: HTMLElement | undefined;\n\n /**\n * Heads up!\n *\n * We don't use `emblaApi.on('pointerDown', ...)` as the callback does not provide the event.\n */\n function documentDownListener(event: PointerEvent | MouseEvent) {\n if (event.target) {\n const targetNode = event.target as Element;\n\n if (targetNode.classList.contains(carouselClassNames.root) || carouselListenerTarget?.contains(targetNode)) {\n pointerEvent = event;\n }\n }\n\n if (carouselListenerTarget) {\n carouselListenerTarget.removeEventListener('mousedown', documentDownListener);\n carouselListenerTarget.removeEventListener('pointerdown', documentDownListener);\n }\n }\n\n function pointerUpListener() {\n if (carouselListenerTarget) {\n carouselListenerTarget.addEventListener('mousedown', documentDownListener);\n carouselListenerTarget.addEventListener('pointerdown', documentDownListener);\n }\n }\n\n function clearPointerEvent() {\n pointerEvent = undefined;\n pointerUpListener();\n }\n\n function selectListener() {\n if (pointerEvent) {\n const newIndex = emblaApi.selectedScrollSnap() ?? 0;\n options.onSelectViaDrag(pointerEvent, newIndex);\n }\n }\n\n function init(emblaApiInstance: EmblaCarouselType, optionsHandler: OptionsHandlerType): void {\n emblaApi = emblaApiInstance;\n // Initialize the listener for first mouse/pointerDown event\n carouselListenerTarget = emblaApi.containerNode();\n\n carouselListenerTarget.addEventListener('mousedown', documentDownListener);\n carouselListenerTarget.addEventListener('pointerdown', documentDownListener);\n\n emblaApi.on('pointerUp', pointerUpListener);\n emblaApi.on('select', selectListener);\n // Settle is used to clear pointer and conclude drag event\n emblaApi.on('settle', clearPointerEvent);\n }\n\n function destroy(): void {\n if (carouselListenerTarget) {\n carouselListenerTarget.removeEventListener('mousedown', documentDownListener);\n carouselListenerTarget.removeEventListener('pointerdown', documentDownListener);\n }\n\n carouselListenerTarget = undefined;\n\n emblaApi.off('pointerUp', pointerUpListener);\n emblaApi.off('select', selectListener);\n emblaApi.off('settle', clearPointerEvent);\n }\n\n return {\n name: 'pointerEvent',\n options,\n init,\n destroy,\n };\n}\n"],"names":["carouselClassNames","pointerEventPlugin","options","emblaApi","pointerEvent","carouselListenerTarget","documentDownListener","event","target","targetNode","classList","contains","root","removeEventListener","pointerUpListener","addEventListener","clearPointerEvent","undefined","selectListener","newIndex","selectedScrollSnap","onSelectViaDrag","init","emblaApiInstance","optionsHandler","containerNode","on","destroy","off","name"],"mappings":"AACA,SAASA,kBAAkB,QAAQ,iBAAc;AAQjD,OAAO,SAASC,mBAAmBC,OAAkC;IACnE,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IAEJ;;;;GAIC,GACD,SAASC,qBAAqBC,KAAgC;QAC5D,IAAIA,MAAMC,MAAM,EAAE;YAChB,MAAMC,aAAaF,MAAMC,MAAM;YAE/B,IAAIC,WAAWC,SAAS,CAACC,QAAQ,CAACX,mBAAmBY,IAAI,MAAKP,mCAAAA,6CAAAA,uBAAwBM,QAAQ,CAACF,cAAa;gBAC1GL,eAAeG;YACjB;QACF;QAEA,IAAIF,wBAAwB;YAC1BA,uBAAuBQ,mBAAmB,CAAC,aAAaP;YACxDD,uBAAuBQ,mBAAmB,CAAC,eAAeP;QAC5D;IACF;IAEA,SAASQ;QACP,IAAIT,wBAAwB;YAC1BA,uBAAuBU,gBAAgB,CAAC,aAAaT;YACrDD,uBAAuBU,gBAAgB,CAAC,eAAeT;QACzD;IACF;IAEA,SAASU;QACPZ,eAAea;QACfH;IACF;IAEA,SAASI;QACP,IAAId,cAAc;gBACCD;YAAjB,MAAMgB,YAAWhB,+BAAAA,SAASiB,kBAAkB,gBAA3BjB,0CAAAA,+BAAiC;YAClDD,QAAQmB,eAAe,CAACjB,cAAce;QACxC;IACF;IAEA,SAASG,KAAKC,gBAAmC,EAAEC,cAAkC;QACnFrB,WAAWoB;QACX,4DAA4D;QAC5DlB,yBAAyBF,SAASsB,aAAa;QAE/CpB,uBAAuBU,gBAAgB,CAAC,aAAaT;QACrDD,uBAAuBU,gBAAgB,CAAC,eAAeT;QAEvDH,SAASuB,EAAE,CAAC,aAAaZ;QACzBX,SAASuB,EAAE,CAAC,UAAUR;QACtB,0DAA0D;QAC1Df,SAASuB,EAAE,CAAC,UAAUV;IACxB;IAEA,SAASW;QACP,IAAItB,wBAAwB;YAC1BA,uBAAuBQ,mBAAmB,CAAC,aAAaP;YACxDD,uBAAuBQ,mBAAmB,CAAC,eAAeP;QAC5D;QAEAD,yBAAyBY;QAEzBd,SAASyB,GAAG,CAAC,aAAad;QAC1BX,SAASyB,GAAG,CAAC,UAAUV;QACvBf,SAASyB,GAAG,CAAC,UAAUZ;IACzB;IAEA,OAAO;QACLa,MAAM;QACN3B;QACAoB;QACAK;IACF;AACF"}
@@ -29,11 +29,10 @@ export function setTabsterDefault(element, isDefault) {
29
29
  }
30
30
  }
31
31
  export function useEmblaCarousel(options) {
32
+ var _ref, _ref1;
32
33
  const { align, autoplayInterval, direction, loop, slidesToScroll, watchDrag, containScroll, motion, onDragIndexChange, onAutoplayIndexChange } = options;
33
- var _motion_kind;
34
- const motionType = typeof motion === 'string' ? motion : (_motion_kind = motion === null || motion === void 0 ? void 0 : motion.kind) !== null && _motion_kind !== void 0 ? _motion_kind : 'slide';
35
- var _motion_duration;
36
- const motionDuration = typeof motion === 'string' ? 25 : (_motion_duration = motion === null || motion === void 0 ? void 0 : motion.duration) !== null && _motion_duration !== void 0 ? _motion_duration : 25;
34
+ const motionType = typeof motion === 'string' ? motion : (_ref = motion === null || motion === void 0 ? void 0 : motion.kind) !== null && _ref !== void 0 ? _ref : 'slide';
35
+ const motionDuration = typeof motion === 'string' ? 25 : (_ref1 = motion === null || motion === void 0 ? void 0 : motion.duration) !== null && _ref1 !== void 0 ? _ref1 : 25;
37
36
  const [activeIndex, setActiveIndex] = useControllableState({
38
37
  defaultState: options.defaultActiveIndex,
39
38
  state: options.activeIndex,
@@ -115,13 +114,12 @@ export function useEmblaCarousel(options) {
115
114
  };
116
115
  }, []);
117
116
  const updateIndex = ()=>{
117
+ var _ref, _ref1;
118
118
  var _emblaApi_current, _emblaApi_current1, _emblaApi_current2, _slideRegistry_newIndex;
119
- var _emblaApi_current_selectedScrollSnap;
120
- const newIndex = (_emblaApi_current_selectedScrollSnap = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.selectedScrollSnap()) !== null && _emblaApi_current_selectedScrollSnap !== void 0 ? _emblaApi_current_selectedScrollSnap : 0;
119
+ const newIndex = (_ref = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.selectedScrollSnap()) !== null && _ref !== void 0 ? _ref : 0;
121
120
  const slides = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.slideNodes();
122
121
  const slideRegistry = (_emblaApi_current2 = emblaApi.current) === null || _emblaApi_current2 === void 0 ? void 0 : _emblaApi_current2.internalEngine().slideRegistry;
123
- var _slideRegistry_newIndex_;
124
- const actualIndex = (_slideRegistry_newIndex_ = slideRegistry === null || slideRegistry === void 0 ? void 0 : (_slideRegistry_newIndex = slideRegistry[newIndex]) === null || _slideRegistry_newIndex === void 0 ? void 0 : _slideRegistry_newIndex[0]) !== null && _slideRegistry_newIndex_ !== void 0 ? _slideRegistry_newIndex_ : 0;
122
+ const actualIndex = (_ref1 = slideRegistry === null || slideRegistry === void 0 ? void 0 : (_slideRegistry_newIndex = slideRegistry[newIndex]) === null || _slideRegistry_newIndex === void 0 ? void 0 : _slideRegistry_newIndex[0]) !== null && _ref1 !== void 0 ? _ref1 : 0;
125
123
  // We set the first card in the current group as the default tabster index for focus capture
126
124
  slides === null || slides === void 0 ? void 0 : slides.forEach((slide, slideIndex)=>{
127
125
  setTabsterDefault(slide, slideIndex === actualIndex);
@@ -129,17 +127,15 @@ export function useEmblaCarousel(options) {
129
127
  setActiveIndex(newIndex);
130
128
  };
131
129
  const handleReinit = useEventCallback(()=>{
130
+ var _ref, _ref1, _ref2;
132
131
  var _emblaApi_current, _emblaApi_current1, _emblaApi_current2, _emblaApi_current3, _emblaApi_current4;
133
- var _emblaApi_current_slideNodes;
134
- const nodes = (_emblaApi_current_slideNodes = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.slideNodes()) !== null && _emblaApi_current_slideNodes !== void 0 ? _emblaApi_current_slideNodes : [];
135
- var _emblaApi_current_internalEngine_slideRegistry;
136
- const groupIndexList = (_emblaApi_current_internalEngine_slideRegistry = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.internalEngine().slideRegistry) !== null && _emblaApi_current_internalEngine_slideRegistry !== void 0 ? _emblaApi_current_internalEngine_slideRegistry : [];
132
+ const nodes = (_ref = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.slideNodes()) !== null && _ref !== void 0 ? _ref : [];
133
+ const groupIndexList = (_ref1 = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.internalEngine().slideRegistry) !== null && _ref1 !== void 0 ? _ref1 : [];
137
134
  const navItemsCount = groupIndexList.length > 0 ? groupIndexList.length : nodes.length;
138
135
  const canLoop = (_emblaApi_current2 = emblaApi.current) === null || _emblaApi_current2 === void 0 ? void 0 : _emblaApi_current2.internalEngine().slideLooper.canLoop();
139
- var _emblaApi_current_selectedScrollSnap;
140
136
  const data = {
141
137
  navItemsCount,
142
- activeIndex: (_emblaApi_current_selectedScrollSnap = (_emblaApi_current3 = emblaApi.current) === null || _emblaApi_current3 === void 0 ? void 0 : _emblaApi_current3.selectedScrollSnap()) !== null && _emblaApi_current_selectedScrollSnap !== void 0 ? _emblaApi_current_selectedScrollSnap : 0,
138
+ activeIndex: (_ref2 = (_emblaApi_current3 = emblaApi.current) === null || _emblaApi_current3 === void 0 ? void 0 : _emblaApi_current3.selectedScrollSnap()) !== null && _ref2 !== void 0 ? _ref2 : 0,
143
139
  groupIndexList,
144
140
  slideNodes: nodes,
145
141
  canLoop
@@ -151,9 +147,9 @@ export function useEmblaCarousel(options) {
151
147
  }
152
148
  });
153
149
  const handleIndexChange = useEventCallback((_, eventType)=>{
150
+ var _ref;
154
151
  var _emblaApi_current;
155
- var _emblaApi_current_selectedScrollSnap;
156
- const newIndex = (_emblaApi_current_selectedScrollSnap = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.selectedScrollSnap()) !== null && _emblaApi_current_selectedScrollSnap !== void 0 ? _emblaApi_current_selectedScrollSnap : 0;
152
+ const newIndex = (_ref = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.selectedScrollSnap()) !== null && _ref !== void 0 ? _ref : 0;
157
153
  updateIndex();
158
154
  if (eventType === 'autoplay:select') {
159
155
  const noopEvent = new Event('autoplay');
@@ -167,10 +163,10 @@ export function useEmblaCarousel(options) {
167
163
  const viewportRef = React.useRef(null);
168
164
  const containerRef = React.useMemo(()=>{
169
165
  const handleVisibilityChange = ()=>{
166
+ var _ref;
170
167
  var _emblaApi_current, _emblaApi_current1;
171
168
  const cardElements = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.slideNodes();
172
- var _emblaApi_current_slidesInView;
173
- const visibleIndexes = (_emblaApi_current_slidesInView = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.slidesInView()) !== null && _emblaApi_current_slidesInView !== void 0 ? _emblaApi_current_slidesInView : [];
169
+ const visibleIndexes = (_ref = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.slidesInView()) !== null && _ref !== void 0 ? _ref : [];
174
170
  cardElements === null || cardElements === void 0 ? void 0 : cardElements.forEach((cardElement, index)=>{
175
171
  cardElement.dispatchEvent(new CustomEvent(EMBLA_VISIBILITY_EVENT, {
176
172
  bubbles: false,
@@ -218,12 +214,11 @@ export function useEmblaCarousel(options) {
218
214
  ]);
219
215
  const carouselApi = React.useMemo(()=>({
220
216
  scrollToElement: (element, jump)=>{
217
+ var _ref, _ref1;
221
218
  var _emblaApi_current, _emblaApi_current1, _emblaApi_current2;
222
219
  const cardElements = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.slideNodes();
223
- var _emblaApi_current_internalEngine_slideRegistry;
224
- const groupIndexList = (_emblaApi_current_internalEngine_slideRegistry = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.internalEngine().slideRegistry) !== null && _emblaApi_current_internalEngine_slideRegistry !== void 0 ? _emblaApi_current_internalEngine_slideRegistry : [];
225
- var _cardElements_indexOf;
226
- const cardIndex = (_cardElements_indexOf = cardElements === null || cardElements === void 0 ? void 0 : cardElements.indexOf(element)) !== null && _cardElements_indexOf !== void 0 ? _cardElements_indexOf : 0;
220
+ const groupIndexList = (_ref = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.internalEngine().slideRegistry) !== null && _ref !== void 0 ? _ref : [];
221
+ const cardIndex = (_ref1 = cardElements === null || cardElements === void 0 ? void 0 : cardElements.indexOf(element)) !== null && _ref1 !== void 0 ? _ref1 : 0;
227
222
  const groupIndex = groupIndexList.findIndex((group)=>{
228
223
  return group.includes(cardIndex);
229
224
  });
@@ -236,6 +231,7 @@ export function useEmblaCarousel(options) {
236
231
  (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.scrollTo(index, jump);
237
232
  },
238
233
  scrollInDirection: (dir)=>{
234
+ var _ref;
239
235
  var _emblaApi_current;
240
236
  if (dir === 'prev') {
241
237
  var _emblaApi_current1;
@@ -244,8 +240,7 @@ export function useEmblaCarousel(options) {
244
240
  var _emblaApi_current2;
245
241
  (_emblaApi_current2 = emblaApi.current) === null || _emblaApi_current2 === void 0 ? void 0 : _emblaApi_current2.scrollNext();
246
242
  }
247
- var _emblaApi_current_selectedScrollSnap;
248
- return (_emblaApi_current_selectedScrollSnap = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.selectedScrollSnap()) !== null && _emblaApi_current_selectedScrollSnap !== void 0 ? _emblaApi_current_selectedScrollSnap : 0;
243
+ return (_ref = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.selectedScrollSnap()) !== null && _ref !== void 0 ? _ref : 0;
249
244
  }
250
245
  }), []);
251
246
  React.useEffect(()=>{
@@ -278,13 +273,12 @@ export function useEmblaCarousel(options) {
278
273
  motionDuration
279
274
  ]);
280
275
  React.useEffect(()=>{
276
+ var _ref, _ref1;
281
277
  var _emblaApi_current, _emblaApi_current_slideNodes, _emblaApi_current1;
282
- var _emblaApi_current_selectedScrollSnap;
283
278
  // Scroll to controlled values on update
284
279
  // If active index is out of bounds, re-init will handle instead
285
- const currentActiveIndex = (_emblaApi_current_selectedScrollSnap = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.selectedScrollSnap()) !== null && _emblaApi_current_selectedScrollSnap !== void 0 ? _emblaApi_current_selectedScrollSnap : 0;
286
- var _emblaApi_current_slideNodes_length;
287
- const slideLength = (_emblaApi_current_slideNodes_length = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : (_emblaApi_current_slideNodes = _emblaApi_current1.slideNodes()) === null || _emblaApi_current_slideNodes === void 0 ? void 0 : _emblaApi_current_slideNodes.length) !== null && _emblaApi_current_slideNodes_length !== void 0 ? _emblaApi_current_slideNodes_length : 0;
280
+ const currentActiveIndex = (_ref = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.selectedScrollSnap()) !== null && _ref !== void 0 ? _ref : 0;
281
+ const slideLength = (_ref1 = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : (_emblaApi_current_slideNodes = _emblaApi_current1.slideNodes()) === null || _emblaApi_current_slideNodes === void 0 ? void 0 : _emblaApi_current_slideNodes.length) !== null && _ref1 !== void 0 ? _ref1 : 0;
288
282
  emblaOptions.current.startIndex = activeIndex;
289
283
  if (activeIndex < slideLength && activeIndex !== currentActiveIndex) {
290
284
  var _emblaApi_current2;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/useEmblaCarousel.ts"],"sourcesContent":["'use client';\n\nimport { type EventHandler, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nimport type { EmblaPluginType } from 'embla-carousel';\nimport EmblaCarousel, { type EmblaCarouselType, type EmblaOptionsType } from 'embla-carousel';\nimport * as React from 'react';\n\nimport { carouselCardClassNames } from './CarouselCard/useCarouselCardStyles.styles';\nimport { carouselSliderClassNames } from './CarouselSlider/useCarouselSliderStyles.styles';\nimport type { CarouselMotion, CarouselUpdateData, CarouselVisibilityEventDetail } from '../Carousel';\nimport Autoplay from 'embla-carousel-autoplay';\nimport Fade from 'embla-carousel-fade';\nimport { pointerEventPlugin } from './pointerEvents';\nimport type { CarouselIndexChangeData } from './CarouselContext.types';\n\ntype EmblaEventHandler = Parameters<EmblaCarouselType['on']>[1];\n\nconst sliderClassname = `.${carouselSliderClassNames.root}`;\n\nconst DEFAULT_EMBLA_OPTIONS: EmblaOptionsType = {\n containScroll: 'trimSnaps',\n inViewThreshold: 0.99,\n watchDrag: false,\n skipSnaps: true,\n\n container: sliderClassname,\n slides: `.${carouselCardClassNames.root}`,\n};\n\nexport const EMBLA_VISIBILITY_EVENT = 'embla:visibilitychange';\n\nexport function setTabsterDefault(element: Element, isDefault: boolean): void {\n const tabsterAttr = element.getAttribute('data-tabster');\n\n if (tabsterAttr) {\n const tabsterAttributes = JSON.parse(tabsterAttr);\n if (tabsterAttributes.focusable) {\n // If tabster.focusable isn't present, we will ignore.\n tabsterAttributes.focusable.isDefault = isDefault;\n element.setAttribute('data-tabster', JSON.stringify(tabsterAttributes));\n }\n }\n}\n\nexport function useEmblaCarousel(\n options: Pick<EmblaOptionsType, 'align' | 'direction' | 'loop' | 'slidesToScroll' | 'watchDrag' | 'containScroll'> & {\n defaultActiveIndex: number | undefined;\n activeIndex: number | undefined;\n motion?: CarouselMotion;\n onDragIndexChange?: EventHandler<CarouselIndexChangeData>;\n onAutoplayIndexChange?: EventHandler<CarouselIndexChangeData>;\n autoplayInterval?: number;\n },\n): {\n activeIndex: number;\n carouselApi: {\n scrollToElement: (element: HTMLElement, jump?: boolean) => number;\n scrollToIndex: (index: number, jump?: boolean) => void;\n scrollInDirection: (dir: 'prev' | 'next') => number;\n };\n viewportRef: React.RefObject<HTMLDivElement | null>;\n containerRef: React.RefObject<HTMLDivElement | null>;\n subscribeForValues: (listener: (data: CarouselUpdateData) => void) => () => void;\n enableAutoplay: (autoplay: boolean, temporary?: boolean) => void;\n resetAutoplay: () => void;\n} {\n const {\n align,\n autoplayInterval,\n direction,\n loop,\n slidesToScroll,\n watchDrag,\n containScroll,\n motion,\n onDragIndexChange,\n onAutoplayIndexChange,\n } = options;\n\n const motionType = typeof motion === 'string' ? motion : motion?.kind ?? 'slide';\n const motionDuration = typeof motion === 'string' ? 25 : motion?.duration ?? 25;\n\n const [activeIndex, setActiveIndex] = useControllableState({\n defaultState: options.defaultActiveIndex,\n state: options.activeIndex,\n initialState: 0,\n });\n\n const onDragEvent = useEventCallback((event: PointerEvent | MouseEvent, index: number) => {\n onDragIndexChange?.(event, { event, type: 'drag', index });\n });\n\n const emblaOptions = React.useRef<EmblaOptionsType>({\n align,\n direction,\n loop,\n slidesToScroll,\n startIndex: activeIndex,\n watchDrag,\n containScroll,\n duration: motionDuration,\n });\n\n const emblaApi = React.useRef<EmblaCarouselType | null>(null);\n const autoplayRef = React.useRef<boolean>(false);\n\n const resetAutoplay = React.useCallback(() => {\n emblaApi.current?.plugins().autoplay?.reset();\n }, []);\n\n const getPlugins = React.useCallback(() => {\n const plugins: EmblaPluginType[] = [];\n\n plugins.push(\n Autoplay({\n playOnInit: autoplayRef.current,\n delay: autoplayInterval,\n /* stopOnInteraction: false causes autoplay to restart on interaction end*/\n /* we'll handle this logic to ensure autoplay state is respected */\n stopOnInteraction: true,\n stopOnFocusIn: false, // We'll handle this one manually to prevent conflicts with tabster\n stopOnMouseEnter: false, // We will handle this manually to align functionality\n }),\n );\n\n // Optionally add Fade plugin\n if (motionType === 'fade') {\n plugins.push(Fade());\n }\n\n if (watchDrag) {\n plugins.push(\n pointerEventPlugin({\n onSelectViaDrag: onDragEvent,\n }),\n );\n }\n\n return plugins;\n }, [motionType, onDragEvent, watchDrag, autoplayInterval]);\n\n /* This function enables autoplay to pause/play without affecting underlying state\n * Useful for pausing on focus etc. without having to reinitialize or set autoplay to off\n */\n const enableAutoplay = React.useCallback(\n (autoplay: boolean, temporary?: boolean) => {\n if (!temporary) {\n autoplayRef.current = autoplay;\n }\n\n if (autoplay && autoplayRef.current) {\n // Autoplay should only enable in the case where underlying state is true, temporary should not override\n emblaApi.current?.plugins().autoplay?.play();\n // Reset after play to ensure timing and any focus/mouse pause state is reset.\n resetAutoplay();\n } else if (!autoplay) {\n emblaApi.current?.plugins().autoplay?.stop();\n }\n },\n [resetAutoplay],\n );\n\n // Listeners contains callbacks for UI elements that may require state update based on embla changes\n const listeners = React.useRef(new Set<(data: CarouselUpdateData) => void>());\n const subscribeForValues = React.useCallback((listener: (data: CarouselUpdateData) => void) => {\n listeners.current.add(listener);\n\n return () => {\n listeners.current.delete(listener);\n };\n }, []);\n\n const updateIndex = () => {\n const newIndex = emblaApi.current?.selectedScrollSnap() ?? 0;\n const slides = emblaApi.current?.slideNodes();\n const slideRegistry = emblaApi.current?.internalEngine().slideRegistry;\n const actualIndex = slideRegistry?.[newIndex]?.[0] ?? 0;\n\n // We set the first card in the current group as the default tabster index for focus capture\n slides?.forEach((slide, slideIndex) => {\n setTabsterDefault(slide, slideIndex === actualIndex);\n });\n setActiveIndex(newIndex);\n };\n\n const handleReinit = useEventCallback(() => {\n const nodes: HTMLElement[] = emblaApi.current?.slideNodes() ?? [];\n const groupIndexList: number[][] = emblaApi.current?.internalEngine().slideRegistry ?? [];\n const navItemsCount = groupIndexList.length > 0 ? groupIndexList.length : nodes.length;\n const canLoop = emblaApi.current?.internalEngine().slideLooper.canLoop();\n\n const data: CarouselUpdateData = {\n navItemsCount,\n activeIndex: emblaApi.current?.selectedScrollSnap() ?? 0,\n groupIndexList,\n slideNodes: nodes,\n canLoop,\n };\n\n updateIndex();\n emblaApi.current?.scrollTo(activeIndex, false);\n for (const listener of listeners.current) {\n listener(data);\n }\n });\n\n const handleIndexChange: EmblaEventHandler = useEventCallback((_, eventType) => {\n const newIndex = emblaApi.current?.selectedScrollSnap() ?? 0;\n updateIndex();\n if (eventType === 'autoplay:select') {\n const noopEvent = new Event('autoplay');\n onAutoplayIndexChange?.(noopEvent, { event: noopEvent, type: 'autoplay', index: newIndex });\n }\n });\n\n const viewportRef: React.RefObject<HTMLDivElement | null> = React.useRef(null);\n const containerRef: React.RefObject<HTMLDivElement | null> = React.useMemo(() => {\n const handleVisibilityChange = () => {\n const cardElements = emblaApi.current?.slideNodes();\n const visibleIndexes = emblaApi.current?.slidesInView() ?? [];\n\n cardElements?.forEach((cardElement, index) => {\n cardElement.dispatchEvent(\n new CustomEvent<CarouselVisibilityEventDetail>(EMBLA_VISIBILITY_EVENT, {\n bubbles: false,\n detail: { isVisible: visibleIndexes.includes(index) },\n }),\n );\n });\n };\n\n // Get plugins using autoplayRef to prevent state change recreating EmblaCarousel\n // eslint-disable-next-line react-hooks/refs\n const plugins = getPlugins();\n\n return {\n set current(newElement: HTMLDivElement | null) {\n if (emblaApi.current) {\n // Stop autoplay before reinitializing.\n emblaApi.current.plugins?.().autoplay?.stop();\n emblaApi.current.off('slidesInView', handleVisibilityChange);\n emblaApi.current.off('select', handleIndexChange);\n emblaApi.current.off('reInit', handleReinit);\n emblaApi.current.off('autoplay:select', handleIndexChange);\n\n emblaApi.current.destroy();\n emblaApi.current = null;\n }\n\n if (newElement) {\n const newEmblaApi = EmblaCarousel(\n // Use direct viewport if available, else fallback to container (includes Carousel controls).\n viewportRef.current ?? newElement,\n {\n ...DEFAULT_EMBLA_OPTIONS,\n ...emblaOptions.current,\n },\n plugins,\n );\n\n newEmblaApi.on('reInit', handleReinit);\n newEmblaApi.on('slidesInView', handleVisibilityChange);\n newEmblaApi.on('select', handleIndexChange);\n newEmblaApi.on('autoplay:select', handleIndexChange);\n\n emblaApi.current = newEmblaApi;\n }\n },\n };\n }, [getPlugins, handleIndexChange, handleReinit]);\n\n const carouselApi = React.useMemo(\n () => ({\n scrollToElement: (element: HTMLElement, jump?: boolean) => {\n const cardElements = emblaApi.current?.slideNodes();\n const groupIndexList = emblaApi.current?.internalEngine().slideRegistry ?? [];\n const cardIndex = cardElements?.indexOf(element) ?? 0;\n const groupIndex = groupIndexList.findIndex(group => {\n return group.includes(cardIndex);\n });\n const indexFocus = groupIndex ?? cardIndex;\n emblaApi.current?.scrollTo(indexFocus, jump);\n\n return indexFocus;\n },\n scrollToIndex: (index: number, jump?: boolean) => {\n emblaApi.current?.scrollTo(index, jump);\n },\n scrollInDirection: (dir: 'prev' | 'next') => {\n if (dir === 'prev') {\n emblaApi.current?.scrollPrev();\n } else {\n emblaApi.current?.scrollNext();\n }\n\n return emblaApi.current?.selectedScrollSnap() ?? 0;\n },\n }),\n [],\n );\n\n React.useEffect(() => {\n const plugins = getPlugins();\n\n emblaOptions.current = {\n startIndex: emblaOptions.current.startIndex,\n align,\n direction,\n loop,\n slidesToScroll,\n watchDrag,\n containScroll,\n duration: motionDuration,\n };\n\n // Stop autoplay before reinitializing.\n emblaApi.current?.plugins?.().autoplay?.stop();\n emblaApi.current?.reInit(\n {\n ...DEFAULT_EMBLA_OPTIONS,\n ...emblaOptions.current,\n },\n plugins,\n );\n }, [align, containScroll, direction, getPlugins, loop, slidesToScroll, watchDrag, motionDuration]);\n\n React.useEffect(() => {\n // Scroll to controlled values on update\n // If active index is out of bounds, re-init will handle instead\n const currentActiveIndex = emblaApi.current?.selectedScrollSnap() ?? 0;\n const slideLength = emblaApi.current?.slideNodes()?.length ?? 0;\n emblaOptions.current.startIndex = activeIndex;\n if (activeIndex < slideLength && activeIndex !== currentActiveIndex) {\n emblaApi.current?.scrollTo(activeIndex);\n }\n }, [activeIndex]);\n\n return {\n activeIndex,\n carouselApi,\n viewportRef,\n containerRef,\n subscribeForValues,\n enableAutoplay,\n resetAutoplay,\n };\n}\n"],"names":["useControllableState","useEventCallback","EmblaCarousel","React","carouselCardClassNames","carouselSliderClassNames","Autoplay","Fade","pointerEventPlugin","sliderClassname","root","DEFAULT_EMBLA_OPTIONS","containScroll","inViewThreshold","watchDrag","skipSnaps","container","slides","EMBLA_VISIBILITY_EVENT","setTabsterDefault","element","isDefault","tabsterAttr","getAttribute","tabsterAttributes","JSON","parse","focusable","setAttribute","stringify","useEmblaCarousel","options","align","autoplayInterval","direction","loop","slidesToScroll","motion","onDragIndexChange","onAutoplayIndexChange","motionType","kind","motionDuration","duration","activeIndex","setActiveIndex","defaultState","defaultActiveIndex","state","initialState","onDragEvent","event","index","type","emblaOptions","useRef","startIndex","emblaApi","autoplayRef","resetAutoplay","useCallback","current","plugins","autoplay","reset","getPlugins","push","playOnInit","delay","stopOnInteraction","stopOnFocusIn","stopOnMouseEnter","onSelectViaDrag","enableAutoplay","temporary","play","stop","listeners","Set","subscribeForValues","listener","add","delete","updateIndex","slideRegistry","newIndex","selectedScrollSnap","slideNodes","internalEngine","actualIndex","forEach","slide","slideIndex","handleReinit","nodes","groupIndexList","navItemsCount","length","canLoop","slideLooper","data","scrollTo","handleIndexChange","_","eventType","noopEvent","Event","viewportRef","containerRef","useMemo","handleVisibilityChange","cardElements","visibleIndexes","slidesInView","cardElement","dispatchEvent","CustomEvent","bubbles","detail","isVisible","includes","newElement","off","destroy","newEmblaApi","on","carouselApi","scrollToElement","jump","cardIndex","indexOf","groupIndex","findIndex","group","indexFocus","scrollToIndex","scrollInDirection","dir","scrollPrev","scrollNext","useEffect","reInit","currentActiveIndex","slideLength"],"mappings":"AAAA;AAEA,SAA4BA,oBAAoB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAEtG,OAAOC,mBAAsE,iBAAiB;AAC9F,YAAY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AApB,MAAMsF,cAActF,CAAAA,uCAAAA,qBAAAA,SAASI,OAAO,cAAhBJ,0CAAAA,+BAAAA,mBAAkB8B,UAAU,gBAA5B9B,mDAAAA,6BAAgCwC,MAAM,cAAtCxC,iDAAAA,sCAA0C;QAC9DH,aAAaO,OAAO,CAACL,UAAU,GAAGZ;QAClC,IAAIA,cAAcmG,eAAenG,gBAAgBkG,oBAAoB;gBACnErF;aAAAA,qBAAAA,SAASI,OAAO,cAAhBJ,yCAAAA,mBAAkB4C,QAAQ,CAACzD;QAC7B;IACF,GAAG;QAACA;KAAY;IAEhB,OAAO;QACLA;QACAkF;QACAnB;QACAC;QACA7B;QACAN;QACAd;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/components/useEmblaCarousel.ts"],"sourcesContent":["'use client';\n\nimport { type EventHandler, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nimport type { EmblaPluginType } from 'embla-carousel';\nimport EmblaCarousel, { type EmblaCarouselType, type EmblaOptionsType } from 'embla-carousel';\nimport * as React from 'react';\n\nimport { carouselCardClassNames } from './CarouselCard/useCarouselCardStyles.styles';\nimport { carouselSliderClassNames } from './CarouselSlider/useCarouselSliderStyles.styles';\nimport type { CarouselMotion, CarouselUpdateData, CarouselVisibilityEventDetail } from '../Carousel';\nimport Autoplay from 'embla-carousel-autoplay';\nimport Fade from 'embla-carousel-fade';\nimport { pointerEventPlugin } from './pointerEvents';\nimport type { CarouselIndexChangeData } from './CarouselContext.types';\n\ntype EmblaEventHandler = Parameters<EmblaCarouselType['on']>[1];\n\nconst sliderClassname = `.${carouselSliderClassNames.root}`;\n\nconst DEFAULT_EMBLA_OPTIONS: EmblaOptionsType = {\n containScroll: 'trimSnaps',\n inViewThreshold: 0.99,\n watchDrag: false,\n skipSnaps: true,\n\n container: sliderClassname,\n slides: `.${carouselCardClassNames.root}`,\n};\n\nexport const EMBLA_VISIBILITY_EVENT = 'embla:visibilitychange';\n\nexport function setTabsterDefault(element: Element, isDefault: boolean): void {\n const tabsterAttr = element.getAttribute('data-tabster');\n\n if (tabsterAttr) {\n const tabsterAttributes = JSON.parse(tabsterAttr);\n if (tabsterAttributes.focusable) {\n // If tabster.focusable isn't present, we will ignore.\n tabsterAttributes.focusable.isDefault = isDefault;\n element.setAttribute('data-tabster', JSON.stringify(tabsterAttributes));\n }\n }\n}\n\nexport function useEmblaCarousel(\n options: Pick<EmblaOptionsType, 'align' | 'direction' | 'loop' | 'slidesToScroll' | 'watchDrag' | 'containScroll'> & {\n defaultActiveIndex: number | undefined;\n activeIndex: number | undefined;\n motion?: CarouselMotion;\n onDragIndexChange?: EventHandler<CarouselIndexChangeData>;\n onAutoplayIndexChange?: EventHandler<CarouselIndexChangeData>;\n autoplayInterval?: number;\n },\n): {\n activeIndex: number;\n carouselApi: {\n scrollToElement: (element: HTMLElement, jump?: boolean) => number;\n scrollToIndex: (index: number, jump?: boolean) => void;\n scrollInDirection: (dir: 'prev' | 'next') => number;\n };\n viewportRef: React.RefObject<HTMLDivElement | null>;\n containerRef: React.RefObject<HTMLDivElement | null>;\n subscribeForValues: (listener: (data: CarouselUpdateData) => void) => () => void;\n enableAutoplay: (autoplay: boolean, temporary?: boolean) => void;\n resetAutoplay: () => void;\n} {\n const {\n align,\n autoplayInterval,\n direction,\n loop,\n slidesToScroll,\n watchDrag,\n containScroll,\n motion,\n onDragIndexChange,\n onAutoplayIndexChange,\n } = options;\n\n const motionType = typeof motion === 'string' ? motion : motion?.kind ?? 'slide';\n const motionDuration = typeof motion === 'string' ? 25 : motion?.duration ?? 25;\n\n const [activeIndex, setActiveIndex] = useControllableState({\n defaultState: options.defaultActiveIndex,\n state: options.activeIndex,\n initialState: 0,\n });\n\n const onDragEvent = useEventCallback((event: PointerEvent | MouseEvent, index: number) => {\n onDragIndexChange?.(event, { event, type: 'drag', index });\n });\n\n const emblaOptions = React.useRef<EmblaOptionsType>({\n align,\n direction,\n loop,\n slidesToScroll,\n startIndex: activeIndex,\n watchDrag,\n containScroll,\n duration: motionDuration,\n });\n\n const emblaApi = React.useRef<EmblaCarouselType | null>(null);\n const autoplayRef = React.useRef<boolean>(false);\n\n const resetAutoplay = React.useCallback(() => {\n emblaApi.current?.plugins().autoplay?.reset();\n }, []);\n\n const getPlugins = React.useCallback(() => {\n const plugins: EmblaPluginType[] = [];\n\n plugins.push(\n Autoplay({\n playOnInit: autoplayRef.current,\n delay: autoplayInterval,\n /* stopOnInteraction: false causes autoplay to restart on interaction end*/\n /* we'll handle this logic to ensure autoplay state is respected */\n stopOnInteraction: true,\n stopOnFocusIn: false, // We'll handle this one manually to prevent conflicts with tabster\n stopOnMouseEnter: false, // We will handle this manually to align functionality\n }),\n );\n\n // Optionally add Fade plugin\n if (motionType === 'fade') {\n plugins.push(Fade());\n }\n\n if (watchDrag) {\n plugins.push(\n pointerEventPlugin({\n onSelectViaDrag: onDragEvent,\n }),\n );\n }\n\n return plugins;\n }, [motionType, onDragEvent, watchDrag, autoplayInterval]);\n\n /* This function enables autoplay to pause/play without affecting underlying state\n * Useful for pausing on focus etc. without having to reinitialize or set autoplay to off\n */\n const enableAutoplay = React.useCallback(\n (autoplay: boolean, temporary?: boolean) => {\n if (!temporary) {\n autoplayRef.current = autoplay;\n }\n\n if (autoplay && autoplayRef.current) {\n // Autoplay should only enable in the case where underlying state is true, temporary should not override\n emblaApi.current?.plugins().autoplay?.play();\n // Reset after play to ensure timing and any focus/mouse pause state is reset.\n resetAutoplay();\n } else if (!autoplay) {\n emblaApi.current?.plugins().autoplay?.stop();\n }\n },\n [resetAutoplay],\n );\n\n // Listeners contains callbacks for UI elements that may require state update based on embla changes\n const listeners = React.useRef(new Set<(data: CarouselUpdateData) => void>());\n const subscribeForValues = React.useCallback((listener: (data: CarouselUpdateData) => void) => {\n listeners.current.add(listener);\n\n return () => {\n listeners.current.delete(listener);\n };\n }, []);\n\n const updateIndex = () => {\n const newIndex = emblaApi.current?.selectedScrollSnap() ?? 0;\n const slides = emblaApi.current?.slideNodes();\n const slideRegistry = emblaApi.current?.internalEngine().slideRegistry;\n const actualIndex = slideRegistry?.[newIndex]?.[0] ?? 0;\n\n // We set the first card in the current group as the default tabster index for focus capture\n slides?.forEach((slide, slideIndex) => {\n setTabsterDefault(slide, slideIndex === actualIndex);\n });\n setActiveIndex(newIndex);\n };\n\n const handleReinit = useEventCallback(() => {\n const nodes: HTMLElement[] = emblaApi.current?.slideNodes() ?? [];\n const groupIndexList: number[][] = emblaApi.current?.internalEngine().slideRegistry ?? [];\n const navItemsCount = groupIndexList.length > 0 ? groupIndexList.length : nodes.length;\n const canLoop = emblaApi.current?.internalEngine().slideLooper.canLoop();\n\n const data: CarouselUpdateData = {\n navItemsCount,\n activeIndex: emblaApi.current?.selectedScrollSnap() ?? 0,\n groupIndexList,\n slideNodes: nodes,\n canLoop,\n };\n\n updateIndex();\n emblaApi.current?.scrollTo(activeIndex, false);\n for (const listener of listeners.current) {\n listener(data);\n }\n });\n\n const handleIndexChange: EmblaEventHandler = useEventCallback((_, eventType) => {\n const newIndex = emblaApi.current?.selectedScrollSnap() ?? 0;\n updateIndex();\n if (eventType === 'autoplay:select') {\n const noopEvent = new Event('autoplay');\n onAutoplayIndexChange?.(noopEvent, { event: noopEvent, type: 'autoplay', index: newIndex });\n }\n });\n\n const viewportRef: React.RefObject<HTMLDivElement | null> = React.useRef(null);\n const containerRef: React.RefObject<HTMLDivElement | null> = React.useMemo(() => {\n const handleVisibilityChange = () => {\n const cardElements = emblaApi.current?.slideNodes();\n const visibleIndexes = emblaApi.current?.slidesInView() ?? [];\n\n cardElements?.forEach((cardElement, index) => {\n cardElement.dispatchEvent(\n new CustomEvent<CarouselVisibilityEventDetail>(EMBLA_VISIBILITY_EVENT, {\n bubbles: false,\n detail: { isVisible: visibleIndexes.includes(index) },\n }),\n );\n });\n };\n\n // Get plugins using autoplayRef to prevent state change recreating EmblaCarousel\n // eslint-disable-next-line react-hooks/refs\n const plugins = getPlugins();\n\n return {\n set current(newElement: HTMLDivElement | null) {\n if (emblaApi.current) {\n // Stop autoplay before reinitializing.\n emblaApi.current.plugins?.().autoplay?.stop();\n emblaApi.current.off('slidesInView', handleVisibilityChange);\n emblaApi.current.off('select', handleIndexChange);\n emblaApi.current.off('reInit', handleReinit);\n emblaApi.current.off('autoplay:select', handleIndexChange);\n\n emblaApi.current.destroy();\n emblaApi.current = null;\n }\n\n if (newElement) {\n const newEmblaApi = EmblaCarousel(\n // Use direct viewport if available, else fallback to container (includes Carousel controls).\n viewportRef.current ?? newElement,\n {\n ...DEFAULT_EMBLA_OPTIONS,\n ...emblaOptions.current,\n },\n plugins,\n );\n\n newEmblaApi.on('reInit', handleReinit);\n newEmblaApi.on('slidesInView', handleVisibilityChange);\n newEmblaApi.on('select', handleIndexChange);\n newEmblaApi.on('autoplay:select', handleIndexChange);\n\n emblaApi.current = newEmblaApi;\n }\n },\n };\n }, [getPlugins, handleIndexChange, handleReinit]);\n\n const carouselApi = React.useMemo(\n () => ({\n scrollToElement: (element: HTMLElement, jump?: boolean) => {\n const cardElements = emblaApi.current?.slideNodes();\n const groupIndexList = emblaApi.current?.internalEngine().slideRegistry ?? [];\n const cardIndex = cardElements?.indexOf(element) ?? 0;\n const groupIndex = groupIndexList.findIndex(group => {\n return group.includes(cardIndex);\n });\n const indexFocus = groupIndex ?? cardIndex;\n emblaApi.current?.scrollTo(indexFocus, jump);\n\n return indexFocus;\n },\n scrollToIndex: (index: number, jump?: boolean) => {\n emblaApi.current?.scrollTo(index, jump);\n },\n scrollInDirection: (dir: 'prev' | 'next') => {\n if (dir === 'prev') {\n emblaApi.current?.scrollPrev();\n } else {\n emblaApi.current?.scrollNext();\n }\n\n return emblaApi.current?.selectedScrollSnap() ?? 0;\n },\n }),\n [],\n );\n\n React.useEffect(() => {\n const plugins = getPlugins();\n\n emblaOptions.current = {\n startIndex: emblaOptions.current.startIndex,\n align,\n direction,\n loop,\n slidesToScroll,\n watchDrag,\n containScroll,\n duration: motionDuration,\n };\n\n // Stop autoplay before reinitializing.\n emblaApi.current?.plugins?.().autoplay?.stop();\n emblaApi.current?.reInit(\n {\n ...DEFAULT_EMBLA_OPTIONS,\n ...emblaOptions.current,\n },\n plugins,\n );\n }, [align, containScroll, direction, getPlugins, loop, slidesToScroll, watchDrag, motionDuration]);\n\n React.useEffect(() => {\n // Scroll to controlled values on update\n // If active index is out of bounds, re-init will handle instead\n const currentActiveIndex = emblaApi.current?.selectedScrollSnap() ?? 0;\n const slideLength = emblaApi.current?.slideNodes()?.length ?? 0;\n emblaOptions.current.startIndex = activeIndex;\n if (activeIndex < slideLength && activeIndex !== currentActiveIndex) {\n emblaApi.current?.scrollTo(activeIndex);\n }\n }, [activeIndex]);\n\n return {\n activeIndex,\n carouselApi,\n viewportRef,\n containerRef,\n subscribeForValues,\n enableAutoplay,\n resetAutoplay,\n };\n}\n"],"names":["useControllableState","useEventCallback","EmblaCarousel","React","carouselCardClassNames","carouselSliderClassNames","Autoplay","Fade","pointerEventPlugin","sliderClassname","root","DEFAULT_EMBLA_OPTIONS","containScroll","inViewThreshold","watchDrag","skipSnaps","container","slides","EMBLA_VISIBILITY_EVENT","setTabsterDefault","element","isDefault","tabsterAttr","getAttribute","tabsterAttributes","JSON","parse","focusable","setAttribute","stringify","useEmblaCarousel","options","align","autoplayInterval","direction","loop","slidesToScroll","motion","onDragIndexChange","onAutoplayIndexChange","motionType","kind","motionDuration","duration","activeIndex","setActiveIndex","defaultState","defaultActiveIndex","state","initialState","onDragEvent","event","index","type","emblaOptions","useRef","startIndex","emblaApi","autoplayRef","resetAutoplay","useCallback","current","plugins","autoplay","reset","getPlugins","push","playOnInit","delay","stopOnInteraction","stopOnFocusIn","stopOnMouseEnter","onSelectViaDrag","enableAutoplay","temporary","play","stop","listeners","Set","subscribeForValues","listener","add","delete","updateIndex","slideRegistry","newIndex","selectedScrollSnap","slideNodes","internalEngine","actualIndex","forEach","slide","slideIndex","handleReinit","nodes","groupIndexList","navItemsCount","length","canLoop","slideLooper","data","scrollTo","handleIndexChange","_","eventType","noopEvent","Event","viewportRef","containerRef","useMemo","handleVisibilityChange","cardElements","visibleIndexes","slidesInView","cardElement","dispatchEvent","CustomEvent","bubbles","detail","isVisible","includes","newElement","off","destroy","newEmblaApi","on","carouselApi","scrollToElement","jump","cardIndex","indexOf","groupIndex","findIndex","group","indexFocus","scrollToIndex","scrollInDirection","dir","scrollPrev","scrollNext","useEffect","reInit","currentActiveIndex","slideLength"],"mappings":"AAAA;AAEA,SAA4BA,oBAAoB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAEtG,OAAOC,mBAAsE,iBAAiB;AAC9F,YAAYC,WAAW,QAAQ;AAE/B,SAASC,sBAAsB,QAAQ,iDAA8C;AACrF,SAASC,wBAAwB,QAAQ,qDAAkD;AAE3F,OAAOC,cAAc,0BAA0B;AAC/C,OAAOC,UAAU,sBAAsB;AACvC,SAASC,kBAAkB,QAAQ,qBAAkB;AAKrD,MAAMC,kBAAkB,CAAC,CAAC,EAAEJ,yBAAyBK,IAAI,EAAE;AAE3D,MAAMC,wBAA0C;IAC9CC,eAAe;IACfC,iBAAiB;IACjBC,WAAW;IACXC,WAAW;IAEXC,WAAWP;IACXQ,QAAQ,CAAC,CAAC,EAAEb,uBAAuBM,IAAI,EAAE;AAC3C;AAEA,OAAO,MAAMQ,yBAAyB,yBAAyB;AAE/D,OAAO,SAASC,kBAAkBC,OAAgB,EAAEC,SAAkB;IACpE,MAAMC,cAAcF,QAAQG,YAAY,CAAC;IAEzC,IAAID,aAAa;QACf,MAAME,oBAAoBC,KAAKC,KAAK,CAACJ;QACrC,IAAIE,kBAAkBG,SAAS,EAAE;YAC/B,sDAAsD;YACtDH,kBAAkBG,SAAS,CAACN,SAAS,GAAGA;YACxCD,QAAQQ,YAAY,CAAC,gBAAgBH,KAAKI,SAAS,CAACL;QACtD;IACF;AACF;AAEA,OAAO,SAASM,iBACdC,OAOC;;IAcD,MAAM,EACJC,KAAK,EACLC,gBAAgB,EAChBC,SAAS,EACTC,IAAI,EACJC,cAAc,EACdtB,SAAS,EACTF,aAAa,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nErF;aAAAA,qBAAAA,SAASI,OAAO,cAAhBJ,yCAAAA,mBAAkB4C,QAAQ,CAACzD;QAC7B;IACF,GAAG;QAACA;KAAY;IAEhB,OAAO;QACLA;QACAkF;QACAnB;QACAC;QACA7B;QACAN;QACAd;IACF;AACF"}
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Carousel: function() {
12
+ get Carousel () {
13
13
  return _index.Carousel;
14
14
  },
15
- carouselClassNames: function() {
15
+ get carouselClassNames () {
16
16
  return _index.carouselClassNames;
17
17
  },
18
- renderCarousel_unstable: function() {
18
+ get renderCarousel_unstable () {
19
19
  return _index.renderCarousel_unstable;
20
20
  },
21
- useCarouselStyles_unstable: function() {
21
+ get useCarouselStyles_unstable () {
22
22
  return _index.useCarouselStyles_unstable;
23
23
  },
24
- useCarousel_unstable: function() {
24
+ get useCarousel_unstable () {
25
25
  return _index.useCarousel_unstable;
26
26
  }
27
27
  });
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- CarouselAutoplayButton: function() {
12
+ get CarouselAutoplayButton () {
13
13
  return _index.CarouselAutoplayButton;
14
14
  },
15
- carouselAutoplayButtonClassNames: function() {
15
+ get carouselAutoplayButtonClassNames () {
16
16
  return _index.carouselAutoplayButtonClassNames;
17
17
  },
18
- renderCarouselAutoplayButton_unstable: function() {
18
+ get renderCarouselAutoplayButton_unstable () {
19
19
  return _index.renderCarouselAutoplayButton_unstable;
20
20
  },
21
- useCarouselAutoplayButtonStyles_unstable: function() {
21
+ get useCarouselAutoplayButtonStyles_unstable () {
22
22
  return _index.useCarouselAutoplayButtonStyles_unstable;
23
23
  },
24
- useCarouselAutoplayButton_unstable: function() {
24
+ get useCarouselAutoplayButton_unstable () {
25
25
  return _index.useCarouselAutoplayButton_unstable;
26
26
  }
27
27
  });
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- CarouselButton: function() {
12
+ get CarouselButton () {
13
13
  return _index.CarouselButton;
14
14
  },
15
- carouselButtonClassNames: function() {
15
+ get carouselButtonClassNames () {
16
16
  return _index.carouselButtonClassNames;
17
17
  },
18
- renderCarouselButton_unstable: function() {
18
+ get renderCarouselButton_unstable () {
19
19
  return _index.renderCarouselButton_unstable;
20
20
  },
21
- useCarouselButtonStyles_unstable: function() {
21
+ get useCarouselButtonStyles_unstable () {
22
22
  return _index.useCarouselButtonStyles_unstable;
23
23
  },
24
- useCarouselButton_unstable: function() {
24
+ get useCarouselButton_unstable () {
25
25
  return _index.useCarouselButton_unstable;
26
26
  }
27
27
  });
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- CarouselCard: function() {
12
+ get CarouselCard () {
13
13
  return _index.CarouselCard;
14
14
  },
15
- carouselCardClassNames: function() {
15
+ get carouselCardClassNames () {
16
16
  return _index.carouselCardClassNames;
17
17
  },
18
- renderCarouselCard_unstable: function() {
18
+ get renderCarouselCard_unstable () {
19
19
  return _index.renderCarouselCard_unstable;
20
20
  },
21
- useCarouselCardStyles_unstable: function() {
21
+ get useCarouselCardStyles_unstable () {
22
22
  return _index.useCarouselCardStyles_unstable;
23
23
  },
24
- useCarouselCard_unstable: function() {
24
+ get useCarouselCard_unstable () {
25
25
  return _index.useCarouselCard_unstable;
26
26
  }
27
27
  });
@@ -5,17 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- CarouselProvider: function() {
12
+ get CarouselProvider () {
13
13
  return _CarouselContext.CarouselProvider;
14
14
  },
15
- carouselContextDefaultValue: function() {
15
+ get carouselContextDefaultValue () {
16
16
  return _CarouselContext.carouselContextDefaultValue;
17
17
  },
18
- useCarouselContext_unstable: function() {
18
+ get useCarouselContext_unstable () {
19
19
  return _CarouselContext.useCarouselContext_unstable;
20
20
  }
21
21
  });
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- CarouselNav: function() {
12
+ get CarouselNav () {
13
13
  return _index.CarouselNav;
14
14
  },
15
- carouselNavClassNames: function() {
15
+ get carouselNavClassNames () {
16
16
  return _index.carouselNavClassNames;
17
17
  },
18
- renderCarouselNav_unstable: function() {
18
+ get renderCarouselNav_unstable () {
19
19
  return _index.renderCarouselNav_unstable;
20
20
  },
21
- useCarouselNavStyles_unstable: function() {
21
+ get useCarouselNavStyles_unstable () {
22
22
  return _index.useCarouselNavStyles_unstable;
23
23
  },
24
- useCarouselNav_unstable: function() {
24
+ get useCarouselNav_unstable () {
25
25
  return _index.useCarouselNav_unstable;
26
26
  }
27
27
  });
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- CarouselNavButton: function() {
12
+ get CarouselNavButton () {
13
13
  return _index.CarouselNavButton;
14
14
  },
15
- carouselNavButtonClassNames: function() {
15
+ get carouselNavButtonClassNames () {
16
16
  return _index.carouselNavButtonClassNames;
17
17
  },
18
- renderCarouselNavButton_unstable: function() {
18
+ get renderCarouselNavButton_unstable () {
19
19
  return _index.renderCarouselNavButton_unstable;
20
20
  },
21
- useCarouselNavButtonStyles_unstable: function() {
21
+ get useCarouselNavButtonStyles_unstable () {
22
22
  return _index.useCarouselNavButtonStyles_unstable;
23
23
  },
24
- useCarouselNavButton_unstable: function() {
24
+ get useCarouselNavButton_unstable () {
25
25
  return _index.useCarouselNavButton_unstable;
26
26
  }
27
27
  });
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- CarouselNavContainer: function() {
12
+ get CarouselNavContainer () {
13
13
  return _index.CarouselNavContainer;
14
14
  },
15
- carouselNavContainerClassNames: function() {
15
+ get carouselNavContainerClassNames () {
16
16
  return _index.carouselNavContainerClassNames;
17
17
  },
18
- renderCarouselNavContainer_unstable: function() {
18
+ get renderCarouselNavContainer_unstable () {
19
19
  return _index.renderCarouselNavContainer_unstable;
20
20
  },
21
- useCarouselNavContainerStyles_unstable: function() {
21
+ get useCarouselNavContainerStyles_unstable () {
22
22
  return _index.useCarouselNavContainerStyles_unstable;
23
23
  },
24
- useCarouselNavContainer_unstable: function() {
24
+ get useCarouselNavContainer_unstable () {
25
25
  return _index.useCarouselNavContainer_unstable;
26
26
  }
27
27
  });