@draftbit/core 46.2.4-f941fc.0 → 46.2.4-fba591.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/AnimatedCircularProgress.js +12 -2
- package/lib/commonjs/components/AvatarEdit.js +17 -5
- package/lib/commonjs/components/Carousel.js +34 -10
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +24 -6
- package/lib/commonjs/components/Config.js +1 -0
- package/lib/commonjs/components/IconButton.js +22 -5
- package/lib/commonjs/components/Picker/PickerComponent.web.js +24 -5
- package/lib/commonjs/components/Portal/PortalConsumer.js +10 -8
- package/lib/commonjs/components/ProgressBar.js +23 -7
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +11 -2
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +16 -3
- package/lib/commonjs/components/RadioButton/context.js +1 -1
- package/lib/commonjs/components/SVG.js +48 -0
- package/lib/commonjs/components/Slider.js +24 -5
- package/lib/commonjs/components/TextField.js +65 -31
- package/lib/commonjs/components/ToggleButton.js +18 -3
- package/lib/commonjs/index.js +8 -14
- package/lib/commonjs/mappings/Image.js +2 -2
- package/lib/commonjs/mappings/MapView.js +1 -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/Config.js +1 -0
- package/lib/module/components/SVG.js +31 -0
- package/lib/module/components/TextField.js +2 -1
- package/lib/module/index.js +1 -1
- package/lib/module/mappings/Image.js +2 -2
- package/lib/module/mappings/MapView.js +1 -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/SVG.d.ts +8 -0
- package/lib/typescript/src/components/TextField.d.ts +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/mappings/MapView.d.ts +1 -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 +4 -5
- package/src/components/Config.js +1 -0
- package/src/components/Config.ts +1 -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 +1 -1
- package/src/index.tsx +1 -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/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
|
@@ -17,10 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
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
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
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
-
|
|
24
20
|
const AnimatedText = _reactNative.Animated.createAnimatedComponent(_reactNative.Text);
|
|
25
21
|
|
|
26
22
|
const FOCUS_ANIMATION_DURATION = 150;
|
|
@@ -30,8 +26,7 @@ const ICON_SIZE = 24;
|
|
|
30
26
|
class TextField extends React.Component {
|
|
31
27
|
constructor() {
|
|
32
28
|
super(...arguments);
|
|
33
|
-
|
|
34
|
-
_defineProperty(this, "state", {
|
|
29
|
+
this.state = {
|
|
35
30
|
labeled: new _reactNative.Animated.Value(this.props.value || this.props.error ? 0 : 1),
|
|
36
31
|
focused: false,
|
|
37
32
|
placeholder: this.props.error ? this.props.placeholder : "",
|
|
@@ -39,36 +34,35 @@ class TextField extends React.Component {
|
|
|
39
34
|
measured: false,
|
|
40
35
|
width: 0
|
|
41
36
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
_defineProperty(this, "_timer", setTimeout(() => {}, 0));
|
|
37
|
+
};
|
|
38
|
+
this._timer = setTimeout(() => {}, 0);
|
|
45
39
|
|
|
46
|
-
|
|
40
|
+
this._showPlaceholder = () => {
|
|
47
41
|
clearTimeout(this._timer); // Set the placeholder in a delay to offset the label animation
|
|
48
42
|
// If we show it immediately, they'll overlap and look ugly
|
|
49
43
|
|
|
50
44
|
this._timer = setTimeout(() => this.setState({
|
|
51
45
|
placeholder: this.props.placeholder
|
|
52
46
|
}), 50);
|
|
53
|
-
}
|
|
47
|
+
};
|
|
54
48
|
|
|
55
|
-
|
|
49
|
+
this._hidePlaceholder = () => this.setState({
|
|
56
50
|
placeholder: ""
|
|
57
|
-
})
|
|
51
|
+
});
|
|
58
52
|
|
|
59
|
-
|
|
53
|
+
this._restoreLabel = () => _reactNative.Animated.timing(this.state.labeled, {
|
|
60
54
|
toValue: 1,
|
|
61
55
|
duration: FOCUS_ANIMATION_DURATION,
|
|
62
56
|
useNativeDriver: true
|
|
63
|
-
}).start()
|
|
57
|
+
}).start();
|
|
64
58
|
|
|
65
|
-
|
|
59
|
+
this._minmizeLabel = () => _reactNative.Animated.timing(this.state.labeled, {
|
|
66
60
|
toValue: 0,
|
|
67
61
|
duration: BLUR_ANIMATION_DURATION,
|
|
68
62
|
useNativeDriver: true
|
|
69
|
-
}).start()
|
|
63
|
+
}).start();
|
|
70
64
|
|
|
71
|
-
|
|
65
|
+
this._handleFocus = () => {
|
|
72
66
|
if (this.props.disabled) {
|
|
73
67
|
return;
|
|
74
68
|
}
|
|
@@ -76,9 +70,9 @@ class TextField extends React.Component {
|
|
|
76
70
|
this.setState({
|
|
77
71
|
focused: true
|
|
78
72
|
});
|
|
79
|
-
}
|
|
73
|
+
};
|
|
80
74
|
|
|
81
|
-
|
|
75
|
+
this._handleBlur = () => {
|
|
82
76
|
if (this.props.disabled) {
|
|
83
77
|
return;
|
|
84
78
|
}
|
|
@@ -86,9 +80,9 @@ class TextField extends React.Component {
|
|
|
86
80
|
this.setState({
|
|
87
81
|
focused: false
|
|
88
82
|
});
|
|
89
|
-
}
|
|
83
|
+
};
|
|
90
84
|
|
|
91
|
-
|
|
85
|
+
this._handleChangeText = value => {
|
|
92
86
|
if (this.props.disabled) {
|
|
93
87
|
return;
|
|
94
88
|
}
|
|
@@ -104,9 +98,9 @@ class TextField extends React.Component {
|
|
|
104
98
|
});
|
|
105
99
|
this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
|
|
106
100
|
}
|
|
107
|
-
}
|
|
101
|
+
};
|
|
108
102
|
|
|
109
|
-
|
|
103
|
+
this._root = undefined;
|
|
110
104
|
}
|
|
111
105
|
|
|
112
106
|
static getDerivedStateFromProps(nextProps, prevState) {
|
|
@@ -157,10 +151,11 @@ class TextField extends React.Component {
|
|
|
157
151
|
focused: !prevState.focused
|
|
158
152
|
}));
|
|
159
153
|
}
|
|
160
|
-
|
|
161
154
|
/**
|
|
162
155
|
* @internal
|
|
163
156
|
*/
|
|
157
|
+
|
|
158
|
+
|
|
164
159
|
setNativeProps(args) {
|
|
165
160
|
return this._root && this._root.setNativeProps(args);
|
|
166
161
|
}
|
|
@@ -193,6 +188,7 @@ class TextField extends React.Component {
|
|
|
193
188
|
rightIconName,
|
|
194
189
|
assistiveText,
|
|
195
190
|
underlineColor: underlineColorProp,
|
|
191
|
+
activeBorderColor: activeBorderColorProp,
|
|
196
192
|
multiline = false,
|
|
197
193
|
numberOfLines = 4,
|
|
198
194
|
style,
|
|
@@ -202,7 +198,8 @@ class TextField extends React.Component {
|
|
|
202
198
|
roundness,
|
|
203
199
|
disabledOpacity
|
|
204
200
|
},
|
|
205
|
-
render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, props
|
|
201
|
+
render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, { ...props
|
|
202
|
+
}),
|
|
206
203
|
...rest
|
|
207
204
|
} = this.props;
|
|
208
205
|
const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
|
|
@@ -220,7 +217,7 @@ class TextField extends React.Component {
|
|
|
220
217
|
underlineColor = "transparent";
|
|
221
218
|
backgroundColor = colors.divider;
|
|
222
219
|
} else {
|
|
223
|
-
activeColor = error ? colors.error :
|
|
220
|
+
activeColor = error ? colors.error : activeBorderColorProp;
|
|
224
221
|
placeholderColor = borderColor = colors.light;
|
|
225
222
|
underlineColor = underlineColorProp;
|
|
226
223
|
backgroundColor = colors.background;
|
|
@@ -356,9 +353,9 @@ class TextField extends React.Component {
|
|
|
356
353
|
|
|
357
354
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
358
355
|
style: [styles.container, styleProp]
|
|
359
|
-
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon,
|
|
356
|
+
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
|
|
360
357
|
style: leftIconStyle
|
|
361
|
-
})
|
|
358
|
+
}) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
362
359
|
style: (0, _utilities.applyStyles)([containerStyle], {
|
|
363
360
|
height: style === null || style === void 0 ? void 0 : style.height,
|
|
364
361
|
backgroundColor: bgColor,
|
|
@@ -425,9 +422,9 @@ class TextField extends React.Component {
|
|
|
425
422
|
style: {
|
|
426
423
|
justifyContent: type === "solid" ? "center" : undefined
|
|
427
424
|
}
|
|
428
|
-
}, /*#__PURE__*/React.createElement(Icon,
|
|
425
|
+
}, /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
|
|
429
426
|
style: leftIconStyle
|
|
430
|
-
}))
|
|
427
|
+
})) : null, render({
|
|
431
428
|
ref: c => {
|
|
432
429
|
this._root = c;
|
|
433
430
|
},
|
|
@@ -468,6 +465,43 @@ var _default = (0, _theming.withTheme)(TextField);
|
|
|
468
465
|
|
|
469
466
|
exports.default = _default;
|
|
470
467
|
|
|
468
|
+
const styles = _reactNative.StyleSheet.create({
|
|
469
|
+
container: {
|
|
470
|
+
alignSelf: "stretch"
|
|
471
|
+
},
|
|
472
|
+
placeholder: {
|
|
473
|
+
position: "absolute",
|
|
474
|
+
left: 0
|
|
475
|
+
},
|
|
476
|
+
underline: {
|
|
477
|
+
position: "absolute",
|
|
478
|
+
left: 0,
|
|
479
|
+
right: 0,
|
|
480
|
+
bottom: 0,
|
|
481
|
+
height: 2
|
|
482
|
+
},
|
|
483
|
+
input: {
|
|
484
|
+
flexGrow: 1,
|
|
485
|
+
justifyContent: "center",
|
|
486
|
+
textAlignVertical: "center",
|
|
487
|
+
margin: 0,
|
|
488
|
+
textAlign: _reactNative.I18nManager.isRTL ? "right" : "left"
|
|
489
|
+
}
|
|
490
|
+
});? /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
491
|
+
style: [{
|
|
492
|
+
color: error ? colors.error : colors.light,
|
|
493
|
+
marginTop: 8,
|
|
494
|
+
marginLeft: assistiveTextLeftMargin
|
|
495
|
+
}]
|
|
496
|
+
}, assistiveText) : null);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
var _default = (0, _theming.withTheme)(TextField);
|
|
502
|
+
|
|
503
|
+
exports.default = _default;
|
|
504
|
+
|
|
471
505
|
const styles = _reactNative.StyleSheet.create({
|
|
472
506
|
container: {
|
|
473
507
|
alignSelf: "stretch"
|
|
@@ -19,8 +19,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
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; }
|
|
21
21
|
|
|
22
|
-
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); }
|
|
23
|
-
|
|
24
22
|
const ToggleButton = _ref => {
|
|
25
23
|
let {
|
|
26
24
|
Icon,
|
|
@@ -58,7 +56,7 @@ const ToggleButton = _ref => {
|
|
|
58
56
|
onPress(!internalValue);
|
|
59
57
|
};
|
|
60
58
|
|
|
61
|
-
return /*#__PURE__*/React.createElement(_IconButton.default,
|
|
59
|
+
return /*#__PURE__*/React.createElement(_IconButton.default, {
|
|
62
60
|
Icon: Icon,
|
|
63
61
|
icon: icon,
|
|
64
62
|
size: iconSize,
|
|
@@ -70,6 +68,23 @@ const ToggleButton = _ref => {
|
|
|
70
68
|
height,
|
|
71
69
|
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
72
70
|
borderColor: colors[borderColor]
|
|
71
|
+
}, style],
|
|
72
|
+
...rest
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const styles = _reactNative.StyleSheet.create({
|
|
77
|
+
mainContainer: {
|
|
78
|
+
borderWidth: 1
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
var _default = (0, _theming.withTheme)(ToggleButton);
|
|
83
|
+
|
|
84
|
+
exports.default = _default;th,
|
|
85
|
+
height,
|
|
86
|
+
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
87
|
+
borderColor: colors[borderColor]
|
|
73
88
|
}, style]
|
|
74
89
|
}, rest));
|
|
75
90
|
};
|
package/lib/commonjs/index.js
CHANGED
|
@@ -291,6 +291,12 @@ Object.defineProperty(exports, "RowHeadlineImageIcon", {
|
|
|
291
291
|
return _RowHeadlineImageIcon.default;
|
|
292
292
|
}
|
|
293
293
|
});
|
|
294
|
+
Object.defineProperty(exports, "SVG", {
|
|
295
|
+
enumerable: true,
|
|
296
|
+
get: function () {
|
|
297
|
+
return _SVG.default;
|
|
298
|
+
}
|
|
299
|
+
});
|
|
294
300
|
Object.defineProperty(exports, "ScreenContainer", {
|
|
295
301
|
enumerable: true,
|
|
296
302
|
get: function () {
|
|
@@ -363,18 +369,6 @@ Object.defineProperty(exports, "SwitchRow", {
|
|
|
363
369
|
return _Switch.SwitchRow;
|
|
364
370
|
}
|
|
365
371
|
});
|
|
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
|
-
});
|
|
378
372
|
Object.defineProperty(exports, "TextField", {
|
|
379
373
|
enumerable: true,
|
|
380
374
|
get: function () {
|
|
@@ -454,6 +448,8 @@ var _IconButton = _interopRequireDefault(require("./components/IconButton"));
|
|
|
454
448
|
|
|
455
449
|
var _Image = _interopRequireDefault(require("./components/Image"));
|
|
456
450
|
|
|
451
|
+
var _SVG = _interopRequireDefault(require("./components/SVG"));
|
|
452
|
+
|
|
457
453
|
var _NumberInput = _interopRequireDefault(require("./components/NumberInput"));
|
|
458
454
|
|
|
459
455
|
var _ScreenContainer = _interopRequireDefault(require("./components/ScreenContainer"));
|
|
@@ -476,8 +472,6 @@ var _ActionSheet = require("./components/ActionSheet");
|
|
|
476
472
|
|
|
477
473
|
var _Swiper = require("./components/Swiper");
|
|
478
474
|
|
|
479
|
-
var _TabView = require("./components/TabView");
|
|
480
|
-
|
|
481
475
|
var _Layout = require("./components/Layout");
|
|
482
476
|
|
|
483
477
|
var _index = require("./components/RadioButton/index");
|
|
@@ -14,8 +14,8 @@ const SEED_DATA = {
|
|
|
14
14
|
category: _types.COMPONENT_TYPES.media,
|
|
15
15
|
stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
16
16
|
layout: {
|
|
17
|
-
width:
|
|
18
|
-
height:
|
|
17
|
+
width: 100,
|
|
18
|
+
height: 100
|
|
19
19
|
},
|
|
20
20
|
props: {
|
|
21
21
|
source: (0, _types.createImageProp)(),
|
|
@@ -7,154 +7,6 @@ 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
|
-
};
|
|
158
10
|
const SEED_DATA_PROPS = {
|
|
159
11
|
style: {
|
|
160
12
|
group: _types.GROUPS.basic,
|
|
@@ -235,7 +87,152 @@ const SEED_DATA = [{
|
|
|
235
87
|
},
|
|
236
88
|
triggers: [_types.Triggers.OnChangeText],
|
|
237
89
|
props: { ...SEED_DATA_PROPS,
|
|
238
|
-
|
|
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
|
+
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
|
+
}
|
|
239
236
|
}
|
|
240
237
|
}];
|
|
241
238
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -0,0 +1,24 @@
|
|
|
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: "SVG",
|
|
12
|
+
tag: "SVG",
|
|
13
|
+
description: "An SVG component",
|
|
14
|
+
category: _types.COMPONENT_TYPES.media,
|
|
15
|
+
layout: {
|
|
16
|
+
width: 100,
|
|
17
|
+
height: 100
|
|
18
|
+
},
|
|
19
|
+
stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
20
|
+
props: {
|
|
21
|
+
source: (0, _types.createSVGProp)()
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.SEED_DATA = SEED_DATA;
|