diff --git a/addons/controls/preset.js b/addons/controls/preset.js index 78cdfff2f632..1fac913bc69b 100644 --- a/addons/controls/preset.js +++ b/addons/controls/preset.js @@ -1,12 +1,8 @@ const { ensureDocsBeforeControls } = require('./dist/cjs/preset/ensureDocsBeforeControls'); -function config(entry = []) { - return [...entry, require.resolve('./dist/esm/preset/addParameter')]; -} - function managerEntries(entry = [], options) { ensureDocsBeforeControls(options.configDir); return [...entry, require.resolve('./dist/esm/register')]; } -module.exports = { managerEntries, config }; +module.exports = { managerEntries }; diff --git a/addons/controls/src/preset/addParameter.ts b/addons/controls/src/preset/addParameter.ts deleted file mode 100644 index 8608ecb760c0..000000000000 --- a/addons/controls/src/preset/addParameter.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const parameters = { - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/, - }, - }, -}; diff --git a/lib/cli/src/generators/configure.ts b/lib/cli/src/generators/configure.ts index 78b5db0ab023..75e5e94c189c 100644 --- a/lib/cli/src/generators/configure.ts +++ b/lib/cli/src/generators/configure.ts @@ -19,6 +19,12 @@ function configurePreview(framework: SupportedFrameworks) { const parameters = ` export const parameters = { actions: { argTypesRegex: "^on[A-Z].*" }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/, + }, + }, }`; const preview = diff --git a/lib/cli/src/versions.json b/lib/cli/src/versions.json index a1123b191c49..b14ad86fd0dc 100644 --- a/lib/cli/src/versions.json +++ b/lib/cli/src/versions.json @@ -1,61 +1,61 @@ { - "@storybook/addon-a11y": "6.2.0-beta.10", - "@storybook/addon-actions": "6.2.0-beta.10", - "@storybook/addon-backgrounds": "6.2.0-beta.10", - "@storybook/addon-controls": "6.2.0-beta.10", - "@storybook/addon-cssresources": "6.2.0-beta.10", - "@storybook/addon-design-assets": "6.2.0-beta.10", - "@storybook/addon-docs": "6.2.0-beta.10", - "@storybook/addon-essentials": "6.2.0-beta.10", - "@storybook/addon-events": "6.2.0-beta.10", - "@storybook/addon-google-analytics": "6.2.0-beta.10", - "@storybook/addon-graphql": "6.2.0-beta.10", - "@storybook/addon-jest": "6.2.0-beta.10", - "@storybook/addon-knobs": "6.2.0-beta.10", - "@storybook/addon-links": "6.2.0-beta.10", - "@storybook/addon-queryparams": "6.2.0-beta.10", - "@storybook/addon-storyshots": "6.2.0-beta.10", - "@storybook/addon-storyshots-puppeteer": "6.2.0-beta.10", - "@storybook/addon-storysource": "6.2.0-beta.10", - "@storybook/addon-toolbars": "6.2.0-beta.10", - "@storybook/addon-viewport": "6.2.0-beta.10", - "@storybook/addons": "6.2.0-beta.10", - "@storybook/angular": "6.2.0-beta.10", - "@storybook/api": "6.2.0-beta.10", - "@storybook/aurelia": "6.2.0-beta.10", - "@storybook/builder-webpack4": "6.2.0-beta.10", - "@storybook/builder-webpack5": "6.2.0-beta.10", - "@storybook/channel-postmessage": "6.2.0-beta.10", - "@storybook/channel-websocket": "6.2.0-beta.10", - "@storybook/channels": "6.2.0-beta.10", - "@storybook/cli": "6.2.0-beta.10", - "@storybook/client-api": "6.2.0-beta.10", - "@storybook/client-logger": "6.2.0-beta.10", - "@storybook/codemod": "6.2.0-beta.10", - "@storybook/components": "6.2.0-beta.10", - "@storybook/core": "6.2.0-beta.10", - "@storybook/core-client": "6.2.0-beta.10", - "@storybook/core-common": "6.2.0-beta.10", - "@storybook/core-events": "6.2.0-beta.10", - "@storybook/core-server": "6.2.0-beta.10", - "@storybook/ember": "6.2.0-beta.10", - "@storybook/html": "6.2.0-beta.10", - "@storybook/marionette": "6.2.0-beta.10", - "@storybook/marko": "6.2.0-beta.10", - "@storybook/mithril": "6.2.0-beta.10", - "@storybook/node-logger": "6.2.0-beta.10", - "@storybook/postinstall": "6.2.0-beta.10", - "@storybook/preact": "6.2.0-beta.10", - "@storybook/rax": "6.2.0-beta.10", - "@storybook/react": "6.2.0-beta.10", - "@storybook/riot": "6.2.0-beta.10", - "@storybook/router": "6.2.0-beta.10", - "@storybook/server": "6.2.0-beta.10", - "@storybook/source-loader": "6.2.0-beta.10", - "@storybook/svelte": "6.2.0-beta.10", - "@storybook/theming": "6.2.0-beta.10", - "@storybook/ui": "6.2.0-beta.10", - "@storybook/vue": "6.2.0-beta.10", - "@storybook/vue3": "6.2.0-beta.10", - "@storybook/web-components": "6.2.0-beta.10" + "@storybook/addon-a11y": "6.2.0-beta.11", + "@storybook/addon-actions": "6.2.0-beta.11", + "@storybook/addon-backgrounds": "6.2.0-beta.11", + "@storybook/addon-controls": "6.2.0-beta.11", + "@storybook/addon-cssresources": "6.2.0-beta.11", + "@storybook/addon-design-assets": "6.2.0-beta.11", + "@storybook/addon-docs": "6.2.0-beta.11", + "@storybook/addon-essentials": "6.2.0-beta.11", + "@storybook/addon-events": "6.2.0-beta.11", + "@storybook/addon-google-analytics": "6.2.0-beta.11", + "@storybook/addon-graphql": "6.2.0-beta.11", + "@storybook/addon-jest": "6.2.0-beta.11", + "@storybook/addon-knobs": "6.2.0-beta.11", + "@storybook/addon-links": "6.2.0-beta.11", + "@storybook/addon-queryparams": "6.2.0-beta.11", + "@storybook/addon-storyshots": "6.2.0-beta.11", + "@storybook/addon-storyshots-puppeteer": "6.2.0-beta.11", + "@storybook/addon-storysource": "6.2.0-beta.11", + "@storybook/addon-toolbars": "6.2.0-beta.11", + "@storybook/addon-viewport": "6.2.0-beta.11", + "@storybook/addons": "6.2.0-beta.11", + "@storybook/angular": "6.2.0-beta.11", + "@storybook/api": "6.2.0-beta.11", + "@storybook/aurelia": "6.2.0-beta.11", + "@storybook/builder-webpack4": "6.2.0-beta.11", + "@storybook/builder-webpack5": "6.2.0-beta.11", + "@storybook/channel-postmessage": "6.2.0-beta.11", + "@storybook/channel-websocket": "6.2.0-beta.11", + "@storybook/channels": "6.2.0-beta.11", + "@storybook/cli": "6.2.0-beta.11", + "@storybook/client-api": "6.2.0-beta.11", + "@storybook/client-logger": "6.2.0-beta.11", + "@storybook/codemod": "6.2.0-beta.11", + "@storybook/components": "6.2.0-beta.11", + "@storybook/core": "6.2.0-beta.11", + "@storybook/core-client": "6.2.0-beta.11", + "@storybook/core-common": "6.2.0-beta.11", + "@storybook/core-events": "6.2.0-beta.11", + "@storybook/core-server": "6.2.0-beta.11", + "@storybook/ember": "6.2.0-beta.11", + "@storybook/html": "6.2.0-beta.11", + "@storybook/marionette": "6.2.0-beta.11", + "@storybook/marko": "6.2.0-beta.11", + "@storybook/mithril": "6.2.0-beta.11", + "@storybook/node-logger": "6.2.0-beta.11", + "@storybook/postinstall": "6.2.0-beta.11", + "@storybook/preact": "6.2.0-beta.11", + "@storybook/rax": "6.2.0-beta.11", + "@storybook/react": "6.2.0-beta.11", + "@storybook/riot": "6.2.0-beta.11", + "@storybook/router": "6.2.0-beta.11", + "@storybook/server": "6.2.0-beta.11", + "@storybook/source-loader": "6.2.0-beta.11", + "@storybook/svelte": "6.2.0-beta.11", + "@storybook/theming": "6.2.0-beta.11", + "@storybook/ui": "6.2.0-beta.11", + "@storybook/vue": "6.2.0-beta.11", + "@storybook/vue3": "6.2.0-beta.11", + "@storybook/web-components": "6.2.0-beta.11" } diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev index 0a1fa2f21fbc..8a6f40d4c5ea 100644 --- a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev @@ -8,7 +8,6 @@ Object { "ROOT/examples/cra-ts-essentials/.storybook/storybook-init-framework-entry.js", "ROOT/addons/docs/dist/esm/frameworks/common/config.js-generated-other-entry.js", "ROOT/addons/docs/dist/esm/frameworks/react/config.js-generated-other-entry.js", - "ROOT/addons/controls/dist/esm/preset/addParameter.js-generated-other-entry.js", "ROOT/addons/actions/dist/esm/preset/addDecorator.js-generated-other-entry.js", "ROOT/addons/actions/dist/esm/preset/addArgs.js-generated-other-entry.js", "ROOT/addons/backgrounds/dist/esm/preset/addDecorator.js-generated-other-entry.js", diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod index 11794f22ade2..81d388b72c60 100644 --- a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod @@ -8,7 +8,6 @@ Object { "ROOT/examples/cra-ts-essentials/.storybook/storybook-init-framework-entry.js", "ROOT/addons/docs/dist/esm/frameworks/common/config.js-generated-other-entry.js", "ROOT/addons/docs/dist/esm/frameworks/react/config.js-generated-other-entry.js", - "ROOT/addons/controls/dist/esm/preset/addParameter.js-generated-other-entry.js", "ROOT/addons/actions/dist/esm/preset/addDecorator.js-generated-other-entry.js", "ROOT/addons/actions/dist/esm/preset/addArgs.js-generated-other-entry.js", "ROOT/addons/backgrounds/dist/esm/preset/addDecorator.js-generated-other-entry.js", diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev index 8c39a26c6153..6ec4c663d890 100644 --- a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev @@ -14,7 +14,6 @@ Object { "ROOT/addons/actions/dist/esm/preset/addArgs.js-generated-other-entry.js", "ROOT/addons/backgrounds/dist/esm/preset/addDecorator.js-generated-other-entry.js", "ROOT/addons/backgrounds/dist/esm/preset/addParameter.js-generated-other-entry.js", - "ROOT/addons/controls/dist/esm/preset/addParameter.js-generated-other-entry.js", "ROOT/addons/knobs/dist/esm/preset/addDecorator.js-generated-other-entry.js", "ROOT/addons/links/dist/esm/preset/addDecorator.js-generated-other-entry.js", "ROOT/examples/html-kitchen-sink/.storybook/preview.js-generated-config-entry.js", diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod index a7ed0c845c4d..8ec85c178082 100644 --- a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod @@ -14,7 +14,6 @@ Object { "ROOT/addons/actions/dist/esm/preset/addArgs.js-generated-other-entry.js", "ROOT/addons/backgrounds/dist/esm/preset/addDecorator.js-generated-other-entry.js", "ROOT/addons/backgrounds/dist/esm/preset/addParameter.js-generated-other-entry.js", - "ROOT/addons/controls/dist/esm/preset/addParameter.js-generated-other-entry.js", "ROOT/addons/knobs/dist/esm/preset/addDecorator.js-generated-other-entry.js", "ROOT/addons/links/dist/esm/preset/addDecorator.js-generated-other-entry.js", "ROOT/examples/html-kitchen-sink/.storybook/preview.js-generated-config-entry.js", diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev b/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev index 23b3b6b4f8b2..ffbabb3d5705 100644 --- a/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev +++ b/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev @@ -9,7 +9,6 @@ Object { "ROOT/addons/docs/dist/esm/frameworks/common/config.js-generated-other-entry.js", "ROOT/addons/docs/dist/esm/frameworks/vue3/config.js-generated-other-entry.js", "ROOT/addons/links/dist/esm/preset/addDecorator.js-generated-other-entry.js", - "ROOT/addons/controls/dist/esm/preset/addParameter.js-generated-other-entry.js", "ROOT/addons/actions/dist/esm/preset/addDecorator.js-generated-other-entry.js", "ROOT/addons/actions/dist/esm/preset/addArgs.js-generated-other-entry.js", "ROOT/addons/backgrounds/dist/esm/preset/addDecorator.js-generated-other-entry.js", diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod b/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod index 8606d74f45dd..ad4be7cf910a 100644 --- a/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod +++ b/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod @@ -9,7 +9,6 @@ Object { "ROOT/addons/docs/dist/esm/frameworks/common/config.js-generated-other-entry.js", "ROOT/addons/docs/dist/esm/frameworks/vue3/config.js-generated-other-entry.js", "ROOT/addons/links/dist/esm/preset/addDecorator.js-generated-other-entry.js", - "ROOT/addons/controls/dist/esm/preset/addParameter.js-generated-other-entry.js", "ROOT/addons/actions/dist/esm/preset/addDecorator.js-generated-other-entry.js", "ROOT/addons/actions/dist/esm/preset/addArgs.js-generated-other-entry.js", "ROOT/addons/backgrounds/dist/esm/preset/addDecorator.js-generated-other-entry.js", diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev index 5b35fe45085f..d44d287596f9 100644 --- a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev @@ -8,7 +8,6 @@ Object { "ROOT/examples/web-components-kitchen-sink/.storybook/storybook-init-framework-entry.js", "ROOT/addons/docs/dist/esm/frameworks/common/config.js-generated-other-entry.js", "ROOT/addons/docs/dist/esm/frameworks/web-components/config.js-generated-other-entry.js", - "ROOT/addons/controls/dist/esm/preset/addParameter.js-generated-other-entry.js", "ROOT/addons/a11y/dist/esm/a11yRunner.js-generated-other-entry.js", "ROOT/addons/a11y/dist/esm/a11yHighlight.js-generated-other-entry.js", "ROOT/addons/actions/dist/esm/preset/addDecorator.js-generated-other-entry.js", diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod index c46e884b4a5b..d51667c06cdf 100644 --- a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod @@ -8,7 +8,6 @@ Object { "ROOT/examples/web-components-kitchen-sink/.storybook/storybook-init-framework-entry.js", "ROOT/addons/docs/dist/esm/frameworks/common/config.js-generated-other-entry.js", "ROOT/addons/docs/dist/esm/frameworks/web-components/config.js-generated-other-entry.js", - "ROOT/addons/controls/dist/esm/preset/addParameter.js-generated-other-entry.js", "ROOT/addons/a11y/dist/esm/a11yRunner.js-generated-other-entry.js", "ROOT/addons/a11y/dist/esm/a11yHighlight.js-generated-other-entry.js", "ROOT/addons/actions/dist/esm/preset/addDecorator.js-generated-other-entry.js",