@draftbit/core 46.2.0 → 46.2.1-de631b.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.
- package/lib/commonjs/components/DatePicker/DatePickerComponentType.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/mappings/BlurView.js.map +1 -1
- package/lib/commonjs/mappings/NumberInput.js +241 -0
- package/lib/commonjs/mappings/NumberInput.js.map +1 -0
- package/lib/commonjs/mappings/RadioButton.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/mappings/TextArea.js +181 -2
- package/lib/commonjs/mappings/TextArea.js.map +1 -1
- package/lib/commonjs/mappings/TextField.js +191 -2
- package/lib/commonjs/mappings/TextField.js.map +1 -1
- package/lib/commonjs/mappings/TextInput.js +180 -29
- package/lib/commonjs/mappings/TextInput.js.map +1 -1
- package/lib/module/mappings/NumberInput.js +231 -0
- package/lib/module/mappings/NumberInput.js.map +1 -0
- package/lib/module/mappings/TextArea.js +182 -3
- package/lib/module/mappings/TextArea.js.map +1 -1
- package/lib/module/mappings/TextField.js +192 -3
- package/lib/module/mappings/TextField.js.map +1 -1
- package/lib/module/mappings/TextInput.js +180 -29
- package/lib/module/mappings/TextInput.js.map +1 -1
- package/lib/typescript/src/mappings/NumberInput.d.ts +297 -0
- package/lib/typescript/src/mappings/TextArea.d.ts +1 -11
- package/lib/typescript/src/mappings/TextField.d.ts +4 -4
- package/lib/typescript/src/mappings/TextInput.d.ts +3 -254
- package/package.json +3 -3
- package/src/mappings/NumberInput.js +248 -0
- package/src/mappings/NumberInput.ts +267 -0
- package/src/mappings/TextArea.js +210 -3
- package/src/mappings/TextArea.ts +216 -3
- package/src/mappings/TextField.js +220 -3
- package/src/mappings/TextField.ts +227 -3
- package/src/mappings/TextInput.js +208 -31
- package/src/mappings/TextInput.ts +214 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["DatePickerComponentType.
|
|
1
|
+
{"version":3,"names":[],"sources":["DatePickerComponentType.js"],"sourcesContent":["export {};\n"],"mappings":""}
|
|
@@ -13,6 +13,8 @@ var _Touchable = _interopRequireDefault(require("./Touchable"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
+
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); }
|
|
17
|
+
|
|
16
18
|
const getWidth = numColumns => {
|
|
17
19
|
switch (numColumns) {
|
|
18
20
|
case 1:
|
|
@@ -35,20 +37,6 @@ const Card = _ref => {
|
|
|
35
37
|
...rest
|
|
36
38
|
} = _ref;
|
|
37
39
|
const width = getWidth(numColumns);
|
|
38
|
-
return /*#__PURE__*/_react.default.createElement(_Touchable.default, {
|
|
39
|
-
disabled: !onPress,
|
|
40
|
-
onPress: onPress,
|
|
41
|
-
style: [style, {
|
|
42
|
-
width
|
|
43
|
-
}],
|
|
44
|
-
...rest
|
|
45
|
-
}, children);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
var _default = (0, _theming.withTheme)(Card);
|
|
49
|
-
|
|
50
|
-
exports.default = _default;
|
|
51
|
-
//# sourceMappingURL=DeprecatedCardWrapper.js.map = getWidth(numColumns);
|
|
52
40
|
return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
|
|
53
41
|
disabled: !onPress,
|
|
54
42
|
onPress: onPress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getWidth","numColumns","Card","children","onPress","style","rest","width","
|
|
1
|
+
{"version":3,"names":["getWidth","numColumns","Card","children","onPress","style","rest","width","withTheme"],"sources":["DeprecatedCardWrapper.tsx"],"sourcesContent":["import React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Touchable from \"./Touchable\";\nimport { StyleProp, ViewStyle } from \"react-native\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n numColumns?: number;\n children?: React.ReactNode;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: typeof theme;\n};\n\nconst getWidth = (numColumns: number) => {\n switch (numColumns) {\n case 1:\n return \"33%\";\n case 2:\n return \"50%\";\n default:\n return \"100%\";\n }\n};\n\nconst Card: React.FC<React.PropsWithChildren<Props>> = ({\n numColumns = 3,\n children,\n onPress,\n style,\n ...rest\n}) => {\n const width = getWidth(numColumns);\n return (\n <Touchable\n disabled={!onPress}\n onPress={onPress}\n style={[style, { width }]}\n {...rest}\n >\n {children}\n </Touchable>\n );\n};\n\nexport default withTheme(Card);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAYA,MAAMA,QAAQ,GAAIC,UAAD,IAAwB;EACvC,QAAQA,UAAR;IACE,KAAK,CAAL;MACE,OAAO,KAAP;;IACF,KAAK,CAAL;MACE,OAAO,KAAP;;IACF;MACE,OAAO,MAAP;EANJ;AAQD,CATD;;AAWA,MAAMC,IAA8C,GAAG,QAMjD;EAAA,IANkD;IACtDD,UAAU,GAAG,CADyC;IAEtDE,QAFsD;IAGtDC,OAHsD;IAItDC,KAJsD;IAKtD,GAAGC;EALmD,CAMlD;EACJ,MAAMC,KAAK,GAAGP,QAAQ,CAACC,UAAD,CAAtB;EACA,oBACE,6BAAC,kBAAD;IACE,QAAQ,EAAE,CAACG,OADb;IAEE,OAAO,EAAEA,OAFX;IAGE,KAAK,EAAE,CAACC,KAAD,EAAQ;MAAEE;IAAF,CAAR;EAHT,GAIMD,IAJN,GAMGH,QANH,CADF;AAUD,CAlBD;;eAoBe,IAAAK,kBAAA,EAAUN,IAAV,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","triggers","Triggers","OnPress","layout","textAlign","props","onPress","createActionProp","label","createTextProp","group","GROUPS","basic","defaultValue","color","createColorProp"],"sources":["ActionSheetItem.
|
|
1
|
+
{"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","triggers","Triggers","OnPress","layout","textAlign","props","onPress","createActionProp","label","createTextProp","group","GROUPS","basic","defaultValue","color","createColorProp"],"sources":["ActionSheetItem.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n createActionProp,\n createColorProp,\n createTextProp,\n GROUPS,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Action Sheet Item\",\n tag: \"ActionSheetItem\",\n description: \"Action Sheet item\",\n category: COMPONENT_TYPES.button,\n triggers: [Triggers.OnPress],\n layout: {\n textAlign: \"center\",\n },\n props: {\n onPress: createActionProp(),\n label: createTextProp({\n group: GROUPS.basic,\n label: \"Label\",\n defaultValue: \"Option\",\n }),\n color: createColorProp({\n label: \"Font Color\",\n defaultValue: \"strong\",\n }),\n },\n};\n"],"mappings":";;;;;;;AAAA;;AASO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,mBADiB;EAEvBC,GAAG,EAAE,iBAFkB;EAGvBC,WAAW,EAAE,mBAHU;EAIvBC,QAAQ,EAAEC,sBAAA,CAAgBC,MAJH;EAKvBC,QAAQ,EAAE,CAACC,eAAA,CAASC,OAAV,CALa;EAMvBC,MAAM,EAAE;IACNC,SAAS,EAAE;EADL,CANe;EASvBC,KAAK,EAAE;IACLC,OAAO,EAAE,IAAAC,uBAAA,GADJ;IAELC,KAAK,EAAE,IAAAC,qBAAA,EAAe;MACpBC,KAAK,EAAEC,aAAA,CAAOC,KADM;MAEpBJ,KAAK,EAAE,OAFa;MAGpBK,YAAY,EAAE;IAHM,CAAf,CAFF;IAOLC,KAAK,EAAE,IAAAC,sBAAA,EAAgB;MACrBP,KAAK,EAAE,YADc;MAErBK,YAAY,EAAE;IAFO,CAAhB;EAPF;AATgB,CAAlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SEED_DATA","name","tag","description","doc_link","code_link","category","COMPONENT_TYPES","layout","flexGrow","flexShrink","flexBasis","props","tint","label","editable","required","defaultValue","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","options","group","GROUPS","basic","intensity","number","NUMBER","min","max","step","precision"],"sources":["BlurView.
|
|
1
|
+
{"version":3,"names":["SEED_DATA","name","tag","description","doc_link","code_link","category","COMPONENT_TYPES","layout","flexGrow","flexShrink","flexBasis","props","tint","label","editable","required","defaultValue","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","options","group","GROUPS","basic","intensity","number","NUMBER","min","max","step","precision"],"sources":["BlurView.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n FORM_TYPES,\n PROP_TYPES,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Blur View\",\n tag: \"BlurView\",\n description: \"Expo Blur View\",\n doc_link: \"https://docs.expo.io/versions/latest/sdk/blur-view/\",\n code_link:\n \"https://github.com/expo/expo/blob/master/packages/expo/src/effects/BlurView.d.ts\",\n category: COMPONENT_TYPES.layout,\n layout: {\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: 0,\n },\n props: {\n tint: {\n label: \"Tint\",\n description: \"The tint of the blur view\",\n editable: true,\n required: true,\n defaultValue: \"default\",\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n options: [\"default\", \"light\", \"dark\"],\n group: GROUPS.basic,\n },\n intensity: {\n label: \"Intensity\",\n description:\n \"A number from 1 to 100 that controls the intensity of the blur effect\",\n editable: true,\n required: true,\n defaultValue: 50,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n min: 0,\n max: 100,\n step: 1,\n precision: 0,\n group: GROUPS.basic,\n },\n },\n};\n"],"mappings":";;;;;;;AAAA;;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
+
|
|
8
|
+
var _types = require("@draftbit/types");
|
|
9
|
+
|
|
10
|
+
const NUMBER_INPUT_PROPS = {
|
|
11
|
+
allowFontScaling: {
|
|
12
|
+
group: _types.GROUPS.advanced,
|
|
13
|
+
label: "Allow Font Scaling",
|
|
14
|
+
description: "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
|
|
15
|
+
editable: true,
|
|
16
|
+
required: false,
|
|
17
|
+
defaultValue: null,
|
|
18
|
+
formType: _types.FORM_TYPES.boolean,
|
|
19
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
20
|
+
},
|
|
21
|
+
autoFocus: {
|
|
22
|
+
group: _types.GROUPS.basic,
|
|
23
|
+
label: "Auto Focus",
|
|
24
|
+
description: "Focuses the input on load in and brings up the keyboard",
|
|
25
|
+
editable: true,
|
|
26
|
+
required: false,
|
|
27
|
+
defaultValue: null,
|
|
28
|
+
formType: _types.FORM_TYPES.boolean,
|
|
29
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
30
|
+
},
|
|
31
|
+
caretHidden: {
|
|
32
|
+
group: _types.GROUPS.advanced,
|
|
33
|
+
label: "Hide Caret",
|
|
34
|
+
description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
|
|
35
|
+
editable: true,
|
|
36
|
+
required: false,
|
|
37
|
+
defaultValue: null,
|
|
38
|
+
formType: _types.FORM_TYPES.boolean,
|
|
39
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
40
|
+
},
|
|
41
|
+
contextMenuHidden: {
|
|
42
|
+
group: _types.GROUPS.advanced,
|
|
43
|
+
label: "Hide Context Menu",
|
|
44
|
+
description: "Hides the system context menu (Default: false)",
|
|
45
|
+
editable: true,
|
|
46
|
+
required: false,
|
|
47
|
+
defaultValue: null,
|
|
48
|
+
formType: _types.FORM_TYPES.boolean,
|
|
49
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
50
|
+
},
|
|
51
|
+
editable: {
|
|
52
|
+
group: _types.GROUPS.advanced,
|
|
53
|
+
label: "Editable",
|
|
54
|
+
description: "If false, the text is not editable",
|
|
55
|
+
editable: true,
|
|
56
|
+
required: false,
|
|
57
|
+
defaultValue: true,
|
|
58
|
+
formType: _types.FORM_TYPES.boolean,
|
|
59
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
60
|
+
},
|
|
61
|
+
keyboardAppearance: {
|
|
62
|
+
group: _types.GROUPS.advanced,
|
|
63
|
+
label: "Keyboard Appearance",
|
|
64
|
+
description: "Determines the color of the keyboard.(iOS Only)",
|
|
65
|
+
editable: true,
|
|
66
|
+
required: false,
|
|
67
|
+
defaultValue: null,
|
|
68
|
+
options: ["default", "light", "dark"],
|
|
69
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
70
|
+
propType: _types.PROP_TYPES.STRING
|
|
71
|
+
},
|
|
72
|
+
keyboardType: {
|
|
73
|
+
group: _types.GROUPS.advanced,
|
|
74
|
+
label: "Keyboard Type",
|
|
75
|
+
description: "Determines what keyboard is given to the user.",
|
|
76
|
+
editable: true,
|
|
77
|
+
required: false,
|
|
78
|
+
defaultValue: null,
|
|
79
|
+
options: ["numeric", "numbers-and-punctuation", "number-pad"],
|
|
80
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
81
|
+
propType: _types.PROP_TYPES.STRING
|
|
82
|
+
},
|
|
83
|
+
maxLength: {
|
|
84
|
+
group: _types.GROUPS.basic,
|
|
85
|
+
label: "Max Length",
|
|
86
|
+
description: "Limits the input to a set number of characters.",
|
|
87
|
+
editable: true,
|
|
88
|
+
required: false,
|
|
89
|
+
defaultValue: null,
|
|
90
|
+
min: 0,
|
|
91
|
+
step: 1,
|
|
92
|
+
precision: 0,
|
|
93
|
+
formType: _types.FORM_TYPES.number,
|
|
94
|
+
propType: _types.PROP_TYPES.NUMBER
|
|
95
|
+
},
|
|
96
|
+
placeholder: {
|
|
97
|
+
group: _types.GROUPS.basic,
|
|
98
|
+
label: "Placeholder Text",
|
|
99
|
+
description: "The text that is shown on load when no value is available.",
|
|
100
|
+
editable: true,
|
|
101
|
+
required: false,
|
|
102
|
+
defaultValue: "Enter a number...",
|
|
103
|
+
formType: _types.FORM_TYPES.string,
|
|
104
|
+
propType: _types.PROP_TYPES.STRING
|
|
105
|
+
},
|
|
106
|
+
placeholderTextColor: {
|
|
107
|
+
group: _types.GROUPS.basic,
|
|
108
|
+
label: "Placeholder Text Color",
|
|
109
|
+
description: "The color of the placeholder text.",
|
|
110
|
+
editable: true,
|
|
111
|
+
required: false,
|
|
112
|
+
defaultValue: null,
|
|
113
|
+
formType: _types.FORM_TYPES.color,
|
|
114
|
+
propType: _types.PROP_TYPES.STRING
|
|
115
|
+
},
|
|
116
|
+
returnKeyLabel: {
|
|
117
|
+
group: _types.GROUPS.advanced,
|
|
118
|
+
label: "Return Key Label",
|
|
119
|
+
description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
|
|
120
|
+
editable: true,
|
|
121
|
+
required: false,
|
|
122
|
+
defaultValue: null,
|
|
123
|
+
formType: _types.FORM_TYPES.string,
|
|
124
|
+
propType: _types.PROP_TYPES.STRING
|
|
125
|
+
},
|
|
126
|
+
returnKeyType: {
|
|
127
|
+
group: _types.GROUPS.advanced,
|
|
128
|
+
label: "Return Key Type",
|
|
129
|
+
description: "Determines how the return key should look like",
|
|
130
|
+
editable: true,
|
|
131
|
+
required: false,
|
|
132
|
+
defaultValue: null,
|
|
133
|
+
options: ["done", "go", "next", "search", "send", "none", "previous", "default", "emergency-call", "google", "join", "route", "yahoo"],
|
|
134
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
135
|
+
propType: _types.PROP_TYPES.STRING
|
|
136
|
+
},
|
|
137
|
+
selectionColor: {
|
|
138
|
+
group: _types.GROUPS.advanced,
|
|
139
|
+
label: "Selection Color",
|
|
140
|
+
description: "Color of the highlighted portion when selecting.",
|
|
141
|
+
editable: true,
|
|
142
|
+
required: false,
|
|
143
|
+
defaultValue: null,
|
|
144
|
+
formType: _types.FORM_TYPES.color,
|
|
145
|
+
propType: _types.PROP_TYPES.STRING
|
|
146
|
+
},
|
|
147
|
+
selectTextOnFocus: {
|
|
148
|
+
group: _types.GROUPS.advanced,
|
|
149
|
+
label: "Select Text on Focus",
|
|
150
|
+
description: "If true, all the text will automatically be selected on focus",
|
|
151
|
+
editable: true,
|
|
152
|
+
required: false,
|
|
153
|
+
defaultValue: null,
|
|
154
|
+
formType: _types.FORM_TYPES.boolean,
|
|
155
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
const SEED_DATA_PROPS = {
|
|
159
|
+
style: {
|
|
160
|
+
group: _types.GROUPS.basic,
|
|
161
|
+
label: "Style",
|
|
162
|
+
description: "Text Style",
|
|
163
|
+
editable: false,
|
|
164
|
+
required: false,
|
|
165
|
+
formType: _types.FORM_TYPES.typeStyle,
|
|
166
|
+
propType: _types.PROP_TYPES.THEME,
|
|
167
|
+
defaultValue: null
|
|
168
|
+
},
|
|
169
|
+
clearButtonMode: {
|
|
170
|
+
group: _types.GROUPS.basic,
|
|
171
|
+
label: "Clear Button Mode",
|
|
172
|
+
description: "Enables a button within the textInput to clear the data entered",
|
|
173
|
+
editable: true,
|
|
174
|
+
required: false,
|
|
175
|
+
options: ["never", "while-editing", "unless-editing", "always"],
|
|
176
|
+
defaultValue: null,
|
|
177
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
178
|
+
propType: _types.PROP_TYPES.STRING
|
|
179
|
+
},
|
|
180
|
+
clearTextOnFocus: {
|
|
181
|
+
group: _types.GROUPS.basic,
|
|
182
|
+
label: "Clear Text on Focus",
|
|
183
|
+
description: "If true, clears the text field automatically when its focused.",
|
|
184
|
+
editable: true,
|
|
185
|
+
required: false,
|
|
186
|
+
defaultValue: null,
|
|
187
|
+
formType: _types.FORM_TYPES.boolean,
|
|
188
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
189
|
+
},
|
|
190
|
+
enablesReturnKeyAutomatically: {
|
|
191
|
+
group: _types.GROUPS.basic,
|
|
192
|
+
label: "Enables Return Key Automatically",
|
|
193
|
+
description: "If true, the keyboard disables the return key when there is no text and automatically enables it when there is (Default: false)",
|
|
194
|
+
editable: true,
|
|
195
|
+
required: false,
|
|
196
|
+
defaultValue: null,
|
|
197
|
+
formType: _types.FORM_TYPES.boolean,
|
|
198
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
199
|
+
},
|
|
200
|
+
underlineColorAndroid: {
|
|
201
|
+
group: _types.GROUPS.basic,
|
|
202
|
+
label: "Underline color",
|
|
203
|
+
description: "(Android Only) The color of the underline(the line underneath the text when finished typing.",
|
|
204
|
+
editable: true,
|
|
205
|
+
required: false,
|
|
206
|
+
defaultValue: null,
|
|
207
|
+
formType: _types.FORM_TYPES.color,
|
|
208
|
+
propType: _types.PROP_TYPES.THEME
|
|
209
|
+
},
|
|
210
|
+
fieldName: { ..._types.FIELD_NAME,
|
|
211
|
+
defaultValue: "numberInputValue",
|
|
212
|
+
handlerPropName: "onChangeText"
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
exports.SEED_DATA_PROPS = SEED_DATA_PROPS;
|
|
216
|
+
const SEED_DATA = [{
|
|
217
|
+
name: "Number Input",
|
|
218
|
+
tag: "NumberInput",
|
|
219
|
+
description: "An input field that allows users to type in data.",
|
|
220
|
+
category: _types.COMPONENT_TYPES.input,
|
|
221
|
+
preview_image_url: "https://res.cloudinary.com/altos/image/upload/draftbit/Jigsaw/TextInput.png",
|
|
222
|
+
supports_list_render: false,
|
|
223
|
+
layout: {
|
|
224
|
+
borderLeftWidth: 1,
|
|
225
|
+
borderRightWidth: 1,
|
|
226
|
+
borderTopWidth: 1,
|
|
227
|
+
borderBottomWidth: 1,
|
|
228
|
+
borderColor: "divider",
|
|
229
|
+
paddingLeft: 8,
|
|
230
|
+
paddingRight: 8,
|
|
231
|
+
paddingTop: 8,
|
|
232
|
+
paddingBottom: 8,
|
|
233
|
+
borderRadius: 8
|
|
234
|
+
},
|
|
235
|
+
triggers: [_types.Triggers.OnChangeText],
|
|
236
|
+
props: { ...SEED_DATA_PROPS,
|
|
237
|
+
...NUMBER_INPUT_PROPS
|
|
238
|
+
}
|
|
239
|
+
}];
|
|
240
|
+
exports.SEED_DATA = SEED_DATA;
|
|
241
|
+
//# sourceMappingURL=NumberInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NUMBER_INPUT_PROPS","allowFontScaling","group","GROUPS","advanced","label","description","editable","required","defaultValue","formType","FORM_TYPES","boolean","propType","PROP_TYPES","BOOLEAN","autoFocus","basic","caretHidden","contextMenuHidden","keyboardAppearance","options","flatArray","STRING","keyboardType","maxLength","min","step","precision","number","NUMBER","placeholder","string","placeholderTextColor","color","returnKeyLabel","returnKeyType","selectionColor","selectTextOnFocus","SEED_DATA_PROPS","style","typeStyle","THEME","clearButtonMode","clearTextOnFocus","enablesReturnKeyAutomatically","underlineColorAndroid","fieldName","FIELD_NAME","handlerPropName","SEED_DATA","name","tag","category","COMPONENT_TYPES","input","preview_image_url","supports_list_render","layout","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","borderColor","paddingLeft","paddingRight","paddingTop","paddingBottom","borderRadius","triggers","Triggers","OnChangeText","props"],"sources":["NumberInput.ts"],"sourcesContent":["import {\n GROUPS,\n COMPONENT_TYPES,\n FORM_TYPES,\n PROP_TYPES,\n FIELD_NAME,\n Triggers,\n} from \"@draftbit/types\";\n\nconst NUMBER_INPUT_PROPS = {\n allowFontScaling: {\n group: GROUPS.advanced,\n label: \"Allow Font Scaling\",\n description:\n \"Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)\",\n editable: true,\n required: false,\n defaultValue: null,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n },\n autoFocus: {\n group: GROUPS.basic,\n label: \"Auto Focus\",\n description: \"Focuses the input on load in and brings up the keyboard\",\n editable: true,\n required: false,\n defaultValue: null,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n },\n caretHidden: {\n group: GROUPS.advanced,\n label: \"Hide Caret\",\n description:\n \"Hides the caret(the line small line underneath each showing where you're editing/typing\",\n editable: true,\n required: false,\n defaultValue: null,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n },\n contextMenuHidden: {\n group: GROUPS.advanced,\n label: \"Hide Context Menu\",\n description: \"Hides the system context menu (Default: false)\",\n editable: true,\n required: false,\n defaultValue: null,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n },\n editable: {\n group: GROUPS.advanced,\n label: \"Editable\",\n description: \"If false, the text is not editable\",\n editable: true,\n required: false,\n defaultValue: true,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n },\n keyboardAppearance: {\n group: GROUPS.advanced,\n label: \"Keyboard Appearance\",\n description: \"Determines the color of the keyboard.(iOS Only)\",\n editable: true,\n required: false,\n defaultValue: null,\n options: [\"default\", \"light\", \"dark\"],\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n },\n keyboardType: {\n group: GROUPS.advanced,\n label: \"Keyboard Type\",\n description: \"Determines what keyboard is given to the user.\",\n editable: true,\n required: false,\n defaultValue: null,\n options: [\"numeric\", \"numbers-and-punctuation\", \"number-pad\"],\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n },\n maxLength: {\n group: GROUPS.basic,\n label: \"Max Length\",\n description: \"Limits the input to a set number of characters.\",\n editable: true,\n required: false,\n defaultValue: null,\n min: 0,\n step: 1,\n precision: 0,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n },\n placeholder: {\n group: GROUPS.basic,\n label: \"Placeholder Text\",\n description: \"The text that is shown on load when no value is available.\",\n editable: true,\n required: false,\n defaultValue: \"Enter a number...\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n },\n placeholderTextColor: {\n group: GROUPS.basic,\n label: \"Placeholder Text Color\",\n description: \"The color of the placeholder text.\",\n editable: true,\n required: false,\n defaultValue: null,\n formType: FORM_TYPES.color,\n propType: PROP_TYPES.STRING,\n },\n returnKeyLabel: {\n group: GROUPS.advanced,\n label: \"Return Key Label\",\n description:\n \"(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)\",\n editable: true,\n required: false,\n defaultValue: null,\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n },\n returnKeyType: {\n group: GROUPS.advanced,\n label: \"Return Key Type\",\n description: \"Determines how the return key should look like\",\n editable: true,\n required: false,\n defaultValue: null,\n options: [\n \"done\",\n \"go\",\n \"next\",\n \"search\",\n \"send\",\n \"none\",\n \"previous\",\n \"default\",\n \"emergency-call\",\n \"google\",\n \"join\",\n \"route\",\n \"yahoo\",\n ],\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n },\n selectionColor: {\n group: GROUPS.advanced,\n label: \"Selection Color\",\n description: \"Color of the highlighted portion when selecting.\",\n editable: true,\n required: false,\n defaultValue: null,\n formType: FORM_TYPES.color,\n propType: PROP_TYPES.STRING,\n },\n selectTextOnFocus: {\n group: GROUPS.advanced,\n label: \"Select Text on Focus\",\n description:\n \"If true, all the text will automatically be selected on focus\",\n editable: true,\n required: false,\n defaultValue: null,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n },\n};\n\nexport const SEED_DATA_PROPS = {\n style: {\n group: GROUPS.basic,\n label: \"Style\",\n description: \"Text Style\",\n editable: false,\n required: false,\n formType: FORM_TYPES.typeStyle,\n propType: PROP_TYPES.THEME,\n defaultValue: null,\n },\n clearButtonMode: {\n group: GROUPS.basic,\n label: \"Clear Button Mode\",\n description:\n \"Enables a button within the textInput to clear the data entered\",\n editable: true,\n required: false,\n options: [\"never\", \"while-editing\", \"unless-editing\", \"always\"],\n defaultValue: null,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n },\n clearTextOnFocus: {\n group: GROUPS.basic,\n label: \"Clear Text on Focus\",\n description:\n \"If true, clears the text field automatically when its focused.\",\n editable: true,\n required: false,\n defaultValue: null,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n },\n enablesReturnKeyAutomatically: {\n group: GROUPS.basic,\n label: \"Enables Return Key Automatically\",\n description:\n \"If true, the keyboard disables the return key when there is no text and automatically enables it when there is (Default: false)\",\n editable: true,\n required: false,\n defaultValue: null,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n },\n underlineColorAndroid: {\n group: GROUPS.basic,\n label: \"Underline color\",\n description:\n \"(Android Only) The color of the underline(the line underneath the text when finished typing.\",\n editable: true,\n required: false,\n defaultValue: null,\n formType: FORM_TYPES.color,\n propType: PROP_TYPES.THEME,\n },\n fieldName: {\n ...FIELD_NAME,\n defaultValue: \"numberInputValue\",\n handlerPropName: \"onChangeText\",\n },\n};\n\nexport const SEED_DATA = [\n {\n name: \"Number Input\",\n tag: \"NumberInput\",\n description: \"An input field that allows users to type in data.\",\n category: COMPONENT_TYPES.input,\n preview_image_url:\n \"https://res.cloudinary.com/altos/image/upload/draftbit/Jigsaw/TextInput.png\",\n supports_list_render: false,\n layout: {\n borderLeftWidth: 1,\n borderRightWidth: 1,\n borderTopWidth: 1,\n borderBottomWidth: 1,\n borderColor: \"divider\",\n paddingLeft: 8,\n paddingRight: 8,\n paddingTop: 8,\n paddingBottom: 8,\n borderRadius: 8,\n },\n triggers: [Triggers.OnChangeText],\n props: {\n ...SEED_DATA_PROPS,\n ...NUMBER_INPUT_PROPS,\n },\n },\n];\n"],"mappings":";;;;;;;AAAA;;AASA,MAAMA,kBAAkB,GAAG;EACzBC,gBAAgB,EAAE;IAChBC,KAAK,EAAEC,aAAA,CAAOC,QADE;IAEhBC,KAAK,EAAE,oBAFS;IAGhBC,WAAW,EACT,uGAJc;IAKhBC,QAAQ,EAAE,IALM;IAMhBC,QAAQ,EAAE,KANM;IAOhBC,YAAY,EAAE,IAPE;IAQhBC,QAAQ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MNC,WAAW,EAAE,CANP;IAONC,YAAY,EAAE,CAPR;IAQNC,UAAU,EAAE,CARN;IASNC,aAAa,EAAE,CATT;IAUNC,YAAY,EAAE;EAVR,CARV;EAoBEC,QAAQ,EAAE,CAACC,eAAA,CAASC,YAAV,CApBZ;EAqBEC,KAAK,EAAE,EACL,GAAGjC,eADE;IAEL,GAAGvC;EAFE;AArBT,CADuB,CAAlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","triggers","Triggers","OnPress","props","value","createTextProp","label","description","defaultValue","required","color","createColorProp","group","GROUPS","basic","unselectedColor","disabled","createBoolProp","size","createNumberProp","min","max","step","precision","selectedIcon","createIconProp","unselectedIcon"],"sources":["RadioButton.
|
|
1
|
+
{"version":3,"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","triggers","Triggers","OnPress","props","value","createTextProp","label","description","defaultValue","required","color","createColorProp","group","GROUPS","basic","unselectedColor","disabled","createBoolProp","size","createNumberProp","min","max","step","precision","selectedIcon","createIconProp","unselectedIcon"],"sources":["RadioButton.js"],"sourcesContent":["import { GROUPS, COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createIconProp, createTextProp, Triggers, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Radio Button\",\n tag: \"RadioButton\",\n category: COMPONENT_TYPES.input,\n triggers: [Triggers.OnPress],\n props: {\n value: createTextProp({\n label: \"Value\",\n description: \"Value of the radio button\",\n defaultValue: null,\n required: true,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n description: \"Color for the button\",\n defaultValue: \"primary\",\n }),\n unselectedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Unselected Color for the button\",\n defaultValue: \"primary\",\n }),\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Whether radio button is disabled\",\n }),\n size: createNumberProp({\n group: GROUPS.basic,\n label: \"Size\",\n description: \"Specifies the size of the button\",\n defaultValue: 24,\n min: 16,\n max: 128,\n step: 1,\n precision: 0,\n }),\n selectedIcon: createIconProp({\n label: \"Selected Icon\",\n description: \"Icon to show when the radio button is selected\",\n defaultValue: \"MaterialIcons/radio-button-checked\",\n }),\n unselectedIcon: createIconProp({\n label: \"Unselected Icon\",\n description: \"Icon to show when the radio button is unselected\",\n defaultValue: \"MaterialIcons/radio-button-unchecked\",\n }),\n },\n};\n"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;EACrBC,IAAI,EAAE,cADe;EAErBC,GAAG,EAAE,aAFgB;EAGrBC,QAAQ,EAAEC,sBAAA,CAAgBC,KAHL;EAIrBC,QAAQ,EAAE,CAACC,eAAA,CAASC,OAAV,CAJW;EAKrBC,KAAK,EAAE;IACHC,KAAK,EAAE,IAAAC,qBAAA,EAAe;MAClBC,KAAK,EAAE,OADW;MAElBC,WAAW,EAAE,2BAFK;MAGlBC,YAAY,EAAE,IAHI;MAIlBC,QAAQ,EAAE;IAJQ,CAAf,CADJ;IAOHC,KAAK,EAAE,IAAAC,sBAAA,EAAgB;MACnBC,KAAK,EAAEC,aAAA,CAAOC,KADK;MAEnBP,WAAW,EAAE,sBAFM;MAGnBC,YAAY,EAAE;IAHK,CAAhB,CAPJ;IAYHO,eAAe,EAAE,IAAAJ,sBAAA,EAAgB;MAC7BC,KAAK,EAAEC,aAAA,CAAOC,KADe;MAE7BR,KAAK,EAAE,kBAFsB;MAG7BC,WAAW,EAAE,iCAHgB;MAI7BC,YAAY,EAAE;IAJe,CAAhB,CAZd;IAkBHQ,QAAQ,EAAE,IAAAC,qBAAA,EAAe;MACrBX,KAAK,EAAE,UADc;MAErBC,WAAW,EAAE;IAFQ,CAAf,CAlBP;IAsBHW,IAAI,EAAE,IAAAC,uBAAA,EAAiB;MACnBP,KAAK,EAAEC,aAAA,CAAOC,KADK;MAEnBR,KAAK,EAAE,MAFY;MAGnBC,WAAW,EAAE,kCAHM;MAInBC,YAAY,EAAE,EAJK;MAKnBY,GAAG,EAAE,EALc;MAMnBC,GAAG,EAAE,GANc;MAOnBC,IAAI,EAAE,CAPa;MAQnBC,SAAS,EAAE;IARQ,CAAjB,CAtBH;IAgCHC,YAAY,EAAE,IAAAC,qBAAA,EAAe;MACzBnB,KAAK,EAAE,eADkB;MAEzBC,WAAW,EAAE,gDAFY;MAGzBC,YAAY,EAAE;IAHW,CAAf,CAhCX;IAqCHkB,cAAc,EAAE,IAAAD,qBAAA,EAAe;MAC3BnB,KAAK,EAAE,iBADoB;MAE3BC,WAAW,EAAE,kDAFc;MAG3BC,YAAY,EAAE;IAHa,CAAf;EArCb;AALc,CAAlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","props","label","createTextProp","description","required","defaultValue","direction","createTextEnumProp","options","value","color","createColorProp","group","GROUPS","basic","unselectedColor"],"sources":["RadioButtonRow.
|
|
1
|
+
{"version":3,"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","props","label","createTextProp","description","required","defaultValue","direction","createTextEnumProp","options","value","color","createColorProp","group","GROUPS","basic","unselectedColor"],"sources":["RadioButtonRow.ts"],"sourcesContent":["import {\n createTextProp,\n createTextEnumProp,\n COMPONENT_TYPES,\n createColorProp,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Radio Button Row\",\n tag: \"RadioButtonRow\",\n category: COMPONENT_TYPES.input,\n layout: {},\n props: {\n label: createTextProp({\n label: \"Label\",\n description: \"Label to show with the radio button\",\n required: true,\n defaultValue: \"First Option\",\n }),\n direction: createTextEnumProp({\n label: \"Direction\",\n description:\n \"Whether the checkbox will appear on the left or on the right\",\n options: [\"row\", \"row-reverse\"],\n }),\n value: createTextProp({\n label: \"Value\",\n description: \"Value of the radio button\",\n defaultValue: null,\n required: true,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n description: \"Color for the button\",\n defaultValue: \"primary\",\n }),\n unselectedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Unselected Color for the button\",\n defaultValue: \"primary\",\n }),\n },\n};\n"],"mappings":";;;;;;;AAAA;;AAQO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,kBADiB;EAEvBC,GAAG,EAAE,gBAFkB;EAGvBC,QAAQ,EAAEC,sBAAA,CAAgBC,KAHH;EAIvBC,MAAM,EAAE,EAJe;EAKvBC,KAAK,EAAE;IACLC,KAAK,EAAE,IAAAC,qBAAA,EAAe;MACpBD,KAAK,EAAE,OADa;MAEpBE,WAAW,EAAE,qCAFO;MAGpBC,QAAQ,EAAE,IAHU;MAIpBC,YAAY,EAAE;IAJM,CAAf,CADF;IAOLC,SAAS,EAAE,IAAAC,yBAAA,EAAmB;MAC5BN,KAAK,EAAE,WADqB;MAE5BE,WAAW,EACT,8DAH0B;MAI5BK,OAAO,EAAE,CAAC,KAAD,EAAQ,aAAR;IAJmB,CAAnB,CAPN;IAaLC,KAAK,EAAE,IAAAP,qBAAA,EAAe;MACpBD,KAAK,EAAE,OADa;MAEpBE,WAAW,EAAE,2BAFO;MAGpBE,YAAY,EAAE,IAHM;MAIpBD,QAAQ,EAAE;IAJU,CAAf,CAbF;IAmBLM,KAAK,EAAE,IAAAC,sBAAA,EAAgB;MACrBC,KAAK,EAAEC,aAAA,CAAOC,KADO;MAErBX,WAAW,EAAE,sBAFQ;MAGrBE,YAAY,EAAE;IAHO,CAAhB,CAnBF;IAwBLU,eAAe,EAAE,IAAAJ,sBAAA,EAAgB;MAC/BC,KAAK,EAAEC,aAAA,CAAOC,KADiB;MAE/Bb,KAAK,EAAE,kBAFwB;MAG/BE,WAAW,EAAE,iCAHkB;MAI/BE,YAAY,EAAE;IAJiB,CAAhB;EAxBZ;AALgB,CAAlB"}
|
|
@@ -7,6 +7,185 @@ exports.SEED_DATA = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _types = require("@draftbit/types");
|
|
9
9
|
|
|
10
|
+
const TEXT_AREA_PROPS = {
|
|
11
|
+
allowFontScaling: {
|
|
12
|
+
group: _types.GROUPS.advanced,
|
|
13
|
+
label: "Allow Font Scaling",
|
|
14
|
+
description: "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
|
|
15
|
+
editable: true,
|
|
16
|
+
required: false,
|
|
17
|
+
defaultValue: null,
|
|
18
|
+
formType: _types.FORM_TYPES.boolean,
|
|
19
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
20
|
+
},
|
|
21
|
+
autoCapitalize: {
|
|
22
|
+
group: _types.GROUPS.advanced,
|
|
23
|
+
label: "Auto Capitalize",
|
|
24
|
+
description: "Can automatically capitalize sentences, words, and characters (Default: none).",
|
|
25
|
+
editable: true,
|
|
26
|
+
required: false,
|
|
27
|
+
defaultValue: null,
|
|
28
|
+
options: ["none", "sentences", "words", "characters"],
|
|
29
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
30
|
+
propType: _types.PROP_TYPES.STRING
|
|
31
|
+
},
|
|
32
|
+
autoCorrect: {
|
|
33
|
+
group: _types.GROUPS.advanced,
|
|
34
|
+
label: "Auto Correct",
|
|
35
|
+
description: "Enables auto correction",
|
|
36
|
+
editable: true,
|
|
37
|
+
required: false,
|
|
38
|
+
defaultValue: null,
|
|
39
|
+
formType: _types.FORM_TYPES.boolean,
|
|
40
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
41
|
+
},
|
|
42
|
+
autoFocus: {
|
|
43
|
+
group: _types.GROUPS.basic,
|
|
44
|
+
label: "Auto Focus",
|
|
45
|
+
description: "Focuses the input on load in and brings up the keyboard",
|
|
46
|
+
editable: true,
|
|
47
|
+
required: false,
|
|
48
|
+
defaultValue: null,
|
|
49
|
+
formType: _types.FORM_TYPES.boolean,
|
|
50
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
51
|
+
},
|
|
52
|
+
caretHidden: {
|
|
53
|
+
group: _types.GROUPS.advanced,
|
|
54
|
+
label: "Hide Caret",
|
|
55
|
+
description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
|
|
56
|
+
editable: true,
|
|
57
|
+
required: false,
|
|
58
|
+
defaultValue: null,
|
|
59
|
+
formType: _types.FORM_TYPES.boolean,
|
|
60
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
61
|
+
},
|
|
62
|
+
contextMenuHidden: {
|
|
63
|
+
group: _types.GROUPS.advanced,
|
|
64
|
+
label: "Hide Context Menu",
|
|
65
|
+
description: "Hides the system context menu (Default: false)",
|
|
66
|
+
editable: true,
|
|
67
|
+
required: false,
|
|
68
|
+
defaultValue: null,
|
|
69
|
+
formType: _types.FORM_TYPES.boolean,
|
|
70
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
71
|
+
},
|
|
72
|
+
editable: {
|
|
73
|
+
group: _types.GROUPS.advanced,
|
|
74
|
+
label: "Editable",
|
|
75
|
+
description: "If false, the text is not editable",
|
|
76
|
+
editable: true,
|
|
77
|
+
required: false,
|
|
78
|
+
defaultValue: true,
|
|
79
|
+
formType: _types.FORM_TYPES.boolean,
|
|
80
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
81
|
+
},
|
|
82
|
+
keyboardAppearance: {
|
|
83
|
+
group: _types.GROUPS.advanced,
|
|
84
|
+
label: "Keyboard Appearance",
|
|
85
|
+
description: "Determines the color of the keyboard.(iOS Only)",
|
|
86
|
+
editable: true,
|
|
87
|
+
required: false,
|
|
88
|
+
defaultValue: null,
|
|
89
|
+
options: ["default", "light", "dark"],
|
|
90
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
91
|
+
propType: _types.PROP_TYPES.STRING
|
|
92
|
+
},
|
|
93
|
+
keyboardType: {
|
|
94
|
+
group: _types.GROUPS.advanced,
|
|
95
|
+
label: "Keyboard Type",
|
|
96
|
+
description: "Determines what keyboard is given to the user.",
|
|
97
|
+
editable: true,
|
|
98
|
+
required: false,
|
|
99
|
+
defaultValue: null,
|
|
100
|
+
options: ["default", "email-address", "numeric", "phone-pad", "ascii-capable", "numbers-and-punctuation", "url", "number-pad", "name-phone-pad", "decimal-pad", "twitter", "web-search", "visible-password"],
|
|
101
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
102
|
+
propType: _types.PROP_TYPES.STRING
|
|
103
|
+
},
|
|
104
|
+
maxLength: {
|
|
105
|
+
group: _types.GROUPS.basic,
|
|
106
|
+
label: "Max Length",
|
|
107
|
+
description: "Limits the input to a set number of characters.",
|
|
108
|
+
editable: true,
|
|
109
|
+
required: false,
|
|
110
|
+
defaultValue: null,
|
|
111
|
+
min: 0,
|
|
112
|
+
step: 1,
|
|
113
|
+
precision: 0,
|
|
114
|
+
formType: _types.FORM_TYPES.number,
|
|
115
|
+
propType: _types.PROP_TYPES.NUMBER
|
|
116
|
+
},
|
|
117
|
+
placeholder: {
|
|
118
|
+
group: _types.GROUPS.data,
|
|
119
|
+
label: "Placeholder Text",
|
|
120
|
+
description: "The text that is shown on load when no value is available.",
|
|
121
|
+
editable: true,
|
|
122
|
+
required: false,
|
|
123
|
+
defaultValue: "Enter a value...",
|
|
124
|
+
formType: _types.FORM_TYPES.string,
|
|
125
|
+
propType: _types.PROP_TYPES.STRING
|
|
126
|
+
},
|
|
127
|
+
placeholderTextColor: {
|
|
128
|
+
group: _types.GROUPS.basic,
|
|
129
|
+
label: "Placeholder Text Color",
|
|
130
|
+
description: "The color of the placeholder text.",
|
|
131
|
+
editable: true,
|
|
132
|
+
required: false,
|
|
133
|
+
defaultValue: null,
|
|
134
|
+
formType: _types.FORM_TYPES.color,
|
|
135
|
+
propType: _types.PROP_TYPES.STRING
|
|
136
|
+
},
|
|
137
|
+
returnKeyLabel: {
|
|
138
|
+
group: _types.GROUPS.advanced,
|
|
139
|
+
label: "Return Key Label",
|
|
140
|
+
description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
|
|
141
|
+
editable: true,
|
|
142
|
+
required: false,
|
|
143
|
+
defaultValue: null,
|
|
144
|
+
formType: _types.FORM_TYPES.string,
|
|
145
|
+
propType: _types.PROP_TYPES.STRING
|
|
146
|
+
},
|
|
147
|
+
returnKeyType: {
|
|
148
|
+
group: _types.GROUPS.advanced,
|
|
149
|
+
label: "Return Key Type",
|
|
150
|
+
description: "Determines how the return key should look like",
|
|
151
|
+
editable: true,
|
|
152
|
+
required: false,
|
|
153
|
+
defaultValue: null,
|
|
154
|
+
options: ["done", "go", "next", "search", "send", "none", "previous", "default", "emergency-call", "google", "join", "route", "yahoo"],
|
|
155
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
156
|
+
propType: _types.PROP_TYPES.STRING
|
|
157
|
+
},
|
|
158
|
+
secureTextEntry: {
|
|
159
|
+
group: _types.GROUPS.basic,
|
|
160
|
+
label: "Password Input?",
|
|
161
|
+
description: "Hides the characters with a *, useful for passwords and other sensitive information.",
|
|
162
|
+
editable: true,
|
|
163
|
+
required: false,
|
|
164
|
+
defaultValue: null,
|
|
165
|
+
formType: _types.FORM_TYPES.boolean,
|
|
166
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
167
|
+
},
|
|
168
|
+
selectionColor: {
|
|
169
|
+
group: _types.GROUPS.advanced,
|
|
170
|
+
label: "Selection Color",
|
|
171
|
+
description: "Color of the highlighted portion when selecting.",
|
|
172
|
+
editable: true,
|
|
173
|
+
required: false,
|
|
174
|
+
defaultValue: null,
|
|
175
|
+
formType: _types.FORM_TYPES.color,
|
|
176
|
+
propType: _types.PROP_TYPES.STRING
|
|
177
|
+
},
|
|
178
|
+
selectTextOnFocus: {
|
|
179
|
+
group: _types.GROUPS.advanced,
|
|
180
|
+
label: "Select Text on Focus",
|
|
181
|
+
description: "If true, all the text will automatically be selected on focus",
|
|
182
|
+
editable: true,
|
|
183
|
+
required: false,
|
|
184
|
+
defaultValue: null,
|
|
185
|
+
formType: _types.FORM_TYPES.boolean,
|
|
186
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
187
|
+
}
|
|
188
|
+
};
|
|
10
189
|
const SEED_DATA = {
|
|
11
190
|
name: "Text Area",
|
|
12
191
|
tag: "TextInput",
|
|
@@ -25,8 +204,8 @@ const SEED_DATA = {
|
|
|
25
204
|
borderRadius: 8
|
|
26
205
|
},
|
|
27
206
|
triggers: [_types.Triggers.OnChangeText],
|
|
28
|
-
props: { ...
|
|
29
|
-
placeholder: { ...
|
|
207
|
+
props: { ...TEXT_AREA_PROPS,
|
|
208
|
+
placeholder: { ...TEXT_AREA_PROPS.placeholder,
|
|
30
209
|
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."
|
|
31
210
|
},
|
|
32
211
|
multiline: {
|