@hero-design/rn-work-uikit 1.2.0-alpha.1 → 1.2.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.
@@ -0,0 +1,883 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`TextInputGroup should render: xxx 1`] = `
4
+ <View
5
+ style={
6
+ [
7
+ [
8
+ {},
9
+ ],
10
+ undefined,
11
+ ]
12
+ }
13
+ >
14
+ <Pressable
15
+ accessibilityState={
16
+ {
17
+ "disabled": false,
18
+ }
19
+ }
20
+ disabled={false}
21
+ onPress={[Function]}
22
+ style={
23
+ [
24
+ [
25
+ {
26
+ "flexDirection": "row",
27
+ "marginTop": 7.846153846153847,
28
+ "minHeight": 54.92307692307692,
29
+ "paddingHorizontal": 15.692307692307693,
30
+ "width": "100%",
31
+ "zIndex": 0,
32
+ },
33
+ ],
34
+ {
35
+ "marginTop": 0,
36
+ },
37
+ ]
38
+ }
39
+ themeFocused={false}
40
+ themeHasError={false}
41
+ themeUseGroupStyleEnabled={true}
42
+ >
43
+ <View
44
+ pointerEvents="none"
45
+ style={
46
+ [
47
+ [
48
+ {
49
+ "borderColor": "#e8e9ea",
50
+ "borderRadius": 8,
51
+ "borderWidth": 2,
52
+ },
53
+ ],
54
+ [
55
+ {
56
+ "backgroundColor": "#ffffff",
57
+ },
58
+ {
59
+ "borderBottomLeftRadius": 0,
60
+ "borderBottomRightRadius": 0,
61
+ },
62
+ ],
63
+ ]
64
+ }
65
+ testID="text-input-border"
66
+ themeFocused={false}
67
+ themeState="filled"
68
+ />
69
+ <View
70
+ style={
71
+ [
72
+ [
73
+ {
74
+ "backgroundColor": "transparent",
75
+ "borderRadius": 8,
76
+ "flex": 1,
77
+ "flexDirection": "column",
78
+ "marginBottom": 7.846153846153847,
79
+ "marginTop": 7.846153846153847,
80
+ "overflow": "hidden",
81
+ },
82
+ ],
83
+ undefined,
84
+ ]
85
+ }
86
+ >
87
+ <AnimatedView
88
+ style={
89
+ [
90
+ [
91
+ {
92
+ "alignItems": "center",
93
+ "backgroundColor": "transparent",
94
+ "flex": 1,
95
+ "flexDirection": "row",
96
+ },
97
+ ],
98
+ [
99
+ {
100
+ "transformOrigin": "left center",
101
+ },
102
+ {
103
+ "transform": [
104
+ {
105
+ "translateY": {
106
+ "addListener": [MockFunction],
107
+ "removeListener": [MockFunction],
108
+ "setValue": [MockFunction],
109
+ },
110
+ },
111
+ {
112
+ "scale": {
113
+ "addListener": [MockFunction],
114
+ "removeListener": [MockFunction],
115
+ "setValue": [MockFunction],
116
+ },
117
+ },
118
+ ],
119
+ },
120
+ ],
121
+ ]
122
+ }
123
+ themeVariant="text"
124
+ >
125
+ <AnimatedView
126
+ style={
127
+ {
128
+ "flexDirection": "row",
129
+ }
130
+ }
131
+ >
132
+ <Text
133
+ allowFontScaling={false}
134
+ numberOfLines={1}
135
+ style={
136
+ [
137
+ [
138
+ {
139
+ "color": "#001f23",
140
+ "fontFamily": "BeVietnamPro-Regular",
141
+ "fontSize": 11.76923076923077,
142
+ "letterSpacing": 0.36,
143
+ "lineHeight": 15.76923076923077,
144
+ },
145
+ ],
146
+ [
147
+ [
148
+ {
149
+ "color": "#808f91",
150
+ },
151
+ ],
152
+ {
153
+ "backgroundColor": "transparent",
154
+ },
155
+ ],
156
+ ]
157
+ }
158
+ testID="input-label"
159
+ themeFontWeight="regular"
160
+ themeIntent="body"
161
+ themeState="filled"
162
+ >
163
+ Text Input 1
164
+ </Text>
165
+ </AnimatedView>
166
+ </AnimatedView>
167
+ <Pressable
168
+ style={
169
+ [
170
+ [
171
+ {
172
+ "alignItems": "center",
173
+ "flexDirection": "row",
174
+ "flexGrow": 2,
175
+ "flexShrink": 1,
176
+ "gap": 3.9230769230769234,
177
+ "opacity": 1,
178
+ },
179
+ ],
180
+ undefined,
181
+ ]
182
+ }
183
+ themeOpacity={1}
184
+ >
185
+ <View />
186
+ <View
187
+ accessibilityLabel="Text input field"
188
+ style={
189
+ {
190
+ "flex": 1,
191
+ }
192
+ }
193
+ testID="input-row-input-wrapper"
194
+ >
195
+ <TextInput
196
+ accessibilityState={
197
+ {
198
+ "disabled": false,
199
+ }
200
+ }
201
+ allowFontScaling={false}
202
+ editable={true}
203
+ onBlur={[Function]}
204
+ onChangeText={[Function]}
205
+ onFocus={[Function]}
206
+ placeholder=" "
207
+ placeholderTextColor="#4d6265"
208
+ style={
209
+ [
210
+ [
211
+ {
212
+ "flexGrow": 2,
213
+ "fontFamily": "BeVietnamPro-Regular",
214
+ "fontSize": 15.692307692307693,
215
+ "height": undefined,
216
+ "maxHeight": 141.23076923076923,
217
+ "minHeight": 23.53846153846154,
218
+ "paddingVertical": 0,
219
+ "textAlignVertical": "center",
220
+ },
221
+ ],
222
+ [
223
+ {
224
+ "backgroundColor": "#ffffff",
225
+ "color": "#001f23",
226
+ },
227
+ {},
228
+ ],
229
+ ]
230
+ }
231
+ testID="text-input"
232
+ themeVariant="text"
233
+ value="Text Input 1"
234
+ />
235
+ </View>
236
+ </Pressable>
237
+ <View
238
+ style={
239
+ [
240
+ [
241
+ {
242
+ "alignItems": "flex-start",
243
+ "flexDirection": "row",
244
+ "justifyContent": "space-between",
245
+ },
246
+ ],
247
+ undefined,
248
+ ]
249
+ }
250
+ />
251
+ </View>
252
+ <View
253
+ style={
254
+ [
255
+ [
256
+ {
257
+ "alignItems": "center",
258
+ "flexDirection": "row",
259
+ "justifyContent": "flex-end",
260
+ },
261
+ ],
262
+ undefined,
263
+ ]
264
+ }
265
+ />
266
+ </Pressable>
267
+ <Pressable
268
+ accessibilityState={
269
+ {
270
+ "disabled": false,
271
+ }
272
+ }
273
+ disabled={false}
274
+ onPress={[Function]}
275
+ style={
276
+ [
277
+ [
278
+ {
279
+ "flexDirection": "row",
280
+ "marginTop": 7.846153846153847,
281
+ "minHeight": 54.92307692307692,
282
+ "paddingHorizontal": 15.692307692307693,
283
+ "width": "100%",
284
+ "zIndex": 1,
285
+ },
286
+ ],
287
+ {
288
+ "marginTop": -2,
289
+ },
290
+ ]
291
+ }
292
+ testID="text-input-2"
293
+ themeFocused={false}
294
+ themeHasError={true}
295
+ themeUseGroupStyleEnabled={true}
296
+ >
297
+ <View
298
+ pointerEvents="none"
299
+ style={
300
+ [
301
+ [
302
+ {
303
+ "borderColor": "#cb300a",
304
+ "borderRadius": 8,
305
+ "borderWidth": 2,
306
+ },
307
+ ],
308
+ [
309
+ {
310
+ "backgroundColor": "#ffffff",
311
+ },
312
+ {
313
+ "borderRadius": 0,
314
+ },
315
+ ],
316
+ ]
317
+ }
318
+ testID="text-input-border"
319
+ themeFocused={false}
320
+ themeState="error"
321
+ />
322
+ <View
323
+ style={
324
+ [
325
+ [
326
+ {
327
+ "backgroundColor": "transparent",
328
+ "borderRadius": 8,
329
+ "flex": 1,
330
+ "flexDirection": "column",
331
+ "marginBottom": 7.846153846153847,
332
+ "marginTop": 7.846153846153847,
333
+ "overflow": "hidden",
334
+ },
335
+ ],
336
+ undefined,
337
+ ]
338
+ }
339
+ >
340
+ <AnimatedView
341
+ style={
342
+ [
343
+ [
344
+ {
345
+ "alignItems": "center",
346
+ "backgroundColor": "transparent",
347
+ "flex": 1,
348
+ "flexDirection": "row",
349
+ },
350
+ ],
351
+ [
352
+ {
353
+ "transformOrigin": "left center",
354
+ },
355
+ {
356
+ "transform": [
357
+ {
358
+ "translateY": {
359
+ "addListener": [MockFunction],
360
+ "removeListener": [MockFunction],
361
+ "setValue": [MockFunction],
362
+ },
363
+ },
364
+ {
365
+ "scale": {
366
+ "addListener": [MockFunction],
367
+ "removeListener": [MockFunction],
368
+ "setValue": [MockFunction],
369
+ },
370
+ },
371
+ ],
372
+ },
373
+ ],
374
+ ]
375
+ }
376
+ themeVariant="text"
377
+ >
378
+ <AnimatedView
379
+ style={
380
+ {
381
+ "flexDirection": "row",
382
+ }
383
+ }
384
+ >
385
+ <Text
386
+ allowFontScaling={false}
387
+ numberOfLines={1}
388
+ style={
389
+ [
390
+ [
391
+ {
392
+ "color": "#001f23",
393
+ "fontFamily": "BeVietnamPro-Regular",
394
+ "fontSize": 11.76923076923077,
395
+ "letterSpacing": 0.36,
396
+ "lineHeight": 15.76923076923077,
397
+ },
398
+ ],
399
+ [
400
+ [
401
+ {
402
+ "color": "#cb300a",
403
+ },
404
+ ],
405
+ {
406
+ "backgroundColor": "transparent",
407
+ },
408
+ ],
409
+ ]
410
+ }
411
+ testID="input-label"
412
+ themeFontWeight="regular"
413
+ themeIntent="body"
414
+ themeState="error"
415
+ >
416
+ Text Input 2
417
+ </Text>
418
+ <Text
419
+ allowFontScaling={false}
420
+ style={
421
+ [
422
+ [
423
+ {
424
+ "color": "#001f23",
425
+ "fontFamily": "BeVietnamPro-Regular",
426
+ "fontSize": 11.76923076923077,
427
+ "letterSpacing": 0.36,
428
+ "lineHeight": 15.76923076923077,
429
+ },
430
+ ],
431
+ [
432
+ [
433
+ {
434
+ "color": "#cb300a",
435
+ },
436
+ ],
437
+ undefined,
438
+ ],
439
+ ]
440
+ }
441
+ themeFontWeight="regular"
442
+ themeIntent="body"
443
+ themeState="error"
444
+ >
445
+ (Optional)
446
+ </Text>
447
+ </AnimatedView>
448
+ </AnimatedView>
449
+ <Pressable
450
+ style={
451
+ [
452
+ [
453
+ {
454
+ "alignItems": "center",
455
+ "flexDirection": "row",
456
+ "flexGrow": 2,
457
+ "flexShrink": 1,
458
+ "gap": 3.9230769230769234,
459
+ "opacity": 1,
460
+ },
461
+ ],
462
+ undefined,
463
+ ]
464
+ }
465
+ themeOpacity={1}
466
+ >
467
+ <View />
468
+ <View
469
+ accessibilityLabel="Text input field"
470
+ style={
471
+ {
472
+ "flex": 1,
473
+ }
474
+ }
475
+ testID="input-row-input-wrapper"
476
+ >
477
+ <TextInput
478
+ accessibilityState={
479
+ {
480
+ "disabled": false,
481
+ }
482
+ }
483
+ allowFontScaling={false}
484
+ editable={true}
485
+ onBlur={[Function]}
486
+ onChangeText={[Function]}
487
+ onFocus={[Function]}
488
+ placeholder=" "
489
+ placeholderTextColor="#4d6265"
490
+ style={
491
+ [
492
+ [
493
+ {
494
+ "flexGrow": 2,
495
+ "fontFamily": "BeVietnamPro-Regular",
496
+ "fontSize": 15.692307692307693,
497
+ "height": undefined,
498
+ "maxHeight": 141.23076923076923,
499
+ "minHeight": 23.53846153846154,
500
+ "paddingVertical": 0,
501
+ "textAlignVertical": "center",
502
+ },
503
+ ],
504
+ [
505
+ {
506
+ "backgroundColor": "#ffffff",
507
+ "color": "#001f23",
508
+ },
509
+ {},
510
+ ],
511
+ ]
512
+ }
513
+ testID="text-input"
514
+ themeVariant="text"
515
+ value="Text Input 2"
516
+ />
517
+ </View>
518
+ </Pressable>
519
+ <View
520
+ style={
521
+ [
522
+ [
523
+ {
524
+ "alignItems": "flex-start",
525
+ "flexDirection": "row",
526
+ "justifyContent": "space-between",
527
+ },
528
+ ],
529
+ undefined,
530
+ ]
531
+ }
532
+ >
533
+ <View
534
+ style={
535
+ [
536
+ [
537
+ {
538
+ "alignItems": "center",
539
+ "flex": 1,
540
+ "flexDirection": "row",
541
+ "flexGrow": 4,
542
+ "marginRight": 3.9230769230769234,
543
+ },
544
+ ],
545
+ undefined,
546
+ ]
547
+ }
548
+ >
549
+ <Text
550
+ allowFontScaling={false}
551
+ selectable={false}
552
+ style={
553
+ [
554
+ {
555
+ "color": undefined,
556
+ "fontSize": 12,
557
+ },
558
+ [
559
+ [
560
+ {
561
+ "color": "#cb300a",
562
+ "fontSize": 15.692307692307693,
563
+ },
564
+ ],
565
+ undefined,
566
+ ],
567
+ {
568
+ "fontFamily": "hero-icons-mobile",
569
+ "fontStyle": "normal",
570
+ "fontWeight": "normal",
571
+ },
572
+ {},
573
+ ]
574
+ }
575
+ testID="input-error-icon"
576
+ themeIntent="danger"
577
+ themeSize="xsmall"
578
+ >
579
+
580
+ </Text>
581
+ <Text
582
+ allowFontScaling={false}
583
+ style={
584
+ [
585
+ [
586
+ {
587
+ "color": "#001f23",
588
+ "fontFamily": "BeVietnamPro-Regular",
589
+ "fontSize": 11.76923076923077,
590
+ "letterSpacing": 0.36,
591
+ "lineHeight": 15.76923076923077,
592
+ },
593
+ ],
594
+ [
595
+ [
596
+ {
597
+ "color": "#cb300a",
598
+ "marginLeft": 3.9230769230769234,
599
+ },
600
+ ],
601
+ undefined,
602
+ ],
603
+ ]
604
+ }
605
+ testID="input-error-message"
606
+ themeFontWeight="regular"
607
+ themeIntent="body"
608
+ >
609
+ This is an error
610
+ </Text>
611
+ </View>
612
+ </View>
613
+ </View>
614
+ <View
615
+ style={
616
+ [
617
+ [
618
+ {
619
+ "alignItems": "center",
620
+ "flexDirection": "row",
621
+ "justifyContent": "flex-end",
622
+ },
623
+ ],
624
+ undefined,
625
+ ]
626
+ }
627
+ />
628
+ </Pressable>
629
+ <Pressable
630
+ accessibilityState={
631
+ {
632
+ "disabled": false,
633
+ }
634
+ }
635
+ disabled={false}
636
+ onPress={[Function]}
637
+ style={
638
+ [
639
+ [
640
+ {
641
+ "flexDirection": "row",
642
+ "marginTop": 7.846153846153847,
643
+ "minHeight": 54.92307692307692,
644
+ "paddingHorizontal": 15.692307692307693,
645
+ "width": "100%",
646
+ "zIndex": 0,
647
+ },
648
+ ],
649
+ {
650
+ "marginTop": -2,
651
+ },
652
+ ]
653
+ }
654
+ themeFocused={false}
655
+ themeHasError={false}
656
+ themeUseGroupStyleEnabled={true}
657
+ >
658
+ <View
659
+ pointerEvents="none"
660
+ style={
661
+ [
662
+ [
663
+ {
664
+ "borderColor": "#e8e9ea",
665
+ "borderRadius": 8,
666
+ "borderWidth": 2,
667
+ },
668
+ ],
669
+ [
670
+ {
671
+ "backgroundColor": "#ffffff",
672
+ },
673
+ {
674
+ "borderTopLeftRadius": 0,
675
+ "borderTopRightRadius": 0,
676
+ },
677
+ ],
678
+ ]
679
+ }
680
+ testID="text-input-border"
681
+ themeFocused={false}
682
+ themeState="filled"
683
+ />
684
+ <View
685
+ style={
686
+ [
687
+ [
688
+ {
689
+ "backgroundColor": "transparent",
690
+ "borderRadius": 8,
691
+ "flex": 1,
692
+ "flexDirection": "column",
693
+ "marginBottom": 7.846153846153847,
694
+ "marginTop": 7.846153846153847,
695
+ "overflow": "hidden",
696
+ },
697
+ ],
698
+ undefined,
699
+ ]
700
+ }
701
+ >
702
+ <AnimatedView
703
+ style={
704
+ [
705
+ [
706
+ {
707
+ "alignItems": "center",
708
+ "backgroundColor": "transparent",
709
+ "flex": 1,
710
+ "flexDirection": "row",
711
+ },
712
+ ],
713
+ [
714
+ {
715
+ "transformOrigin": "left center",
716
+ },
717
+ {
718
+ "transform": [
719
+ {
720
+ "translateY": {
721
+ "addListener": [MockFunction],
722
+ "removeListener": [MockFunction],
723
+ "setValue": [MockFunction],
724
+ },
725
+ },
726
+ {
727
+ "scale": {
728
+ "addListener": [MockFunction],
729
+ "removeListener": [MockFunction],
730
+ "setValue": [MockFunction],
731
+ },
732
+ },
733
+ ],
734
+ },
735
+ ],
736
+ ]
737
+ }
738
+ themeVariant="text"
739
+ >
740
+ <AnimatedView
741
+ style={
742
+ {
743
+ "flexDirection": "row",
744
+ }
745
+ }
746
+ >
747
+ <Text
748
+ allowFontScaling={false}
749
+ numberOfLines={1}
750
+ style={
751
+ [
752
+ [
753
+ {
754
+ "color": "#001f23",
755
+ "fontFamily": "BeVietnamPro-Regular",
756
+ "fontSize": 11.76923076923077,
757
+ "letterSpacing": 0.36,
758
+ "lineHeight": 15.76923076923077,
759
+ },
760
+ ],
761
+ [
762
+ [
763
+ {
764
+ "color": "#808f91",
765
+ },
766
+ ],
767
+ {
768
+ "backgroundColor": "transparent",
769
+ },
770
+ ],
771
+ ]
772
+ }
773
+ testID="input-label"
774
+ themeFontWeight="regular"
775
+ themeIntent="body"
776
+ themeState="filled"
777
+ >
778
+ Text Input 3
779
+ </Text>
780
+ </AnimatedView>
781
+ </AnimatedView>
782
+ <Pressable
783
+ style={
784
+ [
785
+ [
786
+ {
787
+ "alignItems": "center",
788
+ "flexDirection": "row",
789
+ "flexGrow": 2,
790
+ "flexShrink": 1,
791
+ "gap": 3.9230769230769234,
792
+ "opacity": 1,
793
+ },
794
+ ],
795
+ undefined,
796
+ ]
797
+ }
798
+ themeOpacity={1}
799
+ >
800
+ <View />
801
+ <View
802
+ accessibilityLabel="Text input field"
803
+ style={
804
+ {
805
+ "flex": 1,
806
+ }
807
+ }
808
+ testID="input-row-input-wrapper"
809
+ >
810
+ <TextInput
811
+ accessibilityState={
812
+ {
813
+ "disabled": false,
814
+ }
815
+ }
816
+ allowFontScaling={false}
817
+ editable={true}
818
+ onBlur={[Function]}
819
+ onChangeText={[Function]}
820
+ onFocus={[Function]}
821
+ placeholder=" "
822
+ placeholderTextColor="#4d6265"
823
+ style={
824
+ [
825
+ [
826
+ {
827
+ "flexGrow": 2,
828
+ "fontFamily": "BeVietnamPro-Regular",
829
+ "fontSize": 15.692307692307693,
830
+ "height": undefined,
831
+ "maxHeight": 141.23076923076923,
832
+ "minHeight": 23.53846153846154,
833
+ "paddingVertical": 0,
834
+ "textAlignVertical": "center",
835
+ },
836
+ ],
837
+ [
838
+ {
839
+ "backgroundColor": "#ffffff",
840
+ "color": "#001f23",
841
+ },
842
+ {},
843
+ ],
844
+ ]
845
+ }
846
+ testID="text-input"
847
+ themeVariant="text"
848
+ value="Text Input 3"
849
+ />
850
+ </View>
851
+ </Pressable>
852
+ <View
853
+ style={
854
+ [
855
+ [
856
+ {
857
+ "alignItems": "flex-start",
858
+ "flexDirection": "row",
859
+ "justifyContent": "space-between",
860
+ },
861
+ ],
862
+ undefined,
863
+ ]
864
+ }
865
+ />
866
+ </View>
867
+ <View
868
+ style={
869
+ [
870
+ [
871
+ {
872
+ "alignItems": "center",
873
+ "flexDirection": "row",
874
+ "justifyContent": "flex-end",
875
+ },
876
+ ],
877
+ undefined,
878
+ ]
879
+ }
880
+ />
881
+ </Pressable>
882
+ </View>
883
+ `;