@webstudio-is/sdk-components-react 0.191.4 → 0.192.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 +514 -0
- package/lib/__generated__/body.props.js +508 -0
- package/lib/__generated__/bold.props.js +508 -0
- package/lib/__generated__/box.props.js +527 -0
- package/lib/__generated__/button.props.js +570 -0
- package/lib/__generated__/checkbox.props.js +672 -0
- package/lib/__generated__/code-text.props.js +509 -0
- package/lib/__generated__/form.props.js +556 -0
- package/lib/__generated__/heading.props.js +516 -0
- package/lib/__generated__/html-embed.props.js +13 -0
- package/lib/__generated__/image.props.js +592 -0
- package/lib/__generated__/input.props.js +696 -0
- package/lib/__generated__/italic.props.js +508 -0
- package/lib/__generated__/label.props.js +520 -0
- package/lib/__generated__/link.props.js +568 -0
- package/lib/__generated__/list-item.props.js +514 -0
- package/lib/__generated__/list.props.js +534 -0
- package/lib/__generated__/markdown-embed.props.js +7 -0
- package/lib/__generated__/option.props.js +532 -0
- package/lib/__generated__/paragraph.props.js +508 -0
- package/lib/__generated__/radio-button.props.js +672 -0
- package/lib/__generated__/select.props.js +556 -0
- package/lib/__generated__/separator.props.js +508 -0
- package/lib/__generated__/span.props.js +508 -0
- package/lib/__generated__/subscript.props.js +508 -0
- package/lib/__generated__/superscript.props.js +508 -0
- package/lib/__generated__/text.props.js +516 -0
- package/lib/__generated__/textarea.props.js +587 -0
- package/lib/__generated__/time.props.js +312 -0
- package/lib/__generated__/vimeo-play-button.props.js +569 -0
- package/lib/__generated__/vimeo-preview-image.props.js +586 -0
- package/lib/__generated__/vimeo-spinner.props.js +508 -0
- package/lib/__generated__/vimeo.props.js +674 -0
- package/lib/__generated__/xml-node.props.js +7 -0
- package/lib/__generated__/xml-time.props.js +18 -0
- package/lib/blockquote.js +9 -0
- package/lib/blockquote.ws.js +79 -0
- package/lib/body.js +7 -0
- package/lib/body.ws.js +30 -0
- package/lib/bold.js +7 -0
- package/lib/bold.ws.js +20 -0
- package/lib/box.js +9 -0
- package/lib/box.ws.js +31 -0
- package/lib/button.js +9 -0
- package/lib/button.ws.js +43 -0
- package/lib/checkbox.js +15 -0
- package/lib/checkbox.ws.js +58 -0
- package/lib/code-text.js +10 -0
- package/lib/code-text.ws.js +59 -0
- package/lib/components.js +79 -0
- package/lib/content-embed.ws.js +77 -0
- package/lib/form.js +7 -0
- package/lib/form.ws.js +30 -0
- package/lib/fragment.js +7 -0
- package/lib/fragment.ws.js +11 -0
- package/lib/heading.js +9 -0
- package/lib/heading.ws.js +44 -0
- package/lib/home_wsKvRSqvkajPPBeycZ-C8.svg +3 -0
- package/lib/hooks.js +5 -0
- package/lib/html-embed-patchers.js +29 -0
- package/lib/html-embed.js +112 -0
- package/lib/html-embed.ws.js +46 -0
- package/lib/image.js +40 -0
- package/lib/image.ws.js +65 -0
- package/lib/input.js +17 -0
- package/lib/input.ws.js +54 -0
- package/lib/italic.js +7 -0
- package/lib/italic.ws.js +26 -0
- package/lib/label.js +7 -0
- package/lib/label.ws.js +42 -0
- package/lib/link.js +15 -0
- package/lib/link.ws.js +67 -0
- package/lib/list-item.js +9 -0
- package/lib/list-item.ws.js +39 -0
- package/lib/list.js +6 -0
- package/lib/list.ws.js +92 -0
- package/lib/markdown-embed.js +14 -0
- package/lib/markdown-embed.ws.js +111 -0
- package/lib/metas.js +81 -0
- package/lib/option.js +7 -0
- package/lib/option.ws.js +45 -0
- package/lib/paragraph.js +7 -0
- package/lib/paragraph.ws.js +39 -0
- package/lib/props.js +79 -0
- package/lib/radio-button.js +15 -0
- package/lib/radio-button.ws.js +60 -0
- package/lib/rich-text-link.js +8 -0
- package/lib/rich-text-link.ws.js +11 -0
- package/lib/select.js +19 -0
- package/lib/select.ws.js +96 -0
- package/lib/separator.js +9 -0
- package/lib/separator.ws.js +48 -0
- package/lib/slot.js +14 -0
- package/lib/slot.ws.js +15 -0
- package/lib/span.js +7 -0
- package/lib/span.ws.js +20 -0
- package/lib/subscript.js +7 -0
- package/lib/subscript.ws.js +20 -0
- package/lib/superscript.js +7 -0
- package/lib/superscript.ws.js +20 -0
- package/lib/text.js +10 -0
- package/lib/text.ws.js +41 -0
- package/lib/textarea.js +7 -0
- package/lib/textarea.ws.js +55 -0
- package/lib/time.js +319 -0
- package/lib/time.ws.js +22 -0
- package/lib/types/__generated__/blockquote.props.d.ts +2 -0
- package/lib/types/__generated__/body.props.d.ts +2 -0
- package/lib/types/__generated__/bold.props.d.ts +2 -0
- package/lib/types/__generated__/box.props.d.ts +2 -0
- package/lib/types/__generated__/button.props.d.ts +2 -0
- package/lib/types/__generated__/checkbox.props.d.ts +2 -0
- package/lib/types/__generated__/code-text.props.d.ts +2 -0
- package/lib/types/__generated__/form.props.d.ts +2 -0
- package/lib/types/__generated__/fragment.props.d.ts +2 -0
- package/lib/types/__generated__/heading.props.d.ts +2 -0
- package/lib/types/__generated__/html-embed.props.d.ts +2 -0
- package/lib/types/__generated__/image.props.d.ts +2 -0
- package/lib/types/__generated__/input.props.d.ts +2 -0
- package/lib/types/__generated__/italic.props.d.ts +2 -0
- package/lib/types/__generated__/label.props.d.ts +2 -0
- package/lib/types/__generated__/link.props.d.ts +2 -0
- package/lib/types/__generated__/list-item.props.d.ts +2 -0
- package/lib/types/__generated__/list.props.d.ts +2 -0
- package/lib/types/__generated__/local-date.props.d.ts +2 -0
- package/lib/types/__generated__/markdown-embed.props.d.ts +2 -0
- package/lib/types/__generated__/option.props.d.ts +2 -0
- package/lib/types/__generated__/paragraph.props.d.ts +2 -0
- package/lib/types/__generated__/radio-button.props.d.ts +2 -0
- package/lib/types/__generated__/rich-text-link.props.d.ts +2 -0
- package/lib/types/__generated__/select.props.d.ts +2 -0
- package/lib/types/__generated__/separator.props.d.ts +2 -0
- package/lib/types/__generated__/slot.props.d.ts +2 -0
- package/lib/types/__generated__/span.props.d.ts +2 -0
- package/lib/types/__generated__/subscript.props.d.ts +2 -0
- package/lib/types/__generated__/superscript.props.d.ts +2 -0
- package/lib/types/__generated__/text.props.d.ts +2 -0
- package/lib/types/__generated__/textarea.props.d.ts +2 -0
- package/lib/types/__generated__/time.props.d.ts +2 -0
- package/lib/types/__generated__/vimeo-play-button.props.d.ts +2 -0
- package/lib/types/__generated__/vimeo-preview-image.props.d.ts +2 -0
- package/lib/types/__generated__/vimeo-spinner.props.d.ts +2 -0
- package/lib/types/__generated__/vimeo.props.d.ts +2 -0
- package/lib/types/__generated__/xml-node.props.d.ts +2 -0
- package/lib/types/__generated__/xml-time.props.d.ts +2 -0
- package/lib/types/blockquote.d.ts +2 -0
- package/lib/types/blockquote.ws.d.ts +3 -0
- package/lib/types/body.d.ts +2 -0
- package/lib/types/body.ws.d.ts +3 -0
- package/lib/types/bold.d.ts +2 -0
- package/lib/types/bold.ws.d.ts +3 -0
- package/lib/types/box.d.ts +8 -0
- package/lib/types/box.ws.d.ts +3 -0
- package/lib/types/button.d.ts +2 -0
- package/lib/types/button.ws.d.ts +3 -0
- package/lib/types/checkbox.d.ts +4 -0
- package/lib/types/checkbox.ws.d.ts +3 -0
- package/lib/types/code-text.d.ts +4 -0
- package/lib/types/code-text.ws.d.ts +3 -0
- package/lib/types/components.d.ts +39 -0
- package/lib/types/content-embed.ws.d.ts +2 -0
- package/lib/types/form.d.ts +2 -0
- package/lib/types/form.ws.d.ts +3 -0
- package/lib/types/fragment.d.ts +6 -0
- package/lib/types/fragment.ws.d.ts +3 -0
- package/lib/types/heading.d.ts +8 -0
- package/lib/types/heading.ws.d.ts +3 -0
- package/lib/types/hooks.d.ts +2 -0
- package/lib/types/html-embed-patchers.d.ts +2 -0
- package/lib/types/html-embed.d.ts +12 -0
- package/lib/types/html-embed.test.d.ts +1 -0
- package/lib/types/html-embed.ws.d.ts +3 -0
- package/lib/types/image.d.ts +8 -0
- package/lib/types/image.ws.d.ts +11 -0
- package/lib/types/input.d.ts +4 -0
- package/lib/types/input.ws.d.ts +3 -0
- package/lib/types/italic.d.ts +2 -0
- package/lib/types/italic.ws.d.ts +3 -0
- package/lib/types/label.d.ts +2 -0
- package/lib/types/label.ws.d.ts +3 -0
- package/lib/types/link.d.ts +7 -0
- package/lib/types/link.ws.d.ts +3 -0
- package/lib/types/list-item.d.ts +2 -0
- package/lib/types/list-item.ws.d.ts +3 -0
- package/lib/types/list.d.ts +10 -0
- package/lib/types/list.ws.d.ts +3 -0
- package/lib/types/markdown-embed.d.ts +7 -0
- package/lib/types/markdown-embed.ws.d.ts +3 -0
- package/lib/types/metas.d.ts +40 -0
- package/lib/types/option.d.ts +2 -0
- package/lib/types/option.ws.d.ts +3 -0
- package/lib/types/paragraph.d.ts +2 -0
- package/lib/types/paragraph.ws.d.ts +3 -0
- package/lib/types/props.d.ts +39 -0
- package/lib/types/radio-button.d.ts +4 -0
- package/lib/types/radio-button.ws.d.ts +3 -0
- package/lib/types/rich-text-link.d.ts +2 -0
- package/lib/types/rich-text-link.ws.d.ts +3 -0
- package/lib/types/select.d.ts +4 -0
- package/lib/types/select.ws.d.ts +3 -0
- package/lib/types/separator.d.ts +2 -0
- package/lib/types/separator.ws.d.ts +3 -0
- package/lib/types/slot.d.ts +6 -0
- package/lib/types/slot.ws.d.ts +3 -0
- package/lib/types/span.d.ts +2 -0
- package/lib/types/span.ws.d.ts +3 -0
- package/lib/types/subscript.d.ts +2 -0
- package/lib/types/subscript.ws.d.ts +3 -0
- package/lib/types/superscript.d.ts +2 -0
- package/lib/types/superscript.ws.d.ts +3 -0
- package/lib/types/test-utils/cartesian.d.ts +2 -0
- package/lib/types/text.d.ts +8 -0
- package/lib/types/text.ws.d.ts +3 -0
- package/lib/types/textarea.d.ts +2 -0
- package/lib/types/textarea.ws.d.ts +3 -0
- package/lib/types/time.d.ts +18 -0
- package/lib/types/time.test.d.ts +1 -0
- package/lib/types/time.ws.d.ts +3 -0
- package/lib/types/vimeo-play-button.d.ts +3 -0
- package/lib/types/vimeo-play-button.ws.d.ts +3 -0
- package/lib/types/vimeo-preview-image.d.ts +284 -0
- package/lib/types/vimeo-preview-image.ws.d.ts +3 -0
- package/lib/types/vimeo-spinner.d.ts +1 -0
- package/lib/types/vimeo-spinner.ws.d.ts +3 -0
- package/lib/types/vimeo.d.ts +75 -0
- package/lib/types/vimeo.ws.d.ts +3 -0
- package/lib/types/xml-node.d.ts +13 -0
- package/lib/types/xml-node.ws.d.ts +3 -0
- package/lib/types/xml-time.d.ts +6 -0
- package/lib/types/xml-time.ws.d.ts +3 -0
- package/lib/vimeo-play-button.js +15 -0
- package/lib/vimeo-play-button.ws.js +31 -0
- package/lib/vimeo-preview-image.js +19 -0
- package/lib/vimeo-preview-image.ws.js +19 -0
- package/lib/vimeo-spinner.js +13 -0
- package/lib/vimeo-spinner.ws.js +25 -0
- package/lib/vimeo.js +215 -0
- package/lib/vimeo.ws.js +329 -0
- package/lib/xml-node.js +44 -0
- package/lib/xml-node.ws.js +18 -0
- package/lib/xml-time.js +25 -0
- package/lib/xml-time.ws.js +18 -0
- package/package.json +5 -5
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
const c = m(
|
|
4
|
+
({ children: o, ...r }, t) => /* @__PURE__ */ e("blockquote", { ...r, ref: t, children: o })
|
|
5
|
+
);
|
|
6
|
+
c.displayName = "Blockquote";
|
|
7
|
+
export {
|
|
8
|
+
c as Blockquote
|
|
9
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { BlockquoteIcon as e } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as t } from "@webstudio-is/react-sdk";
|
|
3
|
+
import { props as p } from "./__generated__/blockquote.props.js";
|
|
4
|
+
const r = {
|
|
5
|
+
blockquote: [
|
|
6
|
+
{
|
|
7
|
+
property: "marginTop",
|
|
8
|
+
value: { type: "unit", value: 0, unit: "number" }
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
property: "marginRight",
|
|
12
|
+
value: { type: "unit", value: 0, unit: "number" }
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
property: "marginBottom",
|
|
16
|
+
value: { type: "unit", value: 10, unit: "px" }
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
property: "marginLeft",
|
|
20
|
+
value: { type: "unit", value: 0, unit: "number" }
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
property: "paddingTop",
|
|
24
|
+
value: { type: "unit", value: 10, unit: "px" }
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
property: "paddingBottom",
|
|
28
|
+
value: { type: "unit", value: 10, unit: "px" }
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
property: "paddingLeft",
|
|
32
|
+
value: { type: "unit", value: 20, unit: "px" }
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
property: "paddingRight",
|
|
36
|
+
value: { type: "unit", value: 20, unit: "px" }
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
property: "borderLeftWidth",
|
|
40
|
+
value: { type: "unit", value: 5, unit: "px" }
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
property: "borderLeftStyle",
|
|
44
|
+
value: { type: "keyword", value: "solid" }
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
property: "borderLeftColor",
|
|
48
|
+
value: { type: "rgb", r: 226, g: 226, b: 226, alpha: 1 }
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}, i = {
|
|
52
|
+
category: "text",
|
|
53
|
+
type: "container",
|
|
54
|
+
description: "Use to style a quote from an external source like an article or book.",
|
|
55
|
+
icon: e,
|
|
56
|
+
states: t,
|
|
57
|
+
presetStyle: r,
|
|
58
|
+
order: 3,
|
|
59
|
+
template: [
|
|
60
|
+
{
|
|
61
|
+
type: "instance",
|
|
62
|
+
component: "Blockquote",
|
|
63
|
+
children: [
|
|
64
|
+
{
|
|
65
|
+
type: "text",
|
|
66
|
+
value: "Blockquote text you can edit",
|
|
67
|
+
placeholder: !0
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}, n = {
|
|
73
|
+
props: p,
|
|
74
|
+
initialProps: ["id", "className", "cite"]
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
i as meta,
|
|
78
|
+
n as propsMeta
|
|
79
|
+
};
|
package/lib/body.js
ADDED
package/lib/body.ws.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BodyIcon as o } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as t } from "@webstudio-is/react-sdk";
|
|
3
|
+
import { body as e } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as a } from "./__generated__/body.props.js";
|
|
5
|
+
const r = {
|
|
6
|
+
body: [
|
|
7
|
+
...e,
|
|
8
|
+
{
|
|
9
|
+
property: "WebkitFontSmoothing",
|
|
10
|
+
value: { type: "keyword", value: "antialiased" }
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
property: "MozOsxFontSmoothing",
|
|
14
|
+
value: { type: "keyword", value: "grayscale" }
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}, l = {
|
|
18
|
+
type: "container",
|
|
19
|
+
icon: o,
|
|
20
|
+
states: t,
|
|
21
|
+
presetStyle: r,
|
|
22
|
+
detachable: !1
|
|
23
|
+
}, m = {
|
|
24
|
+
props: a,
|
|
25
|
+
initialProps: ["id", "className"]
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
l as meta,
|
|
29
|
+
m as propsMeta
|
|
30
|
+
};
|
package/lib/bold.js
ADDED
package/lib/bold.ws.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BoldIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as o } from "@webstudio-is/react-sdk";
|
|
3
|
+
import { b as e } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as r } from "./__generated__/bold.props.js";
|
|
5
|
+
const p = {
|
|
6
|
+
b: e
|
|
7
|
+
}, l = {
|
|
8
|
+
type: "rich-text-child",
|
|
9
|
+
label: "Bold Text",
|
|
10
|
+
icon: t,
|
|
11
|
+
states: o,
|
|
12
|
+
presetStyle: p
|
|
13
|
+
}, c = {
|
|
14
|
+
props: r,
|
|
15
|
+
initialProps: ["id", "className"]
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
l as meta,
|
|
19
|
+
c as propsMeta
|
|
20
|
+
};
|
package/lib/box.js
ADDED
package/lib/box.ws.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BoxIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as e } from "@webstudio-is/react-sdk";
|
|
3
|
+
import { div as o, address as r, article as a, aside as i, figure as n, footer as s, header as c, main as p, nav as d, section as m } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as f } from "./__generated__/box.props.js";
|
|
5
|
+
const g = {
|
|
6
|
+
div: o,
|
|
7
|
+
address: r,
|
|
8
|
+
article: a,
|
|
9
|
+
aside: i,
|
|
10
|
+
figure: n,
|
|
11
|
+
footer: s,
|
|
12
|
+
header: c,
|
|
13
|
+
main: p,
|
|
14
|
+
nav: d,
|
|
15
|
+
section: m
|
|
16
|
+
}, v = {
|
|
17
|
+
category: "general",
|
|
18
|
+
type: "container",
|
|
19
|
+
description: "A container for content. By default this is a Div, but the tag can be changed in settings.",
|
|
20
|
+
icon: t,
|
|
21
|
+
states: e,
|
|
22
|
+
presetStyle: g,
|
|
23
|
+
order: 0
|
|
24
|
+
}, b = {
|
|
25
|
+
props: f,
|
|
26
|
+
initialProps: ["id", "className", "tag"]
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
v as meta,
|
|
30
|
+
b as propsMeta
|
|
31
|
+
};
|
package/lib/button.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
const n = i(
|
|
4
|
+
({ type: t = "submit", children: o, ...r }, m) => /* @__PURE__ */ f("button", { type: t, ...r, ref: m, children: o })
|
|
5
|
+
);
|
|
6
|
+
n.displayName = "Button";
|
|
7
|
+
export {
|
|
8
|
+
n as Button
|
|
9
|
+
};
|
package/lib/button.ws.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ButtonElementIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as e } from "@webstudio-is/react-sdk";
|
|
3
|
+
import { button as o } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as n } from "./__generated__/button.props.js";
|
|
5
|
+
const a = {
|
|
6
|
+
button: o
|
|
7
|
+
}, p = {
|
|
8
|
+
category: "forms",
|
|
9
|
+
type: "container",
|
|
10
|
+
constraints: {
|
|
11
|
+
relation: "ancestor",
|
|
12
|
+
component: { $nin: ["Button", "Link"] }
|
|
13
|
+
},
|
|
14
|
+
description: "Use a button to submit forms or trigger actions within a page. Do not use a button to navigate users to another resource or another page - that’s what a link is used for.",
|
|
15
|
+
icon: t,
|
|
16
|
+
presetStyle: a,
|
|
17
|
+
states: [
|
|
18
|
+
...e,
|
|
19
|
+
{ selector: ":disabled", label: "Disabled" },
|
|
20
|
+
{ selector: ":enabled", label: "Enabled" }
|
|
21
|
+
],
|
|
22
|
+
order: 2,
|
|
23
|
+
template: [
|
|
24
|
+
{
|
|
25
|
+
type: "instance",
|
|
26
|
+
component: "Button",
|
|
27
|
+
children: [
|
|
28
|
+
{
|
|
29
|
+
type: "text",
|
|
30
|
+
value: "Button text you can edit",
|
|
31
|
+
placeholder: !0
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}, c = {
|
|
37
|
+
props: n,
|
|
38
|
+
initialProps: ["id", "className", "type", "aria-label"]
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
p as meta,
|
|
42
|
+
c as propsMeta
|
|
43
|
+
};
|
package/lib/checkbox.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
3
|
+
const h = d(({ children: i, checked: e, defaultChecked: r, ...o }, c) => /* @__PURE__ */ t(
|
|
4
|
+
"input",
|
|
5
|
+
{
|
|
6
|
+
...o,
|
|
7
|
+
defaultChecked: e ?? r,
|
|
8
|
+
type: "checkbox",
|
|
9
|
+
ref: c
|
|
10
|
+
}
|
|
11
|
+
));
|
|
12
|
+
h.displayName = "Checkbox";
|
|
13
|
+
export {
|
|
14
|
+
h as Checkbox
|
|
15
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { CheckboxCheckedIcon as e } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as t } from "@webstudio-is/react-sdk";
|
|
3
|
+
import { checkbox as o } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as r } from "./__generated__/checkbox.props.js";
|
|
5
|
+
const a = {
|
|
6
|
+
input: [
|
|
7
|
+
...o,
|
|
8
|
+
{
|
|
9
|
+
property: "marginRight",
|
|
10
|
+
value: { type: "unit", unit: "em", value: 0.5 }
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}, s = {
|
|
14
|
+
category: "forms",
|
|
15
|
+
constraints: {
|
|
16
|
+
relation: "ancestor",
|
|
17
|
+
component: { $nin: ["Button", "Link"] }
|
|
18
|
+
},
|
|
19
|
+
type: "control",
|
|
20
|
+
description: "Use within a form to allow your users to toggle between checked and not checked. Group checkboxes by matching their “Name” properties. Unlike radios, any number of checkboxes in a group can be checked.",
|
|
21
|
+
icon: e,
|
|
22
|
+
presetStyle: a,
|
|
23
|
+
order: 6,
|
|
24
|
+
states: [
|
|
25
|
+
...t,
|
|
26
|
+
{ selector: ":checked", label: "Checked" },
|
|
27
|
+
{ selector: ":required", label: "Required" },
|
|
28
|
+
{ selector: ":optional", label: "Optional" },
|
|
29
|
+
{ selector: ":disabled", label: "Disabled" },
|
|
30
|
+
{ selector: ":enabled", label: "Enabled" },
|
|
31
|
+
{ selector: ":read-only", label: "Read Only" },
|
|
32
|
+
{ selector: ":read-write", label: "Read Write" }
|
|
33
|
+
],
|
|
34
|
+
template: [
|
|
35
|
+
{
|
|
36
|
+
type: "instance",
|
|
37
|
+
component: "Label",
|
|
38
|
+
label: "Checkbox Field",
|
|
39
|
+
children: [
|
|
40
|
+
{ type: "instance", component: "Checkbox", children: [] },
|
|
41
|
+
{
|
|
42
|
+
type: "instance",
|
|
43
|
+
component: "Text",
|
|
44
|
+
label: "Checkbox Label",
|
|
45
|
+
props: [{ type: "string", name: "tag", value: "span" }],
|
|
46
|
+
children: [{ type: "text", value: "Checkbox", placeholder: !0 }]
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}, p = {
|
|
52
|
+
props: r,
|
|
53
|
+
initialProps: ["id", "className", "name", "value", "required", "checked"]
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
s as meta,
|
|
57
|
+
p as propsMeta
|
|
58
|
+
};
|
package/lib/code-text.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
const d = ({
|
|
4
|
+
innerRef: e,
|
|
5
|
+
...t
|
|
6
|
+
}) => /* @__PURE__ */ r("code", { ...t, style: { padding: 20 }, ref: e, children: 'Open the "Settings" panel to edit the code.' }), l = i(({ code: e, children: t, ...n }, o) => t === void 0 && e === void 0 || String(e).trim().length === 0 ? /* @__PURE__ */ r(d, { innerRef: o, ...n }) : /* @__PURE__ */ r("code", { ...n, ref: o, children: e ?? t }));
|
|
7
|
+
l.displayName = "CodeText";
|
|
8
|
+
export {
|
|
9
|
+
l as CodeText
|
|
10
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CodeTextIcon as e } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as t } from "@webstudio-is/react-sdk";
|
|
3
|
+
import { code as o } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as r } from "./__generated__/code-text.props.js";
|
|
5
|
+
const p = {
|
|
6
|
+
code: [
|
|
7
|
+
...o,
|
|
8
|
+
{
|
|
9
|
+
property: "display",
|
|
10
|
+
value: { type: "keyword", value: "block" }
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
property: "whiteSpaceCollapse",
|
|
14
|
+
value: { type: "keyword", value: "preserve" }
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
property: "textWrapMode",
|
|
18
|
+
value: { type: "keyword", value: "wrap" }
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
property: "paddingLeft",
|
|
22
|
+
value: { type: "unit", value: 0.2, unit: "em" }
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
property: "paddingRight",
|
|
26
|
+
value: { type: "unit", value: 0.2, unit: "em" }
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
property: "backgroundColor",
|
|
30
|
+
value: { type: "rgb", r: 238, g: 238, b: 238, alpha: 1 }
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}, d = {
|
|
34
|
+
category: "general",
|
|
35
|
+
type: "embed",
|
|
36
|
+
description: "Use this component when you want to display code as text on the page.",
|
|
37
|
+
icon: e,
|
|
38
|
+
constraints: {
|
|
39
|
+
relation: "ancestor",
|
|
40
|
+
component: { $neq: "CodeText" }
|
|
41
|
+
},
|
|
42
|
+
states: t,
|
|
43
|
+
presetStyle: p,
|
|
44
|
+
order: 9
|
|
45
|
+
}, s = {
|
|
46
|
+
props: {
|
|
47
|
+
...r,
|
|
48
|
+
code: {
|
|
49
|
+
required: !0,
|
|
50
|
+
control: "codetext",
|
|
51
|
+
type: "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
initialProps: ["id", "className", "lang", "code"]
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
d as meta,
|
|
58
|
+
s as propsMeta
|
|
59
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Slot as e } from "./slot.js";
|
|
2
|
+
import { Fragment as m } from "./fragment.js";
|
|
3
|
+
import { HtmlEmbed as x } from "./html-embed.js";
|
|
4
|
+
import { MarkdownEmbed as i } from "./markdown-embed.js";
|
|
5
|
+
import { Body as n } from "./body.js";
|
|
6
|
+
import { Box as d } from "./box.js";
|
|
7
|
+
import { Text as u } from "./text.js";
|
|
8
|
+
import { Heading as S } from "./heading.js";
|
|
9
|
+
import { Paragraph as b } from "./paragraph.js";
|
|
10
|
+
import { Link as k } from "./link.js";
|
|
11
|
+
import { RichTextLink as I } from "./rich-text-link.js";
|
|
12
|
+
import { Span as F } from "./span.js";
|
|
13
|
+
import { Bold as h } from "./bold.js";
|
|
14
|
+
import { Italic as R } from "./italic.js";
|
|
15
|
+
import { Superscript as y } from "./superscript.js";
|
|
16
|
+
import { Subscript as E } from "./subscript.js";
|
|
17
|
+
import { Button as X } from "./button.js";
|
|
18
|
+
import { Input as v } from "./input.js";
|
|
19
|
+
import { Form as N, Form as O } from "./form.js";
|
|
20
|
+
import { Image as z } from "./image.js";
|
|
21
|
+
import { Blockquote as D } from "./blockquote.js";
|
|
22
|
+
import { List as J } from "./list.js";
|
|
23
|
+
import { ListItem as Q } from "./list-item.js";
|
|
24
|
+
import { Separator as W } from "./separator.js";
|
|
25
|
+
import { CodeText as Z } from "./code-text.js";
|
|
26
|
+
import { Label as $ } from "./label.js";
|
|
27
|
+
import { Textarea as ro } from "./textarea.js";
|
|
28
|
+
import { RadioButton as to } from "./radio-button.js";
|
|
29
|
+
import { Checkbox as po } from "./checkbox.js";
|
|
30
|
+
import { Vimeo as fo } from "./vimeo.js";
|
|
31
|
+
import { VimeoPreviewImage as ao } from "./vimeo-preview-image.js";
|
|
32
|
+
import { VimeoPlayButton as lo } from "./vimeo-play-button.js";
|
|
33
|
+
import { VimeoSpinner as uo } from "./vimeo-spinner.js";
|
|
34
|
+
import { XmlNode as So } from "./xml-node.js";
|
|
35
|
+
import { XmlTime as bo } from "./xml-time.js";
|
|
36
|
+
import { Time as ko } from "./time.js";
|
|
37
|
+
import { Select as Io } from "./select.js";
|
|
38
|
+
import { Option as Fo } from "./option.js";
|
|
39
|
+
export {
|
|
40
|
+
D as Blockquote,
|
|
41
|
+
n as Body,
|
|
42
|
+
h as Bold,
|
|
43
|
+
d as Box,
|
|
44
|
+
X as Button,
|
|
45
|
+
po as Checkbox,
|
|
46
|
+
Z as CodeText,
|
|
47
|
+
N as Form,
|
|
48
|
+
m as Fragment,
|
|
49
|
+
S as Heading,
|
|
50
|
+
x as HtmlEmbed,
|
|
51
|
+
z as Image,
|
|
52
|
+
v as Input,
|
|
53
|
+
R as Italic,
|
|
54
|
+
$ as Label,
|
|
55
|
+
k as Link,
|
|
56
|
+
J as List,
|
|
57
|
+
Q as ListItem,
|
|
58
|
+
i as MarkdownEmbed,
|
|
59
|
+
Fo as Option,
|
|
60
|
+
b as Paragraph,
|
|
61
|
+
to as RadioButton,
|
|
62
|
+
O as RemixForm,
|
|
63
|
+
I as RichTextLink,
|
|
64
|
+
Io as Select,
|
|
65
|
+
W as Separator,
|
|
66
|
+
e as Slot,
|
|
67
|
+
F as Span,
|
|
68
|
+
E as Subscript,
|
|
69
|
+
y as Superscript,
|
|
70
|
+
u as Text,
|
|
71
|
+
ro as Textarea,
|
|
72
|
+
ko as Time,
|
|
73
|
+
fo as Vimeo,
|
|
74
|
+
lo as VimeoPlayButton,
|
|
75
|
+
ao as VimeoPreviewImage,
|
|
76
|
+
uo as VimeoSpinner,
|
|
77
|
+
So as XmlNode,
|
|
78
|
+
bo as XmlTime
|
|
79
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ContentEmbedIcon as n } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { imagePlaceholderDataUrl as l } from "@webstudio-is/image";
|
|
3
|
+
import { descendantComponent as a } from "@webstudio-is/react-sdk";
|
|
4
|
+
const i = `
|
|
5
|
+
<h1>Styling HTML with Content Embed</h1>
|
|
6
|
+
<p>Content Embed allows styling of HTML, which primarily comes from external data.</p>
|
|
7
|
+
<h2>How to Use Content Embed</h2>
|
|
8
|
+
<ul>
|
|
9
|
+
<li>Every element is shown in the Navigator.</li>
|
|
10
|
+
<li>Apply styles and Tokens to each element.</li>
|
|
11
|
+
<li>Adjustments to elements apply universally within this embed, ensuring consistency across your content.</li>
|
|
12
|
+
</ul>
|
|
13
|
+
<hr>
|
|
14
|
+
<h2>This sample text contains all the elements that can be styled.</h2>
|
|
15
|
+
<p>Any elements that were not used above are used below.</p>
|
|
16
|
+
<h3>Heading 3</h3>
|
|
17
|
+
<h4>Heading 4</h4>
|
|
18
|
+
<h5>Heading 5</h5>
|
|
19
|
+
<h6>Heading 6</h6>
|
|
20
|
+
<p><a href="#">Links</a> connect your content to relevant resources.</p>
|
|
21
|
+
<p><strong>Bold text</strong> makes your important points stand out.</p>
|
|
22
|
+
<p><em>Italic text</em> is great for emphasizing terms.</p>
|
|
23
|
+
<ol>
|
|
24
|
+
<li>First Step</li>
|
|
25
|
+
<li>Second Step</li>
|
|
26
|
+
</ol>
|
|
27
|
+
<img src="${l}">
|
|
28
|
+
<blockquote>Capture attention with a powerful quote.</blockquote>
|
|
29
|
+
<p>Using <code>console.log("Hello World");</code> will log to the console.</p>
|
|
30
|
+
`.trim(), e = (t, o) => ({
|
|
31
|
+
type: "instance",
|
|
32
|
+
component: a,
|
|
33
|
+
label: t,
|
|
34
|
+
props: [{ type: "string", name: "selector", value: ` ${o}` }],
|
|
35
|
+
children: []
|
|
36
|
+
}), p = {
|
|
37
|
+
category: "data",
|
|
38
|
+
type: "control",
|
|
39
|
+
description: "Content Embed allows styling of HTML, which can be provided via the Code property statically or loaded dynamically from any Resource, for example, from a CMS.",
|
|
40
|
+
icon: n,
|
|
41
|
+
order: 3,
|
|
42
|
+
template: [
|
|
43
|
+
{
|
|
44
|
+
type: "instance",
|
|
45
|
+
component: "HtmlEmbed",
|
|
46
|
+
label: "Content Embed",
|
|
47
|
+
props: [
|
|
48
|
+
{
|
|
49
|
+
name: "code",
|
|
50
|
+
type: "string",
|
|
51
|
+
value: i
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
children: [
|
|
55
|
+
e("Paragraph", "p"),
|
|
56
|
+
e("Heading 1", "h1"),
|
|
57
|
+
e("Heading 2", "h2"),
|
|
58
|
+
e("Heading 3", "h3"),
|
|
59
|
+
e("Heading 4", "h4"),
|
|
60
|
+
e("Heading 5", "h5"),
|
|
61
|
+
e("Heading 6", "h6"),
|
|
62
|
+
e("Bold", ":where(strong, b)"),
|
|
63
|
+
e("Italic", ":where(em, i)"),
|
|
64
|
+
e("Link", "a"),
|
|
65
|
+
e("Image", "img"),
|
|
66
|
+
e("Blockquote", "blockquote"),
|
|
67
|
+
e("Code Text", "code"),
|
|
68
|
+
e("List", ":where(ul, ol)"),
|
|
69
|
+
e("List Item", "li"),
|
|
70
|
+
e("Separator", "hr")
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
p as meta
|
|
77
|
+
};
|
package/lib/form.js
ADDED
package/lib/form.ws.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FormIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as o } from "@webstudio-is/react-sdk";
|
|
3
|
+
import { form as r } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as e } from "./__generated__/form.props.js";
|
|
5
|
+
const n = {
|
|
6
|
+
form: [
|
|
7
|
+
...r,
|
|
8
|
+
{ property: "minHeight", value: { type: "unit", unit: "px", value: 20 } }
|
|
9
|
+
]
|
|
10
|
+
}, p = {
|
|
11
|
+
category: "forms",
|
|
12
|
+
type: "container",
|
|
13
|
+
label: "Form",
|
|
14
|
+
constraints: {
|
|
15
|
+
relation: "ancestor",
|
|
16
|
+
component: { $nin: ["Form", "Button", "Link"] }
|
|
17
|
+
},
|
|
18
|
+
description: "Create filters, surveys, searches and more.",
|
|
19
|
+
icon: t,
|
|
20
|
+
states: o,
|
|
21
|
+
presetStyle: n,
|
|
22
|
+
order: 0
|
|
23
|
+
}, c = {
|
|
24
|
+
props: e,
|
|
25
|
+
initialProps: ["id", "className", "action"]
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
p as meta,
|
|
29
|
+
c as propsMeta
|
|
30
|
+
};
|
package/lib/fragment.js
ADDED
package/lib/heading.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
const d = "h1", f = n(
|
|
4
|
+
({ tag: a = d, children: o, ...r }, t) => /* @__PURE__ */ e(a, { ...r, ref: t, children: o })
|
|
5
|
+
);
|
|
6
|
+
f.displayName = "Heading";
|
|
7
|
+
export {
|
|
8
|
+
f as Heading
|
|
9
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { HeadingIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as e } from "@webstudio-is/react-sdk";
|
|
3
|
+
import { h1 as n, h2 as o, h3 as a, h4 as r, h5 as i, h6 as s } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as p } from "./__generated__/heading.props.js";
|
|
5
|
+
const c = {
|
|
6
|
+
h1: n,
|
|
7
|
+
h2: o,
|
|
8
|
+
h3: a,
|
|
9
|
+
h4: r,
|
|
10
|
+
h5: i,
|
|
11
|
+
h6: s
|
|
12
|
+
}, l = {
|
|
13
|
+
category: "text",
|
|
14
|
+
type: "container",
|
|
15
|
+
description: "Use HTML headings to structure and organize content. Use the Tag property in settings to change the heading level (h1-h6).",
|
|
16
|
+
icon: t,
|
|
17
|
+
constraints: {
|
|
18
|
+
relation: "ancestor",
|
|
19
|
+
component: { $neq: "Heading" }
|
|
20
|
+
},
|
|
21
|
+
states: e,
|
|
22
|
+
presetStyle: c,
|
|
23
|
+
order: 1,
|
|
24
|
+
template: [
|
|
25
|
+
{
|
|
26
|
+
type: "instance",
|
|
27
|
+
component: "Heading",
|
|
28
|
+
children: [
|
|
29
|
+
{
|
|
30
|
+
type: "text",
|
|
31
|
+
value: "Heading text you can edit",
|
|
32
|
+
placeholder: !0
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}, y = {
|
|
38
|
+
props: p,
|
|
39
|
+
initialProps: ["id", "className", "tag"]
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
l as meta,
|
|
43
|
+
y as propsMeta
|
|
44
|
+
};
|