react-magic-card 0.1.14 → 0.1.15

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.
@@ -161,7 +161,7 @@ const MagicCircle = ({ images, height, width, dynamic = true, clockwise = true,
161
161
  e.key === 'Escape' && setHasPick(false);
162
162
  };
163
163
  return (react_1.default.createElement(framer_motion_1.LazyMotion, { features: framer_motion_1.domAnimation },
164
- react_1.default.createElement(framer_motion_1.m.div, { ref: div1Ref, tabIndex: offsetIndex < 0 ? 0 : offsetIndex - 1, onKeyDown: handleKeyPress, className: className + ' ' + styles_module_css_1.default.outer, style: {
164
+ react_1.default.createElement(framer_motion_1.m.div, { ref: div1Ref, tabIndex: offsetIndex <= 0 ? 0 : offsetIndex - 1, onKeyDown: handleKeyPress, className: className + ' ' + styles_module_css_1.default.outer, style: {
165
165
  zIndex: offsetIndex - 1,
166
166
  width: radius * 2 + controller + 'px',
167
167
  height: radius * 2 + controller + 'px'
@@ -174,7 +174,7 @@ const MagicStraight = ({ images, height, width, vertical = true, margin = 0, sel
174
174
  e.key === 'Escape' && setHasPick(false);
175
175
  };
176
176
  return (react_1.default.createElement(framer_motion_1.LazyMotion, { features: framer_motion_1.domAnimation },
177
- react_1.default.createElement("div", { ref: div1Ref, tabIndex: offsetIndex < 0 ? 0 : offsetIndex - 1, onKeyDown: handleKeyPress, className: className + ' ' + styles_module_css_1.default.outer, style: {
177
+ react_1.default.createElement("div", { ref: div1Ref, tabIndex: offsetIndex <= 0 ? 0 : offsetIndex - 1, onKeyDown: handleKeyPress, className: className + ' ' + styles_module_css_1.default.outer, style: {
178
178
  zIndex: offsetIndex - 1,
179
179
  width: !vertical ? height + controller + 'px' : 'fit-content',
180
180
  height: vertical ? width + controller + 'px' : 'fit-content',
@@ -187,7 +187,7 @@ const MagicStraight = ({ images, height, width, vertical = true, margin = 0, sel
187
187
  const zIndex = reverseIndex
188
188
  ? offsetIndex + images.length - 1 - index
189
189
  : offsetIndex + index;
190
- return (react_1.default.createElement(framer_motion_1.m.img, { key: index, animate: {
190
+ return (react_1.default.createElement(framer_motion_1.m.img, { key: zIndex, animate: {
191
191
  y: hasSelect
192
192
  ? vertical
193
193
  ? (average - index) * height +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-magic-card",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "image gallery component with framer motion",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",