react-focus-onkeydown
Advanced tools
@@ -28,2 +28,2 @@ import { useEffect } from 'react'; | ||
| export default index; | ||
| export { index as default }; |
@@ -1,1 +0,1 @@ | ||
| !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):(e=e||self).ReactFocusOnKeyDown=n(e.React)}(this,function(e){"use strict";return function(n){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=function(e){e.ctrlKey||e.metaKey||e.altKey||n.current.focus()};e.useEffect(function(){return t?window.addEventListener("keydown",o):window.removeEventListener("keydown",o),function(){t&&window.removeEventListener("keydown",o)}},[t])}}); | ||
| !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).ReactFocusOnKeyDown=n(e.React)}(this,(function(e){"use strict";return function(n){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=function(e){e.ctrlKey||e.metaKey||e.altKey||n.current.focus()};e.useEffect((function(){return t?window.addEventListener("keydown",o):window.removeEventListener("keydown",o),function(){t&&window.removeEventListener("keydown",o)}}),[t])}})); |
+37
-36
| { | ||
| "name": "react-focus-onkeydown", | ||
| "version": "3.0.1", | ||
| "version": "4.0.0", | ||
| "description": "React hook for getting focus of a component when a key is pressed anywhere in the page", | ||
@@ -8,8 +8,8 @@ "main": "dist/react-focus-onkeydown.cjs.js", | ||
| "scripts": { | ||
| "lint": "eslint 'src/*.js?(x)' 'test/*.js?(x)'", | ||
| "lint": "eslint 'src/*.js' 'test/*.js?(x)'", | ||
| "pretest": "npm run lint", | ||
| "test": "NODE_ENV=test karma start --single-run --no-auto-watch", | ||
| "tdd": "NODE_ENV=test karma start", | ||
| "test": "karma start --single-run --no-auto-watch", | ||
| "tdd": "karma start", | ||
| "build": "rollup -c", | ||
| "prepare": "npm run build && npm run test" | ||
| "prepare": "npm run build" | ||
| }, | ||
@@ -34,40 +34,41 @@ "repository": { | ||
| "devDependencies": { | ||
| "@babel/core": "^7.3.4", | ||
| "@babel/preset-env": "^7.3.4", | ||
| "@babel/preset-react": "^7.0.0", | ||
| "babel-plugin-istanbul": "^5.1.1", | ||
| "chai": "^4.2.0", | ||
| "core-js": "^2.6.5", | ||
| "coveralls": "^3.0.3", | ||
| "eslint": "^5.15.1", | ||
| "eslint-config-airbnb": "^17.1.0", | ||
| "eslint-plugin-import": "^2.16.0", | ||
| "eslint-plugin-jsx-a11y": "^6.2.1", | ||
| "eslint-plugin-react": "^7.12.4", | ||
| "events-polyfill": "^2.1.0", | ||
| "karma": "^4.0.1", | ||
| "karma-coverage": "^1.1.2", | ||
| "@babel/core": "^7.15.8", | ||
| "@babel/preset-env": "^7.15.8", | ||
| "@babel/preset-react": "^7.14.5", | ||
| "@rollup/plugin-babel": "^5.3.0", | ||
| "@rollup/plugin-commonjs": "^21.0.1", | ||
| "@rollup/plugin-node-resolve": "^13.0.6", | ||
| "@rollup/plugin-replace": "^3.0.0", | ||
| "babel-plugin-istanbul": "^6.1.1", | ||
| "chai": "^4.3.4", | ||
| "core-js": "^3.18.3", | ||
| "coveralls": "^3.1.1", | ||
| "eslint": "^7.32.0", | ||
| "eslint-config-airbnb": "^18.2.1", | ||
| "eslint-plugin-import": "^2.25.2", | ||
| "eslint-plugin-jsx-a11y": "^6.4.1", | ||
| "eslint-plugin-mocha": "^9.0.0", | ||
| "eslint-plugin-react": "^7.26.1", | ||
| "karma": "^6.3.5", | ||
| "karma-chrome-launcher": "^3.1.0", | ||
| "karma-coverage": "^2.0.3", | ||
| "karma-coveralls": "^2.1.0", | ||
| "karma-mocha": "^1.3.0", | ||
| "karma-firefox-launcher": "^2.1.1", | ||
| "karma-mocha": "^2.0.1", | ||
| "karma-phantomjs-launcher": "^1.0.4", | ||
| "karma-rollup-preprocessor": "^7.0.0", | ||
| "karma-sourcemap-loader": "^0.3.7", | ||
| "karma-rollup-preprocessor": "^7.0.7", | ||
| "karma-sourcemap-loader": "^0.3.8", | ||
| "karma-spec-reporter": "0.0.32", | ||
| "mocha": "^6.0.2", | ||
| "phantomjs-prebuilt": "^2.1.16", | ||
| "mocha": "^9.1.3", | ||
| "prop-types": "^15.7.2", | ||
| "react": "^16.8.4", | ||
| "react-dom": "^16.8.4", | ||
| "rollup": "^1.6.0", | ||
| "rollup-plugin-babel": "^4.3.2", | ||
| "rollup-plugin-commonjs": "^9.2.1", | ||
| "rollup-plugin-node-resolve": "^4.0.1", | ||
| "rollup-plugin-replace": "^2.1.0", | ||
| "rollup-plugin-terser": "^4.0.4", | ||
| "sinon": "^7.2.7" | ||
| "puppeteer": "^10.4.0", | ||
| "react": "^17.0.2", | ||
| "react-dom": "^17.0.2", | ||
| "rollup": "^2.58.0", | ||
| "rollup-plugin-terser": "^7.0.2", | ||
| "sinon": "^11.1.2" | ||
| }, | ||
| "peerDependencies": { | ||
| "react": ">=16.8.0" | ||
| }, | ||
| "dependencies": {} | ||
| } | ||
| } |
+8
-8
@@ -64,4 +64,4 @@ # react-focus-onkeydown | ||
| [build-badge]: https://img.shields.io/travis/perrin4869/react-focus-onkeydown/master.svg?style=flat-square | ||
| [build]: https://travis-ci.org/perrin4869/react-focus-onkeydown | ||
| [build-badge]: https://img.shields.io/github/workflow/status/dotcore64/react-focus-onkeydown/test/master?style=flat-square | ||
| [build]: https://github.com/dotcore64/react-focus-onkeydown/actions | ||
@@ -71,9 +71,9 @@ [npm-badge]: https://img.shields.io/npm/v/react-focus-onkeydown.svg?style=flat-square | ||
| [coveralls-badge]: https://img.shields.io/coveralls/perrin4869/react-focus-onkeydown/master.svg?style=flat-square | ||
| [coveralls]: https://coveralls.io/r/perrin4869/react-focus-onkeydown | ||
| [coveralls-badge]: https://img.shields.io/coveralls/dotcore64/react-focus-onkeydown/master.svg?style=flat-square | ||
| [coveralls]: https://coveralls.io/r/dotcore64/react-focus-onkeydown | ||
| [dependency-status-badge]: https://david-dm.org/perrin4869/react-focus-onkeydown.svg?style=flat-square | ||
| [dependency-status]: https://david-dm.org/perrin4869/react-focus-onkeydown | ||
| [dependency-status-badge]: https://david-dm.org/dotcore64/react-focus-onkeydown.svg?style=flat-square | ||
| [dependency-status]: https://david-dm.org/dotcore64/react-focus-onkeydown | ||
| [dev-dependency-status-badge]: https://david-dm.org/perrin4869/react-focus-onkeydown/dev-status.svg?style=flat-square | ||
| [dev-dependency-status]: https://david-dm.org/perrin4869/react-focus-onkeydown#info=devDependencies | ||
| [dev-dependency-status-badge]: https://david-dm.org/dotcore64/react-focus-onkeydown/dev-status.svg?style=flat-square | ||
| [dev-dependency-status]: https://david-dm.org/dotcore64/react-focus-onkeydown#info=devDependencies |
7397
1.13%35
6.06%