@hero-design/rn 8.91.1 → 8.91.4

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 (106) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/CHANGELOG.md +27 -0
  3. package/es/index.js +170 -77
  4. package/lib/index.js +170 -77
  5. package/package.json +1 -1
  6. package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap +12 -12
  7. package/src/components/BottomSheet/StyledBottomSheet.tsx +0 -10
  8. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +0 -16
  9. package/src/components/Calendar/CalendarRange.tsx +5 -1
  10. package/src/components/Calendar/__tests__/helper.spec.ts +20 -8
  11. package/src/components/Calendar/helpers.ts +6 -2
  12. package/src/components/Checkbox/StyledCheckbox.tsx +3 -3
  13. package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +1 -1
  14. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  15. package/src/components/Checkbox/__tests__/index.spec.tsx +11 -7
  16. package/src/components/Checkbox/index.tsx +11 -2
  17. package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
  18. package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +63 -3
  19. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +21 -1
  20. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +21 -1
  21. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +42 -18
  22. package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +1 -1
  23. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
  24. package/src/components/FAB/Pair/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  25. package/src/components/FAB/StyledFAB.tsx +1 -5
  26. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +4 -4
  27. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  28. package/src/components/FloatingIsland/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  29. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +2 -1
  30. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -2
  31. package/src/components/MapPin/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  32. package/src/components/RichTextEditor/RichTextEditor.tsx +2 -1
  33. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +40 -2
  34. package/src/components/Search/SearchOneLine.tsx +3 -1
  35. package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +7 -0
  36. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +147 -47
  37. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +126 -38
  38. package/src/components/Slider/__tests__/__snapshots__/RangeSlider.spec.tsx.snap +2 -2
  39. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  40. package/src/components/Switch/StyledSwitch.tsx +1 -0
  41. package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +7 -3
  42. package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
  43. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +337 -16
  44. package/src/components/TextInput/__tests__/index.spec.tsx +2 -0
  45. package/src/components/TextInput/index.tsx +7 -2
  46. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +42 -2
  47. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +42 -10
  48. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +7 -7
  49. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +52 -29
  50. package/src/theme/components/bottomSheet.ts +2 -9
  51. package/src/theme/components/checkbox.ts +7 -0
  52. package/src/theme/components/fab.ts +5 -9
  53. package/src/theme/components/switch.ts +5 -5
  54. package/src/theme/components/textInput.ts +1 -0
  55. package/src/theme/global/colors/__tests__/__snapshots__/eBens.spec.ts.snap +2 -0
  56. package/src/theme/global/colors/__tests__/__snapshots__/global.spec.ts.snap +2 -0
  57. package/src/theme/global/colors/__tests__/__snapshots__/jobs.spec.ts.snap +2 -0
  58. package/src/theme/global/colors/__tests__/__snapshots__/swag.spec.ts.snap +2 -0
  59. package/src/theme/global/colors/__tests__/__snapshots__/swagLight.spec.ts.snap +6 -3
  60. package/src/theme/global/colors/__tests__/__snapshots__/swagLightGlobal.spec.ts.snap +5 -3
  61. package/src/theme/global/colors/__tests__/__snapshots__/swagLightJobs.spec.ts.snap +6 -3
  62. package/src/theme/global/colors/__tests__/__snapshots__/wallet.spec.ts.snap +2 -0
  63. package/src/theme/global/colors/__tests__/__snapshots__/work.spec.ts.snap +2 -0
  64. package/src/theme/global/colors/ehWorkDark.ts +1 -0
  65. package/src/theme/global/colors/global.ts +3 -0
  66. package/src/theme/global/colors/swagLight.ts +1 -0
  67. package/src/theme/global/colors/swagLightGlobal.ts +3 -3
  68. package/src/theme/global/colors/swagLightJobs.ts +3 -1
  69. package/src/theme/global/colors/types.ts +2 -0
  70. package/src/theme/global/shadows/__tests__/__snapshots__/ehWorkDark.spec.ts.snap +36 -0
  71. package/src/theme/global/shadows/__tests__/__snapshots__/swagLight.spec.ts.snap +36 -0
  72. package/src/theme/global/shadows/__tests__/__snapshots__/swagLightJobs.spec.ts.snap +36 -0
  73. package/src/theme/global/shadows/__tests__/ehWorkDark.spec.ts +7 -0
  74. package/src/theme/global/shadows/__tests__/index.spec.ts +24 -0
  75. package/src/theme/global/shadows/__tests__/swagLight.spec.ts +7 -0
  76. package/src/theme/global/shadows/__tests__/swagLightJobs.spec.ts +7 -0
  77. package/src/theme/global/shadows/ehWorkDark.ts +37 -0
  78. package/src/theme/global/shadows/index.ts +23 -0
  79. package/src/theme/global/shadows/swagLight.ts +37 -0
  80. package/src/theme/global/shadows/swagLightJobs.ts +37 -0
  81. package/src/theme/global/shadows/types.ts +16 -0
  82. package/stats/8.91.2/rn-stats.html +4842 -0
  83. package/stats/8.91.3/rn-stats.html +4844 -0
  84. package/stats/8.91.4/rn-stats.html +4842 -0
  85. package/types/components/Calendar/helpers.d.ts +5 -2
  86. package/types/components/Checkbox/StyledCheckbox.d.ts +1 -1
  87. package/types/components/Checkbox/index.d.ts +2 -1
  88. package/types/components/TextInput/index.d.ts +3 -1
  89. package/types/theme/components/bottomSheet.d.ts +1 -10
  90. package/types/theme/components/checkbox.d.ts +7 -0
  91. package/types/theme/components/chip.d.ts +1 -10
  92. package/types/theme/components/fab.d.ts +2 -9
  93. package/types/theme/components/floatingIsland.d.ts +1 -10
  94. package/types/theme/components/slider.d.ts +1 -10
  95. package/types/theme/components/switch.d.ts +1 -1
  96. package/types/theme/components/textInput.d.ts +1 -0
  97. package/types/theme/global/colors/swagLightJobs.d.ts +2 -50
  98. package/types/theme/global/colors/types.d.ts +2 -0
  99. package/types/theme/global/index.d.ts +2 -12
  100. package/types/theme/global/shadows/ehWorkDark.d.ts +3 -0
  101. package/types/theme/global/shadows/index.d.ts +5 -0
  102. package/types/theme/global/shadows/swagLight.d.ts +3 -0
  103. package/types/theme/global/shadows/swagLightJobs.d.ts +3 -0
  104. package/types/theme/global/shadows/types.d.ts +15 -0
  105. package/src/theme/global/shadows.ts +0 -19
  106. package/types/theme/global/shadows.d.ts +0 -16
package/lib/index.js CHANGED
@@ -1938,8 +1938,10 @@ var globalPalette$1 = {
1938
1938
  archived: palette$9.silverChalice,
1939
1939
  mutedArchived: palette$9.silverChaliceLight20,
1940
1940
  archivedSurface: palette$9.cumberlandFog,
1941
- onArchivedSurface: palette$9.windsorGrey
1941
+ onArchivedSurface: palette$9.windsorGrey,
1942
1942
  // End of Updated 21 / Nov / 22
1943
+ black: '#000000',
1944
+ white: '#ffffff'
1943
1945
  };
1944
1946
 
1945
1947
  var swagBrandSystemPallete$1 = {
@@ -2014,10 +2016,10 @@ var swagDarkSystemPalette = _objectSpread2(_objectSpread2(_objectSpread2({}, glo
2014
2016
 
2015
2017
  var swagLightGlobalPalette = _objectSpread2(_objectSpread2({}, globalPalette$1), {}, {
2016
2018
  onDefaultGlobalSurface: palette$3.offBlack,
2017
- mutedOnDefaultGlobalSurface: palette$3.offBlackLight30,
2018
- inactiveOnDefaultGlobalSurface: palette$3.offBlackLight50,
2019
+ mutedOnDefaultGlobalSurface: '#4d6265',
2020
+ inactiveOnDefaultGlobalSurface: '#808f91',
2019
2021
  primaryOutline: palette$3.offBlack,
2020
- inactiveOutline: palette$3.offBlackLight50
2022
+ inactiveOutline: '#808f91'
2021
2023
  });
2022
2024
 
2023
2025
  var swagBrandSystemPallete = {
@@ -2033,9 +2035,12 @@ var swagBrandSystemPallete = {
2033
2035
  decorativeSecondary: '#fdfbff',
2034
2036
  decorativeSecondarySurface: '#f0e6ff'
2035
2037
  };
2036
- var swagSystemPalette = _objectSpread2(_objectSpread2({}, swagLightGlobalPalette), swagBrandSystemPallete);
2038
+ var swagSystemPalette = _objectSpread2(_objectSpread2(_objectSpread2({}, swagLightGlobalPalette), swagBrandSystemPallete), {}, {
2039
+ name: 'swagLight'
2040
+ });
2037
2041
 
2038
2042
  var swagLightJobsSystemPalette = _objectSpread2(_objectSpread2({}, swagSystemPalette), {}, {
2043
+ name: 'swagLightJobs',
2039
2044
  secondary: '#40d1ff',
2040
2045
  onSecondary: '#460078',
2041
2046
  secondaryHighlightedSurface: '#ecfaff',
@@ -2152,7 +2157,8 @@ var ehWorkDarkSystemPalette = {
2152
2157
  decorativeSecondary: '#280541',
2153
2158
  decorativeSecondarySurface: '#4c1d95',
2154
2159
  // Theme Mode
2155
- themeMode: 'dark'
2160
+ themeMode: 'dark',
2161
+ name: 'ehWorkDark'
2156
2162
  };
2157
2163
 
2158
2164
  var BASE_WIDTH = 390; // Based on iPhone 13's viewport size
@@ -2317,19 +2323,116 @@ var getRadii = function getRadii(baseRadius) {
2317
2323
  };
2318
2324
  };
2319
2325
 
2320
- var getShadows = function getShadows(systemPalette) {
2321
- return {
2322
- "default": {
2323
- shadowOffset: {
2324
- width: 0,
2325
- height: 2
2326
- },
2327
- shadowColor: systemPalette.primaryOutline,
2328
- shadowOpacity: 0.12,
2329
- shadowRadius: 4,
2330
- elevation: 3
2331
- }
2332
- };
2326
+ var swagLightShadowPalette = {
2327
+ "default": {
2328
+ shadowOffset: {
2329
+ width: 0,
2330
+ height: 2
2331
+ },
2332
+ shadowColor: swagSystemPalette.primaryOutline,
2333
+ shadowOpacity: 0.12,
2334
+ shadowRadius: 4,
2335
+ elevation: 3
2336
+ },
2337
+ cardDrawer: {
2338
+ shadowOffset: {
2339
+ width: 0,
2340
+ height: 2
2341
+ },
2342
+ shadowColor: '#001f23',
2343
+ shadowOpacity: 0.12,
2344
+ shadowRadius: 2,
2345
+ elevation: 6
2346
+ },
2347
+ tabBar: {
2348
+ shadowOffset: {
2349
+ width: 0,
2350
+ height: -4
2351
+ },
2352
+ shadowColor: '#001f23',
2353
+ shadowOpacity: 0.04,
2354
+ shadowRadius: 6,
2355
+ elevation: 10
2356
+ }
2357
+ };
2358
+
2359
+ var swagLightJobsShadowPalette = {
2360
+ "default": {
2361
+ shadowOffset: {
2362
+ width: 0,
2363
+ height: 2
2364
+ },
2365
+ shadowColor: swagLightJobsSystemPalette.primaryOutline,
2366
+ shadowOpacity: 0.12,
2367
+ shadowRadius: 4,
2368
+ elevation: 3
2369
+ },
2370
+ cardDrawer: {
2371
+ shadowOffset: {
2372
+ width: 0,
2373
+ height: 2
2374
+ },
2375
+ shadowColor: '#001f23',
2376
+ shadowOpacity: 0.12,
2377
+ shadowRadius: 2,
2378
+ elevation: 6
2379
+ },
2380
+ tabBar: {
2381
+ shadowOffset: {
2382
+ width: 0,
2383
+ height: -4
2384
+ },
2385
+ shadowColor: '#001f23',
2386
+ shadowOpacity: 0.04,
2387
+ shadowRadius: 6,
2388
+ elevation: 10
2389
+ }
2390
+ };
2391
+
2392
+ var ehWorkDarkShadowPalette = {
2393
+ "default": {
2394
+ shadowOffset: {
2395
+ width: 0,
2396
+ height: 2
2397
+ },
2398
+ shadowColor: ehWorkDarkSystemPalette.primaryOutline,
2399
+ shadowOpacity: 0.12,
2400
+ shadowRadius: 4,
2401
+ elevation: 3
2402
+ },
2403
+ cardDrawer: {
2404
+ shadowOffset: {
2405
+ width: 0,
2406
+ height: 2
2407
+ },
2408
+ shadowColor: '#000000',
2409
+ shadowOpacity: 0.56,
2410
+ shadowRadius: 2,
2411
+ elevation: 6
2412
+ },
2413
+ tabBar: {
2414
+ shadowOffset: {
2415
+ width: 0,
2416
+ height: -4
2417
+ },
2418
+ shadowColor: '#000000',
2419
+ shadowOpacity: 0.24,
2420
+ shadowRadius: 6,
2421
+ elevation: 10
2422
+ }
2423
+ };
2424
+
2425
+ var getShadows = function getShadows(palette) {
2426
+ switch (palette.name) {
2427
+ case 'swagLight':
2428
+ return swagLightShadowPalette;
2429
+ case 'swagLightJobs':
2430
+ return swagLightJobsShadowPalette;
2431
+ case 'ehWorkDark':
2432
+ return ehWorkDarkShadowPalette;
2433
+ default:
2434
+ return swagLightShadowPalette;
2435
+ }
2333
2436
  };
2334
2437
 
2335
2438
  var getGlobalTheme = function getGlobalTheme(scale, systemPalette) {
@@ -2591,7 +2694,7 @@ var getBottomSheetTheme = function getBottomSheetTheme(theme) {
2591
2694
  var colors = {
2592
2695
  shadow: theme.colors.primaryOutline,
2593
2696
  background: theme.colors.defaultGlobalSurface,
2594
- backdrop: theme.colors.overlayGlobalSurface,
2697
+ backdrop: theme.colors.black,
2595
2698
  floatingHeaderIconBackground: theme.colors.archivedSurface
2596
2699
  };
2597
2700
  var sizes = {
@@ -2608,15 +2711,6 @@ var getBottomSheetTheme = function getBottomSheetTheme(theme) {
2608
2711
  floatingInnerPadding: theme.space.small,
2609
2712
  floatingHeaderIconPadding: theme.space.small
2610
2713
  };
2611
- var shadows = {
2612
- offset: {
2613
- width: 0,
2614
- height: 3
2615
- },
2616
- opacity: 0.4,
2617
- radius: theme.radii.xlarge,
2618
- elevation: 10
2619
- };
2620
2714
  var radii = {
2621
2715
  "default": theme.radii.xlarge,
2622
2716
  floating: theme.radii['5xlarge'],
@@ -2624,7 +2718,6 @@ var getBottomSheetTheme = function getBottomSheetTheme(theme) {
2624
2718
  };
2625
2719
  return {
2626
2720
  colors: colors,
2627
- shadows: shadows,
2628
2721
  radii: radii,
2629
2722
  sizes: sizes,
2630
2723
  space: space
@@ -2836,8 +2929,15 @@ var getCheckboxTheme = function getCheckboxTheme(theme) {
2836
2929
  var colors = {
2837
2930
  borders: {
2838
2931
  "default": theme.colors.primaryOutline,
2932
+ checked: theme.colors.primaryOutline,
2839
2933
  disabled: theme.colors.disabledOutline,
2840
2934
  readonly: theme.colors.inactiveOutline
2935
+ },
2936
+ checkboxBorder: {
2937
+ "default": theme.colors.primaryOutline,
2938
+ checked: theme.colors.primary,
2939
+ disabled: theme.colors.disabledOutline,
2940
+ readonly: theme.colors.mutedOnDefaultGlobalSurface
2841
2941
  }
2842
2942
  };
2843
2943
  var space = {
@@ -3061,12 +3161,12 @@ var getFABTheme = function getFABTheme(theme) {
3061
3161
  buttonBackground: theme.colors.overlayGlobalSurface,
3062
3162
  buttonPressedBackground: theme.colors.overlayGlobalSurface,
3063
3163
  buttonActiveBackground: theme.colors.overlayGlobalSurface,
3064
- icon: theme.colors.onPrimary,
3164
+ icon: theme.colors.onDarkGlobalSurface,
3065
3165
  actionItemBackground: theme.colors.overlayGlobalSurface,
3066
3166
  actionItemPressedBackground: theme.colors.overlayGlobalSurface,
3067
- backdropBackground: theme.colors.defaultSurface,
3068
- titleText: theme.colors.onPrimary,
3069
- actionItemText: theme.colors.onPrimary
3167
+ backdropBackground: theme.colors.black,
3168
+ titleText: theme.colors.onDarkGlobalSurface,
3169
+ actionItemText: theme.colors.onDarkGlobalSurface
3070
3170
  };
3071
3171
  var sizes = {
3072
3172
  width: theme.sizes.xxxxxlarge,
@@ -3090,11 +3190,7 @@ var getFABTheme = function getFABTheme(theme) {
3090
3190
  icon: theme.lineHeights.large
3091
3191
  };
3092
3192
  var shadows = {
3093
- offset: theme.shadows["default"].shadowOffset,
3094
- opacity: theme.shadows["default"].shadowOpacity,
3095
- radius: theme.shadows["default"].shadowRadius,
3096
- elevation: theme.shadows["default"].elevation,
3097
- color: theme.shadows["default"].shadowColor
3193
+ "default": theme.shadows.cardDrawer
3098
3194
  };
3099
3195
  var space = {
3100
3196
  actionItemPadding: theme.space.smallMedium,
@@ -3610,14 +3706,14 @@ var getSwipeableTheme = function getSwipeableTheme(theme) {
3610
3706
  var getSwitchTheme = function getSwitchTheme(theme) {
3611
3707
  var colors = {
3612
3708
  backgroundColors: {
3613
- checked: theme.colors.primary,
3709
+ checked: theme.colors.pressedSurface,
3614
3710
  unchecked: theme.colors.inactiveOnDefaultGlobalSurface,
3615
- 'disabled-checked': theme.colors.highlightedSurface,
3616
- 'disabled-unchecked': theme.colors.mutedOnDefaultGlobalSurface
3711
+ 'disabled-checked': theme.colors.inactiveOnDefaultGlobalSurface,
3712
+ 'disabled-unchecked': theme.colors.inactiveOnDefaultGlobalSurface
3617
3713
  },
3618
- thumb: theme.colors.onDarkGlobalSurface,
3714
+ thumb: theme.colors.white,
3619
3715
  selector: {
3620
- background: theme.colors.defaultGlobalSurface,
3716
+ background: theme.colors.neutralGlobalSurface,
3621
3717
  textBackground: theme.colors.decorativePrimarySurface
3622
3718
  }
3623
3719
  };
@@ -3773,7 +3869,8 @@ var getTextInputTheme = function getTextInputTheme(theme) {
3773
3869
  disabled: theme.colors.disabledOnDefaultGlobalSurface,
3774
3870
  readonly: theme.colors.inactiveOnDefaultGlobalSurface,
3775
3871
  filled: theme.colors.onDefaultGlobalSurface
3776
- }
3872
+ },
3873
+ placeholder: theme.colors.mutedOnDefaultGlobalSurface
3777
3874
  };
3778
3875
  var space = {
3779
3876
  containerPadding: theme.space.medium,
@@ -9718,11 +9815,6 @@ var StyledFloatingBottomSheet = index$a(reactNative.Animated.View)(function (_re
9718
9815
  var theme = _ref2.theme;
9719
9816
  return {
9720
9817
  width: '100%',
9721
- shadowColor: theme.__hd__.bottomSheet.colors.shadow,
9722
- shadowOffset: theme.__hd__.bottomSheet.shadows.offset,
9723
- shadowOpacity: theme.__hd__.bottomSheet.shadows.opacity,
9724
- shadowRadius: theme.__hd__.bottomSheet.shadows.radius,
9725
- elevation: theme.__hd__.bottomSheet.shadows.elevation,
9726
9818
  backgroundColor: theme.__hd__.bottomSheet.colors.background,
9727
9819
  borderRadius: theme.__hd__.bottomSheet.radii.floating,
9728
9820
  maxHeight: '100%',
@@ -9736,11 +9828,6 @@ var StyledBottomSheet = index$a(AnimatedSafeAreaView)(function (_ref3) {
9736
9828
  borderTopRightRadius: theme.__hd__.bottomSheet.radii["default"],
9737
9829
  backgroundColor: theme.__hd__.bottomSheet.colors.background,
9738
9830
  width: '100%',
9739
- shadowColor: theme.__hd__.bottomSheet.colors.shadow,
9740
- shadowOffset: theme.__hd__.bottomSheet.shadows.offset,
9741
- shadowOpacity: theme.__hd__.bottomSheet.shadows.opacity,
9742
- shadowRadius: theme.__hd__.bottomSheet.shadows.radius,
9743
- elevation: theme.__hd__.bottomSheet.shadows.elevation,
9744
9831
  maxHeight: '94%'
9745
9832
  };
9746
9833
  });
@@ -13098,8 +13185,8 @@ var setStartOrEndDate = function setStartOrEndDate(_ref2) {
13098
13185
  var date = _ref2.date,
13099
13186
  startDate = _ref2.startDate,
13100
13187
  endDate = _ref2.endDate;
13101
- // Prevent selecting same date
13102
- if (isEqDate(date, startDate) || isEqDate(date, endDate)) {
13188
+ // Prevent selecting same date when both dates are set
13189
+ if (startDate && endDate && (isEqDate(date, startDate) || isEqDate(date, endDate))) {
13103
13190
  return {
13104
13191
  startDate: startDate,
13105
13192
  endDate: endDate
@@ -13268,7 +13355,7 @@ var CalendarRange = function CalendarRange(_ref) {
13268
13355
  if (isEqDate(value === null || value === void 0 ? void 0 : value.startDate, date) || isEqDate(value === null || value === void 0 ? void 0 : value.endDate, date)) {
13269
13356
  return /*#__PURE__*/React__namespace.default.createElement(SelectedDate, {
13270
13357
  isStart: isEqDate(date, value === null || value === void 0 ? void 0 : value.startDate),
13271
- showConnector: !!(value !== null && value !== void 0 && value.startDate) && !!(value !== null && value !== void 0 && value.endDate),
13358
+ showConnector: !!(value !== null && value !== void 0 && value.startDate) && !!(value !== null && value !== void 0 && value.endDate) && !isEqDate(value.startDate, value.endDate),
13272
13359
  key: date.toDateString(),
13273
13360
  date: date,
13274
13361
  onPress: function onPress() {
@@ -14380,7 +14467,7 @@ var StyledCheckbox = index$a(reactNative.View)(function (_ref4) {
14380
14467
  flex: 1,
14381
14468
  borderRadius: theme.__hd__.checkbox.radii.icon,
14382
14469
  borderWidth: theme.__hd__.checkbox.borderWidths.icon,
14383
- borderColor: theme.__hd__.checkbox.colors.borders[themeState]
14470
+ borderColor: theme.__hd__.checkbox.colors.checkboxBorder[themeState]
14384
14471
  };
14385
14472
  });
14386
14473
  var StyledCheckMark = index$a(Icon)(function (_ref5) {
@@ -14389,19 +14476,23 @@ var StyledCheckMark = index$a(Icon)(function (_ref5) {
14389
14476
  return {
14390
14477
  position: 'absolute',
14391
14478
  top: theme.__hd__.checkbox.space.iconTop,
14392
- color: theme.__hd__.checkbox.colors.borders[themeState]
14479
+ color: theme.__hd__.checkbox.colors.checkboxBorder[themeState]
14393
14480
  };
14394
14481
  });
14395
14482
 
14396
14483
  var getThemeState = function getThemeState(_ref) {
14397
14484
  var disabled = _ref.disabled,
14398
- readonly = _ref.readonly;
14485
+ readonly = _ref.readonly,
14486
+ checked = _ref.checked;
14399
14487
  if (disabled) {
14400
14488
  return 'disabled';
14401
14489
  }
14402
14490
  if (readonly) {
14403
14491
  return 'readonly';
14404
14492
  }
14493
+ if (checked) {
14494
+ return 'checked';
14495
+ }
14405
14496
  return 'default';
14406
14497
  };
14407
14498
  var Checkbox = function Checkbox(_ref2) {
@@ -14419,7 +14510,8 @@ var Checkbox = function Checkbox(_ref2) {
14419
14510
  useDeprecation("Checkbox's withBorder prop will be removed in the next major release, all checkboxes will have border by default. Please remove it.", withBorder === true);
14420
14511
  var themeState = getThemeState({
14421
14512
  disabled: disabled,
14422
- readonly: readonly
14513
+ readonly: readonly,
14514
+ checked: checked
14423
14515
  });
14424
14516
  return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$8, {
14425
14517
  onPress: onPress,
@@ -14612,11 +14704,13 @@ var renderInput$1 = function renderInput(_ref3) {
14612
14704
  var variant = _ref3.variant,
14613
14705
  nativeInputProps = _ref3.nativeInputProps,
14614
14706
  renderInputValue = _ref3.renderInputValue,
14615
- ref = _ref3.ref;
14707
+ ref = _ref3.ref,
14708
+ theme = _ref3.theme;
14616
14709
  return renderInputValue ? renderInputValue(nativeInputProps) : /*#__PURE__*/React__namespace.default.createElement(StyledTextInput, _extends$1({}, nativeInputProps, {
14617
14710
  themeVariant: variant,
14618
14711
  multiline: variant === 'textarea' || nativeInputProps.multiline,
14619
- ref: ref
14712
+ ref: ref,
14713
+ placeholderTextColor: theme.__hd__.textInput.colors.placeholder
14620
14714
  }));
14621
14715
  };
14622
14716
  var renderSuffix$1 = function renderSuffix(_ref4) {
@@ -14871,13 +14965,14 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
14871
14965
  },
14872
14966
  themeState: state,
14873
14967
  testID: "input-label-asterisk"
14874
- }, "*"), label)), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputAndLabelContainer, null, renderInput$1({
14968
+ }, "*"), /*#__PURE__*/React__namespace.default.createElement(Typography.Body, null, label))), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputAndLabelContainer, null, renderInput$1({
14875
14969
  variant: variant,
14876
14970
  nativeInputProps: nativeInputProps,
14877
14971
  renderInputValue: renderInputValue,
14878
14972
  ref: function ref(rnTextInputRef) {
14879
14973
  innerTextInput.current = rnTextInputRef;
14880
- }
14974
+ },
14975
+ theme: theme
14881
14976
  })), renderSuffix$1({
14882
14977
  state: state,
14883
14978
  loading: loading,
@@ -16180,7 +16275,7 @@ var AnimatedTouchableHighlight = reactNative.Animated.createAnimatedComponent(re
16180
16275
  var StyledFAB$2 = index$a(AnimatedTouchableHighlight)(function (_ref) {
16181
16276
  var theme = _ref.theme,
16182
16277
  themeActive = _ref.themeActive;
16183
- return {
16278
+ return _objectSpread2({
16184
16279
  backgroundColor: themeActive ? theme.__hd__.fab.colors.buttonActiveBackground : theme.__hd__.fab.colors.buttonBackground,
16185
16280
  borderRadius: theme.radii.rounded,
16186
16281
  alignItems: 'center',
@@ -16188,13 +16283,8 @@ var StyledFAB$2 = index$a(AnimatedTouchableHighlight)(function (_ref) {
16188
16283
  alignSelf: 'flex-start',
16189
16284
  padding: theme.__hd__.fab.space.containerPadding,
16190
16285
  flexDirection: 'row',
16191
- elevation: theme.__hd__.fab.shadows.elevation,
16192
- shadowColor: theme.__hd__.fab.shadows.color,
16193
- shadowOffset: theme.__hd__.fab.shadows.offset,
16194
- shadowRadius: theme.__hd__.fab.shadows.radius,
16195
- shadowOpacity: theme.__hd__.fab.shadows.opacity,
16196
16286
  height: theme.__hd__.fab.sizes.height
16197
- };
16287
+ }, theme.__hd__.fab.shadows["default"]);
16198
16288
  });
16199
16289
  var StyledFABIcon = index$a(Icon)(function (_ref2) {
16200
16290
  var theme = _ref2.theme;
@@ -16490,7 +16580,7 @@ var StyledBackdrop = index$a(AnimatedPressable)(function (_ref2) {
16490
16580
  right: 0,
16491
16581
  top: 0,
16492
16582
  bottom: 0,
16493
- opacity: 0.8,
16583
+ opacity: 0.4,
16494
16584
  backgroundColor: theme.__hd__.fab.colors.backdropBackground
16495
16585
  };
16496
16586
  });
@@ -19487,7 +19577,8 @@ var StyledWrapper$2 = index$a(reactNative.View)(function (_ref) {
19487
19577
  borderRadius: theme.__hd__["switch"].radii.rounded,
19488
19578
  backgroundColor: theme.__hd__["switch"].colors.backgroundColors[themeVariant],
19489
19579
  display: 'flex',
19490
- justifyContent: 'center'
19580
+ justifyContent: 'center',
19581
+ opacity: themeVariant.includes('disabled') ? 0.4 : 1
19491
19582
  };
19492
19583
  });
19493
19584
  var StyledKnot = index$a(reactNative.Animated.View)(function (_ref2) {
@@ -39842,7 +39933,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
39842
39933
  backgroundColor: theme.__hd__.textInput.colors.labelBackground
39843
39934
  },
39844
39935
  themeState: state
39845
- }, "*"), label)), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputContainer, {
39936
+ }, "*"), /*#__PURE__*/React__namespace.default.createElement(Typography.Body, null, label))), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputContainer, {
39846
39937
  onLayout: onLayout
39847
39938
  }, /*#__PURE__*/React__namespace.default.createElement(StyledBorderBackDrop, {
39848
39939
  themeState: state,
@@ -40237,6 +40328,7 @@ var SearchOneLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
40237
40328
  _React$useState2 = _slicedToArray(_React$useState, 2),
40238
40329
  isFocused = _React$useState2[0],
40239
40330
  setIsFocused = _React$useState2[1];
40331
+ var theme = useTheme();
40240
40332
  var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
40241
40333
  var isEmptyValue = displayText.length === 0;
40242
40334
  var state = getState({
@@ -40321,7 +40413,8 @@ var SearchOneLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
40321
40413
  maxLength: maxLength,
40322
40414
  value: value,
40323
40415
  defaultValue: defaultValue,
40324
- placeholder: placeholder
40416
+ placeholder: placeholder,
40417
+ placeholderTextColor: theme.__hd__.textInput.colors.placeholder
40325
40418
  }),
40326
40419
  ref: function ref(rnTextInputRef) {
40327
40420
  innerTextInput.current = rnTextInputRef;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.91.1",
3
+ "version": "8.91.4",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -807,7 +807,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders ActionGr
807
807
  "backgroundColor": "#000000",
808
808
  "borderRadius": 999,
809
809
  "bottom": undefined,
810
- "elevation": 3,
810
+ "elevation": 6,
811
811
  "flexDirection": "row",
812
812
  "height": 64,
813
813
  "justifyContent": "center",
@@ -821,7 +821,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders ActionGr
821
821
  "width": 0,
822
822
  },
823
823
  "shadowOpacity": 0.12,
824
- "shadowRadius": 4,
824
+ "shadowRadius": 2,
825
825
  "transform": [
826
826
  {
827
827
  "translateY": 0,
@@ -1721,7 +1721,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders FAB corr
1721
1721
  "backgroundColor": "#000000",
1722
1722
  "borderRadius": 999,
1723
1723
  "bottom": undefined,
1724
- "elevation": 3,
1724
+ "elevation": 6,
1725
1725
  "flexDirection": "row",
1726
1726
  "height": 64,
1727
1727
  "justifyContent": "center",
@@ -1733,7 +1733,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders FAB corr
1733
1733
  "width": 0,
1734
1734
  },
1735
1735
  "shadowOpacity": 0.12,
1736
- "shadowRadius": 4,
1736
+ "shadowRadius": 2,
1737
1737
  "transform": [
1738
1738
  {
1739
1739
  "translateY": 0,
@@ -1991,7 +1991,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders Action
1991
1991
  "backgroundColor": "#000000",
1992
1992
  "borderRadius": 999,
1993
1993
  "bottom": undefined,
1994
- "elevation": 3,
1994
+ "elevation": 6,
1995
1995
  "flexDirection": "row",
1996
1996
  "height": 64,
1997
1997
  "justifyContent": "center",
@@ -2005,7 +2005,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders Action
2005
2005
  "width": 0,
2006
2006
  },
2007
2007
  "shadowOpacity": 0.12,
2008
- "shadowRadius": 4,
2008
+ "shadowRadius": 2,
2009
2009
  "transform": [
2010
2010
  {
2011
2011
  "translateY": 0,
@@ -2245,7 +2245,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders FAB co
2245
2245
  "backgroundColor": "#000000",
2246
2246
  "borderRadius": 999,
2247
2247
  "bottom": undefined,
2248
- "elevation": 3,
2248
+ "elevation": 6,
2249
2249
  "flexDirection": "row",
2250
2250
  "height": 64,
2251
2251
  "justifyContent": "center",
@@ -2257,7 +2257,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders FAB co
2257
2257
  "width": 0,
2258
2258
  },
2259
2259
  "shadowOpacity": 0.12,
2260
- "shadowRadius": 4,
2260
+ "shadowRadius": 2,
2261
2261
  "transform": [
2262
2262
  {
2263
2263
  "translateY": 0,
@@ -2822,7 +2822,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders Actio
2822
2822
  "backgroundColor": "#000000",
2823
2823
  "borderRadius": 999,
2824
2824
  "bottom": undefined,
2825
- "elevation": 3,
2825
+ "elevation": 6,
2826
2826
  "flexDirection": "row",
2827
2827
  "height": 64,
2828
2828
  "justifyContent": "center",
@@ -2836,7 +2836,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders Actio
2836
2836
  "width": 0,
2837
2837
  },
2838
2838
  "shadowOpacity": 0.12,
2839
- "shadowRadius": 4,
2839
+ "shadowRadius": 2,
2840
2840
  "transform": [
2841
2841
  {
2842
2842
  "translateY": 0,
@@ -3383,7 +3383,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders FAB c
3383
3383
  "backgroundColor": "#000000",
3384
3384
  "borderRadius": 999,
3385
3385
  "bottom": undefined,
3386
- "elevation": 3,
3386
+ "elevation": 6,
3387
3387
  "flexDirection": "row",
3388
3388
  "height": 64,
3389
3389
  "justifyContent": "center",
@@ -3395,7 +3395,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders FAB c
3395
3395
  "width": 0,
3396
3396
  },
3397
3397
  "shadowOpacity": 0.12,
3398
- "shadowRadius": 4,
3398
+ "shadowRadius": 2,
3399
3399
  "transform": [
3400
3400
  {
3401
3401
  "translateY": 0,
@@ -33,11 +33,6 @@ const StyledFloatingWrapper = styled(AnimatedSafeAreaView)(({ theme }) => ({
33
33
 
34
34
  const StyledFloatingBottomSheet = styled(Animated.View)(({ theme }) => ({
35
35
  width: '100%',
36
- shadowColor: theme.__hd__.bottomSheet.colors.shadow,
37
- shadowOffset: theme.__hd__.bottomSheet.shadows.offset,
38
- shadowOpacity: theme.__hd__.bottomSheet.shadows.opacity,
39
- shadowRadius: theme.__hd__.bottomSheet.shadows.radius,
40
- elevation: theme.__hd__.bottomSheet.shadows.elevation,
41
36
  backgroundColor: theme.__hd__.bottomSheet.colors.background,
42
37
  borderRadius: theme.__hd__.bottomSheet.radii.floating,
43
38
  maxHeight: '100%',
@@ -51,11 +46,6 @@ const StyledBottomSheet = styled(AnimatedSafeAreaView)<
51
46
  borderTopRightRadius: theme.__hd__.bottomSheet.radii.default,
52
47
  backgroundColor: theme.__hd__.bottomSheet.colors.background,
53
48
  width: '100%',
54
- shadowColor: theme.__hd__.bottomSheet.colors.shadow,
55
- shadowOffset: theme.__hd__.bottomSheet.shadows.offset,
56
- shadowOpacity: theme.__hd__.bottomSheet.shadows.opacity,
57
- shadowRadius: theme.__hd__.bottomSheet.shadows.radius,
58
- elevation: theme.__hd__.bottomSheet.shadows.elevation,
59
49
  maxHeight: '94%',
60
50
  }));
61
51
 
@@ -163,15 +163,7 @@ exports[`BottomSheet renders correctly with open state 1`] = `
163
163
  "backgroundColor": "#ffffff",
164
164
  "borderTopLeftRadius": 16,
165
165
  "borderTopRightRadius": 16,
166
- "elevation": 10,
167
166
  "maxHeight": "94%",
168
- "shadowColor": "#001f23",
169
- "shadowOffset": {
170
- "height": 3,
171
- "width": 0,
172
- },
173
- "shadowOpacity": 0.4,
174
- "shadowRadius": 16,
175
167
  "transform": [
176
168
  {
177
169
  "scaleY": 1,
@@ -507,16 +499,8 @@ exports[`BottomSheet renders floating BottomSheet correctly 1`] = `
507
499
  {
508
500
  "backgroundColor": "#ffffff",
509
501
  "borderRadius": 32,
510
- "elevation": 10,
511
502
  "maxHeight": "100%",
512
503
  "padding": 8,
513
- "shadowColor": "#001f23",
514
- "shadowOffset": {
515
- "height": 3,
516
- "width": 0,
517
- },
518
- "shadowOpacity": 0.4,
519
- "shadowRadius": 16,
520
504
  "transform": [
521
505
  {
522
506
  "scaleY": 1,
@@ -191,7 +191,11 @@ const CalendarRange = ({
191
191
  return (
192
192
  <SelectedDate
193
193
  isStart={isEqDate(date, value?.startDate)}
194
- showConnector={!!value?.startDate && !!value?.endDate}
194
+ showConnector={
195
+ !!value?.startDate &&
196
+ !!value?.endDate &&
197
+ !isEqDate(value.startDate, value.endDate)
198
+ }
195
199
  key={date.toDateString()}
196
200
  date={date}
197
201
  onPress={() => onDateChange(date)}