@fluentui/react-carousel 0.0.0-nightly-20241008-0405.1
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.
- package/CHANGELOG.md +129 -0
- package/LICENSE +15 -0
- package/README.md +33 -0
- package/dist/index.d.ts +625 -0
- package/lib/Carousel.js +1 -0
- package/lib/Carousel.js.map +1 -0
- package/lib/CarouselAutoplayButton.js +1 -0
- package/lib/CarouselAutoplayButton.js.map +1 -0
- package/lib/CarouselButton.js +1 -0
- package/lib/CarouselButton.js.map +1 -0
- package/lib/CarouselCard.js +1 -0
- package/lib/CarouselCard.js.map +1 -0
- package/lib/CarouselContext.js +2 -0
- package/lib/CarouselContext.js.map +1 -0
- package/lib/CarouselNav.js +1 -0
- package/lib/CarouselNav.js.map +1 -0
- package/lib/CarouselNavButton.js +1 -0
- package/lib/CarouselNavButton.js.map +1 -0
- package/lib/CarouselNavContainer.js +1 -0
- package/lib/CarouselNavContainer.js.map +1 -0
- package/lib/CarouselNavImageButton.js +1 -0
- package/lib/CarouselNavImageButton.js.map +1 -0
- package/lib/CarouselSlider.js +1 -0
- package/lib/CarouselSlider.js.map +1 -0
- package/lib/components/Carousel/Carousel.js +20 -0
- package/lib/components/Carousel/Carousel.js.map +1 -0
- package/lib/components/Carousel/Carousel.types.js +3 -0
- package/lib/components/Carousel/Carousel.types.js.map +1 -0
- package/lib/components/Carousel/index.js +5 -0
- package/lib/components/Carousel/index.js.map +1 -0
- package/lib/components/Carousel/renderCarousel.js +12 -0
- package/lib/components/Carousel/renderCarousel.js.map +1 -0
- package/lib/components/Carousel/useCarousel.js +117 -0
- package/lib/components/Carousel/useCarousel.js.map +1 -0
- package/lib/components/Carousel/useCarouselContextValues.js +28 -0
- package/lib/components/Carousel/useCarouselContextValues.js.map +1 -0
- package/lib/components/Carousel/useCarouselStyles.styles.js +33 -0
- package/lib/components/Carousel/useCarouselStyles.styles.js.map +1 -0
- package/lib/components/CarouselAutoplayButton/CarouselAutoplayButton.js +18 -0
- package/lib/components/CarouselAutoplayButton/CarouselAutoplayButton.js.map +1 -0
- package/lib/components/CarouselAutoplayButton/CarouselAutoplayButton.types.js +1 -0
- package/lib/components/CarouselAutoplayButton/CarouselAutoplayButton.types.js.map +1 -0
- package/lib/components/CarouselAutoplayButton/index.js +5 -0
- package/lib/components/CarouselAutoplayButton/index.js.map +1 -0
- package/lib/components/CarouselAutoplayButton/renderCarouselAutoplayButton.js +9 -0
- package/lib/components/CarouselAutoplayButton/renderCarouselAutoplayButton.js.map +1 -0
- package/lib/components/CarouselAutoplayButton/useCarouselAutoplayButton.js +64 -0
- package/lib/components/CarouselAutoplayButton/useCarouselAutoplayButton.js.map +1 -0
- package/lib/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.js +42 -0
- package/lib/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.js.map +1 -0
- package/lib/components/CarouselButton/CarouselButton.js +16 -0
- package/lib/components/CarouselButton/CarouselButton.js.map +1 -0
- package/lib/components/CarouselButton/CarouselButton.types.js +3 -0
- package/lib/components/CarouselButton/CarouselButton.types.js.map +1 -0
- package/lib/components/CarouselButton/index.js +5 -0
- package/lib/components/CarouselButton/index.js.map +1 -0
- package/lib/components/CarouselButton/renderCarouselButton.js +9 -0
- package/lib/components/CarouselButton/renderCarouselButton.js.map +1 -0
- package/lib/components/CarouselButton/useCarouselButton.js +87 -0
- package/lib/components/CarouselButton/useCarouselButton.js.map +1 -0
- package/lib/components/CarouselButton/useCarouselButtonStyles.styles.js +41 -0
- package/lib/components/CarouselButton/useCarouselButtonStyles.styles.js.map +1 -0
- package/lib/components/CarouselCard/CarouselCard.js +20 -0
- package/lib/components/CarouselCard/CarouselCard.js.map +1 -0
- package/lib/components/CarouselCard/CarouselCard.types.js +3 -0
- package/lib/components/CarouselCard/CarouselCard.types.js.map +1 -0
- package/lib/components/CarouselCard/index.js +5 -0
- package/lib/components/CarouselCard/index.js.map +1 -0
- package/lib/components/CarouselCard/renderCarouselCard.js +8 -0
- package/lib/components/CarouselCard/renderCarouselCard.js.map +1 -0
- package/lib/components/CarouselCard/useCarouselCard.js +91 -0
- package/lib/components/CarouselCard/useCarouselCard.js.map +1 -0
- package/lib/components/CarouselCard/useCarouselCardStyles.styles.js +45 -0
- package/lib/components/CarouselCard/useCarouselCardStyles.styles.js.map +1 -0
- package/lib/components/CarouselContext.js +23 -0
- package/lib/components/CarouselContext.js.map +1 -0
- package/lib/components/CarouselContext.types.js +1 -0
- package/lib/components/CarouselContext.types.js.map +1 -0
- package/lib/components/CarouselNav/CarouselNav.js +20 -0
- package/lib/components/CarouselNav/CarouselNav.js.map +1 -0
- package/lib/components/CarouselNav/CarouselNav.types.js +1 -0
- package/lib/components/CarouselNav/CarouselNav.types.js.map +1 -0
- package/lib/components/CarouselNav/CarouselNavContext.js +21 -0
- package/lib/components/CarouselNav/CarouselNavContext.js.map +1 -0
- package/lib/components/CarouselNav/CarouselNavIndexContext.js +8 -0
- package/lib/components/CarouselNav/CarouselNavIndexContext.js.map +1 -0
- package/lib/components/CarouselNav/index.js +5 -0
- package/lib/components/CarouselNav/index.js.map +1 -0
- package/lib/components/CarouselNav/renderCarouselNav.js +19 -0
- package/lib/components/CarouselNav/renderCarouselNav.js.map +1 -0
- package/lib/components/CarouselNav/useCarouselNav.js +49 -0
- package/lib/components/CarouselNav/useCarouselNav.js.map +1 -0
- package/lib/components/CarouselNav/useCarouselNavStyles.styles.js +63 -0
- package/lib/components/CarouselNav/useCarouselNavStyles.styles.js.map +1 -0
- package/lib/components/CarouselNavButton/CarouselNavButton.js +15 -0
- package/lib/components/CarouselNavButton/CarouselNavButton.js.map +1 -0
- package/lib/components/CarouselNavButton/CarouselNavButton.types.js +3 -0
- package/lib/components/CarouselNavButton/CarouselNavButton.types.js.map +1 -0
- package/lib/components/CarouselNavButton/index.js +5 -0
- package/lib/components/CarouselNavButton/index.js.map +1 -0
- package/lib/components/CarouselNavButton/renderCarouselNavButton.js +9 -0
- package/lib/components/CarouselNavButton/renderCarouselNavButton.js.map +1 -0
- package/lib/components/CarouselNavButton/useCarouselNavButton.js +73 -0
- package/lib/components/CarouselNavButton/useCarouselNavButton.js.map +1 -0
- package/lib/components/CarouselNavButton/useCarouselNavButtonStyles.styles.js +196 -0
- package/lib/components/CarouselNavButton/useCarouselNavButtonStyles.styles.js.map +1 -0
- package/lib/components/CarouselNavContainer/CarouselNavContainer.js +20 -0
- package/lib/components/CarouselNavContainer/CarouselNavContainer.js.map +1 -0
- package/lib/components/CarouselNavContainer/CarouselNavContainer.types.js +3 -0
- package/lib/components/CarouselNavContainer/CarouselNavContainer.types.js.map +1 -0
- package/lib/components/CarouselNavContainer/index.js +5 -0
- package/lib/components/CarouselNavContainer/index.js.map +1 -0
- package/lib/components/CarouselNavContainer/renderCarouselNavContainer.js +15 -0
- package/lib/components/CarouselNavContainer/renderCarouselNavContainer.js.map +1 -0
- package/lib/components/CarouselNavContainer/useCarouselNavContainer.js +51 -0
- package/lib/components/CarouselNavContainer/useCarouselNavContainer.js.map +1 -0
- package/lib/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.js +104 -0
- package/lib/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.js.map +1 -0
- package/lib/components/CarouselNavImageButton/CarouselNavImageButton.js +16 -0
- package/lib/components/CarouselNavImageButton/CarouselNavImageButton.js.map +1 -0
- package/lib/components/CarouselNavImageButton/CarouselNavImageButton.types.js +3 -0
- package/lib/components/CarouselNavImageButton/CarouselNavImageButton.types.js.map +1 -0
- package/lib/components/CarouselNavImageButton/index.js +5 -0
- package/lib/components/CarouselNavImageButton/index.js.map +1 -0
- package/lib/components/CarouselNavImageButton/renderCarouselNavImageButton.js +10 -0
- package/lib/components/CarouselNavImageButton/renderCarouselNavImageButton.js.map +1 -0
- package/lib/components/CarouselNavImageButton/useCarouselNavImageButton.js +76 -0
- package/lib/components/CarouselNavImageButton/useCarouselNavImageButton.js.map +1 -0
- package/lib/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.js +85 -0
- package/lib/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.js.map +1 -0
- package/lib/components/CarouselSlider/CarouselSlider.js +18 -0
- package/lib/components/CarouselSlider/CarouselSlider.js.map +1 -0
- package/lib/components/CarouselSlider/CarouselSlider.types.js +1 -0
- package/lib/components/CarouselSlider/CarouselSlider.types.js.map +1 -0
- package/lib/components/CarouselSlider/CarouselSliderContext.js +21 -0
- package/lib/components/CarouselSlider/CarouselSliderContext.js.map +1 -0
- package/lib/components/CarouselSlider/index.js +5 -0
- package/lib/components/CarouselSlider/index.js.map +1 -0
- package/lib/components/CarouselSlider/renderCarouselSlider.js +12 -0
- package/lib/components/CarouselSlider/renderCarouselSlider.js.map +1 -0
- package/lib/components/CarouselSlider/useCarouselSlider.js +36 -0
- package/lib/components/CarouselSlider/useCarouselSlider.js.map +1 -0
- package/lib/components/CarouselSlider/useCarouselSliderStyles.styles.js +26 -0
- package/lib/components/CarouselSlider/useCarouselSliderStyles.styles.js.map +1 -0
- package/lib/components/useEmblaCarousel.js +239 -0
- package/lib/components/useEmblaCarousel.js.map +1 -0
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -0
- package/lib-commonjs/Carousel.js +6 -0
- package/lib-commonjs/Carousel.js.map +1 -0
- package/lib-commonjs/CarouselAutoplayButton.js +6 -0
- package/lib-commonjs/CarouselAutoplayButton.js.map +1 -0
- package/lib-commonjs/CarouselButton.js +6 -0
- package/lib-commonjs/CarouselButton.js.map +1 -0
- package/lib-commonjs/CarouselCard.js +6 -0
- package/lib-commonjs/CarouselCard.js.map +1 -0
- package/lib-commonjs/CarouselContext.js +7 -0
- package/lib-commonjs/CarouselContext.js.map +1 -0
- package/lib-commonjs/CarouselNav.js +6 -0
- package/lib-commonjs/CarouselNav.js.map +1 -0
- package/lib-commonjs/CarouselNavButton.js +6 -0
- package/lib-commonjs/CarouselNavButton.js.map +1 -0
- package/lib-commonjs/CarouselNavContainer.js +6 -0
- package/lib-commonjs/CarouselNavContainer.js.map +1 -0
- package/lib-commonjs/CarouselNavImageButton.js +6 -0
- package/lib-commonjs/CarouselNavImageButton.js.map +1 -0
- package/lib-commonjs/CarouselSlider.js +6 -0
- package/lib-commonjs/CarouselSlider.js.map +1 -0
- package/lib-commonjs/components/Carousel/Carousel.js +26 -0
- package/lib-commonjs/components/Carousel/Carousel.js.map +1 -0
- package/lib-commonjs/components/Carousel/Carousel.types.js +6 -0
- package/lib-commonjs/components/Carousel/Carousel.types.js.map +1 -0
- package/lib-commonjs/components/Carousel/index.js +10 -0
- package/lib-commonjs/components/Carousel/index.js.map +1 -0
- package/lib-commonjs/components/Carousel/renderCarousel.js +20 -0
- package/lib-commonjs/components/Carousel/renderCarousel.js.map +1 -0
- package/lib-commonjs/components/Carousel/useCarousel.js +119 -0
- package/lib-commonjs/components/Carousel/useCarousel.js.map +1 -0
- package/lib-commonjs/components/Carousel/useCarouselContextValues.js +39 -0
- package/lib-commonjs/components/Carousel/useCarouselContextValues.js.map +1 -0
- package/lib-commonjs/components/Carousel/useCarouselStyles.styles.js +52 -0
- package/lib-commonjs/components/Carousel/useCarouselStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CarouselAutoplayButton/CarouselAutoplayButton.js +24 -0
- package/lib-commonjs/components/CarouselAutoplayButton/CarouselAutoplayButton.js.map +1 -0
- package/lib-commonjs/components/CarouselAutoplayButton/CarouselAutoplayButton.types.js +6 -0
- package/lib-commonjs/components/CarouselAutoplayButton/CarouselAutoplayButton.types.js.map +1 -0
- package/lib-commonjs/components/CarouselAutoplayButton/index.js +10 -0
- package/lib-commonjs/components/CarouselAutoplayButton/index.js.map +1 -0
- package/lib-commonjs/components/CarouselAutoplayButton/renderCarouselAutoplayButton.js +17 -0
- package/lib-commonjs/components/CarouselAutoplayButton/renderCarouselAutoplayButton.js.map +1 -0
- package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButton.js +67 -0
- package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButton.js.map +1 -0
- package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.js +71 -0
- package/lib-commonjs/components/CarouselAutoplayButton/useCarouselAutoplayButtonStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CarouselButton/CarouselButton.js +24 -0
- package/lib-commonjs/components/CarouselButton/CarouselButton.js.map +1 -0
- package/lib-commonjs/components/CarouselButton/CarouselButton.types.js +6 -0
- package/lib-commonjs/components/CarouselButton/CarouselButton.types.js.map +1 -0
- package/lib-commonjs/components/CarouselButton/index.js +10 -0
- package/lib-commonjs/components/CarouselButton/index.js.map +1 -0
- package/lib-commonjs/components/CarouselButton/renderCarouselButton.js +17 -0
- package/lib-commonjs/components/CarouselButton/renderCarouselButton.js.map +1 -0
- package/lib-commonjs/components/CarouselButton/useCarouselButton.js +89 -0
- package/lib-commonjs/components/CarouselButton/useCarouselButton.js.map +1 -0
- package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.js +60 -0
- package/lib-commonjs/components/CarouselButton/useCarouselButtonStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CarouselCard/CarouselCard.js +24 -0
- package/lib-commonjs/components/CarouselCard/CarouselCard.js.map +1 -0
- package/lib-commonjs/components/CarouselCard/CarouselCard.types.js +6 -0
- package/lib-commonjs/components/CarouselCard/CarouselCard.types.js.map +1 -0
- package/lib-commonjs/components/CarouselCard/index.js +10 -0
- package/lib-commonjs/components/CarouselCard/index.js.map +1 -0
- package/lib-commonjs/components/CarouselCard/renderCarouselCard.js +16 -0
- package/lib-commonjs/components/CarouselCard/renderCarouselCard.js.map +1 -0
- package/lib-commonjs/components/CarouselCard/useCarouselCard.js +94 -0
- package/lib-commonjs/components/CarouselCard/useCarouselCard.js.map +1 -0
- package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.js +67 -0
- package/lib-commonjs/components/CarouselCard/useCarouselCardStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CarouselContext.js +44 -0
- package/lib-commonjs/components/CarouselContext.js.map +1 -0
- package/lib-commonjs/components/CarouselContext.types.js +6 -0
- package/lib-commonjs/components/CarouselContext.types.js.map +1 -0
- package/lib-commonjs/components/CarouselNav/CarouselNav.js +26 -0
- package/lib-commonjs/components/CarouselNav/CarouselNav.js.map +1 -0
- package/lib-commonjs/components/CarouselNav/CarouselNav.types.js +6 -0
- package/lib-commonjs/components/CarouselNav/CarouselNav.types.js.map +1 -0
- package/lib-commonjs/components/CarouselNav/CarouselNavContext.js +46 -0
- package/lib-commonjs/components/CarouselNav/CarouselNavContext.js.map +1 -0
- package/lib-commonjs/components/CarouselNav/CarouselNavIndexContext.js +30 -0
- package/lib-commonjs/components/CarouselNav/CarouselNavIndexContext.js.map +1 -0
- package/lib-commonjs/components/CarouselNav/index.js +10 -0
- package/lib-commonjs/components/CarouselNav/index.js.map +1 -0
- package/lib-commonjs/components/CarouselNav/renderCarouselNav.js +27 -0
- package/lib-commonjs/components/CarouselNav/renderCarouselNav.js.map +1 -0
- package/lib-commonjs/components/CarouselNav/useCarouselNav.js +52 -0
- package/lib-commonjs/components/CarouselNav/useCarouselNav.js.map +1 -0
- package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.js +106 -0
- package/lib-commonjs/components/CarouselNav/useCarouselNavStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CarouselNavButton/CarouselNavButton.js +24 -0
- package/lib-commonjs/components/CarouselNavButton/CarouselNavButton.js.map +1 -0
- package/lib-commonjs/components/CarouselNavButton/CarouselNavButton.types.js +6 -0
- package/lib-commonjs/components/CarouselNavButton/CarouselNavButton.types.js.map +1 -0
- package/lib-commonjs/components/CarouselNavButton/index.js +10 -0
- package/lib-commonjs/components/CarouselNavButton/index.js.map +1 -0
- package/lib-commonjs/components/CarouselNavButton/renderCarouselNavButton.js +17 -0
- package/lib-commonjs/components/CarouselNavButton/renderCarouselNavButton.js.map +1 -0
- package/lib-commonjs/components/CarouselNavButton/useCarouselNavButton.js +76 -0
- package/lib-commonjs/components/CarouselNavButton/useCarouselNavButton.js.map +1 -0
- package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.js +293 -0
- package/lib-commonjs/components/CarouselNavButton/useCarouselNavButtonStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CarouselNavContainer/CarouselNavContainer.js +29 -0
- package/lib-commonjs/components/CarouselNavContainer/CarouselNavContainer.js.map +1 -0
- package/lib-commonjs/components/CarouselNavContainer/CarouselNavContainer.types.js +6 -0
- package/lib-commonjs/components/CarouselNavContainer/CarouselNavContainer.types.js.map +1 -0
- package/lib-commonjs/components/CarouselNavContainer/index.js +10 -0
- package/lib-commonjs/components/CarouselNavContainer/index.js.map +1 -0
- package/lib-commonjs/components/CarouselNavContainer/renderCarouselNavContainer.js +23 -0
- package/lib-commonjs/components/CarouselNavContainer/renderCarouselNavContainer.js.map +1 -0
- package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainer.js +54 -0
- package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainer.js.map +1 -0
- package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.js +163 -0
- package/lib-commonjs/components/CarouselNavContainer/useCarouselNavContainerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CarouselNavImageButton/CarouselNavImageButton.js +24 -0
- package/lib-commonjs/components/CarouselNavImageButton/CarouselNavImageButton.js.map +1 -0
- package/lib-commonjs/components/CarouselNavImageButton/CarouselNavImageButton.types.js +6 -0
- package/lib-commonjs/components/CarouselNavImageButton/CarouselNavImageButton.types.js.map +1 -0
- package/lib-commonjs/components/CarouselNavImageButton/index.js +10 -0
- package/lib-commonjs/components/CarouselNavImageButton/index.js.map +1 -0
- package/lib-commonjs/components/CarouselNavImageButton/renderCarouselNavImageButton.js +18 -0
- package/lib-commonjs/components/CarouselNavImageButton/renderCarouselNavImageButton.js.map +1 -0
- package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButton.js +79 -0
- package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButton.js.map +1 -0
- package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.js +132 -0
- package/lib-commonjs/components/CarouselNavImageButton/useCarouselNavImageButtonStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CarouselSlider/CarouselSlider.js +26 -0
- package/lib-commonjs/components/CarouselSlider/CarouselSlider.js.map +1 -0
- package/lib-commonjs/components/CarouselSlider/CarouselSlider.types.js +4 -0
- package/lib-commonjs/components/CarouselSlider/CarouselSlider.types.js.map +1 -0
- package/lib-commonjs/components/CarouselSlider/CarouselSliderContext.js +46 -0
- package/lib-commonjs/components/CarouselSlider/CarouselSliderContext.js.map +1 -0
- package/lib-commonjs/components/CarouselSlider/index.js +10 -0
- package/lib-commonjs/components/CarouselSlider/index.js.map +1 -0
- package/lib-commonjs/components/CarouselSlider/renderCarouselSlider.js +20 -0
- package/lib-commonjs/components/CarouselSlider/renderCarouselSlider.js.map +1 -0
- package/lib-commonjs/components/CarouselSlider/useCarouselSlider.js +39 -0
- package/lib-commonjs/components/CarouselSlider/useCarouselSlider.js.map +1 -0
- package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.js +41 -0
- package/lib-commonjs/components/CarouselSlider/useCarouselSliderStyles.styles.js.map +1 -0
- package/lib-commonjs/components/useEmblaCarousel.js +262 -0
- package/lib-commonjs/components/useEmblaCarousel.js.map +1 -0
- package/lib-commonjs/index.js +166 -0
- package/lib-commonjs/index.js.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
EMBLA_VISIBILITY_EVENT: function() {
|
|
13
|
+
return EMBLA_VISIBILITY_EVENT;
|
|
14
|
+
},
|
|
15
|
+
setTabsterDefault: function() {
|
|
16
|
+
return setTabsterDefault;
|
|
17
|
+
},
|
|
18
|
+
useEmblaCarousel: function() {
|
|
19
|
+
return useEmblaCarousel;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
23
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
24
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
|
25
|
+
const _emblacarousel = /*#__PURE__*/ _interop_require_default._(require("embla-carousel"));
|
|
26
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
27
|
+
const _useCarouselCardStylesstyles = require("./CarouselCard/useCarouselCardStyles.styles");
|
|
28
|
+
const _useCarouselSliderStylesstyles = require("./CarouselSlider/useCarouselSliderStyles.styles");
|
|
29
|
+
const _emblacarouselautoplay = /*#__PURE__*/ _interop_require_default._(require("embla-carousel-autoplay"));
|
|
30
|
+
const sliderClassname = `.${_useCarouselSliderStylesstyles.carouselSliderClassNames.root}`;
|
|
31
|
+
const DEFAULT_EMBLA_OPTIONS = {
|
|
32
|
+
containScroll: 'trimSnaps',
|
|
33
|
+
inViewThreshold: 0.99,
|
|
34
|
+
watchDrag: false,
|
|
35
|
+
skipSnaps: true,
|
|
36
|
+
container: sliderClassname,
|
|
37
|
+
slides: `.${_useCarouselCardStylesstyles.carouselCardClassNames.root}`
|
|
38
|
+
};
|
|
39
|
+
const EMBLA_VISIBILITY_EVENT = 'embla:visibilitychange';
|
|
40
|
+
function setTabsterDefault(element, isDefault) {
|
|
41
|
+
const tabsterAttr = element.getAttribute('data-tabster');
|
|
42
|
+
if (tabsterAttr) {
|
|
43
|
+
const tabsterAttributes = JSON.parse(tabsterAttr);
|
|
44
|
+
if (tabsterAttributes.focusable) {
|
|
45
|
+
// If tabster.focusable isn't present, we will ignore.
|
|
46
|
+
tabsterAttributes.focusable.isDefault = isDefault;
|
|
47
|
+
element.setAttribute('data-tabster', JSON.stringify(tabsterAttributes));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function useEmblaCarousel(options) {
|
|
52
|
+
const { align, direction, loop, slidesToScroll, watchDrag, containScroll } = options;
|
|
53
|
+
const [activeIndex, setActiveIndex] = (0, _reactutilities.useControllableState)({
|
|
54
|
+
defaultState: options.defaultActiveIndex,
|
|
55
|
+
state: options.activeIndex,
|
|
56
|
+
initialState: 0
|
|
57
|
+
});
|
|
58
|
+
const emblaOptions = _react.useRef({
|
|
59
|
+
align,
|
|
60
|
+
direction,
|
|
61
|
+
loop,
|
|
62
|
+
slidesToScroll,
|
|
63
|
+
startIndex: activeIndex,
|
|
64
|
+
watchDrag,
|
|
65
|
+
containScroll
|
|
66
|
+
});
|
|
67
|
+
const emblaApi = _react.useRef(null);
|
|
68
|
+
const autoplayRef = _react.useRef(false);
|
|
69
|
+
const resetAutoplay = _react.useCallback(()=>{
|
|
70
|
+
var _emblaApi_current;
|
|
71
|
+
(_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.plugins().autoplay.reset();
|
|
72
|
+
}, []);
|
|
73
|
+
/* Our autoplay button, which is required by standards for autoplay to be enabled, will handle controlled state */ const enableAutoplay = _react.useCallback((autoplay)=>{
|
|
74
|
+
autoplayRef.current = autoplay;
|
|
75
|
+
if (autoplay) {
|
|
76
|
+
var _emblaApi_current;
|
|
77
|
+
(_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.plugins().autoplay.play();
|
|
78
|
+
// Reset after play to ensure timing and any focus/mouse pause state is reset.
|
|
79
|
+
resetAutoplay();
|
|
80
|
+
} else {
|
|
81
|
+
var _emblaApi_current1;
|
|
82
|
+
(_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.plugins().autoplay.stop();
|
|
83
|
+
}
|
|
84
|
+
}, [
|
|
85
|
+
resetAutoplay
|
|
86
|
+
]);
|
|
87
|
+
// Listeners contains callbacks for UI elements that may require state update based on embla changes
|
|
88
|
+
const listeners = _react.useRef(new Set());
|
|
89
|
+
const subscribeForValues = _react.useCallback((listener)=>{
|
|
90
|
+
listeners.current.add(listener);
|
|
91
|
+
return ()=>{
|
|
92
|
+
listeners.current.delete(listener);
|
|
93
|
+
};
|
|
94
|
+
}, []);
|
|
95
|
+
const containerRef = _react.useMemo(()=>{
|
|
96
|
+
let currentElement = null;
|
|
97
|
+
const handleIndexChange = ()=>{
|
|
98
|
+
var _emblaApi_current, _emblaApi_current1, _emblaApi_current2;
|
|
99
|
+
var _emblaApi_current_selectedScrollSnap;
|
|
100
|
+
const newIndex = (_emblaApi_current_selectedScrollSnap = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.selectedScrollSnap()) !== null && _emblaApi_current_selectedScrollSnap !== void 0 ? _emblaApi_current_selectedScrollSnap : 0;
|
|
101
|
+
const slides = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.slideNodes();
|
|
102
|
+
var _emblaApi_current_internalEngine_slideRegistry_newIndex_;
|
|
103
|
+
const actualIndex = (_emblaApi_current_internalEngine_slideRegistry_newIndex_ = (_emblaApi_current2 = emblaApi.current) === null || _emblaApi_current2 === void 0 ? void 0 : _emblaApi_current2.internalEngine().slideRegistry[newIndex][0]) !== null && _emblaApi_current_internalEngine_slideRegistry_newIndex_ !== void 0 ? _emblaApi_current_internalEngine_slideRegistry_newIndex_ : 0;
|
|
104
|
+
// We set the active or first index of group on-screen as the selected tabster index
|
|
105
|
+
slides === null || slides === void 0 ? void 0 : slides.forEach((slide, slideIndex)=>{
|
|
106
|
+
setTabsterDefault(slide, slideIndex === actualIndex);
|
|
107
|
+
});
|
|
108
|
+
setActiveIndex(newIndex);
|
|
109
|
+
};
|
|
110
|
+
const handleReinit = ()=>{
|
|
111
|
+
var _emblaApi_current, _emblaApi_current1, _emblaApi_current2;
|
|
112
|
+
var _emblaApi_current_slideNodes;
|
|
113
|
+
const nodes = (_emblaApi_current_slideNodes = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.slideNodes()) !== null && _emblaApi_current_slideNodes !== void 0 ? _emblaApi_current_slideNodes : [];
|
|
114
|
+
var _emblaApi_current_internalEngine_slideRegistry;
|
|
115
|
+
const groupIndexList = (_emblaApi_current_internalEngine_slideRegistry = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.internalEngine().slideRegistry) !== null && _emblaApi_current_internalEngine_slideRegistry !== void 0 ? _emblaApi_current_internalEngine_slideRegistry : [];
|
|
116
|
+
const navItemsCount = groupIndexList.length > 0 ? groupIndexList.length : nodes.length;
|
|
117
|
+
var _emblaApi_current_selectedScrollSnap;
|
|
118
|
+
const data = {
|
|
119
|
+
navItemsCount,
|
|
120
|
+
activeIndex: (_emblaApi_current_selectedScrollSnap = (_emblaApi_current2 = emblaApi.current) === null || _emblaApi_current2 === void 0 ? void 0 : _emblaApi_current2.selectedScrollSnap()) !== null && _emblaApi_current_selectedScrollSnap !== void 0 ? _emblaApi_current_selectedScrollSnap : 0,
|
|
121
|
+
groupIndexList,
|
|
122
|
+
slideNodes: nodes
|
|
123
|
+
};
|
|
124
|
+
for (const listener of listeners.current){
|
|
125
|
+
listener(data);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
const handleVisibilityChange = ()=>{
|
|
129
|
+
var _emblaApi_current, _emblaApi_current1;
|
|
130
|
+
const cardElements = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.slideNodes();
|
|
131
|
+
var _emblaApi_current_slidesInView;
|
|
132
|
+
const visibleIndexes = (_emblaApi_current_slidesInView = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.slidesInView()) !== null && _emblaApi_current_slidesInView !== void 0 ? _emblaApi_current_slidesInView : [];
|
|
133
|
+
cardElements === null || cardElements === void 0 ? void 0 : cardElements.forEach((cardElement, index)=>{
|
|
134
|
+
cardElement.dispatchEvent(new CustomEvent(EMBLA_VISIBILITY_EVENT, {
|
|
135
|
+
bubbles: false,
|
|
136
|
+
detail: {
|
|
137
|
+
isVisible: visibleIndexes.includes(index)
|
|
138
|
+
}
|
|
139
|
+
}));
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
return {
|
|
143
|
+
set current (newElement){
|
|
144
|
+
if (currentElement) {
|
|
145
|
+
var _emblaApi_current, _emblaApi_current1, _emblaApi_current2, _emblaApi_current3;
|
|
146
|
+
(_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.off('slidesInView', handleVisibilityChange);
|
|
147
|
+
(_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.off('select', handleIndexChange);
|
|
148
|
+
(_emblaApi_current2 = emblaApi.current) === null || _emblaApi_current2 === void 0 ? void 0 : _emblaApi_current2.off('reInit', handleReinit);
|
|
149
|
+
(_emblaApi_current3 = emblaApi.current) === null || _emblaApi_current3 === void 0 ? void 0 : _emblaApi_current3.destroy();
|
|
150
|
+
}
|
|
151
|
+
if (newElement) {
|
|
152
|
+
var _emblaApi_current4, _emblaApi_current5, _emblaApi_current6;
|
|
153
|
+
currentElement = newElement;
|
|
154
|
+
emblaApi.current = (0, _emblacarousel.default)(newElement, {
|
|
155
|
+
...DEFAULT_EMBLA_OPTIONS,
|
|
156
|
+
...emblaOptions.current
|
|
157
|
+
}, [
|
|
158
|
+
(0, _emblacarouselautoplay.default)({
|
|
159
|
+
playOnInit: autoplayRef.current,
|
|
160
|
+
stopOnInteraction: !autoplayRef.current,
|
|
161
|
+
stopOnMouseEnter: true,
|
|
162
|
+
stopOnFocusIn: true,
|
|
163
|
+
rootNode: (emblaRoot)=>{
|
|
164
|
+
var _emblaRoot_querySelector;
|
|
165
|
+
return (_emblaRoot_querySelector = emblaRoot.querySelector(sliderClassname)) !== null && _emblaRoot_querySelector !== void 0 ? _emblaRoot_querySelector : emblaRoot;
|
|
166
|
+
}
|
|
167
|
+
})
|
|
168
|
+
]);
|
|
169
|
+
(_emblaApi_current4 = emblaApi.current) === null || _emblaApi_current4 === void 0 ? void 0 : _emblaApi_current4.on('reInit', handleReinit);
|
|
170
|
+
(_emblaApi_current5 = emblaApi.current) === null || _emblaApi_current5 === void 0 ? void 0 : _emblaApi_current5.on('slidesInView', handleVisibilityChange);
|
|
171
|
+
(_emblaApi_current6 = emblaApi.current) === null || _emblaApi_current6 === void 0 ? void 0 : _emblaApi_current6.on('select', handleIndexChange);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
}, [
|
|
176
|
+
setActiveIndex
|
|
177
|
+
]);
|
|
178
|
+
const carouselApi = _react.useMemo(()=>({
|
|
179
|
+
scrollToElement: (element, jump)=>{
|
|
180
|
+
var _emblaApi_current, _emblaApi_current1, _emblaApi_current2;
|
|
181
|
+
const cardElements = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.slideNodes();
|
|
182
|
+
var _emblaApi_current_internalEngine_slideRegistry;
|
|
183
|
+
const groupIndexList = (_emblaApi_current_internalEngine_slideRegistry = (_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.internalEngine().slideRegistry) !== null && _emblaApi_current_internalEngine_slideRegistry !== void 0 ? _emblaApi_current_internalEngine_slideRegistry : [];
|
|
184
|
+
var _cardElements_indexOf;
|
|
185
|
+
const cardIndex = (_cardElements_indexOf = cardElements === null || cardElements === void 0 ? void 0 : cardElements.indexOf(element)) !== null && _cardElements_indexOf !== void 0 ? _cardElements_indexOf : 0;
|
|
186
|
+
const groupIndex = groupIndexList.findIndex((group)=>{
|
|
187
|
+
return group.includes(cardIndex);
|
|
188
|
+
});
|
|
189
|
+
const indexFocus = groupIndex !== null && groupIndex !== void 0 ? groupIndex : cardIndex;
|
|
190
|
+
(_emblaApi_current2 = emblaApi.current) === null || _emblaApi_current2 === void 0 ? void 0 : _emblaApi_current2.scrollTo(indexFocus, jump);
|
|
191
|
+
return indexFocus;
|
|
192
|
+
},
|
|
193
|
+
scrollToIndex: (index, jump)=>{
|
|
194
|
+
var _emblaApi_current;
|
|
195
|
+
(_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.scrollTo(index, jump);
|
|
196
|
+
},
|
|
197
|
+
scrollInDirection: (dir)=>{
|
|
198
|
+
var _emblaApi_current;
|
|
199
|
+
if (dir === 'prev') {
|
|
200
|
+
var _emblaApi_current1;
|
|
201
|
+
(_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.scrollPrev();
|
|
202
|
+
} else {
|
|
203
|
+
var _emblaApi_current2;
|
|
204
|
+
(_emblaApi_current2 = emblaApi.current) === null || _emblaApi_current2 === void 0 ? void 0 : _emblaApi_current2.scrollNext();
|
|
205
|
+
}
|
|
206
|
+
var _emblaApi_current_selectedScrollSnap;
|
|
207
|
+
return (_emblaApi_current_selectedScrollSnap = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.selectedScrollSnap()) !== null && _emblaApi_current_selectedScrollSnap !== void 0 ? _emblaApi_current_selectedScrollSnap : 0;
|
|
208
|
+
}
|
|
209
|
+
}), []);
|
|
210
|
+
_react.useEffect(()=>{
|
|
211
|
+
var _emblaApi_current;
|
|
212
|
+
var _emblaApi_current_selectedScrollSnap;
|
|
213
|
+
const currentActiveIndex = (_emblaApi_current_selectedScrollSnap = (_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.selectedScrollSnap()) !== null && _emblaApi_current_selectedScrollSnap !== void 0 ? _emblaApi_current_selectedScrollSnap : 0;
|
|
214
|
+
if (activeIndex !== currentActiveIndex) {
|
|
215
|
+
var _emblaApi_current1;
|
|
216
|
+
(_emblaApi_current1 = emblaApi.current) === null || _emblaApi_current1 === void 0 ? void 0 : _emblaApi_current1.scrollTo(activeIndex);
|
|
217
|
+
}
|
|
218
|
+
}, [
|
|
219
|
+
activeIndex
|
|
220
|
+
]);
|
|
221
|
+
_react.useEffect(()=>{
|
|
222
|
+
var _emblaApi_current;
|
|
223
|
+
emblaOptions.current = {
|
|
224
|
+
align,
|
|
225
|
+
direction,
|
|
226
|
+
loop,
|
|
227
|
+
slidesToScroll,
|
|
228
|
+
watchDrag,
|
|
229
|
+
containScroll
|
|
230
|
+
};
|
|
231
|
+
(_emblaApi_current = emblaApi.current) === null || _emblaApi_current === void 0 ? void 0 : _emblaApi_current.reInit({
|
|
232
|
+
...DEFAULT_EMBLA_OPTIONS,
|
|
233
|
+
...emblaOptions.current
|
|
234
|
+
}, [
|
|
235
|
+
(0, _emblacarouselautoplay.default)({
|
|
236
|
+
playOnInit: autoplayRef.current,
|
|
237
|
+
stopOnInteraction: !autoplayRef.current,
|
|
238
|
+
stopOnMouseEnter: true,
|
|
239
|
+
stopOnFocusIn: true,
|
|
240
|
+
rootNode: (emblaRoot)=>{
|
|
241
|
+
var _emblaRoot_querySelector;
|
|
242
|
+
return (_emblaRoot_querySelector = emblaRoot.querySelector(sliderClassname)) !== null && _emblaRoot_querySelector !== void 0 ? _emblaRoot_querySelector : emblaRoot;
|
|
243
|
+
}
|
|
244
|
+
})
|
|
245
|
+
]);
|
|
246
|
+
}, [
|
|
247
|
+
align,
|
|
248
|
+
direction,
|
|
249
|
+
loop,
|
|
250
|
+
slidesToScroll,
|
|
251
|
+
watchDrag,
|
|
252
|
+
containScroll
|
|
253
|
+
]);
|
|
254
|
+
return {
|
|
255
|
+
activeIndex,
|
|
256
|
+
carouselApi,
|
|
257
|
+
containerRef,
|
|
258
|
+
subscribeForValues,
|
|
259
|
+
enableAutoplay,
|
|
260
|
+
resetAutoplay
|
|
261
|
+
};
|
|
262
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useEmblaCarousel.ts"],"sourcesContent":["import { useControllableState } from '@fluentui/react-utilities';\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 { CarouselUpdateData, CarouselVisibilityEventDetail } from '../Carousel';\nimport Autoplay from 'embla-carousel-autoplay';\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) {\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 },\n) {\n const { align, direction, loop, slidesToScroll, watchDrag, containScroll } = options;\n const [activeIndex, setActiveIndex] = useControllableState({\n defaultState: options.defaultActiveIndex,\n state: options.activeIndex,\n initialState: 0,\n });\n\n const emblaOptions = React.useRef<EmblaOptionsType>({\n align,\n direction,\n loop,\n slidesToScroll,\n startIndex: activeIndex,\n watchDrag,\n containScroll,\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 /* Our autoplay button, which is required by standards for autoplay to be enabled, will handle controlled state */\n const enableAutoplay = React.useCallback(\n (autoplay: boolean) => {\n autoplayRef.current = autoplay;\n if (autoplay) {\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 {\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 containerRef: React.RefObject<HTMLDivElement> = React.useMemo(() => {\n let currentElement: HTMLDivElement | null = null;\n\n const handleIndexChange = () => {\n const newIndex = emblaApi.current?.selectedScrollSnap() ?? 0;\n const slides = emblaApi.current?.slideNodes();\n const actualIndex = emblaApi.current?.internalEngine().slideRegistry[newIndex][0] ?? 0;\n // We set the active or first index of group on-screen as the selected tabster index\n slides?.forEach((slide, slideIndex) => {\n setTabsterDefault(slide, slideIndex === actualIndex);\n });\n setActiveIndex(newIndex);\n };\n const handleReinit = () => {\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\n const data: CarouselUpdateData = {\n navItemsCount,\n activeIndex: emblaApi.current?.selectedScrollSnap() ?? 0,\n groupIndexList,\n slideNodes: nodes,\n };\n\n for (const listener of listeners.current) {\n listener(data);\n }\n };\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 return {\n set current(newElement: HTMLDivElement | null) {\n if (currentElement) {\n emblaApi.current?.off('slidesInView', handleVisibilityChange);\n emblaApi.current?.off('select', handleIndexChange);\n emblaApi.current?.off('reInit', handleReinit);\n emblaApi.current?.destroy();\n }\n\n if (newElement) {\n currentElement = newElement;\n emblaApi.current = EmblaCarousel(\n newElement,\n {\n ...DEFAULT_EMBLA_OPTIONS,\n ...emblaOptions.current,\n },\n [\n Autoplay({\n playOnInit: autoplayRef.current,\n stopOnInteraction: !autoplayRef.current,\n stopOnMouseEnter: true,\n stopOnFocusIn: true,\n rootNode: (emblaRoot: HTMLElement) => {\n return emblaRoot.querySelector(sliderClassname) ?? emblaRoot;\n },\n }),\n ],\n );\n\n emblaApi.current?.on('reInit', handleReinit);\n emblaApi.current?.on('slidesInView', handleVisibilityChange);\n emblaApi.current?.on('select', handleIndexChange);\n }\n },\n };\n }, [setActiveIndex]);\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 currentActiveIndex = emblaApi.current?.selectedScrollSnap() ?? 0;\n\n if (activeIndex !== currentActiveIndex) {\n emblaApi.current?.scrollTo(activeIndex);\n }\n }, [activeIndex]);\n\n React.useEffect(() => {\n emblaOptions.current = { align, direction, loop, slidesToScroll, watchDrag, containScroll };\n emblaApi.current?.reInit(\n {\n ...DEFAULT_EMBLA_OPTIONS,\n ...emblaOptions.current,\n },\n [\n Autoplay({\n playOnInit: autoplayRef.current,\n stopOnInteraction: !autoplayRef.current,\n stopOnMouseEnter: true,\n stopOnFocusIn: true,\n rootNode: (emblaRoot: HTMLElement) => {\n return emblaRoot.querySelector(sliderClassname) ?? emblaRoot;\n },\n }),\n ],\n );\n }, [align, direction, loop, slidesToScroll, watchDrag, containScroll]);\n\n return {\n activeIndex,\n carouselApi,\n containerRef,\n subscribeForValues,\n enableAutoplay,\n resetAutoplay,\n };\n}\n"],"names":["EMBLA_VISIBILITY_EVENT","setTabsterDefault","useEmblaCarousel","sliderClassname","carouselSliderClassNames","root","DEFAULT_EMBLA_OPTIONS","containScroll","inViewThreshold","watchDrag","skipSnaps","container","slides","carouselCardClassNames","element","isDefault","tabsterAttr","getAttribute","tabsterAttributes","JSON","parse","focusable","setAttribute","stringify","options","align","direction","loop","slidesToScroll","activeIndex","setActiveIndex","useControllableState","defaultState","defaultActiveIndex","state","initialState","emblaOptions","React","useRef","startIndex","emblaApi","autoplayRef","resetAutoplay","useCallback","current","plugins","autoplay","reset","enableAutoplay","play","stop","listeners","Set","subscribeForValues","listener","add","delete","containerRef","useMemo","currentElement","handleIndexChange","newIndex","selectedScrollSnap","slideNodes","actualIndex","internalEngine","slideRegistry","forEach","slide","slideIndex","handleReinit","nodes","groupIndexList","navItemsCount","length","data","handleVisibilityChange","cardElements","visibleIndexes","slidesInView","cardElement","index","dispatchEvent","CustomEvent","bubbles","detail","isVisible","includes","newElement","off","destroy","EmblaCarousel","Autoplay","playOnInit","stopOnInteraction","stopOnMouseEnter","stopOnFocusIn","rootNode","emblaRoot","querySelector","on","carouselApi","scrollToElement","jump","cardIndex","indexOf","groupIndex","findIndex","group","indexFocus","scrollTo","scrollToIndex","scrollInDirection","dir","scrollPrev","scrollNext","useEffect","currentActiveIndex","reInit"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAqBaA,sBAAAA;eAAAA;;IAEGC,iBAAAA;eAAAA;;IAaAC,gBAAAA;eAAAA;;;;;gCApCqB;wEACwC;iEACtD;6CAEgB;+CACE;gFAEpB;AAErB,MAAMC,kBAAkB,CAAC,CAAC,EAAEC,uDAAAA,CAAyBC,IAAI,CAAC,CAAC;AAE3D,MAAMC,wBAA0C;IAC9CC,eAAe;IACfC,iBAAiB;IACjBC,WAAW;IACXC,WAAW;IAEXC,WAAWR;IACXS,QAAQ,CAAC,CAAC,EAAEC,mDAAAA,CAAuBR,IAAI,CAAC,CAAC;AAC3C;AAEO,MAAML,yBAAyB;AAE/B,SAASC,kBAAkBa,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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F,GAAG;QAACA;KAAY;IAEhBQ,OAAM+E,SAAS,CAAC;YAEd5E;QADAJ,aAAaQ,OAAO,GAAG;YAAEnB;YAAOC;YAAWC;YAAMC;YAAgBnB;YAAWF;QAAc;QAC1FiC,CAAAA,oBAAAA,SAASI,OAAO,AAAPA,MAAO,QAAhBJ,sBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,kBAAkB8E,MAAM,CACtB;YACE,GAAGhH,qBAAqB;YACxB,GAAG8B,aAAaQ,OAAO;QACzB,GACA;YACEgD,IAAAA,8BAAAA,EAAS;gBACPC,YAAYpD,YAAYG,OAAO;gBAC/BkD,mBAAmB,CAACrD,YAAYG,OAAO;gBACvCmD,kBAAkB;gBAClBC,eAAe;gBACfC,UAAU,CAACC;wBACFA;oBAAP,OAAOA,CAAAA,2BAAAA,UAAUC,aAAa,CAAChG,gBAAAA,MAAAA,QAAxB+F,6BAAAA,KAAAA,IAAAA,2BAA4CA;gBACrD;YACF;SACD;IAEL,GAAG;QAACzE;QAAOC;QAAWC;QAAMC;QAAgBnB;QAAWF;KAAc;IAErE,OAAO;QACLsB;QACAwE;QACA5C;QACAJ;QACAL;QACAN;IACF;AACF"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Carousel: function() {
|
|
13
|
+
return _Carousel.Carousel;
|
|
14
|
+
},
|
|
15
|
+
CarouselAutoplayButton: function() {
|
|
16
|
+
return _CarouselAutoplayButton.CarouselAutoplayButton;
|
|
17
|
+
},
|
|
18
|
+
CarouselButton: function() {
|
|
19
|
+
return _CarouselButton.CarouselButton;
|
|
20
|
+
},
|
|
21
|
+
CarouselCard: function() {
|
|
22
|
+
return _CarouselCard.CarouselCard;
|
|
23
|
+
},
|
|
24
|
+
CarouselNav: function() {
|
|
25
|
+
return _CarouselNav.CarouselNav;
|
|
26
|
+
},
|
|
27
|
+
CarouselNavButton: function() {
|
|
28
|
+
return _CarouselNavButton.CarouselNavButton;
|
|
29
|
+
},
|
|
30
|
+
CarouselNavContainer: function() {
|
|
31
|
+
return _CarouselNavContainer.CarouselNavContainer;
|
|
32
|
+
},
|
|
33
|
+
CarouselNavImageButton: function() {
|
|
34
|
+
return _CarouselNavImageButton.CarouselNavImageButton;
|
|
35
|
+
},
|
|
36
|
+
CarouselProvider: function() {
|
|
37
|
+
return _CarouselContext.CarouselProvider;
|
|
38
|
+
},
|
|
39
|
+
CarouselSlider: function() {
|
|
40
|
+
return _CarouselSlider.CarouselSlider;
|
|
41
|
+
},
|
|
42
|
+
carouselAutoplayButtonClassNames: function() {
|
|
43
|
+
return _CarouselAutoplayButton.carouselAutoplayButtonClassNames;
|
|
44
|
+
},
|
|
45
|
+
carouselButtonClassNames: function() {
|
|
46
|
+
return _CarouselButton.carouselButtonClassNames;
|
|
47
|
+
},
|
|
48
|
+
carouselCardClassNames: function() {
|
|
49
|
+
return _CarouselCard.carouselCardClassNames;
|
|
50
|
+
},
|
|
51
|
+
carouselClassNames: function() {
|
|
52
|
+
return _Carousel.carouselClassNames;
|
|
53
|
+
},
|
|
54
|
+
carouselContextDefaultValue: function() {
|
|
55
|
+
return _CarouselContext.carouselContextDefaultValue;
|
|
56
|
+
},
|
|
57
|
+
carouselNavButtonClassNames: function() {
|
|
58
|
+
return _CarouselNavButton.carouselNavButtonClassNames;
|
|
59
|
+
},
|
|
60
|
+
carouselNavClassNames: function() {
|
|
61
|
+
return _CarouselNav.carouselNavClassNames;
|
|
62
|
+
},
|
|
63
|
+
carouselNavContainerClassNames: function() {
|
|
64
|
+
return _CarouselNavContainer.carouselNavContainerClassNames;
|
|
65
|
+
},
|
|
66
|
+
carouselNavImageButtonClassNames: function() {
|
|
67
|
+
return _CarouselNavImageButton.carouselNavImageButtonClassNames;
|
|
68
|
+
},
|
|
69
|
+
carouselSliderClassNames: function() {
|
|
70
|
+
return _CarouselSlider.carouselSliderClassNames;
|
|
71
|
+
},
|
|
72
|
+
renderCarouselAutoplayButton_unstable: function() {
|
|
73
|
+
return _CarouselAutoplayButton.renderCarouselAutoplayButton_unstable;
|
|
74
|
+
},
|
|
75
|
+
renderCarouselButton_unstable: function() {
|
|
76
|
+
return _CarouselButton.renderCarouselButton_unstable;
|
|
77
|
+
},
|
|
78
|
+
renderCarouselCard_unstable: function() {
|
|
79
|
+
return _CarouselCard.renderCarouselCard_unstable;
|
|
80
|
+
},
|
|
81
|
+
renderCarouselNavButton_unstable: function() {
|
|
82
|
+
return _CarouselNavButton.renderCarouselNavButton_unstable;
|
|
83
|
+
},
|
|
84
|
+
renderCarouselNavContainer_unstable: function() {
|
|
85
|
+
return _CarouselNavContainer.renderCarouselNavContainer_unstable;
|
|
86
|
+
},
|
|
87
|
+
renderCarouselNavImageButton_unstable: function() {
|
|
88
|
+
return _CarouselNavImageButton.renderCarouselNavImageButton_unstable;
|
|
89
|
+
},
|
|
90
|
+
renderCarouselNav_unstable: function() {
|
|
91
|
+
return _CarouselNav.renderCarouselNav_unstable;
|
|
92
|
+
},
|
|
93
|
+
renderCarouselSlider_unstable: function() {
|
|
94
|
+
return _CarouselSlider.renderCarouselSlider_unstable;
|
|
95
|
+
},
|
|
96
|
+
renderCarousel_unstable: function() {
|
|
97
|
+
return _Carousel.renderCarousel_unstable;
|
|
98
|
+
},
|
|
99
|
+
useCarouselAutoplayButtonStyles_unstable: function() {
|
|
100
|
+
return _CarouselAutoplayButton.useCarouselAutoplayButtonStyles_unstable;
|
|
101
|
+
},
|
|
102
|
+
useCarouselAutoplayButton_unstable: function() {
|
|
103
|
+
return _CarouselAutoplayButton.useCarouselAutoplayButton_unstable;
|
|
104
|
+
},
|
|
105
|
+
useCarouselButtonStyles_unstable: function() {
|
|
106
|
+
return _CarouselButton.useCarouselButtonStyles_unstable;
|
|
107
|
+
},
|
|
108
|
+
useCarouselButton_unstable: function() {
|
|
109
|
+
return _CarouselButton.useCarouselButton_unstable;
|
|
110
|
+
},
|
|
111
|
+
useCarouselCardStyles_unstable: function() {
|
|
112
|
+
return _CarouselCard.useCarouselCardStyles_unstable;
|
|
113
|
+
},
|
|
114
|
+
useCarouselCard_unstable: function() {
|
|
115
|
+
return _CarouselCard.useCarouselCard_unstable;
|
|
116
|
+
},
|
|
117
|
+
useCarouselContext_unstable: function() {
|
|
118
|
+
return _CarouselContext.useCarouselContext_unstable;
|
|
119
|
+
},
|
|
120
|
+
useCarouselNavButtonStyles_unstable: function() {
|
|
121
|
+
return _CarouselNavButton.useCarouselNavButtonStyles_unstable;
|
|
122
|
+
},
|
|
123
|
+
useCarouselNavButton_unstable: function() {
|
|
124
|
+
return _CarouselNavButton.useCarouselNavButton_unstable;
|
|
125
|
+
},
|
|
126
|
+
useCarouselNavContainerStyles_unstable: function() {
|
|
127
|
+
return _CarouselNavContainer.useCarouselNavContainerStyles_unstable;
|
|
128
|
+
},
|
|
129
|
+
useCarouselNavContainer_unstable: function() {
|
|
130
|
+
return _CarouselNavContainer.useCarouselNavContainer_unstable;
|
|
131
|
+
},
|
|
132
|
+
useCarouselNavImageButtonStyles_unstable: function() {
|
|
133
|
+
return _CarouselNavImageButton.useCarouselNavImageButtonStyles_unstable;
|
|
134
|
+
},
|
|
135
|
+
useCarouselNavImageButton_unstable: function() {
|
|
136
|
+
return _CarouselNavImageButton.useCarouselNavImageButton_unstable;
|
|
137
|
+
},
|
|
138
|
+
useCarouselNavStyles_unstable: function() {
|
|
139
|
+
return _CarouselNav.useCarouselNavStyles_unstable;
|
|
140
|
+
},
|
|
141
|
+
useCarouselNav_unstable: function() {
|
|
142
|
+
return _CarouselNav.useCarouselNav_unstable;
|
|
143
|
+
},
|
|
144
|
+
useCarouselSliderStyles_unstable: function() {
|
|
145
|
+
return _CarouselSlider.useCarouselSliderStyles_unstable;
|
|
146
|
+
},
|
|
147
|
+
useCarouselSlider_unstable: function() {
|
|
148
|
+
return _CarouselSlider.useCarouselSlider_unstable;
|
|
149
|
+
},
|
|
150
|
+
useCarouselStyles_unstable: function() {
|
|
151
|
+
return _Carousel.useCarouselStyles_unstable;
|
|
152
|
+
},
|
|
153
|
+
useCarousel_unstable: function() {
|
|
154
|
+
return _Carousel.useCarousel_unstable;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
const _CarouselButton = require("./CarouselButton");
|
|
158
|
+
const _CarouselNav = require("./CarouselNav");
|
|
159
|
+
const _CarouselNavButton = require("./CarouselNavButton");
|
|
160
|
+
const _Carousel = require("./Carousel");
|
|
161
|
+
const _CarouselCard = require("./CarouselCard");
|
|
162
|
+
const _CarouselAutoplayButton = require("./CarouselAutoplayButton");
|
|
163
|
+
const _CarouselNavImageButton = require("./CarouselNavImageButton");
|
|
164
|
+
const _CarouselSlider = require("./CarouselSlider");
|
|
165
|
+
const _CarouselNavContainer = require("./CarouselNavContainer");
|
|
166
|
+
const _CarouselContext = require("./CarouselContext");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { CarouselButtonProps, CarouselButtonSlots, CarouselButtonState } from './CarouselButton';\nexport {\n CarouselButton,\n carouselButtonClassNames,\n renderCarouselButton_unstable,\n useCarouselButtonStyles_unstable,\n useCarouselButton_unstable,\n} from './CarouselButton';\nexport type { CarouselNavProps, CarouselNavSlots, CarouselNavState, NavButtonRenderFunction } from './CarouselNav';\nexport {\n CarouselNav,\n carouselNavClassNames,\n renderCarouselNav_unstable,\n useCarouselNavStyles_unstable,\n useCarouselNav_unstable,\n} from './CarouselNav';\nexport type { CarouselNavButtonProps, CarouselNavButtonSlots, CarouselNavButtonState } from './CarouselNavButton';\nexport {\n CarouselNavButton,\n carouselNavButtonClassNames,\n renderCarouselNavButton_unstable,\n useCarouselNavButtonStyles_unstable,\n useCarouselNavButton_unstable,\n} from './CarouselNavButton';\nexport type { CarouselProps, CarouselSlots, CarouselState, CarouselAnnouncerFunction } from './Carousel';\nexport {\n Carousel,\n carouselClassNames,\n renderCarousel_unstable,\n useCarouselStyles_unstable,\n useCarousel_unstable,\n} from './Carousel';\nexport type { CarouselCardProps, CarouselCardSlots, CarouselCardState } from './CarouselCard';\nexport {\n CarouselCard,\n carouselCardClassNames,\n renderCarouselCard_unstable,\n useCarouselCardStyles_unstable,\n useCarouselCard_unstable,\n} from './CarouselCard';\nexport type {\n CarouselAutoplayButtonProps,\n CarouselAutoplayButtonSlots,\n CarouselAutoplayButtonState,\n} from './CarouselAutoplayButton';\nexport {\n CarouselAutoplayButton,\n carouselAutoplayButtonClassNames,\n renderCarouselAutoplayButton_unstable,\n useCarouselAutoplayButtonStyles_unstable,\n useCarouselAutoplayButton_unstable,\n} from './CarouselAutoplayButton';\nexport type {\n CarouselNavImageButtonProps,\n CarouselNavImageButtonSlots,\n CarouselNavImageButtonState,\n} from './CarouselNavImageButton';\nexport {\n CarouselNavImageButton,\n carouselNavImageButtonClassNames,\n renderCarouselNavImageButton_unstable,\n useCarouselNavImageButtonStyles_unstable,\n useCarouselNavImageButton_unstable,\n} from './CarouselNavImageButton';\nexport {\n CarouselSlider,\n carouselSliderClassNames,\n renderCarouselSlider_unstable,\n useCarouselSliderStyles_unstable,\n useCarouselSlider_unstable,\n} from './CarouselSlider';\nexport type { CarouselSliderProps, CarouselSliderSlots, CarouselSliderState } from './CarouselSlider';\nexport type {\n CarouselNavContainerProps,\n CarouselNavContainerSlots,\n CarouselNavContainerState,\n} from './CarouselNavContainer';\nexport {\n CarouselNavContainer,\n carouselNavContainerClassNames,\n renderCarouselNavContainer_unstable,\n useCarouselNavContainerStyles_unstable,\n useCarouselNavContainer_unstable,\n} from './CarouselNavContainer';\nexport { carouselContextDefaultValue, CarouselProvider, useCarouselContext_unstable } from './CarouselContext';\nexport type { CarouselIndexChangeData, CarouselContextValue, CarouselContextValues } from './CarouselContext';\n"],"names":["Carousel","CarouselAutoplayButton","CarouselButton","CarouselCard","CarouselNav","CarouselNavButton","CarouselNavContainer","CarouselNavImageButton","CarouselProvider","CarouselSlider","carouselAutoplayButtonClassNames","carouselButtonClassNames","carouselCardClassNames","carouselClassNames","carouselContextDefaultValue","carouselNavButtonClassNames","carouselNavClassNames","carouselNavContainerClassNames","carouselNavImageButtonClassNames","carouselSliderClassNames","renderCarouselAutoplayButton_unstable","renderCarouselButton_unstable","renderCarouselCard_unstable","renderCarouselNavButton_unstable","renderCarouselNavContainer_unstable","renderCarouselNavImageButton_unstable","renderCarouselNav_unstable","renderCarouselSlider_unstable","renderCarousel_unstable","useCarouselAutoplayButtonStyles_unstable","useCarouselAutoplayButton_unstable","useCarouselButtonStyles_unstable","useCarouselButton_unstable","useCarouselCardStyles_unstable","useCarouselCard_unstable","useCarouselContext_unstable","useCarouselNavButtonStyles_unstable","useCarouselNavButton_unstable","useCarouselNavContainerStyles_unstable","useCarouselNavContainer_unstable","useCarouselNavImageButtonStyles_unstable","useCarouselNavImageButton_unstable","useCarouselNavStyles_unstable","useCarouselNav_unstable","useCarouselSliderStyles_unstable","useCarouselSlider_unstable","useCarouselStyles_unstable","useCarousel_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IA0BEA,QAAQ;eAARA,kBAAQ;;IAoBRC,sBAAsB;eAAtBA,8CAAsB;;IA5CtBC,cAAc;eAAdA,8BAAc;;IAgCdC,YAAY;eAAZA,0BAAY;;IAxBZC,WAAW;eAAXA,wBAAW;;IAQXC,iBAAiB;eAAjBA,oCAAiB;;IA4DjBC,oBAAoB;eAApBA,0CAAoB;;IApBpB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AA6B;eAA7BA,0CAA6B;;IAC7BC,uBAAuB;eAAvBA,oCAAuB;;IAsDvBC,gCAAgC;eAAhCA,gDAAgC;;IAChCC,0BAA0B;eAA1BA,0CAA0B;;IAxC1BC,0BAA0B;eAA1BA,oCAA0B;;IAC1BC,oBAAoB;eAApBA,8BAAoB;;;gCAvBf;6BAQA;mCAQA;0BAQA;8BAQA;wCAYA;wCAYA;gCAOA;sCAaA;iCACoF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fluentui/react-carousel",
|
|
3
|
+
"version": "0.0.0-nightly-20241008-0405.1",
|
|
4
|
+
"description": "A composable carousel component that enables pagination with minimal rerenders",
|
|
5
|
+
"main": "lib-commonjs/index.js",
|
|
6
|
+
"module": "lib/index.js",
|
|
7
|
+
"typings": "./dist/index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"files": [
|
|
10
|
+
"*.md",
|
|
11
|
+
"dist/*.d.ts",
|
|
12
|
+
"lib",
|
|
13
|
+
"lib-commonjs"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/microsoft/fluentui"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "just-scripts build",
|
|
22
|
+
"clean": "just-scripts clean",
|
|
23
|
+
"generate-api": "just-scripts generate-api",
|
|
24
|
+
"lint": "just-scripts lint",
|
|
25
|
+
"start": "yarn storybook",
|
|
26
|
+
"storybook": "yarn --cwd ../stories storybook",
|
|
27
|
+
"test": "jest --passWithNoTests",
|
|
28
|
+
"type-check": "just-scripts type-check"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@fluentui/eslint-plugin": "*",
|
|
32
|
+
"@fluentui/react-conformance": "0.0.0-nightly-20241008-0405.1",
|
|
33
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20241008-0405.1",
|
|
34
|
+
"@fluentui/scripts-api-extractor": "*",
|
|
35
|
+
"@fluentui/scripts-tasks": "*"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@fluentui/react-aria": "0.0.0-nightly-20241008-0405.1",
|
|
39
|
+
"@fluentui/react-button": "0.0.0-nightly-20241008-0405.1",
|
|
40
|
+
"@fluentui/react-context-selector": "0.0.0-nightly-20241008-0405.1",
|
|
41
|
+
"@fluentui/react-icons": "^2.0.245",
|
|
42
|
+
"@fluentui/react-jsx-runtime": "0.0.0-nightly-20241008-0405.1",
|
|
43
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20241008-0405.1",
|
|
44
|
+
"@fluentui/react-tabster": "0.0.0-nightly-20241008-0405.1",
|
|
45
|
+
"@fluentui/react-theme": "0.0.0-nightly-20241008-0405.1",
|
|
46
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20241008-0405.1",
|
|
47
|
+
"@griffel/react": "^1.5.22",
|
|
48
|
+
"@swc/helpers": "^0.5.1",
|
|
49
|
+
"embla-carousel": "^8.3.0",
|
|
50
|
+
"embla-carousel-autoplay": "^8.3.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@types/react": ">=16.14.0 <19.0.0",
|
|
54
|
+
"@types/react-dom": ">=16.9.0 <19.0.0",
|
|
55
|
+
"react": ">=16.14.0 <19.0.0",
|
|
56
|
+
"react-dom": ">=16.14.0 <19.0.0"
|
|
57
|
+
},
|
|
58
|
+
"exports": {
|
|
59
|
+
".": {
|
|
60
|
+
"types": "./dist/index.d.ts",
|
|
61
|
+
"node": "./lib-commonjs/index.js",
|
|
62
|
+
"import": "./lib/index.js",
|
|
63
|
+
"require": "./lib-commonjs/index.js"
|
|
64
|
+
},
|
|
65
|
+
"./package.json": "./package.json"
|
|
66
|
+
},
|
|
67
|
+
"beachball": {}
|
|
68
|
+
}
|