@hero-design/rn 7.25.1 → 7.26.0

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 (140) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/assets/fonts/BeVietnamPro-Bold.ttf +0 -0
  3. package/assets/fonts/{be-vietnam-pro-light.ttf → BeVietnamPro-Light.ttf} +0 -0
  4. package/assets/fonts/{be-vietnam-pro-regular.ttf → BeVietnamPro-Regular.ttf} +0 -0
  5. package/assets/fonts/{be-vietnam-pro-semibold.ttf → BeVietnamPro-SemiBold.ttf} +0 -0
  6. package/assets/fonts/RebondGrotesque-Light.otf +0 -0
  7. package/assets/fonts/RebondGrotesque-Regular.otf +0 -0
  8. package/assets/fonts/RebondGrotesque-SemiBold.otf +0 -0
  9. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  10. package/es/index.js +9150 -12295
  11. package/jest.config.js +6 -2
  12. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  13. package/lib/index.js +9150 -12294
  14. package/package.json +4 -4
  15. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -0
  16. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
  17. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +11 -0
  18. package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  19. package/src/components/Avatar/{index.tsx → Avatar.tsx} +33 -18
  20. package/src/components/Avatar/AvatarStack/StyledAvatarStack.tsx +29 -0
  21. package/src/components/Avatar/AvatarStack/__tests__/StyledAvatarStack.spec.tsx +33 -0
  22. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +80 -0
  23. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +552 -0
  24. package/src/components/Avatar/AvatarStack/__tests__/index.spec.tsx +59 -0
  25. package/src/components/Avatar/AvatarStack/index.tsx +61 -0
  26. package/src/components/Avatar/AvatarStack/utils.ts +22 -0
  27. package/src/components/Avatar/StyledAvatar.tsx +6 -25
  28. package/src/components/Avatar/__tests__/StyledAvatar.spec.tsx +3 -19
  29. package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -24
  30. package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +118 -20
  31. package/src/components/Avatar/__tests__/index.spec.tsx +25 -8
  32. package/src/components/Avatar/index.ts +6 -0
  33. package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +1 -0
  34. package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
  35. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
  36. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
  37. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +11 -0
  38. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -0
  39. package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +1 -1
  40. package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  41. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
  42. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
  43. package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +1 -0
  44. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
  45. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
  46. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +3 -0
  47. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
  48. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -0
  49. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  50. package/src/components/Icon/IconList.ts +11 -0
  51. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +4 -0
  52. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +54 -31
  53. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +4 -0
  54. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +5 -1
  55. package/src/components/Progress/ProgressBar.tsx +19 -2
  56. package/src/components/Progress/ProgressCircle.tsx +30 -9
  57. package/src/components/Progress/StyledProgressBar.tsx +14 -7
  58. package/src/components/Progress/StyledProgressCircle.tsx +35 -24
  59. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +337 -30
  60. package/src/components/Progress/__tests__/index.spec.js +15 -0
  61. package/src/components/Progress/constants.ts +16 -0
  62. package/src/components/Progress/types.ts +7 -1
  63. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +2 -0
  64. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +3 -0
  65. package/src/components/RichTextEditor/RichTextEditor.tsx +1 -1
  66. package/src/components/RichTextEditor/__mocks__/heroEditorApp.ts +2 -0
  67. package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +36 -25
  68. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +8 -4
  69. package/src/components/RichTextEditor/heroEditorApp.ts +3 -0
  70. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
  71. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
  72. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +20 -0
  73. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +51 -0
  74. package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +22 -0
  75. package/src/components/Select/MultiSelect/index.tsx +35 -13
  76. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
  77. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +20 -0
  78. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +46 -0
  79. package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +1 -0
  80. package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +3 -0
  81. package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  82. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
  83. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  84. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +2 -0
  85. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
  86. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +22 -0
  87. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +31 -0
  88. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +1 -0
  89. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +3 -0
  90. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +13 -0
  91. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +6 -0
  92. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +6 -0
  93. package/src/components/Typography/Text/StyledText.tsx +6 -2
  94. package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +22 -0
  95. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +63 -0
  96. package/src/components/Typography/Text/index.tsx +8 -0
  97. package/src/index.ts +2 -1
  98. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +84 -21
  99. package/src/theme/components/avatar.ts +29 -5
  100. package/src/theme/components/badge.ts +1 -1
  101. package/src/theme/components/button.ts +2 -2
  102. package/src/theme/components/empty.ts +2 -2
  103. package/src/theme/components/fab.ts +3 -3
  104. package/src/theme/components/pinInput.ts +2 -2
  105. package/src/theme/components/progress.ts +37 -9
  106. package/src/theme/components/tag.ts +1 -1
  107. package/src/theme/components/typography.ts +1 -7
  108. package/src/theme/global/colors/global.ts +12 -3
  109. package/src/theme/global/colors/types.ts +5 -0
  110. package/src/theme/global/scale.ts +6 -2
  111. package/src/theme/global/typography.ts +23 -5
  112. package/types/components/Avatar/Avatar.d.ts +33 -0
  113. package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +17 -0
  114. package/types/components/Avatar/AvatarStack/index.d.ts +23 -0
  115. package/types/components/Avatar/AvatarStack/utils.d.ts +4 -0
  116. package/types/components/Avatar/StyledAvatar.d.ts +2 -12
  117. package/types/components/Avatar/index.d.ts +6 -25
  118. package/types/components/Icon/IconList.d.ts +1 -1
  119. package/types/components/Icon/index.d.ts +1 -1
  120. package/types/components/Icon/utils.d.ts +1 -1
  121. package/types/components/Progress/ProgressBar.d.ts +1 -1
  122. package/types/components/Progress/ProgressCircle.d.ts +4 -2
  123. package/types/components/Progress/StyledProgressBar.d.ts +2 -0
  124. package/types/components/Progress/StyledProgressCircle.d.ts +2 -0
  125. package/types/components/Progress/constants.d.ts +15 -0
  126. package/types/components/Progress/index.d.ts +1 -1
  127. package/types/components/Progress/types.d.ts +1 -1
  128. package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +2 -0
  129. package/types/components/RichTextEditor/heroEditorApp.d.ts +2 -0
  130. package/types/components/Select/MultiSelect/index.d.ts +4 -1
  131. package/types/components/Typography/Text/StyledText.d.ts +1 -0
  132. package/types/components/Typography/Text/index.d.ts +7 -1
  133. package/types/index.d.ts +2 -2
  134. package/types/theme/components/avatar.d.ts +4 -2
  135. package/types/theme/components/progress.d.ts +30 -9
  136. package/types/theme/components/typography.d.ts +1 -5
  137. package/types/theme/global/colors/types.d.ts +5 -0
  138. package/types/theme/global/index.d.ts +5 -0
  139. package/types/theme/global/scale.d.ts +4 -1
  140. package/types/theme/global/typography.d.ts +9 -2
@@ -125,6 +125,7 @@ Array [
125
125
  themeFontSize="medium"
126
126
  themeFontWeight="regular"
127
127
  themeIntent="body"
128
+ themeTypeface="neutral"
128
129
  themeVariant="default"
129
130
  >
130
131
  Choose collaborators
@@ -335,6 +336,7 @@ Array [
335
336
  themeFontSize="large"
336
337
  themeFontWeight="semi-bold"
337
338
  themeIntent="body"
339
+ themeTypeface="neutral"
338
340
  >
339
341
  Choose collaborators
340
342
  </Text>
@@ -518,6 +520,7 @@ Array [
518
520
  themeFontSize="large"
519
521
  themeFontWeight="regular"
520
522
  themeIntent="body"
523
+ themeTypeface="neutral"
521
524
  >
522
525
  D
523
526
  </Text>
@@ -628,6 +631,7 @@ Array [
628
631
  themeFontSize="large"
629
632
  themeFontWeight="semi-bold"
630
633
  themeIntent="body"
634
+ themeTypeface="neutral"
631
635
  >
632
636
  Daniel
633
637
  </Text>
@@ -647,6 +651,7 @@ Array [
647
651
  themeFontSize="large"
648
652
  themeFontWeight="regular"
649
653
  themeIntent="subdued"
654
+ themeTypeface="neutral"
650
655
  >
651
656
  Senior Developer
652
657
  </Text>
@@ -765,6 +770,7 @@ Array [
765
770
  themeFontSize="large"
766
771
  themeFontWeight="semi-bold"
767
772
  themeIntent="body"
773
+ themeTypeface="neutral"
768
774
  >
769
775
  Daemon
770
776
  </Text>
@@ -784,6 +790,7 @@ Array [
784
790
  themeFontSize="large"
785
791
  themeFontWeight="regular"
786
792
  themeIntent="subdued"
793
+ themeTypeface="neutral"
787
794
  >
788
795
  Manager
789
796
  </Text>
@@ -907,6 +914,7 @@ Array [
907
914
  themeFontSize="large"
908
915
  themeFontWeight="regular"
909
916
  themeIntent="body"
917
+ themeTypeface="neutral"
910
918
  >
911
919
  J
912
920
  </Text>
@@ -1017,6 +1025,7 @@ Array [
1017
1025
  themeFontSize="large"
1018
1026
  themeFontWeight="semi-bold"
1019
1027
  themeIntent="body"
1028
+ themeTypeface="neutral"
1020
1029
  >
1021
1030
  Jennifer
1022
1031
  </Text>
@@ -1036,6 +1045,7 @@ Array [
1036
1045
  themeFontSize="large"
1037
1046
  themeFontWeight="regular"
1038
1047
  themeIntent="subdued"
1048
+ themeTypeface="neutral"
1039
1049
  >
1040
1050
  UX Designer
1041
1051
  </Text>
@@ -1154,6 +1164,7 @@ Array [
1154
1164
  themeFontSize="large"
1155
1165
  themeFontWeight="semi-bold"
1156
1166
  themeIntent="body"
1167
+ themeTypeface="neutral"
1157
1168
  >
1158
1169
  Josh
1159
1170
  </Text>
@@ -1173,6 +1184,7 @@ Array [
1173
1184
  themeFontSize="large"
1174
1185
  themeFontWeight="regular"
1175
1186
  themeIntent="subdued"
1187
+ themeTypeface="neutral"
1176
1188
  >
1177
1189
  Junior Developer
1178
1190
  </Text>
@@ -1303,6 +1315,7 @@ Array [
1303
1315
  themeFontSize="large"
1304
1316
  themeFontWeight="semi-bold"
1305
1317
  themeIntent="body"
1318
+ themeTypeface="neutral"
1306
1319
  >
1307
1320
  Confirm
1308
1321
  </Text>
@@ -1424,6 +1437,7 @@ Array [
1424
1437
  themeFontSize="small"
1425
1438
  themeFontWeight="regular"
1426
1439
  themeIntent="body"
1440
+ themeTypeface="neutral"
1427
1441
  themeVariant="filled"
1428
1442
  >
1429
1443
  Allow notifications
@@ -1651,6 +1665,7 @@ Array [
1651
1665
  themeFontSize="large"
1652
1666
  themeFontWeight="semi-bold"
1653
1667
  themeIntent="body"
1668
+ themeTypeface="neutral"
1654
1669
  >
1655
1670
  Allow notifications
1656
1671
  </Text>
@@ -1891,6 +1906,7 @@ Array [
1891
1906
  themeFontSize="large"
1892
1907
  themeFontWeight="regular"
1893
1908
  themeIntent="body"
1909
+ themeTypeface="neutral"
1894
1910
  >
1895
1911
  Monday
1896
1912
  </Text>
@@ -2037,6 +2053,7 @@ Array [
2037
2053
  themeFontSize="large"
2038
2054
  themeFontWeight="regular"
2039
2055
  themeIntent="body"
2056
+ themeTypeface="neutral"
2040
2057
  >
2041
2058
  Tuesday
2042
2059
  </Text>
@@ -2183,6 +2200,7 @@ Array [
2183
2200
  themeFontSize="large"
2184
2201
  themeFontWeight="regular"
2185
2202
  themeIntent="body"
2203
+ themeTypeface="neutral"
2186
2204
  >
2187
2205
  Wednesday
2188
2206
  </Text>
@@ -2304,6 +2322,7 @@ Array [
2304
2322
  themeFontSize="large"
2305
2323
  themeFontWeight="regular"
2306
2324
  themeIntent="body"
2325
+ themeTypeface="neutral"
2307
2326
  >
2308
2327
  Thursday
2309
2328
  </Text>
@@ -2425,6 +2444,7 @@ Array [
2425
2444
  themeFontSize="large"
2426
2445
  themeFontWeight="regular"
2427
2446
  themeIntent="body"
2447
+ themeTypeface="neutral"
2428
2448
  >
2429
2449
  Friday
2430
2450
  </Text>
@@ -2546,6 +2566,7 @@ Array [
2546
2566
  themeFontSize="large"
2547
2567
  themeFontWeight="regular"
2548
2568
  themeIntent="body"
2569
+ themeTypeface="neutral"
2549
2570
  >
2550
2571
  Saturday
2551
2572
  </Text>
@@ -2668,6 +2689,7 @@ Array [
2668
2689
  themeFontSize="large"
2669
2690
  themeFontWeight="regular"
2670
2691
  themeIntent="body"
2692
+ themeTypeface="neutral"
2671
2693
  >
2672
2694
  Sunday
2673
2695
  </Text>
@@ -2802,6 +2824,7 @@ Array [
2802
2824
  themeFontSize="large"
2803
2825
  themeFontWeight="semi-bold"
2804
2826
  themeIntent="body"
2827
+ themeTypeface="neutral"
2805
2828
  >
2806
2829
  Confirm
2807
2830
  </Text>
@@ -2921,6 +2944,7 @@ Array [
2921
2944
  themeFontSize="small"
2922
2945
  themeFontWeight="regular"
2923
2946
  themeIntent="body"
2947
+ themeTypeface="neutral"
2924
2948
  themeVariant="filled"
2925
2949
  >
2926
2950
  Allow notifications
@@ -3145,6 +3169,7 @@ Array [
3145
3169
  themeFontSize="large"
3146
3170
  themeFontWeight="semi-bold"
3147
3171
  themeIntent="body"
3172
+ themeTypeface="neutral"
3148
3173
  >
3149
3174
  Allow notifications
3150
3175
  </Text>
@@ -3381,6 +3406,7 @@ Array [
3381
3406
  themeFontSize="large"
3382
3407
  themeFontWeight="regular"
3383
3408
  themeIntent="body"
3409
+ themeTypeface="neutral"
3384
3410
  >
3385
3411
  Monday
3386
3412
  </Text>
@@ -3525,6 +3551,7 @@ Array [
3525
3551
  themeFontSize="large"
3526
3552
  themeFontWeight="regular"
3527
3553
  themeIntent="body"
3554
+ themeTypeface="neutral"
3528
3555
  >
3529
3556
  Tuesday
3530
3557
  </Text>
@@ -3669,6 +3696,7 @@ Array [
3669
3696
  themeFontSize="large"
3670
3697
  themeFontWeight="regular"
3671
3698
  themeIntent="body"
3699
+ themeTypeface="neutral"
3672
3700
  >
3673
3701
  Wednesday
3674
3702
  </Text>
@@ -3788,6 +3816,7 @@ Array [
3788
3816
  themeFontSize="large"
3789
3817
  themeFontWeight="regular"
3790
3818
  themeIntent="body"
3819
+ themeTypeface="neutral"
3791
3820
  >
3792
3821
  Thursday
3793
3822
  </Text>
@@ -3907,6 +3936,7 @@ Array [
3907
3936
  themeFontSize="large"
3908
3937
  themeFontWeight="regular"
3909
3938
  themeIntent="body"
3939
+ themeTypeface="neutral"
3910
3940
  >
3911
3941
  Friday
3912
3942
  </Text>
@@ -4026,6 +4056,7 @@ Array [
4026
4056
  themeFontSize="large"
4027
4057
  themeFontWeight="regular"
4028
4058
  themeIntent="body"
4059
+ themeTypeface="neutral"
4029
4060
  >
4030
4061
  Saturday
4031
4062
  </Text>
@@ -4146,6 +4177,7 @@ Array [
4146
4177
  themeFontSize="large"
4147
4178
  themeFontWeight="regular"
4148
4179
  themeIntent="body"
4180
+ themeTypeface="neutral"
4149
4181
  >
4150
4182
  Sunday
4151
4183
  </Text>
@@ -4278,6 +4310,7 @@ Array [
4278
4310
  themeFontSize="large"
4279
4311
  themeFontWeight="semi-bold"
4280
4312
  themeIntent="body"
4313
+ themeTypeface="neutral"
4281
4314
  >
4282
4315
  Confirm
4283
4316
  </Text>
@@ -4399,6 +4432,7 @@ Array [
4399
4432
  themeFontSize="small"
4400
4433
  themeFontWeight="regular"
4401
4434
  themeIntent="body"
4435
+ themeTypeface="neutral"
4402
4436
  themeVariant="readonly"
4403
4437
  >
4404
4438
  Allow notifications
@@ -4640,6 +4674,7 @@ Array [
4640
4674
  themeFontSize="large"
4641
4675
  themeFontWeight="semi-bold"
4642
4676
  themeIntent="body"
4677
+ themeTypeface="neutral"
4643
4678
  >
4644
4679
  Allow notifications
4645
4680
  </Text>
@@ -4880,6 +4915,7 @@ Array [
4880
4915
  themeFontSize="large"
4881
4916
  themeFontWeight="regular"
4882
4917
  themeIntent="body"
4918
+ themeTypeface="neutral"
4883
4919
  >
4884
4920
  Monday
4885
4921
  </Text>
@@ -5026,6 +5062,7 @@ Array [
5026
5062
  themeFontSize="large"
5027
5063
  themeFontWeight="regular"
5028
5064
  themeIntent="body"
5065
+ themeTypeface="neutral"
5029
5066
  >
5030
5067
  Tuesday
5031
5068
  </Text>
@@ -5172,6 +5209,7 @@ Array [
5172
5209
  themeFontSize="large"
5173
5210
  themeFontWeight="regular"
5174
5211
  themeIntent="body"
5212
+ themeTypeface="neutral"
5175
5213
  >
5176
5214
  Wednesday
5177
5215
  </Text>
@@ -5293,6 +5331,7 @@ Array [
5293
5331
  themeFontSize="large"
5294
5332
  themeFontWeight="regular"
5295
5333
  themeIntent="body"
5334
+ themeTypeface="neutral"
5296
5335
  >
5297
5336
  Thursday
5298
5337
  </Text>
@@ -5414,6 +5453,7 @@ Array [
5414
5453
  themeFontSize="large"
5415
5454
  themeFontWeight="regular"
5416
5455
  themeIntent="body"
5456
+ themeTypeface="neutral"
5417
5457
  >
5418
5458
  Friday
5419
5459
  </Text>
@@ -5535,6 +5575,7 @@ Array [
5535
5575
  themeFontSize="large"
5536
5576
  themeFontWeight="regular"
5537
5577
  themeIntent="body"
5578
+ themeTypeface="neutral"
5538
5579
  >
5539
5580
  Saturday
5540
5581
  </Text>
@@ -5657,6 +5698,7 @@ Array [
5657
5698
  themeFontSize="large"
5658
5699
  themeFontWeight="regular"
5659
5700
  themeIntent="body"
5701
+ themeTypeface="neutral"
5660
5702
  >
5661
5703
  Sunday
5662
5704
  </Text>
@@ -5791,6 +5833,7 @@ Array [
5791
5833
  themeFontSize="large"
5792
5834
  themeFontWeight="semi-bold"
5793
5835
  themeIntent="body"
5836
+ themeTypeface="neutral"
5794
5837
  >
5795
5838
  Confirm
5796
5839
  </Text>
@@ -5910,6 +5953,7 @@ Array [
5910
5953
  themeFontSize="small"
5911
5954
  themeFontWeight="regular"
5912
5955
  themeIntent="body"
5956
+ themeTypeface="neutral"
5913
5957
  themeVariant="filled"
5914
5958
  >
5915
5959
  Allow notifications
@@ -6134,6 +6178,7 @@ Array [
6134
6178
  themeFontSize="large"
6135
6179
  themeFontWeight="semi-bold"
6136
6180
  themeIntent="body"
6181
+ themeTypeface="neutral"
6137
6182
  >
6138
6183
  Allow notifications
6139
6184
  </Text>
@@ -6309,6 +6354,7 @@ Array [
6309
6354
  themeFontSize="large"
6310
6355
  themeFontWeight="regular"
6311
6356
  themeIntent="body"
6357
+ themeTypeface="neutral"
6312
6358
  >
6313
6359
  A
6314
6360
  </Text>
@@ -6411,6 +6457,7 @@ Array [
6411
6457
  themeFontSize="large"
6412
6458
  themeFontWeight="regular"
6413
6459
  themeIntent="body"
6460
+ themeTypeface="neutral"
6414
6461
  >
6415
6462
  A1
6416
6463
  </Text>
@@ -6525,6 +6572,7 @@ Array [
6525
6572
  themeFontSize="large"
6526
6573
  themeFontWeight="regular"
6527
6574
  themeIntent="body"
6575
+ themeTypeface="neutral"
6528
6576
  >
6529
6577
  B
6530
6578
  </Text>
@@ -6627,6 +6675,7 @@ Array [
6627
6675
  themeFontSize="large"
6628
6676
  themeFontWeight="regular"
6629
6677
  themeIntent="body"
6678
+ themeTypeface="neutral"
6630
6679
  >
6631
6680
  B1
6632
6681
  </Text>
@@ -6761,6 +6810,7 @@ Array [
6761
6810
  themeFontSize="large"
6762
6811
  themeFontWeight="regular"
6763
6812
  themeIntent="body"
6813
+ themeTypeface="neutral"
6764
6814
  >
6765
6815
  B2
6766
6816
  </Text>
@@ -6907,6 +6957,7 @@ Array [
6907
6957
  themeFontSize="large"
6908
6958
  themeFontWeight="semi-bold"
6909
6959
  themeIntent="body"
6960
+ themeTypeface="neutral"
6910
6961
  >
6911
6962
  Confirm
6912
6963
  </Text>
@@ -4,6 +4,8 @@ import renderWithTheme from '../../../../testHelpers/renderWithTheme';
4
4
  import MultiSelect from '..';
5
5
  import Typography from '../../../Typography';
6
6
  import List from '../../../List';
7
+ import Box from '../../../Box';
8
+ import Button from '../../../Button/Button';
7
9
  import type { ListRenderOptionInfo } from '../../types';
8
10
 
9
11
  const options = [
@@ -195,6 +197,26 @@ describe('rendering', () => {
195
197
  expect(getByText('Custom daniel')).toBeTruthy();
196
198
  expect(getByText('Custom daemon')).toBeTruthy();
197
199
  });
200
+
201
+ it('allows custom footer', () => {
202
+ const { getByText } = renderWithTheme(
203
+ <MultiSelect<string, CustomOptionType>
204
+ label="Choose collaborators"
205
+ footerLabel={({ value: _value, closeModal: _closeModal }) => (
206
+ <Box>
207
+ <Button text="Clear all" onPress={jest.fn()} />
208
+ <Button text="Save" onPress={jest.fn()} />
209
+ </Box>
210
+ )}
211
+ options={collaboratorSections}
212
+ value={['daniel', 'daemon']}
213
+ onConfirm={jest.fn()}
214
+ />
215
+ );
216
+
217
+ expect(getByText('Clear all')).toBeTruthy();
218
+ expect(getByText('Save')).toBeTruthy();
219
+ });
198
220
  });
199
221
 
200
222
  describe('behavior', () => {
@@ -1,21 +1,22 @@
1
- import React, { useState, useRef } from 'react';
2
- import { TouchableOpacity, View } from 'react-native';
1
+ import React, { useEffect, useRef, useState } from 'react';
3
2
  import type {
4
3
  SectionList,
5
4
  TextInputProps as NativeTextInputProps,
6
5
  } from 'react-native';
6
+ import { TouchableOpacity, View } from 'react-native';
7
7
  import BottomSheet from '../../BottomSheet';
8
- import Footer from '../Footer';
9
- import OptionList from './OptionList';
8
+ import Box from '../../Box';
10
9
  import TextInput from '../../TextInput';
11
- import { StyledSearchBar } from '../StyledSelect';
10
+ import Footer from '../Footer';
12
11
  import {
13
12
  getScrollParams,
14
13
  toFlatOptions,
15
14
  toSections,
16
15
  useKeyboard,
17
16
  } from '../helpers';
17
+ import { StyledSearchBar } from '../StyledSelect';
18
18
  import type { OptionType, SectionType, SelectProps } from '../types';
19
+ import OptionList from './OptionList';
19
20
 
20
21
  export interface MultiSelectProps<V, T extends OptionType<V> = OptionType<V>>
21
22
  extends SelectProps<V, T> {
@@ -30,7 +31,15 @@ export interface MultiSelectProps<V, T extends OptionType<V> = OptionType<V>>
30
31
  /**
31
32
  * Footer label.
32
33
  */
33
- footerLabel: string;
34
+ footerLabel:
35
+ | string
36
+ | (({
37
+ value,
38
+ closeModal,
39
+ }: {
40
+ value: V[];
41
+ closeModal: () => void;
42
+ }) => React.ReactNode);
34
43
  /**
35
44
  * Customise the selected value rendering.
36
45
  */
@@ -72,6 +81,10 @@ function MultiSelect<V, T extends OptionType<V>>({
72
81
  .map((opt) => opt.text)
73
82
  .join(', ');
74
83
 
84
+ useEffect(() => {
85
+ setSelectingValue(value);
86
+ }, [open]);
87
+
75
88
  return (
76
89
  <>
77
90
  <View
@@ -115,13 +128,22 @@ function MultiSelect<V, T extends OptionType<V>>({
115
128
  paddingBottom: isKeyboardVisible ? keyboardHeight : 0,
116
129
  }}
117
130
  footer={
118
- <Footer
119
- label={footerLabel}
120
- onPress={() => {
121
- setOpen(false);
122
- onConfirm(selectingValue);
123
- }}
124
- />
131
+ typeof footerLabel === 'string' ? (
132
+ <Footer
133
+ label={footerLabel}
134
+ onPress={() => {
135
+ setOpen(false);
136
+ onConfirm(selectingValue);
137
+ }}
138
+ />
139
+ ) : (
140
+ <Box flex={1} flexDirection="row" justifyContent="flex-end">
141
+ {footerLabel({
142
+ value: selectingValue,
143
+ closeModal: () => setOpen(false),
144
+ })}
145
+ </Box>
146
+ )
125
147
  }
126
148
  onAnimationEnd={() => {
127
149
  if (open === true) {
@@ -51,6 +51,7 @@ exports[`Option renders correctly 1`] = `
51
51
  themeFontSize="large"
52
52
  themeFontWeight="regular"
53
53
  themeIntent="body"
54
+ themeTypeface="neutral"
54
55
  >
55
56
  testOption
56
57
  </Text>
@@ -124,6 +124,7 @@ exports[`OptionList render isLoading correctly 1`] = `
124
124
  themeFontSize="large"
125
125
  themeFontWeight="regular"
126
126
  themeIntent="body"
127
+ themeTypeface="neutral"
127
128
  >
128
129
  A
129
130
  </Text>
@@ -228,6 +229,7 @@ exports[`OptionList render isLoading correctly 1`] = `
228
229
  themeFontSize="large"
229
230
  themeFontWeight="regular"
230
231
  themeIntent="body"
232
+ themeTypeface="neutral"
231
233
  >
232
234
  A1
233
235
  </Text>
@@ -342,6 +344,7 @@ exports[`OptionList render isLoading correctly 1`] = `
342
344
  themeFontSize="large"
343
345
  themeFontWeight="regular"
344
346
  themeIntent="body"
347
+ themeTypeface="neutral"
345
348
  >
346
349
  B
347
350
  </Text>
@@ -446,6 +449,7 @@ exports[`OptionList render isLoading correctly 1`] = `
446
449
  themeFontSize="large"
447
450
  themeFontWeight="regular"
448
451
  themeIntent="body"
452
+ themeTypeface="neutral"
449
453
  >
450
454
  B1
451
455
  </Text>
@@ -557,6 +561,7 @@ exports[`OptionList render isLoading correctly 1`] = `
557
561
  themeFontSize="large"
558
562
  themeFontWeight="regular"
559
563
  themeIntent="body"
564
+ themeTypeface="neutral"
560
565
  >
561
566
  B2
562
567
  </Text>
@@ -887,6 +892,7 @@ exports[`OptionList renders correctly 1`] = `
887
892
  themeFontSize="large"
888
893
  themeFontWeight="regular"
889
894
  themeIntent="body"
895
+ themeTypeface="neutral"
890
896
  >
891
897
  A
892
898
  </Text>
@@ -991,6 +997,7 @@ exports[`OptionList renders correctly 1`] = `
991
997
  themeFontSize="large"
992
998
  themeFontWeight="regular"
993
999
  themeIntent="body"
1000
+ themeTypeface="neutral"
994
1001
  >
995
1002
  A1
996
1003
  </Text>
@@ -1105,6 +1112,7 @@ exports[`OptionList renders correctly 1`] = `
1105
1112
  themeFontSize="large"
1106
1113
  themeFontWeight="regular"
1107
1114
  themeIntent="body"
1115
+ themeTypeface="neutral"
1108
1116
  >
1109
1117
  B
1110
1118
  </Text>
@@ -1209,6 +1217,7 @@ exports[`OptionList renders correctly 1`] = `
1209
1217
  themeFontSize="large"
1210
1218
  themeFontWeight="regular"
1211
1219
  themeIntent="body"
1220
+ themeTypeface="neutral"
1212
1221
  >
1213
1222
  B1
1214
1223
  </Text>
@@ -1320,6 +1329,7 @@ exports[`OptionList renders correctly 1`] = `
1320
1329
  themeFontSize="large"
1321
1330
  themeFontWeight="regular"
1322
1331
  themeIntent="body"
1332
+ themeTypeface="neutral"
1323
1333
  >
1324
1334
  B2
1325
1335
  </Text>
@@ -1490,6 +1500,7 @@ exports[`OptionList trigger onPress correctly on select new value 1`] = `
1490
1500
  themeFontSize="large"
1491
1501
  themeFontWeight="regular"
1492
1502
  themeIntent="body"
1503
+ themeTypeface="neutral"
1493
1504
  >
1494
1505
  A
1495
1506
  </Text>
@@ -1594,6 +1605,7 @@ exports[`OptionList trigger onPress correctly on select new value 1`] = `
1594
1605
  themeFontSize="large"
1595
1606
  themeFontWeight="regular"
1596
1607
  themeIntent="body"
1608
+ themeTypeface="neutral"
1597
1609
  >
1598
1610
  A1
1599
1611
  </Text>
@@ -1708,6 +1720,7 @@ exports[`OptionList trigger onPress correctly on select new value 1`] = `
1708
1720
  themeFontSize="large"
1709
1721
  themeFontWeight="regular"
1710
1722
  themeIntent="body"
1723
+ themeTypeface="neutral"
1711
1724
  >
1712
1725
  B
1713
1726
  </Text>
@@ -1812,6 +1825,7 @@ exports[`OptionList trigger onPress correctly on select new value 1`] = `
1812
1825
  themeFontSize="large"
1813
1826
  themeFontWeight="regular"
1814
1827
  themeIntent="body"
1828
+ themeTypeface="neutral"
1815
1829
  >
1816
1830
  B1
1817
1831
  </Text>
@@ -1923,6 +1937,7 @@ exports[`OptionList trigger onPress correctly on select new value 1`] = `
1923
1937
  themeFontSize="large"
1924
1938
  themeFontWeight="regular"
1925
1939
  themeIntent="body"
1940
+ themeTypeface="neutral"
1926
1941
  >
1927
1942
  B2
1928
1943
  </Text>
@@ -2093,6 +2108,7 @@ exports[`OptionList trigger onPress correctly on unselect current value 1`] = `
2093
2108
  themeFontSize="large"
2094
2109
  themeFontWeight="regular"
2095
2110
  themeIntent="body"
2111
+ themeTypeface="neutral"
2096
2112
  >
2097
2113
  A
2098
2114
  </Text>
@@ -2197,6 +2213,7 @@ exports[`OptionList trigger onPress correctly on unselect current value 1`] = `
2197
2213
  themeFontSize="large"
2198
2214
  themeFontWeight="regular"
2199
2215
  themeIntent="body"
2216
+ themeTypeface="neutral"
2200
2217
  >
2201
2218
  A1
2202
2219
  </Text>
@@ -2311,6 +2328,7 @@ exports[`OptionList trigger onPress correctly on unselect current value 1`] = `
2311
2328
  themeFontSize="large"
2312
2329
  themeFontWeight="regular"
2313
2330
  themeIntent="body"
2331
+ themeTypeface="neutral"
2314
2332
  >
2315
2333
  B
2316
2334
  </Text>
@@ -2415,6 +2433,7 @@ exports[`OptionList trigger onPress correctly on unselect current value 1`] = `
2415
2433
  themeFontSize="large"
2416
2434
  themeFontWeight="regular"
2417
2435
  themeIntent="body"
2436
+ themeTypeface="neutral"
2418
2437
  >
2419
2438
  B1
2420
2439
  </Text>
@@ -2526,6 +2545,7 @@ exports[`OptionList trigger onPress correctly on unselect current value 1`] = `
2526
2545
  themeFontSize="large"
2527
2546
  themeFontWeight="regular"
2528
2547
  themeIntent="body"
2548
+ themeTypeface="neutral"
2529
2549
  >
2530
2550
  B2
2531
2551
  </Text>