@underverse-ui/underverse 1.0.60 → 1.0.62

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "package": "@underverse-ui/underverse",
3
- "version": "1.0.60",
3
+ "version": "1.0.62",
4
4
  "sourceEntry": "src/index.ts",
5
- "totalExports": 215,
5
+ "totalExports": 217,
6
6
  "exports": [
7
7
  {
8
8
  "name": "*",
@@ -273,6 +273,20 @@
273
273
  "reexport": true,
274
274
  "local": false
275
275
  },
276
+ {
277
+ "name": "CarouselEffectOptions",
278
+ "kind": "type",
279
+ "source": "./components/Carousel",
280
+ "reexport": true,
281
+ "local": false
282
+ },
283
+ {
284
+ "name": "CarouselEffectPreset",
285
+ "kind": "type",
286
+ "source": "./components/Carousel",
287
+ "reexport": true,
288
+ "local": false
289
+ },
276
290
  {
277
291
  "name": "Category",
278
292
  "kind": "type",
package/dist/index.cjs CHANGED
@@ -3717,29 +3717,25 @@ var ToastComponent = ({ toast, onRemove }) => {
3717
3717
  icon: import_lucide_react7.CheckCircle,
3718
3718
  containerClassName: "bg-success/5 border-success/30",
3719
3719
  iconClassName: "text-success",
3720
- iconBgClassName: "bg-success/15",
3721
- accentBarClassName: "bg-success"
3720
+ iconBgClassName: "bg-success/15"
3722
3721
  },
3723
3722
  error: {
3724
3723
  icon: import_lucide_react7.AlertCircle,
3725
3724
  containerClassName: "bg-destructive/5 border-destructive/30",
3726
3725
  iconClassName: "text-destructive",
3727
- iconBgClassName: "bg-destructive/15",
3728
- accentBarClassName: "bg-destructive"
3726
+ iconBgClassName: "bg-destructive/15"
3729
3727
  },
3730
3728
  warning: {
3731
3729
  icon: import_lucide_react7.AlertTriangle,
3732
3730
  containerClassName: "bg-warning/5 border-warning/30",
3733
3731
  iconClassName: "text-warning",
3734
- iconBgClassName: "bg-warning/15",
3735
- accentBarClassName: "bg-warning"
3732
+ iconBgClassName: "bg-warning/15"
3736
3733
  },
3737
3734
  info: {
3738
3735
  icon: import_lucide_react7.Info,
3739
3736
  containerClassName: "bg-info/5 border-info/30",
3740
3737
  iconClassName: "text-info",
3741
- iconBgClassName: "bg-info/15",
3742
- accentBarClassName: "bg-info"
3738
+ iconBgClassName: "bg-info/15"
3743
3739
  }
3744
3740
  };
3745
3741
  const config = typeConfig[toast.type];
@@ -3748,7 +3744,7 @@ var ToastComponent = ({ toast, onRemove }) => {
3748
3744
  "div",
3749
3745
  {
3750
3746
  className: cn(
3751
- "relative w-80 rounded-r-xl border border-l-0 backdrop-blur-md transition-all duration-300 pointer-events-auto overflow-hidden",
3747
+ "relative w-80 rounded-xl border backdrop-blur-md transition-all duration-300 pointer-events-auto overflow-hidden",
3752
3748
  "bg-card shadow-xl",
3753
3749
  "animate-in slide-in-from-right-full",
3754
3750
  config.containerClassName,
@@ -3769,8 +3765,7 @@ var ToastComponent = ({ toast, onRemove }) => {
3769
3765
  setPaused(false);
3770
3766
  },
3771
3767
  children: [
3772
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: cn("absolute left-0 top-0 bottom-0 w-1", config.accentBarClassName) }),
3773
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-start gap-3 p-4 pl-5", children: [
3768
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-start gap-3 p-4", children: [
3774
3769
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: cn("flex items-center justify-center w-8 h-8 rounded-full shrink-0", config.iconBgClassName), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { className: cn("h-4 w-4", config.iconClassName) }) }),
3775
3770
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex-1 space-y-1", children: [
3776
3771
  toast.title && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h4", { className: "font-medium text-sm leading-none", children: toast.title }),
@@ -16353,20 +16348,92 @@ function Carousel({
16353
16348
  slideClassName,
16354
16349
  onSlideChange,
16355
16350
  thumbnailRenderer,
16356
- ariaLabel = "Carousel"
16351
+ ariaLabel = "Carousel",
16352
+ effectPreset,
16353
+ effectOptions
16357
16354
  }) {
16358
16355
  const [currentIndex, setCurrentIndex] = React42.useState(0);
16359
16356
  const [isPaused, setIsPaused] = React42.useState(false);
16360
- const [isDragging, setIsDragging] = React42.useState(false);
16361
- const [startPos, setStartPos] = React42.useState(0);
16362
- const [currentTranslate, setCurrentTranslate] = React42.useState(0);
16363
- const [prevTranslate, setPrevTranslate] = React42.useState(0);
16364
16357
  const progressElRef = React42.useRef(null);
16365
16358
  const carouselRef = React42.useRef(null);
16366
16359
  const rafRef = React42.useRef(null);
16367
- const totalSlides = React42.Children.count(children);
16368
- const maxIndex = Math.max(0, totalSlides - slidesToShow);
16360
+ const isDraggingRef = React42.useRef(false);
16361
+ const startPosRef = React42.useRef(0);
16362
+ const lastDragPositionRef = React42.useRef(0);
16363
+ const slides = React42.useMemo(() => React42.Children.toArray(children), [children]);
16364
+ const totalSlides = slides.length;
16369
16365
  const isHorizontal = orientation === "horizontal";
16366
+ const effectiveAnimation = slidesToShow > 1 && !["slide", "coverflow", "stack"].includes(animation) ? "slide" : animation;
16367
+ const isDeckAnimation = effectiveAnimation === "coverflow" || effectiveAnimation === "stack";
16368
+ const effectiveSlidesToShow = isDeckAnimation ? 1 : slidesToShow;
16369
+ const maxIndex = Math.max(0, totalSlides - effectiveSlidesToShow);
16370
+ const presetEffectOptions = React42.useMemo(() => {
16371
+ if (effectPreset === "cinematic") {
16372
+ return effectiveAnimation === "stack" ? {
16373
+ mainScale: 1.08,
16374
+ sideScale: 0.9,
16375
+ farScale: 0.84,
16376
+ sideOpacity: 0.68,
16377
+ farOpacity: 0.3,
16378
+ depthStep: 76,
16379
+ blur: 2.2,
16380
+ stackOffset: 16,
16381
+ stackLift: 16
16382
+ } : {
16383
+ mainScale: 1.12,
16384
+ sideScale: 0.82,
16385
+ farScale: 0.72,
16386
+ sideOpacity: 0.72,
16387
+ farOpacity: 0.24,
16388
+ sideOffset: 22,
16389
+ rotate: 20,
16390
+ depthStep: 120,
16391
+ blur: 2.6
16392
+ };
16393
+ }
16394
+ if (effectPreset === "gallery") {
16395
+ return effectiveAnimation === "stack" ? {
16396
+ mainScale: 1.03,
16397
+ sideScale: 0.94,
16398
+ farScale: 0.88,
16399
+ sideOpacity: 0.82,
16400
+ farOpacity: 0.5,
16401
+ depthStep: 50,
16402
+ blur: 0.8,
16403
+ stackOffset: 24,
16404
+ stackLift: 8
16405
+ } : {
16406
+ mainScale: 1.05,
16407
+ sideScale: 0.9,
16408
+ farScale: 0.82,
16409
+ sideOpacity: 0.84,
16410
+ farOpacity: 0.48,
16411
+ sideOffset: 30,
16412
+ rotate: 16,
16413
+ depthStep: 78,
16414
+ blur: 1
16415
+ };
16416
+ }
16417
+ return {};
16418
+ }, [effectPreset, effectiveAnimation]);
16419
+ const mergedEffectOptions = React42.useMemo(
16420
+ () => ({
16421
+ mainScale: 1.04,
16422
+ sideScale: effectiveAnimation === "stack" ? 0.93 : 0.88,
16423
+ farScale: effectiveAnimation === "stack" ? 0.86 : 0.76,
16424
+ sideOpacity: effectiveAnimation === "stack" ? 0.74 : 0.78,
16425
+ farOpacity: effectiveAnimation === "stack" ? 0.42 : 0.38,
16426
+ sideOffset: effectiveAnimation === "stack" ? 20 : 28,
16427
+ rotate: 24,
16428
+ depthStep: effectiveAnimation === "stack" ? 60 : 90,
16429
+ blur: 1.5,
16430
+ stackOffset: 20,
16431
+ stackLift: 12,
16432
+ ...presetEffectOptions,
16433
+ ...effectOptions
16434
+ }),
16435
+ [effectOptions, effectiveAnimation, presetEffectOptions]
16436
+ );
16370
16437
  const scrollPrev = React42.useCallback(() => {
16371
16438
  setCurrentIndex((prev) => {
16372
16439
  if (prev === 0) {
@@ -16389,8 +16456,8 @@ function Carousel({
16389
16456
  },
16390
16457
  [maxIndex]
16391
16458
  );
16392
- React42.useEffect(() => {
16393
- const handleKeyDown = (e) => {
16459
+ const handleKeyDown = React42.useCallback(
16460
+ (e) => {
16394
16461
  if (e.key === "ArrowLeft" || e.key === "ArrowUp") {
16395
16462
  e.preventDefault();
16396
16463
  scrollPrev();
@@ -16404,13 +16471,9 @@ function Carousel({
16404
16471
  e.preventDefault();
16405
16472
  scrollTo(maxIndex);
16406
16473
  }
16407
- };
16408
- const carousel = carouselRef.current;
16409
- if (carousel) {
16410
- carousel.addEventListener("keydown", handleKeyDown);
16411
- return () => carousel.removeEventListener("keydown", handleKeyDown);
16412
- }
16413
- }, [scrollPrev, scrollNext, scrollTo, maxIndex]);
16474
+ },
16475
+ [scrollPrev, scrollNext, scrollTo, maxIndex]
16476
+ );
16414
16477
  React42.useEffect(() => {
16415
16478
  const stop = () => {
16416
16479
  if (rafRef.current != null) {
@@ -16419,7 +16482,7 @@ function Carousel({
16419
16482
  }
16420
16483
  if (progressElRef.current) progressElRef.current.style.width = "0%";
16421
16484
  };
16422
- if (!autoScroll || isPaused || totalSlides <= slidesToShow) {
16485
+ if (!autoScroll || isPaused || totalSlides <= effectiveSlidesToShow) {
16423
16486
  stop();
16424
16487
  return;
16425
16488
  }
@@ -16438,7 +16501,7 @@ function Carousel({
16438
16501
  };
16439
16502
  rafRef.current = requestAnimationFrame(tick);
16440
16503
  return stop;
16441
- }, [autoScroll, isPaused, totalSlides, slidesToShow, autoScrollInterval, scrollNext]);
16504
+ }, [autoScroll, isPaused, totalSlides, effectiveSlidesToShow, autoScrollInterval, scrollNext]);
16442
16505
  const getPositionX = (event) => {
16443
16506
  return event.type.includes("mouse") ? event.pageX : event.touches[0].clientX;
16444
16507
  };
@@ -16446,60 +16509,100 @@ function Carousel({
16446
16509
  return event.type.includes("mouse") ? event.pageY : event.touches[0].clientY;
16447
16510
  };
16448
16511
  const touchStart = (event) => {
16449
- setIsDragging(true);
16512
+ isDraggingRef.current = true;
16450
16513
  const pos = isHorizontal ? getPositionX(event.nativeEvent) : getPositionY(event.nativeEvent);
16451
- setStartPos(pos);
16452
- setPrevTranslate(currentTranslate);
16514
+ startPosRef.current = pos;
16515
+ lastDragPositionRef.current = pos;
16453
16516
  };
16454
16517
  const touchMove = (event) => {
16455
- if (!isDragging) return;
16518
+ if (!isDraggingRef.current) return;
16456
16519
  const pos = isHorizontal ? getPositionX(event.nativeEvent) : getPositionY(event.nativeEvent);
16457
- const currentPosition = pos;
16458
- setCurrentTranslate(prevTranslate + currentPosition - startPos);
16520
+ lastDragPositionRef.current = pos;
16459
16521
  };
16460
16522
  const touchEnd = () => {
16461
- if (!isDragging) return;
16462
- setIsDragging(false);
16463
- const movedBy = currentTranslate - prevTranslate;
16523
+ if (!isDraggingRef.current) return;
16524
+ isDraggingRef.current = false;
16525
+ const movedBy = lastDragPositionRef.current - startPosRef.current;
16464
16526
  const threshold = 50;
16465
- if (movedBy < -threshold && currentIndex < maxIndex) {
16527
+ if (movedBy < -threshold) {
16466
16528
  scrollNext();
16467
- } else if (movedBy > threshold && currentIndex > 0) {
16529
+ } else if (movedBy > threshold) {
16468
16530
  scrollPrev();
16469
16531
  }
16470
- setCurrentTranslate(0);
16471
- setPrevTranslate(0);
16532
+ startPosRef.current = 0;
16533
+ lastDragPositionRef.current = 0;
16472
16534
  };
16473
16535
  React42.useEffect(() => {
16474
16536
  onSlideChange?.(currentIndex);
16475
16537
  }, [currentIndex, onSlideChange]);
16476
16538
  const getAnimationStyles2 = () => {
16477
- const baseTransform = isHorizontal ? `translateX(-${currentIndex * (100 / slidesToShow)}%)` : `translateY(-${currentIndex * (100 / slidesToShow)}%)`;
16478
- if (animation === "fade") {
16479
- return {
16480
- transition: "opacity 500ms ease-in-out"
16481
- };
16482
- }
16483
- if (animation === "scale") {
16484
- return {
16485
- transform: baseTransform,
16486
- transition: "transform 500ms ease-in-out, scale 500ms ease-in-out"
16487
- };
16539
+ if (effectiveAnimation !== "slide") {
16540
+ return {};
16488
16541
  }
16542
+ const baseTransform = isHorizontal ? `translateX(-${currentIndex * (100 / effectiveSlidesToShow)}%)` : `translateY(-${currentIndex * (100 / effectiveSlidesToShow)}%)`;
16489
16543
  return {
16490
16544
  transform: baseTransform,
16491
- transition: isDragging ? "none" : "transform 500ms ease-in-out"
16545
+ transition: "transform 500ms ease-in-out"
16492
16546
  };
16493
16547
  };
16494
- const slideWidth = 100 / slidesToShow;
16548
+ const slideWidth = 100 / effectiveSlidesToShow;
16549
+ const getLoopDistance = React42.useCallback(
16550
+ (index) => {
16551
+ if (totalSlides <= 0) return 0;
16552
+ const forward = index - currentIndex;
16553
+ if (!loop) return forward;
16554
+ const altForward = forward - totalSlides;
16555
+ const altBackward = forward + totalSlides;
16556
+ const candidates = [forward, altForward, altBackward];
16557
+ return candidates.reduce((best, candidate) => Math.abs(candidate) < Math.abs(best) ? candidate : best, candidates[0] ?? 0);
16558
+ },
16559
+ [currentIndex, loop, totalSlides]
16560
+ );
16561
+ const getDeckSlideStyles = React42.useCallback(
16562
+ (index) => {
16563
+ const distance = getLoopDistance(index);
16564
+ const absDistance = Math.abs(distance);
16565
+ const hidden = absDistance > 2;
16566
+ if (hidden) {
16567
+ return {
16568
+ opacity: 0,
16569
+ pointerEvents: "none",
16570
+ transform: `translate3d(0, 0, -${mergedEffectOptions.depthStep * 2}px) scale(${mergedEffectOptions.farScale})`,
16571
+ filter: `blur(${mergedEffectOptions.blur * 1.4}px)`
16572
+ };
16573
+ }
16574
+ if (effectiveAnimation === "stack") {
16575
+ const xOffset2 = distance * mergedEffectOptions.stackOffset;
16576
+ const yOffset = absDistance * mergedEffectOptions.stackLift;
16577
+ const scale2 = distance === 0 ? mergedEffectOptions.mainScale : distance === 1 || distance === -1 ? mergedEffectOptions.sideScale : mergedEffectOptions.farScale;
16578
+ return {
16579
+ opacity: distance === 0 ? 1 : distance === 1 || distance === -1 ? mergedEffectOptions.sideOpacity : mergedEffectOptions.farOpacity,
16580
+ transform: `translate3d(${xOffset2}px, ${yOffset}px, -${absDistance * mergedEffectOptions.depthStep}px) scale(${scale2})`,
16581
+ filter: distance === 0 ? "blur(0px)" : `blur(${Math.min(absDistance, 2) * mergedEffectOptions.blur}px)`,
16582
+ pointerEvents: distance === 0 ? "auto" : "none"
16583
+ };
16584
+ }
16585
+ const xOffset = distance * mergedEffectOptions.sideOffset;
16586
+ const rotateY = distance * -mergedEffectOptions.rotate;
16587
+ const scale = distance === 0 ? mergedEffectOptions.mainScale : distance === 1 || distance === -1 ? mergedEffectOptions.sideScale : mergedEffectOptions.farScale;
16588
+ return {
16589
+ opacity: distance === 0 ? 1 : distance === 1 || distance === -1 ? mergedEffectOptions.sideOpacity : mergedEffectOptions.farOpacity,
16590
+ transform: `translate3d(${xOffset}%, 0, -${absDistance * mergedEffectOptions.depthStep}px) rotateY(${rotateY}deg) scale(${scale})`,
16591
+ filter: distance === 0 ? "blur(0px)" : `blur(${Math.min(absDistance, 2) * mergedEffectOptions.blur}px)`,
16592
+ pointerEvents: distance === 0 ? "auto" : "none"
16593
+ };
16594
+ },
16595
+ [effectiveAnimation, getLoopDistance, mergedEffectOptions]
16596
+ );
16495
16597
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
16496
16598
  "div",
16497
16599
  {
16498
16600
  ref: carouselRef,
16499
16601
  className: cn(
16500
- "relative w-full overflow-hidden focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 rounded-2xl md:rounded-3xl",
16602
+ "relative w-full overflow-hidden focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 rounded-xl md:rounded-3xl",
16501
16603
  className
16502
16604
  ),
16605
+ onKeyDown: handleKeyDown,
16503
16606
  onMouseEnter: () => setIsPaused(true),
16504
16607
  onMouseLeave: () => setIsPaused(false),
16505
16608
  role: "region",
@@ -16511,8 +16614,14 @@ function Carousel({
16511
16614
  /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
16512
16615
  "div",
16513
16616
  {
16514
- className: cn("flex", isHorizontal ? "flex-row" : "flex-col", containerClassName),
16515
- style: getAnimationStyles2(),
16617
+ className: cn(
16618
+ effectiveAnimation === "slide" ? "flex" : "grid",
16619
+ effectiveAnimation === "slide" && (isHorizontal ? "flex-row" : "flex-col"),
16620
+ isDeckAnimation && "place-items-center [transform-style:preserve-3d]",
16621
+ isHorizontal ? "touch-pan-y" : "touch-pan-x",
16622
+ containerClassName
16623
+ ),
16624
+ style: isDeckAnimation ? { perspective: "1400px" } : getAnimationStyles2(),
16516
16625
  onTouchStart: touchStart,
16517
16626
  onTouchMove: touchMove,
16518
16627
  onTouchEnd: touchEnd,
@@ -16523,30 +16632,30 @@ function Carousel({
16523
16632
  role: "group",
16524
16633
  "aria-atomic": "false",
16525
16634
  "aria-live": autoScroll ? "off" : "polite",
16526
- children: React42.Children.map(children, (child, idx) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
16635
+ children: slides.map((child, idx) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
16527
16636
  "div",
16528
16637
  {
16529
16638
  className: cn(
16530
16639
  "shrink-0",
16531
- isHorizontal ? "h-full" : "w-full",
16532
- animation === "fade" && idx !== currentIndex && "opacity-0",
16533
- animation === "scale" && idx !== currentIndex && "scale-95",
16640
+ effectiveAnimation === "slide" ? isHorizontal ? "h-full" : "w-full" : "col-start-1 row-start-1",
16641
+ effectiveAnimation === "fade" && (idx === currentIndex ? "opacity-100 z-10" : "opacity-0 pointer-events-none z-0"),
16642
+ effectiveAnimation === "scale" && (idx === currentIndex ? "opacity-100 scale-100 z-10" : "opacity-0 scale-95 pointer-events-none z-0"),
16643
+ isDeckAnimation && "w-full max-w-[78%] md:max-w-[72%] transition-[opacity,transform] duration-500 ease-out",
16644
+ effectiveAnimation !== "slide" && "transition-[opacity,transform] duration-500 ease-in-out",
16534
16645
  slideClassName
16535
16646
  ),
16536
- style: {
16537
- [isHorizontal ? "width" : "height"]: `${slideWidth}%`
16538
- },
16647
+ style: effectiveAnimation === "slide" ? { [isHorizontal ? "width" : "height"]: `${slideWidth}%` } : isDeckAnimation ? getDeckSlideStyles(idx) : void 0,
16539
16648
  role: "group",
16540
16649
  "aria-roledescription": "slide",
16541
16650
  "aria-label": `${idx + 1} of ${totalSlides}`,
16542
- "aria-hidden": idx < currentIndex || idx >= currentIndex + slidesToShow,
16651
+ "aria-hidden": effectiveAnimation === "slide" ? idx < currentIndex || idx >= currentIndex + slidesToShow : idx !== currentIndex,
16543
16652
  children: child
16544
16653
  },
16545
- idx
16654
+ React42.isValidElement(child) && child.key || idx
16546
16655
  ))
16547
16656
  }
16548
16657
  ),
16549
- showArrows && totalSlides > slidesToShow && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
16658
+ showArrows && totalSlides > effectiveSlidesToShow && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
16550
16659
  /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
16551
16660
  Button_default,
16552
16661
  {
@@ -16558,7 +16667,8 @@ function Carousel({
16558
16667
  disabled: !loop && currentIndex === 0,
16559
16668
  className: cn(
16560
16669
  "absolute top-1/2 -translate-y-1/2 hover:-translate-y-1/2 active:-translate-y-1/2 z-10 rounded-full will-change-transform backdrop-blur-0 hover:backdrop-blur-0 hover:bg-transparent border-0",
16561
- isHorizontal ? "left-4" : "top-4 left-1/2 -translate-x-1/2 rotate-90"
16670
+ "max-md:h-8 max-md:w-8 max-md:border max-md:border-border/60 max-md:bg-background/75 max-md:backdrop-blur-sm max-md:shadow-sm",
16671
+ isHorizontal ? "left-4 max-md:left-2" : "top-4 left-1/2 -translate-x-1/2 rotate-90 max-md:top-2"
16562
16672
  ),
16563
16673
  "aria-label": "Previous slide"
16564
16674
  }
@@ -16574,18 +16684,19 @@ function Carousel({
16574
16684
  disabled: !loop && currentIndex >= maxIndex,
16575
16685
  className: cn(
16576
16686
  "absolute top-1/2 -translate-y-1/2 hover:-translate-y-1/2 active:-translate-y-1/2 z-10 rounded-full will-change-transform backdrop-blur-0 hover:backdrop-blur-0 hover:bg-transparent border-0",
16577
- isHorizontal ? "right-4" : "bottom-4 left-1/2 -translate-x-1/2 rotate-90"
16687
+ "max-md:h-8 max-md:w-8 max-md:border max-md:border-border/60 max-md:bg-background/75 max-md:backdrop-blur-sm max-md:shadow-sm",
16688
+ isHorizontal ? "right-4 max-md:right-2" : "bottom-4 left-1/2 -translate-x-1/2 rotate-90 max-md:bottom-2"
16578
16689
  ),
16579
16690
  "aria-label": "Next slide"
16580
16691
  }
16581
16692
  )
16582
16693
  ] }),
16583
- showDots && totalSlides > slidesToShow && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
16694
+ showDots && totalSlides > effectiveSlidesToShow && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
16584
16695
  "div",
16585
16696
  {
16586
16697
  className: cn(
16587
16698
  "absolute flex gap-2 z-10",
16588
- isHorizontal ? "bottom-4 left-1/2 -translate-x-1/2 flex-row" : "right-4 top-1/2 -translate-y-1/2 flex-col"
16699
+ isHorizontal ? "bottom-4 left-1/2 -translate-x-1/2 flex-row max-md:bottom-2" : "right-4 top-1/2 -translate-y-1/2 flex-col max-md:right-2"
16589
16700
  ),
16590
16701
  role: "tablist",
16591
16702
  "aria-label": "Carousel pagination",
@@ -16595,8 +16706,9 @@ function Carousel({
16595
16706
  onClick: () => scrollTo(idx),
16596
16707
  className: cn(
16597
16708
  "rounded-full transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
16709
+ "max-md:w-1.5 max-md:h-1.5",
16598
16710
  isHorizontal ? "w-2 h-2" : "w-2 h-2",
16599
- idx === currentIndex ? `bg-primary ${isHorizontal ? "w-6" : "h-6"}` : "bg-muted-foreground/50 hover:bg-muted-foreground/75"
16711
+ idx === currentIndex ? `bg-primary ${isHorizontal ? "w-6 max-md:w-4" : "h-6 max-md:h-4"}` : "bg-muted-foreground/50 hover:bg-muted-foreground/75"
16600
16712
  ),
16601
16713
  "aria-label": `Go to slide ${idx + 1}`,
16602
16714
  "aria-selected": idx === currentIndex,
@@ -16606,11 +16718,12 @@ function Carousel({
16606
16718
  ))
16607
16719
  }
16608
16720
  ),
16609
- showThumbnails && totalSlides > slidesToShow && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
16721
+ showThumbnails && totalSlides > effectiveSlidesToShow && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
16610
16722
  "div",
16611
16723
  {
16612
16724
  className: cn(
16613
16725
  "absolute bottom-0 left-0 right-0 flex gap-2 p-4 bg-linear-to-t from-black/50 to-transparent overflow-x-auto",
16726
+ "max-md:gap-1.5 max-md:p-2",
16614
16727
  isHorizontal ? "flex-row" : "flex-col"
16615
16728
  ),
16616
16729
  children: React42.Children.map(children, (child, idx) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
@@ -16619,7 +16732,8 @@ function Carousel({
16619
16732
  onClick: () => scrollTo(idx),
16620
16733
  className: cn(
16621
16734
  "shrink-0 w-16 h-16 rounded-lg overflow-hidden border-2 transition-all focus:outline-none focus:ring-2 focus:ring-primary",
16622
- idx === currentIndex ? "border-primary scale-110" : "border-transparent opacity-70 hover:opacity-100"
16735
+ "max-md:w-12 max-md:h-12",
16736
+ idx === currentIndex ? "border-primary md:scale-110" : "border-transparent opacity-70 hover:opacity-100"
16623
16737
  ),
16624
16738
  "aria-label": `Thumbnail ${idx + 1}`,
16625
16739
  children: thumbnailRenderer ? thumbnailRenderer(child, idx) : child