@storybook/cli 7.0.0-alpha.35 → 7.0.0-alpha.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/cli",
3
- "version": "7.0.0-alpha.35",
3
+ "version": "7.0.0-alpha.38",
4
4
  "description": "Storybook's CLI - easiest method of adding storybook to your projects",
5
5
  "keywords": [
6
6
  "cli",
@@ -43,13 +43,13 @@
43
43
  "dependencies": {
44
44
  "@babel/core": "^7.12.10",
45
45
  "@babel/preset-env": "^7.12.11",
46
- "@storybook/codemod": "7.0.0-alpha.35",
47
- "@storybook/core-common": "7.0.0-alpha.35",
48
- "@storybook/core-server": "7.0.0-alpha.35",
49
- "@storybook/csf-tools": "7.0.0-alpha.35",
50
- "@storybook/node-logger": "7.0.0-alpha.35",
51
- "@storybook/semver": "^7.3.2",
52
- "@storybook/telemetry": "7.0.0-alpha.35",
46
+ "@storybook/codemod": "7.0.0-alpha.38",
47
+ "@storybook/core-common": "7.0.0-alpha.38",
48
+ "@storybook/core-server": "7.0.0-alpha.38",
49
+ "@storybook/csf-tools": "7.0.0-alpha.38",
50
+ "@storybook/node-logger": "7.0.0-alpha.38",
51
+ "@storybook/telemetry": "7.0.0-alpha.38",
52
+ "@types/semver": "^7.3.4",
53
53
  "boxen": "^5.1.2",
54
54
  "chalk": "^4.1.0",
55
55
  "commander": "^6.2.1",
@@ -67,13 +67,14 @@
67
67
  "prompts": "^2.4.0",
68
68
  "puppeteer-core": "^2.1.1",
69
69
  "read-pkg-up": "^7.0.1",
70
+ "semver": "^7.3.7",
70
71
  "shelljs": "^0.8.5",
71
72
  "strip-json-comments": "^3.0.1",
72
73
  "ts-dedent": "^2.0.0",
73
74
  "update-notifier": "^5.0.1"
74
75
  },
75
76
  "devDependencies": {
76
- "@storybook/client-api": "7.0.0-alpha.35",
77
+ "@storybook/client-api": "7.0.0-alpha.38",
77
78
  "@types/cross-spawn": "^6.0.2",
78
79
  "@types/degit": "^2.8.3",
79
80
  "@types/prompts": "^2.0.9",
@@ -94,5 +95,5 @@
94
95
  ],
95
96
  "platform": "node"
96
97
  },
97
- "gitHead": "d8972df8c6c1c4716131a856751f5914acddaad1"
98
+ "gitHead": "438114fcf62a763f0e8c07e2c34890dd987ca431"
98
99
  }
@@ -7,7 +7,7 @@ export default {
7
7
  title: 'Button',
8
8
  component: Button,
9
9
  argTypes: {
10
- text: { control: 'text' },
10
+ label: { control: 'text' },
11
11
  },
12
12
  };
13
13
 
@@ -18,19 +18,19 @@ const Template = (args) => ({
18
18
 
19
19
  export const Text = Template.bind({});
20
20
  Text.args = {
21
- text: 'Button',
21
+ label: 'Button',
22
22
  onClick: action('onClick'),
23
23
  };
24
24
 
25
25
  export const Emoji = Template.bind({});
26
26
  Emoji.args = {
27
- text: '😀 😎 👍 💯',
27
+ label: '😀 😎 👍 💯',
28
28
  };
29
29
 
30
30
  export const TextWithAction = () => ({
31
31
  component: Button,
32
32
  props: {
33
- text: 'Trigger Action',
33
+ label: 'Trigger Action',
34
34
  onClick: () => action('This was clicked')(),
35
35
  },
36
36
  });
@@ -41,7 +41,7 @@ TextWithAction.parameters = { notes: 'My notes on a button with emojis' };
41
41
  export const ButtonWithLinkToAnotherStory = () => ({
42
42
  component: Button,
43
43
  props: {
44
- text: 'Go to Welcome Story',
44
+ label: 'Go to Welcome Story',
45
45
  onClick: linkTo('example-introduction--page'),
46
46
  },
47
47
  });
@@ -4,7 +4,7 @@ import { customElement, bindable } from 'aurelia';
4
4
  name: 'storybook-button-component',
5
5
  template: `
6
6
  <template>
7
- <button click.delegate="onClick($event)">\${text}</button>
7
+ <button click.delegate="onClick($event)">\${label}</button>
8
8
  <style>
9
9
  button {
10
10
  border: 1px solid #eee;
@@ -21,7 +21,7 @@ import { customElement, bindable } from 'aurelia';
21
21
  })
22
22
  export default class Button {
23
23
  @bindable()
24
- text = '';
24
+ label = '';
25
25
 
26
26
  @bindable()
27
27
  onClick: MouseEvent;
@@ -7,26 +7,26 @@ export default {
7
7
  title: 'Button',
8
8
  // More on argTypes: https://storybook.js.org/docs/ember/api/argtypes
9
9
  argTypes: {
10
- children: { control: 'text' },
10
+ label: { control: 'text' },
11
11
  },
12
12
  };
13
13
 
14
14
  // More on component templates: https://storybook.js.org/docs/ember/writing-stories/introduction#using-args
15
15
  const Template = (args) => ({
16
- template: hbs`<button {{action onClick}}>{{children}}</button>`,
16
+ template: hbs`<button {{action onClick}}>{{label}}</button>`,
17
17
  context: args,
18
18
  });
19
19
 
20
20
  export const Text = Template.bind({});
21
21
  // More on args: https://storybook.js.org/docs/ember/writing-stories/args
22
22
  Text.args = {
23
- children: 'Button',
23
+ label: 'Button',
24
24
  onClick: action('onClick'),
25
25
  };
26
26
 
27
27
  export const Emoji = Template.bind({});
28
28
  Emoji.args = {
29
- children: '😀 😎 👍 💯',
29
+ label: '😀 😎 👍 💯',
30
30
  };
31
31
 
32
32
  export const TextWithAction = () => ({
@@ -6,7 +6,7 @@ export default {
6
6
  title: 'Button',
7
7
  // More on argTypes: https://storybook.js.org/docs/marko/api/argtypes
8
8
  argTypes: {
9
- children: { control: 'text' },
9
+ label: { control: 'text' },
10
10
  },
11
11
  };
12
12
 
@@ -19,6 +19,6 @@ const Template = (args) => ({
19
19
  export const Text = Template.bind({});
20
20
  // More on args: https://storybook.js.org/docs/marko/writing-stories/args
21
21
  Text.args = {
22
- children: 'Button',
22
+ label: 'Button',
23
23
  onClick: action('onClick'),
24
24
  };
@@ -9,5 +9,5 @@ class {
9
9
  }
10
10
 
11
11
  <div>
12
- <button type="button" on-click("handleClick")>${input.children}</button>
12
+ <button type="button" on-click("handleClick")>${input.label}</button>
13
13
  </div>
@@ -4,7 +4,7 @@ import m from 'mithril';
4
4
  import './button.css';
5
5
 
6
6
  export const Button = {
7
- view: ({ children, attrs }) => {
7
+ view: ({ label, attrs }) => {
8
8
  const mode = attrs.primary ? 'storybook-button--primary' : 'storybook-button--secondary';
9
9
  const size = attrs.size || 'medium';
10
10
 
@@ -15,7 +15,7 @@ export const Button = {
15
15
  style={attrs.backgroundColor && { backgroundColor: attrs.backgroundColor }}
16
16
  onclick={attrs.onClick}
17
17
  >
18
- {children}
18
+ {label}
19
19
  </button>
20
20
  );
21
21
  },
@@ -14,30 +14,30 @@ export default {
14
14
  };
15
15
 
16
16
  // More on component templates: https://storybook.js.org/docs/mithril/writing-stories/introduction#using-args
17
- const Template = ({ children, ...args }) => ({
18
- view: () => m(Button, args, children),
17
+ const Template = ({ label, ...args }) => ({
18
+ view: () => m(Button, args, label),
19
19
  });
20
20
 
21
21
  export const Primary = Template.bind({});
22
22
  // More on args: https://storybook.js.org/docs/mithril/writing-stories/args
23
23
  Primary.args = {
24
24
  primary: true,
25
- children: 'Button',
25
+ label: 'Button',
26
26
  };
27
27
 
28
28
  export const Secondary = Template.bind({});
29
29
  Secondary.args = {
30
- children: 'Button',
30
+ label: 'Button',
31
31
  };
32
32
 
33
33
  export const Large = Template.bind({});
34
34
  Large.args = {
35
35
  size: 'large',
36
- children: 'Button',
36
+ label: 'Button',
37
37
  };
38
38
 
39
39
  export const Small = Template.bind({});
40
40
  Small.args = {
41
41
  size: 'small',
42
- children: 'Button',
42
+ label: 'Button',
43
43
  };
@@ -7,8 +7,8 @@ export default {
7
7
  component: Header,
8
8
  };
9
9
 
10
- const Template = ({ children, ...args }) => ({
11
- view: () => m(Header, args, children),
10
+ const Template = ({ label, ...args }) => ({
11
+ view: () => m(Header, args, label),
12
12
  });
13
13
 
14
14
  export const LoggedIn = Template.bind({});
@@ -8,8 +8,8 @@ export default {
8
8
  component: Page,
9
9
  };
10
10
 
11
- const Template = ({ children, ...args }) => ({
12
- view: () => m(Page, args, children),
11
+ const Template = ({ label, ...args }) => ({
12
+ view: () => m(Page, args, label),
13
13
  });
14
14
 
15
15
  export const LoggedIn = Template.bind({});
@@ -1,5 +1,3 @@
1
- /** @jsx h */
2
- import { h } from 'preact';
3
1
  import PropTypes from 'prop-types';
4
2
  import './button.css';
5
3
 
@@ -1,5 +1,3 @@
1
- /** @jsx h */
2
- import { h } from 'preact';
3
1
  import { Button } from './Button';
4
2
 
5
3
  // More on default export: https://storybook.js.org/docs/preact/writing-stories/introduction#default-export
@@ -1,5 +1,3 @@
1
- /** @jsx h */
2
- import { h, Fragment } from 'preact';
3
1
  import PropTypes from 'prop-types';
4
2
 
5
3
  import { Button } from './Button';
@@ -29,17 +27,17 @@ export const Header = ({ user, onLogin, onLogout, onCreateAccount }) => (
29
27
  </div>
30
28
  <div>
31
29
  {user ? (
32
- <Fragment>
30
+ <>
33
31
  <span className="welcome">
34
32
  Welcome, <b>{user.name}</b>!
35
33
  </span>
36
34
  <Button size="small" onClick={onLogout} label="Log out" />
37
- </Fragment>
35
+ </>
38
36
  ) : (
39
- <Fragment>
37
+ <>
40
38
  <Button size="small" onClick={onLogin} label="Log in" />
41
39
  <Button primary size="small" onClick={onCreateAccount} label="Sign up" />
42
- </Fragment>
40
+ </>
43
41
  )}
44
42
  </div>
45
43
  </div>
@@ -1,5 +1,3 @@
1
- /** @jsx h */
2
- import { h } from 'preact';
3
1
  import { Header } from './Header';
4
2
 
5
3
  export default {
@@ -1,5 +1,3 @@
1
- /** @jsx h */
2
- import { h } from 'preact';
3
1
  import { useState } from 'preact/hooks';
4
2
 
5
3
  import { Header } from './Header';
@@ -1,5 +1,3 @@
1
- /** @jsx h */
2
- import { h } from 'preact';
3
1
  import { within, userEvent } from '@storybook/testing-library';
4
2
 
5
3
  import { Page } from './Page';
@@ -4,18 +4,9 @@
4
4
  <div>
5
5
  <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
6
6
  <g fill="none" fill-rule="evenodd">
7
- <path
8
- d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
9
- fill="#FFF"
10
- />
11
- <path
12
- d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
13
- fill="#555AB9"
14
- />
15
- <path
16
- d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z"
17
- fill="#91BAF8"
18
- />
7
+ <path d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z" fill="#FFF" />
8
+ <path d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z" fill="#555AB9" />
9
+ <path d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z" fill="#91BAF8" />
19
10
  </g>
20
11
  </svg>
21
12
  <h1>Acme</h1>
@@ -4,18 +4,9 @@
4
4
  <div>
5
5
  <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
6
6
  <g fill="none" fill-rule="evenodd">
7
- <path
8
- d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
9
- fill="#FFF"
10
- />
11
- <path
12
- d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
13
- fill="#555AB9"
14
- />
15
- <path
16
- d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z"
17
- fill="#91BAF8"
18
- />
7
+ <path d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z" fill="#FFF" />
8
+ <path d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z" fill="#555AB9" />
9
+ <path d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z" fill="#91BAF8" />
19
10
  </g>
20
11
  </svg>
21
12
  <h1>Acme</h1>
@@ -2,16 +2,16 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { TouchableHighlight } from 'react-native';
4
4
 
5
- export default function Button({ onPress, children }) {
6
- return <TouchableHighlight onPress={onPress}>{children}</TouchableHighlight>;
5
+ export default function Button({ onPress, label }) {
6
+ return <TouchableHighlight onPress={onPress}>{label}</TouchableHighlight>;
7
7
  }
8
8
 
9
9
  Button.defaultProps = {
10
- children: null,
10
+ label: null,
11
11
  onPress: () => {},
12
12
  };
13
13
 
14
14
  Button.propTypes = {
15
- children: PropTypes.node,
15
+ label: PropTypes.node,
16
16
  onPress: PropTypes.func,
17
17
  };
@@ -3,14 +3,14 @@ import PropTypes from 'prop-types';
3
3
  import { View } from 'react-native';
4
4
  import style from './style';
5
5
 
6
- export default function CenterView({ children }) {
7
- return <View style={style.main}>{children}</View>;
6
+ export default function CenterView({ label }) {
7
+ return <View style={style.main}>{label}</View>;
8
8
  }
9
9
 
10
10
  CenterView.defaultProps = {
11
- children: null,
11
+ label: null,
12
12
  };
13
13
 
14
14
  CenterView.propTypes = {
15
- children: PropTypes.node,
15
+ label: PropTypes.node,
16
16
  };