@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.
@@ -10582,11 +10582,11 @@ var defaultCarouselSlideTranslationType = {
10582
10582
  var CarouselSlide = (0, import_react24.forwardRef)(
10583
10583
  function CarouselSlide2({
10584
10584
  index,
10585
+ isSelected,
10585
10586
  ...props
10586
10587
  }, ref) {
10587
10588
  const translation = useTranslation([defaultCarouselSlideTranslationType]);
10588
- const { id, currentIndex, slideCount } = useCarouselContext();
10589
- const isSelected = currentIndex === index;
10589
+ const { id, slideCount } = useCarouselContext();
10590
10590
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
10591
10591
  "div",
10592
10592
  {
@@ -10634,8 +10634,9 @@ var Carousel = ({
10634
10634
  dots = true,
10635
10635
  blurColor = "from-background",
10636
10636
  heightClassName = "h-96",
10637
- widthClassName = "w-[70%] desktop:w-1/2",
10637
+ slideClassName = "w-[70%] desktop:w-1/2",
10638
10638
  slideContainerProps,
10639
+ onSlideChanged,
10639
10640
  ...props
10640
10641
  }) => {
10641
10642
  const translation = useTranslation([defaultCarouselTranslationType]);
@@ -10749,6 +10750,9 @@ var Carousel = ({
10749
10750
  (0, import_react24.useEffect)(() => {
10750
10751
  setDisableClick(!dragState);
10751
10752
  }, [dragState]);
10753
+ (0, import_react24.useEffect)(() => {
10754
+ onSlideChanged?.(currentIndex);
10755
+ }, [currentIndex]);
10752
10756
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CarouselContext.Provider, { value: { id, currentIndex, slideCount: length, isLooping }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
10753
10757
  "div",
10754
10758
  {
@@ -10784,9 +10788,10 @@ var Carousel = ({
10784
10788
  {
10785
10789
  ref: isInItems ? slideRefs[index] : void 0,
10786
10790
  index,
10791
+ isSelected: isInItems && currentIndex === index,
10787
10792
  className: (0, import_clsx20.default)(
10788
10793
  `absolute left-[50%] h-full overflow-hidden transition-transform ease-in-out`,
10789
- widthClassName
10794
+ slideClassName
10790
10795
  ),
10791
10796
  onClick: () => !disableClick && setCurrentIndex(index),
10792
10797
  style: {