@draftbit/core 46.2.4-58c73f.0 → 46.2.4-5b5cc7.10
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/Config.js +1 -0
- package/lib/commonjs/components/Markdown.js +33 -0
- package/lib/commonjs/components/SVG.js +48 -0
- package/lib/commonjs/components/TextField.js +2 -1
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +16 -14
- package/lib/commonjs/mappings/Image.js +2 -2
- package/lib/commonjs/mappings/MapView.js +1 -0
- package/lib/commonjs/mappings/Markdown.js +23 -0
- package/lib/commonjs/mappings/NumberInput.js +146 -149
- package/lib/commonjs/mappings/SVG.js +24 -0
- package/lib/commonjs/mappings/TextArea.js +188 -193
- package/lib/commonjs/mappings/TextField.js +7 -8
- package/lib/commonjs/mappings/TextInput.js +178 -180
- package/lib/module/components/Button.js +32 -11
- package/lib/module/components/Config.js +1 -0
- package/lib/module/components/DeprecatedButton.js +21 -4
- package/lib/module/components/Divider.js +20 -2
- package/lib/module/components/Layout.js +43 -21
- package/lib/module/components/Markdown.js +18 -0
- package/lib/module/components/Portal/PortalHost.js +26 -15
- package/lib/module/components/SVG.js +31 -0
- package/lib/module/components/TextField.js +2 -1
- package/lib/module/components/ToggleButton.js +17 -3
- package/lib/module/index.js +3 -2
- package/lib/module/mappings/Image.js +2 -2
- package/lib/module/mappings/MapView.js +1 -0
- package/lib/module/mappings/Markdown.js +14 -0
- package/lib/module/mappings/NumberInput.js +146 -149
- package/lib/module/mappings/SVG.js +15 -0
- package/lib/module/mappings/TextArea.js +188 -193
- package/lib/module/mappings/TextField.js +7 -8
- package/lib/module/mappings/TextInput.js +178 -180
- package/lib/typescript/src/components/Config.d.ts +1 -0
- package/lib/typescript/src/components/Markdown.d.ts +6 -0
- package/lib/typescript/src/components/SVG.d.ts +8 -0
- package/lib/typescript/src/components/TextField.d.ts +1 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/mappings/MapView.d.ts +1 -0
- package/lib/typescript/src/mappings/Markdown.d.ts +9 -0
- package/lib/typescript/src/mappings/SVG.d.ts +23 -0
- package/lib/typescript/src/mappings/TextArea.d.ts +42 -42
- package/lib/typescript/src/mappings/TextField.d.ts +120 -110
- package/package.json +6 -5
- package/src/components/Config.js +1 -0
- package/src/components/Config.ts +1 -0
- package/src/components/Markdown.js +12 -0
- package/src/components/Markdown.tsx +25 -0
- package/src/components/SVG.js +13 -0
- package/src/components/SVG.tsx +35 -0
- package/src/components/TextField.js +2 -2
- package/src/components/TextField.tsx +3 -1
- package/src/index.js +2 -1
- package/src/index.tsx +2 -1
- package/src/mappings/Image.js +2 -2
- package/src/mappings/Image.ts +2 -2
- package/src/mappings/MapView.js +1 -0
- package/src/mappings/MapView.ts +1 -0
- package/src/mappings/Markdown.js +14 -0
- package/src/mappings/Markdown.ts +15 -0
- package/src/mappings/NumberInput.js +160 -163
- package/src/mappings/NumberInput.ts +165 -168
- package/src/mappings/SVG.js +20 -0
- package/src/mappings/SVG.ts +25 -0
- package/src/mappings/TextArea.js +213 -220
- package/src/mappings/TextArea.ts +219 -227
- package/src/mappings/TextField.js +6 -9
- package/src/mappings/TextField.ts +7 -11
- package/src/mappings/TextInput.js +205 -208
- package/src/mappings/TextInput.ts +212 -215
- package/lib/commonjs/components/TabView/TabView.js +0 -102
- package/lib/commonjs/components/TabView/TabViewItem.js +0 -26
- package/lib/commonjs/components/TabView/index.js +0 -23
- package/lib/commonjs/mappings/TabView.js +0 -79
- package/lib/module/components/TabView/TabView.js +0 -87
- package/lib/module/components/TabView/TabViewItem.js +0 -18
- package/lib/module/components/TabView/index.js +0 -2
- package/lib/module/mappings/TabView.js +0 -70
- package/lib/typescript/src/components/TabView/TabView.d.ts +0 -19
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -10
- package/lib/typescript/src/components/TabView/index.d.ts +0 -2
- package/lib/typescript/src/mappings/TabView.d.ts +0 -111
- package/src/components/TabView/TabView.js +0 -34
- package/src/components/TabView/TabView.tsx +0 -97
- package/src/components/TabView/TabViewItem.js +0 -5
- package/src/components/TabView/TabViewItem.tsx +0 -21
- package/src/components/TabView/index.js +0 -2
- package/src/components/TabView/index.ts +0 -2
- package/src/mappings/TabView.js +0 -73
- package/src/mappings/TabView.ts +0 -80
|
@@ -7,185 +7,6 @@ exports.SEED_DATA_PROPS = exports.SEED_DATA = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _types = require("@draftbit/types");
|
|
9
9
|
|
|
10
|
-
const TEXT_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
|
-
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
|
-
};
|
|
189
10
|
const SEED_DATA_PROPS = {
|
|
190
11
|
style: {
|
|
191
12
|
group: _types.GROUPS.basic,
|
|
@@ -265,7 +86,184 @@ const SEED_DATA = [{
|
|
|
265
86
|
borderRadius: 8
|
|
266
87
|
},
|
|
267
88
|
triggers: [_types.Triggers.OnChangeText],
|
|
268
|
-
props: {
|
|
89
|
+
props: {
|
|
90
|
+
allowFontScaling: {
|
|
91
|
+
group: _types.GROUPS.advanced,
|
|
92
|
+
label: "Allow Font Scaling",
|
|
93
|
+
description: "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
|
|
94
|
+
editable: true,
|
|
95
|
+
required: false,
|
|
96
|
+
defaultValue: null,
|
|
97
|
+
formType: _types.FORM_TYPES.boolean,
|
|
98
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
99
|
+
},
|
|
100
|
+
autoCapitalize: {
|
|
101
|
+
group: _types.GROUPS.advanced,
|
|
102
|
+
label: "Auto Capitalize",
|
|
103
|
+
description: "Can automatically capitalize sentences, words, and characters (Default: none).",
|
|
104
|
+
editable: true,
|
|
105
|
+
required: false,
|
|
106
|
+
defaultValue: null,
|
|
107
|
+
options: ["none", "sentences", "words", "characters"],
|
|
108
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
109
|
+
propType: _types.PROP_TYPES.STRING
|
|
110
|
+
},
|
|
111
|
+
autoCorrect: {
|
|
112
|
+
group: _types.GROUPS.advanced,
|
|
113
|
+
label: "Auto Correct",
|
|
114
|
+
description: "Enables auto correction",
|
|
115
|
+
editable: true,
|
|
116
|
+
required: false,
|
|
117
|
+
defaultValue: null,
|
|
118
|
+
formType: _types.FORM_TYPES.boolean,
|
|
119
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
120
|
+
},
|
|
121
|
+
autoFocus: {
|
|
122
|
+
group: _types.GROUPS.basic,
|
|
123
|
+
label: "Auto Focus",
|
|
124
|
+
description: "Focuses the input on load in and brings up the keyboard",
|
|
125
|
+
editable: true,
|
|
126
|
+
required: false,
|
|
127
|
+
defaultValue: null,
|
|
128
|
+
formType: _types.FORM_TYPES.boolean,
|
|
129
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
130
|
+
},
|
|
131
|
+
caretHidden: {
|
|
132
|
+
group: _types.GROUPS.advanced,
|
|
133
|
+
label: "Hide Caret",
|
|
134
|
+
description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
|
|
135
|
+
editable: true,
|
|
136
|
+
required: false,
|
|
137
|
+
defaultValue: null,
|
|
138
|
+
formType: _types.FORM_TYPES.boolean,
|
|
139
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
140
|
+
},
|
|
141
|
+
contextMenuHidden: {
|
|
142
|
+
group: _types.GROUPS.advanced,
|
|
143
|
+
label: "Hide Context Menu",
|
|
144
|
+
description: "Hides the system context menu (Default: false)",
|
|
145
|
+
editable: true,
|
|
146
|
+
required: false,
|
|
147
|
+
defaultValue: null,
|
|
148
|
+
formType: _types.FORM_TYPES.boolean,
|
|
149
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
150
|
+
},
|
|
151
|
+
editable: {
|
|
152
|
+
group: _types.GROUPS.advanced,
|
|
153
|
+
label: "Editable",
|
|
154
|
+
description: "If false, the text is not editable",
|
|
155
|
+
editable: true,
|
|
156
|
+
required: false,
|
|
157
|
+
defaultValue: true,
|
|
158
|
+
formType: _types.FORM_TYPES.boolean,
|
|
159
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
160
|
+
},
|
|
161
|
+
keyboardAppearance: {
|
|
162
|
+
group: _types.GROUPS.advanced,
|
|
163
|
+
label: "Keyboard Appearance",
|
|
164
|
+
description: "Determines the color of the keyboard.(iOS Only)",
|
|
165
|
+
editable: true,
|
|
166
|
+
required: false,
|
|
167
|
+
defaultValue: null,
|
|
168
|
+
options: ["default", "light", "dark"],
|
|
169
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
170
|
+
propType: _types.PROP_TYPES.STRING
|
|
171
|
+
},
|
|
172
|
+
keyboardType: {
|
|
173
|
+
group: _types.GROUPS.advanced,
|
|
174
|
+
label: "Keyboard Type",
|
|
175
|
+
description: "Determines what keyboard is given to the user.",
|
|
176
|
+
editable: true,
|
|
177
|
+
required: false,
|
|
178
|
+
defaultValue: null,
|
|
179
|
+
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"],
|
|
180
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
181
|
+
propType: _types.PROP_TYPES.STRING
|
|
182
|
+
},
|
|
183
|
+
maxLength: {
|
|
184
|
+
group: _types.GROUPS.basic,
|
|
185
|
+
label: "Max Length",
|
|
186
|
+
description: "Limits the input to a set number of characters.",
|
|
187
|
+
editable: true,
|
|
188
|
+
required: false,
|
|
189
|
+
defaultValue: null,
|
|
190
|
+
min: 0,
|
|
191
|
+
step: 1,
|
|
192
|
+
precision: 0,
|
|
193
|
+
formType: _types.FORM_TYPES.number,
|
|
194
|
+
propType: _types.PROP_TYPES.NUMBER
|
|
195
|
+
},
|
|
196
|
+
placeholder: {
|
|
197
|
+
group: _types.GROUPS.data,
|
|
198
|
+
label: "Placeholder Text",
|
|
199
|
+
description: "The text that is shown on load when no value is available.",
|
|
200
|
+
editable: true,
|
|
201
|
+
required: false,
|
|
202
|
+
defaultValue: "Enter a value...",
|
|
203
|
+
formType: _types.FORM_TYPES.string,
|
|
204
|
+
propType: _types.PROP_TYPES.STRING
|
|
205
|
+
},
|
|
206
|
+
placeholderTextColor: {
|
|
207
|
+
group: _types.GROUPS.basic,
|
|
208
|
+
label: "Placeholder Text Color",
|
|
209
|
+
description: "The color of the placeholder text.",
|
|
210
|
+
editable: true,
|
|
211
|
+
required: false,
|
|
212
|
+
defaultValue: null,
|
|
213
|
+
formType: _types.FORM_TYPES.color,
|
|
214
|
+
propType: _types.PROP_TYPES.STRING
|
|
215
|
+
},
|
|
216
|
+
returnKeyLabel: {
|
|
217
|
+
group: _types.GROUPS.advanced,
|
|
218
|
+
label: "Return Key Label",
|
|
219
|
+
description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
|
|
220
|
+
editable: true,
|
|
221
|
+
required: false,
|
|
222
|
+
defaultValue: null,
|
|
223
|
+
formType: _types.FORM_TYPES.string,
|
|
224
|
+
propType: _types.PROP_TYPES.STRING
|
|
225
|
+
},
|
|
226
|
+
returnKeyType: {
|
|
227
|
+
group: _types.GROUPS.advanced,
|
|
228
|
+
label: "Return Key Type",
|
|
229
|
+
description: "Determines how the return key should look like",
|
|
230
|
+
editable: true,
|
|
231
|
+
required: false,
|
|
232
|
+
defaultValue: null,
|
|
233
|
+
options: ["done", "go", "next", "search", "send", "none", "previous", "default", "emergency-call", "google", "join", "route", "yahoo"],
|
|
234
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
235
|
+
propType: _types.PROP_TYPES.STRING
|
|
236
|
+
},
|
|
237
|
+
secureTextEntry: {
|
|
238
|
+
group: _types.GROUPS.basic,
|
|
239
|
+
label: "Password Input?",
|
|
240
|
+
description: "Hides the characters with a *, useful for passwords and other sensitive information.",
|
|
241
|
+
editable: true,
|
|
242
|
+
required: false,
|
|
243
|
+
defaultValue: null,
|
|
244
|
+
formType: _types.FORM_TYPES.boolean,
|
|
245
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
246
|
+
},
|
|
247
|
+
selectionColor: {
|
|
248
|
+
group: _types.GROUPS.advanced,
|
|
249
|
+
label: "Selection Color",
|
|
250
|
+
description: "Color of the highlighted portion when selecting.",
|
|
251
|
+
editable: true,
|
|
252
|
+
required: false,
|
|
253
|
+
defaultValue: null,
|
|
254
|
+
formType: _types.FORM_TYPES.color,
|
|
255
|
+
propType: _types.PROP_TYPES.STRING
|
|
256
|
+
},
|
|
257
|
+
selectTextOnFocus: {
|
|
258
|
+
group: _types.GROUPS.advanced,
|
|
259
|
+
label: "Select Text on Focus",
|
|
260
|
+
description: "If true, all the text will automatically be selected on focus",
|
|
261
|
+
editable: true,
|
|
262
|
+
required: false,
|
|
263
|
+
defaultValue: null,
|
|
264
|
+
formType: _types.FORM_TYPES.boolean,
|
|
265
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
266
|
+
},
|
|
269
267
|
...SEED_DATA_PROPS,
|
|
270
268
|
multiline: {
|
|
271
269
|
group: _types.GROUPS.basic,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { Text, Pressable, Platform, StyleSheet, ActivityIndicator } from "react-native";
|
|
5
3
|
import { withTheme } from "../theming";
|
|
@@ -57,7 +55,7 @@ function Base(_ref) {
|
|
|
57
55
|
buttonStyles.justifyContent = "flex-end";
|
|
58
56
|
}
|
|
59
57
|
|
|
60
|
-
return /*#__PURE__*/React.createElement(Pressable,
|
|
58
|
+
return /*#__PURE__*/React.createElement(Pressable, {
|
|
61
59
|
onPress: onPress,
|
|
62
60
|
disabled: disabled || loading,
|
|
63
61
|
style: _ref2 => {
|
|
@@ -67,8 +65,9 @@ function Base(_ref) {
|
|
|
67
65
|
return [styles.base, {
|
|
68
66
|
opacity: pressed || disabled ? 0.75 : 1
|
|
69
67
|
}, buttonStyles];
|
|
70
|
-
}
|
|
71
|
-
|
|
68
|
+
},
|
|
69
|
+
...props
|
|
70
|
+
}, loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
72
71
|
size: "small",
|
|
73
72
|
color: color,
|
|
74
73
|
style: styles.loading
|
|
@@ -88,13 +87,14 @@ const Solid = _ref3 => {
|
|
|
88
87
|
theme,
|
|
89
88
|
...props
|
|
90
89
|
} = _ref3;
|
|
91
|
-
return /*#__PURE__*/React.createElement(Base,
|
|
90
|
+
return /*#__PURE__*/React.createElement(Base, {
|
|
92
91
|
style: [{
|
|
93
92
|
color: "#FFF",
|
|
94
93
|
borderRadius: theme.roundness,
|
|
95
94
|
backgroundColor: theme.colors.primary
|
|
96
|
-
}, style]
|
|
97
|
-
|
|
95
|
+
}, style],
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
const ButtonSolid = withTheme(Solid);
|
|
@@ -106,13 +106,14 @@ const Outline = _ref4 => {
|
|
|
106
106
|
theme,
|
|
107
107
|
...props
|
|
108
108
|
} = _ref4;
|
|
109
|
-
return /*#__PURE__*/React.createElement(Base,
|
|
109
|
+
return /*#__PURE__*/React.createElement(Base, {
|
|
110
110
|
style: [styles.outline, {
|
|
111
111
|
borderRadius: theme.roundness,
|
|
112
112
|
borderColor: theme.colors.primary,
|
|
113
113
|
color: theme.colors.primary
|
|
114
|
-
}, style]
|
|
115
|
-
|
|
114
|
+
}, style],
|
|
115
|
+
...props
|
|
116
|
+
});
|
|
116
117
|
};
|
|
117
118
|
|
|
118
119
|
const ButtonOutline = withTheme(Outline);
|
|
@@ -159,4 +160,24 @@ const styles = StyleSheet.create({
|
|
|
159
160
|
}
|
|
160
161
|
})
|
|
161
162
|
}
|
|
163
|
+
});ndColor: "transparent",
|
|
164
|
+
padding: 0,
|
|
165
|
+
minHeight: undefined
|
|
166
|
+
},
|
|
167
|
+
loading: {
|
|
168
|
+
marginRight: 6
|
|
169
|
+
},
|
|
170
|
+
icon: { ...Platform.select({
|
|
171
|
+
web: {
|
|
172
|
+
marginTop: 1,
|
|
173
|
+
marginRight: 4,
|
|
174
|
+
alignSelf: "center"
|
|
175
|
+
},
|
|
176
|
+
default: {
|
|
177
|
+
marginBottom: 2,
|
|
178
|
+
marginRight: 4,
|
|
179
|
+
alignSelf: "center"
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
}
|
|
162
183
|
});
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { ActivityIndicator, View, Text, StyleSheet } from "react-native";
|
|
5
3
|
import color from "color";
|
|
@@ -107,7 +105,7 @@ const Button = _ref => {
|
|
|
107
105
|
alignSelf: "stretch",
|
|
108
106
|
...margins
|
|
109
107
|
}
|
|
110
|
-
}, /*#__PURE__*/React.createElement(Touchable,
|
|
108
|
+
}, /*#__PURE__*/React.createElement(Touchable, { ...rest,
|
|
111
109
|
onPress: onPress,
|
|
112
110
|
accessibilityState: {
|
|
113
111
|
disabled
|
|
@@ -115,7 +113,7 @@ const Button = _ref => {
|
|
|
115
113
|
accessibilityRole: "button",
|
|
116
114
|
disabled: disabled || loading,
|
|
117
115
|
style: [styles.button, buttonStyle, innerStyles]
|
|
118
|
-
}
|
|
116
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
119
117
|
style: styles.content
|
|
120
118
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(View, {
|
|
121
119
|
style: iconStyle
|
|
@@ -133,6 +131,25 @@ const Button = _ref => {
|
|
|
133
131
|
}, children))));
|
|
134
132
|
};
|
|
135
133
|
|
|
134
|
+
const styles = StyleSheet.create({
|
|
135
|
+
button: {
|
|
136
|
+
minWidth: 64,
|
|
137
|
+
borderStyle: "solid"
|
|
138
|
+
},
|
|
139
|
+
content: {
|
|
140
|
+
flexDirection: "row",
|
|
141
|
+
alignItems: "center",
|
|
142
|
+
justifyContent: "center"
|
|
143
|
+
},
|
|
144
|
+
icon: {
|
|
145
|
+
width: Config.buttonIconSize
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
export default withTheme(Button);ines: 1,
|
|
149
|
+
style: [textStyle, typography.button]
|
|
150
|
+
}, children))));
|
|
151
|
+
};
|
|
152
|
+
|
|
136
153
|
const styles = StyleSheet.create({
|
|
137
154
|
button: {
|
|
138
155
|
minWidth: 64,
|
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { StyleSheet, View } from "react-native";
|
|
5
3
|
import { withTheme } from "../theming";
|
|
6
4
|
|
|
5
|
+
const Divider = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
style,
|
|
8
|
+
color,
|
|
9
|
+
theme: {
|
|
10
|
+
colors
|
|
11
|
+
},
|
|
12
|
+
...rest
|
|
13
|
+
} = _ref;
|
|
14
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
15
|
+
style: [{
|
|
16
|
+
backgroundColor: color || colors.divider,
|
|
17
|
+
height: StyleSheet.hairlineWidth
|
|
18
|
+
}, style],
|
|
19
|
+
...rest
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default withTheme(Divider);ng";
|
|
24
|
+
|
|
7
25
|
const Divider = _ref => {
|
|
8
26
|
let {
|
|
9
27
|
style,
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
|
-
import { View } from "react-native";
|
|
5
|
-
|
|
2
|
+
import { View } from "react-native";
|
|
6
3
|
export function Center(_ref) {
|
|
7
4
|
let {
|
|
8
5
|
width = 240,
|
|
@@ -12,15 +9,16 @@ export function Center(_ref) {
|
|
|
12
9
|
style,
|
|
13
10
|
...rest
|
|
14
11
|
} = _ref;
|
|
15
|
-
return /*#__PURE__*/React.createElement(View,
|
|
12
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
16
13
|
style: [{
|
|
17
14
|
justifyContent: "center",
|
|
18
15
|
alignItems: "center",
|
|
19
16
|
width,
|
|
20
17
|
height,
|
|
21
18
|
backgroundColor: bgColor
|
|
22
|
-
}, style]
|
|
23
|
-
|
|
19
|
+
}, style],
|
|
20
|
+
...rest
|
|
21
|
+
}, children);
|
|
24
22
|
}
|
|
25
23
|
export function Circle(_ref2) {
|
|
26
24
|
let {
|
|
@@ -31,7 +29,7 @@ export function Circle(_ref2) {
|
|
|
31
29
|
...rest
|
|
32
30
|
} = _ref2;
|
|
33
31
|
const borderRadius = 1000;
|
|
34
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
32
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
35
33
|
width: size,
|
|
36
34
|
height: size,
|
|
37
35
|
bgColor: bgColor,
|
|
@@ -39,8 +37,9 @@ export function Circle(_ref2) {
|
|
|
39
37
|
backgroundColor: bgColor,
|
|
40
38
|
borderRadius,
|
|
41
39
|
overflow: "hidden"
|
|
42
|
-
}]
|
|
43
|
-
|
|
40
|
+
}],
|
|
41
|
+
...rest
|
|
42
|
+
}, children);
|
|
44
43
|
}
|
|
45
44
|
export function Square(_ref3) {
|
|
46
45
|
let {
|
|
@@ -50,12 +49,13 @@ export function Square(_ref3) {
|
|
|
50
49
|
style,
|
|
51
50
|
...rest
|
|
52
51
|
} = _ref3;
|
|
53
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
52
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
54
53
|
style: style,
|
|
55
54
|
width: size,
|
|
56
55
|
height: size,
|
|
57
|
-
bgColor: bgColor
|
|
58
|
-
|
|
56
|
+
bgColor: bgColor,
|
|
57
|
+
...rest
|
|
58
|
+
}, children);
|
|
59
59
|
}
|
|
60
60
|
export function Row(_ref4) {
|
|
61
61
|
let {
|
|
@@ -65,14 +65,14 @@ export function Row(_ref4) {
|
|
|
65
65
|
style,
|
|
66
66
|
...rest
|
|
67
67
|
} = _ref4;
|
|
68
|
-
return /*#__PURE__*/React.createElement(View,
|
|
69
|
-
style: [style,
|
|
70
|
-
{
|
|
68
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
69
|
+
style: [style, {
|
|
71
70
|
alignItems,
|
|
72
71
|
flexDirection: "row",
|
|
73
72
|
justifyContent: justifyContent
|
|
74
|
-
}]
|
|
75
|
-
|
|
73
|
+
}],
|
|
74
|
+
...rest
|
|
75
|
+
}, children);
|
|
76
76
|
}
|
|
77
77
|
export function Spacer(_ref5) {
|
|
78
78
|
let {
|
|
@@ -84,14 +84,36 @@ export function Spacer(_ref5) {
|
|
|
84
84
|
style,
|
|
85
85
|
...rest
|
|
86
86
|
} = _ref5;
|
|
87
|
-
return /*#__PURE__*/React.createElement(View,
|
|
87
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
88
88
|
style: [style, {
|
|
89
89
|
paddingRight: right,
|
|
90
90
|
paddingTop: top,
|
|
91
91
|
paddingLeft: left,
|
|
92
92
|
paddingBottom: bottom
|
|
93
|
-
}]
|
|
94
|
-
|
|
93
|
+
}],
|
|
94
|
+
...rest
|
|
95
|
+
}, children);
|
|
96
|
+
}
|
|
97
|
+
export function Stack(_ref6) {
|
|
98
|
+
let {
|
|
99
|
+
children,
|
|
100
|
+
justifyContent = "flex-start",
|
|
101
|
+
alignItems = "flex-start",
|
|
102
|
+
style,
|
|
103
|
+
...rest
|
|
104
|
+
} = _ref6;
|
|
105
|
+
return (
|
|
106
|
+
/*#__PURE__*/
|
|
107
|
+
// style must go first since we don't want justifyContent, alignItems overridden
|
|
108
|
+
React.createElement(View, {
|
|
109
|
+
style: [style, {
|
|
110
|
+
justifyContent,
|
|
111
|
+
alignItems
|
|
112
|
+
}],
|
|
113
|
+
...rest
|
|
114
|
+
}, children)
|
|
115
|
+
);
|
|
116
|
+
}dren);
|
|
95
117
|
}
|
|
96
118
|
export function Stack(_ref6) {
|
|
97
119
|
let {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react"; // @ts-ignore
|
|
2
|
+
|
|
3
|
+
import Markdown from "react-native-markdown-package";
|
|
4
|
+
|
|
5
|
+
const MarkdownComponent = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
content
|
|
8
|
+
} = _ref;
|
|
9
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Markdown, {
|
|
10
|
+
styles: markdownStyle
|
|
11
|
+
}, content));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const markdownStyle = {
|
|
15
|
+
singleLineMd: {},
|
|
16
|
+
collectiveMd: {}
|
|
17
|
+
};
|
|
18
|
+
export default MarkdownComponent;
|