diff --git a/docs/.eslintrc b/docs/.eslintrc
index 6f9f9cd8..1b11bd11 100644
--- a/docs/.eslintrc
+++ b/docs/.eslintrc
@@ -32,7 +32,7 @@
"comma-style": [2, "last"],
"complexity": [0, 11],
"constructor-super": [2],
- "consistent-return": [2],
+ "consistent-return": [0],
"consistent-this": [0, "that"],
"curly": [2, "multi-line"],
"default-case": [2],
@@ -44,7 +44,6 @@
"func-names": [0],
"func-style": [0, "declaration"],
"generator-star-spacing": [2, "after"],
- "strict": [2, "always"],
"guard-for-in": [0],
"handle-callback-err": [0],
"key-spacing": [2, {
@@ -79,7 +78,6 @@
"no-else-return": [0],
"no-empty": [2],
"no-empty-character-class": [2],
- "no-empty-label": [2],
"no-eq-null": [0],
"no-eval": [2],
"no-ex-assign": [2],
@@ -149,7 +147,9 @@
"no-undefined": [0],
"no-underscore-dangle": [0],
"no-unreachable": [2],
- "no-unused-expressions": [2],
+ "no-unused-expressions": [2, {
+ "allowShortCircuit": true
+ }],
"no-unused-vars": [1, {
"vars": "all",
"args": "after-used"
@@ -164,23 +164,16 @@
"no-with": [2],
"one-var": [0],
"operator-assignment": [0, "always"],
- "operator-linebreak": [2, "after"],
+ "operator-linebreak": [2, "before"],
"padded-blocks": [0],
"prefer-const": [2],
"prefer-spread": [2],
"quote-props": [0],
"radix": [0],
"semi": [2],
- "semi-spacing": [2, {
- "before": false,
- "after": true
- }],
"sort-vars": [0],
- "space-after-keywords": [2, "always"],
- "space-before-function-paren": [2, {
- "anonymous": "always",
- "named": "always"
- }],
+ "keyword-spacing": [2, {"after": true}],
+ "space-before-function-paren": [2, { "anonymous": "always", "named": "always" }],
"space-before-blocks": [0, "always"],
"space-in-brackets": [0, "never", {
"singleValue": true,
@@ -192,7 +185,6 @@
}],
"space-in-parens": [2, "never"],
"space-infix-ops": [2],
- "space-return-throw-case": [2],
"space-unary-ops": [2, {
"words": true,
"nonwords": false
@@ -218,7 +210,7 @@
"react/jsx-no-duplicate-props": 1,
"react/jsx-no-undef": 1,
"react/jsx-pascal-case": 1,
- "react/jsx-sort-prop-types": 1,
+ "react/sort-prop-types": 1,
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
diff --git a/docs/app/components/layout/home/index.jsx b/docs/app/components/layout/home/index.jsx
index 8614b117..86b01151 100644
--- a/docs/app/components/layout/home/index.jsx
+++ b/docs/app/components/layout/home/index.jsx
@@ -81,7 +81,7 @@ const Home = () => (
diff --git a/docs/app/components/layout/main/components/navigation.jsx b/docs/app/components/layout/main/components/navigation.jsx
index facb3ff6..8d6a5a24 100644
--- a/docs/app/components/layout/main/components/navigation.jsx
+++ b/docs/app/components/layout/main/components/navigation.jsx
@@ -1,53 +1,41 @@
-import React from 'react';
-import { History } from 'react-router';
+import React, { PropTypes } from 'react';
import { List, ListItem } from 'react-toolbox';
+import classnames from 'classnames';
import components from '../modules/components';
import style from './navigation.scss';
-const MainNavigation = React.createClass({
- propTypes: {
- active: React.PropTypes.bool,
- className: React.PropTypes.string
- },
-
- mixins: [History],
-
- renderDrawerItems () {
- return Object.keys(components).map((key) => {
- const ToolboxComponent = components[key];
- const to = this.context.history.createHref(ToolboxComponent.path);
- let className = style.item;
- if (this.context.history.isActive(ToolboxComponent.path)) {
- className += ` ${style.active}`;
- }
-
- return (
-
- );
- });
- },
-
- render () {
- let className = style.root;
- if (this.props.className) className += ` ${this.props.className}`;
-
+const MainNavigation = ({ className }, { router }) => {
+ const drawerItems = Object.keys(components).map((key) => {
+ const isActive = router.isActive(components[key].path);
return (
-
+ { router.push(components[key].path);}}
+ />
);
- }
-});
+ });
+
+ return (
+
+ );
+};
+
+MainNavigation.propTypes = {
+ className: PropTypes.string
+};
+
+MainNavigation.contextTypes = {
+ router: PropTypes.object
+};
export default MainNavigation;
diff --git a/docs/app/components/layout/main/components/navigation.scss b/docs/app/components/layout/main/components/navigation.scss
index 53931234..37203cc2 100644
--- a/docs/app/components/layout/main/components/navigation.scss
+++ b/docs/app/components/layout/main/components/navigation.scss
@@ -14,10 +14,10 @@
}
.item {
- a > span{
+ > span{
padding: $navigation-v-padding $navigation-h-padding;
}
- > span > span {
+ [data-react-toolbox="list-item-text"] {
font-size: $font-size-small;
font-weight: $font-weight-semi-bold;
}
diff --git a/docs/app/components/layout/main/index.jsx b/docs/app/components/layout/main/index.jsx
index 84e40e5d..66d9b2fb 100644
--- a/docs/app/components/layout/main/index.jsx
+++ b/docs/app/components/layout/main/index.jsx
@@ -9,17 +9,15 @@ import BaseDocs from './modules/components.md';
import components from './modules/components.js';
import style from './style';
-const LoadExampleButton = (props) => {
- return (
-
- );
-};
+const LoadExampleButton = (props) => (
+
+);
LoadExampleButton.propTypes = {
onClick: React.PropTypes.func
diff --git a/docs/app/components/markdown/style.scss b/docs/app/components/markdown/style.scss
index 21735434..14f503e1 100644
--- a/docs/app/components/markdown/style.scss
+++ b/docs/app/components/markdown/style.scss
@@ -63,8 +63,9 @@ $documentation-table-font-size: 1.4 * $unit;
text-align: left;
> button {
height: $documentation-playground-button-height;
+ font-size: $documentation-playground-button-font-size;
+ line-height: $documentation-playground-button-height;
> span {
- font-size: $documentation-playground-button-font-size;
line-height: $documentation-playground-button-height;
}
}
diff --git a/docs/app/index.jsx b/docs/app/index.jsx
index 418acd1f..ebc9cb46 100644
--- a/docs/app/index.jsx
+++ b/docs/app/index.jsx
@@ -1,17 +1,16 @@
import React from 'react';
import ReactDOM from 'react-dom';
-import { Router, Route, IndexRoute } from 'react-router';
+import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import 'react-toolbox/commons';
import { App } from 'react-toolbox';
-import { createHashHistory } from 'history';
import Home from './components/layout/home';
import Install from './components/layout/install';
import Main from './components/layout/main';
ReactDOM.render((
-
+
diff --git a/docs/package.json b/docs/package.json
index 56e7c075..942bc44c 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -10,46 +10,46 @@
},
"dependencies": {
"babel-standalone": "^6.7.4",
- "classnames": "^2.2.1",
+ "classnames": "^2.2.3",
"codemirror": "^5.10.0",
- "history": "^1.17.0",
- "react": "^0.14.3",
- "react-dom": "^0.14.3",
- "react-router": "^1.0.0-rc3"
+ "history": "^2.0.1",
+ "react": "^15.0.1",
+ "react-dom": "^15.0.1",
+ "react-router": "^2.0.1"
},
"devDependencies": {
- "autoprefixer": "^6.2.1",
- "babel-core": "^6.3.26",
- "babel-eslint": "^5.0.0-beta4",
- "babel-loader": "^6.2.0",
- "babel-plugin-react-transform": "^2.0.0-beta1",
- "babel-preset-es2015": "^6.3.13",
- "babel-preset-react": "^6.3.13",
- "babel-preset-stage-0": "^6.3.13",
- "babel-preset-stage-2": "^6.3.13",
+ "autoprefixer": "^6.3.6",
+ "babel-core": "^6.7.6",
+ "babel-eslint": "^6.0.2",
+ "babel-loader": "^6.2.4",
+ "babel-plugin-react-transform": "^2.0.2",
+ "babel-preset-es2015": "^6.6.0",
+ "babel-preset-react": "^6.5.0",
+ "babel-preset-stage-0": "^6.5.0",
+ "babel-preset-stage-2": "^6.5.0",
"cross-env": "^1.0.5",
"css-loader": "^0.23.1",
"express": "^4.13.3",
- "extract-text-webpack-plugin": "^0.9.1",
- "gh-pages": "^0.8.0",
+ "extract-text-webpack-plugin": "^1.0.1",
+ "gh-pages": "^0.11.0",
"highlight-loader": "git://github.com/javivelasco/highlight-loader.git#master",
- "highlight.js": "^9.0.0",
+ "highlight.js": "^9.3.0",
"html-loader": "^0.4.0",
- "html-webpack-plugin": "^1.7.0",
+ "html-webpack-plugin": "^2.15.0",
"markdown-loader": "^0.1.7",
"node-sass": "^3.4.2",
- "postcss-loader": "^0.8.0",
+ "postcss-loader": "^0.8.2",
"raw-loader": "^0.5.1",
- "react-transform-catch-errors": "^1.0.0",
+ "react-transform-catch-errors": "^1.0.2",
"react-transform-hmr": "^1.0.1",
- "redbox-react": "^1.2.0",
- "sass-loader": "^3.1.2",
- "style-loader": "^0.13.0",
+ "redbox-react": "^1.2.3",
+ "sass-loader": "^3.2.0",
+ "style-loader": "^0.13.1",
"toolbox-loader": "0.0.2",
"transfer-webpack-plugin": "^0.1.4",
- "webpack": "^1.12.9",
- "webpack-dev-middleware": "^1.4.0",
- "webpack-hot-middleware": "^2.6.0"
+ "webpack": "^1.12.14",
+ "webpack-dev-middleware": "^1.6.1",
+ "webpack-hot-middleware": "^2.10.0"
},
"repository": "github:react-toolbox/react-toolbox",
"license": "MIT"
diff --git a/docs/server.js b/docs/server.js
index fd1a457b..85eabda2 100644
--- a/docs/server.js
+++ b/docs/server.js
@@ -7,7 +7,7 @@ const app = express();
const compiler = webpack(config);
app.use(require('webpack-dev-middleware')(compiler, {
- noInfo: true,
+ noInfo: true,
publicPath: config.output.publicPath,
stats: {
colors: true
@@ -17,14 +17,14 @@ app.use(require('webpack-dev-middleware')(compiler, {
app.use(require('webpack-hot-middleware')(compiler));
app.get('*', function (req, res) {
- res.sendFile(path.join(__dirname, './www/index.html'));
+ res.sendFile(path.join(__dirname, './www/index.html'));
});
app.listen(8081, '0.0.0.0', function (err) {
- if (err) {
- console.log(err);
- return;
- }
+ if (err) {
+ console.log(err);
+ return;
+ }
- console.log('Listening at http://0.0.0.0:8081');
+ console.log('Listening at http://0.0.0.0:8081');
});
diff --git a/docs/webpack.config.development.js b/docs/webpack.config.development.js
index 1e0d0de2..b9d72831 100644
--- a/docs/webpack.config.development.js
+++ b/docs/webpack.config.development.js
@@ -18,6 +18,7 @@ module.exports = {
},
resolve: {
extensions: ['', '.jsx', '.scss', '.js', '.json', '.md'],
+ packageMains: ['browser', 'web', 'browserify', 'main', 'style'],
alias: {
'react-toolbox': path.resolve(__dirname + './../components')
},
diff --git a/docs/webpack.config.production.js b/docs/webpack.config.production.js
index ad739ec9..0253d450 100644
--- a/docs/webpack.config.production.js
+++ b/docs/webpack.config.production.js
@@ -14,6 +14,7 @@ module.exports = {
},
resolve: {
extensions: ['', '.jsx', '.scss', '.js', '.json', '.md'],
+ packageMains: ['browser', 'web', 'browserify', 'main', 'style'],
alias: {
'react-toolbox': path.resolve(__dirname + './../components')
},
diff --git a/docs/www/index.html b/docs/www/index.html
index a875ef4b..ae3105bc 100644
--- a/docs/www/index.html
+++ b/docs/www/index.html
@@ -29,7 +29,7 @@
-
+
@@ -44,6 +44,6 @@
-
+