@hero-design/rn 7.22.3 → 7.23.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 (148) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/es/index.js +2124 -1638
  3. package/lib/index.js +2124 -1636
  4. package/package.json +6 -6
  5. package/src/components/Box/StyledBox.tsx +1 -2
  6. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +18 -4
  7. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +18 -4
  8. package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +69 -0
  9. package/src/components/RefreshControl/__tests__/index.spec.tsx +55 -0
  10. package/src/components/RefreshControl/index.tsx +23 -0
  11. package/src/components/RichTextEditor/MentionList.tsx +25 -4
  12. package/src/components/RichTextEditor/RichTextEditor.tsx +3 -1
  13. package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +6 -6
  14. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +36 -8
  15. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +90 -20
  16. package/src/components/Select/MultiSelect/index.tsx +1 -1
  17. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +90 -20
  18. package/src/components/Select/SingleSelect/index.tsx +1 -1
  19. package/src/components/Select/types.ts +1 -3
  20. package/src/components/TextInput/StyledTextInput.tsx +16 -11
  21. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +3 -3
  22. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +36 -18
  23. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +234 -52
  24. package/src/components/TextInput/index.tsx +21 -4
  25. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +18 -4
  26. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +18 -4
  27. package/src/index.ts +4 -0
  28. package/src/theme/ThemeSwitcher.tsx +9 -2
  29. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +9 -3
  30. package/src/theme/components/refreshControl.ts +11 -0
  31. package/src/theme/components/richTextEditor.ts +6 -5
  32. package/src/theme/getTheme.ts +3 -0
  33. package/src/theme/global/colors/jobs.ts +18 -0
  34. package/src/theme/global/index.ts +8 -1
  35. package/src/theme/index.ts +6 -1
  36. package/src/utils/__tests__/helpers.spec.ts +27 -0
  37. package/src/utils/helpers.ts +21 -0
  38. package/tsconfig.prod.json +4 -0
  39. package/types/components/RefreshControl/index.d.ts +5 -0
  40. package/types/components/RichTextEditor/MentionList.d.ts +7 -3
  41. package/types/components/RichTextEditor/index.d.ts +1 -1
  42. package/types/components/Select/types.d.ts +1 -3
  43. package/types/components/TextInput/StyledTextInput.d.ts +9 -3
  44. package/types/index.d.ts +3 -2
  45. package/types/theme/ThemeSwitcher.d.ts +1 -1
  46. package/types/theme/components/refreshControl.d.ts +7 -0
  47. package/types/theme/components/richTextEditor.d.ts +4 -3
  48. package/types/theme/getTheme.d.ts +2 -0
  49. package/types/theme/global/colors/jobs.d.ts +3 -0
  50. package/types/theme/global/index.d.ts +2 -1
  51. package/types/theme/index.d.ts +2 -2
  52. package/types/utils/helpers.d.ts +2 -0
  53. package/src/components/Box/__tests__/helpers.spec.ts +0 -14
  54. package/src/components/Box/helpers.ts +0 -10
  55. package/types/components/Accordion/__tests__/AccordionItem.spec.d.ts +0 -1
  56. package/types/components/Accordion/__tests__/StyledAccordion.spec.d.ts +0 -1
  57. package/types/components/Accordion/__tests__/index.spec.d.ts +0 -1
  58. package/types/components/Alert/__tests__/index.spec.d.ts +0 -1
  59. package/types/components/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -1
  60. package/types/components/Avatar/__tests__/index.spec.d.ts +0 -1
  61. package/types/components/Badge/__tests__/Badge.spec.d.ts +0 -1
  62. package/types/components/Badge/__tests__/Status.spec.d.ts +0 -1
  63. package/types/components/BottomNavigation/__tests__/index.spec.d.ts +0 -1
  64. package/types/components/BottomSheet/__tests__/index.spec.d.ts +0 -1
  65. package/types/components/Box/__tests__/helpers.spec.d.ts +0 -1
  66. package/types/components/Box/__tests__/index.spec.d.ts +0 -1
  67. package/types/components/Box/helpers.d.ts +0 -1
  68. package/types/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -1
  69. package/types/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +0 -1
  70. package/types/components/Button/UtilityButton/__tests__/index.spec.d.ts +0 -1
  71. package/types/components/Button/__tests__/Button.spec.d.ts +0 -1
  72. package/types/components/Button/__tests__/IconButton.spec.d.ts +0 -1
  73. package/types/components/Button/__tests__/StyledButton.spec.d.ts +0 -1
  74. package/types/components/Calendar/__tests__/CalendarRowItem.spec.d.ts +0 -1
  75. package/types/components/Calendar/__tests__/helper.spec.d.ts +0 -1
  76. package/types/components/Calendar/__tests__/index.spec.d.ts +0 -1
  77. package/types/components/Card/DataCard/__tests__/StyledDataCard.spec.d.ts +0 -1
  78. package/types/components/Card/DataCard/__tests__/index.spec.d.ts +0 -1
  79. package/types/components/Card/__tests__/StyledCard.spec.d.ts +0 -1
  80. package/types/components/Card/__tests__/index.spec.d.ts +0 -1
  81. package/types/components/Checkbox/__tests__/StyledCheckbox.spec.d.ts +0 -1
  82. package/types/components/Checkbox/__tests__/index.spec.d.ts +0 -1
  83. package/types/components/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -1
  84. package/types/components/Collapse/__tests__/index.spec.d.ts +0 -1
  85. package/types/components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts +0 -1
  86. package/types/components/ContentNavigator/__tests__/index.spec.d.ts +0 -1
  87. package/types/components/DatePicker/__tests__/DatePicker.spec.d.ts +0 -1
  88. package/types/components/DatePicker/__tests__/DatePickerAndroid.spec.d.ts +0 -1
  89. package/types/components/DatePicker/__tests__/DatePickerIOS.spec.d.ts +0 -1
  90. package/types/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -1
  91. package/types/components/Drawer/DragableDrawer/__tests__/helpers.spec.d.ts +0 -1
  92. package/types/components/Drawer/DragableDrawer/__tests__/index.spec.d.ts +0 -1
  93. package/types/components/Drawer/__tests__/index.spec.d.ts +0 -1
  94. package/types/components/Empty/__tests__/index.spec.d.ts +0 -1
  95. package/types/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -1
  96. package/types/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -1
  97. package/types/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -1
  98. package/types/components/FAB/__tests__/index.spec.d.ts +0 -1
  99. package/types/components/Icon/__tests__/index.spec.d.ts +0 -1
  100. package/types/components/Image/__tests__/index.spec.d.ts +0 -1
  101. package/types/components/List/__tests__/BasicListItem.spec.d.ts +0 -1
  102. package/types/components/List/__tests__/ListItem.spec.d.ts +0 -1
  103. package/types/components/List/__tests__/StyledBasicListItem.spec.d.ts +0 -1
  104. package/types/components/List/__tests__/StyledListItem.spec.d.ts +0 -1
  105. package/types/components/PinInput/__tests__/PinCell.spec.d.ts +0 -1
  106. package/types/components/PinInput/__tests__/StyledPinInput.spec.d.ts +0 -1
  107. package/types/components/PinInput/__tests__/index.spec.d.ts +0 -1
  108. package/types/components/Radio/__tests__/Radio.spec.d.ts +0 -1
  109. package/types/components/Radio/__tests__/RadioGroup.spec.d.ts +0 -1
  110. package/types/components/RichTextEditor/__tests__/EditorToolbar.spec.d.ts +0 -1
  111. package/types/components/RichTextEditor/__tests__/MentionList.spec.d.ts +0 -1
  112. package/types/components/RichTextEditor/__tests__/RichTextEditor.spec.d.ts +0 -1
  113. package/types/components/SectionHeading/__tests__/StyledHeading.spec.d.ts +0 -1
  114. package/types/components/SectionHeading/__tests__/index.spec.d.ts +0 -1
  115. package/types/components/Select/MultiSelect/__tests__/Option.spec.d.ts +0 -1
  116. package/types/components/Select/MultiSelect/__tests__/OptionList.spec.d.ts +0 -1
  117. package/types/components/Select/MultiSelect/__tests__/index.spec.d.ts +0 -1
  118. package/types/components/Select/SingleSelect/__tests__/Option.spec.d.ts +0 -1
  119. package/types/components/Select/SingleSelect/__tests__/OptionList.spec.d.ts +0 -1
  120. package/types/components/Select/SingleSelect/__tests__/index.spec.d.ts +0 -1
  121. package/types/components/Select/__tests__/StyledSelect.spec.d.ts +0 -1
  122. package/types/components/Select/__tests__/helpers.spec.d.ts +0 -1
  123. package/types/components/Slider/__tests__/index.spec.d.ts +0 -1
  124. package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +0 -1
  125. package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +0 -1
  126. package/types/components/Spinner/__tests__/index.spec.d.ts +0 -1
  127. package/types/components/Switch/SelectorSwitch/__tests__/Option.spec.d.ts +0 -1
  128. package/types/components/Switch/SelectorSwitch/__tests__/index.spec.d.ts +0 -1
  129. package/types/components/Switch/__tests__/StyledSwitch.spec.d.ts +0 -1
  130. package/types/components/Switch/__tests__/index.spec.d.ts +0 -1
  131. package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -1
  132. package/types/components/Tabs/__tests__/TabWithBadge.spec.d.ts +0 -1
  133. package/types/components/Tabs/__tests__/index.spec.d.ts +0 -1
  134. package/types/components/Tag/__tests__/Tag.spec.d.ts +0 -1
  135. package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +0 -1
  136. package/types/components/TextInput/__tests__/index.spec.d.ts +0 -1
  137. package/types/components/TimePicker/__tests__/TimePicker.spec.d.ts +0 -1
  138. package/types/components/TimePicker/__tests__/TimePickerAndroid.spec.d.ts +0 -1
  139. package/types/components/TimePicker/__tests__/TimePickerIOS.spec.d.ts +0 -1
  140. package/types/components/Toast/__tests__/Toast.spec.d.ts +0 -1
  141. package/types/components/Toast/__tests__/ToastContainer.spec.d.ts +0 -1
  142. package/types/components/Toast/__tests__/index.spec.d.ts +0 -1
  143. package/types/components/Toolbar/__tests__/ToolbarGroup.spec.d.ts +0 -1
  144. package/types/components/Toolbar/__tests__/ToolbarItem.spec.d.ts +0 -1
  145. package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -1
  146. package/types/components/Typography/Text/__tests__/index.spec.d.ts +0 -1
  147. package/types/theme/__tests__/index.spec.d.ts +0 -1
  148. package/types/utils/__tests__/scale.spec.d.ts +0 -1
@@ -6,16 +6,12 @@ exports[`TextInput defaultValue TextInput is idle renders correctly 1`] = `
6
6
  style={
7
7
  Array [
8
8
  Object {
9
- "borderColor": "#001f23",
10
- "borderRadius": 8,
11
- "borderWidth": 1,
12
9
  "marginVertical": 8,
13
10
  "width": "100%",
14
11
  },
15
12
  undefined,
16
13
  ]
17
14
  }
18
- themeVariant="filled"
19
15
  >
20
16
  <View
21
17
  style={
@@ -29,6 +25,24 @@ exports[`TextInput defaultValue TextInput is idle renders correctly 1`] = `
29
25
  ]
30
26
  }
31
27
  >
28
+ <View
29
+ style={
30
+ Array [
31
+ Object {
32
+ "borderColor": "#001f23",
33
+ "borderRadius": 8,
34
+ "borderWidth": 1,
35
+ "bottom": 0,
36
+ "left": 0,
37
+ "position": "absolute",
38
+ "right": 0,
39
+ "top": 0,
40
+ },
41
+ undefined,
42
+ ]
43
+ }
44
+ themeVariant="filled"
45
+ />
32
46
  <View
33
47
  pointerEvents="none"
34
48
  style={
@@ -246,16 +260,12 @@ exports[`TextInput defaultValue default Value and Value renders correctly with 2
246
260
  style={
247
261
  Array [
248
262
  Object {
249
- "borderColor": "#001f23",
250
- "borderRadius": 8,
251
- "borderWidth": 1,
252
263
  "marginVertical": 8,
253
264
  "width": "100%",
254
265
  },
255
266
  undefined,
256
267
  ]
257
268
  }
258
- themeVariant="filled"
259
269
  >
260
270
  <View
261
271
  style={
@@ -269,6 +279,24 @@ exports[`TextInput defaultValue default Value and Value renders correctly with 2
269
279
  ]
270
280
  }
271
281
  >
282
+ <View
283
+ style={
284
+ Array [
285
+ Object {
286
+ "borderColor": "#001f23",
287
+ "borderRadius": 8,
288
+ "borderWidth": 1,
289
+ "bottom": 0,
290
+ "left": 0,
291
+ "position": "absolute",
292
+ "right": 0,
293
+ "top": 0,
294
+ },
295
+ undefined,
296
+ ]
297
+ }
298
+ themeVariant="filled"
299
+ />
272
300
  <View
273
301
  pointerEvents="none"
274
302
  style={
@@ -487,9 +515,6 @@ exports[`TextInput disabled renders correctly 1`] = `
487
515
  style={
488
516
  Array [
489
517
  Object {
490
- "borderColor": "#bfc1c5",
491
- "borderRadius": 8,
492
- "borderWidth": 1,
493
518
  "marginVertical": 8,
494
519
  "width": "100%",
495
520
  },
@@ -497,7 +522,6 @@ exports[`TextInput disabled renders correctly 1`] = `
497
522
  ]
498
523
  }
499
524
  testID="disabled-text-input"
500
- themeVariant="disabled"
501
525
  >
502
526
  <View
503
527
  style={
@@ -511,6 +535,24 @@ exports[`TextInput disabled renders correctly 1`] = `
511
535
  ]
512
536
  }
513
537
  >
538
+ <View
539
+ style={
540
+ Array [
541
+ Object {
542
+ "borderColor": "#bfc1c5",
543
+ "borderRadius": 8,
544
+ "borderWidth": 1,
545
+ "bottom": 0,
546
+ "left": 0,
547
+ "position": "absolute",
548
+ "right": 0,
549
+ "top": 0,
550
+ },
551
+ undefined,
552
+ ]
553
+ }
554
+ themeVariant="disabled"
555
+ />
514
556
  <View
515
557
  pointerEvents="none"
516
558
  style={
@@ -654,16 +696,12 @@ exports[`TextInput error renders correctly 1`] = `
654
696
  style={
655
697
  Array [
656
698
  Object {
657
- "borderColor": "#f46363",
658
- "borderRadius": 8,
659
- "borderWidth": 1,
660
699
  "marginVertical": 8,
661
700
  "width": "100%",
662
701
  },
663
702
  undefined,
664
703
  ]
665
704
  }
666
- themeVariant="error"
667
705
  >
668
706
  <View
669
707
  style={
@@ -677,6 +715,24 @@ exports[`TextInput error renders correctly 1`] = `
677
715
  ]
678
716
  }
679
717
  >
718
+ <View
719
+ style={
720
+ Array [
721
+ Object {
722
+ "borderColor": "#f46363",
723
+ "borderRadius": 8,
724
+ "borderWidth": 1,
725
+ "bottom": 0,
726
+ "left": 0,
727
+ "position": "absolute",
728
+ "right": 0,
729
+ "top": 0,
730
+ },
731
+ undefined,
732
+ ]
733
+ }
734
+ themeVariant="error"
735
+ />
680
736
  <HeroIcon
681
737
  name="dollar-sign"
682
738
  style={
@@ -898,16 +954,12 @@ exports[`TextInput filled renders correctly 1`] = `
898
954
  style={
899
955
  Array [
900
956
  Object {
901
- "borderColor": "#001f23",
902
- "borderRadius": 8,
903
- "borderWidth": 1,
904
957
  "marginVertical": 8,
905
958
  "width": "100%",
906
959
  },
907
960
  undefined,
908
961
  ]
909
962
  }
910
- themeVariant="filled"
911
963
  >
912
964
  <View
913
965
  style={
@@ -921,6 +973,24 @@ exports[`TextInput filled renders correctly 1`] = `
921
973
  ]
922
974
  }
923
975
  >
976
+ <View
977
+ style={
978
+ Array [
979
+ Object {
980
+ "borderColor": "#001f23",
981
+ "borderRadius": 8,
982
+ "borderWidth": 1,
983
+ "bottom": 0,
984
+ "left": 0,
985
+ "position": "absolute",
986
+ "right": 0,
987
+ "top": 0,
988
+ },
989
+ undefined,
990
+ ]
991
+ }
992
+ themeVariant="filled"
993
+ />
924
994
  <View
925
995
  pointerEvents="none"
926
996
  style={
@@ -1069,16 +1139,12 @@ exports[`TextInput helper text renders correctly 1`] = `
1069
1139
  style={
1070
1140
  Array [
1071
1141
  Object {
1072
- "borderColor": "#001f23",
1073
- "borderRadius": 8,
1074
- "borderWidth": 1,
1075
1142
  "marginVertical": 8,
1076
1143
  "width": "100%",
1077
1144
  },
1078
1145
  undefined,
1079
1146
  ]
1080
1147
  }
1081
- themeVariant="default"
1082
1148
  >
1083
1149
  <View
1084
1150
  style={
@@ -1092,6 +1158,24 @@ exports[`TextInput helper text renders correctly 1`] = `
1092
1158
  ]
1093
1159
  }
1094
1160
  >
1161
+ <View
1162
+ style={
1163
+ Array [
1164
+ Object {
1165
+ "borderColor": "#001f23",
1166
+ "borderRadius": 8,
1167
+ "borderWidth": 1,
1168
+ "bottom": 0,
1169
+ "left": 0,
1170
+ "position": "absolute",
1171
+ "right": 0,
1172
+ "top": 0,
1173
+ },
1174
+ undefined,
1175
+ ]
1176
+ }
1177
+ themeVariant="default"
1178
+ />
1095
1179
  <HeroIcon
1096
1180
  name="dollar-sign"
1097
1181
  style={
@@ -1279,9 +1363,6 @@ exports[`TextInput idle renders correctly 1`] = `
1279
1363
  style={
1280
1364
  Array [
1281
1365
  Object {
1282
- "borderColor": "#001f23",
1283
- "borderRadius": 8,
1284
- "borderWidth": 1,
1285
1366
  "marginVertical": 8,
1286
1367
  "width": "100%",
1287
1368
  },
@@ -1291,7 +1372,6 @@ exports[`TextInput idle renders correctly 1`] = `
1291
1372
  ]
1292
1373
  }
1293
1374
  testID="idle-text-input"
1294
- themeVariant="default"
1295
1375
  >
1296
1376
  <View
1297
1377
  style={
@@ -1305,6 +1385,24 @@ exports[`TextInput idle renders correctly 1`] = `
1305
1385
  ]
1306
1386
  }
1307
1387
  >
1388
+ <View
1389
+ style={
1390
+ Array [
1391
+ Object {
1392
+ "borderColor": "#001f23",
1393
+ "borderRadius": 8,
1394
+ "borderWidth": 1,
1395
+ "bottom": 0,
1396
+ "left": 0,
1397
+ "position": "absolute",
1398
+ "right": 0,
1399
+ "top": 0,
1400
+ },
1401
+ undefined,
1402
+ ]
1403
+ }
1404
+ themeVariant="default"
1405
+ />
1308
1406
  <HeroIcon
1309
1407
  name="dollar-sign"
1310
1408
  style={
@@ -1457,16 +1555,12 @@ exports[`TextInput idle with suffix and prefix are React Element renders correct
1457
1555
  style={
1458
1556
  Array [
1459
1557
  Object {
1460
- "borderColor": "#001f23",
1461
- "borderRadius": 8,
1462
- "borderWidth": 1,
1463
1558
  "marginVertical": 8,
1464
1559
  "width": "100%",
1465
1560
  },
1466
1561
  undefined,
1467
1562
  ]
1468
1563
  }
1469
- themeVariant="default"
1470
1564
  >
1471
1565
  <View
1472
1566
  style={
@@ -1480,6 +1574,24 @@ exports[`TextInput idle with suffix and prefix are React Element renders correct
1480
1574
  ]
1481
1575
  }
1482
1576
  >
1577
+ <View
1578
+ style={
1579
+ Array [
1580
+ Object {
1581
+ "borderColor": "#001f23",
1582
+ "borderRadius": 8,
1583
+ "borderWidth": 1,
1584
+ "bottom": 0,
1585
+ "left": 0,
1586
+ "position": "absolute",
1587
+ "right": 0,
1588
+ "top": 0,
1589
+ },
1590
+ undefined,
1591
+ ]
1592
+ }
1593
+ themeVariant="default"
1594
+ />
1483
1595
  <HeroIcon
1484
1596
  name="eye-circle"
1485
1597
  style={
@@ -1658,16 +1770,12 @@ exports[`TextInput loading renders correctly 1`] = `
1658
1770
  style={
1659
1771
  Array [
1660
1772
  Object {
1661
- "borderColor": "#808f91",
1662
- "borderRadius": 8,
1663
- "borderWidth": 1,
1664
1773
  "marginVertical": 8,
1665
1774
  "width": "100%",
1666
1775
  },
1667
1776
  undefined,
1668
1777
  ]
1669
1778
  }
1670
- themeVariant="readonly"
1671
1779
  >
1672
1780
  <View
1673
1781
  style={
@@ -1681,6 +1789,24 @@ exports[`TextInput loading renders correctly 1`] = `
1681
1789
  ]
1682
1790
  }
1683
1791
  >
1792
+ <View
1793
+ style={
1794
+ Array [
1795
+ Object {
1796
+ "borderColor": "#808f91",
1797
+ "borderRadius": 8,
1798
+ "borderWidth": 1,
1799
+ "bottom": 0,
1800
+ "left": 0,
1801
+ "position": "absolute",
1802
+ "right": 0,
1803
+ "top": 0,
1804
+ },
1805
+ undefined,
1806
+ ]
1807
+ }
1808
+ themeVariant="readonly"
1809
+ />
1684
1810
  <View
1685
1811
  style={
1686
1812
  Array [
@@ -1801,16 +1927,12 @@ exports[`TextInput max length renders correctly 1`] = `
1801
1927
  style={
1802
1928
  Array [
1803
1929
  Object {
1804
- "borderColor": "#f46363",
1805
- "borderRadius": 8,
1806
- "borderWidth": 1,
1807
1930
  "marginVertical": 8,
1808
1931
  "width": "100%",
1809
1932
  },
1810
1933
  undefined,
1811
1934
  ]
1812
1935
  }
1813
- themeVariant="error"
1814
1936
  >
1815
1937
  <View
1816
1938
  style={
@@ -1824,6 +1946,24 @@ exports[`TextInput max length renders correctly 1`] = `
1824
1946
  ]
1825
1947
  }
1826
1948
  >
1949
+ <View
1950
+ style={
1951
+ Array [
1952
+ Object {
1953
+ "borderColor": "#f46363",
1954
+ "borderRadius": 8,
1955
+ "borderWidth": 1,
1956
+ "bottom": 0,
1957
+ "left": 0,
1958
+ "position": "absolute",
1959
+ "right": 0,
1960
+ "top": 0,
1961
+ },
1962
+ undefined,
1963
+ ]
1964
+ }
1965
+ themeVariant="error"
1966
+ />
1827
1967
  <View
1828
1968
  pointerEvents="none"
1829
1969
  style={
@@ -2060,16 +2200,12 @@ exports[`TextInput placeholder TextInput is idle renders correctly 1`] = `
2060
2200
  style={
2061
2201
  Array [
2062
2202
  Object {
2063
- "borderColor": "#001f23",
2064
- "borderRadius": 8,
2065
- "borderWidth": 1,
2066
2203
  "marginVertical": 8,
2067
2204
  "width": "100%",
2068
2205
  },
2069
2206
  undefined,
2070
2207
  ]
2071
2208
  }
2072
- themeVariant="default"
2073
2209
  >
2074
2210
  <View
2075
2211
  style={
@@ -2083,6 +2219,24 @@ exports[`TextInput placeholder TextInput is idle renders correctly 1`] = `
2083
2219
  ]
2084
2220
  }
2085
2221
  >
2222
+ <View
2223
+ style={
2224
+ Array [
2225
+ Object {
2226
+ "borderColor": "#001f23",
2227
+ "borderRadius": 8,
2228
+ "borderWidth": 1,
2229
+ "bottom": 0,
2230
+ "left": 0,
2231
+ "position": "absolute",
2232
+ "right": 0,
2233
+ "top": 0,
2234
+ },
2235
+ undefined,
2236
+ ]
2237
+ }
2238
+ themeVariant="default"
2239
+ />
2086
2240
  <HeroIcon
2087
2241
  name="dollar-sign"
2088
2242
  style={
@@ -2270,16 +2424,12 @@ exports[`TextInput readonly renders correctly 1`] = `
2270
2424
  style={
2271
2425
  Array [
2272
2426
  Object {
2273
- "borderColor": "#808f91",
2274
- "borderRadius": 8,
2275
- "borderWidth": 1,
2276
2427
  "marginVertical": 8,
2277
2428
  "width": "100%",
2278
2429
  },
2279
2430
  undefined,
2280
2431
  ]
2281
2432
  }
2282
- themeVariant="readonly"
2283
2433
  >
2284
2434
  <View
2285
2435
  style={
@@ -2293,6 +2443,24 @@ exports[`TextInput readonly renders correctly 1`] = `
2293
2443
  ]
2294
2444
  }
2295
2445
  >
2446
+ <View
2447
+ style={
2448
+ Array [
2449
+ Object {
2450
+ "borderColor": "#808f91",
2451
+ "borderRadius": 8,
2452
+ "borderWidth": 1,
2453
+ "bottom": 0,
2454
+ "left": 0,
2455
+ "position": "absolute",
2456
+ "right": 0,
2457
+ "top": 0,
2458
+ },
2459
+ undefined,
2460
+ ]
2461
+ }
2462
+ themeVariant="readonly"
2463
+ />
2296
2464
  <View
2297
2465
  pointerEvents="none"
2298
2466
  style={
@@ -2466,16 +2634,12 @@ exports[`TextInput required renders correctly 1`] = `
2466
2634
  style={
2467
2635
  Array [
2468
2636
  Object {
2469
- "borderColor": "#001f23",
2470
- "borderRadius": 8,
2471
- "borderWidth": 1,
2472
2637
  "marginVertical": 8,
2473
2638
  "width": "100%",
2474
2639
  },
2475
2640
  undefined,
2476
2641
  ]
2477
2642
  }
2478
- themeVariant="default"
2479
2643
  >
2480
2644
  <View
2481
2645
  style={
@@ -2489,6 +2653,24 @@ exports[`TextInput required renders correctly 1`] = `
2489
2653
  ]
2490
2654
  }
2491
2655
  >
2656
+ <View
2657
+ style={
2658
+ Array [
2659
+ Object {
2660
+ "borderColor": "#001f23",
2661
+ "borderRadius": 8,
2662
+ "borderWidth": 1,
2663
+ "bottom": 0,
2664
+ "left": 0,
2665
+ "position": "absolute",
2666
+ "right": 0,
2667
+ "top": 0,
2668
+ },
2669
+ undefined,
2670
+ ]
2671
+ }
2672
+ themeVariant="default"
2673
+ />
2492
2674
  <HeroIcon
2493
2675
  name="dollar-sign"
2494
2676
  style={
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useMemo } from 'react';
2
2
  import { StyleSheet } from 'react-native';
3
3
  import type {
4
4
  TextInputProps as NativeTextInputProps,
@@ -22,12 +22,14 @@ import {
22
22
  StyledTextInputAndLabelContainer,
23
23
  StyledLabelContainerInsideTextInput,
24
24
  StyledErrorAndHelpTextContainer,
25
+ StyledBorderBackDrop,
25
26
  StyledErrorAndMaxLengthContainer,
26
27
  } from './StyledTextInput';
27
28
  import Icon from '../Icon';
28
29
  import { useTheme } from '../../theme';
29
30
  import type { Variant } from './StyledTextInput';
30
31
  import type { IconName } from '../Icon';
32
+ import { omit, pick } from '../../utils/helpers';
31
33
 
32
34
  export interface TextInputProps extends NativeTextInputProps {
33
35
  /**
@@ -169,10 +171,25 @@ const TextInput = ({
169
171
 
170
172
  const theme = useTheme();
171
173
 
174
+ const { borderStyle, textStyleWithoutBorderStyle } = useMemo(() => {
175
+ if (!textStyle) {
176
+ return {};
177
+ }
178
+
179
+ const flattenTextStyle = StyleSheet.flatten(textStyle);
180
+ const borderKeys = Object.keys(flattenTextStyle).filter((key) => {
181
+ return key.startsWith('border');
182
+ });
183
+ return {
184
+ borderStyle: pick(borderKeys, flattenTextStyle),
185
+ textStyleWithoutBorderStyle: omit(borderKeys, flattenTextStyle),
186
+ };
187
+ }, [textStyle]);
188
+
172
189
  const nativeInputProps: NativeTextInputProps = {
173
190
  style: StyleSheet.flatten([
174
191
  { color: theme.__hd__.textInput.colors.text },
175
- textStyle,
192
+ textStyleWithoutBorderStyle,
176
193
  ]),
177
194
  testID: 'text-input',
178
195
  accessibilityState: {
@@ -201,14 +218,14 @@ const TextInput = ({
201
218
 
202
219
  return (
203
220
  <StyledContainer
221
+ style={style}
204
222
  pointerEvents={
205
223
  variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto'
206
224
  }
207
225
  testID={testID}
208
- style={style}
209
- themeVariant={variant}
210
226
  >
211
227
  <StyledTextInputContainer>
228
+ <StyledBorderBackDrop themeVariant={variant} style={borderStyle} />
212
229
  {(isFocused || (label && !isEmptyValue)) && (
213
230
  <StyledLabelContainer pointerEvents="none">
214
231
  {required && (
@@ -26,16 +26,12 @@ exports[`TimePickerAndroid renders correctly 1`] = `
26
26
  style={
27
27
  Array [
28
28
  Object {
29
- "borderColor": "#001f23",
30
- "borderRadius": 8,
31
- "borderWidth": 1,
32
29
  "marginVertical": 8,
33
30
  "width": "100%",
34
31
  },
35
32
  undefined,
36
33
  ]
37
34
  }
38
- themeVariant="filled"
39
35
  >
40
36
  <View
41
37
  style={
@@ -49,6 +45,24 @@ exports[`TimePickerAndroid renders correctly 1`] = `
49
45
  ]
50
46
  }
51
47
  >
48
+ <View
49
+ style={
50
+ Array [
51
+ Object {
52
+ "borderColor": "#001f23",
53
+ "borderRadius": 8,
54
+ "borderWidth": 1,
55
+ "bottom": 0,
56
+ "left": 0,
57
+ "position": "absolute",
58
+ "right": 0,
59
+ "top": 0,
60
+ },
61
+ undefined,
62
+ ]
63
+ }
64
+ themeVariant="filled"
65
+ />
52
66
  <View
53
67
  pointerEvents="none"
54
68
  style={
@@ -26,16 +26,12 @@ exports[`TimePickerIOS renders correctly 1`] = `
26
26
  style={
27
27
  Array [
28
28
  Object {
29
- "borderColor": "#001f23",
30
- "borderRadius": 8,
31
- "borderWidth": 1,
32
29
  "marginVertical": 8,
33
30
  "width": "100%",
34
31
  },
35
32
  undefined,
36
33
  ]
37
34
  }
38
- themeVariant="filled"
39
35
  >
40
36
  <View
41
37
  style={
@@ -49,6 +45,24 @@ exports[`TimePickerIOS renders correctly 1`] = `
49
45
  ]
50
46
  }
51
47
  >
48
+ <View
49
+ style={
50
+ Array [
51
+ Object {
52
+ "borderColor": "#001f23",
53
+ "borderRadius": 8,
54
+ "borderWidth": 1,
55
+ "bottom": 0,
56
+ "left": 0,
57
+ "position": "absolute",
58
+ "right": 0,
59
+ "top": 0,
60
+ },
61
+ undefined,
62
+ ]
63
+ }
64
+ themeVariant="filled"
65
+ />
52
66
  <View
53
67
  pointerEvents="none"
54
68
  style={
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@ import theme, {
4
4
  useTheme,
5
5
  swagSystemPalette,
6
6
  workSystemPalette,
7
+ jobsSystemPalette,
7
8
  } from './theme';
8
9
  import { scale } from './utils/scale';
9
10
 
@@ -43,6 +44,7 @@ import TimePicker from './components/TimePicker';
43
44
  import Toast from './components/Toast';
44
45
  import Toolbar from './components/Toolbar';
45
46
  import Typography from './components/Typography';
47
+ import RefreshControl from './components/RefreshControl';
46
48
  import RichTextEditor from './components/RichTextEditor';
47
49
 
48
50
  export {
@@ -53,6 +55,7 @@ export {
53
55
  ThemeProvider,
54
56
  swagSystemPalette,
55
57
  workSystemPalette,
58
+ jobsSystemPalette,
56
59
  Accordion,
57
60
  Alert,
58
61
  Avatar,
@@ -89,6 +92,7 @@ export {
89
92
  Toast,
90
93
  Toolbar,
91
94
  Typography,
95
+ RefreshControl,
92
96
  RichTextEditor,
93
97
  };
94
98