@tecsinapse/react-core 1.21.1-beta.7 → 1.21.1-beta.8
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/cjs/components/atoms/Icon/Icon.js +1 -2
- package/dist/cjs/components/atoms/Icon/Icon.js.map +1 -1
- package/dist/cjs/components/atoms/Icon/helpers.d.ts +1 -3
- package/dist/cjs/components/atoms/Icon/helpers.js +80 -35
- package/dist/cjs/components/atoms/Icon/helpers.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Icon.js +1 -2
- package/dist/esm/components/atoms/Icon/Icon.js.map +1 -1
- package/dist/esm/components/atoms/Icon/helpers.d.ts +1 -3
- package/dist/esm/components/atoms/Icon/helpers.js +64 -34
- package/dist/esm/components/atoms/Icon/helpers.js.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/components/atoms/Icon/FontAwesome.d.ts +0 -7
- package/dist/cjs/components/atoms/Icon/FontAwesome.js +0 -25
- package/dist/cjs/components/atoms/Icon/FontAwesome.js.map +0 -1
- package/dist/cjs/components/atoms/Icon/Material.d.ts +0 -7
- package/dist/cjs/components/atoms/Icon/Material.js +0 -25
- package/dist/cjs/components/atoms/Icon/Material.js.map +0 -1
- package/dist/cjs/components/atoms/Icon/MaterialCommunity.d.ts +0 -9
- package/dist/cjs/components/atoms/Icon/MaterialCommunity.js +0 -61
- package/dist/cjs/components/atoms/Icon/MaterialCommunity.js.map +0 -1
- package/dist/esm/components/atoms/Icon/FontAwesome.d.ts +0 -7
- package/dist/esm/components/atoms/Icon/FontAwesome.js +0 -18
- package/dist/esm/components/atoms/Icon/FontAwesome.js.map +0 -1
- package/dist/esm/components/atoms/Icon/Material.d.ts +0 -7
- package/dist/esm/components/atoms/Icon/Material.js +0 -18
- package/dist/esm/components/atoms/Icon/Material.js.map +0 -1
- package/dist/esm/components/atoms/Icon/MaterialCommunity.d.ts +0 -9
- package/dist/esm/components/atoms/Icon/MaterialCommunity.js +0 -54
- package/dist/esm/components/atoms/Icon/MaterialCommunity.js.map +0 -1
|
@@ -60,12 +60,11 @@ const Icon = (_a) => {
|
|
|
60
60
|
]);
|
|
61
61
|
const theme = react.useTheme();
|
|
62
62
|
const color = helpers.getIconColor(colorVariant, colorTone, fontColor, theme);
|
|
63
|
-
const RNVIcon = helpers.getIconComponent(type);
|
|
63
|
+
const RNVIcon = helpers.getIconComponent(type, size);
|
|
64
64
|
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Suspense, {
|
|
65
65
|
fallback: /* @__PURE__ */ React__default["default"].createElement(reactNative.Text, null, " ")
|
|
66
66
|
}, /* @__PURE__ */ React__default["default"].createElement(RNVIcon, __spreadProps(__spreadValues({}, rest), {
|
|
67
67
|
style,
|
|
68
|
-
size,
|
|
69
68
|
name,
|
|
70
69
|
color
|
|
71
70
|
})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../../../../src/components/atoms/Icon/Icon.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, TextStyle, Text } from 'react-native';\nimport { useTheme } from '@emotion/react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { getIconColor, getIconComponent } from './helpers';\n\nexport interface IconProps {\n /** Name of the icon. You must use the same icons from react-native-vector-icons */\n name: string;\n /** Default icon sizes from theme */\n size?: IconSizeType;\n /** Icon family. You must use the same icons from react-native-vector-icons */\n type: IconType;\n /** Font theme fill color */\n fontColor?: FontColorType;\n /** Palette theme fill color */\n colorVariant?: ColorType;\n /** Palette theme gradation fill color */\n colorTone?: ColorGradationType;\n style?: StyleProp<TextStyle>;\n}\n\n/** NOTE: When using colors, the order matters if you're trying to merge multiple types. */\nconst Icon: FC<IconProps> = ({\n name,\n size = 'centi',\n type,\n style,\n fontColor = 'dark',\n colorVariant,\n colorTone = 'medium',\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n const color = getIconColor(colorVariant, colorTone, fontColor, theme);\n const RNVIcon = getIconComponent(type);\n\n return (\n <React.Suspense fallback={<Text> </Text>}>\n <RNVIcon {...rest} style={style}
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../../../../src/components/atoms/Icon/Icon.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, TextStyle, Text } from 'react-native';\nimport { useTheme } from '@emotion/react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { getIconColor, getIconComponent } from './helpers';\n\nexport interface IconProps {\n /** Name of the icon. You must use the same icons from react-native-vector-icons */\n name: string;\n /** Default icon sizes from theme */\n size?: IconSizeType;\n /** Icon family. You must use the same icons from react-native-vector-icons */\n type: IconType;\n /** Font theme fill color */\n fontColor?: FontColorType;\n /** Palette theme fill color */\n colorVariant?: ColorType;\n /** Palette theme gradation fill color */\n colorTone?: ColorGradationType;\n style?: StyleProp<TextStyle>;\n}\n\n/** NOTE: When using colors, the order matters if you're trying to merge multiple types. */\nconst Icon: FC<IconProps> = ({\n name,\n size = 'centi',\n type,\n style,\n fontColor = 'dark',\n colorVariant,\n colorTone = 'medium',\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n const color = getIconColor(colorVariant, colorTone, fontColor, theme);\n const RNVIcon = getIconComponent(type, size);\n\n return (\n <React.Suspense fallback={<Text> </Text>}>\n <RNVIcon {...rest} style={style} name={name} color={color} />\n </React.Suspense>\n );\n};\n\nexport default Icon;\n"],"names":["useTheme","getIconColor","getIconComponent","React","Text"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BM,MAAA,IAAA,GAAsB,CAAC,EASvB,KAAA;AATuB,EAC3B,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,IAAA;AAAA,IACA,IAAO,GAAA,OAAA;AAAA,IACP,IAAA;AAAA,IACA,KAAA;AAAA,IACA,SAAY,GAAA,MAAA;AAAA,IACZ,YAAA;AAAA,IACA,SAAY,GAAA,QAAA;AAAA,GArCd,GA8B6B,EAQxB,EAAA,IAAA,GAAA,SAAA,CARwB,EAQxB,EAAA;AAAA,IAPH,MAAA;AAAA,IACA,MAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,QAAQA,cAAS,EAAA,CAAA;AACvB,EAAA,MAAM,KAAQ,GAAAC,oBAAA,CAAa,YAAc,EAAA,SAAA,EAAW,WAAW,KAAK,CAAA,CAAA;AACpE,EAAM,MAAA,OAAA,GAAUC,wBAAiB,CAAA,IAAA,EAAM,IAAI,CAAA,CAAA;AAE3C,EACE,uBAAAC,yBAAA,CAAA,aAAA,CAACA,0BAAM,QAAN,EAAA;AAAA,IAAe,QAAA,kBAAWA,yBAAA,CAAA,aAAA,CAAAC,gBAAA,EAAA,IAAA,EAAK,GAAC,CAAA;AAAA,GAC/B,kBAAAD,yBAAA,CAAA,aAAA,CAAC,0CAAY,IAAZ,CAAA,EAAA;AAAA,IAAkB,KAAA;AAAA,IAAc,IAAA;AAAA,IAAY,KAAA;AAAA,GAAA,CAAc,CAC7D,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
1
|
import { ColorGradationType, ColorType } from '@tecsinapse/react-core';
|
|
3
2
|
export declare const registerCustomIconType: (id: string, customIcon: any) => void;
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const getIconComponent: (type: IconType) => any;
|
|
3
|
+
export declare const getIconComponent: (type: IconType, size: IconSizeType) => any;
|
|
6
4
|
export declare const getIconColor: (colorVariant: ColorType | undefined, colorGradation: ColorGradationType | undefined, fontColor: FontColorType, theme: ThemeProp) => string;
|
|
@@ -7,69 +7,115 @@ var styled = require('@emotion/native');
|
|
|
7
7
|
|
|
8
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
9
|
|
|
10
|
-
function
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
11
27
|
|
|
12
28
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
13
29
|
|
|
14
30
|
const customIcons = {};
|
|
15
|
-
const getStyledIcon = (Component, size) => styled__default["default"](
|
|
31
|
+
const getStyledIcon = (Component, size) => styled__default["default"](
|
|
32
|
+
Component
|
|
33
|
+
)`
|
|
16
34
|
font-size: ${({ theme }) => theme == null ? void 0 : theme.iconSize[size]};
|
|
17
35
|
text-align: center;
|
|
18
36
|
`;
|
|
19
|
-
const getIconComponent = (type) => {
|
|
37
|
+
const getIconComponent = (type, size) => {
|
|
20
38
|
switch (type) {
|
|
21
39
|
case "zocial":
|
|
22
|
-
const Zocial = React.lazy(
|
|
23
|
-
|
|
40
|
+
const Zocial = React.lazy(
|
|
41
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Zocial')); })
|
|
42
|
+
);
|
|
43
|
+
return getStyledIcon(Zocial, size);
|
|
24
44
|
case "octicon":
|
|
25
|
-
const Octicons = React.lazy(
|
|
26
|
-
|
|
45
|
+
const Octicons = React.lazy(
|
|
46
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Octicons')); })
|
|
47
|
+
);
|
|
48
|
+
return getStyledIcon(Octicons, size);
|
|
27
49
|
case "material":
|
|
28
|
-
const Material = React.lazy(
|
|
29
|
-
|
|
50
|
+
const Material = React.lazy(
|
|
51
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/MaterialIcons')); })
|
|
52
|
+
);
|
|
53
|
+
return getStyledIcon(Material, size);
|
|
30
54
|
case "material-community":
|
|
31
55
|
const MaterialCommunity = React.lazy(
|
|
32
|
-
async () => await Promise.resolve().then(function () { return /*#__PURE__*/
|
|
56
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/MaterialCommunityIcons')); })
|
|
33
57
|
);
|
|
34
|
-
return MaterialCommunity;
|
|
58
|
+
return getStyledIcon(MaterialCommunity, size);
|
|
35
59
|
case "ionicon":
|
|
36
|
-
const Ionicons = React.lazy(
|
|
37
|
-
|
|
60
|
+
const Ionicons = React.lazy(
|
|
61
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Ionicons')); })
|
|
62
|
+
);
|
|
63
|
+
return getStyledIcon(Ionicons, size);
|
|
38
64
|
case "foundation":
|
|
39
|
-
const Foundation = React.lazy(
|
|
40
|
-
|
|
65
|
+
const Foundation = React.lazy(
|
|
66
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Foundation')); })
|
|
67
|
+
);
|
|
68
|
+
return getStyledIcon(Foundation, size);
|
|
41
69
|
case "evilicon":
|
|
42
|
-
const EvilIcons = React.lazy(
|
|
43
|
-
|
|
70
|
+
const EvilIcons = React.lazy(
|
|
71
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/EvilIcons')); })
|
|
72
|
+
);
|
|
73
|
+
return getStyledIcon(EvilIcons, size);
|
|
44
74
|
case "entypo":
|
|
45
|
-
const Entypo = React.lazy(
|
|
46
|
-
|
|
75
|
+
const Entypo = React.lazy(
|
|
76
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Entypo')); })
|
|
77
|
+
);
|
|
78
|
+
return getStyledIcon(Entypo, size);
|
|
47
79
|
case "font-awesome":
|
|
48
|
-
const FontAwesome = React.lazy(
|
|
80
|
+
const FontAwesome = React.lazy(
|
|
81
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/FontAwesome')); })
|
|
82
|
+
);
|
|
49
83
|
console.log(FontAwesome);
|
|
50
|
-
return FontAwesome;
|
|
84
|
+
return getStyledIcon(FontAwesome, size);
|
|
51
85
|
case "font-awesome-5":
|
|
52
|
-
const FontAwesome5 = React.lazy(
|
|
53
|
-
|
|
86
|
+
const FontAwesome5 = React.lazy(
|
|
87
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/FontAwesome5')); })
|
|
88
|
+
);
|
|
89
|
+
return getStyledIcon(FontAwesome5, size);
|
|
54
90
|
case "simple-line-icon":
|
|
55
|
-
const SimpleLineIcons = React.lazy(
|
|
56
|
-
|
|
91
|
+
const SimpleLineIcons = React.lazy(
|
|
92
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/SimpleLineIcons')); })
|
|
93
|
+
);
|
|
94
|
+
return getStyledIcon(SimpleLineIcons, size);
|
|
57
95
|
case "feather":
|
|
58
|
-
const Feather = React.lazy(
|
|
59
|
-
|
|
96
|
+
const Feather = React.lazy(
|
|
97
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Feather')); })
|
|
98
|
+
);
|
|
99
|
+
return getStyledIcon(Feather, size);
|
|
60
100
|
case "antdesign":
|
|
61
101
|
case "ant-design":
|
|
62
|
-
const AntDesign = React.lazy(
|
|
63
|
-
|
|
102
|
+
const AntDesign = React.lazy(
|
|
103
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/AntDesign')); })
|
|
104
|
+
);
|
|
105
|
+
return getStyledIcon(AntDesign, size);
|
|
64
106
|
case "fontisto":
|
|
65
|
-
const Fontisto = React.lazy(
|
|
66
|
-
|
|
107
|
+
const Fontisto = React.lazy(
|
|
108
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Fontisto')); })
|
|
109
|
+
);
|
|
110
|
+
return getStyledIcon(Fontisto, size);
|
|
67
111
|
default:
|
|
68
112
|
if (Object.prototype.hasOwnProperty.call(customIcons, type)) {
|
|
69
|
-
return customIcons[type];
|
|
113
|
+
return getStyledIcon(customIcons[type], size);
|
|
70
114
|
}
|
|
71
|
-
const MaterialIcons = React.lazy(
|
|
72
|
-
|
|
115
|
+
const MaterialIcons = React.lazy(
|
|
116
|
+
async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/MaterialIcons')); })
|
|
117
|
+
);
|
|
118
|
+
return getStyledIcon(MaterialIcons, size);
|
|
73
119
|
}
|
|
74
120
|
};
|
|
75
121
|
const getIconColor = (colorVariant, colorGradation, fontColor, theme) => {
|
|
@@ -81,5 +127,4 @@ const getIconColor = (colorVariant, colorGradation, fontColor, theme) => {
|
|
|
81
127
|
|
|
82
128
|
exports.getIconColor = getIconColor;
|
|
83
129
|
exports.getIconComponent = getIconComponent;
|
|
84
|
-
exports.getStyledIcon = getStyledIcon;
|
|
85
130
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../../../../src/components/atoms/Icon/helpers.ts"],"sourcesContent":["import { ComponentType, lazy } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n StyleProps,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport styled from '@emotion/native';\n\n/* eslint-disable */\nconst customIcons: any = {};\n\nexport const registerCustomIconType = (id: string, customIcon: any) => {\n customIcons[id] = customIcon;\n};\n\
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../../../../src/components/atoms/Icon/helpers.ts"],"sourcesContent":["import { ComponentType, ElementType, lazy, ReactNode } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n StyleProps,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport styled from '@emotion/native';\n\n/* eslint-disable */\nconst customIcons: any = {};\n\nexport const registerCustomIconType = (id: string, customIcon: any) => {\n customIcons[id] = customIcon;\n};\n\nconst getStyledIcon = (Component: ComponentType, size: IconSizeType) => styled(\n Component\n)`\n font-size: ${({ theme }: StyleProps) => theme?.iconSize[size]};\n text-align: center;\n`;\n\nexport const getIconComponent = (type: IconType, size: IconSizeType): any => {\n switch (type) {\n case 'zocial':\n const Zocial = lazy(\n async () => await import('react-native-vector-icons/dist/Zocial')\n );\n return getStyledIcon(Zocial, size);\n case 'octicon':\n const Octicons = lazy(\n async () => await import('react-native-vector-icons/dist/Octicons')\n );\n return getStyledIcon(Octicons, size);\n case 'material':\n const Material = lazy(\n async () => await import('react-native-vector-icons/dist/MaterialIcons')\n );\n return getStyledIcon(Material, size);\n case 'material-community':\n const MaterialCommunity = lazy(\n async () =>\n await import('react-native-vector-icons/dist/MaterialCommunityIcons')\n );\n return getStyledIcon(MaterialCommunity, size);\n case 'ionicon':\n const Ionicons = lazy(\n async () => await import('react-native-vector-icons/dist/Ionicons')\n );\n return getStyledIcon(Ionicons, size);\n case 'foundation':\n const Foundation = lazy(\n async () => await import('react-native-vector-icons/dist/Foundation')\n );\n return getStyledIcon(Foundation, size);\n case 'evilicon':\n const EvilIcons = lazy(\n async () => await import('react-native-vector-icons/dist/EvilIcons')\n );\n return getStyledIcon(EvilIcons, size);\n case 'entypo':\n const Entypo = lazy(\n async () => await import('react-native-vector-icons/dist/Entypo')\n );\n return getStyledIcon(Entypo, size);\n case 'font-awesome':\n const FontAwesome = lazy(\n async () => await import('react-native-vector-icons/dist/FontAwesome')\n );\n console.log(FontAwesome);\n return getStyledIcon(FontAwesome, size);\n case 'font-awesome-5':\n const FontAwesome5 = lazy(\n async () => await import('react-native-vector-icons/dist/FontAwesome5')\n );\n return getStyledIcon(FontAwesome5, size);\n case 'simple-line-icon':\n const SimpleLineIcons = lazy(\n async () =>\n await import('react-native-vector-icons/dist/SimpleLineIcons')\n );\n return getStyledIcon(SimpleLineIcons, size);\n case 'feather':\n const Feather = lazy(\n async () => await import('react-native-vector-icons/dist/Feather')\n );\n return getStyledIcon(Feather, size);\n case 'antdesign':\n case 'ant-design':\n const AntDesign = lazy(\n async () => await import('react-native-vector-icons/dist/AntDesign')\n );\n return getStyledIcon(AntDesign, size);\n case 'fontisto':\n const Fontisto = lazy(\n async () => await import('react-native-vector-icons/dist/Fontisto')\n );\n return getStyledIcon(Fontisto, size);\n default:\n if (Object.prototype.hasOwnProperty.call(customIcons, type)) {\n return getStyledIcon(customIcons[type], size);\n }\n const MaterialIcons = lazy(\n async () => await import('react-native-vector-icons/dist/MaterialIcons')\n );\n return getStyledIcon(MaterialIcons, size);\n }\n};\n/* eslint-enable */\nexport const getIconColor = (\n colorVariant: ColorType | undefined,\n colorGradation: ColorGradationType | undefined,\n fontColor: FontColorType,\n theme: ThemeProp\n): string => {\n if (colorVariant && colorGradation) {\n return theme.color[colorVariant][colorGradation];\n }\n return theme.font.color[fontColor];\n};\n"],"names":["styled","lazy"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAM,cAAmB,EAAC,CAAA;AAM1B,MAAM,aAAA,GAAgB,CAAC,SAAA,EAA0B,IAAuB,KAAAA,0BAAA;AAAA,EACtE,SAAA;AACF,CAAA,CAAA;AAAA,aAAA,EACe,CAAC,EAAE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,0CAAA,MAAA;AAAA,OAC3B,CAAA;AACA,MAAO,OAAA,aAAA,CAAc,WAAW,IAAI,CAAA,CAAA;AAAA,IACtC,KAAK,UAAA;AACH,MAAA,MAAM,QAAW,GAAAA,UAAA;AAAA,QACf,YAAY,MAAM,mFAAO,yCAAA,MAAA;AAAA,OAC3B,CAAA;AACA,MAAO,OAAA,aAAA,CAAc,UAAU,IAAI,CAAA,CAAA;AAAA,IACrC;AACE,MAAA,IAAI,OAAO,SAAU,CAAA,cAAA,CAAe,IAAK,CAAA,WAAA,EAAa,IAAI,CAAG,EAAA;AAC3D,QAAO,OAAA,aAAA,CAAc,WAAY,CAAA,IAAA,CAAA,EAAO,IAAI,CAAA,CAAA;AAAA,OAC9C;AACA,MAAA,MAAM,aAAgB,GAAAA,UAAA;AAAA,QACpB,YAAY,MAAM,mFAAO,8CAAA,MAAA;AAAA,OAC3B,CAAA;AACA,MAAO,OAAA,aAAA,CAAc,eAAe,IAAI,CAAA,CAAA;AAAA,GAC5C;AACF,EAAA;AAEO,MAAM,YAAe,GAAA,CAC1B,YACA,EAAA,cAAA,EACA,WACA,KACW,KAAA;AACX,EAAA,IAAI,gBAAgB,cAAgB,EAAA;AAClC,IAAO,OAAA,KAAA,CAAM,MAAM,YAAc,CAAA,CAAA,cAAA,CAAA,CAAA;AAAA,GACnC;AACA,EAAO,OAAA,KAAA,CAAM,KAAK,KAAM,CAAA,SAAA,CAAA,CAAA;AAC1B;;;;;"}
|
|
@@ -54,12 +54,11 @@ const Icon = (_a) => {
|
|
|
54
54
|
]);
|
|
55
55
|
const theme = useTheme();
|
|
56
56
|
const color = getIconColor(colorVariant, colorTone, fontColor, theme);
|
|
57
|
-
const RNVIcon = getIconComponent(type);
|
|
57
|
+
const RNVIcon = getIconComponent(type, size);
|
|
58
58
|
return /* @__PURE__ */ React__default.createElement(React__default.Suspense, {
|
|
59
59
|
fallback: /* @__PURE__ */ React__default.createElement(Text, null, " ")
|
|
60
60
|
}, /* @__PURE__ */ React__default.createElement(RNVIcon, __spreadProps(__spreadValues({}, rest), {
|
|
61
61
|
style,
|
|
62
|
-
size,
|
|
63
62
|
name,
|
|
64
63
|
color
|
|
65
64
|
})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../../../../src/components/atoms/Icon/Icon.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, TextStyle, Text } from 'react-native';\nimport { useTheme } from '@emotion/react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { getIconColor, getIconComponent } from './helpers';\n\nexport interface IconProps {\n /** Name of the icon. You must use the same icons from react-native-vector-icons */\n name: string;\n /** Default icon sizes from theme */\n size?: IconSizeType;\n /** Icon family. You must use the same icons from react-native-vector-icons */\n type: IconType;\n /** Font theme fill color */\n fontColor?: FontColorType;\n /** Palette theme fill color */\n colorVariant?: ColorType;\n /** Palette theme gradation fill color */\n colorTone?: ColorGradationType;\n style?: StyleProp<TextStyle>;\n}\n\n/** NOTE: When using colors, the order matters if you're trying to merge multiple types. */\nconst Icon: FC<IconProps> = ({\n name,\n size = 'centi',\n type,\n style,\n fontColor = 'dark',\n colorVariant,\n colorTone = 'medium',\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n const color = getIconColor(colorVariant, colorTone, fontColor, theme);\n const RNVIcon = getIconComponent(type);\n\n return (\n <React.Suspense fallback={<Text> </Text>}>\n <RNVIcon {...rest} style={style}
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../../../../src/components/atoms/Icon/Icon.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, TextStyle, Text } from 'react-native';\nimport { useTheme } from '@emotion/react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { getIconColor, getIconComponent } from './helpers';\n\nexport interface IconProps {\n /** Name of the icon. You must use the same icons from react-native-vector-icons */\n name: string;\n /** Default icon sizes from theme */\n size?: IconSizeType;\n /** Icon family. You must use the same icons from react-native-vector-icons */\n type: IconType;\n /** Font theme fill color */\n fontColor?: FontColorType;\n /** Palette theme fill color */\n colorVariant?: ColorType;\n /** Palette theme gradation fill color */\n colorTone?: ColorGradationType;\n style?: StyleProp<TextStyle>;\n}\n\n/** NOTE: When using colors, the order matters if you're trying to merge multiple types. */\nconst Icon: FC<IconProps> = ({\n name,\n size = 'centi',\n type,\n style,\n fontColor = 'dark',\n colorVariant,\n colorTone = 'medium',\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n const color = getIconColor(colorVariant, colorTone, fontColor, theme);\n const RNVIcon = getIconComponent(type, size);\n\n return (\n <React.Suspense fallback={<Text> </Text>}>\n <RNVIcon {...rest} style={style} name={name} color={color} />\n </React.Suspense>\n );\n};\n\nexport default Icon;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BM,MAAA,IAAA,GAAsB,CAAC,EASvB,KAAA;AATuB,EAC3B,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,IAAA;AAAA,IACA,IAAO,GAAA,OAAA;AAAA,IACP,IAAA;AAAA,IACA,KAAA;AAAA,IACA,SAAY,GAAA,MAAA;AAAA,IACZ,YAAA;AAAA,IACA,SAAY,GAAA,QAAA;AAAA,GArCd,GA8B6B,EAQxB,EAAA,IAAA,GAAA,SAAA,CARwB,EAQxB,EAAA;AAAA,IAPH,MAAA;AAAA,IACA,MAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,EAAA,MAAM,KAAQ,GAAA,YAAA,CAAa,YAAc,EAAA,SAAA,EAAW,WAAW,KAAK,CAAA,CAAA;AACpE,EAAM,MAAA,OAAA,GAAU,gBAAiB,CAAA,IAAA,EAAM,IAAI,CAAA,CAAA;AAE3C,EACE,uBAAAA,cAAA,CAAA,aAAA,CAACA,eAAM,QAAN,EAAA;AAAA,IAAe,QAAA,kBAAWA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,IAAA,EAAK,GAAC,CAAA;AAAA,GAC/B,kBAAAA,cAAA,CAAA,aAAA,CAAC,0CAAY,IAAZ,CAAA,EAAA;AAAA,IAAkB,KAAA;AAAA,IAAc,IAAA;AAAA,IAAY,KAAA;AAAA,GAAA,CAAc,CAC7D,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
1
|
import { ColorGradationType, ColorType } from '@tecsinapse/react-core';
|
|
3
2
|
export declare const registerCustomIconType: (id: string, customIcon: any) => void;
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const getIconComponent: (type: IconType) => any;
|
|
3
|
+
export declare const getIconComponent: (type: IconType, size: IconSizeType) => any;
|
|
6
4
|
export declare const getIconColor: (colorVariant: ColorType | undefined, colorGradation: ColorGradationType | undefined, fontColor: FontColorType, theme: ThemeProp) => string;
|
|
@@ -2,64 +2,94 @@ import { lazy } from 'react';
|
|
|
2
2
|
import styled from '@emotion/native';
|
|
3
3
|
|
|
4
4
|
const customIcons = {};
|
|
5
|
-
const getStyledIcon = (Component, size) => styled(
|
|
5
|
+
const getStyledIcon = (Component, size) => styled(
|
|
6
|
+
Component
|
|
7
|
+
)`
|
|
6
8
|
font-size: ${({ theme }) => theme == null ? void 0 : theme.iconSize[size]};
|
|
7
9
|
text-align: center;
|
|
8
10
|
`;
|
|
9
|
-
const getIconComponent = (type) => {
|
|
11
|
+
const getIconComponent = (type, size) => {
|
|
10
12
|
switch (type) {
|
|
11
13
|
case "zocial":
|
|
12
|
-
const Zocial = lazy(
|
|
13
|
-
|
|
14
|
+
const Zocial = lazy(
|
|
15
|
+
async () => await import('react-native-vector-icons/dist/Zocial')
|
|
16
|
+
);
|
|
17
|
+
return getStyledIcon(Zocial, size);
|
|
14
18
|
case "octicon":
|
|
15
|
-
const Octicons = lazy(
|
|
16
|
-
|
|
19
|
+
const Octicons = lazy(
|
|
20
|
+
async () => await import('react-native-vector-icons/dist/Octicons')
|
|
21
|
+
);
|
|
22
|
+
return getStyledIcon(Octicons, size);
|
|
17
23
|
case "material":
|
|
18
|
-
const Material = lazy(
|
|
19
|
-
|
|
24
|
+
const Material = lazy(
|
|
25
|
+
async () => await import('react-native-vector-icons/dist/MaterialIcons')
|
|
26
|
+
);
|
|
27
|
+
return getStyledIcon(Material, size);
|
|
20
28
|
case "material-community":
|
|
21
29
|
const MaterialCommunity = lazy(
|
|
22
|
-
async () => await import('
|
|
30
|
+
async () => await import('react-native-vector-icons/dist/MaterialCommunityIcons')
|
|
23
31
|
);
|
|
24
|
-
return MaterialCommunity;
|
|
32
|
+
return getStyledIcon(MaterialCommunity, size);
|
|
25
33
|
case "ionicon":
|
|
26
|
-
const Ionicons = lazy(
|
|
27
|
-
|
|
34
|
+
const Ionicons = lazy(
|
|
35
|
+
async () => await import('react-native-vector-icons/dist/Ionicons')
|
|
36
|
+
);
|
|
37
|
+
return getStyledIcon(Ionicons, size);
|
|
28
38
|
case "foundation":
|
|
29
|
-
const Foundation = lazy(
|
|
30
|
-
|
|
39
|
+
const Foundation = lazy(
|
|
40
|
+
async () => await import('react-native-vector-icons/dist/Foundation')
|
|
41
|
+
);
|
|
42
|
+
return getStyledIcon(Foundation, size);
|
|
31
43
|
case "evilicon":
|
|
32
|
-
const EvilIcons = lazy(
|
|
33
|
-
|
|
44
|
+
const EvilIcons = lazy(
|
|
45
|
+
async () => await import('react-native-vector-icons/dist/EvilIcons')
|
|
46
|
+
);
|
|
47
|
+
return getStyledIcon(EvilIcons, size);
|
|
34
48
|
case "entypo":
|
|
35
|
-
const Entypo = lazy(
|
|
36
|
-
|
|
49
|
+
const Entypo = lazy(
|
|
50
|
+
async () => await import('react-native-vector-icons/dist/Entypo')
|
|
51
|
+
);
|
|
52
|
+
return getStyledIcon(Entypo, size);
|
|
37
53
|
case "font-awesome":
|
|
38
|
-
const FontAwesome = lazy(
|
|
54
|
+
const FontAwesome = lazy(
|
|
55
|
+
async () => await import('react-native-vector-icons/dist/FontAwesome')
|
|
56
|
+
);
|
|
39
57
|
console.log(FontAwesome);
|
|
40
|
-
return FontAwesome;
|
|
58
|
+
return getStyledIcon(FontAwesome, size);
|
|
41
59
|
case "font-awesome-5":
|
|
42
|
-
const FontAwesome5 = lazy(
|
|
43
|
-
|
|
60
|
+
const FontAwesome5 = lazy(
|
|
61
|
+
async () => await import('react-native-vector-icons/dist/FontAwesome5')
|
|
62
|
+
);
|
|
63
|
+
return getStyledIcon(FontAwesome5, size);
|
|
44
64
|
case "simple-line-icon":
|
|
45
|
-
const SimpleLineIcons = lazy(
|
|
46
|
-
|
|
65
|
+
const SimpleLineIcons = lazy(
|
|
66
|
+
async () => await import('react-native-vector-icons/dist/SimpleLineIcons')
|
|
67
|
+
);
|
|
68
|
+
return getStyledIcon(SimpleLineIcons, size);
|
|
47
69
|
case "feather":
|
|
48
|
-
const Feather = lazy(
|
|
49
|
-
|
|
70
|
+
const Feather = lazy(
|
|
71
|
+
async () => await import('react-native-vector-icons/dist/Feather')
|
|
72
|
+
);
|
|
73
|
+
return getStyledIcon(Feather, size);
|
|
50
74
|
case "antdesign":
|
|
51
75
|
case "ant-design":
|
|
52
|
-
const AntDesign = lazy(
|
|
53
|
-
|
|
76
|
+
const AntDesign = lazy(
|
|
77
|
+
async () => await import('react-native-vector-icons/dist/AntDesign')
|
|
78
|
+
);
|
|
79
|
+
return getStyledIcon(AntDesign, size);
|
|
54
80
|
case "fontisto":
|
|
55
|
-
const Fontisto = lazy(
|
|
56
|
-
|
|
81
|
+
const Fontisto = lazy(
|
|
82
|
+
async () => await import('react-native-vector-icons/dist/Fontisto')
|
|
83
|
+
);
|
|
84
|
+
return getStyledIcon(Fontisto, size);
|
|
57
85
|
default:
|
|
58
86
|
if (Object.prototype.hasOwnProperty.call(customIcons, type)) {
|
|
59
|
-
return customIcons[type];
|
|
87
|
+
return getStyledIcon(customIcons[type], size);
|
|
60
88
|
}
|
|
61
|
-
const MaterialIcons = lazy(
|
|
62
|
-
|
|
89
|
+
const MaterialIcons = lazy(
|
|
90
|
+
async () => await import('react-native-vector-icons/dist/MaterialIcons')
|
|
91
|
+
);
|
|
92
|
+
return getStyledIcon(MaterialIcons, size);
|
|
63
93
|
}
|
|
64
94
|
};
|
|
65
95
|
const getIconColor = (colorVariant, colorGradation, fontColor, theme) => {
|
|
@@ -69,5 +99,5 @@ const getIconColor = (colorVariant, colorGradation, fontColor, theme) => {
|
|
|
69
99
|
return theme.font.color[fontColor];
|
|
70
100
|
};
|
|
71
101
|
|
|
72
|
-
export { getIconColor, getIconComponent
|
|
102
|
+
export { getIconColor, getIconComponent };
|
|
73
103
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../../../../src/components/atoms/Icon/helpers.ts"],"sourcesContent":["import { ComponentType, lazy } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n StyleProps,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport styled from '@emotion/native';\n\n/* eslint-disable */\nconst customIcons: any = {};\n\nexport const registerCustomIconType = (id: string, customIcon: any) => {\n customIcons[id] = customIcon;\n};\n\
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../../../../src/components/atoms/Icon/helpers.ts"],"sourcesContent":["import { ComponentType, ElementType, lazy, ReactNode } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n StyleProps,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport styled from '@emotion/native';\n\n/* eslint-disable */\nconst customIcons: any = {};\n\nexport const registerCustomIconType = (id: string, customIcon: any) => {\n customIcons[id] = customIcon;\n};\n\nconst getStyledIcon = (Component: ComponentType, size: IconSizeType) => styled(\n Component\n)`\n font-size: ${({ theme }: StyleProps) => theme?.iconSize[size]};\n text-align: center;\n`;\n\nexport const getIconComponent = (type: IconType, size: IconSizeType): any => {\n switch (type) {\n case 'zocial':\n const Zocial = lazy(\n async () => await import('react-native-vector-icons/dist/Zocial')\n );\n return getStyledIcon(Zocial, size);\n case 'octicon':\n const Octicons = lazy(\n async () => await import('react-native-vector-icons/dist/Octicons')\n );\n return getStyledIcon(Octicons, size);\n case 'material':\n const Material = lazy(\n async () => await import('react-native-vector-icons/dist/MaterialIcons')\n );\n return getStyledIcon(Material, size);\n case 'material-community':\n const MaterialCommunity = lazy(\n async () =>\n await import('react-native-vector-icons/dist/MaterialCommunityIcons')\n );\n return getStyledIcon(MaterialCommunity, size);\n case 'ionicon':\n const Ionicons = lazy(\n async () => await import('react-native-vector-icons/dist/Ionicons')\n );\n return getStyledIcon(Ionicons, size);\n case 'foundation':\n const Foundation = lazy(\n async () => await import('react-native-vector-icons/dist/Foundation')\n );\n return getStyledIcon(Foundation, size);\n case 'evilicon':\n const EvilIcons = lazy(\n async () => await import('react-native-vector-icons/dist/EvilIcons')\n );\n return getStyledIcon(EvilIcons, size);\n case 'entypo':\n const Entypo = lazy(\n async () => await import('react-native-vector-icons/dist/Entypo')\n );\n return getStyledIcon(Entypo, size);\n case 'font-awesome':\n const FontAwesome = lazy(\n async () => await import('react-native-vector-icons/dist/FontAwesome')\n );\n console.log(FontAwesome);\n return getStyledIcon(FontAwesome, size);\n case 'font-awesome-5':\n const FontAwesome5 = lazy(\n async () => await import('react-native-vector-icons/dist/FontAwesome5')\n );\n return getStyledIcon(FontAwesome5, size);\n case 'simple-line-icon':\n const SimpleLineIcons = lazy(\n async () =>\n await import('react-native-vector-icons/dist/SimpleLineIcons')\n );\n return getStyledIcon(SimpleLineIcons, size);\n case 'feather':\n const Feather = lazy(\n async () => await import('react-native-vector-icons/dist/Feather')\n );\n return getStyledIcon(Feather, size);\n case 'antdesign':\n case 'ant-design':\n const AntDesign = lazy(\n async () => await import('react-native-vector-icons/dist/AntDesign')\n );\n return getStyledIcon(AntDesign, size);\n case 'fontisto':\n const Fontisto = lazy(\n async () => await import('react-native-vector-icons/dist/Fontisto')\n );\n return getStyledIcon(Fontisto, size);\n default:\n if (Object.prototype.hasOwnProperty.call(customIcons, type)) {\n return getStyledIcon(customIcons[type], size);\n }\n const MaterialIcons = lazy(\n async () => await import('react-native-vector-icons/dist/MaterialIcons')\n );\n return getStyledIcon(MaterialIcons, size);\n }\n};\n/* eslint-enable */\nexport const getIconColor = (\n colorVariant: ColorType | undefined,\n colorGradation: ColorGradationType | undefined,\n fontColor: FontColorType,\n theme: ThemeProp\n): string => {\n if (colorVariant && colorGradation) {\n return theme.color[colorVariant][colorGradation];\n }\n return theme.font.color[fontColor];\n};\n"],"names":[],"mappings":";;;AAaA,MAAM,cAAmB,EAAC,CAAA;AAM1B,MAAM,aAAA,GAAgB,CAAC,SAAA,EAA0B,IAAuB,KAAA,MAAA;AAAA,EACtE,SAAA;AACF,CAAA,CAAA;AAAA,aAAA,EACe,CAAC,EAAE,KAAM,EAAA,KAAkB,+BAAO,QAAS,CAAA,IAAA,CAAA,CAAA;AAAA;AAAA,CAAA,CAAA;AAI7C,MAAA,gBAAA,GAAmB,CAAC,IAAA,EAAgB,IAA4B,KAAA;AAC3E,EAAA,QAAQ,IAAM;AAAA,IACZ,KAAK,QAAA;AACH,MAAA,MAAM,MAAS,GAAA,IAAA;AAAA,QACb,YAAY,MAAM,OAAO,uCAAA,CAAA;AAAA,OAC3B,CAAA;AACA,MAAO,OAAA,aAAA,CAAc,QAAQ,IAAI,CAAA,CAAA;AAAA,IACnC,KAAK,SAAA;AACH,MAAA,MAAM,QAAW,GAAA,IAAA;AAAA,QACf,YAAY,MAAM,OAAO,yCAAA,CAAA;AAAA,OAC3B,CAAA;AACA,MAAO,OAAA,aAAA,CAAc,UAAU,IAAI,CAAA,CAAA;AAAA,IACrC,KA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,OAAA,aAAA,CAAc,eAAe,IAAI,CAAA,CAAA;AAAA,GAC5C;AACF,EAAA;AAEO,MAAM,YAAe,GAAA,CAC1B,YACA,EAAA,cAAA,EACA,WACA,KACW,KAAA;AACX,EAAA,IAAI,gBAAgB,cAAgB,EAAA;AAClC,IAAO,OAAA,KAAA,CAAM,MAAM,YAAc,CAAA,CAAA,cAAA,CAAA,CAAA;AAAA,GACnC;AACA,EAAO,OAAA,KAAA,CAAM,KAAK,KAAM,CAAA,SAAA,CAAA,CAAA;AAC1B;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/react-core",
|
|
3
3
|
"description": "TecSinapse hybrid React components",
|
|
4
|
-
"version": "1.21.1-beta.
|
|
4
|
+
"version": "1.21.1-beta.8+28a3477",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/esm/index.js",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"react-native": "^0.64.0",
|
|
44
44
|
"react-native-vector-icons": "^8.1.0 || ^9.0.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "28a3477be880727285a5155950d80f7d78666314"
|
|
47
47
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var FontAwesomeRNVI = require('react-native-vector-icons/dist/FontAwesome');
|
|
4
|
-
var helpers = require('./helpers.js');
|
|
5
|
-
var React = require('react');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var FontAwesomeRNVI__default = /*#__PURE__*/_interopDefaultLegacy(FontAwesomeRNVI);
|
|
10
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
|
-
|
|
12
|
-
const FontAwesome = ({
|
|
13
|
-
size,
|
|
14
|
-
color,
|
|
15
|
-
name
|
|
16
|
-
}) => {
|
|
17
|
-
const Icon = helpers.getStyledIcon(FontAwesomeRNVI__default["default"], size);
|
|
18
|
-
return /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
19
|
-
name,
|
|
20
|
-
color
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
module.exports = FontAwesome;
|
|
25
|
-
//# sourceMappingURL=FontAwesome.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FontAwesome.js","sources":["../../../../../src/components/atoms/Icon/FontAwesome.tsx"],"sourcesContent":["import FontAwesomeRNVI from 'react-native-vector-icons/dist/FontAwesome';\nimport { getStyledIcon } from './helpers';\nimport React from 'react';\nimport { IconSizeType } from '@tecsinapse/react-core';\n\nconst FontAwesome = ({\n size,\n color,\n name,\n}: {\n size: IconSizeType;\n color: string;\n name: string;\n}) => {\n const Icon = getStyledIcon(FontAwesomeRNVI, size);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return <Icon name={name} color={color} />;\n};\n\nexport default FontAwesome;\n"],"names":["getStyledIcon","FontAwesomeRNVI","React"],"mappings":";;;;;;;;;;;AAKA,MAAM,cAAc,CAAC;AAAA,EACnB,IAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AACF,CAIM,KAAA;AACJ,EAAM,MAAA,IAAA,GAAOA,qBAAc,CAAAC,mCAAA,EAAiB,IAAI,CAAA,CAAA;AAGhD,EAAA,uBAAQC,yBAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAK,IAAA;AAAA,IAAY,KAAA;AAAA,GAAc,CAAA,CAAA;AACzC;;;;"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var MaterialRNVI = require('react-native-vector-icons/dist/MaterialIcons');
|
|
5
|
-
var helpers = require('./helpers.js');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
|
-
var MaterialRNVI__default = /*#__PURE__*/_interopDefaultLegacy(MaterialRNVI);
|
|
11
|
-
|
|
12
|
-
const Material = ({
|
|
13
|
-
size,
|
|
14
|
-
color,
|
|
15
|
-
name
|
|
16
|
-
}) => {
|
|
17
|
-
const Icon = helpers.getStyledIcon(MaterialRNVI__default["default"], size);
|
|
18
|
-
return /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
19
|
-
name,
|
|
20
|
-
color
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
module.exports = Material;
|
|
25
|
-
//# sourceMappingURL=Material.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Material.js","sources":["../../../../../src/components/atoms/Icon/Material.tsx"],"sourcesContent":["import React from 'react';\nimport MaterialRNVI from 'react-native-vector-icons/dist/MaterialIcons';\nimport { getStyledIcon } from './helpers';\nimport { IconSizeType } from '@tecsinapse/react-core';\n\nconst Material = ({\n size,\n color,\n name,\n}: {\n size: IconSizeType;\n color: string;\n name: string;\n}) => {\n const Icon = getStyledIcon(MaterialRNVI, size);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return <Icon name={name} color={color} />;\n};\n\nexport default Material;\n"],"names":["getStyledIcon","MaterialRNVI","React"],"mappings":";;;;;;;;;;;AAKA,MAAM,WAAW,CAAC;AAAA,EAChB,IAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AACF,CAIM,KAAA;AACJ,EAAM,MAAA,IAAA,GAAOA,qBAAc,CAAAC,gCAAA,EAAc,IAAI,CAAA,CAAA;AAG7C,EAAA,uBAAQC,yBAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAK,IAAA;AAAA,IAAY,KAAA;AAAA,GAAc,CAAA,CAAA;AACzC;;;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IconSizeType } from '@tecsinapse/react-core';
|
|
2
|
-
import { StyleProp, TextStyle } from 'react-native';
|
|
3
|
-
declare const MaterialCommunity: ({ size, color, name, ...rest }: {
|
|
4
|
-
size: IconSizeType;
|
|
5
|
-
color: string;
|
|
6
|
-
name: string;
|
|
7
|
-
style?: StyleProp<TextStyle>;
|
|
8
|
-
}) => JSX.Element;
|
|
9
|
-
export default MaterialCommunity;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var MaterialCommunityRNVI = require('react-native-vector-icons/dist/MaterialCommunityIcons');
|
|
5
|
-
var helpers = require('./helpers.js');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
|
-
var MaterialCommunityRNVI__default = /*#__PURE__*/_interopDefaultLegacy(MaterialCommunityRNVI);
|
|
11
|
-
|
|
12
|
-
var __defProp = Object.defineProperty;
|
|
13
|
-
var __defProps = Object.defineProperties;
|
|
14
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
15
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
16
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
18
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19
|
-
var __spreadValues = (a, b) => {
|
|
20
|
-
for (var prop in b || (b = {}))
|
|
21
|
-
if (__hasOwnProp.call(b, prop))
|
|
22
|
-
__defNormalProp(a, prop, b[prop]);
|
|
23
|
-
if (__getOwnPropSymbols)
|
|
24
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
25
|
-
if (__propIsEnum.call(b, prop))
|
|
26
|
-
__defNormalProp(a, prop, b[prop]);
|
|
27
|
-
}
|
|
28
|
-
return a;
|
|
29
|
-
};
|
|
30
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
31
|
-
var __objRest = (source, exclude) => {
|
|
32
|
-
var target = {};
|
|
33
|
-
for (var prop in source)
|
|
34
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35
|
-
target[prop] = source[prop];
|
|
36
|
-
if (source != null && __getOwnPropSymbols)
|
|
37
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
38
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
39
|
-
target[prop] = source[prop];
|
|
40
|
-
}
|
|
41
|
-
return target;
|
|
42
|
-
};
|
|
43
|
-
const MaterialCommunity = (_a) => {
|
|
44
|
-
var _b = _a, {
|
|
45
|
-
size,
|
|
46
|
-
color,
|
|
47
|
-
name
|
|
48
|
-
} = _b, rest = __objRest(_b, [
|
|
49
|
-
"size",
|
|
50
|
-
"color",
|
|
51
|
-
"name"
|
|
52
|
-
]);
|
|
53
|
-
const Icon = helpers.getStyledIcon(MaterialCommunityRNVI__default["default"], size);
|
|
54
|
-
return /* @__PURE__ */ React__default["default"].createElement(Icon, __spreadProps(__spreadValues({}, rest), {
|
|
55
|
-
name,
|
|
56
|
-
color
|
|
57
|
-
}));
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
module.exports = MaterialCommunity;
|
|
61
|
-
//# sourceMappingURL=MaterialCommunity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MaterialCommunity.js","sources":["../../../../../src/components/atoms/Icon/MaterialCommunity.tsx"],"sourcesContent":["import React from 'react';\nimport MaterialCommunityRNVI from 'react-native-vector-icons/dist/MaterialCommunityIcons';\nimport { getStyledIcon } from './helpers';\nimport { IconSizeType } from '@tecsinapse/react-core';\nimport { StyleProp, TextStyle } from 'react-native';\n\nconst MaterialCommunity = ({\n size,\n color,\n name,\n ...rest\n}: {\n size: IconSizeType;\n color: string;\n name: string;\n style?: StyleProp<TextStyle>;\n}) => {\n const Icon = getStyledIcon(MaterialCommunityRNVI, size);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return <Icon {...rest} name={name} color={color} />;\n};\n\nexport default MaterialCommunity;\n"],"names":["getStyledIcon","MaterialCommunityRNVI","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMM,MAAA,iBAAA,GAAoB,CAAC,EAUrB,KAAA;AAVqB,EACzB,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,IAAA;AAAA,GATF,GAM2B,EAItB,EAAA,IAAA,GAAA,SAAA,CAJsB,EAItB,EAAA;AAAA,IAHH,MAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,GAAA,CAAA,CAAA;AAQA,EAAM,MAAA,IAAA,GAAOA,qBAAc,CAAAC,yCAAA,EAAuB,IAAI,CAAA,CAAA;AAGtD,EAAO,uBAAAC,yBAAA,CAAA,aAAA,CAAC,uCAAS,IAAT,CAAA,EAAA;AAAA,IAAe,IAAA;AAAA,IAAY,KAAA;AAAA,GAAc,CAAA,CAAA,CAAA;AACnD;;;;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import FontAwesomeRNVI from 'react-native-vector-icons/dist/FontAwesome';
|
|
2
|
-
import { getStyledIcon } from './helpers.js';
|
|
3
|
-
import React__default from 'react';
|
|
4
|
-
|
|
5
|
-
const FontAwesome = ({
|
|
6
|
-
size,
|
|
7
|
-
color,
|
|
8
|
-
name
|
|
9
|
-
}) => {
|
|
10
|
-
const Icon = getStyledIcon(FontAwesomeRNVI, size);
|
|
11
|
-
return /* @__PURE__ */ React__default.createElement(Icon, {
|
|
12
|
-
name,
|
|
13
|
-
color
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { FontAwesome as default };
|
|
18
|
-
//# sourceMappingURL=FontAwesome.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FontAwesome.js","sources":["../../../../../src/components/atoms/Icon/FontAwesome.tsx"],"sourcesContent":["import FontAwesomeRNVI from 'react-native-vector-icons/dist/FontAwesome';\nimport { getStyledIcon } from './helpers';\nimport React from 'react';\nimport { IconSizeType } from '@tecsinapse/react-core';\n\nconst FontAwesome = ({\n size,\n color,\n name,\n}: {\n size: IconSizeType;\n color: string;\n name: string;\n}) => {\n const Icon = getStyledIcon(FontAwesomeRNVI, size);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return <Icon name={name} color={color} />;\n};\n\nexport default FontAwesome;\n"],"names":["React"],"mappings":";;;;AAKA,MAAM,cAAc,CAAC;AAAA,EACnB,IAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AACF,CAIM,KAAA;AACJ,EAAM,MAAA,IAAA,GAAO,aAAc,CAAA,eAAA,EAAiB,IAAI,CAAA,CAAA;AAGhD,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAK,IAAA;AAAA,IAAY,KAAA;AAAA,GAAc,CAAA,CAAA;AACzC;;;;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
import MaterialRNVI from 'react-native-vector-icons/dist/MaterialIcons';
|
|
3
|
-
import { getStyledIcon } from './helpers.js';
|
|
4
|
-
|
|
5
|
-
const Material = ({
|
|
6
|
-
size,
|
|
7
|
-
color,
|
|
8
|
-
name
|
|
9
|
-
}) => {
|
|
10
|
-
const Icon = getStyledIcon(MaterialRNVI, size);
|
|
11
|
-
return /* @__PURE__ */ React__default.createElement(Icon, {
|
|
12
|
-
name,
|
|
13
|
-
color
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { Material as default };
|
|
18
|
-
//# sourceMappingURL=Material.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Material.js","sources":["../../../../../src/components/atoms/Icon/Material.tsx"],"sourcesContent":["import React from 'react';\nimport MaterialRNVI from 'react-native-vector-icons/dist/MaterialIcons';\nimport { getStyledIcon } from './helpers';\nimport { IconSizeType } from '@tecsinapse/react-core';\n\nconst Material = ({\n size,\n color,\n name,\n}: {\n size: IconSizeType;\n color: string;\n name: string;\n}) => {\n const Icon = getStyledIcon(MaterialRNVI, size);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return <Icon name={name} color={color} />;\n};\n\nexport default Material;\n"],"names":["React"],"mappings":";;;;AAKA,MAAM,WAAW,CAAC;AAAA,EAChB,IAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AACF,CAIM,KAAA;AACJ,EAAM,MAAA,IAAA,GAAO,aAAc,CAAA,YAAA,EAAc,IAAI,CAAA,CAAA;AAG7C,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAK,IAAA;AAAA,IAAY,KAAA;AAAA,GAAc,CAAA,CAAA;AACzC;;;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IconSizeType } from '@tecsinapse/react-core';
|
|
2
|
-
import { StyleProp, TextStyle } from 'react-native';
|
|
3
|
-
declare const MaterialCommunity: ({ size, color, name, ...rest }: {
|
|
4
|
-
size: IconSizeType;
|
|
5
|
-
color: string;
|
|
6
|
-
name: string;
|
|
7
|
-
style?: StyleProp<TextStyle>;
|
|
8
|
-
}) => JSX.Element;
|
|
9
|
-
export default MaterialCommunity;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
import MaterialCommunityRNVI from 'react-native-vector-icons/dist/MaterialCommunityIcons';
|
|
3
|
-
import { getStyledIcon } from './helpers.js';
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __defProps = Object.defineProperties;
|
|
7
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __objRest = (source, exclude) => {
|
|
25
|
-
var target = {};
|
|
26
|
-
for (var prop in source)
|
|
27
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
if (source != null && __getOwnPropSymbols)
|
|
30
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
-
target[prop] = source[prop];
|
|
33
|
-
}
|
|
34
|
-
return target;
|
|
35
|
-
};
|
|
36
|
-
const MaterialCommunity = (_a) => {
|
|
37
|
-
var _b = _a, {
|
|
38
|
-
size,
|
|
39
|
-
color,
|
|
40
|
-
name
|
|
41
|
-
} = _b, rest = __objRest(_b, [
|
|
42
|
-
"size",
|
|
43
|
-
"color",
|
|
44
|
-
"name"
|
|
45
|
-
]);
|
|
46
|
-
const Icon = getStyledIcon(MaterialCommunityRNVI, size);
|
|
47
|
-
return /* @__PURE__ */ React__default.createElement(Icon, __spreadProps(__spreadValues({}, rest), {
|
|
48
|
-
name,
|
|
49
|
-
color
|
|
50
|
-
}));
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export { MaterialCommunity as default };
|
|
54
|
-
//# sourceMappingURL=MaterialCommunity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MaterialCommunity.js","sources":["../../../../../src/components/atoms/Icon/MaterialCommunity.tsx"],"sourcesContent":["import React from 'react';\nimport MaterialCommunityRNVI from 'react-native-vector-icons/dist/MaterialCommunityIcons';\nimport { getStyledIcon } from './helpers';\nimport { IconSizeType } from '@tecsinapse/react-core';\nimport { StyleProp, TextStyle } from 'react-native';\n\nconst MaterialCommunity = ({\n size,\n color,\n name,\n ...rest\n}: {\n size: IconSizeType;\n color: string;\n name: string;\n style?: StyleProp<TextStyle>;\n}) => {\n const Icon = getStyledIcon(MaterialCommunityRNVI, size);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return <Icon {...rest} name={name} color={color} />;\n};\n\nexport default MaterialCommunity;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMM,MAAA,iBAAA,GAAoB,CAAC,EAUrB,KAAA;AAVqB,EACzB,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,IAAA;AAAA,GATF,GAM2B,EAItB,EAAA,IAAA,GAAA,SAAA,CAJsB,EAItB,EAAA;AAAA,IAHH,MAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,GAAA,CAAA,CAAA;AAQA,EAAM,MAAA,IAAA,GAAO,aAAc,CAAA,qBAAA,EAAuB,IAAI,CAAA,CAAA;AAGtD,EAAO,uBAAAA,cAAA,CAAA,aAAA,CAAC,uCAAS,IAAT,CAAA,EAAA;AAAA,IAAe,IAAA;AAAA,IAAY,KAAA;AAAA,GAAc,CAAA,CAAA,CAAA;AACnD;;;;"}
|