@helpwave/hightide 0.1.38 → 0.1.39

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/dist/index.mjs CHANGED
@@ -10826,6 +10826,7 @@ var Carousel = ({
10826
10826
  heightClassName = "h-96",
10827
10827
  widthClassName = "w-[70%] desktop:w-1/2",
10828
10828
  slideContainerProps,
10829
+ onSlideChanged,
10829
10830
  ...props
10830
10831
  }) => {
10831
10832
  const translation = useTranslation([defaultCarouselTranslationType]);
@@ -10939,6 +10940,9 @@ var Carousel = ({
10939
10940
  useEffect18(() => {
10940
10941
  setDisableClick(!dragState);
10941
10942
  }, [dragState]);
10943
+ useEffect18(() => {
10944
+ onSlideChanged?.(currentIndex);
10945
+ }, [currentIndex]);
10942
10946
  return /* @__PURE__ */ jsx31(CarouselContext.Provider, { value: { id, currentIndex, slideCount: length, isLooping }, children: /* @__PURE__ */ jsxs17(
10943
10947
  "div",
10944
10948
  {