From f63d178a9f0690271dbc8d689ccc7c8455831939 Mon Sep 17 00:00:00 2001 From: jasminmif Date: Tue, 29 Oct 2019 19:57:22 +0100 Subject: [PATCH 01/44] Update README.md --- README.md | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/README.md b/README.md index 859d27a..750b8f6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - ## Available Scripts In the project directory, you can run: @@ -36,33 +34,3 @@ If you aren’t satisfied with the build tool and configuration choices, you can Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting - -### Analyzing the Bundle Size - -This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size - -### Making a Progressive Web App - -This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app - -### Advanced Configuration - -This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration - -### Deployment - -This section has moved here: https://facebook.github.io/create-react-app/docs/deployment - -### `npm run build` fails to minify - -This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify From 51562d95fa6cd8f8016b5a9d96373417324d2cc9 Mon Sep 17 00:00:00 2001 From: jasminmif Date: Tue, 29 Oct 2019 20:00:38 +0100 Subject: [PATCH 02/44] Update README.md --- README.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/README.md b/README.md index 750b8f6..563f688 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,6 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.
You will also see any lint errors in the console. -### `npm test` - -Launches the test runner in the interactive watch mode.
-See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - ### `npm run build` Builds the app for production to the `build` folder.
@@ -22,15 +17,3 @@ It correctly bundles React in production mode and optimizes the build for the be The build is minified and the filenames include the hashes.
Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. From 551ffbdc7024d3c45cdc67c742eede5b0ef37e25 Mon Sep 17 00:00:00 2001 From: Jasmin Miftari Date: Mon, 4 Nov 2019 22:13:45 +0100 Subject: [PATCH 03/44] Add CSS transition to Card Holder and Expiration Date --- package-lock.json | 35 ++++++ package.json | 3 +- src/App.scss | 40 ------- src/screens/MainScreen/MainScreen.scss | 0 .../MainScreen/components/card/Card.js | 106 +++++++++++++----- .../MainScreen/components/card/styles.scss | 61 ++++++++++ .../MainScreen/components/form/CForm.js | 4 +- src/screens/MainScreen/index.js | 5 +- 8 files changed, 180 insertions(+), 74 deletions(-) delete mode 100644 src/screens/MainScreen/MainScreen.scss diff --git a/package-lock.json b/package-lock.json index 2553d6d..38605aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4007,6 +4007,11 @@ "cssom": "0.3.x" } }, + "csstype": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.7.tgz", + "integrity": "sha512-9Mcn9sFbGBAdmimWb2gLVDtFJzeKtDGIr76TUqmjZrw9LFXBMSU70lcs+C0/7fyCd6iBDqmksUcCOUIkisPHsQ==" + }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", @@ -4318,6 +4323,25 @@ "utila": "~0.4" } }, + "dom-helpers": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.1.3.tgz", + "integrity": "sha512-nZD1OtwfWGRBWlpANxacBEZrEuLa16o1nh7YopFWeoF68Zt8GGEmzHu6Xv4F3XaFIC+YXtTLrzgqKxFgLEe4jw==", + "requires": { + "@babel/runtime": "^7.6.3", + "csstype": "^2.6.7" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.3.tgz", + "integrity": "sha512-kq6anf9JGjW8Nt5rYfEuGRaEAaH1mkv3Bbu6rYvLOpPh/RusSJXuKPEAoZ7L7gybZkchE8+NV5g9vKF4AGAtsA==", + "requires": { + "regenerator-runtime": "^0.13.2" + } + } + } + }, "dom-serializer": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.1.tgz", @@ -10984,6 +11008,17 @@ "workbox-webpack-plugin": "4.3.1" } }, + "react-transition-group": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.3.0.tgz", + "integrity": "sha512-1qRV1ZuVSdxPlPf4O8t7inxUGpdyO5zG9IoNfJxSO0ImU2A1YWkEQvFPuIPZmMLkg5hYs7vv5mMOyfgSkvAwvw==", + "requires": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + } + }, "read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", diff --git a/package.json b/package.json index 5c97f5f..206c98a 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "node-sass": "^4.13.0", "react": "^16.11.0", "react-dom": "^16.11.0", - "react-scripts": "3.2.0" + "react-scripts": "3.2.0", + "react-transition-group": "^4.3.0" }, "scripts": { "start": "react-scripts start", diff --git a/src/App.scss b/src/App.scss index c90d1b3..3e119b0 100644 --- a/src/App.scss +++ b/src/App.scss @@ -169,46 +169,6 @@ body { } } -.slide-fade-up-enter-active { - transition: all 0.25s ease-in-out; - transition-delay: 0.1s; - position: relative; -} -.slide-fade-up-leave-active { - transition: all 0.25s ease-in-out; - position: absolute; -} -.slide-fade-up-enter { - opacity: 0; - transform: translateY(15px); - pointer-events: none; -} -.slide-fade-up-leave-to { - opacity: 0; - transform: translateY(-15px); - pointer-events: none; -} - -.slide-fade-right-enter-active { - transition: all 0.25s ease-in-out; - transition-delay: 0.1s; - position: relative; -} -.slide-fade-right-leave-active { - transition: all 0.25s ease-in-out; - position: absolute; -} -.slide-fade-right-enter { - opacity: 0; - transform: translateX(10px) rotate(45deg); - pointer-events: none; -} -.slide-fade-right-leave-to { - opacity: 0; - transform: translateX(-10px) rotate(45deg); - pointer-events: none; -} - .github-btn { position: absolute; right: 40px; diff --git a/src/screens/MainScreen/MainScreen.scss b/src/screens/MainScreen/MainScreen.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/screens/MainScreen/components/card/Card.js b/src/screens/MainScreen/components/card/Card.js index 940e6cb..b591dff 100644 --- a/src/screens/MainScreen/components/card/Card.js +++ b/src/screens/MainScreen/components/card/Card.js @@ -1,4 +1,9 @@ import React, { Component, useEffect, useState } from 'react'; +import { + CSSTransition, + TransitionGroup, + SwitchTransition +} from 'react-transition-group'; import './styles.scss'; const Card = ({ @@ -15,6 +20,7 @@ const Card = ({ cardDateRef }) => { const [style, setStyle] = useState({}); + const [counter, setCounter] = useState(0); let cardType = () => { const number = cardNumber; @@ -73,6 +79,10 @@ const Card = ({ setStyle(style); }, [currentFocusedElm]); + useEffect(() => { + setCounter(counter + 1); + }, [cardMonth]); + return (
@@ -107,22 +117,26 @@ const Card = ({
-