@evlop/native-components 1.0.241 → 1.0.242
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAuC,MAAM,gBAAgB,CAAC;AAEnH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAuC,MAAM,gBAAgB,CAAC;AAEnH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,oBAAY,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,cAAc,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,GAAG,aAAa,CAAC;IAAC,SAAS,CAAC,EAAC,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,GAAG,CAAA;CAAE,CAAA;AAyBtI,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,CAmBvD,CAAA;AAED,QAAA,MAAM,gBAAgB,EAAE,qBAAqB,CAAC,aAAa,CAiB/C,CAAC;AAEb,eAAe,gBAAgB,CAAC"}
|
|
@@ -21,6 +21,7 @@ const react_1 = __importDefault(require("react"));
|
|
|
21
21
|
const react_native_1 = require("react-native");
|
|
22
22
|
const react_native_elements_1 = require("react-native-elements");
|
|
23
23
|
const FontAwesome6_1 = __importDefault(require("react-native-vector-icons/FontAwesome6"));
|
|
24
|
+
const react_native_svg_1 = require("react-native-svg");
|
|
24
25
|
const rtlFLipIconStyle = { transform: [{ scaleX: -1 }] };
|
|
25
26
|
const iconTypeMap = {
|
|
26
27
|
'material-icons': 'material',
|
|
@@ -34,7 +35,7 @@ const iconTypeMap = {
|
|
|
34
35
|
const getIconProps = (icon) => {
|
|
35
36
|
const iconDetails = (0, commons_1.getIconInfo)(icon);
|
|
36
37
|
if (iconDetails) {
|
|
37
|
-
return { name: iconDetails.name, type: iconTypeMap[iconDetails.type] || iconDetails.type, [iconDetails.variant]: true, isDirected: !!iconDetails.isDirected };
|
|
38
|
+
return { name: iconDetails.name, type: iconTypeMap[iconDetails.type] || iconDetails.type, [iconDetails.variant]: true, isDirected: !!iconDetails.isDirected, url: iconDetails.url };
|
|
38
39
|
}
|
|
39
40
|
else {
|
|
40
41
|
return { name: icon, isDirected: false };
|
|
@@ -44,15 +45,7 @@ const getIconPropsMemoized = (0, lodash_1.memoize)(getIconProps);
|
|
|
44
45
|
const BaseIcon = (_a) => {
|
|
45
46
|
var { icon, color = 'gray-900', size = 32, flipOnRTL } = _a, props = __rest(_a, ["icon", "color", "size", "flipOnRTL"]);
|
|
46
47
|
const theme = (0, commons_1.useTheme)();
|
|
47
|
-
const iconProps =
|
|
48
|
-
if (typeof icon === 'string') {
|
|
49
|
-
return getIconPropsMemoized(icon);
|
|
50
|
-
}
|
|
51
|
-
else if (typeof icon === 'object') {
|
|
52
|
-
return icon;
|
|
53
|
-
}
|
|
54
|
-
return { isDirected: false };
|
|
55
|
-
}, [icon]);
|
|
48
|
+
const iconProps = getIconPropsMemoized(icon);
|
|
56
49
|
// directed icon need to be flipped horizontally on RTL mode
|
|
57
50
|
const { isDirected: isDirectedIcon } = iconProps;
|
|
58
51
|
const iconStyle = react_1.default.useMemo(() => {
|
|
@@ -60,6 +53,9 @@ const BaseIcon = (_a) => {
|
|
|
60
53
|
return react_native_1.StyleSheet.flatten([shouldApplyRtlStyle ? rtlFLipIconStyle : null]);
|
|
61
54
|
}, [flipOnRTL, isDirectedIcon]);
|
|
62
55
|
const { colors: { [color]: colorCode } } = theme;
|
|
56
|
+
if (iconProps.type === 'svg') {
|
|
57
|
+
return react_1.default.createElement(react_native_svg_1.SvgUri, { color: colorCode || color, width: size, height: size, uri: iconProps.url });
|
|
58
|
+
}
|
|
63
59
|
return react_1.default.createElement(react_native_elements_1.Icon, Object.assign({ type: "", name: "circle" }, props, { size: size, iconStyle: iconStyle, color: colorCode || color }, iconProps));
|
|
64
60
|
};
|
|
65
61
|
exports.BaseIcon = BaseIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Icon/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAAmH;AACnH,mCAAiC;AACjC,kDAA0B;AAC1B,+CAAuD;AACvD,iEAA+E;AAC/E,0FAAkE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Icon/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAAmH;AACnH,mCAAiC;AACjC,kDAA0B;AAC1B,+CAAuD;AACvD,iEAA+E;AAC/E,0FAAkE;AAElE,uDAA0C;AAG1C,MAAM,gBAAgB,GAAG,EAAC,SAAS,EAAE,CAAC,EAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAC,CAAC;AAEtD,MAAM,WAAW,GAAI;IAClB,gBAAgB,EAAE,UAAU;IAC5B,0BAA0B,EAAE,oBAAoB;IAChD,mBAAmB,EAAE,kBAAkB;IACvC,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,SAAS;CACrB,CAAC;AAEJ,IAAA,8CAAsB,EAAC,gBAAgB,EAAE,sBAAY,CAAC,CAAC;AAEvD,MAAM,YAAY,GAAG,CAAC,IAAoB,EAAE,EAAE;IAC5C,MAAM,WAAW,GAAQ,IAAA,qBAAW,EAAC,IAAI,CAAC,CAAC;IAC3C,IAAG,WAAW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;AAEnH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAuC,MAAM,gBAAgB,CAAC;AAEnH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,oBAAY,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,cAAc,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,GAAG,aAAa,CAAC;IAAC,SAAS,CAAC,EAAC,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,GAAG,CAAA;CAAE,CAAA;AAyBtI,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,CAmBvD,CAAA;AAED,QAAA,MAAM,gBAAgB,EAAE,qBAAqB,CAAC,aAAa,CAiB/C,CAAC;AAEb,eAAe,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evlop/native-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.242",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/cjs/main.js",
|
|
6
6
|
"types": "dist/types/main.d.ts",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"react-native-elements": "^3.1.0",
|
|
31
31
|
"react-native-fast-image": "^8.6.3",
|
|
32
32
|
"react-native-safe-area-context": "^4.3.1",
|
|
33
|
+
"react-native-svg": "^15.15.1",
|
|
33
34
|
"react-native-tab-view": "^4.1.0",
|
|
34
35
|
"react-native-vector-icons": "^10.0.3",
|
|
35
36
|
"react-native-webview": "^11.0.2",
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
"styled-system": "^5.1.5"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@evlop/commons": "^1.0.
|
|
41
|
+
"@evlop/commons": "^1.0.358",
|
|
41
42
|
"@react-navigation/native": "^7.1.17",
|
|
42
43
|
"@types/lodash": "^4.14.178",
|
|
43
44
|
"@types/react-native": "^0.73.0",
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
"react-native-elements": "^3.1.0",
|
|
58
59
|
"react-native-fast-image": "^8.6.3",
|
|
59
60
|
"react-native-safe-area-context": "^4.3.1",
|
|
61
|
+
"react-native-svg": "^15.15.1",
|
|
60
62
|
"react-native-tab-view": "^4.1.0",
|
|
61
63
|
"react-native-vector-icons": "^10.0.3",
|
|
62
64
|
"react-native-webview": "^11.0.2",
|