@storybook/web-components 11.0.0-beta.0 → 11.0.0-beta.1

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.
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_arf7i8q8vb from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_arf7i8q8vb from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_arf7i8q8vb from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2mh2kj69z4k from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2mh2kj69z4k from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2mh2kj69z4k from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_arf7i8q8vb.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_arf7i8q8vb.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_arf7i8q8vb.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2mh2kj69z4k.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2mh2kj69z4k.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2mh2kj69z4k.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_arf7i8q8vb from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_arf7i8q8vb from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_arf7i8q8vb from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2mh2kj69z4k from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2mh2kj69z4k from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2mh2kj69z4k from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_arf7i8q8vb.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_arf7i8q8vb.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_arf7i8q8vb.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2mh2kj69z4k.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2mh2kj69z4k.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2mh2kj69z4k.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_arf7i8q8vb.createRequire(import.meta.url);
12
12
  import {
13
13
  parseStoryFile,
14
14
  resolveStoryComponent
15
- } from "./chunk-Z6DDEEJW.js";
15
+ } from "./chunk-KEYAB73A.js";
16
16
 
17
17
  // src/docgen/docgen-worker.ts
18
18
  import { createLazyDocgenMiddleware, loadTypeScriptCompilerApi } from "storybook/internal/common";
@@ -1,18 +1,18 @@
1
- import CJS_COMPAT_NODE_URL_arf7i8q8vb from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_arf7i8q8vb from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_arf7i8q8vb from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2mh2kj69z4k from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2mh2kj69z4k from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2mh2kj69z4k from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_arf7i8q8vb.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_arf7i8q8vb.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_arf7i8q8vb.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2mh2kj69z4k.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2mh2kj69z4k.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2mh2kj69z4k.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  createDocgenProvider
14
- } from "../_node-chunks/chunk-5M5RLD63.js";
15
- import "../_node-chunks/chunk-Z6DDEEJW.js";
14
+ } from "../_node-chunks/chunk-RWJBQ2TK.js";
15
+ import "../_node-chunks/chunk-KEYAB73A.js";
16
16
  export {
17
17
  createDocgenProvider
18
18
  };
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_arf7i8q8vb from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_arf7i8q8vb from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_arf7i8q8vb from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2mh2kj69z4k from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2mh2kj69z4k from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2mh2kj69z4k from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_arf7i8q8vb.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_arf7i8q8vb.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_arf7i8q8vb.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2mh2kj69z4k.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2mh2kj69z4k.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2mh2kj69z4k.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,8 +12,8 @@ var require = CJS_COMPAT_NODE_MODULE_arf7i8q8vb.createRequire(import.meta.url);
12
12
  import {
13
13
  buildDocgenPayload,
14
14
  createDocgenProvider
15
- } from "../_node-chunks/chunk-5M5RLD63.js";
16
- import "../_node-chunks/chunk-Z6DDEEJW.js";
15
+ } from "../_node-chunks/chunk-RWJBQ2TK.js";
16
+ import "../_node-chunks/chunk-KEYAB73A.js";
17
17
  export {
18
18
  buildDocgenPayload,
19
19
  createDocgenProvider
package/dist/preset.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_arf7i8q8vb from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_arf7i8q8vb from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_arf7i8q8vb from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2mh2kj69z4k from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2mh2kj69z4k from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2mh2kj69z4k from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_arf7i8q8vb.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_arf7i8q8vb.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_arf7i8q8vb.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2mh2kj69z4k.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2mh2kj69z4k.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2mh2kj69z4k.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_arf7i8q8vb.createRequire(import.meta.url);
12
12
  import {
13
13
  parseStoryFile,
14
14
  resolveStoryComponent
15
- } from "./_node-chunks/chunk-Z6DDEEJW.js";
15
+ } from "./_node-chunks/chunk-KEYAB73A.js";
16
16
 
17
17
  // src/preset.ts
18
18
  import { fileURLToPath as fileURLToPath3 } from "node:url";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/web-components",
3
- "version": "11.0.0-beta.0",
3
+ "version": "11.0.0-beta.1",
4
4
  "description": "Storybook Web Components renderer: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -74,7 +74,7 @@
74
74
  },
75
75
  "peerDependencies": {
76
76
  "lit": "^2.0.0 || ^3.0.0",
77
- "storybook": "^11.0.0-beta.0",
77
+ "storybook": "^11.0.0-beta.1",
78
78
  "typescript": "^5.9.0 || ^6.0.0 || ^7.0.0"
79
79
  },
80
80
  "publishConfig": {
@@ -1,9 +1,10 @@
1
+ import preview from '../../.storybook/preview';
1
2
  import { fn } from 'storybook/test';
2
3
 
3
4
  import { Button } from './Button';
4
5
 
5
6
  // More on how to set up stories at: https://storybook.js.org/docs/writing-stories
6
- export default {
7
+ const meta = preview.meta({
7
8
  title: 'Example/Button',
8
9
  tags: ['autodocs'],
9
10
  render: (args) => Button(args),
@@ -15,32 +16,32 @@ export default {
15
16
  },
16
17
  },
17
18
  args: { onClick: fn() },
18
- };
19
+ });
19
20
 
20
21
  // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
21
- export const Primary = {
22
+ export const Primary = meta.story({
22
23
  args: {
23
24
  primary: true,
24
25
  label: 'Button',
25
26
  },
26
- };
27
+ });
27
28
 
28
- export const Secondary = {
29
+ export const Secondary = meta.story({
29
30
  args: {
30
31
  label: 'Button',
31
32
  },
32
- };
33
+ });
33
34
 
34
- export const Large = {
35
+ export const Large = meta.story({
35
36
  args: {
36
37
  size: 'large',
37
38
  label: 'Button',
38
39
  },
39
- };
40
+ });
40
41
 
41
- export const Small = {
42
+ export const Small = meta.story({
42
43
  args: {
43
44
  size: 'small',
44
45
  label: 'Button',
45
46
  },
46
- };
47
+ });
@@ -1,8 +1,9 @@
1
+ import preview from '../../.storybook/preview';
1
2
  import { fn } from 'storybook/test';
2
3
 
3
4
  import { Header } from './Header';
4
5
 
5
- export default {
6
+ const meta = preview.meta({
6
7
  title: 'Example/Header',
7
8
  // This component will have an automatically generated Autodocs entry: https://storybook.js.org/web-components/vue/writing-docs/autodocs
8
9
  tags: ['autodocs'],
@@ -12,13 +13,15 @@ export default {
12
13
  onLogout: fn(),
13
14
  onCreateAccount: fn(),
14
15
  },
15
- };
16
- export const LoggedIn = {
16
+ });
17
+ export const LoggedIn = meta.story({
17
18
  args: {
18
19
  user: {
19
20
  name: 'Jane Doe',
20
21
  },
21
22
  },
22
- };
23
+ });
23
24
 
24
- export const LoggedOut = {};
25
+ export const LoggedOut = meta.story({
26
+ args: {},
27
+ });
@@ -1,20 +1,21 @@
1
+ import preview from '../../.storybook/preview';
1
2
  import * as HeaderStories from './Header.stories';
2
3
  import { Page } from './Page';
3
4
 
4
- export default {
5
+ const meta = preview.meta({
5
6
  title: 'Example/Page',
6
7
  render: (args) => Page(args),
7
- };
8
+ });
8
9
 
9
- export const LoggedIn = {
10
+ export const LoggedIn = meta.story({
10
11
  args: {
11
12
  // More on composing args: https://storybook.js.org/docs/writing-stories/args#args-composition
12
- ...HeaderStories.LoggedIn.args,
13
+ ...HeaderStories.LoggedIn.input.args,
13
14
  },
14
- };
15
+ });
15
16
 
16
- export const LoggedOut = {
17
+ export const LoggedOut = meta.story({
17
18
  args: {
18
- ...HeaderStories.LoggedOut.args,
19
+ ...HeaderStories.LoggedOut.input.args,
19
20
  },
20
- };
21
+ });
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/web-components';
1
+ import preview from '../../.storybook/preview';
2
2
 
3
3
  import { fn } from 'storybook/test';
4
4
 
@@ -6,7 +6,7 @@ import type { ButtonProps } from './Button';
6
6
  import { Button } from './Button';
7
7
 
8
8
  // More on how to set up stories at: https://storybook.js.org/docs/writing-stories
9
- const meta = {
9
+ const meta = preview.type<{ args: ButtonProps }>().meta({
10
10
  title: 'Example/Button',
11
11
  tags: ['autodocs'],
12
12
  render: (args) => Button(args),
@@ -18,35 +18,32 @@ const meta = {
18
18
  },
19
19
  },
20
20
  args: { onClick: fn() },
21
- } satisfies Meta<ButtonProps>;
22
-
23
- export default meta;
24
- type Story = StoryObj<ButtonProps>;
21
+ });
25
22
 
26
23
  // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
27
- export const Primary: Story = {
24
+ export const Primary = meta.story({
28
25
  args: {
29
26
  primary: true,
30
27
  label: 'Button',
31
28
  },
32
- };
29
+ });
33
30
 
34
- export const Secondary: Story = {
31
+ export const Secondary = meta.story({
35
32
  args: {
36
33
  label: 'Button',
37
34
  },
38
- };
35
+ });
39
36
 
40
- export const Large: Story = {
37
+ export const Large = meta.story({
41
38
  args: {
42
39
  size: 'large',
43
40
  label: 'Button',
44
41
  },
45
- };
42
+ });
46
43
 
47
- export const Small: Story = {
44
+ export const Small = meta.story({
48
45
  args: {
49
46
  size: 'small',
50
47
  label: 'Button',
51
48
  },
52
- };
49
+ });
@@ -1,11 +1,11 @@
1
- import type { Meta, StoryObj } from '@storybook/web-components';
1
+ import preview from '../../.storybook/preview';
2
2
 
3
3
  import { fn } from 'storybook/test';
4
4
 
5
5
  import type { HeaderProps } from './Header';
6
6
  import { Header } from './Header';
7
7
 
8
- const meta = {
8
+ const meta = preview.type<{ args: HeaderProps }>().meta({
9
9
  title: 'Example/Header',
10
10
  // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
11
11
  tags: ['autodocs'],
@@ -15,17 +15,16 @@ const meta = {
15
15
  onLogout: fn(),
16
16
  onCreateAccount: fn(),
17
17
  },
18
- } satisfies Meta<HeaderProps>;
18
+ });
19
19
 
20
- export default meta;
21
- type Story = StoryObj<HeaderProps>;
22
-
23
- export const LoggedIn: Story = {
20
+ export const LoggedIn = meta.story({
24
21
  args: {
25
22
  user: {
26
23
  name: 'Jane Doe',
27
24
  },
28
25
  },
29
- };
26
+ });
30
27
 
31
- export const LoggedOut: Story = {};
28
+ export const LoggedOut = meta.story({
29
+ args: {},
30
+ });
@@ -1,26 +1,23 @@
1
- import type { Meta, StoryObj } from '@storybook/web-components';
1
+ import preview from '../../.storybook/preview';
2
2
 
3
3
  import * as HeaderStories from './Header.stories';
4
4
  import type { PageProps } from './Page';
5
5
  import { Page } from './Page';
6
6
 
7
- const meta = {
7
+ const meta = preview.type<{ args: PageProps }>().meta({
8
8
  title: 'Example/Page',
9
9
  render: (args: PageProps) => Page(args),
10
- } satisfies Meta<PageProps>;
10
+ });
11
11
 
12
- export default meta;
13
- type Story = StoryObj<PageProps>;
14
-
15
- export const LoggedIn: Story = {
12
+ export const LoggedIn = meta.story({
16
13
  args: {
17
14
  // More on composing args: https://storybook.js.org/docs/writing-stories/args#args-composition
18
- ...HeaderStories.LoggedIn.args,
15
+ ...HeaderStories.LoggedIn.input.args,
19
16
  },
20
- };
17
+ });
21
18
 
22
- export const LoggedOut: Story = {
19
+ export const LoggedOut = meta.story({
23
20
  args: {
24
- ...HeaderStories.LoggedOut.args,
21
+ ...HeaderStories.LoggedOut.input.args,
25
22
  },
26
- };
23
+ });