diff --git a/.github/stale.yml b/.github/stale.yml
index 5935decc230..29f1395531b 100644
--- a/.github/stale.yml
+++ b/.github/stale.yml
@@ -4,11 +4,12 @@ daysUntilStale: 45
daysUntilClose: 15
# Issues with these labels will never be considered stale
exemptLabels:
- - bug
- - 'help wanted'
+ - todo
+ - ready
- 'in progress'
- 'do not merge'
- 'needs review'
+ - 'high priority'
# Label to use when marking an issue as stale
staleLabel: inactive
@@ -16,11 +17,12 @@ staleLabel: inactive
markComment: >
Hi everyone! Seems like there hasn't been much going on in this issue lately.
If there are still questions, comments, or bugs, please feel free to continue
- the discussion. We do try to do some housekeeping every once in a while so
- inactive issues will get closed after 60 days. Thanks!
+ the discussion. Unfortunately, we don't have time to get to every issue. We
+ are always open to contributions so please send us a pull request if you would
+ like to help. Inactive issues will be closed after 60 days. Thanks!
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
- Hey there, it's me again! I am going to help our maintainers close this issue
- so they can focus on development efforts instead. If the issue mentioned is
+ Hey there, it's me again! I am going close this issue to help our maintainers
+ focus on the current development roadmap instead. If the issue mentioned is
still a concern, please open a new ticket and mention this old one. Cheers
and thanks for using Storybook!
diff --git a/addons/a11y/.storybook/addons.js b/addons/a11y/.storybook/addons.js
new file mode 100755
index 00000000000..e4f70f25bfa
--- /dev/null
+++ b/addons/a11y/.storybook/addons.js
@@ -0,0 +1 @@
+import '../register';
diff --git a/addons/a11y/.storybook/components/Button/component.js b/addons/a11y/.storybook/components/Button/component.js
new file mode 100644
index 00000000000..cef6111d522
--- /dev/null
+++ b/addons/a11y/.storybook/components/Button/component.js
@@ -0,0 +1,47 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+
+const styles = {
+ button: {
+ padding: '12px 6px',
+ fontSize: '12px',
+ lineHeight: '16px',
+ borderRadius: '5px',
+ },
+ ok: {
+ backgroundColor: '#028402',
+ color: '#ffffff',
+ },
+ wrong: {
+ color: '#ffffff',
+ backgroundColor: '#4caf50',
+ }
+}
+
+function Button({ label, content, disabled, contrast }) {
+ return (
+
+ )
+}
+
+Button.propTypes = {
+ label: PropTypes.string,
+ content: PropTypes.string,
+ disabled: PropTypes.bool,
+ contrast: PropTypes.oneOf(['ok', 'wrong'])
+};
+
+Button.defaultProps = {
+ disabled: false,
+ contrast: 'ok',
+};
+
+export default Button;
diff --git a/addons/a11y/.storybook/components/Button/stories.js b/addons/a11y/.storybook/components/Button/stories.js
new file mode 100644
index 00000000000..269e5cab100
--- /dev/null
+++ b/addons/a11y/.storybook/components/Button/stories.js
@@ -0,0 +1,34 @@
+import React from 'react';
+import { storiesOf } from '@storybook/react';
+
+import { checkA11y } from './../../../src';
+
+import Button from './component';
+
+import Faker from 'faker';
+
+const text = Faker.lorem.words();
+
+storiesOf('', module)
+ .addDecorator(checkA11y)
+ .add('Default', () => (
+
+ ))
+ .add('Content', () => (
+
+ ))
+ .add('Label', () => (
+
+ ))
+ .add('Disabled', () => (
+
+ ))
+ .add('Invalid contrast', () => (
+
+ ));
diff --git a/addons/a11y/.storybook/components/Form/components/Input.js b/addons/a11y/.storybook/components/Form/components/Input.js
new file mode 100644
index 00000000000..bee6d133726
--- /dev/null
+++ b/addons/a11y/.storybook/components/Form/components/Input.js
@@ -0,0 +1,22 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+
+function Input({ id, value, type, placeholder }) {
+ return (
+
+ );
+}
+
+Input.propTypes = {
+ type: PropTypes.oneOf(['text', 'password']),
+ id: PropTypes.string,
+ value: PropTypes.string,
+ placeholder: PropTypes.string,
+}
+
+export default Input;
diff --git a/addons/a11y/.storybook/components/Form/components/Label.js b/addons/a11y/.storybook/components/Form/components/Label.js
new file mode 100644
index 00000000000..cdae59704b2
--- /dev/null
+++ b/addons/a11y/.storybook/components/Form/components/Label.js
@@ -0,0 +1,26 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+
+const styles = {
+ label: {
+ padding: '0 6px',
+ },
+}
+
+function Label({ id, content }) {
+ return (
+
+ )
+}
+
+Label.propTypes = {
+ content: PropTypes.string,
+ id: PropTypes.string,
+};
+
+export default Label;
diff --git a/addons/a11y/.storybook/components/Form/components/Row.js b/addons/a11y/.storybook/components/Form/components/Row.js
new file mode 100644
index 00000000000..3cc62011201
--- /dev/null
+++ b/addons/a11y/.storybook/components/Form/components/Row.js
@@ -0,0 +1,21 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+
+import Label from './Label';
+import Input from './Input';
+
+function Row({ label, input }) {
+ return (
+
diff --git a/docs/components/Footer/style.css b/docs/src/components/Footer/style.css
similarity index 100%
rename from docs/components/Footer/style.css
rename to docs/src/components/Footer/style.css
diff --git a/docs/components/Grid/Examples/index.js b/docs/src/components/Grid/Examples/index.js
similarity index 100%
rename from docs/components/Grid/Examples/index.js
rename to docs/src/components/Grid/Examples/index.js
diff --git a/docs/components/Grid/Examples/style.css b/docs/src/components/Grid/Examples/style.css
similarity index 100%
rename from docs/components/Grid/Examples/style.css
rename to docs/src/components/Grid/Examples/style.css
diff --git a/docs/components/Grid/Grid/index.js b/docs/src/components/Grid/Grid/index.js
similarity index 100%
rename from docs/components/Grid/Grid/index.js
rename to docs/src/components/Grid/Grid/index.js
diff --git a/docs/components/Grid/GridItem/index.js b/docs/src/components/Grid/GridItem/index.js
similarity index 100%
rename from docs/components/Grid/GridItem/index.js
rename to docs/src/components/Grid/GridItem/index.js
diff --git a/docs/components/Grid/GridItem/style.css b/docs/src/components/Grid/GridItem/style.css
similarity index 100%
rename from docs/components/Grid/GridItem/style.css
rename to docs/src/components/Grid/GridItem/style.css
diff --git a/docs/components/Header/index.js b/docs/src/components/Header/index.js
similarity index 97%
rename from docs/components/Header/index.js
rename to docs/src/components/Header/index.js
index 6796b3b9c33..94e48293a30 100644
--- a/docs/components/Header/index.js
+++ b/docs/src/components/Header/index.js
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
-import { Link } from 'react-router';
+import Link from 'gatsby-link';
import './style.css';
import storybookLogo from '../../design/homepage/storybook-logo.svg';
diff --git a/docs/components/Header/style.css b/docs/src/components/Header/style.css
similarity index 100%
rename from docs/components/Header/style.css
rename to docs/src/components/Header/style.css
diff --git a/docs/components/Highlight.js b/docs/src/components/Highlight.js
similarity index 100%
rename from docs/components/Highlight.js
rename to docs/src/components/Highlight.js
diff --git a/docs/components/Homepage/Demo/images/demo.gif b/docs/src/components/Homepage/Demo/images/demo.gif
similarity index 100%
rename from docs/components/Homepage/Demo/images/demo.gif
rename to docs/src/components/Homepage/Demo/images/demo.gif
diff --git a/docs/components/Homepage/Demo/index.js b/docs/src/components/Homepage/Demo/index.js
similarity index 100%
rename from docs/components/Homepage/Demo/index.js
rename to docs/src/components/Homepage/Demo/index.js
diff --git a/docs/components/Homepage/Demo/style.css b/docs/src/components/Homepage/Demo/style.css
similarity index 100%
rename from docs/components/Homepage/Demo/style.css
rename to docs/src/components/Homepage/Demo/style.css
diff --git a/docs/components/Homepage/Featured/images/airbnb.png b/docs/src/components/Homepage/Featured/images/airbnb.png
similarity index 100%
rename from docs/components/Homepage/Featured/images/airbnb.png
rename to docs/src/components/Homepage/Featured/images/airbnb.png
diff --git a/docs/components/Homepage/Featured/images/rb.png b/docs/src/components/Homepage/Featured/images/rb.png
similarity index 100%
rename from docs/components/Homepage/Featured/images/rb.png
rename to docs/src/components/Homepage/Featured/images/rb.png
diff --git a/docs/components/Homepage/Featured/images/rnw.png b/docs/src/components/Homepage/Featured/images/rnw.png
similarity index 100%
rename from docs/components/Homepage/Featured/images/rnw.png
rename to docs/src/components/Homepage/Featured/images/rnw.png
diff --git a/docs/components/Homepage/Featured/index.js b/docs/src/components/Homepage/Featured/index.js
similarity index 100%
rename from docs/components/Homepage/Featured/index.js
rename to docs/src/components/Homepage/Featured/index.js
diff --git a/docs/components/Homepage/Featured/style.css b/docs/src/components/Homepage/Featured/style.css
similarity index 100%
rename from docs/components/Homepage/Featured/style.css
rename to docs/src/components/Homepage/Featured/style.css
diff --git a/docs/components/Homepage/Heading/index.js b/docs/src/components/Homepage/Heading/index.js
similarity index 100%
rename from docs/components/Homepage/Heading/index.js
rename to docs/src/components/Homepage/Heading/index.js
diff --git a/docs/components/Homepage/Heading/style.css b/docs/src/components/Homepage/Heading/style.css
similarity index 100%
rename from docs/components/Homepage/Heading/style.css
rename to docs/src/components/Homepage/Heading/style.css
diff --git a/docs/components/Homepage/MainLinks/images/docs.png b/docs/src/components/Homepage/MainLinks/images/docs.png
similarity index 100%
rename from docs/components/Homepage/MainLinks/images/docs.png
rename to docs/src/components/Homepage/MainLinks/images/docs.png
diff --git a/docs/src/components/Homepage/MainLinks/index.js b/docs/src/components/Homepage/MainLinks/index.js
new file mode 100644
index 00000000000..9cee530065b
--- /dev/null
+++ b/docs/src/components/Homepage/MainLinks/index.js
@@ -0,0 +1,135 @@
+import React from 'react';
+import Link from 'gatsby-link';
+import { window } from 'global';
+
+import '../../Docs/Nav/style.css';
+import { UsedByBg } from '../UsedBy/';
+import './style.css';
+
+class MainLinks extends React.Component {
+ componentDidMount() {
+ window.docsearch({
+ apiKey: 'a4f7f972f1d8f99a66e237e7fd2e489f',
+ indexName: 'storybook-js',
+ inputSelector: '#search',
+ debug: false, // Set debug to true if you want to inspect the dropdown
+ });
+ }
+
+ render() {
+ return (
+
+
+
+
Try Now
+
+
+ npm i -g @storybook/cli
+ cd my-react-app
+ getstorybook
+
+
+
+
+
+
+
+
Documentation
+
+
+
+
+ 🔍
+
+
+
+
+
+
+
Basics
+
+
+
+ Quick setup
+
+
+ Adding to existing project
+
+
+ Writing stories
+
+
+
+
+
+
+
Configuration
+
+
+
+ Babel configurations
+
+
+ Webpack configurations
+
+
+ Custom scripts & styling
+
+
+ Serving static files
+
+
+
+
+
+
+
Addons
+
+
+
+ Intro to Addons
+
+
+ Using Addons
+
+
+ Addon Gallery
+
+
+ Writing Addons
+
+
+ Api
+
+
+
+
+
+
+ );
+ }
+}
+
+export default MainLinks;
diff --git a/docs/components/Homepage/MainLinks/style.css b/docs/src/components/Homepage/MainLinks/style.css
similarity index 100%
rename from docs/components/Homepage/MainLinks/style.css
rename to docs/src/components/Homepage/MainLinks/style.css
diff --git a/docs/components/Homepage/Platforms/index.js b/docs/src/components/Homepage/Platforms/index.js
similarity index 100%
rename from docs/components/Homepage/Platforms/index.js
rename to docs/src/components/Homepage/Platforms/index.js
diff --git a/docs/components/Homepage/Platforms/style.css b/docs/src/components/Homepage/Platforms/style.css
similarity index 100%
rename from docs/components/Homepage/Platforms/style.css
rename to docs/src/components/Homepage/Platforms/style.css
diff --git a/docs/components/Homepage/UsedBy/index.jsx b/docs/src/components/Homepage/UsedBy/index.jsx
similarity index 98%
rename from docs/components/Homepage/UsedBy/index.jsx
rename to docs/src/components/Homepage/UsedBy/index.jsx
index 84b3d73aef1..abf77257531 100644
--- a/docs/components/Homepage/UsedBy/index.jsx
+++ b/docs/src/components/Homepage/UsedBy/index.jsx
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
-import { Link } from 'react-router';
+import Link from 'gatsby-link';
import './style.css';
export const UsedByBg = ({ color, style }) => (
diff --git a/docs/components/Homepage/UsedBy/style.css b/docs/src/components/Homepage/UsedBy/style.css
similarity index 87%
rename from docs/components/Homepage/UsedBy/style.css
rename to docs/src/components/Homepage/UsedBy/style.css
index 6cda47a98b6..f5b60b49b1e 100644
--- a/docs/components/Homepage/UsedBy/style.css
+++ b/docs/src/components/Homepage/UsedBy/style.css
@@ -67,7 +67,11 @@
font-size: 2em;
}
-.used-by-more-examples a {
+.used-by-more-examples a,
+.used-by-more-examples a:visited,
+.used-by-more-examples a:hover,
+.used-by-more-examples a:active,
+.used-by-more-examples a:focus {
background-color: #e4004f;
color: #fff;
padding: 20px;
diff --git a/docs/components/Homepage/index.js b/docs/src/components/Homepage/index.js
similarity index 100%
rename from docs/components/Homepage/index.js
rename to docs/src/components/Homepage/index.js
diff --git a/docs/components/Homepage/style.css b/docs/src/components/Homepage/style.css
similarity index 100%
rename from docs/components/Homepage/style.css
rename to docs/src/components/Homepage/style.css
diff --git a/docs/components/breakpoints.css b/docs/src/components/breakpoints.css
similarity index 100%
rename from docs/components/breakpoints.css
rename to docs/src/components/breakpoints.css
diff --git a/docs/css/github.css b/docs/src/css/github.css
similarity index 100%
rename from docs/css/github.css
rename to docs/src/css/github.css
diff --git a/docs/css/main.css b/docs/src/css/main.css
similarity index 100%
rename from docs/css/main.css
rename to docs/src/css/main.css
diff --git a/docs/design/docs/docs-container.png b/docs/src/design/docs/docs-container.png
similarity index 100%
rename from docs/design/docs/docs-container.png
rename to docs/src/design/docs/docs-container.png
diff --git a/docs/design/docs/docs-content.png b/docs/src/design/docs/docs-content.png
similarity index 100%
rename from docs/design/docs/docs-content.png
rename to docs/src/design/docs/docs-content.png
diff --git a/docs/design/docs/docs-nav.png b/docs/src/design/docs/docs-nav.png
similarity index 100%
rename from docs/design/docs/docs-nav.png
rename to docs/src/design/docs/docs-nav.png
diff --git a/docs/design/docs/docs.png b/docs/src/design/docs/docs.png
similarity index 100%
rename from docs/design/docs/docs.png
rename to docs/src/design/docs/docs.png
diff --git a/docs/design/homepage/built-for.png b/docs/src/design/homepage/built-for.png
similarity index 100%
rename from docs/design/homepage/built-for.png
rename to docs/src/design/homepage/built-for.png
diff --git a/docs/design/homepage/demo.png b/docs/src/design/homepage/demo.png
similarity index 100%
rename from docs/design/homepage/demo.png
rename to docs/src/design/homepage/demo.png
diff --git a/docs/design/homepage/featured-storybooks.png b/docs/src/design/homepage/featured-storybooks.png
similarity index 100%
rename from docs/design/homepage/featured-storybooks.png
rename to docs/src/design/homepage/featured-storybooks.png
diff --git a/docs/design/homepage/footer.png b/docs/src/design/homepage/footer.png
similarity index 100%
rename from docs/design/homepage/footer.png
rename to docs/src/design/homepage/footer.png
diff --git a/docs/design/homepage/header.png b/docs/src/design/homepage/header.png
similarity index 100%
rename from docs/design/homepage/header.png
rename to docs/src/design/homepage/header.png
diff --git a/docs/design/homepage/heading.png b/docs/src/design/homepage/heading.png
similarity index 100%
rename from docs/design/homepage/heading.png
rename to docs/src/design/homepage/heading.png
diff --git a/docs/design/homepage/homepage.png b/docs/src/design/homepage/homepage.png
similarity index 100%
rename from docs/design/homepage/homepage.png
rename to docs/src/design/homepage/homepage.png
diff --git a/docs/design/homepage/main-links.png b/docs/src/design/homepage/main-links.png
similarity index 100%
rename from docs/design/homepage/main-links.png
rename to docs/src/design/homepage/main-links.png
diff --git a/docs/design/homepage/screenshot.png b/docs/src/design/homepage/screenshot.png
similarity index 100%
rename from docs/design/homepage/screenshot.png
rename to docs/src/design/homepage/screenshot.png
diff --git a/docs/design/homepage/storybook-icon.png b/docs/src/design/homepage/storybook-icon.png
similarity index 100%
rename from docs/design/homepage/storybook-icon.png
rename to docs/src/design/homepage/storybook-icon.png
diff --git a/docs/design/homepage/storybook-logo.svg b/docs/src/design/homepage/storybook-logo.svg
similarity index 100%
rename from docs/design/homepage/storybook-logo.svg
rename to docs/src/design/homepage/storybook-logo.svg
diff --git a/docs/html.js b/docs/src/html.js
similarity index 61%
rename from docs/html.js
rename to docs/src/html.js
index b9b98d3e2cf..b8ef2506983 100644
--- a/docs/html.js
+++ b/docs/src/html.js
@@ -3,36 +3,27 @@ import React from 'react';
import PropTypes from 'prop-types';
import DocumentTitle from 'react-document-title';
-import { prefixLink } from 'gatsby/dist/isomorphic/gatsby-helpers';
import favicon from './design/homepage/storybook-icon.png';
-const BUILD_TIME = new Date().getTime();
-
const HTML = props => {
const title = DocumentTitle.rewind();
let css;
if (process.env.NODE_ENV === 'production') {
// eslint-disable-next-line
- css = ;
+ css = ;
}
const searchScript = [
- ,
- ,
,
];
@@ -45,10 +36,11 @@ const HTML = props => {
{title}
{css}
+ {props.headComponents}
-
-
+
+ {props.postBodyComponents}
{searchScript}