@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
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { RichTextLink as LinkPrimitive } from "./rich-text-link";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/RichTextLink",
|
|
6
6
|
component: LinkPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof LinkPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const RichTextLink = Template.bind({});
|
|
14
|
-
RichTextLink.args = {
|
|
15
|
-
children: "RichTextLink",
|
|
9
|
+
export const RichTextLink: StoryObj<typeof LinkPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "RichTextLink",
|
|
12
|
+
},
|
|
16
13
|
};
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Separator as SeparatorPrimitive } from "./separator";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Separator",
|
|
6
6
|
component: SeparatorPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof SeparatorPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
<SeparatorPrimitive {...args} />
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
export const Separator = Template.bind({});
|
|
14
|
-
Separator.args = {};
|
|
9
|
+
export const Separator: StoryObj<typeof SeparatorPrimitive> = {};
|
package/src/separator.ws.tsx
CHANGED
package/src/slot.stories.tsx
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Slot as SlotPrimitive } from "./slot";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Slot",
|
|
6
6
|
component: SlotPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof SlotPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const Slot = Template.bind({});
|
|
14
|
-
Slot.args = {
|
|
15
|
-
children: "Slot",
|
|
9
|
+
export const Slot: StoryObj<typeof SlotPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "Slot",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/span.stories.tsx
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Span as SpanPrimitive } from "./span";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Span",
|
|
6
6
|
component: SpanPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof SpanPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const Span = Template.bind({});
|
|
14
|
-
Span.args = {
|
|
15
|
-
children: "some span text",
|
|
9
|
+
export const Span: StoryObj<typeof SpanPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "some span text",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/span.ws.tsx
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Subscript as SubscriptPrimitive } from "./subscript";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Subscript",
|
|
6
6
|
component: SubscriptPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof SubscriptPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const Subscript = Template.bind({});
|
|
14
|
-
Subscript.args = {
|
|
15
|
-
children: "some subscript text",
|
|
9
|
+
export const Subscript: StoryObj<typeof SubscriptPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "some subscript text",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/subscript.ws.tsx
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Superscript as SuperscriptPrimitive } from "./superscript";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Superscript",
|
|
6
6
|
component: SuperscriptPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof SuperscriptPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const Superscript = Template.bind({});
|
|
14
|
-
Superscript.args = {
|
|
15
|
-
children: "some superscript text",
|
|
9
|
+
export const Superscript: StoryObj<typeof SuperscriptPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "some superscript text",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/superscript.ws.tsx
CHANGED
package/src/text.stories.tsx
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Text as TextPrimitive } from "./text";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Text",
|
|
6
6
|
component: TextPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof TextPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const Text = Template.bind({});
|
|
14
|
-
Text.args = {
|
|
15
|
-
children: "text",
|
|
9
|
+
export const Text: StoryObj<typeof TextPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
children: "text",
|
|
12
|
+
},
|
|
16
13
|
};
|
package/src/text.ws.tsx
CHANGED
package/src/textarea.ws.tsx
CHANGED
|
@@ -14,6 +14,10 @@ const presetStyle = {
|
|
|
14
14
|
...textarea,
|
|
15
15
|
// resize doesn't work well while on canvas
|
|
16
16
|
{ property: "resize", value: { type: "keyword", value: "none" } },
|
|
17
|
+
{
|
|
18
|
+
property: "display",
|
|
19
|
+
value: { type: "keyword", value: "block" },
|
|
20
|
+
},
|
|
17
21
|
],
|
|
18
22
|
} satisfies PresetStyle<typeof defaultTag>;
|
|
19
23
|
|
|
@@ -40,5 +44,5 @@ export const meta: WsComponentMeta = {
|
|
|
40
44
|
|
|
41
45
|
export const propsMeta: WsComponentPropsMeta = {
|
|
42
46
|
props,
|
|
43
|
-
initialProps: ["name", "placeholder", "required", "autoFocus"],
|
|
47
|
+
initialProps: ["id", "name", "placeholder", "required", "autoFocus"],
|
|
44
48
|
};
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { VimeoPlayButton as VimeoPlayButtonPrimitive } from "./vimeo-play-button";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title: "Components/Vimeo
|
|
5
|
+
title: "Components/Vimeo Play Button",
|
|
6
6
|
component: VimeoPlayButtonPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof VimeoPlayButtonPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export const VimeoPlayButton = Template.bind({});
|
|
17
|
-
VimeoPlayButton.args = {};
|
|
9
|
+
export const VimeoPlayButton: StoryObj<typeof VimeoPlayButtonPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
style: { minHeight: 20, outline: "1px solid black" },
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { VimeoPreviewImage as VimeoPreviewImagePrimitive } from "./vimeo-preview-image";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Vimeo Preview Image",
|
|
6
6
|
component: VimeoPreviewImagePrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof VimeoPreviewImagePrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export const VimeoPreviewImage = Template.bind({});
|
|
17
|
-
VimeoPreviewImage.args = {};
|
|
9
|
+
export const VimeoPreviewImage: StoryObj<typeof VimeoPreviewImagePrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
style: { minHeight: 20, outline: "1px solid black" },
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { VimeoSpinner as VimeoSpinnerPrimitive } from "./vimeo-spinner";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title: "Components/Vimeo
|
|
5
|
+
title: "Components/Vimeo Spinner",
|
|
6
6
|
component: VimeoSpinnerPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof VimeoSpinnerPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export const VimeoSpinner = Template.bind({});
|
|
17
|
-
VimeoSpinner.args = {};
|
|
9
|
+
export const VimeoSpinner: StoryObj<typeof VimeoSpinnerPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
style: { minHeight: 20, outline: "1px solid black" },
|
|
12
|
+
},
|
|
13
|
+
};
|
package/src/vimeo-spinner.ws.ts
CHANGED
package/src/vimeo.stories.tsx
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Vimeo as VimeoPrimitive } from "./vimeo";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Vimeo",
|
|
6
6
|
component: VimeoPrimitive,
|
|
7
|
-
}
|
|
7
|
+
} satisfies Meta<typeof VimeoPrimitive>;
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export const Vimeo = Template.bind({});
|
|
17
|
-
Vimeo.args = {};
|
|
9
|
+
export const Vimeo: StoryObj<typeof VimeoPrimitive> = {
|
|
10
|
+
args: {
|
|
11
|
+
style: { minHeight: 20, outline: "1px solid black" },
|
|
12
|
+
},
|
|
13
|
+
};
|
package/src/vimeo.tsx
CHANGED
|
@@ -413,8 +413,9 @@ const EmptyState = () => {
|
|
|
413
413
|
fontSize: "1.2em",
|
|
414
414
|
}}
|
|
415
415
|
>
|
|
416
|
-
|
|
417
|
-
|
|
416
|
+
{
|
|
417
|
+
'Open the "Settings" panel and paste a video URL, e.g. https://vimeo.com/831343124.'
|
|
418
|
+
}
|
|
418
419
|
</div>
|
|
419
420
|
);
|
|
420
421
|
};
|
package/src/vimeo.ws.ts
CHANGED
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
} from "@webstudio-is/react-sdk";
|
|
8
8
|
import { div } from "@webstudio-is/react-sdk/css-normalize";
|
|
9
9
|
import { props } from "./__generated__/vimeo.props";
|
|
10
|
-
import {
|
|
10
|
+
import { Vimeo } from "./vimeo";
|
|
11
|
+
import type { ComponentProps } from "react";
|
|
11
12
|
|
|
12
13
|
const presetStyle = {
|
|
13
14
|
div,
|
|
@@ -309,7 +310,8 @@ export const meta: WsComponentMeta = {
|
|
|
309
310
|
],
|
|
310
311
|
};
|
|
311
312
|
|
|
312
|
-
const initialProps: Array<keyof
|
|
313
|
+
const initialProps: Array<keyof ComponentProps<typeof Vimeo>> = [
|
|
314
|
+
"id",
|
|
313
315
|
"url",
|
|
314
316
|
"quality",
|
|
315
317
|
"showPreview",
|