react-magic-card 0.1.0 → 0.1.1
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/MagicCircle/index.js +2 -2
- package/dist/MagicStraight/index.js +2 -2
- package/dist/common/PickImage/index.d.ts +4 -0
- package/dist/common/{ScaleFilterImage → PickImage}/index.js +2 -2
- package/dist/common/{ScaleFilterImage → PickImage}/styles.module.css +1 -1
- package/package.json +1 -1
- package/dist/common/ScaleFilterImage/index.d.ts +0 -4
|
@@ -30,7 +30,7 @@ exports.MagicCircle = void 0;
|
|
|
30
30
|
const react_1 = __importStar(require("react"));
|
|
31
31
|
const framer_motion_1 = require("framer-motion");
|
|
32
32
|
const styles_module_css_1 = __importDefault(require("./styles.module.css"));
|
|
33
|
-
const
|
|
33
|
+
const PickImage_1 = __importDefault(require("../common/PickImage"));
|
|
34
34
|
const MagicCircle = ({ images, height, width, radius, controller, start, dynamic = true, wheelDelay, animate, initial, transition, className, classImage, classImageUnique, selectCursor = 'pointer', pickProperty, pickTransition }) => {
|
|
35
35
|
const [count, setCount] = (0, react_1.useState)(0);
|
|
36
36
|
const [touchStartY, setTouchStartY] = (0, react_1.useState)(0);
|
|
@@ -204,6 +204,6 @@ const MagicCircle = ({ images, height, width, radius, controller, start, dynamic
|
|
|
204
204
|
'px'
|
|
205
205
|
} }));
|
|
206
206
|
}))),
|
|
207
|
-
react_1.default.createElement(
|
|
207
|
+
react_1.default.createElement(PickImage_1.default, { onClick: () => setHasPick(false), hasPick: hasPick, classPick: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.classPick, white: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.white, alpha: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.alpha, blur: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.blur, scale: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.scale, offset: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.offset, hasShift: hasShift, argRef: div2Ref, argKey: select, src: images[select].src, alt: images[select].alt, width: width, height: height, transition: pickTransition, zIndex: images.length + 1 })));
|
|
208
208
|
};
|
|
209
209
|
exports.MagicCircle = MagicCircle;
|
|
@@ -30,7 +30,7 @@ exports.MagicStraight = void 0;
|
|
|
30
30
|
const react_1 = __importStar(require("react"));
|
|
31
31
|
const framer_motion_1 = require("framer-motion");
|
|
32
32
|
const styles_module_css_1 = __importDefault(require("./styles.module.css"));
|
|
33
|
-
const
|
|
33
|
+
const PickImage_1 = __importDefault(require("../common/PickImage"));
|
|
34
34
|
const MagicStraight = ({ images, height, width, start, controller, wheelDelay, vertical, className, classImage, classImageUnique, animate, initial, transition, margin = 0, selectOffsetX = 0, selectOffsetY = 0, selectCursor = 'pointer', pickProperty, pickTransition }) => {
|
|
35
35
|
const [touchStartY, setTouchStartY] = (0, react_1.useState)(0);
|
|
36
36
|
const [touchStartX, setTouchStartX] = (0, react_1.useState)(0);
|
|
@@ -195,6 +195,6 @@ const MagicStraight = ({ images, height, width, start, controller, wheelDelay, v
|
|
|
195
195
|
} }));
|
|
196
196
|
})),
|
|
197
197
|
react_1.default.createElement("button", { onClick: () => shiftRight() }, hasPick ? 'true' : 'false'),
|
|
198
|
-
react_1.default.createElement(
|
|
198
|
+
react_1.default.createElement(PickImage_1.default, { onClick: () => setHasPick(false), hasPick: hasPick, classPick: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.classPick, white: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.white, alpha: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.alpha, blur: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.blur, scale: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.scale, offset: pickProperty === null || pickProperty === void 0 ? void 0 : pickProperty.offset, hasShift: hasShift, argRef: div2Ref, argKey: select, src: images[select].src, alt: images[select].alt, width: width, height: height, transition: pickTransition, zIndex: images.length + 1 })));
|
|
199
199
|
};
|
|
200
200
|
exports.MagicStraight = MagicStraight;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ScaleFilterImageProps } from '../../types';
|
|
3
|
+
declare const PickImage: ({ onClick, classPick, hasPick, hasShift, argRef, argKey, src, alt, width, height, zIndex, white, alpha, blur, scale, offset, transition }: ScaleFilterImageProps) => React.JSX.Element;
|
|
4
|
+
export default PickImage;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const framer_motion_1 = require("framer-motion");
|
|
8
8
|
const styles_module_css_1 = __importDefault(require("./styles.module.css"));
|
|
9
|
-
const
|
|
9
|
+
const PickImage = ({ onClick, classPick, hasPick, hasShift, argRef, argKey, src, alt, width, height, zIndex, white, alpha = 0.4, blur = 4, scale = 2, offset = 200, transition }) => {
|
|
10
10
|
return (react_1.default.createElement(framer_motion_1.m.div, { role: "button", onClick: onClick, ref: argRef, className: styles_module_css_1.default.full_size, animate: {
|
|
11
11
|
zIndex: zIndex,
|
|
12
12
|
background: white
|
|
@@ -23,4 +23,4 @@ const ScaleFilterImage = ({ onClick, classPick, hasPick, hasShift, argRef, argKe
|
|
|
23
23
|
x: 0
|
|
24
24
|
}, initial: { scale: 1, opacity: 0, x: hasShift ? offset : -offset }, transition: transition })));
|
|
25
25
|
};
|
|
26
|
-
exports.default =
|
|
26
|
+
exports.default = PickImage;
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ScaleFilterImageProps } from '../../types';
|
|
3
|
-
declare const ScaleFilterImage: ({ onClick, classPick, hasPick, hasShift, argRef, argKey, src, alt, width, height, zIndex, white, alpha, blur, scale, offset, transition }: ScaleFilterImageProps) => React.JSX.Element;
|
|
4
|
-
export default ScaleFilterImage;
|