dhre-ui-kit 0.0.1 → 0.0.3
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/package.json +6 -5
- package/src/assets/fonts/MeraasAktiv_Bd.ttf +0 -0
- package/src/assets/fonts/MeraasAktiv_Lt.ttf +0 -0
- package/src/assets/fonts/MeraasAktiv_Rg.ttf +0 -0
- package/src/components/badge/Badge.test.tsx +12 -0
- package/src/components/badge/Badge.tsx +2 -1
- package/src/components/customText/CustomText.tsx +3 -1
- package/src/index.ts +1 -1
- package/src/theme/ThemeContext.tsx +12 -6
- package/src/theme/fonts.ts +67 -292
- package/src/theme/themes.ts +81 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dhre-ui-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"main": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -26,9 +26,10 @@
|
|
|
26
26
|
"lint-staged": "^15.2.7",
|
|
27
27
|
"react": "18.2.0",
|
|
28
28
|
"react-native": "0.74.3",
|
|
29
|
-
"react-native-
|
|
30
|
-
"react-native-pdf": "^6.7.1",
|
|
29
|
+
"react-native-blob-util": "^0.19.11",
|
|
31
30
|
"react-native-gesture-handler": "2.17.0",
|
|
31
|
+
"react-native-otp-verify": "^1.1.8",
|
|
32
|
+
"react-native-pdf": "^6.7.5",
|
|
32
33
|
"react-native-progress": "^5.0.1",
|
|
33
34
|
"react-native-svg": "^15.4.0",
|
|
34
35
|
"react-native-svg-transformer": "^1.5.0",
|
|
@@ -37,8 +38,8 @@
|
|
|
37
38
|
"rn-tooltip": "^3.0.3"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@babel/core": "^7.
|
|
41
|
-
"@babel/preset-env": "^7.25.
|
|
41
|
+
"@babel/core": "^7.25.2",
|
|
42
|
+
"@babel/preset-env": "^7.25.4",
|
|
42
43
|
"@babel/runtime": "^7.20.0",
|
|
43
44
|
"@eslint/js": "^9.7.0",
|
|
44
45
|
"@react-native/babel-preset": "0.74.85",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {render, screen} from '@testing-library/react-native';
|
|
3
3
|
import Badge from './Badge';
|
|
4
|
+
import {useSelector} from 'react-redux';
|
|
5
|
+
|
|
6
|
+
// Mock the useSelector hook
|
|
4
7
|
|
|
5
8
|
describe('Badge component', () => {
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
(useSelector as unknown as jest.Mock).mockImplementation(() => {
|
|
11
|
+
return 'light';
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
|
|
6
15
|
it('renders text correctly', () => {
|
|
7
16
|
const text = 'Test Badge';
|
|
8
17
|
render(
|
|
@@ -26,6 +35,7 @@ describe('Badge component', () => {
|
|
|
26
35
|
}}
|
|
27
36
|
/>,
|
|
28
37
|
);
|
|
38
|
+
// Your assertions here
|
|
29
39
|
});
|
|
30
40
|
|
|
31
41
|
it('renders with custom style', () => {
|
|
@@ -41,5 +51,7 @@ describe('Badge component', () => {
|
|
|
41
51
|
|
|
42
52
|
const badge = screen.getByTestId('BADGE');
|
|
43
53
|
expect(badge).toBeDefined();
|
|
54
|
+
// You can also check if the custom style is applied correctly
|
|
55
|
+
expect(badge.props.style).toContainEqual(customStyle);
|
|
44
56
|
});
|
|
45
57
|
});
|
|
@@ -4,6 +4,7 @@ import commonStyles from '../../utils/commonStyles';
|
|
|
4
4
|
import styles from './Badge.styles';
|
|
5
5
|
import {SvgProps} from 'react-native-svg';
|
|
6
6
|
import CustomTypography from '../customTypography/CustomTypography';
|
|
7
|
+
import {withThemeProvider} from '../../theme/withThemeProvider';
|
|
7
8
|
|
|
8
9
|
interface BadgeProps {
|
|
9
10
|
text?: string;
|
|
@@ -44,4 +45,4 @@ const Badge: React.FC<BadgeProps> = ({
|
|
|
44
45
|
);
|
|
45
46
|
};
|
|
46
47
|
|
|
47
|
-
export default Badge;
|
|
48
|
+
export default withThemeProvider(Badge);
|
|
@@ -9,12 +9,14 @@ interface CustomTextProps extends TextProps {
|
|
|
9
9
|
text: string;
|
|
10
10
|
variant: keyof typeof FONT_STYLES | string;
|
|
11
11
|
style?: TextStyle;
|
|
12
|
+
textColor?: string;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
const CustomText: React.FC<CustomTextProps> = ({
|
|
15
16
|
text,
|
|
16
17
|
style,
|
|
17
18
|
variant,
|
|
19
|
+
textColor = 'SURFACE_STATIC',
|
|
18
20
|
...props
|
|
19
21
|
}) => {
|
|
20
22
|
const {theme} = useTheme();
|
|
@@ -22,7 +24,7 @@ const CustomText: React.FC<CustomTextProps> = ({
|
|
|
22
24
|
<CustomTypography
|
|
23
25
|
variant={variant}
|
|
24
26
|
text={text || ''}
|
|
25
|
-
style={[{color: theme
|
|
27
|
+
style={[{color: theme[textColor]}, style]}
|
|
26
28
|
{...props}
|
|
27
29
|
/>
|
|
28
30
|
);
|
package/src/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ export {default as CustomDropdown} from './components/customDropdown';
|
|
|
9
9
|
export {default as CustomTextInput} from './components/customInputText';
|
|
10
10
|
export {default as CustomTooltip} from './components/customTooltip';
|
|
11
11
|
export {default as FileUpload} from './components/fileUpload';
|
|
12
|
-
|
|
12
|
+
export {default as PdfView} from './components/pdfView';
|
|
13
13
|
export {default as PopUp} from './components/popup';
|
|
14
14
|
export {default as CustomProgressBar} from './components/progressBar';
|
|
15
15
|
export {default as Property360View} from './components/property360View';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, {createContext, useContext, ReactNode} from 'react';
|
|
2
|
-
import {lightTheme, darkTheme} from './themes';
|
|
3
2
|
import {useSelector} from 'react-redux';
|
|
3
|
+
import theme from './themes';
|
|
4
4
|
|
|
5
5
|
interface ThemeContextType {
|
|
6
|
-
theme:
|
|
6
|
+
theme: Record<string, string>;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const ThemeContext = createContext<ThemeContextType | undefined>(undefined);
|
|
@@ -14,12 +14,18 @@ interface ThemeProviderProps {
|
|
|
14
14
|
|
|
15
15
|
export const ThemeProvider: React.FC<ThemeProviderProps> = ({children}) => {
|
|
16
16
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
-
const
|
|
18
|
-
//
|
|
19
|
-
//
|
|
17
|
+
const mode = useSelector((state: any) => state.theme.currentTheme);
|
|
18
|
+
// const mode = 'light'
|
|
19
|
+
// Filter the theme based on the mode (light or dark)
|
|
20
|
+
const filteredTheme = Object.keys(theme).reduce((acc, key) => {
|
|
21
|
+
acc[key] = theme[key][mode];
|
|
22
|
+
return acc;
|
|
23
|
+
}, {} as Record<string, string>);
|
|
20
24
|
|
|
21
25
|
return (
|
|
22
|
-
<ThemeContext.Provider value={{theme}}>
|
|
26
|
+
<ThemeContext.Provider value={{theme: filteredTheme}}>
|
|
27
|
+
{children}
|
|
28
|
+
</ThemeContext.Provider>
|
|
23
29
|
);
|
|
24
30
|
};
|
|
25
31
|
|
package/src/theme/fonts.ts
CHANGED
|
@@ -1,303 +1,78 @@
|
|
|
1
1
|
import {TextStyle} from 'react-native';
|
|
2
2
|
import {moderateScale, verticalScale} from '../utils/stylehelper';
|
|
3
3
|
|
|
4
|
-
const boldWeight = '700';
|
|
5
|
-
const semiboldWeight = '600';
|
|
6
|
-
const mediumWeight = '500';
|
|
7
|
-
const regularWeight = '400';
|
|
8
4
|
interface FontStyles {
|
|
9
5
|
[key: string]: TextStyle;
|
|
10
6
|
}
|
|
11
7
|
|
|
8
|
+
const createFontStyle = (
|
|
9
|
+
fontFamily: string,
|
|
10
|
+
fontSize: number,
|
|
11
|
+
lineHeight: number,
|
|
12
|
+
): TextStyle => ({
|
|
13
|
+
fontSize: moderateScale(fontSize),
|
|
14
|
+
lineHeight: verticalScale(lineHeight),
|
|
15
|
+
fontFamily,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const meraasActivFontfamily: TextStyle = {
|
|
19
|
+
fontFamily: 'MeraasAktiv_Rg'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const serifActivFontfamily: TextStyle = {
|
|
23
|
+
fontFamily: 'PT Serif'
|
|
24
|
+
}
|
|
25
|
+
|
|
12
26
|
export const FONT_STYLES: FontStyles = {
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
H3medium: {
|
|
55
|
-
fontWeight: mediumWeight,
|
|
56
|
-
fontSize: moderateScale(28),
|
|
57
|
-
lineHeight: verticalScale(36),
|
|
58
|
-
} as TextStyle,
|
|
59
|
-
H4bold: {
|
|
60
|
-
fontWeight: boldWeight,
|
|
61
|
-
fontSize: moderateScale(24),
|
|
62
|
-
lineHeight: verticalScale(32),
|
|
63
|
-
} as TextStyle,
|
|
64
|
-
H4semiBold: {
|
|
65
|
-
fontWeight: semiboldWeight,
|
|
66
|
-
fontSize: moderateScale(24),
|
|
67
|
-
lineHeight: verticalScale(32),
|
|
68
|
-
} as TextStyle,
|
|
69
|
-
H4medium: {
|
|
70
|
-
fontWeight: mediumWeight,
|
|
71
|
-
fontSize: moderateScale(24),
|
|
72
|
-
lineHeight: verticalScale(32),
|
|
73
|
-
} as TextStyle,
|
|
74
|
-
H5bold: {
|
|
75
|
-
fontWeight: boldWeight,
|
|
76
|
-
fontSize: moderateScale(20),
|
|
77
|
-
lineHeight: verticalScale(28),
|
|
78
|
-
} as TextStyle,
|
|
79
|
-
H5semiBold: {
|
|
80
|
-
fontWeight: semiboldWeight,
|
|
81
|
-
fontSize: moderateScale(20),
|
|
82
|
-
lineHeight: verticalScale(28),
|
|
83
|
-
} as TextStyle,
|
|
84
|
-
H5medium: {
|
|
85
|
-
fontWeight: mediumWeight,
|
|
86
|
-
fontSize: moderateScale(20),
|
|
87
|
-
lineHeight: verticalScale(28),
|
|
88
|
-
} as TextStyle,
|
|
89
|
-
H6bold: {
|
|
90
|
-
fontWeight: boldWeight,
|
|
91
|
-
fontSize: moderateScale(18),
|
|
92
|
-
lineHeight: verticalScale(24),
|
|
93
|
-
} as TextStyle,
|
|
94
|
-
H6semiBold: {
|
|
95
|
-
fontWeight: semiboldWeight,
|
|
96
|
-
fontSize: moderateScale(18),
|
|
97
|
-
lineHeight: verticalScale(24),
|
|
98
|
-
} as TextStyle,
|
|
99
|
-
H6medium: {
|
|
100
|
-
fontWeight: mediumWeight,
|
|
101
|
-
fontSize: moderateScale(18),
|
|
102
|
-
lineHeight: verticalScale(24),
|
|
103
|
-
} as TextStyle,
|
|
104
|
-
H7bold: {
|
|
105
|
-
fontWeight: boldWeight,
|
|
106
|
-
fontSize: moderateScale(16),
|
|
107
|
-
lineHeight: verticalScale(24),
|
|
108
|
-
} as TextStyle,
|
|
109
|
-
H7semiBold: {
|
|
110
|
-
fontWeight: semiboldWeight,
|
|
111
|
-
fontSize: moderateScale(16),
|
|
112
|
-
lineHeight: verticalScale(24),
|
|
113
|
-
} as TextStyle,
|
|
114
|
-
H7medium: {
|
|
115
|
-
fontWeight: mediumWeight,
|
|
116
|
-
fontSize: moderateScale(16),
|
|
117
|
-
lineHeight: verticalScale(24),
|
|
118
|
-
} as TextStyle,
|
|
119
|
-
H8bold: {
|
|
120
|
-
fontWeight: boldWeight,
|
|
121
|
-
fontSize: moderateScale(14),
|
|
122
|
-
lineHeight: verticalScale(22),
|
|
123
|
-
} as TextStyle,
|
|
124
|
-
H8semiBold: {
|
|
125
|
-
fontWeight: semiboldWeight,
|
|
126
|
-
fontSize: moderateScale(14),
|
|
127
|
-
lineHeight: verticalScale(22),
|
|
128
|
-
} as TextStyle,
|
|
129
|
-
H8medium: {
|
|
130
|
-
fontWeight: mediumWeight,
|
|
131
|
-
fontSize: moderateScale(14),
|
|
132
|
-
lineHeight: verticalScale(22),
|
|
133
|
-
} as TextStyle,
|
|
134
|
-
H9bold: {
|
|
135
|
-
fontWeight: boldWeight,
|
|
136
|
-
fontSize: moderateScale(12),
|
|
137
|
-
lineHeight: verticalScale(16),
|
|
138
|
-
} as TextStyle,
|
|
139
|
-
H9semiBold: {
|
|
140
|
-
fontWeight: semiboldWeight,
|
|
141
|
-
fontSize: moderateScale(12),
|
|
142
|
-
lineHeight: verticalScale(16),
|
|
143
|
-
} as TextStyle,
|
|
144
|
-
H9medium: {
|
|
145
|
-
fontWeight: mediumWeight,
|
|
146
|
-
fontSize: moderateScale(12),
|
|
147
|
-
lineHeight: verticalScale(16),
|
|
148
|
-
} as TextStyle,
|
|
27
|
+
// Bold headding styles
|
|
28
|
+
H1_BOLD: createFontStyle('MeraasAktiv_Bd', 40, 56),
|
|
29
|
+
H2_BOLD: createFontStyle('MeraasAktiv_Bd', 36, 50.4),
|
|
30
|
+
H3_BOLD: createFontStyle('MeraasAktiv_Bd', 32, 44.8),
|
|
31
|
+
H4_BOLD: createFontStyle('MeraasAktiv_Bd', 26, 36.4),
|
|
32
|
+
H5_BOLD: createFontStyle('MeraasAktiv_Bd', 24, 33.6),
|
|
33
|
+
H6_BOLD: createFontStyle('MeraasAktiv_Bd', 22, 30.8),
|
|
34
|
+
H7_BOLD: createFontStyle('MeraasAktiv_Bd', 20, 28),
|
|
35
|
+
H8_BOLD: createFontStyle('MeraasAktiv_Bd', 18, 25.2),
|
|
36
|
+
|
|
37
|
+
// Regular headding styles
|
|
38
|
+
H1_REGULAR: createFontStyle('MeraasAktiv_Rg', 40, 56),
|
|
39
|
+
H2_REGULAR: createFontStyle('MeraasAktiv_Rg', 36, 50.4),
|
|
40
|
+
H3_REGULAR: createFontStyle('MeraasAktiv_Rg', 32, 44.8),
|
|
41
|
+
H4_REGULAR: createFontStyle('MeraasAktiv_Rg', 26, 36.4),
|
|
42
|
+
H5_REGULAR: createFontStyle('MeraasAktiv_Rg', 24, 33.6),
|
|
43
|
+
H6_REGULAR: createFontStyle('MeraasAktiv_Rg', 22, 30.8),
|
|
44
|
+
H7_REGULAR: createFontStyle('MeraasAktiv_Rg', 20, 28),
|
|
45
|
+
H8_REGULAR: createFontStyle('MeraasAktiv_Rg', 18, 25.2),
|
|
46
|
+
|
|
47
|
+
// Light headding styles
|
|
48
|
+
H1_LIGHT: createFontStyle('MeraasAktiv_Lt', 40, 56),
|
|
49
|
+
H2_LIGHT: createFontStyle('MeraasAktiv_Lt', 36, 50.4),
|
|
50
|
+
H3_LIGHT: createFontStyle('MeraasAktiv_Lt', 32, 44.8),
|
|
51
|
+
H4_LIGHT: createFontStyle('MeraasAktiv_Lt', 26, 36.4),
|
|
52
|
+
H5_LIGHT: createFontStyle('MeraasAktiv_Lt', 24, 33.6),
|
|
53
|
+
H6_LIGHT: createFontStyle('MeraasAktiv_Lt', 22, 30.8),
|
|
54
|
+
H7_LIGHT: createFontStyle('MeraasAktiv_Lt', 20, 28),
|
|
55
|
+
H8_LIGHT: createFontStyle('MeraasAktiv_Lt', 18, 25.2),
|
|
56
|
+
|
|
57
|
+
// Bold body styles
|
|
58
|
+
B1_BOLD: createFontStyle('MeraasAktiv_Bd', 20, 28),
|
|
59
|
+
B2_BOLD: createFontStyle('MeraasAktiv_Bd', 18, 25.2),
|
|
60
|
+
B3_BOLD: createFontStyle('MeraasAktiv_Bd', 16, 22.4),
|
|
61
|
+
B4_BOLD: createFontStyle('MeraasAktiv_Bd', 14, 22.4),
|
|
62
|
+
|
|
63
|
+
// Regular body styles
|
|
64
|
+
B1_REGULAR: createFontStyle('MeraasAktiv_Rg', 20, 28),
|
|
65
|
+
B2_REGULAR: createFontStyle('MeraasAktiv_Rg', 18, 25.2),
|
|
66
|
+
B3_REGULAR: createFontStyle('MeraasAktiv_Rg', 16, 22.4),
|
|
67
|
+
B4_REGULAR: createFontStyle('MeraasAktiv_Rg', 14, 22.4),
|
|
149
68
|
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
lineHeight: verticalScale(24),
|
|
155
|
-
} as TextStyle,
|
|
156
|
-
P1semiBold: {
|
|
157
|
-
fontWeight: semiboldWeight,
|
|
158
|
-
fontSize: moderateScale(18),
|
|
159
|
-
lineHeight: verticalScale(24),
|
|
160
|
-
} as TextStyle,
|
|
161
|
-
P1medium: {
|
|
162
|
-
fontWeight: mediumWeight,
|
|
163
|
-
fontSize: moderateScale(18),
|
|
164
|
-
lineHeight: verticalScale(24),
|
|
165
|
-
} as TextStyle,
|
|
166
|
-
P2regular: {
|
|
167
|
-
fontWeight: regularWeight,
|
|
168
|
-
fontSize: moderateScale(16),
|
|
169
|
-
lineHeight: verticalScale(24),
|
|
170
|
-
} as TextStyle,
|
|
171
|
-
P2semiBold: {
|
|
172
|
-
fontWeight: semiboldWeight,
|
|
173
|
-
fontSize: moderateScale(16),
|
|
174
|
-
lineHeight: verticalScale(24),
|
|
175
|
-
} as TextStyle,
|
|
176
|
-
P2medium: {
|
|
177
|
-
fontWeight: mediumWeight,
|
|
178
|
-
fontSize: moderateScale(16),
|
|
179
|
-
lineHeight: verticalScale(24),
|
|
180
|
-
} as TextStyle,
|
|
181
|
-
P3regular: {
|
|
182
|
-
fontWeight: regularWeight,
|
|
183
|
-
fontSize: moderateScale(14),
|
|
184
|
-
lineHeight: verticalScale(22),
|
|
185
|
-
} as TextStyle,
|
|
186
|
-
P3semiBold: {
|
|
187
|
-
fontWeight: semiboldWeight,
|
|
188
|
-
fontSize: moderateScale(14),
|
|
189
|
-
lineHeight: verticalScale(22),
|
|
190
|
-
} as TextStyle,
|
|
191
|
-
P3medium: {
|
|
192
|
-
fontWeight: mediumWeight,
|
|
193
|
-
fontSize: moderateScale(14),
|
|
194
|
-
lineHeight: verticalScale(22),
|
|
195
|
-
} as TextStyle,
|
|
196
|
-
P4regular: {
|
|
197
|
-
fontWeight: regularWeight,
|
|
198
|
-
fontSize: moderateScale(12),
|
|
199
|
-
lineHeight: verticalScale(16),
|
|
200
|
-
} as TextStyle,
|
|
201
|
-
P4semiBold: {
|
|
202
|
-
fontWeight: semiboldWeight,
|
|
203
|
-
fontSize: moderateScale(12),
|
|
204
|
-
lineHeight: verticalScale(16),
|
|
205
|
-
} as TextStyle,
|
|
206
|
-
P4medium: {
|
|
207
|
-
fontWeight: mediumWeight,
|
|
208
|
-
fontSize: moderateScale(12),
|
|
209
|
-
lineHeight: verticalScale(16),
|
|
210
|
-
} as TextStyle,
|
|
211
|
-
P5bold: {
|
|
212
|
-
fontWeight: boldWeight,
|
|
213
|
-
fontSize: moderateScale(11),
|
|
214
|
-
lineHeight: verticalScale(16),
|
|
215
|
-
} as TextStyle,
|
|
216
|
-
P5semiBold: {
|
|
217
|
-
fontWeight: semiboldWeight,
|
|
218
|
-
fontSize: moderateScale(11),
|
|
219
|
-
lineHeight: verticalScale(16),
|
|
220
|
-
} as TextStyle,
|
|
221
|
-
P5medium: {
|
|
222
|
-
fontWeight: mediumWeight,
|
|
223
|
-
fontSize: moderateScale(11),
|
|
224
|
-
lineHeight: verticalScale(16),
|
|
225
|
-
} as TextStyle,
|
|
69
|
+
// Bold Label styles
|
|
70
|
+
L1_BOLD: createFontStyle('MeraasAktiv_Bd', 14, 19.6),
|
|
71
|
+
L2_BOLD: createFontStyle('MeraasAktiv_Bd', 12, 16.8),
|
|
72
|
+
L3_BOLD: createFontStyle('MeraasAktiv_Bd', 10, 14),
|
|
226
73
|
|
|
227
|
-
//
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
lineHeight: verticalScale(20),
|
|
232
|
-
} as TextStyle,
|
|
233
|
-
B1semiBold: {
|
|
234
|
-
fontWeight: semiboldWeight,
|
|
235
|
-
fontSize: moderateScale(16),
|
|
236
|
-
lineHeight: verticalScale(20),
|
|
237
|
-
} as TextStyle,
|
|
238
|
-
B1medium: {
|
|
239
|
-
fontWeight: mediumWeight,
|
|
240
|
-
fontSize: moderateScale(16),
|
|
241
|
-
lineHeight: verticalScale(20),
|
|
242
|
-
} as TextStyle,
|
|
243
|
-
B2bold: {
|
|
244
|
-
fontWeight: regularWeight,
|
|
245
|
-
fontSize: moderateScale(14),
|
|
246
|
-
lineHeight: verticalScale(20),
|
|
247
|
-
} as TextStyle,
|
|
248
|
-
B2semiBold: {
|
|
249
|
-
fontWeight: semiboldWeight,
|
|
250
|
-
fontSize: moderateScale(14),
|
|
251
|
-
lineHeight: verticalScale(20),
|
|
252
|
-
} as TextStyle,
|
|
253
|
-
B2medium: {
|
|
254
|
-
fontWeight: mediumWeight,
|
|
255
|
-
fontSize: moderateScale(14),
|
|
256
|
-
lineHeight: verticalScale(20),
|
|
257
|
-
} as TextStyle,
|
|
258
|
-
B3bold: {
|
|
259
|
-
fontWeight: regularWeight,
|
|
260
|
-
fontSize: moderateScale(12),
|
|
261
|
-
lineHeight: verticalScale(16),
|
|
262
|
-
} as TextStyle,
|
|
263
|
-
B3semiBold: {
|
|
264
|
-
fontWeight: semiboldWeight,
|
|
265
|
-
fontSize: moderateScale(12),
|
|
266
|
-
lineHeight: verticalScale(16),
|
|
267
|
-
} as TextStyle,
|
|
268
|
-
B3medium: {
|
|
269
|
-
fontWeight: mediumWeight,
|
|
270
|
-
fontSize: moderateScale(12),
|
|
271
|
-
lineHeight: verticalScale(16),
|
|
272
|
-
} as TextStyle,
|
|
273
|
-
B4bold: {
|
|
274
|
-
fontWeight: regularWeight,
|
|
275
|
-
fontSize: moderateScale(10),
|
|
276
|
-
lineHeight: verticalScale(12),
|
|
277
|
-
} as TextStyle,
|
|
278
|
-
B4semiBold: {
|
|
279
|
-
fontWeight: semiboldWeight,
|
|
280
|
-
fontSize: moderateScale(10),
|
|
281
|
-
lineHeight: verticalScale(12),
|
|
282
|
-
} as TextStyle,
|
|
283
|
-
B4medium: {
|
|
284
|
-
fontWeight: mediumWeight,
|
|
285
|
-
fontSize: moderateScale(10),
|
|
286
|
-
lineHeight: verticalScale(12),
|
|
287
|
-
} as TextStyle,
|
|
288
|
-
B5bold: {
|
|
289
|
-
fontWeight: boldWeight,
|
|
290
|
-
fontSize: moderateScale(9),
|
|
291
|
-
lineHeight: verticalScale(12),
|
|
292
|
-
} as TextStyle,
|
|
293
|
-
B5semiBold: {
|
|
294
|
-
fontWeight: semiboldWeight,
|
|
295
|
-
fontSize: moderateScale(9),
|
|
296
|
-
lineHeight: verticalScale(12),
|
|
297
|
-
} as TextStyle,
|
|
298
|
-
B5medium: {
|
|
299
|
-
fontWeight: mediumWeight,
|
|
300
|
-
fontSize: moderateScale(9),
|
|
301
|
-
lineHeight: verticalScale(12),
|
|
302
|
-
} as TextStyle,
|
|
74
|
+
// Regular Label styles
|
|
75
|
+
L1_REGULAR: createFontStyle('MeraasAktiv_Rg', 14, 19.6),
|
|
76
|
+
L2_REGULAR: createFontStyle('MeraasAktiv_Rg', 12, 16.8),
|
|
77
|
+
L3_REGULAR: createFontStyle('MeraasAktiv_Rg', 10, 14),
|
|
303
78
|
};
|
package/src/theme/themes.ts
CHANGED
|
@@ -1,20 +1,85 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
const theme = {
|
|
2
|
+
SURFACE_PRIMARY: {
|
|
3
|
+
light: '#FFFFFF',
|
|
4
|
+
dark: '#404040',
|
|
5
|
+
},
|
|
6
|
+
SURFACE_SECONDARY: {
|
|
7
|
+
light: '#F5F5F5',
|
|
8
|
+
dark: '#212121',
|
|
9
|
+
},
|
|
10
|
+
SURFACE_STATIC: {
|
|
11
|
+
light: '#FFFFFF',
|
|
12
|
+
dark: '#FFFFFF',
|
|
13
|
+
},
|
|
14
|
+
SURFACE_BRAND_STATIC: {
|
|
15
|
+
light: '#D92D27',
|
|
16
|
+
dark: '#D92D27',
|
|
17
|
+
},
|
|
18
|
+
SURFACE_BRAND_TRANSPARENT_STATIC: {
|
|
19
|
+
light: '#D92D3E',
|
|
20
|
+
dark: '#D92D3E',
|
|
21
|
+
},
|
|
22
|
+
SURFACE_DISABLE: {
|
|
23
|
+
light: '#E1E1E1',
|
|
24
|
+
dark: '#A7A7A7',
|
|
25
|
+
},
|
|
26
|
+
SURFACE_INVERTED_TRANSPARENT: {
|
|
27
|
+
light: '#686868',
|
|
28
|
+
dark: '#FFFFFF',
|
|
8
29
|
},
|
|
9
|
-
};
|
|
10
30
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
31
|
+
CONTENT_PRIMARY: {
|
|
32
|
+
light: '#000000',
|
|
33
|
+
dark: '#FFFFFF',
|
|
34
|
+
},
|
|
35
|
+
CONTENT_SECONDRY: {
|
|
36
|
+
light: '#686868',
|
|
37
|
+
dark: '#A7A7A7',
|
|
38
|
+
},
|
|
39
|
+
CONTENT_DISABLE: {
|
|
40
|
+
light: '#A7A7A7',
|
|
41
|
+
dark: '#686868',
|
|
42
|
+
},
|
|
43
|
+
CONTENT_INVERTED: {
|
|
44
|
+
light: '#FFFFFF',
|
|
45
|
+
dark: '#000000',
|
|
46
|
+
},
|
|
47
|
+
CONTENT_STATIC: {
|
|
48
|
+
light: '#FFFFFF',
|
|
49
|
+
dark: '#FFFFFF',
|
|
50
|
+
},
|
|
51
|
+
CONTENT_SECONDRY_STATIC: {
|
|
52
|
+
light: '#CECECE',
|
|
53
|
+
dark: '##CECECE',
|
|
17
54
|
},
|
|
18
|
-
};
|
|
19
55
|
|
|
20
|
-
|
|
56
|
+
BODER_PRIMARY: {
|
|
57
|
+
light: '#686868',
|
|
58
|
+
dark: '#404040',
|
|
59
|
+
},
|
|
60
|
+
BODER_SECONDRY: {
|
|
61
|
+
light: '#A7A7A7',
|
|
62
|
+
dark: '#686868',
|
|
63
|
+
},
|
|
64
|
+
BODER_DISABLE: {
|
|
65
|
+
light: '#CECECE',
|
|
66
|
+
dark: '#4F4F4F',
|
|
67
|
+
},
|
|
68
|
+
BODER_INVERTED: {
|
|
69
|
+
light: '#000000',
|
|
70
|
+
dark: '#FFFFFF',
|
|
71
|
+
},
|
|
72
|
+
BODER_BRAND_STATIC: {
|
|
73
|
+
light: '#D92D27',
|
|
74
|
+
dark: '#D92D27',
|
|
75
|
+
},
|
|
76
|
+
BODER_BRAND_TRANSPARENT_STATIC: {
|
|
77
|
+
light: '#D92D3E',
|
|
78
|
+
dark: '#D92D3E',
|
|
79
|
+
},
|
|
80
|
+
BODER_STATIC: {
|
|
81
|
+
light: '#FFFFFF',
|
|
82
|
+
dark: '#FFFFFF',
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
export default theme;
|