yet-another-react-lightbox 3.17.2 → 3.17.3

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.
@@ -84,8 +84,8 @@ function Thumbnail({ slide, onClick, active, fadeIn, fadeOut, placeholder, onLos
84
84
  function isHorizontal(position) {
85
85
  return ["top", "bottom"].includes(position);
86
86
  }
87
- function boxSize(thumbnails, dimension, includeGap) {
88
- return dimension + 2 * (thumbnails.border + thumbnails.padding) + (includeGap ? thumbnails.gap : 0);
87
+ function boxSize(thumbnails, dimension) {
88
+ return dimension + 2 * (thumbnails.border + thumbnails.padding) + thumbnails.gap;
89
89
  }
90
90
  function ThumbnailsTrack({ visible, containerRef }) {
91
91
  const track = React.useRef(null);
@@ -104,13 +104,13 @@ function ThumbnailsTrack({ visible, containerRef }) {
104
104
  keyframes: isHorizontal(position)
105
105
  ? [
106
106
  {
107
- transform: `translateX(${(isRTL ? -1 : 1) * boxSize(thumbnails, width, true) * offset + snapshot}px)`,
107
+ transform: `translateX(${(isRTL ? -1 : 1) * boxSize(thumbnails, width) * offset + snapshot}px)`,
108
108
  },
109
109
  { transform: "translateX(0)" },
110
110
  ]
111
111
  : [
112
112
  {
113
- transform: `translateY(${boxSize(thumbnails, height, true) * offset + snapshot}px)`,
113
+ transform: `translateY(${boxSize(thumbnails, height) * offset + snapshot}px)`,
114
114
  },
115
115
  { transform: "translateY(0)" },
116
116
  ],
@@ -170,11 +170,9 @@ function ThumbnailsTrack({ visible, containerRef }) {
170
170
  };
171
171
  return (React.createElement("div", { className: clsx(cssClass(cssPrefix("container")), cssClass(CLASS_FLEX_CENTER)), style: {
172
172
  ...(!visible ? { display: "none" } : null),
173
- ...(width !== defaultThumbnailsProps.width
174
- ? { [cssVar(cssThumbnailPrefix("width"))]: `${boxSize(thumbnails, width)}px` }
175
- : null),
173
+ ...(width !== defaultThumbnailsProps.width ? { [cssVar(cssThumbnailPrefix("width"))]: `${width}px` } : null),
176
174
  ...(height !== defaultThumbnailsProps.height
177
- ? { [cssVar(cssThumbnailPrefix("height"))]: `${boxSize(thumbnails, height)}px` }
175
+ ? { [cssVar(cssThumbnailPrefix("height"))]: `${height}px` }
178
176
  : null),
179
177
  ...(border !== defaultThumbnailsProps.border
180
178
  ? { [cssVar(cssThumbnailPrefix("border"))]: `${border}px` }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yet-another-react-lightbox",
3
- "version": "3.17.2",
3
+ "version": "3.17.3",
4
4
  "description": "Modern React lightbox component",
5
5
  "author": "Igor Danchenko",
6
6
  "license": "MIT",