@hero-design/rn 8.70.0 → 8.72.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 (76) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/CHANGELOG.md +29 -0
  3. package/es/index.js +402 -219
  4. package/lib/index.js +402 -219
  5. package/package.json +1 -1
  6. package/src/components/Accordion/AccordionItem.tsx +1 -1
  7. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -8
  8. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
  9. package/src/components/Badge/StyledBadge.tsx +17 -2
  10. package/src/components/Badge/__tests__/Badge.spec.tsx +15 -0
  11. package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +187 -0
  12. package/src/components/Badge/index.tsx +20 -36
  13. package/src/components/Badge/types.ts +55 -0
  14. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +3 -3
  15. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
  16. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +7 -7
  17. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +6 -6
  18. package/src/components/Chip/StyledChip.tsx +44 -8
  19. package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +212 -2
  20. package/src/components/Chip/__tests__/index.spec.tsx +2 -0
  21. package/src/components/Chip/index.tsx +1 -1
  22. package/src/components/FAB/FAB.tsx +6 -1
  23. package/src/components/FAB/Pair/StyledFAB.tsx +19 -0
  24. package/src/components/FAB/Pair/__tests__/__snapshots__/index.spec.tsx.snap +276 -0
  25. package/src/components/FAB/Pair/__tests__/index.spec.tsx +39 -0
  26. package/src/components/FAB/Pair/index.tsx +46 -0
  27. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +31 -14
  28. package/src/components/FAB/index.tsx +3 -1
  29. package/src/components/Progress/ProgressStep.tsx +3 -1
  30. package/src/components/Progress/StyledStep.tsx +13 -11
  31. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +215 -4
  32. package/src/components/Progress/__tests__/index.spec.js +16 -4
  33. package/src/components/Search/SearchOneLine.tsx +7 -1
  34. package/src/components/Search/SearchSuffixIcon.tsx +12 -1
  35. package/src/components/Search/SearchTwoLine.tsx +7 -1
  36. package/src/components/Search/StyledSearch.tsx +42 -16
  37. package/src/components/Search/__tests__/SearchOneLine.spec.tsx +30 -0
  38. package/src/components/Search/__tests__/SearchTwoLine.spec.tsx +15 -0
  39. package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +166 -10
  40. package/src/components/Search/__tests__/__snapshots__/SearchSuffixIcon.spec.tsx.snap +3 -0
  41. package/src/components/Search/__tests__/__snapshots__/SearchTwoLine.spec.tsx.snap +182 -2
  42. package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +1 -1
  43. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +9 -0
  44. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +6 -0
  45. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +3 -0
  46. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +9 -0
  47. package/src/components/Toolbar/StyledToolbar.tsx +11 -0
  48. package/src/components/Toolbar/ToolbarItem.tsx +3 -3
  49. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +24 -4
  50. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +50 -9
  51. package/src/theme/components/badge.ts +10 -1
  52. package/src/theme/components/button.ts +2 -2
  53. package/src/theme/components/chip.ts +4 -0
  54. package/src/theme/components/fab.ts +3 -0
  55. package/src/theme/components/search.ts +30 -5
  56. package/src/theme/components/switch.ts +2 -2
  57. package/src/theme/components/toolbar.ts +1 -1
  58. package/stats/8.71.0/rn-stats.html +4842 -0
  59. package/stats/8.72.0/rn-stats.html +4844 -0
  60. package/types/components/Badge/StyledBadge.d.ts +9 -1
  61. package/types/components/Badge/index.d.ts +3 -34
  62. package/types/components/Badge/types.d.ts +53 -0
  63. package/types/components/Chip/StyledChip.d.ts +1 -1
  64. package/types/components/Chip/index.d.ts +1 -1
  65. package/types/components/FAB/Pair/StyledFAB.d.ts +12 -0
  66. package/types/components/FAB/Pair/index.d.ts +16 -0
  67. package/types/components/FAB/index.d.ts +1 -0
  68. package/types/components/Progress/StyledStep.d.ts +2 -0
  69. package/types/components/Search/SearchOneLine.d.ts +5 -0
  70. package/types/components/Search/SearchTwoLine.d.ts +5 -0
  71. package/types/components/Search/StyledSearch.d.ts +7 -2
  72. package/types/components/Toolbar/StyledToolbar.d.ts +9 -2
  73. package/types/theme/components/badge.d.ts +8 -0
  74. package/types/theme/components/chip.d.ts +4 -0
  75. package/types/theme/components/fab.d.ts +3 -0
  76. package/types/theme/components/search.d.ts +31 -5
@@ -288,7 +288,7 @@ exports[`StyledLoadingIndicator has outlined-secondary style 1`] = `
288
288
  style={
289
289
  [
290
290
  {
291
- "backgroundColor": "#795e90",
291
+ "backgroundColor": "#4d6265",
292
292
  "borderRadius": 8,
293
293
  "height": 12,
294
294
  "marginHorizontal": 8,
@@ -380,7 +380,7 @@ exports[`StyledLoadingIndicator has text-primary style 1`] = `
380
380
  style={
381
381
  [
382
382
  {
383
- "backgroundColor": "#795e90",
383
+ "backgroundColor": "#4d6265",
384
384
  "borderRadius": 8,
385
385
  "height": 12,
386
386
  "marginHorizontal": 8,
@@ -426,7 +426,7 @@ exports[`StyledLoadingIndicator has text-secondary style 1`] = `
426
426
  style={
427
427
  [
428
428
  {
429
- "backgroundColor": "#795e90",
429
+ "backgroundColor": "#4d6265",
430
430
  "borderRadius": 8,
431
431
  "height": 12,
432
432
  "marginHorizontal": 8,
@@ -849,7 +849,7 @@ exports[`LoadingIndicator renders correctly when themeVariant is outlined-second
849
849
  style={
850
850
  [
851
851
  {
852
- "backgroundColor": "#795e90",
852
+ "backgroundColor": "#4d6265",
853
853
  "borderRadius": 8,
854
854
  "height": 12,
855
855
  "marginHorizontal": 8,
@@ -879,7 +879,7 @@ exports[`LoadingIndicator renders correctly when themeVariant is outlined-second
879
879
  style={
880
880
  [
881
881
  {
882
- "backgroundColor": "#795e90",
882
+ "backgroundColor": "#4d6265",
883
883
  "borderRadius": 8,
884
884
  "height": 12,
885
885
  "marginHorizontal": 8,
@@ -909,7 +909,7 @@ exports[`LoadingIndicator renders correctly when themeVariant is outlined-second
909
909
  style={
910
910
  [
911
911
  {
912
- "backgroundColor": "#795e90",
912
+ "backgroundColor": "#4d6265",
913
913
  "borderRadius": 8,
914
914
  "height": 12,
915
915
  "marginHorizontal": 8,
@@ -1119,7 +1119,7 @@ exports[`LoadingIndicator renders correctly when themeVariant is text-primary 1`
1119
1119
  style={
1120
1120
  [
1121
1121
  {
1122
- "backgroundColor": "#795e90",
1122
+ "backgroundColor": "#4d6265",
1123
1123
  "borderRadius": 8,
1124
1124
  "height": 12,
1125
1125
  "marginHorizontal": 8,
@@ -1149,7 +1149,7 @@ exports[`LoadingIndicator renders correctly when themeVariant is text-primary 1`
1149
1149
  style={
1150
1150
  [
1151
1151
  {
1152
- "backgroundColor": "#795e90",
1152
+ "backgroundColor": "#4d6265",
1153
1153
  "borderRadius": 8,
1154
1154
  "height": 12,
1155
1155
  "marginHorizontal": 8,
@@ -1179,7 +1179,7 @@ exports[`LoadingIndicator renders correctly when themeVariant is text-primary 1`
1179
1179
  style={
1180
1180
  [
1181
1181
  {
1182
- "backgroundColor": "#795e90",
1182
+ "backgroundColor": "#4d6265",
1183
1183
  "borderRadius": 8,
1184
1184
  "height": 12,
1185
1185
  "marginHorizontal": 8,
@@ -1254,7 +1254,7 @@ exports[`LoadingIndicator renders correctly when themeVariant is text-secondary
1254
1254
  style={
1255
1255
  [
1256
1256
  {
1257
- "backgroundColor": "#795e90",
1257
+ "backgroundColor": "#4d6265",
1258
1258
  "borderRadius": 8,
1259
1259
  "height": 12,
1260
1260
  "marginHorizontal": 8,
@@ -1284,7 +1284,7 @@ exports[`LoadingIndicator renders correctly when themeVariant is text-secondary
1284
1284
  style={
1285
1285
  [
1286
1286
  {
1287
- "backgroundColor": "#795e90",
1287
+ "backgroundColor": "#4d6265",
1288
1288
  "borderRadius": 8,
1289
1289
  "height": 12,
1290
1290
  "marginHorizontal": 8,
@@ -1314,7 +1314,7 @@ exports[`LoadingIndicator renders correctly when themeVariant is text-secondary
1314
1314
  style={
1315
1315
  [
1316
1316
  {
1317
- "backgroundColor": "#795e90",
1317
+ "backgroundColor": "#4d6265",
1318
1318
  "borderRadius": 8,
1319
1319
  "height": 12,
1320
1320
  "marginHorizontal": 8,
@@ -1104,7 +1104,7 @@ exports[`Button renders correctly 8`] = `
1104
1104
  style={
1105
1105
  [
1106
1106
  {
1107
- "backgroundColor": "#795e90",
1107
+ "backgroundColor": "#4d6265",
1108
1108
  "borderRadius": 8,
1109
1109
  "height": 12,
1110
1110
  "marginHorizontal": 8,
@@ -1134,7 +1134,7 @@ exports[`Button renders correctly 8`] = `
1134
1134
  style={
1135
1135
  [
1136
1136
  {
1137
- "backgroundColor": "#795e90",
1137
+ "backgroundColor": "#4d6265",
1138
1138
  "borderRadius": 8,
1139
1139
  "height": 12,
1140
1140
  "marginHorizontal": 8,
@@ -1164,7 +1164,7 @@ exports[`Button renders correctly 8`] = `
1164
1164
  style={
1165
1165
  [
1166
1166
  {
1167
- "backgroundColor": "#795e90",
1167
+ "backgroundColor": "#4d6265",
1168
1168
  "borderRadius": 8,
1169
1169
  "height": 12,
1170
1170
  "marginHorizontal": 8,
@@ -1367,7 +1367,7 @@ exports[`Button renders correctly 10`] = `
1367
1367
  },
1368
1368
  [
1369
1369
  {
1370
- "color": "#795e90",
1370
+ "color": "#4d6265",
1371
1371
  "flexShrink": 1,
1372
1372
  "lineHeight": 22,
1373
1373
  "textAlign": "center",
@@ -1486,7 +1486,7 @@ exports[`Button renders correctly 11`] = `
1486
1486
  style={
1487
1487
  [
1488
1488
  {
1489
- "backgroundColor": "#795e90",
1489
+ "backgroundColor": "#4d6265",
1490
1490
  "borderRadius": 8,
1491
1491
  "height": 12,
1492
1492
  "marginHorizontal": 8,
@@ -1516,7 +1516,7 @@ exports[`Button renders correctly 11`] = `
1516
1516
  style={
1517
1517
  [
1518
1518
  {
1519
- "backgroundColor": "#795e90",
1519
+ "backgroundColor": "#4d6265",
1520
1520
  "borderRadius": 8,
1521
1521
  "height": 12,
1522
1522
  "marginHorizontal": 8,
@@ -1546,7 +1546,7 @@ exports[`Button renders correctly 11`] = `
1546
1546
  style={
1547
1547
  [
1548
1548
  {
1549
- "backgroundColor": "#795e90",
1549
+ "backgroundColor": "#4d6265",
1550
1550
  "borderRadius": 8,
1551
1551
  "height": 12,
1552
1552
  "marginHorizontal": 8,
@@ -169,7 +169,7 @@ exports[`StyledButtonContainer has filled-secondary style 1`] = `
169
169
  {
170
170
  "alignItems": "center",
171
171
  "alignSelf": "stretch",
172
- "backgroundColor": "#795e90",
172
+ "backgroundColor": "#4d6265",
173
173
  "borderRadius": 32,
174
174
  "flexDirection": "row",
175
175
  "height": 60,
@@ -381,7 +381,7 @@ exports[`StyledButtonContainer has outlined-secondary style 1`] = `
381
381
  "alignItems": "center",
382
382
  "alignSelf": "stretch",
383
383
  "backgroundColor": "transparent",
384
- "borderColor": "#795e90",
384
+ "borderColor": "#4d6265",
385
385
  "borderRadius": 32,
386
386
  "borderWidth": 2,
387
387
  "flexDirection": "row",
@@ -974,7 +974,7 @@ exports[`StyledButtonIcon has outlined-secondary style 1`] = `
974
974
  },
975
975
  [
976
976
  {
977
- "color": "#795e90",
977
+ "color": "#4d6265",
978
978
  "fontSize": 20,
979
979
  },
980
980
  undefined,
@@ -1127,7 +1127,7 @@ exports[`StyledButtonIcon has text-secondary style 1`] = `
1127
1127
  },
1128
1128
  [
1129
1129
  {
1130
- "color": "#795e90",
1130
+ "color": "#4d6265",
1131
1131
  "fontSize": 20,
1132
1132
  },
1133
1133
  undefined,
@@ -1611,7 +1611,7 @@ exports[`StyledButtonText has outlined-secondary style 1`] = `
1611
1611
  },
1612
1612
  [
1613
1613
  {
1614
- "color": "#795e90",
1614
+ "color": "#4d6265",
1615
1615
  "flexShrink": 1,
1616
1616
  "textAlign": "center",
1617
1617
  },
@@ -1788,7 +1788,7 @@ exports[`StyledButtonText has text-secondary style 1`] = `
1788
1788
  },
1789
1789
  [
1790
1790
  {
1791
- "color": "#795e90",
1791
+ "color": "#4d6265",
1792
1792
  "flexShrink": 1,
1793
1793
  "textAlign": "center",
1794
1794
  },
@@ -2,7 +2,7 @@ import styled from '@emotion/native';
2
2
  import { TouchableOpacity } from 'react-native';
3
3
 
4
4
  type StyledChipWrapperProps = {
5
- themeVariant?: 'outlined' | 'filled';
5
+ themeVariant?: 'outlined' | 'filled' | 'compact';
6
6
  themeSelected?: boolean;
7
7
  };
8
8
 
@@ -10,6 +10,7 @@ const StyledChipWrapper = styled(TouchableOpacity)<StyledChipWrapperProps>(
10
10
  ({ themeVariant, themeSelected, theme }) => {
11
11
  const getShadowStyles = () => {
12
12
  switch (themeVariant) {
13
+ case 'compact':
13
14
  case 'filled':
14
15
  return {
15
16
  ...theme.__hd__.chip.shadows.filledWrapper,
@@ -31,6 +32,7 @@ const StyledChipWrapper = styled(TouchableOpacity)<StyledChipWrapperProps>(
31
32
  : theme.__hd__.chip.sizes.outlinedDefaultBorder,
32
33
  };
33
34
  }
35
+ case 'compact':
34
36
  case 'filled': {
35
37
  return {
36
38
  borderColor: theme.__hd__.chip.colors.wrapperSelectedBorder,
@@ -49,10 +51,18 @@ const StyledChipWrapper = styled(TouchableOpacity)<StyledChipWrapperProps>(
49
51
  : theme.__hd__.chip.colors.outlinedDefaultBackground,
50
52
  };
51
53
  }
52
- case 'filled':
54
+ case 'filled': {
53
55
  return {
54
56
  backgroundColor: theme.__hd__.chip.colors.secondaryBackground,
55
57
  };
58
+ }
59
+
60
+ case 'compact': {
61
+ return {
62
+ backgroundColor:
63
+ theme.__hd__.chip.colors.compactSelectedBackground,
64
+ };
65
+ }
56
66
  }
57
67
  } else {
58
68
  switch (themeVariant) {
@@ -62,10 +72,36 @@ const StyledChipWrapper = styled(TouchableOpacity)<StyledChipWrapperProps>(
62
72
  theme.__hd__.chip.colors.outlinedDefaultBackground,
63
73
  };
64
74
  }
65
- case 'filled':
75
+ case 'filled': {
66
76
  return {
67
77
  backgroundColor: theme.__hd__.chip.colors.filledBackground,
68
78
  };
79
+ }
80
+ case 'compact': {
81
+ return {
82
+ backgroundColor:
83
+ theme.__hd__.chip.colors.compactDefaultBackground,
84
+ };
85
+ }
86
+ }
87
+ }
88
+ };
89
+
90
+ const getPaddingStyles = () => {
91
+ switch (themeVariant) {
92
+ case 'compact': {
93
+ return {
94
+ paddingHorizontal:
95
+ theme.__hd__.chip.space.compactWrapperHorizontalPadding,
96
+ paddingVertical:
97
+ theme.__hd__.chip.space.compactWrapperVerticalPadding,
98
+ };
99
+ }
100
+ default: {
101
+ return {
102
+ paddingHorizontal: theme.__hd__.chip.space.wrapperHorizontalPadding,
103
+ paddingVertical: theme.__hd__.chip.space.wrapperVerticalPadding,
104
+ };
69
105
  }
70
106
  }
71
107
  };
@@ -76,13 +112,13 @@ const StyledChipWrapper = styled(TouchableOpacity)<StyledChipWrapperProps>(
76
112
  alignItems: 'center',
77
113
  justifyContent: 'center',
78
114
  borderRadius: theme.__hd__.chip.radii.wrapper,
79
- paddingVertical: theme.__hd__.chip.space.wrapperVerticalPadding,
80
- paddingHorizontal: theme.__hd__.chip.space.wrapperHorizontalPadding,
81
- marginTop: themeSelected
82
- ? theme.__hd__.chip.space.outlinedSelectedMarginTop
83
- : undefined,
115
+ marginTop:
116
+ themeSelected && themeVariant === 'outlined'
117
+ ? theme.__hd__.chip.space.outlinedSelectedMarginTop
118
+ : undefined,
84
119
  ...getShadowStyles(),
85
120
  ...getBorderStyles(),
121
+ ...getPaddingStyles(),
86
122
  ...getBackgroundStyles(),
87
123
  };
88
124
  }
@@ -496,7 +496,7 @@ exports[`Chip renders correctly with custom icon 2`] = `
496
496
  "elevation": 3,
497
497
  "flexDirection": "row",
498
498
  "justifyContent": "center",
499
- "marginTop": -2,
499
+ "marginTop": undefined,
500
500
  "opacity": 1,
501
501
  "paddingHorizontal": 12,
502
502
  "paddingVertical": 8,
@@ -805,6 +805,216 @@ exports[`Chip renders correctly with default icon 2`] = `
805
805
  </View>
806
806
  `;
807
807
 
808
+ exports[`Chip renders correctly with variant compact and selected false 1`] = `
809
+ <View
810
+ style={
811
+ {
812
+ "flex": 1,
813
+ }
814
+ }
815
+ >
816
+ <View
817
+ accessibilityState={
818
+ {
819
+ "busy": undefined,
820
+ "checked": undefined,
821
+ "disabled": undefined,
822
+ "expanded": undefined,
823
+ "selected": undefined,
824
+ }
825
+ }
826
+ accessibilityValue={
827
+ {
828
+ "max": undefined,
829
+ "min": undefined,
830
+ "now": undefined,
831
+ "text": undefined,
832
+ }
833
+ }
834
+ accessible={true}
835
+ collapsable={false}
836
+ focusable={false}
837
+ onClick={[Function]}
838
+ onResponderGrant={[Function]}
839
+ onResponderMove={[Function]}
840
+ onResponderRelease={[Function]}
841
+ onResponderTerminate={[Function]}
842
+ onResponderTerminationRequest={[Function]}
843
+ onStartShouldSetResponder={[Function]}
844
+ style={
845
+ {
846
+ "alignItems": "center",
847
+ "alignSelf": "flex-start",
848
+ "backgroundColor": "#ffffff",
849
+ "borderColor": "transparent",
850
+ "borderRadius": 999,
851
+ "elevation": 3,
852
+ "flexDirection": "row",
853
+ "justifyContent": "center",
854
+ "marginTop": undefined,
855
+ "opacity": 1,
856
+ "paddingHorizontal": 8,
857
+ "paddingVertical": 4,
858
+ "shadowColor": "#001f23",
859
+ "shadowOffset": {
860
+ "height": 2,
861
+ "width": 0,
862
+ },
863
+ "shadowOpacity": 0.12,
864
+ "shadowRadius": 4,
865
+ }
866
+ }
867
+ testID="chip"
868
+ >
869
+ <Text
870
+ allowFontScaling={false}
871
+ style={
872
+ [
873
+ {
874
+ "color": "#001f23",
875
+ "fontFamily": "BeVietnamPro-Regular",
876
+ "fontSize": 16,
877
+ "letterSpacing": 0.48,
878
+ "lineHeight": 24,
879
+ },
880
+ undefined,
881
+ ]
882
+ }
883
+ themeIntent="body"
884
+ themeTypeface="neutral"
885
+ themeVariant="regular"
886
+ >
887
+ Cover my bills
888
+ </Text>
889
+ </View>
890
+ <View
891
+ pointerEvents="box-none"
892
+ position="bottom"
893
+ style={
894
+ [
895
+ {
896
+ "bottom": 0,
897
+ "elevation": 9999,
898
+ "flexDirection": "column-reverse",
899
+ "left": 0,
900
+ "paddingHorizontal": 24,
901
+ "paddingVertical": 16,
902
+ "position": "absolute",
903
+ "right": 0,
904
+ "top": 0,
905
+ },
906
+ undefined,
907
+ ]
908
+ }
909
+ />
910
+ </View>
911
+ `;
912
+
913
+ exports[`Chip renders correctly with variant compact and selected true 1`] = `
914
+ <View
915
+ style={
916
+ {
917
+ "flex": 1,
918
+ }
919
+ }
920
+ >
921
+ <View
922
+ accessibilityState={
923
+ {
924
+ "busy": undefined,
925
+ "checked": undefined,
926
+ "disabled": undefined,
927
+ "expanded": undefined,
928
+ "selected": undefined,
929
+ }
930
+ }
931
+ accessibilityValue={
932
+ {
933
+ "max": undefined,
934
+ "min": undefined,
935
+ "now": undefined,
936
+ "text": undefined,
937
+ }
938
+ }
939
+ accessible={true}
940
+ collapsable={false}
941
+ focusable={false}
942
+ onClick={[Function]}
943
+ onResponderGrant={[Function]}
944
+ onResponderMove={[Function]}
945
+ onResponderRelease={[Function]}
946
+ onResponderTerminate={[Function]}
947
+ onResponderTerminationRequest={[Function]}
948
+ onStartShouldSetResponder={[Function]}
949
+ style={
950
+ {
951
+ "alignItems": "center",
952
+ "alignSelf": "flex-start",
953
+ "backgroundColor": "#f6f6f7",
954
+ "borderColor": "transparent",
955
+ "borderRadius": 999,
956
+ "elevation": 3,
957
+ "flexDirection": "row",
958
+ "justifyContent": "center",
959
+ "marginTop": undefined,
960
+ "opacity": 1,
961
+ "paddingHorizontal": 8,
962
+ "paddingVertical": 4,
963
+ "shadowColor": "#001f23",
964
+ "shadowOffset": {
965
+ "height": 2,
966
+ "width": 0,
967
+ },
968
+ "shadowOpacity": 0.12,
969
+ "shadowRadius": 4,
970
+ }
971
+ }
972
+ testID="chip"
973
+ >
974
+ <Text
975
+ allowFontScaling={false}
976
+ style={
977
+ [
978
+ {
979
+ "color": "#001f23",
980
+ "fontFamily": "BeVietnamPro-Regular",
981
+ "fontSize": 16,
982
+ "letterSpacing": 0.48,
983
+ "lineHeight": 24,
984
+ },
985
+ undefined,
986
+ ]
987
+ }
988
+ themeIntent="body"
989
+ themeTypeface="neutral"
990
+ themeVariant="regular"
991
+ >
992
+ Cover my bills
993
+ </Text>
994
+ </View>
995
+ <View
996
+ pointerEvents="box-none"
997
+ position="bottom"
998
+ style={
999
+ [
1000
+ {
1001
+ "bottom": 0,
1002
+ "elevation": 9999,
1003
+ "flexDirection": "column-reverse",
1004
+ "left": 0,
1005
+ "paddingHorizontal": 24,
1006
+ "paddingVertical": 16,
1007
+ "position": "absolute",
1008
+ "right": 0,
1009
+ "top": 0,
1010
+ },
1011
+ undefined,
1012
+ ]
1013
+ }
1014
+ />
1015
+ </View>
1016
+ `;
1017
+
808
1018
  exports[`Chip renders correctly with variant filled and selected false 1`] = `
809
1019
  <View
810
1020
  style={
@@ -956,7 +1166,7 @@ exports[`Chip renders correctly with variant filled and selected true 1`] = `
956
1166
  "elevation": 3,
957
1167
  "flexDirection": "row",
958
1168
  "justifyContent": "center",
959
- "marginTop": -2,
1169
+ "marginTop": undefined,
960
1170
  "opacity": 1,
961
1171
  "paddingHorizontal": 12,
962
1172
  "paddingVertical": 8,
@@ -86,6 +86,8 @@ describe('Chip', () => {
86
86
  ${'filled'} | ${false}
87
87
  ${'outlined'} | ${true}
88
88
  ${'outlined'} | ${false}
89
+ ${'compact'} | ${true}
90
+ ${'compact'} | ${false}
89
91
  `(
90
92
  'renders correctly with variant $variant and selected $selected',
91
93
  ({ variant, selected }) => {
@@ -13,7 +13,7 @@ export interface ChipProps extends ViewProps {
13
13
  /**
14
14
  * Variant of the chip.
15
15
  */
16
- variant?: 'outlined' | 'filled';
16
+ variant?: 'outlined' | 'filled' | 'compact';
17
17
  /**
18
18
  * Whether the chip is selected.
19
19
  */
@@ -83,11 +83,16 @@ const IconOnlyContent = ({
83
83
  active={active}
84
84
  icon={icon}
85
85
  testID="animated-fab-icon"
86
+ size="xsmall"
86
87
  />
87
88
  </StyledIconContainer>
88
89
  );
89
90
  }
90
- return <StyledFABIcon icon={icon} testID="styled-fab-icon" />;
91
+ return (
92
+ <StyledIconContainer>
93
+ <StyledFABIcon size="xsmall" icon={icon} testID="styled-fab-icon" />
94
+ </StyledIconContainer>
95
+ );
91
96
  };
92
97
 
93
98
  const IconWithTextContent = ({
@@ -0,0 +1,19 @@
1
+ import styled from '@emotion/native';
2
+ import FAB from '../FAB';
3
+ import Box from '../../Box';
4
+
5
+ const StyledFABPairWrapper = styled(Box)({
6
+ flexDirection: 'row',
7
+ justifyContent: 'center',
8
+ alignItems: 'center',
9
+ });
10
+
11
+ const StyledFAB = styled(FAB)<{ iconOnly?: boolean; isLast?: boolean }>(
12
+ ({ theme, iconOnly = false, isLast = false }) => ({
13
+ height: theme.__hd__.fab.sizes.fabPairHeight,
14
+ width: iconOnly ? theme.__hd__.fab.sizes.fabPairIconOnlyWidth : undefined,
15
+ marginRight: isLast ? undefined : theme.__hd__.fab.space.fabPairMarginRight,
16
+ })
17
+ );
18
+
19
+ export { StyledFABPairWrapper, StyledFAB };