@builder.io/sdk-solid 0.0.6 → 0.0.9
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/package.json +59 -2
- package/src/blocks/button/button.jsx +13 -0
- package/src/blocks/button/button.lite.tsx +20 -0
- package/src/blocks/button/component-info.js +41 -0
- package/src/blocks/button/index.js +7 -0
- package/src/blocks/columns/columns.jsx +91 -0
- package/src/blocks/{columns.lite.tsx → columns/columns.lite.tsx} +4 -3
- package/src/blocks/columns/component-info.js +217 -0
- package/src/blocks/columns/index.js +7 -0
- package/src/blocks/custom-code/component-info.js +31 -0
- package/src/blocks/{custom-code.jsx → custom-code/custom-code.jsx} +1 -2
- package/src/blocks/{custom-code.lite.tsx → custom-code/custom-code.lite.tsx} +0 -0
- package/src/blocks/custom-code/index.js +7 -0
- package/src/blocks/embed/component-info.js +24 -0
- package/src/blocks/{embed.jsx → embed/embed.jsx} +1 -2
- package/src/blocks/{embed.lite.tsx → embed/embed.lite.tsx} +0 -0
- package/src/blocks/embed/index.js +7 -0
- package/src/blocks/form/component-info.js +262 -0
- package/src/blocks/{form.jsx → form/form.jsx} +8 -8
- package/src/blocks/{form.lite.tsx → form/form.lite.tsx} +7 -6
- package/src/blocks/form/index.js +7 -0
- package/src/blocks/fragment/component-info.js +11 -0
- package/src/blocks/fragment/fragment.jsx +5 -0
- package/src/blocks/{fragment.lite.tsx → fragment/fragment.lite.tsx} +0 -0
- package/src/blocks/fragment/index.js +7 -0
- package/src/blocks/image/component-info.js +104 -0
- package/src/blocks/image/image.jsx +54 -0
- package/src/blocks/image/image.lite.tsx +83 -0
- package/src/blocks/image/index.js +7 -0
- package/src/blocks/img/component-info.js +20 -0
- package/src/blocks/img/img.jsx +10 -0
- package/src/blocks/{img.lite.tsx → img/img.lite.tsx} +1 -1
- package/src/blocks/img/index.js +7 -0
- package/src/blocks/input/component-info.js +74 -0
- package/src/blocks/input/index.js +7 -0
- package/src/blocks/input/input.jsx +7 -0
- package/src/blocks/{input.lite.tsx → input/input.lite.tsx} +1 -1
- package/src/blocks/raw-text/component-info.js +16 -0
- package/src/blocks/raw-text/index.js +7 -0
- package/src/blocks/raw-text/raw-text.jsx +5 -0
- package/src/blocks/{raw-text.lite.tsx → raw-text/raw-text.lite.tsx} +0 -0
- package/src/blocks/section/component-info.js +49 -0
- package/src/blocks/section/index.js +7 -0
- package/src/blocks/section/section.jsx +9 -0
- package/src/blocks/{section.lite.tsx → section/section.lite.tsx} +0 -0
- package/src/blocks/select/component-info.js +59 -0
- package/src/blocks/select/index.js +7 -0
- package/src/blocks/select/select.jsx +16 -0
- package/src/blocks/{select.lite.tsx → select/select.lite.tsx} +1 -1
- package/src/blocks/submit-button/component-info.js +28 -0
- package/src/blocks/submit-button/index.js +7 -0
- package/src/blocks/submit-button/submit-button.jsx +7 -0
- package/src/blocks/{submit-button.lite.tsx → submit-button/submit-button.lite.tsx} +0 -0
- package/src/blocks/symbol/component-info.js +42 -0
- package/src/blocks/symbol/index.js +7 -0
- package/src/blocks/symbol/symbol.jsx +24 -0
- package/src/blocks/{symbol.lite.tsx → symbol/symbol.lite.tsx} +3 -3
- package/src/blocks/text/component-info.js +24 -0
- package/src/blocks/text/index.js +7 -0
- package/src/blocks/text/text.jsx +5 -0
- package/src/blocks/{text.lite.tsx → text/text.lite.tsx} +0 -0
- package/src/blocks/textarea/component-info.js +47 -0
- package/src/blocks/textarea/index.js +7 -0
- package/src/blocks/textarea/textarea.jsx +5 -0
- package/src/blocks/{textarea.lite.tsx → textarea/textarea.lite.tsx} +0 -0
- package/src/blocks/video/component-info.js +106 -0
- package/src/blocks/video/index.js +7 -0
- package/src/blocks/video/video.jsx +14 -0
- package/src/blocks/{video.lite.tsx → video/video.lite.tsx} +0 -0
- package/src/components/render-block/block-styles.jsx +36 -0
- package/src/components/render-block/block-styles.lite.tsx +38 -0
- package/src/components/{render-block.jsx → render-block/render-block.jsx} +13 -10
- package/src/components/{render-block.lite.tsx → render-block/render-block.lite.tsx} +13 -10
- package/src/components/render-blocks.jsx +1 -1
- package/src/components/render-blocks.lite.tsx +1 -1
- package/src/components/render-content/components/render-styles.jsx +6 -5
- package/src/components/render-content/components/render-styles.lite.tsx +9 -5
- package/src/components/render-content/render-content.jsx +16 -15
- package/src/components/render-content/render-content.lite.tsx +19 -18
- package/src/functions/get-builder-search-params/fn.test.js +1 -1
- package/src/functions/get-content/index.js +2 -1
- package/src/functions/get-fetch.js +28 -6
- package/src/index.js +2 -5
- package/src/scripts/init-editing.js +69 -60
- package/src/blocks/button.jsx +0 -8
- package/src/blocks/button.lite.tsx +0 -14
- package/src/blocks/columns.jsx +0 -91
- package/src/blocks/fragment.jsx +0 -6
- package/src/blocks/image.jsx +0 -120
- package/src/blocks/image.lite.tsx +0 -171
- package/src/blocks/img.jsx +0 -11
- package/src/blocks/input.jsx +0 -8
- package/src/blocks/raw-text.jsx +0 -6
- package/src/blocks/section.jsx +0 -10
- package/src/blocks/select.jsx +0 -17
- package/src/blocks/submit-button.jsx +0 -8
- package/src/blocks/symbol.jsx +0 -25
- package/src/blocks/text.jsx +0 -6
- package/src/blocks/textarea.jsx +0 -6
- package/src/blocks/video.jsx +0 -15
- package/src/components/block-styles.jsx +0 -5
- package/src/components/block-styles.lite.tsx +0 -5
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isEditing } from "../../functions/is-editing";
|
|
2
|
+
|
|
3
|
+
function ImgComponent(props) {
|
|
4
|
+
return <img {...props.attributes} style={{
|
|
5
|
+
"object-fit": props.backgroundSize || "cover",
|
|
6
|
+
"object-position": props.backgroundPosition || "center"
|
|
7
|
+
}} key={isEditing() && props.imgSrc || "default-key"} alt={props.altText} src={props.imgSrc} />;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default ImgComponent;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
const componentInfo = {
|
|
2
|
+
name: "Form:Input",
|
|
3
|
+
builtIn: true,
|
|
4
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
5
|
+
inputs: [
|
|
6
|
+
{
|
|
7
|
+
name: "type",
|
|
8
|
+
type: "text",
|
|
9
|
+
enum: [
|
|
10
|
+
"text",
|
|
11
|
+
"number",
|
|
12
|
+
"email",
|
|
13
|
+
"url",
|
|
14
|
+
"checkbox",
|
|
15
|
+
"radio",
|
|
16
|
+
"range",
|
|
17
|
+
"date",
|
|
18
|
+
"datetime-local",
|
|
19
|
+
"search",
|
|
20
|
+
"tel",
|
|
21
|
+
"time",
|
|
22
|
+
"file",
|
|
23
|
+
"month",
|
|
24
|
+
"week",
|
|
25
|
+
"password",
|
|
26
|
+
"color",
|
|
27
|
+
"hidden"
|
|
28
|
+
],
|
|
29
|
+
defaultValue: "text"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "name",
|
|
33
|
+
type: "string",
|
|
34
|
+
required: true,
|
|
35
|
+
helperText: 'Every input in a form needs a unique name describing what it takes, e.g. "email"'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "placeholder",
|
|
39
|
+
type: "string",
|
|
40
|
+
defaultValue: "Hello there",
|
|
41
|
+
helperText: "Text to display when there is no value"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "defaultValue",
|
|
45
|
+
type: "string"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "value",
|
|
49
|
+
type: "string",
|
|
50
|
+
advanced: true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "required",
|
|
54
|
+
type: "boolean",
|
|
55
|
+
helperText: "Is this input required to be filled out to submit a form",
|
|
56
|
+
defaultValue: false
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
noWrap: true,
|
|
60
|
+
static: true,
|
|
61
|
+
defaultStyles: {
|
|
62
|
+
paddingTop: "10px",
|
|
63
|
+
paddingBottom: "10px",
|
|
64
|
+
paddingLeft: "10px",
|
|
65
|
+
paddingRight: "10px",
|
|
66
|
+
borderRadius: "3px",
|
|
67
|
+
borderWidth: "1px",
|
|
68
|
+
borderStyle: "solid",
|
|
69
|
+
borderColor: "#ccc"
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
componentInfo
|
|
74
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { registerComponent } from "../../functions/register-component";
|
|
2
|
+
import { componentInfo } from "./component-info";
|
|
3
|
+
import component from "./input";
|
|
4
|
+
var stdin_default = registerComponent(component, componentInfo);
|
|
5
|
+
export {
|
|
6
|
+
stdin_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { isEditing } from "../../functions/is-editing";
|
|
2
|
+
|
|
3
|
+
function FormInputComponent(props) {
|
|
4
|
+
return <input {...props.attributes} key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"} placeholder={props.placeholder} type={props.type} name={props.name} value={props.value} defaultValue={props.defaultValue} required={props.required} />;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default FormInputComponent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { registerComponent } from "../../functions/register-component";
|
|
2
|
+
import { componentInfo } from "./component-info";
|
|
3
|
+
import component from "./raw-text";
|
|
4
|
+
var stdin_default = registerComponent(component, componentInfo);
|
|
5
|
+
export {
|
|
6
|
+
stdin_default as default
|
|
7
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const componentInfo = {
|
|
2
|
+
name: "Core:Section",
|
|
3
|
+
static: true,
|
|
4
|
+
builtIn: true,
|
|
5
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
6
|
+
inputs: [
|
|
7
|
+
{
|
|
8
|
+
name: "maxWidth",
|
|
9
|
+
type: "number",
|
|
10
|
+
defaultValue: 1200
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: "lazyLoad",
|
|
14
|
+
type: "boolean",
|
|
15
|
+
defaultValue: false,
|
|
16
|
+
advanced: true,
|
|
17
|
+
description: "Only render this section when in view"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
defaultStyles: {
|
|
21
|
+
paddingLeft: "20px",
|
|
22
|
+
paddingRight: "20px",
|
|
23
|
+
paddingTop: "50px",
|
|
24
|
+
paddingBottom: "50px",
|
|
25
|
+
marginTop: "0px",
|
|
26
|
+
width: "100vw",
|
|
27
|
+
marginLeft: "calc(50% - 50vw)"
|
|
28
|
+
},
|
|
29
|
+
canHaveChildren: true,
|
|
30
|
+
defaultChildren: [
|
|
31
|
+
{
|
|
32
|
+
"@type": "@builder.io/sdk:Element",
|
|
33
|
+
responsiveStyles: {
|
|
34
|
+
large: {
|
|
35
|
+
textAlign: "center"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
component: {
|
|
39
|
+
name: "Text",
|
|
40
|
+
options: {
|
|
41
|
+
text: "<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
componentInfo
|
|
49
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { registerComponent } from "../../functions/register-component";
|
|
2
|
+
import { componentInfo } from "./component-info";
|
|
3
|
+
import component from "./section";
|
|
4
|
+
var stdin_default = registerComponent(component, componentInfo);
|
|
5
|
+
export {
|
|
6
|
+
stdin_default as default
|
|
7
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const componentInfo = {
|
|
2
|
+
name: "Form:Select",
|
|
3
|
+
builtIn: true,
|
|
4
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
5
|
+
defaultStyles: {
|
|
6
|
+
alignSelf: "flex-start"
|
|
7
|
+
},
|
|
8
|
+
inputs: [
|
|
9
|
+
{
|
|
10
|
+
name: "options",
|
|
11
|
+
type: "list",
|
|
12
|
+
required: true,
|
|
13
|
+
subFields: [
|
|
14
|
+
{
|
|
15
|
+
name: "value",
|
|
16
|
+
type: "text",
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "name",
|
|
21
|
+
type: "text"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
defaultValue: [
|
|
25
|
+
{
|
|
26
|
+
value: "option 1"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: "option 2"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "name",
|
|
35
|
+
type: "string",
|
|
36
|
+
required: true,
|
|
37
|
+
helperText: 'Every select in a form needs a unique name describing what it gets, e.g. "email"'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "defaultValue",
|
|
41
|
+
type: "string"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "value",
|
|
45
|
+
type: "string",
|
|
46
|
+
advanced: true
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "required",
|
|
50
|
+
type: "boolean",
|
|
51
|
+
defaultValue: false
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
static: true,
|
|
55
|
+
noWrap: true
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
componentInfo
|
|
59
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { registerComponent } from "../../functions/register-component";
|
|
2
|
+
import { componentInfo } from "./component-info";
|
|
3
|
+
import component from "./select";
|
|
4
|
+
var stdin_default = registerComponent(component, componentInfo);
|
|
5
|
+
export {
|
|
6
|
+
stdin_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { For } from "solid-js";
|
|
2
|
+
import { isEditing } from "../../functions/is-editing";
|
|
3
|
+
|
|
4
|
+
function SelectComponent(props) {
|
|
5
|
+
return <select {...props.attributes} value={props.value} key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"} defaultValue={props.defaultValue} name={props.name}>
|
|
6
|
+
<For each={props.options}>
|
|
7
|
+
{(option, _index) => {
|
|
8
|
+
const index = _index();
|
|
9
|
+
|
|
10
|
+
return <option value={option.value}>{option.name || option.value}</option>;
|
|
11
|
+
}}
|
|
12
|
+
</For>
|
|
13
|
+
</select>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default SelectComponent;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const componentInfo = {
|
|
2
|
+
name: "Form:SubmitButton",
|
|
3
|
+
builtIn: true,
|
|
4
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
5
|
+
defaultStyles: {
|
|
6
|
+
appearance: "none",
|
|
7
|
+
paddingTop: "15px",
|
|
8
|
+
paddingBottom: "15px",
|
|
9
|
+
paddingLeft: "25px",
|
|
10
|
+
paddingRight: "25px",
|
|
11
|
+
backgroundColor: "#3898EC",
|
|
12
|
+
color: "white",
|
|
13
|
+
borderRadius: "4px",
|
|
14
|
+
cursor: "pointer"
|
|
15
|
+
},
|
|
16
|
+
inputs: [
|
|
17
|
+
{
|
|
18
|
+
name: "text",
|
|
19
|
+
type: "text",
|
|
20
|
+
defaultValue: "Click me"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
static: true,
|
|
24
|
+
noWrap: true
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
componentInfo
|
|
28
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { registerComponent } from "../../functions/register-component";
|
|
2
|
+
import { componentInfo } from "./component-info";
|
|
3
|
+
import component from "./submit-button";
|
|
4
|
+
var stdin_default = registerComponent(component, componentInfo);
|
|
5
|
+
export {
|
|
6
|
+
stdin_default as default
|
|
7
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const componentInfo = {
|
|
2
|
+
name: "Symbol",
|
|
3
|
+
noWrap: true,
|
|
4
|
+
static: true,
|
|
5
|
+
inputs: [
|
|
6
|
+
{
|
|
7
|
+
name: "symbol",
|
|
8
|
+
type: "uiSymbol"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: "dataOnly",
|
|
12
|
+
helperText: "Make this a data symbol that doesn't display any UI",
|
|
13
|
+
type: "boolean",
|
|
14
|
+
defaultValue: false,
|
|
15
|
+
advanced: true,
|
|
16
|
+
hideFromUI: true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "inheritState",
|
|
20
|
+
helperText: "Inherit the parent component state and data",
|
|
21
|
+
type: "boolean",
|
|
22
|
+
defaultValue: false,
|
|
23
|
+
advanced: true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "renderToLiquid",
|
|
27
|
+
helperText: "Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",
|
|
28
|
+
type: "boolean",
|
|
29
|
+
defaultValue: false,
|
|
30
|
+
advanced: true,
|
|
31
|
+
hideFromUI: true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "useChildren",
|
|
35
|
+
hideFromUI: true,
|
|
36
|
+
type: "boolean"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
componentInfo
|
|
42
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { registerComponent } from "../../functions/register-component";
|
|
2
|
+
import { componentInfo } from "./component-info";
|
|
3
|
+
import component from "./symbol";
|
|
4
|
+
var stdin_default = registerComponent(component, componentInfo);
|
|
5
|
+
export {
|
|
6
|
+
stdin_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createMutable } from "solid-js/store";
|
|
2
|
+
import RenderContent from "../../components/render-content/render-content";
|
|
3
|
+
import BuilderContext from "../../context/builder.context";
|
|
4
|
+
|
|
5
|
+
function Symbol(props) {
|
|
6
|
+
const state = createMutable({
|
|
7
|
+
className: "builder-symbol",
|
|
8
|
+
content: null
|
|
9
|
+
});
|
|
10
|
+
const builderContext = useContext(BuilderContext);
|
|
11
|
+
onMount(() => {
|
|
12
|
+
state.content = props.symbol?.content;
|
|
13
|
+
});
|
|
14
|
+
return <div class={state.className} {...props.attributes} dataSet={{
|
|
15
|
+
class: state.className
|
|
16
|
+
}}>
|
|
17
|
+
<RenderContent apiKey={builderContext.apiKey} context={builderContext.context} data={{ ...props.symbol?.data,
|
|
18
|
+
...builderContext.state,
|
|
19
|
+
...props.symbol?.state.content?.data?.state
|
|
20
|
+
}} model={props.symbol?.model} content={state.content}></RenderContent>
|
|
21
|
+
</div>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default Symbol;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createMutable } from "solid-js/store";
|
|
2
2
|
|
|
3
|
-
import RenderContent from "
|
|
4
|
-
import BuilderContext from "
|
|
5
|
-
import { getContent } from "
|
|
3
|
+
import RenderContent from "../../components/render-content/render-content.lite";
|
|
4
|
+
import BuilderContext from "../../context/builder.context";
|
|
5
|
+
import { getContent } from "../../functions/get-content";
|
|
6
6
|
|
|
7
7
|
function Symbol(props) {
|
|
8
8
|
const state = createMutable({ className: "builder-symbol", content: null });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const componentInfo = {
|
|
2
|
+
name: "Text",
|
|
3
|
+
static: true,
|
|
4
|
+
builtIn: true,
|
|
5
|
+
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
|
|
6
|
+
inputs: [
|
|
7
|
+
{
|
|
8
|
+
name: "text",
|
|
9
|
+
type: "html",
|
|
10
|
+
required: true,
|
|
11
|
+
autoFocus: true,
|
|
12
|
+
bubble: true,
|
|
13
|
+
defaultValue: "Enter some text..."
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
defaultStyles: {
|
|
17
|
+
lineHeight: "normal",
|
|
18
|
+
height: "auto",
|
|
19
|
+
textAlign: "center"
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
componentInfo
|
|
24
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const componentInfo = {
|
|
2
|
+
name: "Form:TextArea",
|
|
3
|
+
builtIn: true,
|
|
4
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
5
|
+
inputs: [
|
|
6
|
+
{
|
|
7
|
+
advanced: true,
|
|
8
|
+
name: "value",
|
|
9
|
+
type: "string"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: "name",
|
|
13
|
+
type: "string",
|
|
14
|
+
required: true,
|
|
15
|
+
helperText: 'Every input in a form needs a unique name describing what it gets, e.g. "email"'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "defaultValue",
|
|
19
|
+
type: "string"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "placeholder",
|
|
23
|
+
type: "string",
|
|
24
|
+
defaultValue: "Hello there"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "required",
|
|
28
|
+
type: "boolean",
|
|
29
|
+
defaultValue: false
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
defaultStyles: {
|
|
33
|
+
paddingTop: "10px",
|
|
34
|
+
paddingBottom: "10px",
|
|
35
|
+
paddingLeft: "10px",
|
|
36
|
+
paddingRight: "10px",
|
|
37
|
+
borderRadius: "3px",
|
|
38
|
+
borderWidth: "1px",
|
|
39
|
+
borderStyle: "solid",
|
|
40
|
+
borderColor: "#ccc"
|
|
41
|
+
},
|
|
42
|
+
static: true,
|
|
43
|
+
noWrap: true
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
componentInfo
|
|
47
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { registerComponent } from "../../functions/register-component";
|
|
2
|
+
import { componentInfo } from "./component-info";
|
|
3
|
+
import component from "./textarea";
|
|
4
|
+
var stdin_default = registerComponent(component, componentInfo);
|
|
5
|
+
export {
|
|
6
|
+
stdin_default as default
|
|
7
|
+
};
|
|
File without changes
|