@hero-design/rn 7.22.3 → 7.24.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 (197) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/assets/fonts/hero-icons.ttf +0 -0
  3. package/es/index.js +2974 -10456
  4. package/lib/assets/fonts/hero-icons.ttf +0 -0
  5. package/lib/index.js +2977 -10455
  6. package/package.json +8 -6
  7. package/rollup.config.js +1 -0
  8. package/src/components/Box/StyledBox.tsx +1 -2
  9. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +19 -4
  10. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +19 -4
  11. package/src/components/Empty/index.tsx +1 -2
  12. package/src/components/Icon/HeroIcon/fonts/hero-icons.ttf +0 -0
  13. package/src/components/Icon/HeroIcon/glyphMap.json +1 -0
  14. package/src/components/Icon/HeroIcon/index.tsx +3 -7
  15. package/src/components/Icon/IconList.ts +8 -5
  16. package/src/components/Icon/index.tsx +1 -0
  17. package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +69 -0
  18. package/src/components/RefreshControl/__tests__/index.spec.tsx +55 -0
  19. package/src/components/RefreshControl/index.tsx +23 -0
  20. package/src/components/RichTextEditor/MentionList.tsx +25 -4
  21. package/src/components/RichTextEditor/RichTextEditor.tsx +3 -4
  22. package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +6 -6
  23. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +38 -8
  24. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +8 -4
  25. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +95 -20
  26. package/src/components/Select/MultiSelect/index.tsx +1 -1
  27. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +8 -4
  28. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +95 -20
  29. package/src/components/Select/SingleSelect/index.tsx +1 -1
  30. package/src/components/Select/types.ts +1 -3
  31. package/src/components/Spinner/AnimatedSpinner.tsx +22 -7
  32. package/src/components/Spinner/StyledSpinner.tsx +16 -11
  33. package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +3 -1
  34. package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +42 -31
  35. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +8 -4
  36. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +532 -72
  37. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +8 -4
  38. package/src/components/Spinner/index.tsx +6 -1
  39. package/src/components/Swipeable/StyledSwipeable.tsx +11 -0
  40. package/src/components/Swipeable/SwipeableAction.tsx +45 -0
  41. package/src/components/Swipeable/__tests__/SwipeableAction.spec.tsx +37 -0
  42. package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +130 -0
  43. package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +33 -0
  44. package/src/components/Swipeable/__tests__/index.spec.tsx +34 -0
  45. package/src/components/Swipeable/index.tsx +148 -0
  46. package/src/components/TextInput/StyledTextInput.tsx +18 -19
  47. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +14 -8
  48. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +52 -150
  49. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +247 -52
  50. package/src/components/TextInput/__tests__/index.spec.tsx +114 -124
  51. package/src/components/TextInput/index.tsx +27 -9
  52. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +19 -4
  53. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +19 -4
  54. package/src/index.ts +8 -0
  55. package/src/theme/ThemeSwitcher.tsx +9 -2
  56. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +20 -9
  57. package/src/theme/components/refreshControl.ts +11 -0
  58. package/src/theme/components/richTextEditor.ts +6 -5
  59. package/src/theme/components/spinner.ts +4 -1
  60. package/src/theme/components/swipeable.ts +13 -0
  61. package/src/theme/components/textInput.ts +0 -5
  62. package/src/theme/getTheme.ts +6 -0
  63. package/src/theme/global/colors/jobs.ts +17 -0
  64. package/src/theme/global/colors/work.ts +0 -2
  65. package/src/theme/global/index.ts +8 -1
  66. package/src/theme/index.ts +6 -1
  67. package/src/types.ts +2 -0
  68. package/src/utils/__tests__/helpers.spec.ts +27 -0
  69. package/src/utils/helpers.ts +21 -0
  70. package/testUtils/setup.tsx +13 -0
  71. package/tsconfig.prod.json +4 -0
  72. package/types/components/Empty/index.d.ts +1 -2
  73. package/types/components/Icon/IconList.d.ts +1 -1
  74. package/types/components/Icon/index.d.ts +4 -1
  75. package/types/components/Icon/utils.d.ts +1 -1
  76. package/types/components/RefreshControl/index.d.ts +5 -0
  77. package/types/components/RichTextEditor/MentionList.d.ts +7 -3
  78. package/types/components/RichTextEditor/index.d.ts +1 -1
  79. package/types/components/Select/types.d.ts +1 -3
  80. package/types/components/Spinner/AnimatedSpinner.d.ts +2 -1
  81. package/types/components/Spinner/StyledSpinner.d.ts +1 -0
  82. package/types/components/Spinner/index.d.ts +5 -1
  83. package/types/components/Swipeable/StyledSwipeable.d.ts +10 -0
  84. package/types/components/Swipeable/SwipeableAction.d.ts +27 -0
  85. package/types/components/Swipeable/index.d.ts +41 -0
  86. package/types/components/TextInput/StyledTextInput.d.ts +11 -4
  87. package/types/components/TextInput/index.d.ts +1 -1
  88. package/types/index.d.ts +4 -2
  89. package/types/theme/ThemeSwitcher.d.ts +1 -1
  90. package/types/theme/components/refreshControl.d.ts +7 -0
  91. package/types/theme/components/richTextEditor.d.ts +4 -3
  92. package/types/theme/components/spinner.d.ts +4 -1
  93. package/types/theme/components/swipeable.d.ts +9 -0
  94. package/types/theme/components/textInput.d.ts +0 -5
  95. package/types/theme/getTheme.d.ts +4 -0
  96. package/types/theme/global/colors/jobs.d.ts +3 -0
  97. package/types/theme/global/index.d.ts +2 -1
  98. package/types/theme/index.d.ts +2 -2
  99. package/types/types.d.ts +2 -1
  100. package/types/utils/helpers.d.ts +2 -0
  101. package/src/components/Box/__tests__/helpers.spec.ts +0 -14
  102. package/src/components/Box/helpers.ts +0 -10
  103. package/src/components/Icon/HeroIcon/selection.json +0 -7029
  104. package/types/components/Accordion/__tests__/AccordionItem.spec.d.ts +0 -1
  105. package/types/components/Accordion/__tests__/StyledAccordion.spec.d.ts +0 -1
  106. package/types/components/Accordion/__tests__/index.spec.d.ts +0 -1
  107. package/types/components/Alert/__tests__/index.spec.d.ts +0 -1
  108. package/types/components/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -1
  109. package/types/components/Avatar/__tests__/index.spec.d.ts +0 -1
  110. package/types/components/Badge/__tests__/Badge.spec.d.ts +0 -1
  111. package/types/components/Badge/__tests__/Status.spec.d.ts +0 -1
  112. package/types/components/BottomNavigation/__tests__/index.spec.d.ts +0 -1
  113. package/types/components/BottomSheet/__tests__/index.spec.d.ts +0 -1
  114. package/types/components/Box/__tests__/helpers.spec.d.ts +0 -1
  115. package/types/components/Box/__tests__/index.spec.d.ts +0 -1
  116. package/types/components/Box/helpers.d.ts +0 -1
  117. package/types/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -1
  118. package/types/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +0 -1
  119. package/types/components/Button/UtilityButton/__tests__/index.spec.d.ts +0 -1
  120. package/types/components/Button/__tests__/Button.spec.d.ts +0 -1
  121. package/types/components/Button/__tests__/IconButton.spec.d.ts +0 -1
  122. package/types/components/Button/__tests__/StyledButton.spec.d.ts +0 -1
  123. package/types/components/Calendar/__tests__/CalendarRowItem.spec.d.ts +0 -1
  124. package/types/components/Calendar/__tests__/helper.spec.d.ts +0 -1
  125. package/types/components/Calendar/__tests__/index.spec.d.ts +0 -1
  126. package/types/components/Card/DataCard/__tests__/StyledDataCard.spec.d.ts +0 -1
  127. package/types/components/Card/DataCard/__tests__/index.spec.d.ts +0 -1
  128. package/types/components/Card/__tests__/StyledCard.spec.d.ts +0 -1
  129. package/types/components/Card/__tests__/index.spec.d.ts +0 -1
  130. package/types/components/Checkbox/__tests__/StyledCheckbox.spec.d.ts +0 -1
  131. package/types/components/Checkbox/__tests__/index.spec.d.ts +0 -1
  132. package/types/components/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -1
  133. package/types/components/Collapse/__tests__/index.spec.d.ts +0 -1
  134. package/types/components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts +0 -1
  135. package/types/components/ContentNavigator/__tests__/index.spec.d.ts +0 -1
  136. package/types/components/DatePicker/__tests__/DatePicker.spec.d.ts +0 -1
  137. package/types/components/DatePicker/__tests__/DatePickerAndroid.spec.d.ts +0 -1
  138. package/types/components/DatePicker/__tests__/DatePickerIOS.spec.d.ts +0 -1
  139. package/types/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -1
  140. package/types/components/Drawer/DragableDrawer/__tests__/helpers.spec.d.ts +0 -1
  141. package/types/components/Drawer/DragableDrawer/__tests__/index.spec.d.ts +0 -1
  142. package/types/components/Drawer/__tests__/index.spec.d.ts +0 -1
  143. package/types/components/Empty/__tests__/index.spec.d.ts +0 -1
  144. package/types/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -1
  145. package/types/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -1
  146. package/types/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -1
  147. package/types/components/FAB/__tests__/index.spec.d.ts +0 -1
  148. package/types/components/Icon/__tests__/index.spec.d.ts +0 -1
  149. package/types/components/Image/__tests__/index.spec.d.ts +0 -1
  150. package/types/components/List/__tests__/BasicListItem.spec.d.ts +0 -1
  151. package/types/components/List/__tests__/ListItem.spec.d.ts +0 -1
  152. package/types/components/List/__tests__/StyledBasicListItem.spec.d.ts +0 -1
  153. package/types/components/List/__tests__/StyledListItem.spec.d.ts +0 -1
  154. package/types/components/PinInput/__tests__/PinCell.spec.d.ts +0 -1
  155. package/types/components/PinInput/__tests__/StyledPinInput.spec.d.ts +0 -1
  156. package/types/components/PinInput/__tests__/index.spec.d.ts +0 -1
  157. package/types/components/Radio/__tests__/Radio.spec.d.ts +0 -1
  158. package/types/components/Radio/__tests__/RadioGroup.spec.d.ts +0 -1
  159. package/types/components/RichTextEditor/__tests__/EditorToolbar.spec.d.ts +0 -1
  160. package/types/components/RichTextEditor/__tests__/MentionList.spec.d.ts +0 -1
  161. package/types/components/RichTextEditor/__tests__/RichTextEditor.spec.d.ts +0 -1
  162. package/types/components/SectionHeading/__tests__/StyledHeading.spec.d.ts +0 -1
  163. package/types/components/SectionHeading/__tests__/index.spec.d.ts +0 -1
  164. package/types/components/Select/MultiSelect/__tests__/Option.spec.d.ts +0 -1
  165. package/types/components/Select/MultiSelect/__tests__/OptionList.spec.d.ts +0 -1
  166. package/types/components/Select/MultiSelect/__tests__/index.spec.d.ts +0 -1
  167. package/types/components/Select/SingleSelect/__tests__/Option.spec.d.ts +0 -1
  168. package/types/components/Select/SingleSelect/__tests__/OptionList.spec.d.ts +0 -1
  169. package/types/components/Select/SingleSelect/__tests__/index.spec.d.ts +0 -1
  170. package/types/components/Select/__tests__/StyledSelect.spec.d.ts +0 -1
  171. package/types/components/Select/__tests__/helpers.spec.d.ts +0 -1
  172. package/types/components/Slider/__tests__/index.spec.d.ts +0 -1
  173. package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +0 -1
  174. package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +0 -1
  175. package/types/components/Spinner/__tests__/index.spec.d.ts +0 -1
  176. package/types/components/Switch/SelectorSwitch/__tests__/Option.spec.d.ts +0 -1
  177. package/types/components/Switch/SelectorSwitch/__tests__/index.spec.d.ts +0 -1
  178. package/types/components/Switch/__tests__/StyledSwitch.spec.d.ts +0 -1
  179. package/types/components/Switch/__tests__/index.spec.d.ts +0 -1
  180. package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -1
  181. package/types/components/Tabs/__tests__/TabWithBadge.spec.d.ts +0 -1
  182. package/types/components/Tabs/__tests__/index.spec.d.ts +0 -1
  183. package/types/components/Tag/__tests__/Tag.spec.d.ts +0 -1
  184. package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +0 -1
  185. package/types/components/TextInput/__tests__/index.spec.d.ts +0 -1
  186. package/types/components/TimePicker/__tests__/TimePicker.spec.d.ts +0 -1
  187. package/types/components/TimePicker/__tests__/TimePickerAndroid.spec.d.ts +0 -1
  188. package/types/components/TimePicker/__tests__/TimePickerIOS.spec.d.ts +0 -1
  189. package/types/components/Toast/__tests__/Toast.spec.d.ts +0 -1
  190. package/types/components/Toast/__tests__/ToastContainer.spec.d.ts +0 -1
  191. package/types/components/Toast/__tests__/index.spec.d.ts +0 -1
  192. package/types/components/Toolbar/__tests__/ToolbarGroup.spec.d.ts +0 -1
  193. package/types/components/Toolbar/__tests__/ToolbarItem.spec.d.ts +0 -1
  194. package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -1
  195. package/types/components/Typography/Text/__tests__/index.spec.d.ts +0 -1
  196. package/types/theme/__tests__/index.spec.d.ts +0 -1
  197. package/types/utils/__tests__/scale.spec.d.ts +0 -1
@@ -727,12 +727,13 @@ exports[`OptionList render isLoading correctly 1`] = `
727
727
  "backgroundColor": "#001f23",
728
728
  "borderRadius": 999,
729
729
  "height": 16,
730
- "opacity": 1,
730
+ "opacity": 0.9,
731
731
  "width": 16,
732
732
  },
733
733
  Object {},
734
734
  ]
735
735
  }
736
+ themeIntent="primary"
736
737
  themePosition="topLeft"
737
738
  themeSize="medium"
738
739
  />
@@ -746,12 +747,13 @@ exports[`OptionList render isLoading correctly 1`] = `
746
747
  "borderRadius": 999,
747
748
  "height": 16,
748
749
  "marginLeft": 8,
749
- "opacity": 0.75,
750
+ "opacity": 0.675,
750
751
  "width": 16,
751
752
  },
752
753
  Object {},
753
754
  ]
754
755
  }
756
+ themeIntent="primary"
755
757
  themePosition="topRight"
756
758
  themeSize="medium"
757
759
  />
@@ -780,12 +782,13 @@ exports[`OptionList render isLoading correctly 1`] = `
780
782
  "backgroundColor": "#001f23",
781
783
  "borderRadius": 999,
782
784
  "height": 16,
783
- "opacity": 0.5,
785
+ "opacity": 0.45,
784
786
  "width": 16,
785
787
  },
786
788
  Object {},
787
789
  ]
788
790
  }
791
+ themeIntent="primary"
789
792
  themePosition="bottomLeft"
790
793
  themeSize="medium"
791
794
  />
@@ -799,12 +802,13 @@ exports[`OptionList render isLoading correctly 1`] = `
799
802
  "borderRadius": 999,
800
803
  "height": 16,
801
804
  "marginLeft": 8,
802
- "opacity": 0.25,
805
+ "opacity": 0.225,
803
806
  "width": 16,
804
807
  },
805
808
  Object {},
806
809
  ]
807
810
  }
811
+ themeIntent="primary"
808
812
  themePosition="bottomRight"
809
813
  themeSize="medium"
810
814
  />
@@ -29,16 +29,12 @@ Array [
29
29
  style={
30
30
  Array [
31
31
  Object {
32
- "borderColor": "#001f23",
33
- "borderRadius": 8,
34
- "borderWidth": 1,
35
32
  "marginVertical": 8,
36
33
  "width": "100%",
37
34
  },
38
35
  undefined,
39
36
  ]
40
37
  }
41
- themeVariant="default"
42
38
  >
43
39
  <View
44
40
  style={
@@ -52,6 +48,25 @@ Array [
52
48
  ]
53
49
  }
54
50
  >
51
+ <View
52
+ style={
53
+ Array [
54
+ Object {
55
+ "borderColor": "#001f23",
56
+ "borderRadius": 8,
57
+ "borderWidth": 1,
58
+ "bottom": 0,
59
+ "left": 0,
60
+ "position": "absolute",
61
+ "right": 0,
62
+ "top": 0,
63
+ },
64
+ undefined,
65
+ ]
66
+ }
67
+ themeFocused={false}
68
+ themeVariant="default"
69
+ />
55
70
  <View
56
71
  style={
57
72
  Array [
@@ -1364,16 +1379,12 @@ Array [
1364
1379
  style={
1365
1380
  Array [
1366
1381
  Object {
1367
- "borderColor": "#001f23",
1368
- "borderRadius": 8,
1369
- "borderWidth": 1,
1370
1382
  "marginVertical": 8,
1371
1383
  "width": "100%",
1372
1384
  },
1373
1385
  undefined,
1374
1386
  ]
1375
1387
  }
1376
- themeVariant="filled"
1377
1388
  >
1378
1389
  <View
1379
1390
  style={
@@ -1387,6 +1398,25 @@ Array [
1387
1398
  ]
1388
1399
  }
1389
1400
  >
1401
+ <View
1402
+ style={
1403
+ Array [
1404
+ Object {
1405
+ "borderColor": "#001f23",
1406
+ "borderRadius": 8,
1407
+ "borderWidth": 1,
1408
+ "bottom": 0,
1409
+ "left": 0,
1410
+ "position": "absolute",
1411
+ "right": 0,
1412
+ "top": 0,
1413
+ },
1414
+ undefined,
1415
+ ]
1416
+ }
1417
+ themeFocused={false}
1418
+ themeVariant="filled"
1419
+ />
1390
1420
  <View
1391
1421
  pointerEvents="none"
1392
1422
  style={
@@ -2895,16 +2925,12 @@ Array [
2895
2925
  style={
2896
2926
  Array [
2897
2927
  Object {
2898
- "borderColor": "#001f23",
2899
- "borderRadius": 8,
2900
- "borderWidth": 1,
2901
2928
  "marginVertical": 8,
2902
2929
  "width": "100%",
2903
2930
  },
2904
2931
  undefined,
2905
2932
  ]
2906
2933
  }
2907
- themeVariant="filled"
2908
2934
  >
2909
2935
  <View
2910
2936
  style={
@@ -2918,6 +2944,25 @@ Array [
2918
2944
  ]
2919
2945
  }
2920
2946
  >
2947
+ <View
2948
+ style={
2949
+ Array [
2950
+ Object {
2951
+ "borderColor": "#001f23",
2952
+ "borderRadius": 8,
2953
+ "borderWidth": 1,
2954
+ "bottom": 0,
2955
+ "left": 0,
2956
+ "position": "absolute",
2957
+ "right": 0,
2958
+ "top": 0,
2959
+ },
2960
+ undefined,
2961
+ ]
2962
+ }
2963
+ themeFocused={false}
2964
+ themeVariant="filled"
2965
+ />
2921
2966
  <View
2922
2967
  pointerEvents="none"
2923
2968
  style={
@@ -4421,16 +4466,12 @@ Array [
4421
4466
  style={
4422
4467
  Array [
4423
4468
  Object {
4424
- "borderColor": "#808f91",
4425
- "borderRadius": 8,
4426
- "borderWidth": 1,
4427
4469
  "marginVertical": 8,
4428
4470
  "width": "100%",
4429
4471
  },
4430
4472
  undefined,
4431
4473
  ]
4432
4474
  }
4433
- themeVariant="readonly"
4434
4475
  >
4435
4476
  <View
4436
4477
  style={
@@ -4444,6 +4485,25 @@ Array [
4444
4485
  ]
4445
4486
  }
4446
4487
  >
4488
+ <View
4489
+ style={
4490
+ Array [
4491
+ Object {
4492
+ "borderColor": "#808f91",
4493
+ "borderRadius": 8,
4494
+ "borderWidth": 1,
4495
+ "bottom": 0,
4496
+ "left": 0,
4497
+ "position": "absolute",
4498
+ "right": 0,
4499
+ "top": 0,
4500
+ },
4501
+ undefined,
4502
+ ]
4503
+ }
4504
+ themeFocused={false}
4505
+ themeVariant="readonly"
4506
+ />
4447
4507
  <View
4448
4508
  pointerEvents="none"
4449
4509
  style={
@@ -5966,16 +6026,12 @@ Array [
5966
6026
  style={
5967
6027
  Array [
5968
6028
  Object {
5969
- "borderColor": "#001f23",
5970
- "borderRadius": 8,
5971
- "borderWidth": 1,
5972
6029
  "marginVertical": 8,
5973
6030
  "width": "100%",
5974
6031
  },
5975
6032
  undefined,
5976
6033
  ]
5977
6034
  }
5978
- themeVariant="filled"
5979
6035
  >
5980
6036
  <View
5981
6037
  style={
@@ -5989,6 +6045,25 @@ Array [
5989
6045
  ]
5990
6046
  }
5991
6047
  >
6048
+ <View
6049
+ style={
6050
+ Array [
6051
+ Object {
6052
+ "borderColor": "#001f23",
6053
+ "borderRadius": 8,
6054
+ "borderWidth": 1,
6055
+ "bottom": 0,
6056
+ "left": 0,
6057
+ "position": "absolute",
6058
+ "right": 0,
6059
+ "top": 0,
6060
+ },
6061
+ undefined,
6062
+ ]
6063
+ }
6064
+ themeFocused={false}
6065
+ themeVariant="filled"
6066
+ />
5992
6067
  <View
5993
6068
  pointerEvents="none"
5994
6069
  style={
@@ -85,6 +85,7 @@ function MultiSelect<V, T extends OptionType<V>>({
85
85
  }
86
86
  <View pointerEvents="none">
87
87
  <TextInput
88
+ {...inputProps}
88
89
  label={label}
89
90
  value={displayedValue}
90
91
  suffix="arrow-down"
@@ -92,7 +93,6 @@ function MultiSelect<V, T extends OptionType<V>>({
92
93
  error={error}
93
94
  editable={editable}
94
95
  disabled={disabled}
95
- loading={inputProps?.loading}
96
96
  numberOfLines={numberOfLines}
97
97
  pointerEvents="none"
98
98
  style={style}
@@ -702,12 +702,13 @@ exports[`OptionList render isLoading correctly 1`] = `
702
702
  "backgroundColor": "#001f23",
703
703
  "borderRadius": 999,
704
704
  "height": 16,
705
- "opacity": 1,
705
+ "opacity": 0.9,
706
706
  "width": 16,
707
707
  },
708
708
  Object {},
709
709
  ]
710
710
  }
711
+ themeIntent="primary"
711
712
  themePosition="topLeft"
712
713
  themeSize="medium"
713
714
  />
@@ -721,12 +722,13 @@ exports[`OptionList render isLoading correctly 1`] = `
721
722
  "borderRadius": 999,
722
723
  "height": 16,
723
724
  "marginLeft": 8,
724
- "opacity": 0.75,
725
+ "opacity": 0.675,
725
726
  "width": 16,
726
727
  },
727
728
  Object {},
728
729
  ]
729
730
  }
731
+ themeIntent="primary"
730
732
  themePosition="topRight"
731
733
  themeSize="medium"
732
734
  />
@@ -755,12 +757,13 @@ exports[`OptionList render isLoading correctly 1`] = `
755
757
  "backgroundColor": "#001f23",
756
758
  "borderRadius": 999,
757
759
  "height": 16,
758
- "opacity": 0.5,
760
+ "opacity": 0.45,
759
761
  "width": 16,
760
762
  },
761
763
  Object {},
762
764
  ]
763
765
  }
766
+ themeIntent="primary"
764
767
  themePosition="bottomLeft"
765
768
  themeSize="medium"
766
769
  />
@@ -774,12 +777,13 @@ exports[`OptionList render isLoading correctly 1`] = `
774
777
  "borderRadius": 999,
775
778
  "height": 16,
776
779
  "marginLeft": 8,
777
- "opacity": 0.25,
780
+ "opacity": 0.225,
778
781
  "width": 16,
779
782
  },
780
783
  Object {},
781
784
  ]
782
785
  }
786
+ themeIntent="primary"
783
787
  themePosition="bottomRight"
784
788
  themeSize="medium"
785
789
  />
@@ -29,16 +29,12 @@ Array [
29
29
  style={
30
30
  Array [
31
31
  Object {
32
- "borderColor": "#001f23",
33
- "borderRadius": 8,
34
- "borderWidth": 1,
35
32
  "marginVertical": 8,
36
33
  "width": "100%",
37
34
  },
38
35
  undefined,
39
36
  ]
40
37
  }
41
- themeVariant="default"
42
38
  >
43
39
  <View
44
40
  style={
@@ -52,6 +48,25 @@ Array [
52
48
  ]
53
49
  }
54
50
  >
51
+ <View
52
+ style={
53
+ Array [
54
+ Object {
55
+ "borderColor": "#001f23",
56
+ "borderRadius": 8,
57
+ "borderWidth": 1,
58
+ "bottom": 0,
59
+ "left": 0,
60
+ "position": "absolute",
61
+ "right": 0,
62
+ "top": 0,
63
+ },
64
+ undefined,
65
+ ]
66
+ }
67
+ themeFocused={false}
68
+ themeVariant="default"
69
+ />
55
70
  <View
56
71
  style={
57
72
  Array [
@@ -1292,16 +1307,12 @@ Array [
1292
1307
  style={
1293
1308
  Array [
1294
1309
  Object {
1295
- "borderColor": "#001f23",
1296
- "borderRadius": 8,
1297
- "borderWidth": 1,
1298
1310
  "marginVertical": 8,
1299
1311
  "width": "100%",
1300
1312
  },
1301
1313
  undefined,
1302
1314
  ]
1303
1315
  }
1304
- themeVariant="filled"
1305
1316
  >
1306
1317
  <View
1307
1318
  style={
@@ -1315,6 +1326,25 @@ Array [
1315
1326
  ]
1316
1327
  }
1317
1328
  >
1329
+ <View
1330
+ style={
1331
+ Array [
1332
+ Object {
1333
+ "borderColor": "#001f23",
1334
+ "borderRadius": 8,
1335
+ "borderWidth": 1,
1336
+ "bottom": 0,
1337
+ "left": 0,
1338
+ "position": "absolute",
1339
+ "right": 0,
1340
+ "top": 0,
1341
+ },
1342
+ undefined,
1343
+ ]
1344
+ }
1345
+ themeFocused={false}
1346
+ themeVariant="filled"
1347
+ />
1318
1348
  <View
1319
1349
  pointerEvents="none"
1320
1350
  style={
@@ -2700,16 +2730,12 @@ Array [
2700
2730
  style={
2701
2731
  Array [
2702
2732
  Object {
2703
- "borderColor": "#001f23",
2704
- "borderRadius": 8,
2705
- "borderWidth": 1,
2706
2733
  "marginVertical": 8,
2707
2734
  "width": "100%",
2708
2735
  },
2709
2736
  undefined,
2710
2737
  ]
2711
2738
  }
2712
- themeVariant="filled"
2713
2739
  >
2714
2740
  <View
2715
2741
  style={
@@ -2723,6 +2749,25 @@ Array [
2723
2749
  ]
2724
2750
  }
2725
2751
  >
2752
+ <View
2753
+ style={
2754
+ Array [
2755
+ Object {
2756
+ "borderColor": "#001f23",
2757
+ "borderRadius": 8,
2758
+ "borderWidth": 1,
2759
+ "bottom": 0,
2760
+ "left": 0,
2761
+ "position": "absolute",
2762
+ "right": 0,
2763
+ "top": 0,
2764
+ },
2765
+ undefined,
2766
+ ]
2767
+ }
2768
+ themeFocused={false}
2769
+ themeVariant="filled"
2770
+ />
2726
2771
  <View
2727
2772
  pointerEvents="none"
2728
2773
  style={
@@ -4105,16 +4150,12 @@ Array [
4105
4150
  style={
4106
4151
  Array [
4107
4152
  Object {
4108
- "borderColor": "#808f91",
4109
- "borderRadius": 8,
4110
- "borderWidth": 1,
4111
4153
  "marginVertical": 8,
4112
4154
  "width": "100%",
4113
4155
  },
4114
4156
  undefined,
4115
4157
  ]
4116
4158
  }
4117
- themeVariant="readonly"
4118
4159
  >
4119
4160
  <View
4120
4161
  style={
@@ -4128,6 +4169,25 @@ Array [
4128
4169
  ]
4129
4170
  }
4130
4171
  >
4172
+ <View
4173
+ style={
4174
+ Array [
4175
+ Object {
4176
+ "borderColor": "#808f91",
4177
+ "borderRadius": 8,
4178
+ "borderWidth": 1,
4179
+ "bottom": 0,
4180
+ "left": 0,
4181
+ "position": "absolute",
4182
+ "right": 0,
4183
+ "top": 0,
4184
+ },
4185
+ undefined,
4186
+ ]
4187
+ }
4188
+ themeFocused={false}
4189
+ themeVariant="readonly"
4190
+ />
4131
4191
  <View
4132
4192
  pointerEvents="none"
4133
4193
  style={
@@ -5527,16 +5587,12 @@ Array [
5527
5587
  style={
5528
5588
  Array [
5529
5589
  Object {
5530
- "borderColor": "#001f23",
5531
- "borderRadius": 8,
5532
- "borderWidth": 1,
5533
5590
  "marginVertical": 8,
5534
5591
  "width": "100%",
5535
5592
  },
5536
5593
  undefined,
5537
5594
  ]
5538
5595
  }
5539
- themeVariant="filled"
5540
5596
  >
5541
5597
  <View
5542
5598
  style={
@@ -5550,6 +5606,25 @@ Array [
5550
5606
  ]
5551
5607
  }
5552
5608
  >
5609
+ <View
5610
+ style={
5611
+ Array [
5612
+ Object {
5613
+ "borderColor": "#001f23",
5614
+ "borderRadius": 8,
5615
+ "borderWidth": 1,
5616
+ "bottom": 0,
5617
+ "left": 0,
5618
+ "position": "absolute",
5619
+ "right": 0,
5620
+ "top": 0,
5621
+ },
5622
+ undefined,
5623
+ ]
5624
+ }
5625
+ themeFocused={false}
5626
+ themeVariant="filled"
5627
+ />
5553
5628
  <View
5554
5629
  pointerEvents="none"
5555
5630
  style={
@@ -75,6 +75,7 @@ const SingleSelect = <V, T extends OptionType<V>>({
75
75
  }
76
76
  <View pointerEvents="none">
77
77
  <TextInput
78
+ {...inputProps}
78
79
  label={label}
79
80
  value={displayedValue}
80
81
  suffix="arrow-down"
@@ -82,7 +83,6 @@ const SingleSelect = <V, T extends OptionType<V>>({
82
83
  error={error}
83
84
  editable={editable}
84
85
  disabled={disabled}
85
- loading={inputProps?.loading}
86
86
  numberOfLines={numberOfLines}
87
87
  pointerEvents="none"
88
88
  style={style}
@@ -81,9 +81,7 @@ export interface SelectProps<V, T extends OptionType<V>>
81
81
  /**
82
82
  * Props that are passed to TextInput.
83
83
  */
84
- inputProps?: {
85
- loading?: boolean;
86
- };
84
+ inputProps?: Pick<TextInputProps, 'loading' | 'required'>;
87
85
  /**
88
86
  * Field label.
89
87
  */
@@ -7,7 +7,13 @@ const AnimatedRow = Animated.createAnimatedComponent(StyledSpinnerRow);
7
7
 
8
8
  const AnimatedDot = Animated.createAnimatedComponent(StyledSpinnerDot);
9
9
 
10
- const AnimatedSpinner = ({ size = 'medium' }: { size: 'small' | 'medium' }) => {
10
+ const AnimatedSpinner = ({
11
+ size,
12
+ intent,
13
+ }: {
14
+ size: 'small' | 'medium';
15
+ intent: 'primary' | 'inverted';
16
+ }) => {
11
17
  const rotateAnimation = useRef<Animated.Value>(new Animated.Value(0));
12
18
 
13
19
  useEffect(() => {
@@ -32,6 +38,15 @@ const AnimatedSpinner = ({ size = 'medium' }: { size: 'small' | 'medium' }) => {
32
38
  outputRange: ['0deg', '360deg'],
33
39
  });
34
40
 
41
+ const rowProps = {
42
+ themeSize: size,
43
+ };
44
+
45
+ const dotProps = {
46
+ themeSize: size,
47
+ themeIntent: intent,
48
+ };
49
+
35
50
  return (
36
51
  <Animated.View
37
52
  style={StyleSheet.flatten([
@@ -40,13 +55,13 @@ const AnimatedSpinner = ({ size = 'medium' }: { size: 'small' | 'medium' }) => {
40
55
  },
41
56
  ])}
42
57
  >
43
- <AnimatedRow themePosition="top" themeSize={size}>
44
- <AnimatedDot themePosition="topLeft" themeSize={size} />
45
- <AnimatedDot themePosition="topRight" themeSize={size} />
58
+ <AnimatedRow themePosition="top" {...rowProps}>
59
+ <AnimatedDot themePosition="topLeft" {...dotProps} />
60
+ <AnimatedDot themePosition="topRight" {...dotProps} />
46
61
  </AnimatedRow>
47
- <AnimatedRow themePosition="bottom" themeSize={size}>
48
- <AnimatedDot themePosition="bottomLeft" themeSize={size} />
49
- <AnimatedDot themePosition="bottomRight" themeSize={size} />
62
+ <AnimatedRow themePosition="bottom" {...rowProps}>
63
+ <AnimatedDot themePosition="bottomLeft" {...dotProps} />
64
+ <AnimatedDot themePosition="bottomRight" {...dotProps} />
50
65
  </AnimatedRow>
51
66
  </Animated.View>
52
67
  );
@@ -25,30 +25,35 @@ const StyledSpinnerRow = styled(View)<{
25
25
  const StyledSpinnerDot = styled(View)<{
26
26
  themePosition: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
27
27
  themeSize: 'small' | 'medium';
28
- }>(({ themePosition, themeSize = 'medium', theme }) => {
28
+ themeIntent: 'primary' | 'inverted';
29
+ }>(({ themePosition, themeSize, themeIntent, theme }) => {
29
30
  const themeStyling = () => {
31
+ const backgroundColor =
32
+ theme.__hd__.spinner.colors.dot[themeIntent];
33
+ const dotPadding = theme.__hd__.spinner.space.spinnerDotPadding[themeSize];
34
+
30
35
  switch (themePosition) {
31
36
  case 'topLeft':
32
37
  return {
33
- backgroundColor: theme.__hd__.spinner.colors.dot,
34
- opacity: 1,
38
+ backgroundColor,
39
+ opacity: 0.9,
35
40
  };
36
41
  case 'topRight':
37
42
  return {
38
- marginLeft: theme.__hd__.spinner.space.spinnerDotPadding[themeSize],
39
- backgroundColor: theme.__hd__.spinner.colors.dot,
40
- opacity: 0.75,
43
+ marginLeft: dotPadding,
44
+ backgroundColor,
45
+ opacity: 0.675,
41
46
  };
42
47
  case 'bottomLeft':
43
48
  return {
44
- backgroundColor: theme.__hd__.spinner.colors.dot,
45
- opacity: 0.5,
49
+ backgroundColor,
50
+ opacity: 0.45,
46
51
  };
47
52
  case 'bottomRight':
48
53
  return {
49
- marginLeft: theme.__hd__.spinner.space.spinnerDotPadding[themeSize],
50
- backgroundColor: theme.__hd__.spinner.colors.dot,
51
- opacity: 0.25,
54
+ marginLeft: dotPadding,
55
+ backgroundColor,
56
+ opacity: 0.225,
52
57
  };
53
58
  }
54
59
  };