@brightlayer-ui/react-native-themes 7.0.0 → 7.0.1-alpha.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## v7.0.1 (Unreleased)
4
+
5
+ ### Fixed
6
+
7
+ - Text variants not working correctly on Android [89](https://github.com/etn-ccis/blui-react-native-themes/issues/89).
8
+
3
9
  ## v7.0.0 (January 12, 2024)
4
10
 
5
11
  ### Changed
package/README.md CHANGED
@@ -55,7 +55,6 @@ import * as BLUIThemes from '@brightlayer-ui/react-native-themes';
55
55
  </ThemeProvider>
56
56
  ```
57
57
 
58
-
59
58
  ### React Native Paper Components Style Override
60
59
 
61
60
  This Document contains a set of style overrides in components around various [React Native Paper](https://callstack.github.io/react-native-paper/index.html) components.
@@ -77,6 +76,20 @@ const theme = useExtendedTheme();
77
76
  </Button>
78
77
  ```
79
78
 
79
+ ## Changing fontWeight of a Text Element
80
+
81
+ When you need to change the `fontWeight` of a `Text` element in your application, it's important to note that it should be done through the `fontFamily` property rather than the `fontWeight` property.
82
+
83
+ The `fontFamily` property allows you to specify the font and its weight. By using the appropriate font family that supports the desired weight, you can achieve the desired fontWeight effect.
84
+
85
+ For example, if you want to set the fontWeight to "bold", you can use a font family that includes a bold variant, such as:
86
+
87
+ ```tsx
88
+ <Text variant={'headlineLarge'} style={{ fontFamily: 'OpenSans-Bold' }}>
89
+ headlineLarge
90
+ </Text>
91
+ ```
92
+
80
93
  ### Upgrading from version 6 -> 7
81
94
 
82
95
  In the version 7, the library has been updated to use [React Native Paper](https://callstack.github.io/react-native-paper/) v5, which is adopting [Material Design 3](https://m3.material.io/). The themes have now been updated to use Material Design 3 Themes.
@@ -85,4 +98,4 @@ In the version 7, the library has been updated to use [React Native Paper](https
85
98
  ## Demo
86
99
 
87
100
  [Check it out](https://github.com/etn-ccis/blui-react-native-showcase-demo/tree/master)
88
- -->
101
+ -->
package/dist/shared.d.ts CHANGED
@@ -3,97 +3,82 @@ import { $DeepPartial } from '@callstack/react-theme-provider';
3
3
  export declare const fontConfig: {
4
4
  displaySmall: {
5
5
  fontFamily: string;
6
- fontWeight: "400";
7
6
  fontSize: number;
8
7
  lineHeight: number;
9
8
  };
10
9
  displayMedium: {
11
10
  fontFamily: string;
12
- fontWeight: "400";
13
11
  fontSize: number;
14
12
  lineHeight: number;
15
13
  };
16
14
  displayLarge: {
17
15
  fontFamily: string;
18
- fontWeight: "400";
19
16
  fontSize: number;
20
17
  lineHeight: number;
21
18
  letterSpacing: number;
22
19
  };
23
20
  headlineSmall: {
24
21
  fontFamily: string;
25
- fontWeight: "500";
26
22
  fontSize: number;
27
23
  lineHeight: number;
28
24
  };
29
25
  headlineMedium: {
30
26
  fontFamily: string;
31
- fontWeight: "500";
32
27
  fontSize: number;
33
28
  lineHeight: number;
34
29
  };
35
30
  headlineLarge: {
36
31
  fontFamily: string;
37
- fontWeight: "500";
38
32
  fontSize: number;
39
33
  lineHeight: number;
40
34
  };
41
35
  titleSmall: {
42
36
  fontFamily: string;
43
- fontWeight: "600";
44
37
  fontSize: number;
45
38
  lineHeight: number;
46
39
  letterSpacing: number;
47
40
  };
48
41
  titleMedium: {
49
42
  fontFamily: string;
50
- fontWeight: "600";
51
43
  fontSize: number;
52
44
  lineHeight: number;
53
45
  letterSpacing: number;
54
46
  };
55
47
  titleLarge: {
56
48
  fontFamily: string;
57
- fontWeight: "400";
58
49
  fontSize: number;
59
50
  lineHeight: number;
60
51
  };
61
52
  labelSmall: {
62
53
  fontFamily: string;
63
- fontWeight: "600";
64
54
  fontSize: number;
65
55
  lineHeight: number;
66
56
  letterSpacing: number;
67
57
  };
68
58
  labelMedium: {
69
59
  fontFamily: string;
70
- fontWeight: "600";
71
60
  fontSize: number;
72
61
  lineHeight: number;
73
62
  letterSpacing: number;
74
63
  };
75
64
  labelLarge: {
76
65
  fontFamily: string;
77
- fontWeight: "600";
78
66
  fontSize: number;
79
67
  lineHeight: number;
80
68
  letterSpacing: number;
81
69
  };
82
70
  bodySmall: {
83
71
  fontFamily: string;
84
- fontWeight: "400";
85
72
  fontSize: number;
86
73
  lineHeight: number;
87
74
  };
88
75
  bodyMedium: {
89
76
  fontFamily: string;
90
- fontWeight: "400";
91
77
  fontSize: number;
92
78
  lineHeight: number;
93
79
  };
94
80
  bodyLarge: {
95
81
  fontFamily: string;
96
- fontWeight: "400";
97
82
  fontSize: number;
98
83
  lineHeight: number;
99
84
  letterSpacing: number;
package/dist/shared.js CHANGED
@@ -5,97 +5,82 @@ var react_native_paper_1 = require("react-native-paper");
5
5
  exports.fontConfig = {
6
6
  displaySmall: {
7
7
  fontFamily: 'OpenSans-Regular',
8
- fontWeight: '400',
9
8
  fontSize: 36,
10
- lineHeight: 45,
9
+ lineHeight: 48,
11
10
  },
12
11
  displayMedium: {
13
12
  fontFamily: 'OpenSans-Regular',
14
- fontWeight: '400',
15
13
  fontSize: 45,
16
14
  lineHeight: 56,
17
15
  },
18
16
  displayLarge: {
19
17
  fontFamily: 'OpenSans-Regular',
20
- fontWeight: '400',
21
- fontSize: 54,
22
- lineHeight: 68,
23
- letterSpacing: 1,
18
+ fontSize: 57,
19
+ lineHeight: 72,
20
+ letterSpacing: -0.25,
24
21
  },
25
22
  headlineSmall: {
26
23
  fontFamily: 'OpenSans-Regular',
27
- fontWeight: '500',
28
24
  fontSize: 24,
29
25
  lineHeight: 32,
30
26
  },
31
27
  headlineMedium: {
32
28
  fontFamily: 'OpenSans-Regular',
33
- fontWeight: '500',
34
- fontSize: 27,
35
- lineHeight: 40,
29
+ fontSize: 28,
30
+ lineHeight: 36,
36
31
  },
37
32
  headlineLarge: {
38
33
  fontFamily: 'OpenSans-Regular',
39
- fontWeight: '500',
40
34
  fontSize: 32,
41
35
  lineHeight: 40,
42
36
  },
43
37
  titleSmall: {
44
- fontFamily: 'OpenSans-Regular',
45
- fontWeight: '600',
38
+ fontFamily: 'OpenSans-SemiBold',
46
39
  fontSize: 14,
47
40
  lineHeight: 20,
48
41
  letterSpacing: 0.1,
49
42
  },
50
43
  titleMedium: {
51
- fontFamily: 'OpenSans-Regular',
52
- fontWeight: '600',
44
+ fontFamily: 'OpenSans-SemiBold',
53
45
  fontSize: 16,
54
46
  lineHeight: 24,
55
47
  letterSpacing: 0.15,
56
48
  },
57
49
  titleLarge: {
58
50
  fontFamily: 'OpenSans-Regular',
59
- fontWeight: '400',
60
51
  fontSize: 22,
61
52
  lineHeight: 28,
62
53
  },
63
54
  labelSmall: {
64
55
  fontFamily: 'OpenSans-SemiBold',
65
- fontWeight: '600',
66
56
  fontSize: 11,
67
57
  lineHeight: 16,
68
58
  letterSpacing: 0.5,
69
59
  },
70
60
  labelMedium: {
71
61
  fontFamily: 'OpenSans-SemiBold',
72
- fontWeight: '600',
73
62
  fontSize: 12,
74
63
  lineHeight: 16,
75
64
  letterSpacing: 0.2,
76
65
  },
77
66
  labelLarge: {
78
67
  fontFamily: 'OpenSans-SemiBold',
79
- fontWeight: '600',
80
68
  fontSize: 14,
81
69
  lineHeight: 20,
82
70
  letterSpacing: 0.1,
83
71
  },
84
72
  bodySmall: {
85
73
  fontFamily: 'OpenSans-Regular',
86
- fontWeight: '400',
87
74
  fontSize: 12,
88
75
  lineHeight: 16,
89
76
  },
90
77
  bodyMedium: {
91
78
  fontFamily: 'OpenSans-Regular',
92
- fontWeight: '400',
93
79
  fontSize: 14,
94
80
  lineHeight: 20,
95
81
  },
96
82
  bodyLarge: {
97
83
  fontFamily: 'OpenSans-Regular',
98
- fontWeight: '400',
99
84
  fontSize: 16,
100
85
  lineHeight: 24,
101
86
  letterSpacing: 0.15,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@brightlayer-ui/react-native-themes",
3
3
  "author": "Brightlayer UI <brightlayer-ui@eaton.com>",
4
4
  "license": "BSD-3-Clause",
5
- "version": "7.0.0",
5
+ "version": "7.0.1-alpha.2",
6
6
  "description": "React Native themes for Brightlayer UI applications",
7
7
  "main": "./dist/index.js",
8
8
  "scripts": {