@hero-design/rn 8.80.1 → 8.81.1-alpha.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.
- package/CHANGELOG.md +12 -0
- package/es/index.js +74 -24
- package/lib/index.js +74 -24
- package/package.json +3 -2
- package/src/components/Button/Button.tsx +13 -5
- package/src/components/Button/StyledButton.tsx +60 -39
- package/src/components/Button/__tests__/Button.spec.tsx +21 -16
- package/src/components/Button/__tests__/StyledButton.spec.tsx +19 -12
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +670 -0
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +153 -0
- package/src/components/Chip/StyledChip.tsx +6 -1
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +117 -60
- package/src/components/Chip/__tests__/index.spec.tsx +13 -0
- package/src/components/Chip/index.tsx +20 -12
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
- package/src/components/TimePicker/TimePickerIOS.tsx +5 -1
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +8 -0
- package/src/theme/components/button.ts +5 -0
- package/src/theme/components/chip.ts +5 -0
- package/stats/8.81.0/rn-stats.html +4842 -0
- package/stats/8.81.1/rn-stats.html +4842 -0
- package/types/components/Button/Button.d.ts +1 -1
- package/types/components/Button/StyledButton.d.ts +3 -0
- package/types/components/Chip/StyledChip.d.ts +5 -1
- package/types/components/Chip/index.d.ts +2 -2
- package/types/components/CompoundSearch/CompoundSearchHandler.d.ts +31 -0
- package/types/components/CompoundSearch/CompoundSearchTextInput.d.ts +60 -0
- package/types/components/CompoundSearch/StyledCompoundSearch.d.ts +40 -0
- package/types/components/CompoundSearch/index.d.ts +8 -0
- package/types/components/CompoundSearch/utils.d.ts +8 -0
- package/types/components/FloatingIsland/SingleLine/StyledSingleLine.d.ts +15 -0
- package/types/components/FloatingIsland/SingleLine/index.d.ts +24 -0
- package/types/components/FloatingIsland/StyledFloatingIsland.d.ts +2 -2
- package/types/theme/components/button.d.ts +5 -0
- package/types/theme/components/chip.d.ts +3 -0
- package/types/theme/components/compoundSearch.d.ts +36 -0
- package/.turbo/turbo-build.log +0 -7
|
@@ -1058,6 +1058,57 @@ exports[`StyledButtonIcon has text-danger style 1`] = `
|
|
|
1058
1058
|
</View>
|
|
1059
1059
|
`;
|
|
1060
1060
|
|
|
1061
|
+
exports[`StyledButtonIcon has text-danger style 2`] = `
|
|
1062
|
+
<View
|
|
1063
|
+
style={
|
|
1064
|
+
{
|
|
1065
|
+
"flex": 1,
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
>
|
|
1069
|
+
<HeroIcon
|
|
1070
|
+
name="bell"
|
|
1071
|
+
style={
|
|
1072
|
+
[
|
|
1073
|
+
{
|
|
1074
|
+
"color": "#001f23",
|
|
1075
|
+
"fontSize": 24,
|
|
1076
|
+
},
|
|
1077
|
+
[
|
|
1078
|
+
{
|
|
1079
|
+
"color": "#f68282",
|
|
1080
|
+
"fontSize": 20,
|
|
1081
|
+
},
|
|
1082
|
+
undefined,
|
|
1083
|
+
],
|
|
1084
|
+
]
|
|
1085
|
+
}
|
|
1086
|
+
themeIntent="text"
|
|
1087
|
+
themeSize="medium"
|
|
1088
|
+
/>
|
|
1089
|
+
<View
|
|
1090
|
+
pointerEvents="box-none"
|
|
1091
|
+
position="bottom"
|
|
1092
|
+
style={
|
|
1093
|
+
[
|
|
1094
|
+
{
|
|
1095
|
+
"bottom": 0,
|
|
1096
|
+
"elevation": 9999,
|
|
1097
|
+
"flexDirection": "column-reverse",
|
|
1098
|
+
"left": 0,
|
|
1099
|
+
"paddingHorizontal": 24,
|
|
1100
|
+
"paddingVertical": 16,
|
|
1101
|
+
"position": "absolute",
|
|
1102
|
+
"right": 0,
|
|
1103
|
+
"top": 0,
|
|
1104
|
+
},
|
|
1105
|
+
undefined,
|
|
1106
|
+
]
|
|
1107
|
+
}
|
|
1108
|
+
/>
|
|
1109
|
+
</View>
|
|
1110
|
+
`;
|
|
1111
|
+
|
|
1061
1112
|
exports[`StyledButtonIcon has text-primary style 1`] = `
|
|
1062
1113
|
<View
|
|
1063
1114
|
style={
|
|
@@ -1109,6 +1160,57 @@ exports[`StyledButtonIcon has text-primary style 1`] = `
|
|
|
1109
1160
|
</View>
|
|
1110
1161
|
`;
|
|
1111
1162
|
|
|
1163
|
+
exports[`StyledButtonIcon has text-primary style 2`] = `
|
|
1164
|
+
<View
|
|
1165
|
+
style={
|
|
1166
|
+
{
|
|
1167
|
+
"flex": 1,
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
>
|
|
1171
|
+
<HeroIcon
|
|
1172
|
+
name="bell"
|
|
1173
|
+
style={
|
|
1174
|
+
[
|
|
1175
|
+
{
|
|
1176
|
+
"color": "#001f23",
|
|
1177
|
+
"fontSize": 24,
|
|
1178
|
+
},
|
|
1179
|
+
[
|
|
1180
|
+
{
|
|
1181
|
+
"color": "#33144d",
|
|
1182
|
+
"fontSize": 20,
|
|
1183
|
+
},
|
|
1184
|
+
undefined,
|
|
1185
|
+
],
|
|
1186
|
+
]
|
|
1187
|
+
}
|
|
1188
|
+
themeIntent="text"
|
|
1189
|
+
themeSize="medium"
|
|
1190
|
+
/>
|
|
1191
|
+
<View
|
|
1192
|
+
pointerEvents="box-none"
|
|
1193
|
+
position="bottom"
|
|
1194
|
+
style={
|
|
1195
|
+
[
|
|
1196
|
+
{
|
|
1197
|
+
"bottom": 0,
|
|
1198
|
+
"elevation": 9999,
|
|
1199
|
+
"flexDirection": "column-reverse",
|
|
1200
|
+
"left": 0,
|
|
1201
|
+
"paddingHorizontal": 24,
|
|
1202
|
+
"paddingVertical": 16,
|
|
1203
|
+
"position": "absolute",
|
|
1204
|
+
"right": 0,
|
|
1205
|
+
"top": 0,
|
|
1206
|
+
},
|
|
1207
|
+
undefined,
|
|
1208
|
+
]
|
|
1209
|
+
}
|
|
1210
|
+
/>
|
|
1211
|
+
</View>
|
|
1212
|
+
`;
|
|
1213
|
+
|
|
1112
1214
|
exports[`StyledButtonIcon has text-secondary style 1`] = `
|
|
1113
1215
|
<View
|
|
1114
1216
|
style={
|
|
@@ -1160,6 +1262,57 @@ exports[`StyledButtonIcon has text-secondary style 1`] = `
|
|
|
1160
1262
|
</View>
|
|
1161
1263
|
`;
|
|
1162
1264
|
|
|
1265
|
+
exports[`StyledButtonIcon has text-secondary style 2`] = `
|
|
1266
|
+
<View
|
|
1267
|
+
style={
|
|
1268
|
+
{
|
|
1269
|
+
"flex": 1,
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
>
|
|
1273
|
+
<HeroIcon
|
|
1274
|
+
name="bell"
|
|
1275
|
+
style={
|
|
1276
|
+
[
|
|
1277
|
+
{
|
|
1278
|
+
"color": "#001f23",
|
|
1279
|
+
"fontSize": 24,
|
|
1280
|
+
},
|
|
1281
|
+
[
|
|
1282
|
+
{
|
|
1283
|
+
"color": "#001f23",
|
|
1284
|
+
"fontSize": 20,
|
|
1285
|
+
},
|
|
1286
|
+
undefined,
|
|
1287
|
+
],
|
|
1288
|
+
]
|
|
1289
|
+
}
|
|
1290
|
+
themeIntent="text"
|
|
1291
|
+
themeSize="medium"
|
|
1292
|
+
/>
|
|
1293
|
+
<View
|
|
1294
|
+
pointerEvents="box-none"
|
|
1295
|
+
position="bottom"
|
|
1296
|
+
style={
|
|
1297
|
+
[
|
|
1298
|
+
{
|
|
1299
|
+
"bottom": 0,
|
|
1300
|
+
"elevation": 9999,
|
|
1301
|
+
"flexDirection": "column-reverse",
|
|
1302
|
+
"left": 0,
|
|
1303
|
+
"paddingHorizontal": 24,
|
|
1304
|
+
"paddingVertical": 16,
|
|
1305
|
+
"position": "absolute",
|
|
1306
|
+
"right": 0,
|
|
1307
|
+
"top": 0,
|
|
1308
|
+
},
|
|
1309
|
+
undefined,
|
|
1310
|
+
]
|
|
1311
|
+
}
|
|
1312
|
+
/>
|
|
1313
|
+
</View>
|
|
1314
|
+
`;
|
|
1315
|
+
|
|
1163
1316
|
exports[`StyledButtonIcon renders disabled correctly 1`] = `
|
|
1164
1317
|
<View
|
|
1165
1318
|
style={
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import styled from '@emotion/native';
|
|
2
2
|
import { TouchableOpacity } from 'react-native';
|
|
3
|
+
import Icon from '../Icon';
|
|
3
4
|
|
|
4
5
|
type StyledChipWrapperProps = {
|
|
5
6
|
themeVariant?: 'outlined' | 'filled' | 'compact' | 'compact-outlined';
|
|
@@ -112,4 +113,8 @@ const StyledChipWrapper = styled(TouchableOpacity)<StyledChipWrapperProps>(
|
|
|
112
113
|
}
|
|
113
114
|
);
|
|
114
115
|
|
|
115
|
-
|
|
116
|
+
const StyledChipIcon = styled(Icon)(({ theme }) => ({
|
|
117
|
+
fontSize: theme.__hd__.chip.fontSizes.icon,
|
|
118
|
+
}));
|
|
119
|
+
|
|
120
|
+
export { StyledChipWrapper, StyledChipIcon };
|
|
@@ -59,16 +59,16 @@ exports[`Chip does not render selected icon when showSelectedIcon is false 1`] =
|
|
|
59
59
|
{
|
|
60
60
|
"color": "#001f23",
|
|
61
61
|
"fontFamily": "BeVietnamPro-Regular",
|
|
62
|
-
"fontSize":
|
|
62
|
+
"fontSize": 14,
|
|
63
63
|
"letterSpacing": 0.48,
|
|
64
|
-
"lineHeight":
|
|
64
|
+
"lineHeight": 22,
|
|
65
65
|
},
|
|
66
66
|
undefined,
|
|
67
67
|
]
|
|
68
68
|
}
|
|
69
69
|
themeIntent="body"
|
|
70
70
|
themeTypeface="neutral"
|
|
71
|
-
themeVariant="
|
|
71
|
+
themeVariant="small"
|
|
72
72
|
>
|
|
73
73
|
Chip
|
|
74
74
|
</Text>
|
|
@@ -155,16 +155,16 @@ exports[`Chip renders correctly when selected is false 1`] = `
|
|
|
155
155
|
{
|
|
156
156
|
"color": "#001f23",
|
|
157
157
|
"fontFamily": "BeVietnamPro-Regular",
|
|
158
|
-
"fontSize":
|
|
158
|
+
"fontSize": 14,
|
|
159
159
|
"letterSpacing": 0.48,
|
|
160
|
-
"lineHeight":
|
|
160
|
+
"lineHeight": 22,
|
|
161
161
|
},
|
|
162
162
|
undefined,
|
|
163
163
|
]
|
|
164
164
|
}
|
|
165
165
|
themeIntent="body"
|
|
166
166
|
themeTypeface="neutral"
|
|
167
|
-
themeVariant="
|
|
167
|
+
themeVariant="small"
|
|
168
168
|
>
|
|
169
169
|
Cover my bills
|
|
170
170
|
</Text>
|
|
@@ -251,16 +251,16 @@ exports[`Chip renders correctly when selected is true 1`] = `
|
|
|
251
251
|
{
|
|
252
252
|
"color": "#001f23",
|
|
253
253
|
"fontFamily": "BeVietnamPro-Regular",
|
|
254
|
-
"fontSize":
|
|
254
|
+
"fontSize": 14,
|
|
255
255
|
"letterSpacing": 0.48,
|
|
256
|
-
"lineHeight":
|
|
256
|
+
"lineHeight": 22,
|
|
257
257
|
},
|
|
258
258
|
undefined,
|
|
259
259
|
]
|
|
260
260
|
}
|
|
261
261
|
themeIntent="body"
|
|
262
262
|
themeTypeface="neutral"
|
|
263
|
-
themeVariant="
|
|
263
|
+
themeVariant="small"
|
|
264
264
|
>
|
|
265
265
|
Cover my bills
|
|
266
266
|
</Text>
|
|
@@ -281,14 +281,19 @@ exports[`Chip renders correctly when selected is true 1`] = `
|
|
|
281
281
|
[
|
|
282
282
|
{
|
|
283
283
|
"color": "#001f23",
|
|
284
|
-
"fontSize":
|
|
284
|
+
"fontSize": 24,
|
|
285
285
|
},
|
|
286
|
-
|
|
286
|
+
[
|
|
287
|
+
{
|
|
288
|
+
"fontSize": 12,
|
|
289
|
+
},
|
|
290
|
+
undefined,
|
|
291
|
+
],
|
|
287
292
|
]
|
|
288
293
|
}
|
|
289
294
|
testID="selected-chip-icon-cancel"
|
|
290
295
|
themeIntent="text"
|
|
291
|
-
themeSize="
|
|
296
|
+
themeSize="medium"
|
|
292
297
|
/>
|
|
293
298
|
</View>
|
|
294
299
|
</View>
|
|
@@ -392,14 +397,19 @@ exports[`Chip renders correctly with custom icon 1`] = `
|
|
|
392
397
|
[
|
|
393
398
|
{
|
|
394
399
|
"color": "#001f23",
|
|
395
|
-
"fontSize":
|
|
400
|
+
"fontSize": 24,
|
|
396
401
|
},
|
|
397
|
-
|
|
402
|
+
[
|
|
403
|
+
{
|
|
404
|
+
"fontSize": 12,
|
|
405
|
+
},
|
|
406
|
+
undefined,
|
|
407
|
+
],
|
|
398
408
|
]
|
|
399
409
|
}
|
|
400
410
|
testID="chip-icon-charging-station-outlined"
|
|
401
411
|
themeIntent="text"
|
|
402
|
-
themeSize="
|
|
412
|
+
themeSize="medium"
|
|
403
413
|
/>
|
|
404
414
|
</View>
|
|
405
415
|
<Text
|
|
@@ -409,16 +419,16 @@ exports[`Chip renders correctly with custom icon 1`] = `
|
|
|
409
419
|
{
|
|
410
420
|
"color": "#001f23",
|
|
411
421
|
"fontFamily": "BeVietnamPro-Regular",
|
|
412
|
-
"fontSize":
|
|
422
|
+
"fontSize": 14,
|
|
413
423
|
"letterSpacing": 0.48,
|
|
414
|
-
"lineHeight":
|
|
424
|
+
"lineHeight": 22,
|
|
415
425
|
},
|
|
416
426
|
undefined,
|
|
417
427
|
]
|
|
418
428
|
}
|
|
419
429
|
themeIntent="body"
|
|
420
430
|
themeTypeface="neutral"
|
|
421
|
-
themeVariant="
|
|
431
|
+
themeVariant="small"
|
|
422
432
|
>
|
|
423
433
|
Cover my bills
|
|
424
434
|
</Text>
|
|
@@ -523,14 +533,19 @@ exports[`Chip renders correctly with custom icon 2`] = `
|
|
|
523
533
|
[
|
|
524
534
|
{
|
|
525
535
|
"color": "#001f23",
|
|
526
|
-
"fontSize":
|
|
536
|
+
"fontSize": 24,
|
|
527
537
|
},
|
|
528
|
-
|
|
538
|
+
[
|
|
539
|
+
{
|
|
540
|
+
"fontSize": 12,
|
|
541
|
+
},
|
|
542
|
+
undefined,
|
|
543
|
+
],
|
|
529
544
|
]
|
|
530
545
|
}
|
|
531
546
|
testID="chip-icon-charging-station-outlined"
|
|
532
547
|
themeIntent="text"
|
|
533
|
-
themeSize="
|
|
548
|
+
themeSize="medium"
|
|
534
549
|
/>
|
|
535
550
|
</View>
|
|
536
551
|
<Text
|
|
@@ -540,16 +555,16 @@ exports[`Chip renders correctly with custom icon 2`] = `
|
|
|
540
555
|
{
|
|
541
556
|
"color": "#001f23",
|
|
542
557
|
"fontFamily": "BeVietnamPro-Regular",
|
|
543
|
-
"fontSize":
|
|
558
|
+
"fontSize": 14,
|
|
544
559
|
"letterSpacing": 0.48,
|
|
545
|
-
"lineHeight":
|
|
560
|
+
"lineHeight": 22,
|
|
546
561
|
},
|
|
547
562
|
undefined,
|
|
548
563
|
]
|
|
549
564
|
}
|
|
550
565
|
themeIntent="body"
|
|
551
566
|
themeTypeface="neutral"
|
|
552
|
-
themeVariant="
|
|
567
|
+
themeVariant="small"
|
|
553
568
|
>
|
|
554
569
|
Cover my bills
|
|
555
570
|
</Text>
|
|
@@ -637,16 +652,16 @@ exports[`Chip renders correctly with default icon 1`] = `
|
|
|
637
652
|
{
|
|
638
653
|
"color": "#001f23",
|
|
639
654
|
"fontFamily": "BeVietnamPro-Regular",
|
|
640
|
-
"fontSize":
|
|
655
|
+
"fontSize": 14,
|
|
641
656
|
"letterSpacing": 0.48,
|
|
642
|
-
"lineHeight":
|
|
657
|
+
"lineHeight": 22,
|
|
643
658
|
},
|
|
644
659
|
undefined,
|
|
645
660
|
]
|
|
646
661
|
}
|
|
647
662
|
themeIntent="body"
|
|
648
663
|
themeTypeface="neutral"
|
|
649
|
-
themeVariant="
|
|
664
|
+
themeVariant="small"
|
|
650
665
|
>
|
|
651
666
|
Cover my bills
|
|
652
667
|
</Text>
|
|
@@ -734,16 +749,16 @@ exports[`Chip renders correctly with default icon 2`] = `
|
|
|
734
749
|
{
|
|
735
750
|
"color": "#001f23",
|
|
736
751
|
"fontFamily": "BeVietnamPro-Regular",
|
|
737
|
-
"fontSize":
|
|
752
|
+
"fontSize": 14,
|
|
738
753
|
"letterSpacing": 0.48,
|
|
739
|
-
"lineHeight":
|
|
754
|
+
"lineHeight": 22,
|
|
740
755
|
},
|
|
741
756
|
undefined,
|
|
742
757
|
]
|
|
743
758
|
}
|
|
744
759
|
themeIntent="body"
|
|
745
760
|
themeTypeface="neutral"
|
|
746
|
-
themeVariant="
|
|
761
|
+
themeVariant="small"
|
|
747
762
|
>
|
|
748
763
|
Cover my bills
|
|
749
764
|
</Text>
|
|
@@ -764,14 +779,19 @@ exports[`Chip renders correctly with default icon 2`] = `
|
|
|
764
779
|
[
|
|
765
780
|
{
|
|
766
781
|
"color": "#001f23",
|
|
767
|
-
"fontSize":
|
|
782
|
+
"fontSize": 24,
|
|
768
783
|
},
|
|
769
|
-
|
|
784
|
+
[
|
|
785
|
+
{
|
|
786
|
+
"fontSize": 12,
|
|
787
|
+
},
|
|
788
|
+
undefined,
|
|
789
|
+
],
|
|
770
790
|
]
|
|
771
791
|
}
|
|
772
792
|
testID="selected-chip-icon-cancel"
|
|
773
793
|
themeIntent="text"
|
|
774
|
-
themeSize="
|
|
794
|
+
themeSize="medium"
|
|
775
795
|
/>
|
|
776
796
|
</View>
|
|
777
797
|
</View>
|
|
@@ -865,16 +885,16 @@ exports[`Chip renders correctly with variant compact and selected false 1`] = `
|
|
|
865
885
|
{
|
|
866
886
|
"color": "#001f23",
|
|
867
887
|
"fontFamily": "BeVietnamPro-Regular",
|
|
868
|
-
"fontSize":
|
|
888
|
+
"fontSize": 14,
|
|
869
889
|
"letterSpacing": 0.48,
|
|
870
|
-
"lineHeight":
|
|
890
|
+
"lineHeight": 22,
|
|
871
891
|
},
|
|
872
892
|
undefined,
|
|
873
893
|
]
|
|
874
894
|
}
|
|
875
895
|
themeIntent="body"
|
|
876
896
|
themeTypeface="neutral"
|
|
877
|
-
themeVariant="
|
|
897
|
+
themeVariant="small"
|
|
878
898
|
>
|
|
879
899
|
Cover my bills
|
|
880
900
|
</Text>
|
|
@@ -969,16 +989,16 @@ exports[`Chip renders correctly with variant compact and selected true 1`] = `
|
|
|
969
989
|
{
|
|
970
990
|
"color": "#001f23",
|
|
971
991
|
"fontFamily": "BeVietnamPro-Regular",
|
|
972
|
-
"fontSize":
|
|
992
|
+
"fontSize": 14,
|
|
973
993
|
"letterSpacing": 0.48,
|
|
974
|
-
"lineHeight":
|
|
994
|
+
"lineHeight": 22,
|
|
975
995
|
},
|
|
976
996
|
undefined,
|
|
977
997
|
]
|
|
978
998
|
}
|
|
979
999
|
themeIntent="body"
|
|
980
1000
|
themeTypeface="neutral"
|
|
981
|
-
themeVariant="
|
|
1001
|
+
themeVariant="small"
|
|
982
1002
|
>
|
|
983
1003
|
Cover my bills
|
|
984
1004
|
</Text>
|
|
@@ -1066,16 +1086,16 @@ exports[`Chip renders correctly with variant compact-outlined and selected false
|
|
|
1066
1086
|
{
|
|
1067
1087
|
"color": "#001f23",
|
|
1068
1088
|
"fontFamily": "BeVietnamPro-Regular",
|
|
1069
|
-
"fontSize":
|
|
1089
|
+
"fontSize": 14,
|
|
1070
1090
|
"letterSpacing": 0.48,
|
|
1071
|
-
"lineHeight":
|
|
1091
|
+
"lineHeight": 22,
|
|
1072
1092
|
},
|
|
1073
1093
|
undefined,
|
|
1074
1094
|
]
|
|
1075
1095
|
}
|
|
1076
1096
|
themeIntent="body"
|
|
1077
1097
|
themeTypeface="neutral"
|
|
1078
|
-
themeVariant="
|
|
1098
|
+
themeVariant="small"
|
|
1079
1099
|
>
|
|
1080
1100
|
Cover my bills
|
|
1081
1101
|
</Text>
|
|
@@ -1163,19 +1183,51 @@ exports[`Chip renders correctly with variant compact-outlined and selected true
|
|
|
1163
1183
|
{
|
|
1164
1184
|
"color": "#001f23",
|
|
1165
1185
|
"fontFamily": "BeVietnamPro-Regular",
|
|
1166
|
-
"fontSize":
|
|
1186
|
+
"fontSize": 14,
|
|
1167
1187
|
"letterSpacing": 0.48,
|
|
1168
|
-
"lineHeight":
|
|
1188
|
+
"lineHeight": 22,
|
|
1169
1189
|
},
|
|
1170
1190
|
undefined,
|
|
1171
1191
|
]
|
|
1172
1192
|
}
|
|
1173
1193
|
themeIntent="body"
|
|
1174
1194
|
themeTypeface="neutral"
|
|
1175
|
-
themeVariant="
|
|
1195
|
+
themeVariant="small"
|
|
1176
1196
|
>
|
|
1177
1197
|
Cover my bills
|
|
1178
1198
|
</Text>
|
|
1199
|
+
<View
|
|
1200
|
+
marginLeft="small"
|
|
1201
|
+
style={
|
|
1202
|
+
[
|
|
1203
|
+
{
|
|
1204
|
+
"marginLeft": 8,
|
|
1205
|
+
},
|
|
1206
|
+
undefined,
|
|
1207
|
+
]
|
|
1208
|
+
}
|
|
1209
|
+
>
|
|
1210
|
+
<HeroIcon
|
|
1211
|
+
name="cancel"
|
|
1212
|
+
style={
|
|
1213
|
+
[
|
|
1214
|
+
{
|
|
1215
|
+
"color": "#001f23",
|
|
1216
|
+
"fontSize": 24,
|
|
1217
|
+
},
|
|
1218
|
+
[
|
|
1219
|
+
{
|
|
1220
|
+
"fontSize": 12,
|
|
1221
|
+
},
|
|
1222
|
+
undefined,
|
|
1223
|
+
],
|
|
1224
|
+
]
|
|
1225
|
+
}
|
|
1226
|
+
testID="selected-chip-icon-cancel"
|
|
1227
|
+
themeIntent="text"
|
|
1228
|
+
themeSize="medium"
|
|
1229
|
+
/>
|
|
1230
|
+
</View>
|
|
1179
1231
|
</View>
|
|
1180
1232
|
<View
|
|
1181
1233
|
pointerEvents="box-none"
|
|
@@ -1267,16 +1319,16 @@ exports[`Chip renders correctly with variant filled and selected false 1`] = `
|
|
|
1267
1319
|
{
|
|
1268
1320
|
"color": "#001f23",
|
|
1269
1321
|
"fontFamily": "BeVietnamPro-Regular",
|
|
1270
|
-
"fontSize":
|
|
1322
|
+
"fontSize": 14,
|
|
1271
1323
|
"letterSpacing": 0.48,
|
|
1272
|
-
"lineHeight":
|
|
1324
|
+
"lineHeight": 22,
|
|
1273
1325
|
},
|
|
1274
1326
|
undefined,
|
|
1275
1327
|
]
|
|
1276
1328
|
}
|
|
1277
1329
|
themeIntent="body"
|
|
1278
1330
|
themeTypeface="neutral"
|
|
1279
|
-
themeVariant="
|
|
1331
|
+
themeVariant="small"
|
|
1280
1332
|
>
|
|
1281
1333
|
Cover my bills
|
|
1282
1334
|
</Text>
|
|
@@ -1371,16 +1423,16 @@ exports[`Chip renders correctly with variant filled and selected true 1`] = `
|
|
|
1371
1423
|
{
|
|
1372
1424
|
"color": "#001f23",
|
|
1373
1425
|
"fontFamily": "BeVietnamPro-Regular",
|
|
1374
|
-
"fontSize":
|
|
1426
|
+
"fontSize": 14,
|
|
1375
1427
|
"letterSpacing": 0.48,
|
|
1376
|
-
"lineHeight":
|
|
1428
|
+
"lineHeight": 22,
|
|
1377
1429
|
},
|
|
1378
1430
|
undefined,
|
|
1379
1431
|
]
|
|
1380
1432
|
}
|
|
1381
1433
|
themeIntent="body"
|
|
1382
1434
|
themeTypeface="neutral"
|
|
1383
|
-
themeVariant="
|
|
1435
|
+
themeVariant="small"
|
|
1384
1436
|
>
|
|
1385
1437
|
Cover my bills
|
|
1386
1438
|
</Text>
|
|
@@ -1468,16 +1520,16 @@ exports[`Chip renders correctly with variant outlined and selected false 1`] = `
|
|
|
1468
1520
|
{
|
|
1469
1521
|
"color": "#001f23",
|
|
1470
1522
|
"fontFamily": "BeVietnamPro-Regular",
|
|
1471
|
-
"fontSize":
|
|
1523
|
+
"fontSize": 14,
|
|
1472
1524
|
"letterSpacing": 0.48,
|
|
1473
|
-
"lineHeight":
|
|
1525
|
+
"lineHeight": 22,
|
|
1474
1526
|
},
|
|
1475
1527
|
undefined,
|
|
1476
1528
|
]
|
|
1477
1529
|
}
|
|
1478
1530
|
themeIntent="body"
|
|
1479
1531
|
themeTypeface="neutral"
|
|
1480
|
-
themeVariant="
|
|
1532
|
+
themeVariant="small"
|
|
1481
1533
|
>
|
|
1482
1534
|
Cover my bills
|
|
1483
1535
|
</Text>
|
|
@@ -1565,16 +1617,16 @@ exports[`Chip renders correctly with variant outlined and selected true 1`] = `
|
|
|
1565
1617
|
{
|
|
1566
1618
|
"color": "#001f23",
|
|
1567
1619
|
"fontFamily": "BeVietnamPro-Regular",
|
|
1568
|
-
"fontSize":
|
|
1620
|
+
"fontSize": 14,
|
|
1569
1621
|
"letterSpacing": 0.48,
|
|
1570
|
-
"lineHeight":
|
|
1622
|
+
"lineHeight": 22,
|
|
1571
1623
|
},
|
|
1572
1624
|
undefined,
|
|
1573
1625
|
]
|
|
1574
1626
|
}
|
|
1575
1627
|
themeIntent="body"
|
|
1576
1628
|
themeTypeface="neutral"
|
|
1577
|
-
themeVariant="
|
|
1629
|
+
themeVariant="small"
|
|
1578
1630
|
>
|
|
1579
1631
|
Cover my bills
|
|
1580
1632
|
</Text>
|
|
@@ -1595,14 +1647,19 @@ exports[`Chip renders correctly with variant outlined and selected true 1`] = `
|
|
|
1595
1647
|
[
|
|
1596
1648
|
{
|
|
1597
1649
|
"color": "#001f23",
|
|
1598
|
-
"fontSize":
|
|
1650
|
+
"fontSize": 24,
|
|
1599
1651
|
},
|
|
1600
|
-
|
|
1652
|
+
[
|
|
1653
|
+
{
|
|
1654
|
+
"fontSize": 12,
|
|
1655
|
+
},
|
|
1656
|
+
undefined,
|
|
1657
|
+
],
|
|
1601
1658
|
]
|
|
1602
1659
|
}
|
|
1603
1660
|
testID="selected-chip-icon-cancel"
|
|
1604
1661
|
themeIntent="text"
|
|
1605
|
-
themeSize="
|
|
1662
|
+
themeSize="medium"
|
|
1606
1663
|
/>
|
|
1607
1664
|
</View>
|
|
1608
1665
|
</View>
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { fireEvent } from '@testing-library/react-native';
|
|
3
3
|
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
4
4
|
import Chip from '..';
|
|
5
|
+
import Typography from '../../Typography';
|
|
5
6
|
|
|
6
7
|
describe('Chip', () => {
|
|
7
8
|
it.each`
|
|
@@ -106,6 +107,18 @@ describe('Chip', () => {
|
|
|
106
107
|
}
|
|
107
108
|
);
|
|
108
109
|
|
|
110
|
+
it('renders custom label correctly', () => {
|
|
111
|
+
const { getByText } = renderWithTheme(
|
|
112
|
+
<Chip
|
|
113
|
+
label={
|
|
114
|
+
<Typography.Body variant="small">Cover my bills</Typography.Body>
|
|
115
|
+
}
|
|
116
|
+
/>
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
expect(getByText('Cover my bills')).toBeVisible();
|
|
120
|
+
});
|
|
121
|
+
|
|
109
122
|
it('calls onPress when pressed', () => {
|
|
110
123
|
const onPress = jest.fn();
|
|
111
124
|
|