react-crud-mobile 1.0.38 → 1.0.39
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/elements/core/Input.d.ts +2 -1
- package/dist/react-crud-mobile.cjs.development.js +82 -28
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +83 -29
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/Button.tsx +63 -10
- package/src/elements/core/Input.tsx +15 -8
|
@@ -10,6 +10,7 @@ var reactCrudUtils = require('react-crud-utils');
|
|
|
10
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
11
11
|
var Ionicons = _interopDefault(require('@expo/vector-icons/Ionicons'));
|
|
12
12
|
var reactNative = require('react-native');
|
|
13
|
+
var vectorIcons = require('@expo/vector-icons');
|
|
13
14
|
|
|
14
15
|
function _extends() {
|
|
15
16
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -838,20 +839,68 @@ var styles$2 = {
|
|
|
838
839
|
};
|
|
839
840
|
|
|
840
841
|
function Button(props) {
|
|
841
|
-
var
|
|
842
|
-
|
|
842
|
+
var color = props.color;
|
|
843
|
+
var label = props.label;
|
|
844
|
+
var icon = props.icon;
|
|
845
|
+
var styles = {
|
|
846
|
+
text: _extends({
|
|
847
|
+
color: '#ffffff',
|
|
848
|
+
lineHeight: 30,
|
|
849
|
+
fontWeight: '500',
|
|
850
|
+
textAlign: 'center'
|
|
851
|
+
}, props.textStyle),
|
|
852
|
+
inner: _extends({
|
|
853
|
+
flex: 1,
|
|
854
|
+
flexDirection: 'row',
|
|
855
|
+
flexWrap: 'wrap',
|
|
856
|
+
textAlign: 'center',
|
|
857
|
+
alignItems: 'center',
|
|
858
|
+
margin: 'auto'
|
|
859
|
+
}, props.textStyle),
|
|
860
|
+
icon: {
|
|
861
|
+
color: '#fff',
|
|
862
|
+
fontSize: 18,
|
|
863
|
+
paddingRight: 10
|
|
864
|
+
},
|
|
865
|
+
button: _extends({
|
|
866
|
+
padding: 5,
|
|
867
|
+
alignItems: 'center',
|
|
868
|
+
paddingLeft: 10,
|
|
869
|
+
paddingRight: 10,
|
|
870
|
+
minWidth: 200,
|
|
871
|
+
margin: 5,
|
|
872
|
+
textAlign: 'center',
|
|
873
|
+
verticalAling: 'middle',
|
|
874
|
+
lineHeight: 30,
|
|
875
|
+
borderRadius: 20,
|
|
876
|
+
backgroundColor: color,
|
|
877
|
+
color: '#ffffff'
|
|
878
|
+
}, props.buttonStyle)
|
|
843
879
|
};
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
880
|
+
var onClick = function onClick(e) {
|
|
881
|
+
if (typeof props.click === 'function') {
|
|
882
|
+
props.click(e);
|
|
883
|
+
}
|
|
884
|
+
};
|
|
885
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableHighlight, {
|
|
886
|
+
underlayColor: 'transparent',
|
|
887
|
+
onPress: onClick,
|
|
888
|
+
style: styles.button,
|
|
889
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
|
|
890
|
+
style: styles.inner,
|
|
891
|
+
children: [icon && /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
892
|
+
children: /*#__PURE__*/jsxRuntime.jsx(vectorIcons.Ionicons, {
|
|
893
|
+
size: 30,
|
|
894
|
+
style: styles.icon,
|
|
895
|
+
name: icon
|
|
896
|
+
})
|
|
897
|
+
}), /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
898
|
+
style: styles.text,
|
|
899
|
+
children: label
|
|
900
|
+
})]
|
|
849
901
|
})
|
|
850
902
|
});
|
|
851
903
|
}
|
|
852
|
-
var styles$3 = {
|
|
853
|
-
link: {}
|
|
854
|
-
};
|
|
855
904
|
|
|
856
905
|
function Select(props) {
|
|
857
906
|
var handlePress = function handlePress() {
|
|
@@ -860,12 +909,12 @@ function Select(props) {
|
|
|
860
909
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
|
|
861
910
|
onPress: handlePress,
|
|
862
911
|
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
863
|
-
style: styles$
|
|
912
|
+
style: styles$3.link,
|
|
864
913
|
children: "Clique aqui para acessar o React Native"
|
|
865
914
|
})
|
|
866
915
|
});
|
|
867
916
|
}
|
|
868
|
-
var styles$
|
|
917
|
+
var styles$3 = {
|
|
869
918
|
link: {}
|
|
870
919
|
};
|
|
871
920
|
|
|
@@ -876,12 +925,12 @@ function Switch(props) {
|
|
|
876
925
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
|
|
877
926
|
onPress: handlePress,
|
|
878
927
|
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
879
|
-
style: styles$
|
|
928
|
+
style: styles$4.link,
|
|
880
929
|
children: "Clique aqui para acessar o React Native"
|
|
881
930
|
})
|
|
882
931
|
});
|
|
883
932
|
}
|
|
884
|
-
var styles$
|
|
933
|
+
var styles$4 = {
|
|
885
934
|
link: {}
|
|
886
935
|
};
|
|
887
936
|
|
|
@@ -892,12 +941,12 @@ function Option(props) {
|
|
|
892
941
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
|
|
893
942
|
onPress: handlePress,
|
|
894
943
|
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
895
|
-
style: styles$
|
|
944
|
+
style: styles$5.link,
|
|
896
945
|
children: "Clique aqui para acessar o React Native"
|
|
897
946
|
})
|
|
898
947
|
});
|
|
899
948
|
}
|
|
900
|
-
var styles$
|
|
949
|
+
var styles$5 = {
|
|
901
950
|
link: {}
|
|
902
951
|
};
|
|
903
952
|
|
|
@@ -908,29 +957,34 @@ function Radio(props) {
|
|
|
908
957
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
|
|
909
958
|
onPress: handlePress,
|
|
910
959
|
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
911
|
-
style: styles$
|
|
960
|
+
style: styles$6.link,
|
|
912
961
|
children: "Clique aqui para acessar o React Native"
|
|
913
962
|
})
|
|
914
963
|
});
|
|
915
964
|
}
|
|
916
|
-
var styles$
|
|
965
|
+
var styles$6 = {
|
|
917
966
|
link: {}
|
|
918
967
|
};
|
|
919
968
|
|
|
920
969
|
function Input(props) {
|
|
921
|
-
var
|
|
922
|
-
|
|
970
|
+
var scope = props.scope;
|
|
971
|
+
var value = scope.getValue();
|
|
972
|
+
var onChange = function onChange(e) {
|
|
973
|
+
console.log(e);
|
|
923
974
|
};
|
|
924
|
-
return /*#__PURE__*/jsxRuntime.jsx(reactNative.
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
children: "Clique aqui para acessar o React Native"
|
|
929
|
-
})
|
|
975
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TextInput, {
|
|
976
|
+
style: styles$7.input,
|
|
977
|
+
onChangeText: onChange,
|
|
978
|
+
value: value
|
|
930
979
|
});
|
|
931
980
|
}
|
|
932
|
-
var styles$
|
|
933
|
-
|
|
981
|
+
var styles$7 = {
|
|
982
|
+
input: {
|
|
983
|
+
height: 40,
|
|
984
|
+
margin: 12,
|
|
985
|
+
borderWidth: 1,
|
|
986
|
+
padding: 10
|
|
987
|
+
}
|
|
934
988
|
};
|
|
935
989
|
|
|
936
990
|
function UIElement(props) {
|