yet-another-react-lightbox 3.21.1 → 3.21.2

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.js CHANGED
@@ -1037,7 +1037,7 @@ function Controller({ children, ...props }) {
1037
1037
  const swipe = useEventCallback((action) => {
1038
1038
  var _a, _b;
1039
1039
  const currentSwipeOffset = action.offset || 0;
1040
- const swipeDuration = !currentSwipeOffset ? (_a = animation.navigation) !== null && _a !== void 0 ? _a : animation.swipe : animation.swipe;
1040
+ const swipeDuration = !currentSwipeOffset ? ((_a = animation.navigation) !== null && _a !== void 0 ? _a : animation.swipe) : animation.swipe;
1041
1041
  const swipeEasing = !currentSwipeOffset && !isAnimationPlaying() ? animation.easing.navigation : animation.easing.swipe;
1042
1042
  let { direction } = action;
1043
1043
  const count = (_b = action.count) !== null && _b !== void 0 ? _b : 1;
@@ -1228,7 +1228,7 @@ function CarouselSlide({ slide, offset }) {
1228
1228
  close();
1229
1229
  }
1230
1230
  };
1231
- return (React.createElement("div", { ref: containerRef, className: clsx(cssClass(cssSlidePrefix()), offset === 0 && cssClass(cssSlidePrefix("current")), cssClass(CLASS_FLEX_CENTER)), onClick: handleBackdropClick, style: style }, renderSlide()));
1231
+ return (React.createElement("div", { ref: containerRef, className: clsx(cssClass(cssSlidePrefix()), offset === 0 && cssClass(cssSlidePrefix("current")), cssClass(CLASS_FLEX_CENTER)), "aria-hidden": offset !== 0, onClick: handleBackdropClick, style: style }, renderSlide()));
1232
1232
  }
1233
1233
  function Placeholder() {
1234
1234
  const style = useLightboxProps().styles.slide;
@@ -33,7 +33,7 @@ function useZoomAnimation(zoom, offsetX, offsetY, zoomWrapperRef) {
33
33
  { transform: zoomAnimationStart.current },
34
34
  { transform: `scale(${zoom}) translateX(${offsetX}px) translateY(${offsetY}px)` },
35
35
  ], {
36
- duration: !reduceMotion ? zoomAnimationDuration !== null && zoomAnimationDuration !== void 0 ? zoomAnimationDuration : 500 : 0,
36
+ duration: !reduceMotion ? (zoomAnimationDuration !== null && zoomAnimationDuration !== void 0 ? zoomAnimationDuration : 500) : 0,
37
37
  easing: zoomAnimation.current ? "ease-out" : "ease-in-out",
38
38
  });
39
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yet-another-react-lightbox",
3
- "version": "3.21.1",
3
+ "version": "3.21.2",
4
4
  "description": "Modern React lightbox component",
5
5
  "author": "Igor Danchenko",
6
6
  "license": "MIT",