@draftbit/core 46.4.1-f3a6f3.2 → 46.4.1

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 (192) hide show
  1. package/lib/commonjs/components/Justification.js +1 -5
  2. package/lib/commonjs/components/ResizeMode.js +1 -5
  3. package/lib/commonjs/mappings/Button.js +3 -11
  4. package/lib/commonjs/mappings/Image.js +15 -2
  5. package/lib/module/components/Justification.js +0 -1
  6. package/lib/module/components/ResizeMode.js +0 -1
  7. package/lib/module/mappings/Button.js +4 -12
  8. package/lib/module/mappings/Image.js +16 -3
  9. package/lib/typescript/src/mappings/Button.d.ts +16 -16
  10. package/lib/typescript/src/mappings/Image.d.ts +13 -0
  11. package/package.json +3 -3
  12. package/src/mappings/Button.ts +5 -13
  13. package/src/mappings/Image.ts +17 -0
  14. package/src/Provider.js +0 -9
  15. package/src/components/Accordion/AccordionGroup.js +0 -44
  16. package/src/components/Accordion/AccordionItem.js +0 -32
  17. package/src/components/Accordion/index.js +0 -2
  18. package/src/components/ActionSheet/ActionSheet.js +0 -45
  19. package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
  20. package/src/components/ActionSheet/ActionSheetItem.js +0 -30
  21. package/src/components/ActionSheet/index.js +0 -3
  22. package/src/components/AnimatedCircularProgress.js +0 -43
  23. package/src/components/AspectRatio.js +0 -18
  24. package/src/components/AvatarEdit.js +0 -30
  25. package/src/components/Banner.js +0 -109
  26. package/src/components/Button.js +0 -112
  27. package/src/components/Card.js +0 -57
  28. package/src/components/CardBlock.js +0 -54
  29. package/src/components/CardContainer.js +0 -69
  30. package/src/components/CardContainerRating.js +0 -79
  31. package/src/components/CardContainerShortImage.js +0 -33
  32. package/src/components/CardInline.js +0 -36
  33. package/src/components/Carousel.js +0 -68
  34. package/src/components/Checkbox/Checkbox.js +0 -63
  35. package/src/components/Checkbox/CheckboxGroup.js +0 -21
  36. package/src/components/Checkbox/CheckboxGroupRow.js +0 -77
  37. package/src/components/Checkbox/CheckboxRow.js +0 -78
  38. package/src/components/Checkbox/context.js +0 -14
  39. package/src/components/Checkbox/index.js +0 -3
  40. package/src/components/CircleImage.js +0 -8
  41. package/src/components/CircularProgress.js +0 -81
  42. package/src/components/Config.js +0 -64
  43. package/src/components/Container.js +0 -43
  44. package/src/components/DatePicker/DatePicker.js +0 -368
  45. package/src/components/DatePicker/DatePickerComponent.js +0 -13
  46. package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
  47. package/src/components/DatePicker/DatePickerComponentType.js +0 -1
  48. package/src/components/DeprecatedButton.js +0 -95
  49. package/src/components/DeprecatedCardWrapper.js +0 -18
  50. package/src/components/DeprecatedFAB.js +0 -115
  51. package/src/components/Divider.js +0 -13
  52. package/src/components/Elevation.js +0 -20
  53. package/src/components/FAB.js +0 -46
  54. package/src/components/FieldSearchBarFull.js +0 -53
  55. package/src/components/FormRow.js +0 -19
  56. package/src/components/Header.js +0 -44
  57. package/src/components/HeaderLarge.js +0 -7
  58. package/src/components/HeaderMedium.js +0 -7
  59. package/src/components/HeaderOverline.js +0 -7
  60. package/src/components/IconButton.js +0 -35
  61. package/src/components/Image.js +0 -47
  62. package/src/components/Justification.js +0 -1
  63. package/src/components/Layout.js +0 -50
  64. package/src/components/NumberInput.js +0 -49
  65. package/src/components/Picker/Picker.js +0 -267
  66. package/src/components/Picker/PickerComponent.android.js +0 -69
  67. package/src/components/Picker/PickerComponent.ios.js +0 -79
  68. package/src/components/Picker/PickerComponent.web.js +0 -70
  69. package/src/components/Picker/PickerTypes.js +0 -1
  70. package/src/components/Portal/Portal.js +0 -35
  71. package/src/components/Portal/PortalConsumer.js +0 -27
  72. package/src/components/Portal/PortalHost.js +0 -107
  73. package/src/components/Portal/PortalManager.js +0 -32
  74. package/src/components/ProgressBar.js +0 -118
  75. package/src/components/ProgressCircle.js +0 -13
  76. package/src/components/ProgressIndicator.js +0 -27
  77. package/src/components/RadioButton/RadioButton.js +0 -17
  78. package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
  79. package/src/components/RadioButton/RadioButtonGroup.js +0 -43
  80. package/src/components/RadioButton/RadioButtonRow.js +0 -76
  81. package/src/components/RadioButton/context.js +0 -14
  82. package/src/components/RadioButton/index.js +0 -4
  83. package/src/components/ResizeMode.js +0 -1
  84. package/src/components/Row.js +0 -48
  85. package/src/components/RowBodyIcon.js +0 -8
  86. package/src/components/RowHeadlineImageCaption.js +0 -12
  87. package/src/components/RowHeadlineImageIcon.js +0 -14
  88. package/src/components/SVG.js +0 -13
  89. package/src/components/ScreenContainer.js +0 -34
  90. package/src/components/Slider.js +0 -63
  91. package/src/components/StarRating.js +0 -50
  92. package/src/components/StepIndicator.js +0 -346
  93. package/src/components/Stepper.js +0 -39
  94. package/src/components/Surface.js +0 -32
  95. package/src/components/Swiper/Swiper.js +0 -29
  96. package/src/components/Swiper/SwiperItem.js +0 -9
  97. package/src/components/Swiper/index.js +0 -2
  98. package/src/components/Switch.js +0 -56
  99. package/src/components/Text.js +0 -27
  100. package/src/components/TextField.js +0 -423
  101. package/src/components/ToggleButton.js +0 -39
  102. package/src/components/Touchable.js +0 -12
  103. package/src/components/Touchable.web.js +0 -2
  104. package/src/components/Typography.js +0 -36
  105. package/src/components/useAuthState.js +0 -31
  106. package/src/constants.js +0 -10
  107. package/src/hooks.js +0 -12
  108. package/src/index.js +0 -53
  109. package/src/interfaces/Icon.js +0 -8
  110. package/src/mappings/Accordion.js +0 -41
  111. package/src/mappings/AccordionItem.js +0 -16
  112. package/src/mappings/ActionSheet.js +0 -13
  113. package/src/mappings/ActionSheetCancel.js +0 -19
  114. package/src/mappings/ActionSheetItem.js +0 -23
  115. package/src/mappings/ActivityIndicator.js +0 -58
  116. package/src/mappings/AudioPlayer.js +0 -20
  117. package/src/mappings/AvatarEdit.js +0 -38
  118. package/src/mappings/Banner.js +0 -32
  119. package/src/mappings/BlurView.js +0 -42
  120. package/src/mappings/Button.js +0 -74
  121. package/src/mappings/Card.js +0 -52
  122. package/src/mappings/CardBlock.js +0 -123
  123. package/src/mappings/CardContainer.js +0 -104
  124. package/src/mappings/CardContainerRating.js +0 -126
  125. package/src/mappings/CardContainerShortImage.js +0 -120
  126. package/src/mappings/CardInline.js +0 -52
  127. package/src/mappings/Carousel.js +0 -19
  128. package/src/mappings/Checkbox.js +0 -46
  129. package/src/mappings/CheckboxGroup.js +0 -26
  130. package/src/mappings/CheckboxRow.js +0 -61
  131. package/src/mappings/CircleImage.js +0 -25
  132. package/src/mappings/Container.js +0 -30
  133. package/src/mappings/CustomCode.js +0 -8
  134. package/src/mappings/DatePicker.js +0 -157
  135. package/src/mappings/Divider.js +0 -27
  136. package/src/mappings/FAB.js +0 -37
  137. package/src/mappings/Fetch.js +0 -13
  138. package/src/mappings/FieldSearchBarFull.js +0 -50
  139. package/src/mappings/FlashList.js +0 -33
  140. package/src/mappings/FlatList.js +0 -24
  141. package/src/mappings/HeaderLarge.js +0 -29
  142. package/src/mappings/HeaderMedium.js +0 -55
  143. package/src/mappings/HeaderOverline.js +0 -55
  144. package/src/mappings/Icon.js +0 -32
  145. package/src/mappings/IconButton.js +0 -35
  146. package/src/mappings/Image.js +0 -21
  147. package/src/mappings/ImageBackground.js +0 -29
  148. package/src/mappings/KeyboardAvoidingView.js +0 -41
  149. package/src/mappings/KeyboardAwareScrollView.js +0 -50
  150. package/src/mappings/Layout.js +0 -200
  151. package/src/mappings/LinearGradient.js +0 -77
  152. package/src/mappings/MapCallout.js +0 -21
  153. package/src/mappings/MapMarker.js +0 -47
  154. package/src/mappings/MapView.js +0 -139
  155. package/src/mappings/Modal.js +0 -42
  156. package/src/mappings/NumberInput.js +0 -254
  157. package/src/mappings/Picker.js +0 -148
  158. package/src/mappings/ProgressBar.js +0 -101
  159. package/src/mappings/ProgressCircle.js +0 -109
  160. package/src/mappings/ProgressIndicator.js +0 -181
  161. package/src/mappings/RadioButton.js +0 -51
  162. package/src/mappings/RadioButtonGroup.js +0 -17
  163. package/src/mappings/RadioButtonRow.js +0 -42
  164. package/src/mappings/RowBodyIcon.js +0 -75
  165. package/src/mappings/RowHeadlineImageCaption.js +0 -167
  166. package/src/mappings/RowHeadlineImageIcon.js +0 -99
  167. package/src/mappings/SVG.js +0 -20
  168. package/src/mappings/SafeAreaView.js +0 -33
  169. package/src/mappings/ScrollView.js +0 -31
  170. package/src/mappings/Slider.js +0 -60
  171. package/src/mappings/StarRating.js +0 -43
  172. package/src/mappings/Stepper.js +0 -29
  173. package/src/mappings/Surface.js +0 -14
  174. package/src/mappings/Swiper.js +0 -60
  175. package/src/mappings/SwiperItem.js +0 -8
  176. package/src/mappings/Switch.js +0 -81
  177. package/src/mappings/Text.js +0 -251
  178. package/src/mappings/TextArea.js +0 -263
  179. package/src/mappings/TextField.js +0 -381
  180. package/src/mappings/TextInput.js +0 -391
  181. package/src/mappings/ToggleButton.js +0 -50
  182. package/src/mappings/Touchable.js +0 -17
  183. package/src/mappings/Video.js +0 -81
  184. package/src/mappings/View.js +0 -207
  185. package/src/mappings/WebView.js +0 -88
  186. package/src/styles/DarkTheme.js +0 -26
  187. package/src/styles/DefaultTheme.js +0 -111
  188. package/src/styles/fonts.js +0 -62
  189. package/src/styles/overlay.js +0 -60
  190. package/src/styles/shadow.js +0 -51
  191. package/src/theming.js +0 -3
  192. package/src/utilities.js +0 -102
@@ -1,263 +0,0 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Text Area",
4
- tag: "TextInput",
5
- description: "An input field that allows for multiple lines.",
6
- category: COMPONENT_TYPES.input,
7
- layout: {
8
- borderLeftWidth: 1,
9
- borderRightWidth: 1,
10
- borderTopWidth: 1,
11
- borderBottomWidth: 1,
12
- borderColor: "divider",
13
- paddingLeft: 8,
14
- paddingRight: 8,
15
- paddingTop: 8,
16
- paddingBottom: 8,
17
- borderRadius: 8,
18
- },
19
- triggers: [Triggers.OnChangeText],
20
- props: {
21
- allowFontScaling: {
22
- group: GROUPS.advanced,
23
- label: "Allow Font Scaling",
24
- description: "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
25
- editable: true,
26
- required: false,
27
- defaultValue: null,
28
- formType: FORM_TYPES.boolean,
29
- propType: PROP_TYPES.BOOLEAN,
30
- },
31
- autoCapitalize: {
32
- group: GROUPS.advanced,
33
- label: "Auto Capitalize",
34
- description: "Can automatically capitalize sentences, words, and characters (Default: none).",
35
- editable: true,
36
- required: false,
37
- defaultValue: null,
38
- options: ["none", "sentences", "words", "characters"],
39
- formType: FORM_TYPES.flatArray,
40
- propType: PROP_TYPES.STRING,
41
- },
42
- autoCorrect: {
43
- group: GROUPS.advanced,
44
- label: "Auto Correct",
45
- description: "Enables auto correction",
46
- editable: true,
47
- required: false,
48
- defaultValue: null,
49
- formType: FORM_TYPES.boolean,
50
- propType: PROP_TYPES.BOOLEAN,
51
- },
52
- autoFocus: {
53
- group: GROUPS.basic,
54
- label: "Auto Focus",
55
- description: "Focuses the input on load in and brings up the keyboard",
56
- editable: true,
57
- required: false,
58
- defaultValue: null,
59
- formType: FORM_TYPES.boolean,
60
- propType: PROP_TYPES.BOOLEAN,
61
- },
62
- caretHidden: {
63
- group: GROUPS.advanced,
64
- label: "Hide Caret",
65
- description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
66
- editable: true,
67
- required: false,
68
- defaultValue: null,
69
- formType: FORM_TYPES.boolean,
70
- propType: PROP_TYPES.BOOLEAN,
71
- },
72
- contextMenuHidden: {
73
- group: GROUPS.advanced,
74
- label: "Hide Context Menu",
75
- description: "Hides the system context menu (Default: false)",
76
- editable: true,
77
- required: false,
78
- defaultValue: null,
79
- formType: FORM_TYPES.boolean,
80
- propType: PROP_TYPES.BOOLEAN,
81
- },
82
- editable: {
83
- group: GROUPS.advanced,
84
- label: "Editable",
85
- description: "If false, the text is not editable",
86
- editable: true,
87
- required: false,
88
- defaultValue: true,
89
- formType: FORM_TYPES.boolean,
90
- propType: PROP_TYPES.BOOLEAN,
91
- },
92
- keyboardAppearance: {
93
- group: GROUPS.advanced,
94
- label: "Keyboard Appearance",
95
- description: "Determines the color of the keyboard.(iOS Only)",
96
- editable: true,
97
- required: false,
98
- defaultValue: null,
99
- options: ["default", "light", "dark"],
100
- formType: FORM_TYPES.flatArray,
101
- propType: PROP_TYPES.STRING,
102
- },
103
- keyboardType: {
104
- group: GROUPS.advanced,
105
- label: "Keyboard Type",
106
- description: "Determines what keyboard is given to the user.",
107
- editable: true,
108
- required: false,
109
- defaultValue: null,
110
- options: [
111
- "default",
112
- "email-address",
113
- "numeric",
114
- "phone-pad",
115
- "ascii-capable",
116
- "numbers-and-punctuation",
117
- "url",
118
- "number-pad",
119
- "name-phone-pad",
120
- "decimal-pad",
121
- "twitter",
122
- "web-search",
123
- "visible-password",
124
- ],
125
- formType: FORM_TYPES.flatArray,
126
- propType: PROP_TYPES.STRING,
127
- },
128
- maxLength: {
129
- group: GROUPS.basic,
130
- label: "Max Length",
131
- description: "Limits the input to a set number of characters.",
132
- editable: true,
133
- required: false,
134
- defaultValue: null,
135
- min: 0,
136
- step: 1,
137
- precision: 0,
138
- formType: FORM_TYPES.number,
139
- propType: PROP_TYPES.NUMBER,
140
- },
141
- placeholder: {
142
- group: GROUPS.data,
143
- label: "Placeholder Text",
144
- description: "The text that is shown on load when no value is available.",
145
- editable: true,
146
- required: false,
147
- 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.",
148
- formType: FORM_TYPES.string,
149
- propType: PROP_TYPES.STRING,
150
- },
151
- placeholderTextColor: {
152
- group: GROUPS.basic,
153
- label: "Placeholder Text Color",
154
- description: "The color of the placeholder text.",
155
- editable: true,
156
- required: false,
157
- defaultValue: null,
158
- formType: FORM_TYPES.color,
159
- propType: PROP_TYPES.STRING,
160
- },
161
- returnKeyLabel: {
162
- group: GROUPS.advanced,
163
- label: "Return Key Label",
164
- description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
165
- editable: true,
166
- required: false,
167
- defaultValue: null,
168
- formType: FORM_TYPES.string,
169
- propType: PROP_TYPES.STRING,
170
- },
171
- returnKeyType: {
172
- group: GROUPS.advanced,
173
- label: "Return Key Type",
174
- description: "Determines how the return key should look like",
175
- editable: true,
176
- required: false,
177
- defaultValue: null,
178
- options: [
179
- "done",
180
- "go",
181
- "next",
182
- "search",
183
- "send",
184
- "none",
185
- "previous",
186
- "default",
187
- "emergency-call",
188
- "google",
189
- "join",
190
- "route",
191
- "yahoo",
192
- ],
193
- formType: FORM_TYPES.flatArray,
194
- propType: PROP_TYPES.STRING,
195
- },
196
- secureTextEntry: {
197
- group: GROUPS.basic,
198
- label: "Password Input?",
199
- description: "Hides the characters with a *, useful for passwords and other sensitive information.",
200
- editable: true,
201
- required: false,
202
- defaultValue: null,
203
- formType: FORM_TYPES.boolean,
204
- propType: PROP_TYPES.BOOLEAN,
205
- },
206
- selectionColor: {
207
- group: GROUPS.advanced,
208
- label: "Selection Color",
209
- description: "Color of the highlighted portion when selecting.",
210
- editable: true,
211
- required: false,
212
- defaultValue: null,
213
- formType: FORM_TYPES.color,
214
- propType: PROP_TYPES.STRING,
215
- },
216
- selectTextOnFocus: {
217
- group: GROUPS.advanced,
218
- label: "Select Text on Focus",
219
- description: "If true, all the text will automatically be selected on focus",
220
- editable: true,
221
- required: false,
222
- defaultValue: null,
223
- formType: FORM_TYPES.boolean,
224
- propType: PROP_TYPES.BOOLEAN,
225
- },
226
- textAlignVertical: {
227
- group: GROUPS.advanced,
228
- label: "Aligns text on the vertical axis",
229
- description: "Move the text around in the given component.",
230
- options: ["auto", "top", "bottom", "center"],
231
- editable: true,
232
- required: false,
233
- defaultValue: "top",
234
- formType: FORM_TYPES.flatArray,
235
- propType: PROP_TYPES.STRING,
236
- },
237
- multiline: {
238
- label: "Multiline",
239
- description: "Multiline",
240
- group: GROUPS.uncategorized,
241
- formType: FORM_TYPES.boolean,
242
- propType: PROP_TYPES.BOOLEAN,
243
- defaultValue: true,
244
- editable: true,
245
- required: false,
246
- },
247
- numberOfLines: {
248
- label: "Number Of Lines",
249
- description: "Number Of Lines",
250
- group: GROUPS.basic,
251
- formType: FORM_TYPES.number,
252
- propType: PROP_TYPES.NUMBER,
253
- defaultValue: 4,
254
- editable: true,
255
- required: false,
256
- },
257
- fieldName: {
258
- ...FIELD_NAME,
259
- defaultValue: "textInputValue",
260
- handlerPropName: "onChangeText",
261
- },
262
- },
263
- };
@@ -1,381 +0,0 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, createColorProp, createNumberProp, createFieldNameProp, StylesPanelSections, } from "@draftbit/types";
2
- const SEED_DATA_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
- autoCapitalize: {
14
- group: GROUPS.advanced,
15
- label: "Auto Capitalize",
16
- description: "Can automatically capitalize sentences, words, and characters (Default: none).",
17
- editable: true,
18
- required: false,
19
- defaultValue: null,
20
- options: ["none", "sentences", "words", "characters"],
21
- formType: FORM_TYPES.flatArray,
22
- propType: PROP_TYPES.STRING,
23
- },
24
- autoCorrect: {
25
- group: GROUPS.advanced,
26
- label: "Auto Correct",
27
- description: "Enables auto correction",
28
- editable: true,
29
- required: false,
30
- defaultValue: null,
31
- formType: FORM_TYPES.boolean,
32
- propType: PROP_TYPES.BOOLEAN,
33
- },
34
- autoFocus: {
35
- group: GROUPS.basic,
36
- label: "Auto Focus",
37
- description: "Focuses the input on load in and brings up the keyboard",
38
- editable: true,
39
- required: false,
40
- defaultValue: null,
41
- formType: FORM_TYPES.boolean,
42
- propType: PROP_TYPES.BOOLEAN,
43
- },
44
- caretHidden: {
45
- group: GROUPS.advanced,
46
- label: "Hide Caret",
47
- description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
48
- editable: true,
49
- required: false,
50
- defaultValue: null,
51
- formType: FORM_TYPES.boolean,
52
- propType: PROP_TYPES.BOOLEAN,
53
- },
54
- contextMenuHidden: {
55
- group: GROUPS.advanced,
56
- label: "Hide Context Menu",
57
- description: "Hides the system context menu (Default: false)",
58
- editable: true,
59
- required: false,
60
- defaultValue: null,
61
- formType: FORM_TYPES.boolean,
62
- propType: PROP_TYPES.BOOLEAN,
63
- },
64
- disabled: {
65
- group: GROUPS.basic,
66
- label: "Disabled",
67
- description: "Whether the input should be disabled. Will prevent input and show a greyed out state.",
68
- formType: FORM_TYPES.boolean,
69
- propType: PROP_TYPES.BOOLEAN,
70
- defaultValue: false,
71
- editable: true,
72
- required: false,
73
- },
74
- editable: {
75
- group: GROUPS.advanced,
76
- label: "Editable",
77
- description: "If false, the text is not editable",
78
- editable: true,
79
- required: false,
80
- defaultValue: true,
81
- formType: FORM_TYPES.boolean,
82
- propType: PROP_TYPES.BOOLEAN,
83
- },
84
- keyboardAppearance: {
85
- group: GROUPS.advanced,
86
- label: "Keyboard Appearance",
87
- description: "Determines the color of the keyboard.(iOS Only)",
88
- editable: true,
89
- required: false,
90
- defaultValue: null,
91
- options: ["default", "light", "dark"],
92
- formType: FORM_TYPES.flatArray,
93
- propType: PROP_TYPES.STRING,
94
- },
95
- keyboardType: {
96
- group: GROUPS.advanced,
97
- label: "Keyboard Type",
98
- description: "Determines what keyboard is given to the user.",
99
- editable: true,
100
- required: false,
101
- defaultValue: null,
102
- options: [
103
- "default",
104
- "email-address",
105
- "numeric",
106
- "phone-pad",
107
- "ascii-capable",
108
- "numbers-and-punctuation",
109
- "url",
110
- "number-pad",
111
- "name-phone-pad",
112
- "decimal-pad",
113
- "twitter",
114
- "web-search",
115
- "visible-password",
116
- ],
117
- formType: FORM_TYPES.flatArray,
118
- propType: PROP_TYPES.STRING,
119
- },
120
- maxLength: {
121
- group: GROUPS.basic,
122
- label: "Max Length",
123
- description: "Limits the input to a set number of characters.",
124
- editable: true,
125
- required: false,
126
- defaultValue: null,
127
- min: 0,
128
- step: 1,
129
- precision: 0,
130
- formType: FORM_TYPES.number,
131
- propType: PROP_TYPES.NUMBER,
132
- },
133
- placeholder: {
134
- group: GROUPS.data,
135
- label: "Placeholder Text",
136
- description: "The text that is shown on load when no value is available.",
137
- editable: true,
138
- required: false,
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
- formType: FORM_TYPES.string,
141
- propType: PROP_TYPES.STRING,
142
- },
143
- placeholderTextColor: {
144
- group: GROUPS.basic,
145
- label: "Placeholder Text Color",
146
- description: "The color of the placeholder text.",
147
- editable: true,
148
- required: false,
149
- defaultValue: null,
150
- formType: FORM_TYPES.color,
151
- propType: PROP_TYPES.STRING,
152
- },
153
- returnKeyLabel: {
154
- group: GROUPS.advanced,
155
- label: "Return Key Label",
156
- description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
157
- editable: true,
158
- required: false,
159
- defaultValue: null,
160
- formType: FORM_TYPES.string,
161
- propType: PROP_TYPES.STRING,
162
- },
163
- returnKeyType: {
164
- group: GROUPS.advanced,
165
- label: "Return Key Type",
166
- description: "Determines how the return key should look like",
167
- editable: true,
168
- required: false,
169
- defaultValue: null,
170
- options: [
171
- "done",
172
- "go",
173
- "next",
174
- "search",
175
- "send",
176
- "none",
177
- "previous",
178
- "default",
179
- "emergency-call",
180
- "google",
181
- "join",
182
- "route",
183
- "yahoo",
184
- ],
185
- formType: FORM_TYPES.flatArray,
186
- propType: PROP_TYPES.STRING,
187
- },
188
- secureTextEntry: {
189
- group: GROUPS.basic,
190
- label: "Password Input?",
191
- description: "Hides the characters with a *, useful for passwords and other sensitive information.",
192
- editable: true,
193
- required: false,
194
- defaultValue: null,
195
- formType: FORM_TYPES.boolean,
196
- propType: PROP_TYPES.BOOLEAN,
197
- },
198
- selectionColor: {
199
- group: GROUPS.advanced,
200
- label: "Selection Color",
201
- description: "Color of the highlighted portion when selecting.",
202
- editable: true,
203
- required: false,
204
- defaultValue: null,
205
- formType: FORM_TYPES.color,
206
- propType: PROP_TYPES.STRING,
207
- },
208
- selectTextOnFocus: {
209
- group: GROUPS.advanced,
210
- label: "Select Text on Focus",
211
- description: "If true, all the text will automatically be selected on focus",
212
- editable: true,
213
- required: false,
214
- defaultValue: null,
215
- formType: FORM_TYPES.boolean,
216
- propType: PROP_TYPES.BOOLEAN,
217
- },
218
- label: {
219
- group: GROUPS.data,
220
- label: "Label",
221
- description: "The label to be displayed on the text field",
222
- formType: FORM_TYPES.string,
223
- propType: PROP_TYPES.STRING,
224
- defaultValue: null,
225
- editable: true,
226
- required: true,
227
- },
228
- assistiveText: {
229
- group: GROUPS.basic,
230
- label: "Assistive text",
231
- description: "Helper text to display below the input",
232
- formType: FORM_TYPES.string,
233
- propType: PROP_TYPES.STRING,
234
- defaultValue: null,
235
- editable: true,
236
- required: false,
237
- },
238
- error: {
239
- group: GROUPS.data,
240
- label: "Error",
241
- description: "Whether the input should display the error state",
242
- formType: FORM_TYPES.boolean,
243
- propType: PROP_TYPES.BOOLEAN,
244
- defaultValue: null,
245
- editable: true,
246
- required: false,
247
- },
248
- leftIconName: {
249
- group: GROUPS.basic,
250
- label: "Left icon name",
251
- description: "The icon to display on the left",
252
- formType: FORM_TYPES.icon,
253
- propType: PROP_TYPES.ASSET,
254
- defaultValue: null,
255
- editable: true,
256
- required: false,
257
- },
258
- leftIconMode: {
259
- group: GROUPS.basic,
260
- label: "Left icon mode",
261
- description: "The mode of the icon to display on the left. 'inset' or 'outset'.",
262
- formType: FORM_TYPES.flatArray,
263
- propType: PROP_TYPES.STRING,
264
- defaultValue: null /* inset */,
265
- options: ["inset", "outset"],
266
- editable: true,
267
- required: true,
268
- },
269
- rightIconName: {
270
- group: GROUPS.basic,
271
- label: "Right icon name",
272
- description: "The icon to display on the right",
273
- formType: FORM_TYPES.icon,
274
- propType: PROP_TYPES.ASSET,
275
- defaultValue: null,
276
- editable: true,
277
- required: false,
278
- },
279
- fieldName: {
280
- ...FIELD_NAME,
281
- handlerPropName: "onChangeText",
282
- defaultValue: "textFieldValue",
283
- },
284
- };
285
- const SEED_DATA_TRIGGERS = [Triggers.OnChangeText];
286
- export const SEED_DATA = [
287
- {
288
- name: "Styled Text Field",
289
- tag: "TextField",
290
- description: "A text input with a solid border or underline",
291
- category: COMPONENT_TYPES.input,
292
- preview_image_url: "{CLOUDINARY_URL}/Textfield.png",
293
- supports_list_render: false,
294
- triggers: SEED_DATA_TRIGGERS,
295
- props: {
296
- ...SEED_DATA_PROPS,
297
- type: {
298
- label: "Appearance",
299
- description: "Type of Datepicker",
300
- formType: FORM_TYPES.flatArray,
301
- propType: PROP_TYPES.STRING,
302
- defaultValue: "solid",
303
- options: ["solid", "underline"],
304
- editable: true,
305
- required: true,
306
- group: GROUPS.basic,
307
- },
308
- underlineColor: createColorProp({
309
- label: "Underline Color",
310
- defaultValue: "light",
311
- }),
312
- activeBorderColor: createColorProp({
313
- label: "Active Border Color",
314
- defaultValue: "primary",
315
- }),
316
- secureTextEntry: {
317
- group: GROUPS.basic,
318
- label: "Password field",
319
- description: "If true, this turns the field into a password field, hiding the text",
320
- formType: FORM_TYPES.boolean,
321
- propType: PROP_TYPES.BOOLEAN,
322
- defaultValue: null,
323
- editable: true,
324
- required: false,
325
- },
326
- },
327
- layout: {},
328
- },
329
- {
330
- name: "Styled Text Area",
331
- tag: "TextField",
332
- description: "A text area with a solid border or underline",
333
- category: COMPONENT_TYPES.input,
334
- stylesPanelSections: [
335
- StylesPanelSections.Typography,
336
- StylesPanelSections.Background,
337
- StylesPanelSections.Size,
338
- StylesPanelSections.MarginsAndPaddings,
339
- StylesPanelSections.Position,
340
- StylesPanelSections.Borders,
341
- StylesPanelSections.Effects,
342
- ],
343
- preview_image_url: "{CLOUDINARY_URL}/TextArea.png",
344
- supports_list_render: false,
345
- triggers: SEED_DATA_TRIGGERS,
346
- props: {
347
- ...SEED_DATA_PROPS,
348
- type: {
349
- label: "Appearance",
350
- description: "Type of Datepicker",
351
- formType: FORM_TYPES.flatArray,
352
- propType: PROP_TYPES.STRING,
353
- defaultValue: "solid",
354
- options: ["solid", "underline"],
355
- editable: true,
356
- required: true,
357
- group: GROUPS.basic,
358
- },
359
- multiline: {
360
- label: "Multiline",
361
- description: "Multiline",
362
- group: GROUPS.uncategorized,
363
- formType: FORM_TYPES.boolean,
364
- propType: PROP_TYPES.BOOLEAN,
365
- defaultValue: true,
366
- editable: false,
367
- required: false,
368
- },
369
- numberOfLines: createNumberProp({
370
- label: "Number of Lines",
371
- description: "Number of Lines for Multiline Field",
372
- defaultValue: 4,
373
- group: GROUPS.basic,
374
- }),
375
- fieldName: createFieldNameProp({
376
- defaultValue: "textAreaValue",
377
- }),
378
- },
379
- layout: {},
380
- },
381
- ];