@webstudio-is/sdk-components-react 0.79.0 → 0.80.0
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/lib/blockquote.ws.js +2 -1
- package/lib/body.ws.js +2 -1
- package/lib/bold.ws.js +2 -1
- package/lib/box.ws.js +1 -1
- package/lib/button.ws.js +1 -1
- package/lib/checkbox.ws.js +2 -1
- package/lib/cjs/blockquote.ws.js +2 -1
- package/lib/cjs/body.ws.js +2 -1
- package/lib/cjs/bold.ws.js +2 -1
- package/lib/cjs/box.ws.js +1 -1
- package/lib/cjs/button.ws.js +1 -1
- package/lib/cjs/checkbox.ws.js +2 -1
- package/lib/cjs/code-text.ws.js +1 -1
- package/lib/cjs/form.ws.js +1 -1
- package/lib/cjs/heading.ws.js +1 -1
- package/lib/cjs/html-embed.js +1 -1
- package/lib/cjs/html-embed.ws.js +2 -1
- package/lib/cjs/image.ws.js +1 -1
- package/lib/cjs/input.ws.js +9 -2
- package/lib/cjs/italic.ws.js +2 -1
- package/lib/cjs/label.ws.js +2 -1
- package/lib/cjs/link.ws.js +1 -1
- package/lib/cjs/list-item.ws.js +2 -1
- package/lib/cjs/list.ws.js +1 -1
- package/lib/cjs/paragraph.ws.js +2 -1
- package/lib/cjs/radio-button.ws.js +2 -1
- package/lib/cjs/separator.ws.js +1 -1
- package/lib/cjs/span.ws.js +2 -1
- package/lib/cjs/subscript.ws.js +2 -1
- package/lib/cjs/superscript.ws.js +2 -1
- package/lib/cjs/text.ws.js +1 -1
- package/lib/cjs/textarea.ws.js +6 -2
- package/lib/cjs/vimeo-play-button.ws.js +2 -1
- package/lib/cjs/vimeo-spinner.ws.js +2 -1
- package/lib/cjs/vimeo.js +1 -1
- package/lib/cjs/vimeo.ws.js +1 -0
- package/lib/code-text.ws.js +1 -1
- package/lib/form.ws.js +1 -1
- package/lib/heading.ws.js +1 -1
- package/lib/html-embed.js +1 -1
- package/lib/html-embed.ws.js +2 -1
- package/lib/image.ws.js +1 -1
- package/lib/input.ws.js +9 -2
- package/lib/italic.ws.js +2 -1
- package/lib/label.ws.js +2 -1
- package/lib/link.ws.js +1 -1
- package/lib/list-item.ws.js +2 -1
- package/lib/list.ws.js +1 -1
- package/lib/paragraph.ws.js +2 -1
- package/lib/radio-button.ws.js +2 -1
- package/lib/separator.ws.js +1 -1
- package/lib/span.ws.js +2 -1
- package/lib/subscript.ws.js +2 -1
- package/lib/superscript.ws.js +2 -1
- package/lib/text.ws.js +1 -1
- package/lib/textarea.ws.js +6 -2
- package/lib/vimeo-play-button.ws.js +2 -1
- package/lib/vimeo-spinner.ws.js +2 -1
- package/lib/vimeo.js +1 -1
- package/lib/vimeo.ws.js +1 -0
- package/package.json +7 -7
- package/src/blockquote.stories.tsx +6 -9
- package/src/blockquote.ws.tsx +1 -0
- package/src/body.stories.tsx +7 -5
- package/src/body.ws.tsx +1 -0
- package/src/bold.stories.tsx +6 -9
- package/src/bold.ws.tsx +1 -0
- package/src/box.stories.tsx +7 -11
- package/src/box.ws.ts +1 -1
- package/src/button.stories.tsx +7 -7
- package/src/button.ws.tsx +1 -1
- package/src/checkbox.ws.tsx +2 -1
- package/src/code-text.stories.tsx +6 -9
- package/src/code-text.ws.tsx +1 -1
- package/src/form.stories.tsx +7 -8
- package/src/form.ws.tsx +1 -1
- package/src/heading.stories.tsx +6 -9
- package/src/heading.ws.tsx +1 -1
- package/src/html-embed.stories.tsx +6 -9
- package/src/html-embed.tsx +1 -1
- package/src/html-embed.ws.ts +1 -0
- package/src/image.stories.tsx +3 -9
- package/src/image.ws.tsx +1 -1
- package/src/input.stories.tsx +5 -8
- package/src/input.ws.tsx +9 -2
- package/src/italic.stories.tsx +6 -9
- package/src/italic.ws.tsx +1 -0
- package/src/label.ws.tsx +2 -1
- package/src/link.stories.tsx +6 -9
- package/src/link.ws.tsx +1 -1
- package/src/list-item.stories.tsx +6 -9
- package/src/list-item.ws.tsx +1 -0
- package/src/list.stories.tsx +6 -9
- package/src/list.ws.tsx +1 -1
- package/src/paragraph.stories.tsx +6 -9
- package/src/paragraph.ws.tsx +1 -0
- package/src/radio-button.ws.tsx +2 -1
- package/src/rich-text-link.stories.tsx +6 -9
- package/src/separator.stories.tsx +3 -8
- package/src/separator.ws.tsx +1 -1
- package/src/slot.stories.tsx +6 -9
- package/src/span.stories.tsx +6 -9
- package/src/span.ws.tsx +1 -0
- package/src/subscript.stories.tsx +6 -9
- package/src/subscript.ws.tsx +1 -0
- package/src/superscript.stories.tsx +6 -9
- package/src/superscript.ws.tsx +1 -0
- package/src/text.stories.tsx +6 -9
- package/src/text.ws.tsx +1 -1
- package/src/textarea.ws.tsx +5 -1
- package/src/vimeo-play-button.stories.tsx +8 -12
- package/src/vimeo-play-button.ws.ts +1 -0
- package/src/vimeo-preview-image.stories.tsx +7 -11
- package/src/vimeo-spinner.stories.tsx +8 -12
- package/src/vimeo-spinner.ws.ts +1 -0
- package/src/vimeo.stories.tsx +7 -11
- package/src/vimeo.tsx +3 -2
- package/src/vimeo.ws.ts +4 -2
package/lib/vimeo-spinner.ws.js
CHANGED
package/lib/vimeo.js
CHANGED
|
@@ -266,7 +266,7 @@ const EmptyState = () => {
|
|
|
266
266
|
justifyContent: "center",
|
|
267
267
|
fontSize: "1.2em"
|
|
268
268
|
},
|
|
269
|
-
children:
|
|
269
|
+
children: 'Open the "Settings" panel and paste a video URL, e.g. https://vimeo.com/831343124.'
|
|
270
270
|
}
|
|
271
271
|
);
|
|
272
272
|
};
|
package/lib/vimeo.ws.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk-components-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.0",
|
|
4
4
|
"description": "Webstudio default library for react",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@react-aria/utils": "^3.13.3",
|
|
41
41
|
"colord": "^2.9.3",
|
|
42
42
|
"shallow-equal": "^3.1.0",
|
|
43
|
-
"@webstudio-is/css-vars": "^0.
|
|
44
|
-
"@webstudio-is/generate-arg-types": "^0.
|
|
45
|
-
"@webstudio-is/icons": "^0.
|
|
46
|
-
"@webstudio-is/image": "^0.
|
|
47
|
-
"@webstudio-is/react-sdk": "^0.
|
|
43
|
+
"@webstudio-is/css-vars": "^0.80.0",
|
|
44
|
+
"@webstudio-is/generate-arg-types": "^0.80.0",
|
|
45
|
+
"@webstudio-is/icons": "^0.80.0",
|
|
46
|
+
"@webstudio-is/image": "^0.80.0",
|
|
47
|
+
"@webstudio-is/react-sdk": "^0.80.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@storybook/react": "^7.0.
|
|
50
|
+
"@storybook/react": "^7.0.26",
|
|
51
51
|
"@types/react": "^18.0.35",
|
|
52
52
|
"@types/react-dom": "^18.0.11",
|
|
53
53
|
"react": "^18.2.0",
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Blockquote as BlockquotePrimitive } from "./blockquote";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Blockquote",
|
|
6
6
|
component: BlockquotePrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof BlockquotePrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const Blockquote = Template.bind({});
|
|
14
|
-
Blockquote.args = {
|
|
15
|
-
children: "Blockquote",
|
|
9
|
+
export const Blockquote: StoryObj<typeof BlockquotePrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "Blockquote",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/blockquote.ws.tsx
CHANGED
package/src/body.stories.tsx
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Body as BodyPrimitive } from "./body";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Body",
|
|
6
6
|
component: BodyPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof BodyPrimitive>;
|
|
8
8
|
|
|
9
|
-
export const Body:
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
export const Body: StoryObj<typeof BodyPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "Body",
|
|
12
|
+
},
|
|
13
|
+
};
|
package/src/body.ws.tsx
CHANGED
package/src/bold.stories.tsx
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Bold as BoldPrimitive } from "./bold";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Bold",
|
|
6
6
|
component: BoldPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof BoldPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const Bold = Template.bind({});
|
|
14
|
-
Bold.args = {
|
|
15
|
-
children: "some bold text",
|
|
9
|
+
export const Bold: StoryObj<typeof BoldPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "some bold text",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/bold.ws.tsx
CHANGED
package/src/box.stories.tsx
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Box as BoxPrimitive } from "./box";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Box",
|
|
6
6
|
component: BoxPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof BoxPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export const Box = Template.bind({});
|
|
17
|
-
Box.args = {};
|
|
9
|
+
export const Box: StoryObj<typeof BoxPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "Box",
|
|
12
|
+
},
|
|
13
|
+
};
|
package/src/box.ws.ts
CHANGED
package/src/button.stories.tsx
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Button as ButtonPrimitive } from "./button";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Button",
|
|
6
6
|
component: ButtonPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof ButtonPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
export const Button: StoryObj<typeof ButtonPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "Click me",
|
|
12
|
+
},
|
|
13
|
+
};
|
package/src/button.ws.tsx
CHANGED
package/src/checkbox.ws.tsx
CHANGED
|
@@ -21,6 +21,7 @@ const presetStyle = {
|
|
|
21
21
|
|
|
22
22
|
export const meta: WsComponentMeta = {
|
|
23
23
|
category: "forms",
|
|
24
|
+
invalidAncestors: ["Button"],
|
|
24
25
|
type: "control",
|
|
25
26
|
label: "Checkbox",
|
|
26
27
|
icon: CheckboxCheckedIcon,
|
|
@@ -57,5 +58,5 @@ export const meta: WsComponentMeta = {
|
|
|
57
58
|
|
|
58
59
|
export const propsMeta: WsComponentPropsMeta = {
|
|
59
60
|
props,
|
|
60
|
-
initialProps: ["name"],
|
|
61
|
+
initialProps: ["id", "name"],
|
|
61
62
|
};
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { CodeText as CodeTextPrimitive } from "./code-text";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/CodeText",
|
|
6
6
|
component: CodeTextPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof CodeTextPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
export const CodeText = Template.bind({});
|
|
14
|
-
CodeText.args = {
|
|
15
|
-
children: "alert('Hello World!')",
|
|
9
|
+
export const CodeText: StoryObj<typeof CodeTextPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "alert('Hello World!')",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/code-text.ws.tsx
CHANGED
package/src/form.stories.tsx
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Form as FormPrimitive } from "./form";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Form",
|
|
6
6
|
component: FormPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof FormPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Form.args = {};
|
|
9
|
+
export const Form: StoryObj<typeof FormPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "Form",
|
|
12
|
+
},
|
|
13
|
+
};
|
package/src/form.ws.tsx
CHANGED
package/src/heading.stories.tsx
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Heading as HeadingPrimitive } from "./heading";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Heading",
|
|
6
6
|
component: HeadingPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof HeadingPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const Heading = Template.bind({});
|
|
14
|
-
Heading.args = {
|
|
15
|
-
children: "Heading",
|
|
9
|
+
export const Heading: StoryObj<typeof HeadingPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "Heading",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/heading.ws.tsx
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { HtmlEmbed as HtmlEmbedPrimitive } from "./html-embed";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/HtmlEmbed",
|
|
6
6
|
component: HtmlEmbedPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof HtmlEmbedPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const HtmlEmbed = Template.bind({});
|
|
14
|
-
HtmlEmbed.args = {
|
|
15
|
-
code: "<strong>custom code</strong>",
|
|
9
|
+
export const HtmlEmbed: StoryObj<typeof HtmlEmbedPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
code: "<strong>custom code</strong>",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/html-embed.tsx
CHANGED
|
@@ -72,7 +72,7 @@ const Placeholder = (props: ChildProps) => {
|
|
|
72
72
|
const { code, innerRef, ...rest } = props;
|
|
73
73
|
return (
|
|
74
74
|
<div ref={innerRef} {...rest} style={{ padding: "20px" }}>
|
|
75
|
-
{'Open "
|
|
75
|
+
{'Open the "Settings" panel to insert HTML code'}
|
|
76
76
|
</div>
|
|
77
77
|
);
|
|
78
78
|
};
|
package/src/html-embed.ws.ts
CHANGED
package/src/image.stories.tsx
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Image as ImagePrimitive } from "./image";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Image",
|
|
6
6
|
component: ImagePrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof ImagePrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
<ImagePrimitive {...args} />
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
export const Image = Template.bind({});
|
|
14
|
-
|
|
15
|
-
Image.args = {};
|
|
9
|
+
export const Image: StoryObj<typeof ImagePrimitive> = {};
|
package/src/image.ws.tsx
CHANGED
package/src/input.stories.tsx
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Input as InputPrimitive } from "./input";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Input",
|
|
6
6
|
component: InputPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof InputPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const Input = Template.bind({});
|
|
14
|
-
Input.args = {};
|
|
9
|
+
export const Input: StoryObj<typeof InputPrimitive> = {
|
|
10
|
+
args: {},
|
|
11
|
+
};
|
package/src/input.ws.tsx
CHANGED
|
@@ -10,11 +10,18 @@ import type { defaultTag } from "./input";
|
|
|
10
10
|
import { props } from "./__generated__/input.props";
|
|
11
11
|
|
|
12
12
|
const presetStyle = {
|
|
13
|
-
input
|
|
13
|
+
input: [
|
|
14
|
+
...input,
|
|
15
|
+
{
|
|
16
|
+
property: "display",
|
|
17
|
+
value: { type: "keyword", value: "block" },
|
|
18
|
+
},
|
|
19
|
+
],
|
|
14
20
|
} satisfies PresetStyle<typeof defaultTag>;
|
|
15
21
|
|
|
16
22
|
export const meta: WsComponentMeta = {
|
|
17
23
|
category: "forms",
|
|
24
|
+
invalidAncestors: ["Button"],
|
|
18
25
|
type: "control",
|
|
19
26
|
label: "Text Input",
|
|
20
27
|
icon: FormTextFieldIcon,
|
|
@@ -36,5 +43,5 @@ export const meta: WsComponentMeta = {
|
|
|
36
43
|
|
|
37
44
|
export const propsMeta: WsComponentPropsMeta = {
|
|
38
45
|
props,
|
|
39
|
-
initialProps: ["name", "type", "placeholder", "required", "autoFocus"],
|
|
46
|
+
initialProps: ["id", "name", "type", "placeholder", "required", "autoFocus"],
|
|
40
47
|
};
|
package/src/italic.stories.tsx
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Italic as ItalicPrimitive } from "./italic";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Italic",
|
|
6
6
|
component: ItalicPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof ItalicPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const Italic = Template.bind({});
|
|
14
|
-
Italic.args = {
|
|
15
|
-
children: "some italic text",
|
|
9
|
+
export const Italic: StoryObj<typeof ItalicPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "some italic text",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/italic.ws.tsx
CHANGED
package/src/label.ws.tsx
CHANGED
|
@@ -18,6 +18,7 @@ const presetStyle = {
|
|
|
18
18
|
|
|
19
19
|
export const meta: WsComponentMeta = {
|
|
20
20
|
category: "forms",
|
|
21
|
+
invalidAncestors: ["Button"],
|
|
21
22
|
type: "container",
|
|
22
23
|
label: "Input Label",
|
|
23
24
|
icon: TextIcon,
|
|
@@ -41,5 +42,5 @@ export const propsMeta: WsComponentPropsMeta = {
|
|
|
41
42
|
label: "For",
|
|
42
43
|
},
|
|
43
44
|
},
|
|
44
|
-
initialProps: ["htmlFor"],
|
|
45
|
+
initialProps: ["id", "htmlFor"],
|
|
45
46
|
};
|
package/src/link.stories.tsx
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Link as LinkPrimitive } from "./link";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Link",
|
|
6
6
|
component: LinkPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof LinkPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const Link = Template.bind({});
|
|
14
|
-
Link.args = {
|
|
15
|
-
children: "Link",
|
|
9
|
+
export const Link: StoryObj<typeof LinkPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "Link",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/link.ws.tsx
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { ListItem as ListItemPrimitive } from "./list-item";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/List Item",
|
|
6
6
|
component: ListItemPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof ListItemPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const ListItem = Template.bind({});
|
|
14
|
-
ListItem.args = {
|
|
15
|
-
children: "ListItem",
|
|
9
|
+
export const ListItem: StoryObj<typeof ListItemPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "ListItem",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/list-item.ws.tsx
CHANGED
package/src/list.stories.tsx
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { List as ListPrimitive } from "./list";
|
|
3
3
|
import { ListItem } from "./list-item";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
title: "Components/List",
|
|
7
7
|
component: ListPrimitive,
|
|
8
|
-
}
|
|
8
|
+
} satisfies Meta<typeof ListPrimitive>;
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export const List = Template.bind({});
|
|
15
|
-
List.args = {
|
|
16
|
-
children: <ListItem />,
|
|
10
|
+
export const List: StoryObj<typeof ListPrimitive> = {
|
|
11
|
+
args: {
|
|
12
|
+
children: <ListItem>List</ListItem>,
|
|
13
|
+
},
|
|
17
14
|
};
|
package/src/list.ws.tsx
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Paragraph as ParagraphPrimitive } from "./paragraph";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Paragraph",
|
|
6
6
|
component: ParagraphPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof ParagraphPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const Paragraph = Template.bind({});
|
|
14
|
-
Paragraph.args = {
|
|
15
|
-
children: "paragraph",
|
|
9
|
+
export const Paragraph: StoryObj<typeof ParagraphPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "paragraph",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/paragraph.ws.tsx
CHANGED
package/src/radio-button.ws.tsx
CHANGED
|
@@ -21,6 +21,7 @@ const presetStyle = {
|
|
|
21
21
|
|
|
22
22
|
export const meta: WsComponentMeta = {
|
|
23
23
|
category: "forms",
|
|
24
|
+
invalidAncestors: ["Button"],
|
|
24
25
|
type: "control",
|
|
25
26
|
label: "Radio",
|
|
26
27
|
icon: RadioCheckedIcon,
|
|
@@ -57,5 +58,5 @@ export const meta: WsComponentMeta = {
|
|
|
57
58
|
|
|
58
59
|
export const propsMeta: WsComponentPropsMeta = {
|
|
59
60
|
props,
|
|
60
|
-
initialProps: ["name"],
|
|
61
|
+
initialProps: ["id", "name"],
|
|
61
62
|
};
|