@tecsinapse/react-core 1.12.9 → 1.12.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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.12.10](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-core@1.12.9...@tecsinapse/react-core@1.12.10) (2022-01-19)
7
+
8
+ **Note:** Version bump only for package @tecsinapse/react-core
9
+
10
+
11
+
12
+
13
+
6
14
  ## [1.12.9](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-core@1.12.8...@tecsinapse/react-core@1.12.9) (2022-01-18)
7
15
 
8
16
  **Note:** Version bump only for package @tecsinapse/react-core
@@ -11,7 +11,7 @@ var _extractNumbersFromString = require("./extractNumbersFromString");
11
11
 
12
12
  var _IPhoneXHelper = require("./IPhoneXHelper");
13
13
 
14
- const STANDARD_SCREEN_HEIGHT = 640;
14
+ const STANDARD_SCREEN_HEIGHT = 680;
15
15
 
16
16
  const RFPercentage = percent => {
17
17
  if (_reactNative.Platform.OS === 'web') return percent;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/ResponsiveFontSize.ts"],"names":["STANDARD_SCREEN_HEIGHT","RFPercentage","percent","Platform","OS","height","width","Dimensions","get","standardLength","offset","StatusBar","currentHeight","deviceHeight","heightPercent","Math","round","RFValue","fontSize","standardScreenHeight","RFValueStr","_fontSize"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA,MAAMA,sBAAsB,GAAG,GAA/B;;AASO,MAAMC,YAAY,GAAIC,OAAD,IAAqB;AAC7C,MAAIC,sBAASC,EAAT,KAAgB,KAApB,EAA2B,OAAOF,OAAP;;AAC3B,QAAM;AAAEG,IAAAA,MAAF;AAAUC,IAAAA;AAAV,MAAoBC,wBAAWC,GAAX,CAAe,QAAf,CAA1B;;A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AyBH,QAAzB,CAAlB;;AACA,SAAQ,GAAED,OAAO,CAACI,SAAD,EAAYF,oBAAZ,CAAkC,IAAnD;AACH,CAHM","sourcesContent":["import { Dimensions, Platform, StatusBar } from \"react-native\";\nimport { extractNumbersFromString } from \"./extractNumbersFromString\";\nimport { isIphoneX } from \"./IPhoneXHelper\";\n\nconst STANDARD_SCREEN_HEIGHT = 640\n\n/**\n * Use this function when you want to scale a percentage number\n * to a reasonable value that will fit better on most of devices.\n * \n * @param percent \n * @returns \n */\nexport const RFPercentage = (percent: number) => {\n if (Platform.OS === 'web') return percent\n const { height, width } = Dimensions.get(\"window\");\n const standardLength = width > height ? width : height;\n const offset = width > height ? 0 : Platform.OS === \"ios\" ? 78 : StatusBar.currentHeight || 0 // iPhone X style SafeAreaView size in portrait\n const deviceHeight = isIphoneX() || Platform.OS === \"android\" ? standardLength - offset : standardLength;\n const heightPercent = (percent * deviceHeight) / 100;\n return Math.round(heightPercent);\n}\n\n/**\n * Use this function when you want to scale a font size based on pixel unit \n * to a reasonable value that will fit better on most of devices.\n * \n * @param fontSize \n * @param standardScreenHeight \n * @returns \n */\nexport const RFValue = (fontSize: number, standardScreenHeight: number = STANDARD_SCREEN_HEIGHT) => {\n if (Platform.OS === 'web') return fontSize\n const { height, width } = Dimensions.get(\"window\");\n const standardLength = width > height ? width : height;\n const offset = width > height ? 0 : Platform.OS === \"ios\" ? 78 : StatusBar.currentHeight || 0 // iPhone X style SafeAreaView size in portrait\n const deviceHeight = isIphoneX() || Platform.OS === \"android\" ? standardLength - offset : standardLength;\n const heightPercent = (fontSize * deviceHeight) / standardScreenHeight;\n return Math.round(heightPercent);\n}\n\n/**\n * Same of RFValue, however you can provide string values. E.g: '10px', '-5px'.\n * \n * @param fontSize \n * @param standardScreenHeight \n * @returns \n */\nexport const RFValueStr = (fontSize: string, standardScreenHeight?: number) => {\n const _fontSize = extractNumbersFromString(fontSize)\n return `${RFValue(_fontSize, standardScreenHeight)}px`\n}"],"file":"ResponsiveFontSize.js"}
1
+ {"version":3,"sources":["../../src/utils/ResponsiveFontSize.ts"],"names":["STANDARD_SCREEN_HEIGHT","RFPercentage","percent","Platform","OS","height","width","Dimensions","get","standardLength","offset","StatusBar","currentHeight","deviceHeight","heightPercent","Math","round","RFValue","fontSize","standardScreenHeight","RFValueStr","_fontSize"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA,MAAMA,sBAAsB,GAAG,GAA/B;;AASO,MAAMC,YAAY,GAAIC,OAAD,IAAqB;AAC7C,MAAIC,sBAASC,EAAT,KAAgB,KAApB,EAA2B,OAAOF,OAAP;;AAC3B,QAAM;AAAEG,IAAAA,MAAF;AAAUC,IAAAA;AAAV,MAAoBC,wBAAWC,GAAX,CAAe,QAAf,CAA1B;;AACA,QAAMC,cAAc,GAAGH,KAAK,GAAGD,MAAR,GAAiBC,KAAjB,GAAyBD,MAAhD;AACA,QAAMK,MAAM,GAAGJ,KAAK,GAAGD,MAAR,GAAiB,CAAjB,GAAqBF,sBAASC,EAAT,KAAgB,KAAhB,GAAwB,EAAxB,GAA6BO,uBAAUC,aAAV,IAA2B,CAA5F;AACA,QAAMC,YAAY,GAAG,mCAAeV,sBAASC,EAAT,KAAgB,SAA/B,GAA2CK,cAAc,GAAGC,MAA5D,GAAqED,cAA1F;AACA,QAAMK,aAAa,GAAIZ,OAAO,GAAGW,YAAX,GAA2B,GAAjD;AACA,SAAOE,IAAI,CAACC,KAAL,CAAWF,aAAX,CAAP;AACH,CARM;;;;AAkBA,MAAMG,OAAO,GAAG,CAACC,QAAD,EAAmBC,oBAA4B,GAAGnB,sBAAlD,KAA6E;AAChG,MAAIG,sBAASC,EAAT,KAAgB,KAApB,EAA2B,OAAOc,QAAP;;AAC3B,QAAM;AAAEb,IAAAA,MAAF;AAAUC,IAAAA;AAAV,MAAoBC,wBAAWC,GAAX,CAAe,QAAf,CAA1B;;AACA,QAAMC,cAAc,GAAGH,KAAK,GAAGD,MAAR,GAAiBC,KAAjB,GAAyBD,MAAhD;AACA,QAAMK,MAAM,GAAGJ,KAAK,GAAGD,MAAR,GAAiB,CAAjB,GAAqBF,sBAASC,EAAT,KAAgB,KAAhB,GAAwB,EAAxB,GAA6BO,uBAAUC,aAAV,IAA2B,CAA5F;AACA,QAAMC,YAAY,GAAG,mCAAeV,sBAASC,EAAT,KAAgB,SAA/B,GAA2CK,cAAc,GAAGC,MAA5D,GAAqED,cAA1F;AACA,QAAMK,aAAa,GAAII,QAAQ,GAAGL,YAAZ,GAA4BM,oBAAlD;AACA,SAAOJ,IAAI,CAACC,KAAL,CAAWF,aAAX,CAAP;AACH,CARM;;;;AAiBA,MAAMM,UAAU,GAAG,CAACF,QAAD,EAAmBC,oBAAnB,KAAqD;AAC3E,QAAME,SAAS,GAAG,wDAAyBH,QAAzB,CAAlB;;AACA,SAAQ,GAAED,OAAO,CAACI,SAAD,EAAYF,oBAAZ,CAAkC,IAAnD;AACH,CAHM","sourcesContent":["import { Dimensions, Platform, StatusBar } from \"react-native\";\nimport { extractNumbersFromString } from \"./extractNumbersFromString\";\nimport { isIphoneX } from \"./IPhoneXHelper\";\n\nconst STANDARD_SCREEN_HEIGHT = 680\n\n/**\n * Use this function when you want to scale a percentage number\n * to a reasonable value that will fit better on most of devices.\n * \n * @param percent \n * @returns \n */\nexport const RFPercentage = (percent: number) => {\n if (Platform.OS === 'web') return percent\n const { height, width } = Dimensions.get(\"window\");\n const standardLength = width > height ? width : height;\n const offset = width > height ? 0 : Platform.OS === \"ios\" ? 78 : StatusBar.currentHeight || 0 // iPhone X style SafeAreaView size in portrait\n const deviceHeight = isIphoneX() || Platform.OS === \"android\" ? standardLength - offset : standardLength;\n const heightPercent = (percent * deviceHeight) / 100;\n return Math.round(heightPercent);\n}\n\n/**\n * Use this function when you want to scale a font size based on pixel unit \n * to a reasonable value that will fit better on most of devices.\n * \n * @param fontSize \n * @param standardScreenHeight \n * @returns \n */\nexport const RFValue = (fontSize: number, standardScreenHeight: number = STANDARD_SCREEN_HEIGHT) => {\n if (Platform.OS === 'web') return fontSize\n const { height, width } = Dimensions.get(\"window\");\n const standardLength = width > height ? width : height;\n const offset = width > height ? 0 : Platform.OS === \"ios\" ? 78 : StatusBar.currentHeight || 0 // iPhone X style SafeAreaView size in portrait\n const deviceHeight = isIphoneX() || Platform.OS === \"android\" ? standardLength - offset : standardLength;\n const heightPercent = (fontSize * deviceHeight) / standardScreenHeight;\n return Math.round(heightPercent);\n}\n\n/**\n * Same as RFValue, however you can provide string values. E.g: '10px', '-5px'.\n * \n * @param fontSize \n * @param standardScreenHeight \n * @returns \n */\nexport const RFValueStr = (fontSize: string, standardScreenHeight?: number) => {\n const _fontSize = extractNumbersFromString(fontSize)\n return `${RFValue(_fontSize, standardScreenHeight)}px`\n}"],"file":"ResponsiveFontSize.js"}
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.12.9",
4
+ "version": "1.12.10",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -31,5 +31,5 @@
31
31
  "react-native": ">=0.64.0",
32
32
  "react-native-vector-icons": ">=8.1.0"
33
33
  },
34
- "gitHead": "7b090c696311b6aa4d412b8839fba00ccf5f7fd6"
34
+ "gitHead": "5a75d80ba78335d9dba890b4b75c6bc76954c380"
35
35
  }
@@ -2,7 +2,7 @@ import { Dimensions, Platform, StatusBar } from "react-native";
2
2
  import { extractNumbersFromString } from "./extractNumbersFromString";
3
3
  import { isIphoneX } from "./IPhoneXHelper";
4
4
 
5
- const STANDARD_SCREEN_HEIGHT = 640
5
+ const STANDARD_SCREEN_HEIGHT = 680
6
6
 
7
7
  /**
8
8
  * Use this function when you want to scale a percentage number
@@ -40,7 +40,7 @@ export const RFValue = (fontSize: number, standardScreenHeight: number = STANDAR
40
40
  }
41
41
 
42
42
  /**
43
- * Same of RFValue, however you can provide string values. E.g: '10px', '-5px'.
43
+ * Same as RFValue, however you can provide string values. E.g: '10px', '-5px'.
44
44
  *
45
45
  * @param fontSize
46
46
  * @param standardScreenHeight