@brightlayer-ui/react-native-themes 6.0.0 → 7.0.0-alpha.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## v7.0.0 (Unreleased)
4
+
5
+ ### Changed
6
+
7
+ - Updated themes to use Material Design 3 styled palettes and React Native Paper v5 theme structure.
8
+
3
9
  ## v6.0.0 (November 9, 2021)
4
10
 
5
11
  ### Changed
@@ -19,6 +25,7 @@ Previous versions listed after this indicator refer to our deprecated `@pxblue`
19
25
  - Many new theme color properties to give greater control over the styles of various components. Note that the global ReactNativePaper namespace will need to be updated in your application to use these properties.
20
26
 
21
27
  ### Removed
28
+
22
29
  - The `blueDarkAlt` theme has been consolidated into the `blueDark` theme and a selection of wrapper components in the `@pxblue/react-native-components` library. This eliminates the need for using two theme providers and writing your own wrappers for these components.
23
30
  - `theme.colors.textSecondary` — use `theme.colors.textPalette.secondary` instead.
24
31
 
package/LICENSES.json ADDED
@@ -0,0 +1,158 @@
1
+ {
2
+ "@brightlayer-ui/colors@3.0.1": {
3
+ "licenses": "BSD-3-Clause",
4
+ "repository": "https://github.com/brightlayer-ui/colors",
5
+ "licenseUrl": "https://github.com/brightlayer-ui/colors/raw/master/LICENSE",
6
+ "parents": "reactNativeShowcaseDemo"
7
+ },
8
+ "@brightlayer-ui/colors@4.0.0": {
9
+ "licenses": "BSD-3-Clause",
10
+ "repository": "https://github.com/etn-ccis/blui-colors",
11
+ "licenseUrl": "https://github.com/etn-ccis/blui-colors/raw/master/LICENSE",
12
+ "parents": "@brightlayer-ui/react-native-themes"
13
+ },
14
+ "@brightlayer-ui/icons-svg@1.7.0": {
15
+ "licenses": "BSD-3-Clause",
16
+ "repository": "https://github.com/brightlayer-ui/icons",
17
+ "licenseUrl": "https://github.com/brightlayer-ui/icons",
18
+ "parents": "reactNativeShowcaseDemo"
19
+ },
20
+ "@brightlayer-ui/react-native-components@6.0.1": {
21
+ "licenses": "BSD-3-Clause",
22
+ "repository": "https://github.com/brightlayer-ui/react-native-component-library",
23
+ "licenseUrl": "https://github.com/brightlayer-ui/react-native-component-library/raw/master/LICENSE",
24
+ "parents": "reactNativeShowcaseDemo"
25
+ },
26
+ "@brightlayer-ui/react-native-progress-icons@1.0.2": {
27
+ "licenses": "BSD-3-Clause",
28
+ "repository": "https://github.com/brightlayer-ui/progress-icons",
29
+ "licenseUrl": "https://github.com/brightlayer-ui/progress-icons/raw/master/LICENSE",
30
+ "parents": "reactNativeShowcaseDemo"
31
+ },
32
+ "@brightlayer-ui/react-native-themes@7.0.0-alpha.0": {
33
+ "licenses": "BSD-3-Clause",
34
+ "repository": "https://github.com/etn-ccis/blui-react-native-themes",
35
+ "licenseUrl": "https://github.com/etn-ccis/blui-react-native-themes",
36
+ "parents": "reactNativeShowcaseDemo"
37
+ },
38
+ "@brightlayer-ui/react-native-vector-icons@1.3.1": {
39
+ "licenses": "BSD-3-Clause",
40
+ "repository": "https://github.com/brightlayer-ui/icons",
41
+ "licenseUrl": "https://github.com/brightlayer-ui/icons/raw/master/LICENSE",
42
+ "parents": "reactNativeShowcaseDemo"
43
+ },
44
+ "@react-native-community/masked-view@0.1.11": {
45
+ "licenses": "MIT",
46
+ "repository": "https://github.com/react-native-community/react-native-masked-view",
47
+ "licenseUrl": "https://github.com/react-native-community/react-native-masked-view",
48
+ "parents": "reactNativeShowcaseDemo"
49
+ },
50
+ "@react-navigation/drawer@5.12.9": {
51
+ "licenses": "MIT",
52
+ "repository": "https://github.com/react-navigation/react-navigation",
53
+ "licenseUrl": "https://github.com/react-navigation/react-navigation/raw/master/LICENSE",
54
+ "parents": "reactNativeShowcaseDemo"
55
+ },
56
+ "@react-navigation/native@5.9.8": {
57
+ "licenses": "MIT",
58
+ "repository": "https://github.com/react-navigation/react-navigation",
59
+ "licenseUrl": "https://github.com/react-navigation/react-navigation/raw/master/LICENSE",
60
+ "parents": "reactNativeShowcaseDemo"
61
+ },
62
+ "@react-navigation/stack@5.14.9": {
63
+ "licenses": "MIT",
64
+ "repository": "https://github.com/react-navigation/react-navigation",
65
+ "licenseUrl": "https://github.com/react-navigation/react-navigation/raw/master/LICENSE",
66
+ "parents": "reactNativeShowcaseDemo"
67
+ },
68
+ "color@3.2.1": {
69
+ "licenses": "MIT",
70
+ "repository": "https://github.com/Qix-/color",
71
+ "licenseUrl": "https://github.com/Qix-/color/raw/master/LICENSE",
72
+ "parents": "reactNativeShowcaseDemo"
73
+ },
74
+ "color@4.2.3": {
75
+ "licenses": "MIT",
76
+ "repository": "https://github.com/Qix-/color",
77
+ "licenseUrl": "https://github.com/Qix-/color/raw/master/LICENSE",
78
+ "parents": "@brightlayer-ui/react-native-themes"
79
+ },
80
+ "lodash.clonedeep@4.5.0": {
81
+ "licenses": "MIT",
82
+ "repository": "https://github.com/lodash/lodash",
83
+ "licenseUrl": "https://github.com/lodash/lodash/raw/master/LICENSE",
84
+ "parents": "reactNativeShowcaseDemo"
85
+ },
86
+ "react-native-collapsible@1.6.0": {
87
+ "licenses": "MIT",
88
+ "repository": "https://oblador@github.com/oblador/react-native-collapsible",
89
+ "licenseUrl": "https://oblador@github.com/oblador/react-native-collapsible/raw/master/LICENSE",
90
+ "parents": "reactNativeShowcaseDemo"
91
+ },
92
+ "react-native-gesture-handler@1.10.3": {
93
+ "licenses": "MIT",
94
+ "repository": "https://github.com/software-mansion/react-native-gesture-handler",
95
+ "licenseUrl": "https://github.com/software-mansion/react-native-gesture-handler/raw/master/LICENSE",
96
+ "parents": "reactNativeShowcaseDemo"
97
+ },
98
+ "react-native-modal@11.10.0": {
99
+ "licenses": "MIT",
100
+ "repository": "https://github.com/react-native-community/react-native-modal",
101
+ "licenseUrl": "https://github.com/react-native-community/react-native-modal/raw/master/LICENSE.md",
102
+ "parents": "reactNativeShowcaseDemo"
103
+ },
104
+ "react-native-paper@4.10.0": {
105
+ "licenses": "MIT",
106
+ "repository": "https://github.com/callstack/react-native-paper",
107
+ "licenseUrl": "https://github.com/callstack/react-native-paper/raw/master/LICENSE.md",
108
+ "parents": "reactNativeShowcaseDemo"
109
+ },
110
+ "react-native-reanimated@2.2.4": {
111
+ "licenses": "MIT",
112
+ "repository": "https://github.com/software-mansion/react-native-reanimated",
113
+ "licenseUrl": "https://github.com/software-mansion/react-native-reanimated/raw/master/LICENSE",
114
+ "parents": "reactNativeShowcaseDemo"
115
+ },
116
+ "react-native-restart@0.0.17": {
117
+ "licenses": "MIT",
118
+ "repository": "https://github.com/avishayil/react-native-restart",
119
+ "licenseUrl": "https://github.com/avishayil/react-native-restart/raw/master/LICENSE",
120
+ "parents": "reactNativeShowcaseDemo"
121
+ },
122
+ "react-native-safe-area-context@3.3.2": {
123
+ "licenses": "MIT",
124
+ "repository": "https://github.com/th3rdwave/react-native-safe-area-context",
125
+ "licenseUrl": "https://github.com/th3rdwave/react-native-safe-area-context/raw/master/LICENSE",
126
+ "parents": "reactNativeShowcaseDemo"
127
+ },
128
+ "react-native-screens@3.9.0": {
129
+ "licenses": "MIT",
130
+ "repository": "https://github.com/software-mansion/react-native-screens",
131
+ "licenseUrl": "https://github.com/software-mansion/react-native-screens/raw/master/LICENSE",
132
+ "parents": "reactNativeShowcaseDemo"
133
+ },
134
+ "react-native-svg@12.1.1": {
135
+ "licenses": "MIT",
136
+ "repository": "https://github.com/react-native-community/react-native-svg",
137
+ "licenseUrl": "https://github.com/react-native-community/react-native-svg/raw/master/LICENSE",
138
+ "parents": "reactNativeShowcaseDemo"
139
+ },
140
+ "react-native-vector-icons@8.1.0": {
141
+ "licenses": "MIT",
142
+ "repository": "https://github.com/oblador/react-native-vector-icons",
143
+ "licenseUrl": "https://github.com/oblador/react-native-vector-icons/raw/master/LICENSE",
144
+ "parents": "reactNativeShowcaseDemo"
145
+ },
146
+ "react-native@0.64.3": {
147
+ "licenses": "MIT",
148
+ "repository": "github:facebook/react-native",
149
+ "licenseUrl": "github:facebook/react-native",
150
+ "parents": "reactNativeShowcaseDemo"
151
+ },
152
+ "react@17.0.2": {
153
+ "licenses": "MIT",
154
+ "repository": "https://github.com/facebook/react",
155
+ "licenseUrl": "https://github.com/facebook/react/raw/master/LICENSE",
156
+ "parents": "reactNativeShowcaseDemo"
157
+ }
158
+ }
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Brightlayer UI themes for React Native applications
2
2
 
3
- [![](https://img.shields.io/circleci/project/github/brightlayer-ui/react-native-themes/master.svg?style=flat)](https://circleci.com/gh/brightlayer-ui/react-native-themes/tree/master)
3
+ [![](https://img.shields.io/circleci/project/github/etn-ccis/blui-react-native-themes/master.svg?style=flat)](https://circleci.com/gh/etn-ccis/blui-react-native-themes/tree/master)
4
4
  [![](https://img.shields.io/npm/v/@brightlayer-ui/react-native-themes.svg?label=@brightlayer-ui/react-native-themes&style=flat)](https://www.npmjs.com/package/@brightlayer-ui/react-native-themes)
5
5
 
6
- This package provides theming support for Eaton applications using the Brightlayer UI design system. It includes resources for developers using React Native with [react-native-paper](https://www.npmjs.com/package/react-native-paper). This package comes with two theme options: a Blue theme (standard) and a Dark theme.
6
+ This package provides [theming](https://brightlayer-ui.github.io/style/themes) support for Eaton applications using the Brightlayer UI design system. It includes resources for developers using React Native with [react-native-paper](https://www.npmjs.com/package/react-native-paper). This package comes with two theme options: a Blue theme (standard) and a Dark theme.
7
7
 
8
8
  For other frameworks, check out our related packages:
9
9
 
@@ -61,7 +61,7 @@ import * as BLUIThemes from '@brightlayer-ui/react-native-themes';
61
61
 
62
62
  The default theme structure for React Native Paper components does not offer us enough control to make some components look exactly the way they should for Brightlayer UI applications. Because of this, we have extended the default theme type definition (see below) and created wrapper components with the correct styles to use in place of some of the standard React Native Paper components.
63
63
 
64
- In order for these components to look correct in your application, you should use the [Brightlayer UI wrapper components](https://github.com/brightlayer-ui/react-native-component-library/blob/master/components/src/themed/README.md) in place of the respective components from React Native Paper.
64
+ In order for these components to look correct in your application, you should use the [Brightlayer UI wrapper components](https://github.com/etn-ccis/blui-react-native-component-library/blob/master/components/src/themed/README.md) in place of the respective components from React Native Paper.
65
65
 
66
66
  ### TypeScript
67
67
 
@@ -116,5 +116,5 @@ declare global {
116
116
  <!--
117
117
  ## Demo
118
118
 
119
- [Check it out](https://github.com/brightlayer-ui/react-native-showcase-demo/tree/master)
119
+ [Check it out](https://github.com/etn-ccis/blui-react-native-showcase-demo/tree/master)
120
120
  -->
@@ -5,4 +5,87 @@ All rights reserved.
5
5
 
6
6
  This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause.
7
7
  **/
8
- export declare const blueDarkTheme: ReactNativePaper.Theme;
8
+ export declare const MD3BluiDarkTheme: {
9
+ fonts: import("react-native-paper/lib/typescript/types").MD3Typescale;
10
+ colors: {
11
+ primary: string;
12
+ onPrimary: string;
13
+ primaryContainer: string;
14
+ onPrimaryContainer: string;
15
+ secondary: string;
16
+ onSecondary: string;
17
+ secondaryContainer: string;
18
+ onSecondaryContainer: string;
19
+ tertiary: string;
20
+ onTertiary: string;
21
+ tertiaryContainer: string;
22
+ onTertiaryContainer: string;
23
+ error: string;
24
+ onError: string;
25
+ errorContainer: string;
26
+ onErrorContainer: string;
27
+ background: string;
28
+ onBackground: string;
29
+ surface: string;
30
+ onSurface: string;
31
+ surfaceVariant: string;
32
+ onSurfaceVariant: string;
33
+ surfaceDisabled: string;
34
+ onSurfaceDisabled: string;
35
+ outline: string;
36
+ outlineVariant: string;
37
+ shadow: string;
38
+ scrim: string;
39
+ inverseSurface: string;
40
+ inverseOnSurface: string;
41
+ inversePrimary: string;
42
+ elevation: {
43
+ level0: string;
44
+ level1: string;
45
+ level2: string;
46
+ level3: string;
47
+ level4: string;
48
+ level5: string;
49
+ };
50
+ primaryNonText: string;
51
+ errorNonText: string;
52
+ disabled: string;
53
+ warning: string;
54
+ warningNonText: string;
55
+ onWarning: string;
56
+ warningContainer: string;
57
+ onWarningContainer: string;
58
+ success: string;
59
+ successNonText: string;
60
+ onSuccess: string;
61
+ successContainer: string;
62
+ onSuccessContainer: string;
63
+ orange: string;
64
+ orangeNonText: string;
65
+ onOrange: string;
66
+ orangeContainer: string;
67
+ onOrangeContainer: string;
68
+ purple: string;
69
+ purpleNonText: string;
70
+ onPurple: string;
71
+ purpleContainer: string;
72
+ onPurpleContainer: string;
73
+ surfaceContainerLowest: string;
74
+ surfaceContainerLow: string;
75
+ surfaceContainer: string;
76
+ surfaceContainerHigh: string;
77
+ surfaceContainerHighest: string;
78
+ disabledContainer: string;
79
+ onDisabledContainer: string;
80
+ backdrop: string;
81
+ };
82
+ dark: boolean;
83
+ mode?: ("adaptive" | "exact") | undefined;
84
+ roundness: number;
85
+ animation: {
86
+ scale: number;
87
+ defaultAnimationDuration?: number | undefined;
88
+ };
89
+ version: 3;
90
+ isV3: true;
91
+ };
@@ -21,58 +21,82 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
21
21
  return (mod && mod.__esModule) ? mod : { "default": mod };
22
22
  };
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.blueDarkTheme = void 0;
24
+ exports.MD3BluiDarkTheme = void 0;
25
25
  var react_native_paper_1 = require("react-native-paper");
26
- var colors_1 = require("@brightlayer-ui/colors");
27
26
  var shared_1 = require("./shared");
27
+ var colors_1 = __importDefault(require("@brightlayer-ui/colors"));
28
28
  var color_1 = __importDefault(require("color"));
29
- var themeOpacity = {
30
- disabled: 0.36,
31
- divider: 0.36,
32
- disabledBackground: 0.24,
33
- actionOpacity: 0.1,
34
- };
35
- exports.blueDarkTheme = __assign(__assign({}, react_native_paper_1.DefaultTheme), { dark: true, roundness: 4, fonts: __assign(__assign({}, react_native_paper_1.configureFonts(shared_1.fontConfig)), { bold: {
36
- fontFamily: 'OpenSans-Bold',
37
- fontWeight: '700',
38
- } }), colors: __assign(__assign({}, react_native_paper_1.DefaultTheme.colors), { primary: colors_1.blue[200], primaryPalette: {
39
- light: colors_1.blue[50],
40
- main: colors_1.blue[200],
41
- dark: colors_1.blue[500],
42
- }, accent: colors_1.lightBlue[200], accentPalette: {
43
- light: colors_1.lightBlue[50],
44
- main: colors_1.lightBlue[200],
45
- dark: colors_1.lightBlue[500],
46
- }, error: colors_1.red[200], errorPalette: {
47
- light: colors_1.red[50],
48
- main: colors_1.red[200],
49
- dark: colors_1.red[500],
50
- }, divider: color_1.default(colors_1.black[200]).alpha(themeOpacity.divider).string(), background: colors_1.darkBlack[800], surface: colors_1.black[900], text: colors_1.black[50], placeholder: colors_1.black[200], onSurface: colors_1.black[50], textPalette: {
51
- primary: colors_1.black[50],
52
- secondary: colors_1.black[200],
53
- onPrimary: {
54
- light: colors_1.black[500],
55
- main: colors_1.black[500],
56
- dark: colors_1.white[50],
57
- },
58
- disabled: colors_1.black[400],
59
- }, actionPalette: {
60
- active: colors_1.black[500],
61
- background: colors_1.black[800],
62
- disabled: color_1.default(colors_1.black[300]).alpha(themeOpacity.disabled).string(),
63
- disabledBackground: color_1.default(colors_1.black[200]).alpha(themeOpacity.disabledBackground).string(),
64
- }, disabled: color_1.default(colors_1.black[300]).alpha(themeOpacity.disabled).string(), notification: colors_1.lightBlue[200], opacity: themeOpacity, overrides: {
65
- avatar: {
66
- background: color_1.default(colors_1.black[50]).alpha(themeOpacity.actionOpacity).string(),
67
- },
68
- chip: {
69
- flat: {
70
- background: colors_1.black[500],
71
- },
72
- },
73
- toggleButtonGroup: {
74
- checked: {
75
- background: color_1.default(colors_1.blue[500]).alpha(0.36).string(),
76
- },
77
- },
78
- } }) });
29
+ exports.MD3BluiDarkTheme = __assign(__assign({}, react_native_paper_1.MD3DarkTheme), { fonts: (0, react_native_paper_1.configureFonts)({ config: shared_1.fontConfig }), colors: __assign(__assign({}, react_native_paper_1.MD3DarkTheme.colors), {
30
+ // React Native Paper default theme color variants
31
+ primary: colors_1.default.primary[80], onPrimary: colors_1.default.primary[20], primaryContainer: colors_1.default.primary[30], onPrimaryContainer: colors_1.default.primary[90], secondary: colors_1.default.primary[80], onSecondary: colors_1.default.primary[20], secondaryContainer: colors_1.default.primary[30], onSecondaryContainer: colors_1.default.primary[90], tertiary: colors_1.default.primary[80], onTertiary: colors_1.default.primary[20], tertiaryContainer: colors_1.default.primary[30], onTertiaryContainer: colors_1.default.primary[90], error: colors_1.default.error[80], onError: colors_1.default.error[20], errorContainer: colors_1.default.error[30], onErrorContainer: colors_1.default.error[90], background: colors_1.default.neutral[6], onBackground: colors_1.default.neutral[95], surface: colors_1.default.neutral[6], onSurface: colors_1.default.neutral[95], surfaceVariant: colors_1.default.neutralVariant[30], onSurfaceVariant: colors_1.default.neutralVariant[70],
32
+ // surfaceDisabled is the same as disabledContainer in design files
33
+ surfaceDisabled: (0, color_1.default)(colors_1.default.neutral[95]).alpha(0.1).rgb().string(),
34
+ // onSurfaceDisabled is the same as onDisabledContainer in design files
35
+ onSurfaceDisabled: (0, color_1.default)(colors_1.default.neutral[95]).alpha(0.15).rgb().string(), outline: colors_1.default.neutralVariant[60], outlineVariant: (0, color_1.default)(colors_1.default.neutralVariant[60]).alpha(0.25).rgb().string(), shadow: colors_1.default.primary[0], scrim: colors_1.default.primary[0], inverseSurface: colors_1.default.neutral[90], inverseOnSurface: colors_1.default.neutral[10], inversePrimary: colors_1.default.primary[40], elevation: {
36
+ level0: 'transparent',
37
+ level1: colors_1.default.neutral[4],
38
+ level2: colors_1.default.neutral[10],
39
+ level3: colors_1.default.neutral[12],
40
+ level4: colors_1.default.neutral[17],
41
+ level5: colors_1.default.neutral[20],
42
+ },
43
+ // Custom color variants
44
+ // High-emphasis primary non-text variant, can be used on non-text elements like icons
45
+ primaryNonText: colors_1.default.primary[60],
46
+ // Attention-grabbing error color can be used on non-text elements like icons, which communicate error states
47
+ errorNonText: colors_1.default.error[60],
48
+ // variant used to render disabled elements
49
+ disabled: (0, color_1.default)(colors_1.default.neutral[95]).alpha(0.25).rgb().string(),
50
+ // warning variant fills, texts, and icons which communicate warning states
51
+ warning: colors_1.default.warning[90],
52
+ // can be used on non-text warning elements like icons
53
+ warningNonText: colors_1.default.warning[80],
54
+ // can be used on warning text and icons against warning
55
+ onWarning: colors_1.default.warning[20],
56
+ // Standout fill warning color against surface
57
+ warningContainer: colors_1.default.warning[30],
58
+ // Text and icons against warning container
59
+ onWarningContainer: colors_1.default.warning[90],
60
+ // success color variant fills, texts, and icons which communicate success states
61
+ success: colors_1.default.success[80],
62
+ // can be used on non-text success elements like icons
63
+ successNonText: colors_1.default.success[70],
64
+ // can be used on success text and icons against success
65
+ onSuccess: colors_1.default.success[20],
66
+ // Standout fill success color against surface
67
+ successContainer: colors_1.default.success[30],
68
+ // Text and icons against success container
69
+ onSuccessContainer: colors_1.default.success[90],
70
+ // orange color variant fills, texts, and icons
71
+ orange: colors_1.default.orange[80],
72
+ // non-text orange variant can be used on non-text elements like icons
73
+ orangeNonText: colors_1.default.orange[70],
74
+ // can be used on text and icons against orange
75
+ onOrange: colors_1.default.orange[20],
76
+ // Standout fill orange color against surface
77
+ orangeContainer: colors_1.default.orange[30],
78
+ // Text and icons against orange container
79
+ onOrangeContainer: colors_1.default.orange[90],
80
+ // purple color variant fills, texts, and icons
81
+ purple: colors_1.default.purple[80],
82
+ // non-text purple variant can be used on non-text elements like icons
83
+ purpleNonText: colors_1.default.purple[60],
84
+ // can be used on text and icons against purple
85
+ onPurple: colors_1.default.purple[20],
86
+ // Standout fill purple color against surface
87
+ purpleContainer: colors_1.default.purple[30],
88
+ // Text and icons against purple container
89
+ onPurpleContainer: colors_1.default.purple[90],
90
+ // Surface container is the default role, but the others are especially helpful for creating hierarchy and nested containers
91
+ // Lowest-emphasis container color
92
+ surfaceContainerLowest: colors_1.default.neutral[4],
93
+ // Low-emphasis container color
94
+ surfaceContainerLow: colors_1.default.neutral[10],
95
+ // Default container color
96
+ surfaceContainer: colors_1.default.neutral[12],
97
+ // High-emphasis container color
98
+ surfaceContainerHigh: colors_1.default.neutral[17],
99
+ // Highest-emphasis container color
100
+ surfaceContainerHighest: colors_1.default.neutral[20],
101
+ // This is alias for surface disabled, used as disabled container background
102
+ disabledContainer: (0, color_1.default)(colors_1.default.neutral[95]).alpha(0.1).rgb().string(), onDisabledContainer: (0, color_1.default)(colors_1.default.neutral[95]).alpha(0.15).rgb().string() }) });
@@ -5,4 +5,87 @@ All rights reserved.
5
5
 
6
6
  This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause.
7
7
  **/
8
- export declare const blueTheme: ReactNativePaper.Theme;
8
+ export declare const MD3BluiLightTheme: {
9
+ fonts: import("react-native-paper/lib/typescript/types").MD3Typescale;
10
+ colors: {
11
+ primary: string;
12
+ onPrimary: string;
13
+ primaryContainer: string;
14
+ onPrimaryContainer: string;
15
+ secondary: string;
16
+ onSecondary: string;
17
+ secondaryContainer: string;
18
+ onSecondaryContainer: string;
19
+ tertiary: string;
20
+ onTertiary: string;
21
+ tertiaryContainer: string;
22
+ onTertiaryContainer: string;
23
+ error: string;
24
+ onError: string;
25
+ errorContainer: string;
26
+ onErrorContainer: string;
27
+ background: string;
28
+ onBackground: string;
29
+ surface: string;
30
+ onSurface: string;
31
+ surfaceDisabled: string;
32
+ onSurfaceDisabled: string;
33
+ surfaceVariant: string;
34
+ onSurfaceVariant: string;
35
+ outline: string;
36
+ outlineVariant: string;
37
+ shadow: string;
38
+ scrim: string;
39
+ inverseSurface: string;
40
+ inverseOnSurface: string;
41
+ inversePrimary: string;
42
+ elevation: {
43
+ level0: string;
44
+ level1: string;
45
+ level2: string;
46
+ level3: string;
47
+ level4: string;
48
+ level5: string;
49
+ };
50
+ primaryNonText: string;
51
+ errorNonText: string;
52
+ disabled: string;
53
+ warning: string;
54
+ warningNonText: string;
55
+ onWarning: string;
56
+ warningContainer: string;
57
+ onWarningContainer: string;
58
+ success: string;
59
+ successNonText: string;
60
+ onSuccess: string;
61
+ successContainer: string;
62
+ onSuccessContainer: string;
63
+ orange: string;
64
+ orangeNonText: string;
65
+ onOrange: string;
66
+ orangeContainer: string;
67
+ onOrangeContainer: string;
68
+ purple: string;
69
+ purpleNonText: string;
70
+ onPurple: string;
71
+ purpleContainer: string;
72
+ onPurpleContainer: string;
73
+ surfaceContainerLowest: string;
74
+ surfaceContainerLow: string;
75
+ surfaceContainer: string;
76
+ surfaceContainerHigh: string;
77
+ surfaceContainerHighest: string;
78
+ disabledContainer: string;
79
+ onDisabledContainer: string;
80
+ backdrop: string;
81
+ };
82
+ dark: boolean;
83
+ mode?: ("adaptive" | "exact") | undefined;
84
+ roundness: number;
85
+ animation: {
86
+ scale: number;
87
+ defaultAnimationDuration?: number | undefined;
88
+ };
89
+ version: 3;
90
+ isV3: true;
91
+ };
package/dist/blueTheme.js CHANGED
@@ -21,58 +21,82 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
21
21
  return (mod && mod.__esModule) ? mod : { "default": mod };
22
22
  };
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.blueTheme = void 0;
24
+ exports.MD3BluiLightTheme = void 0;
25
25
  var react_native_paper_1 = require("react-native-paper");
26
- var colors_1 = require("@brightlayer-ui/colors");
26
+ var colors_1 = __importDefault(require("@brightlayer-ui/colors"));
27
27
  var shared_1 = require("./shared");
28
28
  var color_1 = __importDefault(require("color"));
29
- var themeOpacity = {
30
- disabled: 0.3,
31
- divider: 0.36,
32
- disabledBackground: 0.24,
33
- actionOpacity: 1,
34
- };
35
- exports.blueTheme = __assign(__assign({}, react_native_paper_1.DefaultTheme), { dark: false, roundness: 4, fonts: __assign(__assign({}, react_native_paper_1.configureFonts(shared_1.fontConfig)), { bold: {
36
- fontFamily: 'OpenSans-Bold',
37
- fontWeight: '700',
38
- } }), colors: __assign(__assign({}, react_native_paper_1.DefaultTheme.colors), { primary: colors_1.blue[500], primaryPalette: {
39
- light: colors_1.blue[50],
40
- main: colors_1.blue[500],
41
- dark: colors_1.blue[700],
42
- }, accent: colors_1.lightBlue[500], accentPalette: {
43
- light: colors_1.lightBlue[50],
44
- main: colors_1.lightBlue[500],
45
- dark: colors_1.lightBlue[700],
46
- }, error: colors_1.red[500], errorPalette: {
47
- light: colors_1.red[50],
48
- main: colors_1.red[500],
49
- dark: colors_1.red[700],
50
- }, divider: color_1.default(colors_1.black[200]).alpha(themeOpacity.divider).string(), background: colors_1.white[200], surface: colors_1.white[50], text: colors_1.black[500], placeholder: colors_1.gray[500], onSurface: colors_1.black[500], textPalette: {
51
- primary: colors_1.black[500],
52
- secondary: colors_1.gray[500],
53
- onPrimary: {
54
- light: colors_1.black[500],
55
- main: colors_1.white[50],
56
- dark: colors_1.white[50],
57
- },
58
- disabled: color_1.default(colors_1.black[500]).alpha(themeOpacity.disabled).string(),
59
- }, actionPalette: {
60
- active: colors_1.gray[500],
61
- background: colors_1.white[500],
62
- disabled: color_1.default(colors_1.black[500]).alpha(themeOpacity.disabled).string(),
63
- disabledBackground: color_1.default(colors_1.black[200]).alpha(themeOpacity.disabledBackground).string(),
64
- }, disabled: color_1.default(colors_1.black[500]).alpha(themeOpacity.disabled).string(), notification: colors_1.lightBlue[500], opacity: themeOpacity, overrides: {
65
- snackbar: {
66
- accent: colors_1.blue[200],
67
- },
68
- bottomNavigation: {
69
- inactive: colors_1.blue[200],
70
- },
71
- button: {
72
- contained: {
73
- text: {
74
- disabled: colors_1.blue[200],
75
- },
76
- },
77
- },
78
- } }) });
29
+ exports.MD3BluiLightTheme = __assign(__assign({}, react_native_paper_1.MD3LightTheme), { fonts: (0, react_native_paper_1.configureFonts)({ config: shared_1.fontConfig }), colors: __assign(__assign({}, react_native_paper_1.MD3LightTheme.colors), {
30
+ // React Native Paper default theme color variants
31
+ primary: colors_1.default.primary[40], onPrimary: colors_1.default.primary[100], primaryContainer: colors_1.default.primary[80], onPrimaryContainer: colors_1.default.primary[30], secondary: colors_1.default.primary[40], onSecondary: colors_1.default.primary[100], secondaryContainer: colors_1.default.primary[80], onSecondaryContainer: colors_1.default.primary[30], tertiary: colors_1.default.primary[40], onTertiary: colors_1.default.primary[100], tertiaryContainer: colors_1.default.primary[80], onTertiaryContainer: colors_1.default.primary[30], error: colors_1.default.error[40], onError: colors_1.default.primary[100], errorContainer: colors_1.default.error[90], onErrorContainer: colors_1.default.error[30], background: colors_1.default.neutral[98], onBackground: colors_1.default.neutral[10], surface: colors_1.default.neutral[98], onSurface: colors_1.default.neutral[10],
32
+ // surfaceDisabled is the same as disabledContainer in design files
33
+ surfaceDisabled: (0, color_1.default)(colors_1.default.neutral[10]).alpha(0.05).rgb().string(),
34
+ // onSurfaceDisabled is the same as onDisabledContainer in design files
35
+ onSurfaceDisabled: (0, color_1.default)(colors_1.default.neutral[10]).alpha(0.25).rgb().string(), surfaceVariant: colors_1.default.neutralVariant[90], onSurfaceVariant: colors_1.default.neutralVariant[30], outline: colors_1.default.neutralVariant[50], outlineVariant: (0, color_1.default)(colors_1.default.neutralVariant[50]).alpha(0.25).rgb().string(), shadow: colors_1.default.primary[0], scrim: colors_1.default.primary[0], inverseSurface: colors_1.default.neutral[20], inverseOnSurface: colors_1.default.neutral[95], inversePrimary: colors_1.default.primary[80], elevation: {
36
+ level0: 'transparent',
37
+ level1: colors_1.default.primary[100],
38
+ level2: colors_1.default.neutral[97],
39
+ level3: colors_1.default.neutral[94],
40
+ level4: colors_1.default.neutral[92],
41
+ level5: colors_1.default.neutral[90],
42
+ },
43
+ // Custom color variants
44
+ // High-emphasis primary non-text variant, can be used on non-text elements like icons
45
+ primaryNonText: colors_1.default.primary[50],
46
+ // Attention-grabbing error color can be used on non-text elements like icons, which communicate error states
47
+ errorNonText: colors_1.default.error[50],
48
+ // variant used to render disabled elements
49
+ disabled: (0, color_1.default)(colors_1.default.neutral[10]).alpha(0.2).rgb().string(),
50
+ // warning variant fills, texts, and icons which communicate warning states
51
+ warning: colors_1.default.warning[40],
52
+ // can be used on non-text warning elements like icons
53
+ warningNonText: colors_1.default.warning[60],
54
+ // can be used on warning text and icons against warning
55
+ onWarning: colors_1.default.primary[100],
56
+ // Standout fill warning color against surface
57
+ warningContainer: colors_1.default.warning[90],
58
+ // Text and icons against warning container
59
+ onWarningContainer: colors_1.default.warning[30],
60
+ // success color variant fills, texts, and icons which communicate success states
61
+ success: colors_1.default.success[40],
62
+ // can be used on non-text success elements like icons
63
+ successNonText: colors_1.default.success[50],
64
+ // can be used on success text and icons against success
65
+ onSuccess: colors_1.default.primary[100],
66
+ // Standout fill success color against surface
67
+ successContainer: colors_1.default.success[90],
68
+ // Text and icons against success container
69
+ onSuccessContainer: colors_1.default.success[30],
70
+ // orange color variant fills, texts, and icons
71
+ orange: colors_1.default.orange[40],
72
+ // non-text orange variant can be used on non-text elements like icons
73
+ orangeNonText: colors_1.default.orange[50],
74
+ // can be used on text and icons against orange
75
+ onOrange: colors_1.default.primary[100],
76
+ // Standout fill orange color against surface
77
+ orangeContainer: colors_1.default.orange[90],
78
+ // Text and icons against orange container
79
+ onOrangeContainer: colors_1.default.orange[30],
80
+ // purple color variant fills, texts, and icons
81
+ purple: colors_1.default.purple[40],
82
+ // non-text purple variant can be used on non-text elements like icons
83
+ purpleNonText: colors_1.default.purple[50],
84
+ // can be used on text and icons against purple
85
+ onPurple: colors_1.default.primary[100],
86
+ // Standout fill purple color against surface
87
+ purpleContainer: colors_1.default.purple[90],
88
+ // Text and icons against purple container
89
+ onPurpleContainer: colors_1.default.purple[30],
90
+ // Surface container is the default role, but the others are especially helpful for creating hierarchy and nested containers
91
+ // Lowest-emphasis container color
92
+ surfaceContainerLowest: colors_1.default.primary[100],
93
+ // Low-emphasis container color
94
+ surfaceContainerLow: colors_1.default.neutral[97],
95
+ // Default container color
96
+ surfaceContainer: colors_1.default.neutral[94],
97
+ // High-emphasis container color
98
+ surfaceContainerHigh: colors_1.default.neutral[92],
99
+ // Highest-emphasis container color
100
+ surfaceContainerHighest: colors_1.default.neutral[90],
101
+ // This is alias for surface disabled, used as disabled container background
102
+ disabledContainer: (0, color_1.default)(colors_1.default.neutral[10]).alpha(0.05).rgb().string(), onDisabledContainer: (0, color_1.default)(colors_1.default.neutral[10]).alpha(0.25).rgb().string() }) });
package/dist/index.d.ts CHANGED
@@ -5,51 +5,6 @@ All rights reserved.
5
5
 
6
6
  This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause.
7
7
  **/
8
- export { blueTheme as blue } from './blueTheme';
9
- export { blueDarkTheme as blueDark } from './blueDarkTheme';
10
- export { ThemeOpacity, ThemeOverrides } from './shared';
11
- import { $DeepPartial } from '@callstack/react-theme-provider';
12
- import { ThemeOpacity, ThemeOverrides } from './shared';
13
- declare global {
14
- namespace ReactNativePaper {
15
- interface ThemeColors {
16
- primaryPalette: {
17
- light: string;
18
- main: string;
19
- dark: string;
20
- };
21
- accentPalette: {
22
- light: string;
23
- main: string;
24
- dark: string;
25
- };
26
- errorPalette: {
27
- light: string;
28
- main: string;
29
- dark: string;
30
- };
31
- divider: string;
32
- textPalette: {
33
- primary: string;
34
- secondary: string;
35
- onPrimary: {
36
- light: string;
37
- main: string;
38
- dark: string;
39
- };
40
- disabled: string;
41
- };
42
- actionPalette: {
43
- active: string;
44
- background: string;
45
- disabled: string;
46
- disabledBackground: string;
47
- };
48
- overrides: $DeepPartial<ThemeOverrides>;
49
- opacity: Partial<ThemeOpacity>;
50
- }
51
- interface ThemeFonts {
52
- bold: ThemeFont;
53
- }
54
- }
55
- }
8
+ export { MD3BluiLightTheme as blue } from './blueTheme';
9
+ export { MD3BluiDarkTheme as blueDark } from './blueDarkTheme';
10
+ export { ExtendedTheme, useExtendedTheme } from './shared';
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useExtendedTheme = exports.blueDark = exports.blue = void 0;
3
4
  /**
4
5
  Copyright (c) 2021-present, Eaton
5
6
 
@@ -8,6 +9,8 @@ All rights reserved.
8
9
  This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause.
9
10
  **/
10
11
  var blueTheme_1 = require("./blueTheme");
11
- Object.defineProperty(exports, "blue", { enumerable: true, get: function () { return blueTheme_1.blueTheme; } });
12
+ Object.defineProperty(exports, "blue", { enumerable: true, get: function () { return blueTheme_1.MD3BluiLightTheme; } });
12
13
  var blueDarkTheme_1 = require("./blueDarkTheme");
13
- Object.defineProperty(exports, "blueDark", { enumerable: true, get: function () { return blueDarkTheme_1.blueDarkTheme; } });
14
+ Object.defineProperty(exports, "blueDark", { enumerable: true, get: function () { return blueDarkTheme_1.MD3BluiDarkTheme; } });
15
+ var shared_1 = require("./shared");
16
+ Object.defineProperty(exports, "useExtendedTheme", { enumerable: true, get: function () { return shared_1.useExtendedTheme; } });
package/dist/shared.d.ts CHANGED
@@ -1,95 +1,222 @@
1
- declare type FontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
1
+ import { MD3Theme } from 'react-native-paper';
2
+ import { MD3Type, MD3Typescale } from 'react-native-paper/lib/typescript/types';
3
+ import { $DeepPartial } from '@callstack/react-theme-provider';
2
4
  export declare const fontConfig: {
3
- default: {
4
- regular: {
5
- fontFamily: string;
6
- fontWeight: FontWeight;
7
- };
8
- medium: {
9
- fontFamily: string;
10
- fontWeight: FontWeight;
11
- };
12
- light: {
13
- fontFamily: string;
14
- fontWeight: FontWeight;
15
- };
16
- thin: {
17
- fontFamily: string;
18
- fontWeight: FontWeight;
19
- };
5
+ displaySmall: {
6
+ fontFamily: string;
7
+ fontWeight: "400";
8
+ fontSize: number;
9
+ lineHeight: number;
20
10
  };
21
- ios: {
22
- regular: {
23
- fontFamily: string;
24
- fontWeight: FontWeight;
25
- };
26
- medium: {
27
- fontFamily: string;
28
- fontWeight: FontWeight;
29
- };
30
- light: {
31
- fontFamily: string;
32
- fontWeight: FontWeight;
33
- };
34
- thin: {
35
- fontFamily: string;
36
- fontWeight: FontWeight;
37
- };
11
+ displayMedium: {
12
+ fontFamily: string;
13
+ fontWeight: "400";
14
+ fontSize: number;
15
+ lineHeight: number;
38
16
  };
39
- android: {
40
- regular: {
41
- fontFamily: string;
42
- fontWeight: FontWeight;
43
- };
44
- medium: {
45
- fontFamily: string;
46
- fontWeight: FontWeight;
47
- };
48
- light: {
49
- fontFamily: string;
50
- fontWeight: FontWeight;
51
- };
52
- thin: {
53
- fontFamily: string;
54
- fontWeight: FontWeight;
55
- };
17
+ displayLarge: {
18
+ fontFamily: string;
19
+ fontWeight: "400";
20
+ fontSize: number;
21
+ lineHeight: number;
22
+ letterSpacing: number;
56
23
  };
57
- };
58
- export declare type ThemeOverrides = {
59
- avatar: {
60
- background: string;
24
+ headlineSmall: {
25
+ fontFamily: string;
26
+ fontWeight: "500";
27
+ fontSize: number;
28
+ lineHeight: number;
61
29
  };
62
- bottomNavigation: {
63
- inactive: string;
30
+ headlineMedium: {
31
+ fontFamily: string;
32
+ fontWeight: "500";
33
+ fontSize: number;
34
+ lineHeight: number;
64
35
  };
65
- button: {
66
- contained: {
67
- text: {
68
- disabled: string;
69
- };
70
- };
36
+ headlineLarge: {
37
+ fontFamily: string;
38
+ fontWeight: "500";
39
+ fontSize: number;
40
+ lineHeight: number;
71
41
  };
72
- chip: {
73
- outlined: {
74
- background: string;
75
- };
76
- flat: {
77
- background: string;
78
- };
42
+ titleSmall: {
43
+ fontFamily: string;
44
+ fontWeight: "600";
45
+ fontSize: number;
46
+ lineHeight: number;
47
+ letterSpacing: number;
79
48
  };
80
- snackbar: {
81
- accent: string;
49
+ titleMedium: {
50
+ fontFamily: string;
51
+ fontWeight: "600";
52
+ fontSize: number;
53
+ lineHeight: number;
54
+ letterSpacing: number;
82
55
  };
83
- toggleButtonGroup: {
84
- checked: {
85
- background: string;
86
- };
56
+ titleLarge: {
57
+ fontFamily: string;
58
+ fontWeight: "400";
59
+ fontSize: number;
60
+ lineHeight: number;
61
+ };
62
+ labelSmall: {
63
+ fontFamily: string;
64
+ fontWeight: "600";
65
+ fontSize: number;
66
+ lineHeight: number;
67
+ letterSpacing: number;
68
+ };
69
+ labelMedium: {
70
+ fontFamily: string;
71
+ fontWeight: "600";
72
+ fontSize: number;
73
+ lineHeight: number;
74
+ letterSpacing: number;
75
+ };
76
+ labelLarge: {
77
+ fontFamily: string;
78
+ fontWeight: "600";
79
+ fontSize: number;
80
+ lineHeight: number;
81
+ letterSpacing: number;
82
+ };
83
+ bodySmall: {
84
+ fontFamily: string;
85
+ fontWeight: "400";
86
+ fontSize: number;
87
+ lineHeight: number;
88
+ };
89
+ bodyMedium: {
90
+ fontFamily: string;
91
+ fontWeight: "400";
92
+ fontSize: number;
93
+ lineHeight: number;
94
+ };
95
+ bodyLarge: {
96
+ fontFamily: string;
97
+ fontWeight: "400";
98
+ fontSize: number;
99
+ lineHeight: number;
100
+ letterSpacing: number;
87
101
  };
88
102
  };
89
- export declare type ThemeOpacity = {
90
- disabled: number;
91
- divider: number;
92
- disabledBackground: number;
93
- actionOpacity: number;
103
+ export type ExtendedTheme = Omit<MD3Theme, 'colors' | 'fonts'> & {
104
+ colors: {
105
+ primary: string;
106
+ primaryContainer: string;
107
+ secondary: string;
108
+ secondaryContainer: string;
109
+ tertiary: string;
110
+ tertiaryContainer: string;
111
+ surface: string;
112
+ surfaceVariant: string;
113
+ surfaceDisabled: string;
114
+ background: string;
115
+ error: string;
116
+ errorContainer: string;
117
+ onPrimary: string;
118
+ onPrimaryContainer: string;
119
+ onSecondary: string;
120
+ onSecondaryContainer: string;
121
+ onTertiary: string;
122
+ onTertiaryContainer: string;
123
+ onSurface: string;
124
+ onSurfaceVariant: string;
125
+ onSurfaceDisabled: string;
126
+ onError: string;
127
+ onErrorContainer: string;
128
+ onBackground: string;
129
+ outline: string;
130
+ outlineVariant: string;
131
+ inverseSurface: string;
132
+ inverseOnSurface: string;
133
+ inversePrimary: string;
134
+ shadow: string;
135
+ scrim: string;
136
+ backdrop: string;
137
+ elevation: {
138
+ level0: string;
139
+ level1: string;
140
+ level2: string;
141
+ level3: string;
142
+ level4: string;
143
+ level5: string;
144
+ };
145
+ primaryNonText: string;
146
+ errorNonText: string;
147
+ disabled: string;
148
+ warning: string;
149
+ warningNonText: string;
150
+ onWarning: string;
151
+ warningContainer: string;
152
+ onWarningContainer: string;
153
+ success: string;
154
+ successNonText: string;
155
+ onSuccess: string;
156
+ successContainer: string;
157
+ onSuccessContainer: string;
158
+ orange: string;
159
+ orangeNonText: string;
160
+ onOrange: string;
161
+ orangeContainer: string;
162
+ onOrangeContainer: string;
163
+ purple: string;
164
+ purpleNonText: string;
165
+ onPurple: string;
166
+ purpleContainer: string;
167
+ onPurpleContainer: string;
168
+ surfaceContainerLowest: string;
169
+ surfaceContainerLow: string;
170
+ surfaceContainer: string;
171
+ surfaceContainerHigh: string;
172
+ surfaceContainerHighest: string;
173
+ disabledContainer: string;
174
+ onDisabledContainer: string;
175
+ errorFilledContainer: string;
176
+ onErrorFilledContainer: string;
177
+ errorShadedContainer: string;
178
+ onErrorShadedContainer: string;
179
+ errorOutlinedContainerOutline: string;
180
+ onErrorOutlinedContainerOutline: string;
181
+ orangeFilledContainer: string;
182
+ onOrangeFilledContainer: string;
183
+ orangeShadedContainer: string;
184
+ onOrangeShadedContainer: string;
185
+ orangeOutlinedContainer: string;
186
+ onOrangeOutlinedContainer: string;
187
+ warningFilledContainer: string;
188
+ onWarningFilledContainer: string;
189
+ warningShadedContainer: string;
190
+ onWarningShadedContainer: string;
191
+ warningOutlinedContainerOutline: string;
192
+ onWarningOutlinedContainer: string;
193
+ successFilledContainer: string;
194
+ onSuccessFilledContainer: string;
195
+ successShadedContainer: string;
196
+ successShadedLabel: string;
197
+ successOutlinedContainerOutline: string;
198
+ onSuccessOutlinedContainer: string;
199
+ primaryFilledContainer: string;
200
+ onPrimaryFilledContainer: string;
201
+ primaryShadedContainer: string;
202
+ onPrimaryShadedContainer: string;
203
+ primaryOutlinedContainerOutline: string;
204
+ onPrimaryOutlinedContainer: string;
205
+ purpleFilledContainer: string;
206
+ onPurpleFilledContainer: string;
207
+ purpleShadedContainer: string;
208
+ onPurpleShadedContainer: string;
209
+ purpleOutlinedContainerOutline: string;
210
+ onPurpleOutlinedContainer: string;
211
+ neutralFilledContainer: string;
212
+ onNeutralFilledContainer: string;
213
+ neutralShadedContainer: string;
214
+ onNeutralShadedContainer: string;
215
+ neutralOutlinedContainerOutline: string;
216
+ onNeutralOutlinedContainer: string;
217
+ };
218
+ fonts: MD3Typescale & {
219
+ customVariant: MD3Type;
220
+ };
94
221
  };
95
- export {};
222
+ export declare const useExtendedTheme: (overrides?: $DeepPartial<ExtendedTheme>) => ExtendedTheme;
package/dist/shared.js CHANGED
@@ -1,26 +1,107 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fontConfig = void 0;
4
- var defaultFontConfig = {
5
- regular: {
3
+ exports.useExtendedTheme = exports.fontConfig = void 0;
4
+ var react_native_paper_1 = require("react-native-paper");
5
+ exports.fontConfig = {
6
+ displaySmall: {
7
+ fontFamily: 'OpenSans-Regular',
8
+ fontWeight: '400',
9
+ fontSize: 36,
10
+ lineHeight: 45,
11
+ },
12
+ displayMedium: {
13
+ fontFamily: 'OpenSans-Regular',
14
+ fontWeight: '400',
15
+ fontSize: 45,
16
+ lineHeight: 56,
17
+ },
18
+ displayLarge: {
19
+ fontFamily: 'OpenSans-Regular',
20
+ fontWeight: '400',
21
+ fontSize: 54,
22
+ lineHeight: 68,
23
+ letterSpacing: 1,
24
+ },
25
+ headlineSmall: {
26
+ fontFamily: 'OpenSans-Regular',
27
+ fontWeight: '500',
28
+ fontSize: 24,
29
+ lineHeight: 32,
30
+ },
31
+ headlineMedium: {
32
+ fontFamily: 'OpenSans-Regular',
33
+ fontWeight: '500',
34
+ fontSize: 27,
35
+ lineHeight: 40,
36
+ },
37
+ headlineLarge: {
38
+ fontFamily: 'OpenSans-Regular',
39
+ fontWeight: '500',
40
+ fontSize: 32,
41
+ lineHeight: 40,
42
+ },
43
+ titleSmall: {
44
+ fontFamily: 'OpenSans-Regular',
45
+ fontWeight: '600',
46
+ fontSize: 14,
47
+ lineHeight: 20,
48
+ letterSpacing: 0.1,
49
+ },
50
+ titleMedium: {
51
+ fontFamily: 'OpenSans-Regular',
52
+ fontWeight: '600',
53
+ fontSize: 16,
54
+ lineHeight: 24,
55
+ letterSpacing: 0.15,
56
+ },
57
+ titleLarge: {
6
58
  fontFamily: 'OpenSans-Regular',
7
59
  fontWeight: '400',
60
+ fontSize: 22,
61
+ lineHeight: 28,
62
+ },
63
+ labelSmall: {
64
+ fontFamily: 'OpenSans-SemiBold',
65
+ fontWeight: '600',
66
+ fontSize: 11,
67
+ lineHeight: 16,
68
+ letterSpacing: 0.5,
69
+ },
70
+ labelMedium: {
71
+ fontFamily: 'OpenSans-SemiBold',
72
+ fontWeight: '600',
73
+ fontSize: 12,
74
+ lineHeight: 16,
75
+ letterSpacing: 0.2,
8
76
  },
9
- medium: {
77
+ labelLarge: {
10
78
  fontFamily: 'OpenSans-SemiBold',
11
79
  fontWeight: '600',
80
+ fontSize: 14,
81
+ lineHeight: 20,
82
+ letterSpacing: 0.1,
12
83
  },
13
- light: {
14
- fontFamily: 'OpenSans-Light',
15
- fontWeight: '300',
84
+ bodySmall: {
85
+ fontFamily: 'OpenSans-Regular',
86
+ fontWeight: '400',
87
+ fontSize: 12,
88
+ lineHeight: 16,
16
89
  },
17
- thin: {
18
- fontFamily: 'OpenSans-Light',
19
- fontWeight: '100',
90
+ bodyMedium: {
91
+ fontFamily: 'OpenSans-Regular',
92
+ fontWeight: '400',
93
+ fontSize: 14,
94
+ lineHeight: 20,
95
+ },
96
+ bodyLarge: {
97
+ fontFamily: 'OpenSans-Regular',
98
+ fontWeight: '400',
99
+ fontSize: 16,
100
+ lineHeight: 24,
101
+ letterSpacing: 0.15,
20
102
  },
21
103
  };
22
- exports.fontConfig = {
23
- default: defaultFontConfig,
24
- ios: defaultFontConfig,
25
- android: defaultFontConfig,
104
+ var useExtendedTheme = function (overrides) {
105
+ return (0, react_native_paper_1.useTheme)(overrides);
26
106
  };
107
+ exports.useExtendedTheme = useExtendedTheme;
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": "6.0.0",
5
+ "version": "7.0.0-alpha.1",
6
6
  "description": "React Native themes for Brightlayer UI applications",
7
7
  "main": "./dist/index.js",
8
8
  "scripts": {
@@ -17,19 +17,21 @@
17
17
  "link:themes": "bash ./scripts/linkThemes.sh",
18
18
  "test": "bash ./scripts/buildTest.sh",
19
19
  "publish:package": "set npm_config_yes=true && npx -p @brightlayer-ui/publish blui-publish",
20
- "tag:package": "npx -p @brightlayer-ui/tag blui-tag",
20
+ "tag:package": "npx -p @brightlayer-ui/tag blui-tag -s -blui-react-native-themes",
21
21
  "update:submodule": "git submodule update --remote",
22
22
  "prettier": "prettier \"src/**/**.{ts,tsx,js,jsx,json,css,scss,html}\" --write",
23
- "prettier:check": "prettier \"src/**/**.{ts,tsx,js,jsx,json,css,scss,html}\" --check"
23
+ "prettier:check": "prettier \"src/**/**.{ts,tsx,js,jsx,json,css,scss,html}\" --check",
24
+ "generate:licenses": "npm-license-crawler -onlyDirectDependencies -json LICENSES.json",
25
+ "precommit": "yarn build && yarn generate:licenses && yarn prettier && yarn test"
24
26
  },
25
27
  "repository": {
26
28
  "type": "git",
27
- "url": "git+https://github.com/brightlayer-ui/react-native-themes.git"
29
+ "url": "git+https://github.com/etn-ccis/blui-react-native-themes.git"
28
30
  },
29
31
  "bugs": {
30
- "url": "https://github.com/brightlayer-ui/react-native-themes/issues"
32
+ "url": "https://github.com/etn-ccis/blui-react-native-themes/issues"
31
33
  },
32
- "homepage": "https://github.com/brightlayer-ui/react-native-themes/tree/master",
34
+ "homepage": "https://github.com/etn-ccis/blui-react-native-themes/tree/master",
33
35
  "keywords": [
34
36
  "Brightlayer UI",
35
37
  "themes",
@@ -37,24 +39,28 @@
37
39
  "React Native"
38
40
  ],
39
41
  "dependencies": {
40
- "@brightlayer-ui/colors": "^3.0.0",
41
- "color": "^3.1.3"
42
+ "@brightlayer-ui/colors": "4.0.0",
43
+ "color": "^4.2.3"
42
44
  },
43
45
  "peerDependencies": {
44
- "react-native-paper": "^3.0.0 || ^4.0.0"
46
+ "react-native-paper": "^5.0.0"
45
47
  },
46
48
  "devDependencies": {
47
49
  "@brightlayer-ui/prettier-config": "^1.0.3",
48
50
  "@types/color": "^3.0.1",
49
- "prettier": "^2.4.1",
50
- "react-native-paper": "^4.0.0",
51
- "typescript": "^3.7.2"
51
+ "npm-license-crawler": "^0.2.1",
52
+ "prettier": "^3.0.0",
53
+ "react-native-paper": "^5.0.0",
54
+ "typescript": "^5.0.4",
55
+ "react-native": "~0.72.6",
56
+ "react": "^18.2.0"
52
57
  },
53
58
  "prettier": "@brightlayer-ui/prettier-config",
54
59
  "files": [
55
60
  "package.json",
56
61
  "README.md",
57
62
  "LICENSE",
63
+ "LICENSES.json",
58
64
  "CHANGELOG.md",
59
65
  "/dist"
60
66
  ]