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