Update documentation dependencies
parent
516a0a3c13
commit
a6e162ec9e
|
@ -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,
|
||||
|
|
|
@ -81,7 +81,7 @@ const Home = () => (
|
|||
</section>
|
||||
|
||||
<footer className={style.footer}>
|
||||
<p>React Toolbox © 2015</p>
|
||||
<p>React Toolbox © 2016</p>
|
||||
<small>Crafted with <span className={style.love}>ღ</span> between Spain and Thailand</small>
|
||||
</footer>
|
||||
</article>
|
||||
|
|
|
@ -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}`;
|
||||
}
|
||||
|
||||
const MainNavigation = ({ className }, { router }) => {
|
||||
const drawerItems = Object.keys(components).map((key) => {
|
||||
const isActive = router.isActive(components[key].path);
|
||||
return (
|
||||
<ListItem
|
||||
key={key}
|
||||
caption={ToolboxComponent.name}
|
||||
className={className}
|
||||
caption={components[key].name}
|
||||
className={classnames(style.item, { [style.active]: isActive })}
|
||||
selectable
|
||||
to={to}
|
||||
onClick={() => { router.push(components[key].path);}}
|
||||
/>
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
render () {
|
||||
let className = style.root;
|
||||
if (this.props.className) className += ` ${this.props.className}`;
|
||||
|
||||
return (
|
||||
<aside className={className}>
|
||||
<aside className={classnames(style.root, { [className]: className })}>
|
||||
<List className={style.list} selectable ripple>
|
||||
{this.renderDrawerItems()}
|
||||
{drawerItems}
|
||||
</List>
|
||||
<footer className={style.footer}>
|
||||
<span>React Toolbox © 2015</span>
|
||||
<span>React Toolbox © 2016</span>
|
||||
</footer>
|
||||
</aside>
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
MainNavigation.propTypes = {
|
||||
className: PropTypes.string
|
||||
};
|
||||
|
||||
MainNavigation.contextTypes = {
|
||||
router: PropTypes.object
|
||||
};
|
||||
|
||||
export default MainNavigation;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) => (
|
||||
<Button
|
||||
raised
|
||||
accent
|
||||
icon='code'
|
||||
label='Load in playground'
|
||||
label="Load in playground"
|
||||
onClick={props.onClick}
|
||||
raised
|
||||
/>
|
||||
);
|
||||
};
|
||||
);
|
||||
|
||||
LoadExampleButton.propTypes = {
|
||||
onClick: React.PropTypes.func
|
||||
|
|
|
@ -63,9 +63,10 @@ $documentation-table-font-size: 1.4 * $unit;
|
|||
text-align: left;
|
||||
> button {
|
||||
height: $documentation-playground-button-height;
|
||||
> span {
|
||||
font-size: $documentation-playground-button-font-size;
|
||||
line-height: $documentation-playground-button-height;
|
||||
> span {
|
||||
line-height: $documentation-playground-button-height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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((
|
||||
<Router history={createHashHistory({queryKey: false})}>
|
||||
<Router history={browserHistory}>
|
||||
<Route component={App}>
|
||||
<Route path="/" component={Home} />
|
||||
<Route path="/install" component={Install} />
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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')
|
||||
},
|
||||
|
|
|
@ -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')
|
||||
},
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<link rel="canonical" href="http://www.react-toolbox.com/">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
|
||||
<link rel="stylesheet" href="docs.css">
|
||||
<link rel="stylesheet" href="/docs.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -44,6 +44,6 @@
|
|||
|
||||
</script>
|
||||
<div id="app"></div>
|
||||
<script src="docs.js"></script>
|
||||
<script src="/docs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
14
package.json
14
package.json
|
@ -73,11 +73,11 @@
|
|||
"phantomjs": "^2.1.7",
|
||||
"phantomjs-polyfill": "0.0.2",
|
||||
"postcss-loader": "^0.8.2",
|
||||
"react": "^15.0.0",
|
||||
"react-addons-css-transition-group": "^15.0.0",
|
||||
"react-addons-test-utils": "^15.0.0",
|
||||
"react": "^15.0.1",
|
||||
"react-addons-css-transition-group": "^15.0.1",
|
||||
"react-addons-test-utils": "^15.0.1",
|
||||
"react-docgen": "^2.8.1",
|
||||
"react-dom": "^15.0.0",
|
||||
"react-dom": "^15.0.1",
|
||||
"react-transform-catch-errors": "^1.0.0",
|
||||
"react-transform-hmr": "^1.0.4",
|
||||
"redbox-react": "^1.2.3",
|
||||
|
@ -108,9 +108,9 @@
|
|||
"peerDependencies": {
|
||||
"classnames": "^2.2.0",
|
||||
"normalize.css": "^4.0.0",
|
||||
"react": "^0.14 || ^15.0.0",
|
||||
"react-addons-css-transition-group": "^0.14.0 || ^15.0.0",
|
||||
"react-dom": "^0.14.0 || ^15.0.0"
|
||||
"react": "^0.14 || ^15.0.1",
|
||||
"react-addons-css-transition-group": "^0.14.0 || ^15.0.1",
|
||||
"react-dom": "^0.14.0 || ^15.0.1"
|
||||
},
|
||||
"typings": "./react-toolbox.d.ts"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue