@fluentui/react-carousel 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/CHANGELOG.md +64 -14
  2. package/README.md +20 -0
  3. package/lib/components/Carousel/Carousel.js.map +1 -1
  4. package/lib/components/Carousel/Carousel.module.css +12 -0
  5. package/lib/components/Carousel/Carousel.types.js.map +1 -1
  6. package/lib/components/Carousel/index.js.map +1 -1
  7. package/lib/components/Carousel/renderCarousel.js +2 -2
  8. package/lib/components/Carousel/renderCarousel.js.map +1 -1
  9. package/lib/components/Carousel/useCarousel.js.map +1 -1
  10. package/lib/components/Carousel/useCarouselContextValues.js.map +1 -1
  11. package/lib/components/Carousel/useCarouselStyles.styles.css.js +12 -0
  12. package/lib/components/Carousel/useCarouselStyles.styles.css.js.map +1 -0
  13. package/lib/components/Carousel/useCarouselStyles.styles.raw.css.js +12 -0
  14. package/lib/components/Carousel/useCarouselStyles.styles.raw.css.js.map +1 -0
  15. package/lib/components/Carousel/useCarouselStyles.styles.raw.js.map +1 -1
  16. package/lib/components/CarouselAutoplayButton/CarouselAutoplayButton.js.map +1 -1
  17. package/lib/components/CarouselAutoplayButton/CarouselAutoplayButton.module.css +17 -0
  18. package/lib/components/CarouselAutoplayButton/CarouselAutoplayButton.types.js.map +1 -1
  19. package/lib/components/CarouselAutoplayButton/index.js.map +1 -1
  20. package/lib/components/CarouselAutoplayButton/renderCarouselAutoplayButton.js.map +1 -1
  21. package/lib/components/CarouselAutoplayButton/useCarouselAutoplayButton.js.map +1 -1
  22. package/lib/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.css.js +18 -0
  23. package/lib/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.css.js.map +1 -0
  24. package/lib/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.raw.css.js +18 -0
  25. package/lib/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.raw.css.js.map +1 -0
  26. package/lib/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.raw.js.map +1 -1
  27. package/lib/components/CarouselButton/CarouselButton.js.map +1 -1
  28. package/lib/components/CarouselButton/CarouselButton.module.css +16 -0
  29. package/lib/components/CarouselButton/CarouselButton.types.js.map +1 -1
  30. package/lib/components/CarouselButton/index.js.map +1 -1
  31. package/lib/components/CarouselButton/renderCarouselButton.js.map +1 -1
  32. package/lib/components/CarouselButton/useCarouselButton.js.map +1 -1
  33. package/lib/components/CarouselButton/useCarouselButtonStyles.styles.css.js +19 -0
  34. package/lib/components/CarouselButton/useCarouselButtonStyles.styles.css.js.map +1 -0
  35. package/lib/components/CarouselButton/useCarouselButtonStyles.styles.raw.css.js +19 -0
  36. package/lib/components/CarouselButton/useCarouselButtonStyles.styles.raw.css.js.map +1 -0
  37. package/lib/components/CarouselButton/useCarouselButtonStyles.styles.raw.js.map +1 -1
  38. package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
  39. package/lib/components/CarouselCard/CarouselCard.module.css +19 -0
  40. package/lib/components/CarouselCard/CarouselCard.types.js.map +1 -1
  41. package/lib/components/CarouselCard/index.js.map +1 -1
  42. package/lib/components/CarouselCard/renderCarouselCard.js +2 -2
  43. package/lib/components/CarouselCard/renderCarouselCard.js.map +1 -1
  44. package/lib/components/CarouselCard/useCarouselCard.js.map +1 -1
  45. package/lib/components/CarouselCard/useCarouselCardStyles.styles.css.js +16 -0
  46. package/lib/components/CarouselCard/useCarouselCardStyles.styles.css.js.map +1 -0
  47. package/lib/components/CarouselCard/useCarouselCardStyles.styles.raw.css.js +16 -0
  48. package/lib/components/CarouselCard/useCarouselCardStyles.styles.raw.css.js.map +1 -0
  49. package/lib/components/CarouselCard/useCarouselCardStyles.styles.raw.js.map +1 -1
  50. package/lib/components/CarouselContext.js.map +1 -1
  51. package/lib/components/CarouselContext.types.js.map +1 -1
  52. package/lib/components/CarouselNav/CarouselNav.js.map +1 -1
  53. package/lib/components/CarouselNav/CarouselNav.module.css +20 -0
  54. package/lib/components/CarouselNav/CarouselNav.types.js.map +1 -1
  55. package/lib/components/CarouselNav/CarouselNavContext.js.map +1 -1
  56. package/lib/components/CarouselNav/CarouselNavIndexContext.js.map +1 -1
  57. package/lib/components/CarouselNav/index.js.map +1 -1
  58. package/lib/components/CarouselNav/renderCarouselNav.js +2 -2
  59. package/lib/components/CarouselNav/renderCarouselNav.js.map +1 -1
  60. package/lib/components/CarouselNav/useCarouselNav.js.map +1 -1
  61. package/lib/components/CarouselNav/useCarouselNavContextValues.js.map +1 -1
  62. package/lib/components/CarouselNav/useCarouselNavStyles.styles.css.js +11 -0
  63. package/lib/components/CarouselNav/useCarouselNavStyles.styles.css.js.map +1 -0
  64. package/lib/components/CarouselNav/useCarouselNavStyles.styles.raw.css.js +11 -0
  65. package/lib/components/CarouselNav/useCarouselNavStyles.styles.raw.css.js.map +1 -0
  66. package/lib/components/CarouselNav/useCarouselNavStyles.styles.raw.js.map +1 -1
  67. package/lib/components/CarouselNavButton/CarouselNavButton.js.map +1 -1
  68. package/lib/components/CarouselNavButton/CarouselNavButton.module.css +117 -0
  69. package/lib/components/CarouselNavButton/CarouselNavButton.types.js.map +1 -1
  70. package/lib/components/CarouselNavButton/index.js.map +1 -1
  71. package/lib/components/CarouselNavButton/renderCarouselNavButton.js +2 -2
  72. package/lib/components/CarouselNavButton/renderCarouselNavButton.js.map +1 -1
  73. package/lib/components/CarouselNavButton/useCarouselNavButton.js +2 -2
  74. package/lib/components/CarouselNavButton/useCarouselNavButton.js.map +1 -1
  75. package/lib/components/CarouselNavButton/useCarouselNavButtonStyles.styles.css.js +12 -0
  76. package/lib/components/CarouselNavButton/useCarouselNavButtonStyles.styles.css.js.map +1 -0
  77. package/lib/components/CarouselNavButton/useCarouselNavButtonStyles.styles.raw.css.js +12 -0
  78. package/lib/components/CarouselNavButton/useCarouselNavButtonStyles.styles.raw.css.js.map +1 -0
  79. package/lib/components/CarouselNavButton/useCarouselNavButtonStyles.styles.raw.js.map +1 -1
  80. package/lib/components/CarouselNavContainer/CarouselNavContainer.js.map +1 -1
  81. package/lib/components/CarouselNavContainer/CarouselNavContainer.module.css +74 -0
  82. package/lib/components/CarouselNavContainer/CarouselNavContainer.types.js.map +1 -1
  83. package/lib/components/CarouselNavContainer/index.js.map +1 -1
  84. package/lib/components/CarouselNavContainer/renderCarouselNavContainer.js +2 -2
  85. package/lib/components/CarouselNavContainer/renderCarouselNavContainer.js.map +1 -1
  86. package/lib/components/CarouselNavContainer/useCarouselNavContainer.js.map +1 -1
  87. package/lib/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.css.js +29 -0
  88. package/lib/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.css.js.map +1 -0
  89. package/lib/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.raw.css.js +29 -0
  90. package/lib/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.raw.css.js.map +1 -0
  91. package/lib/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.raw.js.map +1 -1
  92. package/lib/components/CarouselNavImageButton/CarouselNavImageButton.js.map +1 -1
  93. package/lib/components/CarouselNavImageButton/CarouselNavImageButton.module.css +30 -0
  94. package/lib/components/CarouselNavImageButton/CarouselNavImageButton.types.js.map +1 -1
  95. package/lib/components/CarouselNavImageButton/index.js.map +1 -1
  96. package/lib/components/CarouselNavImageButton/renderCarouselNavImageButton.js +2 -2
  97. package/lib/components/CarouselNavImageButton/renderCarouselNavImageButton.js.map +1 -1
  98. package/lib/components/CarouselNavImageButton/useCarouselNavImageButton.js +2 -2
  99. package/lib/components/CarouselNavImageButton/useCarouselNavImageButton.js.map +1 -1
  100. package/lib/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.css.js +17 -0
  101. package/lib/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.css.js.map +1 -0
  102. package/lib/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.raw.css.js +17 -0
  103. package/lib/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.raw.css.js.map +1 -0
  104. package/lib/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.raw.js.map +1 -1
  105. package/lib/components/CarouselSlider/CarouselSlider.js.map +1 -1
  106. package/lib/components/CarouselSlider/CarouselSlider.module.css +10 -0
  107. package/lib/components/CarouselSlider/CarouselSlider.types.js.map +1 -1
  108. package/lib/components/CarouselSlider/CarouselSliderContext.js.map +1 -1
  109. package/lib/components/CarouselSlider/index.js.map +1 -1
  110. package/lib/components/CarouselSlider/renderCarouselSlider.js +2 -2
  111. package/lib/components/CarouselSlider/renderCarouselSlider.js.map +1 -1
  112. package/lib/components/CarouselSlider/useCarouselSlider.js.map +1 -1
  113. package/lib/components/CarouselSlider/useCarouselSliderContextValues.js.map +1 -1
  114. package/lib/components/CarouselSlider/useCarouselSliderStyles.styles.css.js +15 -0
  115. package/lib/components/CarouselSlider/useCarouselSliderStyles.styles.css.js.map +1 -0
  116. package/lib/components/CarouselSlider/useCarouselSliderStyles.styles.raw.css.js +15 -0
  117. package/lib/components/CarouselSlider/useCarouselSliderStyles.styles.raw.css.js.map +1 -0
  118. package/lib/components/CarouselSlider/useCarouselSliderStyles.styles.raw.js.map +1 -1
  119. package/lib/components/CarouselViewport/CarouselViewport.js.map +1 -1
  120. package/lib/components/CarouselViewport/CarouselViewport.module.css +6 -0
  121. package/lib/components/CarouselViewport/CarouselViewport.types.js.map +1 -1
  122. package/lib/components/CarouselViewport/index.js.map +1 -1
  123. package/lib/components/CarouselViewport/renderCarouselViewport.js +2 -2
  124. package/lib/components/CarouselViewport/renderCarouselViewport.js.map +1 -1
  125. package/lib/components/CarouselViewport/useCarouselViewport.js.map +1 -1
  126. package/lib/components/CarouselViewport/useCarouselViewportStyles.styles.css.js +11 -0
  127. package/lib/components/CarouselViewport/useCarouselViewportStyles.styles.css.js.map +1 -0
  128. package/lib/components/CarouselViewport/useCarouselViewportStyles.styles.raw.css.js +11 -0
  129. package/lib/components/CarouselViewport/useCarouselViewportStyles.styles.raw.css.js.map +1 -0
  130. package/lib/components/CarouselViewport/useCarouselViewportStyles.styles.raw.js.map +1 -1
  131. package/lib/components/pointerEvents.js.map +1 -1
  132. package/lib/components/useEmblaCarousel.js +22 -28
  133. package/lib/components/useEmblaCarousel.js.map +1 -1
  134. package/lib-commonjs/Carousel.cjs +6 -6
  135. package/lib-commonjs/CarouselAutoplayButton.cjs +6 -6
  136. package/lib-commonjs/CarouselButton.cjs +6 -6
  137. package/lib-commonjs/CarouselCard.cjs +6 -6
  138. package/lib-commonjs/CarouselContext.cjs +4 -4
  139. package/lib-commonjs/CarouselNav.cjs +6 -6
  140. package/lib-commonjs/CarouselNavButton.cjs +6 -6
  141. package/lib-commonjs/CarouselNavContainer.cjs +6 -6
  142. package/lib-commonjs/CarouselNavImageButton.cjs +6 -6
  143. package/lib-commonjs/CarouselSlider.cjs +6 -6
  144. package/lib-commonjs/CarouselViewport.cjs +6 -6
  145. package/lib-commonjs/components/Carousel/Carousel.cjs.map +1 -1
  146. package/lib-commonjs/components/Carousel/Carousel.module.css +12 -0
  147. package/lib-commonjs/components/Carousel/Carousel.types.cjs.map +1 -1
  148. package/lib-commonjs/components/Carousel/index.cjs +6 -6
  149. package/lib-commonjs/components/Carousel/index.cjs.map +1 -1
  150. package/lib-commonjs/components/Carousel/renderCarousel.cjs.map +1 -1
  151. package/lib-commonjs/components/Carousel/useCarousel.cjs.map +1 -1
  152. package/lib-commonjs/components/Carousel/useCarouselContextValues.cjs.map +1 -1
  153. package/lib-commonjs/components/Carousel/useCarouselStyles.styles.cjs +3 -3
  154. package/lib-commonjs/components/Carousel/useCarouselStyles.styles.cjs.map +1 -1
  155. package/lib-commonjs/components/Carousel/useCarouselStyles.styles.css.cjs +29 -0
  156. package/lib-commonjs/components/Carousel/useCarouselStyles.styles.css.cjs.map +1 -0
  157. package/lib-commonjs/components/Carousel/useCarouselStyles.styles.raw.cjs +3 -3
  158. package/lib-commonjs/components/Carousel/useCarouselStyles.styles.raw.cjs.map +1 -1
  159. package/lib-commonjs/components/Carousel/useCarouselStyles.styles.raw.css.cjs +29 -0
  160. package/lib-commonjs/components/Carousel/useCarouselStyles.styles.raw.css.cjs.map +1 -0
  161. package/lib-commonjs/components/CarouselAutoplayButton/CarouselAutoplayButton.cjs.map +1 -1
  162. package/lib-commonjs/components/CarouselAutoplayButton/CarouselAutoplayButton.module.css +17 -0
  163. package/lib-commonjs/components/CarouselAutoplayButton/CarouselAutoplayButton.types.cjs.map +1 -1
  164. package/lib-commonjs/components/CarouselAutoplayButton/index.cjs +6 -6
  165. package/lib-commonjs/components/CarouselAutoplayButton/index.cjs.map +1 -1
  166. package/lib-commonjs/components/CarouselAutoplayButton/renderCarouselAutoplayButton.cjs.map +1 -1
  167. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButton.cjs.map +1 -1
  168. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.cjs +3 -3
  169. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.cjs.map +1 -1
  170. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.css.cjs +37 -0
  171. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.css.cjs.map +1 -0
  172. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.raw.cjs +3 -3
  173. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.raw.cjs.map +1 -1
  174. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.raw.css.cjs +37 -0
  175. package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.raw.css.cjs.map +1 -0
  176. package/lib-commonjs/components/CarouselButton/CarouselButton.cjs.map +1 -1
  177. package/lib-commonjs/components/CarouselButton/CarouselButton.module.css +16 -0
  178. package/lib-commonjs/components/CarouselButton/CarouselButton.types.cjs.map +1 -1
  179. package/lib-commonjs/components/CarouselButton/index.cjs +6 -6
  180. package/lib-commonjs/components/CarouselButton/index.cjs.map +1 -1
  181. package/lib-commonjs/components/CarouselButton/renderCarouselButton.cjs.map +1 -1
  182. package/lib-commonjs/components/CarouselButton/useCarouselButton.cjs.map +1 -1
  183. package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.cjs +3 -3
  184. package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.cjs.map +1 -1
  185. package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.css.cjs +38 -0
  186. package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.css.cjs.map +1 -0
  187. package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.raw.cjs +3 -3
  188. package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.raw.cjs.map +1 -1
  189. package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.raw.css.cjs +38 -0
  190. package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.raw.css.cjs.map +1 -0
  191. package/lib-commonjs/components/CarouselCard/CarouselCard.cjs.map +1 -1
  192. package/lib-commonjs/components/CarouselCard/CarouselCard.module.css +19 -0
  193. package/lib-commonjs/components/CarouselCard/CarouselCard.types.cjs.map +1 -1
  194. package/lib-commonjs/components/CarouselCard/index.cjs +6 -6
  195. package/lib-commonjs/components/CarouselCard/index.cjs.map +1 -1
  196. package/lib-commonjs/components/CarouselCard/renderCarouselCard.cjs.map +1 -1
  197. package/lib-commonjs/components/CarouselCard/useCarouselCard.cjs.map +1 -1
  198. package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.cjs +3 -3
  199. package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.cjs.map +1 -1
  200. package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.css.cjs +33 -0
  201. package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.css.cjs.map +1 -0
  202. package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.raw.cjs +3 -3
  203. package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.raw.cjs.map +1 -1
  204. package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.raw.css.cjs +33 -0
  205. package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.raw.css.cjs.map +1 -0
  206. package/lib-commonjs/components/CarouselContext.cjs +4 -4
  207. package/lib-commonjs/components/CarouselContext.cjs.map +1 -1
  208. package/lib-commonjs/components/CarouselContext.types.cjs.map +1 -1
  209. package/lib-commonjs/components/CarouselNav/CarouselNav.cjs.map +1 -1
  210. package/lib-commonjs/components/CarouselNav/CarouselNav.module.css +20 -0
  211. package/lib-commonjs/components/CarouselNav/CarouselNav.types.cjs.map +1 -1
  212. package/lib-commonjs/components/CarouselNav/CarouselNavContext.cjs +4 -4
  213. package/lib-commonjs/components/CarouselNav/CarouselNavContext.cjs.map +1 -1
  214. package/lib-commonjs/components/CarouselNav/CarouselNavIndexContext.cjs +4 -4
  215. package/lib-commonjs/components/CarouselNav/CarouselNavIndexContext.cjs.map +1 -1
  216. package/lib-commonjs/components/CarouselNav/index.cjs +6 -6
  217. package/lib-commonjs/components/CarouselNav/index.cjs.map +1 -1
  218. package/lib-commonjs/components/CarouselNav/renderCarouselNav.cjs.map +1 -1
  219. package/lib-commonjs/components/CarouselNav/useCarouselNav.cjs.map +1 -1
  220. package/lib-commonjs/components/CarouselNav/useCarouselNavContextValues.cjs.map +1 -1
  221. package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.cjs +3 -3
  222. package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.cjs.map +1 -1
  223. package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.css.cjs +28 -0
  224. package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.css.cjs.map +1 -0
  225. package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.raw.cjs +3 -3
  226. package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.raw.cjs.map +1 -1
  227. package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.raw.css.cjs +28 -0
  228. package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.raw.css.cjs.map +1 -0
  229. package/lib-commonjs/components/CarouselNavButton/CarouselNavButton.cjs.map +1 -1
  230. package/lib-commonjs/components/CarouselNavButton/CarouselNavButton.module.css +117 -0
  231. package/lib-commonjs/components/CarouselNavButton/CarouselNavButton.types.cjs.map +1 -1
  232. package/lib-commonjs/components/CarouselNavButton/index.cjs +6 -6
  233. package/lib-commonjs/components/CarouselNavButton/index.cjs.map +1 -1
  234. package/lib-commonjs/components/CarouselNavButton/renderCarouselNavButton.cjs.map +1 -1
  235. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButton.cjs +2 -2
  236. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButton.cjs.map +1 -1
  237. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.cjs +3 -3
  238. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.cjs.map +1 -1
  239. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.css.cjs +29 -0
  240. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.css.cjs.map +1 -0
  241. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.raw.cjs +3 -3
  242. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.raw.cjs.map +1 -1
  243. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.raw.css.cjs +29 -0
  244. package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.raw.css.cjs.map +1 -0
  245. package/lib-commonjs/components/CarouselNavContainer/CarouselNavContainer.cjs.map +1 -1
  246. package/lib-commonjs/components/CarouselNavContainer/CarouselNavContainer.module.css +74 -0
  247. package/lib-commonjs/components/CarouselNavContainer/CarouselNavContainer.types.cjs.map +1 -1
  248. package/lib-commonjs/components/CarouselNavContainer/index.cjs +6 -6
  249. package/lib-commonjs/components/CarouselNavContainer/index.cjs.map +1 -1
  250. package/lib-commonjs/components/CarouselNavContainer/renderCarouselNavContainer.cjs.map +1 -1
  251. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainer.cjs.map +1 -1
  252. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.cjs +3 -3
  253. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.cjs.map +1 -1
  254. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.css.cjs +46 -0
  255. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.css.cjs.map +1 -0
  256. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.raw.cjs +3 -3
  257. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.raw.cjs.map +1 -1
  258. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.raw.css.cjs +46 -0
  259. package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.raw.css.cjs.map +1 -0
  260. package/lib-commonjs/components/CarouselNavImageButton/CarouselNavImageButton.cjs.map +1 -1
  261. package/lib-commonjs/components/CarouselNavImageButton/CarouselNavImageButton.module.css +30 -0
  262. package/lib-commonjs/components/CarouselNavImageButton/CarouselNavImageButton.types.cjs.map +1 -1
  263. package/lib-commonjs/components/CarouselNavImageButton/index.cjs +6 -6
  264. package/lib-commonjs/components/CarouselNavImageButton/index.cjs.map +1 -1
  265. package/lib-commonjs/components/CarouselNavImageButton/renderCarouselNavImageButton.cjs.map +1 -1
  266. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButton.cjs +2 -2
  267. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButton.cjs.map +1 -1
  268. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.cjs +3 -3
  269. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.cjs.map +1 -1
  270. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.css.cjs +34 -0
  271. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.css.cjs.map +1 -0
  272. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.raw.cjs +3 -3
  273. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.raw.cjs.map +1 -1
  274. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.raw.css.cjs +34 -0
  275. package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.raw.css.cjs.map +1 -0
  276. package/lib-commonjs/components/CarouselSlider/CarouselSlider.cjs.map +1 -1
  277. package/lib-commonjs/components/CarouselSlider/CarouselSlider.module.css +10 -0
  278. package/lib-commonjs/components/CarouselSlider/CarouselSlider.types.cjs.map +1 -1
  279. package/lib-commonjs/components/CarouselSlider/CarouselSliderContext.cjs +4 -4
  280. package/lib-commonjs/components/CarouselSlider/CarouselSliderContext.cjs.map +1 -1
  281. package/lib-commonjs/components/CarouselSlider/index.cjs +6 -6
  282. package/lib-commonjs/components/CarouselSlider/index.cjs.map +1 -1
  283. package/lib-commonjs/components/CarouselSlider/renderCarouselSlider.cjs.map +1 -1
  284. package/lib-commonjs/components/CarouselSlider/useCarouselSlider.cjs.map +1 -1
  285. package/lib-commonjs/components/CarouselSlider/useCarouselSliderContextValues.cjs.map +1 -1
  286. package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.cjs +3 -3
  287. package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.cjs.map +1 -1
  288. package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.css.cjs +32 -0
  289. package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.css.cjs.map +1 -0
  290. package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.raw.cjs +3 -3
  291. package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.raw.cjs.map +1 -1
  292. package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.raw.css.cjs +32 -0
  293. package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.raw.css.cjs.map +1 -0
  294. package/lib-commonjs/components/CarouselViewport/CarouselViewport.cjs.map +1 -1
  295. package/lib-commonjs/components/CarouselViewport/CarouselViewport.module.css +6 -0
  296. package/lib-commonjs/components/CarouselViewport/CarouselViewport.types.cjs.map +1 -1
  297. package/lib-commonjs/components/CarouselViewport/index.cjs +6 -6
  298. package/lib-commonjs/components/CarouselViewport/index.cjs.map +1 -1
  299. package/lib-commonjs/components/CarouselViewport/renderCarouselViewport.cjs.map +1 -1
  300. package/lib-commonjs/components/CarouselViewport/useCarouselViewport.cjs.map +1 -1
  301. package/lib-commonjs/components/CarouselViewport/useCarouselViewportStyles.styles.cjs +3 -3
  302. package/lib-commonjs/components/CarouselViewport/useCarouselViewportStyles.styles.cjs.map +1 -1
  303. package/lib-commonjs/components/CarouselViewport/useCarouselViewportStyles.styles.css.cjs +28 -0
  304. package/lib-commonjs/components/CarouselViewport/useCarouselViewportStyles.styles.css.cjs.map +1 -0
  305. package/lib-commonjs/components/CarouselViewport/useCarouselViewportStyles.styles.raw.cjs +3 -3
  306. package/lib-commonjs/components/CarouselViewport/useCarouselViewportStyles.styles.raw.cjs.map +1 -1
  307. package/lib-commonjs/components/CarouselViewport/useCarouselViewportStyles.styles.raw.css.cjs +28 -0
  308. package/lib-commonjs/components/CarouselViewport/useCarouselViewportStyles.styles.raw.css.cjs.map +1 -0
  309. package/lib-commonjs/components/pointerEvents.cjs.map +1 -1
  310. package/lib-commonjs/components/useEmblaCarousel.cjs +26 -32
  311. package/lib-commonjs/components/useEmblaCarousel.cjs.map +1 -1
  312. package/lib-commonjs/index.cjs +54 -54
  313. package/lib-commonjs/index.cjs.map +1 -1
  314. package/package.json +16 -16
  315. package/dist/metadata/api/api-root.json +0 -1
  316. package/dist/metadata/index.json +0 -1
@@ -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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AAA,wCAAAA,oBAAAA,SAASI,OAAO,cAAhBJ,wCAAAA,kBAAkB6B,kBAAkB,gBAApC7B,kDAAAA,uCAA0C;YACjDA;QAApB,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,OA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AM,yCAAI;QAC9D3C,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"}
@@ -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
  });
@@ -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
- CarouselNavImageButton: function() {
12
+ get CarouselNavImageButton () {
13
13
  return _index.CarouselNavImageButton;
14
14
  },
15
- carouselNavImageButtonClassNames: function() {
15
+ get carouselNavImageButtonClassNames () {
16
16
  return _index.carouselNavImageButtonClassNames;
17
17
  },
18
- renderCarouselNavImageButton_unstable: function() {
18
+ get renderCarouselNavImageButton_unstable () {
19
19
  return _index.renderCarouselNavImageButton_unstable;
20
20
  },
21
- useCarouselNavImageButtonStyles_unstable: function() {
21
+ get useCarouselNavImageButtonStyles_unstable () {
22
22
  return _index.useCarouselNavImageButtonStyles_unstable;
23
23
  },
24
- useCarouselNavImageButton_unstable: function() {
24
+ get useCarouselNavImageButton_unstable () {
25
25
  return _index.useCarouselNavImageButton_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
- CarouselSlider: function() {
12
+ get CarouselSlider () {
13
13
  return _index.CarouselSlider;
14
14
  },
15
- carouselSliderClassNames: function() {
15
+ get carouselSliderClassNames () {
16
16
  return _index.carouselSliderClassNames;
17
17
  },
18
- renderCarouselSlider_unstable: function() {
18
+ get renderCarouselSlider_unstable () {
19
19
  return _index.renderCarouselSlider_unstable;
20
20
  },
21
- useCarouselSliderStyles_unstable: function() {
21
+ get useCarouselSliderStyles_unstable () {
22
22
  return _index.useCarouselSliderStyles_unstable;
23
23
  },
24
- useCarouselSlider_unstable: function() {
24
+ get useCarouselSlider_unstable () {
25
25
  return _index.useCarouselSlider_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
- CarouselViewport: function() {
12
+ get CarouselViewport () {
13
13
  return _index.CarouselViewport;
14
14
  },
15
- carouselViewportClassNames: function() {
15
+ get carouselViewportClassNames () {
16
16
  return _index.carouselViewportClassNames;
17
17
  },
18
- renderCarouselViewport_unstable: function() {
18
+ get renderCarouselViewport_unstable () {
19
19
  return _index.renderCarouselViewport_unstable;
20
20
  },
21
- useCarouselViewportStyles_unstable: function() {
21
+ get useCarouselViewportStyles_unstable () {
22
22
  return _index.useCarouselViewportStyles_unstable;
23
23
  },
24
- useCarouselViewport_unstable: function() {
24
+ get useCarouselViewport_unstable () {
25
25
  return _index.useCarouselViewport_unstable;
26
26
  }
27
27
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Carousel/Carousel.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCarousel_unstable } from './useCarousel';\nimport { renderCarousel_unstable } from './renderCarousel';\nimport { useCarouselStyles_unstable } from './useCarouselStyles.styles';\nimport type { CarouselProps } from './Carousel.types';\nimport { useCarouselContextValues_unstable } from './useCarouselContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Carousel is the context wrapper and container for all carousel content/controls,\n * it has no direct style or slot opinions.\n *\n * Carousel also provides API interfaces for callbacks that will occur on navigation events.\n */\nexport const Carousel: ForwardRefComponent<CarouselProps> = React.forwardRef((props, ref) => {\n const state = useCarousel_unstable(props, ref);\n\n useCarouselStyles_unstable(state);\n useCustomStyleHook_unstable('useCarouselStyles_unstable')(state);\n\n const contextValues = useCarouselContextValues_unstable(state);\n\n return renderCarousel_unstable(state, contextValues);\n});\n\nCarousel.displayName = 'Carousel';\n"],"names":["React","useCarousel_unstable","renderCarousel_unstable","useCarouselStyles_unstable","useCarouselContextValues_unstable","useCustomStyleHook_unstable","Carousel","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;6BAEM,mBAAgB;gCACb,sBAAmB;yCAChB,gCAA6B;0CAEtB,gCAA6B;qCACnC,kCAAkC;AAQvE,MAAMM,WAAAA,WAAAA,GAA+CN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,YAAQT,iCAAAA,EAAqBO,OAAOC;QAE1CN,mDAAAA,EAA2BO;QAC3BL,gDAAAA,EAA4B,8BAA8BK;IAE1D,MAAMC,oBAAgBP,2DAAAA,EAAkCM;IAExD,WAAOR,uCAAAA,EAAwBQ,OAAOC;AACxC,GAAG;AAEHL,SAASM,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCarousel_unstable } from './useCarousel';\nimport { renderCarousel_unstable } from './renderCarousel';\nimport { useCarouselStyles_unstable } from './useCarouselStyles.styles';\nimport type { CarouselProps } from './Carousel.types';\nimport { useCarouselContextValues_unstable } from './useCarouselContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Carousel is the context wrapper and container for all carousel content/controls,\n * it has no direct style or slot opinions.\n *\n * Carousel also provides API interfaces for callbacks that will occur on navigation events.\n */\nexport const Carousel: ForwardRefComponent<CarouselProps> = React.forwardRef((props, ref) => {\n const state = useCarousel_unstable(props, ref);\n\n useCarouselStyles_unstable(state);\n useCustomStyleHook_unstable('useCarouselStyles_unstable')(state);\n\n const contextValues = useCarouselContextValues_unstable(state);\n\n return renderCarousel_unstable(state, contextValues);\n});\n\nCarousel.displayName = 'Carousel';\n"],"names":["React","useCarousel_unstable","renderCarousel_unstable","useCarouselStyles_unstable","useCarouselContextValues_unstable","useCustomStyleHook_unstable","Carousel","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;6BAEM,mBAAgB;gCACb,sBAAmB;yCAChB,gCAA6B;0CAEtB,gCAA6B;qCACnC,kCAAkC;AAQvE,MAAMM,WAAAA,WAAAA,GAA+CN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,YAAQT,iCAAAA,EAAqBO,OAAOC;QAE1CN,mDAAAA,EAA2BO;QAC3BL,gDAAAA,EAA4B,8BAA8BK;IAE1D,MAAMC,oBAAgBP,2DAAAA,EAAkCM;IAExD,WAAOR,uCAAAA,EAAwBQ,OAAOC;AACxC,GAAG;AAEHL,SAASM,WAAW,GAAG"}
@@ -0,0 +1,12 @@
1
+ @layer fluentui {
2
+ .root {
3
+ overflow-x: hidden;
4
+ overflow-anchor: none;
5
+ position: relative;
6
+ }
7
+
8
+ .elevated {
9
+ margin: var(--spacingVerticalL);
10
+ padding: var(--spacingVerticalL);
11
+ }
12
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Carousel/Carousel.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, EventHandler, Slot } from '@fluentui/react-utilities';\nimport type { CarouselAppearance, CarouselContextValue, CarouselIndexChangeData } from '../CarouselContext.types';\n\nexport type CarouselSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * Children function replacement, passes through updated context index and carousel information for localization\n */\nexport type CarouselAnnouncerFunction = (index: number, totalSlides: number, slideGroupList: number[][]) => string;\n\n/**\n * List of integrated motion types\n */\nexport type CarouselMotion = 'slide' | { kind: 'slide'; duration?: number } | 'fade';\n\n/**\n * Carousel Props\n */\nexport type CarouselProps = ComponentProps<CarouselSlots> & {\n /**\n * The initial page to display in uncontrolled mode.\n */\n defaultActiveIndex?: number;\n\n /**\n * The alignment of the carousel.\n */\n align?: 'center' | 'start' | 'end';\n\n /**\n * The value of the currently active page.\n */\n activeIndex?: number;\n\n /**\n * Sets visual treatment for the Carousel container.\n *\n * `flat`\n * Retains the minimal styling used by default prior to introducing appearance-based styles.\n *\n * `elevated`\n * Applies rounded corners, background, and shadow tokens so the Carousel is presented as a surfaced container.\n *\n * @default 'flat'\n */\n appearance?: CarouselAppearance;\n\n /**\n * Callback to notify a page change.\n */\n onActiveIndexChange?: EventHandler<CarouselIndexChangeData>;\n\n /**\n * Circular enables the carousel to loop back around on navigation past trailing index.\n */\n circular?: boolean;\n\n /**\n * Controls the number of carousel cards per navigation element, will default to 'auto'\n * Recommended to set to '1' when using full page carousel cards.\n */\n groupSize?: number | 'auto';\n\n /**\n * Enables drag to scroll on carousel items.\n * Defaults to: False\n */\n draggable?: boolean;\n\n /**\n * Adds whitespace to start/end so that 'align' prop is always respected for current index\n * Defaults to: False\n */\n whitespace?: boolean;\n\n /**\n * Sets motion type as either 'slide' or 'fade'\n * Defaults: 'slide'\n *\n * Users can also pass 'slide' & duration via CarouselMotion object to control carousel speed.\n * Drag interactions are not affected because duration is then determined by the drag force.\n *\n * Note: Duration is not in milliseconds because Carousel uses an\n * attraction physics simulation when scrolling instead of easings.\n * Only values between 20-60 are recommended, 25 is the default.\n */\n motion?: CarouselMotion;\n\n /**\n * Localizes the string used to announce carousel page changes\n * Defaults to: undefined\n */\n announcement?: CarouselAnnouncerFunction;\n\n /**\n * Choose a delay between autoplay transitions in milliseconds.\n * Only active if Autoplay is enabled via CarouselAutoplayButton\n *\n * Defaults: 4000\n */\n autoplayInterval?: number;\n};\n\n/**\n * State used in rendering Carousel\n */\nexport type CarouselState = ComponentState<CarouselSlots> & CarouselContextValue;\n\nexport interface CarouselVisibilityEventDetail {\n isVisible: boolean;\n}\n\nexport type CarouselVisibilityChangeEvent = CustomEvent<CarouselVisibilityEventDetail>;\n\n/**\n * @internal\n */\nexport interface CarouselUpdateData {\n /**\n * The current carousel index, a change in index will not trigger the callback (use context index instead).\n */\n activeIndex: number;\n /**\n * The total number of slides to be navigated, accounts for grouping.\n */\n navItemsCount: number;\n /**\n * A breakdown of the card indexes contained within each slide index.\n */\n groupIndexList: number[][];\n /**\n * An array of the card DOM elements after render\n */\n slideNodes: HTMLElement[];\n /**\n * Whether the carousel has enough cards present to enable looping without issues.\n */\n canLoop?: boolean;\n}\n"],"names":[],"mappings":"AAoHA;;CAEC,GACD,WAqBC"}
1
+ {"version":3,"sources":["../../../src/components/Carousel/Carousel.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, EventHandler, Slot } from '@fluentui/react-utilities';\nimport type { CarouselAppearance, CarouselContextValue, CarouselIndexChangeData } from '../CarouselContext.types';\n\nexport type CarouselSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * Children function replacement, passes through updated context index and carousel information for localization\n */\nexport type CarouselAnnouncerFunction = (index: number, totalSlides: number, slideGroupList: number[][]) => string;\n\n/**\n * List of integrated motion types\n */\nexport type CarouselMotion = 'slide' | { kind: 'slide'; duration?: number } | 'fade';\n\n/**\n * Carousel Props\n */\nexport type CarouselProps = ComponentProps<CarouselSlots> & {\n /**\n * The initial page to display in uncontrolled mode.\n */\n defaultActiveIndex?: number;\n\n /**\n * The alignment of the carousel.\n */\n align?: 'center' | 'start' | 'end';\n\n /**\n * The value of the currently active page.\n */\n activeIndex?: number;\n\n /**\n * Sets visual treatment for the Carousel container.\n *\n * `flat`\n * Retains the minimal styling used by default prior to introducing appearance-based styles.\n *\n * `elevated`\n * Applies rounded corners, background, and shadow tokens so the Carousel is presented as a surfaced container.\n *\n * @default 'flat'\n */\n appearance?: CarouselAppearance;\n\n /**\n * Callback to notify a page change.\n */\n onActiveIndexChange?: EventHandler<CarouselIndexChangeData>;\n\n /**\n * Circular enables the carousel to loop back around on navigation past trailing index.\n */\n circular?: boolean;\n\n /**\n * Controls the number of carousel cards per navigation element, will default to 'auto'\n * Recommended to set to '1' when using full page carousel cards.\n */\n groupSize?: number | 'auto';\n\n /**\n * Enables drag to scroll on carousel items.\n * Defaults to: False\n */\n draggable?: boolean;\n\n /**\n * Adds whitespace to start/end so that 'align' prop is always respected for current index\n * Defaults to: False\n */\n whitespace?: boolean;\n\n /**\n * Sets motion type as either 'slide' or 'fade'\n * Defaults: 'slide'\n *\n * Users can also pass 'slide' & duration via CarouselMotion object to control carousel speed.\n * Drag interactions are not affected because duration is then determined by the drag force.\n *\n * Note: Duration is not in milliseconds because Carousel uses an\n * attraction physics simulation when scrolling instead of easings.\n * Only values between 20-60 are recommended, 25 is the default.\n */\n motion?: CarouselMotion;\n\n /**\n * Localizes the string used to announce carousel page changes\n * Defaults to: undefined\n */\n announcement?: CarouselAnnouncerFunction;\n\n /**\n * Choose a delay between autoplay transitions in milliseconds.\n * Only active if Autoplay is enabled via CarouselAutoplayButton\n *\n * Defaults: 4000\n */\n autoplayInterval?: number;\n};\n\n/**\n * State used in rendering Carousel\n */\nexport type CarouselState = ComponentState<CarouselSlots> & CarouselContextValue;\n\nexport interface CarouselVisibilityEventDetail {\n isVisible: boolean;\n}\n\nexport type CarouselVisibilityChangeEvent = CustomEvent<CarouselVisibilityEventDetail>;\n\n/**\n * @internal\n */\nexport interface CarouselUpdateData {\n /**\n * The current carousel index, a change in index will not trigger the callback (use context index instead).\n */\n activeIndex: number;\n /**\n * The total number of slides to be navigated, accounts for grouping.\n */\n navItemsCount: number;\n /**\n * A breakdown of the card indexes contained within each slide index.\n */\n groupIndexList: number[][];\n /**\n * An array of the card DOM elements after render\n */\n slideNodes: HTMLElement[];\n /**\n * Whether the carousel has enough cards present to enable looping without issues.\n */\n canLoop?: boolean;\n}\n"],"names":[],"mappings":"AAoHA;;CAEC,GACD,WAqBC"}
@@ -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 _Carousel.Carousel;
14
14
  },
15
- carouselClassNames: function() {
15
+ get carouselClassNames () {
16
16
  return _useCarouselStylesstyles.carouselClassNames;
17
17
  },
18
- renderCarousel_unstable: function() {
18
+ get renderCarousel_unstable () {
19
19
  return _renderCarousel.renderCarousel_unstable;
20
20
  },
21
- useCarouselStyles_unstable: function() {
21
+ get useCarouselStyles_unstable () {
22
22
  return _useCarouselStylesstyles.useCarouselStyles_unstable;
23
23
  },
24
- useCarousel_unstable: function() {
24
+ get useCarousel_unstable () {
25
25
  return _useCarousel.useCarousel_unstable;
26
26
  }
27
27
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Carousel/index.ts"],"sourcesContent":["export { Carousel } from './Carousel';\nexport type {\n CarouselAnnouncerFunction,\n CarouselMotion,\n CarouselProps,\n CarouselSlots,\n CarouselState,\n CarouselUpdateData,\n CarouselVisibilityChangeEvent,\n CarouselVisibilityEventDetail,\n} from './Carousel.types';\nexport { renderCarousel_unstable } from './renderCarousel';\nexport { useCarousel_unstable } from './useCarousel';\nexport { carouselClassNames, useCarouselStyles_unstable } from './useCarouselStyles.styles';\n"],"names":["Carousel","renderCarousel_unstable","useCarousel_unstable","carouselClassNames","useCarouselStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,kBAAQ;;;eAaRG,2CAAkB;;;eAFlBF,uCAAuB;;;eAEHG,mDAA0B;;;eAD9CF,iCAAoB;;;0BAZJ,gBAAa;gCAWE,sBAAmB;6BACtB,mBAAgB;yCACU,gCAA6B"}
1
+ {"version":3,"sources":["../../../src/components/Carousel/index.ts"],"sourcesContent":["export { Carousel } from './Carousel';\nexport type {\n CarouselAnnouncerFunction,\n CarouselMotion,\n CarouselProps,\n CarouselSlots,\n CarouselState,\n CarouselUpdateData,\n CarouselVisibilityChangeEvent,\n CarouselVisibilityEventDetail,\n} from './Carousel.types';\nexport { renderCarousel_unstable } from './renderCarousel';\nexport { useCarousel_unstable } from './useCarousel';\nexport { carouselClassNames, useCarouselStyles_unstable } from './useCarouselStyles.styles';\n"],"names":["Carousel","renderCarousel_unstable","useCarousel_unstable","carouselClassNames","useCarouselStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,kBAAQ;;;eAaRG,2CAAkB;;;eAFlBF,uCAAuB;;;eAEHG,mDAA0B;;;eAD9CF,iCAAoB;;;0BAZJ,gBAAa;gCAWE,sBAAmB;6BACtB,mBAAgB;yCACU,gCAA6B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Carousel/renderCarousel.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 { CarouselState, CarouselSlots } from './Carousel.types';\nimport { CarouselProvider } from '../CarouselContext';\nimport type { CarouselContextValues } from '../CarouselContext.types';\n\n/**\n * Render the final JSX of Carousel\n */\nexport const renderCarousel_unstable = (state: CarouselState, contextValues: CarouselContextValues): JSXElement => {\n assertSlots<CarouselSlots>(state);\n\n return (\n <CarouselProvider value={contextValues.carousel}>\n <state.root />\n </CarouselProvider>\n );\n};\n"],"names":["assertSlots","CarouselProvider","renderCarousel_unstable","state","contextValues","value","carousel","root"],"mappings":";;;;+BAYaE;;;;;;4BAXb,gDAAiD;gCAErB,4BAA4B;iCAGvB,wBAAqB;AAM/C,gCAAgC,CAACC,OAAsBC;QAC5DJ,2BAAAA,EAA2BG;IAE3B,OAAA,WAAA,OACE,eAAA,EAACF,iCAAAA,EAAAA;QAAiBI,OAAOD,cAAcE,QAAQ;kBAC7C,WAAA,OAAA,eAAA,EAACH,MAAMI,IAAI,EAAA,CAAA;;AAGjB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Carousel/renderCarousel.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 { CarouselState, CarouselSlots } from './Carousel.types';\nimport { CarouselProvider } from '../CarouselContext';\nimport type { CarouselContextValues } from '../CarouselContext.types';\n\n/**\n * Render the final JSX of Carousel\n */\nexport const renderCarousel_unstable = (state: CarouselState, contextValues: CarouselContextValues): JSXElement => {\n assertSlots<CarouselSlots>(state);\n\n return (\n <CarouselProvider value={contextValues.carousel}>\n <state.root />\n </CarouselProvider>\n );\n};\n"],"names":["assertSlots","CarouselProvider","renderCarousel_unstable","state","contextValues","value","carousel","root"],"mappings":";;;;+BAYaE;;;;;;;gCAXb,gDAAiD,GAEjD,SAASF,WAAW,QAAQ,4BAA4B;iCAGvB,wBAAqB;AAM/C,gCAAgC,CAACG,OAAsBC;QAC5DJ,2BAAAA,EAA2BG;IAE3B,OAAA,WAAA,OACE,eAAA,EAACF,iCAAAA,EAAAA;QAAiBI,OAAOD,cAAcE,QAAQ;kBAC7C,WAAA,OAAA,eAAA,EAACH,MAAMI,IAAI,EAAA,CAAA;;AAGjB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Carousel/useCarousel.ts"],"sourcesContent":["'use client';\n\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport {\n getIntrinsicElementProps,\n slot,\n useEventCallback,\n useIsomorphicLayoutEffect,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport type { CarouselProps, CarouselState } from './Carousel.types';\nimport type { CarouselContextValue } from '../CarouselContext.types';\nimport { useEmblaCarousel } from '../useEmblaCarousel';\nimport { useAnnounce } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the state required to render Carousel.\n *\n * The returned state can be modified with hooks such as useCarouselStyles_unstable,\n * before being passed to renderCarousel_unstable.\n *\n * @param props - props from this instance of Carousel\n * @param ref - reference to root HTMLDivElement of Carousel\n */\nexport function useCarousel_unstable(props: CarouselProps, ref: React.Ref<HTMLDivElement>): CarouselState {\n 'use no memo'; // justified: compiler would optimize useCarousel_unstable — manual opt-out to preserve runtime behavior\n\n const {\n align = 'center',\n circular = false,\n onActiveIndexChange,\n groupSize = 'auto',\n draggable = false,\n whitespace = false,\n announcement,\n motion = 'slide',\n autoplayInterval = 4000,\n appearance = 'flat',\n } = props;\n\n const { dir } = useFluent();\n const { activeIndex, carouselApi, containerRef, viewportRef, subscribeForValues, enableAutoplay, resetAutoplay } =\n useEmblaCarousel({\n align,\n direction: dir,\n loop: circular,\n slidesToScroll: groupSize,\n defaultActiveIndex: props.defaultActiveIndex,\n activeIndex: props.activeIndex,\n watchDrag: draggable,\n containScroll: whitespace ? false : 'keepSnaps',\n motion,\n onDragIndexChange: onActiveIndexChange,\n onAutoplayIndexChange: onActiveIndexChange,\n autoplayInterval,\n });\n\n const selectPageByElement: CarouselContextValue['selectPageByElement'] = useEventCallback((event, element, jump) => {\n const foundIndex = carouselApi.scrollToElement(element, jump);\n onActiveIndexChange?.(event, { event, type: 'focus', index: foundIndex });\n\n return foundIndex;\n });\n\n const selectPageByIndex: CarouselContextValue['selectPageByIndex'] = useEventCallback((event, index, jump) => {\n carouselApi.scrollToIndex(index, jump);\n\n onActiveIndexChange?.(event, { event, type: 'click', index });\n });\n\n const selectPageByDirection: CarouselContextValue['selectPageByDirection'] = useEventCallback((event, direction) => {\n const nextPageIndex = carouselApi.scrollInDirection(direction);\n onActiveIndexChange?.(event, { event, type: 'click', index: nextPageIndex });\n\n return nextPageIndex;\n });\n\n const mergedContainerRef = useMergedRefs(ref, containerRef);\n\n // Announce carousel updates\n const announcementTextRef = React.useRef<string>('');\n const totalNavLength = React.useRef<number>(0);\n const navGroupRef = React.useRef<number[][]>([]);\n\n const { announce } = useAnnounce();\n\n const updateAnnouncement = useEventCallback(() => {\n if (totalNavLength.current <= 0 || !announcement) {\n // Ignore announcements until slides discovered\n return;\n }\n\n const announcementText = announcement(activeIndex, totalNavLength.current, navGroupRef.current);\n\n if (announcementText !== announcementTextRef.current) {\n announcementTextRef.current = announcementText;\n announce(announcementText, { polite: true });\n }\n });\n\n useIsomorphicLayoutEffect(() => {\n // Subscribe to any non-index carousel state changes\n return subscribeForValues(data => {\n if (totalNavLength.current <= 0 && data.navItemsCount > 0 && announcement) {\n const announcementText = announcement(data.activeIndex, data.navItemsCount, data.groupIndexList);\n // Initialize our string to prevent updateAnnouncement from reading an initial load\n announcementTextRef.current = announcementText;\n }\n totalNavLength.current = data.navItemsCount;\n navGroupRef.current = data.groupIndexList;\n updateAnnouncement();\n });\n }, [subscribeForValues, updateAnnouncement, announcement]);\n\n useIsomorphicLayoutEffect(() => {\n updateAnnouncement();\n }, [activeIndex, updateAnnouncement]);\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: mergedContainerRef,\n role: 'region',\n ...props,\n }),\n { elementType: 'div' },\n ),\n\n activeIndex,\n appearance,\n circular,\n containerRef: mergedContainerRef,\n viewportRef,\n selectPageByElement,\n selectPageByDirection,\n selectPageByIndex,\n subscribeForValues,\n enableAutoplay,\n resetAutoplay,\n };\n}\n"],"names":["useFluent_unstable","useFluent","getIntrinsicElementProps","slot","useEventCallback","useIsomorphicLayoutEffect","useMergedRefs","React","useEmblaCarousel","useAnnounce","useCarousel_unstable","props","ref","align","circular","onActiveIndexChange","groupSize","draggable","whitespace","announcement","motion","autoplayInterval","appearance","dir","activeIndex","carouselApi","containerRef","viewportRef","subscribeForValues","enableAutoplay","resetAutoplay","direction","loop","slidesToScroll","defaultActiveIndex","watchDrag","containScroll","onDragIndexChange","onAutoplayIndexChange","selectPageByElement","event","element","jump","foundIndex","scrollToElement","type","index","selectPageByIndex","scrollToIndex","selectPageByDirection","nextPageIndex","scrollInDirection","mergedContainerRef","announcementTextRef","useRef","totalNavLength","navGroupRef","announce","updateAnnouncement","current","announcementText","polite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;YACzCN;QACF;IACF,GAAG;QAAC9B;QAAoB8B;QAAoBvC;KAAa;QAEzDd,yCAAAA,EAA0B;QACxBqD;IACF,GAAG;QAAClC;QAAakC;KAAmB;IAEpC,OAAO;QACLO,YAAY;YACVC,MAAM;QACR;QACAA,MAAM/D,oBAAAA,CAAKgE,MAAM,KACfjE,wCAAAA,EAAyB,OAAO;YAC9BU,KAAKwC;YACLgB,MAAM;YACN,GAAGzD,KAAK;QACV,IACA;YAAE0D,aAAa;QAAM;QAGvB7C;QACAF;QACAR;QACAY,cAAc0B;QACdzB;QACAY;QACAU;QACAF;QACAnB;QACAC;QACAC;IACF;AACF"}
1
+ {"version":3,"sources":["../../../src/components/Carousel/useCarousel.ts"],"sourcesContent":["'use client';\n\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport {\n getIntrinsicElementProps,\n slot,\n useEventCallback,\n useIsomorphicLayoutEffect,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nimport type { CarouselProps, CarouselState } from './Carousel.types';\nimport type { CarouselContextValue } from '../CarouselContext.types';\nimport { useEmblaCarousel } from '../useEmblaCarousel';\nimport { useAnnounce } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the state required to render Carousel.\n *\n * The returned state can be modified with hooks such as useCarouselStyles_unstable,\n * before being passed to renderCarousel_unstable.\n *\n * @param props - props from this instance of Carousel\n * @param ref - reference to root HTMLDivElement of Carousel\n */\nexport function useCarousel_unstable(props: CarouselProps, ref: React.Ref<HTMLDivElement>): CarouselState {\n 'use no memo'; // justified: compiler would optimize useCarousel_unstable — manual opt-out to preserve runtime behavior\n\n const {\n align = 'center',\n circular = false,\n onActiveIndexChange,\n groupSize = 'auto',\n draggable = false,\n whitespace = false,\n announcement,\n motion = 'slide',\n autoplayInterval = 4000,\n appearance = 'flat',\n } = props;\n\n const { dir } = useFluent();\n const { activeIndex, carouselApi, containerRef, viewportRef, subscribeForValues, enableAutoplay, resetAutoplay } =\n useEmblaCarousel({\n align,\n direction: dir,\n loop: circular,\n slidesToScroll: groupSize,\n defaultActiveIndex: props.defaultActiveIndex,\n activeIndex: props.activeIndex,\n watchDrag: draggable,\n containScroll: whitespace ? false : 'keepSnaps',\n motion,\n onDragIndexChange: onActiveIndexChange,\n onAutoplayIndexChange: onActiveIndexChange,\n autoplayInterval,\n });\n\n const selectPageByElement: CarouselContextValue['selectPageByElement'] = useEventCallback((event, element, jump) => {\n const foundIndex = carouselApi.scrollToElement(element, jump);\n onActiveIndexChange?.(event, { event, type: 'focus', index: foundIndex });\n\n return foundIndex;\n });\n\n const selectPageByIndex: CarouselContextValue['selectPageByIndex'] = useEventCallback((event, index, jump) => {\n carouselApi.scrollToIndex(index, jump);\n\n onActiveIndexChange?.(event, { event, type: 'click', index });\n });\n\n const selectPageByDirection: CarouselContextValue['selectPageByDirection'] = useEventCallback((event, direction) => {\n const nextPageIndex = carouselApi.scrollInDirection(direction);\n onActiveIndexChange?.(event, { event, type: 'click', index: nextPageIndex });\n\n return nextPageIndex;\n });\n\n const mergedContainerRef = useMergedRefs(ref, containerRef);\n\n // Announce carousel updates\n const announcementTextRef = React.useRef<string>('');\n const totalNavLength = React.useRef<number>(0);\n const navGroupRef = React.useRef<number[][]>([]);\n\n const { announce } = useAnnounce();\n\n const updateAnnouncement = useEventCallback(() => {\n if (totalNavLength.current <= 0 || !announcement) {\n // Ignore announcements until slides discovered\n return;\n }\n\n const announcementText = announcement(activeIndex, totalNavLength.current, navGroupRef.current);\n\n if (announcementText !== announcementTextRef.current) {\n announcementTextRef.current = announcementText;\n announce(announcementText, { polite: true });\n }\n });\n\n useIsomorphicLayoutEffect(() => {\n // Subscribe to any non-index carousel state changes\n return subscribeForValues(data => {\n if (totalNavLength.current <= 0 && data.navItemsCount > 0 && announcement) {\n const announcementText = announcement(data.activeIndex, data.navItemsCount, data.groupIndexList);\n // Initialize our string to prevent updateAnnouncement from reading an initial load\n announcementTextRef.current = announcementText;\n }\n totalNavLength.current = data.navItemsCount;\n navGroupRef.current = data.groupIndexList;\n updateAnnouncement();\n });\n }, [subscribeForValues, updateAnnouncement, announcement]);\n\n useIsomorphicLayoutEffect(() => {\n updateAnnouncement();\n }, [activeIndex, updateAnnouncement]);\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: mergedContainerRef,\n role: 'region',\n ...props,\n }),\n { elementType: 'div' },\n ),\n\n activeIndex,\n appearance,\n circular,\n containerRef: mergedContainerRef,\n viewportRef,\n selectPageByElement,\n selectPageByDirection,\n selectPageByIndex,\n subscribeForValues,\n enableAutoplay,\n resetAutoplay,\n };\n}\n"],"names":["useFluent_unstable","useFluent","getIntrinsicElementProps","slot","useEventCallback","useIsomorphicLayoutEffect","useMergedRefs","React","useEmblaCarousel","useAnnounce","useCarousel_unstable","props","ref","align","circular","onActiveIndexChange","groupSize","draggable","whitespace","announcement","motion","autoplayInterval","appearance","dir","activeIndex","carouselApi","containerRef","viewportRef","subscribeForValues","enableAutoplay","resetAutoplay","direction","loop","slidesToScroll","defaultActiveIndex","watchDrag","containScroll","onDragIndexChange","onAutoplayIndexChange","selectPageByElement","event","element","jump","foundIndex","scrollToElement","type","index","selectPageByIndex","scrollToIndex","selectPageByDirection","nextPageIndex","scrollInDirection","mergedContainerRef","announcementTextRef","useRef","totalNavLength","navGroupRef","announce","updateAnnouncement","current","announcementText","polite","data","navItemsCount","groupIndexList","components","root","always","role","elementType"],"mappings":"AAAA;;;;;+BA0BgBU;;;;;;;qCAxBgC,kCAAkC;gCAO3E,4BAA4B;iEACZ,QAAQ;kCAIE,yBAAsB;AAYhD,8BAA8BC,KAAoB,EAAEC,GAA8B;IACvF,eAAe,wGAAwG;IAEvH,MAAM,EACJC,QAAQ,QAAQ,EAChBC,WAAW,KAAK,EAChBC,mBAAmB,EACnBC,YAAY,MAAM,EAClBC,YAAY,KAAK,EACjBC,aAAa,KAAK,EAClBC,YAAY,EACZC,SAAS,OAAO,EAChBC,mBAAmB,IAAI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AnB;QACAC;QACAC;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Carousel/useCarouselContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport type { CarouselContextValues } from '../CarouselContext.types';\nimport type { CarouselState } from './Carousel.types';\n\nexport function useCarouselContextValues_unstable(state: CarouselState): CarouselContextValues {\n const {\n activeIndex,\n appearance,\n selectPageByElement,\n selectPageByDirection,\n selectPageByIndex,\n subscribeForValues,\n enableAutoplay,\n resetAutoplay,\n circular,\n containerRef,\n viewportRef,\n } = state;\n\n const carousel = React.useMemo(\n () => ({\n activeIndex,\n appearance,\n selectPageByElement,\n selectPageByDirection,\n selectPageByIndex,\n subscribeForValues,\n enableAutoplay,\n resetAutoplay,\n circular,\n containerRef,\n viewportRef,\n }),\n [\n activeIndex,\n appearance,\n selectPageByElement,\n selectPageByDirection,\n selectPageByIndex,\n subscribeForValues,\n enableAutoplay,\n resetAutoplay,\n circular,\n containerRef,\n viewportRef,\n ],\n );\n\n return { carousel };\n}\n"],"names":["React","useCarouselContextValues_unstable","state","activeIndex","appearance","selectPageByElement","selectPageByDirection","selectPageByIndex","subscribeForValues","enableAutoplay","resetAutoplay","circular","containerRef","viewportRef","carousel","useMemo"],"mappings":"AAAA;;;;;+BAOgBC;;;;;;;iEALO,QAAQ;AAKxB,2CAA2CC,KAAoB;IACpE,MAAM,EACJC,WAAW,EACXC,UAAU,EACVC,mBAAmB,EACnBC,qBAAqB,EACrBC,iBAAiB,EACjBC,kBAAkB,EAClBC,cAAc,EACdC,aAAa,EACbC,QAAQ,EACRC,YAAY,EACZC,WAAW,EACZ,GAAGX;IAEJ,MAAMY,WAAWd,OAAMe,OAAO,CAC5B,IAAO,CAAA;YACLZ;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;SACF,CAAA,EACA;QACEV;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACD;IAGH,OAAO;QAAEC;IAAS;AACpB"}
1
+ {"version":3,"sources":["../../../src/components/Carousel/useCarouselContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport type { CarouselContextValues } from '../CarouselContext.types';\nimport type { CarouselState } from './Carousel.types';\n\nexport function useCarouselContextValues_unstable(state: CarouselState): CarouselContextValues {\n const {\n activeIndex,\n appearance,\n selectPageByElement,\n selectPageByDirection,\n selectPageByIndex,\n subscribeForValues,\n enableAutoplay,\n resetAutoplay,\n circular,\n containerRef,\n viewportRef,\n } = state;\n\n const carousel = React.useMemo(\n () => ({\n activeIndex,\n appearance,\n selectPageByElement,\n selectPageByDirection,\n selectPageByIndex,\n subscribeForValues,\n enableAutoplay,\n resetAutoplay,\n circular,\n containerRef,\n viewportRef,\n }),\n [\n activeIndex,\n appearance,\n selectPageByElement,\n selectPageByDirection,\n selectPageByIndex,\n subscribeForValues,\n enableAutoplay,\n resetAutoplay,\n circular,\n containerRef,\n viewportRef,\n ],\n );\n\n return { carousel };\n}\n"],"names":["React","useCarouselContextValues_unstable","state","activeIndex","appearance","selectPageByElement","selectPageByDirection","selectPageByIndex","subscribeForValues","enableAutoplay","resetAutoplay","circular","containerRef","viewportRef","carousel","useMemo"],"mappings":"AAAA;;;;;+BAOgBC;;;;;;;iEALO,QAAQ;AAKxB,2CAA2CC,KAAoB;IACpE,MAAM,EACJC,WAAW,EACXC,UAAU,EACVC,mBAAmB,EACnBC,qBAAqB,EACrBC,iBAAiB,EACjBC,kBAAkB,EAClBC,cAAc,EACdC,aAAa,EACbC,QAAQ,EACRC,YAAY,EACZC,WAAW,EACZ,GAAGX;IAEJ,MAAMY,WAAWd,OAAMe,OAAO,CAC5B,IAAO,CAAA;YACLZ;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;SACF,CAAA,EACA;QACEV;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACD;IAGH,OAAO;QAAEC;IAAS;AACpB"}
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  function _export(target, all) {
7
7
  for(var name in all)Object.defineProperty(target, name, {
8
8
  enumerable: true,
9
- get: all[name]
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- carouselClassNames: function() {
13
+ get carouselClassNames () {
14
14
  return carouselClassNames;
15
15
  },
16
- useCarouselStyles_unstable: function() {
16
+ get useCarouselStyles_unstable () {
17
17
  return useCarouselStyles_unstable;
18
18
  }
19
19
  });