aport-tools 4.3.2 → 4.3.3
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/dist/index.esm.js +20 -14
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +20 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! aport-tools v4.3.
|
1
|
+
/*! aport-tools v4.3.3 | ISC */
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
var React = require('react');
|
@@ -407,13 +407,12 @@ var TextArea = function TextArea(_a) {
|
|
407
407
|
style: [styles$6.textArea, style, {
|
408
408
|
backgroundColor: colors.body.hex,
|
409
409
|
color: colors.text.hex,
|
410
|
-
borderColor: colors.
|
410
|
+
borderColor: formErrors[name] ? colors.error.hex : "#CCC"
|
411
411
|
}],
|
412
412
|
value: formValues[name] || '',
|
413
413
|
onChangeText: handleChange,
|
414
414
|
placeholder: label,
|
415
|
-
placeholderTextColor:
|
416
|
-
,
|
415
|
+
placeholderTextColor: colors.placeHolder.hex,
|
417
416
|
multiline: true,
|
418
417
|
numberOfLines: 4,
|
419
418
|
textAlignVertical: "top"
|
@@ -492,7 +491,8 @@ var InputList = function InputList(_a) {
|
|
492
491
|
onChange = _a.onChange;
|
493
492
|
var _h = useFormContext(),
|
494
493
|
formValues = _h.formValues,
|
495
|
-
setFormValue = _h.setFormValue
|
494
|
+
setFormValue = _h.setFormValue,
|
495
|
+
formErrors = _h.errors;
|
496
496
|
var _j = React.useState(false),
|
497
497
|
isDropdownVisible = _j[0],
|
498
498
|
setIsDropdownVisible = _j[1];
|
@@ -569,14 +569,18 @@ var InputList = function InputList(_a) {
|
|
569
569
|
marginBottom: 4
|
570
570
|
}
|
571
571
|
}, name), /*#__PURE__*/React.createElement(reactNative.TouchableOpacity, {
|
572
|
-
style: styles$4.inputContainer,
|
572
|
+
style: [styles$4.inputContainer, {
|
573
|
+
borderColor: formErrors[name] ? colors.error.hex : "#CCC"
|
574
|
+
}],
|
573
575
|
onPress: toggleDropdown,
|
574
576
|
disabled: disabled
|
575
577
|
}, /*#__PURE__*/React.createElement(reactNative.Text, {
|
576
578
|
style: {
|
577
579
|
color: colors.text.hex
|
578
580
|
}
|
579
|
-
}, renderSelectedText())), /*#__PURE__*/React.createElement(
|
581
|
+
}, renderSelectedText())), formErrors[name] && formErrors[name].length > 0 && (/*#__PURE__*/React.createElement(ErrorList, {
|
582
|
+
errors: formErrors[name]
|
583
|
+
})), /*#__PURE__*/React.createElement(reactNative.Modal, {
|
580
584
|
visible: isDropdownVisible,
|
581
585
|
transparent: true,
|
582
586
|
animationType: "fade"
|
@@ -625,11 +629,12 @@ var InputList = function InputList(_a) {
|
|
625
629
|
}))));
|
626
630
|
};
|
627
631
|
var styles$4 = reactNative.StyleSheet.create({
|
628
|
-
container: {
|
632
|
+
container: {
|
633
|
+
marginVertical: 10
|
634
|
+
},
|
629
635
|
inputContainer: {
|
630
636
|
padding: 12,
|
631
637
|
borderWidth: 1,
|
632
|
-
borderColor: '#ccc',
|
633
638
|
borderRadius: 5
|
634
639
|
},
|
635
640
|
dropdownContainer: {
|
@@ -854,9 +859,8 @@ var InputAttach = function InputAttach(_a) {
|
|
854
859
|
_e = _a.placeholder,
|
855
860
|
placeholder = _e === void 0 ? "Upload an image" : _e;
|
856
861
|
var _f = useFormContext(),
|
857
|
-
setFormValue = _f.setFormValue
|
858
|
-
_f.
|
859
|
-
var errors = _f.errors;
|
862
|
+
setFormValue = _f.setFormValue,
|
863
|
+
errors = _f.errors;
|
860
864
|
var _g = React.useState([]),
|
861
865
|
selectedFiles = _g[0],
|
862
866
|
setSelectedFiles = _g[1];
|
@@ -877,7 +881,9 @@ var InputAttach = function InputAttach(_a) {
|
|
877
881
|
return [2 /*return*/];
|
878
882
|
}
|
879
883
|
return [4 /*yield*/, ImagePicker__namespace.launchImageLibraryAsync({
|
880
|
-
mediaTypes:
|
884
|
+
mediaTypes: ["images"],
|
885
|
+
// Updated usage
|
886
|
+
allowsEditing: true,
|
881
887
|
allowsMultipleSelection: amount > 1,
|
882
888
|
quality: 1
|
883
889
|
})];
|
@@ -970,7 +976,7 @@ var styles$1 = reactNative.StyleSheet.create({
|
|
970
976
|
marginVertical: 10
|
971
977
|
},
|
972
978
|
label: {
|
973
|
-
|
979
|
+
marginTop: 5
|
974
980
|
},
|
975
981
|
fileContainer: {
|
976
982
|
flexDirection: "row",
|