@xetwa/design-system 1.0.35 → 1.0.37
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 +1 -1
- package/src/components/Buttons/IconButton/IconButton.tsx +2 -2
- package/src/components/Buttons/JourneyButton/JourneyButton.tsx +8 -2
- package/src/components/Buttons/MainButton/MainButton.tsx +0 -19
- package/src/components/Buttons/WordChip/WordChip.tsx +11 -5
- package/src/components/Cards/BoardingPassCard/BoardingPassCard.tsx +11 -25
- package/src/components/Cards/ModuleCard/ModuleCard.stories.tsx +29 -2
- package/src/components/Cards/ModuleCard/ModuleCard.tsx +207 -54
- package/src/components/Cards/Passport/PassportCover.tsx +3 -3
- package/src/components/Charts/WeeklyProgressChart/WeeklyProgressChart.tsx +8 -9
- package/src/components/DataDisplay/Avatar/Avatar.tsx +8 -9
- package/src/components/DataDisplay/Badge/Badge.tsx +13 -20
- package/src/components/DataDisplay/InstructionBubble/InstructionBubble.tsx +2 -2
- package/src/components/DataDisplay/LevelBadge/LevelBadge.tsx +2 -15
- package/src/components/DataDisplay/NumberBadge/NumberBadge.tsx +1 -2
- package/src/components/DataDisplay/StatBadge/StatBadge.tsx +1 -1
- package/src/components/DataDisplay/Tag/Tag.tsx +11 -23
- package/src/components/Feedback/FeedbackBottomSheet/FeedbackBottomSheet.tsx +4 -13
- package/src/components/Headers/CountryHeader/CountryHeader.tsx +3 -3
- package/src/components/Headers/ProfileHeader/ProfileHeader.tsx +8 -5
- package/src/components/Inputs/FillInTheBlank/FillInTheBlank.tsx +5 -5
- package/src/components/Inputs/TextInput/TextInput.tsx +4 -4
- package/src/components/Navigation/BottomTabBar/BottomTabBarItem.tsx +1 -1
- package/src/components/Navigation/ProgressMap/ProgressMap.tsx +9 -9
- package/src/components/Navigation/WorldProgressMap/WorldProgressMap.tsx +9 -9
- package/src/components/Typography/Typography.tsx +16 -10
- package/src/styles/theme.ts +39 -24
package/src/styles/theme.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
2
|
|
|
3
|
-
const font = (family: string, webWeight: '600' | '700' | '800') => {
|
|
3
|
+
const font = (family: string, webWeight: '400' | '500' | '600' | '700' | '800' | '900') => {
|
|
4
|
+
// Extract base family for web (e.g. 'Nunito-SemiBold' -> 'Nunito')
|
|
5
|
+
const webFamily = family.split('-')[0];
|
|
4
6
|
return Platform.select({
|
|
5
|
-
web: { fontFamily:
|
|
7
|
+
web: { fontFamily: webFamily, fontWeight: webWeight },
|
|
6
8
|
default: { fontFamily: family }
|
|
7
|
-
}) as { fontFamily: string; fontWeight?: '600' | '700' | '800' };
|
|
9
|
+
}) as { fontFamily: string; fontWeight?: '400' | '500' | '600' | '700' | '800' | '900' };
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export const theme = {
|
|
@@ -173,71 +175,84 @@ export const theme = {
|
|
|
173
175
|
display1: {
|
|
174
176
|
...font('Fredoka-Bold', '700'),
|
|
175
177
|
fontSize: 28,
|
|
176
|
-
lineHeight:
|
|
178
|
+
lineHeight: 34,
|
|
179
|
+
desktopFontSize: 42,
|
|
177
180
|
},
|
|
178
181
|
display2: {
|
|
179
182
|
...font('Fredoka-Bold', '700'),
|
|
180
183
|
fontSize: 24,
|
|
181
|
-
lineHeight:
|
|
184
|
+
lineHeight: 30,
|
|
185
|
+
desktopFontSize: 34,
|
|
182
186
|
},
|
|
183
187
|
h1: {
|
|
184
188
|
...font('Fredoka-Bold', '700'),
|
|
185
189
|
fontSize: 22,
|
|
186
|
-
lineHeight:
|
|
190
|
+
lineHeight: 28,
|
|
191
|
+
desktopFontSize: 28,
|
|
187
192
|
},
|
|
188
193
|
h2: {
|
|
189
194
|
...font('Fredoka-SemiBold', '600'),
|
|
190
195
|
fontSize: 18,
|
|
191
|
-
lineHeight:
|
|
196
|
+
lineHeight: 24,
|
|
197
|
+
desktopFontSize: 22,
|
|
192
198
|
},
|
|
193
199
|
h3: {
|
|
194
200
|
...font('Fredoka-SemiBold', '600'),
|
|
195
201
|
fontSize: 16,
|
|
196
|
-
lineHeight:
|
|
202
|
+
lineHeight: 22,
|
|
203
|
+
desktopFontSize: 19,
|
|
197
204
|
},
|
|
198
205
|
label: {
|
|
199
|
-
...font('Nunito-
|
|
206
|
+
...font('Nunito-Black', '900'),
|
|
200
207
|
fontSize: 10,
|
|
201
208
|
lineHeight: 14,
|
|
202
|
-
letterSpacing: 1.2,
|
|
209
|
+
letterSpacing: 1.2, // 10 * 0.12
|
|
210
|
+
desktopFontSize: 11,
|
|
203
211
|
},
|
|
204
212
|
bodyLg: {
|
|
205
213
|
...font('Nunito-Bold', '700'),
|
|
206
214
|
fontSize: 15,
|
|
207
|
-
lineHeight:
|
|
215
|
+
lineHeight: 24,
|
|
216
|
+
desktopFontSize: 17,
|
|
208
217
|
},
|
|
209
218
|
bodyMd: {
|
|
210
219
|
...font('Nunito-Bold', '700'),
|
|
211
220
|
fontSize: 13.5,
|
|
212
|
-
lineHeight:
|
|
221
|
+
lineHeight: 22,
|
|
222
|
+
desktopFontSize: 15,
|
|
213
223
|
},
|
|
214
224
|
bodySm: {
|
|
215
|
-
...font('Nunito-
|
|
225
|
+
...font('Nunito-ExtraBold', '800'),
|
|
216
226
|
fontSize: 12,
|
|
217
|
-
lineHeight:
|
|
227
|
+
lineHeight: 18,
|
|
228
|
+
desktopFontSize: 13,
|
|
218
229
|
},
|
|
219
230
|
caption: {
|
|
220
|
-
...font('Nunito-
|
|
231
|
+
...font('Nunito-ExtraBold', '800'),
|
|
221
232
|
fontSize: 10,
|
|
222
|
-
lineHeight:
|
|
233
|
+
lineHeight: 16,
|
|
234
|
+
desktopFontSize: 11,
|
|
223
235
|
},
|
|
224
236
|
btnLg: {
|
|
225
|
-
...font('Nunito-
|
|
237
|
+
...font('Nunito-Black', '900'),
|
|
226
238
|
fontSize: 16,
|
|
227
|
-
lineHeight:
|
|
228
|
-
letterSpacing: 0.64,
|
|
239
|
+
lineHeight: 20,
|
|
240
|
+
letterSpacing: 0.64, // 16 * 0.04
|
|
241
|
+
desktopFontSize: 17,
|
|
229
242
|
},
|
|
230
243
|
btnMd: {
|
|
231
|
-
...font('Nunito-
|
|
244
|
+
...font('Nunito-Black', '900'),
|
|
232
245
|
fontSize: 14,
|
|
233
|
-
lineHeight:
|
|
234
|
-
letterSpacing: 0.56,
|
|
246
|
+
lineHeight: 18,
|
|
247
|
+
letterSpacing: 0.56, // 14 * 0.04
|
|
248
|
+
desktopFontSize: 15,
|
|
235
249
|
},
|
|
236
250
|
btnSm: {
|
|
237
|
-
...font('Nunito-
|
|
251
|
+
...font('Nunito-Black', '900'),
|
|
238
252
|
fontSize: 12,
|
|
239
253
|
lineHeight: 16,
|
|
240
|
-
letterSpacing: 0.48,
|
|
254
|
+
letterSpacing: 0.48, // 12 * 0.04
|
|
255
|
+
desktopFontSize: 12,
|
|
241
256
|
},
|
|
242
257
|
},
|
|
243
258
|
|