jornada-ui 0.4.9 → 0.4.10
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/capture-photo/index.js +49 -49
- package/lib/commonjs/components/capture-photo/index.js.map +1 -1
- package/lib/module/components/capture-photo/index.js +49 -49
- package/lib/module/components/capture-photo/index.js.map +1 -1
- package/lib/typescript/commonjs/src/components/capture-photo/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/capture-photo/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/capture-photo/index.d.ts +1 -1
- package/lib/typescript/module/src/components/capture-photo/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/capture-photo/index.tsx +43 -55
|
@@ -7,11 +7,11 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _index = _interopRequireDefault(require("../typography/index.js"));
|
|
10
|
-
var _index2 = require("
|
|
10
|
+
var _index2 = _interopRequireDefault(require("../box/index.js"));
|
|
11
|
+
var _index3 = require("../../common/icons-svg/index.js");
|
|
11
12
|
var _asBaseComponent = require("../../@types/as-base-component.js");
|
|
12
13
|
var _theme = require("../../styles/theme/theme.js");
|
|
13
14
|
var _styles = require("./styles.js");
|
|
14
|
-
var _jornadaUi = require("jornada-ui");
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -40,61 +40,59 @@ const CapturePhoto = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
40
40
|
borderStyled,
|
|
41
41
|
color,
|
|
42
42
|
fontStyle,
|
|
43
|
-
opacity,
|
|
43
|
+
opacity = 1,
|
|
44
44
|
style,
|
|
45
45
|
smallText,
|
|
46
46
|
paddingStyle,
|
|
47
47
|
backgroundColor
|
|
48
48
|
} = props;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
height,
|
|
55
|
-
marginStyle,
|
|
56
|
-
flexStyle,
|
|
57
|
-
title,
|
|
58
|
-
borderStyled,
|
|
59
|
-
color,
|
|
60
|
-
fontStyle,
|
|
49
|
+
|
|
50
|
+
// estilos do container SEMPRE aplicados no Touchable
|
|
51
|
+
const containerStyle = {
|
|
52
|
+
width: width,
|
|
53
|
+
// aceita number | string ('48%')
|
|
54
|
+
height: height,
|
|
61
55
|
opacity,
|
|
62
|
-
smallText,
|
|
63
|
-
paddingStyle,
|
|
64
56
|
backgroundColor,
|
|
65
|
-
|
|
57
|
+
borderWidth: Number(borderStyled?.borderWidth) || 0,
|
|
58
|
+
borderColor: borderStyled?.borderColor,
|
|
59
|
+
borderRadius: Number(borderStyled?.borderRadius) || 0,
|
|
60
|
+
alignItems: flexStyle?.alignItems ?? "center",
|
|
61
|
+
justifyContent: flexStyle?.justifyContent ?? "center",
|
|
62
|
+
flexDirection: flexStyle?.flexDirection ?? "column",
|
|
63
|
+
paddingTop: paddingStyle?.paddingTop,
|
|
64
|
+
paddingBottom: paddingStyle?.paddingBottom,
|
|
65
|
+
overflow: "hidden",
|
|
66
|
+
// garante o recorte da imagem no borderRadius
|
|
67
|
+
...(marginStyle ?? {})
|
|
66
68
|
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}, style],
|
|
91
|
-
onPress: takePhotoWithImagePicker,
|
|
92
|
-
testID: testID,
|
|
93
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Icons, {
|
|
69
|
+
|
|
70
|
+
// seus styles existentes (caso tenha regras adicionais)
|
|
71
|
+
const styles = (0, _styles.styles)(props);
|
|
72
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
73
|
+
ref: ref,
|
|
74
|
+
activeOpacity: 0.7,
|
|
75
|
+
onPress: takePhotoWithImagePicker,
|
|
76
|
+
testID: testID,
|
|
77
|
+
style: [styles.capturePhoto, containerStyle, style] // <- container SEMPRE aqui
|
|
78
|
+
,
|
|
79
|
+
children: imageComprovante ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
80
|
+
source: {
|
|
81
|
+
uri: imageComprovante
|
|
82
|
+
},
|
|
83
|
+
resizeMode: "cover"
|
|
84
|
+
// a imagem agora só preenche o container
|
|
85
|
+
,
|
|
86
|
+
style: _reactNative.StyleSheet.flatten([{
|
|
87
|
+
width: "100%",
|
|
88
|
+
height: "100%"
|
|
89
|
+
}])
|
|
90
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
91
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.Icons, {
|
|
94
92
|
icon: "CAMERA_PLUS",
|
|
95
93
|
size: _theme.theme.fontSizes["2xl"] || 24,
|
|
96
94
|
color: color?.colorSvg
|
|
97
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
95
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.default, {
|
|
98
96
|
width: 140,
|
|
99
97
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.default, {
|
|
100
98
|
text: title.text || "Sem foto capturada.",
|
|
@@ -103,7 +101,9 @@ const CapturePhoto = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
103
101
|
size: fontStyle?.fontSize ? fontStyle?.fontSize : _theme.theme.fontSizes.md,
|
|
104
102
|
fontFamily: fontStyle?.fontFamily ? fontStyle?.fontFamily : _theme.theme.fonts.inter_regular_400,
|
|
105
103
|
lineHeight: fontStyle?.lineHeight ? fontStyle?.lineHeight : _theme.theme.fontSizes["2xl"],
|
|
106
|
-
letterSpacing:
|
|
104
|
+
letterSpacing:
|
|
105
|
+
// RN espera número; se "regular" for seu token, mapeie pra número no Typography
|
|
106
|
+
fontStyle?.letterSpacing ?? "regular",
|
|
107
107
|
marginTop: 8
|
|
108
108
|
})
|
|
109
109
|
}), smallText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.default, {
|
|
@@ -113,14 +113,14 @@ const CapturePhoto = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
113
113
|
size: fontStyle?.fontSize ? fontStyle?.fontSize : _theme.theme.fontSizes.sm,
|
|
114
114
|
fontFamily: fontStyle?.fontFamily ? fontStyle?.fontFamily : _theme.theme.fonts.inter_regular_400,
|
|
115
115
|
lineHeight: fontStyle?.lineHeight ? fontStyle?.lineHeight : _theme.theme.fontSizes.md,
|
|
116
|
-
letterSpacing: fontStyle?.letterSpacing
|
|
116
|
+
letterSpacing: fontStyle?.letterSpacing ?? "regular"
|
|
117
117
|
})]
|
|
118
118
|
})
|
|
119
119
|
});
|
|
120
120
|
});
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
123
|
+
* EXPORTS
|
|
124
124
|
*/
|
|
125
125
|
var _default = exports.default = (0, _asBaseComponent.asBaseComponent)(CapturePhoto);
|
|
126
126
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_interopRequireDefault","_index2","_asBaseComponent","_theme","_styles","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_interopRequireDefault","_index2","_index3","_asBaseComponent","_theme","_styles","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CapturePhoto","forwardRef","props","ref","imageComprovante","takePhotoWithImagePicker","testID","width","height","marginStyle","flexStyle","title","borderStyled","color","fontStyle","opacity","style","smallText","paddingStyle","backgroundColor","containerStyle","borderWidth","Number","borderColor","borderRadius","alignItems","justifyContent","flexDirection","paddingTop","paddingBottom","overflow","styles","makeStyles","jsx","TouchableOpacity","activeOpacity","onPress","capturePhoto","children","Image","source","uri","resizeMode","StyleSheet","flatten","jsxs","Fragment","Icons","icon","size","theme","fontSizes","colorSvg","text","align","textAlign","colorText","colors","gray","fontSize","md","fontFamily","fonts","inter_regular_400","lineHeight","letterSpacing","marginTop","textSmallPhoto","sm","_default","exports","asBaseComponent"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/capture-photo/index.tsx"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAD,sBAAA,CAAAH,OAAA;AAGA,IAAAK,OAAA,GAAAL,OAAA;AAGA,IAAAM,gBAAA,GAAAN,OAAA;AAIA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAgD,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAG,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,C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EkD,UAAU,GAAGd,YAAK,CAACC,SAAS,CAAC,KAAK,CAAE;UACnFc,aAAa;UACX;UACCnD,SAAS,EAAEmD,aAAa,IAAa,SACvC;UACDC,SAAS,EAAE;QAAE,CACd;MAAC,CACC,CAAC,EAELjD,SAAS,iBACR,IAAArC,WAAA,CAAAqD,GAAA,EAAC5D,MAAA,CAAAU,OAAU;QACTsE,IAAI,EAAE1C,KAAK,CAACwD,cAAc,IAAI,mCAAoC;QAClEb,KAAK,EACH5C,SAAS,EAAE6C,SAAS,KAAK,MAAM,IAAI7C,SAAS,EAAE6C,SAAS,KAAK,OAAO,GAC/D7C,SAAS,CAAC6C,SAAS,GACnB,QACL;QACD1C,KAAK,EAAEA,KAAK,EAAE2C,SAAS,GAAG3C,KAAK,CAAC2C,SAAS,GAAGN,YAAK,CAACO,MAAM,CAACC,IAAI,CAAC,GAAG,CAAE;QACnET,IAAI,EAAEnC,SAAS,EAAE6C,QAAQ,GAAG7C,SAAS,EAAE6C,QAAQ,GAAGT,YAAK,CAACC,SAAS,CAACiB,EAAG;QACrEP,UAAU,EACR/C,SAAS,EAAE+C,UAAU,GAAG/C,SAAS,EAAE+C,UAAU,GAAGX,YAAK,CAACY,KAAK,CAACC,iBAC7D;QACDC,UAAU,EAAElD,SAAS,EAAEkD,UAAU,GAAGlD,SAAS,EAAEkD,UAAU,GAAGd,YAAK,CAACC,SAAS,CAACS,EAAG;QAC/EK,aAAa,EAAGnD,SAAS,EAAEmD,aAAa,IAAa;MAAkB,CACxE,CACF;IAAA,CACD;EACH,CACe,CAAC;AAEvB,CAAC,CAAC;;AAEF;AACA;AACA;AAFA,IAAAI,QAAA,GAAAC,OAAA,CAAAvF,OAAA,GAGe,IAAAwF,gCAAe,EAACvE,YAAY,CAAC","ignoreList":[]}
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* IMPORTS
|
|
5
5
|
*/
|
|
6
6
|
import React, { forwardRef } from "react";
|
|
7
|
-
import { Image, TouchableOpacity } from "react-native";
|
|
7
|
+
import { Image, TouchableOpacity, StyleSheet } from "react-native";
|
|
8
8
|
|
|
9
9
|
// components
|
|
10
10
|
import Typography from "../typography/index.js";
|
|
11
|
+
import Box from "../box/index.js";
|
|
11
12
|
|
|
12
13
|
// icons / svg
|
|
13
14
|
import { Icons } from "../../common/icons-svg/index.js";
|
|
@@ -16,9 +17,8 @@ import { Icons } from "../../common/icons-svg/index.js";
|
|
|
16
17
|
import { asBaseComponent } from "../../@types/as-base-component.js";
|
|
17
18
|
// styles
|
|
18
19
|
import { theme } from "../../styles/theme/theme.js";
|
|
19
|
-
import { styles } from "./styles.js";
|
|
20
|
-
import {
|
|
21
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
|
+
import { styles as makeStyles } from "./styles.js";
|
|
21
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
const CapturePhoto = /*#__PURE__*/forwardRef((props, ref) => {
|
|
23
23
|
const {
|
|
24
24
|
imageComprovante,
|
|
@@ -32,56 +32,54 @@ const CapturePhoto = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
32
32
|
borderStyled,
|
|
33
33
|
color,
|
|
34
34
|
fontStyle,
|
|
35
|
-
opacity,
|
|
35
|
+
opacity = 1,
|
|
36
36
|
style,
|
|
37
37
|
smallText,
|
|
38
38
|
paddingStyle,
|
|
39
39
|
backgroundColor
|
|
40
40
|
} = props;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
height,
|
|
47
|
-
marginStyle,
|
|
48
|
-
flexStyle,
|
|
49
|
-
title,
|
|
50
|
-
borderStyled,
|
|
51
|
-
color,
|
|
52
|
-
fontStyle,
|
|
41
|
+
|
|
42
|
+
// estilos do container SEMPRE aplicados no Touchable
|
|
43
|
+
const containerStyle = {
|
|
44
|
+
width: width,
|
|
45
|
+
// aceita number | string ('48%')
|
|
46
|
+
height: height,
|
|
53
47
|
opacity,
|
|
54
|
-
smallText,
|
|
55
|
-
paddingStyle,
|
|
56
48
|
backgroundColor,
|
|
57
|
-
|
|
49
|
+
borderWidth: Number(borderStyled?.borderWidth) || 0,
|
|
50
|
+
borderColor: borderStyled?.borderColor,
|
|
51
|
+
borderRadius: Number(borderStyled?.borderRadius) || 0,
|
|
52
|
+
alignItems: flexStyle?.alignItems ?? "center",
|
|
53
|
+
justifyContent: flexStyle?.justifyContent ?? "center",
|
|
54
|
+
flexDirection: flexStyle?.flexDirection ?? "column",
|
|
55
|
+
paddingTop: paddingStyle?.paddingTop,
|
|
56
|
+
paddingBottom: paddingStyle?.paddingBottom,
|
|
57
|
+
overflow: "hidden",
|
|
58
|
+
// garante o recorte da imagem no borderRadius
|
|
59
|
+
...(marginStyle ?? {})
|
|
58
60
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
backgroundColor
|
|
82
|
-
}, style],
|
|
83
|
-
onPress: takePhotoWithImagePicker,
|
|
84
|
-
testID: testID,
|
|
61
|
+
|
|
62
|
+
// seus styles existentes (caso tenha regras adicionais)
|
|
63
|
+
const styles = makeStyles(props);
|
|
64
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
65
|
+
ref: ref,
|
|
66
|
+
activeOpacity: 0.7,
|
|
67
|
+
onPress: takePhotoWithImagePicker,
|
|
68
|
+
testID: testID,
|
|
69
|
+
style: [styles.capturePhoto, containerStyle, style] // <- container SEMPRE aqui
|
|
70
|
+
,
|
|
71
|
+
children: imageComprovante ? /*#__PURE__*/_jsx(Image, {
|
|
72
|
+
source: {
|
|
73
|
+
uri: imageComprovante
|
|
74
|
+
},
|
|
75
|
+
resizeMode: "cover"
|
|
76
|
+
// a imagem agora só preenche o container
|
|
77
|
+
,
|
|
78
|
+
style: StyleSheet.flatten([{
|
|
79
|
+
width: "100%",
|
|
80
|
+
height: "100%"
|
|
81
|
+
}])
|
|
82
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
85
83
|
children: [/*#__PURE__*/_jsx(Icons, {
|
|
86
84
|
icon: "CAMERA_PLUS",
|
|
87
85
|
size: theme.fontSizes["2xl"] || 24,
|
|
@@ -95,7 +93,9 @@ const CapturePhoto = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
95
93
|
size: fontStyle?.fontSize ? fontStyle?.fontSize : theme.fontSizes.md,
|
|
96
94
|
fontFamily: fontStyle?.fontFamily ? fontStyle?.fontFamily : theme.fonts.inter_regular_400,
|
|
97
95
|
lineHeight: fontStyle?.lineHeight ? fontStyle?.lineHeight : theme.fontSizes["2xl"],
|
|
98
|
-
letterSpacing:
|
|
96
|
+
letterSpacing:
|
|
97
|
+
// RN espera número; se "regular" for seu token, mapeie pra número no Typography
|
|
98
|
+
fontStyle?.letterSpacing ?? "regular",
|
|
99
99
|
marginTop: 8
|
|
100
100
|
})
|
|
101
101
|
}), smallText && /*#__PURE__*/_jsx(Typography, {
|
|
@@ -105,14 +105,14 @@ const CapturePhoto = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
105
105
|
size: fontStyle?.fontSize ? fontStyle?.fontSize : theme.fontSizes.sm,
|
|
106
106
|
fontFamily: fontStyle?.fontFamily ? fontStyle?.fontFamily : theme.fonts.inter_regular_400,
|
|
107
107
|
lineHeight: fontStyle?.lineHeight ? fontStyle?.lineHeight : theme.fontSizes.md,
|
|
108
|
-
letterSpacing: fontStyle?.letterSpacing
|
|
108
|
+
letterSpacing: fontStyle?.letterSpacing ?? "regular"
|
|
109
109
|
})]
|
|
110
110
|
})
|
|
111
111
|
});
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* EXPORTS
|
|
116
116
|
*/
|
|
117
117
|
export default asBaseComponent(CapturePhoto);
|
|
118
118
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","Image","TouchableOpacity","Typography","Icons","asBaseComponent","theme","styles","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","Image","TouchableOpacity","StyleSheet","Typography","Box","Icons","asBaseComponent","theme","styles","makeStyles","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","CapturePhoto","props","ref","imageComprovante","takePhotoWithImagePicker","testID","width","height","marginStyle","flexStyle","title","borderStyled","color","fontStyle","opacity","style","smallText","paddingStyle","backgroundColor","containerStyle","borderWidth","Number","borderColor","borderRadius","alignItems","justifyContent","flexDirection","paddingTop","paddingBottom","overflow","activeOpacity","onPress","capturePhoto","children","source","uri","resizeMode","flatten","icon","size","fontSizes","colorSvg","text","align","textAlign","colorText","colors","gray","fontSize","md","fontFamily","fonts","inter_regular_400","lineHeight","letterSpacing","marginTop","textSmallPhoto","sm"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/capture-photo/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,KAAK,EAAEC,gBAAgB,EAAEC,UAAU,QAAwB,cAAc;;AAElF;AACA,OAAOC,UAAU,MAAM,wBAAe;AACtC,OAAOC,GAAG,MAAM,iBAAQ;;AAExB;AACA,SAASC,KAAK,QAAQ,iCAAwB;;AAE9C;AACA,SAASC,eAAe,QAAQ,mCAAgC;AAGhE;AACA,SAASC,KAAK,QAAQ,6BAA0B;AAChD,SAASC,MAAM,IAAIC,UAAU,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhD,MAAMC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nFc,aAAa;UACX;UACCzC,SAAS,EAAEyC,aAAa,IAAa,SACvC;UACDC,SAAS,EAAE;QAAE,CACd;MAAC,CACC,CAAC,EAELvC,SAAS,iBACRrB,IAAA,CAACR,UAAU;QACTuD,IAAI,EAAEhC,KAAK,CAAC8C,cAAc,IAAI,mCAAoC;QAClEb,KAAK,EACHlC,SAAS,EAAEmC,SAAS,KAAK,MAAM,IAAInC,SAAS,EAAEmC,SAAS,KAAK,OAAO,GAC/DnC,SAAS,CAACmC,SAAS,GACnB,QACL;QACDhC,KAAK,EAAEA,KAAK,EAAEiC,SAAS,GAAGjC,KAAK,CAACiC,SAAS,GAAGtD,KAAK,CAACuD,MAAM,CAACC,IAAI,CAAC,GAAG,CAAE;QACnER,IAAI,EAAE1B,SAAS,EAAEmC,QAAQ,GAAGnC,SAAS,EAAEmC,QAAQ,GAAGzD,KAAK,CAACiD,SAAS,CAACiB,EAAG;QACrEP,UAAU,EACRrC,SAAS,EAAEqC,UAAU,GAAGrC,SAAS,EAAEqC,UAAU,GAAG3D,KAAK,CAAC4D,KAAK,CAACC,iBAC7D;QACDC,UAAU,EAAExC,SAAS,EAAEwC,UAAU,GAAGxC,SAAS,EAAEwC,UAAU,GAAG9D,KAAK,CAACiD,SAAS,CAACS,EAAG;QAC/EK,aAAa,EAAGzC,SAAS,EAAEyC,aAAa,IAAa;MAAkB,CACxE,CACF;IAAA,CACD;EACH,CACe,CAAC;AAEvB,CAAC,CAAC;;AAEF;AACA;AACA;AACA,eAAehE,eAAe,CAACU,YAAY,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/capture-photo/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/capture-photo/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AA2H1C;;GAEG;;;;;;;;;sBArFmB,CAAC;;;;;mBAQmB,CAAC;oBACP,CAAC;4BACL,CAAC;2BACS,CAAC;+BACO,CAAC;8BAKjD,CADD;mBAA8C,CAAA;uBAG7C,CADF;wBAGc,CAAC;sBAEI,CAAC;yBAEd,CAAC;mBAA6C,CAAC;yBAAgC,CAAC;uBAE9D,CAAA;wBAEZ,CAAC;sBAA6B,CAAC;;;kBAO4B,CAAC;iBAGnD,CAAC;YAGN,CAAb;qBAAsC,CAAA;gBAChB,CAAC;iBAEZ,CAAJ;sBACuD,CAAC;;;cAOX,CAAC;kBACxC,CAAd;mBAA2C,CAAC;iBAEhC,CAAd;oBAEU,CAAR;;;eAQkB,CAAA;mBAEF,CAAC;oBAA4C,CAAC;kBACxC,CAAC;qBAA6C,CAAC;;;;;;;gBAkBisB,CAAC;iBAAwB,CAAC;qBAA4B,CAAC;qBAA4B,CAAC;;;YAAqP,CAAC;gBAAuB,CAAC;kBAAyB,CAAC;kBAAyF,CAAC;qBAA4B,CAAC;kBAAmD,CAAC;;;AAD/yC,wBAA6C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/capture-photo/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/capture-photo/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AA2H1C;;GAEG;;;;;;;;;sBArFmB,CAAC;;;;;mBAQmB,CAAC;oBACP,CAAC;4BACL,CAAC;2BACS,CAAC;+BACO,CAAC;8BAKjD,CADD;mBAA8C,CAAA;uBAG7C,CADF;wBAGc,CAAC;sBAEI,CAAC;yBAEd,CAAC;mBAA6C,CAAC;yBAAgC,CAAC;uBAE9D,CAAA;wBAEZ,CAAC;sBAA6B,CAAC;;;kBAO4B,CAAC;iBAGnD,CAAC;YAGN,CAAb;qBAAsC,CAAA;gBAChB,CAAC;iBAEZ,CAAJ;sBACuD,CAAC;;;cAOX,CAAC;kBACxC,CAAd;mBAA2C,CAAC;iBAEhC,CAAd;oBAEU,CAAR;;;eAQkB,CAAA;mBAEF,CAAC;oBAA4C,CAAC;kBACxC,CAAC;qBAA6C,CAAC;;;;;;;gBAkBisB,CAAC;iBAAwB,CAAC;qBAA4B,CAAC;qBAA4B,CAAC;;;YAAqP,CAAC;gBAAuB,CAAC;kBAAyB,CAAC;kBAAyF,CAAC;qBAA4B,CAAC;kBAAmD,CAAC;;;AAD/yC,wBAA6C"}
|
package/package.json
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* IMPORTS
|
|
3
3
|
*/
|
|
4
4
|
import React, { forwardRef } from "react";
|
|
5
|
-
import { Image, TouchableOpacity } from "react-native";
|
|
5
|
+
import { Image, TouchableOpacity, StyleSheet, type ViewStyle } from "react-native";
|
|
6
6
|
|
|
7
7
|
// components
|
|
8
8
|
import Typography from "../typography";
|
|
9
|
+
import Box from "../box";
|
|
9
10
|
|
|
10
11
|
// icons / svg
|
|
11
12
|
import { Icons } from "../../common/icons-svg";
|
|
@@ -16,8 +17,7 @@ import { type ICapturePhotoProps } from "./interface";
|
|
|
16
17
|
|
|
17
18
|
// styles
|
|
18
19
|
import { theme } from "../../styles/theme/theme";
|
|
19
|
-
import { styles } from "./styles";
|
|
20
|
-
import { Box } from "jornada-ui";
|
|
20
|
+
import { styles as makeStyles } from "./styles";
|
|
21
21
|
|
|
22
22
|
const CapturePhoto = forwardRef<any, ICapturePhotoProps>((props, ref): React.ReactElement => {
|
|
23
23
|
const {
|
|
@@ -32,63 +32,51 @@ const CapturePhoto = forwardRef<any, ICapturePhotoProps>((props, ref): React.Rea
|
|
|
32
32
|
borderStyled,
|
|
33
33
|
color,
|
|
34
34
|
fontStyle,
|
|
35
|
-
opacity,
|
|
35
|
+
opacity = 1,
|
|
36
36
|
style,
|
|
37
37
|
smallText,
|
|
38
38
|
paddingStyle,
|
|
39
39
|
backgroundColor,
|
|
40
40
|
} = props;
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
width,
|
|
47
|
-
height,
|
|
48
|
-
marginStyle,
|
|
49
|
-
flexStyle,
|
|
50
|
-
title,
|
|
51
|
-
borderStyled,
|
|
52
|
-
color,
|
|
53
|
-
fontStyle,
|
|
42
|
+
// estilos do container SEMPRE aplicados no Touchable
|
|
43
|
+
const containerStyle: ViewStyle = {
|
|
44
|
+
width: width, // aceita number | string ('48%')
|
|
45
|
+
height: height,
|
|
54
46
|
opacity,
|
|
55
|
-
smallText,
|
|
56
|
-
paddingStyle,
|
|
57
47
|
backgroundColor,
|
|
58
|
-
|
|
59
|
-
|
|
48
|
+
borderWidth: Number(borderStyled?.borderWidth) || 0,
|
|
49
|
+
borderColor: borderStyled?.borderColor,
|
|
50
|
+
borderRadius: Number(borderStyled?.borderRadius) || 0,
|
|
51
|
+
alignItems: flexStyle?.alignItems ?? "center",
|
|
52
|
+
justifyContent: flexStyle?.justifyContent ?? "center",
|
|
53
|
+
flexDirection: flexStyle?.flexDirection ?? "column",
|
|
54
|
+
paddingTop: paddingStyle?.paddingTop,
|
|
55
|
+
paddingBottom: paddingStyle?.paddingBottom,
|
|
56
|
+
overflow: "hidden", // garante o recorte da imagem no borderRadius
|
|
57
|
+
...(marginStyle ?? {}),
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// seus styles existentes (caso tenha regras adicionais)
|
|
61
|
+
const styles = makeStyles(props);
|
|
60
62
|
|
|
61
63
|
return (
|
|
62
|
-
|
|
64
|
+
<TouchableOpacity
|
|
65
|
+
ref={ref}
|
|
66
|
+
activeOpacity={0.7}
|
|
67
|
+
onPress={takePhotoWithImagePicker}
|
|
68
|
+
testID={testID}
|
|
69
|
+
style={[styles.capturePhoto, containerStyle, style]} // <- container SEMPRE aqui
|
|
70
|
+
>
|
|
63
71
|
{imageComprovante ? (
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<Image
|
|
71
|
-
style={[
|
|
72
|
-
{
|
|
73
|
-
width,
|
|
74
|
-
height,
|
|
75
|
-
borderWidth: Number(borderStyled?.borderWidth),
|
|
76
|
-
borderColor: borderStyled?.borderColor,
|
|
77
|
-
borderRadius: Number(borderStyled?.borderRadius),
|
|
78
|
-
},
|
|
79
|
-
styles(styleProps).capturePhoto,
|
|
80
|
-
]}
|
|
81
|
-
source={{ uri: imageComprovante }}
|
|
82
|
-
/>
|
|
83
|
-
</TouchableOpacity>
|
|
72
|
+
<Image
|
|
73
|
+
source={{ uri: imageComprovante }}
|
|
74
|
+
resizeMode="cover"
|
|
75
|
+
// a imagem agora só preenche o container
|
|
76
|
+
style={StyleSheet.flatten([{ width: "100%", height: "100%" }])}
|
|
77
|
+
/>
|
|
84
78
|
) : (
|
|
85
|
-
|
|
86
|
-
ref={ref}
|
|
87
|
-
activeOpacity={0.7}
|
|
88
|
-
style={[styles(styleProps).capturePhoto, { backgroundColor }, style]}
|
|
89
|
-
onPress={takePhotoWithImagePicker}
|
|
90
|
-
testID={testID}
|
|
91
|
-
>
|
|
79
|
+
<>
|
|
92
80
|
<Icons icon={"CAMERA_PLUS"} size={theme.fontSizes["2xl"] || 24} color={color?.colorSvg} />
|
|
93
81
|
|
|
94
82
|
<Box width={140}>
|
|
@@ -106,11 +94,13 @@ const CapturePhoto = forwardRef<any, ICapturePhotoProps>((props, ref): React.Rea
|
|
|
106
94
|
}
|
|
107
95
|
lineHeight={fontStyle?.lineHeight ? fontStyle?.lineHeight : theme.fontSizes["2xl"]}
|
|
108
96
|
letterSpacing={
|
|
109
|
-
|
|
97
|
+
// RN espera número; se "regular" for seu token, mapeie pra número no Typography
|
|
98
|
+
(fontStyle?.letterSpacing as any) ?? ("regular" as any)
|
|
110
99
|
}
|
|
111
100
|
marginTop={8}
|
|
112
101
|
/>
|
|
113
102
|
</Box>
|
|
103
|
+
|
|
114
104
|
{smallText && (
|
|
115
105
|
<Typography
|
|
116
106
|
text={title.textSmallPhoto || "aqui vai o texto de baixo da foto"}
|
|
@@ -125,18 +115,16 @@ const CapturePhoto = forwardRef<any, ICapturePhotoProps>((props, ref): React.Rea
|
|
|
125
115
|
fontStyle?.fontFamily ? fontStyle?.fontFamily : theme.fonts.inter_regular_400
|
|
126
116
|
}
|
|
127
117
|
lineHeight={fontStyle?.lineHeight ? fontStyle?.lineHeight : theme.fontSizes.md}
|
|
128
|
-
letterSpacing={
|
|
129
|
-
fontStyle?.letterSpacing ? fontStyle?.letterSpacing : ("regular" as any)
|
|
130
|
-
}
|
|
118
|
+
letterSpacing={(fontStyle?.letterSpacing as any) ?? ("regular" as any)}
|
|
131
119
|
/>
|
|
132
120
|
)}
|
|
133
|
-
|
|
121
|
+
</>
|
|
134
122
|
)}
|
|
135
|
-
|
|
123
|
+
</TouchableOpacity>
|
|
136
124
|
);
|
|
137
125
|
});
|
|
138
126
|
|
|
139
127
|
/**
|
|
140
|
-
*
|
|
128
|
+
* EXPORTS
|
|
141
129
|
*/
|
|
142
130
|
export default asBaseComponent(CapturePhoto);
|