@ledgerhq/lumen-ui-rnative 0.1.1 → 0.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-rnative",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "license": "Apache-2.0",
5
5
  "keywords": [
6
6
  "react-native",
@@ -27,7 +27,7 @@
27
27
  "./styles": "./src/styles/index.ts"
28
28
  },
29
29
  "dependencies": {
30
- "@ledgerhq/lumen-utils-shared": "0.0.20",
30
+ "@ledgerhq/lumen-utils-shared": "0.1.0",
31
31
  "i18next": "^23.7.0",
32
32
  "react-i18next": "^14.0.0"
33
33
  },
@@ -37,7 +37,7 @@
37
37
  "peerDependencies": {
38
38
  "@types/react": "^19.0.0",
39
39
  "@gorhom/bottom-sheet": "^5.0.0",
40
- "@ledgerhq/lumen-design-core": "0.0.55",
40
+ "@ledgerhq/lumen-design-core": "0.1.0",
41
41
  "react": "^19.0.0",
42
42
  "react-native": "~0.79.7",
43
43
  "react-native-reanimated": "^3.0.0",
@@ -11,7 +11,7 @@ export const FONT_WEIGHT_SUFFIX_MAP = {
11
11
  '900': 'Black',
12
12
  };
13
13
  export const resolveFontWeights = (typographies) => {
14
- if (RuntimeConstants.isAndroid || RuntimeConstants.isBrowser) {
14
+ if (RuntimeConstants.isIOS || RuntimeConstants.isBrowser) {
15
15
  return typographies;
16
16
  }
17
17
  return Object.fromEntries(Object.entries(typographies).map(([key, value]) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-rnative",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "license": "Apache-2.0",
5
5
  "keywords": [
6
6
  "react-native",
@@ -27,7 +27,7 @@
27
27
  "./styles": "./src/styles/index.ts"
28
28
  },
29
29
  "dependencies": {
30
- "@ledgerhq/lumen-utils-shared": "0.1.0",
30
+ "@ledgerhq/lumen-utils-shared": "0.1.1",
31
31
  "i18next": "^23.7.0",
32
32
  "react-i18next": "^14.0.0"
33
33
  },
@@ -37,7 +37,7 @@
37
37
  "peerDependencies": {
38
38
  "@types/react": "^19.0.0",
39
39
  "@gorhom/bottom-sheet": "^5.0.0",
40
- "@ledgerhq/lumen-design-core": "0.1.0",
40
+ "@ledgerhq/lumen-design-core": "0.1.1",
41
41
  "react": "^19.0.0",
42
42
  "react-native": "~0.79.7",
43
43
  "react-native-reanimated": "^3.0.0",
@@ -15,7 +15,7 @@ describe('createStylesheetTheme', () => {
15
15
  });
16
16
 
17
17
  it('should flatten heading/body typography tokens', () => {
18
- jest.spyOn(RuntimeConstants, 'isAndroid', 'get').mockReturnValue(true);
18
+ jest.spyOn(RuntimeConstants, 'isIOS', 'get').mockReturnValue(true);
19
19
  const theme = ledgerLiveThemes.dark;
20
20
 
21
21
  const result = createStylesheetTheme(theme);
@@ -9,8 +9,9 @@ describe('resolveTypographies', () => {
9
9
  jest.restoreAllMocks();
10
10
  });
11
11
 
12
- it('should not modify fontFamily on android', () => {
13
- jest.spyOn(RuntimeConstants, 'isAndroid', 'get').mockReturnValue(true);
12
+ it('should not modify fontFamily on iOS', () => {
13
+ jest.spyOn(RuntimeConstants, 'isIOS', 'get').mockReturnValue(true);
14
+ jest.spyOn(RuntimeConstants, 'isBrowser', 'get').mockReturnValue(false);
14
15
  const theme = ledgerLiveThemes.dark;
15
16
 
16
17
  const result = createStylesheetTheme(theme);
@@ -24,8 +25,9 @@ describe('resolveTypographies', () => {
24
25
  );
25
26
  });
26
27
 
27
- it('should append weight suffix to fontFamily on non-android', () => {
28
- jest.spyOn(RuntimeConstants, 'isAndroid', 'get').mockReturnValue(false);
28
+ it('should append weight suffix to fontFamily on Android', () => {
29
+ jest.spyOn(RuntimeConstants, 'isIOS', 'get').mockReturnValue(false);
30
+ jest.spyOn(RuntimeConstants, 'isBrowser', 'get').mockReturnValue(false);
29
31
  const theme = ledgerLiveThemes.dark;
30
32
 
31
33
  const result = createStylesheetTheme(theme);
@@ -44,8 +46,9 @@ describe('resolveTypographies', () => {
44
46
  });
45
47
  });
46
48
 
47
- it('should not modify other typography properties on non-android', () => {
48
- jest.spyOn(RuntimeConstants, 'isAndroid', 'get').mockReturnValue(false);
49
+ it('should not modify other typography properties on Android', () => {
50
+ jest.spyOn(RuntimeConstants, 'isIOS', 'get').mockReturnValue(false);
51
+ jest.spyOn(RuntimeConstants, 'isBrowser', 'get').mockReturnValue(false);
49
52
  const theme = ledgerLiveThemes.dark;
50
53
 
51
54
  const result = createStylesheetTheme(theme);
@@ -14,7 +14,7 @@ export const FONT_WEIGHT_SUFFIX_MAP = {
14
14
  };
15
15
 
16
16
  export const resolveFontWeights = (typographies: LumenTypographyTokens) => {
17
- if (RuntimeConstants.isAndroid || RuntimeConstants.isBrowser) {
17
+ if (RuntimeConstants.isIOS || RuntimeConstants.isBrowser) {
18
18
  return typographies;
19
19
  }
20
20