@webstudio-is/sdk-components-react 0.90.0 → 0.92.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__/blockquote.props.js +2 -4
- package/lib/__generated__/body.props.js +2 -4
- package/lib/__generated__/bold.props.js +2 -4
- package/lib/__generated__/box.props.js +2 -4
- package/lib/__generated__/button.props.js +2 -4
- package/lib/__generated__/checkbox.props.js +2 -4
- package/lib/__generated__/code-text.props.js +2 -4
- package/lib/__generated__/form.props.js +2 -4
- package/lib/__generated__/fragment.props.js +2 -4
- package/lib/__generated__/heading.props.js +2 -4
- package/lib/__generated__/html-embed.props.js +2 -4
- package/lib/__generated__/image.props.js +2 -4
- package/lib/__generated__/input.props.js +2 -4
- package/lib/__generated__/italic.props.js +2 -4
- package/lib/__generated__/label.props.js +2 -4
- package/lib/__generated__/link.props.js +2 -4
- package/lib/__generated__/list-item.props.js +2 -4
- package/lib/__generated__/list.props.js +2 -4
- package/lib/__generated__/paragraph.props.js +2 -4
- package/lib/__generated__/radio-button.props.js +2 -4
- package/lib/__generated__/rich-text-link.props.js +2 -4
- package/lib/__generated__/separator.props.js +2 -4
- package/lib/__generated__/slot.props.js +2 -4
- package/lib/__generated__/span.props.js +2 -4
- package/lib/__generated__/subscript.props.js +2 -4
- package/lib/__generated__/superscript.props.js +2 -4
- package/lib/__generated__/text.props.js +2 -4
- package/lib/__generated__/textarea.props.js +2 -4
- package/lib/__generated__/vimeo-play-button.props.js +2 -4
- package/lib/__generated__/vimeo-preview-image.props.js +2 -4
- package/lib/__generated__/vimeo-spinner.props.js +2 -4
- package/lib/__generated__/vimeo.props.js +2 -4
- package/lib/blockquote.js +3 -6
- package/lib/blockquote.stories.js +11 -0
- package/lib/blockquote.ws.js +3 -6
- package/lib/body.js +3 -6
- package/lib/body.stories.js +11 -0
- package/lib/body.ws.js +3 -6
- package/lib/bold.js +3 -6
- package/lib/bold.stories.js +11 -0
- package/lib/bold.ws.js +3 -6
- package/lib/box.js +3 -6
- package/lib/box.stories.js +11 -0
- package/lib/box.ws.js +3 -6
- package/lib/button.js +3 -6
- package/lib/button.stories.js +11 -0
- package/lib/button.ws.js +3 -6
- package/lib/checkbox.js +3 -6
- package/lib/checkbox.ws.js +3 -6
- package/lib/code-text.js +3 -6
- package/lib/code-text.stories.js +11 -0
- package/lib/code-text.ws.js +3 -6
- package/lib/components.js +33 -66
- package/lib/form.js +3 -6
- package/lib/form.stories.js +11 -0
- package/lib/form.ws.js +3 -6
- package/lib/fragment.js +2 -4
- package/lib/fragment.ws.js +3 -6
- package/lib/heading.js +2 -4
- package/lib/heading.stories.js +11 -0
- package/lib/heading.ws.js +3 -6
- package/lib/html-embed.js +2 -4
- package/lib/html-embed.stories.js +11 -0
- package/lib/html-embed.ws.js +3 -6
- package/lib/image.js +3 -6
- package/lib/image.stories.js +7 -0
- package/lib/image.ws.js +4 -8
- package/lib/input.js +3 -6
- package/lib/input.stories.js +9 -0
- package/lib/input.ws.js +9 -11
- package/lib/italic.js +3 -6
- package/lib/italic.stories.js +11 -0
- package/lib/italic.ws.js +3 -6
- package/lib/label.js +3 -6
- package/lib/label.ws.js +3 -6
- package/lib/link.js +3 -6
- package/lib/link.stories.js +11 -0
- package/lib/link.ws.js +3 -6
- package/lib/list-item.js +3 -6
- package/lib/list-item.stories.js +11 -0
- package/lib/list-item.ws.js +3 -6
- package/lib/list.js +2 -4
- package/lib/list.stories.js +13 -0
- package/lib/list.ws.js +3 -6
- package/lib/metas.js +33 -66
- package/lib/paragraph.js +3 -6
- package/lib/paragraph.stories.js +11 -0
- package/lib/paragraph.ws.js +3 -6
- package/lib/props.js +33 -66
- package/lib/radio-button.js +3 -6
- package/lib/radio-button.ws.js +9 -11
- package/lib/rich-text-link.js +2 -4
- package/lib/rich-text-link.stories.js +11 -0
- package/lib/rich-text-link.ws.js +3 -6
- package/lib/separator.js +3 -6
- package/lib/separator.stories.js +7 -0
- package/lib/separator.ws.js +3 -6
- package/lib/slot.js +2 -4
- package/lib/slot.stories.js +11 -0
- package/lib/slot.ws.js +3 -6
- package/lib/span.js +3 -6
- package/lib/span.stories.js +11 -0
- package/lib/span.ws.js +3 -6
- package/lib/subscript.js +3 -6
- package/lib/subscript.stories.js +11 -0
- package/lib/subscript.ws.js +3 -6
- package/lib/superscript.js +3 -6
- package/lib/superscript.stories.js +11 -0
- package/lib/superscript.ws.js +3 -6
- package/lib/text.js +3 -6
- package/lib/text.stories.js +11 -0
- package/lib/text.ws.js +3 -6
- package/lib/textarea.js +3 -6
- package/lib/textarea.ws.js +9 -11
- package/lib/types/__generated__/blockquote.props.d.ts +1 -1
- package/lib/types/__generated__/body.props.d.ts +1 -1
- package/lib/types/__generated__/bold.props.d.ts +1 -1
- package/lib/types/__generated__/box.props.d.ts +1 -1
- package/lib/types/__generated__/button.props.d.ts +1 -1
- package/lib/types/__generated__/checkbox.props.d.ts +1 -1
- package/lib/types/__generated__/code-text.props.d.ts +1 -1
- package/lib/types/__generated__/form.props.d.ts +1 -1
- package/lib/types/__generated__/fragment.props.d.ts +1 -1
- package/lib/types/__generated__/heading.props.d.ts +1 -1
- package/lib/types/__generated__/html-embed.props.d.ts +1 -1
- package/lib/types/__generated__/image.props.d.ts +1 -1
- package/lib/types/__generated__/input.props.d.ts +1 -1
- package/lib/types/__generated__/italic.props.d.ts +1 -1
- package/lib/types/__generated__/label.props.d.ts +1 -1
- package/lib/types/__generated__/link.props.d.ts +1 -1
- package/lib/types/__generated__/list-item.props.d.ts +1 -1
- package/lib/types/__generated__/list.props.d.ts +1 -1
- package/lib/types/__generated__/paragraph.props.d.ts +1 -1
- package/lib/types/__generated__/radio-button.props.d.ts +1 -1
- package/lib/types/__generated__/rich-text-link.props.d.ts +1 -1
- package/lib/types/__generated__/separator.props.d.ts +1 -1
- package/lib/types/__generated__/slot.props.d.ts +1 -1
- package/lib/types/__generated__/span.props.d.ts +1 -1
- package/lib/types/__generated__/subscript.props.d.ts +1 -1
- package/lib/types/__generated__/superscript.props.d.ts +1 -1
- package/lib/types/__generated__/text.props.d.ts +1 -1
- package/lib/types/__generated__/textarea.props.d.ts +1 -1
- package/lib/types/__generated__/vimeo-play-button.props.d.ts +1 -1
- package/lib/types/__generated__/vimeo-preview-image.props.d.ts +1 -1
- package/lib/types/__generated__/vimeo-spinner.props.d.ts +1 -1
- package/lib/types/__generated__/vimeo.props.d.ts +1 -1
- package/lib/types/vimeo-preview-image.d.ts +1 -1
- package/lib/vimeo-play-button.js +3 -5
- package/lib/vimeo-play-button.stories.js +11 -0
- package/lib/vimeo-play-button.ws.js +3 -6
- package/lib/vimeo-preview-image.js +2 -4
- package/lib/vimeo-preview-image.stories.js +11 -0
- package/lib/vimeo-preview-image.ws.js +3 -6
- package/lib/vimeo-spinner.js +2 -4
- package/lib/vimeo-spinner.stories.js +11 -0
- package/lib/vimeo-spinner.ws.js +3 -6
- package/lib/vimeo.js +3 -6
- package/lib/vimeo.stories.js +11 -0
- package/lib/vimeo.ws.js +3 -6
- package/package.json +16 -20
- package/lib/cjs/__generated__/blockquote.props.js +0 -536
- package/lib/cjs/__generated__/body.props.js +0 -530
- package/lib/cjs/__generated__/bold.props.js +0 -530
- package/lib/cjs/__generated__/box.props.js +0 -549
- package/lib/cjs/__generated__/button.props.js +0 -586
- package/lib/cjs/__generated__/checkbox.props.js +0 -688
- package/lib/cjs/__generated__/code-text.props.js +0 -530
- package/lib/cjs/__generated__/form.props.js +0 -578
- package/lib/cjs/__generated__/fragment.props.js +0 -24
- package/lib/cjs/__generated__/heading.props.js +0 -538
- package/lib/cjs/__generated__/html-embed.props.js +0 -31
- package/lib/cjs/__generated__/image.props.js +0 -603
- package/lib/cjs/__generated__/input.props.js +0 -695
- package/lib/cjs/__generated__/italic.props.js +0 -530
- package/lib/cjs/__generated__/label.props.js +0 -542
- package/lib/cjs/__generated__/link.props.js +0 -584
- package/lib/cjs/__generated__/list-item.props.js +0 -530
- package/lib/cjs/__generated__/list.props.js +0 -556
- package/lib/cjs/__generated__/paragraph.props.js +0 -530
- package/lib/cjs/__generated__/radio-button.props.js +0 -688
- package/lib/cjs/__generated__/rich-text-link.props.js +0 -584
- package/lib/cjs/__generated__/separator.props.js +0 -530
- package/lib/cjs/__generated__/slot.props.js +0 -24
- package/lib/cjs/__generated__/span.props.js +0 -530
- package/lib/cjs/__generated__/subscript.props.js +0 -530
- package/lib/cjs/__generated__/superscript.props.js +0 -530
- package/lib/cjs/__generated__/text.props.js +0 -538
- package/lib/cjs/__generated__/textarea.props.js +0 -597
- package/lib/cjs/__generated__/vimeo-play-button.props.js +0 -585
- package/lib/cjs/__generated__/vimeo-preview-image.props.js +0 -602
- package/lib/cjs/__generated__/vimeo-spinner.props.js +0 -530
- package/lib/cjs/__generated__/vimeo.props.js +0 -687
- package/lib/cjs/blockquote.js +0 -32
- package/lib/cjs/blockquote.ws.js +0 -96
- package/lib/cjs/body.js +0 -29
- package/lib/cjs/body.ws.js +0 -52
- package/lib/cjs/bold.js +0 -29
- package/lib/cjs/bold.ws.js +0 -42
- package/lib/cjs/box.js +0 -32
- package/lib/cjs/box.ws.js +0 -54
- package/lib/cjs/button.js +0 -31
- package/lib/cjs/button.ws.js +0 -57
- package/lib/cjs/checkbox.js +0 -29
- package/lib/cjs/checkbox.ws.js +0 -78
- package/lib/cjs/code-text.js +0 -30
- package/lib/cjs/code-text.ws.js +0 -75
- package/lib/cjs/components.js +0 -86
- package/lib/cjs/form.js +0 -29
- package/lib/cjs/form.ws.js +0 -84
- package/lib/cjs/fragment.js +0 -29
- package/lib/cjs/fragment.ws.js +0 -33
- package/lib/cjs/heading.js +0 -31
- package/lib/cjs/heading.ws.js +0 -58
- package/lib/cjs/html-embed.js +0 -80
- package/lib/cjs/html-embed.ws.js +0 -51
- package/lib/cjs/image.js +0 -86
- package/lib/cjs/image.ws.js +0 -70
- package/lib/cjs/input.js +0 -29
- package/lib/cjs/input.ws.js +0 -63
- package/lib/cjs/italic.js +0 -29
- package/lib/cjs/italic.ws.js +0 -48
- package/lib/cjs/label.js +0 -29
- package/lib/cjs/label.ws.js +0 -61
- package/lib/cjs/link.js +0 -52
- package/lib/cjs/link.ws.js +0 -81
- package/lib/cjs/list-item.js +0 -32
- package/lib/cjs/list-item.ws.js +0 -53
- package/lib/cjs/list.js +0 -31
- package/lib/cjs/list.ws.js +0 -74
- package/lib/cjs/metas.js +0 -86
- package/lib/cjs/package.json +0 -1
- package/lib/cjs/paragraph.js +0 -29
- package/lib/cjs/paragraph.ws.js +0 -53
- package/lib/cjs/props.js +0 -86
- package/lib/cjs/radio-button.js +0 -29
- package/lib/cjs/radio-button.ws.js +0 -78
- package/lib/cjs/rich-text-link.js +0 -28
- package/lib/cjs/rich-text-link.ws.js +0 -32
- package/lib/cjs/separator.js +0 -32
- package/lib/cjs/separator.ws.js +0 -71
- package/lib/cjs/slot.js +0 -36
- package/lib/cjs/slot.ws.js +0 -37
- package/lib/cjs/span.js +0 -29
- package/lib/cjs/span.ws.js +0 -42
- package/lib/cjs/subscript.js +0 -29
- package/lib/cjs/subscript.ws.js +0 -42
- package/lib/cjs/superscript.js +0 -29
- package/lib/cjs/superscript.ws.js +0 -42
- package/lib/cjs/text.js +0 -32
- package/lib/cjs/text.ws.js +0 -58
- package/lib/cjs/textarea.js +0 -29
- package/lib/cjs/textarea.ws.js +0 -64
- package/lib/cjs/vimeo-play-button.js +0 -38
- package/lib/cjs/vimeo-play-button.ws.js +0 -46
- package/lib/cjs/vimeo-preview-image.js +0 -40
- package/lib/cjs/vimeo-preview-image.ws.js +0 -37
- package/lib/cjs/vimeo-spinner.js +0 -37
- package/lib/cjs/vimeo-spinner.ws.js +0 -44
- package/lib/cjs/vimeo.js +0 -294
- package/lib/cjs/vimeo.ws.js +0 -348
- package/src/LICENSE +0 -661
- package/src/__generated__/blockquote.props.ts +0 -580
- package/src/__generated__/body.props.ts +0 -573
- package/src/__generated__/bold.props.ts +0 -573
- package/src/__generated__/box.props.ts +0 -593
- package/src/__generated__/button.props.ts +0 -636
- package/src/__generated__/checkbox.props.ts +0 -748
- package/src/__generated__/code-text.props.ts +0 -573
- package/src/__generated__/form.props.ts +0 -628
- package/src/__generated__/fragment.props.ts +0 -3
- package/src/__generated__/heading.props.ts +0 -582
- package/src/__generated__/html-embed.props.ts +0 -10
- package/src/__generated__/image.props.ts +0 -648
- package/src/__generated__/input.props.ts +0 -756
- package/src/__generated__/italic.props.ts +0 -573
- package/src/__generated__/label.props.ts +0 -586
- package/src/__generated__/link.props.ts +0 -630
- package/src/__generated__/list-item.props.ts +0 -573
- package/src/__generated__/list.props.ts +0 -601
- package/src/__generated__/paragraph.props.ts +0 -573
- package/src/__generated__/radio-button.props.ts +0 -748
- package/src/__generated__/rich-text-link.props.ts +0 -630
- package/src/__generated__/separator.props.ts +0 -573
- package/src/__generated__/slot.props.ts +0 -3
- package/src/__generated__/span.props.ts +0 -573
- package/src/__generated__/subscript.props.ts +0 -573
- package/src/__generated__/superscript.props.ts +0 -573
- package/src/__generated__/text.props.ts +0 -582
- package/src/__generated__/textarea.props.ts +0 -645
- package/src/__generated__/vimeo-play-button.props.ts +0 -634
- package/src/__generated__/vimeo-preview-image.props.ts +0 -647
- package/src/__generated__/vimeo-spinner.props.ts +0 -573
- package/src/__generated__/vimeo.props.ts +0 -751
- package/src/blockquote.stories.tsx +0 -13
- package/src/blockquote.tsx +0 -18
- package/src/blockquote.ws.tsx +0 -84
- package/src/body.stories.tsx +0 -13
- package/src/body.tsx +0 -10
- package/src/body.ws.tsx +0 -37
- package/src/bold.stories.tsx +0 -13
- package/src/bold.tsx +0 -10
- package/src/bold.ws.tsx +0 -27
- package/src/box.stories.tsx +0 -13
- package/src/box.tsx +0 -32
- package/src/box.ws.ts +0 -54
- package/src/button.stories.tsx +0 -13
- package/src/button.tsx +0 -15
- package/src/button.ws.tsx +0 -43
- package/src/checkbox.tsx +0 -13
- package/src/checkbox.ws.tsx +0 -64
- package/src/code-text.stories.tsx +0 -13
- package/src/code-text.tsx +0 -17
- package/src/code-text.ws.tsx +0 -61
- package/src/components.ts +0 -32
- package/src/form.stories.tsx +0 -13
- package/src/form.tsx +0 -14
- package/src/form.ws.tsx +0 -69
- package/src/fragment.tsx +0 -11
- package/src/fragment.ws.ts +0 -15
- package/src/heading.stories.tsx +0 -13
- package/src/heading.tsx +0 -21
- package/src/heading.ws.tsx +0 -47
- package/src/html-embed.stories.tsx +0 -13
- package/src/html-embed.tsx +0 -99
- package/src/html-embed.ws.ts +0 -34
- package/src/image.stories.tsx +0 -9
- package/src/image.tsx +0 -91
- package/src/image.ws.tsx +0 -58
- package/src/input.stories.tsx +0 -11
- package/src/input.tsx +0 -13
- package/src/input.ws.tsx +0 -49
- package/src/italic.stories.tsx +0 -13
- package/src/italic.tsx +0 -10
- package/src/italic.ws.tsx +0 -33
- package/src/label.tsx +0 -10
- package/src/label.ws.tsx +0 -46
- package/src/link.stories.tsx +0 -13
- package/src/link.tsx +0 -43
- package/src/link.ws.tsx +0 -67
- package/src/list-item.stories.tsx +0 -13
- package/src/list-item.tsx +0 -18
- package/src/list-item.ws.tsx +0 -38
- package/src/list.stories.tsx +0 -14
- package/src/list.tsx +0 -27
- package/src/list.ws.tsx +0 -59
- package/src/metas.ts +0 -32
- package/src/paragraph.stories.tsx +0 -13
- package/src/paragraph.tsx +0 -10
- package/src/paragraph.ws.tsx +0 -38
- package/src/props.ts +0 -32
- package/src/radio-button.tsx +0 -13
- package/src/radio-button.ws.tsx +0 -64
- package/src/rich-text-link.stories.tsx +0 -13
- package/src/rich-text-link.tsx +0 -8
- package/src/rich-text-link.ws.tsx +0 -14
- package/src/separator.stories.tsx +0 -9
- package/src/separator.tsx +0 -18
- package/src/separator.ws.tsx +0 -58
- package/src/slot.stories.tsx +0 -13
- package/src/slot.tsx +0 -17
- package/src/slot.ws.ts +0 -20
- package/src/span.stories.tsx +0 -13
- package/src/span.tsx +0 -10
- package/src/span.ws.tsx +0 -27
- package/src/subscript.stories.tsx +0 -13
- package/src/subscript.tsx +0 -10
- package/src/subscript.ws.tsx +0 -27
- package/src/superscript.stories.tsx +0 -13
- package/src/superscript.tsx +0 -10
- package/src/superscript.ws.tsx +0 -27
- package/src/text.stories.tsx +0 -13
- package/src/text.tsx +0 -22
- package/src/text.ws.tsx +0 -44
- package/src/textarea.tsx +0 -13
- package/src/textarea.ws.tsx +0 -50
- package/src/vimeo-play-button.stories.tsx +0 -13
- package/src/vimeo-play-button.tsx +0 -24
- package/src/vimeo-play-button.ws.ts +0 -30
- package/src/vimeo-preview-image.stories.tsx +0 -13
- package/src/vimeo-preview-image.tsx +0 -30
- package/src/vimeo-preview-image.ws.ts +0 -22
- package/src/vimeo-spinner.stories.tsx +0 -13
- package/src/vimeo-spinner.tsx +0 -25
- package/src/vimeo-spinner.ws.ts +0 -28
- package/src/vimeo.stories.tsx +0 -13
- package/src/vimeo.tsx +0 -431
- package/src/vimeo.ws.ts +0 -335
package/lib/box.ws.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { BoxIcon } from "@webstudio-is/icons/svg";
|
|
2
3
|
import {
|
|
3
4
|
defaultStates
|
|
@@ -27,7 +28,7 @@ const presetStyle = {
|
|
|
27
28
|
nav,
|
|
28
29
|
section
|
|
29
30
|
};
|
|
30
|
-
const meta = {
|
|
31
|
+
export const meta = {
|
|
31
32
|
category: "general",
|
|
32
33
|
type: "container",
|
|
33
34
|
label: "Box",
|
|
@@ -37,11 +38,7 @@ const meta = {
|
|
|
37
38
|
presetStyle,
|
|
38
39
|
order: 0
|
|
39
40
|
};
|
|
40
|
-
const propsMeta = {
|
|
41
|
+
export const propsMeta = {
|
|
41
42
|
props,
|
|
42
43
|
initialProps: ["id", "tag"]
|
|
43
44
|
};
|
|
44
|
-
export {
|
|
45
|
-
meta,
|
|
46
|
-
propsMeta
|
|
47
|
-
};
|
package/lib/button.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
|
-
const defaultTag = "button";
|
|
4
|
-
const Button = forwardRef(
|
|
4
|
+
export const defaultTag = "button";
|
|
5
|
+
export const Button = forwardRef(
|
|
5
6
|
({ type = "submit", children, ...props }, ref) => /* @__PURE__ */ jsx("button", { type, ...props, ref, children })
|
|
6
7
|
);
|
|
7
8
|
Button.displayName = "Button";
|
|
8
|
-
export {
|
|
9
|
-
Button,
|
|
10
|
-
defaultTag
|
|
11
|
-
};
|
package/lib/button.ws.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { ButtonElementIcon } from "@webstudio-is/icons/svg";
|
|
2
3
|
import {
|
|
3
4
|
defaultStates
|
|
@@ -7,7 +8,7 @@ import { props } from "./__generated__/button.props";
|
|
|
7
8
|
const presetStyle = {
|
|
8
9
|
button
|
|
9
10
|
};
|
|
10
|
-
const meta = {
|
|
11
|
+
export const meta = {
|
|
11
12
|
category: "forms",
|
|
12
13
|
type: "container",
|
|
13
14
|
invalidAncestors: ["Button"],
|
|
@@ -29,11 +30,7 @@ const meta = {
|
|
|
29
30
|
}
|
|
30
31
|
]
|
|
31
32
|
};
|
|
32
|
-
const propsMeta = {
|
|
33
|
+
export const propsMeta = {
|
|
33
34
|
props,
|
|
34
35
|
initialProps: ["id", "type", "aria-label"]
|
|
35
36
|
};
|
|
36
|
-
export {
|
|
37
|
-
meta,
|
|
38
|
-
propsMeta
|
|
39
|
-
};
|
package/lib/checkbox.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
|
-
const defaultTag = "input";
|
|
4
|
-
const Checkbox = forwardRef(({ children: _children, ...props }, ref) => /* @__PURE__ */ jsx("input", { ...props, type: "checkbox", ref }));
|
|
4
|
+
export const defaultTag = "input";
|
|
5
|
+
export const Checkbox = forwardRef(({ children: _children, ...props }, ref) => /* @__PURE__ */ jsx("input", { ...props, type: "checkbox", ref }));
|
|
5
6
|
Checkbox.displayName = "Checkbox";
|
|
6
|
-
export {
|
|
7
|
-
Checkbox,
|
|
8
|
-
defaultTag
|
|
9
|
-
};
|
package/lib/checkbox.ws.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { CheckboxCheckedIcon } from "@webstudio-is/icons/svg";
|
|
2
3
|
import {
|
|
3
4
|
defaultStates
|
|
@@ -13,7 +14,7 @@ const presetStyle = {
|
|
|
13
14
|
}
|
|
14
15
|
]
|
|
15
16
|
};
|
|
16
|
-
const meta = {
|
|
17
|
+
export const meta = {
|
|
17
18
|
category: "forms",
|
|
18
19
|
invalidAncestors: ["Button"],
|
|
19
20
|
type: "control",
|
|
@@ -50,11 +51,7 @@ const meta = {
|
|
|
50
51
|
}
|
|
51
52
|
]
|
|
52
53
|
};
|
|
53
|
-
const propsMeta = {
|
|
54
|
+
export const propsMeta = {
|
|
54
55
|
props,
|
|
55
56
|
initialProps: ["id", "name"]
|
|
56
57
|
};
|
|
57
|
-
export {
|
|
58
|
-
meta,
|
|
59
|
-
propsMeta
|
|
60
|
-
};
|
package/lib/code-text.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import {
|
|
2
3
|
forwardRef,
|
|
3
4
|
createElement
|
|
4
5
|
} from "react";
|
|
5
|
-
const defaultTag = "code";
|
|
6
|
-
const CodeText = forwardRef((props, ref) => {
|
|
6
|
+
export const defaultTag = "code";
|
|
7
|
+
export const CodeText = forwardRef((props, ref) => {
|
|
7
8
|
return createElement(defaultTag, { ...props, ref });
|
|
8
9
|
});
|
|
9
10
|
CodeText.displayName = "CodeText";
|
|
10
|
-
export {
|
|
11
|
-
CodeText,
|
|
12
|
-
defaultTag
|
|
13
|
-
};
|
package/lib/code-text.ws.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { CodeTextIcon } from "@webstudio-is/icons/svg";
|
|
2
3
|
import {
|
|
3
4
|
defaultStates
|
|
@@ -29,7 +30,7 @@ const presetStyle = {
|
|
|
29
30
|
}
|
|
30
31
|
]
|
|
31
32
|
};
|
|
32
|
-
const meta = {
|
|
33
|
+
export const meta = {
|
|
33
34
|
category: "general",
|
|
34
35
|
type: "container",
|
|
35
36
|
label: "Code Text",
|
|
@@ -47,11 +48,7 @@ const meta = {
|
|
|
47
48
|
],
|
|
48
49
|
order: 8
|
|
49
50
|
};
|
|
50
|
-
const propsMeta = {
|
|
51
|
+
export const propsMeta = {
|
|
51
52
|
props,
|
|
52
53
|
initialProps: ["id", "lang"]
|
|
53
54
|
};
|
|
54
|
-
export {
|
|
55
|
-
meta,
|
|
56
|
-
propsMeta
|
|
57
|
-
};
|
package/lib/components.js
CHANGED
|
@@ -1,66 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export {
|
|
34
|
-
Blockquote,
|
|
35
|
-
Body,
|
|
36
|
-
Bold,
|
|
37
|
-
Box,
|
|
38
|
-
Button,
|
|
39
|
-
Checkbox,
|
|
40
|
-
CodeText,
|
|
41
|
-
Form,
|
|
42
|
-
Fragment,
|
|
43
|
-
Heading,
|
|
44
|
-
HtmlEmbed,
|
|
45
|
-
Image,
|
|
46
|
-
Input,
|
|
47
|
-
Italic,
|
|
48
|
-
Label,
|
|
49
|
-
Link,
|
|
50
|
-
List,
|
|
51
|
-
ListItem,
|
|
52
|
-
Paragraph,
|
|
53
|
-
RadioButton,
|
|
54
|
-
RichTextLink,
|
|
55
|
-
Separator,
|
|
56
|
-
Slot,
|
|
57
|
-
Span,
|
|
58
|
-
Subscript,
|
|
59
|
-
Superscript,
|
|
60
|
-
Text,
|
|
61
|
-
Textarea,
|
|
62
|
-
Vimeo,
|
|
63
|
-
VimeoPlayButton,
|
|
64
|
-
VimeoPreviewImage,
|
|
65
|
-
VimeoSpinner
|
|
66
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
export { Slot } from "./slot";
|
|
3
|
+
export { Fragment } from "./fragment";
|
|
4
|
+
export { HtmlEmbed } from "./html-embed";
|
|
5
|
+
export { Body } from "./body";
|
|
6
|
+
export { Box } from "./box";
|
|
7
|
+
export { Text } from "./text";
|
|
8
|
+
export { Heading } from "./heading";
|
|
9
|
+
export { Paragraph } from "./paragraph";
|
|
10
|
+
export { Link } from "./link";
|
|
11
|
+
export { RichTextLink } from "./rich-text-link";
|
|
12
|
+
export { Span } from "./span";
|
|
13
|
+
export { Bold } from "./bold";
|
|
14
|
+
export { Italic } from "./italic";
|
|
15
|
+
export { Superscript } from "./superscript";
|
|
16
|
+
export { Subscript } from "./subscript";
|
|
17
|
+
export { Button } from "./button";
|
|
18
|
+
export { Input } from "./input";
|
|
19
|
+
export { Form } from "./form";
|
|
20
|
+
export { Image } from "./image";
|
|
21
|
+
export { Blockquote } from "./blockquote";
|
|
22
|
+
export { List } from "./list";
|
|
23
|
+
export { ListItem } from "./list-item";
|
|
24
|
+
export { Separator } from "./separator";
|
|
25
|
+
export { CodeText } from "./code-text";
|
|
26
|
+
export { Label } from "./label";
|
|
27
|
+
export { Textarea } from "./textarea";
|
|
28
|
+
export { RadioButton } from "./radio-button";
|
|
29
|
+
export { Checkbox } from "./checkbox";
|
|
30
|
+
export { Vimeo } from "./vimeo";
|
|
31
|
+
export { VimeoPreviewImage } from "./vimeo-preview-image";
|
|
32
|
+
export { VimeoPlayButton } from "./vimeo-play-button";
|
|
33
|
+
export { VimeoSpinner } from "./vimeo-spinner";
|
package/lib/form.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
|
-
const defaultTag = "form";
|
|
4
|
-
const Form = forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx("form", { ...props, ref, children }));
|
|
4
|
+
export const defaultTag = "form";
|
|
5
|
+
export const Form = forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx("form", { ...props, ref, children }));
|
|
5
6
|
Form.displayName = "Form";
|
|
6
|
-
export {
|
|
7
|
-
Form,
|
|
8
|
-
defaultTag
|
|
9
|
-
};
|
package/lib/form.ws.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { FormIcon } from "@webstudio-is/icons/svg";
|
|
2
3
|
import {
|
|
3
4
|
defaultStates
|
|
@@ -10,7 +11,7 @@ const presetStyle = {
|
|
|
10
11
|
{ property: "minHeight", value: { type: "unit", unit: "px", value: 20 } }
|
|
11
12
|
]
|
|
12
13
|
};
|
|
13
|
-
const meta = {
|
|
14
|
+
export const meta = {
|
|
14
15
|
category: "forms",
|
|
15
16
|
type: "container",
|
|
16
17
|
invalidAncestors: ["Form"],
|
|
@@ -56,11 +57,7 @@ const meta = {
|
|
|
56
57
|
}
|
|
57
58
|
]
|
|
58
59
|
};
|
|
59
|
-
const propsMeta = {
|
|
60
|
+
export const propsMeta = {
|
|
60
61
|
props,
|
|
61
62
|
initialProps: ["id", "action"]
|
|
62
63
|
};
|
|
63
|
-
export {
|
|
64
|
-
meta,
|
|
65
|
-
propsMeta
|
|
66
|
-
};
|
package/lib/fragment.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
|
-
const Fragment = forwardRef((props, ref) => {
|
|
4
|
+
export const Fragment = forwardRef((props, ref) => {
|
|
4
5
|
return /* @__PURE__ */ jsx("div", { ...props, ref, style: { display: "contents" } });
|
|
5
6
|
});
|
|
6
7
|
Fragment.displayName = "Fragment";
|
|
7
|
-
export {
|
|
8
|
-
Fragment
|
|
9
|
-
};
|
package/lib/fragment.ws.js
CHANGED
package/lib/heading.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import {
|
|
2
3
|
forwardRef,
|
|
3
4
|
createElement
|
|
4
5
|
} from "react";
|
|
5
6
|
const defaultTag = "h1";
|
|
6
|
-
const Heading = forwardRef(
|
|
7
|
+
export const Heading = forwardRef(
|
|
7
8
|
({ tag = defaultTag, ...props }, ref) => {
|
|
8
9
|
return createElement(tag, { ...props, ref });
|
|
9
10
|
}
|
|
10
11
|
);
|
|
11
12
|
Heading.displayName = "Heading";
|
|
12
|
-
export {
|
|
13
|
-
Heading
|
|
14
|
-
};
|
package/lib/heading.ws.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { HeadingIcon } from "@webstudio-is/icons/svg";
|
|
2
3
|
import {
|
|
3
4
|
defaultStates
|
|
@@ -12,7 +13,7 @@ const presetStyle = {
|
|
|
12
13
|
h5,
|
|
13
14
|
h6
|
|
14
15
|
};
|
|
15
|
-
const meta = {
|
|
16
|
+
export const meta = {
|
|
16
17
|
category: "text",
|
|
17
18
|
type: "container",
|
|
18
19
|
label: "Heading",
|
|
@@ -30,11 +31,7 @@ const meta = {
|
|
|
30
31
|
],
|
|
31
32
|
order: 1
|
|
32
33
|
};
|
|
33
|
-
const propsMeta = {
|
|
34
|
+
export const propsMeta = {
|
|
34
35
|
props,
|
|
35
36
|
initialProps: ["id", "tag"]
|
|
36
37
|
};
|
|
37
|
-
export {
|
|
38
|
-
meta,
|
|
39
|
-
propsMeta
|
|
40
|
-
};
|
package/lib/html-embed.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import {
|
|
3
4
|
forwardRef,
|
|
@@ -48,7 +49,7 @@ const Placeholder = (props) => {
|
|
|
48
49
|
const { code, innerRef, ...rest } = props;
|
|
49
50
|
return /* @__PURE__ */ jsx("div", { ref: innerRef, ...rest, style: { padding: "20px" }, children: 'Open the "Settings" panel to insert HTML code' });
|
|
50
51
|
};
|
|
51
|
-
const HtmlEmbed = forwardRef((props, ref) => {
|
|
52
|
+
export const HtmlEmbed = forwardRef((props, ref) => {
|
|
52
53
|
const { renderer } = useContext(ReactSdkContext);
|
|
53
54
|
const { code, executeScriptOnCanvas, ...rest } = props;
|
|
54
55
|
if (code === void 0 || code.trim().length === 0) {
|
|
@@ -60,6 +61,3 @@ const HtmlEmbed = forwardRef((props, ref) => {
|
|
|
60
61
|
return /* @__PURE__ */ jsx(InnerHtml, { innerRef: ref, code, ...rest });
|
|
61
62
|
});
|
|
62
63
|
HtmlEmbed.displayName = "HtmlEmbed";
|
|
63
|
-
export {
|
|
64
|
-
HtmlEmbed
|
|
65
|
-
};
|
package/lib/html-embed.ws.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { EmbedIcon } from "@webstudio-is/icons/svg";
|
|
2
3
|
import { props } from "./__generated__/html-embed.props";
|
|
3
|
-
const meta = {
|
|
4
|
+
export const meta = {
|
|
4
5
|
category: "general",
|
|
5
6
|
type: "embed",
|
|
6
7
|
label: "HTML Embed",
|
|
@@ -9,7 +10,7 @@ const meta = {
|
|
|
9
10
|
stylable: false,
|
|
10
11
|
order: 7
|
|
11
12
|
};
|
|
12
|
-
const propsMeta = {
|
|
13
|
+
export const propsMeta = {
|
|
13
14
|
props: {
|
|
14
15
|
...props,
|
|
15
16
|
executeScriptOnCanvas: {
|
|
@@ -25,7 +26,3 @@ const propsMeta = {
|
|
|
25
26
|
},
|
|
26
27
|
initialProps: []
|
|
27
28
|
};
|
|
28
|
-
export {
|
|
29
|
-
meta,
|
|
30
|
-
propsMeta
|
|
31
|
-
};
|
package/lib/image.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import {
|
|
3
4
|
forwardRef,
|
|
@@ -13,7 +14,7 @@ import {
|
|
|
13
14
|
getInstanceIdFromComponentProps,
|
|
14
15
|
ReactSdkContext
|
|
15
16
|
} from "@webstudio-is/react-sdk";
|
|
16
|
-
const defaultTag = "img";
|
|
17
|
+
export const defaultTag = "img";
|
|
17
18
|
const imagePlaceholderSvg = `data:image/svg+xml;base64,${btoa(`<svg
|
|
18
19
|
width="140"
|
|
19
20
|
height="140"
|
|
@@ -37,7 +38,7 @@ const imagePlaceholderSvg = `data:image/svg+xml;base64,${btoa(`<svg
|
|
|
37
38
|
fill="#A2A2A2"
|
|
38
39
|
/>
|
|
39
40
|
</svg>`)}`;
|
|
40
|
-
const Image = forwardRef(
|
|
41
|
+
export const Image = forwardRef(
|
|
41
42
|
({ loading = "lazy", ...props }, ref) => {
|
|
42
43
|
const { imageBaseUrl } = useContext(ReactSdkContext);
|
|
43
44
|
const asset = usePropAsset(getInstanceIdFromComponentProps(props), "src");
|
|
@@ -71,7 +72,3 @@ const Image = forwardRef(
|
|
|
71
72
|
}
|
|
72
73
|
);
|
|
73
74
|
Image.displayName = "Image";
|
|
74
|
-
export {
|
|
75
|
-
Image,
|
|
76
|
-
defaultTag
|
|
77
|
-
};
|
package/lib/image.ws.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { ImageIcon } from "@webstudio-is/icons/svg";
|
|
2
3
|
import {
|
|
3
4
|
defaultStates
|
|
@@ -20,7 +21,7 @@ const presetStyle = {
|
|
|
20
21
|
}
|
|
21
22
|
]
|
|
22
23
|
};
|
|
23
|
-
const meta = {
|
|
24
|
+
export const meta = {
|
|
24
25
|
category: "media",
|
|
25
26
|
type: "embed",
|
|
26
27
|
label: "Image",
|
|
@@ -30,7 +31,7 @@ const meta = {
|
|
|
30
31
|
presetStyle,
|
|
31
32
|
order: 0
|
|
32
33
|
};
|
|
33
|
-
const propsOverrides = {
|
|
34
|
+
export const propsOverrides = {
|
|
34
35
|
src: {
|
|
35
36
|
type: "string",
|
|
36
37
|
control: "file",
|
|
@@ -38,15 +39,10 @@ const propsOverrides = {
|
|
|
38
39
|
required: false
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
|
-
const propsMeta = {
|
|
42
|
+
export const propsMeta = {
|
|
42
43
|
props: {
|
|
43
44
|
...props,
|
|
44
45
|
...propsOverrides
|
|
45
46
|
},
|
|
46
47
|
initialProps: ["id", "src", "width", "height", "alt", "loading"]
|
|
47
48
|
};
|
|
48
|
-
export {
|
|
49
|
-
meta,
|
|
50
|
-
propsMeta,
|
|
51
|
-
propsOverrides
|
|
52
|
-
};
|
package/lib/input.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
|
-
const defaultTag = "input";
|
|
4
|
-
const Input = forwardRef(({ children: _children, ...props }, ref) => /* @__PURE__ */ jsx("input", { ...props, ref }));
|
|
4
|
+
export const defaultTag = "input";
|
|
5
|
+
export const Input = forwardRef(({ children: _children, ...props }, ref) => /* @__PURE__ */ jsx("input", { ...props, ref }));
|
|
5
6
|
Input.displayName = "Input";
|
|
6
|
-
export {
|
|
7
|
-
Input,
|
|
8
|
-
defaultTag
|
|
9
|
-
};
|
package/lib/input.ws.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { FormTextFieldIcon } from "@webstudio-is/icons/svg";
|
|
2
3
|
import {
|
|
3
4
|
defaultStates
|
|
@@ -13,7 +14,7 @@ const presetStyle = {
|
|
|
13
14
|
}
|
|
14
15
|
]
|
|
15
16
|
};
|
|
16
|
-
const meta = {
|
|
17
|
+
export const meta = {
|
|
17
18
|
category: "forms",
|
|
18
19
|
invalidAncestors: ["Button"],
|
|
19
20
|
type: "control",
|
|
@@ -28,18 +29,15 @@ const meta = {
|
|
|
28
29
|
{ selector: ":valid", label: "Valid" },
|
|
29
30
|
{ selector: ":invalid", label: "Invalid" },
|
|
30
31
|
{ selector: ":required", label: "Required" },
|
|
31
|
-
{ selector: ":optional", label: "Optional" }
|
|
32
|
-
|
|
33
|
-
{ selector: ":
|
|
34
|
-
{ selector: ":
|
|
35
|
-
{ selector: ":read-
|
|
32
|
+
{ selector: ":optional", label: "Optional" }
|
|
33
|
+
// Additional states will go into submenu
|
|
34
|
+
//{ selector: ":disabled", label: "Disabled" },
|
|
35
|
+
//{ selector: ":enabled", label: "Enabled" },
|
|
36
|
+
//{ selector: ":read-only", label: "Read Only" },
|
|
37
|
+
//{ selector: ":read-write", label: "Read Write" },
|
|
36
38
|
]
|
|
37
39
|
};
|
|
38
|
-
const propsMeta = {
|
|
40
|
+
export const propsMeta = {
|
|
39
41
|
props,
|
|
40
42
|
initialProps: ["id", "name", "type", "placeholder", "required", "autoFocus"]
|
|
41
43
|
};
|
|
42
|
-
export {
|
|
43
|
-
meta,
|
|
44
|
-
propsMeta
|
|
45
|
-
};
|
package/lib/italic.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
|
-
const defaultTag = "i";
|
|
4
|
-
const Italic = forwardRef((props, ref) => /* @__PURE__ */ jsx("i", { ...props, ref }));
|
|
4
|
+
export const defaultTag = "i";
|
|
5
|
+
export const Italic = forwardRef((props, ref) => /* @__PURE__ */ jsx("i", { ...props, ref }));
|
|
5
6
|
Italic.displayName = "Italic";
|
|
6
|
-
export {
|
|
7
|
-
Italic,
|
|
8
|
-
defaultTag
|
|
9
|
-
};
|