{"_id":"@4rk/css-transition","_rev":"3-20d806ddd29b7f4d518370d0fd331821","name":"@4rk/css-transition","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@4rk/css-transition","version":"1.0.0","keywords":["animation","css","transition","transitions"],"author":{"name":"Fork Unstable Media GmbH","email":"obj@fork.de"},"license":"MIT","_id":"@4rk/css-transition@1.0.0","maintainers":[{"name":"holmey","email":"mail@holgermeyer.net"},{"name":"barnslig","email":"leonard@techel.net"}],"homepage":"https://github.com/fork/css-transition#readme","bugs":{"url":"https://github.com/fork/css-transition/issues"},"dist":{"shasum":"6fea3d5c7de67cfae8754a5dcdef74da5418b381","tarball":"https://registry.npmjs.org/@4rk/css-transition/-/css-transition-1.0.0.tgz","fileCount":8,"integrity":"sha512-MvUNFm81AnO5xMR4KCXljxGHN55xrN7m0B6W52Qnzf/sp7daR0JlA798HQt5/MJiaTRPkuBwO/gajhgHdH0r5g==","signatures":[{"sig":"MEUCIQDud4fa5pmyT2n1SpOzp8/fqkOXWaC4yH3FBVjyMbpkAQIgHewgYImOODH1Db7xM2+jf/K2mUPsGgxCo5xnRUerW0w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclOr+CRA9TVsSAnZWagAAeQkP/2OTlrfezjwW4LRuXpjd\no/mZbUlUOt/4mMY+541NWSjye1rkku4Vh1P9AvvGl1VoqKMkELnjTq1h72tT\nuoVBJ4GAVamFx1xbFn9HEZDjD9XK16luqXz+qYTPc4g3Pp+ap9yRqSgNiGQv\nD69wV/HY/+tvY+j/A+z8mP6jvqiw0n6dUu5qEkhh9CSYE5WdwRhnLyh8A2Np\nOVSWCXf76ChluDQ22NA2RnbGb7ajKtkh4YzGNz1hO1JRVAtxvPOOP82Rhd1d\nS2y+KWOm127rkmhzYfA1Rjj943R3RKC1Btfq3BYnDKKMHAY1ZwESCCl4oBY8\nSgWLyzDPI8IbR4NH3qFb13CxIMhAyf73s+5rkRXc0YC1Hvbg0o4pBF/I4hWn\n/h1MUj25DNNCnIdy8bm1al6Ywtw0V3hamYXcEEMF5GnkjruLo35tcG+ab9ph\nME7g99J/iEMN2bx9Uzsfbnf72EI/SkHAItjEeLN1lLjUq752kjrXVSgFbWL5\n31rjwAbsA66fKwCrUoWCmetxWjnpszsTgOd/1/aUz5lIBn9AK5mRbZjCkYHG\nRJOAkb9SpyqeQj3EdQnOt2obq5idxOCqKZGiERKMuK+15OIc5vfofNzPXcCm\n5idGIvXitrq+DWHX4qSmU/RakUlWSHi9vU6I85CeTb6Gw4dgD0E6l22oxKmN\nuvKJ\r\n=2ZlO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"gitHead":"1262be9079b76543afd76b11cdf22fc929ec44e9","scripts":{"build":"babel src -d dist","start":"parcel demo/index.html --open","release":"kacl prerelease && kacl release && prettier --write CHANGELOG.md"},"_npmUser":{"name":"barnslig","email":"leonard@techel.net"},"repository":{"url":"git+https://github.com/fork/css-transition.git","type":"git"},"_npmVersion":"6.4.1","description":"Apply a CSS class for each stage of a CSS transition","directories":{},"lint-staged":{"src/*.js":["eslint --quiet --fix","git add"]},"_nodeVersion":"10.15.1","_hasShrinkwrap":false,"devDependencies":{"husky":"^1.3.1","eslint":"^5.15.3","rimraf":"^2.6.3","prettier":"^1.16.4","@babel/cli":"^7.2.3","@babel/core":"^7.4.0","lint-staged":"^8.1.5","parcel-bundler":"^1.12.3","@brightcove/kacl":"^0.1.6","@babel/preset-env":"^7.4.2","eslint-plugin-import":"^2.16.0","eslint-config-prettier":"^4.1.0","eslint-plugin-prettier":"^3.0.1","eslint-config-airbnb-base":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/css-transition_1.0.0_1553263357925_0.8537001183043456","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-03-22T14:02:37.753Z","modified":"2025-02-25T14:22:37.755Z","1.0.0":"2019-03-22T14:02:38.070Z"},"bugs":{"url":"https://github.com/fork/css-transition/issues"},"author":{"name":"Fork Unstable Media GmbH","email":"obj@fork.de"},"license":"MIT","homepage":"https://github.com/fork/css-transition#readme","keywords":["animation","css","transition","transitions"],"repository":{"url":"git+https://github.com/fork/css-transition.git","type":"git"},"description":"Apply a CSS class for each stage of a CSS transition","maintainers":[{"email":"mail@holgermeyer.net","name":"holmey"},{"email":"jonasleonhardfl@gmail.com","name":"jonas.leonhard"}],"readme":"# CSSTransition\n\nApply a CSS class for each stage of a CSS transition.\n\nThis is basically a react-free rip-off of [react-transition-group](https://github.com/reactjs/react-transition-group).\n\nIt is super useful to make CSS transitions from `display: none;` to `display: whatever;`.\n\n## Demo\n\nThere is a simple usage demo which can be run as follows:\n\n    yarn\n    yarn start\n\n## Usage\n\nThe basic idea of this library is that in order to control a CSS transition using JavaScript, you have to think of it as a three-staged process:\n\n1. **Start:**\n    - Set prerequisites for the animation, e.g. set `display: block;` and `transition: all 0.3s ease;`\n1. **Active:**\n    - One `requestAnimationFrame` after start\n    - Change transitioning properties, e.g. set `opacity: 1;`\n1. **Done:**\n    - After `transitionend` or a timeout\n    - Make transition changes permanent, this means usually setting the same properties as during active stage\n    - During `exit`, this would be the place to set `display` back to `none`.\n\nFor a code example, please take a look at the demo.\n\n## Tricks\n\n-   Apply `pointer-events: none;` during `.exit` and `.exit-active` to prevent user interaction during transition\n-   How to cope with the timeout warning:\n    1. Make sure that a transition is happening on the element specified during instantiation, e.g. it is _not_ a parent element but the direct element on which the transitions are happening. If not, create separate `CSSTransition` instances for each element.\n    1. Make sure that there is actually a transition. The instance is waiting for the first `transitionend` event.\n    1. Check whether your transition takes less time than the configured timeout which is by default 500ms. If not, increase the timeout.\n\n## Creating a release\n\nCertain steps need to be done in order to create a new release:\n\n1. Decide on a [semver](https://semver.org/spec/v2.0.0.html) version number\n1. Start a new release using `git flow release start [version number]`\n1. Update the `package.json` version\n1. Run `yarn run release`\n1. Commit changes: `git commit -a -m \"Prepare release [version number]\"`\n1. Finish release using `git flow release finish`\n1. Push all changes: `git push origin --all && git push origin --tags`\n\n## License\n\nSee [LICENSE](LICENSE)\n","readmeFilename":"README.md"}