Skip to content

Commit

Permalink
Merge pull request #1 from storybookjs/next
Browse files Browse the repository at this point in the history
Update next branch
  • Loading branch information
YozhEzhi authored Mar 24, 2021
2 parents f2f8084 + b100a45 commit b6da275
Show file tree
Hide file tree
Showing 146 changed files with 1,556 additions and 1,180 deletions.
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
## 6.2.0-rc.9 (March 25, 2021)

### Features

- Core: Support some special values in URL args ([#14293](https://github.com/storybookjs/storybook/pull/14293))

### Bug Fixes

- Core: Fix `enum` args parsing from URL ([#14314](https://github.com/storybookjs/storybook/pull/14314))
- Controls: Tweaks and fixes for color control ([#14316](https://github.com/storybookjs/storybook/pull/14316))
- Components: Handle `null` when parsing input in color picker ([#14305](https://github.com/storybookjs/storybook/pull/14305))

## 6.2.0-rc.8 (March 23, 2021)

**NOTE:** For Angular users using inline story rendering in addon-docs, this is a breaking prerelease change. See below and apologies for the back and forth.

### Bug Fixes

- Revert "Addon-docs/Angular: Fix inline rendering setup" ([#14310](https://github.com/storybookjs/storybook/pull/14310))
- Core: Import `isPlainObject` directly from lodash ([#14307](https://github.com/storybookjs/storybook/pull/14307))
- Addon-Links: Fix react.d.ts paths ([#14306](https://github.com/storybookjs/storybook/pull/14306))

## 6.2.0-rc.7 (March 23, 2021)

### Bug Fixes

- Core: Restore webpack4 watchOptions ([#14302](https://github.com/storybookjs/storybook/pull/14302))
- Webpack: Hash files only in dev mode ([#14284](https://github.com/storybookjs/storybook/pull/14284))
- UI: Element em should not make text content bold ([#14290](https://github.com/storybookjs/storybook/pull/14290))

### Dependency Upgrades

- Webpack5: Remove deprecated webpack-filter-warnings-plugin ([#14303](https://github.com/storybookjs/storybook/pull/14303))

## 6.2.0-rc.6 (March 21, 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.2.0-rc.6",
"version": "6.2.0-rc.9",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",
Expand Down Expand Up @@ -41,14 +41,14 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.2.0-rc.6",
"@storybook/api": "6.2.0-rc.6",
"@storybook/channels": "6.2.0-rc.6",
"@storybook/client-api": "6.2.0-rc.6",
"@storybook/client-logger": "6.2.0-rc.6",
"@storybook/components": "6.2.0-rc.6",
"@storybook/core-events": "6.2.0-rc.6",
"@storybook/theming": "6.2.0-rc.6",
"@storybook/addons": "6.2.0-rc.9",
"@storybook/api": "6.2.0-rc.9",
"@storybook/channels": "6.2.0-rc.9",
"@storybook/client-api": "6.2.0-rc.9",
"@storybook/client-logger": "6.2.0-rc.9",
"@storybook/components": "6.2.0-rc.9",
"@storybook/core-events": "6.2.0-rc.9",
"@storybook/theming": "6.2.0-rc.9",
"axe-core": "^4.1.1",
"core-js": "^3.8.2",
"global": "^4.4.0",
Expand Down Expand Up @@ -77,7 +77,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "9140a2884503b405d457268fd9ffd8d2438013af",
"gitHead": "229ae2956bdb1e49a5dee26d3b6ada991a38c725",
"storybook": {
"displayName": "Accessibility",
"icon": "https://user-images.githubusercontent.com/263385/101991665-47042f80-3c7c-11eb-8f00-64b5a18f498a.png",
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.2.0-rc.6",
"version": "6.2.0-rc.9",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",
Expand Down Expand Up @@ -37,12 +37,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.2.0-rc.6",
"@storybook/api": "6.2.0-rc.6",
"@storybook/client-api": "6.2.0-rc.6",
"@storybook/components": "6.2.0-rc.6",
"@storybook/core-events": "6.2.0-rc.6",
"@storybook/theming": "6.2.0-rc.6",
"@storybook/addons": "6.2.0-rc.9",
"@storybook/api": "6.2.0-rc.9",
"@storybook/client-api": "6.2.0-rc.9",
"@storybook/components": "6.2.0-rc.9",
"@storybook/core-events": "6.2.0-rc.9",
"@storybook/theming": "6.2.0-rc.9",
"core-js": "^3.8.2",
"fast-deep-equal": "^3.1.3",
"global": "^4.4.0",
Expand Down Expand Up @@ -74,7 +74,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "9140a2884503b405d457268fd9ffd8d2438013af",
"gitHead": "229ae2956bdb1e49a5dee26d3b6ada991a38c725",
"storybook": {
"displayName": "Actions",
"unsupportedFrameworks": [
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.2.0-rc.6",
"version": "6.2.0-rc.9",
"description": "Switch backgrounds to view components in different settings",
"keywords": [
"addon",
Expand Down Expand Up @@ -41,12 +41,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.2.0-rc.6",
"@storybook/api": "6.2.0-rc.6",
"@storybook/client-logger": "6.2.0-rc.6",
"@storybook/components": "6.2.0-rc.6",
"@storybook/core-events": "6.2.0-rc.6",
"@storybook/theming": "6.2.0-rc.6",
"@storybook/addons": "6.2.0-rc.9",
"@storybook/api": "6.2.0-rc.9",
"@storybook/client-logger": "6.2.0-rc.9",
"@storybook/components": "6.2.0-rc.9",
"@storybook/core-events": "6.2.0-rc.9",
"@storybook/theming": "6.2.0-rc.9",
"core-js": "^3.8.2",
"global": "^4.4.0",
"memoizerific": "^1.11.3",
Expand All @@ -72,7 +72,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "9140a2884503b405d457268fd9ffd8d2438013af",
"gitHead": "229ae2956bdb1e49a5dee26d3b6ada991a38c725",
"storybook": {
"displayName": "Backgrounds",
"icon": "https://user-images.githubusercontent.com/263385/101991667-479cc600-3c7c-11eb-96d3-410e936252e7.png",
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.2.0-rc.6",
"version": "6.2.0-rc.9",
"description": "Interact with component inputs dynamically in the Storybook UI",
"keywords": [
"addon",
Expand Down Expand Up @@ -41,12 +41,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.2.0-rc.6",
"@storybook/api": "6.2.0-rc.6",
"@storybook/client-api": "6.2.0-rc.6",
"@storybook/components": "6.2.0-rc.6",
"@storybook/node-logger": "6.2.0-rc.6",
"@storybook/theming": "6.2.0-rc.6",
"@storybook/addons": "6.2.0-rc.9",
"@storybook/api": "6.2.0-rc.9",
"@storybook/client-api": "6.2.0-rc.9",
"@storybook/components": "6.2.0-rc.9",
"@storybook/node-logger": "6.2.0-rc.9",
"@storybook/theming": "6.2.0-rc.9",
"core-js": "^3.8.2",
"ts-dedent": "^2.0.0"
},
Expand All @@ -65,7 +65,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "9140a2884503b405d457268fd9ffd8d2438013af",
"gitHead": "229ae2956bdb1e49a5dee26d3b6ada991a38c725",
"storybook": {
"displayName": "Controls",
"icon": "https://user-images.githubusercontent.com/263385/101991669-479cc600-3c7c-11eb-93d9-38b67e8371f2.png",
Expand Down
23 changes: 16 additions & 7 deletions addons/controls/src/ControlsPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,43 @@
import React, { FC } from 'react';
import { useArgs, useArgTypes, useParameter } from '@storybook/api';
import { ArgsTable, NoControlsWarning, SortType } from '@storybook/components';
import { ArgTypes, useArgs, useArgTypes, useParameter } from '@storybook/api';
import { ArgsTable, NoControlsWarning, PresetColor, SortType } from '@storybook/components';

import { PARAM_KEY } from './constants';

interface ControlsParameters {
sort?: SortType;
expanded?: boolean;
presetColors?: PresetColor[];
hideNoControlsWarning?: boolean;
}

export const ControlsPanel: FC = () => {
const [args, updateArgs, resetArgs] = useArgs();
const rows = useArgTypes();
const isArgsStory = useParameter<boolean>('__isArgsStory', false);
const { expanded, sort, hideNoControlsWarning = false } = useParameter<ControlsParameters>(
PARAM_KEY,
{}
);
const {
expanded,
sort,
presetColors,
hideNoControlsWarning = false,
} = useParameter<ControlsParameters>(PARAM_KEY, {});

const hasControls = Object.values(rows).some((arg) => arg?.control);
const showWarning = !(hasControls && isArgsStory) && !hideNoControlsWarning;

const withPresetColors = Object.entries(rows).reduce((acc, [key, arg]) => {
if (arg?.control?.type !== 'color' || arg?.control?.presetColors) acc[key] = arg;
else acc[key] = { ...arg, control: { ...arg.control, presetColors } };
return acc;
}, {} as ArgTypes);

return (
<>
{showWarning && <NoControlsWarning />}
<ArgsTable
{...{
compact: !expanded && hasControls,
rows,
rows: withPresetColors,
args,
updateArgs,
resetArgs,
Expand Down
14 changes: 7 additions & 7 deletions addons/cssresources/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-cssresources",
"version": "6.2.0-rc.6",
"version": "6.2.0-rc.9",
"description": "A storybook addon to switch between css resources at runtime for your story",
"keywords": [
"addon",
Expand Down Expand Up @@ -40,11 +40,11 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.2.0-rc.6",
"@storybook/api": "6.2.0-rc.6",
"@storybook/components": "6.2.0-rc.6",
"@storybook/core-events": "6.2.0-rc.6",
"@storybook/theming": "6.2.0-rc.6",
"@storybook/addons": "6.2.0-rc.9",
"@storybook/api": "6.2.0-rc.9",
"@storybook/components": "6.2.0-rc.9",
"@storybook/core-events": "6.2.0-rc.9",
"@storybook/theming": "6.2.0-rc.9",
"core-js": "^3.8.2",
"global": "^4.4.0",
"regenerator-runtime": "^0.13.7"
Expand All @@ -67,7 +67,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "9140a2884503b405d457268fd9ffd8d2438013af",
"gitHead": "229ae2956bdb1e49a5dee26d3b6ada991a38c725",
"storybook": {
"displayName": "CSS Resources",
"unsupportedFrameworks": [
Expand Down
16 changes: 8 additions & 8 deletions addons/design-assets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-design-assets",
"version": "6.2.0-rc.6",
"version": "6.2.0-rc.9",
"description": "Design asset preview for storybook",
"keywords": [
"addon",
Expand Down Expand Up @@ -41,12 +41,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "6.2.0-rc.6",
"@storybook/api": "6.2.0-rc.6",
"@storybook/client-logger": "6.2.0-rc.6",
"@storybook/components": "6.2.0-rc.6",
"@storybook/core-events": "6.2.0-rc.6",
"@storybook/theming": "6.2.0-rc.6",
"@storybook/addons": "6.2.0-rc.9",
"@storybook/api": "6.2.0-rc.9",
"@storybook/client-logger": "6.2.0-rc.9",
"@storybook/components": "6.2.0-rc.9",
"@storybook/core-events": "6.2.0-rc.9",
"@storybook/theming": "6.2.0-rc.9",
"core-js": "^3.8.2",
"global": "^4.4.0",
"regenerator-runtime": "^0.13.7",
Expand All @@ -68,7 +68,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "9140a2884503b405d457268fd9ffd8d2438013af",
"gitHead": "229ae2956bdb1e49a5dee26d3b6ada991a38c725",
"storybook": {
"displayName": "Design assets",
"unsupportedFrameworks": [
Expand Down
1 change: 1 addition & 0 deletions addons/docs/angular/inline.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('../dist/esm/frameworks/angular/prepareForInline');
42 changes: 21 additions & 21 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.2.0-rc.6",
"version": "6.2.0-rc.9",
"description": "Document component usage and properties in Markdown",
"keywords": [
"addon",
Expand Down Expand Up @@ -58,19 +58,19 @@
"@mdx-js/loader": "^1.6.22",
"@mdx-js/mdx": "^1.6.22",
"@mdx-js/react": "^1.6.22",
"@storybook/addons": "6.2.0-rc.6",
"@storybook/api": "6.2.0-rc.6",
"@storybook/builder-webpack4": "6.2.0-rc.6",
"@storybook/client-api": "6.2.0-rc.6",
"@storybook/client-logger": "6.2.0-rc.6",
"@storybook/components": "6.2.0-rc.6",
"@storybook/core": "6.2.0-rc.6",
"@storybook/core-events": "6.2.0-rc.6",
"@storybook/addons": "6.2.0-rc.9",
"@storybook/api": "6.2.0-rc.9",
"@storybook/builder-webpack4": "6.2.0-rc.9",
"@storybook/client-api": "6.2.0-rc.9",
"@storybook/client-logger": "6.2.0-rc.9",
"@storybook/components": "6.2.0-rc.9",
"@storybook/core": "6.2.0-rc.9",
"@storybook/core-events": "6.2.0-rc.9",
"@storybook/csf": "0.0.1",
"@storybook/node-logger": "6.2.0-rc.6",
"@storybook/postinstall": "6.2.0-rc.6",
"@storybook/source-loader": "6.2.0-rc.6",
"@storybook/theming": "6.2.0-rc.6",
"@storybook/node-logger": "6.2.0-rc.9",
"@storybook/postinstall": "6.2.0-rc.9",
"@storybook/source-loader": "6.2.0-rc.9",
"@storybook/theming": "6.2.0-rc.9",
"acorn": "^7.4.1",
"acorn-jsx": "^5.3.1",
"acorn-walk": "^7.2.0",
Expand All @@ -97,10 +97,10 @@
"@babel/core": "^7.12.10",
"@emotion/core": "^10.1.1",
"@emotion/styled": "^10.0.27",
"@storybook/angular": "6.2.0-rc.6",
"@storybook/react": "6.2.0-rc.6",
"@storybook/vue": "6.2.0-rc.6",
"@storybook/web-components": "6.2.0-rc.6",
"@storybook/angular": "6.2.0-rc.9",
"@storybook/react": "6.2.0-rc.9",
"@storybook/vue": "6.2.0-rc.9",
"@storybook/web-components": "6.2.0-rc.9",
"@types/cross-spawn": "^6.0.2",
"@types/doctrine": "^0.0.3",
"@types/enzyme": "^3.10.8",
Expand Down Expand Up @@ -131,9 +131,9 @@
},
"peerDependencies": {
"@babel/core": "^7.11.5",
"@storybook/angular": "6.2.0-rc.6",
"@storybook/vue": "6.2.0-rc.6",
"@storybook/vue3": "6.2.0-rc.6",
"@storybook/angular": "6.2.0-rc.9",
"@storybook/vue": "6.2.0-rc.9",
"@storybook/vue3": "6.2.0-rc.9",
"babel-loader": "^8.0.0",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0",
Expand Down Expand Up @@ -174,7 +174,7 @@
"publishConfig": {
"access": "public"
},
"gitHead": "9140a2884503b405d457268fd9ffd8d2438013af",
"gitHead": "229ae2956bdb1e49a5dee26d3b6ada991a38c725",
"storybook": {
"displayName": "Docs",
"icon": "https://user-images.githubusercontent.com/263385/101991672-48355c80-3c7c-11eb-82d9-95fa12438f64.png",
Expand Down
4 changes: 0 additions & 4 deletions addons/docs/src/frameworks/angular/config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { SourceType } from '../../shared';
import { extractArgTypes, extractComponentDescription } from './compodoc';
import { sourceDecorator } from './sourceDecorator';
import { prepareForInline } from './prepareForInline';

export const parameters = {
docs: {
// probably set this to true by default once it's battle-tested
inlineStories: false,
prepareForInline,
extractArgTypes,
extractComponentDescription,
source: {
Expand Down
Loading

0 comments on commit b6da275

Please sign in to comment.