Skip to content

Commit

Permalink
Merge branch 'next' into pr/15449
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Jul 12, 2021
2 parents 1e5424a + 01555f7 commit a46a056
Show file tree
Hide file tree
Showing 127 changed files with 2,960 additions and 1,224 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 6.4.0-alpha.14 (July 11, 2021)

### Features

- Web-components: Dynamic source snippets ([#15337](https://github.com/storybookjs/storybook/pull/15337))

### Maintenance

- Essentials: Add measure addon to monorepo ([#15545](https://github.com/storybookjs/storybook/pull/15545))

## 6.4.0-alpha.13 (July 9, 2021)

### Bug Fixes
Expand Down
20 changes: 10 additions & 10 deletions addons/a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "6.4.0-alpha.13",
"version": "6.4.0-alpha.14",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",
Expand Down Expand Up @@ -45,14 +45,14 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.4.0-alpha.13",
"@storybook/api": "6.4.0-alpha.13",
"@storybook/channels": "6.4.0-alpha.13",
"@storybook/client-api": "6.4.0-alpha.13",
"@storybook/client-logger": "6.4.0-alpha.13",
"@storybook/components": "6.4.0-alpha.13",
"@storybook/core-events": "6.4.0-alpha.13",
"@storybook/theming": "6.4.0-alpha.13",
"@storybook/addons": "6.4.0-alpha.14",
"@storybook/api": "6.4.0-alpha.14",
"@storybook/channels": "6.4.0-alpha.14",
"@storybook/client-api": "6.4.0-alpha.14",
"@storybook/client-logger": "6.4.0-alpha.14",
"@storybook/components": "6.4.0-alpha.14",
"@storybook/core-events": "6.4.0-alpha.14",
"@storybook/theming": "6.4.0-alpha.14",
"axe-core": "^4.2.0",
"core-js": "^3.8.2",
"global": "^4.4.0",
Expand Down Expand Up @@ -81,7 +81,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "70d04492b677c52c518b1b9591e382ba57484042",
"gitHead": "d3f8b5119b70ecf23ef2006b58034292eab3726e",
"sbmodern": "dist/modern/index.js",
"storybook": {
"displayName": "Accessibility",
Expand Down
16 changes: 8 additions & 8 deletions addons/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "6.4.0-alpha.13",
"version": "6.4.0-alpha.14",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",
Expand Down Expand Up @@ -41,12 +41,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.4.0-alpha.13",
"@storybook/api": "6.4.0-alpha.13",
"@storybook/client-api": "6.4.0-alpha.13",
"@storybook/components": "6.4.0-alpha.13",
"@storybook/core-events": "6.4.0-alpha.13",
"@storybook/theming": "6.4.0-alpha.13",
"@storybook/addons": "6.4.0-alpha.14",
"@storybook/api": "6.4.0-alpha.14",
"@storybook/client-api": "6.4.0-alpha.14",
"@storybook/components": "6.4.0-alpha.14",
"@storybook/core-events": "6.4.0-alpha.14",
"@storybook/theming": "6.4.0-alpha.14",
"core-js": "^3.8.2",
"fast-deep-equal": "^3.1.3",
"global": "^4.4.0",
Expand Down Expand Up @@ -78,7 +78,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "70d04492b677c52c518b1b9591e382ba57484042",
"gitHead": "d3f8b5119b70ecf23ef2006b58034292eab3726e",
"sbmodern": "dist/modern/index.js",
"storybook": {
"displayName": "Actions",
Expand Down
16 changes: 8 additions & 8 deletions addons/backgrounds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "6.4.0-alpha.13",
"version": "6.4.0-alpha.14",
"description": "Switch backgrounds to view components in different settings",
"keywords": [
"addon",
Expand Down Expand Up @@ -45,12 +45,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.4.0-alpha.13",
"@storybook/api": "6.4.0-alpha.13",
"@storybook/client-logger": "6.4.0-alpha.13",
"@storybook/components": "6.4.0-alpha.13",
"@storybook/core-events": "6.4.0-alpha.13",
"@storybook/theming": "6.4.0-alpha.13",
"@storybook/addons": "6.4.0-alpha.14",
"@storybook/api": "6.4.0-alpha.14",
"@storybook/client-logger": "6.4.0-alpha.14",
"@storybook/components": "6.4.0-alpha.14",
"@storybook/core-events": "6.4.0-alpha.14",
"@storybook/theming": "6.4.0-alpha.14",
"core-js": "^3.8.2",
"global": "^4.4.0",
"memoizerific": "^1.11.3",
Expand All @@ -76,7 +76,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "70d04492b677c52c518b1b9591e382ba57484042",
"gitHead": "d3f8b5119b70ecf23ef2006b58034292eab3726e",
"sbmodern": "dist/modern/index.js",
"storybook": {
"displayName": "Backgrounds",
Expand Down
16 changes: 8 additions & 8 deletions addons/controls/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-controls",
"version": "6.4.0-alpha.13",
"version": "6.4.0-alpha.14",
"description": "Interact with component inputs dynamically in the Storybook UI",
"keywords": [
"addon",
Expand Down Expand Up @@ -45,12 +45,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.4.0-alpha.13",
"@storybook/api": "6.4.0-alpha.13",
"@storybook/client-api": "6.4.0-alpha.13",
"@storybook/components": "6.4.0-alpha.13",
"@storybook/node-logger": "6.4.0-alpha.13",
"@storybook/theming": "6.4.0-alpha.13",
"@storybook/addons": "6.4.0-alpha.14",
"@storybook/api": "6.4.0-alpha.14",
"@storybook/client-api": "6.4.0-alpha.14",
"@storybook/components": "6.4.0-alpha.14",
"@storybook/node-logger": "6.4.0-alpha.14",
"@storybook/theming": "6.4.0-alpha.14",
"core-js": "^3.8.2",
"ts-dedent": "^2.0.0"
},
Expand All @@ -69,7 +69,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "70d04492b677c52c518b1b9591e382ba57484042",
"gitHead": "d3f8b5119b70ecf23ef2006b58034292eab3726e",
"sbmodern": "dist/modern/register.js",
"storybook": {
"displayName": "Controls",
Expand Down
46 changes: 23 additions & 23 deletions addons/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-docs",
"version": "6.4.0-alpha.13",
"version": "6.4.0-alpha.14",
"description": "Document component usage and properties in Markdown",
"keywords": [
"addon",
Expand Down Expand Up @@ -63,20 +63,20 @@
"@mdx-js/loader": "^1.6.22",
"@mdx-js/mdx": "^1.6.22",
"@mdx-js/react": "^1.6.22",
"@storybook/addons": "6.4.0-alpha.13",
"@storybook/api": "6.4.0-alpha.13",
"@storybook/builder-webpack4": "6.4.0-alpha.13",
"@storybook/client-api": "6.4.0-alpha.13",
"@storybook/client-logger": "6.4.0-alpha.13",
"@storybook/components": "6.4.0-alpha.13",
"@storybook/core": "6.4.0-alpha.13",
"@storybook/core-events": "6.4.0-alpha.13",
"@storybook/addons": "6.4.0-alpha.14",
"@storybook/api": "6.4.0-alpha.14",
"@storybook/builder-webpack4": "6.4.0-alpha.14",
"@storybook/client-api": "6.4.0-alpha.14",
"@storybook/client-logger": "6.4.0-alpha.14",
"@storybook/components": "6.4.0-alpha.14",
"@storybook/core": "6.4.0-alpha.14",
"@storybook/core-events": "6.4.0-alpha.14",
"@storybook/csf": "0.0.1",
"@storybook/csf-tools": "6.4.0-alpha.13",
"@storybook/node-logger": "6.4.0-alpha.13",
"@storybook/postinstall": "6.4.0-alpha.13",
"@storybook/source-loader": "6.4.0-alpha.13",
"@storybook/theming": "6.4.0-alpha.13",
"@storybook/csf-tools": "6.4.0-alpha.14",
"@storybook/node-logger": "6.4.0-alpha.14",
"@storybook/postinstall": "6.4.0-alpha.14",
"@storybook/source-loader": "6.4.0-alpha.14",
"@storybook/theming": "6.4.0-alpha.14",
"acorn": "^7.4.1",
"acorn-jsx": "^5.3.1",
"acorn-walk": "^7.2.0",
Expand Down Expand Up @@ -105,10 +105,10 @@
"@babel/core": "^7.12.10",
"@emotion/core": "^10.1.1",
"@emotion/styled": "^10.0.27",
"@storybook/angular": "6.4.0-alpha.13",
"@storybook/react": "6.4.0-alpha.13",
"@storybook/vue": "6.4.0-alpha.13",
"@storybook/web-components": "6.4.0-alpha.13",
"@storybook/angular": "6.4.0-alpha.14",
"@storybook/react": "6.4.0-alpha.14",
"@storybook/vue": "6.4.0-alpha.14",
"@storybook/web-components": "6.4.0-alpha.14",
"@types/cross-spawn": "^6.0.2",
"@types/doctrine": "^0.0.3",
"@types/enzyme": "^3.10.8",
Expand Down Expand Up @@ -138,10 +138,10 @@
"zone.js": "^0.11.3"
},
"peerDependencies": {
"@storybook/angular": "6.4.0-alpha.13",
"@storybook/vue": "6.4.0-alpha.13",
"@storybook/vue3": "6.4.0-alpha.13",
"@storybook/web-components": "6.4.0-alpha.13",
"@storybook/angular": "6.4.0-alpha.14",
"@storybook/vue": "6.4.0-alpha.14",
"@storybook/vue3": "6.4.0-alpha.14",
"@storybook/web-components": "6.4.0-alpha.14",
"lit": "^2.0.0-rc.1",
"lit-html": "^1.4.1 || ^2.0.0-rc.3",
"react": "^16.8.0 || ^17.0.0",
Expand Down Expand Up @@ -192,7 +192,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "70d04492b677c52c518b1b9591e382ba57484042",
"gitHead": "d3f8b5119b70ecf23ef2006b58034292eab3726e",
"sbmodern": "dist/modern/index.js",
"storybook": {
"displayName": "Docs",
Expand Down
29 changes: 0 additions & 29 deletions addons/docs/src/frameworks/web-components/config.js

This file was deleted.

19 changes: 19 additions & 0 deletions addons/docs/src/frameworks/web-components/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { extractArgTypes, extractComponentDescription } from './custom-elements';
import { sourceDecorator } from './sourceDecorator';
import { prepareForInline } from './prepareForInline';
import { SourceType } from '../../shared';

export const decorators = [sourceDecorator];

export const parameters = {
docs: {
extractArgTypes,
extractComponentDescription,
inlineStories: true,
prepareForInline,
source: {
type: SourceType.DYNAMIC,
language: 'html',
},
},
};
19 changes: 19 additions & 0 deletions addons/docs/src/frameworks/web-components/prepareForInline.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { StoryFn } from '@storybook/addons';
import React from 'react';
import { render } from 'lit-html';

export const prepareForInline = (storyFn: StoryFn) => {
class Story extends React.Component {
wrapperRef = React.createRef<HTMLElement>();

componentDidMount(): void {
render(storyFn(), this.wrapperRef.current);
}

render(): React.ReactElement {
return React.createElement('div', { ref: this.wrapperRef });
}
}

return (React.createElement(Story) as unknown) as React.CElement<{}, React.Component>;
};
Loading

0 comments on commit a46a056

Please sign in to comment.