UNPKG

react-cool-onclickoutside

Version:

React hook to listen for clicks outside of the component(s).

109 lines (108 loc) 3.61 kB
{ "name": "react-cool-onclickoutside", "version": "1.7.0", "description": "React hook to listen for clicks outside of the component(s).", "license": "MIT", "homepage": "https://react-cool-onclickoutside.netlify.app", "repository": "https://github.com/wellyshen/react-cool-onclickoutside", "bugs": "https://github.com/wellyshen/react-cool-onclickoutside/issues", "keywords": [ "react", "hook", "react-hook", "onclickoutside-hook", "on-click-outside-hook", "use", "use-onclickoutside", "use-on-click-outside", "onclickoutside", "on-click-outside", "click", "outside", "click-outside", "multiple-refs", "passive-event-listeners", "exclude-scrollbar", "typescript" ], "author": "Welly Shen <hivoid19@gmail.com> (https://github.com/wellyshen)", "main": "dist/index.js", "module": "dist/index.esm.js", "types": "dist/index.d.ts", "files": [ "dist" ], "scripts": { "dev": "yarn clean:dev && rollup -c rollup/config.js -w --environment BUILD:dev", "lint": "run-s lint:*", "lint:code": "eslint --fix . --ext .js,.ts,.tsx", "lint:type": "tsc", "lint:style": "stylelint --fix \"**/*.{css,ts,tsx}\"", "lint:format": "prettier -w . -u --loglevel silent", "test": "jest", "test:watch": "yarn test --watch", "test:cov": "yarn clean:cov && yarn test --coverage", "build:demo": "yarn clean:dev && yarn clean:demo && rollup -c rollup/config.js --environment BUILD:demo", "build:dist": "yarn clean:dist && BABEL_ENV=dist rollup -c rollup/config.js --environment BUILD:dist", "build": "run-s build:*", "preversion": "run-s lint test build:dist", "postversion": "git push --follow-tags --no-verify && npm publish && yarn clean:dist", "clean:dev": "rimraf demo/.dev", "clean:demo": "rimraf public", "clean:dist": "rimraf dist .size-snapshot.json", "clean:cov": "rimraf coverage", "clean": "run-p clean:*", "prepare": "husky install" }, "lint-staged": { "*.{js,ts,tsx}": "eslint --fix", "*.{css,ts,tsx}": "stylelint --fix", "**/*": "prettier -w -u" }, "devDependencies": { "@babel/core": "^7.14.3", "@babel/preset-env": "^7.14.2", "@babel/preset-react": "^7.13.13", "@babel/preset-typescript": "^7.13.0", "@emotion/babel-plugin": "^11.3.0", "@emotion/react": "^11.4.0", "@rollup/plugin-babel": "^5.3.0", "@rollup/plugin-commonjs": "^19.0.0", "@rollup/plugin-html": "^0.2.3", "@rollup/plugin-node-resolve": "^13.0.0", "@rollup/plugin-replace": "^2.4.2", "@rollup/plugin-url": "^6.0.0", "@testing-library/react": "^11.2.7", "@types/jest": "^26.0.23", "@types/react": "^17.0.5", "@types/react-dom": "^17.0.5", "eslint": "^7.2.0", "eslint-config-welly": "^1.10.2", "husky": "^6.0.0", "jest": "^26.6.3", "lint-staged": "^11.0.0", "normalize.css": "^8.0.1", "npm-run-all": "^4.1.5", "postcss": "^8.2.15", "prettier": "^2.3.0", "react": "^17.0.2", "react-dom": "^17.0.2", "react-test-renderer": "^17.0.2", "rimraf": "^3.0.2", "rollup": "^2.48.0", "rollup-plugin-copy": "^3.4.0", "rollup-plugin-livereload": "^2.0.0", "rollup-plugin-postcss": "^4.0.0", "rollup-plugin-serve": "^1.1.0", "rollup-plugin-size-snapshot": "^0.12.0", "rollup-plugin-terser": "^7.0.2", "stylelint": "^13.13.1", "stylelint-config-prettier": "^8.0.2", "stylelint-config-standard": "^22.0.0", "ts-jest": "^26.5.6", "typescript": "^4.2.4" }, "peerDependencies": { "react": ">= 16.8.0" } }