@tecsinapse/react-core 1.21.0-beta.13 → 1.21.1-beta.1

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.
Files changed (104) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/components/atoms/BoxContent/styled.d.ts +1 -1
  3. package/dist/components/atoms/Icon/helpers.d.ts +2 -2
  4. package/dist/components/atoms/Icon/helpers.js +45 -47
  5. package/dist/components/atoms/Icon/helpers.js.map +1 -1
  6. package/dist/components/atoms/Input/hooks/useInputFocus.d.ts +1 -1
  7. package/dist/components/atoms/Input/hooks/useNumberMask.d.ts +2 -2
  8. package/dist/components/atoms/Input/hooks/useStringMask.d.ts +1 -1
  9. package/dist/components/atoms/shared/PaperAndCard.d.ts +1 -1
  10. package/dist/components/molecules/Grid/functions.d.ts +1 -1
  11. package/dist/utils/ResponsiveFontSize.d.ts +1 -1
  12. package/esm/components/atoms/BoxContent/styled.d.ts +1 -1
  13. package/esm/components/atoms/Icon/helpers.d.ts +2 -2
  14. package/esm/components/atoms/Icon/helpers.js +45 -47
  15. package/esm/components/atoms/Icon/helpers.js.map +1 -1
  16. package/esm/components/atoms/Input/hooks/useInputFocus.d.ts +1 -1
  17. package/esm/components/atoms/Input/hooks/useNumberMask.d.ts +2 -2
  18. package/esm/components/atoms/Input/hooks/useStringMask.d.ts +1 -1
  19. package/esm/components/atoms/shared/PaperAndCard.d.ts +1 -1
  20. package/esm/components/molecules/Grid/functions.d.ts +1 -1
  21. package/esm/utils/ResponsiveFontSize.d.ts +1 -1
  22. package/package.json +6 -6
  23. package/src/components/atoms/Icon/helpers.ts +47 -47
  24. package/esm/components/atoms/Avatar/index.js +0 -2
  25. package/esm/components/atoms/Avatar/index.js.map +0 -1
  26. package/esm/components/atoms/Badge/index.js +0 -2
  27. package/esm/components/atoms/Badge/index.js.map +0 -1
  28. package/esm/components/atoms/BoxContent/index.js +0 -2
  29. package/esm/components/atoms/BoxContent/index.js.map +0 -1
  30. package/esm/components/atoms/Button/States/index.js +0 -4
  31. package/esm/components/atoms/Button/States/index.js.map +0 -1
  32. package/esm/components/atoms/Button/index.js +0 -3
  33. package/esm/components/atoms/Button/index.js.map +0 -1
  34. package/esm/components/atoms/Card/Footer/index.js +0 -2
  35. package/esm/components/atoms/Card/Footer/index.js.map +0 -1
  36. package/esm/components/atoms/Card/Header/index.js +0 -2
  37. package/esm/components/atoms/Card/Header/index.js.map +0 -1
  38. package/esm/components/atoms/Card/index.js +0 -2
  39. package/esm/components/atoms/Card/index.js.map +0 -1
  40. package/esm/components/atoms/Checkbox/index.js +0 -2
  41. package/esm/components/atoms/Checkbox/index.js.map +0 -1
  42. package/esm/components/atoms/Divider/index.js +0 -2
  43. package/esm/components/atoms/Divider/index.js.map +0 -1
  44. package/esm/components/atoms/GroupButton/index.js +0 -3
  45. package/esm/components/atoms/GroupButton/index.js.map +0 -1
  46. package/esm/components/atoms/Icon/index.js +0 -2
  47. package/esm/components/atoms/Icon/index.js.map +0 -1
  48. package/esm/components/atoms/Input/PressableInputContainer/index.js +0 -2
  49. package/esm/components/atoms/Input/PressableInputContainer/index.js.map +0 -1
  50. package/esm/components/atoms/Input/index.js +0 -10
  51. package/esm/components/atoms/Input/index.js.map +0 -1
  52. package/esm/components/atoms/Paper/index.js +0 -2
  53. package/esm/components/atoms/Paper/index.js.map +0 -1
  54. package/esm/components/atoms/PressableSurface/index.js +0 -2
  55. package/esm/components/atoms/PressableSurface/index.js.map +0 -1
  56. package/esm/components/atoms/ProgressBar/index.js +0 -2
  57. package/esm/components/atoms/ProgressBar/index.js.map +0 -1
  58. package/esm/components/atoms/RadioButton/index.js +0 -2
  59. package/esm/components/atoms/RadioButton/index.js.map +0 -1
  60. package/esm/components/atoms/Switch/index.js +0 -2
  61. package/esm/components/atoms/Switch/index.js.map +0 -1
  62. package/esm/components/atoms/Tag/index.js +0 -2
  63. package/esm/components/atoms/Tag/index.js.map +0 -1
  64. package/esm/components/atoms/Text/index.js +0 -2
  65. package/esm/components/atoms/Text/index.js.map +0 -1
  66. package/esm/components/molecules/Calendar/components/index.js +0 -3
  67. package/esm/components/molecules/Calendar/components/index.js.map +0 -1
  68. package/esm/components/molecules/Calendar/index.js +0 -2
  69. package/esm/components/molecules/Calendar/index.js.map +0 -1
  70. package/esm/components/molecules/DatePicker/index.js +0 -2
  71. package/esm/components/molecules/DatePicker/index.js.map +0 -1
  72. package/esm/components/molecules/DateTimePicker/index.js +0 -2
  73. package/esm/components/molecules/DateTimePicker/index.js.map +0 -1
  74. package/esm/components/molecules/DateTimeSelector/index.js +0 -2
  75. package/esm/components/molecules/DateTimeSelector/index.js.map +0 -1
  76. package/esm/components/molecules/Grid/index.js +0 -2
  77. package/esm/components/molecules/Grid/index.js.map +0 -1
  78. package/esm/components/molecules/HintInputContainer/index.js +0 -2
  79. package/esm/components/molecules/HintInputContainer/index.js.map +0 -1
  80. package/esm/components/molecules/HintInputContainer/styled.js +0 -2
  81. package/esm/components/molecules/HintInputContainer/styled.js.map +0 -1
  82. package/esm/components/molecules/IconTextButton/IconTextButton.js +0 -2
  83. package/esm/components/molecules/IconTextButton/IconTextButton.js.map +0 -1
  84. package/esm/components/molecules/IconTextButton/index.js +0 -2
  85. package/esm/components/molecules/IconTextButton/index.js.map +0 -1
  86. package/esm/components/molecules/IconTextButton/styled.d.ts +0 -4
  87. package/esm/components/molecules/IconTextButton/styled.js +0 -15
  88. package/esm/components/molecules/IconTextButton/styled.js.map +0 -1
  89. package/esm/components/molecules/InputPassword/index.js +0 -2
  90. package/esm/components/molecules/InputPassword/index.js.map +0 -1
  91. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +0 -2
  92. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +0 -1
  93. package/esm/components/molecules/LabeledSwitch/index.js +0 -2
  94. package/esm/components/molecules/LabeledSwitch/index.js.map +0 -1
  95. package/esm/components/molecules/Snackbar/index.js +0 -2
  96. package/esm/components/molecules/Snackbar/index.js.map +0 -1
  97. package/esm/components/molecules/TextArea/index.js +0 -3
  98. package/esm/components/molecules/TextArea/index.js.map +0 -1
  99. package/esm/hooks/index.js +0 -3
  100. package/esm/hooks/index.js.map +0 -1
  101. package/esm/types/defaults.js +0 -2
  102. package/esm/types/defaults.js.map +0 -1
  103. package/esm/utils/index.js +0 -8
  104. package/esm/utils/index.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,29 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.21.0](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-core@1.20.0...@tecsinapse/react-core@1.21.0) (2022-09-28)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * add babel target ([88f3dd8](https://github.com/tecsinapse/design-system/commit/88f3dd8a7865ef507855d76ed4f420c6bd1c1a39))
12
+ * icon suspense fallback ([90e4b5d](https://github.com/tecsinapse/design-system/commit/90e4b5dbc4772c78a9b96e9c17b0383e678ad9bf))
13
+ * project scripts ([cb2e0a1](https://github.com/tecsinapse/design-system/commit/cb2e0a1873cfc3f45e793b5443297fb6fffce1b5))
14
+ * stories import ([8d0cc3f](https://github.com/tecsinapse/design-system/commit/8d0cc3fdc51fb2331f73ab3cd6c1ec3cfa37941c))
15
+ * use run-p to parallelize scripts ([31ee9eb](https://github.com/tecsinapse/design-system/commit/31ee9eb0441f3b2f663e337c7f86549284108982))
16
+
17
+
18
+ ### Features
19
+
20
+ * finish compiler config ([af9f2ae](https://github.com/tecsinapse/design-system/commit/af9f2ae2dd2b08e9842778d0159ecd3d44bef89a))
21
+ * finish rollup config for core and web ([0ce9636](https://github.com/tecsinapse/design-system/commit/0ce9636d0b44bd2a80cf5614b8ed93f126dba8d2))
22
+ * try rollup + esbuild ([a591643](https://github.com/tecsinapse/design-system/commit/a5916430c75e4d1707ae47286d675daddfc05a75))
23
+ * try rollup + esbuild ([c6a7474](https://github.com/tecsinapse/design-system/commit/c6a747426c28a7d06212877ef4eb37fe4723b430))
24
+
25
+
26
+
27
+
28
+
6
29
  # [1.20.0](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-core@1.19.0...@tecsinapse/react-core@1.20.0) (2022-09-05)
7
30
 
8
31
 
@@ -1,4 +1,4 @@
1
- export declare const elevatedStyles: ({ theme }: any) => {
1
+ export declare const elevatedStyles: ({ theme }: StyleProps) => {
2
2
  shadowColor: any;
3
3
  shadowOffset: {
4
4
  width: number;
@@ -1,4 +1,4 @@
1
1
  import { ColorGradationType, ColorType } from '@tecsinapse/react-core';
2
2
  export declare const registerCustomIconType: (id: string, customIcon: any) => void;
3
- export declare const getIconComponent: (type: any, size: any) => any;
4
- export declare const getIconColor: (colorVariant: ColorType | undefined, colorGradation: ColorGradationType | undefined, fontColor: any, theme: any) => string;
3
+ export declare const getIconComponent: (type: IconType, size: IconSizeType) => any;
4
+ export declare const getIconColor: (colorVariant: ColorType | undefined, colorGradation: ColorGradationType | undefined, fontColor: FontColorType, theme: ThemeProp) => string;
@@ -35,86 +35,84 @@ const getStyledIcon = (Component, size) => styled__default["default"](Component)
35
35
  const getIconComponent = (type, size) => {
36
36
  switch (type) {
37
37
  case "zocial":
38
- return getStyledIcon(
39
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Zocial')); })),
40
- size
38
+ const Zocial = React.lazy(
39
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Zocial')); })
41
40
  );
41
+ return getStyledIcon(Zocial, size);
42
42
  case "octicon":
43
- return getStyledIcon(
44
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Octicons')); })),
45
- size
43
+ const Octicons = React.lazy(
44
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Octicons')); })
46
45
  );
46
+ return getStyledIcon(Octicons, size);
47
47
  case "material":
48
- return getStyledIcon(
49
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/MaterialIcons')); })),
50
- size
48
+ const Material = React.lazy(
49
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/MaterialIcons')); })
51
50
  );
51
+ return getStyledIcon(Material, size);
52
52
  case "material-community":
53
- return getStyledIcon(
54
- React.lazy(
55
- () => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/MaterialCommunityIcons')); })
56
- ),
57
- size
53
+ const MaterialCommunity = React.lazy(
54
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/MaterialCommunityIcons')); })
58
55
  );
56
+ return getStyledIcon(MaterialCommunity, size);
59
57
  case "ionicon":
60
- return getStyledIcon(
61
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Ionicons')); })),
62
- size
58
+ const Ionicons = React.lazy(
59
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Ionicons')); })
63
60
  );
61
+ return getStyledIcon(Ionicons, size);
64
62
  case "foundation":
65
- return getStyledIcon(
66
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Foundation')); })),
67
- size
63
+ const Foundation = React.lazy(
64
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Foundation')); })
68
65
  );
66
+ return getStyledIcon(Foundation, size);
69
67
  case "evilicon":
70
- return getStyledIcon(
71
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/EvilIcons')); })),
72
- size
68
+ const EvilIcons = React.lazy(
69
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/EvilIcons')); })
73
70
  );
71
+ return getStyledIcon(EvilIcons, size);
74
72
  case "entypo":
75
- return getStyledIcon(
76
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Entypo')); })),
77
- size
73
+ const Entypo = React.lazy(
74
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Entypo')); })
78
75
  );
76
+ return getStyledIcon(Entypo, size);
79
77
  case "font-awesome":
80
- return getStyledIcon(
81
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/FontAwesome')); })),
82
- size
78
+ const FontAwesome = React.lazy(
79
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/FontAwesome')); })
83
80
  );
81
+ return getStyledIcon(FontAwesome, size);
84
82
  case "font-awesome-5":
85
- return getStyledIcon(
86
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/FontAwesome5')); })),
87
- size
83
+ const FontAwesome5 = React.lazy(
84
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/FontAwesome5')); })
88
85
  );
86
+ return getStyledIcon(FontAwesome5, size);
89
87
  case "simple-line-icon":
90
- return getStyledIcon(
91
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/SimpleLineIcons')); })),
92
- size
88
+ const SimpleLineIcons = React.lazy(
89
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/SimpleLineIcons')); })
93
90
  );
91
+ return getStyledIcon(SimpleLineIcons, size);
94
92
  case "feather":
95
- return getStyledIcon(
96
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Feather')); })),
97
- size
93
+ const Feather = React.lazy(
94
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Feather')); })
98
95
  );
96
+ return getStyledIcon(Feather, size);
99
97
  case "antdesign":
100
98
  case "ant-design":
101
- return getStyledIcon(
102
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/AntDesign')); })),
103
- size
99
+ const AntDesign = React.lazy(
100
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/AntDesign')); })
104
101
  );
102
+ return getStyledIcon(AntDesign, size);
105
103
  case "fontisto":
106
- return getStyledIcon(
107
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Fontisto')); })),
108
- size
104
+ const Fontisto = React.lazy(
105
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/Fontisto')); })
109
106
  );
107
+ return getStyledIcon(Fontisto, size);
110
108
  default:
111
109
  if (Object.prototype.hasOwnProperty.call(customIcons, type)) {
112
110
  return getStyledIcon(customIcons[type], size);
113
111
  }
114
- return getStyledIcon(
115
- React.lazy(() => Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/MaterialIcons')); })),
116
- size
112
+ const MaterialIcons = React.lazy(
113
+ async () => await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-native-vector-icons/dist/MaterialIcons')); })
117
114
  );
115
+ return getStyledIcon(MaterialIcons, size);
118
116
  }
119
117
  };
120
118
  const getIconColor = (colorVariant, colorGradation, fontColor, theme) => {
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":["../../../../src/components/atoms/Icon/helpers.ts"],"sourcesContent":["import { lazy } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\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, size) => styled(Component)`\n font-size: ${({ theme }) => theme.iconSize[size]};\n text-align: center;\n`;\n\nexport const getIconComponent = (type: IconType, size: IconSizeType): any => {\n switch (type) {\n case 'zocial':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Zocial')),\n size\n );\n case 'octicon':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Octicons')),\n size\n );\n case 'material':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/MaterialIcons')),\n size\n );\n case 'material-community':\n return getStyledIcon(\n lazy(\n () => import('react-native-vector-icons/dist/MaterialCommunityIcons')\n ),\n size\n );\n case 'ionicon':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Ionicons')),\n size\n );\n case 'foundation':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Foundation')),\n size\n );\n case 'evilicon':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/EvilIcons')),\n size\n );\n case 'entypo':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Entypo')),\n size\n );\n case 'font-awesome':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/FontAwesome')),\n size\n );\n case 'font-awesome-5':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/FontAwesome5')),\n size\n );\n case 'simple-line-icon':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/SimpleLineIcons')),\n size\n );\n case 'feather':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Feather')),\n size\n );\n case 'antdesign':\n case 'ant-design':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/AntDesign')),\n size\n );\n case 'fontisto':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Fontisto')),\n size\n );\n default:\n if (Object.prototype.hasOwnProperty.call(customIcons, type)) {\n return getStyledIcon(customIcons[type], size);\n }\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/MaterialIcons')),\n size\n );\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,cAAmB,EAAC,CAAA;AAM1B,MAAM,aAAgB,GAAA,CAAC,SAAW,EAAA,IAAA,KAASA,2BAAO,SAAS,CAAA,CAAA;AAAA,aAAA,EAC5C,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,QAAS,CAAA,IAAA,CAAA,CAAA;AAAA;AAAA,CAAA,CAAA;AAIhC,MAAA,gBAAA,GAAmB,CAAC,IAAA,EAAgB,IAA4B,KAAA;AAC3E,EAAA,QAAQ,IAAM;AAAA,IACZ,KAAK,QAAA;AACH,MAAO,OAAA,aAAA;AAAA,QACLC,UAAA,CAAK,MAAM,mFAAO,uCAAwC,MAAA,CAAA;AAAA,QAC1D,IAAA;AAAA,OACF,CAAA;AAAA,IACF,KAAK,SAAA;AACH,MAAO,OAAA,aAAA;AAAA,QACLA,UAAA,CAAK,MAAM,mFAAO,yCAA0C,MAAA,CAAA;AAAA,QAC5D,IAAA;AAAA,OACF,CAAA;AAAA,IACF,KAAK,UAAA;AACH,MAAO,OAAA,aAAA;AAAA,QACLA,UAAA,CAAK,MAAM,mFAAO,8CAA+C,MAAA,CAAA;AAAA,QACjE,IAAA;AAAA,OACF,CAAA;AAAA,IACF,KAAK,oBAAA;AACH,MAAO,OAAA,aAAA;AAAA,QACLA,UAAA;AAAA,UACE,MAAM,mFAAO,uDAAA,MAAA;AAAA,SACf;AAAA,QACA,IAAA;AAAA,OACF,CAAA;AAAA,IACF,KAAK,SAAA;AAC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C7D,IAAA;AAAA,OACF,CAAA;AAAA,IACF,KAAK,UAAA;AACH,MAAO,OAAA,aAAA;AAAA,QACLA,UAAA,CAAK,MAAM,mFAAO,yCAA0C,MAAA,CAAA;AAAA,QAC5D,IAAA;AAAA,OACF,CAAA;AAAA,IACF;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,MAAO,OAAA,aAAA;AAAA,QACLA,UAAA,CAAK,MAAM,mFAAO,8CAA+C,MAAA,CAAA;AAAA,QACjE,IAAA;AAAA,OACF,CAAA;AAAA,GACJ;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;;;;;"}
1
+ {"version":3,"file":"helpers.js","sources":["../../../../src/components/atoms/Icon/helpers.ts"],"sourcesContent":["import { lazy } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\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, size) => styled(Component)`\n font-size: ${({ theme }) => 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 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,cAAmB,EAAC,CAAA;AAM1B,MAAM,aAAgB,GAAA,CAAC,SAAW,EAAA,IAAA,KAASA,2BAAO,SAAS,CAAA,CAAA;AAAA,aAAA,EAC5C,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,QAAS,CAAA,IAAA,CAAA,CAAA;AAAA;AAAA,CAAA,CAAA;AAIhC,MAAA,gBAAA,GAAmB,CAAC,IAAA,EAAgB,IAA4B,KAAA;AAC3E,EAAA,QAAQ,IAAM;AAAA,IACZ,KAAK,QAAA;AACH,MAAA,MAAM,MAAS,GAAAC,UAAA;AAAA,QACb,YAAY,MAAM,mFAAO,uCAAA,MAAA;AAAA,OAC3B,CAAA;AACA,MAAO,OAAA,aAAA,CAAc,QAAQ,IAAI,CAAA,CAAA;AAAA,IACnC,KAAK,SAAA;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,KAAK,UAAA;AACH,MAAA,MAAM,QAAW,GAAAA,UAAA;AAAA,QACf,YAAY,MAAM,mFAAO,8CAAA,MAAA;AAAA,OAC3B,CAAA;AACA,MAAO,OAAA,aAAA,CAAc,UAAU,IAAI,CAAA,CAAA;AAAA,IACrC,KAAK,oBAAA;AACH,MAAA,MAAM,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,CAAA,cAAA,CAAA,CAAA;AAAA,GACnC;AACA,EAAO,OAAA,KAAA,CAAM,KAAK,KAAM,CAAA,SAAA,CAAA,CAAA;AAC1B;;;;;"}
@@ -1,4 +1,4 @@
1
- export declare const useInputFocus: (onFocus?: (() => void) | undefined, onBlur?: (() => void) | undefined, focusEnabled?: boolean) => {
1
+ export declare const useInputFocus: (onFocus?: () => void, onBlur?: () => void, focusEnabled?: boolean) => {
2
2
  focused: boolean;
3
3
  handleBlur: () => void;
4
4
  handleFocus: () => void;
@@ -1,8 +1,8 @@
1
1
  import currency from 'currency.js';
2
2
  import { MaskValue } from './useStringMask';
3
3
  export declare type CurrencyOptions = currency.Options;
4
- export declare const getInternalNumberAndMask: (value: string | number, options?: currency.Options | undefined) => {
4
+ export declare const getInternalNumberAndMask: (value: string | number, options?: CurrencyOptions) => {
5
5
  internalNumber: number;
6
6
  mergedOptions: CurrencyOptions;
7
7
  };
8
- export declare const useNumberMask: (options?: currency.Options | undefined, defaultValue?: string | number | undefined) => [MaskValue, (value: string | number) => void];
8
+ export declare const useNumberMask: (options?: CurrencyOptions, defaultValue?: string | number) => [MaskValue, (value: string | number) => void];
@@ -5,4 +5,4 @@ export interface MaskValue {
5
5
  export declare type MaskType = string | RegExp | Array<RegExp>;
6
6
  export declare const mergeMask: (value: string | undefined, mask: MaskType[]) => MaskValue;
7
7
  export declare const getMask: (mask: MaskType[] | ((value: string) => MaskType[]), newValue: string) => MaskType[];
8
- export declare const useStringMask: (mask: MaskType[] | ((value: string) => MaskType[]), defaultValue?: string | number | undefined) => [MaskValue, (text: string | number) => void];
8
+ export declare const useStringMask: (mask: MaskType[] | ((value: string) => MaskType[]), defaultValue?: string | number) => [MaskValue, (text: string | number) => void];
@@ -1,3 +1,3 @@
1
1
  import { StyleProps } from '@tecsinapse/react-core';
2
- export declare const baseStyles: ({ theme }: any) => any;
2
+ export declare const baseStyles: ({ theme }: StyleProps) => any;
3
3
  export declare const elevatedStyles: ({ theme, elevated, }: any) => any;
@@ -1,3 +1,3 @@
1
1
  import { GridSpacing } from '@tecsinapse/react-core';
2
- export declare const getGridItemPadding: (pos: any, _spacing: GridSpacing | undefined, themeSpacing: any) => number | undefined;
2
+ export declare const getGridItemPadding: (pos: PaddingPosition, _spacing: GridSpacing | undefined, themeSpacing: Spacing) => number | undefined;
3
3
  export declare const getGridItemColumSpan: (columns: number, span: number) => number;
@@ -1,3 +1,3 @@
1
1
  export declare const RFPercentage: (percent: number) => number;
2
2
  export declare const RFValue: (fontSize: number, standardScreenHeight?: number) => number;
3
- export declare const RFValueStr: (fontSize: string, standardScreenHeight?: number | undefined) => string;
3
+ export declare const RFValueStr: (fontSize: string, standardScreenHeight?: number) => string;
@@ -1,4 +1,4 @@
1
- export declare const elevatedStyles: ({ theme }: any) => {
1
+ export declare const elevatedStyles: ({ theme }: StyleProps) => {
2
2
  shadowColor: any;
3
3
  shadowOffset: {
4
4
  width: number;
@@ -1,4 +1,4 @@
1
1
  import { ColorGradationType, ColorType } from '@tecsinapse/react-core';
2
2
  export declare const registerCustomIconType: (id: string, customIcon: any) => void;
3
- export declare const getIconComponent: (type: any, size: any) => any;
4
- export declare const getIconColor: (colorVariant: ColorType | undefined, colorGradation: ColorGradationType | undefined, fontColor: any, theme: any) => string;
3
+ export declare const getIconComponent: (type: IconType, size: IconSizeType) => any;
4
+ export declare const getIconColor: (colorVariant: ColorType | undefined, colorGradation: ColorGradationType | undefined, fontColor: FontColorType, theme: ThemeProp) => string;
@@ -9,86 +9,84 @@ const getStyledIcon = (Component, size) => styled(Component)`
9
9
  const getIconComponent = (type, size) => {
10
10
  switch (type) {
11
11
  case "zocial":
12
- return getStyledIcon(
13
- lazy(() => import('react-native-vector-icons/dist/Zocial')),
14
- size
12
+ const Zocial = lazy(
13
+ async () => await import('react-native-vector-icons/dist/Zocial')
15
14
  );
15
+ return getStyledIcon(Zocial, size);
16
16
  case "octicon":
17
- return getStyledIcon(
18
- lazy(() => import('react-native-vector-icons/dist/Octicons')),
19
- size
17
+ const Octicons = lazy(
18
+ async () => await import('react-native-vector-icons/dist/Octicons')
20
19
  );
20
+ return getStyledIcon(Octicons, size);
21
21
  case "material":
22
- return getStyledIcon(
23
- lazy(() => import('react-native-vector-icons/dist/MaterialIcons')),
24
- size
22
+ const Material = lazy(
23
+ async () => await import('react-native-vector-icons/dist/MaterialIcons')
25
24
  );
25
+ return getStyledIcon(Material, size);
26
26
  case "material-community":
27
- return getStyledIcon(
28
- lazy(
29
- () => import('react-native-vector-icons/dist/MaterialCommunityIcons')
30
- ),
31
- size
27
+ const MaterialCommunity = lazy(
28
+ async () => await import('react-native-vector-icons/dist/MaterialCommunityIcons')
32
29
  );
30
+ return getStyledIcon(MaterialCommunity, size);
33
31
  case "ionicon":
34
- return getStyledIcon(
35
- lazy(() => import('react-native-vector-icons/dist/Ionicons')),
36
- size
32
+ const Ionicons = lazy(
33
+ async () => await import('react-native-vector-icons/dist/Ionicons')
37
34
  );
35
+ return getStyledIcon(Ionicons, size);
38
36
  case "foundation":
39
- return getStyledIcon(
40
- lazy(() => import('react-native-vector-icons/dist/Foundation')),
41
- size
37
+ const Foundation = lazy(
38
+ async () => await import('react-native-vector-icons/dist/Foundation')
42
39
  );
40
+ return getStyledIcon(Foundation, size);
43
41
  case "evilicon":
44
- return getStyledIcon(
45
- lazy(() => import('react-native-vector-icons/dist/EvilIcons')),
46
- size
42
+ const EvilIcons = lazy(
43
+ async () => await import('react-native-vector-icons/dist/EvilIcons')
47
44
  );
45
+ return getStyledIcon(EvilIcons, size);
48
46
  case "entypo":
49
- return getStyledIcon(
50
- lazy(() => import('react-native-vector-icons/dist/Entypo')),
51
- size
47
+ const Entypo = lazy(
48
+ async () => await import('react-native-vector-icons/dist/Entypo')
52
49
  );
50
+ return getStyledIcon(Entypo, size);
53
51
  case "font-awesome":
54
- return getStyledIcon(
55
- lazy(() => import('react-native-vector-icons/dist/FontAwesome')),
56
- size
52
+ const FontAwesome = lazy(
53
+ async () => await import('react-native-vector-icons/dist/FontAwesome')
57
54
  );
55
+ return getStyledIcon(FontAwesome, size);
58
56
  case "font-awesome-5":
59
- return getStyledIcon(
60
- lazy(() => import('react-native-vector-icons/dist/FontAwesome5')),
61
- size
57
+ const FontAwesome5 = lazy(
58
+ async () => await import('react-native-vector-icons/dist/FontAwesome5')
62
59
  );
60
+ return getStyledIcon(FontAwesome5, size);
63
61
  case "simple-line-icon":
64
- return getStyledIcon(
65
- lazy(() => import('react-native-vector-icons/dist/SimpleLineIcons')),
66
- size
62
+ const SimpleLineIcons = lazy(
63
+ async () => await import('react-native-vector-icons/dist/SimpleLineIcons')
67
64
  );
65
+ return getStyledIcon(SimpleLineIcons, size);
68
66
  case "feather":
69
- return getStyledIcon(
70
- lazy(() => import('react-native-vector-icons/dist/Feather')),
71
- size
67
+ const Feather = lazy(
68
+ async () => await import('react-native-vector-icons/dist/Feather')
72
69
  );
70
+ return getStyledIcon(Feather, size);
73
71
  case "antdesign":
74
72
  case "ant-design":
75
- return getStyledIcon(
76
- lazy(() => import('react-native-vector-icons/dist/AntDesign')),
77
- size
73
+ const AntDesign = lazy(
74
+ async () => await import('react-native-vector-icons/dist/AntDesign')
78
75
  );
76
+ return getStyledIcon(AntDesign, size);
79
77
  case "fontisto":
80
- return getStyledIcon(
81
- lazy(() => import('react-native-vector-icons/dist/Fontisto')),
82
- size
78
+ const Fontisto = lazy(
79
+ async () => await import('react-native-vector-icons/dist/Fontisto')
83
80
  );
81
+ return getStyledIcon(Fontisto, size);
84
82
  default:
85
83
  if (Object.prototype.hasOwnProperty.call(customIcons, type)) {
86
84
  return getStyledIcon(customIcons[type], size);
87
85
  }
88
- return getStyledIcon(
89
- lazy(() => import('react-native-vector-icons/dist/MaterialIcons')),
90
- size
86
+ const MaterialIcons = lazy(
87
+ async () => await import('react-native-vector-icons/dist/MaterialIcons')
91
88
  );
89
+ return getStyledIcon(MaterialIcons, size);
92
90
  }
93
91
  };
94
92
  const getIconColor = (colorVariant, colorGradation, fontColor, theme) => {
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":["../../../../src/components/atoms/Icon/helpers.ts"],"sourcesContent":["import { lazy } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\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, size) => styled(Component)`\n font-size: ${({ theme }) => theme.iconSize[size]};\n text-align: center;\n`;\n\nexport const getIconComponent = (type: IconType, size: IconSizeType): any => {\n switch (type) {\n case 'zocial':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Zocial')),\n size\n );\n case 'octicon':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Octicons')),\n size\n );\n case 'material':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/MaterialIcons')),\n size\n );\n case 'material-community':\n return getStyledIcon(\n lazy(\n () => import('react-native-vector-icons/dist/MaterialCommunityIcons')\n ),\n size\n );\n case 'ionicon':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Ionicons')),\n size\n );\n case 'foundation':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Foundation')),\n size\n );\n case 'evilicon':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/EvilIcons')),\n size\n );\n case 'entypo':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Entypo')),\n size\n );\n case 'font-awesome':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/FontAwesome')),\n size\n );\n case 'font-awesome-5':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/FontAwesome5')),\n size\n );\n case 'simple-line-icon':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/SimpleLineIcons')),\n size\n );\n case 'feather':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Feather')),\n size\n );\n case 'antdesign':\n case 'ant-design':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/AntDesign')),\n size\n );\n case 'fontisto':\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/Fontisto')),\n size\n );\n default:\n if (Object.prototype.hasOwnProperty.call(customIcons, type)) {\n return getStyledIcon(customIcons[type], size);\n }\n return getStyledIcon(\n lazy(() => import('react-native-vector-icons/dist/MaterialIcons')),\n size\n );\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":";;;AAYA,MAAM,cAAmB,EAAC,CAAA;AAM1B,MAAM,aAAgB,GAAA,CAAC,SAAW,EAAA,IAAA,KAAS,OAAO,SAAS,CAAA,CAAA;AAAA,aAAA,EAC5C,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,QAAS,CAAA,IAAA,CAAA,CAAA;AAAA;AAAA,CAAA,CAAA;AAIhC,MAAA,gBAAA,GAAmB,CAAC,IAAA,EAAgB,IAA4B,KAAA;AAC3E,EAAA,QAAQ,IAAM;AAAA,IACZ,KAAK,QAAA;AACH,MAAO,OAAA,aAAA;AAAA,QACL,IAAA,CAAK,MAAM,OAAO,uCAAwC,CAAA,CAAA;AAAA,QAC1D,IAAA;AAAA,OACF,CAAA;AAAA,IACF,KAAK,SAAA;AACH,MAAO,OAAA,aAAA;AAAA,QACL,IAAA,CAAK,MAAM,OAAO,yCAA0C,CAAA,CAAA;AAAA,QAC5D,IAAA;AAAA,OACF,CAAA;AAAA,IACF,KAAK,UAAA;AACH,MAAO,OAAA,aAAA;AAAA,QACL,IAAA,CAAK,MAAM,OAAO,8CAA+C,CAAA,CAAA;AAAA,QACjE,IAAA;AAAA,OACF,CAAA;AAAA,IACF,KAAK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IACF,KAAK,WAAA,CAAA;AAAA,IACL,KAAK,YAAA;AACH,MAAO,OAAA,aAAA;AAAA,QACL,IAAA,CAAK,MAAM,OAAO,0CAA2C,CAAA,CAAA;AAAA,QAC7D,IAAA;AAAA,OACF,CAAA;AAAA,IACF,KAAK,UAAA;AACH,MAAO,OAAA,aAAA;AAAA,QACL,IAAA,CAAK,MAAM,OAAO,yCAA0C,CAAA,CAAA;AAAA,QAC5D,IAAA;AAAA,OACF,CAAA;AAAA,IACF;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,MAAO,OAAA,aAAA;AAAA,QACL,IAAA,CAAK,MAAM,OAAO,8CAA+C,CAAA,CAAA;AAAA,QACjE,IAAA;AAAA,OACF,CAAA;AAAA,GACJ;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;;;;"}
1
+ {"version":3,"file":"helpers.js","sources":["../../../../src/components/atoms/Icon/helpers.ts"],"sourcesContent":["import { lazy } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\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, size) => styled(Component)`\n font-size: ${({ theme }) => 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 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":";;;AAYA,MAAM,cAAmB,EAAC,CAAA;AAM1B,MAAM,aAAgB,GAAA,CAAC,SAAW,EAAA,IAAA,KAAS,OAAO,SAAS,CAAA,CAAA;AAAA,aAAA,EAC5C,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,QAAS,CAAA,IAAA,CAAA,CAAA;AAAA;AAAA,CAAA,CAAA;AAIhC,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,KAAK,UAAA;AACH,MAAA,MAAM,QAAW,GAAA,IAAA;AAAA,QACf,YAAY,MAAM,OAAO,8CAAA,CAAA;AAAA,OAC3B,CAAA;AACA,MAAO,OAAA,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A;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;;;;"}
@@ -1,4 +1,4 @@
1
- export declare const useInputFocus: (onFocus?: (() => void) | undefined, onBlur?: (() => void) | undefined, focusEnabled?: boolean) => {
1
+ export declare const useInputFocus: (onFocus?: () => void, onBlur?: () => void, focusEnabled?: boolean) => {
2
2
  focused: boolean;
3
3
  handleBlur: () => void;
4
4
  handleFocus: () => void;
@@ -1,8 +1,8 @@
1
1
  import currency from 'currency.js';
2
2
  import { MaskValue } from './useStringMask';
3
3
  export declare type CurrencyOptions = currency.Options;
4
- export declare const getInternalNumberAndMask: (value: string | number, options?: currency.Options | undefined) => {
4
+ export declare const getInternalNumberAndMask: (value: string | number, options?: CurrencyOptions) => {
5
5
  internalNumber: number;
6
6
  mergedOptions: CurrencyOptions;
7
7
  };
8
- export declare const useNumberMask: (options?: currency.Options | undefined, defaultValue?: string | number | undefined) => [MaskValue, (value: string | number) => void];
8
+ export declare const useNumberMask: (options?: CurrencyOptions, defaultValue?: string | number) => [MaskValue, (value: string | number) => void];
@@ -5,4 +5,4 @@ export interface MaskValue {
5
5
  export declare type MaskType = string | RegExp | Array<RegExp>;
6
6
  export declare const mergeMask: (value: string | undefined, mask: MaskType[]) => MaskValue;
7
7
  export declare const getMask: (mask: MaskType[] | ((value: string) => MaskType[]), newValue: string) => MaskType[];
8
- export declare const useStringMask: (mask: MaskType[] | ((value: string) => MaskType[]), defaultValue?: string | number | undefined) => [MaskValue, (text: string | number) => void];
8
+ export declare const useStringMask: (mask: MaskType[] | ((value: string) => MaskType[]), defaultValue?: string | number) => [MaskValue, (text: string | number) => void];
@@ -1,3 +1,3 @@
1
1
  import { StyleProps } from '@tecsinapse/react-core';
2
- export declare const baseStyles: ({ theme }: any) => any;
2
+ export declare const baseStyles: ({ theme }: StyleProps) => any;
3
3
  export declare const elevatedStyles: ({ theme, elevated, }: any) => any;
@@ -1,3 +1,3 @@
1
1
  import { GridSpacing } from '@tecsinapse/react-core';
2
- export declare const getGridItemPadding: (pos: any, _spacing: GridSpacing | undefined, themeSpacing: any) => number | undefined;
2
+ export declare const getGridItemPadding: (pos: PaddingPosition, _spacing: GridSpacing | undefined, themeSpacing: Spacing) => number | undefined;
3
3
  export declare const getGridItemColumSpan: (columns: number, span: number) => number;
@@ -1,3 +1,3 @@
1
1
  export declare const RFPercentage: (percent: number) => number;
2
2
  export declare const RFValue: (fontSize: number, standardScreenHeight?: number) => number;
3
- export declare const RFValueStr: (fontSize: string, standardScreenHeight?: number | undefined) => string;
3
+ export declare const RFValueStr: (fontSize: string, standardScreenHeight?: number) => string;
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.0-beta.13+cb2e0a1",
4
+ "version": "1.21.1-beta.1+a77c737",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
7
7
  "module": "esm/index.js",
@@ -17,10 +17,10 @@
17
17
  "yalc:show": "yalc installations show $npm_package_name"
18
18
  },
19
19
  "dependencies": {
20
- "@emotion/native": "^11.10.0",
21
- "@emotion/react": "^11.10.0",
22
- "currency.js": "^2.0.4",
23
- "date-fns": "^2.29.1"
20
+ "@emotion/native": "~11.10.0",
21
+ "@emotion/react": "~11.10.0",
22
+ "currency.js": "~2.0.4",
23
+ "date-fns": "~2.29.1"
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",
@@ -36,5 +36,5 @@
36
36
  "react-native": "^0.64.0",
37
37
  "react-native-vector-icons": "^8.1.0 || ^9.0.0"
38
38
  },
39
- "gitHead": "cb2e0a1873cfc3f45e793b5443297fb6fffce1b5"
39
+ "gitHead": "a77c73780d3fe6fb6a1538f79f5f58078cd2fefa"
40
40
  }