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