@tecsinapse/react-native-kit 1.12.14 → 1.12.15

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.15](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-native-kit@1.12.14...@tecsinapse/react-native-kit@1.12.15) (2022-01-24)
7
+
8
+ **Note:** Version bump only for package @tecsinapse/react-native-kit
9
+
10
+
11
+
12
+
13
+
6
14
  ## [1.12.14](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-native-kit@1.12.13...@tecsinapse/react-native-kit@1.12.14) (2022-01-19)
7
15
 
8
16
  **Note:** Version bump only for package @tecsinapse/react-native-kit
@@ -9,6 +9,8 @@ var _native = _interopRequireWildcard(require("@emotion/native"));
9
9
 
10
10
  var _reactCore = require("@tecsinapse/react-core");
11
11
 
12
+ var _reactNative = require("react-native");
13
+
12
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
15
 
14
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -21,7 +23,7 @@ const fontStyles = ({
21
23
  const fontFamily = (theme === null || theme === void 0 ? void 0 : theme.font.stack[fontStack]) || '';
22
24
  const fontStyle = theme === null || theme === void 0 ? void 0 : theme.font.files[fontWeight];
23
25
  return (0, _native.css)`
24
- font-weight: normal;
26
+ ${_reactNative.Platform.OS === 'android' ? 'font-weight: normal;' : undefined}
25
27
  font-family: ${fontStyle === null || fontStyle === void 0 ? void 0 : fontStyle.replace('{0}', fontFamily)};
26
28
  `;
27
29
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Text/styled.ts"],"names":["fontStyles","theme","fontStack","fontWeight","fontFamily","font","stack","fontStyle","files","replace","StyledNativeText","Text"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAaO,MAAMA,UAAU,GAAG,CAAC;AACzBC,EAAAA,KADyB;AAEzBC,EAAAA,SAAS,GAAG,SAFa;AAGzBC,EAAAA,UAAU,GAAG;AAHY,CAAD,KAIiB;AACzC,QAAMC,UAAU,GAAG,CAAAH,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAEI,IAAP,CAAYC,KAAZ,CAAkBJ,SAAlB,MAAgC,EAAnD;AACA,QAAMK,SAAS,GAAGN,KAAH,aAAGA,KAAH,uBAAGA,KAAK,CAAEI,IAAP,CAAYG,KAAZ,CAAkBL,UAAlB,CAAlB;AACA,SAAO,gBAAI;AACb;AACA,mBAAmBI,SAFP,aAEOA,SAFP,uBAEOA,SAAS,CAAEE,OAAX,CAAmB,KAAnB,EAA0BL,UAA1B,CAAsC;AACzD,GAHE;AAID,CAXM;;;AAaA,MAAMM,gBAAgB,GAAG,qBAAOC,eAAP,EAE9BX,UAF8B,CAAzB","sourcesContent":["import styled, { css } from '@emotion/native';\nimport {\n FontStackType,\n FontWeightType,\n StyleProps,\n Text,\n} from '@tecsinapse/react-core';\nimport { TextNativeProps } from './Text';\n\nexport interface Font {\n fontStack?: FontStackType;\n fontWeight?: FontWeightType;\n}\n\nexport const fontStyles = ({\n theme,\n fontStack = 'default',\n fontWeight = 'regular',\n}: Partial<Font & Partial<StyleProps>>) => {\n const fontFamily = theme?.font.stack[fontStack] || '';\n const fontStyle = theme?.font.files[fontWeight];\n return css`\n font-weight: normal;\n font-family: ${fontStyle?.replace('{0}', fontFamily)};\n `;\n};\n\nexport const StyledNativeText = styled(Text)<\n Font & Partial<TextNativeProps> & Partial<StyleProps>\n>(fontStyles);\n"],"file":"styled.js"}
1
+ {"version":3,"sources":["../../../../src/components/atoms/Text/styled.ts"],"names":["fontStyles","theme","fontStack","fontWeight","fontFamily","font","stack","fontStyle","files","Platform","OS","undefined","replace","StyledNativeText","Text"],"mappings":";;;;;;;AAAA;;AACA;;AAMA;;;;;;AAQO,MAAMA,UAAU,GAAG,CAAC;AACzBC,EAAAA,KADyB;AAEzBC,EAAAA,SAAS,GAAG,SAFa;AAGzBC,EAAAA,UAAU,GAAG;AAHY,CAAD,KAIiB;AACzC,QAAMC,UAAU,GAAG,CAAAH,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAEI,IAAP,CAAYC,KAAZ,CAAkBJ,SAAlB,MAAgC,EAAnD;AACA,QAAMK,SAAS,GAAGN,KAAH,aAAGA,KAAH,uBAAGA,KAAK,CAAEI,IAAP,CAAYG,KAAZ,CAAkBL,UAAlB,CAAlB;AACA,SAAO,gBAAI;AACb,MAAMM,sBAASC,EAAT,KAAgB,SAAhB,GAA4B,sBAA5B,GAAqDC,SAAU;AACrE,mBAAmBJ,SAFP,aAEOA,SAFP,uBAEOA,SAAS,CAAEK,OAAX,CAAmB,KAAnB,EAA0BR,UAA1B,CAAsC;AACzD,GAHE;AAID,CAXM;;;AAaA,MAAMS,gBAAgB,GAAG,qBAAOC,eAAP,EAE9Bd,UAF8B,CAAzB","sourcesContent":["import styled, { css } from '@emotion/native';\nimport {\n FontStackType,\n FontWeightType,\n StyleProps,\n Text,\n} from '@tecsinapse/react-core';\nimport { Platform } from 'react-native';\nimport { TextNativeProps } from './Text';\n\nexport interface Font {\n fontStack?: FontStackType;\n fontWeight?: FontWeightType;\n}\n\nexport const fontStyles = ({\n theme,\n fontStack = 'default',\n fontWeight = 'regular',\n}: Partial<Font & Partial<StyleProps>>) => {\n const fontFamily = theme?.font.stack[fontStack] || '';\n const fontStyle = theme?.font.files[fontWeight];\n return css`\n ${Platform.OS === 'android' ? 'font-weight: normal;' : undefined}\n font-family: ${fontStyle?.replace('{0}', fontFamily)};\n `;\n};\n\nexport const StyledNativeText = styled(Text)<\n Font & Partial<TextNativeProps> & Partial<StyleProps>\n>(fontStyles);\n"],"file":"styled.js"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tecsinapse/react-native-kit",
3
3
  "description": "TecSinapse React Native components",
4
- "version": "1.12.14",
4
+ "version": "1.12.15",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "MIT",
@@ -34,5 +34,5 @@
34
34
  "devDependencies": {
35
35
  "@types/uuid": "^8.3.3"
36
36
  },
37
- "gitHead": "5a75d80ba78335d9dba890b4b75c6bc76954c380"
37
+ "gitHead": "b786cb2b22f10dcb8939354cf4a1dba4a5a1ee3a"
38
38
  }
@@ -5,6 +5,7 @@ import {
5
5
  StyleProps,
6
6
  Text,
7
7
  } from '@tecsinapse/react-core';
8
+ import { Platform } from 'react-native';
8
9
  import { TextNativeProps } from './Text';
9
10
 
10
11
  export interface Font {
@@ -20,7 +21,7 @@ export const fontStyles = ({
20
21
  const fontFamily = theme?.font.stack[fontStack] || '';
21
22
  const fontStyle = theme?.font.files[fontWeight];
22
23
  return css`
23
- font-weight: normal;
24
+ ${Platform.OS === 'android' ? 'font-weight: normal;' : undefined}
24
25
  font-family: ${fontStyle?.replace('{0}', fontFamily)};
25
26
  `;
26
27
  };