@hero-design/rn 8.12.3 → 8.12.4

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.
Files changed (85) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/es/index.js +47 -15
  3. package/lib/index.js +47 -15
  4. package/package.json +5 -5
  5. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -0
  6. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
  7. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +13 -0
  8. package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  9. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +21 -4
  10. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +189 -36
  11. package/src/components/Avatar/StyledAvatar.tsx +11 -4
  12. package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +21 -4
  13. package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +42 -8
  14. package/src/components/Badge/StyledBadge.tsx +4 -2
  15. package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +132 -42
  16. package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +1 -0
  17. package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
  18. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  19. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
  20. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +10 -0
  21. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +10 -0
  22. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -0
  23. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
  24. package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +2 -0
  25. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +16 -0
  26. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
  27. package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +1 -0
  28. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
  29. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +2 -0
  30. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +4 -0
  31. package/src/components/Empty/StyledEmpty.tsx +14 -13
  32. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +76 -20
  33. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +56 -16
  34. package/src/components/FAB/StyledFAB.tsx +3 -2
  35. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -0
  36. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +22 -8
  37. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +4 -0
  38. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +53 -8
  39. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +4 -0
  40. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +4 -0
  41. package/src/components/PinInput/StyledPinInput.tsx +6 -3
  42. package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +93 -18
  43. package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +73 -13
  44. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +3 -0
  45. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +2 -0
  46. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +3 -0
  47. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -0
  48. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +23 -1
  49. package/src/components/SectionHeading/__tests__/index.spec.tsx +2 -2
  50. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
  51. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +20 -0
  52. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +38 -0
  53. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
  54. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +20 -0
  55. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +35 -0
  56. package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +3 -0
  57. package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  58. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
  59. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  60. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +24 -7
  61. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +22 -7
  62. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +27 -7
  63. package/src/components/Tag/StyledTag.tsx +3 -2
  64. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +167 -62
  65. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +22 -0
  66. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +51 -0
  67. package/src/components/TextInput/index.tsx +2 -0
  68. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +5 -0
  69. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +7 -0
  70. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +13 -0
  71. package/src/components/Typography/Text/index.tsx +2 -0
  72. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +17 -0
  73. package/src/theme/components/avatar.ts +11 -1
  74. package/src/theme/components/badge.ts +5 -1
  75. package/src/theme/components/pinInput.ts +14 -1
  76. package/types/components/Avatar/StyledAvatar.d.ts +4 -5
  77. package/types/components/Badge/StyledBadge.d.ts +3 -5
  78. package/types/components/Empty/StyledEmpty.d.ts +5 -9
  79. package/types/components/FAB/StyledFAB.d.ts +3 -5
  80. package/types/components/PinInput/StyledPinInput.d.ts +5 -9
  81. package/types/components/Tag/StyledTag.d.ts +3 -5
  82. package/types/components/Typography/Text/index.d.ts +1 -1
  83. package/types/theme/components/avatar.d.ts +10 -0
  84. package/types/theme/components/badge.d.ts +3 -0
  85. package/types/theme/components/pinInput.d.ts +4 -0
@@ -70,6 +70,7 @@ exports[`Alert Icon render custom icon correctly 1`] = `
70
70
  }
71
71
  >
72
72
  <Text
73
+ allowFontScaling={false}
73
74
  style={
74
75
  Array [
75
76
  Object {
@@ -164,6 +165,7 @@ exports[`Alert renders correctly when intent is error 1`] = `
164
165
  }
165
166
  >
166
167
  <Text
168
+ allowFontScaling={false}
167
169
  style={
168
170
  Array [
169
171
  Object {
@@ -184,6 +186,7 @@ exports[`Alert renders correctly when intent is error 1`] = `
184
186
  Title
185
187
  </Text>
186
188
  <Text
189
+ allowFontScaling={false}
187
190
  style={
188
191
  Array [
189
192
  Object {
@@ -313,6 +316,7 @@ exports[`Alert renders correctly when intent is info 1`] = `
313
316
  }
314
317
  >
315
318
  <Text
319
+ allowFontScaling={false}
316
320
  style={
317
321
  Array [
318
322
  Object {
@@ -333,6 +337,7 @@ exports[`Alert renders correctly when intent is info 1`] = `
333
337
  Title
334
338
  </Text>
335
339
  <Text
340
+ allowFontScaling={false}
336
341
  style={
337
342
  Array [
338
343
  Object {
@@ -435,6 +440,7 @@ exports[`Alert renders correctly when intent is notification 1`] = `
435
440
  }
436
441
  >
437
442
  <Text
443
+ allowFontScaling={false}
438
444
  style={
439
445
  Array [
440
446
  Object {
@@ -455,6 +461,7 @@ exports[`Alert renders correctly when intent is notification 1`] = `
455
461
  Title
456
462
  </Text>
457
463
  <Text
464
+ allowFontScaling={false}
458
465
  style={
459
466
  Array [
460
467
  Object {
@@ -584,6 +591,7 @@ exports[`Alert renders correctly when intent is success 1`] = `
584
591
  }
585
592
  >
586
593
  <Text
594
+ allowFontScaling={false}
587
595
  style={
588
596
  Array [
589
597
  Object {
@@ -604,6 +612,7 @@ exports[`Alert renders correctly when intent is success 1`] = `
604
612
  Title
605
613
  </Text>
606
614
  <Text
615
+ allowFontScaling={false}
607
616
  style={
608
617
  Array [
609
618
  Object {
@@ -733,6 +742,7 @@ exports[`Alert renders correctly when intent is warning 1`] = `
733
742
  }
734
743
  >
735
744
  <Text
745
+ allowFontScaling={false}
736
746
  style={
737
747
  Array [
738
748
  Object {
@@ -753,6 +763,7 @@ exports[`Alert renders correctly when intent is warning 1`] = `
753
763
  Title
754
764
  </Text>
755
765
  <Text
766
+ allowFontScaling={false}
756
767
  style={
757
768
  Array [
758
769
  Object {
@@ -882,6 +893,7 @@ exports[`Alert renders correctly without rounded 1`] = `
882
893
  }
883
894
  >
884
895
  <Text
896
+ allowFontScaling={false}
885
897
  style={
886
898
  Array [
887
899
  Object {
@@ -902,6 +914,7 @@ exports[`Alert renders correctly without rounded 1`] = `
902
914
  Title
903
915
  </Text>
904
916
  <Text
917
+ allowFontScaling={false}
905
918
  style={
906
919
  Array [
907
920
  Object {
@@ -61,6 +61,7 @@ exports[`Attachment renders correctly 1`] = `
61
61
  testID="attachment-content"
62
62
  >
63
63
  <Text
64
+ allowFontScaling={false}
64
65
  numberOfLines={1}
65
66
  style={
66
67
  Array [
@@ -46,18 +46,35 @@ exports[`StyledAvatar renders correctly 1`] = `
46
46
  }
47
47
  >
48
48
  <Text
49
+ allowFontScaling={false}
49
50
  style={
50
51
  Array [
51
52
  Object {
52
- "color": "#ffffff",
53
+ "color": "#001f23",
53
54
  "fontFamily": "BeVietnamPro-Regular",
54
- "fontSize": 18,
55
- "overflow": "hidden",
55
+ "fontSize": 14,
56
+ "letterSpacing": 0.42,
57
+ "lineHeight": 22,
56
58
  },
57
- undefined,
59
+ Array [
60
+ Object {
61
+ "color": "#ffffff",
62
+ "fontFamily": "BeVietnamPro-Regular",
63
+ "fontSize": 18,
64
+ "lineHeight": 0,
65
+ "overflow": "hidden",
66
+ "textAlign": "center",
67
+ "textAlignVertical": "center",
68
+ },
69
+ undefined,
70
+ ],
58
71
  ]
59
72
  }
73
+ themeFontSize="medium"
74
+ themeFontWeight="regular"
75
+ themeIntent="body"
60
76
  themeSize="medium"
77
+ themeTypeface="neutral"
61
78
  >
62
79
  AA
63
80
  </Text>
@@ -60,18 +60,35 @@ exports[`AvatarStack renders correctly by default 1`] = `
60
60
  }
61
61
  >
62
62
  <Text
63
+ allowFontScaling={false}
63
64
  style={
64
65
  Array [
65
66
  Object {
66
- "color": "#ffffff",
67
+ "color": "#001f23",
67
68
  "fontFamily": "BeVietnamPro-Regular",
68
- "fontSize": 16,
69
- "overflow": "hidden",
69
+ "fontSize": 14,
70
+ "letterSpacing": 0.42,
71
+ "lineHeight": 22,
70
72
  },
71
- undefined,
73
+ Array [
74
+ Object {
75
+ "color": "#ffffff",
76
+ "fontFamily": "BeVietnamPro-Regular",
77
+ "fontSize": 16,
78
+ "lineHeight": 0,
79
+ "overflow": "hidden",
80
+ "textAlign": "center",
81
+ "textAlignVertical": "center",
82
+ },
83
+ undefined,
84
+ ],
72
85
  ]
73
86
  }
87
+ themeFontSize="medium"
88
+ themeFontWeight="regular"
89
+ themeIntent="body"
74
90
  themeSize="small"
91
+ themeTypeface="neutral"
75
92
  >
76
93
  TT
77
94
  </Text>
@@ -121,18 +138,35 @@ exports[`AvatarStack renders correctly by default 1`] = `
121
138
  }
122
139
  >
123
140
  <Text
141
+ allowFontScaling={false}
124
142
  style={
125
143
  Array [
126
144
  Object {
127
- "color": "#ffffff",
145
+ "color": "#001f23",
128
146
  "fontFamily": "BeVietnamPro-Regular",
129
- "fontSize": 16,
130
- "overflow": "hidden",
147
+ "fontSize": 14,
148
+ "letterSpacing": 0.42,
149
+ "lineHeight": 22,
131
150
  },
132
- undefined,
151
+ Array [
152
+ Object {
153
+ "color": "#ffffff",
154
+ "fontFamily": "BeVietnamPro-Regular",
155
+ "fontSize": 16,
156
+ "lineHeight": 0,
157
+ "overflow": "hidden",
158
+ "textAlign": "center",
159
+ "textAlignVertical": "center",
160
+ },
161
+ undefined,
162
+ ],
133
163
  ]
134
164
  }
165
+ themeFontSize="medium"
166
+ themeFontWeight="regular"
167
+ themeIntent="body"
135
168
  themeSize="small"
169
+ themeTypeface="neutral"
136
170
  >
137
171
  SS
138
172
  </Text>
@@ -182,18 +216,35 @@ exports[`AvatarStack renders correctly by default 1`] = `
182
216
  }
183
217
  >
184
218
  <Text
219
+ allowFontScaling={false}
185
220
  style={
186
221
  Array [
187
222
  Object {
188
- "color": "#ffffff",
223
+ "color": "#001f23",
189
224
  "fontFamily": "BeVietnamPro-Regular",
190
- "fontSize": 16,
191
- "overflow": "hidden",
225
+ "fontSize": 14,
226
+ "letterSpacing": 0.42,
227
+ "lineHeight": 22,
192
228
  },
193
- undefined,
229
+ Array [
230
+ Object {
231
+ "color": "#ffffff",
232
+ "fontFamily": "BeVietnamPro-Regular",
233
+ "fontSize": 16,
234
+ "lineHeight": 0,
235
+ "overflow": "hidden",
236
+ "textAlign": "center",
237
+ "textAlignVertical": "center",
238
+ },
239
+ undefined,
240
+ ],
194
241
  ]
195
242
  }
243
+ themeFontSize="medium"
244
+ themeFontWeight="regular"
245
+ themeIntent="body"
196
246
  themeSize="small"
247
+ themeTypeface="neutral"
197
248
  >
198
249
  AA
199
250
  </Text>
@@ -243,18 +294,35 @@ exports[`AvatarStack renders correctly by default 1`] = `
243
294
  }
244
295
  >
245
296
  <Text
297
+ allowFontScaling={false}
246
298
  style={
247
299
  Array [
248
300
  Object {
249
- "color": "#ffffff",
301
+ "color": "#001f23",
250
302
  "fontFamily": "BeVietnamPro-Regular",
251
- "fontSize": 16,
252
- "overflow": "hidden",
303
+ "fontSize": 14,
304
+ "letterSpacing": 0.42,
305
+ "lineHeight": 22,
253
306
  },
254
- undefined,
307
+ Array [
308
+ Object {
309
+ "color": "#ffffff",
310
+ "fontFamily": "BeVietnamPro-Regular",
311
+ "fontSize": 16,
312
+ "lineHeight": 0,
313
+ "overflow": "hidden",
314
+ "textAlign": "center",
315
+ "textAlignVertical": "center",
316
+ },
317
+ undefined,
318
+ ],
255
319
  ]
256
320
  }
321
+ themeFontSize="medium"
322
+ themeFontWeight="regular"
323
+ themeIntent="body"
257
324
  themeSize="small"
325
+ themeTypeface="neutral"
258
326
  >
259
327
  OO
260
328
  </Text>
@@ -304,18 +372,35 @@ exports[`AvatarStack renders correctly by default 1`] = `
304
372
  }
305
373
  >
306
374
  <Text
375
+ allowFontScaling={false}
307
376
  style={
308
377
  Array [
309
378
  Object {
310
- "color": "#ffffff",
379
+ "color": "#001f23",
311
380
  "fontFamily": "BeVietnamPro-Regular",
312
- "fontSize": 16,
313
- "overflow": "hidden",
381
+ "fontSize": 14,
382
+ "letterSpacing": 0.42,
383
+ "lineHeight": 22,
314
384
  },
315
- undefined,
385
+ Array [
386
+ Object {
387
+ "color": "#ffffff",
388
+ "fontFamily": "BeVietnamPro-Regular",
389
+ "fontSize": 16,
390
+ "lineHeight": 0,
391
+ "overflow": "hidden",
392
+ "textAlign": "center",
393
+ "textAlignVertical": "center",
394
+ },
395
+ undefined,
396
+ ],
316
397
  ]
317
398
  }
399
+ themeFontSize="medium"
400
+ themeFontWeight="regular"
401
+ themeIntent="body"
318
402
  themeSize="small"
403
+ themeTypeface="neutral"
319
404
  >
320
405
  NA
321
406
  </Text>
@@ -384,18 +469,35 @@ exports[`AvatarStack renders correctly with custom props 1`] = `
384
469
  }
385
470
  >
386
471
  <Text
472
+ allowFontScaling={false}
387
473
  style={
388
474
  Array [
389
475
  Object {
390
- "color": "#ffffff",
476
+ "color": "#001f23",
391
477
  "fontFamily": "BeVietnamPro-Regular",
392
- "fontSize": 18,
393
- "overflow": "hidden",
478
+ "fontSize": 14,
479
+ "letterSpacing": 0.42,
480
+ "lineHeight": 22,
394
481
  },
395
- undefined,
482
+ Array [
483
+ Object {
484
+ "color": "#ffffff",
485
+ "fontFamily": "BeVietnamPro-Regular",
486
+ "fontSize": 18,
487
+ "lineHeight": 0,
488
+ "overflow": "hidden",
489
+ "textAlign": "center",
490
+ "textAlignVertical": "center",
491
+ },
492
+ undefined,
493
+ ],
396
494
  ]
397
495
  }
496
+ themeFontSize="medium"
497
+ themeFontWeight="regular"
498
+ themeIntent="body"
398
499
  themeSize="medium"
500
+ themeTypeface="neutral"
399
501
  >
400
502
  TT
401
503
  </Text>
@@ -445,18 +547,35 @@ exports[`AvatarStack renders correctly with custom props 1`] = `
445
547
  }
446
548
  >
447
549
  <Text
550
+ allowFontScaling={false}
448
551
  style={
449
552
  Array [
450
553
  Object {
451
- "color": "#ffffff",
554
+ "color": "#001f23",
452
555
  "fontFamily": "BeVietnamPro-Regular",
453
- "fontSize": 18,
454
- "overflow": "hidden",
556
+ "fontSize": 14,
557
+ "letterSpacing": 0.42,
558
+ "lineHeight": 22,
455
559
  },
456
- undefined,
560
+ Array [
561
+ Object {
562
+ "color": "#ffffff",
563
+ "fontFamily": "BeVietnamPro-Regular",
564
+ "fontSize": 18,
565
+ "lineHeight": 0,
566
+ "overflow": "hidden",
567
+ "textAlign": "center",
568
+ "textAlignVertical": "center",
569
+ },
570
+ undefined,
571
+ ],
457
572
  ]
458
573
  }
574
+ themeFontSize="medium"
575
+ themeFontWeight="regular"
576
+ themeIntent="body"
459
577
  themeSize="medium"
578
+ themeTypeface="neutral"
460
579
  >
461
580
  SS
462
581
  </Text>
@@ -506,18 +625,35 @@ exports[`AvatarStack renders correctly with custom props 1`] = `
506
625
  }
507
626
  >
508
627
  <Text
628
+ allowFontScaling={false}
509
629
  style={
510
630
  Array [
511
631
  Object {
512
- "color": "#ffffff",
632
+ "color": "#001f23",
513
633
  "fontFamily": "BeVietnamPro-Regular",
514
- "fontSize": 18,
515
- "overflow": "hidden",
634
+ "fontSize": 14,
635
+ "letterSpacing": 0.42,
636
+ "lineHeight": 22,
516
637
  },
517
- undefined,
638
+ Array [
639
+ Object {
640
+ "color": "#ffffff",
641
+ "fontFamily": "BeVietnamPro-Regular",
642
+ "fontSize": 18,
643
+ "lineHeight": 0,
644
+ "overflow": "hidden",
645
+ "textAlign": "center",
646
+ "textAlignVertical": "center",
647
+ },
648
+ undefined,
649
+ ],
518
650
  ]
519
651
  }
652
+ themeFontSize="medium"
653
+ themeFontWeight="regular"
654
+ themeIntent="body"
520
655
  themeSize="medium"
656
+ themeTypeface="neutral"
521
657
  >
522
658
  AA
523
659
  </Text>
@@ -567,18 +703,35 @@ exports[`AvatarStack renders correctly with custom props 1`] = `
567
703
  }
568
704
  >
569
705
  <Text
706
+ allowFontScaling={false}
570
707
  style={
571
708
  Array [
572
709
  Object {
573
- "color": "#ffffff",
710
+ "color": "#001f23",
574
711
  "fontFamily": "BeVietnamPro-Regular",
575
- "fontSize": 18,
576
- "overflow": "hidden",
712
+ "fontSize": 14,
713
+ "letterSpacing": 0.42,
714
+ "lineHeight": 22,
577
715
  },
578
- undefined,
716
+ Array [
717
+ Object {
718
+ "color": "#ffffff",
719
+ "fontFamily": "BeVietnamPro-Regular",
720
+ "fontSize": 18,
721
+ "lineHeight": 0,
722
+ "overflow": "hidden",
723
+ "textAlign": "center",
724
+ "textAlignVertical": "center",
725
+ },
726
+ undefined,
727
+ ],
579
728
  ]
580
729
  }
730
+ themeFontSize="medium"
731
+ themeFontWeight="regular"
732
+ themeIntent="body"
581
733
  themeSize="medium"
734
+ themeTypeface="neutral"
582
735
  >
583
736
  +2
584
737
  </Text>
@@ -1,5 +1,7 @@
1
- import { View, Image, TouchableOpacity, Text } from 'react-native';
1
+ import { View, Image, TouchableOpacity } from 'react-native';
2
2
  import styled from '@emotion/native';
3
+ import Typography from '../Typography';
4
+ import { TextProps } from '../Typography/Text';
3
5
 
4
6
  type ThemeSize =
5
7
  | 'small'
@@ -31,11 +33,16 @@ const StyledTextWrapper = styled(View)(() => ({
31
33
  height: '100%',
32
34
  }));
33
35
 
34
- const StyledText = styled(Text)<{
35
- themeSize: ThemeSize;
36
- }>(({ themeSize, theme }) => ({
36
+ const StyledText = styled(Typography.Text)<
37
+ TextProps & {
38
+ themeSize: ThemeSize;
39
+ }
40
+ >(({ themeSize, theme }) => ({
37
41
  fontFamily: theme.__hd__.avatar.fonts.default,
38
42
  fontSize: theme.__hd__.avatar.fontSizes[themeSize],
43
+ lineHeight: 0, // auto center
44
+ textAlignVertical: 'center',
45
+ textAlign: 'center',
39
46
  color: theme.__hd__.avatar.colors.text,
40
47
  overflow: 'hidden',
41
48
  }));
@@ -47,18 +47,35 @@ exports[`StyledPressable renders correct style 1`] = `
47
47
 
48
48
  exports[`StyledText renders correct style 1`] = `
49
49
  <Text
50
+ allowFontScaling={false}
50
51
  style={
51
52
  Array [
52
53
  Object {
53
- "color": "#ffffff",
54
+ "color": "#001f23",
54
55
  "fontFamily": "BeVietnamPro-Regular",
55
- "fontSize": 16,
56
- "overflow": "hidden",
56
+ "fontSize": 14,
57
+ "letterSpacing": 0.42,
58
+ "lineHeight": 22,
57
59
  },
58
- undefined,
60
+ Array [
61
+ Object {
62
+ "color": "#ffffff",
63
+ "fontFamily": "BeVietnamPro-Regular",
64
+ "fontSize": 16,
65
+ "lineHeight": 0,
66
+ "overflow": "hidden",
67
+ "textAlign": "center",
68
+ "textAlignVertical": "center",
69
+ },
70
+ undefined,
71
+ ],
59
72
  ]
60
73
  }
74
+ themeFontSize="medium"
75
+ themeFontWeight="regular"
76
+ themeIntent="body"
61
77
  themeSize="small"
78
+ themeTypeface="neutral"
62
79
  >
63
80
  MD
64
81
  </Text>
@@ -43,18 +43,35 @@ exports[`Avatar fallbacks to title when there image failed to load 1`] = `
43
43
  }
44
44
  >
45
45
  <Text
46
+ allowFontScaling={false}
46
47
  style={
47
48
  Array [
48
49
  Object {
49
- "color": "#ffffff",
50
+ "color": "#001f23",
50
51
  "fontFamily": "BeVietnamPro-Regular",
51
- "fontSize": 16,
52
- "overflow": "hidden",
52
+ "fontSize": 14,
53
+ "letterSpacing": 0.42,
54
+ "lineHeight": 22,
53
55
  },
54
- undefined,
56
+ Array [
57
+ Object {
58
+ "color": "#ffffff",
59
+ "fontFamily": "BeVietnamPro-Regular",
60
+ "fontSize": 16,
61
+ "lineHeight": 0,
62
+ "overflow": "hidden",
63
+ "textAlign": "center",
64
+ "textAlignVertical": "center",
65
+ },
66
+ undefined,
67
+ ],
55
68
  ]
56
69
  }
70
+ themeFontSize="medium"
71
+ themeFontWeight="regular"
72
+ themeIntent="body"
57
73
  themeSize="small"
74
+ themeTypeface="neutral"
58
75
  >
59
76
  TT
60
77
  </Text>
@@ -180,18 +197,35 @@ exports[`Avatar shows title when there is no source 1`] = `
180
197
  }
181
198
  >
182
199
  <Text
200
+ allowFontScaling={false}
183
201
  style={
184
202
  Array [
185
203
  Object {
186
- "color": "#ffffff",
204
+ "color": "#001f23",
187
205
  "fontFamily": "BeVietnamPro-Regular",
188
- "fontSize": 16,
189
- "overflow": "hidden",
206
+ "fontSize": 14,
207
+ "letterSpacing": 0.42,
208
+ "lineHeight": 22,
190
209
  },
191
- undefined,
210
+ Array [
211
+ Object {
212
+ "color": "#ffffff",
213
+ "fontFamily": "BeVietnamPro-Regular",
214
+ "fontSize": 16,
215
+ "lineHeight": 0,
216
+ "overflow": "hidden",
217
+ "textAlign": "center",
218
+ "textAlignVertical": "center",
219
+ },
220
+ undefined,
221
+ ],
192
222
  ]
193
223
  }
224
+ themeFontSize="medium"
225
+ themeFontWeight="regular"
226
+ themeIntent="body"
194
227
  themeSize="small"
228
+ themeTypeface="neutral"
195
229
  >
196
230
  TT
197
231
  </Text>
@@ -1,5 +1,6 @@
1
- import { Animated, Text } from 'react-native';
1
+ import { Animated } from 'react-native';
2
2
  import styled from '@emotion/native';
3
+ import Typography from '../Typography';
3
4
 
4
5
  type ThemeIntent =
5
6
  | 'primary'
@@ -27,9 +28,10 @@ const StyledView = styled(Animated.View)<{
27
28
  : undefined,
28
29
  }));
29
30
 
30
- const StyledText = styled(Text)(({ theme }) => ({
31
+ const StyledText = styled(Typography.Text)(({ theme }) => ({
31
32
  fontFamily: theme.__hd__.badge.fonts.default,
32
33
  fontSize: theme.__hd__.badge.fontSizes.default,
34
+ lineHeight: theme.__hd__.badge.lineHeights.default,
33
35
  color: theme.__hd__.badge.colors.text,
34
36
  includeFontPadding: false,
35
37
  textAlignVertical: 'center',