focus-trap-react
Advanced tools
Comparing version 1.0.0 to 2.0.0
var React = require('react'); | ||
var ReactDOM = require('react-dom'); | ||
var focusTrap = require('focus-trap'); | ||
@@ -43,3 +44,3 @@ | ||
activateTrap: function() { | ||
focusTrap.activate(React.findDOMNode(this), { | ||
focusTrap.activate(ReactDOM.findDOMNode(this), { | ||
onDeactivate: this.props.onDeactivate, | ||
@@ -46,0 +47,0 @@ initialFocus: this.props.initialFocus, |
{ | ||
"name": "focus-trap-react", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "A React component that traps focus.", | ||
@@ -12,7 +12,5 @@ "main": "index.js", | ||
"demo-dev": "parallelshell \"npm run demo-watch\" \"npm run demo-bs\"", | ||
"test-bundle": "browserify test -t babelify -o test/test-bundle.js --extension=.jsx", | ||
"test-dev": "watchify test -d -t babelify -o test/test-bundle.js -v --extension=.jsx", | ||
"test-single": "karma start --single-run", | ||
"test-dev": "zuul --local 8080 --open -- test/index.js", | ||
"pretest": "npm run lint", | ||
"test": "npm run test-bundle && npm run test-single" | ||
"test": "zuul -- test/index.js" | ||
}, | ||
@@ -41,19 +39,17 @@ "repository": { | ||
"devDependencies": { | ||
"babelify": "6.2.0", | ||
"browser-sync": "2.8.2", | ||
"browserify": "11.0.1", | ||
"es5-shim": "4.1.10", | ||
"eslint": "1.2.1", | ||
"karma": "0.13.9", | ||
"karma-phantomjs-launcher": "0.2.1", | ||
"karma-tap": "1.0.3", | ||
"babelify": "6.3.0", | ||
"browser-sync": "2.9.11", | ||
"browserify": "11.2.0", | ||
"eslint": "1.7.1", | ||
"parallelshell": "2.0.0", | ||
"phantomjs": "1.9.18", | ||
"sinon": "1.16.1", | ||
"tape": "4.2.0", | ||
"watchify": "3.3.1" | ||
"react-addons-test-utils": "^0.14.0", | ||
"sinon": "1.17.1", | ||
"tape": "4.2.1", | ||
"watchify": "3.4.0", | ||
"zuul": "3.6.0" | ||
}, | ||
"dependencies": { | ||
"focus-trap": "^1.0.0", | ||
"react": "0.13.x" | ||
"react": "0.14.x", | ||
"react-dom": "0.14.x" | ||
}, | ||
@@ -60,0 +56,0 @@ "files": [ |
@@ -27,9 +27,16 @@ # focus-trap-react [![Build Status](https://travis-ci.org/davidtheclark/focus-trap-react.svg?branch=0.1.0)](https://travis-ci.org/davidtheclark/focus-trap-react) | ||
### React dependency | ||
Version 2+ is compatible with React 0.14.x. | ||
Version 1 is compatible with React 0.13.x. | ||
## Browser Support | ||
IE9+ | ||
Basically IE9+. See `.zuul.yml` for more details. | ||
Why? | ||
Because this module's core functionality comes from focus-trap, which uses [a couple of IE9+ functions](https://github.com/davidtheclark/tabbable#browser-support). | ||
Why? Because this module's core functionality comes from focus-trap, which uses [a couple of IE9+ functions](https://github.com/davidtheclark/tabbable#browser-support). | ||
Automated testing is done with [zuul](https://github.com/defunctzombie/zuul) and [Open Suace](https://saucelabs.com/opensauce/). | ||
## Usage | ||
@@ -89,4 +96,2 @@ | ||
}); | ||
React.render(<DemoOne />, document.getElementById('demo-one')); | ||
``` | ||
@@ -145,1 +150,9 @@ | ||
An inline style object ([in React fashion](https://facebook.github.io/react/tips/inline-styles.html)) for the `FocusTrap`'s DOM node. | ||
## Contributing & Development | ||
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. | ||
Lint with `npm run lint`. | ||
Test with `npm run test-dev`, which will give you a URL to open in your browser. Look at the console log for TAP output. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8623
10
53
156
3
+ Addedreact-dom@0.14.x
+ Addedasap@2.0.6(transitive)
+ Addedcore-js@1.2.7(transitive)
+ Addedfbjs@0.6.1(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedpromise@7.3.1(transitive)
+ Addedreact@0.14.10(transitive)
+ Addedreact-dom@0.14.10(transitive)
+ Addedua-parser-js@0.7.39(transitive)
+ Addedwhatwg-fetch@0.9.0(transitive)
- Removedreact@0.13.3(transitive)
Updatedreact@0.14.x