@helpwave/hightide 0.1.38 → 0.1.40

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.
@@ -10483,11 +10483,11 @@ var defaultCarouselSlideTranslationType = {
10483
10483
  var CarouselSlide = forwardRef8(
10484
10484
  function CarouselSlide2({
10485
10485
  index,
10486
+ isSelected,
10486
10487
  ...props
10487
10488
  }, ref) {
10488
10489
  const translation = useTranslation([defaultCarouselSlideTranslationType]);
10489
- const { id, currentIndex, slideCount } = useCarouselContext();
10490
- const isSelected = currentIndex === index;
10490
+ const { id, slideCount } = useCarouselContext();
10491
10491
  return /* @__PURE__ */ jsx31(
10492
10492
  "div",
10493
10493
  {
@@ -10535,8 +10535,9 @@ var Carousel = ({
10535
10535
  dots = true,
10536
10536
  blurColor = "from-background",
10537
10537
  heightClassName = "h-96",
10538
- widthClassName = "w-[70%] desktop:w-1/2",
10538
+ slideClassName = "w-[70%] desktop:w-1/2",
10539
10539
  slideContainerProps,
10540
+ onSlideChanged,
10540
10541
  ...props
10541
10542
  }) => {
10542
10543
  const translation = useTranslation([defaultCarouselTranslationType]);
@@ -10650,6 +10651,9 @@ var Carousel = ({
10650
10651
  useEffect18(() => {
10651
10652
  setDisableClick(!dragState);
10652
10653
  }, [dragState]);
10654
+ useEffect18(() => {
10655
+ onSlideChanged?.(currentIndex);
10656
+ }, [currentIndex]);
10653
10657
  return /* @__PURE__ */ jsx31(CarouselContext.Provider, { value: { id, currentIndex, slideCount: length, isLooping }, children: /* @__PURE__ */ jsxs17(
10654
10658
  "div",
10655
10659
  {
@@ -10685,9 +10689,10 @@ var Carousel = ({
10685
10689
  {
10686
10690
  ref: isInItems ? slideRefs[index] : void 0,
10687
10691
  index,
10692
+ isSelected: isInItems && currentIndex === index,
10688
10693
  className: clsx20(
10689
10694
  `absolute left-[50%] h-full overflow-hidden transition-transform ease-in-out`,
10690
- widthClassName
10695
+ slideClassName
10691
10696
  ),
10692
10697
  onClick: () => !disableClick && setCurrentIndex(index),
10693
10698
  style: {