@webstudio-is/sdk-components-react 0.72.0 → 0.74.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.
Files changed (130) hide show
  1. package/lib/__generated__/button.props.js +0 -6
  2. package/lib/__generated__/image.props.js +0 -1
  3. package/lib/__generated__/vimeo-play-button.props.js +1 -2
  4. package/lib/__generated__/vimeo-preview-image.props.js +0 -1
  5. package/lib/blockquote.ws.js +1 -1
  6. package/lib/button.js +1 -6
  7. package/lib/button.ws.js +9 -2
  8. package/lib/checkbox.ws.js +19 -1
  9. package/lib/cjs/__generated__/button.props.js +0 -6
  10. package/lib/cjs/__generated__/image.props.js +0 -1
  11. package/lib/cjs/__generated__/{text-block.props.js → text.props.js} +3 -3
  12. package/lib/cjs/__generated__/vimeo-play-button.props.js +1 -2
  13. package/lib/cjs/__generated__/vimeo-preview-image.props.js +0 -1
  14. package/lib/cjs/blockquote.ws.js +1 -1
  15. package/lib/cjs/button.js +1 -6
  16. package/lib/cjs/button.ws.js +9 -2
  17. package/lib/cjs/checkbox.ws.js +19 -1
  18. package/lib/cjs/code-text.ws.js +1 -1
  19. package/lib/cjs/components.js +2 -8
  20. package/lib/cjs/heading.ws.js +1 -1
  21. package/lib/cjs/image.js +3 -3
  22. package/lib/cjs/image.ws.js +1 -2
  23. package/lib/cjs/label.ws.js +3 -6
  24. package/lib/cjs/link.js +1 -1
  25. package/lib/cjs/link.ws.js +2 -2
  26. package/lib/cjs/list-item.ws.js +1 -1
  27. package/lib/cjs/metas.js +2 -8
  28. package/lib/cjs/paragraph.ws.js +2 -2
  29. package/lib/cjs/props.js +2 -8
  30. package/lib/cjs/radio-button.ws.js +19 -1
  31. package/lib/cjs/span.ws.js +1 -1
  32. package/lib/cjs/{text-block.js → text.js} +6 -6
  33. package/lib/cjs/{text-block.ws.js → text.ws.js} +10 -10
  34. package/lib/cjs/vimeo.ws.js +6 -1
  35. package/lib/code-text.ws.js +1 -1
  36. package/lib/components.js +2 -8
  37. package/lib/heading.ws.js +1 -1
  38. package/lib/image.js +6 -5
  39. package/lib/image.ws.js +1 -2
  40. package/lib/label.ws.js +4 -7
  41. package/lib/link.js +3 -3
  42. package/lib/link.ws.js +2 -2
  43. package/lib/list-item.ws.js +1 -1
  44. package/lib/metas.js +52 -58
  45. package/lib/paragraph.ws.js +2 -2
  46. package/lib/props.js +52 -58
  47. package/lib/radio-button.ws.js +19 -1
  48. package/lib/span.ws.js +1 -1
  49. package/lib/{text-block.js → text.js} +3 -3
  50. package/lib/{text-block.ws.js → text.ws.js} +7 -7
  51. package/lib/types/button.d.ts +2 -6
  52. package/lib/types/button.stories.d.ts +2 -6
  53. package/lib/types/components.d.ts +1 -4
  54. package/lib/types/image.d.ts +5 -6
  55. package/lib/types/image.stories.d.ts +555 -6
  56. package/lib/types/metas.d.ts +1 -4
  57. package/lib/types/props.d.ts +1 -4
  58. package/lib/types/{text-block.d.ts → text.d.ts} +1 -1
  59. package/lib/types/{text-block.stories.d.ts → text.stories.d.ts} +1 -1
  60. package/lib/types/vimeo-play-button.d.ts +1 -3
  61. package/lib/types/vimeo-play-button.stories.d.ts +2 -6
  62. package/lib/types/vimeo-preview-image.d.ts +278 -3
  63. package/lib/types/vimeo-preview-image.stories.d.ts +555 -6
  64. package/lib/vimeo.ws.js +6 -1
  65. package/package.json +7 -7
  66. package/src/__generated__/button.props.ts +0 -6
  67. package/src/__generated__/image.props.ts +0 -1
  68. package/src/__generated__/vimeo-play-button.props.ts +0 -1
  69. package/src/__generated__/vimeo-preview-image.props.ts +0 -1
  70. package/src/blockquote.ws.tsx +1 -1
  71. package/src/button.tsx +3 -11
  72. package/src/button.ws.tsx +8 -1
  73. package/src/checkbox.ws.tsx +19 -1
  74. package/src/code-text.ws.tsx +1 -1
  75. package/src/components.ts +1 -4
  76. package/src/heading.ws.tsx +1 -1
  77. package/src/image.tsx +6 -5
  78. package/src/image.ws.tsx +1 -4
  79. package/src/label.ws.tsx +4 -7
  80. package/src/link.tsx +3 -4
  81. package/src/link.ws.tsx +2 -2
  82. package/src/list-item.ws.tsx +1 -1
  83. package/src/metas.ts +1 -4
  84. package/src/paragraph.ws.tsx +2 -2
  85. package/src/props.ts +1 -4
  86. package/src/radio-button.ws.tsx +19 -1
  87. package/src/span.ws.tsx +1 -1
  88. package/src/text.stories.tsx +16 -0
  89. package/src/{text-block.tsx → text.tsx} +2 -2
  90. package/src/{text-block.ws.tsx → text.ws.tsx} +8 -8
  91. package/src/vimeo.ws.ts +6 -1
  92. package/lib/__generated__/checkbox-field.props.js +0 -399
  93. package/lib/__generated__/radio-button-field.props.js +0 -399
  94. package/lib/checkbox-field.js +0 -9
  95. package/lib/checkbox-field.ws.js +0 -44
  96. package/lib/cjs/__generated__/checkbox-field.props.js +0 -419
  97. package/lib/cjs/__generated__/radio-button-field.props.js +0 -419
  98. package/lib/cjs/checkbox-field.js +0 -29
  99. package/lib/cjs/checkbox-field.ws.js +0 -62
  100. package/lib/cjs/link-block.js +0 -30
  101. package/lib/cjs/link-block.ws.js +0 -46
  102. package/lib/cjs/radio-button-field.js +0 -29
  103. package/lib/cjs/radio-button-field.ws.js +0 -62
  104. package/lib/link-block.js +0 -10
  105. package/lib/link-block.ws.js +0 -26
  106. package/lib/radio-button-field.js +0 -9
  107. package/lib/radio-button-field.ws.js +0 -44
  108. package/lib/types/__generated__/radio-button-field.props.d.ts +0 -2
  109. package/lib/types/__generated__/text-block.props.d.ts +0 -2
  110. package/lib/types/checkbox-field.d.ts +0 -3
  111. package/lib/types/link-block.d.ts +0 -3
  112. package/lib/types/link-block.stories.d.ts +0 -9
  113. package/lib/types/link-block.ws.d.ts +0 -3
  114. package/lib/types/radio-button-field.d.ts +0 -3
  115. package/lib/types/radio-button-field.ws.d.ts +0 -3
  116. package/lib/types/text-block.ws.d.ts +0 -3
  117. package/src/__generated__/checkbox-field.props.ts +0 -444
  118. package/src/__generated__/radio-button-field.props.ts +0 -444
  119. package/src/checkbox-field.tsx +0 -10
  120. package/src/checkbox-field.ws.tsx +0 -47
  121. package/src/link-block.stories.tsx +0 -16
  122. package/src/link-block.tsx +0 -9
  123. package/src/link-block.ws.tsx +0 -31
  124. package/src/radio-button-field.tsx +0 -10
  125. package/src/radio-button-field.ws.tsx +0 -47
  126. package/src/text-block.stories.tsx +0 -16
  127. /package/lib/__generated__/{text-block.props.js → text.props.js} +0 -0
  128. /package/lib/types/__generated__/{checkbox-field.props.d.ts → text.props.d.ts} +0 -0
  129. /package/lib/types/{checkbox-field.ws.d.ts → text.ws.d.ts} +0 -0
  130. /package/src/__generated__/{text-block.props.ts → text.props.ts} +0 -0
@@ -407,12 +407,6 @@ const props = {
407
407
  required: false,
408
408
  control: "text",
409
409
  type: "string"
410
- },
411
- innerText: {
412
- required: false,
413
- control: "text",
414
- type: "string",
415
- defaultValue: "Edit Inner Text in Properties"
416
410
  }
417
411
  };
418
412
  export {
@@ -434,7 +434,6 @@ const props = {
434
434
  type: "string"
435
435
  },
436
436
  quality: { required: false, control: "number", type: "number" },
437
- loader: { required: true, control: "text", type: "string" },
438
437
  optimize: { required: false, control: "boolean", type: "boolean" }
439
438
  };
440
439
  export {
@@ -406,8 +406,7 @@ const props = {
406
406
  required: false,
407
407
  control: "text",
408
408
  type: "string"
409
- },
410
- innerText: { required: false, control: "text", type: "string" }
409
+ }
411
410
  };
412
411
  export {
413
412
  props
@@ -434,7 +434,6 @@ const props = {
434
434
  type: "string"
435
435
  },
436
436
  quality: { required: false, control: "number", type: "number" },
437
- loader: { required: true, control: "text", type: "string" },
438
437
  optimize: { required: false, control: "boolean", type: "boolean" }
439
438
  };
440
439
  export {
@@ -53,7 +53,7 @@ const presetStyle = {
53
53
  };
54
54
  const meta = {
55
55
  category: "text",
56
- type: "rich-text",
56
+ type: "container",
57
57
  label: "Blockquote",
58
58
  icon: BlockquoteIcon,
59
59
  states: defaultStates,
package/lib/button.js CHANGED
@@ -2,12 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  const defaultTag = "button";
4
4
  const Button = forwardRef(
5
- ({
6
- type = "submit",
7
- innerText = "Edit Inner Text in Properties",
8
- children,
9
- ...props
10
- }, ref) => /* @__PURE__ */ jsx("button", { type, ...props, ref, children: children ? children : innerText })
5
+ ({ type = "submit", children, ...props }, ref) => /* @__PURE__ */ jsx("button", { type, ...props, ref, children })
11
6
  );
12
7
  Button.displayName = "Button";
13
8
  export {
package/lib/button.ws.js CHANGED
@@ -19,11 +19,18 @@ const meta = {
19
19
  { selector: ":disabled", label: "Disabled" },
20
20
  { selector: ":enabled", label: "Enabled" }
21
21
  ],
22
- order: 1
22
+ order: 1,
23
+ template: [
24
+ {
25
+ type: "instance",
26
+ component: "Button",
27
+ children: [{ type: "text", value: "Button you can edit" }]
28
+ }
29
+ ]
23
30
  };
24
31
  const propsMeta = {
25
32
  props,
26
- initialProps: ["type", "innerText", "aria-label"]
33
+ initialProps: ["type", "aria-label"]
27
34
  };
28
35
  export {
29
36
  meta,
@@ -14,8 +14,9 @@ const presetStyle = {
14
14
  ]
15
15
  };
16
16
  const meta = {
17
+ category: "forms",
17
18
  type: "control",
18
- label: "Checkbox Input",
19
+ label: "Checkbox",
19
20
  icon: CheckboxCheckedIcon,
20
21
  presetStyle,
21
22
  order: 6,
@@ -28,6 +29,23 @@ const meta = {
28
29
  { selector: ":enabled", label: "Enabled" },
29
30
  { selector: ":read-only", label: "Read Only" },
30
31
  { selector: ":read-write", label: "Read Write" }
32
+ ],
33
+ template: [
34
+ {
35
+ type: "instance",
36
+ component: "Label",
37
+ label: "Checkbox Field",
38
+ children: [
39
+ { type: "instance", component: "Checkbox", children: [] },
40
+ {
41
+ type: "instance",
42
+ component: "Text",
43
+ label: "Checkbox Label",
44
+ props: [{ type: "string", name: "tag", value: "span" }],
45
+ children: [{ type: "text", value: "Checkbox" }]
46
+ }
47
+ ]
48
+ }
31
49
  ]
32
50
  };
33
51
  const propsMeta = {
@@ -430,11 +430,5 @@ const props = {
430
430
  required: false,
431
431
  control: "text",
432
432
  type: "string"
433
- },
434
- innerText: {
435
- required: false,
436
- control: "text",
437
- type: "string",
438
- defaultValue: "Edit Inner Text in Properties"
439
433
  }
440
434
  };
@@ -457,6 +457,5 @@ const props = {
457
457
  type: "string"
458
458
  },
459
459
  quality: { required: false, control: "number", type: "number" },
460
- loader: { required: true, control: "text", type: "string" },
461
460
  optimize: { required: false, control: "boolean", type: "boolean" }
462
461
  };
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var text_block_props_exports = {};
20
- __export(text_block_props_exports, {
19
+ var text_props_exports = {};
20
+ __export(text_props_exports, {
21
21
  props: () => props
22
22
  });
23
- module.exports = __toCommonJS(text_block_props_exports);
23
+ module.exports = __toCommonJS(text_props_exports);
24
24
  const props = {
25
25
  slot: { required: false, control: "text", type: "string" },
26
26
  style: { required: false, control: "text", type: "string" },
@@ -429,6 +429,5 @@ const props = {
429
429
  required: false,
430
430
  control: "text",
431
431
  type: "string"
432
- },
433
- innerText: { required: false, control: "text", type: "string" }
432
+ }
434
433
  };
@@ -457,6 +457,5 @@ const props = {
457
457
  type: "string"
458
458
  },
459
459
  quality: { required: false, control: "number", type: "number" },
460
- loader: { required: true, control: "text", type: "string" },
461
460
  optimize: { required: false, control: "boolean", type: "boolean" }
462
461
  };
@@ -75,7 +75,7 @@ const presetStyle = {
75
75
  };
76
76
  const meta = {
77
77
  category: "text",
78
- type: "rich-text",
78
+ type: "container",
79
79
  label: "Blockquote",
80
80
  icon: import_svg.BlockquoteIcon,
81
81
  states: import_react_sdk.defaultStates,
package/lib/cjs/button.js CHANGED
@@ -26,11 +26,6 @@ var import_jsx_runtime = require("react/jsx-runtime");
26
26
  var import_react = require("react");
27
27
  const defaultTag = "button";
28
28
  const Button = (0, import_react.forwardRef)(
29
- ({
30
- type = "submit",
31
- innerText = "Edit Inner Text in Properties",
32
- children,
33
- ...props
34
- }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type, ...props, ref, children: children ? children : innerText })
29
+ ({ type = "submit", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type, ...props, ref, children })
35
30
  );
36
31
  Button.displayName = "Button";
@@ -41,9 +41,16 @@ const meta = {
41
41
  { selector: ":disabled", label: "Disabled" },
42
42
  { selector: ":enabled", label: "Enabled" }
43
43
  ],
44
- order: 1
44
+ order: 1,
45
+ template: [
46
+ {
47
+ type: "instance",
48
+ component: "Button",
49
+ children: [{ type: "text", value: "Button you can edit" }]
50
+ }
51
+ ]
45
52
  };
46
53
  const propsMeta = {
47
54
  props: import_button.props,
48
- initialProps: ["type", "innerText", "aria-label"]
55
+ initialProps: ["type", "aria-label"]
49
56
  };
@@ -36,8 +36,9 @@ const presetStyle = {
36
36
  ]
37
37
  };
38
38
  const meta = {
39
+ category: "forms",
39
40
  type: "control",
40
- label: "Checkbox Input",
41
+ label: "Checkbox",
41
42
  icon: import_svg.CheckboxCheckedIcon,
42
43
  presetStyle,
43
44
  order: 6,
@@ -50,6 +51,23 @@ const meta = {
50
51
  { selector: ":enabled", label: "Enabled" },
51
52
  { selector: ":read-only", label: "Read Only" },
52
53
  { selector: ":read-write", label: "Read Write" }
54
+ ],
55
+ template: [
56
+ {
57
+ type: "instance",
58
+ component: "Label",
59
+ label: "Checkbox Field",
60
+ children: [
61
+ { type: "instance", component: "Checkbox", children: [] },
62
+ {
63
+ type: "instance",
64
+ component: "Text",
65
+ label: "Checkbox Label",
66
+ props: [{ type: "string", name: "tag", value: "span" }],
67
+ children: [{ type: "text", value: "Checkbox" }]
68
+ }
69
+ ]
70
+ }
53
71
  ]
54
72
  };
55
73
  const propsMeta = {
@@ -54,7 +54,7 @@ const presetStyle = {
54
54
  };
55
55
  const meta = {
56
56
  category: "general",
57
- type: "rich-text",
57
+ type: "container",
58
58
  label: "Code Text",
59
59
  icon: import_svg.CodeTextIcon,
60
60
  states: import_react_sdk.defaultStates,
@@ -24,7 +24,6 @@ __export(components_exports, {
24
24
  Box: () => import_box.Box,
25
25
  Button: () => import_button.Button,
26
26
  Checkbox: () => import_checkbox.Checkbox,
27
- CheckboxField: () => import_checkbox_field.CheckboxField,
28
27
  CodeText: () => import_code_text.CodeText,
29
28
  ErrorMessage: () => import_error_message.ErrorMessage,
30
29
  Form: () => import_form.Form,
@@ -36,12 +35,10 @@ __export(components_exports, {
36
35
  Italic: () => import_italic.Italic,
37
36
  Label: () => import_label.Label,
38
37
  Link: () => import_link.Link,
39
- LinkBlock: () => import_link_block.LinkBlock,
40
38
  List: () => import_list.List,
41
39
  ListItem: () => import_list_item.ListItem,
42
40
  Paragraph: () => import_paragraph.Paragraph,
43
41
  RadioButton: () => import_radio_button.RadioButton,
44
- RadioButtonField: () => import_radio_button_field.RadioButtonField,
45
42
  RichTextLink: () => import_rich_text_link.RichTextLink,
46
43
  Separator: () => import_separator.Separator,
47
44
  Slot: () => import_slot.Slot,
@@ -49,7 +46,7 @@ __export(components_exports, {
49
46
  Subscript: () => import_subscript.Subscript,
50
47
  SuccessMessage: () => import_success_message.SuccessMessage,
51
48
  Superscript: () => import_superscript.Superscript,
52
- TextBlock: () => import_text_block.TextBlock,
49
+ Text: () => import_text.Text,
53
50
  Textarea: () => import_textarea.Textarea,
54
51
  Vimeo: () => import_vimeo.Vimeo,
55
52
  VimeoPlayButton: () => import_vimeo_play_button.VimeoPlayButton,
@@ -62,11 +59,10 @@ var import_fragment = require("./fragment");
62
59
  var import_html_embed = require("./html-embed");
63
60
  var import_body = require("./body");
64
61
  var import_box = require("./box");
65
- var import_text_block = require("./text-block");
62
+ var import_text = require("./text");
66
63
  var import_heading = require("./heading");
67
64
  var import_paragraph = require("./paragraph");
68
65
  var import_link = require("./link");
69
- var import_link_block = require("./link-block");
70
66
  var import_rich_text_link = require("./rich-text-link");
71
67
  var import_span = require("./span");
72
68
  var import_bold = require("./bold");
@@ -86,9 +82,7 @@ var import_label = require("./label");
86
82
  var import_success_message = require("./success-message");
87
83
  var import_error_message = require("./error-message");
88
84
  var import_textarea = require("./textarea");
89
- var import_radio_button_field = require("./radio-button-field");
90
85
  var import_radio_button = require("./radio-button");
91
- var import_checkbox_field = require("./checkbox-field");
92
86
  var import_checkbox = require("./checkbox");
93
87
  var import_vimeo = require("./vimeo");
94
88
  var import_vimeo_preview_image = require("./vimeo-preview-image");
@@ -36,7 +36,7 @@ const presetStyle = {
36
36
  };
37
37
  const meta = {
38
38
  category: "text",
39
- type: "rich-text",
39
+ type: "container",
40
40
  label: "Heading",
41
41
  icon: import_svg.HeadingIcon,
42
42
  states: import_react_sdk.defaultStates,
package/lib/cjs/image.js CHANGED
@@ -52,11 +52,11 @@ const imagePlaceholderSvg = `data:image/svg+xml;base64,${btoa(`<svg
52
52
  </svg>`)}`;
53
53
  const Image = (0, import_react.forwardRef)(
54
54
  (props, ref) => {
55
+ const { imageBaseUrl } = (0, import_react.useContext)(import_react_sdk.ReactSdkContext);
55
56
  const asset = (0, import_react_sdk.usePropAsset)((0, import_react_sdk.getInstanceIdFromComponentProps)(props), "src");
56
57
  const loader = (0, import_react.useMemo)(() => {
57
- const params = (0, import_react_sdk.getParams)();
58
- return (0, import_image.createImageLoader)({ imageBaseUrl: params.imageBaseUrl });
59
- }, []);
58
+ return (0, import_image.createImageLoader)({ imageBaseUrl });
59
+ }, [imageBaseUrl]);
60
60
  const src = asset?.name ?? props.src;
61
61
  if (asset == null || loader == null) {
62
62
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { ...props, src: src || imagePlaceholderSvg, ref }, src);
@@ -52,7 +52,6 @@ const meta = {
52
52
  presetStyle,
53
53
  order: 0
54
54
  };
55
- const { loader, ...publicProps } = import_image.props;
56
55
  const propsOverrides = {
57
56
  src: {
58
57
  type: "string",
@@ -63,7 +62,7 @@ const propsOverrides = {
63
62
  };
64
63
  const propsMeta = {
65
64
  props: {
66
- ...publicProps,
65
+ ...import_image.props,
67
66
  ...propsOverrides
68
67
  },
69
68
  initialProps: ["src", "width", "height", "alt", "loading"]
@@ -34,9 +34,9 @@ const presetStyle = {
34
34
  };
35
35
  const meta = {
36
36
  category: "forms",
37
- type: "rich-text",
37
+ type: "container",
38
38
  label: "Input Label",
39
- icon: import_svg.TextBlockIcon,
39
+ icon: import_svg.TextIcon,
40
40
  states: import_react_sdk.defaultStates,
41
41
  presetStyle,
42
42
  order: 2,
@@ -52,10 +52,7 @@ const propsMeta = {
52
52
  props: {
53
53
  ...import_label.props,
54
54
  htmlFor: {
55
- required: false,
56
- control: "text",
57
- type: "string",
58
- rows: 0,
55
+ ...import_label.props.htmlFor,
59
56
  label: "For"
60
57
  }
61
58
  },
package/lib/cjs/link.js CHANGED
@@ -27,8 +27,8 @@ var import_react = require("react");
27
27
  var import_react_sdk = require("@webstudio-is/react-sdk");
28
28
  const defaultTag = "a";
29
29
  const Link = (0, import_react.forwardRef)((props, ref) => {
30
+ const { assetBaseUrl } = (0, import_react.useContext)(import_react_sdk.ReactSdkContext);
30
31
  const href = (0, import_react_sdk.usePropUrl)((0, import_react_sdk.getInstanceIdFromComponentProps)(props), "href");
31
- const { assetBaseUrl } = (0, import_react_sdk.getParams)();
32
32
  let url = "#";
33
33
  switch (href?.type) {
34
34
  case "page":
@@ -41,8 +41,8 @@ const presetStyle = {
41
41
  };
42
42
  const meta = {
43
43
  category: "general",
44
- type: "rich-text",
45
- label: "Link Text",
44
+ type: "container",
45
+ label: "Link",
46
46
  icon: import_svg.LinkIcon,
47
47
  presetStyle,
48
48
  order: 1,
@@ -31,7 +31,7 @@ const presetStyle = {
31
31
  };
32
32
  const meta = {
33
33
  category: "general",
34
- type: "rich-text",
34
+ type: "container",
35
35
  requiredAncestors: ["List"],
36
36
  label: "List Item",
37
37
  icon: import_svg.ListItemIcon,
package/lib/cjs/metas.js CHANGED
@@ -24,7 +24,6 @@ __export(metas_exports, {
24
24
  Box: () => import_box.meta,
25
25
  Button: () => import_button.meta,
26
26
  Checkbox: () => import_checkbox.meta,
27
- CheckboxField: () => import_checkbox_field.meta,
28
27
  CodeText: () => import_code_text.meta,
29
28
  ErrorMessage: () => import_error_message.meta,
30
29
  Form: () => import_form.meta,
@@ -36,12 +35,10 @@ __export(metas_exports, {
36
35
  Italic: () => import_italic.meta,
37
36
  Label: () => import_label.meta,
38
37
  Link: () => import_link.meta,
39
- LinkBlock: () => import_link_block.meta,
40
38
  List: () => import_list.meta,
41
39
  ListItem: () => import_list_item.meta,
42
40
  Paragraph: () => import_paragraph.meta,
43
41
  RadioButton: () => import_radio_button.meta,
44
- RadioButtonField: () => import_radio_button_field.meta,
45
42
  RichTextLink: () => import_rich_text_link.meta,
46
43
  Separator: () => import_separator.meta,
47
44
  Slot: () => import_slot.meta,
@@ -49,7 +46,7 @@ __export(metas_exports, {
49
46
  Subscript: () => import_subscript.meta,
50
47
  SuccessMessage: () => import_success_message.meta,
51
48
  Superscript: () => import_superscript.meta,
52
- TextBlock: () => import_text_block.meta,
49
+ Text: () => import_text.meta,
53
50
  Textarea: () => import_textarea.meta,
54
51
  Vimeo: () => import_vimeo.meta,
55
52
  VimeoPlayButton: () => import_vimeo_play_button.meta,
@@ -62,11 +59,10 @@ var import_fragment = require("./fragment.ws");
62
59
  var import_html_embed = require("./html-embed.ws");
63
60
  var import_body = require("./body.ws");
64
61
  var import_box = require("./box.ws");
65
- var import_text_block = require("./text-block.ws");
62
+ var import_text = require("./text.ws");
66
63
  var import_heading = require("./heading.ws");
67
64
  var import_paragraph = require("./paragraph.ws");
68
65
  var import_link = require("./link.ws");
69
- var import_link_block = require("./link-block.ws");
70
66
  var import_rich_text_link = require("./rich-text-link.ws");
71
67
  var import_span = require("./span.ws");
72
68
  var import_bold = require("./bold.ws");
@@ -86,9 +82,7 @@ var import_label = require("./label.ws");
86
82
  var import_success_message = require("./success-message.ws");
87
83
  var import_error_message = require("./error-message.ws");
88
84
  var import_textarea = require("./textarea.ws");
89
- var import_radio_button_field = require("./radio-button-field.ws");
90
85
  var import_radio_button = require("./radio-button.ws");
91
- var import_checkbox_field = require("./checkbox-field.ws");
92
86
  var import_checkbox = require("./checkbox.ws");
93
87
  var import_vimeo = require("./vimeo.ws");
94
88
  var import_vimeo_preview_image = require("./vimeo-preview-image.ws");
@@ -31,7 +31,7 @@ const presetStyle = {
31
31
  };
32
32
  const meta = {
33
33
  category: "text",
34
- type: "rich-text",
34
+ type: "container",
35
35
  label: "Paragraph",
36
36
  icon: import_svg.TextAlignLeftIcon,
37
37
  states: import_react_sdk.defaultStates,
@@ -40,7 +40,7 @@ const meta = {
40
40
  {
41
41
  type: "instance",
42
42
  component: "Paragraph",
43
- children: [{ type: "text", value: "Pragraph you can edit" }]
43
+ children: [{ type: "text", value: "Paragraph you can edit" }]
44
44
  }
45
45
  ],
46
46
  order: 2
package/lib/cjs/props.js CHANGED
@@ -24,7 +24,6 @@ __export(props_exports, {
24
24
  Box: () => import_box.propsMeta,
25
25
  Button: () => import_button.propsMeta,
26
26
  Checkbox: () => import_checkbox.propsMeta,
27
- CheckboxField: () => import_checkbox_field.propsMeta,
28
27
  CodeText: () => import_code_text.propsMeta,
29
28
  ErrorMessage: () => import_error_message.propsMeta,
30
29
  Form: () => import_form.propsMeta,
@@ -36,12 +35,10 @@ __export(props_exports, {
36
35
  Italic: () => import_italic.propsMeta,
37
36
  Label: () => import_label.propsMeta,
38
37
  Link: () => import_link.propsMeta,
39
- LinkBlock: () => import_link_block.propsMeta,
40
38
  List: () => import_list.propsMeta,
41
39
  ListItem: () => import_list_item.propsMeta,
42
40
  Paragraph: () => import_paragraph.propsMeta,
43
41
  RadioButton: () => import_radio_button.propsMeta,
44
- RadioButtonField: () => import_radio_button_field.propsMeta,
45
42
  RichTextLink: () => import_rich_text_link.propsMeta,
46
43
  Separator: () => import_separator.propsMeta,
47
44
  Slot: () => import_slot.propsMeta,
@@ -49,7 +46,7 @@ __export(props_exports, {
49
46
  Subscript: () => import_subscript.propsMeta,
50
47
  SuccessMessage: () => import_success_message.propsMeta,
51
48
  Superscript: () => import_superscript.propsMeta,
52
- TextBlock: () => import_text_block.propsMeta,
49
+ Text: () => import_text.propsMeta,
53
50
  Textarea: () => import_textarea.propsMeta,
54
51
  Vimeo: () => import_vimeo.propsMeta,
55
52
  VimeoPlayButton: () => import_vimeo_play_button.propsMeta,
@@ -62,11 +59,10 @@ var import_fragment = require("./fragment.ws");
62
59
  var import_html_embed = require("./html-embed.ws");
63
60
  var import_body = require("./body.ws");
64
61
  var import_box = require("./box.ws");
65
- var import_text_block = require("./text-block.ws");
62
+ var import_text = require("./text.ws");
66
63
  var import_heading = require("./heading.ws");
67
64
  var import_paragraph = require("./paragraph.ws");
68
65
  var import_link = require("./link.ws");
69
- var import_link_block = require("./link-block.ws");
70
66
  var import_rich_text_link = require("./rich-text-link.ws");
71
67
  var import_span = require("./span.ws");
72
68
  var import_bold = require("./bold.ws");
@@ -86,9 +82,7 @@ var import_label = require("./label.ws");
86
82
  var import_success_message = require("./success-message.ws");
87
83
  var import_error_message = require("./error-message.ws");
88
84
  var import_textarea = require("./textarea.ws");
89
- var import_radio_button_field = require("./radio-button-field.ws");
90
85
  var import_radio_button = require("./radio-button.ws");
91
- var import_checkbox_field = require("./checkbox-field.ws");
92
86
  var import_checkbox = require("./checkbox.ws");
93
87
  var import_vimeo = require("./vimeo.ws");
94
88
  var import_vimeo_preview_image = require("./vimeo-preview-image.ws");
@@ -36,8 +36,9 @@ const presetStyle = {
36
36
  ]
37
37
  };
38
38
  const meta = {
39
+ category: "forms",
39
40
  type: "control",
40
- label: "Radio Input",
41
+ label: "Radio",
41
42
  icon: import_svg.RadioCheckedIcon,
42
43
  presetStyle,
43
44
  order: 5,
@@ -50,6 +51,23 @@ const meta = {
50
51
  { selector: ":enabled", label: "Enabled" },
51
52
  { selector: ":read-only", label: "Read Only" },
52
53
  { selector: ":read-write", label: "Read Write" }
54
+ ],
55
+ template: [
56
+ {
57
+ type: "instance",
58
+ component: "Label",
59
+ label: "Radio Field",
60
+ children: [
61
+ { type: "instance", component: "RadioButton", props: [], children: [] },
62
+ {
63
+ type: "instance",
64
+ component: "Text",
65
+ label: "Radio Label",
66
+ props: [{ type: "string", name: "tag", value: "span" }],
67
+ children: [{ type: "text", value: "Radio" }]
68
+ }
69
+ ]
70
+ }
53
71
  ]
54
72
  };
55
73
  const propsMeta = {
@@ -31,7 +31,7 @@ const presetStyle = {
31
31
  };
32
32
  const meta = {
33
33
  type: "rich-text-child",
34
- label: "Styled Text",
34
+ label: "Text",
35
35
  icon: import_svg.PaintBrushIcon,
36
36
  states: import_react_sdk.defaultStates,
37
37
  presetStyle
@@ -16,17 +16,17 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var text_block_exports = {};
20
- __export(text_block_exports, {
21
- TextBlock: () => TextBlock,
19
+ var text_exports = {};
20
+ __export(text_exports, {
21
+ Text: () => Text,
22
22
  defaultTag: () => defaultTag
23
23
  });
24
- module.exports = __toCommonJS(text_block_exports);
24
+ module.exports = __toCommonJS(text_exports);
25
25
  var import_react = require("react");
26
26
  const defaultTag = "div";
27
- const TextBlock = (0, import_react.forwardRef)(
27
+ const Text = (0, import_react.forwardRef)(
28
28
  ({ tag = defaultTag, ...props }, ref) => {
29
29
  return (0, import_react.createElement)(tag, { ...props, ref });
30
30
  }
31
31
  );
32
- TextBlock.displayName = "TextBlock";
32
+ Text.displayName = "Text";