@draftbit/core 46.2.4-58c73f.0 → 46.2.4-99ac4e.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 (51) hide show
  1. package/lib/commonjs/components/DeprecatedButton.js +22 -4
  2. package/lib/commonjs/components/TextField.js +2 -1
  3. package/lib/commonjs/constants.js +1 -1
  4. package/lib/commonjs/index.js +0 -14
  5. package/lib/commonjs/mappings/NumberInput.js +146 -149
  6. package/lib/commonjs/mappings/TextArea.js +188 -193
  7. package/lib/commonjs/mappings/TextField.js +7 -8
  8. package/lib/commonjs/mappings/TextInput.js +178 -180
  9. package/lib/module/components/TextField.js +2 -1
  10. package/lib/module/index.js +0 -1
  11. package/lib/module/mappings/NumberInput.js +146 -149
  12. package/lib/module/mappings/TextArea.js +188 -193
  13. package/lib/module/mappings/TextField.js +7 -8
  14. package/lib/module/mappings/TextInput.js +178 -180
  15. package/lib/typescript/src/components/TextField.d.ts +1 -0
  16. package/lib/typescript/src/index.d.ts +0 -1
  17. package/lib/typescript/src/mappings/TextArea.d.ts +42 -42
  18. package/lib/typescript/src/mappings/TextField.d.ts +120 -110
  19. package/package.json +2 -4
  20. package/src/components/TextField.js +2 -2
  21. package/src/components/TextField.tsx +3 -1
  22. package/src/index.js +0 -1
  23. package/src/index.tsx +0 -1
  24. package/src/mappings/NumberInput.js +160 -163
  25. package/src/mappings/NumberInput.ts +165 -168
  26. package/src/mappings/TextArea.js +213 -220
  27. package/src/mappings/TextArea.ts +219 -227
  28. package/src/mappings/TextField.js +6 -9
  29. package/src/mappings/TextField.ts +7 -11
  30. package/src/mappings/TextInput.js +205 -208
  31. package/src/mappings/TextInput.ts +212 -215
  32. package/lib/commonjs/components/TabView/TabView.js +0 -102
  33. package/lib/commonjs/components/TabView/TabViewItem.js +0 -26
  34. package/lib/commonjs/components/TabView/index.js +0 -23
  35. package/lib/commonjs/mappings/TabView.js +0 -79
  36. package/lib/module/components/TabView/TabView.js +0 -87
  37. package/lib/module/components/TabView/TabViewItem.js +0 -18
  38. package/lib/module/components/TabView/index.js +0 -2
  39. package/lib/module/mappings/TabView.js +0 -70
  40. package/lib/typescript/src/components/TabView/TabView.d.ts +0 -19
  41. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -10
  42. package/lib/typescript/src/components/TabView/index.d.ts +0 -2
  43. package/lib/typescript/src/mappings/TabView.d.ts +0 -111
  44. package/src/components/TabView/TabView.js +0 -34
  45. package/src/components/TabView/TabView.tsx +0 -97
  46. package/src/components/TabView/TabViewItem.js +0 -5
  47. package/src/components/TabView/TabViewItem.tsx +0 -21
  48. package/src/components/TabView/index.js +0 -2
  49. package/src/components/TabView/index.ts +0 -2
  50. package/src/mappings/TabView.js +0 -73
  51. package/src/mappings/TabView.ts +0 -80
@@ -8,220 +8,6 @@ import {
8
8
  StylesPanelSections,
9
9
  } from "@draftbit/types";
10
10
 
11
- const TEXT_INPUT_PROPS = {
12
- allowFontScaling: {
13
- group: GROUPS.advanced,
14
- label: "Allow Font Scaling",
15
- description:
16
- "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
17
- editable: true,
18
- required: false,
19
- defaultValue: null,
20
- formType: FORM_TYPES.boolean,
21
- propType: PROP_TYPES.BOOLEAN,
22
- },
23
- autoCapitalize: {
24
- group: GROUPS.advanced,
25
- label: "Auto Capitalize",
26
- description:
27
- "Can automatically capitalize sentences, words, and characters (Default: none).",
28
- editable: true,
29
- required: false,
30
- defaultValue: null,
31
- options: ["none", "sentences", "words", "characters"],
32
- formType: FORM_TYPES.flatArray,
33
- propType: PROP_TYPES.STRING,
34
- },
35
- autoCorrect: {
36
- group: GROUPS.advanced,
37
- label: "Auto Correct",
38
- description: "Enables auto correction",
39
- editable: true,
40
- required: false,
41
- defaultValue: null,
42
- formType: FORM_TYPES.boolean,
43
- propType: PROP_TYPES.BOOLEAN,
44
- },
45
- autoFocus: {
46
- group: GROUPS.basic,
47
- label: "Auto Focus",
48
- description: "Focuses the input on load in and brings up the keyboard",
49
- editable: true,
50
- required: false,
51
- defaultValue: null,
52
- formType: FORM_TYPES.boolean,
53
- propType: PROP_TYPES.BOOLEAN,
54
- },
55
- caretHidden: {
56
- group: GROUPS.advanced,
57
- label: "Hide Caret",
58
- description:
59
- "Hides the caret(the line small line underneath each showing where you're editing/typing",
60
- editable: true,
61
- required: false,
62
- defaultValue: null,
63
- formType: FORM_TYPES.boolean,
64
- propType: PROP_TYPES.BOOLEAN,
65
- },
66
- contextMenuHidden: {
67
- group: GROUPS.advanced,
68
- label: "Hide Context Menu",
69
- description: "Hides the system context menu (Default: false)",
70
- editable: true,
71
- required: false,
72
- defaultValue: null,
73
- formType: FORM_TYPES.boolean,
74
- propType: PROP_TYPES.BOOLEAN,
75
- },
76
- editable: {
77
- group: GROUPS.advanced,
78
- label: "Editable",
79
- description: "If false, the text is not editable",
80
- editable: true,
81
- required: false,
82
- defaultValue: true,
83
- formType: FORM_TYPES.boolean,
84
- propType: PROP_TYPES.BOOLEAN,
85
- },
86
- keyboardAppearance: {
87
- group: GROUPS.advanced,
88
- label: "Keyboard Appearance",
89
- description: "Determines the color of the keyboard.(iOS Only)",
90
- editable: true,
91
- required: false,
92
- defaultValue: null,
93
- options: ["default", "light", "dark"],
94
- formType: FORM_TYPES.flatArray,
95
- propType: PROP_TYPES.STRING,
96
- },
97
- keyboardType: {
98
- group: GROUPS.advanced,
99
- label: "Keyboard Type",
100
- description: "Determines what keyboard is given to the user.",
101
- editable: true,
102
- required: false,
103
- defaultValue: null,
104
- options: [
105
- "default",
106
- "email-address",
107
- "numeric",
108
- "phone-pad",
109
- "ascii-capable",
110
- "numbers-and-punctuation",
111
- "url",
112
- "number-pad",
113
- "name-phone-pad",
114
- "decimal-pad",
115
- "twitter",
116
- "web-search",
117
- "visible-password",
118
- ],
119
- formType: FORM_TYPES.flatArray,
120
- propType: PROP_TYPES.STRING,
121
- },
122
- maxLength: {
123
- group: GROUPS.basic,
124
- label: "Max Length",
125
- description: "Limits the input to a set number of characters.",
126
- editable: true,
127
- required: false,
128
- defaultValue: null,
129
- min: 0,
130
- step: 1,
131
- precision: 0,
132
- formType: FORM_TYPES.number,
133
- propType: PROP_TYPES.NUMBER,
134
- },
135
- placeholder: {
136
- group: GROUPS.data,
137
- label: "Placeholder Text",
138
- description: "The text that is shown on load when no value is available.",
139
- editable: true,
140
- required: false,
141
- defaultValue: "Enter a value...",
142
- formType: FORM_TYPES.string,
143
- propType: PROP_TYPES.STRING,
144
- },
145
- placeholderTextColor: {
146
- group: GROUPS.basic,
147
- label: "Placeholder Text Color",
148
- description: "The color of the placeholder text.",
149
- editable: true,
150
- required: false,
151
- defaultValue: null,
152
- formType: FORM_TYPES.color,
153
- propType: PROP_TYPES.STRING,
154
- },
155
- returnKeyLabel: {
156
- group: GROUPS.advanced,
157
- label: "Return Key Label",
158
- description:
159
- "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
160
- editable: true,
161
- required: false,
162
- defaultValue: null,
163
- formType: FORM_TYPES.string,
164
- propType: PROP_TYPES.STRING,
165
- },
166
- returnKeyType: {
167
- group: GROUPS.advanced,
168
- label: "Return Key Type",
169
- description: "Determines how the return key should look like",
170
- editable: true,
171
- required: false,
172
- defaultValue: null,
173
- options: [
174
- "done",
175
- "go",
176
- "next",
177
- "search",
178
- "send",
179
- "none",
180
- "previous",
181
- "default",
182
- "emergency-call",
183
- "google",
184
- "join",
185
- "route",
186
- "yahoo",
187
- ],
188
- formType: FORM_TYPES.flatArray,
189
- propType: PROP_TYPES.STRING,
190
- },
191
- secureTextEntry: {
192
- group: GROUPS.basic,
193
- label: "Password Input?",
194
- description:
195
- "Hides the characters with a *, useful for passwords and other sensitive information.",
196
- editable: true,
197
- required: false,
198
- defaultValue: null,
199
- formType: FORM_TYPES.boolean,
200
- propType: PROP_TYPES.BOOLEAN,
201
- },
202
- selectionColor: {
203
- group: GROUPS.advanced,
204
- label: "Selection Color",
205
- description: "Color of the highlighted portion when selecting.",
206
- editable: true,
207
- required: false,
208
- defaultValue: null,
209
- formType: FORM_TYPES.color,
210
- propType: PROP_TYPES.STRING,
211
- },
212
- selectTextOnFocus: {
213
- group: GROUPS.advanced,
214
- label: "Select Text on Focus",
215
- description:
216
- "If true, all the text will automatically be selected on focus",
217
- editable: true,
218
- required: false,
219
- defaultValue: null,
220
- formType: FORM_TYPES.boolean,
221
- propType: PROP_TYPES.BOOLEAN,
222
- },
223
- };
224
-
225
11
  export const SEED_DATA_PROPS = {
226
12
  style: {
227
13
  group: GROUPS.basic,
@@ -317,7 +103,218 @@ export const SEED_DATA = [
317
103
  },
318
104
  triggers: [Triggers.OnChangeText],
319
105
  props: {
320
- ...TEXT_INPUT_PROPS,
106
+ allowFontScaling: {
107
+ group: GROUPS.advanced,
108
+ label: "Allow Font Scaling",
109
+ description:
110
+ "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
111
+ editable: true,
112
+ required: false,
113
+ defaultValue: null,
114
+ formType: FORM_TYPES.boolean,
115
+ propType: PROP_TYPES.BOOLEAN,
116
+ },
117
+ autoCapitalize: {
118
+ group: GROUPS.advanced,
119
+ label: "Auto Capitalize",
120
+ description:
121
+ "Can automatically capitalize sentences, words, and characters (Default: none).",
122
+ editable: true,
123
+ required: false,
124
+ defaultValue: null,
125
+ options: ["none", "sentences", "words", "characters"],
126
+ formType: FORM_TYPES.flatArray,
127
+ propType: PROP_TYPES.STRING,
128
+ },
129
+ autoCorrect: {
130
+ group: GROUPS.advanced,
131
+ label: "Auto Correct",
132
+ description: "Enables auto correction",
133
+ editable: true,
134
+ required: false,
135
+ defaultValue: null,
136
+ formType: FORM_TYPES.boolean,
137
+ propType: PROP_TYPES.BOOLEAN,
138
+ },
139
+ autoFocus: {
140
+ group: GROUPS.basic,
141
+ label: "Auto Focus",
142
+ description: "Focuses the input on load in and brings up the keyboard",
143
+ editable: true,
144
+ required: false,
145
+ defaultValue: null,
146
+ formType: FORM_TYPES.boolean,
147
+ propType: PROP_TYPES.BOOLEAN,
148
+ },
149
+ caretHidden: {
150
+ group: GROUPS.advanced,
151
+ label: "Hide Caret",
152
+ description:
153
+ "Hides the caret(the line small line underneath each showing where you're editing/typing",
154
+ editable: true,
155
+ required: false,
156
+ defaultValue: null,
157
+ formType: FORM_TYPES.boolean,
158
+ propType: PROP_TYPES.BOOLEAN,
159
+ },
160
+ contextMenuHidden: {
161
+ group: GROUPS.advanced,
162
+ label: "Hide Context Menu",
163
+ description: "Hides the system context menu (Default: false)",
164
+ editable: true,
165
+ required: false,
166
+ defaultValue: null,
167
+ formType: FORM_TYPES.boolean,
168
+ propType: PROP_TYPES.BOOLEAN,
169
+ },
170
+ editable: {
171
+ group: GROUPS.advanced,
172
+ label: "Editable",
173
+ description: "If false, the text is not editable",
174
+ editable: true,
175
+ required: false,
176
+ defaultValue: true,
177
+ formType: FORM_TYPES.boolean,
178
+ propType: PROP_TYPES.BOOLEAN,
179
+ },
180
+ keyboardAppearance: {
181
+ group: GROUPS.advanced,
182
+ label: "Keyboard Appearance",
183
+ description: "Determines the color of the keyboard.(iOS Only)",
184
+ editable: true,
185
+ required: false,
186
+ defaultValue: null,
187
+ options: ["default", "light", "dark"],
188
+ formType: FORM_TYPES.flatArray,
189
+ propType: PROP_TYPES.STRING,
190
+ },
191
+ keyboardType: {
192
+ group: GROUPS.advanced,
193
+ label: "Keyboard Type",
194
+ description: "Determines what keyboard is given to the user.",
195
+ editable: true,
196
+ required: false,
197
+ defaultValue: null,
198
+ options: [
199
+ "default",
200
+ "email-address",
201
+ "numeric",
202
+ "phone-pad",
203
+ "ascii-capable",
204
+ "numbers-and-punctuation",
205
+ "url",
206
+ "number-pad",
207
+ "name-phone-pad",
208
+ "decimal-pad",
209
+ "twitter",
210
+ "web-search",
211
+ "visible-password",
212
+ ],
213
+ formType: FORM_TYPES.flatArray,
214
+ propType: PROP_TYPES.STRING,
215
+ },
216
+ maxLength: {
217
+ group: GROUPS.basic,
218
+ label: "Max Length",
219
+ description: "Limits the input to a set number of characters.",
220
+ editable: true,
221
+ required: false,
222
+ defaultValue: null,
223
+ min: 0,
224
+ step: 1,
225
+ precision: 0,
226
+ formType: FORM_TYPES.number,
227
+ propType: PROP_TYPES.NUMBER,
228
+ },
229
+ placeholder: {
230
+ group: GROUPS.data,
231
+ label: "Placeholder Text",
232
+ description:
233
+ "The text that is shown on load when no value is available.",
234
+ editable: true,
235
+ required: false,
236
+ defaultValue: "Enter a value...",
237
+ formType: FORM_TYPES.string,
238
+ propType: PROP_TYPES.STRING,
239
+ },
240
+ placeholderTextColor: {
241
+ group: GROUPS.basic,
242
+ label: "Placeholder Text Color",
243
+ description: "The color of the placeholder text.",
244
+ editable: true,
245
+ required: false,
246
+ defaultValue: null,
247
+ formType: FORM_TYPES.color,
248
+ propType: PROP_TYPES.STRING,
249
+ },
250
+ returnKeyLabel: {
251
+ group: GROUPS.advanced,
252
+ label: "Return Key Label",
253
+ description:
254
+ "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
255
+ editable: true,
256
+ required: false,
257
+ defaultValue: null,
258
+ formType: FORM_TYPES.string,
259
+ propType: PROP_TYPES.STRING,
260
+ },
261
+ returnKeyType: {
262
+ group: GROUPS.advanced,
263
+ label: "Return Key Type",
264
+ description: "Determines how the return key should look like",
265
+ editable: true,
266
+ required: false,
267
+ defaultValue: null,
268
+ options: [
269
+ "done",
270
+ "go",
271
+ "next",
272
+ "search",
273
+ "send",
274
+ "none",
275
+ "previous",
276
+ "default",
277
+ "emergency-call",
278
+ "google",
279
+ "join",
280
+ "route",
281
+ "yahoo",
282
+ ],
283
+ formType: FORM_TYPES.flatArray,
284
+ propType: PROP_TYPES.STRING,
285
+ },
286
+ secureTextEntry: {
287
+ group: GROUPS.basic,
288
+ label: "Password Input?",
289
+ description:
290
+ "Hides the characters with a *, useful for passwords and other sensitive information.",
291
+ editable: true,
292
+ required: false,
293
+ defaultValue: null,
294
+ formType: FORM_TYPES.boolean,
295
+ propType: PROP_TYPES.BOOLEAN,
296
+ },
297
+ selectionColor: {
298
+ group: GROUPS.advanced,
299
+ label: "Selection Color",
300
+ description: "Color of the highlighted portion when selecting.",
301
+ editable: true,
302
+ required: false,
303
+ defaultValue: null,
304
+ formType: FORM_TYPES.color,
305
+ propType: PROP_TYPES.STRING,
306
+ },
307
+ selectTextOnFocus: {
308
+ group: GROUPS.advanced,
309
+ label: "Select Text on Focus",
310
+ description:
311
+ "If true, all the text will automatically be selected on focus",
312
+ editable: true,
313
+ required: false,
314
+ defaultValue: null,
315
+ formType: FORM_TYPES.boolean,
316
+ propType: PROP_TYPES.BOOLEAN,
317
+ },
321
318
  ...SEED_DATA_PROPS,
322
319
  multiline: {
323
320
  group: GROUPS.basic,
@@ -1,102 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var React = _interopRequireWildcard(require("react"));
9
-
10
- var _reactNativeTabView = require("react-native-tab-view");
11
-
12
- var _TabViewItem = _interopRequireDefault(require("./TabViewItem"));
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
-
18
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
-
20
- 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); }
21
-
22
- const TabViewComponent = _ref => {
23
- let {
24
- Icon,
25
- tabBarPosition,
26
- keyboardDismissMode,
27
- swipeEnabled,
28
- scrollEnabled,
29
- activeColor,
30
- inactiveColor,
31
- pressColor,
32
- indicatorColor,
33
- style,
34
- children
35
- } = _ref;
36
- const [index, setIndex] = React.useState(0);
37
- const [routes, setRoutes] = React.useState([]);
38
- const [tabScenes, setTabScenes] = React.useState({});
39
- React.useEffect(() => {
40
- const newRoutes = [];
41
- const scenes = {};
42
- React.Children.toArray(children).filter(child => child.type === _TabViewItem.default).forEach(child => {
43
- var _child$props;
44
-
45
- if (child !== null && child !== void 0 && (_child$props = child.props) !== null && _child$props !== void 0 && _child$props.id) {
46
- var _child$props2, _child$props3;
47
-
48
- newRoutes.push({
49
- key: child === null || child === void 0 ? void 0 : (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.id,
50
- ...(child === null || child === void 0 ? void 0 : child.props)
51
- });
52
-
53
- scenes[child === null || child === void 0 ? void 0 : (_child$props3 = child.props) === null || _child$props3 === void 0 ? void 0 : _child$props3.id] = () => child;
54
- }
55
- });
56
- setRoutes(newRoutes);
57
- setTabScenes(scenes);
58
- }, [children]);
59
-
60
- const indexChangeHandler = i => setIndex(i);
61
-
62
- const renderTabBar = props => {
63
- console.log(props);
64
- return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, _extends({}, props, {
65
- activeColor: activeColor,
66
- inactiveColor: inactiveColor,
67
- pressColor: pressColor,
68
- scrollEnabled: scrollEnabled,
69
- indicatorStyle: {
70
- backgroundColor: indicatorColor
71
- },
72
- renderIcon: _ref2 => {
73
- let {
74
- route,
75
- color
76
- } = _ref2;
77
- return route !== null && route !== void 0 && route.icon ? /*#__PURE__*/React.createElement(Icon, {
78
- name: route.icon,
79
- color: color,
80
- size: 36
81
- }) : null;
82
- },
83
- style: style
84
- }));
85
- };
86
-
87
- return /*#__PURE__*/React.createElement(_reactNativeTabView.TabView, {
88
- navigationState: {
89
- index,
90
- routes
91
- },
92
- renderScene: (0, _reactNativeTabView.SceneMap)(tabScenes),
93
- renderTabBar: renderTabBar,
94
- onIndexChange: indexChangeHandler,
95
- tabBarPosition: tabBarPosition,
96
- keyboardDismissMode: keyboardDismissMode,
97
- swipeEnabled: swipeEnabled
98
- });
99
- };
100
-
101
- var _default = TabViewComponent;
102
- exports.default = _default;
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- const TabViewItem = _ref => {
9
- let {
10
- title,
11
- id,
12
- icon,
13
- children,
14
- accessibilityLabel
15
- } = _ref;
16
- console.log({
17
- title,
18
- id,
19
- icon,
20
- accessibilityLabel
21
- });
22
- return children;
23
- };
24
-
25
- var _default = TabViewItem;
26
- exports.default = _default;
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "TabView", {
7
- enumerable: true,
8
- get: function () {
9
- return _TabView.default;
10
- }
11
- });
12
- Object.defineProperty(exports, "TabViewItem", {
13
- enumerable: true,
14
- get: function () {
15
- return _TabViewItem.default;
16
- }
17
- });
18
-
19
- var _TabView = _interopRequireDefault(require("./TabView"));
20
-
21
- var _TabViewItem = _interopRequireDefault(require("./TabViewItem"));
22
-
23
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,79 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
-
8
- var _types = require("@draftbit/types");
9
-
10
- const SEED_DATA = [{
11
- name: "TabView",
12
- tag: "TabView",
13
- category: _types.COMPONENT_TYPES.container,
14
- layout: {},
15
- props: {
16
- tabBarPosition: (0, _types.createTextEnumProp)({
17
- label: "Tab Bar Position",
18
- description: "Tab Bar Position",
19
- options: ["top", "bottom"],
20
- defaultValue: "top"
21
- }),
22
- keyboardDismissMode: (0, _types.createTextEnumProp)({
23
- label: "Keyboard Dismiss Mode",
24
- description: "Keyboard Dismiss Mode",
25
- options: ["auto", "on-drag", "none"],
26
- defaultValue: "auto"
27
- }),
28
- swipeEnabled: (0, _types.createBoolProp)({
29
- label: "Swipe Enabled",
30
- description: "Swipe Enabled",
31
- defaultValue: true
32
- }),
33
- scrollEnabled: (0, _types.createBoolProp)({
34
- label: "Scroll Enabled",
35
- description: "Scroll Enabled",
36
- defaultValue: true
37
- }),
38
- activeColor: (0, _types.createColorProp)({
39
- label: "Active Color",
40
- description: "Active Color",
41
- defaultValue: "primary"
42
- }),
43
- inactiveColor: (0, _types.createColorProp)({
44
- label: "Inactive Color",
45
- description: "Inactive Color",
46
- defaultValue: null
47
- }),
48
- pressColor: (0, _types.createColorProp)({
49
- label: "Press Color",
50
- description: "Press Color",
51
- defaultValue: null
52
- }),
53
- indicatorColor: (0, _types.createColorProp)({
54
- label: "Indicator Color",
55
- description: "Indicator Color",
56
- defaultValue: null
57
- })
58
- }
59
- }, {
60
- name: "TabViewItem",
61
- tag: "TabViewItem",
62
- category: _types.COMPONENT_TYPES.container,
63
- layout: {},
64
- props: {
65
- title: (0, _types.createTextProp)({
66
- label: "Title",
67
- description: "Tab Title"
68
- }),
69
- id: (0, _types.createTextProp)({
70
- label: "Id",
71
- description: "Tab Id"
72
- }),
73
- accessibilityLabel: (0, _types.createTextProp)({
74
- label: "Accessibility Label",
75
- description: "Accessibility Label"
76
- })
77
- }
78
- }];
79
- exports.SEED_DATA = SEED_DATA;