@hero-design/rn 8.103.2 → 8.103.3
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/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +7 -0
- package/es/index.js +102 -86
- package/eslint.config.js +1 -0
- package/lib/index.js +102 -86
- package/package.json +1 -1
- package/src/components/DatePicker/StyledDatePicker.tsx +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +2 -0
- package/src/components/PinInput/PinCell.tsx +6 -1
- package/src/components/PinInput/StyledPinInput.tsx +2 -2
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +30 -0
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +287 -5
- package/src/components/PinInput/__tests__/index.spec.tsx +33 -0
- package/src/components/PinInput/index.tsx +6 -2
- package/src/components/Select/MultiSelect/index.tsx +15 -4
- package/src/components/Select/SingleSelect/index.tsx +15 -4
- package/src/components/Select/index.internal.tsx +13 -0
- package/src/components/Select/index.tsx +14 -2
- package/src/components/Select/types.ts +4 -0
- package/src/components/TimePicker/StyledTimePicker.tsx +1 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -0
- package/src/index.internal.ts +5 -0
- package/src/types.internal.ts +8 -0
- package/stats/8.103.2/rn-stats.html +3 -1
- package/stats/8.103.3/rn-stats.html +4844 -0
- package/types/components/Checkbox/index.d.ts +1 -1
- package/types/components/PinInput/StyledPinInput.d.ts +2 -4
- package/types/components/Select/MultiSelect/index.d.ts +5 -1
- package/types/components/Select/SingleSelect/index.d.ts +5 -1
- package/types/components/Select/index.d.ts +5 -3
- package/types/components/Select/index.internal.d.ts +8 -0
- package/types/components/Select/types.d.ts +4 -0
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/index.internal.d.ts +4 -0
- package/types/types.internal.d.ts +3 -0
|
@@ -19,6 +19,35 @@ exports[`rendering renders correctly 1`] = `
|
|
|
19
19
|
}
|
|
20
20
|
>
|
|
21
21
|
<View
|
|
22
|
+
accessibilityState={
|
|
23
|
+
{
|
|
24
|
+
"busy": undefined,
|
|
25
|
+
"checked": undefined,
|
|
26
|
+
"disabled": false,
|
|
27
|
+
"expanded": undefined,
|
|
28
|
+
"selected": undefined,
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
accessibilityValue={
|
|
32
|
+
{
|
|
33
|
+
"max": undefined,
|
|
34
|
+
"min": undefined,
|
|
35
|
+
"now": undefined,
|
|
36
|
+
"text": undefined,
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
accessible={true}
|
|
40
|
+
collapsable={false}
|
|
41
|
+
focusable={true}
|
|
42
|
+
onBlur={[Function]}
|
|
43
|
+
onClick={[Function]}
|
|
44
|
+
onFocus={[Function]}
|
|
45
|
+
onResponderGrant={[Function]}
|
|
46
|
+
onResponderMove={[Function]}
|
|
47
|
+
onResponderRelease={[Function]}
|
|
48
|
+
onResponderTerminate={[Function]}
|
|
49
|
+
onResponderTerminationRequest={[Function]}
|
|
50
|
+
onStartShouldSetResponder={[Function]}
|
|
22
51
|
style={
|
|
23
52
|
[
|
|
24
53
|
{
|
|
@@ -27,8 +56,14 @@ exports[`rendering renders correctly 1`] = `
|
|
|
27
56
|
undefined,
|
|
28
57
|
]
|
|
29
58
|
}
|
|
59
|
+
testID="pin-wrapper"
|
|
30
60
|
>
|
|
31
61
|
<View
|
|
62
|
+
accessibilityState={
|
|
63
|
+
{
|
|
64
|
+
"selected": false,
|
|
65
|
+
}
|
|
66
|
+
}
|
|
32
67
|
style={
|
|
33
68
|
[
|
|
34
69
|
{
|
|
@@ -43,6 +78,7 @@ exports[`rendering renders correctly 1`] = `
|
|
|
43
78
|
undefined,
|
|
44
79
|
]
|
|
45
80
|
}
|
|
81
|
+
testID="pin-cell"
|
|
46
82
|
themeFocused={false}
|
|
47
83
|
themeState="default"
|
|
48
84
|
>
|
|
@@ -75,6 +111,11 @@ exports[`rendering renders correctly 1`] = `
|
|
|
75
111
|
}
|
|
76
112
|
/>
|
|
77
113
|
<View
|
|
114
|
+
accessibilityState={
|
|
115
|
+
{
|
|
116
|
+
"selected": false,
|
|
117
|
+
}
|
|
118
|
+
}
|
|
78
119
|
style={
|
|
79
120
|
[
|
|
80
121
|
{
|
|
@@ -89,6 +130,7 @@ exports[`rendering renders correctly 1`] = `
|
|
|
89
130
|
undefined,
|
|
90
131
|
]
|
|
91
132
|
}
|
|
133
|
+
testID="pin-cell"
|
|
92
134
|
themeFocused={false}
|
|
93
135
|
themeState="default"
|
|
94
136
|
>
|
|
@@ -121,6 +163,11 @@ exports[`rendering renders correctly 1`] = `
|
|
|
121
163
|
}
|
|
122
164
|
/>
|
|
123
165
|
<View
|
|
166
|
+
accessibilityState={
|
|
167
|
+
{
|
|
168
|
+
"selected": false,
|
|
169
|
+
}
|
|
170
|
+
}
|
|
124
171
|
style={
|
|
125
172
|
[
|
|
126
173
|
{
|
|
@@ -135,6 +182,7 @@ exports[`rendering renders correctly 1`] = `
|
|
|
135
182
|
undefined,
|
|
136
183
|
]
|
|
137
184
|
}
|
|
185
|
+
testID="pin-cell"
|
|
138
186
|
themeFocused={false}
|
|
139
187
|
themeState="default"
|
|
140
188
|
>
|
|
@@ -166,6 +214,11 @@ exports[`rendering renders correctly 1`] = `
|
|
|
166
214
|
}
|
|
167
215
|
/>
|
|
168
216
|
<View
|
|
217
|
+
accessibilityState={
|
|
218
|
+
{
|
|
219
|
+
"selected": false,
|
|
220
|
+
}
|
|
221
|
+
}
|
|
169
222
|
style={
|
|
170
223
|
[
|
|
171
224
|
{
|
|
@@ -180,6 +233,7 @@ exports[`rendering renders correctly 1`] = `
|
|
|
180
233
|
undefined,
|
|
181
234
|
]
|
|
182
235
|
}
|
|
236
|
+
testID="pin-cell"
|
|
183
237
|
themeFocused={false}
|
|
184
238
|
themeState="default"
|
|
185
239
|
>
|
|
@@ -208,7 +262,7 @@ exports[`rendering renders correctly 1`] = `
|
|
|
208
262
|
onBlur={[Function]}
|
|
209
263
|
onChangeText={[Function]}
|
|
210
264
|
onFocus={[Function]}
|
|
211
|
-
pointerEvents="
|
|
265
|
+
pointerEvents="none"
|
|
212
266
|
secureTextEntry={true}
|
|
213
267
|
selectTextOnFocus={false}
|
|
214
268
|
selection={
|
|
@@ -280,6 +334,35 @@ exports[`rendering renders correctly when disabled 1`] = `
|
|
|
280
334
|
}
|
|
281
335
|
>
|
|
282
336
|
<View
|
|
337
|
+
accessibilityState={
|
|
338
|
+
{
|
|
339
|
+
"busy": undefined,
|
|
340
|
+
"checked": undefined,
|
|
341
|
+
"disabled": true,
|
|
342
|
+
"expanded": undefined,
|
|
343
|
+
"selected": undefined,
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
accessibilityValue={
|
|
347
|
+
{
|
|
348
|
+
"max": undefined,
|
|
349
|
+
"min": undefined,
|
|
350
|
+
"now": undefined,
|
|
351
|
+
"text": undefined,
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
accessible={true}
|
|
355
|
+
collapsable={false}
|
|
356
|
+
focusable={true}
|
|
357
|
+
onBlur={[Function]}
|
|
358
|
+
onClick={[Function]}
|
|
359
|
+
onFocus={[Function]}
|
|
360
|
+
onResponderGrant={[Function]}
|
|
361
|
+
onResponderMove={[Function]}
|
|
362
|
+
onResponderRelease={[Function]}
|
|
363
|
+
onResponderTerminate={[Function]}
|
|
364
|
+
onResponderTerminationRequest={[Function]}
|
|
365
|
+
onStartShouldSetResponder={[Function]}
|
|
283
366
|
style={
|
|
284
367
|
[
|
|
285
368
|
{
|
|
@@ -288,8 +371,14 @@ exports[`rendering renders correctly when disabled 1`] = `
|
|
|
288
371
|
undefined,
|
|
289
372
|
]
|
|
290
373
|
}
|
|
374
|
+
testID="pin-wrapper"
|
|
291
375
|
>
|
|
292
376
|
<View
|
|
377
|
+
accessibilityState={
|
|
378
|
+
{
|
|
379
|
+
"selected": false,
|
|
380
|
+
}
|
|
381
|
+
}
|
|
293
382
|
style={
|
|
294
383
|
[
|
|
295
384
|
{
|
|
@@ -304,6 +393,7 @@ exports[`rendering renders correctly when disabled 1`] = `
|
|
|
304
393
|
undefined,
|
|
305
394
|
]
|
|
306
395
|
}
|
|
396
|
+
testID="pin-cell"
|
|
307
397
|
themeFocused={false}
|
|
308
398
|
themeState="disabled"
|
|
309
399
|
>
|
|
@@ -336,6 +426,11 @@ exports[`rendering renders correctly when disabled 1`] = `
|
|
|
336
426
|
}
|
|
337
427
|
/>
|
|
338
428
|
<View
|
|
429
|
+
accessibilityState={
|
|
430
|
+
{
|
|
431
|
+
"selected": false,
|
|
432
|
+
}
|
|
433
|
+
}
|
|
339
434
|
style={
|
|
340
435
|
[
|
|
341
436
|
{
|
|
@@ -350,6 +445,7 @@ exports[`rendering renders correctly when disabled 1`] = `
|
|
|
350
445
|
undefined,
|
|
351
446
|
]
|
|
352
447
|
}
|
|
448
|
+
testID="pin-cell"
|
|
353
449
|
themeFocused={false}
|
|
354
450
|
themeState="disabled"
|
|
355
451
|
>
|
|
@@ -382,6 +478,11 @@ exports[`rendering renders correctly when disabled 1`] = `
|
|
|
382
478
|
}
|
|
383
479
|
/>
|
|
384
480
|
<View
|
|
481
|
+
accessibilityState={
|
|
482
|
+
{
|
|
483
|
+
"selected": false,
|
|
484
|
+
}
|
|
485
|
+
}
|
|
385
486
|
style={
|
|
386
487
|
[
|
|
387
488
|
{
|
|
@@ -396,6 +497,7 @@ exports[`rendering renders correctly when disabled 1`] = `
|
|
|
396
497
|
undefined,
|
|
397
498
|
]
|
|
398
499
|
}
|
|
500
|
+
testID="pin-cell"
|
|
399
501
|
themeFocused={false}
|
|
400
502
|
themeState="disabled"
|
|
401
503
|
>
|
|
@@ -427,6 +529,11 @@ exports[`rendering renders correctly when disabled 1`] = `
|
|
|
427
529
|
}
|
|
428
530
|
/>
|
|
429
531
|
<View
|
|
532
|
+
accessibilityState={
|
|
533
|
+
{
|
|
534
|
+
"selected": false,
|
|
535
|
+
}
|
|
536
|
+
}
|
|
430
537
|
style={
|
|
431
538
|
[
|
|
432
539
|
{
|
|
@@ -441,6 +548,7 @@ exports[`rendering renders correctly when disabled 1`] = `
|
|
|
441
548
|
undefined,
|
|
442
549
|
]
|
|
443
550
|
}
|
|
551
|
+
testID="pin-cell"
|
|
444
552
|
themeFocused={false}
|
|
445
553
|
themeState="disabled"
|
|
446
554
|
>
|
|
@@ -469,7 +577,7 @@ exports[`rendering renders correctly when disabled 1`] = `
|
|
|
469
577
|
onBlur={[Function]}
|
|
470
578
|
onChangeText={[Function]}
|
|
471
579
|
onFocus={[Function]}
|
|
472
|
-
pointerEvents="
|
|
580
|
+
pointerEvents="none"
|
|
473
581
|
secureTextEntry={true}
|
|
474
582
|
selectTextOnFocus={false}
|
|
475
583
|
selection={
|
|
@@ -541,6 +649,35 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
541
649
|
}
|
|
542
650
|
>
|
|
543
651
|
<View
|
|
652
|
+
accessibilityState={
|
|
653
|
+
{
|
|
654
|
+
"busy": undefined,
|
|
655
|
+
"checked": undefined,
|
|
656
|
+
"disabled": false,
|
|
657
|
+
"expanded": undefined,
|
|
658
|
+
"selected": undefined,
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
accessibilityValue={
|
|
662
|
+
{
|
|
663
|
+
"max": undefined,
|
|
664
|
+
"min": undefined,
|
|
665
|
+
"now": undefined,
|
|
666
|
+
"text": undefined,
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
accessible={true}
|
|
670
|
+
collapsable={false}
|
|
671
|
+
focusable={true}
|
|
672
|
+
onBlur={[Function]}
|
|
673
|
+
onClick={[Function]}
|
|
674
|
+
onFocus={[Function]}
|
|
675
|
+
onResponderGrant={[Function]}
|
|
676
|
+
onResponderMove={[Function]}
|
|
677
|
+
onResponderRelease={[Function]}
|
|
678
|
+
onResponderTerminate={[Function]}
|
|
679
|
+
onResponderTerminationRequest={[Function]}
|
|
680
|
+
onStartShouldSetResponder={[Function]}
|
|
544
681
|
style={
|
|
545
682
|
[
|
|
546
683
|
{
|
|
@@ -549,8 +686,14 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
549
686
|
undefined,
|
|
550
687
|
]
|
|
551
688
|
}
|
|
689
|
+
testID="pin-wrapper"
|
|
552
690
|
>
|
|
553
691
|
<View
|
|
692
|
+
accessibilityState={
|
|
693
|
+
{
|
|
694
|
+
"selected": false,
|
|
695
|
+
}
|
|
696
|
+
}
|
|
554
697
|
style={
|
|
555
698
|
[
|
|
556
699
|
{
|
|
@@ -565,6 +708,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
565
708
|
undefined,
|
|
566
709
|
]
|
|
567
710
|
}
|
|
711
|
+
testID="pin-cell"
|
|
568
712
|
themeFocused={false}
|
|
569
713
|
themeState="default"
|
|
570
714
|
>
|
|
@@ -606,6 +750,11 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
606
750
|
}
|
|
607
751
|
/>
|
|
608
752
|
<View
|
|
753
|
+
accessibilityState={
|
|
754
|
+
{
|
|
755
|
+
"selected": false,
|
|
756
|
+
}
|
|
757
|
+
}
|
|
609
758
|
style={
|
|
610
759
|
[
|
|
611
760
|
{
|
|
@@ -620,6 +769,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
620
769
|
undefined,
|
|
621
770
|
]
|
|
622
771
|
}
|
|
772
|
+
testID="pin-cell"
|
|
623
773
|
themeFocused={false}
|
|
624
774
|
themeState="default"
|
|
625
775
|
>
|
|
@@ -661,6 +811,11 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
661
811
|
}
|
|
662
812
|
/>
|
|
663
813
|
<View
|
|
814
|
+
accessibilityState={
|
|
815
|
+
{
|
|
816
|
+
"selected": false,
|
|
817
|
+
}
|
|
818
|
+
}
|
|
664
819
|
style={
|
|
665
820
|
[
|
|
666
821
|
{
|
|
@@ -675,6 +830,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
675
830
|
undefined,
|
|
676
831
|
]
|
|
677
832
|
}
|
|
833
|
+
testID="pin-cell"
|
|
678
834
|
themeFocused={false}
|
|
679
835
|
themeState="default"
|
|
680
836
|
>
|
|
@@ -716,6 +872,11 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
716
872
|
}
|
|
717
873
|
/>
|
|
718
874
|
<View
|
|
875
|
+
accessibilityState={
|
|
876
|
+
{
|
|
877
|
+
"selected": false,
|
|
878
|
+
}
|
|
879
|
+
}
|
|
719
880
|
style={
|
|
720
881
|
[
|
|
721
882
|
{
|
|
@@ -730,6 +891,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
730
891
|
undefined,
|
|
731
892
|
]
|
|
732
893
|
}
|
|
894
|
+
testID="pin-cell"
|
|
733
895
|
themeFocused={false}
|
|
734
896
|
themeState="default"
|
|
735
897
|
>
|
|
@@ -761,6 +923,11 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
761
923
|
}
|
|
762
924
|
/>
|
|
763
925
|
<View
|
|
926
|
+
accessibilityState={
|
|
927
|
+
{
|
|
928
|
+
"selected": false,
|
|
929
|
+
}
|
|
930
|
+
}
|
|
764
931
|
style={
|
|
765
932
|
[
|
|
766
933
|
{
|
|
@@ -775,6 +942,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
775
942
|
undefined,
|
|
776
943
|
]
|
|
777
944
|
}
|
|
945
|
+
testID="pin-cell"
|
|
778
946
|
themeFocused={false}
|
|
779
947
|
themeState="default"
|
|
780
948
|
>
|
|
@@ -806,6 +974,11 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
806
974
|
}
|
|
807
975
|
/>
|
|
808
976
|
<View
|
|
977
|
+
accessibilityState={
|
|
978
|
+
{
|
|
979
|
+
"selected": false,
|
|
980
|
+
}
|
|
981
|
+
}
|
|
809
982
|
style={
|
|
810
983
|
[
|
|
811
984
|
{
|
|
@@ -820,6 +993,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
820
993
|
undefined,
|
|
821
994
|
]
|
|
822
995
|
}
|
|
996
|
+
testID="pin-cell"
|
|
823
997
|
themeFocused={false}
|
|
824
998
|
themeState="default"
|
|
825
999
|
>
|
|
@@ -848,7 +1022,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
848
1022
|
onBlur={[Function]}
|
|
849
1023
|
onChangeText={[Function]}
|
|
850
1024
|
onFocus={[Function]}
|
|
851
|
-
pointerEvents="
|
|
1025
|
+
pointerEvents="none"
|
|
852
1026
|
secureTextEntry={false}
|
|
853
1027
|
selectTextOnFocus={false}
|
|
854
1028
|
selection={
|
|
@@ -920,6 +1094,35 @@ exports[`rendering renders correctly when there is error 1`] = `
|
|
|
920
1094
|
}
|
|
921
1095
|
>
|
|
922
1096
|
<View
|
|
1097
|
+
accessibilityState={
|
|
1098
|
+
{
|
|
1099
|
+
"busy": undefined,
|
|
1100
|
+
"checked": undefined,
|
|
1101
|
+
"disabled": false,
|
|
1102
|
+
"expanded": undefined,
|
|
1103
|
+
"selected": undefined,
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
accessibilityValue={
|
|
1107
|
+
{
|
|
1108
|
+
"max": undefined,
|
|
1109
|
+
"min": undefined,
|
|
1110
|
+
"now": undefined,
|
|
1111
|
+
"text": undefined,
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
accessible={true}
|
|
1115
|
+
collapsable={false}
|
|
1116
|
+
focusable={true}
|
|
1117
|
+
onBlur={[Function]}
|
|
1118
|
+
onClick={[Function]}
|
|
1119
|
+
onFocus={[Function]}
|
|
1120
|
+
onResponderGrant={[Function]}
|
|
1121
|
+
onResponderMove={[Function]}
|
|
1122
|
+
onResponderRelease={[Function]}
|
|
1123
|
+
onResponderTerminate={[Function]}
|
|
1124
|
+
onResponderTerminationRequest={[Function]}
|
|
1125
|
+
onStartShouldSetResponder={[Function]}
|
|
923
1126
|
style={
|
|
924
1127
|
[
|
|
925
1128
|
{
|
|
@@ -928,8 +1131,14 @@ exports[`rendering renders correctly when there is error 1`] = `
|
|
|
928
1131
|
undefined,
|
|
929
1132
|
]
|
|
930
1133
|
}
|
|
1134
|
+
testID="pin-wrapper"
|
|
931
1135
|
>
|
|
932
1136
|
<View
|
|
1137
|
+
accessibilityState={
|
|
1138
|
+
{
|
|
1139
|
+
"selected": false,
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
933
1142
|
style={
|
|
934
1143
|
[
|
|
935
1144
|
{
|
|
@@ -944,6 +1153,7 @@ exports[`rendering renders correctly when there is error 1`] = `
|
|
|
944
1153
|
undefined,
|
|
945
1154
|
]
|
|
946
1155
|
}
|
|
1156
|
+
testID="pin-cell"
|
|
947
1157
|
themeFocused={false}
|
|
948
1158
|
themeState="error"
|
|
949
1159
|
>
|
|
@@ -976,6 +1186,11 @@ exports[`rendering renders correctly when there is error 1`] = `
|
|
|
976
1186
|
}
|
|
977
1187
|
/>
|
|
978
1188
|
<View
|
|
1189
|
+
accessibilityState={
|
|
1190
|
+
{
|
|
1191
|
+
"selected": false,
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
979
1194
|
style={
|
|
980
1195
|
[
|
|
981
1196
|
{
|
|
@@ -990,6 +1205,7 @@ exports[`rendering renders correctly when there is error 1`] = `
|
|
|
990
1205
|
undefined,
|
|
991
1206
|
]
|
|
992
1207
|
}
|
|
1208
|
+
testID="pin-cell"
|
|
993
1209
|
themeFocused={false}
|
|
994
1210
|
themeState="error"
|
|
995
1211
|
>
|
|
@@ -1022,6 +1238,11 @@ exports[`rendering renders correctly when there is error 1`] = `
|
|
|
1022
1238
|
}
|
|
1023
1239
|
/>
|
|
1024
1240
|
<View
|
|
1241
|
+
accessibilityState={
|
|
1242
|
+
{
|
|
1243
|
+
"selected": false,
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1025
1246
|
style={
|
|
1026
1247
|
[
|
|
1027
1248
|
{
|
|
@@ -1036,6 +1257,7 @@ exports[`rendering renders correctly when there is error 1`] = `
|
|
|
1036
1257
|
undefined,
|
|
1037
1258
|
]
|
|
1038
1259
|
}
|
|
1260
|
+
testID="pin-cell"
|
|
1039
1261
|
themeFocused={false}
|
|
1040
1262
|
themeState="error"
|
|
1041
1263
|
>
|
|
@@ -1067,6 +1289,11 @@ exports[`rendering renders correctly when there is error 1`] = `
|
|
|
1067
1289
|
}
|
|
1068
1290
|
/>
|
|
1069
1291
|
<View
|
|
1292
|
+
accessibilityState={
|
|
1293
|
+
{
|
|
1294
|
+
"selected": false,
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1070
1297
|
style={
|
|
1071
1298
|
[
|
|
1072
1299
|
{
|
|
@@ -1081,6 +1308,7 @@ exports[`rendering renders correctly when there is error 1`] = `
|
|
|
1081
1308
|
undefined,
|
|
1082
1309
|
]
|
|
1083
1310
|
}
|
|
1311
|
+
testID="pin-cell"
|
|
1084
1312
|
themeFocused={false}
|
|
1085
1313
|
themeState="error"
|
|
1086
1314
|
>
|
|
@@ -1162,7 +1390,7 @@ exports[`rendering renders correctly when there is error 1`] = `
|
|
|
1162
1390
|
onBlur={[Function]}
|
|
1163
1391
|
onChangeText={[Function]}
|
|
1164
1392
|
onFocus={[Function]}
|
|
1165
|
-
pointerEvents="
|
|
1393
|
+
pointerEvents="none"
|
|
1166
1394
|
secureTextEntry={true}
|
|
1167
1395
|
selectTextOnFocus={false}
|
|
1168
1396
|
selection={
|
|
@@ -1234,6 +1462,35 @@ exports[`rendering renders correctly with textContentType and autoComplete 1`] =
|
|
|
1234
1462
|
}
|
|
1235
1463
|
>
|
|
1236
1464
|
<View
|
|
1465
|
+
accessibilityState={
|
|
1466
|
+
{
|
|
1467
|
+
"busy": undefined,
|
|
1468
|
+
"checked": undefined,
|
|
1469
|
+
"disabled": false,
|
|
1470
|
+
"expanded": undefined,
|
|
1471
|
+
"selected": undefined,
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
accessibilityValue={
|
|
1475
|
+
{
|
|
1476
|
+
"max": undefined,
|
|
1477
|
+
"min": undefined,
|
|
1478
|
+
"now": undefined,
|
|
1479
|
+
"text": undefined,
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
accessible={true}
|
|
1483
|
+
collapsable={false}
|
|
1484
|
+
focusable={true}
|
|
1485
|
+
onBlur={[Function]}
|
|
1486
|
+
onClick={[Function]}
|
|
1487
|
+
onFocus={[Function]}
|
|
1488
|
+
onResponderGrant={[Function]}
|
|
1489
|
+
onResponderMove={[Function]}
|
|
1490
|
+
onResponderRelease={[Function]}
|
|
1491
|
+
onResponderTerminate={[Function]}
|
|
1492
|
+
onResponderTerminationRequest={[Function]}
|
|
1493
|
+
onStartShouldSetResponder={[Function]}
|
|
1237
1494
|
style={
|
|
1238
1495
|
[
|
|
1239
1496
|
{
|
|
@@ -1242,8 +1499,14 @@ exports[`rendering renders correctly with textContentType and autoComplete 1`] =
|
|
|
1242
1499
|
undefined,
|
|
1243
1500
|
]
|
|
1244
1501
|
}
|
|
1502
|
+
testID="pin-wrapper"
|
|
1245
1503
|
>
|
|
1246
1504
|
<View
|
|
1505
|
+
accessibilityState={
|
|
1506
|
+
{
|
|
1507
|
+
"selected": false,
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1247
1510
|
style={
|
|
1248
1511
|
[
|
|
1249
1512
|
{
|
|
@@ -1258,6 +1521,7 @@ exports[`rendering renders correctly with textContentType and autoComplete 1`] =
|
|
|
1258
1521
|
undefined,
|
|
1259
1522
|
]
|
|
1260
1523
|
}
|
|
1524
|
+
testID="pin-cell"
|
|
1261
1525
|
themeFocused={false}
|
|
1262
1526
|
themeState="default"
|
|
1263
1527
|
>
|
|
@@ -1290,6 +1554,11 @@ exports[`rendering renders correctly with textContentType and autoComplete 1`] =
|
|
|
1290
1554
|
}
|
|
1291
1555
|
/>
|
|
1292
1556
|
<View
|
|
1557
|
+
accessibilityState={
|
|
1558
|
+
{
|
|
1559
|
+
"selected": false,
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1293
1562
|
style={
|
|
1294
1563
|
[
|
|
1295
1564
|
{
|
|
@@ -1304,6 +1573,7 @@ exports[`rendering renders correctly with textContentType and autoComplete 1`] =
|
|
|
1304
1573
|
undefined,
|
|
1305
1574
|
]
|
|
1306
1575
|
}
|
|
1576
|
+
testID="pin-cell"
|
|
1307
1577
|
themeFocused={false}
|
|
1308
1578
|
themeState="default"
|
|
1309
1579
|
>
|
|
@@ -1336,6 +1606,11 @@ exports[`rendering renders correctly with textContentType and autoComplete 1`] =
|
|
|
1336
1606
|
}
|
|
1337
1607
|
/>
|
|
1338
1608
|
<View
|
|
1609
|
+
accessibilityState={
|
|
1610
|
+
{
|
|
1611
|
+
"selected": false,
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1339
1614
|
style={
|
|
1340
1615
|
[
|
|
1341
1616
|
{
|
|
@@ -1350,6 +1625,7 @@ exports[`rendering renders correctly with textContentType and autoComplete 1`] =
|
|
|
1350
1625
|
undefined,
|
|
1351
1626
|
]
|
|
1352
1627
|
}
|
|
1628
|
+
testID="pin-cell"
|
|
1353
1629
|
themeFocused={false}
|
|
1354
1630
|
themeState="default"
|
|
1355
1631
|
>
|
|
@@ -1381,6 +1657,11 @@ exports[`rendering renders correctly with textContentType and autoComplete 1`] =
|
|
|
1381
1657
|
}
|
|
1382
1658
|
/>
|
|
1383
1659
|
<View
|
|
1660
|
+
accessibilityState={
|
|
1661
|
+
{
|
|
1662
|
+
"selected": false,
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1384
1665
|
style={
|
|
1385
1666
|
[
|
|
1386
1667
|
{
|
|
@@ -1395,6 +1676,7 @@ exports[`rendering renders correctly with textContentType and autoComplete 1`] =
|
|
|
1395
1676
|
undefined,
|
|
1396
1677
|
]
|
|
1397
1678
|
}
|
|
1679
|
+
testID="pin-cell"
|
|
1398
1680
|
themeFocused={false}
|
|
1399
1681
|
themeState="default"
|
|
1400
1682
|
>
|
|
@@ -1424,7 +1706,7 @@ exports[`rendering renders correctly with textContentType and autoComplete 1`] =
|
|
|
1424
1706
|
onBlur={[Function]}
|
|
1425
1707
|
onChangeText={[Function]}
|
|
1426
1708
|
onFocus={[Function]}
|
|
1427
|
-
pointerEvents="
|
|
1709
|
+
pointerEvents="none"
|
|
1428
1710
|
secureTextEntry={true}
|
|
1429
1711
|
selectTextOnFocus={false}
|
|
1430
1712
|
selection={
|
|
@@ -214,3 +214,36 @@ describe('normalizeValue', () => {
|
|
|
214
214
|
}
|
|
215
215
|
);
|
|
216
216
|
});
|
|
217
|
+
|
|
218
|
+
describe('StyledPinWrapper pressability', () => {
|
|
219
|
+
it('sets selected accessibilityState on cell when not disabled and pressed', () => {
|
|
220
|
+
const { getByTestId, getAllByTestId } = renderWithTheme(
|
|
221
|
+
<PinInput value="" onChangeText={jest.fn()} testID="pin-input" />
|
|
222
|
+
);
|
|
223
|
+
const wrapper = getByTestId('pin-wrapper');
|
|
224
|
+
fireEvent.press(wrapper);
|
|
225
|
+
// The cell at index 0 should be focused (selected)
|
|
226
|
+
const cells = getAllByTestId('pin-cell');
|
|
227
|
+
// Find the cell with accessibilityState.selected === true
|
|
228
|
+
const selectedCell = cells.find(
|
|
229
|
+
(cell) =>
|
|
230
|
+
cell.props.accessibilityState && cell.props.accessibilityState.selected
|
|
231
|
+
);
|
|
232
|
+
expect(selectedCell).toBeDefined();
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
it('does not set selected accessibilityState on cell when disabled and pressed', () => {
|
|
236
|
+
const { getByTestId, getAllByTestId } = renderWithTheme(
|
|
237
|
+
<PinInput value="" onChangeText={jest.fn()} disabled testID="pin-input" />
|
|
238
|
+
);
|
|
239
|
+
const wrapper = getByTestId('pin-wrapper');
|
|
240
|
+
fireEvent.press(wrapper);
|
|
241
|
+
const cells = getAllByTestId('pin-cell');
|
|
242
|
+
// No cell should have accessibilityState.selected === true
|
|
243
|
+
const selectedCell = cells.find(
|
|
244
|
+
(cell) =>
|
|
245
|
+
cell.props.accessibilityState && cell.props.accessibilityState.selected
|
|
246
|
+
);
|
|
247
|
+
expect(selectedCell).toBeUndefined();
|
|
248
|
+
});
|
|
249
|
+
});
|
|
@@ -192,7 +192,11 @@ const PinInput = forwardRef<PinInputHandler, PinInputProps>(
|
|
|
192
192
|
|
|
193
193
|
return (
|
|
194
194
|
<StyledWrapper style={style} testID={testID}>
|
|
195
|
-
<StyledPinWrapper
|
|
195
|
+
<StyledPinWrapper
|
|
196
|
+
onPress={focus}
|
|
197
|
+
disabled={disabled}
|
|
198
|
+
testID="pin-wrapper"
|
|
199
|
+
>
|
|
196
200
|
{[...Array(length).keys()].map((index) => (
|
|
197
201
|
<React.Fragment key={index}>
|
|
198
202
|
{index !== 0 && <StyledSpacer />}
|
|
@@ -226,7 +230,7 @@ const PinInput = forwardRef<PinInputHandler, PinInputProps>(
|
|
|
226
230
|
autoFocus={autoFocus}
|
|
227
231
|
onFocus={focus}
|
|
228
232
|
onBlur={blur}
|
|
229
|
-
pointerEvents="
|
|
233
|
+
pointerEvents="none"
|
|
230
234
|
keyboardType="numeric"
|
|
231
235
|
testID="pin-hidden-input"
|
|
232
236
|
textContentType={textContentType}
|