@draftbit/core 46.2.3 → 46.2.4-2fc21b.3
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/commonjs/components/Accordion/AccordionItem.js +5 -25
- package/lib/commonjs/components/Banner.js +24 -4
- package/lib/commonjs/components/CardContainer.js +15 -5
- package/lib/commonjs/components/Carousel.js +34 -10
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +24 -6
- package/lib/commonjs/components/CircularProgress.js +15 -7
- package/lib/commonjs/components/Config.js +1 -0
- package/lib/commonjs/components/Image.js +16 -3
- package/lib/commonjs/components/NumberInput.js +13 -2
- package/lib/commonjs/components/Portal/PortalManager.js +19 -11
- package/lib/commonjs/components/ProgressBar.js +23 -7
- package/lib/commonjs/components/SVG.js +49 -0
- package/lib/commonjs/components/Slider.js +24 -5
- package/lib/commonjs/components/TextField.js +2 -1
- package/lib/commonjs/components/Touchable.js +16 -2
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +8 -0
- package/lib/commonjs/mappings/Image.js +2 -2
- package/lib/commonjs/mappings/NumberInput.js +146 -149
- package/lib/commonjs/mappings/SVG.js +23 -0
- package/lib/commonjs/mappings/TextArea.js +188 -193
- package/lib/commonjs/mappings/TextField.js +7 -8
- package/lib/commonjs/mappings/TextInput.js +178 -180
- package/lib/module/components/Config.js +1 -0
- package/lib/module/components/SVG.js +32 -0
- package/lib/module/components/TextField.js +2 -1
- package/lib/module/index.js +1 -0
- package/lib/module/mappings/Image.js +2 -2
- package/lib/module/mappings/NumberInput.js +146 -149
- package/lib/module/mappings/SVG.js +14 -0
- package/lib/module/mappings/TextArea.js +188 -193
- package/lib/module/mappings/TextField.js +7 -8
- package/lib/module/mappings/TextInput.js +178 -180
- package/lib/typescript/src/components/Config.d.ts +1 -0
- package/lib/typescript/src/components/SVG.d.ts +8 -0
- package/lib/typescript/src/components/TextField.d.ts +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/mappings/SVG.d.ts +22 -0
- package/lib/typescript/src/mappings/TextArea.d.ts +42 -42
- package/lib/typescript/src/mappings/TextField.d.ts +120 -110
- package/package.json +4 -3
- package/src/components/Config.js +1 -0
- package/src/components/Config.ts +1 -0
- package/src/components/SVG.js +14 -0
- package/src/components/SVG.tsx +35 -0
- package/src/components/TextField.js +2 -2
- package/src/components/TextField.tsx +3 -1
- package/src/index.js +1 -0
- package/src/index.tsx +1 -0
- package/src/mappings/Image.js +2 -2
- package/src/mappings/Image.ts +2 -2
- package/src/mappings/NumberInput.js +160 -163
- package/src/mappings/NumberInput.ts +165 -168
- package/src/mappings/SVG.js +14 -0
- package/src/mappings/SVG.ts +15 -0
- package/src/mappings/TextArea.js +213 -220
- package/src/mappings/TextArea.ts +219 -227
- package/src/mappings/TextField.js +6 -9
- package/src/mappings/TextField.ts +7 -11
- package/src/mappings/TextInput.js +205 -208
- package/src/mappings/TextInput.ts +212 -215
package/src/mappings/TextArea.ts
CHANGED
|
@@ -7,231 +7,6 @@ import {
|
|
|
7
7
|
Triggers,
|
|
8
8
|
} from "@draftbit/types";
|
|
9
9
|
|
|
10
|
-
const TEXT_AREA_PROPS = {
|
|
11
|
-
allowFontScaling: {
|
|
12
|
-
group: GROUPS.advanced,
|
|
13
|
-
label: "Allow Font Scaling",
|
|
14
|
-
description:
|
|
15
|
-
"Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
|
|
16
|
-
editable: true,
|
|
17
|
-
required: false,
|
|
18
|
-
defaultValue: null,
|
|
19
|
-
formType: FORM_TYPES.boolean,
|
|
20
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
21
|
-
},
|
|
22
|
-
autoCapitalize: {
|
|
23
|
-
group: GROUPS.advanced,
|
|
24
|
-
label: "Auto Capitalize",
|
|
25
|
-
description:
|
|
26
|
-
"Can automatically capitalize sentences, words, and characters (Default: none).",
|
|
27
|
-
editable: true,
|
|
28
|
-
required: false,
|
|
29
|
-
defaultValue: null,
|
|
30
|
-
options: ["none", "sentences", "words", "characters"],
|
|
31
|
-
formType: FORM_TYPES.flatArray,
|
|
32
|
-
propType: PROP_TYPES.STRING,
|
|
33
|
-
},
|
|
34
|
-
autoCorrect: {
|
|
35
|
-
group: GROUPS.advanced,
|
|
36
|
-
label: "Auto Correct",
|
|
37
|
-
description: "Enables auto correction",
|
|
38
|
-
editable: true,
|
|
39
|
-
required: false,
|
|
40
|
-
defaultValue: null,
|
|
41
|
-
formType: FORM_TYPES.boolean,
|
|
42
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
43
|
-
},
|
|
44
|
-
autoFocus: {
|
|
45
|
-
group: GROUPS.basic,
|
|
46
|
-
label: "Auto Focus",
|
|
47
|
-
description: "Focuses the input on load in and brings up the keyboard",
|
|
48
|
-
editable: true,
|
|
49
|
-
required: false,
|
|
50
|
-
defaultValue: null,
|
|
51
|
-
formType: FORM_TYPES.boolean,
|
|
52
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
53
|
-
},
|
|
54
|
-
caretHidden: {
|
|
55
|
-
group: GROUPS.advanced,
|
|
56
|
-
label: "Hide Caret",
|
|
57
|
-
description:
|
|
58
|
-
"Hides the caret(the line small line underneath each showing where you're editing/typing",
|
|
59
|
-
editable: true,
|
|
60
|
-
required: false,
|
|
61
|
-
defaultValue: null,
|
|
62
|
-
formType: FORM_TYPES.boolean,
|
|
63
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
64
|
-
},
|
|
65
|
-
contextMenuHidden: {
|
|
66
|
-
group: GROUPS.advanced,
|
|
67
|
-
label: "Hide Context Menu",
|
|
68
|
-
description: "Hides the system context menu (Default: false)",
|
|
69
|
-
editable: true,
|
|
70
|
-
required: false,
|
|
71
|
-
defaultValue: null,
|
|
72
|
-
formType: FORM_TYPES.boolean,
|
|
73
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
74
|
-
},
|
|
75
|
-
editable: {
|
|
76
|
-
group: GROUPS.advanced,
|
|
77
|
-
label: "Editable",
|
|
78
|
-
description: "If false, the text is not editable",
|
|
79
|
-
editable: true,
|
|
80
|
-
required: false,
|
|
81
|
-
defaultValue: true,
|
|
82
|
-
formType: FORM_TYPES.boolean,
|
|
83
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
84
|
-
},
|
|
85
|
-
keyboardAppearance: {
|
|
86
|
-
group: GROUPS.advanced,
|
|
87
|
-
label: "Keyboard Appearance",
|
|
88
|
-
description: "Determines the color of the keyboard.(iOS Only)",
|
|
89
|
-
editable: true,
|
|
90
|
-
required: false,
|
|
91
|
-
defaultValue: null,
|
|
92
|
-
options: ["default", "light", "dark"],
|
|
93
|
-
formType: FORM_TYPES.flatArray,
|
|
94
|
-
propType: PROP_TYPES.STRING,
|
|
95
|
-
},
|
|
96
|
-
keyboardType: {
|
|
97
|
-
group: GROUPS.advanced,
|
|
98
|
-
label: "Keyboard Type",
|
|
99
|
-
description: "Determines what keyboard is given to the user.",
|
|
100
|
-
editable: true,
|
|
101
|
-
required: false,
|
|
102
|
-
defaultValue: null,
|
|
103
|
-
options: [
|
|
104
|
-
"default",
|
|
105
|
-
"email-address",
|
|
106
|
-
"numeric",
|
|
107
|
-
"phone-pad",
|
|
108
|
-
"ascii-capable",
|
|
109
|
-
"numbers-and-punctuation",
|
|
110
|
-
"url",
|
|
111
|
-
"number-pad",
|
|
112
|
-
"name-phone-pad",
|
|
113
|
-
"decimal-pad",
|
|
114
|
-
"twitter",
|
|
115
|
-
"web-search",
|
|
116
|
-
"visible-password",
|
|
117
|
-
],
|
|
118
|
-
formType: FORM_TYPES.flatArray,
|
|
119
|
-
propType: PROP_TYPES.STRING,
|
|
120
|
-
},
|
|
121
|
-
maxLength: {
|
|
122
|
-
group: GROUPS.basic,
|
|
123
|
-
label: "Max Length",
|
|
124
|
-
description: "Limits the input to a set number of characters.",
|
|
125
|
-
editable: true,
|
|
126
|
-
required: false,
|
|
127
|
-
defaultValue: null,
|
|
128
|
-
min: 0,
|
|
129
|
-
step: 1,
|
|
130
|
-
precision: 0,
|
|
131
|
-
formType: FORM_TYPES.number,
|
|
132
|
-
propType: PROP_TYPES.NUMBER,
|
|
133
|
-
},
|
|
134
|
-
placeholder: {
|
|
135
|
-
group: GROUPS.data,
|
|
136
|
-
label: "Placeholder Text",
|
|
137
|
-
description: "The text that is shown on load when no value is available.",
|
|
138
|
-
editable: true,
|
|
139
|
-
required: false,
|
|
140
|
-
defaultValue: "Enter a value...",
|
|
141
|
-
formType: FORM_TYPES.string,
|
|
142
|
-
propType: PROP_TYPES.STRING,
|
|
143
|
-
},
|
|
144
|
-
placeholderTextColor: {
|
|
145
|
-
group: GROUPS.basic,
|
|
146
|
-
label: "Placeholder Text Color",
|
|
147
|
-
description: "The color of the placeholder text.",
|
|
148
|
-
editable: true,
|
|
149
|
-
required: false,
|
|
150
|
-
defaultValue: null,
|
|
151
|
-
formType: FORM_TYPES.color,
|
|
152
|
-
propType: PROP_TYPES.STRING,
|
|
153
|
-
},
|
|
154
|
-
returnKeyLabel: {
|
|
155
|
-
group: GROUPS.advanced,
|
|
156
|
-
label: "Return Key Label",
|
|
157
|
-
description:
|
|
158
|
-
"(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
|
|
159
|
-
editable: true,
|
|
160
|
-
required: false,
|
|
161
|
-
defaultValue: null,
|
|
162
|
-
formType: FORM_TYPES.string,
|
|
163
|
-
propType: PROP_TYPES.STRING,
|
|
164
|
-
},
|
|
165
|
-
returnKeyType: {
|
|
166
|
-
group: GROUPS.advanced,
|
|
167
|
-
label: "Return Key Type",
|
|
168
|
-
description: "Determines how the return key should look like",
|
|
169
|
-
editable: true,
|
|
170
|
-
required: false,
|
|
171
|
-
defaultValue: null,
|
|
172
|
-
options: [
|
|
173
|
-
"done",
|
|
174
|
-
"go",
|
|
175
|
-
"next",
|
|
176
|
-
"search",
|
|
177
|
-
"send",
|
|
178
|
-
"none",
|
|
179
|
-
"previous",
|
|
180
|
-
"default",
|
|
181
|
-
"emergency-call",
|
|
182
|
-
"google",
|
|
183
|
-
"join",
|
|
184
|
-
"route",
|
|
185
|
-
"yahoo",
|
|
186
|
-
],
|
|
187
|
-
formType: FORM_TYPES.flatArray,
|
|
188
|
-
propType: PROP_TYPES.STRING,
|
|
189
|
-
},
|
|
190
|
-
secureTextEntry: {
|
|
191
|
-
group: GROUPS.basic,
|
|
192
|
-
label: "Password Input?",
|
|
193
|
-
description:
|
|
194
|
-
"Hides the characters with a *, useful for passwords and other sensitive information.",
|
|
195
|
-
editable: true,
|
|
196
|
-
required: false,
|
|
197
|
-
defaultValue: null,
|
|
198
|
-
formType: FORM_TYPES.boolean,
|
|
199
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
200
|
-
},
|
|
201
|
-
selectionColor: {
|
|
202
|
-
group: GROUPS.advanced,
|
|
203
|
-
label: "Selection Color",
|
|
204
|
-
description: "Color of the highlighted portion when selecting.",
|
|
205
|
-
editable: true,
|
|
206
|
-
required: false,
|
|
207
|
-
defaultValue: null,
|
|
208
|
-
formType: FORM_TYPES.color,
|
|
209
|
-
propType: PROP_TYPES.STRING,
|
|
210
|
-
},
|
|
211
|
-
selectTextOnFocus: {
|
|
212
|
-
group: GROUPS.advanced,
|
|
213
|
-
label: "Select Text on Focus",
|
|
214
|
-
description:
|
|
215
|
-
"If true, all the text will automatically be selected on focus",
|
|
216
|
-
editable: true,
|
|
217
|
-
required: false,
|
|
218
|
-
defaultValue: null,
|
|
219
|
-
formType: FORM_TYPES.boolean,
|
|
220
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
221
|
-
},
|
|
222
|
-
textAlignVertical: {
|
|
223
|
-
group: GROUPS.advanced,
|
|
224
|
-
label: "Aligns text on the vertical axis",
|
|
225
|
-
description: "Move the text around in the given component.",
|
|
226
|
-
options: ["auto", "top", "bottom", "center"],
|
|
227
|
-
editable: true,
|
|
228
|
-
required: false,
|
|
229
|
-
defaultValue: "top",
|
|
230
|
-
formType: FORM_TYPES.flatArray,
|
|
231
|
-
propType: PROP_TYPES.STRING,
|
|
232
|
-
},
|
|
233
|
-
};
|
|
234
|
-
|
|
235
10
|
export const SEED_DATA = {
|
|
236
11
|
name: "Text Area",
|
|
237
12
|
tag: "TextInput",
|
|
@@ -251,11 +26,228 @@ export const SEED_DATA = {
|
|
|
251
26
|
},
|
|
252
27
|
triggers: [Triggers.OnChangeText],
|
|
253
28
|
props: {
|
|
254
|
-
|
|
29
|
+
allowFontScaling: {
|
|
30
|
+
group: GROUPS.advanced,
|
|
31
|
+
label: "Allow Font Scaling",
|
|
32
|
+
description:
|
|
33
|
+
"Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
|
|
34
|
+
editable: true,
|
|
35
|
+
required: false,
|
|
36
|
+
defaultValue: null,
|
|
37
|
+
formType: FORM_TYPES.boolean,
|
|
38
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
39
|
+
},
|
|
40
|
+
autoCapitalize: {
|
|
41
|
+
group: GROUPS.advanced,
|
|
42
|
+
label: "Auto Capitalize",
|
|
43
|
+
description:
|
|
44
|
+
"Can automatically capitalize sentences, words, and characters (Default: none).",
|
|
45
|
+
editable: true,
|
|
46
|
+
required: false,
|
|
47
|
+
defaultValue: null,
|
|
48
|
+
options: ["none", "sentences", "words", "characters"],
|
|
49
|
+
formType: FORM_TYPES.flatArray,
|
|
50
|
+
propType: PROP_TYPES.STRING,
|
|
51
|
+
},
|
|
52
|
+
autoCorrect: {
|
|
53
|
+
group: GROUPS.advanced,
|
|
54
|
+
label: "Auto Correct",
|
|
55
|
+
description: "Enables auto correction",
|
|
56
|
+
editable: true,
|
|
57
|
+
required: false,
|
|
58
|
+
defaultValue: null,
|
|
59
|
+
formType: FORM_TYPES.boolean,
|
|
60
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
61
|
+
},
|
|
62
|
+
autoFocus: {
|
|
63
|
+
group: GROUPS.basic,
|
|
64
|
+
label: "Auto Focus",
|
|
65
|
+
description: "Focuses the input on load in and brings up the keyboard",
|
|
66
|
+
editable: true,
|
|
67
|
+
required: false,
|
|
68
|
+
defaultValue: null,
|
|
69
|
+
formType: FORM_TYPES.boolean,
|
|
70
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
71
|
+
},
|
|
72
|
+
caretHidden: {
|
|
73
|
+
group: GROUPS.advanced,
|
|
74
|
+
label: "Hide Caret",
|
|
75
|
+
description:
|
|
76
|
+
"Hides the caret(the line small line underneath each showing where you're editing/typing",
|
|
77
|
+
editable: true,
|
|
78
|
+
required: false,
|
|
79
|
+
defaultValue: null,
|
|
80
|
+
formType: FORM_TYPES.boolean,
|
|
81
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
82
|
+
},
|
|
83
|
+
contextMenuHidden: {
|
|
84
|
+
group: GROUPS.advanced,
|
|
85
|
+
label: "Hide Context Menu",
|
|
86
|
+
description: "Hides the system context menu (Default: false)",
|
|
87
|
+
editable: true,
|
|
88
|
+
required: false,
|
|
89
|
+
defaultValue: null,
|
|
90
|
+
formType: FORM_TYPES.boolean,
|
|
91
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
92
|
+
},
|
|
93
|
+
editable: {
|
|
94
|
+
group: GROUPS.advanced,
|
|
95
|
+
label: "Editable",
|
|
96
|
+
description: "If false, the text is not editable",
|
|
97
|
+
editable: true,
|
|
98
|
+
required: false,
|
|
99
|
+
defaultValue: true,
|
|
100
|
+
formType: FORM_TYPES.boolean,
|
|
101
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
102
|
+
},
|
|
103
|
+
keyboardAppearance: {
|
|
104
|
+
group: GROUPS.advanced,
|
|
105
|
+
label: "Keyboard Appearance",
|
|
106
|
+
description: "Determines the color of the keyboard.(iOS Only)",
|
|
107
|
+
editable: true,
|
|
108
|
+
required: false,
|
|
109
|
+
defaultValue: null,
|
|
110
|
+
options: ["default", "light", "dark"],
|
|
111
|
+
formType: FORM_TYPES.flatArray,
|
|
112
|
+
propType: PROP_TYPES.STRING,
|
|
113
|
+
},
|
|
114
|
+
keyboardType: {
|
|
115
|
+
group: GROUPS.advanced,
|
|
116
|
+
label: "Keyboard Type",
|
|
117
|
+
description: "Determines what keyboard is given to the user.",
|
|
118
|
+
editable: true,
|
|
119
|
+
required: false,
|
|
120
|
+
defaultValue: null,
|
|
121
|
+
options: [
|
|
122
|
+
"default",
|
|
123
|
+
"email-address",
|
|
124
|
+
"numeric",
|
|
125
|
+
"phone-pad",
|
|
126
|
+
"ascii-capable",
|
|
127
|
+
"numbers-and-punctuation",
|
|
128
|
+
"url",
|
|
129
|
+
"number-pad",
|
|
130
|
+
"name-phone-pad",
|
|
131
|
+
"decimal-pad",
|
|
132
|
+
"twitter",
|
|
133
|
+
"web-search",
|
|
134
|
+
"visible-password",
|
|
135
|
+
],
|
|
136
|
+
formType: FORM_TYPES.flatArray,
|
|
137
|
+
propType: PROP_TYPES.STRING,
|
|
138
|
+
},
|
|
139
|
+
maxLength: {
|
|
140
|
+
group: GROUPS.basic,
|
|
141
|
+
label: "Max Length",
|
|
142
|
+
description: "Limits the input to a set number of characters.",
|
|
143
|
+
editable: true,
|
|
144
|
+
required: false,
|
|
145
|
+
defaultValue: null,
|
|
146
|
+
min: 0,
|
|
147
|
+
step: 1,
|
|
148
|
+
precision: 0,
|
|
149
|
+
formType: FORM_TYPES.number,
|
|
150
|
+
propType: PROP_TYPES.NUMBER,
|
|
151
|
+
},
|
|
255
152
|
placeholder: {
|
|
256
|
-
|
|
153
|
+
group: GROUPS.data,
|
|
154
|
+
label: "Placeholder Text",
|
|
155
|
+
description: "The text that is shown on load when no value is available.",
|
|
156
|
+
editable: true,
|
|
157
|
+
required: false,
|
|
257
158
|
defaultValue:
|
|
258
159
|
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.",
|
|
160
|
+
formType: FORM_TYPES.string,
|
|
161
|
+
propType: PROP_TYPES.STRING,
|
|
162
|
+
},
|
|
163
|
+
placeholderTextColor: {
|
|
164
|
+
group: GROUPS.basic,
|
|
165
|
+
label: "Placeholder Text Color",
|
|
166
|
+
description: "The color of the placeholder text.",
|
|
167
|
+
editable: true,
|
|
168
|
+
required: false,
|
|
169
|
+
defaultValue: null,
|
|
170
|
+
formType: FORM_TYPES.color,
|
|
171
|
+
propType: PROP_TYPES.STRING,
|
|
172
|
+
},
|
|
173
|
+
returnKeyLabel: {
|
|
174
|
+
group: GROUPS.advanced,
|
|
175
|
+
label: "Return Key Label",
|
|
176
|
+
description:
|
|
177
|
+
"(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
|
|
178
|
+
editable: true,
|
|
179
|
+
required: false,
|
|
180
|
+
defaultValue: null,
|
|
181
|
+
formType: FORM_TYPES.string,
|
|
182
|
+
propType: PROP_TYPES.STRING,
|
|
183
|
+
},
|
|
184
|
+
returnKeyType: {
|
|
185
|
+
group: GROUPS.advanced,
|
|
186
|
+
label: "Return Key Type",
|
|
187
|
+
description: "Determines how the return key should look like",
|
|
188
|
+
editable: true,
|
|
189
|
+
required: false,
|
|
190
|
+
defaultValue: null,
|
|
191
|
+
options: [
|
|
192
|
+
"done",
|
|
193
|
+
"go",
|
|
194
|
+
"next",
|
|
195
|
+
"search",
|
|
196
|
+
"send",
|
|
197
|
+
"none",
|
|
198
|
+
"previous",
|
|
199
|
+
"default",
|
|
200
|
+
"emergency-call",
|
|
201
|
+
"google",
|
|
202
|
+
"join",
|
|
203
|
+
"route",
|
|
204
|
+
"yahoo",
|
|
205
|
+
],
|
|
206
|
+
formType: FORM_TYPES.flatArray,
|
|
207
|
+
propType: PROP_TYPES.STRING,
|
|
208
|
+
},
|
|
209
|
+
secureTextEntry: {
|
|
210
|
+
group: GROUPS.basic,
|
|
211
|
+
label: "Password Input?",
|
|
212
|
+
description:
|
|
213
|
+
"Hides the characters with a *, useful for passwords and other sensitive information.",
|
|
214
|
+
editable: true,
|
|
215
|
+
required: false,
|
|
216
|
+
defaultValue: null,
|
|
217
|
+
formType: FORM_TYPES.boolean,
|
|
218
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
219
|
+
},
|
|
220
|
+
selectionColor: {
|
|
221
|
+
group: GROUPS.advanced,
|
|
222
|
+
label: "Selection Color",
|
|
223
|
+
description: "Color of the highlighted portion when selecting.",
|
|
224
|
+
editable: true,
|
|
225
|
+
required: false,
|
|
226
|
+
defaultValue: null,
|
|
227
|
+
formType: FORM_TYPES.color,
|
|
228
|
+
propType: PROP_TYPES.STRING,
|
|
229
|
+
},
|
|
230
|
+
selectTextOnFocus: {
|
|
231
|
+
group: GROUPS.advanced,
|
|
232
|
+
label: "Select Text on Focus",
|
|
233
|
+
description:
|
|
234
|
+
"If true, all the text will automatically be selected on focus",
|
|
235
|
+
editable: true,
|
|
236
|
+
required: false,
|
|
237
|
+
defaultValue: null,
|
|
238
|
+
formType: FORM_TYPES.boolean,
|
|
239
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
240
|
+
},
|
|
241
|
+
textAlignVertical: {
|
|
242
|
+
group: GROUPS.advanced,
|
|
243
|
+
label: "Aligns text on the vertical axis",
|
|
244
|
+
description: "Move the text around in the given component.",
|
|
245
|
+
options: ["auto", "top", "bottom", "center"],
|
|
246
|
+
editable: true,
|
|
247
|
+
required: false,
|
|
248
|
+
defaultValue: "top",
|
|
249
|
+
formType: FORM_TYPES.flatArray,
|
|
250
|
+
propType: PROP_TYPES.STRING,
|
|
259
251
|
},
|
|
260
252
|
multiline: {
|
|
261
253
|
label: "Multiline",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, createColorProp, createNumberProp, createFieldNameProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
|
-
const
|
|
2
|
+
const SEED_DATA_PROPS = {
|
|
3
3
|
allowFontScaling: {
|
|
4
4
|
group: GROUPS.advanced,
|
|
5
5
|
label: "Allow Font Scaling",
|
|
@@ -136,7 +136,7 @@ const TEXT_FIELD_PROPS = {
|
|
|
136
136
|
description: "The text that is shown on load when no value is available.",
|
|
137
137
|
editable: true,
|
|
138
138
|
required: false,
|
|
139
|
-
defaultValue: "
|
|
139
|
+
defaultValue: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
|
|
140
140
|
formType: FORM_TYPES.string,
|
|
141
141
|
propType: PROP_TYPES.STRING,
|
|
142
142
|
},
|
|
@@ -215,9 +215,6 @@ const TEXT_FIELD_PROPS = {
|
|
|
215
215
|
formType: FORM_TYPES.boolean,
|
|
216
216
|
propType: PROP_TYPES.BOOLEAN,
|
|
217
217
|
},
|
|
218
|
-
};
|
|
219
|
-
const SEED_DATA_PROPS = {
|
|
220
|
-
...TEXT_FIELD_PROPS,
|
|
221
218
|
label: {
|
|
222
219
|
group: GROUPS.data,
|
|
223
220
|
label: "Label",
|
|
@@ -312,6 +309,10 @@ export const SEED_DATA = [
|
|
|
312
309
|
label: "Underline Color",
|
|
313
310
|
defaultValue: "light",
|
|
314
311
|
}),
|
|
312
|
+
activeBorderColor: createColorProp({
|
|
313
|
+
label: "Active Border Color",
|
|
314
|
+
defaultValue: "primary",
|
|
315
|
+
}),
|
|
315
316
|
secureTextEntry: {
|
|
316
317
|
group: GROUPS.basic,
|
|
317
318
|
label: "Password field",
|
|
@@ -344,10 +345,6 @@ export const SEED_DATA = [
|
|
|
344
345
|
triggers: SEED_DATA_TRIGGERS,
|
|
345
346
|
props: {
|
|
346
347
|
...SEED_DATA_PROPS,
|
|
347
|
-
placeholder: {
|
|
348
|
-
...TEXT_FIELD_PROPS.placeholder,
|
|
349
|
-
defaultValue: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
|
|
350
|
-
},
|
|
351
348
|
type: {
|
|
352
349
|
label: "Appearance",
|
|
353
350
|
description: "Type of Datepicker",
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
StylesPanelSections,
|
|
12
12
|
} from "@draftbit/types";
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const SEED_DATA_PROPS = {
|
|
15
15
|
allowFontScaling: {
|
|
16
16
|
group: GROUPS.advanced,
|
|
17
17
|
label: "Allow Font Scaling",
|
|
@@ -152,7 +152,8 @@ const TEXT_FIELD_PROPS = {
|
|
|
152
152
|
description: "The text that is shown on load when no value is available.",
|
|
153
153
|
editable: true,
|
|
154
154
|
required: false,
|
|
155
|
-
defaultValue:
|
|
155
|
+
defaultValue:
|
|
156
|
+
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
|
|
156
157
|
formType: FORM_TYPES.string,
|
|
157
158
|
propType: PROP_TYPES.STRING,
|
|
158
159
|
},
|
|
@@ -234,10 +235,6 @@ const TEXT_FIELD_PROPS = {
|
|
|
234
235
|
formType: FORM_TYPES.boolean,
|
|
235
236
|
propType: PROP_TYPES.BOOLEAN,
|
|
236
237
|
},
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
const SEED_DATA_PROPS = {
|
|
240
|
-
...TEXT_FIELD_PROPS,
|
|
241
238
|
label: {
|
|
242
239
|
group: GROUPS.data,
|
|
243
240
|
label: "Label",
|
|
@@ -334,6 +331,10 @@ export const SEED_DATA = [
|
|
|
334
331
|
label: "Underline Color",
|
|
335
332
|
defaultValue: "light",
|
|
336
333
|
}),
|
|
334
|
+
activeBorderColor: createColorProp({
|
|
335
|
+
label: "Active Border Color",
|
|
336
|
+
defaultValue: "primary",
|
|
337
|
+
}),
|
|
337
338
|
secureTextEntry: {
|
|
338
339
|
group: GROUPS.basic,
|
|
339
340
|
label: "Password field",
|
|
@@ -367,11 +368,6 @@ export const SEED_DATA = [
|
|
|
367
368
|
triggers: SEED_DATA_TRIGGERS,
|
|
368
369
|
props: {
|
|
369
370
|
...SEED_DATA_PROPS,
|
|
370
|
-
placeholder: {
|
|
371
|
-
...TEXT_FIELD_PROPS.placeholder,
|
|
372
|
-
defaultValue:
|
|
373
|
-
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
|
|
374
|
-
},
|
|
375
371
|
type: {
|
|
376
372
|
label: "Appearance",
|
|
377
373
|
description: "Type of Datepicker",
|