@webstudio-is/sdk-components-react 0.71.0 → 0.73.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/__generated__/button.props.js +0 -6
- package/lib/__generated__/image.props.js +0 -1
- package/lib/__generated__/link-block.props.js +1 -7
- package/lib/__generated__/link.props.js +1 -7
- package/lib/__generated__/rich-text-link.props.js +1 -7
- package/lib/__generated__/{radio-button-field.props.js → vimeo-play-button.props.js} +14 -0
- package/lib/__generated__/vimeo-preview-image.props.js +441 -0
- package/lib/__generated__/{checkbox-field.props.js → vimeo-spinner.props.js} +0 -1
- package/lib/__generated__/vimeo.props.js +555 -0
- package/lib/blockquote.ws.js +1 -1
- package/lib/box.js +2 -1
- package/lib/button.js +1 -6
- package/lib/button.ws.js +9 -2
- package/lib/checkbox.ws.js +19 -1
- package/lib/cjs/__generated__/button.props.js +0 -6
- package/lib/cjs/__generated__/image.props.js +0 -1
- package/lib/cjs/__generated__/link-block.props.js +1 -7
- package/lib/cjs/__generated__/link.props.js +1 -7
- package/lib/cjs/__generated__/rich-text-link.props.js +1 -7
- package/lib/cjs/__generated__/{text-block.props.js → text.props.js} +3 -3
- package/lib/cjs/__generated__/{radio-button-field.props.js → vimeo-play-button.props.js} +17 -3
- package/lib/cjs/__generated__/vimeo-preview-image.props.js +461 -0
- package/lib/cjs/__generated__/{checkbox-field.props.js → vimeo-spinner.props.js} +3 -4
- package/lib/cjs/__generated__/vimeo.props.js +575 -0
- package/lib/cjs/blockquote.ws.js +1 -1
- package/lib/cjs/box.js +2 -1
- package/lib/cjs/button.js +1 -6
- package/lib/cjs/button.ws.js +9 -2
- package/lib/cjs/checkbox.ws.js +19 -1
- package/lib/cjs/code-text.ws.js +1 -1
- package/lib/cjs/components.js +11 -9
- package/lib/cjs/heading.ws.js +1 -1
- package/lib/cjs/image.js +3 -3
- package/lib/cjs/image.ws.js +12 -9
- package/lib/cjs/label.ws.js +3 -6
- package/lib/cjs/link.js +1 -1
- package/lib/cjs/link.ws.js +3 -3
- package/lib/cjs/list-item.ws.js +1 -1
- package/lib/cjs/metas.js +11 -9
- package/lib/cjs/paragraph.ws.js +2 -2
- package/lib/cjs/props.js +11 -9
- package/lib/cjs/radio-button.ws.js +19 -1
- package/lib/cjs/rich-text-link.ws.js +3 -10
- package/lib/cjs/span.ws.js +1 -1
- package/lib/cjs/{text-block.js → text.js} +6 -6
- package/lib/cjs/{text-block.ws.js → text.ws.js} +10 -10
- package/lib/cjs/{link-block.js → vimeo-play-button.js} +17 -9
- package/lib/cjs/{link-block.ws.js → vimeo-play-button.ws.js} +13 -22
- package/lib/cjs/vimeo-preview-image.js +40 -0
- package/lib/cjs/{radio-button-field.js → vimeo-preview-image.ws.js} +17 -10
- package/lib/cjs/{checkbox-field.js → vimeo-spinner.js} +16 -8
- package/lib/cjs/{checkbox-field.ws.js → vimeo-spinner.ws.js} +11 -30
- package/lib/cjs/vimeo.js +294 -0
- package/lib/cjs/vimeo.ws.js +345 -0
- package/lib/code-text.ws.js +1 -1
- package/lib/components.js +11 -9
- package/lib/heading.ws.js +1 -1
- package/lib/image.js +6 -5
- package/lib/image.ws.js +12 -9
- package/lib/label.ws.js +4 -7
- package/lib/link.js +3 -3
- package/lib/link.ws.js +3 -3
- package/lib/list-item.ws.js +1 -1
- package/lib/metas.js +52 -50
- package/lib/paragraph.ws.js +2 -2
- package/lib/props.js +52 -50
- package/lib/radio-button.ws.js +19 -1
- package/lib/rich-text-link.ws.js +3 -10
- package/lib/span.ws.js +1 -1
- package/lib/{text-block.js → text.js} +3 -3
- package/lib/{text-block.ws.js → text.ws.js} +7 -7
- package/lib/types/__generated__/vimeo-spinner.props.d.ts +2 -0
- package/lib/types/__generated__/vimeo.props.d.ts +2 -0
- package/lib/types/box.d.ts +1 -1
- package/lib/types/button.d.ts +2 -6
- package/lib/types/button.stories.d.ts +2 -6
- package/lib/types/components.d.ts +5 -4
- package/lib/types/image.d.ts +5 -6
- package/lib/types/image.stories.d.ts +555 -6
- package/lib/types/image.ws.d.ts +8 -0
- package/lib/types/link.d.ts +1 -3
- package/lib/types/link.stories.d.ts +2 -6
- package/lib/types/metas.d.ts +5 -4
- package/lib/types/props.d.ts +5 -4
- package/lib/types/rich-text-link.stories.d.ts +2 -6
- package/lib/types/{text-block.d.ts → text.d.ts} +1 -1
- package/lib/types/{text-block.stories.d.ts → text.stories.d.ts} +1 -1
- package/lib/types/vimeo-play-button.d.ts +4 -0
- package/lib/types/vimeo-play-button.stories.d.ts +5 -0
- package/lib/types/vimeo-preview-image.d.ts +281 -0
- package/lib/types/vimeo-preview-image.stories.d.ts +562 -0
- package/lib/types/vimeo-spinner.d.ts +2 -0
- package/lib/types/vimeo-spinner.stories.d.ts +5 -0
- package/lib/types/{link-block.ws.d.ts → vimeo-spinner.ws.d.ts} +1 -1
- package/lib/types/vimeo.d.ts +73 -0
- package/lib/types/vimeo.stories.d.ts +71 -0
- package/lib/types/vimeo.ws.d.ts +3 -0
- package/lib/vimeo-play-button.js +21 -0
- package/lib/vimeo-play-button.ws.js +26 -0
- package/lib/vimeo-preview-image.js +23 -0
- package/lib/vimeo-preview-image.ws.js +20 -0
- package/lib/vimeo-spinner.js +20 -0
- package/lib/vimeo-spinner.ws.js +25 -0
- package/lib/vimeo.js +282 -0
- package/lib/vimeo.ws.js +327 -0
- package/package.json +9 -7
- package/src/LICENSE +21 -0
- package/src/__generated__/button.props.ts +0 -6
- package/src/__generated__/image.props.ts +0 -1
- package/src/__generated__/link-block.props.ts +1 -7
- package/src/__generated__/link.props.ts +1 -7
- package/src/__generated__/rich-text-link.props.ts +1 -7
- package/src/__generated__/{checkbox-field.props.ts → vimeo-play-button.props.ts} +14 -0
- package/src/__generated__/vimeo-preview-image.props.ts +486 -0
- package/src/__generated__/{radio-button-field.props.ts → vimeo-spinner.props.ts} +0 -1
- package/src/__generated__/vimeo.props.ts +621 -0
- package/src/blockquote.ws.tsx +1 -1
- package/src/box.tsx +1 -1
- package/src/button.tsx +3 -11
- package/src/button.ws.tsx +8 -1
- package/src/checkbox.ws.tsx +19 -1
- package/src/code-text.ws.tsx +1 -1
- package/src/components.ts +5 -4
- package/src/heading.ws.tsx +1 -1
- package/src/image.tsx +6 -5
- package/src/image.ws.tsx +11 -9
- package/src/label.ws.tsx +4 -7
- package/src/link.tsx +5 -11
- package/src/link.ws.tsx +3 -3
- package/src/list-item.ws.tsx +1 -1
- package/src/metas.ts +5 -4
- package/src/paragraph.ws.tsx +2 -2
- package/src/props.ts +5 -4
- package/src/radio-button.ws.tsx +19 -1
- package/src/rich-text-link.ws.tsx +3 -11
- package/src/span.ws.tsx +1 -1
- package/src/text.stories.tsx +16 -0
- package/src/{text-block.tsx → text.tsx} +2 -2
- package/src/{text-block.ws.tsx → text.ws.tsx} +8 -8
- package/src/vimeo-play-button.stories.tsx +17 -0
- package/src/vimeo-play-button.tsx +24 -0
- package/src/vimeo-play-button.ws.ts +29 -0
- package/src/vimeo-preview-image.stories.tsx +17 -0
- package/src/vimeo-preview-image.tsx +30 -0
- package/src/vimeo-preview-image.ws.ts +22 -0
- package/src/vimeo-spinner.stories.tsx +17 -0
- package/src/vimeo-spinner.tsx +25 -0
- package/src/vimeo-spinner.ws.ts +27 -0
- package/src/vimeo.stories.tsx +17 -0
- package/src/vimeo.tsx +430 -0
- package/src/vimeo.ws.ts +331 -0
- package/lib/checkbox-field.js +0 -9
- package/lib/checkbox-field.ws.js +0 -44
- package/lib/cjs/radio-button-field.ws.js +0 -62
- package/lib/link-block.js +0 -10
- package/lib/link-block.ws.js +0 -33
- package/lib/radio-button-field.js +0 -9
- package/lib/radio-button-field.ws.js +0 -44
- package/lib/types/checkbox-field.d.ts +0 -3
- package/lib/types/link-block.d.ts +0 -3
- package/lib/types/link-block.stories.d.ts +0 -13
- package/lib/types/radio-button-field.d.ts +0 -3
- package/src/checkbox-field.tsx +0 -10
- package/src/checkbox-field.ws.tsx +0 -47
- package/src/link-block.stories.tsx +0 -16
- package/src/link-block.tsx +0 -9
- package/src/link-block.ws.tsx +0 -38
- package/src/radio-button-field.tsx +0 -10
- package/src/radio-button-field.ws.tsx +0 -47
- package/src/text-block.stories.tsx +0 -16
- /package/lib/__generated__/{text-block.props.js → text.props.js} +0 -0
- /package/lib/types/__generated__/{checkbox-field.props.d.ts → text.props.d.ts} +0 -0
- /package/lib/types/__generated__/{radio-button-field.props.d.ts → vimeo-play-button.props.d.ts} +0 -0
- /package/lib/types/__generated__/{text-block.props.d.ts → vimeo-preview-image.props.d.ts} +0 -0
- /package/lib/types/{checkbox-field.ws.d.ts → text.ws.d.ts} +0 -0
- /package/lib/types/{radio-button-field.ws.d.ts → vimeo-play-button.ws.d.ts} +0 -0
- /package/lib/types/{text-block.ws.d.ts → vimeo-preview-image.ws.d.ts} +0 -0
- /package/src/__generated__/{text-block.props.ts → text.props.ts} +0 -0
package/src/link-block.ws.tsx
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { LinkBlockIcon } from "@webstudio-is/icons/svg";
|
|
2
|
-
import type {
|
|
3
|
-
PresetStyle,
|
|
4
|
-
WsComponentMeta,
|
|
5
|
-
WsComponentPropsMeta,
|
|
6
|
-
} from "@webstudio-is/react-sdk";
|
|
7
|
-
import { a } from "@webstudio-is/react-sdk/css-normalize";
|
|
8
|
-
import { props } from "./__generated__/link-block.props";
|
|
9
|
-
import { meta as linkMeta, propsMeta as linkPropsMeta } from "./link.ws";
|
|
10
|
-
import type { defaultTag } from "./link-block";
|
|
11
|
-
|
|
12
|
-
const presetStyle = {
|
|
13
|
-
a: [
|
|
14
|
-
...a,
|
|
15
|
-
{
|
|
16
|
-
property: "display",
|
|
17
|
-
value: { type: "keyword", value: "inline-block" },
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
} satisfies PresetStyle<typeof defaultTag>;
|
|
21
|
-
|
|
22
|
-
export const meta: WsComponentMeta = {
|
|
23
|
-
category: "general",
|
|
24
|
-
type: "container",
|
|
25
|
-
label: "Link Block",
|
|
26
|
-
icon: LinkBlockIcon,
|
|
27
|
-
states: linkMeta.states,
|
|
28
|
-
presetStyle,
|
|
29
|
-
order: 2,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const propsMeta: WsComponentPropsMeta = {
|
|
33
|
-
props: {
|
|
34
|
-
...props,
|
|
35
|
-
href: linkPropsMeta.props.href,
|
|
36
|
-
},
|
|
37
|
-
initialProps: linkPropsMeta.initialProps,
|
|
38
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ElementRef, type ComponentProps } from "react";
|
|
2
|
-
|
|
3
|
-
export const defaultTag = "label";
|
|
4
|
-
|
|
5
|
-
export const RadioButtonField = forwardRef<
|
|
6
|
-
ElementRef<typeof defaultTag>,
|
|
7
|
-
Omit<ComponentProps<typeof defaultTag>, "htmlFor">
|
|
8
|
-
>((props, ref) => <label {...props} ref={ref} />);
|
|
9
|
-
|
|
10
|
-
RadioButtonField.displayName = "RadioButtonField";
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { RadioCheckedIcon } from "@webstudio-is/icons/svg";
|
|
2
|
-
import {
|
|
3
|
-
type WsComponentMeta,
|
|
4
|
-
type WsComponentPropsMeta,
|
|
5
|
-
type PresetStyle,
|
|
6
|
-
defaultStates,
|
|
7
|
-
} from "@webstudio-is/react-sdk";
|
|
8
|
-
import { props } from "./__generated__/radio-button-field.props";
|
|
9
|
-
import type { defaultTag } from "./radio-button-field";
|
|
10
|
-
import { label } from "@webstudio-is/react-sdk/css-normalize";
|
|
11
|
-
|
|
12
|
-
const presetStyle = {
|
|
13
|
-
label: [
|
|
14
|
-
...label,
|
|
15
|
-
{ property: "display", value: { type: "keyword", value: "flex" } },
|
|
16
|
-
],
|
|
17
|
-
} satisfies PresetStyle<typeof defaultTag>;
|
|
18
|
-
|
|
19
|
-
export const meta: WsComponentMeta = {
|
|
20
|
-
category: "forms",
|
|
21
|
-
type: "container",
|
|
22
|
-
label: "Radio",
|
|
23
|
-
icon: RadioCheckedIcon,
|
|
24
|
-
states: defaultStates,
|
|
25
|
-
presetStyle,
|
|
26
|
-
template: [
|
|
27
|
-
{
|
|
28
|
-
type: "instance",
|
|
29
|
-
component: "RadioButtonField",
|
|
30
|
-
children: [
|
|
31
|
-
{ type: "instance", component: "RadioButton", props: [], children: [] },
|
|
32
|
-
{
|
|
33
|
-
type: "instance",
|
|
34
|
-
component: "TextBlock",
|
|
35
|
-
label: "Radio Label",
|
|
36
|
-
props: [],
|
|
37
|
-
children: [{ type: "text", value: "Radio" }],
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const propsMeta: WsComponentPropsMeta = {
|
|
45
|
-
props,
|
|
46
|
-
initialProps: [],
|
|
47
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
2
|
-
import { TextBlock as TextBlockPrimitive } from "./text-block";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Components/TextBlock",
|
|
6
|
-
component: TextBlockPrimitive,
|
|
7
|
-
} as ComponentMeta<typeof TextBlockPrimitive>;
|
|
8
|
-
|
|
9
|
-
const Template: ComponentStory<typeof TextBlockPrimitive> = (args) => (
|
|
10
|
-
<TextBlockPrimitive {...args} />
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
export const TextBlock = Template.bind({});
|
|
14
|
-
TextBlock.args = {
|
|
15
|
-
children: "text",
|
|
16
|
-
};
|
|
File without changes
|
|
File without changes
|
/package/lib/types/__generated__/{radio-button-field.props.d.ts → vimeo-play-button.props.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|