diff --git a/.babelrc b/.babelrc
index 35de037..c4b1778 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,3 +1,17 @@
{
- "presets": ["@babel/preset-env", "@babel/preset-stage-0", "@babel/preset-react"],
+ "presets": [
+ ["@babel/preset-env", {
+ "modules": false,
+ "useBuiltIns": "usage"
+ }],
+ ["@babel/preset-stage-0", {
+ "decoratorsLegacy": true
+ }],
+ "@babel/preset-react"
+ ],
+ "env": {
+ "node": {
+ "plugins": ["transform-es2015-modules-commonjs"]
+ }
+ }
}
diff --git a/.docsrc/.babelrc.js b/.docsrc/.babelrc.js
new file mode 100644
index 0000000..bfc04c6
--- /dev/null
+++ b/.docsrc/.babelrc.js
@@ -0,0 +1,20 @@
+module.exports = {
+ "presets": [
+ ["@babel/preset-env", {
+ "modules": false,
+ "useBuiltIns": "usage",
+ "targets": {
+ "browsers": [ ">1%", "not ie 10" ],
+ },
+ }],
+ ["@babel/preset-stage-0", {
+ "decoratorsLegacy": true
+ }],
+ "@babel/preset-react",
+ ],
+ "plugins": [
+ "@larsbs/babel-plugin-react-docgen",
+ "babel-plugin-preval",
+ "babel-plugin-codegen",
+ ],
+};
diff --git a/.docsrc/app/app.js b/.docsrc/app/app.js
new file mode 100644
index 0000000..433baa3
--- /dev/null
+++ b/.docsrc/app/app.js
@@ -0,0 +1,20 @@
+import React from 'react';
+import { BrowserRouter as Router, Route } from 'react-router-dom';
+
+import Root from './routes/Root';
+
+import './styles/app';
+
+
+class App extends React.Component {
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+
+export default App;
diff --git a/.docsrc/app/bootstrap.js b/.docsrc/app/bootstrap.js
new file mode 100644
index 0000000..369e8d3
--- /dev/null
+++ b/.docsrc/app/bootstrap.js
@@ -0,0 +1,3 @@
+export default function bootstrap(next) {
+ next();
+}
diff --git a/.docsrc/app/components/Knobs/components/Knobs.jsx b/.docsrc/app/components/Knobs/components/Knobs.jsx
new file mode 100644
index 0000000..1958e34
--- /dev/null
+++ b/.docsrc/app/components/Knobs/components/Knobs.jsx
@@ -0,0 +1,54 @@
+import React from 'react';
+import merge from 'lodash/merge';
+
+import Prop from './Prop';
+import { getProps } from '../utils';
+
+import styles from '../styles/knobs';
+import OneOfProp from './props/OneOfProp';
+
+
+class Knobs extends React.Component {
+
+ state ={
+ values: {},
+ };
+
+ render() {
+ const { component: Component, defaults } = this.props;
+ const { values } = this.state;
+ const props = getProps(Component);
+ const finalValues = merge({}, defaults, values);
+ return (
+
+
+
Example
+
+
+
+
+
+ {Object.keys(props).map((key) => (
+
+
+
+
this.setState({ values: { ...values, [n]: v } })}>
+
+
+
+ ))}
+
+
+ );
+ }
+
+}
+
+
+export default Knobs;
diff --git a/.docsrc/app/components/Knobs/components/Prop.jsx b/.docsrc/app/components/Knobs/components/Prop.jsx
new file mode 100644
index 0000000..6dbfbed
--- /dev/null
+++ b/.docsrc/app/components/Knobs/components/Prop.jsx
@@ -0,0 +1,32 @@
+import React from 'react';
+
+import { BoolProp, OneOfProp, StringProp } from './props';
+
+import styles from '../styles/prop';
+
+
+const Prop = ({
+ name,
+ prop,
+ value,
+ onChange,
+}) => {
+ const { name: type } = prop.type;
+ const propWithKey = { ...prop, key: name };
+ if (type === 'bool') {
+ return ;
+ }
+ else if (type === 'enum') {
+ return ;
+ }
+ else if (type === 'string') {
+ return ;
+ }
+ else {
+ console.log(prop);
+ return null;
+ }
+};
+
+
+export default Prop;
diff --git a/.docsrc/app/components/Knobs/components/props/BoolProp.jsx b/.docsrc/app/components/Knobs/components/props/BoolProp.jsx
new file mode 100644
index 0000000..2b2e17d
--- /dev/null
+++ b/.docsrc/app/components/Knobs/components/props/BoolProp.jsx
@@ -0,0 +1,23 @@
+import React from 'react';
+import { Checkbox } from 'react-ittsu/forms/Checkbox';
+
+import styles from '../../styles/bool-prop';
+
+
+const BoolProp = ({
+ prop,
+ value,
+ onChange,
+}) => {
+ const { key } = prop;
+ return (
+
+ );
+}
+
+
+export default BoolProp;
diff --git a/.docsrc/app/components/Knobs/components/props/OneOfProp.jsx b/.docsrc/app/components/Knobs/components/props/OneOfProp.jsx
new file mode 100644
index 0000000..2bda733
--- /dev/null
+++ b/.docsrc/app/components/Knobs/components/props/OneOfProp.jsx
@@ -0,0 +1,23 @@
+import React from 'react';
+import { Select } from 'react-ittsu/forms/Select';
+
+import styles from '../../styles/one-of-prop';
+
+
+const OneOfProp = ({
+ prop,
+ value,
+ onChange,
+}) => {
+ const { key, type } = prop;
+ return (
+