Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-card-flip

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-card-flip - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

32

lib/ReactCardFlip.js

@@ -13,7 +13,19 @@ "use strict";

};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;

@@ -25,3 +37,3 @@ };

var ReactCardFlip = function (props) {
var flipDirection = props.flipDirection, infinite = props.infinite, flipSpeedFrontToBack = props.flipSpeedFrontToBack, flipSpeedBackToFront = props.flipSpeedBackToFront, _a = props.cardStyles, front = _a.front, back = _a.back, containerStyle = props.containerStyle, cardZIndex = props.cardZIndex;
var _a = props.cardStyles, back = _a.back, front = _a.front, cardZIndex = props.cardZIndex, containerStyle = props.containerStyle, flipDirection = props.flipDirection, flipSpeedFrontToBack = props.flipSpeedFrontToBack, flipSpeedBackToFront = props.flipSpeedBackToFront, infinite = props.infinite;
var _b = react_1.useState(props.isFlipped), isFlipped = _b[0], setFlipped = _b[1];

@@ -46,13 +58,13 @@ var _c = react_1.useState(0), rotation = _c[0], setRotation = _c[1];

var styles = {
back: __assign({ WebkitBackfaceVisibility: 'hidden', backfaceVisibility: 'hidden', height: '100%', left: '0', position: isFlipped ? 'relative' : 'absolute', top: '0', transform: flipDirection === 'horizontal' ? backRotateY : backRotateX, transformStyle: 'preserve-3d', transition: flipSpeedFrontToBack + "s", width: '100%' }, back),
container: {
perspective: '1000px',
zIndex: "" + cardZIndex
zIndex: "" + cardZIndex,
},
flipper: {
height: '100%',
position: 'relative',
width: '100%',
height: '100%'
},
front: __assign({ WebkitBackfaceVisibility: 'hidden', backfaceVisibility: 'hidden', left: '0', position: isFlipped ? 'absolute' : 'relative', top: '0', transform: flipDirection === 'horizontal' ? frontRotateY : frontRotateX, transformStyle: 'preserve-3d', width: '100%', height: '100%', zIndex: '2', transition: flipSpeedBackToFront + "s" }, front),
back: __assign({ WebkitBackfaceVisibility: 'hidden', backfaceVisibility: 'hidden', left: '0', position: isFlipped ? 'relative' : 'absolute', transform: flipDirection === 'horizontal' ? backRotateY : backRotateX, transformStyle: 'preserve-3d', top: '0', width: '100%', height: '100%', transition: flipSpeedFrontToBack + "s" }, back)
front: __assign({ WebkitBackfaceVisibility: 'hidden', backfaceVisibility: 'hidden', height: '100%', left: '0', position: isFlipped ? 'absolute' : 'relative', top: '0', transform: flipDirection === 'horizontal' ? frontRotateY : frontRotateX, transformStyle: 'preserve-3d', transition: flipSpeedBackToFront + "s", width: '100%', zIndex: '2' }, front),
};

@@ -65,8 +77,8 @@ return (React.createElement("div", { className: "react-card-flip", style: __assign(__assign({}, styles.container), containerStyle) },

ReactCardFlip.defaultProps = {
containerStyle: {},
cardStyles: {
back: {},
front: {},
back: {}
},
cardZIndex: 'auto',
containerStyle: {},
flipDirection: 'horizontal',

@@ -76,4 +88,4 @@ flipSpeedBackToFront: 0.6,

infinite: false,
isFlipped: false
isFlipped: false,
};
exports.default = ReactCardFlip;
{
"name": "react-card-flip",
"version": "1.0.10",
"version": "1.0.11",
"description": "ReactCardFlip",

@@ -10,10 +10,11 @@ "main": "./lib/ReactCardFlip.js",

"build": "tsc",
"build-example": "webpack --env production",
"build-e2e": "webpack --env production --config webpack.e2e.js",
"build-example": "webpack --env production --config example/webpack.config.js",
"build-e2e": "webpack --env production --config e2e/webpack.e2e.js",
"postbuild": "cp types/index.d.ts lib/ReactCardFlip.d.ts",
"start": "npm run build-example && webpack-dev-server --progress --colors --open",
"start": "npm run build-example && webpack-dev-server --progress --colors --config example/webpack.config.js",
"test": "npm run build-e2e && jest",
"test:coverage": "jest --coverage",
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"test:watch": "npm run build-e2e && jest --watch"
"test:watch": "npm run build-e2e && jest --watch",
"lint": "tslint -p . --fix"
},

@@ -43,33 +44,47 @@ "repository": {

"devDependencies": {
"@babel/cli": "^7.5.0",
"@babel/core": "^7.5.0",
"@babel/plugin-proposal-function-bind": "^7.2.0",
"@babel/polyfill": "^7.4.4",
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.6.0",
"@types/jest": "^24.0.9",
"@types/react": "^16.9.4",
"@types/react-dom": "^16.9.1",
"@typescript-eslint/eslint-plugin": "^2.3.2",
"@typescript-eslint/parser": "^2.3.2",
"babel-jest": "^24.8.0",
"babel-loader": "^8.0.6",
"coveralls": "^3.0.0",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"eslint": "^6.5.1",
"eslint-loader": "^3.0.2",
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-react-hooks": "^2.1.2",
"file-loader": "^4.2.0",
"jest": "^24.8.0",
"@babel/cli": "^7.10.5",
"@babel/core": "^7.10.5",
"@babel/plugin-proposal-function-bind": "^7.10.5",
"@babel/polyfill": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@types/jest": "^24.9.1",
"@types/react": "^16.9.43",
"@types/react-dom": "^16.9.8",
"babel-jest": "^26.1.0",
"babel-loader": "^8.1.0",
"coveralls": "^3.1.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"file-loader": "^4.3.0",
"jest": "^26.1.0",
"puppeteer": "^1.11.0",
"ts-jest": "^24.1.0",
"typescript": "^3.6.4",
"webpack": "^4.29.0",
"webpack-cli": "^3.2.1",
"webpack-dev-server": "^3.1.14",
"yargs": "^14.2.0"
"react": "^16.8.6",
"react-dom": "^16.8.6",
"ts-jest": "^26.1.3",
"tslint": "^5.20.1",
"typescript": "^3.9.7",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
"yargs": "^14.2.3"
},
"jest": {
"preset": "ts-jest",
"transform": {
"^.+\\.tsx?$": "<rootDir>/tools/jest/jest.preprocess.js"
},
"testPathIgnorePatterns": [
"node_modules"
],
"verbose": true,
"testURL": "http://localhost/",
"setupFiles": [
"./tools/jest/jest.setup"
],
"collectCoverageFrom": [
"src/*.tsx"
]
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc