@storybook/cli 6.5.0-alpha.23 → 6.5.0-alpha.27
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/dist/cjs/frameworks/svelte/Button.stories.js +51 -0
- package/dist/cjs/frameworks/svelte/Header.stories.js +29 -0
- package/dist/cjs/frameworks/svelte/Page.stories.js +29 -0
- package/dist/cjs/generators/ANGULAR/template-csf/.storybook/tsconfig.json +16 -5
- package/dist/cjs/generators/AURELIA/template-csf/.storybook/tsconfig.json +16 -5
- package/dist/cjs/generators/SVELTE/index.js +0 -1
- package/dist/cjs/js-package-manager/JsPackageManager.js +1 -1
- package/dist/cjs/versions.js +65 -0
- package/dist/esm/frameworks/svelte/Button.stories.js +51 -0
- package/dist/esm/frameworks/svelte/Header.stories.js +29 -0
- package/dist/esm/frameworks/svelte/Page.stories.js +29 -0
- package/dist/esm/generators/ANGULAR/template-csf/.storybook/tsconfig.json +16 -5
- package/dist/esm/generators/AURELIA/template-csf/.storybook/tsconfig.json +16 -5
- package/dist/esm/generators/SVELTE/index.js +0 -1
- package/dist/esm/js-package-manager/JsPackageManager.js +1 -1
- package/dist/esm/versions.js +65 -0
- package/dist/modern/frameworks/svelte/Button.stories.js +51 -0
- package/dist/modern/frameworks/svelte/Header.stories.js +29 -0
- package/dist/modern/frameworks/svelte/Page.stories.js +29 -0
- package/dist/modern/generators/ANGULAR/template-csf/.storybook/tsconfig.json +16 -5
- package/dist/modern/generators/AURELIA/template-csf/.storybook/tsconfig.json +16 -5
- package/dist/modern/generators/SVELTE/index.js +0 -1
- package/dist/modern/js-package-manager/JsPackageManager.js +1 -1
- package/dist/modern/versions.js +65 -0
- package/dist/ts3.4/versions.d.ts +58 -0
- package/dist/ts3.9/versions.d.ts +58 -0
- package/package.json +8 -9
- package/dist/cjs/frameworks/svelte/Button.stories.svelte +0 -57
- package/dist/cjs/frameworks/svelte/Header.stories.svelte +0 -32
- package/dist/cjs/frameworks/svelte/Page.stories.svelte +0 -32
- package/dist/cjs/versions.json +0 -59
- package/dist/esm/frameworks/svelte/Button.stories.svelte +0 -57
- package/dist/esm/frameworks/svelte/Header.stories.svelte +0 -32
- package/dist/esm/frameworks/svelte/Page.stories.svelte +0 -32
- package/dist/esm/versions.json +0 -59
- package/dist/modern/frameworks/svelte/Button.stories.svelte +0 -57
- package/dist/modern/frameworks/svelte/Header.stories.svelte +0 -32
- package/dist/modern/frameworks/svelte/Page.stories.svelte +0 -32
- package/dist/modern/versions.json +0 -59
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import Button from './Button.svelte';
|
|
2
|
+
|
|
3
|
+
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
4
|
+
// More on argTypes: https://storybook.js.org/docs/svelte/api/argtypes
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Example/Button',
|
|
7
|
+
component: Button,
|
|
8
|
+
argTypes: {
|
|
9
|
+
backgroundColor: { control: 'color' },
|
|
10
|
+
label: { control: 'text' },
|
|
11
|
+
onClick: { action: 'onClick' },
|
|
12
|
+
primary: { control: 'boolean' },
|
|
13
|
+
size: {
|
|
14
|
+
control: { type: 'select' },
|
|
15
|
+
options: ['small', 'medium', 'large'],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// More on component templates: https://storybook.js.org/docs/svelte/writing-stories/introduction#using-args
|
|
21
|
+
const Template = (args) => ({
|
|
22
|
+
Component: Button,
|
|
23
|
+
props: args,
|
|
24
|
+
on: {
|
|
25
|
+
click: args.onClick,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// More on args: https://storybook.js.org/docs/svelte/writing-stories/args
|
|
30
|
+
export const Primary = Template.bind({});
|
|
31
|
+
Primary.args = {
|
|
32
|
+
primary: true,
|
|
33
|
+
label: 'Button',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const Secondary = Template.bind({});
|
|
37
|
+
Secondary.args = {
|
|
38
|
+
label: 'Button',
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const Large = Template.bind({});
|
|
42
|
+
Large.args = {
|
|
43
|
+
size: 'large',
|
|
44
|
+
label: 'Button',
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const Small = Template.bind({});
|
|
48
|
+
Small.args = {
|
|
49
|
+
size: 'small',
|
|
50
|
+
label: 'Button',
|
|
51
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import Header from './Header.svelte';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Example/Header',
|
|
5
|
+
component: Header,
|
|
6
|
+
argTypes: {
|
|
7
|
+
onLogin: { action: 'onLogin' },
|
|
8
|
+
onLogout: { action: 'onLogout' },
|
|
9
|
+
onCreateAccount: { action: 'onCreateAccount' },
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const Template = (args) => ({
|
|
14
|
+
Component: Header,
|
|
15
|
+
props: args,
|
|
16
|
+
on: {
|
|
17
|
+
login: args.onLogin,
|
|
18
|
+
logout: args.onLogout,
|
|
19
|
+
createAccount: args.onCreateAccount,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const LoggedIn = Template.bind({});
|
|
24
|
+
LoggedIn.args = {
|
|
25
|
+
user: {},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const LoggedOut = Template.bind({});
|
|
29
|
+
LoggedOut.args = {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import Page from './Page.svelte';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Example/Page',
|
|
5
|
+
component: Page,
|
|
6
|
+
argTypes: {
|
|
7
|
+
onLogin: { action: 'onLogin' },
|
|
8
|
+
onLogout: { action: 'onLogout' },
|
|
9
|
+
onCreateAccount: { action: 'onCreateAccount' },
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const Template = (args) => ({
|
|
14
|
+
Component: Page,
|
|
15
|
+
props: args,
|
|
16
|
+
on: {
|
|
17
|
+
login: args.onLogin,
|
|
18
|
+
logout: args.onLogout,
|
|
19
|
+
createAccount: args.onCreateAccount,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const LoggedIn = Template.bind({});
|
|
24
|
+
LoggedIn.args = {
|
|
25
|
+
user: {},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const LoggedOut = Template.bind({});
|
|
29
|
+
LoggedOut.args = {};
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "%SET_DURING_SB_INIT%",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"types": [
|
|
4
|
+
"types": [
|
|
5
|
+
"node"
|
|
6
|
+
],
|
|
5
7
|
"allowSyntheticDefaultImports": true
|
|
6
8
|
},
|
|
7
|
-
"exclude": [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
"exclude": [
|
|
10
|
+
"../src/test.ts",
|
|
11
|
+
"../src/**/*.spec.ts",
|
|
12
|
+
"../projects/**/*.spec.ts"
|
|
13
|
+
],
|
|
14
|
+
"include": [
|
|
15
|
+
"../src/**/*",
|
|
16
|
+
"../projects/**/*"
|
|
17
|
+
],
|
|
18
|
+
"files": [
|
|
19
|
+
"./typings.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "%SET_DURING_SB_INIT%",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"types": [
|
|
4
|
+
"types": [
|
|
5
|
+
"node"
|
|
6
|
+
]
|
|
5
7
|
},
|
|
6
|
-
"exclude": [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
"exclude": [
|
|
9
|
+
"../src/test.ts",
|
|
10
|
+
"../src/**/*.spec.ts",
|
|
11
|
+
"../projects/**/*.spec.ts"
|
|
12
|
+
],
|
|
13
|
+
"include": [
|
|
14
|
+
"../src/**/*",
|
|
15
|
+
"../projects/**/*"
|
|
16
|
+
],
|
|
17
|
+
"files": [
|
|
18
|
+
"./typings.d.ts"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -53,7 +53,6 @@ const generator = async (packageManager, npmOptions, options) => {
|
|
|
53
53
|
|
|
54
54
|
await (0, _baseGenerator.baseGenerator)(packageManager, npmOptions, options, 'svelte', {
|
|
55
55
|
extraPackages: ['svelte', 'svelte-loader'],
|
|
56
|
-
extraAddons: ['@storybook/addon-svelte-csf'],
|
|
57
56
|
extensions: ['js', 'jsx', 'ts', 'tsx', 'svelte'],
|
|
58
57
|
extraMain,
|
|
59
58
|
commonJs
|
|
@@ -18,7 +18,7 @@ var _helpers = require("../helpers");
|
|
|
18
18
|
|
|
19
19
|
var _PackageJsonHelper = require("./PackageJsonHelper");
|
|
20
20
|
|
|
21
|
-
var _versions = _interopRequireDefault(require("../versions
|
|
21
|
+
var _versions = _interopRequireDefault(require("../versions"));
|
|
22
22
|
|
|
23
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
24
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
// auto generated file, do not edit
|
|
8
|
+
var _default = {
|
|
9
|
+
"@storybook/addon-a11y": "6.5.0-alpha.27",
|
|
10
|
+
"@storybook/addon-actions": "6.5.0-alpha.27",
|
|
11
|
+
"@storybook/addon-backgrounds": "6.5.0-alpha.27",
|
|
12
|
+
"@storybook/addon-controls": "6.5.0-alpha.27",
|
|
13
|
+
"@storybook/addon-docs": "6.5.0-alpha.27",
|
|
14
|
+
"@storybook/addon-essentials": "6.5.0-alpha.27",
|
|
15
|
+
"@storybook/addon-interactions": "6.5.0-alpha.27",
|
|
16
|
+
"@storybook/addon-jest": "6.5.0-alpha.27",
|
|
17
|
+
"@storybook/addon-links": "6.5.0-alpha.27",
|
|
18
|
+
"@storybook/addon-measure": "6.5.0-alpha.27",
|
|
19
|
+
"@storybook/addon-outline": "6.5.0-alpha.27",
|
|
20
|
+
"@storybook/addon-storyshots": "6.5.0-alpha.27",
|
|
21
|
+
"@storybook/addon-storyshots-puppeteer": "6.5.0-alpha.27",
|
|
22
|
+
"@storybook/addon-storysource": "6.5.0-alpha.27",
|
|
23
|
+
"@storybook/addon-toolbars": "6.5.0-alpha.27",
|
|
24
|
+
"@storybook/addon-viewport": "6.5.0-alpha.27",
|
|
25
|
+
"@storybook/addons": "6.5.0-alpha.27",
|
|
26
|
+
"@storybook/angular": "6.5.0-alpha.27",
|
|
27
|
+
"@storybook/api": "6.5.0-alpha.27",
|
|
28
|
+
"@storybook/builder-webpack4": "6.5.0-alpha.27",
|
|
29
|
+
"@storybook/builder-webpack5": "6.5.0-alpha.27",
|
|
30
|
+
"@storybook/channel-postmessage": "6.5.0-alpha.27",
|
|
31
|
+
"@storybook/channel-websocket": "6.5.0-alpha.27",
|
|
32
|
+
"@storybook/channels": "6.5.0-alpha.27",
|
|
33
|
+
"@storybook/cli": "6.5.0-alpha.27",
|
|
34
|
+
"@storybook/client-api": "6.5.0-alpha.27",
|
|
35
|
+
"@storybook/client-logger": "6.5.0-alpha.27",
|
|
36
|
+
"@storybook/codemod": "6.5.0-alpha.27",
|
|
37
|
+
"@storybook/components": "6.5.0-alpha.27",
|
|
38
|
+
"@storybook/core": "6.5.0-alpha.27",
|
|
39
|
+
"@storybook/core-client": "6.5.0-alpha.27",
|
|
40
|
+
"@storybook/core-common": "6.5.0-alpha.27",
|
|
41
|
+
"@storybook/core-events": "6.5.0-alpha.27",
|
|
42
|
+
"@storybook/core-server": "6.5.0-alpha.27",
|
|
43
|
+
"@storybook/csf-tools": "6.5.0-alpha.27",
|
|
44
|
+
"@storybook/ember": "6.5.0-alpha.27",
|
|
45
|
+
"@storybook/html": "6.5.0-alpha.27",
|
|
46
|
+
"@storybook/instrumenter": "6.5.0-alpha.27",
|
|
47
|
+
"@storybook/manager-webpack4": "6.5.0-alpha.27",
|
|
48
|
+
"@storybook/manager-webpack5": "6.5.0-alpha.27",
|
|
49
|
+
"@storybook/node-logger": "6.5.0-alpha.27",
|
|
50
|
+
"@storybook/postinstall": "6.5.0-alpha.27",
|
|
51
|
+
"@storybook/preact": "6.5.0-alpha.27",
|
|
52
|
+
"@storybook/preview-web": "6.5.0-alpha.27",
|
|
53
|
+
"@storybook/react": "6.5.0-alpha.27",
|
|
54
|
+
"@storybook/router": "6.5.0-alpha.27",
|
|
55
|
+
"@storybook/server": "6.5.0-alpha.27",
|
|
56
|
+
"@storybook/source-loader": "6.5.0-alpha.27",
|
|
57
|
+
"@storybook/store": "6.5.0-alpha.27",
|
|
58
|
+
"@storybook/svelte": "6.5.0-alpha.27",
|
|
59
|
+
"@storybook/theming": "6.5.0-alpha.27",
|
|
60
|
+
"@storybook/ui": "6.5.0-alpha.27",
|
|
61
|
+
"@storybook/vue": "6.5.0-alpha.27",
|
|
62
|
+
"@storybook/vue3": "6.5.0-alpha.27",
|
|
63
|
+
"@storybook/web-components": "6.5.0-alpha.27"
|
|
64
|
+
};
|
|
65
|
+
exports.default = _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import Button from './Button.svelte';
|
|
2
|
+
|
|
3
|
+
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
4
|
+
// More on argTypes: https://storybook.js.org/docs/svelte/api/argtypes
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Example/Button',
|
|
7
|
+
component: Button,
|
|
8
|
+
argTypes: {
|
|
9
|
+
backgroundColor: { control: 'color' },
|
|
10
|
+
label: { control: 'text' },
|
|
11
|
+
onClick: { action: 'onClick' },
|
|
12
|
+
primary: { control: 'boolean' },
|
|
13
|
+
size: {
|
|
14
|
+
control: { type: 'select' },
|
|
15
|
+
options: ['small', 'medium', 'large'],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// More on component templates: https://storybook.js.org/docs/svelte/writing-stories/introduction#using-args
|
|
21
|
+
const Template = (args) => ({
|
|
22
|
+
Component: Button,
|
|
23
|
+
props: args,
|
|
24
|
+
on: {
|
|
25
|
+
click: args.onClick,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// More on args: https://storybook.js.org/docs/svelte/writing-stories/args
|
|
30
|
+
export const Primary = Template.bind({});
|
|
31
|
+
Primary.args = {
|
|
32
|
+
primary: true,
|
|
33
|
+
label: 'Button',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const Secondary = Template.bind({});
|
|
37
|
+
Secondary.args = {
|
|
38
|
+
label: 'Button',
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const Large = Template.bind({});
|
|
42
|
+
Large.args = {
|
|
43
|
+
size: 'large',
|
|
44
|
+
label: 'Button',
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const Small = Template.bind({});
|
|
48
|
+
Small.args = {
|
|
49
|
+
size: 'small',
|
|
50
|
+
label: 'Button',
|
|
51
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import Header from './Header.svelte';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Example/Header',
|
|
5
|
+
component: Header,
|
|
6
|
+
argTypes: {
|
|
7
|
+
onLogin: { action: 'onLogin' },
|
|
8
|
+
onLogout: { action: 'onLogout' },
|
|
9
|
+
onCreateAccount: { action: 'onCreateAccount' },
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const Template = (args) => ({
|
|
14
|
+
Component: Header,
|
|
15
|
+
props: args,
|
|
16
|
+
on: {
|
|
17
|
+
login: args.onLogin,
|
|
18
|
+
logout: args.onLogout,
|
|
19
|
+
createAccount: args.onCreateAccount,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const LoggedIn = Template.bind({});
|
|
24
|
+
LoggedIn.args = {
|
|
25
|
+
user: {},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const LoggedOut = Template.bind({});
|
|
29
|
+
LoggedOut.args = {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import Page from './Page.svelte';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Example/Page',
|
|
5
|
+
component: Page,
|
|
6
|
+
argTypes: {
|
|
7
|
+
onLogin: { action: 'onLogin' },
|
|
8
|
+
onLogout: { action: 'onLogout' },
|
|
9
|
+
onCreateAccount: { action: 'onCreateAccount' },
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const Template = (args) => ({
|
|
14
|
+
Component: Page,
|
|
15
|
+
props: args,
|
|
16
|
+
on: {
|
|
17
|
+
login: args.onLogin,
|
|
18
|
+
logout: args.onLogout,
|
|
19
|
+
createAccount: args.onCreateAccount,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const LoggedIn = Template.bind({});
|
|
24
|
+
LoggedIn.args = {
|
|
25
|
+
user: {},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const LoggedOut = Template.bind({});
|
|
29
|
+
LoggedOut.args = {};
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "%SET_DURING_SB_INIT%",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"types": [
|
|
4
|
+
"types": [
|
|
5
|
+
"node"
|
|
6
|
+
],
|
|
5
7
|
"allowSyntheticDefaultImports": true
|
|
6
8
|
},
|
|
7
|
-
"exclude": [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
"exclude": [
|
|
10
|
+
"../src/test.ts",
|
|
11
|
+
"../src/**/*.spec.ts",
|
|
12
|
+
"../projects/**/*.spec.ts"
|
|
13
|
+
],
|
|
14
|
+
"include": [
|
|
15
|
+
"../src/**/*",
|
|
16
|
+
"../projects/**/*"
|
|
17
|
+
],
|
|
18
|
+
"files": [
|
|
19
|
+
"./typings.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "%SET_DURING_SB_INIT%",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"types": [
|
|
4
|
+
"types": [
|
|
5
|
+
"node"
|
|
6
|
+
]
|
|
5
7
|
},
|
|
6
|
-
"exclude": [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
"exclude": [
|
|
9
|
+
"../src/test.ts",
|
|
10
|
+
"../src/**/*.spec.ts",
|
|
11
|
+
"../projects/**/*.spec.ts"
|
|
12
|
+
],
|
|
13
|
+
"include": [
|
|
14
|
+
"../src/**/*",
|
|
15
|
+
"../projects/**/*"
|
|
16
|
+
],
|
|
17
|
+
"files": [
|
|
18
|
+
"./typings.d.ts"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -53,7 +53,6 @@ const generator = async (packageManager, npmOptions, options) => {
|
|
|
53
53
|
|
|
54
54
|
await (0, _baseGenerator.baseGenerator)(packageManager, npmOptions, options, 'svelte', {
|
|
55
55
|
extraPackages: ['svelte', 'svelte-loader'],
|
|
56
|
-
extraAddons: ['@storybook/addon-svelte-csf'],
|
|
57
56
|
extensions: ['js', 'jsx', 'ts', 'tsx', 'svelte'],
|
|
58
57
|
extraMain,
|
|
59
58
|
commonJs
|
|
@@ -18,7 +18,7 @@ var _helpers = require("../helpers");
|
|
|
18
18
|
|
|
19
19
|
var _PackageJsonHelper = require("./PackageJsonHelper");
|
|
20
20
|
|
|
21
|
-
var _versions = _interopRequireDefault(require("../versions
|
|
21
|
+
var _versions = _interopRequireDefault(require("../versions"));
|
|
22
22
|
|
|
23
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
24
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
// auto generated file, do not edit
|
|
8
|
+
var _default = {
|
|
9
|
+
"@storybook/addon-a11y": "6.5.0-alpha.27",
|
|
10
|
+
"@storybook/addon-actions": "6.5.0-alpha.27",
|
|
11
|
+
"@storybook/addon-backgrounds": "6.5.0-alpha.27",
|
|
12
|
+
"@storybook/addon-controls": "6.5.0-alpha.27",
|
|
13
|
+
"@storybook/addon-docs": "6.5.0-alpha.27",
|
|
14
|
+
"@storybook/addon-essentials": "6.5.0-alpha.27",
|
|
15
|
+
"@storybook/addon-interactions": "6.5.0-alpha.27",
|
|
16
|
+
"@storybook/addon-jest": "6.5.0-alpha.27",
|
|
17
|
+
"@storybook/addon-links": "6.5.0-alpha.27",
|
|
18
|
+
"@storybook/addon-measure": "6.5.0-alpha.27",
|
|
19
|
+
"@storybook/addon-outline": "6.5.0-alpha.27",
|
|
20
|
+
"@storybook/addon-storyshots": "6.5.0-alpha.27",
|
|
21
|
+
"@storybook/addon-storyshots-puppeteer": "6.5.0-alpha.27",
|
|
22
|
+
"@storybook/addon-storysource": "6.5.0-alpha.27",
|
|
23
|
+
"@storybook/addon-toolbars": "6.5.0-alpha.27",
|
|
24
|
+
"@storybook/addon-viewport": "6.5.0-alpha.27",
|
|
25
|
+
"@storybook/addons": "6.5.0-alpha.27",
|
|
26
|
+
"@storybook/angular": "6.5.0-alpha.27",
|
|
27
|
+
"@storybook/api": "6.5.0-alpha.27",
|
|
28
|
+
"@storybook/builder-webpack4": "6.5.0-alpha.27",
|
|
29
|
+
"@storybook/builder-webpack5": "6.5.0-alpha.27",
|
|
30
|
+
"@storybook/channel-postmessage": "6.5.0-alpha.27",
|
|
31
|
+
"@storybook/channel-websocket": "6.5.0-alpha.27",
|
|
32
|
+
"@storybook/channels": "6.5.0-alpha.27",
|
|
33
|
+
"@storybook/cli": "6.5.0-alpha.27",
|
|
34
|
+
"@storybook/client-api": "6.5.0-alpha.27",
|
|
35
|
+
"@storybook/client-logger": "6.5.0-alpha.27",
|
|
36
|
+
"@storybook/codemod": "6.5.0-alpha.27",
|
|
37
|
+
"@storybook/components": "6.5.0-alpha.27",
|
|
38
|
+
"@storybook/core": "6.5.0-alpha.27",
|
|
39
|
+
"@storybook/core-client": "6.5.0-alpha.27",
|
|
40
|
+
"@storybook/core-common": "6.5.0-alpha.27",
|
|
41
|
+
"@storybook/core-events": "6.5.0-alpha.27",
|
|
42
|
+
"@storybook/core-server": "6.5.0-alpha.27",
|
|
43
|
+
"@storybook/csf-tools": "6.5.0-alpha.27",
|
|
44
|
+
"@storybook/ember": "6.5.0-alpha.27",
|
|
45
|
+
"@storybook/html": "6.5.0-alpha.27",
|
|
46
|
+
"@storybook/instrumenter": "6.5.0-alpha.27",
|
|
47
|
+
"@storybook/manager-webpack4": "6.5.0-alpha.27",
|
|
48
|
+
"@storybook/manager-webpack5": "6.5.0-alpha.27",
|
|
49
|
+
"@storybook/node-logger": "6.5.0-alpha.27",
|
|
50
|
+
"@storybook/postinstall": "6.5.0-alpha.27",
|
|
51
|
+
"@storybook/preact": "6.5.0-alpha.27",
|
|
52
|
+
"@storybook/preview-web": "6.5.0-alpha.27",
|
|
53
|
+
"@storybook/react": "6.5.0-alpha.27",
|
|
54
|
+
"@storybook/router": "6.5.0-alpha.27",
|
|
55
|
+
"@storybook/server": "6.5.0-alpha.27",
|
|
56
|
+
"@storybook/source-loader": "6.5.0-alpha.27",
|
|
57
|
+
"@storybook/store": "6.5.0-alpha.27",
|
|
58
|
+
"@storybook/svelte": "6.5.0-alpha.27",
|
|
59
|
+
"@storybook/theming": "6.5.0-alpha.27",
|
|
60
|
+
"@storybook/ui": "6.5.0-alpha.27",
|
|
61
|
+
"@storybook/vue": "6.5.0-alpha.27",
|
|
62
|
+
"@storybook/vue3": "6.5.0-alpha.27",
|
|
63
|
+
"@storybook/web-components": "6.5.0-alpha.27"
|
|
64
|
+
};
|
|
65
|
+
exports.default = _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import Button from './Button.svelte';
|
|
2
|
+
|
|
3
|
+
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
4
|
+
// More on argTypes: https://storybook.js.org/docs/svelte/api/argtypes
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Example/Button',
|
|
7
|
+
component: Button,
|
|
8
|
+
argTypes: {
|
|
9
|
+
backgroundColor: { control: 'color' },
|
|
10
|
+
label: { control: 'text' },
|
|
11
|
+
onClick: { action: 'onClick' },
|
|
12
|
+
primary: { control: 'boolean' },
|
|
13
|
+
size: {
|
|
14
|
+
control: { type: 'select' },
|
|
15
|
+
options: ['small', 'medium', 'large'],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// More on component templates: https://storybook.js.org/docs/svelte/writing-stories/introduction#using-args
|
|
21
|
+
const Template = (args) => ({
|
|
22
|
+
Component: Button,
|
|
23
|
+
props: args,
|
|
24
|
+
on: {
|
|
25
|
+
click: args.onClick,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// More on args: https://storybook.js.org/docs/svelte/writing-stories/args
|
|
30
|
+
export const Primary = Template.bind({});
|
|
31
|
+
Primary.args = {
|
|
32
|
+
primary: true,
|
|
33
|
+
label: 'Button',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const Secondary = Template.bind({});
|
|
37
|
+
Secondary.args = {
|
|
38
|
+
label: 'Button',
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const Large = Template.bind({});
|
|
42
|
+
Large.args = {
|
|
43
|
+
size: 'large',
|
|
44
|
+
label: 'Button',
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const Small = Template.bind({});
|
|
48
|
+
Small.args = {
|
|
49
|
+
size: 'small',
|
|
50
|
+
label: 'Button',
|
|
51
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import Header from './Header.svelte';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Example/Header',
|
|
5
|
+
component: Header,
|
|
6
|
+
argTypes: {
|
|
7
|
+
onLogin: { action: 'onLogin' },
|
|
8
|
+
onLogout: { action: 'onLogout' },
|
|
9
|
+
onCreateAccount: { action: 'onCreateAccount' },
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const Template = (args) => ({
|
|
14
|
+
Component: Header,
|
|
15
|
+
props: args,
|
|
16
|
+
on: {
|
|
17
|
+
login: args.onLogin,
|
|
18
|
+
logout: args.onLogout,
|
|
19
|
+
createAccount: args.onCreateAccount,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const LoggedIn = Template.bind({});
|
|
24
|
+
LoggedIn.args = {
|
|
25
|
+
user: {},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const LoggedOut = Template.bind({});
|
|
29
|
+
LoggedOut.args = {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import Page from './Page.svelte';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Example/Page',
|
|
5
|
+
component: Page,
|
|
6
|
+
argTypes: {
|
|
7
|
+
onLogin: { action: 'onLogin' },
|
|
8
|
+
onLogout: { action: 'onLogout' },
|
|
9
|
+
onCreateAccount: { action: 'onCreateAccount' },
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const Template = (args) => ({
|
|
14
|
+
Component: Page,
|
|
15
|
+
props: args,
|
|
16
|
+
on: {
|
|
17
|
+
login: args.onLogin,
|
|
18
|
+
logout: args.onLogout,
|
|
19
|
+
createAccount: args.onCreateAccount,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const LoggedIn = Template.bind({});
|
|
24
|
+
LoggedIn.args = {
|
|
25
|
+
user: {},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const LoggedOut = Template.bind({});
|
|
29
|
+
LoggedOut.args = {};
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "%SET_DURING_SB_INIT%",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"types": [
|
|
4
|
+
"types": [
|
|
5
|
+
"node"
|
|
6
|
+
],
|
|
5
7
|
"allowSyntheticDefaultImports": true
|
|
6
8
|
},
|
|
7
|
-
"exclude": [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
"exclude": [
|
|
10
|
+
"../src/test.ts",
|
|
11
|
+
"../src/**/*.spec.ts",
|
|
12
|
+
"../projects/**/*.spec.ts"
|
|
13
|
+
],
|
|
14
|
+
"include": [
|
|
15
|
+
"../src/**/*",
|
|
16
|
+
"../projects/**/*"
|
|
17
|
+
],
|
|
18
|
+
"files": [
|
|
19
|
+
"./typings.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "%SET_DURING_SB_INIT%",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"types": [
|
|
4
|
+
"types": [
|
|
5
|
+
"node"
|
|
6
|
+
]
|
|
5
7
|
},
|
|
6
|
-
"exclude": [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
"exclude": [
|
|
9
|
+
"../src/test.ts",
|
|
10
|
+
"../src/**/*.spec.ts",
|
|
11
|
+
"../projects/**/*.spec.ts"
|
|
12
|
+
],
|
|
13
|
+
"include": [
|
|
14
|
+
"../src/**/*",
|
|
15
|
+
"../projects/**/*"
|
|
16
|
+
],
|
|
17
|
+
"files": [
|
|
18
|
+
"./typings.d.ts"
|
|
19
|
+
]
|
|
20
|
+
}
|