@hero-design/rn 8.89.0-alpha.0 → 8.89.0-alpha.2

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 (49) hide show
  1. package/es/index.js +1452 -1077
  2. package/lib/index.js +1453 -1078
  3. package/package.json +2 -3
  4. package/src/components/Calendar/CalendarRange.tsx +337 -0
  5. package/src/components/Calendar/CalendarRangeConnector.tsx +68 -0
  6. package/src/components/Calendar/CalendarRowItem.tsx +14 -3
  7. package/src/components/Calendar/StyledCalendar.tsx +23 -9
  8. package/src/components/Calendar/__tests__/CalendarRange.spec.tsx +284 -0
  9. package/src/components/Calendar/__tests__/CalendarRangeConnector.spec.tsx +73 -0
  10. package/src/components/Calendar/__tests__/__snapshots__/CalendarRangeConnector.spec.tsx.snap +632 -0
  11. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +45 -20
  12. package/src/components/Calendar/__tests__/helper.spec.ts +110 -1
  13. package/src/components/Calendar/helpers.ts +75 -0
  14. package/src/components/Calendar/index.tsx +19 -15
  15. package/src/components/RichTextEditor/RichTextEditor.tsx +14 -20
  16. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +2 -4
  17. package/src/index.ts +2 -2
  18. package/src/theme/ThemeSwitcher.tsx +5 -1
  19. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +9 -4
  20. package/src/theme/components/calendar.ts +6 -1
  21. package/src/theme/global/colors/ehWorkDark.ts +7 -8
  22. package/src/theme/global/index.ts +2 -2
  23. package/src/theme/index.ts +2 -2
  24. package/src/types.ts +2 -0
  25. package/stats/8.88.0/rn-stats.html +0 -2
  26. package/types/components/Calendar/CalendarRowItem.d.ts +3 -1
  27. package/types/components/Calendar/StyledCalendar.d.ts +2 -1
  28. package/types/components/Calendar/helpers.d.ts +15 -0
  29. package/types/components/Calendar/index.d.ts +4 -2
  30. package/types/index.d.ts +2 -2
  31. package/types/theme/ThemeSwitcher.d.ts +1 -1
  32. package/types/theme/components/calendar.d.ts +5 -0
  33. package/types/theme/global/colors/ehWorkDark.d.ts +5 -4
  34. package/types/theme/global/index.d.ts +2 -2
  35. package/types/theme/index.d.ts +2 -2
  36. package/types/types.d.ts +2 -1
  37. package/types/components/Calendar/CalendarRangeSelectedItem.d.ts +0 -11
  38. package/types/components/Calendar/Sample.d.ts +0 -13
  39. package/types/components/Calendar/hooks/useCalendarLayout.d.ts +0 -7
  40. package/types/components/Calendar/useSetUpCalendar.d.ts +0 -0
  41. package/types/components/CompoundSearch/CompoundSearchHandler.d.ts +0 -31
  42. package/types/components/CompoundSearch/CompoundSearchTextInput.d.ts +0 -60
  43. package/types/components/CompoundSearch/StyledCompoundSearch.d.ts +0 -40
  44. package/types/components/CompoundSearch/index.d.ts +0 -8
  45. package/types/components/CompoundSearch/utils.d.ts +0 -8
  46. package/types/components/FloatingIsland/SingleLine/StyledSingleLine.d.ts +0 -15
  47. package/types/components/FloatingIsland/SingleLine/index.d.ts +0 -24
  48. package/types/test-utils.d.ts +0 -4
  49. package/types/theme/components/compoundSearch.d.ts +0 -36
@@ -0,0 +1,632 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`CalendarRangeConnector renders correctly with basic props 1`] = `
4
+ <View
5
+ style={
6
+ {
7
+ "flex": 1,
8
+ }
9
+ }
10
+ >
11
+ <View
12
+ style={
13
+ [
14
+ {
15
+ "alignItems": "center",
16
+ "backgroundColor": undefined,
17
+ "flexBasis": "14%",
18
+ "height": 120,
19
+ "justifyContent": "center",
20
+ "lineHeight": 0,
21
+ "maxHeight": 56,
22
+ "width": 120,
23
+ },
24
+ undefined,
25
+ ]
26
+ }
27
+ testID="calendar-date-cell"
28
+ themeItemWidth={120}
29
+ >
30
+ <View
31
+ accessibilityState={
32
+ {
33
+ "busy": undefined,
34
+ "checked": undefined,
35
+ "disabled": undefined,
36
+ "expanded": undefined,
37
+ "selected": undefined,
38
+ }
39
+ }
40
+ accessibilityValue={
41
+ {
42
+ "max": undefined,
43
+ "min": undefined,
44
+ "now": undefined,
45
+ "text": undefined,
46
+ }
47
+ }
48
+ accessible={true}
49
+ collapsable={false}
50
+ focusable={true}
51
+ onClick={[Function]}
52
+ onResponderGrant={[Function]}
53
+ onResponderMove={[Function]}
54
+ onResponderRelease={[Function]}
55
+ onResponderTerminate={[Function]}
56
+ onResponderTerminationRequest={[Function]}
57
+ onStartShouldSetResponder={[Function]}
58
+ style={
59
+ {
60
+ "alignItems": "center",
61
+ "backgroundColor": "#401960",
62
+ "borderColor": "#001f23",
63
+ "borderRadius": 999,
64
+ "borderWidth": 0,
65
+ "height": "100%",
66
+ "justifyContent": "center",
67
+ "maxHeight": 56,
68
+ "maxWidth": 56,
69
+ "opacity": 1,
70
+ "width": "100%",
71
+ }
72
+ }
73
+ testID="selected-date-cell"
74
+ >
75
+ <Text
76
+ allowFontScaling={false}
77
+ style={
78
+ [
79
+ {
80
+ "color": "#ffffff",
81
+ "fontFamily": "BeVietnamPro-Regular",
82
+ "fontSize": 14,
83
+ "letterSpacing": 0.48,
84
+ "lineHeight": 22,
85
+ },
86
+ undefined,
87
+ ]
88
+ }
89
+ themeIntent="inverted"
90
+ themeTypeface="neutral"
91
+ themeVariant="small"
92
+ >
93
+ 10
94
+ </Text>
95
+ </View>
96
+ </View>
97
+ <View
98
+ pointerEvents="box-none"
99
+ position="bottom"
100
+ style={
101
+ [
102
+ {
103
+ "bottom": 0,
104
+ "elevation": 9999,
105
+ "flexDirection": "column-reverse",
106
+ "left": 0,
107
+ "paddingHorizontal": 24,
108
+ "paddingVertical": 16,
109
+ "position": "absolute",
110
+ "right": 0,
111
+ "top": 0,
112
+ },
113
+ undefined,
114
+ ]
115
+ }
116
+ />
117
+ </View>
118
+ `;
119
+
120
+ exports[`CalendarRangeConnector renders correctly with connector variations 1`] = `
121
+ <View
122
+ style={
123
+ {
124
+ "flex": 1,
125
+ }
126
+ }
127
+ >
128
+ <View
129
+ style={
130
+ [
131
+ {
132
+ "alignItems": "center",
133
+ "backgroundColor": undefined,
134
+ "flexBasis": "14%",
135
+ "height": 120,
136
+ "justifyContent": "center",
137
+ "lineHeight": 0,
138
+ "maxHeight": 56,
139
+ "width": 120,
140
+ },
141
+ undefined,
142
+ ]
143
+ }
144
+ testID="calendar-date-cell"
145
+ themeItemWidth={120}
146
+ >
147
+ <View
148
+ bgColor="highlightedSurface"
149
+ style={
150
+ [
151
+ {
152
+ "backgroundColor": "#ece8ef",
153
+ },
154
+ {
155
+ "bottom": 0,
156
+ "height": "100%",
157
+ "left": 0,
158
+ "position": "absolute",
159
+ "right": 0,
160
+ "top": 0,
161
+ "transform": [
162
+ {
163
+ "translateX": 60,
164
+ },
165
+ ],
166
+ "width": "50%",
167
+ },
168
+ ]
169
+ }
170
+ testID="range-connector"
171
+ />
172
+ <View
173
+ accessibilityState={
174
+ {
175
+ "busy": undefined,
176
+ "checked": undefined,
177
+ "disabled": undefined,
178
+ "expanded": undefined,
179
+ "selected": undefined,
180
+ }
181
+ }
182
+ accessibilityValue={
183
+ {
184
+ "max": undefined,
185
+ "min": undefined,
186
+ "now": undefined,
187
+ "text": undefined,
188
+ }
189
+ }
190
+ accessible={true}
191
+ collapsable={false}
192
+ focusable={true}
193
+ onClick={[Function]}
194
+ onResponderGrant={[Function]}
195
+ onResponderMove={[Function]}
196
+ onResponderRelease={[Function]}
197
+ onResponderTerminate={[Function]}
198
+ onResponderTerminationRequest={[Function]}
199
+ onStartShouldSetResponder={[Function]}
200
+ style={
201
+ {
202
+ "alignItems": "center",
203
+ "backgroundColor": "#401960",
204
+ "borderColor": "#001f23",
205
+ "borderRadius": 999,
206
+ "borderWidth": 0,
207
+ "height": "100%",
208
+ "justifyContent": "center",
209
+ "maxHeight": 56,
210
+ "maxWidth": 56,
211
+ "opacity": 1,
212
+ "width": "100%",
213
+ }
214
+ }
215
+ testID="selected-date-cell"
216
+ >
217
+ <Text
218
+ allowFontScaling={false}
219
+ style={
220
+ [
221
+ {
222
+ "color": "#ffffff",
223
+ "fontFamily": "BeVietnamPro-Regular",
224
+ "fontSize": 14,
225
+ "letterSpacing": 0.48,
226
+ "lineHeight": 22,
227
+ },
228
+ undefined,
229
+ ]
230
+ }
231
+ themeIntent="inverted"
232
+ themeTypeface="neutral"
233
+ themeVariant="small"
234
+ >
235
+ 10
236
+ </Text>
237
+ </View>
238
+ </View>
239
+ <View
240
+ pointerEvents="box-none"
241
+ position="bottom"
242
+ style={
243
+ [
244
+ {
245
+ "bottom": 0,
246
+ "elevation": 9999,
247
+ "flexDirection": "column-reverse",
248
+ "left": 0,
249
+ "paddingHorizontal": 24,
250
+ "paddingVertical": 16,
251
+ "position": "absolute",
252
+ "right": 0,
253
+ "top": 0,
254
+ },
255
+ undefined,
256
+ ]
257
+ }
258
+ />
259
+ </View>
260
+ `;
261
+
262
+ exports[`CalendarRangeConnector renders correctly with connector variations 2`] = `
263
+ <View
264
+ style={
265
+ {
266
+ "flex": 1,
267
+ }
268
+ }
269
+ >
270
+ <View
271
+ style={
272
+ [
273
+ {
274
+ "alignItems": "center",
275
+ "backgroundColor": undefined,
276
+ "flexBasis": "14%",
277
+ "height": 120,
278
+ "justifyContent": "center",
279
+ "lineHeight": 0,
280
+ "maxHeight": 56,
281
+ "width": 120,
282
+ },
283
+ undefined,
284
+ ]
285
+ }
286
+ testID="calendar-date-cell"
287
+ themeItemWidth={120}
288
+ >
289
+ <View
290
+ bgColor="highlightedSurface"
291
+ style={
292
+ [
293
+ {
294
+ "backgroundColor": "#ece8ef",
295
+ },
296
+ {
297
+ "bottom": 0,
298
+ "height": "100%",
299
+ "left": 0,
300
+ "position": "absolute",
301
+ "right": 0,
302
+ "top": 0,
303
+ "transform": undefined,
304
+ "width": "50%",
305
+ },
306
+ ]
307
+ }
308
+ testID="range-connector"
309
+ />
310
+ <View
311
+ accessibilityState={
312
+ {
313
+ "busy": undefined,
314
+ "checked": undefined,
315
+ "disabled": undefined,
316
+ "expanded": undefined,
317
+ "selected": undefined,
318
+ }
319
+ }
320
+ accessibilityValue={
321
+ {
322
+ "max": undefined,
323
+ "min": undefined,
324
+ "now": undefined,
325
+ "text": undefined,
326
+ }
327
+ }
328
+ accessible={true}
329
+ collapsable={false}
330
+ focusable={true}
331
+ onClick={[Function]}
332
+ onResponderGrant={[Function]}
333
+ onResponderMove={[Function]}
334
+ onResponderRelease={[Function]}
335
+ onResponderTerminate={[Function]}
336
+ onResponderTerminationRequest={[Function]}
337
+ onStartShouldSetResponder={[Function]}
338
+ style={
339
+ {
340
+ "alignItems": "center",
341
+ "backgroundColor": "#401960",
342
+ "borderColor": "#001f23",
343
+ "borderRadius": 999,
344
+ "borderWidth": 0,
345
+ "height": "100%",
346
+ "justifyContent": "center",
347
+ "maxHeight": 56,
348
+ "maxWidth": 56,
349
+ "opacity": 1,
350
+ "width": "100%",
351
+ }
352
+ }
353
+ testID="selected-date-cell"
354
+ >
355
+ <Text
356
+ allowFontScaling={false}
357
+ style={
358
+ [
359
+ {
360
+ "color": "#ffffff",
361
+ "fontFamily": "BeVietnamPro-Regular",
362
+ "fontSize": 14,
363
+ "letterSpacing": 0.48,
364
+ "lineHeight": 22,
365
+ },
366
+ undefined,
367
+ ]
368
+ }
369
+ themeIntent="inverted"
370
+ themeTypeface="neutral"
371
+ themeVariant="small"
372
+ >
373
+ 10
374
+ </Text>
375
+ </View>
376
+ </View>
377
+ <View
378
+ pointerEvents="box-none"
379
+ position="bottom"
380
+ style={
381
+ [
382
+ {
383
+ "bottom": 0,
384
+ "elevation": 9999,
385
+ "flexDirection": "column-reverse",
386
+ "left": 0,
387
+ "paddingHorizontal": 24,
388
+ "paddingVertical": 16,
389
+ "position": "absolute",
390
+ "right": 0,
391
+ "top": 0,
392
+ },
393
+ undefined,
394
+ ]
395
+ }
396
+ />
397
+ </View>
398
+ `;
399
+
400
+ exports[`CalendarRangeConnector renders correctly with connector variations 3`] = `
401
+ <View
402
+ style={
403
+ {
404
+ "flex": 1,
405
+ }
406
+ }
407
+ >
408
+ <View
409
+ style={
410
+ [
411
+ {
412
+ "alignItems": "center",
413
+ "backgroundColor": undefined,
414
+ "flexBasis": "14%",
415
+ "height": 120,
416
+ "justifyContent": "center",
417
+ "lineHeight": 0,
418
+ "maxHeight": 56,
419
+ "width": 120,
420
+ },
421
+ undefined,
422
+ ]
423
+ }
424
+ testID="calendar-date-cell"
425
+ themeItemWidth={120}
426
+ >
427
+ <View
428
+ accessibilityState={
429
+ {
430
+ "busy": undefined,
431
+ "checked": undefined,
432
+ "disabled": undefined,
433
+ "expanded": undefined,
434
+ "selected": undefined,
435
+ }
436
+ }
437
+ accessibilityValue={
438
+ {
439
+ "max": undefined,
440
+ "min": undefined,
441
+ "now": undefined,
442
+ "text": undefined,
443
+ }
444
+ }
445
+ accessible={true}
446
+ collapsable={false}
447
+ focusable={true}
448
+ onClick={[Function]}
449
+ onResponderGrant={[Function]}
450
+ onResponderMove={[Function]}
451
+ onResponderRelease={[Function]}
452
+ onResponderTerminate={[Function]}
453
+ onResponderTerminationRequest={[Function]}
454
+ onStartShouldSetResponder={[Function]}
455
+ style={
456
+ {
457
+ "alignItems": "center",
458
+ "backgroundColor": "#401960",
459
+ "borderColor": "#001f23",
460
+ "borderRadius": 999,
461
+ "borderWidth": 0,
462
+ "height": "100%",
463
+ "justifyContent": "center",
464
+ "maxHeight": 56,
465
+ "maxWidth": 56,
466
+ "opacity": 1,
467
+ "width": "100%",
468
+ }
469
+ }
470
+ testID="selected-date-cell"
471
+ >
472
+ <Text
473
+ allowFontScaling={false}
474
+ style={
475
+ [
476
+ {
477
+ "color": "#ffffff",
478
+ "fontFamily": "BeVietnamPro-Regular",
479
+ "fontSize": 14,
480
+ "letterSpacing": 0.48,
481
+ "lineHeight": 22,
482
+ },
483
+ undefined,
484
+ ]
485
+ }
486
+ themeIntent="inverted"
487
+ themeTypeface="neutral"
488
+ themeVariant="small"
489
+ >
490
+ 10
491
+ </Text>
492
+ </View>
493
+ </View>
494
+ <View
495
+ pointerEvents="box-none"
496
+ position="bottom"
497
+ style={
498
+ [
499
+ {
500
+ "bottom": 0,
501
+ "elevation": 9999,
502
+ "flexDirection": "column-reverse",
503
+ "left": 0,
504
+ "paddingHorizontal": 24,
505
+ "paddingVertical": 16,
506
+ "position": "absolute",
507
+ "right": 0,
508
+ "top": 0,
509
+ },
510
+ undefined,
511
+ ]
512
+ }
513
+ />
514
+ </View>
515
+ `;
516
+
517
+ exports[`CalendarRangeConnector renders correctly with connector variations 4`] = `
518
+ <View
519
+ style={
520
+ {
521
+ "flex": 1,
522
+ }
523
+ }
524
+ >
525
+ <View
526
+ style={
527
+ [
528
+ {
529
+ "alignItems": "center",
530
+ "backgroundColor": undefined,
531
+ "flexBasis": "14%",
532
+ "height": 120,
533
+ "justifyContent": "center",
534
+ "lineHeight": 0,
535
+ "maxHeight": 56,
536
+ "width": 120,
537
+ },
538
+ undefined,
539
+ ]
540
+ }
541
+ testID="calendar-date-cell"
542
+ themeItemWidth={120}
543
+ >
544
+ <View
545
+ accessibilityState={
546
+ {
547
+ "busy": undefined,
548
+ "checked": undefined,
549
+ "disabled": undefined,
550
+ "expanded": undefined,
551
+ "selected": undefined,
552
+ }
553
+ }
554
+ accessibilityValue={
555
+ {
556
+ "max": undefined,
557
+ "min": undefined,
558
+ "now": undefined,
559
+ "text": undefined,
560
+ }
561
+ }
562
+ accessible={true}
563
+ collapsable={false}
564
+ focusable={true}
565
+ onClick={[Function]}
566
+ onResponderGrant={[Function]}
567
+ onResponderMove={[Function]}
568
+ onResponderRelease={[Function]}
569
+ onResponderTerminate={[Function]}
570
+ onResponderTerminationRequest={[Function]}
571
+ onStartShouldSetResponder={[Function]}
572
+ style={
573
+ {
574
+ "alignItems": "center",
575
+ "backgroundColor": "#401960",
576
+ "borderColor": "#001f23",
577
+ "borderRadius": 999,
578
+ "borderWidth": 0,
579
+ "height": "100%",
580
+ "justifyContent": "center",
581
+ "maxHeight": 56,
582
+ "maxWidth": 56,
583
+ "opacity": 1,
584
+ "width": "100%",
585
+ }
586
+ }
587
+ testID="selected-date-cell"
588
+ >
589
+ <Text
590
+ allowFontScaling={false}
591
+ style={
592
+ [
593
+ {
594
+ "color": "#ffffff",
595
+ "fontFamily": "BeVietnamPro-Regular",
596
+ "fontSize": 14,
597
+ "letterSpacing": 0.48,
598
+ "lineHeight": 22,
599
+ },
600
+ undefined,
601
+ ]
602
+ }
603
+ themeIntent="inverted"
604
+ themeTypeface="neutral"
605
+ themeVariant="small"
606
+ >
607
+ 10
608
+ </Text>
609
+ </View>
610
+ </View>
611
+ <View
612
+ pointerEvents="box-none"
613
+ position="bottom"
614
+ style={
615
+ [
616
+ {
617
+ "bottom": 0,
618
+ "elevation": 9999,
619
+ "flexDirection": "column-reverse",
620
+ "left": 0,
621
+ "paddingHorizontal": 24,
622
+ "paddingVertical": 16,
623
+ "position": "absolute",
624
+ "right": 0,
625
+ "top": 0,
626
+ },
627
+ undefined,
628
+ ]
629
+ }
630
+ />
631
+ </View>
632
+ `;