@alveole/theme 0.41.0 → 0.42.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/README.md
CHANGED
|
@@ -123,8 +123,8 @@ Pour créer des styles typés avec la bonne font selon la plateforme :
|
|
|
123
123
|
import { fontStyle } from '@alveole/theme';
|
|
124
124
|
|
|
125
125
|
const style = {
|
|
126
|
-
...fontStyle('Inter-
|
|
127
|
-
fontSize: 16, // { fontFamily: 'Inter-
|
|
126
|
+
...fontStyle('Inter-Bold'), // { fontFamily: 'Inter', fontWeight: '600' } sur web
|
|
127
|
+
fontSize: 16, // { fontFamily: 'Inter-Bold' } sur native
|
|
128
128
|
};
|
|
129
129
|
```
|
|
130
130
|
|
package/dist/constants/Font.d.ts
CHANGED
|
@@ -3,12 +3,10 @@ export declare const FontsMap: {
|
|
|
3
3
|
readonly 'Barlow-Light': any;
|
|
4
4
|
readonly 'Barlow-Regular': any;
|
|
5
5
|
readonly 'Barlow-Medium': any;
|
|
6
|
-
readonly 'Barlow-SemiBold': any;
|
|
7
6
|
readonly 'Barlow-Bold': any;
|
|
8
7
|
readonly 'Inter-Light': any;
|
|
9
8
|
readonly 'Inter-Regular': any;
|
|
10
9
|
readonly 'Inter-Medium': any;
|
|
11
|
-
readonly 'Inter-SemiBold': any;
|
|
12
10
|
readonly 'Inter-Bold': any;
|
|
13
11
|
};
|
|
14
12
|
export type Font = keyof typeof FontsMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Font.d.ts","sourceRoot":"","sources":["../../src/constants/Font.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,cAAc,CAAC;AAEnD,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"Font.d.ts","sourceRoot":"","sources":["../../src/constants/Font.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,cAAc,CAAC;AAEnD,eAAO,MAAM,QAAQ;;;;;;;;;CAWX,CAAC;AAGX,MAAM,MAAM,IAAI,GAAG,MAAM,OAAO,QAAQ,CAAC;AACzC,eAAO,MAAM,KAAK,EAA0E,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAI/G,eAAO,MAAM,aAAa,EAAE,MAAM,CAChC,IAAI,EACJ;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAA;CAAE,CAU7F,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,KAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAA;CAIhG,CAAC"}
|
package/dist/constants/Font.js
CHANGED
|
@@ -4,14 +4,12 @@ export const FontsMap = {
|
|
|
4
4
|
'Barlow-Light': require('../../assets/fonts/Barlow/Barlow-Light.ttf'),
|
|
5
5
|
'Barlow-Regular': require('../../assets/fonts/Barlow/Barlow-Regular.ttf'),
|
|
6
6
|
'Barlow-Medium': require('../../assets/fonts/Barlow/Barlow-Medium.ttf'),
|
|
7
|
-
'Barlow-
|
|
8
|
-
'Barlow-Bold': require('../../assets/fonts/Barlow/Barlow-Bold.ttf'),
|
|
7
|
+
'Barlow-Bold': require('../../assets/fonts/Barlow/Barlow-SemiBold.ttf'),
|
|
9
8
|
// Inter
|
|
10
9
|
'Inter-Light': require('../../assets/fonts/Inter/Inter-Light.ttf'),
|
|
11
10
|
'Inter-Regular': require('../../assets/fonts/Inter/Inter-Regular.ttf'),
|
|
12
11
|
'Inter-Medium': require('../../assets/fonts/Inter/Inter-Medium.ttf'),
|
|
13
|
-
'Inter-
|
|
14
|
-
'Inter-Bold': require('../../assets/fonts/Inter/Inter-Bold.ttf'),
|
|
12
|
+
'Inter-Bold': require('../../assets/fonts/Inter/Inter-SemiBold.ttf'),
|
|
15
13
|
};
|
|
16
14
|
export const Fonts = Object.fromEntries(Object.keys(FontsMap).map(font => [font, font]));
|
|
17
15
|
const SANS_SERIF_FALLBACK = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif";
|
|
@@ -19,13 +17,11 @@ export const FontWeightMap = {
|
|
|
19
17
|
'Barlow-Light': { family: 'Barlow', familyWithFallback: `Barlow, ${SANS_SERIF_FALLBACK}`, weight: '300' },
|
|
20
18
|
'Barlow-Regular': { family: 'Barlow', familyWithFallback: `Barlow, ${SANS_SERIF_FALLBACK}`, weight: '400' },
|
|
21
19
|
'Barlow-Medium': { family: 'Barlow', familyWithFallback: `Barlow, ${SANS_SERIF_FALLBACK}`, weight: '500' },
|
|
22
|
-
'Barlow-
|
|
23
|
-
'Barlow-Bold': { family: 'Barlow', familyWithFallback: `Barlow, ${SANS_SERIF_FALLBACK}`, weight: '700' },
|
|
20
|
+
'Barlow-Bold': { family: 'Barlow', familyWithFallback: `Barlow, ${SANS_SERIF_FALLBACK}`, weight: '600' },
|
|
24
21
|
'Inter-Light': { family: 'Inter', familyWithFallback: `Inter, ${SANS_SERIF_FALLBACK}`, weight: '300' },
|
|
25
22
|
'Inter-Regular': { family: 'Inter', familyWithFallback: `Inter, ${SANS_SERIF_FALLBACK}`, weight: '400' },
|
|
26
23
|
'Inter-Medium': { family: 'Inter', familyWithFallback: `Inter, ${SANS_SERIF_FALLBACK}`, weight: '500' },
|
|
27
|
-
'Inter-
|
|
28
|
-
'Inter-Bold': { family: 'Inter', familyWithFallback: `Inter, ${SANS_SERIF_FALLBACK}`, weight: '700' },
|
|
24
|
+
'Inter-Bold': { family: 'Inter', familyWithFallback: `Inter, ${SANS_SERIF_FALLBACK}`, weight: '600' },
|
|
29
25
|
};
|
|
30
26
|
export const fontStyle = (font) => {
|
|
31
27
|
if (Platform.OS !== 'web')
|
|
@@ -90,40 +90,40 @@ export declare const CustomTypography: {
|
|
|
90
90
|
};
|
|
91
91
|
readonly 'Corps de texte': {
|
|
92
92
|
readonly XS: {
|
|
93
|
-
readonly
|
|
93
|
+
readonly CapsBold: {
|
|
94
94
|
readonly fontSize: 12;
|
|
95
95
|
readonly lineHeight: 20;
|
|
96
96
|
readonly letterSpacing: 0;
|
|
97
|
-
readonly
|
|
98
|
-
readonly fontWeight?: import("react-native").TextStyle["fontWeight"];
|
|
97
|
+
readonly textTransform: "uppercase";
|
|
99
98
|
};
|
|
100
|
-
readonly
|
|
99
|
+
readonly SemiBold: {
|
|
101
100
|
readonly fontSize: 12;
|
|
102
101
|
readonly lineHeight: 20;
|
|
103
102
|
readonly letterSpacing: 0;
|
|
104
103
|
readonly fontFamily: string;
|
|
105
104
|
readonly fontWeight?: import("react-native").TextStyle["fontWeight"];
|
|
106
105
|
};
|
|
107
|
-
readonly
|
|
106
|
+
readonly fontFamily: string;
|
|
107
|
+
readonly fontWeight?: import("react-native").TextStyle["fontWeight"];
|
|
108
|
+
readonly Regular: {
|
|
108
109
|
readonly fontSize: 12;
|
|
109
110
|
readonly lineHeight: 20;
|
|
110
111
|
readonly letterSpacing: 0;
|
|
111
|
-
readonly textTransform: "uppercase";
|
|
112
112
|
readonly fontFamily: string;
|
|
113
113
|
readonly fontWeight?: import("react-native").TextStyle["fontWeight"];
|
|
114
114
|
};
|
|
115
|
-
readonly
|
|
115
|
+
readonly Bold: {
|
|
116
116
|
readonly fontSize: 12;
|
|
117
117
|
readonly lineHeight: 20;
|
|
118
118
|
readonly letterSpacing: 0;
|
|
119
|
-
readonly textTransform: "uppercase";
|
|
120
119
|
readonly fontFamily: string;
|
|
121
120
|
readonly fontWeight?: import("react-native").TextStyle["fontWeight"];
|
|
122
121
|
};
|
|
123
|
-
readonly
|
|
122
|
+
readonly Caps: {
|
|
124
123
|
readonly fontSize: 12;
|
|
125
124
|
readonly lineHeight: 20;
|
|
126
125
|
readonly letterSpacing: 0;
|
|
126
|
+
readonly textTransform: "uppercase";
|
|
127
127
|
readonly fontFamily: string;
|
|
128
128
|
readonly fontWeight?: import("react-native").TextStyle["fontWeight"];
|
|
129
129
|
};
|
|
@@ -74,7 +74,7 @@ export const CustomTypography = {
|
|
|
74
74
|
},
|
|
75
75
|
/** Font size: 40/48 */
|
|
76
76
|
'H1 - XL': {
|
|
77
|
-
...fontStyle('Barlow-
|
|
77
|
+
...fontStyle('Barlow-Bold'),
|
|
78
78
|
fontSize: !isMobile ? 40 : 32,
|
|
79
79
|
lineHeight: !isMobile ? 48 : 40,
|
|
80
80
|
letterSpacing: 0,
|
|
@@ -101,15 +101,15 @@ export const CustomTypography = {
|
|
|
101
101
|
letterSpacing: 0,
|
|
102
102
|
textTransform: 'uppercase',
|
|
103
103
|
},
|
|
104
|
+
...fontStyle('Inter-Bold'),
|
|
104
105
|
CapsBold: {
|
|
105
|
-
...fontStyle('Inter-SemiBold'),
|
|
106
106
|
fontSize: 12,
|
|
107
107
|
lineHeight: 20,
|
|
108
108
|
letterSpacing: 0,
|
|
109
109
|
textTransform: 'uppercase',
|
|
110
110
|
},
|
|
111
111
|
SemiBold: {
|
|
112
|
-
...fontStyle('Inter-
|
|
112
|
+
...fontStyle('Inter-Bold'),
|
|
113
113
|
fontSize: 12,
|
|
114
114
|
lineHeight: 20,
|
|
115
115
|
letterSpacing: 0,
|
|
@@ -129,7 +129,7 @@ export const CustomTypography = {
|
|
|
129
129
|
letterSpacing: 0,
|
|
130
130
|
},
|
|
131
131
|
SemiBold: {
|
|
132
|
-
...fontStyle('Inter-
|
|
132
|
+
...fontStyle('Inter-Bold'),
|
|
133
133
|
fontSize: 14,
|
|
134
134
|
lineHeight: 20,
|
|
135
135
|
letterSpacing: 0,
|
|
@@ -141,7 +141,7 @@ export const CustomTypography = {
|
|
|
141
141
|
letterSpacing: 0,
|
|
142
142
|
},
|
|
143
143
|
CapsBold: {
|
|
144
|
-
...fontStyle('Inter-
|
|
144
|
+
...fontStyle('Inter-Bold'),
|
|
145
145
|
fontSize: 14,
|
|
146
146
|
lineHeight: 20,
|
|
147
147
|
letterSpacing: 0,
|
|
@@ -162,7 +162,7 @@ export const CustomTypography = {
|
|
|
162
162
|
letterSpacing: 0,
|
|
163
163
|
},
|
|
164
164
|
SemiBold: {
|
|
165
|
-
...fontStyle('Inter-
|
|
165
|
+
...fontStyle('Inter-Bold'),
|
|
166
166
|
fontSize: 16,
|
|
167
167
|
lineHeight: 24,
|
|
168
168
|
letterSpacing: 0,
|
|
@@ -188,7 +188,7 @@ export const CustomTypography = {
|
|
|
188
188
|
letterSpacing: 0,
|
|
189
189
|
},
|
|
190
190
|
SemiBold: {
|
|
191
|
-
...fontStyle('Inter-
|
|
191
|
+
...fontStyle('Inter-Bold'),
|
|
192
192
|
fontSize: 18,
|
|
193
193
|
lineHeight: 28,
|
|
194
194
|
letterSpacing: 0,
|