@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.
Files changed (118) hide show
  1. package/lib/blockquote.ws.js +2 -1
  2. package/lib/body.ws.js +2 -1
  3. package/lib/bold.ws.js +2 -1
  4. package/lib/box.ws.js +1 -1
  5. package/lib/button.ws.js +1 -1
  6. package/lib/checkbox.ws.js +2 -1
  7. package/lib/cjs/blockquote.ws.js +2 -1
  8. package/lib/cjs/body.ws.js +2 -1
  9. package/lib/cjs/bold.ws.js +2 -1
  10. package/lib/cjs/box.ws.js +1 -1
  11. package/lib/cjs/button.ws.js +1 -1
  12. package/lib/cjs/checkbox.ws.js +2 -1
  13. package/lib/cjs/code-text.ws.js +1 -1
  14. package/lib/cjs/form.ws.js +1 -1
  15. package/lib/cjs/heading.ws.js +1 -1
  16. package/lib/cjs/html-embed.js +1 -1
  17. package/lib/cjs/html-embed.ws.js +2 -1
  18. package/lib/cjs/image.ws.js +1 -1
  19. package/lib/cjs/input.ws.js +9 -2
  20. package/lib/cjs/italic.ws.js +2 -1
  21. package/lib/cjs/label.ws.js +2 -1
  22. package/lib/cjs/link.ws.js +1 -1
  23. package/lib/cjs/list-item.ws.js +2 -1
  24. package/lib/cjs/list.ws.js +1 -1
  25. package/lib/cjs/paragraph.ws.js +2 -1
  26. package/lib/cjs/radio-button.ws.js +2 -1
  27. package/lib/cjs/separator.ws.js +1 -1
  28. package/lib/cjs/span.ws.js +2 -1
  29. package/lib/cjs/subscript.ws.js +2 -1
  30. package/lib/cjs/superscript.ws.js +2 -1
  31. package/lib/cjs/text.ws.js +1 -1
  32. package/lib/cjs/textarea.ws.js +6 -2
  33. package/lib/cjs/vimeo-play-button.ws.js +2 -1
  34. package/lib/cjs/vimeo-spinner.ws.js +2 -1
  35. package/lib/cjs/vimeo.js +1 -1
  36. package/lib/cjs/vimeo.ws.js +1 -0
  37. package/lib/code-text.ws.js +1 -1
  38. package/lib/form.ws.js +1 -1
  39. package/lib/heading.ws.js +1 -1
  40. package/lib/html-embed.js +1 -1
  41. package/lib/html-embed.ws.js +2 -1
  42. package/lib/image.ws.js +1 -1
  43. package/lib/input.ws.js +9 -2
  44. package/lib/italic.ws.js +2 -1
  45. package/lib/label.ws.js +2 -1
  46. package/lib/link.ws.js +1 -1
  47. package/lib/list-item.ws.js +2 -1
  48. package/lib/list.ws.js +1 -1
  49. package/lib/paragraph.ws.js +2 -1
  50. package/lib/radio-button.ws.js +2 -1
  51. package/lib/separator.ws.js +1 -1
  52. package/lib/span.ws.js +2 -1
  53. package/lib/subscript.ws.js +2 -1
  54. package/lib/superscript.ws.js +2 -1
  55. package/lib/text.ws.js +1 -1
  56. package/lib/textarea.ws.js +6 -2
  57. package/lib/vimeo-play-button.ws.js +2 -1
  58. package/lib/vimeo-spinner.ws.js +2 -1
  59. package/lib/vimeo.js +1 -1
  60. package/lib/vimeo.ws.js +1 -0
  61. package/package.json +7 -7
  62. package/src/blockquote.stories.tsx +6 -9
  63. package/src/blockquote.ws.tsx +1 -0
  64. package/src/body.stories.tsx +7 -5
  65. package/src/body.ws.tsx +1 -0
  66. package/src/bold.stories.tsx +6 -9
  67. package/src/bold.ws.tsx +1 -0
  68. package/src/box.stories.tsx +7 -11
  69. package/src/box.ws.ts +1 -1
  70. package/src/button.stories.tsx +7 -7
  71. package/src/button.ws.tsx +1 -1
  72. package/src/checkbox.ws.tsx +2 -1
  73. package/src/code-text.stories.tsx +6 -9
  74. package/src/code-text.ws.tsx +1 -1
  75. package/src/form.stories.tsx +7 -8
  76. package/src/form.ws.tsx +1 -1
  77. package/src/heading.stories.tsx +6 -9
  78. package/src/heading.ws.tsx +1 -1
  79. package/src/html-embed.stories.tsx +6 -9
  80. package/src/html-embed.tsx +1 -1
  81. package/src/html-embed.ws.ts +1 -0
  82. package/src/image.stories.tsx +3 -9
  83. package/src/image.ws.tsx +1 -1
  84. package/src/input.stories.tsx +5 -8
  85. package/src/input.ws.tsx +9 -2
  86. package/src/italic.stories.tsx +6 -9
  87. package/src/italic.ws.tsx +1 -0
  88. package/src/label.ws.tsx +2 -1
  89. package/src/link.stories.tsx +6 -9
  90. package/src/link.ws.tsx +1 -1
  91. package/src/list-item.stories.tsx +6 -9
  92. package/src/list-item.ws.tsx +1 -0
  93. package/src/list.stories.tsx +6 -9
  94. package/src/list.ws.tsx +1 -1
  95. package/src/paragraph.stories.tsx +6 -9
  96. package/src/paragraph.ws.tsx +1 -0
  97. package/src/radio-button.ws.tsx +2 -1
  98. package/src/rich-text-link.stories.tsx +6 -9
  99. package/src/separator.stories.tsx +3 -8
  100. package/src/separator.ws.tsx +1 -1
  101. package/src/slot.stories.tsx +6 -9
  102. package/src/span.stories.tsx +6 -9
  103. package/src/span.ws.tsx +1 -0
  104. package/src/subscript.stories.tsx +6 -9
  105. package/src/subscript.ws.tsx +1 -0
  106. package/src/superscript.stories.tsx +6 -9
  107. package/src/superscript.ws.tsx +1 -0
  108. package/src/text.stories.tsx +6 -9
  109. package/src/text.ws.tsx +1 -1
  110. package/src/textarea.ws.tsx +5 -1
  111. package/src/vimeo-play-button.stories.tsx +8 -12
  112. package/src/vimeo-play-button.ws.ts +1 -0
  113. package/src/vimeo-preview-image.stories.tsx +7 -11
  114. package/src/vimeo-spinner.stories.tsx +8 -12
  115. package/src/vimeo-spinner.ws.ts +1 -0
  116. package/src/vimeo.stories.tsx +7 -11
  117. package/src/vimeo.tsx +3 -2
  118. package/src/vimeo.ws.ts +4 -2
@@ -17,7 +17,8 @@ const meta = {
17
17
  requiredAncestors: ["Vimeo"]
18
18
  };
19
19
  const propsMeta = {
20
- props
20
+ props,
21
+ initialProps: ["id"]
21
22
  };
22
23
  export {
23
24
  meta,
package/lib/vimeo.js CHANGED
@@ -266,7 +266,7 @@ const EmptyState = () => {
266
266
  justifyContent: "center",
267
267
  fontSize: "1.2em"
268
268
  },
269
- children: "Open the Properties panel and paste a video URL, e.g. https://vimeo.com/831343124."
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
@@ -303,6 +303,7 @@ const meta = {
303
303
  ]
304
304
  };
305
305
  const initialProps = [
306
+ "id",
306
307
  "url",
307
308
  "quality",
308
309
  "showPreview",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk-components-react",
3
- "version": "0.79.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.79.0",
44
- "@webstudio-is/generate-arg-types": "^0.79.0",
45
- "@webstudio-is/icons": "^0.79.0",
46
- "@webstudio-is/image": "^0.79.0",
47
- "@webstudio-is/react-sdk": "^0.79.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.23",
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 { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof BlockquotePrimitive>;
7
+ } satisfies Meta<typeof BlockquotePrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof BlockquotePrimitive> = (args) => (
10
- <BlockquotePrimitive {...args} />
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
  };
@@ -78,4 +78,5 @@ export const meta: WsComponentMeta = {
78
78
 
79
79
  export const propsMeta: WsComponentPropsMeta = {
80
80
  props,
81
+ initialProps: ["id"],
81
82
  };
@@ -1,11 +1,13 @@
1
- import type { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof BodyPrimitive>;
7
+ } satisfies Meta<typeof BodyPrimitive>;
8
8
 
9
- export const Body: ComponentStory<typeof BodyPrimitive> = (args) => (
10
- <BodyPrimitive {...args} />
11
- );
9
+ export const Body: StoryObj<typeof BodyPrimitive> = {
10
+ args: {
11
+ children: "Body",
12
+ },
13
+ };
package/src/body.ws.tsx CHANGED
@@ -23,4 +23,5 @@ export const meta: WsComponentMeta = {
23
23
 
24
24
  export const propsMeta: WsComponentPropsMeta = {
25
25
  props,
26
+ initialProps: ["id"],
26
27
  };
@@ -1,16 +1,13 @@
1
- import type { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof BoldPrimitive>;
7
+ } satisfies Meta<typeof BoldPrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof BoldPrimitive> = (args) => (
10
- <BoldPrimitive {...args} />
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
@@ -23,4 +23,5 @@ export const meta: WsComponentMeta = {
23
23
 
24
24
  export const propsMeta: WsComponentPropsMeta = {
25
25
  props,
26
+ initialProps: ["id"],
26
27
  };
@@ -1,17 +1,13 @@
1
- import type { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof BoxPrimitive>;
7
+ } satisfies Meta<typeof BoxPrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof BoxPrimitive> = (args) => (
10
- <BoxPrimitive
11
- {...args}
12
- style={{ minHeight: 20, outline: "1px solid black" }}
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
@@ -48,5 +48,5 @@ export const meta: WsComponentMeta = {
48
48
 
49
49
  export const propsMeta: WsComponentPropsMeta = {
50
50
  props,
51
- initialProps: ["tag"],
51
+ initialProps: ["id", "tag"],
52
52
  };
@@ -1,13 +1,13 @@
1
- import type { ComponentMeta, ComponentStory } from "@storybook/react";
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
- } as ComponentMeta<typeof ButtonPrimitive>;
7
+ } satisfies Meta<typeof ButtonPrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof ButtonPrimitive> = (args) => (
10
- <ButtonPrimitive {...args} />
11
- );
12
-
13
- export const Button = Template.bind({});
9
+ export const Button: StoryObj<typeof ButtonPrimitive> = {
10
+ args: {
11
+ children: "Click me",
12
+ },
13
+ };
package/src/button.ws.tsx CHANGED
@@ -37,5 +37,5 @@ export const meta: WsComponentMeta = {
37
37
 
38
38
  export const propsMeta: WsComponentPropsMeta = {
39
39
  props,
40
- initialProps: ["type", "aria-label"],
40
+ initialProps: ["id", "type", "aria-label"],
41
41
  };
@@ -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 { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof CodeTextPrimitive>;
7
+ } satisfies Meta<typeof CodeTextPrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof CodeTextPrimitive> = (args) => (
10
- <CodeTextPrimitive {...args} />
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
  };
@@ -54,5 +54,5 @@ export const meta: WsComponentMeta = {
54
54
 
55
55
  export const propsMeta: WsComponentPropsMeta = {
56
56
  props,
57
- initialProps: ["inline", "lang", "meta"],
57
+ initialProps: ["id", "inline", "lang", "meta"],
58
58
  };
@@ -1,14 +1,13 @@
1
- import type { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof FormPrimitive>;
7
+ } satisfies Meta<typeof FormPrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof FormPrimitive> = (args) => (
10
- <FormPrimitive {...args} />
11
- );
12
-
13
- export const Form = Template.bind({});
14
- Form.args = {};
9
+ export const Form: StoryObj<typeof FormPrimitive> = {
10
+ args: {
11
+ children: "Form",
12
+ },
13
+ };
package/src/form.ws.tsx CHANGED
@@ -64,5 +64,5 @@ export const meta: WsComponentMeta = {
64
64
 
65
65
  export const propsMeta: WsComponentPropsMeta = {
66
66
  props,
67
- initialProps: [],
67
+ initialProps: ["id"],
68
68
  };
@@ -1,16 +1,13 @@
1
- import type { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof HeadingPrimitive>;
7
+ } satisfies Meta<typeof HeadingPrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof HeadingPrimitive> = (args) => (
10
- <HeadingPrimitive {...args} />
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
  };
@@ -40,5 +40,5 @@ export const meta: WsComponentMeta = {
40
40
 
41
41
  export const propsMeta: WsComponentPropsMeta = {
42
42
  props,
43
- initialProps: ["tag"],
43
+ initialProps: ["id", "tag"],
44
44
  };
@@ -1,16 +1,13 @@
1
- import type { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof HtmlEmbedPrimitive>;
7
+ } satisfies Meta<typeof HtmlEmbedPrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof HtmlEmbedPrimitive> = (args) => (
10
- <HtmlEmbedPrimitive {...args} />
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
  };
@@ -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 "Properties" panel to insert HTML code'}
75
+ {'Open the "Settings" panel to insert HTML code'}
76
76
  </div>
77
77
  );
78
78
  };
@@ -24,4 +24,5 @@ export const propsMeta: WsComponentPropsMeta = {
24
24
  rows: 10,
25
25
  },
26
26
  },
27
+ initialProps: ["id"],
27
28
  };
@@ -1,15 +1,9 @@
1
- import type { ComponentMeta, ComponentStory } from "@storybook/react";
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
- } as ComponentMeta<typeof ImagePrimitive>;
7
+ } satisfies Meta<typeof ImagePrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof ImagePrimitive> = (args) => (
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
@@ -52,5 +52,5 @@ export const propsMeta: WsComponentPropsMeta = {
52
52
  ...props,
53
53
  ...propsOverrides,
54
54
  },
55
- initialProps: ["src", "width", "height", "alt", "loading"],
55
+ initialProps: ["id", "src", "width", "height", "alt", "loading"],
56
56
  };
@@ -1,14 +1,11 @@
1
- import type { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof InputPrimitive>;
7
+ } satisfies Meta<typeof InputPrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof InputPrimitive> = (args) => (
10
- <InputPrimitive {...args} />
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
  };
@@ -1,16 +1,13 @@
1
- import type { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof ItalicPrimitive>;
7
+ } satisfies Meta<typeof ItalicPrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof ItalicPrimitive> = (args) => (
10
- <ItalicPrimitive {...args} />
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
@@ -29,4 +29,5 @@ export const meta: WsComponentMeta = {
29
29
 
30
30
  export const propsMeta: WsComponentPropsMeta = {
31
31
  props,
32
+ initialProps: ["id"],
32
33
  };
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
  };
@@ -1,16 +1,13 @@
1
- import type { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof LinkPrimitive>;
7
+ } satisfies Meta<typeof LinkPrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof LinkPrimitive> = (args) => (
10
- <LinkPrimitive {...args} />
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
@@ -60,5 +60,5 @@ export const propsMeta: WsComponentPropsMeta = {
60
60
  required: false,
61
61
  },
62
62
  },
63
- initialProps: ["href", "target"],
63
+ initialProps: ["id", "href", "target"],
64
64
  };
@@ -1,16 +1,13 @@
1
- import type { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof ListItemPrimitive>;
7
+ } satisfies Meta<typeof ListItemPrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof ListItemPrimitive> = (args) => (
10
- <ListItemPrimitive {...args} />
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
  };
@@ -33,4 +33,5 @@ export const meta: WsComponentMeta = {
33
33
 
34
34
  export const propsMeta: WsComponentPropsMeta = {
35
35
  props,
36
+ initialProps: ["id"],
36
37
  };
@@ -1,17 +1,14 @@
1
- import type { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof ListPrimitive>;
8
+ } satisfies Meta<typeof ListPrimitive>;
9
9
 
10
- const Template: ComponentStory<typeof ListPrimitive> = (args) => (
11
- <ListPrimitive {...args} />
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
@@ -54,5 +54,5 @@ export const meta: WsComponentMeta = {
54
54
 
55
55
  export const propsMeta: WsComponentPropsMeta = {
56
56
  props,
57
- initialProps: ["ordered", "type", "start", "reversed"],
57
+ initialProps: ["id", "ordered", "type", "start", "reversed"],
58
58
  };
@@ -1,16 +1,13 @@
1
- import type { ComponentStory, ComponentMeta } from "@storybook/react";
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
- } as ComponentMeta<typeof ParagraphPrimitive>;
7
+ } satisfies Meta<typeof ParagraphPrimitive>;
8
8
 
9
- const Template: ComponentStory<typeof ParagraphPrimitive> = (args) => (
10
- <ParagraphPrimitive {...args} />
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
  };
@@ -32,4 +32,5 @@ export const meta: WsComponentMeta = {
32
32
 
33
33
  export const propsMeta: WsComponentPropsMeta = {
34
34
  props,
35
+ initialProps: ["id"],
35
36
  };
@@ -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
  };