@draftbit/core 42.3.2-b870b3.3 → 42.3.2-c31138.5
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/LinearGradient.js +126 -0
- package/lib/commonjs/components/LinearGradient.js.map +1 -0
- package/lib/commonjs/index.js +8 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/TextInput.js +70 -72
- package/lib/commonjs/mappings/TextInput.js.map +1 -1
- package/lib/module/components/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/module/components/LinearGradient.js +110 -0
- package/lib/module/components/LinearGradient.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/TextInput.js +68 -70
- package/lib/module/mappings/TextInput.js.map +1 -1
- package/lib/typescript/src/components/LinearGradient.d.ts +107 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/package.json +3 -2
- package/src/components/LinearGradient.js +84 -0
- package/src/components/LinearGradient.tsx +119 -0
- package/src/index.js +1 -0
- package/src/index.tsx +1 -0
- package/src/mappings/TextInput.js +101 -105
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
Triggers,
|
|
10
10
|
} from "@draftbit/types";
|
|
11
11
|
|
|
12
|
-
export const
|
|
12
|
+
export const SEED_DATA_PROPS = {
|
|
13
13
|
style: {
|
|
14
14
|
group: GROUPS.basic,
|
|
15
15
|
label: "Style",
|
|
@@ -72,108 +72,6 @@ export const COMMON_NATIVE_INPUT_PROPS = {
|
|
|
72
72
|
},
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
const NATIVE_INPUT_PROPS = {
|
|
76
|
-
...COMMON_NATIVE_INPUT_PROPS,
|
|
77
|
-
multiline: {
|
|
78
|
-
group: GROUPS.basic,
|
|
79
|
-
label: "Multiple Lines",
|
|
80
|
-
description:
|
|
81
|
-
"Allows multiple lines of input, useful for situations where the user may be typing in a lot of data.",
|
|
82
|
-
editable: true,
|
|
83
|
-
required: false,
|
|
84
|
-
defaultValue: null,
|
|
85
|
-
formType: FORM_TYPES.boolean,
|
|
86
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
87
|
-
},
|
|
88
|
-
numberOfLines: {
|
|
89
|
-
group: GROUPS.basic,
|
|
90
|
-
label: "Number of Lines",
|
|
91
|
-
description:
|
|
92
|
-
"Sets the number of lines for the input (Multiple Lines needs to be true)",
|
|
93
|
-
editable: true,
|
|
94
|
-
required: false,
|
|
95
|
-
defaultValue: null,
|
|
96
|
-
min: 0,
|
|
97
|
-
step: 1,
|
|
98
|
-
precision: 0,
|
|
99
|
-
formType: FORM_TYPES.number,
|
|
100
|
-
propType: PROP_TYPES.NUMBER,
|
|
101
|
-
},
|
|
102
|
-
scrollEnabled: {
|
|
103
|
-
group: GROUPS.basic,
|
|
104
|
-
label: "Scroll Enabled",
|
|
105
|
-
description:
|
|
106
|
-
"If false, scrolling of the input will be disabled. Only works when Multiple Lines is true",
|
|
107
|
-
editable: true,
|
|
108
|
-
required: false,
|
|
109
|
-
defaultValue: null,
|
|
110
|
-
formType: FORM_TYPES.boolean,
|
|
111
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
112
|
-
},
|
|
113
|
-
spellcheck: {
|
|
114
|
-
group: GROUPS.basic,
|
|
115
|
-
label: "Disable Spell Check",
|
|
116
|
-
description:
|
|
117
|
-
"If false, disables spell-check style (red underlines). Default comes from Auto Correct",
|
|
118
|
-
editable: true,
|
|
119
|
-
required: false,
|
|
120
|
-
defaultValue: null,
|
|
121
|
-
formType: FORM_TYPES.boolean,
|
|
122
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
123
|
-
},
|
|
124
|
-
textContentType: {
|
|
125
|
-
group: GROUPS.advanced,
|
|
126
|
-
label: "Text Content Type",
|
|
127
|
-
description:
|
|
128
|
-
"Give the keyboard and system about what it should do with the input. For example, if its an address, autofill from address book",
|
|
129
|
-
editable: true,
|
|
130
|
-
required: false,
|
|
131
|
-
defaultValue: null,
|
|
132
|
-
options: [
|
|
133
|
-
"none",
|
|
134
|
-
"URL",
|
|
135
|
-
"addressCity",
|
|
136
|
-
"addressCityAndState",
|
|
137
|
-
"addressState",
|
|
138
|
-
"countryName",
|
|
139
|
-
"creditCardNumber",
|
|
140
|
-
"emailAddress",
|
|
141
|
-
"familyName",
|
|
142
|
-
"fullStreetAddress",
|
|
143
|
-
"givenName",
|
|
144
|
-
"jobTitle",
|
|
145
|
-
"location",
|
|
146
|
-
"middleName",
|
|
147
|
-
"name",
|
|
148
|
-
"namePrefix",
|
|
149
|
-
"nameSuffix",
|
|
150
|
-
"nickname",
|
|
151
|
-
"organizationName",
|
|
152
|
-
"postalCode",
|
|
153
|
-
"streetAddressLine1",
|
|
154
|
-
"streetAddressLine2",
|
|
155
|
-
"sublocality",
|
|
156
|
-
"telephoneNumber",
|
|
157
|
-
"username",
|
|
158
|
-
"password",
|
|
159
|
-
],
|
|
160
|
-
formType: FORM_TYPES.flatArray,
|
|
161
|
-
propType: PROP_TYPES.STRING,
|
|
162
|
-
},
|
|
163
|
-
textBreakStrategy: {
|
|
164
|
-
group: GROUPS.advanced,
|
|
165
|
-
label: "Text Break Strategy",
|
|
166
|
-
description:
|
|
167
|
-
"(Android Only) Set the text break strategy. (Default: simple)",
|
|
168
|
-
editable: true,
|
|
169
|
-
required: false,
|
|
170
|
-
defaultValue: null,
|
|
171
|
-
options: ["simple", "highQuality", "balanced"],
|
|
172
|
-
formType: FORM_TYPES.flatArray,
|
|
173
|
-
propType: PROP_TYPES.STRING,
|
|
174
|
-
},
|
|
175
|
-
};
|
|
176
|
-
|
|
177
75
|
export const SEED_DATA = [
|
|
178
76
|
{
|
|
179
77
|
name: "Text Input",
|
|
@@ -198,7 +96,105 @@ export const SEED_DATA = [
|
|
|
198
96
|
triggers: [Triggers.OnChangeText],
|
|
199
97
|
props: {
|
|
200
98
|
...TEXT_INPUT_PROPS,
|
|
201
|
-
...
|
|
99
|
+
...SEED_DATA_PROPS,
|
|
100
|
+
multiline: {
|
|
101
|
+
group: GROUPS.basic,
|
|
102
|
+
label: "Multiple Lines",
|
|
103
|
+
description:
|
|
104
|
+
"Allows multiple lines of input, useful for situations where the user may be typing in a lot of data.",
|
|
105
|
+
editable: true,
|
|
106
|
+
required: false,
|
|
107
|
+
defaultValue: null,
|
|
108
|
+
formType: FORM_TYPES.boolean,
|
|
109
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
110
|
+
},
|
|
111
|
+
numberOfLines: {
|
|
112
|
+
group: GROUPS.basic,
|
|
113
|
+
label: "Number of Lines",
|
|
114
|
+
description:
|
|
115
|
+
"Sets the number of lines for the input (Multiple Lines needs to be true)",
|
|
116
|
+
editable: true,
|
|
117
|
+
required: false,
|
|
118
|
+
defaultValue: null,
|
|
119
|
+
min: 0,
|
|
120
|
+
step: 1,
|
|
121
|
+
precision: 0,
|
|
122
|
+
formType: FORM_TYPES.number,
|
|
123
|
+
propType: PROP_TYPES.NUMBER,
|
|
124
|
+
},
|
|
125
|
+
scrollEnabled: {
|
|
126
|
+
group: GROUPS.basic,
|
|
127
|
+
label: "Scroll Enabled",
|
|
128
|
+
description:
|
|
129
|
+
"If false, scrolling of the input will be disabled. Only works when Multiple Lines is true",
|
|
130
|
+
editable: true,
|
|
131
|
+
required: false,
|
|
132
|
+
defaultValue: null,
|
|
133
|
+
formType: FORM_TYPES.boolean,
|
|
134
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
135
|
+
},
|
|
136
|
+
spellcheck: {
|
|
137
|
+
group: GROUPS.basic,
|
|
138
|
+
label: "Disable Spell Check",
|
|
139
|
+
description:
|
|
140
|
+
"If false, disables spell-check style (red underlines). Default comes from Auto Correct",
|
|
141
|
+
editable: true,
|
|
142
|
+
required: false,
|
|
143
|
+
defaultValue: null,
|
|
144
|
+
formType: FORM_TYPES.boolean,
|
|
145
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
146
|
+
},
|
|
147
|
+
textContentType: {
|
|
148
|
+
group: GROUPS.advanced,
|
|
149
|
+
label: "Text Content Type",
|
|
150
|
+
description:
|
|
151
|
+
"Give the keyboard and system about what it should do with the input. For example, if its an address, autofill from address book",
|
|
152
|
+
editable: true,
|
|
153
|
+
required: false,
|
|
154
|
+
defaultValue: null,
|
|
155
|
+
options: [
|
|
156
|
+
"none",
|
|
157
|
+
"URL",
|
|
158
|
+
"addressCity",
|
|
159
|
+
"addressCityAndState",
|
|
160
|
+
"addressState",
|
|
161
|
+
"countryName",
|
|
162
|
+
"creditCardNumber",
|
|
163
|
+
"emailAddress",
|
|
164
|
+
"familyName",
|
|
165
|
+
"fullStreetAddress",
|
|
166
|
+
"givenName",
|
|
167
|
+
"jobTitle",
|
|
168
|
+
"location",
|
|
169
|
+
"middleName",
|
|
170
|
+
"name",
|
|
171
|
+
"namePrefix",
|
|
172
|
+
"nameSuffix",
|
|
173
|
+
"nickname",
|
|
174
|
+
"organizationName",
|
|
175
|
+
"postalCode",
|
|
176
|
+
"streetAddressLine1",
|
|
177
|
+
"streetAddressLine2",
|
|
178
|
+
"sublocality",
|
|
179
|
+
"telephoneNumber",
|
|
180
|
+
"username",
|
|
181
|
+
"password",
|
|
182
|
+
],
|
|
183
|
+
formType: FORM_TYPES.flatArray,
|
|
184
|
+
propType: PROP_TYPES.STRING,
|
|
185
|
+
},
|
|
186
|
+
textBreakStrategy: {
|
|
187
|
+
group: GROUPS.advanced,
|
|
188
|
+
label: "Text Break Strategy",
|
|
189
|
+
description:
|
|
190
|
+
"(Android Only) Set the text break strategy. (Default: simple)",
|
|
191
|
+
editable: true,
|
|
192
|
+
required: false,
|
|
193
|
+
defaultValue: null,
|
|
194
|
+
options: ["simple", "highQuality", "balanced"],
|
|
195
|
+
formType: FORM_TYPES.flatArray,
|
|
196
|
+
propType: PROP_TYPES.STRING,
|
|
197
|
+
},
|
|
202
198
|
},
|
|
203
199
|
},
|
|
204
200
|
{
|
|
@@ -224,7 +220,7 @@ export const SEED_DATA = [
|
|
|
224
220
|
triggers: [Triggers.OnChangeText],
|
|
225
221
|
props: {
|
|
226
222
|
...NUMBER_INPUT_PROPS,
|
|
227
|
-
...
|
|
223
|
+
...SEED_DATA_PROPS,
|
|
228
224
|
},
|
|
229
225
|
},
|
|
230
226
|
];
|