@draftbit/core 46.2.3 → 46.2.4-dedb7a.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.
@@ -8,220 +8,6 @@ import {
8
8
  StylesPanelSections,
9
9
  } from "@draftbit/types";
10
10
 
11
- const TEXT_INPUT_PROPS = {
12
- allowFontScaling: {
13
- group: GROUPS.advanced,
14
- label: "Allow Font Scaling",
15
- description:
16
- "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
17
- editable: true,
18
- required: false,
19
- defaultValue: null,
20
- formType: FORM_TYPES.boolean,
21
- propType: PROP_TYPES.BOOLEAN,
22
- },
23
- autoCapitalize: {
24
- group: GROUPS.advanced,
25
- label: "Auto Capitalize",
26
- description:
27
- "Can automatically capitalize sentences, words, and characters (Default: none).",
28
- editable: true,
29
- required: false,
30
- defaultValue: null,
31
- options: ["none", "sentences", "words", "characters"],
32
- formType: FORM_TYPES.flatArray,
33
- propType: PROP_TYPES.STRING,
34
- },
35
- autoCorrect: {
36
- group: GROUPS.advanced,
37
- label: "Auto Correct",
38
- description: "Enables auto correction",
39
- editable: true,
40
- required: false,
41
- defaultValue: null,
42
- formType: FORM_TYPES.boolean,
43
- propType: PROP_TYPES.BOOLEAN,
44
- },
45
- autoFocus: {
46
- group: GROUPS.basic,
47
- label: "Auto Focus",
48
- description: "Focuses the input on load in and brings up the keyboard",
49
- editable: true,
50
- required: false,
51
- defaultValue: null,
52
- formType: FORM_TYPES.boolean,
53
- propType: PROP_TYPES.BOOLEAN,
54
- },
55
- caretHidden: {
56
- group: GROUPS.advanced,
57
- label: "Hide Caret",
58
- description:
59
- "Hides the caret(the line small line underneath each showing where you're editing/typing",
60
- editable: true,
61
- required: false,
62
- defaultValue: null,
63
- formType: FORM_TYPES.boolean,
64
- propType: PROP_TYPES.BOOLEAN,
65
- },
66
- contextMenuHidden: {
67
- group: GROUPS.advanced,
68
- label: "Hide Context Menu",
69
- description: "Hides the system context menu (Default: false)",
70
- editable: true,
71
- required: false,
72
- defaultValue: null,
73
- formType: FORM_TYPES.boolean,
74
- propType: PROP_TYPES.BOOLEAN,
75
- },
76
- editable: {
77
- group: GROUPS.advanced,
78
- label: "Editable",
79
- description: "If false, the text is not editable",
80
- editable: true,
81
- required: false,
82
- defaultValue: true,
83
- formType: FORM_TYPES.boolean,
84
- propType: PROP_TYPES.BOOLEAN,
85
- },
86
- keyboardAppearance: {
87
- group: GROUPS.advanced,
88
- label: "Keyboard Appearance",
89
- description: "Determines the color of the keyboard.(iOS Only)",
90
- editable: true,
91
- required: false,
92
- defaultValue: null,
93
- options: ["default", "light", "dark"],
94
- formType: FORM_TYPES.flatArray,
95
- propType: PROP_TYPES.STRING,
96
- },
97
- keyboardType: {
98
- group: GROUPS.advanced,
99
- label: "Keyboard Type",
100
- description: "Determines what keyboard is given to the user.",
101
- editable: true,
102
- required: false,
103
- defaultValue: null,
104
- options: [
105
- "default",
106
- "email-address",
107
- "numeric",
108
- "phone-pad",
109
- "ascii-capable",
110
- "numbers-and-punctuation",
111
- "url",
112
- "number-pad",
113
- "name-phone-pad",
114
- "decimal-pad",
115
- "twitter",
116
- "web-search",
117
- "visible-password",
118
- ],
119
- formType: FORM_TYPES.flatArray,
120
- propType: PROP_TYPES.STRING,
121
- },
122
- maxLength: {
123
- group: GROUPS.basic,
124
- label: "Max Length",
125
- description: "Limits the input to a set number of characters.",
126
- editable: true,
127
- required: false,
128
- defaultValue: null,
129
- min: 0,
130
- step: 1,
131
- precision: 0,
132
- formType: FORM_TYPES.number,
133
- propType: PROP_TYPES.NUMBER,
134
- },
135
- placeholder: {
136
- group: GROUPS.data,
137
- label: "Placeholder Text",
138
- description: "The text that is shown on load when no value is available.",
139
- editable: true,
140
- required: false,
141
- defaultValue: "Enter a value...",
142
- formType: FORM_TYPES.string,
143
- propType: PROP_TYPES.STRING,
144
- },
145
- placeholderTextColor: {
146
- group: GROUPS.basic,
147
- label: "Placeholder Text Color",
148
- description: "The color of the placeholder text.",
149
- editable: true,
150
- required: false,
151
- defaultValue: null,
152
- formType: FORM_TYPES.color,
153
- propType: PROP_TYPES.STRING,
154
- },
155
- returnKeyLabel: {
156
- group: GROUPS.advanced,
157
- label: "Return Key Label",
158
- description:
159
- "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
160
- editable: true,
161
- required: false,
162
- defaultValue: null,
163
- formType: FORM_TYPES.string,
164
- propType: PROP_TYPES.STRING,
165
- },
166
- returnKeyType: {
167
- group: GROUPS.advanced,
168
- label: "Return Key Type",
169
- description: "Determines how the return key should look like",
170
- editable: true,
171
- required: false,
172
- defaultValue: null,
173
- options: [
174
- "done",
175
- "go",
176
- "next",
177
- "search",
178
- "send",
179
- "none",
180
- "previous",
181
- "default",
182
- "emergency-call",
183
- "google",
184
- "join",
185
- "route",
186
- "yahoo",
187
- ],
188
- formType: FORM_TYPES.flatArray,
189
- propType: PROP_TYPES.STRING,
190
- },
191
- secureTextEntry: {
192
- group: GROUPS.basic,
193
- label: "Password Input?",
194
- description:
195
- "Hides the characters with a *, useful for passwords and other sensitive information.",
196
- editable: true,
197
- required: false,
198
- defaultValue: null,
199
- formType: FORM_TYPES.boolean,
200
- propType: PROP_TYPES.BOOLEAN,
201
- },
202
- selectionColor: {
203
- group: GROUPS.advanced,
204
- label: "Selection Color",
205
- description: "Color of the highlighted portion when selecting.",
206
- editable: true,
207
- required: false,
208
- defaultValue: null,
209
- formType: FORM_TYPES.color,
210
- propType: PROP_TYPES.STRING,
211
- },
212
- selectTextOnFocus: {
213
- group: GROUPS.advanced,
214
- label: "Select Text on Focus",
215
- description:
216
- "If true, all the text will automatically be selected on focus",
217
- editable: true,
218
- required: false,
219
- defaultValue: null,
220
- formType: FORM_TYPES.boolean,
221
- propType: PROP_TYPES.BOOLEAN,
222
- },
223
- };
224
-
225
11
  export const SEED_DATA_PROPS = {
226
12
  style: {
227
13
  group: GROUPS.basic,
@@ -317,7 +103,218 @@ export const SEED_DATA = [
317
103
  },
318
104
  triggers: [Triggers.OnChangeText],
319
105
  props: {
320
- ...TEXT_INPUT_PROPS,
106
+ allowFontScaling: {
107
+ group: GROUPS.advanced,
108
+ label: "Allow Font Scaling",
109
+ description:
110
+ "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
111
+ editable: true,
112
+ required: false,
113
+ defaultValue: null,
114
+ formType: FORM_TYPES.boolean,
115
+ propType: PROP_TYPES.BOOLEAN,
116
+ },
117
+ autoCapitalize: {
118
+ group: GROUPS.advanced,
119
+ label: "Auto Capitalize",
120
+ description:
121
+ "Can automatically capitalize sentences, words, and characters (Default: none).",
122
+ editable: true,
123
+ required: false,
124
+ defaultValue: null,
125
+ options: ["none", "sentences", "words", "characters"],
126
+ formType: FORM_TYPES.flatArray,
127
+ propType: PROP_TYPES.STRING,
128
+ },
129
+ autoCorrect: {
130
+ group: GROUPS.advanced,
131
+ label: "Auto Correct",
132
+ description: "Enables auto correction",
133
+ editable: true,
134
+ required: false,
135
+ defaultValue: null,
136
+ formType: FORM_TYPES.boolean,
137
+ propType: PROP_TYPES.BOOLEAN,
138
+ },
139
+ autoFocus: {
140
+ group: GROUPS.basic,
141
+ label: "Auto Focus",
142
+ description: "Focuses the input on load in and brings up the keyboard",
143
+ editable: true,
144
+ required: false,
145
+ defaultValue: null,
146
+ formType: FORM_TYPES.boolean,
147
+ propType: PROP_TYPES.BOOLEAN,
148
+ },
149
+ caretHidden: {
150
+ group: GROUPS.advanced,
151
+ label: "Hide Caret",
152
+ description:
153
+ "Hides the caret(the line small line underneath each showing where you're editing/typing",
154
+ editable: true,
155
+ required: false,
156
+ defaultValue: null,
157
+ formType: FORM_TYPES.boolean,
158
+ propType: PROP_TYPES.BOOLEAN,
159
+ },
160
+ contextMenuHidden: {
161
+ group: GROUPS.advanced,
162
+ label: "Hide Context Menu",
163
+ description: "Hides the system context menu (Default: false)",
164
+ editable: true,
165
+ required: false,
166
+ defaultValue: null,
167
+ formType: FORM_TYPES.boolean,
168
+ propType: PROP_TYPES.BOOLEAN,
169
+ },
170
+ editable: {
171
+ group: GROUPS.advanced,
172
+ label: "Editable",
173
+ description: "If false, the text is not editable",
174
+ editable: true,
175
+ required: false,
176
+ defaultValue: true,
177
+ formType: FORM_TYPES.boolean,
178
+ propType: PROP_TYPES.BOOLEAN,
179
+ },
180
+ keyboardAppearance: {
181
+ group: GROUPS.advanced,
182
+ label: "Keyboard Appearance",
183
+ description: "Determines the color of the keyboard.(iOS Only)",
184
+ editable: true,
185
+ required: false,
186
+ defaultValue: null,
187
+ options: ["default", "light", "dark"],
188
+ formType: FORM_TYPES.flatArray,
189
+ propType: PROP_TYPES.STRING,
190
+ },
191
+ keyboardType: {
192
+ group: GROUPS.advanced,
193
+ label: "Keyboard Type",
194
+ description: "Determines what keyboard is given to the user.",
195
+ editable: true,
196
+ required: false,
197
+ defaultValue: null,
198
+ options: [
199
+ "default",
200
+ "email-address",
201
+ "numeric",
202
+ "phone-pad",
203
+ "ascii-capable",
204
+ "numbers-and-punctuation",
205
+ "url",
206
+ "number-pad",
207
+ "name-phone-pad",
208
+ "decimal-pad",
209
+ "twitter",
210
+ "web-search",
211
+ "visible-password",
212
+ ],
213
+ formType: FORM_TYPES.flatArray,
214
+ propType: PROP_TYPES.STRING,
215
+ },
216
+ maxLength: {
217
+ group: GROUPS.basic,
218
+ label: "Max Length",
219
+ description: "Limits the input to a set number of characters.",
220
+ editable: true,
221
+ required: false,
222
+ defaultValue: null,
223
+ min: 0,
224
+ step: 1,
225
+ precision: 0,
226
+ formType: FORM_TYPES.number,
227
+ propType: PROP_TYPES.NUMBER,
228
+ },
229
+ placeholder: {
230
+ group: GROUPS.data,
231
+ label: "Placeholder Text",
232
+ description:
233
+ "The text that is shown on load when no value is available.",
234
+ editable: true,
235
+ required: false,
236
+ defaultValue: "Enter a value...",
237
+ formType: FORM_TYPES.string,
238
+ propType: PROP_TYPES.STRING,
239
+ },
240
+ placeholderTextColor: {
241
+ group: GROUPS.basic,
242
+ label: "Placeholder Text Color",
243
+ description: "The color of the placeholder text.",
244
+ editable: true,
245
+ required: false,
246
+ defaultValue: null,
247
+ formType: FORM_TYPES.color,
248
+ propType: PROP_TYPES.STRING,
249
+ },
250
+ returnKeyLabel: {
251
+ group: GROUPS.advanced,
252
+ label: "Return Key Label",
253
+ description:
254
+ "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
255
+ editable: true,
256
+ required: false,
257
+ defaultValue: null,
258
+ formType: FORM_TYPES.string,
259
+ propType: PROP_TYPES.STRING,
260
+ },
261
+ returnKeyType: {
262
+ group: GROUPS.advanced,
263
+ label: "Return Key Type",
264
+ description: "Determines how the return key should look like",
265
+ editable: true,
266
+ required: false,
267
+ defaultValue: null,
268
+ options: [
269
+ "done",
270
+ "go",
271
+ "next",
272
+ "search",
273
+ "send",
274
+ "none",
275
+ "previous",
276
+ "default",
277
+ "emergency-call",
278
+ "google",
279
+ "join",
280
+ "route",
281
+ "yahoo",
282
+ ],
283
+ formType: FORM_TYPES.flatArray,
284
+ propType: PROP_TYPES.STRING,
285
+ },
286
+ secureTextEntry: {
287
+ group: GROUPS.basic,
288
+ label: "Password Input?",
289
+ description:
290
+ "Hides the characters with a *, useful for passwords and other sensitive information.",
291
+ editable: true,
292
+ required: false,
293
+ defaultValue: null,
294
+ formType: FORM_TYPES.boolean,
295
+ propType: PROP_TYPES.BOOLEAN,
296
+ },
297
+ selectionColor: {
298
+ group: GROUPS.advanced,
299
+ label: "Selection Color",
300
+ description: "Color of the highlighted portion when selecting.",
301
+ editable: true,
302
+ required: false,
303
+ defaultValue: null,
304
+ formType: FORM_TYPES.color,
305
+ propType: PROP_TYPES.STRING,
306
+ },
307
+ selectTextOnFocus: {
308
+ group: GROUPS.advanced,
309
+ label: "Select Text on Focus",
310
+ description:
311
+ "If true, all the text will automatically be selected on focus",
312
+ editable: true,
313
+ required: false,
314
+ defaultValue: null,
315
+ formType: FORM_TYPES.boolean,
316
+ propType: PROP_TYPES.BOOLEAN,
317
+ },
321
318
  ...SEED_DATA_PROPS,
322
319
  multiline: {
323
320
  group: GROUPS.basic,