@draftbit/core 46.2.4-58c73f.0 → 46.2.4-5b5cc7.10

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 (90) hide show
  1. package/lib/commonjs/components/Config.js +1 -0
  2. package/lib/commonjs/components/Markdown.js +33 -0
  3. package/lib/commonjs/components/SVG.js +48 -0
  4. package/lib/commonjs/components/TextField.js +2 -1
  5. package/lib/commonjs/constants.js +1 -1
  6. package/lib/commonjs/index.js +16 -14
  7. package/lib/commonjs/mappings/Image.js +2 -2
  8. package/lib/commonjs/mappings/MapView.js +1 -0
  9. package/lib/commonjs/mappings/Markdown.js +23 -0
  10. package/lib/commonjs/mappings/NumberInput.js +146 -149
  11. package/lib/commonjs/mappings/SVG.js +24 -0
  12. package/lib/commonjs/mappings/TextArea.js +188 -193
  13. package/lib/commonjs/mappings/TextField.js +7 -8
  14. package/lib/commonjs/mappings/TextInput.js +178 -180
  15. package/lib/module/components/Button.js +32 -11
  16. package/lib/module/components/Config.js +1 -0
  17. package/lib/module/components/DeprecatedButton.js +21 -4
  18. package/lib/module/components/Divider.js +20 -2
  19. package/lib/module/components/Layout.js +43 -21
  20. package/lib/module/components/Markdown.js +18 -0
  21. package/lib/module/components/Portal/PortalHost.js +26 -15
  22. package/lib/module/components/SVG.js +31 -0
  23. package/lib/module/components/TextField.js +2 -1
  24. package/lib/module/components/ToggleButton.js +17 -3
  25. package/lib/module/index.js +3 -2
  26. package/lib/module/mappings/Image.js +2 -2
  27. package/lib/module/mappings/MapView.js +1 -0
  28. package/lib/module/mappings/Markdown.js +14 -0
  29. package/lib/module/mappings/NumberInput.js +146 -149
  30. package/lib/module/mappings/SVG.js +15 -0
  31. package/lib/module/mappings/TextArea.js +188 -193
  32. package/lib/module/mappings/TextField.js +7 -8
  33. package/lib/module/mappings/TextInput.js +178 -180
  34. package/lib/typescript/src/components/Config.d.ts +1 -0
  35. package/lib/typescript/src/components/Markdown.d.ts +6 -0
  36. package/lib/typescript/src/components/SVG.d.ts +8 -0
  37. package/lib/typescript/src/components/TextField.d.ts +1 -0
  38. package/lib/typescript/src/index.d.ts +2 -1
  39. package/lib/typescript/src/mappings/MapView.d.ts +1 -0
  40. package/lib/typescript/src/mappings/Markdown.d.ts +9 -0
  41. package/lib/typescript/src/mappings/SVG.d.ts +23 -0
  42. package/lib/typescript/src/mappings/TextArea.d.ts +42 -42
  43. package/lib/typescript/src/mappings/TextField.d.ts +120 -110
  44. package/package.json +6 -5
  45. package/src/components/Config.js +1 -0
  46. package/src/components/Config.ts +1 -0
  47. package/src/components/Markdown.js +12 -0
  48. package/src/components/Markdown.tsx +25 -0
  49. package/src/components/SVG.js +13 -0
  50. package/src/components/SVG.tsx +35 -0
  51. package/src/components/TextField.js +2 -2
  52. package/src/components/TextField.tsx +3 -1
  53. package/src/index.js +2 -1
  54. package/src/index.tsx +2 -1
  55. package/src/mappings/Image.js +2 -2
  56. package/src/mappings/Image.ts +2 -2
  57. package/src/mappings/MapView.js +1 -0
  58. package/src/mappings/MapView.ts +1 -0
  59. package/src/mappings/Markdown.js +14 -0
  60. package/src/mappings/Markdown.ts +15 -0
  61. package/src/mappings/NumberInput.js +160 -163
  62. package/src/mappings/NumberInput.ts +165 -168
  63. package/src/mappings/SVG.js +20 -0
  64. package/src/mappings/SVG.ts +25 -0
  65. package/src/mappings/TextArea.js +213 -220
  66. package/src/mappings/TextArea.ts +219 -227
  67. package/src/mappings/TextField.js +6 -9
  68. package/src/mappings/TextField.ts +7 -11
  69. package/src/mappings/TextInput.js +205 -208
  70. package/src/mappings/TextInput.ts +212 -215
  71. package/lib/commonjs/components/TabView/TabView.js +0 -102
  72. package/lib/commonjs/components/TabView/TabViewItem.js +0 -26
  73. package/lib/commonjs/components/TabView/index.js +0 -23
  74. package/lib/commonjs/mappings/TabView.js +0 -79
  75. package/lib/module/components/TabView/TabView.js +0 -87
  76. package/lib/module/components/TabView/TabViewItem.js +0 -18
  77. package/lib/module/components/TabView/index.js +0 -2
  78. package/lib/module/mappings/TabView.js +0 -70
  79. package/lib/typescript/src/components/TabView/TabView.d.ts +0 -19
  80. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -10
  81. package/lib/typescript/src/components/TabView/index.d.ts +0 -2
  82. package/lib/typescript/src/mappings/TabView.d.ts +0 -111
  83. package/src/components/TabView/TabView.js +0 -34
  84. package/src/components/TabView/TabView.tsx +0 -97
  85. package/src/components/TabView/TabViewItem.js +0 -5
  86. package/src/components/TabView/TabViewItem.tsx +0 -21
  87. package/src/components/TabView/index.js +0 -2
  88. package/src/components/TabView/index.ts +0 -2
  89. package/src/mappings/TabView.js +0 -73
  90. package/src/mappings/TabView.ts +0 -80
@@ -1,5 +1,3 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
1
  import * as React from "react";
4
2
  import { View, StyleSheet } from "react-native";
5
3
  import PortalManager from "./PortalManager";
@@ -33,11 +31,11 @@ export default class PortalHost extends React.Component {
33
31
  constructor() {
34
32
  super(...arguments);
35
33
 
36
- _defineProperty(this, "setManager", manager => {
34
+ this.setManager = manager => {
37
35
  this.manager = manager;
38
- });
36
+ };
39
37
 
40
- _defineProperty(this, "mount", children => {
38
+ this.mount = children => {
41
39
  const key = this.nextKey++;
42
40
 
43
41
  if (this.manager) {
@@ -51,9 +49,9 @@ export default class PortalHost extends React.Component {
51
49
  }
52
50
 
53
51
  return key;
54
- });
52
+ };
55
53
 
56
- _defineProperty(this, "update", (key, children) => {
54
+ this.update = (key, children) => {
57
55
  if (this.manager) {
58
56
  this.manager.update(key, children);
59
57
  } else {
@@ -71,9 +69,9 @@ export default class PortalHost extends React.Component {
71
69
  this.queue.push(op);
72
70
  }
73
71
  }
74
- });
72
+ };
75
73
 
76
- _defineProperty(this, "unmount", key => {
74
+ this.unmount = key => {
77
75
  if (this.manager) {
78
76
  this.manager.unmount(key);
79
77
  } else {
@@ -82,13 +80,10 @@ export default class PortalHost extends React.Component {
82
80
  key
83
81
  });
84
82
  }
85
- });
86
-
87
- _defineProperty(this, "nextKey", 0);
88
-
89
- _defineProperty(this, "queue", []);
83
+ };
90
84
 
91
- _defineProperty(this, "manager", void 0);
85
+ this.nextKey = 0;
86
+ this.queue = [];
92
87
  }
93
88
 
94
89
  componentDidMount() {
@@ -132,6 +127,22 @@ export default class PortalHost extends React.Component {
132
127
  }));
133
128
  }
134
129
 
130
+ }
131
+ PortalHost.displayName = "Portal.Host";
132
+ const styles = StyleSheet.create({
133
+ container: {
134
+ flex: 1
135
+ }
136
+ }); }
137
+ }, /*#__PURE__*/React.createElement(View, {
138
+ style: styles.container,
139
+ collapsable: false,
140
+ pointerEvents: "box-none"
141
+ }, this.props.children), /*#__PURE__*/React.createElement(PortalManager, {
142
+ ref: this.setManager
143
+ }));
144
+ }
145
+
135
146
  }
136
147
 
137
148
  _defineProperty(PortalHost, "displayName", "Portal.Host");
@@ -0,0 +1,31 @@
1
+ import * as React from "react";
2
+ import { View, Platform, Image } from "react-native";
3
+ import { SvgUri } from "react-native-svg";
4
+ import Config from "./Config";
5
+
6
+ const SVG = _ref => {
7
+ let {
8
+ source = Config.placeholderSvgURL,
9
+ style
10
+ } = _ref;
11
+ return /*#__PURE__*/React.createElement(React.Fragment, null, Platform.OS === "ios" && /*#__PURE__*/React.createElement(View, {
12
+ style: style
13
+ }, /*#__PURE__*/React.createElement(SvgUri, {
14
+ width: "100%",
15
+ height: "100%",
16
+ uri: source
17
+ })), Platform.OS === "android" && /*#__PURE__*/React.createElement(View, {
18
+ style: style
19
+ }, /*#__PURE__*/React.createElement(SvgUri, {
20
+ width: "100%",
21
+ height: "100%",
22
+ uri: source
23
+ })), Platform.OS === "web" && /*#__PURE__*/React.createElement(Image, {
24
+ style: style,
25
+ source: {
26
+ uri: source
27
+ }
28
+ }));
29
+ };
30
+
31
+ export default SVG;
@@ -177,6 +177,7 @@ class TextField extends React.Component {
177
177
  rightIconName,
178
178
  assistiveText,
179
179
  underlineColor: underlineColorProp,
180
+ activeBorderColor: activeBorderColorProp,
180
181
  multiline = false,
181
182
  numberOfLines = 4,
182
183
  style,
@@ -204,7 +205,7 @@ class TextField extends React.Component {
204
205
  underlineColor = "transparent";
205
206
  backgroundColor = colors.divider;
206
207
  } else {
207
- activeColor = error ? colors.error : colors.primary;
208
+ activeColor = error ? colors.error : activeBorderColorProp;
208
209
  placeholderColor = borderColor = colors.light;
209
210
  underlineColor = underlineColorProp;
210
211
  backgroundColor = colors.background;
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import * as React from "react";
4
2
  import { withTheme } from "../theming";
5
3
  import { StyleSheet } from "react-native";
@@ -42,13 +40,29 @@ const ToggleButton = _ref => {
42
40
  onPress(!internalValue);
43
41
  };
44
42
 
45
- return /*#__PURE__*/React.createElement(IconButton, _extends({
43
+ return /*#__PURE__*/React.createElement(IconButton, {
46
44
  Icon: Icon,
47
45
  icon: icon,
48
46
  size: iconSize,
49
47
  color: internalValue ? colors[color] : colors[colorSecondary],
50
48
  onPress: handlePress,
51
49
  disabled: disabled,
50
+ style: [styles.mainContainer, {
51
+ width,
52
+ height,
53
+ backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
54
+ borderColor: colors[borderColor]
55
+ }, style],
56
+ ...rest
57
+ });
58
+ };
59
+
60
+ const styles = StyleSheet.create({
61
+ mainContainer: {
62
+ borderWidth: 1
63
+ }
64
+ });
65
+ export default withTheme(ToggleButton);: disabled,
52
66
  style: [styles.mainContainer, {
53
67
  width,
54
68
  height,
@@ -17,6 +17,7 @@ export { default as FAB } from "./components/FAB";
17
17
  export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
18
18
  export { default as IconButton } from "./components/IconButton";
19
19
  export { default as Image } from "./components/Image";
20
+ export { default as SVG } from "./components/SVG";
20
21
  export { default as NumberInput } from "./components/NumberInput";
21
22
  export { default as ScreenContainer } from "./components/ScreenContainer";
22
23
  export { default as StarRating } from "./components/StarRating";
@@ -28,7 +29,6 @@ export { default as Touchable } from "./components/Touchable";
28
29
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
29
30
  export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/ActionSheet";
30
31
  export { Swiper, SwiperItem } from "./components/Swiper";
31
- export { TabView, TabViewItem } from "./components/TabView";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
34
34
  /* Deprecated: Fix or Delete! */
@@ -50,4 +50,5 @@ export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImag
50
50
  export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
51
51
  export { default as Slider } from "./components/Slider";
52
52
  export { default as Stepper } from "./components/Stepper";
53
- export { useAuthState } from "./components/useAuthState"; // a comment to fix sourcemap comment issue
53
+ export { useAuthState } from "./components/useAuthState";
54
+ export { default as Markdown } from "./components/Markdown"; // a comment to fix sourcemap comment issue
@@ -6,8 +6,8 @@ export const SEED_DATA = {
6
6
  category: COMPONENT_TYPES.media,
7
7
  stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Effects],
8
8
  layout: {
9
- width: 250,
10
- height: 250
9
+ width: 100,
10
+ height: 100
11
11
  },
12
12
  props: {
13
13
  source: createImageProp(),
@@ -53,6 +53,7 @@ export const SEED_DATA = {
53
53
  label: "Map Type",
54
54
  description: "The type of map to show",
55
55
  group: GROUPS.basic,
56
+ editable: true,
56
57
  formType: FORM_TYPES.flatArray,
57
58
  propType: PROP_TYPES.STRING,
58
59
  required: false,
@@ -0,0 +1,14 @@
1
+ import { COMPONENT_TYPES, createTextProp } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Markdown",
4
+ tag: "MarkdownComponent",
5
+ description: "A markdown component",
6
+ category: COMPONENT_TYPES.basic,
7
+ props: {
8
+ content: createTextProp({
9
+ label: "Markdown Text",
10
+ description: "Markdown Text",
11
+ defaultValue: null
12
+ })
13
+ }
14
+ };
@@ -1,152 +1,4 @@
1
1
  import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, StylesPanelSections } from "@draftbit/types";
2
- const NUMBER_INPUT_PROPS = {
3
- allowFontScaling: {
4
- group: GROUPS.advanced,
5
- label: "Allow Font Scaling",
6
- description: "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
7
- editable: true,
8
- required: false,
9
- defaultValue: null,
10
- formType: FORM_TYPES.boolean,
11
- propType: PROP_TYPES.BOOLEAN
12
- },
13
- autoFocus: {
14
- group: GROUPS.basic,
15
- label: "Auto Focus",
16
- description: "Focuses the input on load in and brings up the keyboard",
17
- editable: true,
18
- required: false,
19
- defaultValue: null,
20
- formType: FORM_TYPES.boolean,
21
- propType: PROP_TYPES.BOOLEAN
22
- },
23
- caretHidden: {
24
- group: GROUPS.advanced,
25
- label: "Hide Caret",
26
- description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
27
- editable: true,
28
- required: false,
29
- defaultValue: null,
30
- formType: FORM_TYPES.boolean,
31
- propType: PROP_TYPES.BOOLEAN
32
- },
33
- contextMenuHidden: {
34
- group: GROUPS.advanced,
35
- label: "Hide Context Menu",
36
- description: "Hides the system context menu (Default: false)",
37
- editable: true,
38
- required: false,
39
- defaultValue: null,
40
- formType: FORM_TYPES.boolean,
41
- propType: PROP_TYPES.BOOLEAN
42
- },
43
- editable: {
44
- group: GROUPS.advanced,
45
- label: "Editable",
46
- description: "If false, the text is not editable",
47
- editable: true,
48
- required: false,
49
- defaultValue: true,
50
- formType: FORM_TYPES.boolean,
51
- propType: PROP_TYPES.BOOLEAN
52
- },
53
- keyboardAppearance: {
54
- group: GROUPS.advanced,
55
- label: "Keyboard Appearance",
56
- description: "Determines the color of the keyboard.(iOS Only)",
57
- editable: true,
58
- required: false,
59
- defaultValue: null,
60
- options: ["default", "light", "dark"],
61
- formType: FORM_TYPES.flatArray,
62
- propType: PROP_TYPES.STRING
63
- },
64
- keyboardType: {
65
- group: GROUPS.advanced,
66
- label: "Keyboard Type",
67
- description: "Determines what keyboard is given to the user.",
68
- editable: true,
69
- required: false,
70
- defaultValue: null,
71
- options: ["numeric", "numbers-and-punctuation", "number-pad"],
72
- formType: FORM_TYPES.flatArray,
73
- propType: PROP_TYPES.STRING
74
- },
75
- maxLength: {
76
- group: GROUPS.basic,
77
- label: "Max Length",
78
- description: "Limits the input to a set number of characters.",
79
- editable: true,
80
- required: false,
81
- defaultValue: null,
82
- min: 0,
83
- step: 1,
84
- precision: 0,
85
- formType: FORM_TYPES.number,
86
- propType: PROP_TYPES.NUMBER
87
- },
88
- placeholder: {
89
- group: GROUPS.basic,
90
- label: "Placeholder Text",
91
- description: "The text that is shown on load when no value is available.",
92
- editable: true,
93
- required: false,
94
- defaultValue: "Enter a number...",
95
- formType: FORM_TYPES.string,
96
- propType: PROP_TYPES.STRING
97
- },
98
- placeholderTextColor: {
99
- group: GROUPS.basic,
100
- label: "Placeholder Text Color",
101
- description: "The color of the placeholder text.",
102
- editable: true,
103
- required: false,
104
- defaultValue: null,
105
- formType: FORM_TYPES.color,
106
- propType: PROP_TYPES.STRING
107
- },
108
- returnKeyLabel: {
109
- group: GROUPS.advanced,
110
- label: "Return Key Label",
111
- description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
112
- editable: true,
113
- required: false,
114
- defaultValue: null,
115
- formType: FORM_TYPES.string,
116
- propType: PROP_TYPES.STRING
117
- },
118
- returnKeyType: {
119
- group: GROUPS.advanced,
120
- label: "Return Key Type",
121
- description: "Determines how the return key should look like",
122
- editable: true,
123
- required: false,
124
- defaultValue: null,
125
- options: ["done", "go", "next", "search", "send", "none", "previous", "default", "emergency-call", "google", "join", "route", "yahoo"],
126
- formType: FORM_TYPES.flatArray,
127
- propType: PROP_TYPES.STRING
128
- },
129
- selectionColor: {
130
- group: GROUPS.advanced,
131
- label: "Selection Color",
132
- description: "Color of the highlighted portion when selecting.",
133
- editable: true,
134
- required: false,
135
- defaultValue: null,
136
- formType: FORM_TYPES.color,
137
- propType: PROP_TYPES.STRING
138
- },
139
- selectTextOnFocus: {
140
- group: GROUPS.advanced,
141
- label: "Select Text on Focus",
142
- description: "If true, all the text will automatically be selected on focus",
143
- editable: true,
144
- required: false,
145
- defaultValue: null,
146
- formType: FORM_TYPES.boolean,
147
- propType: PROP_TYPES.BOOLEAN
148
- }
149
- };
150
2
  export const SEED_DATA_PROPS = {
151
3
  style: {
152
4
  group: GROUPS.basic,
@@ -226,6 +78,151 @@ export const SEED_DATA = [{
226
78
  },
227
79
  triggers: [Triggers.OnChangeText],
228
80
  props: { ...SEED_DATA_PROPS,
229
- ...NUMBER_INPUT_PROPS
81
+ allowFontScaling: {
82
+ group: GROUPS.advanced,
83
+ label: "Allow Font Scaling",
84
+ description: "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
85
+ editable: true,
86
+ required: false,
87
+ defaultValue: null,
88
+ formType: FORM_TYPES.boolean,
89
+ propType: PROP_TYPES.BOOLEAN
90
+ },
91
+ autoFocus: {
92
+ group: GROUPS.basic,
93
+ label: "Auto Focus",
94
+ description: "Focuses the input on load in and brings up the keyboard",
95
+ editable: true,
96
+ required: false,
97
+ defaultValue: null,
98
+ formType: FORM_TYPES.boolean,
99
+ propType: PROP_TYPES.BOOLEAN
100
+ },
101
+ caretHidden: {
102
+ group: GROUPS.advanced,
103
+ label: "Hide Caret",
104
+ description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
105
+ editable: true,
106
+ required: false,
107
+ defaultValue: null,
108
+ formType: FORM_TYPES.boolean,
109
+ propType: PROP_TYPES.BOOLEAN
110
+ },
111
+ contextMenuHidden: {
112
+ group: GROUPS.advanced,
113
+ label: "Hide Context Menu",
114
+ description: "Hides the system context menu (Default: false)",
115
+ editable: true,
116
+ required: false,
117
+ defaultValue: null,
118
+ formType: FORM_TYPES.boolean,
119
+ propType: PROP_TYPES.BOOLEAN
120
+ },
121
+ editable: {
122
+ group: GROUPS.advanced,
123
+ label: "Editable",
124
+ description: "If false, the text is not editable",
125
+ editable: true,
126
+ required: false,
127
+ defaultValue: true,
128
+ formType: FORM_TYPES.boolean,
129
+ propType: PROP_TYPES.BOOLEAN
130
+ },
131
+ keyboardAppearance: {
132
+ group: GROUPS.advanced,
133
+ label: "Keyboard Appearance",
134
+ description: "Determines the color of the keyboard.(iOS Only)",
135
+ editable: true,
136
+ required: false,
137
+ defaultValue: null,
138
+ options: ["default", "light", "dark"],
139
+ formType: FORM_TYPES.flatArray,
140
+ propType: PROP_TYPES.STRING
141
+ },
142
+ keyboardType: {
143
+ group: GROUPS.advanced,
144
+ label: "Keyboard Type",
145
+ description: "Determines what keyboard is given to the user.",
146
+ editable: true,
147
+ required: false,
148
+ defaultValue: null,
149
+ options: ["numeric", "numbers-and-punctuation", "number-pad"],
150
+ formType: FORM_TYPES.flatArray,
151
+ propType: PROP_TYPES.STRING
152
+ },
153
+ maxLength: {
154
+ group: GROUPS.basic,
155
+ label: "Max Length",
156
+ description: "Limits the input to a set number of characters.",
157
+ editable: true,
158
+ required: false,
159
+ defaultValue: null,
160
+ min: 0,
161
+ step: 1,
162
+ precision: 0,
163
+ formType: FORM_TYPES.number,
164
+ propType: PROP_TYPES.NUMBER
165
+ },
166
+ placeholder: {
167
+ group: GROUPS.basic,
168
+ label: "Placeholder Text",
169
+ description: "The text that is shown on load when no value is available.",
170
+ editable: true,
171
+ required: false,
172
+ defaultValue: "Enter a number...",
173
+ formType: FORM_TYPES.string,
174
+ propType: PROP_TYPES.STRING
175
+ },
176
+ placeholderTextColor: {
177
+ group: GROUPS.basic,
178
+ label: "Placeholder Text Color",
179
+ description: "The color of the placeholder text.",
180
+ editable: true,
181
+ required: false,
182
+ defaultValue: null,
183
+ formType: FORM_TYPES.color,
184
+ propType: PROP_TYPES.STRING
185
+ },
186
+ returnKeyLabel: {
187
+ group: GROUPS.advanced,
188
+ label: "Return Key Label",
189
+ description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
190
+ editable: true,
191
+ required: false,
192
+ defaultValue: null,
193
+ formType: FORM_TYPES.string,
194
+ propType: PROP_TYPES.STRING
195
+ },
196
+ returnKeyType: {
197
+ group: GROUPS.advanced,
198
+ label: "Return Key Type",
199
+ description: "Determines how the return key should look like",
200
+ editable: true,
201
+ required: false,
202
+ defaultValue: null,
203
+ options: ["done", "go", "next", "search", "send", "none", "previous", "default", "emergency-call", "google", "join", "route", "yahoo"],
204
+ formType: FORM_TYPES.flatArray,
205
+ propType: PROP_TYPES.STRING
206
+ },
207
+ selectionColor: {
208
+ group: GROUPS.advanced,
209
+ label: "Selection Color",
210
+ description: "Color of the highlighted portion when selecting.",
211
+ editable: true,
212
+ required: false,
213
+ defaultValue: null,
214
+ formType: FORM_TYPES.color,
215
+ propType: PROP_TYPES.STRING
216
+ },
217
+ selectTextOnFocus: {
218
+ group: GROUPS.advanced,
219
+ label: "Select Text on Focus",
220
+ description: "If true, all the text will automatically be selected on focus",
221
+ editable: true,
222
+ required: false,
223
+ defaultValue: null,
224
+ formType: FORM_TYPES.boolean,
225
+ propType: PROP_TYPES.BOOLEAN
226
+ }
230
227
  }
231
228
  }];
@@ -0,0 +1,15 @@
1
+ import { COMPONENT_TYPES, createSVGProp, StylesPanelSections } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "SVG",
4
+ tag: "SVG",
5
+ description: "An SVG component",
6
+ category: COMPONENT_TYPES.media,
7
+ layout: {
8
+ width: 100,
9
+ height: 100
10
+ },
11
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Effects],
12
+ props: {
13
+ source: createSVGProp()
14
+ }
15
+ };