From 6aa5b3e6a2e3c57e4da6787d59f970db4d6dfb0e Mon Sep 17 00:00:00 2001 From: Standa Opichal Date: Thu, 4 Aug 2016 14:58:29 +0200 Subject: [PATCH] Dropping unused FocusTrap --- examples/master/index.js | 2 +- lib/FocusTrap.js | 34 --------------------------------- lib/FocusTrapHOC.js | 1 - lib/HotKeys.js | 1 - lib/__tests__/FocusTrap-test.js | 11 ----------- lib/index.js | 3 +-- 6 files changed, 2 insertions(+), 50 deletions(-) delete mode 100644 lib/FocusTrap.js delete mode 100644 lib/FocusTrapHOC.js delete mode 100644 lib/__tests__/FocusTrap-test.js diff --git a/examples/master/index.js b/examples/master/index.js index 626267f9..a99e13dc 100644 --- a/examples/master/index.js +++ b/examples/master/index.js @@ -1,7 +1,7 @@ import {HotKeys, HotKeyMapMixin} from 'react-hotkeys'; import React from 'react'; import ReactDOM from 'react-dom'; -import rand from 'lodash/number/random'; +import rand from 'lodash/random'; const DEFAULT_NODE_SIZE = 100; const SIZE_INCREMENT = 5; diff --git a/lib/FocusTrap.js b/lib/FocusTrap.js deleted file mode 100644 index c8cdd593..00000000 --- a/lib/FocusTrap.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react'; - -const FocusTrap = React.createClass({ - - propTypes: { - onFocus: React.PropTypes.func, - onBlur: React.PropTypes.func, - component: React.PropTypes.any, - children: React.PropTypes.node - }, - - getDefaultProps() { - return { - component: 'div' - }; - }, - - render() { - const { - component: Component, - children, - ...props - } = this.props; - - return ( - - {children} - - ); - } - -}); - -export default FocusTrap; diff --git a/lib/FocusTrapHOC.js b/lib/FocusTrapHOC.js deleted file mode 100644 index 549e64ad..00000000 --- a/lib/FocusTrapHOC.js +++ /dev/null @@ -1 +0,0 @@ -// TODO: Expose FocusTrap functionality as HoC \ No newline at end of file diff --git a/lib/HotKeys.js b/lib/HotKeys.js index 45a86475..70b860ba 100644 --- a/lib/HotKeys.js +++ b/lib/HotKeys.js @@ -1,6 +1,5 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import FocusTrap from './FocusTrap'; import HotKeyMapMixin from './HotKeyMapMixin'; import isBool from 'lodash/isBoolean'; import isArray from 'lodash/isArray'; diff --git a/lib/__tests__/FocusTrap-test.js b/lib/__tests__/FocusTrap-test.js deleted file mode 100644 index a9b11eea..00000000 --- a/lib/__tests__/FocusTrap-test.js +++ /dev/null @@ -1,11 +0,0 @@ -import assert from 'assert'; -import React from 'react'; -import ReactDOM from 'react-dom'; -import TestUtils from 'react-addons-test-utils'; -import FocusTrap from '../FocusTrap'; - -describe('FocusTrap', function() { - it('should be focusable via a tabindex attribute', function() { - - }); -}); diff --git a/lib/index.js b/lib/index.js index 371eaffa..b51aaf3c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,3 +1,2 @@ export {default as HotKeys} from './HotKeys'; -export {default as FocusTrap} from './FocusTrap'; -export {default as HotKeyMapMixin} from './HotKeyMapMixin'; \ No newline at end of file +export {default as HotKeyMapMixin} from './HotKeyMapMixin';