@draftbit/core 46.2.4-dedb7a.0 → 46.2.4-f941fc.0
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/Accordion/AccordionItem.js +25 -5
- package/lib/commonjs/components/DeprecatedButton.js +4 -22
- package/lib/commonjs/components/TabView/TabView.js +102 -0
- package/lib/commonjs/components/TabView/TabViewItem.js +26 -0
- package/lib/commonjs/components/TabView/index.js +23 -0
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/mappings/NumberInput.js +149 -146
- package/lib/commonjs/mappings/TabView.js +79 -0
- package/lib/commonjs/mappings/TextArea.js +193 -188
- package/lib/commonjs/mappings/TextField.js +8 -3
- package/lib/commonjs/mappings/TextInput.js +180 -178
- package/lib/module/components/TabView/TabView.js +87 -0
- package/lib/module/components/TabView/TabViewItem.js +18 -0
- package/lib/module/components/TabView/index.js +2 -0
- package/lib/module/index.js +1 -0
- package/lib/module/mappings/NumberInput.js +149 -146
- package/lib/module/mappings/TabView.js +70 -0
- package/lib/module/mappings/TextArea.js +193 -188
- package/lib/module/mappings/TextField.js +8 -3
- package/lib/module/mappings/TextInput.js +180 -178
- package/lib/typescript/src/components/TabView/TabView.d.ts +19 -0
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +10 -0
- package/lib/typescript/src/components/TabView/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/mappings/TabView.d.ts +111 -0
- package/lib/typescript/src/mappings/TextArea.d.ts +42 -42
- package/lib/typescript/src/mappings/TextField.d.ts +118 -118
- package/package.json +4 -2
- package/src/components/TabView/TabView.js +34 -0
- package/src/components/TabView/TabView.tsx +97 -0
- package/src/components/TabView/TabViewItem.js +5 -0
- package/src/components/TabView/TabViewItem.tsx +21 -0
- package/src/components/TabView/index.js +2 -0
- package/src/components/TabView/index.ts +2 -0
- package/src/index.js +1 -0
- package/src/index.tsx +1 -0
- package/src/mappings/NumberInput.js +163 -160
- package/src/mappings/NumberInput.ts +168 -165
- package/src/mappings/TabView.js +73 -0
- package/src/mappings/TabView.ts +80 -0
- package/src/mappings/TextArea.js +220 -213
- package/src/mappings/TextArea.ts +227 -219
- package/src/mappings/TextField.js +9 -2
- package/src/mappings/TextField.ts +11 -3
- package/src/mappings/TextInput.js +208 -205
- package/src/mappings/TextInput.ts +215 -212
|
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
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; }
|
|
23
23
|
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
24
|
const AccordionItem = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
Icon,
|
|
@@ -37,9 +35,10 @@ const AccordionItem = _ref => {
|
|
|
37
35
|
textStyles,
|
|
38
36
|
viewStyles
|
|
39
37
|
} = (0, _utilities.extractStyles)(style);
|
|
40
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
41
|
-
style: [styles.container, viewStyles]
|
|
42
|
-
|
|
38
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
39
|
+
style: [styles.container, viewStyles],
|
|
40
|
+
...rest
|
|
41
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
42
|
style: styles.row
|
|
44
43
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
45
44
|
name: icon,
|
|
@@ -74,4 +73,25 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
74
73
|
|
|
75
74
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
76
75
|
|
|
76
|
+
exports.default = _default;StyleSheet.create({
|
|
77
|
+
container: {
|
|
78
|
+
padding: 8
|
|
79
|
+
},
|
|
80
|
+
row: {
|
|
81
|
+
flexDirection: "row",
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
paddingLeft: 8
|
|
84
|
+
},
|
|
85
|
+
item: {
|
|
86
|
+
marginVertical: 6,
|
|
87
|
+
paddingLeft: 8
|
|
88
|
+
},
|
|
89
|
+
content: {
|
|
90
|
+
flex: 1,
|
|
91
|
+
justifyContent: "center"
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
96
|
+
|
|
77
97
|
exports.default = _default;
|
|
@@ -25,6 +25,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
+
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); }
|
|
29
|
+
|
|
28
30
|
const Button = _ref => {
|
|
29
31
|
let {
|
|
30
32
|
Icon,
|
|
@@ -126,7 +128,7 @@ const Button = _ref => {
|
|
|
126
128
|
alignSelf: "stretch",
|
|
127
129
|
...margins
|
|
128
130
|
}
|
|
129
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
131
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
|
|
130
132
|
onPress: onPress,
|
|
131
133
|
accessibilityState: {
|
|
132
134
|
disabled
|
|
@@ -134,7 +136,7 @@ const Button = _ref => {
|
|
|
134
136
|
accessibilityRole: "button",
|
|
135
137
|
disabled: disabled || loading,
|
|
136
138
|
style: [styles.button, buttonStyle, innerStyles]
|
|
137
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
139
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
138
140
|
style: styles.content
|
|
139
141
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
140
142
|
style: iconStyle
|
|
@@ -169,24 +171,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
169
171
|
|
|
170
172
|
var _default = (0, _theming.withTheme)(Button);
|
|
171
173
|
|
|
172
|
-
exports.default = _default;));
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
const styles = _reactNative.StyleSheet.create({
|
|
176
|
-
button: {
|
|
177
|
-
minWidth: 64,
|
|
178
|
-
borderStyle: "solid"
|
|
179
|
-
},
|
|
180
|
-
content: {
|
|
181
|
-
flexDirection: "row",
|
|
182
|
-
alignItems: "center",
|
|
183
|
-
justifyContent: "center"
|
|
184
|
-
},
|
|
185
|
-
icon: {
|
|
186
|
-
width: _Config.default.buttonIconSize
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
var _default = (0, _theming.withTheme)(Button);
|
|
191
|
-
|
|
192
174
|
exports.default = _default;
|
|
@@ -0,0 +1,102 @@
|
|
|
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;
|
|
@@ -0,0 +1,26 @@
|
|
|
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;
|
|
@@ -0,0 +1,23 @@
|
|
|
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 }; }
|
package/lib/commonjs/index.js
CHANGED
|
@@ -363,6 +363,18 @@ Object.defineProperty(exports, "SwitchRow", {
|
|
|
363
363
|
return _Switch.SwitchRow;
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
|
+
Object.defineProperty(exports, "TabView", {
|
|
367
|
+
enumerable: true,
|
|
368
|
+
get: function () {
|
|
369
|
+
return _TabView.TabView;
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
Object.defineProperty(exports, "TabViewItem", {
|
|
373
|
+
enumerable: true,
|
|
374
|
+
get: function () {
|
|
375
|
+
return _TabView.TabViewItem;
|
|
376
|
+
}
|
|
377
|
+
});
|
|
366
378
|
Object.defineProperty(exports, "TextField", {
|
|
367
379
|
enumerable: true,
|
|
368
380
|
get: function () {
|
|
@@ -464,6 +476,8 @@ var _ActionSheet = require("./components/ActionSheet");
|
|
|
464
476
|
|
|
465
477
|
var _Swiper = require("./components/Swiper");
|
|
466
478
|
|
|
479
|
+
var _TabView = require("./components/TabView");
|
|
480
|
+
|
|
467
481
|
var _Layout = require("./components/Layout");
|
|
468
482
|
|
|
469
483
|
var _index = require("./components/RadioButton/index");
|
|
@@ -7,6 +7,154 @@ exports.SEED_DATA_PROPS = exports.SEED_DATA = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _types = require("@draftbit/types");
|
|
9
9
|
|
|
10
|
+
const NUMBER_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
|
+
autoFocus: {
|
|
22
|
+
group: _types.GROUPS.basic,
|
|
23
|
+
label: "Auto Focus",
|
|
24
|
+
description: "Focuses the input on load in and brings up the keyboard",
|
|
25
|
+
editable: true,
|
|
26
|
+
required: false,
|
|
27
|
+
defaultValue: null,
|
|
28
|
+
formType: _types.FORM_TYPES.boolean,
|
|
29
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
30
|
+
},
|
|
31
|
+
caretHidden: {
|
|
32
|
+
group: _types.GROUPS.advanced,
|
|
33
|
+
label: "Hide Caret",
|
|
34
|
+
description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
|
|
35
|
+
editable: true,
|
|
36
|
+
required: false,
|
|
37
|
+
defaultValue: null,
|
|
38
|
+
formType: _types.FORM_TYPES.boolean,
|
|
39
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
40
|
+
},
|
|
41
|
+
contextMenuHidden: {
|
|
42
|
+
group: _types.GROUPS.advanced,
|
|
43
|
+
label: "Hide Context Menu",
|
|
44
|
+
description: "Hides the system context menu (Default: false)",
|
|
45
|
+
editable: true,
|
|
46
|
+
required: false,
|
|
47
|
+
defaultValue: null,
|
|
48
|
+
formType: _types.FORM_TYPES.boolean,
|
|
49
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
50
|
+
},
|
|
51
|
+
editable: {
|
|
52
|
+
group: _types.GROUPS.advanced,
|
|
53
|
+
label: "Editable",
|
|
54
|
+
description: "If false, the text is not editable",
|
|
55
|
+
editable: true,
|
|
56
|
+
required: false,
|
|
57
|
+
defaultValue: true,
|
|
58
|
+
formType: _types.FORM_TYPES.boolean,
|
|
59
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
60
|
+
},
|
|
61
|
+
keyboardAppearance: {
|
|
62
|
+
group: _types.GROUPS.advanced,
|
|
63
|
+
label: "Keyboard Appearance",
|
|
64
|
+
description: "Determines the color of the keyboard.(iOS Only)",
|
|
65
|
+
editable: true,
|
|
66
|
+
required: false,
|
|
67
|
+
defaultValue: null,
|
|
68
|
+
options: ["default", "light", "dark"],
|
|
69
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
70
|
+
propType: _types.PROP_TYPES.STRING
|
|
71
|
+
},
|
|
72
|
+
keyboardType: {
|
|
73
|
+
group: _types.GROUPS.advanced,
|
|
74
|
+
label: "Keyboard Type",
|
|
75
|
+
description: "Determines what keyboard is given to the user.",
|
|
76
|
+
editable: true,
|
|
77
|
+
required: false,
|
|
78
|
+
defaultValue: null,
|
|
79
|
+
options: ["numeric", "numbers-and-punctuation", "number-pad"],
|
|
80
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
81
|
+
propType: _types.PROP_TYPES.STRING
|
|
82
|
+
},
|
|
83
|
+
maxLength: {
|
|
84
|
+
group: _types.GROUPS.basic,
|
|
85
|
+
label: "Max Length",
|
|
86
|
+
description: "Limits the input to a set number of characters.",
|
|
87
|
+
editable: true,
|
|
88
|
+
required: false,
|
|
89
|
+
defaultValue: null,
|
|
90
|
+
min: 0,
|
|
91
|
+
step: 1,
|
|
92
|
+
precision: 0,
|
|
93
|
+
formType: _types.FORM_TYPES.number,
|
|
94
|
+
propType: _types.PROP_TYPES.NUMBER
|
|
95
|
+
},
|
|
96
|
+
placeholder: {
|
|
97
|
+
group: _types.GROUPS.basic,
|
|
98
|
+
label: "Placeholder Text",
|
|
99
|
+
description: "The text that is shown on load when no value is available.",
|
|
100
|
+
editable: true,
|
|
101
|
+
required: false,
|
|
102
|
+
defaultValue: "Enter a number...",
|
|
103
|
+
formType: _types.FORM_TYPES.string,
|
|
104
|
+
propType: _types.PROP_TYPES.STRING
|
|
105
|
+
},
|
|
106
|
+
placeholderTextColor: {
|
|
107
|
+
group: _types.GROUPS.basic,
|
|
108
|
+
label: "Placeholder Text Color",
|
|
109
|
+
description: "The color of the placeholder text.",
|
|
110
|
+
editable: true,
|
|
111
|
+
required: false,
|
|
112
|
+
defaultValue: null,
|
|
113
|
+
formType: _types.FORM_TYPES.color,
|
|
114
|
+
propType: _types.PROP_TYPES.STRING
|
|
115
|
+
},
|
|
116
|
+
returnKeyLabel: {
|
|
117
|
+
group: _types.GROUPS.advanced,
|
|
118
|
+
label: "Return Key Label",
|
|
119
|
+
description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
|
|
120
|
+
editable: true,
|
|
121
|
+
required: false,
|
|
122
|
+
defaultValue: null,
|
|
123
|
+
formType: _types.FORM_TYPES.string,
|
|
124
|
+
propType: _types.PROP_TYPES.STRING
|
|
125
|
+
},
|
|
126
|
+
returnKeyType: {
|
|
127
|
+
group: _types.GROUPS.advanced,
|
|
128
|
+
label: "Return Key Type",
|
|
129
|
+
description: "Determines how the return key should look like",
|
|
130
|
+
editable: true,
|
|
131
|
+
required: false,
|
|
132
|
+
defaultValue: null,
|
|
133
|
+
options: ["done", "go", "next", "search", "send", "none", "previous", "default", "emergency-call", "google", "join", "route", "yahoo"],
|
|
134
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
135
|
+
propType: _types.PROP_TYPES.STRING
|
|
136
|
+
},
|
|
137
|
+
selectionColor: {
|
|
138
|
+
group: _types.GROUPS.advanced,
|
|
139
|
+
label: "Selection Color",
|
|
140
|
+
description: "Color of the highlighted portion when selecting.",
|
|
141
|
+
editable: true,
|
|
142
|
+
required: false,
|
|
143
|
+
defaultValue: null,
|
|
144
|
+
formType: _types.FORM_TYPES.color,
|
|
145
|
+
propType: _types.PROP_TYPES.STRING
|
|
146
|
+
},
|
|
147
|
+
selectTextOnFocus: {
|
|
148
|
+
group: _types.GROUPS.advanced,
|
|
149
|
+
label: "Select Text on Focus",
|
|
150
|
+
description: "If true, all the text will automatically be selected on focus",
|
|
151
|
+
editable: true,
|
|
152
|
+
required: false,
|
|
153
|
+
defaultValue: null,
|
|
154
|
+
formType: _types.FORM_TYPES.boolean,
|
|
155
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
156
|
+
}
|
|
157
|
+
};
|
|
10
158
|
const SEED_DATA_PROPS = {
|
|
11
159
|
style: {
|
|
12
160
|
group: _types.GROUPS.basic,
|
|
@@ -87,152 +235,7 @@ const SEED_DATA = [{
|
|
|
87
235
|
},
|
|
88
236
|
triggers: [_types.Triggers.OnChangeText],
|
|
89
237
|
props: { ...SEED_DATA_PROPS,
|
|
90
|
-
|
|
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
|
-
autoFocus: {
|
|
101
|
-
group: _types.GROUPS.basic,
|
|
102
|
-
label: "Auto Focus",
|
|
103
|
-
description: "Focuses the input on load in and brings up the keyboard",
|
|
104
|
-
editable: true,
|
|
105
|
-
required: false,
|
|
106
|
-
defaultValue: null,
|
|
107
|
-
formType: _types.FORM_TYPES.boolean,
|
|
108
|
-
propType: _types.PROP_TYPES.BOOLEAN
|
|
109
|
-
},
|
|
110
|
-
caretHidden: {
|
|
111
|
-
group: _types.GROUPS.advanced,
|
|
112
|
-
label: "Hide Caret",
|
|
113
|
-
description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
|
|
114
|
-
editable: true,
|
|
115
|
-
required: false,
|
|
116
|
-
defaultValue: null,
|
|
117
|
-
formType: _types.FORM_TYPES.boolean,
|
|
118
|
-
propType: _types.PROP_TYPES.BOOLEAN
|
|
119
|
-
},
|
|
120
|
-
contextMenuHidden: {
|
|
121
|
-
group: _types.GROUPS.advanced,
|
|
122
|
-
label: "Hide Context Menu",
|
|
123
|
-
description: "Hides the system context menu (Default: false)",
|
|
124
|
-
editable: true,
|
|
125
|
-
required: false,
|
|
126
|
-
defaultValue: null,
|
|
127
|
-
formType: _types.FORM_TYPES.boolean,
|
|
128
|
-
propType: _types.PROP_TYPES.BOOLEAN
|
|
129
|
-
},
|
|
130
|
-
editable: {
|
|
131
|
-
group: _types.GROUPS.advanced,
|
|
132
|
-
label: "Editable",
|
|
133
|
-
description: "If false, the text is not editable",
|
|
134
|
-
editable: true,
|
|
135
|
-
required: false,
|
|
136
|
-
defaultValue: true,
|
|
137
|
-
formType: _types.FORM_TYPES.boolean,
|
|
138
|
-
propType: _types.PROP_TYPES.BOOLEAN
|
|
139
|
-
},
|
|
140
|
-
keyboardAppearance: {
|
|
141
|
-
group: _types.GROUPS.advanced,
|
|
142
|
-
label: "Keyboard Appearance",
|
|
143
|
-
description: "Determines the color of the keyboard.(iOS Only)",
|
|
144
|
-
editable: true,
|
|
145
|
-
required: false,
|
|
146
|
-
defaultValue: null,
|
|
147
|
-
options: ["default", "light", "dark"],
|
|
148
|
-
formType: _types.FORM_TYPES.flatArray,
|
|
149
|
-
propType: _types.PROP_TYPES.STRING
|
|
150
|
-
},
|
|
151
|
-
keyboardType: {
|
|
152
|
-
group: _types.GROUPS.advanced,
|
|
153
|
-
label: "Keyboard Type",
|
|
154
|
-
description: "Determines what keyboard is given to the user.",
|
|
155
|
-
editable: true,
|
|
156
|
-
required: false,
|
|
157
|
-
defaultValue: null,
|
|
158
|
-
options: ["numeric", "numbers-and-punctuation", "number-pad"],
|
|
159
|
-
formType: _types.FORM_TYPES.flatArray,
|
|
160
|
-
propType: _types.PROP_TYPES.STRING
|
|
161
|
-
},
|
|
162
|
-
maxLength: {
|
|
163
|
-
group: _types.GROUPS.basic,
|
|
164
|
-
label: "Max Length",
|
|
165
|
-
description: "Limits the input to a set number of characters.",
|
|
166
|
-
editable: true,
|
|
167
|
-
required: false,
|
|
168
|
-
defaultValue: null,
|
|
169
|
-
min: 0,
|
|
170
|
-
step: 1,
|
|
171
|
-
precision: 0,
|
|
172
|
-
formType: _types.FORM_TYPES.number,
|
|
173
|
-
propType: _types.PROP_TYPES.NUMBER
|
|
174
|
-
},
|
|
175
|
-
placeholder: {
|
|
176
|
-
group: _types.GROUPS.basic,
|
|
177
|
-
label: "Placeholder Text",
|
|
178
|
-
description: "The text that is shown on load when no value is available.",
|
|
179
|
-
editable: true,
|
|
180
|
-
required: false,
|
|
181
|
-
defaultValue: "Enter a number...",
|
|
182
|
-
formType: _types.FORM_TYPES.string,
|
|
183
|
-
propType: _types.PROP_TYPES.STRING
|
|
184
|
-
},
|
|
185
|
-
placeholderTextColor: {
|
|
186
|
-
group: _types.GROUPS.basic,
|
|
187
|
-
label: "Placeholder Text Color",
|
|
188
|
-
description: "The color of the placeholder text.",
|
|
189
|
-
editable: true,
|
|
190
|
-
required: false,
|
|
191
|
-
defaultValue: null,
|
|
192
|
-
formType: _types.FORM_TYPES.color,
|
|
193
|
-
propType: _types.PROP_TYPES.STRING
|
|
194
|
-
},
|
|
195
|
-
returnKeyLabel: {
|
|
196
|
-
group: _types.GROUPS.advanced,
|
|
197
|
-
label: "Return Key Label",
|
|
198
|
-
description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
|
|
199
|
-
editable: true,
|
|
200
|
-
required: false,
|
|
201
|
-
defaultValue: null,
|
|
202
|
-
formType: _types.FORM_TYPES.string,
|
|
203
|
-
propType: _types.PROP_TYPES.STRING
|
|
204
|
-
},
|
|
205
|
-
returnKeyType: {
|
|
206
|
-
group: _types.GROUPS.advanced,
|
|
207
|
-
label: "Return Key Type",
|
|
208
|
-
description: "Determines how the return key should look like",
|
|
209
|
-
editable: true,
|
|
210
|
-
required: false,
|
|
211
|
-
defaultValue: null,
|
|
212
|
-
options: ["done", "go", "next", "search", "send", "none", "previous", "default", "emergency-call", "google", "join", "route", "yahoo"],
|
|
213
|
-
formType: _types.FORM_TYPES.flatArray,
|
|
214
|
-
propType: _types.PROP_TYPES.STRING
|
|
215
|
-
},
|
|
216
|
-
selectionColor: {
|
|
217
|
-
group: _types.GROUPS.advanced,
|
|
218
|
-
label: "Selection Color",
|
|
219
|
-
description: "Color of the highlighted portion when selecting.",
|
|
220
|
-
editable: true,
|
|
221
|
-
required: false,
|
|
222
|
-
defaultValue: null,
|
|
223
|
-
formType: _types.FORM_TYPES.color,
|
|
224
|
-
propType: _types.PROP_TYPES.STRING
|
|
225
|
-
},
|
|
226
|
-
selectTextOnFocus: {
|
|
227
|
-
group: _types.GROUPS.advanced,
|
|
228
|
-
label: "Select Text on Focus",
|
|
229
|
-
description: "If true, all the text will automatically be selected on focus",
|
|
230
|
-
editable: true,
|
|
231
|
-
required: false,
|
|
232
|
-
defaultValue: null,
|
|
233
|
-
formType: _types.FORM_TYPES.boolean,
|
|
234
|
-
propType: _types.PROP_TYPES.BOOLEAN
|
|
235
|
-
}
|
|
238
|
+
...NUMBER_INPUT_PROPS
|
|
236
239
|
}
|
|
237
240
|
}];
|
|
238
241
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -0,0 +1,79 @@
|
|
|
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;
|