diff --git a/ADDONS_SUPPORT.md b/ADDONS_SUPPORT.md
index d435a919abaa..d93cb0013451 100644
--- a/ADDONS_SUPPORT.md
+++ b/ADDONS_SUPPORT.md
@@ -2,11 +2,11 @@
| |[React](app/react)|[React Native](app/react-native)|[Vue](app/vue)|[Angular](app/angular)| [Polymer](app/polymer)| [Mithril](app/mithril)| [HTML](app/html)| [Marko](app/marko)|
| ----------- |:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
-|[a11y](addons/a11y) |+| | | | | |+| |
+|[a11y](addons/a11y) |+| |+|+|+|+|+|+|
|[actions](addons/actions) |+|+|+|+|+|+|+|+|
-|[backgrounds](addons/backgrounds) |+| | | | |+|+| |
+|[backgrounds](addons/backgrounds) |+| |+|+|+|+|+|+|
|[centered](addons/centered) |+| |+|+| |+|+| |
-|[events](addons/events) |+| | | | | |+| |
+|[events](addons/events) |+| |+|+|+|+|+|+|
|[graphql](addons/graphql) |+| | | | | | | |
|[info](addons/info) |+| | | | | | | |
|[jest](addons/jest) |+| | |+| | |+| |
@@ -16,4 +16,4 @@
|[options](addons/options) |+|+|+|+|+|+|+| |
|[storyshots](addons/storyshots) |+|+|+|+| | |+| |
|[storysource](addons/storysource)|+| |+|+|+|+|+|+|
-|[viewport](addons/viewport) |+| |+|+|+|+|+| |
+|[viewport](addons/viewport) |+| |+|+|+|+|+|+|
diff --git a/addons/a11y/html.js b/addons/a11y/html.js
deleted file mode 100644
index 4f7edc6bedba..000000000000
--- a/addons/a11y/html.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./dist/html');
diff --git a/addons/a11y/src/A11yManager.js b/addons/a11y/src/A11yManager.js
deleted file mode 100644
index fe48aaef6662..000000000000
--- a/addons/a11y/src/A11yManager.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import React from 'react';
-
-import WrapStory from './components/WrapStory';
-
-// Run all a11y checks inside
-class A11yManager {
- wrapStory(channel, storyFn, context, axeOptions) {
- const props = { context, storyFn, channel, axeOptions };
-
- return
Hello World!
; - -describe('Background Decorator', () => { - it('should exist', () => { - const SpiedChannel = new EventEmitter(); - const backgroundDecorator = shallow( -I am next story!
); - const backgroundDecorator = shallow( -I am the only one!
); - const backgroundDecorator = shallow( -- I have a stock of 20 apple, costing $ 2.25 each. + I have a stock of 20 apples, costing $ 2.25 each.
diff --git a/examples/angular-cli/src/stories/__snapshots__/custom-styles.stories.storyshot b/examples/angular-cli/src/stories/__snapshots__/custom-styles.stories.storyshot index 017c637ae3fc..9e5017225e43 100644 --- a/examples/angular-cli/src/stories/__snapshots__/custom-styles.stories.storyshot +++ b/examples/angular-cli/src/stories/__snapshots__/custom-styles.stories.storyshot @@ -31,18 +31,15 @@ exports[`Storyshots Custom|Style With Knobs 1`] = ` data={[Function Object]} target={[Function ViewContainerRef_]} > -- I have a stock of 20 apple, costing $2.25 each. + I have a stock of 20 apples, costing $2.25 each.
@@ -52,3 +52,5 @@ exports[`Storyshots Addons|Knobs Simple 1`] = ` I am John Doe and I'm 44 years old. `; + +exports[`Storyshots Addons|Knobs XSS safety 1`] = `<img src=x onerror="alert('XSS Attack')" >`; diff --git a/examples/html-kitchen-sink/stories/addon-a11y.stories.js b/examples/html-kitchen-sink/stories/addon-a11y.stories.js index 7341d03e8a6a..96e90a23ae1b 100644 --- a/examples/html-kitchen-sink/stories/addon-a11y.stories.js +++ b/examples/html-kitchen-sink/stories/addon-a11y.stories.js @@ -2,7 +2,7 @@ import { document, setTimeout } from 'global'; import { storiesOf } from '@storybook/html'; import { setOptions } from '@storybook/addon-options'; -import { checkA11y } from '@storybook/addon-a11y/html'; +import { checkA11y } from '@storybook/addon-a11y'; const text = 'Testing the a11y addon'; diff --git a/examples/html-kitchen-sink/stories/addon-backgrounds.stories.js b/examples/html-kitchen-sink/stories/addon-backgrounds.stories.js index 1c8eed6ac6dc..1a5cc547cf28 100644 --- a/examples/html-kitchen-sink/stories/addon-backgrounds.stories.js +++ b/examples/html-kitchen-sink/stories/addon-backgrounds.stories.js @@ -1,6 +1,6 @@ import { storiesOf } from '@storybook/html'; -import backgrounds from '@storybook/addon-backgrounds/html'; +import backgrounds from '@storybook/addon-backgrounds'; storiesOf('Addons|Backgrounds', module) .addDecorator( diff --git a/examples/html-kitchen-sink/stories/addon-events.stories.js b/examples/html-kitchen-sink/stories/addon-events.stories.js index f0be1bee0a0e..954f7eeea87a 100644 --- a/examples/html-kitchen-sink/stories/addon-events.stories.js +++ b/examples/html-kitchen-sink/stories/addon-events.stories.js @@ -4,7 +4,7 @@ import addons from '@storybook/addons'; import CoreEvents from '@storybook/core-events'; import json from 'format-json'; -import withEvents from '@storybook/addon-events/html'; +import withEvents from '@storybook/addon-events'; import './addon-events.css'; diff --git a/examples/html-kitchen-sink/stories/addon-knobs.stories.js b/examples/html-kitchen-sink/stories/addon-knobs.stories.js index 406ba3acf184..04fd7d9c3d3a 100644 --- a/examples/html-kitchen-sink/stories/addon-knobs.stories.js +++ b/examples/html-kitchen-sink/stories/addon-knobs.stories.js @@ -11,7 +11,7 @@ import { withKnobs, text, number, -} from '@storybook/addon-knobs/html'; +} from '@storybook/addon-knobs'; storiesOf('Addons|Knobs', module) .addDecorator(withKnobs) @@ -31,11 +31,11 @@ storiesOf('Addons|Knobs', module) step: 5, }); const fruits = { - apples: 'Apple', - bananas: 'Banana', - cherries: 'Cherry', + Apple: 'apples', + Banana: 'bananas', + Cherry: 'cherries', }; - const fruit = select('Fruit', fruits, 'apple'); + const fruit = select('Fruit', fruits, 'apples'); const price = number('Price', 2.25); const colour = color('Border', 'deeppink'); @@ -63,4 +63,5 @@ storiesOf('Addons|Knobs', module)${salutation}
`; - }); + }) + .add('XSS safety', () => text('Rendered string', '')); diff --git a/examples/marko-cli/package.json b/examples/marko-cli/package.json index f937f1dd613e..0ff7a8e61068 100644 --- a/examples/marko-cli/package.json +++ b/examples/marko-cli/package.json @@ -28,7 +28,7 @@ "scripts": { "start": "marko-starter server", "build-storybook": "build-storybook", - "storybook": "start-storybook -p 9010", + "storybook": "start-storybook -p 9005", "build": "NODE_ENV=production marko-starter build", "serve-static": "NODE_ENV=production marko-starter serve-static", "lint": "eslint src/", diff --git a/examples/marko-cli/src/stories/addon-actions.stories.js b/examples/marko-cli/src/stories/addon-actions.stories.js index ec3aa83f09a0..73d25b05d3f6 100644 --- a/examples/marko-cli/src/stories/addon-actions.stories.js +++ b/examples/marko-cli/src/stories/addon-actions.stories.js @@ -2,6 +2,6 @@ import { storiesOf } from '@storybook/marko'; import { action } from '@storybook/addon-actions'; import Button from '../components/action-button/index.marko'; -storiesOf('Addons|Actions/Button').add('Simple', () => +storiesOf('Addons|Actions/Button', module).add('Simple', () => Button.renderSync({ click: action('action logged!') }) ); diff --git a/examples/marko-cli/src/stories/addon-knobs.stories.js b/examples/marko-cli/src/stories/addon-knobs.stories.js index 35287848196d..74b6898dbb4c 100644 --- a/examples/marko-cli/src/stories/addon-knobs.stories.js +++ b/examples/marko-cli/src/stories/addon-knobs.stories.js @@ -1,5 +1,5 @@ import { storiesOf } from '@storybook/marko'; -import { withKnobs, text, number } from '@storybook/addon-knobs/marko'; +import { withKnobs, text, number } from '@storybook/addon-knobs'; import Hello from '../components/hello/index.marko'; storiesOf('Addons|Knobs/Hello', module) diff --git a/examples/mithril-kitchen-sink/src/stories/addon-backgrounds.stories.js b/examples/mithril-kitchen-sink/src/stories/addon-backgrounds.stories.js index 373a25de5bb6..307765b93697 100644 --- a/examples/mithril-kitchen-sink/src/stories/addon-backgrounds.stories.js +++ b/examples/mithril-kitchen-sink/src/stories/addon-backgrounds.stories.js @@ -4,7 +4,7 @@ import m from 'mithril'; import { storiesOf } from '@storybook/mithril'; -import backgrounds from '@storybook/addon-backgrounds/mithril'; +import backgrounds from '@storybook/addon-backgrounds'; import BaseButton from '../BaseButton'; storiesOf('Addons|Backgrounds', module) diff --git a/examples/mithril-kitchen-sink/src/stories/addon-knobs.stories.js b/examples/mithril-kitchen-sink/src/stories/addon-knobs.stories.js index d518f313e546..cd9836b357cb 100644 --- a/examples/mithril-kitchen-sink/src/stories/addon-knobs.stories.js +++ b/examples/mithril-kitchen-sink/src/stories/addon-knobs.stories.js @@ -14,7 +14,7 @@ import { color, date, button, -} from '@storybook/addon-knobs/mithril'; +} from '@storybook/addon-knobs'; storiesOf('Addons|Knobs', module) .addDecorator(withKnobs) @@ -36,11 +36,11 @@ storiesOf('Addons|Knobs', module) step: 5, }); const fruits = { - apples: 'Apple', - bananas: 'Banana', - cherries: 'Cherry', + Apple: 'apples', + Banana: 'bananas', + Cherry: 'cherries', }; - const fruit = select('Fruit', fruits, 'apple'); + const fruit = select('Fruit', fruits, 'apples'); const price = number('Price', 2.25); const colour = color('Border', 'deeppink'); @@ -63,7 +63,7 @@ storiesOf('Addons|Knobs', module){stockMessage}
Also, I have:
-{salutation}
), diff --git a/examples/official-storybook/stories/__snapshots__/addon-backgrounds.stories.storyshot b/examples/official-storybook/stories/__snapshots__/addon-backgrounds.stories.storyshot index 59ddd8f533da..856f3abbf94c 100644 --- a/examples/official-storybook/stories/__snapshots__/addon-backgrounds.stories.storyshot +++ b/examples/official-storybook/stories/__snapshots__/addon-backgrounds.stories.storyshot @@ -1,5 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Storyshots Addons|Backgrounds overriden 1`] = ` + +`; + exports[`Storyshots Addons|Backgrounds story 1 1`] = `