@hero-design/rn 8.92.1 → 8.92.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.
Files changed (64) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/CHANGELOG.md +24 -0
  3. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  4. package/es/index.js +594 -729
  5. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  6. package/lib/index.js +595 -729
  7. package/package.json +4 -2
  8. package/rollup.config.mjs +1 -0
  9. package/src/components/Button/StyledButton.tsx +15 -8
  10. package/src/components/Button/UtilityButton/StyledUtilityButton.tsx +5 -3
  11. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
  12. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +61 -4
  13. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +26 -0
  14. package/src/components/Calendar/__tests__/CalendarRange.spec.tsx +26 -11
  15. package/src/components/Calendar/__tests__/helper.spec.ts +65 -58
  16. package/src/components/Calendar/helpers.ts +8 -13
  17. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
  18. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +2 -0
  19. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  20. package/src/components/Icon/IconList.ts +1 -0
  21. package/src/components/MapPin/StyledMapPin.tsx +1 -9
  22. package/src/components/Progress/ProgressCircle.tsx +53 -109
  23. package/src/components/Progress/StyledProgressBar.tsx +4 -1
  24. package/src/components/Progress/StyledProgressCircle.tsx +1 -57
  25. package/src/components/Progress/StyledStep.tsx +1 -1
  26. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +299 -647
  27. package/src/components/Search/SearchOneLine.tsx +2 -2
  28. package/src/components/Search/SearchTwoLine.tsx +1 -1
  29. package/src/components/Search/StyledSearch.tsx +20 -35
  30. package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +51 -51
  31. package/src/components/Search/__tests__/__snapshots__/SearchSuffixIcon.spec.tsx.snap +2 -2
  32. package/src/components/Search/__tests__/__snapshots__/SearchTwoLine.spec.tsx.snap +13 -15
  33. package/src/components/Search/__tests__/__snapshots__/utils.spec.tsx.snap +4 -4
  34. package/src/components/Search/utils.tsx +2 -2
  35. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
  36. package/src/components/Tabs/TabWithBadge.tsx +1 -1
  37. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +15 -9
  38. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +6 -6
  39. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +3 -3
  40. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +15 -9
  41. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -0
  42. package/src/components/Toolbar/StyledToolbar.tsx +1 -0
  43. package/src/components/Toolbar/ToolbarMessage.tsx +3 -0
  44. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarMessage.spec.tsx.snap +8 -0
  45. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +20 -23
  46. package/src/theme/components/button.ts +10 -0
  47. package/src/theme/components/progress.ts +21 -26
  48. package/src/theme/components/search.ts +2 -10
  49. package/src/theme/components/toolbar.ts +2 -0
  50. package/src/utils/helpers.ts +9 -0
  51. package/stats/8.92.2/rn-stats.html +4842 -0
  52. package/stats/8.92.3/rn-stats.html +4842 -0
  53. package/types/components/Button/StyledButton.d.ts +2 -2
  54. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +1 -1
  55. package/types/components/Icon/IconList.d.ts +1 -1
  56. package/types/components/Icon/index.d.ts +1 -1
  57. package/types/components/Progress/StyledProgressCircle.d.ts +1 -32
  58. package/types/components/Search/StyledSearch.d.ts +0 -1
  59. package/types/components/TextInput/index.d.ts +1 -1
  60. package/types/theme/components/button.d.ts +3 -0
  61. package/types/theme/components/progress.d.ts +6 -6
  62. package/types/theme/components/search.d.ts +2 -10
  63. package/types/theme/components/toolbar.d.ts +2 -0
  64. package/types/utils/helpers.d.ts +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.92.1",
3
+ "version": "8.92.3",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -38,6 +38,7 @@
38
38
  "react-native-linear-gradient": "^2.8.3",
39
39
  "react-native-pager-view": "^6.2.1",
40
40
  "react-native-safe-area-context": "^4.7.0",
41
+ "react-native-svg": "^15.11.2",
41
42
  "react-native-vector-icons": "^9.1.0",
42
43
  "react-native-webview": "^13.10.2"
43
44
  },
@@ -46,7 +47,7 @@
46
47
  "@babel/preset-env": "^7.20.0",
47
48
  "@babel/preset-react": "^7.20.0",
48
49
  "@babel/preset-typescript": "^7.20.0",
49
- "@babel/runtime": "^7.20.0",
50
+ "@babel/runtime": "^7.26.10",
50
51
  "@emotion/jest": "^11.11.0",
51
52
  "@eslint/compat": "^1.1.1",
52
53
  "@eslint/eslintrc": "^3.1.0",
@@ -85,6 +86,7 @@
85
86
  "react-native-linear-gradient": "2.8.3",
86
87
  "react-native-pager-view": "^6.2.1",
87
88
  "react-native-safe-area-context": "^4.7.0",
89
+ "react-native-svg": "^15.11.2",
88
90
  "react-native-vector-icons": "^9.1.0",
89
91
  "react-native-webview": "13.10.3",
90
92
  "react-test-renderer": "18.2.0",
package/rollup.config.mjs CHANGED
@@ -34,6 +34,7 @@ export default {
34
34
  'react',
35
35
  'react-native',
36
36
  'react-native-safe-area-context',
37
+ 'react-native-svg',
37
38
  '@react-native-community/datetimepicker',
38
39
  '@react-native-community/slider',
39
40
  'react-native-gesture-handler',
@@ -1,10 +1,10 @@
1
- import { TouchableHighlight, View } from 'react-native';
2
- import styled from '@emotion/native';
3
1
  import type { ReactNativeStyle } from '@emotion/native';
2
+ import styled from '@emotion/native';
4
3
  import type { Theme } from '@emotion/react';
4
+ import { TouchableHighlight, View } from 'react-native';
5
+ import { scale } from '../../utils/scale';
5
6
  import Icon from '../Icon';
6
7
  import Typography from '../Typography';
7
- import { scale } from '../../utils/scale';
8
8
 
9
9
  type Intent = 'primary' | 'secondary' | 'danger' | 'white';
10
10
 
@@ -319,11 +319,17 @@ const StyledButtonText = styled(Typography.Title)<{
319
319
  return {
320
320
  flexShrink: 1,
321
321
  textAlign: 'center',
322
+ textAlignVertical: 'center',
323
+ lineHeight: theme.__hd__.button.lineHeights.buttonText,
322
324
  ...themeStyling(),
323
325
  };
324
326
  });
325
327
 
326
- const StyledSmallButtonText = StyledButtonText.withComponent(Typography.Body);
328
+ const StyledSmallButtonText = styled(
329
+ StyledButtonText.withComponent(Typography.Body)
330
+ )(({ theme }) => ({
331
+ lineHeight: theme.__hd__.button.lineHeights.utilityButtonText,
332
+ }));
327
333
 
328
334
  const StyledButtonTitleOfVariantText = styled(Typography.Body)<{
329
335
  disabled?: boolean;
@@ -352,8 +358,9 @@ const StyledButtonTitleOfVariantText = styled(Typography.Body)<{
352
358
  };
353
359
  return {
354
360
  flexShrink: 1,
355
- lineHeight: theme.__hd__.button.lineHeights.titleOfTextVariant, // align text on Android
361
+ lineHeight: theme.__hd__.button.lineHeights.titleOfTextVariant,
356
362
  textAlign: 'center',
363
+ textAlignVertical: 'center',
357
364
  ...themeStyling(),
358
365
  };
359
366
  });
@@ -427,10 +434,10 @@ const StyledButtonIcon = styled(Icon)<{
427
434
 
428
435
  export {
429
436
  StyledButtonContainer,
430
- StyledButtonText,
431
- StyledSmallButtonText,
432
- StyledButtonIconWrapper,
433
437
  StyledButtonIcon,
438
+ StyledButtonIconWrapper,
439
+ StyledButtonText,
434
440
  StyledButtonTitleOfVariantText,
441
+ StyledSmallButtonText,
435
442
  };
436
443
  export type { Intent, ThemeVariant };
@@ -1,5 +1,5 @@
1
- import { View, TouchableOpacity } from 'react-native';
2
1
  import styled from '@emotion/native';
2
+ import { TouchableOpacity, View } from 'react-native';
3
3
 
4
4
  import Typography from '../../Typography';
5
5
 
@@ -17,7 +17,9 @@ export const IconWrapper = styled(View)(({ theme }) => ({
17
17
  paddingRight: theme.__hd__.button.space.default.iconPadding,
18
18
  }));
19
19
 
20
- export const ButtonText = styled(Typography.Body)({
20
+ export const ButtonText = styled(Typography.Body)(({ theme }) => ({
21
21
  flexShrink: 1,
22
22
  textAlign: 'center',
23
- });
23
+ textAlignVertical: 'center',
24
+ lineHeight: theme.__hd__.button.lineHeights.utilityButtonText,
25
+ }));
@@ -90,7 +90,9 @@ exports[`UtilityButton snapshot has intent primary style 1`] = `
90
90
  [
91
91
  {
92
92
  "flexShrink": 1,
93
+ "lineHeight": undefined,
93
94
  "textAlign": "center",
95
+ "textAlignVertical": "center",
94
96
  },
95
97
  undefined,
96
98
  ],
@@ -216,7 +218,9 @@ exports[`UtilityButton snapshot has intent text style 1`] = `
216
218
  [
217
219
  {
218
220
  "flexShrink": 1,
221
+ "lineHeight": undefined,
219
222
  "textAlign": "center",
223
+ "textAlignVertical": "center",
220
224
  },
221
225
  undefined,
222
226
  ],
@@ -93,7 +93,9 @@ exports[`Button allows render custom icon 1`] = `
93
93
  {
94
94
  "color": "#ffffff",
95
95
  "flexShrink": 1,
96
+ "lineHeight": undefined,
96
97
  "textAlign": "center",
98
+ "textAlignVertical": "center",
97
99
  },
98
100
  undefined,
99
101
  ],
@@ -223,7 +225,9 @@ exports[`Button renders correctly 1`] = `
223
225
  {
224
226
  "color": "#ffffff",
225
227
  "flexShrink": 1,
228
+ "lineHeight": undefined,
226
229
  "textAlign": "center",
230
+ "textAlignVertical": "center",
227
231
  },
228
232
  undefined,
229
233
  ],
@@ -501,7 +505,9 @@ exports[`Button renders correctly 3`] = `
501
505
  {
502
506
  "color": "#ffffff",
503
507
  "flexShrink": 1,
508
+ "lineHeight": undefined,
504
509
  "textAlign": "center",
510
+ "textAlignVertical": "center",
505
511
  },
506
512
  undefined,
507
513
  ],
@@ -603,7 +609,9 @@ exports[`Button renders correctly 4`] = `
603
609
  {
604
610
  "color": "#401960",
605
611
  "flexShrink": 1,
612
+ "lineHeight": undefined,
606
613
  "textAlign": "center",
614
+ "textAlignVertical": "center",
607
615
  },
608
616
  undefined,
609
617
  ],
@@ -881,7 +889,9 @@ exports[`Button renders correctly 6`] = `
881
889
  {
882
890
  "color": "#ffffff",
883
891
  "flexShrink": 1,
892
+ "lineHeight": undefined,
884
893
  "textAlign": "center",
894
+ "textAlignVertical": "center",
885
895
  },
886
896
  undefined,
887
897
  ],
@@ -985,7 +995,9 @@ exports[`Button renders correctly 7`] = `
985
995
  {
986
996
  "color": "#401960",
987
997
  "flexShrink": 1,
998
+ "lineHeight": undefined,
988
999
  "textAlign": "center",
1000
+ "textAlignVertical": "center",
989
1001
  },
990
1002
  undefined,
991
1003
  ],
@@ -1267,7 +1279,9 @@ exports[`Button renders correctly 9`] = `
1267
1279
  {
1268
1280
  "color": "#bfc1c5",
1269
1281
  "flexShrink": 1,
1282
+ "lineHeight": undefined,
1270
1283
  "textAlign": "center",
1284
+ "textAlignVertical": "center",
1271
1285
  },
1272
1286
  undefined,
1273
1287
  ],
@@ -1371,7 +1385,9 @@ exports[`Button renders correctly 10`] = `
1371
1385
  {
1372
1386
  "color": "#ffffff",
1373
1387
  "flexShrink": 1,
1388
+ "lineHeight": undefined,
1374
1389
  "textAlign": "center",
1390
+ "textAlignVertical": "center",
1375
1391
  },
1376
1392
  undefined,
1377
1393
  ],
@@ -1653,7 +1669,9 @@ exports[`Button renders correctly 12`] = `
1653
1669
  {
1654
1670
  "color": "#bfc1c5",
1655
1671
  "flexShrink": 1,
1672
+ "lineHeight": undefined,
1656
1673
  "textAlign": "center",
1674
+ "textAlignVertical": "center",
1657
1675
  },
1658
1676
  undefined,
1659
1677
  ],
@@ -1757,6 +1775,7 @@ exports[`Button renders correctly 13`] = `
1757
1775
  "flexShrink": 1,
1758
1776
  "lineHeight": 22,
1759
1777
  "textAlign": "center",
1778
+ "textAlignVertical": "center",
1760
1779
  },
1761
1780
  undefined,
1762
1781
  ],
@@ -2037,6 +2056,7 @@ exports[`Button renders correctly 15`] = `
2037
2056
  "flexShrink": 1,
2038
2057
  "lineHeight": 22,
2039
2058
  "textAlign": "center",
2059
+ "textAlignVertical": "center",
2040
2060
  },
2041
2061
  undefined,
2042
2062
  ],
@@ -2141,6 +2161,7 @@ exports[`Button renders correctly 16`] = `
2141
2161
  "flexShrink": 1,
2142
2162
  "lineHeight": 22,
2143
2163
  "textAlign": "center",
2164
+ "textAlignVertical": "center",
2144
2165
  },
2145
2166
  undefined,
2146
2167
  ],
@@ -2421,6 +2442,7 @@ exports[`Button renders correctly 18`] = `
2421
2442
  "flexShrink": 1,
2422
2443
  "lineHeight": 22,
2423
2444
  "textAlign": "center",
2445
+ "textAlignVertical": "center",
2424
2446
  },
2425
2447
  undefined,
2426
2448
  ],
@@ -2525,6 +2547,7 @@ exports[`Button renders correctly 19`] = `
2525
2547
  "flexShrink": 1,
2526
2548
  "lineHeight": 22,
2527
2549
  "textAlign": "center",
2550
+ "textAlignVertical": "center",
2528
2551
  },
2529
2552
  undefined,
2530
2553
  ],
@@ -2805,6 +2828,7 @@ exports[`Button renders correctly 21`] = `
2805
2828
  "flexShrink": 1,
2806
2829
  "lineHeight": 22,
2807
2830
  "textAlign": "center",
2831
+ "textAlignVertical": "center",
2808
2832
  },
2809
2833
  undefined,
2810
2834
  ],
@@ -2909,6 +2933,7 @@ exports[`Button renders correctly 22`] = `
2909
2933
  "flexShrink": 1,
2910
2934
  "lineHeight": 22,
2911
2935
  "textAlign": "center",
2936
+ "textAlignVertical": "center",
2912
2937
  },
2913
2938
  undefined,
2914
2939
  ],
@@ -3189,6 +3214,7 @@ exports[`Button renders correctly 24`] = `
3189
3214
  "flexShrink": 1,
3190
3215
  "lineHeight": 22,
3191
3216
  "textAlign": "center",
3217
+ "textAlignVertical": "center",
3192
3218
  },
3193
3219
  undefined,
3194
3220
  ],
@@ -3293,6 +3319,7 @@ exports[`Button renders correctly 25`] = `
3293
3319
  "flexShrink": 1,
3294
3320
  "lineHeight": 22,
3295
3321
  "textAlign": "center",
3322
+ "textAlignVertical": "center",
3296
3323
  },
3297
3324
  undefined,
3298
3325
  ],
@@ -3573,6 +3600,7 @@ exports[`Button renders correctly 27`] = `
3573
3600
  "flexShrink": 1,
3574
3601
  "lineHeight": 22,
3575
3602
  "textAlign": "center",
3603
+ "textAlignVertical": "center",
3576
3604
  },
3577
3605
  undefined,
3578
3606
  ],
@@ -3853,6 +3881,7 @@ exports[`Button renders correctly 29`] = `
3853
3881
  "flexShrink": 1,
3854
3882
  "lineHeight": 22,
3855
3883
  "textAlign": "center",
3884
+ "textAlignVertical": "center",
3856
3885
  },
3857
3886
  undefined,
3858
3887
  ],
@@ -3956,9 +3985,16 @@ exports[`Button renders correctly 30`] = `
3956
3985
  {
3957
3986
  "color": "#ffffff",
3958
3987
  "flexShrink": 1,
3988
+ "lineHeight": undefined,
3959
3989
  "textAlign": "center",
3990
+ "textAlignVertical": "center",
3960
3991
  },
3961
- undefined,
3992
+ [
3993
+ {
3994
+ "lineHeight": undefined,
3995
+ },
3996
+ undefined,
3997
+ ],
3962
3998
  ],
3963
3999
  ]
3964
4000
  }
@@ -4236,9 +4272,16 @@ exports[`Button renders correctly 32`] = `
4236
4272
  {
4237
4273
  "color": "#ffffff",
4238
4274
  "flexShrink": 1,
4275
+ "lineHeight": undefined,
4239
4276
  "textAlign": "center",
4277
+ "textAlignVertical": "center",
4240
4278
  },
4241
- undefined,
4279
+ [
4280
+ {
4281
+ "lineHeight": undefined,
4282
+ },
4283
+ undefined,
4284
+ ],
4242
4285
  ],
4243
4286
  ]
4244
4287
  }
@@ -4341,9 +4384,16 @@ exports[`Button renders correctly 33`] = `
4341
4384
  {
4342
4385
  "color": "#401960",
4343
4386
  "flexShrink": 1,
4387
+ "lineHeight": undefined,
4344
4388
  "textAlign": "center",
4389
+ "textAlignVertical": "center",
4345
4390
  },
4346
- undefined,
4391
+ [
4392
+ {
4393
+ "lineHeight": undefined,
4394
+ },
4395
+ undefined,
4396
+ ],
4347
4397
  ],
4348
4398
  ]
4349
4399
  }
@@ -4625,9 +4675,16 @@ exports[`Button renders correctly 35`] = `
4625
4675
  {
4626
4676
  "color": "#bfc1c5",
4627
4677
  "flexShrink": 1,
4678
+ "lineHeight": undefined,
4628
4679
  "textAlign": "center",
4680
+ "textAlignVertical": "center",
4629
4681
  },
4630
- undefined,
4682
+ [
4683
+ {
4684
+ "lineHeight": undefined,
4685
+ },
4686
+ undefined,
4687
+ ],
4631
4688
  ],
4632
4689
  ]
4633
4690
  }
@@ -2373,7 +2373,9 @@ exports[`StyledButtonText has filled-danger style 1`] = `
2373
2373
  {
2374
2374
  "color": "#ffffff",
2375
2375
  "flexShrink": 1,
2376
+ "lineHeight": undefined,
2376
2377
  "textAlign": "center",
2378
+ "textAlignVertical": "center",
2377
2379
  },
2378
2380
  undefined,
2379
2381
  ],
@@ -2432,7 +2434,9 @@ exports[`StyledButtonText has filled-primary style 1`] = `
2432
2434
  {
2433
2435
  "color": "#ffffff",
2434
2436
  "flexShrink": 1,
2437
+ "lineHeight": undefined,
2435
2438
  "textAlign": "center",
2439
+ "textAlignVertical": "center",
2436
2440
  },
2437
2441
  undefined,
2438
2442
  ],
@@ -2491,7 +2495,9 @@ exports[`StyledButtonText has filled-secondary style 1`] = `
2491
2495
  {
2492
2496
  "color": "#ffffff",
2493
2497
  "flexShrink": 1,
2498
+ "lineHeight": undefined,
2494
2499
  "textAlign": "center",
2500
+ "textAlignVertical": "center",
2495
2501
  },
2496
2502
  undefined,
2497
2503
  ],
@@ -2550,7 +2556,9 @@ exports[`StyledButtonText has filled-white style 1`] = `
2550
2556
  {
2551
2557
  "color": "#401960",
2552
2558
  "flexShrink": 1,
2559
+ "lineHeight": undefined,
2553
2560
  "textAlign": "center",
2561
+ "textAlignVertical": "center",
2554
2562
  },
2555
2563
  undefined,
2556
2564
  ],
@@ -2609,7 +2617,9 @@ exports[`StyledButtonText has outlined-danger style 1`] = `
2609
2617
  {
2610
2618
  "color": "#cb300a",
2611
2619
  "flexShrink": 1,
2620
+ "lineHeight": undefined,
2612
2621
  "textAlign": "center",
2622
+ "textAlignVertical": "center",
2613
2623
  },
2614
2624
  undefined,
2615
2625
  ],
@@ -2668,7 +2678,9 @@ exports[`StyledButtonText has outlined-primary style 1`] = `
2668
2678
  {
2669
2679
  "color": "#401960",
2670
2680
  "flexShrink": 1,
2681
+ "lineHeight": undefined,
2671
2682
  "textAlign": "center",
2683
+ "textAlignVertical": "center",
2672
2684
  },
2673
2685
  undefined,
2674
2686
  ],
@@ -2727,7 +2739,9 @@ exports[`StyledButtonText has outlined-secondary style 1`] = `
2727
2739
  {
2728
2740
  "color": "#4d6265",
2729
2741
  "flexShrink": 1,
2742
+ "lineHeight": undefined,
2730
2743
  "textAlign": "center",
2744
+ "textAlignVertical": "center",
2731
2745
  },
2732
2746
  undefined,
2733
2747
  ],
@@ -2786,7 +2800,9 @@ exports[`StyledButtonText has outlined-white style 1`] = `
2786
2800
  {
2787
2801
  "color": "#ffffff",
2788
2802
  "flexShrink": 1,
2803
+ "lineHeight": undefined,
2789
2804
  "textAlign": "center",
2805
+ "textAlignVertical": "center",
2790
2806
  },
2791
2807
  undefined,
2792
2808
  ],
@@ -2845,7 +2861,9 @@ exports[`StyledButtonText has text-danger style 1`] = `
2845
2861
  {
2846
2862
  "color": "#cb300a",
2847
2863
  "flexShrink": 1,
2864
+ "lineHeight": undefined,
2848
2865
  "textAlign": "center",
2866
+ "textAlignVertical": "center",
2849
2867
  },
2850
2868
  undefined,
2851
2869
  ],
@@ -2904,7 +2922,9 @@ exports[`StyledButtonText has text-primary style 1`] = `
2904
2922
  {
2905
2923
  "color": "#401960",
2906
2924
  "flexShrink": 1,
2925
+ "lineHeight": undefined,
2907
2926
  "textAlign": "center",
2927
+ "textAlignVertical": "center",
2908
2928
  },
2909
2929
  undefined,
2910
2930
  ],
@@ -2963,7 +2983,9 @@ exports[`StyledButtonText has text-secondary style 1`] = `
2963
2983
  {
2964
2984
  "color": "#4d6265",
2965
2985
  "flexShrink": 1,
2986
+ "lineHeight": undefined,
2966
2987
  "textAlign": "center",
2988
+ "textAlignVertical": "center",
2967
2989
  },
2968
2990
  undefined,
2969
2991
  ],
@@ -3022,7 +3044,9 @@ exports[`StyledButtonText has text-white style 1`] = `
3022
3044
  {
3023
3045
  "color": "#ffffff",
3024
3046
  "flexShrink": 1,
3047
+ "lineHeight": undefined,
3025
3048
  "textAlign": "center",
3049
+ "textAlignVertical": "center",
3026
3050
  },
3027
3051
  undefined,
3028
3052
  ],
@@ -3082,7 +3106,9 @@ exports[`StyledButtonText renders disabled correctly 1`] = `
3082
3106
  {
3083
3107
  "color": "#ffffff",
3084
3108
  "flexShrink": 1,
3109
+ "lineHeight": undefined,
3085
3110
  "textAlign": "center",
3111
+ "textAlignVertical": "center",
3086
3112
  },
3087
3113
  undefined,
3088
3114
  ],
@@ -47,17 +47,32 @@ describe('CalendarRange', () => {
47
47
  expect(queryAllByTestId('calendar-disabled-cell')).toHaveLength(0);
48
48
  expect(queryAllByTestId('calendar-date-mark')).toHaveLength(5);
49
49
 
50
- // Test range selection
51
- fireEvent.press(queryAllByText('11')[0]); // Select start date
50
+ // Select outside range
51
+ fireEvent.press(queryAllByText('11')[0]);
52
52
  expect(onChange).toHaveBeenCalledWith({
53
53
  startDate: new Date('2022-10-11'),
54
- endDate: new Date('2022-10-15'),
54
+ endDate: undefined,
55
55
  });
56
56
 
57
- fireEvent.press(queryAllByText('20')[0]); // Select end date
57
+ // Select start date
58
+ fireEvent.press(queryAllByText('12')[0]);
58
59
  expect(onChange).toHaveBeenCalledWith({
59
60
  startDate: new Date('2022-10-12'),
60
- endDate: new Date('2022-10-20'),
61
+ endDate: new Date('2022-10-12'),
62
+ });
63
+
64
+ // Select end date
65
+ fireEvent.press(queryAllByText('15')[0]);
66
+ expect(onChange).toHaveBeenCalledWith({
67
+ startDate: new Date('2022-10-15'),
68
+ endDate: new Date('2022-10-15'),
69
+ });
70
+
71
+ // Select inside range
72
+ fireEvent.press(queryAllByText('13')[0]);
73
+ expect(onChange).toHaveBeenCalledWith({
74
+ startDate: new Date('2022-10-13'),
75
+ endDate: undefined,
61
76
  });
62
77
 
63
78
  fireEvent.press(queryByTestId('previous-icon-button'));
@@ -129,14 +144,14 @@ describe('CalendarRange', () => {
129
144
  // Test range selection within constraints
130
145
  fireEvent.press(getByText('17')); // Select start date
131
146
  expect(onChange).toHaveBeenCalledWith({
132
- startDate: new Date('2022-10-12'),
133
- endDate: new Date('2022-10-17'),
147
+ startDate: new Date('2022-10-17'),
148
+ endDate: undefined,
134
149
  });
135
150
 
136
151
  fireEvent.press(getByText('11')); // Select end date
137
152
  expect(onChange).toHaveBeenCalledWith({
138
153
  startDate: new Date('2022-10-11'),
139
- endDate: new Date('2022-10-15'),
154
+ endDate: undefined,
140
155
  });
141
156
  });
142
157
 
@@ -156,14 +171,14 @@ describe('CalendarRange', () => {
156
171
  fireEvent.press(getByText('11'));
157
172
  expect(onChange).toHaveBeenCalledWith({
158
173
  startDate: new Date('2022-10-11'),
159
- endDate: new Date('2022-10-15'),
174
+ endDate: undefined,
160
175
  });
161
176
 
162
177
  // Select end date
163
178
  fireEvent.press(getByText('20'));
164
179
  expect(onChange).toHaveBeenCalledWith({
165
- startDate: new Date('2022-10-12'),
166
- endDate: new Date('2022-10-20'),
180
+ startDate: new Date('2022-10-20'),
181
+ endDate: undefined,
167
182
  });
168
183
 
169
184
  // Select new start date (should clear end date)