@draftbit/core 46.2.4-463c2c.0 → 46.2.4-47dc09.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.
Files changed (79) hide show
  1. package/lib/commonjs/components/Config.js +1 -0
  2. package/lib/commonjs/components/DeprecatedButton.js +4 -22
  3. package/lib/commonjs/components/SVG.js +49 -0
  4. package/lib/commonjs/components/TabView/TabView.js +102 -0
  5. package/lib/commonjs/components/TabView/TabViewItem.js +26 -0
  6. package/lib/commonjs/components/TabView/index.js +23 -0
  7. package/lib/commonjs/components/TextField.js +2 -1
  8. package/lib/commonjs/index.js +22 -8
  9. package/lib/commonjs/mappings/Image.js +2 -2
  10. package/lib/commonjs/mappings/MapView.js +1 -0
  11. package/lib/commonjs/mappings/NumberInput.js +146 -149
  12. package/lib/commonjs/mappings/SVG.js +23 -0
  13. package/lib/commonjs/mappings/TabView.js +79 -0
  14. package/lib/commonjs/mappings/TextArea.js +188 -193
  15. package/lib/commonjs/mappings/TextField.js +7 -8
  16. package/lib/commonjs/mappings/TextInput.js +178 -180
  17. package/lib/module/components/Config.js +1 -0
  18. package/lib/module/components/SVG.js +32 -0
  19. package/lib/module/components/TabView/TabView.js +87 -0
  20. package/lib/module/components/TabView/TabViewItem.js +18 -0
  21. package/lib/module/components/TabView/index.js +2 -0
  22. package/lib/module/components/TextField.js +2 -1
  23. package/lib/module/index.js +3 -2
  24. package/lib/module/mappings/Image.js +2 -2
  25. package/lib/module/mappings/MapView.js +1 -0
  26. package/lib/module/mappings/NumberInput.js +146 -149
  27. package/lib/module/mappings/SVG.js +14 -0
  28. package/lib/module/mappings/TabView.js +70 -0
  29. package/lib/module/mappings/TextArea.js +188 -193
  30. package/lib/module/mappings/TextField.js +7 -8
  31. package/lib/module/mappings/TextInput.js +178 -180
  32. package/lib/typescript/src/components/Config.d.ts +1 -0
  33. package/lib/typescript/src/components/SVG.d.ts +8 -0
  34. package/lib/typescript/src/components/TabView/TabView.d.ts +19 -0
  35. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +10 -0
  36. package/lib/typescript/src/components/TabView/index.d.ts +2 -0
  37. package/lib/typescript/src/components/TextField.d.ts +1 -0
  38. package/lib/typescript/src/index.d.ts +2 -1
  39. package/lib/typescript/src/mappings/MapView.d.ts +1 -0
  40. package/lib/typescript/src/mappings/SVG.d.ts +22 -0
  41. package/lib/typescript/src/mappings/TabView.d.ts +111 -0
  42. package/lib/typescript/src/mappings/TextArea.d.ts +42 -42
  43. package/lib/typescript/src/mappings/TextField.d.ts +120 -110
  44. package/package.json +7 -6
  45. package/src/components/Config.js +1 -0
  46. package/src/components/Config.ts +1 -0
  47. package/src/components/SVG.js +14 -0
  48. package/src/components/SVG.tsx +35 -0
  49. package/src/components/TabView/TabView.js +34 -0
  50. package/src/components/TabView/TabView.tsx +97 -0
  51. package/src/components/TabView/TabViewItem.js +5 -0
  52. package/src/components/TabView/TabViewItem.tsx +21 -0
  53. package/src/components/TabView/index.js +2 -0
  54. package/src/components/TabView/index.ts +2 -0
  55. package/src/components/TextField.js +2 -2
  56. package/src/components/TextField.tsx +3 -1
  57. package/src/index.js +2 -1
  58. package/src/index.tsx +2 -1
  59. package/src/mappings/Image.js +2 -2
  60. package/src/mappings/Image.ts +2 -2
  61. package/src/mappings/MapView.js +1 -0
  62. package/src/mappings/MapView.ts +1 -0
  63. package/src/mappings/NumberInput.js +160 -163
  64. package/src/mappings/NumberInput.ts +165 -168
  65. package/src/mappings/SVG.js +14 -0
  66. package/src/mappings/SVG.ts +15 -0
  67. package/src/mappings/TabView.js +73 -0
  68. package/src/mappings/TabView.ts +80 -0
  69. package/src/mappings/TextArea.js +213 -220
  70. package/src/mappings/TextArea.ts +219 -227
  71. package/src/mappings/TextField.js +6 -9
  72. package/src/mappings/TextField.ts +7 -11
  73. package/src/mappings/TextInput.js +205 -208
  74. package/src/mappings/TextInput.ts +212 -215
  75. package/lib/commonjs/components/Youtube.js +0 -73
  76. package/lib/module/components/Youtube.js +0 -59
  77. package/lib/typescript/src/components/Youtube.d.ts +0 -44
  78. package/src/components/Youtube.js +0 -38
  79. package/src/components/Youtube.tsx +0 -66
package/src/index.js CHANGED
@@ -17,6 +17,7 @@ export { default as FAB } from "./components/FAB";
17
17
  export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
18
18
  export { default as IconButton } from "./components/IconButton";
19
19
  export { default as Image } from "./components/Image";
20
+ export { default as SVG } from "./components/SVG";
20
21
  export { default as NumberInput } from "./components/NumberInput";
21
22
  export { default as ScreenContainer } from "./components/ScreenContainer";
22
23
  export { default as StarRating } from "./components/StarRating";
@@ -28,6 +29,7 @@ export { default as Touchable } from "./components/Touchable";
28
29
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
29
30
  export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/ActionSheet";
30
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
+ export { TabView, TabViewItem } from "./components/TabView";
31
33
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
32
34
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
33
35
  /* Deprecated: Fix or Delete! */
@@ -49,5 +51,4 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
49
51
  export { default as Slider } from "./components/Slider";
50
52
  export { default as Stepper } from "./components/Stepper";
51
53
  export { useAuthState } from "./components/useAuthState";
52
- export { default as Youtube } from "./components/Youtube";
53
54
  // a comment to fix sourcemap comment issue
package/src/index.tsx CHANGED
@@ -18,6 +18,7 @@ export { default as FAB } from "./components/FAB";
18
18
  export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
19
19
  export { default as IconButton } from "./components/IconButton";
20
20
  export { default as Image } from "./components/Image";
21
+ export { default as SVG } from "./components/SVG";
21
22
  export { default as NumberInput } from "./components/NumberInput";
22
23
  export { default as ScreenContainer } from "./components/ScreenContainer";
23
24
  export { default as StarRating } from "./components/StarRating";
@@ -33,6 +34,7 @@ export {
33
34
  ActionSheetCancel,
34
35
  } from "./components/ActionSheet";
35
36
  export { Swiper, SwiperItem } from "./components/Swiper";
37
+ export { TabView, TabViewItem } from "./components/TabView";
36
38
 
37
39
  export {
38
40
  Center,
@@ -69,6 +71,5 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
69
71
  export { default as Slider } from "./components/Slider";
70
72
  export { default as Stepper } from "./components/Stepper";
71
73
  export { useAuthState } from "./components/useAuthState";
72
- export { default as Youtube } from "./components/Youtube";
73
74
 
74
75
  // a comment to fix sourcemap comment issue
@@ -11,8 +11,8 @@ export const SEED_DATA = {
11
11
  StylesPanelSections.Effects,
12
12
  ],
13
13
  layout: {
14
- width: 250,
15
- height: 250,
14
+ width: 100,
15
+ height: 100,
16
16
  },
17
17
  props: {
18
18
  source: createImageProp(),
@@ -17,8 +17,8 @@ export const SEED_DATA = {
17
17
  StylesPanelSections.Effects,
18
18
  ],
19
19
  layout: {
20
- width: 250,
21
- height: 250,
20
+ width: 100,
21
+ height: 100,
22
22
  },
23
23
  props: {
24
24
  source: createImageProp(),
@@ -53,6 +53,7 @@ export const SEED_DATA = {
53
53
  label: "Map Type",
54
54
  description: "The type of map to show",
55
55
  group: GROUPS.basic,
56
+ editable: true,
56
57
  formType: FORM_TYPES.flatArray,
57
58
  propType: PROP_TYPES.STRING,
58
59
  required: false,
@@ -63,6 +63,7 @@ export const SEED_DATA = {
63
63
  label: "Map Type",
64
64
  description: "The type of map to show",
65
65
  group: GROUPS.basic,
66
+ editable: true,
66
67
  formType: FORM_TYPES.flatArray,
67
68
  propType: PROP_TYPES.STRING,
68
69
  required: false,
@@ -1,166 +1,4 @@
1
1
  import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, StylesPanelSections, } from "@draftbit/types";
2
- const NUMBER_INPUT_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
- autoFocus: {
14
- group: GROUPS.basic,
15
- label: "Auto Focus",
16
- description: "Focuses the input on load in and brings up the keyboard",
17
- editable: true,
18
- required: false,
19
- defaultValue: null,
20
- formType: FORM_TYPES.boolean,
21
- propType: PROP_TYPES.BOOLEAN,
22
- },
23
- caretHidden: {
24
- group: GROUPS.advanced,
25
- label: "Hide Caret",
26
- description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
27
- editable: true,
28
- required: false,
29
- defaultValue: null,
30
- formType: FORM_TYPES.boolean,
31
- propType: PROP_TYPES.BOOLEAN,
32
- },
33
- contextMenuHidden: {
34
- group: GROUPS.advanced,
35
- label: "Hide Context Menu",
36
- description: "Hides the system context menu (Default: false)",
37
- editable: true,
38
- required: false,
39
- defaultValue: null,
40
- formType: FORM_TYPES.boolean,
41
- propType: PROP_TYPES.BOOLEAN,
42
- },
43
- editable: {
44
- group: GROUPS.advanced,
45
- label: "Editable",
46
- description: "If false, the text is not editable",
47
- editable: true,
48
- required: false,
49
- defaultValue: true,
50
- formType: FORM_TYPES.boolean,
51
- propType: PROP_TYPES.BOOLEAN,
52
- },
53
- keyboardAppearance: {
54
- group: GROUPS.advanced,
55
- label: "Keyboard Appearance",
56
- description: "Determines the color of the keyboard.(iOS Only)",
57
- editable: true,
58
- required: false,
59
- defaultValue: null,
60
- options: ["default", "light", "dark"],
61
- formType: FORM_TYPES.flatArray,
62
- propType: PROP_TYPES.STRING,
63
- },
64
- keyboardType: {
65
- group: GROUPS.advanced,
66
- label: "Keyboard Type",
67
- description: "Determines what keyboard is given to the user.",
68
- editable: true,
69
- required: false,
70
- defaultValue: null,
71
- options: ["numeric", "numbers-and-punctuation", "number-pad"],
72
- formType: FORM_TYPES.flatArray,
73
- propType: PROP_TYPES.STRING,
74
- },
75
- maxLength: {
76
- group: GROUPS.basic,
77
- label: "Max Length",
78
- description: "Limits the input to a set number of characters.",
79
- editable: true,
80
- required: false,
81
- defaultValue: null,
82
- min: 0,
83
- step: 1,
84
- precision: 0,
85
- formType: FORM_TYPES.number,
86
- propType: PROP_TYPES.NUMBER,
87
- },
88
- placeholder: {
89
- group: GROUPS.basic,
90
- label: "Placeholder Text",
91
- description: "The text that is shown on load when no value is available.",
92
- editable: true,
93
- required: false,
94
- defaultValue: "Enter a number...",
95
- formType: FORM_TYPES.string,
96
- propType: PROP_TYPES.STRING,
97
- },
98
- placeholderTextColor: {
99
- group: GROUPS.basic,
100
- label: "Placeholder Text Color",
101
- description: "The color of the placeholder text.",
102
- editable: true,
103
- required: false,
104
- defaultValue: null,
105
- formType: FORM_TYPES.color,
106
- propType: PROP_TYPES.STRING,
107
- },
108
- returnKeyLabel: {
109
- group: GROUPS.advanced,
110
- label: "Return Key Label",
111
- description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
112
- editable: true,
113
- required: false,
114
- defaultValue: null,
115
- formType: FORM_TYPES.string,
116
- propType: PROP_TYPES.STRING,
117
- },
118
- returnKeyType: {
119
- group: GROUPS.advanced,
120
- label: "Return Key Type",
121
- description: "Determines how the return key should look like",
122
- editable: true,
123
- required: false,
124
- defaultValue: null,
125
- options: [
126
- "done",
127
- "go",
128
- "next",
129
- "search",
130
- "send",
131
- "none",
132
- "previous",
133
- "default",
134
- "emergency-call",
135
- "google",
136
- "join",
137
- "route",
138
- "yahoo",
139
- ],
140
- formType: FORM_TYPES.flatArray,
141
- propType: PROP_TYPES.STRING,
142
- },
143
- selectionColor: {
144
- group: GROUPS.advanced,
145
- label: "Selection Color",
146
- description: "Color of the highlighted portion when selecting.",
147
- editable: true,
148
- required: false,
149
- defaultValue: null,
150
- formType: FORM_TYPES.color,
151
- propType: PROP_TYPES.STRING,
152
- },
153
- selectTextOnFocus: {
154
- group: GROUPS.advanced,
155
- label: "Select Text on Focus",
156
- description: "If true, all the text will automatically be selected on focus",
157
- editable: true,
158
- required: false,
159
- defaultValue: null,
160
- formType: FORM_TYPES.boolean,
161
- propType: PROP_TYPES.BOOLEAN,
162
- },
163
- };
164
2
  export const SEED_DATA_PROPS = {
165
3
  style: {
166
4
  group: GROUPS.basic,
@@ -251,7 +89,166 @@ export const SEED_DATA = [
251
89
  triggers: [Triggers.OnChangeText],
252
90
  props: {
253
91
  ...SEED_DATA_PROPS,
254
- ...NUMBER_INPUT_PROPS,
92
+ allowFontScaling: {
93
+ group: GROUPS.advanced,
94
+ label: "Allow Font Scaling",
95
+ description: "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
96
+ editable: true,
97
+ required: false,
98
+ defaultValue: null,
99
+ formType: FORM_TYPES.boolean,
100
+ propType: PROP_TYPES.BOOLEAN,
101
+ },
102
+ autoFocus: {
103
+ group: GROUPS.basic,
104
+ label: "Auto Focus",
105
+ description: "Focuses the input on load in and brings up the keyboard",
106
+ editable: true,
107
+ required: false,
108
+ defaultValue: null,
109
+ formType: FORM_TYPES.boolean,
110
+ propType: PROP_TYPES.BOOLEAN,
111
+ },
112
+ caretHidden: {
113
+ group: GROUPS.advanced,
114
+ label: "Hide Caret",
115
+ description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
116
+ editable: true,
117
+ required: false,
118
+ defaultValue: null,
119
+ formType: FORM_TYPES.boolean,
120
+ propType: PROP_TYPES.BOOLEAN,
121
+ },
122
+ contextMenuHidden: {
123
+ group: GROUPS.advanced,
124
+ label: "Hide Context Menu",
125
+ description: "Hides the system context menu (Default: false)",
126
+ editable: true,
127
+ required: false,
128
+ defaultValue: null,
129
+ formType: FORM_TYPES.boolean,
130
+ propType: PROP_TYPES.BOOLEAN,
131
+ },
132
+ editable: {
133
+ group: GROUPS.advanced,
134
+ label: "Editable",
135
+ description: "If false, the text is not editable",
136
+ editable: true,
137
+ required: false,
138
+ defaultValue: true,
139
+ formType: FORM_TYPES.boolean,
140
+ propType: PROP_TYPES.BOOLEAN,
141
+ },
142
+ keyboardAppearance: {
143
+ group: GROUPS.advanced,
144
+ label: "Keyboard Appearance",
145
+ description: "Determines the color of the keyboard.(iOS Only)",
146
+ editable: true,
147
+ required: false,
148
+ defaultValue: null,
149
+ options: ["default", "light", "dark"],
150
+ formType: FORM_TYPES.flatArray,
151
+ propType: PROP_TYPES.STRING,
152
+ },
153
+ keyboardType: {
154
+ group: GROUPS.advanced,
155
+ label: "Keyboard Type",
156
+ description: "Determines what keyboard is given to the user.",
157
+ editable: true,
158
+ required: false,
159
+ defaultValue: null,
160
+ options: ["numeric", "numbers-and-punctuation", "number-pad"],
161
+ formType: FORM_TYPES.flatArray,
162
+ propType: PROP_TYPES.STRING,
163
+ },
164
+ maxLength: {
165
+ group: GROUPS.basic,
166
+ label: "Max Length",
167
+ description: "Limits the input to a set number of characters.",
168
+ editable: true,
169
+ required: false,
170
+ defaultValue: null,
171
+ min: 0,
172
+ step: 1,
173
+ precision: 0,
174
+ formType: FORM_TYPES.number,
175
+ propType: PROP_TYPES.NUMBER,
176
+ },
177
+ placeholder: {
178
+ group: GROUPS.basic,
179
+ label: "Placeholder Text",
180
+ description: "The text that is shown on load when no value is available.",
181
+ editable: true,
182
+ required: false,
183
+ defaultValue: "Enter a number...",
184
+ formType: FORM_TYPES.string,
185
+ propType: PROP_TYPES.STRING,
186
+ },
187
+ placeholderTextColor: {
188
+ group: GROUPS.basic,
189
+ label: "Placeholder Text Color",
190
+ description: "The color of the placeholder text.",
191
+ editable: true,
192
+ required: false,
193
+ defaultValue: null,
194
+ formType: FORM_TYPES.color,
195
+ propType: PROP_TYPES.STRING,
196
+ },
197
+ returnKeyLabel: {
198
+ group: GROUPS.advanced,
199
+ label: "Return Key Label",
200
+ description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
201
+ editable: true,
202
+ required: false,
203
+ defaultValue: null,
204
+ formType: FORM_TYPES.string,
205
+ propType: PROP_TYPES.STRING,
206
+ },
207
+ returnKeyType: {
208
+ group: GROUPS.advanced,
209
+ label: "Return Key Type",
210
+ description: "Determines how the return key should look like",
211
+ editable: true,
212
+ required: false,
213
+ defaultValue: null,
214
+ options: [
215
+ "done",
216
+ "go",
217
+ "next",
218
+ "search",
219
+ "send",
220
+ "none",
221
+ "previous",
222
+ "default",
223
+ "emergency-call",
224
+ "google",
225
+ "join",
226
+ "route",
227
+ "yahoo",
228
+ ],
229
+ formType: FORM_TYPES.flatArray,
230
+ propType: PROP_TYPES.STRING,
231
+ },
232
+ selectionColor: {
233
+ group: GROUPS.advanced,
234
+ label: "Selection Color",
235
+ description: "Color of the highlighted portion when selecting.",
236
+ editable: true,
237
+ required: false,
238
+ defaultValue: null,
239
+ formType: FORM_TYPES.color,
240
+ propType: PROP_TYPES.STRING,
241
+ },
242
+ selectTextOnFocus: {
243
+ group: GROUPS.advanced,
244
+ label: "Select Text on Focus",
245
+ description: "If true, all the text will automatically be selected on focus",
246
+ editable: true,
247
+ required: false,
248
+ defaultValue: null,
249
+ formType: FORM_TYPES.boolean,
250
+ propType: PROP_TYPES.BOOLEAN,
251
+ },
255
252
  },
256
253
  },
257
254
  ];