@storybook/web-components 10.4.0-alpha.2 → 10.4.0-alpha.3
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/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { WebRenderer,
|
|
1
|
+
import { WebRenderer, Args, ComponentAnnotations, AnnotatedStoryFn, StoryAnnotations, StrictArgs, DecoratorFunction, LoaderFunction, StoryContext as StoryContext$1, ProjectAnnotations, NamedOrDefaultProjectAnnotations, NormalizedProjectAnnotations, Renderer, ArgsStoryFn } from 'storybook/internal/types';
|
|
2
2
|
export { ArgTypes, Args, Parameters, StrictArgs } from 'storybook/internal/types';
|
|
3
3
|
import { TemplateResult, SVGTemplateResult } from 'lit';
|
|
4
|
-
import {
|
|
4
|
+
import { PreviewAddon, InferTypes, AddonTypes, Preview as Preview$1, Meta as Meta$1, Story } from 'storybook/internal/csf';
|
|
5
5
|
|
|
6
6
|
type StoryFnHtmlReturnType = string | Node | DocumentFragment | TemplateResult | SVGTemplateResult;
|
|
7
7
|
interface WebComponentsRenderer extends WebRenderer {
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_aqqd23izjv6 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_aqqd23izjv6 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_aqqd23izjv6 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_aqqd23izjv6.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_aqqd23izjv6.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_aqqd23izjv6.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/web-components",
|
|
3
|
-
"version": "10.4.0-alpha.
|
|
3
|
+
"version": "10.4.0-alpha.3",
|
|
4
4
|
"description": "Storybook Web Components renderer: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"lit": "^2.0.0 || ^3.0.0",
|
|
66
|
-
"storybook": "^10.4.0-alpha.
|
|
66
|
+
"storybook": "^10.4.0-alpha.3"
|
|
67
67
|
},
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
@@ -26,19 +26,21 @@ export const Header = ({ user, onLogin, onLogout, onCreateAccount }) => html`
|
|
|
26
26
|
<h1>Acme</h1>
|
|
27
27
|
</div>
|
|
28
28
|
<div>
|
|
29
|
-
${
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
${
|
|
30
|
+
user
|
|
31
|
+
? Button({ size: 'small', onClick: onLogout, label: 'Log out' })
|
|
32
|
+
: html`${Button({
|
|
33
|
+
size: 'small',
|
|
34
|
+
onClick: onLogin,
|
|
35
|
+
label: 'Log in',
|
|
36
|
+
})}
|
|
36
37
|
${Button({
|
|
37
38
|
primary: true,
|
|
38
39
|
size: 'small',
|
|
39
40
|
onClick: onCreateAccount,
|
|
40
41
|
label: 'Sign up',
|
|
41
|
-
})}`
|
|
42
|
+
})}`
|
|
43
|
+
}
|
|
42
44
|
</div>
|
|
43
45
|
</div>
|
|
44
46
|
</header>
|
|
@@ -37,19 +37,21 @@ export const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps
|
|
|
37
37
|
<h1>Acme</h1>
|
|
38
38
|
</div>
|
|
39
39
|
<div>
|
|
40
|
-
${
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
${
|
|
41
|
+
user
|
|
42
|
+
? Button({ size: 'small', onClick: onLogout, label: 'Log out' })
|
|
43
|
+
: html`${Button({
|
|
44
|
+
size: 'small',
|
|
45
|
+
onClick: onLogin,
|
|
46
|
+
label: 'Log in',
|
|
47
|
+
})}
|
|
47
48
|
${Button({
|
|
48
49
|
primary: true,
|
|
49
50
|
size: 'small',
|
|
50
51
|
onClick: onCreateAccount,
|
|
51
52
|
label: 'Sign up',
|
|
52
|
-
})}`
|
|
53
|
+
})}`
|
|
54
|
+
}
|
|
53
55
|
</div>
|
|
54
56
|
</div>
|
|
55
57
|
</header>
|
|
@@ -67,9 +67,10 @@ export class DemoWcCard extends LitElement {
|
|
|
67
67
|
<div class="header"><slot name="prefix"></slot> ${this.header}</div>
|
|
68
68
|
|
|
69
69
|
<div class="content">
|
|
70
|
-
${
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
${
|
|
71
|
+
this.rows.length === 0
|
|
72
|
+
? html``
|
|
73
|
+
: html`
|
|
73
74
|
<dl>
|
|
74
75
|
${this.rows.map(
|
|
75
76
|
(row) => html`
|
|
@@ -78,7 +79,8 @@ export class DemoWcCard extends LitElement {
|
|
|
78
79
|
`
|
|
79
80
|
)}
|
|
80
81
|
</dl>
|
|
81
|
-
`
|
|
82
|
+
`
|
|
83
|
+
}
|
|
82
84
|
</div>
|
|
83
85
|
<div class="footer">
|
|
84
86
|
<div class="note">B</div>
|