@draftbit/core 46.1.4-e6469c.0 → 46.2.1-327d47.2
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/ActionSheet/index.js.map +1 -1
- package/lib/commonjs/components/CardBlock.js +15 -5
- package/lib/commonjs/components/CardBlock.js.map +1 -1
- package/lib/commonjs/components/Carousel.js +3 -1
- package/lib/commonjs/components/Carousel.js.map +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.js +2 -4
- package/lib/commonjs/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -6
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/Checkbox/context.js.map +1 -1
- package/lib/commonjs/components/CircleImage.js +17 -3
- package/lib/commonjs/components/CircleImage.js.map +1 -1
- package/lib/commonjs/components/Config.js +3 -3
- package/lib/commonjs/components/Config.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +10 -11
- package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponentType.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +4 -20
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/DeprecatedFAB.js +21 -4
- package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
- package/lib/commonjs/components/HeaderLarge.js.map +1 -1
- package/lib/commonjs/components/Picker/Picker.js +4 -5
- package/lib/commonjs/components/Picker/Picker.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.android.js +135 -0
- package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +161 -0
- package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerComponent.web.js +136 -0
- package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerTypes.js +6 -0
- package/lib/commonjs/components/Picker/PickerTypes.js.map +1 -0
- package/lib/commonjs/components/RadioButton/RadioButton.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +17 -5
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/components/StepIndicator.js +1 -1
- package/lib/commonjs/components/StepIndicator.js.map +1 -1
- package/lib/commonjs/components/Stepper.js +1 -1
- package/lib/commonjs/components/Stepper.js.map +1 -1
- package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
- package/lib/commonjs/components/Text.js +38 -11
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/commonjs/mappings/CardContainerRating.js.map +1 -1
- package/lib/commonjs/mappings/Checkbox.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/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/mappings/Text.js +33 -26
- package/lib/commonjs/mappings/Text.js.map +1 -1
- package/lib/commonjs/mappings/TextArea.js +192 -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/commonjs/mappings/Video.js.map +1 -1
- package/lib/commonjs/styles/DarkTheme.js.map +1 -1
- package/lib/commonjs/utilities.js +1 -1
- package/lib/commonjs/utilities.js.map +1 -1
- package/lib/module/components/Carousel.js +3 -1
- package/lib/module/components/Carousel.js.map +1 -1
- package/lib/module/components/Config.js +3 -3
- package/lib/module/components/Config.js.map +1 -1
- package/lib/module/components/DatePicker/DatePicker.js +3 -3
- package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -1
- package/lib/module/components/Picker/Picker.js +4 -5
- package/lib/module/components/Picker/Picker.js.map +1 -1
- package/lib/module/components/Picker/PickerComponent.android.js +112 -0
- package/lib/module/components/Picker/PickerComponent.android.js.map +1 -0
- package/lib/module/components/Picker/PickerComponent.ios.js +135 -0
- package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -0
- package/lib/module/components/Picker/PickerComponent.web.js +113 -0
- package/lib/module/components/Picker/PickerComponent.web.js.map +1 -0
- package/lib/module/components/Picker/PickerTypes.js +2 -0
- package/lib/module/components/Picker/PickerTypes.js.map +1 -0
- package/lib/module/components/RadioButton/RadioButton.js +1 -1
- package/lib/module/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js +1 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/module/components/StepIndicator.js +1 -1
- package/lib/module/components/StepIndicator.js.map +1 -1
- package/lib/module/components/Stepper.js +1 -1
- package/lib/module/components/Stepper.js.map +1 -1
- package/lib/module/components/Touchable.js +2 -16
- package/lib/module/components/Touchable.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/Surface.js.map +1 -1
- package/lib/module/mappings/Text.js +33 -26
- package/lib/module/mappings/Text.js.map +1 -1
- package/lib/module/mappings/TextArea.js +193 -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/module/utilities.js +1 -1
- package/lib/module/utilities.js.map +1 -1
- package/lib/typescript/src/components/Picker/PickerComponent.android.d.ts +6 -0
- package/lib/typescript/src/components/Picker/PickerComponent.ios.d.ts +7 -0
- package/lib/typescript/src/components/Picker/PickerComponent.web.d.ts +6 -0
- package/lib/typescript/src/components/Picker/PickerTypes.d.ts +18 -0
- package/lib/typescript/src/mappings/NumberInput.d.ts +297 -0
- package/lib/typescript/src/mappings/Text.d.ts +24 -10
- package/lib/typescript/src/mappings/TextArea.d.ts +12 -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/components/ActionSheet/ActionSheet.js +1 -1
- package/src/components/Carousel.js +4 -2
- package/src/components/Checkbox/Checkbox.js +3 -3
- package/src/components/Checkbox/CheckboxGroupRow.js +2 -2
- package/src/components/Checkbox/CheckboxRow.js +3 -3
- package/src/components/CircularProgress.js +29 -26
- package/src/components/DatePicker/DatePicker.js +1 -1
- package/src/components/NumberInput.js +1 -1
- package/src/components/Picker/Picker.js +8 -8
- package/src/components/Picker/Picker.tsx +8 -6
- package/src/components/Picker/PickerComponent.android.js +69 -0
- package/src/components/Picker/PickerComponent.android.tsx +116 -0
- package/src/components/Picker/PickerComponent.ios.js +79 -0
- package/src/components/Picker/PickerComponent.ios.tsx +142 -0
- package/src/components/Picker/PickerComponent.web.js +70 -0
- package/src/components/Picker/PickerComponent.web.tsx +117 -0
- package/src/components/Picker/PickerTypes.js +1 -0
- package/src/components/Picker/PickerTypes.ts +18 -0
- package/src/components/Portal/Portal.js +2 -2
- package/src/components/Portal/PortalConsumer.js +0 -1
- package/src/components/Portal/PortalHost.js +43 -41
- package/src/components/Portal/PortalManager.js +21 -18
- package/src/components/ProgressBar.js +9 -9
- package/src/components/RadioButton/RadioButton.js +3 -3
- package/src/components/RadioButton/RadioButtonGroup.js +1 -1
- package/src/components/RadioButton/RadioButtonRow.js +3 -3
- package/src/components/StepIndicator.js +225 -225
- package/src/components/Stepper.js +2 -2
- package/src/components/Text.js +0 -1
- package/src/components/TextField.js +62 -59
- package/src/constants.js +1 -1
- package/src/mappings/NumberInput.js +248 -0
- package/src/mappings/NumberInput.ts +267 -0
- package/src/mappings/Text.js +33 -26
- package/src/mappings/Text.ts +34 -27
- package/src/mappings/TextArea.js +221 -3
- package/src/mappings/TextArea.ts +227 -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
|
@@ -4,12 +4,223 @@ import {
|
|
|
4
4
|
FORM_TYPES,
|
|
5
5
|
PROP_TYPES,
|
|
6
6
|
FIELD_NAME,
|
|
7
|
-
TEXT_INPUT_PROPS,
|
|
8
|
-
NUMBER_INPUT_PROPS,
|
|
9
7
|
Triggers,
|
|
10
|
-
createFieldNameProp,
|
|
11
8
|
} from "@draftbit/types";
|
|
12
9
|
|
|
10
|
+
const TEXT_INPUT_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
|
+
};
|
|
223
|
+
|
|
13
224
|
export const SEED_DATA_PROPS = {
|
|
14
225
|
style: {
|
|
15
226
|
group: GROUPS.basic,
|
|
@@ -198,35 +409,4 @@ export const SEED_DATA = [
|
|
|
198
409
|
},
|
|
199
410
|
},
|
|
200
411
|
},
|
|
201
|
-
{
|
|
202
|
-
name: "Number Input",
|
|
203
|
-
tag: "NumberInput",
|
|
204
|
-
description: "An input field that allows users to type in data.",
|
|
205
|
-
category: COMPONENT_TYPES.input,
|
|
206
|
-
preview_image_url:
|
|
207
|
-
"https://res.cloudinary.com/altos/image/upload/draftbit/Jigsaw/TextInput.png",
|
|
208
|
-
supports_list_render: false,
|
|
209
|
-
layout: {
|
|
210
|
-
borderLeftWidth: 1,
|
|
211
|
-
borderRightWidth: 1,
|
|
212
|
-
borderTopWidth: 1,
|
|
213
|
-
borderBottomWidth: 1,
|
|
214
|
-
borderColor: "divider",
|
|
215
|
-
paddingLeft: 8,
|
|
216
|
-
paddingRight: 8,
|
|
217
|
-
paddingTop: 8,
|
|
218
|
-
paddingBottom: 8,
|
|
219
|
-
borderRadius: 8,
|
|
220
|
-
},
|
|
221
|
-
triggers: [Triggers.OnChangeText],
|
|
222
|
-
props: {
|
|
223
|
-
...SEED_DATA_PROPS,
|
|
224
|
-
...NUMBER_INPUT_PROPS,
|
|
225
|
-
fieldName: createFieldNameProp({
|
|
226
|
-
defaultValue: "numberInputValue",
|
|
227
|
-
valuePropName: "value",
|
|
228
|
-
handlerPropName: "onChangeText",
|
|
229
|
-
}),
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
412
|
];
|