@hero-design/rn 8.91.1 → 8.91.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 (86) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/CHANGELOG.md +16 -0
  3. package/es/index.js +155 -35
  4. package/lib/index.js +155 -35
  5. package/package.json +1 -1
  6. package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap +6 -6
  7. package/src/components/Checkbox/StyledCheckbox.tsx +3 -3
  8. package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +1 -1
  9. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  10. package/src/components/Checkbox/__tests__/index.spec.tsx +11 -7
  11. package/src/components/Checkbox/index.tsx +11 -2
  12. package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
  13. package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +63 -3
  14. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +21 -1
  15. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +21 -1
  16. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +42 -2
  17. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  18. package/src/components/FAB/Pair/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  19. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +2 -2
  20. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  21. package/src/components/FloatingIsland/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  22. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +3 -2
  23. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -2
  24. package/src/components/MapPin/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  25. package/src/components/RichTextEditor/RichTextEditor.tsx +2 -1
  26. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +40 -2
  27. package/src/components/Search/SearchOneLine.tsx +3 -1
  28. package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +7 -0
  29. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +147 -7
  30. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +126 -6
  31. package/src/components/Slider/__tests__/__snapshots__/RangeSlider.spec.tsx.snap +2 -2
  32. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  33. package/src/components/Switch/StyledSwitch.tsx +1 -0
  34. package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +8 -4
  35. package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +4 -2
  36. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +337 -16
  37. package/src/components/TextInput/__tests__/index.spec.tsx +2 -0
  38. package/src/components/TextInput/index.tsx +7 -2
  39. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +42 -2
  40. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +42 -2
  41. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +7 -7
  42. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +42 -14
  43. package/src/theme/components/checkbox.ts +7 -0
  44. package/src/theme/components/switch.ts +5 -5
  45. package/src/theme/components/textInput.ts +1 -0
  46. package/src/theme/global/colors/__tests__/__snapshots__/swagLight.spec.ts.snap +4 -3
  47. package/src/theme/global/colors/__tests__/__snapshots__/swagLightGlobal.spec.ts.snap +3 -3
  48. package/src/theme/global/colors/__tests__/__snapshots__/swagLightJobs.spec.ts.snap +4 -3
  49. package/src/theme/global/colors/ehWorkDark.ts +1 -0
  50. package/src/theme/global/colors/swagLight.ts +1 -0
  51. package/src/theme/global/colors/swagLightGlobal.ts +3 -3
  52. package/src/theme/global/colors/swagLightJobs.ts +3 -1
  53. package/src/theme/global/colors/types.ts +2 -0
  54. package/src/theme/global/shadows/__tests__/__snapshots__/ehWorkDark.spec.ts.snap +36 -0
  55. package/src/theme/global/shadows/__tests__/__snapshots__/swagLight.spec.ts.snap +36 -0
  56. package/src/theme/global/shadows/__tests__/__snapshots__/swagLightJobs.spec.ts.snap +36 -0
  57. package/src/theme/global/shadows/__tests__/ehWorkDark.spec.ts +7 -0
  58. package/src/theme/global/shadows/__tests__/index.spec.ts +24 -0
  59. package/src/theme/global/shadows/__tests__/swagLight.spec.ts +7 -0
  60. package/src/theme/global/shadows/__tests__/swagLightJobs.spec.ts +7 -0
  61. package/src/theme/global/shadows/ehWorkDark.ts +37 -0
  62. package/src/theme/global/shadows/index.ts +23 -0
  63. package/src/theme/global/shadows/swagLight.ts +37 -0
  64. package/src/theme/global/shadows/swagLightJobs.ts +37 -0
  65. package/src/theme/global/shadows/types.ts +16 -0
  66. package/stats/8.91.2/rn-stats.html +4842 -0
  67. package/stats/8.91.3/rn-stats.html +4844 -0
  68. package/types/components/Checkbox/StyledCheckbox.d.ts +1 -1
  69. package/types/components/Checkbox/index.d.ts +2 -1
  70. package/types/components/TextInput/index.d.ts +3 -1
  71. package/types/theme/components/checkbox.d.ts +7 -0
  72. package/types/theme/components/chip.d.ts +1 -10
  73. package/types/theme/components/floatingIsland.d.ts +1 -10
  74. package/types/theme/components/slider.d.ts +1 -10
  75. package/types/theme/components/switch.d.ts +1 -1
  76. package/types/theme/components/textInput.d.ts +1 -0
  77. package/types/theme/global/colors/swagLightJobs.d.ts +2 -50
  78. package/types/theme/global/colors/types.d.ts +2 -0
  79. package/types/theme/global/index.d.ts +2 -12
  80. package/types/theme/global/shadows/ehWorkDark.d.ts +3 -0
  81. package/types/theme/global/shadows/index.d.ts +5 -0
  82. package/types/theme/global/shadows/swagLight.d.ts +3 -0
  83. package/types/theme/global/shadows/swagLightJobs.d.ts +3 -0
  84. package/types/theme/global/shadows/types.d.ts +15 -0
  85. package/src/theme/global/shadows.ts +0 -19
  86. package/types/theme/global/shadows.d.ts +0 -16
@@ -1,4 +1,4 @@
1
- (node:3055) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
1
+ (node:3043) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
2
2
  (Use `node --trace-warnings ...` to show where the warning was created)
3
3
  
4
4
  src/index.ts → lib/index.js, es/index.js...
@@ -10,4 +10,4 @@
10
10
     ~~~~~~~~~~~~~~~~~~~
11
11
  
12
12
  (!) [plugin node-resolve] preferring built-in module 'events' over local alternative at '/home/runner/work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning.or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.
13
- created lib/index.js, es/index.js in 52.1s
13
+ created lib/index.js, es/index.js in 51.4s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @hero-design/rn
2
2
 
3
+ ## 8.91.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#3696](https://github.com/Thinkei/hero-design/pull/3696) [`769f2738b4d870703ad169290f3cc36305920a28`](https://github.com/Thinkei/hero-design/commit/769f2738b4d870703ad169290f3cc36305920a28) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - Update mobile shadow tokens
8
+
9
+ ## 8.91.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [#3694](https://github.com/Thinkei/hero-design/pull/3694) [`6b5810543df428ac5e4ffb6be8a3a0c820177d23`](https://github.com/Thinkei/hero-design/commit/6b5810543df428ac5e4ffb6be8a3a0c820177d23) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Checkbox][switch] Update color
14
+
15
+ - [#3695](https://github.com/Thinkei/hero-design/pull/3695) [`5b3d9e000462957834b653bf9f2a3934f39aca6b`](https://github.com/Thinkei/hero-design/commit/5b3d9e000462957834b653bf9f2a3934f39aca6b) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Search.OneLine][textinput] Update placeholder color
16
+
17
+ - [#3697](https://github.com/Thinkei/hero-design/pull/3697) [`0bb02b0f890e99650c5dce6afc231da2c3507539`](https://github.com/Thinkei/hero-design/commit/0bb02b0f890e99650c5dce6afc231da2c3507539) Thanks [@luanlai2201](https://github.com/luanlai2201)! - [TextInput][richtexteditor] Add element to wrap the label
18
+
3
19
  ## 8.91.1
4
20
 
5
21
  ### Patch Changes
package/es/index.js CHANGED
@@ -1986,10 +1986,10 @@ var swagDarkSystemPalette = _objectSpread2(_objectSpread2(_objectSpread2({}, glo
1986
1986
 
1987
1987
  var swagLightGlobalPalette = _objectSpread2(_objectSpread2({}, globalPalette$1), {}, {
1988
1988
  onDefaultGlobalSurface: palette$3.offBlack,
1989
- mutedOnDefaultGlobalSurface: palette$3.offBlackLight30,
1990
- inactiveOnDefaultGlobalSurface: palette$3.offBlackLight50,
1989
+ mutedOnDefaultGlobalSurface: '#4d6265',
1990
+ inactiveOnDefaultGlobalSurface: '#808f91',
1991
1991
  primaryOutline: palette$3.offBlack,
1992
- inactiveOutline: palette$3.offBlackLight50
1992
+ inactiveOutline: '#808f91'
1993
1993
  });
1994
1994
 
1995
1995
  var swagBrandSystemPallete = {
@@ -2005,9 +2005,12 @@ var swagBrandSystemPallete = {
2005
2005
  decorativeSecondary: '#fdfbff',
2006
2006
  decorativeSecondarySurface: '#f0e6ff'
2007
2007
  };
2008
- var swagSystemPalette = _objectSpread2(_objectSpread2({}, swagLightGlobalPalette), swagBrandSystemPallete);
2008
+ var swagSystemPalette = _objectSpread2(_objectSpread2(_objectSpread2({}, swagLightGlobalPalette), swagBrandSystemPallete), {}, {
2009
+ name: 'swagLight'
2010
+ });
2009
2011
 
2010
2012
  var swagLightJobsSystemPalette = _objectSpread2(_objectSpread2({}, swagSystemPalette), {}, {
2013
+ name: 'swagLightJobs',
2011
2014
  secondary: '#40d1ff',
2012
2015
  onSecondary: '#460078',
2013
2016
  secondaryHighlightedSurface: '#ecfaff',
@@ -2124,7 +2127,8 @@ var ehWorkDarkSystemPalette = {
2124
2127
  decorativeSecondary: '#280541',
2125
2128
  decorativeSecondarySurface: '#4c1d95',
2126
2129
  // Theme Mode
2127
- themeMode: 'dark'
2130
+ themeMode: 'dark',
2131
+ name: 'ehWorkDark'
2128
2132
  };
2129
2133
 
2130
2134
  var BASE_WIDTH = 390; // Based on iPhone 13's viewport size
@@ -2289,19 +2293,116 @@ var getRadii = function getRadii(baseRadius) {
2289
2293
  };
2290
2294
  };
2291
2295
 
2292
- var getShadows = function getShadows(systemPalette) {
2293
- return {
2294
- "default": {
2295
- shadowOffset: {
2296
- width: 0,
2297
- height: 2
2298
- },
2299
- shadowColor: systemPalette.primaryOutline,
2300
- shadowOpacity: 0.12,
2301
- shadowRadius: 4,
2302
- elevation: 3
2303
- }
2304
- };
2296
+ var swagLightShadowPalette = {
2297
+ "default": {
2298
+ shadowOffset: {
2299
+ width: 0,
2300
+ height: 2
2301
+ },
2302
+ shadowColor: swagSystemPalette.primaryOutline,
2303
+ shadowOpacity: 0.12,
2304
+ shadowRadius: 4,
2305
+ elevation: 3
2306
+ },
2307
+ cardDrawer: {
2308
+ shadowOffset: {
2309
+ width: 0,
2310
+ height: 2
2311
+ },
2312
+ shadowColor: '#001f23',
2313
+ shadowOpacity: 0.12,
2314
+ shadowRadius: 2,
2315
+ elevation: 6
2316
+ },
2317
+ tabBar: {
2318
+ shadowOffset: {
2319
+ width: 0,
2320
+ height: -4
2321
+ },
2322
+ shadowColor: '#001f23',
2323
+ shadowOpacity: 0.04,
2324
+ shadowRadius: 6,
2325
+ elevation: 10
2326
+ }
2327
+ };
2328
+
2329
+ var swagLightJobsShadowPalette = {
2330
+ "default": {
2331
+ shadowOffset: {
2332
+ width: 0,
2333
+ height: 2
2334
+ },
2335
+ shadowColor: swagLightJobsSystemPalette.primaryOutline,
2336
+ shadowOpacity: 0.12,
2337
+ shadowRadius: 4,
2338
+ elevation: 3
2339
+ },
2340
+ cardDrawer: {
2341
+ shadowOffset: {
2342
+ width: 0,
2343
+ height: 2
2344
+ },
2345
+ shadowColor: '#001f23',
2346
+ shadowOpacity: 0.12,
2347
+ shadowRadius: 2,
2348
+ elevation: 6
2349
+ },
2350
+ tabBar: {
2351
+ shadowOffset: {
2352
+ width: 0,
2353
+ height: -4
2354
+ },
2355
+ shadowColor: '#001f23',
2356
+ shadowOpacity: 0.04,
2357
+ shadowRadius: 6,
2358
+ elevation: 10
2359
+ }
2360
+ };
2361
+
2362
+ var ehWorkDarkShadowPalette = {
2363
+ "default": {
2364
+ shadowOffset: {
2365
+ width: 0,
2366
+ height: 2
2367
+ },
2368
+ shadowColor: ehWorkDarkSystemPalette.primaryOutline,
2369
+ shadowOpacity: 0.12,
2370
+ shadowRadius: 4,
2371
+ elevation: 3
2372
+ },
2373
+ cardDrawer: {
2374
+ shadowOffset: {
2375
+ width: 0,
2376
+ height: 2
2377
+ },
2378
+ shadowColor: '#000000',
2379
+ shadowOpacity: 0.56,
2380
+ shadowRadius: 2,
2381
+ elevation: 6
2382
+ },
2383
+ tabBar: {
2384
+ shadowOffset: {
2385
+ width: 0,
2386
+ height: -4
2387
+ },
2388
+ shadowColor: '#000000',
2389
+ shadowOpacity: 0.24,
2390
+ shadowRadius: 6,
2391
+ elevation: 10
2392
+ }
2393
+ };
2394
+
2395
+ var getShadows = function getShadows(palette) {
2396
+ switch (palette.name) {
2397
+ case 'swagLight':
2398
+ return swagLightShadowPalette;
2399
+ case 'swagLightJobs':
2400
+ return swagLightJobsShadowPalette;
2401
+ case 'ehWorkDark':
2402
+ return ehWorkDarkShadowPalette;
2403
+ default:
2404
+ return swagLightShadowPalette;
2405
+ }
2305
2406
  };
2306
2407
 
2307
2408
  var getGlobalTheme = function getGlobalTheme(scale, systemPalette) {
@@ -2808,8 +2909,15 @@ var getCheckboxTheme = function getCheckboxTheme(theme) {
2808
2909
  var colors = {
2809
2910
  borders: {
2810
2911
  "default": theme.colors.primaryOutline,
2912
+ checked: theme.colors.primaryOutline,
2811
2913
  disabled: theme.colors.disabledOutline,
2812
2914
  readonly: theme.colors.inactiveOutline
2915
+ },
2916
+ checkboxBorder: {
2917
+ "default": theme.colors.primaryOutline,
2918
+ checked: theme.colors.primary,
2919
+ disabled: theme.colors.disabledOutline,
2920
+ readonly: theme.colors.mutedOnDefaultGlobalSurface
2813
2921
  }
2814
2922
  };
2815
2923
  var space = {
@@ -3582,14 +3690,14 @@ var getSwipeableTheme = function getSwipeableTheme(theme) {
3582
3690
  var getSwitchTheme = function getSwitchTheme(theme) {
3583
3691
  var colors = {
3584
3692
  backgroundColors: {
3585
- checked: theme.colors.primary,
3693
+ checked: theme.colors.pressedSurface,
3586
3694
  unchecked: theme.colors.inactiveOnDefaultGlobalSurface,
3587
- 'disabled-checked': theme.colors.highlightedSurface,
3588
- 'disabled-unchecked': theme.colors.mutedOnDefaultGlobalSurface
3695
+ 'disabled-checked': theme.colors.inactiveOnDefaultGlobalSurface,
3696
+ 'disabled-unchecked': theme.colors.inactiveOnDefaultGlobalSurface
3589
3697
  },
3590
- thumb: theme.colors.onDarkGlobalSurface,
3698
+ thumb: theme.colors.white,
3591
3699
  selector: {
3592
- background: theme.colors.defaultGlobalSurface,
3700
+ background: theme.colors.neutralGlobalSurface,
3593
3701
  textBackground: theme.colors.decorativePrimarySurface
3594
3702
  }
3595
3703
  };
@@ -3745,7 +3853,8 @@ var getTextInputTheme = function getTextInputTheme(theme) {
3745
3853
  disabled: theme.colors.disabledOnDefaultGlobalSurface,
3746
3854
  readonly: theme.colors.inactiveOnDefaultGlobalSurface,
3747
3855
  filled: theme.colors.onDefaultGlobalSurface
3748
- }
3856
+ },
3857
+ placeholder: theme.colors.mutedOnDefaultGlobalSurface
3749
3858
  };
3750
3859
  var space = {
3751
3860
  containerPadding: theme.space.medium,
@@ -14352,7 +14461,7 @@ var StyledCheckbox = index$a(View)(function (_ref4) {
14352
14461
  flex: 1,
14353
14462
  borderRadius: theme.__hd__.checkbox.radii.icon,
14354
14463
  borderWidth: theme.__hd__.checkbox.borderWidths.icon,
14355
- borderColor: theme.__hd__.checkbox.colors.borders[themeState]
14464
+ borderColor: theme.__hd__.checkbox.colors.checkboxBorder[themeState]
14356
14465
  };
14357
14466
  });
14358
14467
  var StyledCheckMark = index$a(Icon)(function (_ref5) {
@@ -14361,19 +14470,23 @@ var StyledCheckMark = index$a(Icon)(function (_ref5) {
14361
14470
  return {
14362
14471
  position: 'absolute',
14363
14472
  top: theme.__hd__.checkbox.space.iconTop,
14364
- color: theme.__hd__.checkbox.colors.borders[themeState]
14473
+ color: theme.__hd__.checkbox.colors.checkboxBorder[themeState]
14365
14474
  };
14366
14475
  });
14367
14476
 
14368
14477
  var getThemeState = function getThemeState(_ref) {
14369
14478
  var disabled = _ref.disabled,
14370
- readonly = _ref.readonly;
14479
+ readonly = _ref.readonly,
14480
+ checked = _ref.checked;
14371
14481
  if (disabled) {
14372
14482
  return 'disabled';
14373
14483
  }
14374
14484
  if (readonly) {
14375
14485
  return 'readonly';
14376
14486
  }
14487
+ if (checked) {
14488
+ return 'checked';
14489
+ }
14377
14490
  return 'default';
14378
14491
  };
14379
14492
  var Checkbox = function Checkbox(_ref2) {
@@ -14391,7 +14504,8 @@ var Checkbox = function Checkbox(_ref2) {
14391
14504
  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);
14392
14505
  var themeState = getThemeState({
14393
14506
  disabled: disabled,
14394
- readonly: readonly
14507
+ readonly: readonly,
14508
+ checked: checked
14395
14509
  });
14396
14510
  return /*#__PURE__*/React__default.createElement(StyledWrapper$8, {
14397
14511
  onPress: onPress,
@@ -14584,11 +14698,13 @@ var renderInput$1 = function renderInput(_ref3) {
14584
14698
  var variant = _ref3.variant,
14585
14699
  nativeInputProps = _ref3.nativeInputProps,
14586
14700
  renderInputValue = _ref3.renderInputValue,
14587
- ref = _ref3.ref;
14701
+ ref = _ref3.ref,
14702
+ theme = _ref3.theme;
14588
14703
  return renderInputValue ? renderInputValue(nativeInputProps) : /*#__PURE__*/React__default.createElement(StyledTextInput, _extends$1({}, nativeInputProps, {
14589
14704
  themeVariant: variant,
14590
14705
  multiline: variant === 'textarea' || nativeInputProps.multiline,
14591
- ref: ref
14706
+ ref: ref,
14707
+ placeholderTextColor: theme.__hd__.textInput.colors.placeholder
14592
14708
  }));
14593
14709
  };
14594
14710
  var renderSuffix$1 = function renderSuffix(_ref4) {
@@ -14843,13 +14959,14 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
14843
14959
  },
14844
14960
  themeState: state,
14845
14961
  testID: "input-label-asterisk"
14846
- }, "*"), label)), /*#__PURE__*/React__default.createElement(StyledTextInputAndLabelContainer, null, renderInput$1({
14962
+ }, "*"), /*#__PURE__*/React__default.createElement(Typography.Body, null, label))), /*#__PURE__*/React__default.createElement(StyledTextInputAndLabelContainer, null, renderInput$1({
14847
14963
  variant: variant,
14848
14964
  nativeInputProps: nativeInputProps,
14849
14965
  renderInputValue: renderInputValue,
14850
14966
  ref: function ref(rnTextInputRef) {
14851
14967
  innerTextInput.current = rnTextInputRef;
14852
- }
14968
+ },
14969
+ theme: theme
14853
14970
  })), renderSuffix$1({
14854
14971
  state: state,
14855
14972
  loading: loading,
@@ -19459,7 +19576,8 @@ var StyledWrapper$2 = index$a(View)(function (_ref) {
19459
19576
  borderRadius: theme.__hd__["switch"].radii.rounded,
19460
19577
  backgroundColor: theme.__hd__["switch"].colors.backgroundColors[themeVariant],
19461
19578
  display: 'flex',
19462
- justifyContent: 'center'
19579
+ justifyContent: 'center',
19580
+ opacity: themeVariant.includes('disabled') ? 0.4 : 1
19463
19581
  };
19464
19582
  });
19465
19583
  var StyledKnot = index$a(Animated.View)(function (_ref2) {
@@ -39814,7 +39932,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
39814
39932
  backgroundColor: theme.__hd__.textInput.colors.labelBackground
39815
39933
  },
39816
39934
  themeState: state
39817
- }, "*"), label)), /*#__PURE__*/React__default.createElement(StyledTextInputContainer, {
39935
+ }, "*"), /*#__PURE__*/React__default.createElement(Typography.Body, null, label))), /*#__PURE__*/React__default.createElement(StyledTextInputContainer, {
39818
39936
  onLayout: onLayout
39819
39937
  }, /*#__PURE__*/React__default.createElement(StyledBorderBackDrop, {
39820
39938
  themeState: state,
@@ -40209,6 +40327,7 @@ var SearchOneLine = /*#__PURE__*/forwardRef(function (props, ref) {
40209
40327
  _React$useState2 = _slicedToArray(_React$useState, 2),
40210
40328
  isFocused = _React$useState2[0],
40211
40329
  setIsFocused = _React$useState2[1];
40330
+ var theme = useTheme();
40212
40331
  var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
40213
40332
  var isEmptyValue = displayText.length === 0;
40214
40333
  var state = getState({
@@ -40293,7 +40412,8 @@ var SearchOneLine = /*#__PURE__*/forwardRef(function (props, ref) {
40293
40412
  maxLength: maxLength,
40294
40413
  value: value,
40295
40414
  defaultValue: defaultValue,
40296
- placeholder: placeholder
40415
+ placeholder: placeholder,
40416
+ placeholderTextColor: theme.__hd__.textInput.colors.placeholder
40297
40417
  }),
40298
40418
  ref: function ref(rnTextInputRef) {
40299
40419
  innerTextInput.current = rnTextInputRef;
package/lib/index.js CHANGED
@@ -2014,10 +2014,10 @@ var swagDarkSystemPalette = _objectSpread2(_objectSpread2(_objectSpread2({}, glo
2014
2014
 
2015
2015
  var swagLightGlobalPalette = _objectSpread2(_objectSpread2({}, globalPalette$1), {}, {
2016
2016
  onDefaultGlobalSurface: palette$3.offBlack,
2017
- mutedOnDefaultGlobalSurface: palette$3.offBlackLight30,
2018
- inactiveOnDefaultGlobalSurface: palette$3.offBlackLight50,
2017
+ mutedOnDefaultGlobalSurface: '#4d6265',
2018
+ inactiveOnDefaultGlobalSurface: '#808f91',
2019
2019
  primaryOutline: palette$3.offBlack,
2020
- inactiveOutline: palette$3.offBlackLight50
2020
+ inactiveOutline: '#808f91'
2021
2021
  });
2022
2022
 
2023
2023
  var swagBrandSystemPallete = {
@@ -2033,9 +2033,12 @@ var swagBrandSystemPallete = {
2033
2033
  decorativeSecondary: '#fdfbff',
2034
2034
  decorativeSecondarySurface: '#f0e6ff'
2035
2035
  };
2036
- var swagSystemPalette = _objectSpread2(_objectSpread2({}, swagLightGlobalPalette), swagBrandSystemPallete);
2036
+ var swagSystemPalette = _objectSpread2(_objectSpread2(_objectSpread2({}, swagLightGlobalPalette), swagBrandSystemPallete), {}, {
2037
+ name: 'swagLight'
2038
+ });
2037
2039
 
2038
2040
  var swagLightJobsSystemPalette = _objectSpread2(_objectSpread2({}, swagSystemPalette), {}, {
2041
+ name: 'swagLightJobs',
2039
2042
  secondary: '#40d1ff',
2040
2043
  onSecondary: '#460078',
2041
2044
  secondaryHighlightedSurface: '#ecfaff',
@@ -2152,7 +2155,8 @@ var ehWorkDarkSystemPalette = {
2152
2155
  decorativeSecondary: '#280541',
2153
2156
  decorativeSecondarySurface: '#4c1d95',
2154
2157
  // Theme Mode
2155
- themeMode: 'dark'
2158
+ themeMode: 'dark',
2159
+ name: 'ehWorkDark'
2156
2160
  };
2157
2161
 
2158
2162
  var BASE_WIDTH = 390; // Based on iPhone 13's viewport size
@@ -2317,19 +2321,116 @@ var getRadii = function getRadii(baseRadius) {
2317
2321
  };
2318
2322
  };
2319
2323
 
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
- };
2324
+ var swagLightShadowPalette = {
2325
+ "default": {
2326
+ shadowOffset: {
2327
+ width: 0,
2328
+ height: 2
2329
+ },
2330
+ shadowColor: swagSystemPalette.primaryOutline,
2331
+ shadowOpacity: 0.12,
2332
+ shadowRadius: 4,
2333
+ elevation: 3
2334
+ },
2335
+ cardDrawer: {
2336
+ shadowOffset: {
2337
+ width: 0,
2338
+ height: 2
2339
+ },
2340
+ shadowColor: '#001f23',
2341
+ shadowOpacity: 0.12,
2342
+ shadowRadius: 2,
2343
+ elevation: 6
2344
+ },
2345
+ tabBar: {
2346
+ shadowOffset: {
2347
+ width: 0,
2348
+ height: -4
2349
+ },
2350
+ shadowColor: '#001f23',
2351
+ shadowOpacity: 0.04,
2352
+ shadowRadius: 6,
2353
+ elevation: 10
2354
+ }
2355
+ };
2356
+
2357
+ var swagLightJobsShadowPalette = {
2358
+ "default": {
2359
+ shadowOffset: {
2360
+ width: 0,
2361
+ height: 2
2362
+ },
2363
+ shadowColor: swagLightJobsSystemPalette.primaryOutline,
2364
+ shadowOpacity: 0.12,
2365
+ shadowRadius: 4,
2366
+ elevation: 3
2367
+ },
2368
+ cardDrawer: {
2369
+ shadowOffset: {
2370
+ width: 0,
2371
+ height: 2
2372
+ },
2373
+ shadowColor: '#001f23',
2374
+ shadowOpacity: 0.12,
2375
+ shadowRadius: 2,
2376
+ elevation: 6
2377
+ },
2378
+ tabBar: {
2379
+ shadowOffset: {
2380
+ width: 0,
2381
+ height: -4
2382
+ },
2383
+ shadowColor: '#001f23',
2384
+ shadowOpacity: 0.04,
2385
+ shadowRadius: 6,
2386
+ elevation: 10
2387
+ }
2388
+ };
2389
+
2390
+ var ehWorkDarkShadowPalette = {
2391
+ "default": {
2392
+ shadowOffset: {
2393
+ width: 0,
2394
+ height: 2
2395
+ },
2396
+ shadowColor: ehWorkDarkSystemPalette.primaryOutline,
2397
+ shadowOpacity: 0.12,
2398
+ shadowRadius: 4,
2399
+ elevation: 3
2400
+ },
2401
+ cardDrawer: {
2402
+ shadowOffset: {
2403
+ width: 0,
2404
+ height: 2
2405
+ },
2406
+ shadowColor: '#000000',
2407
+ shadowOpacity: 0.56,
2408
+ shadowRadius: 2,
2409
+ elevation: 6
2410
+ },
2411
+ tabBar: {
2412
+ shadowOffset: {
2413
+ width: 0,
2414
+ height: -4
2415
+ },
2416
+ shadowColor: '#000000',
2417
+ shadowOpacity: 0.24,
2418
+ shadowRadius: 6,
2419
+ elevation: 10
2420
+ }
2421
+ };
2422
+
2423
+ var getShadows = function getShadows(palette) {
2424
+ switch (palette.name) {
2425
+ case 'swagLight':
2426
+ return swagLightShadowPalette;
2427
+ case 'swagLightJobs':
2428
+ return swagLightJobsShadowPalette;
2429
+ case 'ehWorkDark':
2430
+ return ehWorkDarkShadowPalette;
2431
+ default:
2432
+ return swagLightShadowPalette;
2433
+ }
2333
2434
  };
2334
2435
 
2335
2436
  var getGlobalTheme = function getGlobalTheme(scale, systemPalette) {
@@ -2836,8 +2937,15 @@ var getCheckboxTheme = function getCheckboxTheme(theme) {
2836
2937
  var colors = {
2837
2938
  borders: {
2838
2939
  "default": theme.colors.primaryOutline,
2940
+ checked: theme.colors.primaryOutline,
2839
2941
  disabled: theme.colors.disabledOutline,
2840
2942
  readonly: theme.colors.inactiveOutline
2943
+ },
2944
+ checkboxBorder: {
2945
+ "default": theme.colors.primaryOutline,
2946
+ checked: theme.colors.primary,
2947
+ disabled: theme.colors.disabledOutline,
2948
+ readonly: theme.colors.mutedOnDefaultGlobalSurface
2841
2949
  }
2842
2950
  };
2843
2951
  var space = {
@@ -3610,14 +3718,14 @@ var getSwipeableTheme = function getSwipeableTheme(theme) {
3610
3718
  var getSwitchTheme = function getSwitchTheme(theme) {
3611
3719
  var colors = {
3612
3720
  backgroundColors: {
3613
- checked: theme.colors.primary,
3721
+ checked: theme.colors.pressedSurface,
3614
3722
  unchecked: theme.colors.inactiveOnDefaultGlobalSurface,
3615
- 'disabled-checked': theme.colors.highlightedSurface,
3616
- 'disabled-unchecked': theme.colors.mutedOnDefaultGlobalSurface
3723
+ 'disabled-checked': theme.colors.inactiveOnDefaultGlobalSurface,
3724
+ 'disabled-unchecked': theme.colors.inactiveOnDefaultGlobalSurface
3617
3725
  },
3618
- thumb: theme.colors.onDarkGlobalSurface,
3726
+ thumb: theme.colors.white,
3619
3727
  selector: {
3620
- background: theme.colors.defaultGlobalSurface,
3728
+ background: theme.colors.neutralGlobalSurface,
3621
3729
  textBackground: theme.colors.decorativePrimarySurface
3622
3730
  }
3623
3731
  };
@@ -3773,7 +3881,8 @@ var getTextInputTheme = function getTextInputTheme(theme) {
3773
3881
  disabled: theme.colors.disabledOnDefaultGlobalSurface,
3774
3882
  readonly: theme.colors.inactiveOnDefaultGlobalSurface,
3775
3883
  filled: theme.colors.onDefaultGlobalSurface
3776
- }
3884
+ },
3885
+ placeholder: theme.colors.mutedOnDefaultGlobalSurface
3777
3886
  };
3778
3887
  var space = {
3779
3888
  containerPadding: theme.space.medium,
@@ -14380,7 +14489,7 @@ var StyledCheckbox = index$a(reactNative.View)(function (_ref4) {
14380
14489
  flex: 1,
14381
14490
  borderRadius: theme.__hd__.checkbox.radii.icon,
14382
14491
  borderWidth: theme.__hd__.checkbox.borderWidths.icon,
14383
- borderColor: theme.__hd__.checkbox.colors.borders[themeState]
14492
+ borderColor: theme.__hd__.checkbox.colors.checkboxBorder[themeState]
14384
14493
  };
14385
14494
  });
14386
14495
  var StyledCheckMark = index$a(Icon)(function (_ref5) {
@@ -14389,19 +14498,23 @@ var StyledCheckMark = index$a(Icon)(function (_ref5) {
14389
14498
  return {
14390
14499
  position: 'absolute',
14391
14500
  top: theme.__hd__.checkbox.space.iconTop,
14392
- color: theme.__hd__.checkbox.colors.borders[themeState]
14501
+ color: theme.__hd__.checkbox.colors.checkboxBorder[themeState]
14393
14502
  };
14394
14503
  });
14395
14504
 
14396
14505
  var getThemeState = function getThemeState(_ref) {
14397
14506
  var disabled = _ref.disabled,
14398
- readonly = _ref.readonly;
14507
+ readonly = _ref.readonly,
14508
+ checked = _ref.checked;
14399
14509
  if (disabled) {
14400
14510
  return 'disabled';
14401
14511
  }
14402
14512
  if (readonly) {
14403
14513
  return 'readonly';
14404
14514
  }
14515
+ if (checked) {
14516
+ return 'checked';
14517
+ }
14405
14518
  return 'default';
14406
14519
  };
14407
14520
  var Checkbox = function Checkbox(_ref2) {
@@ -14419,7 +14532,8 @@ var Checkbox = function Checkbox(_ref2) {
14419
14532
  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
14533
  var themeState = getThemeState({
14421
14534
  disabled: disabled,
14422
- readonly: readonly
14535
+ readonly: readonly,
14536
+ checked: checked
14423
14537
  });
14424
14538
  return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$8, {
14425
14539
  onPress: onPress,
@@ -14612,11 +14726,13 @@ var renderInput$1 = function renderInput(_ref3) {
14612
14726
  var variant = _ref3.variant,
14613
14727
  nativeInputProps = _ref3.nativeInputProps,
14614
14728
  renderInputValue = _ref3.renderInputValue,
14615
- ref = _ref3.ref;
14729
+ ref = _ref3.ref,
14730
+ theme = _ref3.theme;
14616
14731
  return renderInputValue ? renderInputValue(nativeInputProps) : /*#__PURE__*/React__namespace.default.createElement(StyledTextInput, _extends$1({}, nativeInputProps, {
14617
14732
  themeVariant: variant,
14618
14733
  multiline: variant === 'textarea' || nativeInputProps.multiline,
14619
- ref: ref
14734
+ ref: ref,
14735
+ placeholderTextColor: theme.__hd__.textInput.colors.placeholder
14620
14736
  }));
14621
14737
  };
14622
14738
  var renderSuffix$1 = function renderSuffix(_ref4) {
@@ -14871,13 +14987,14 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
14871
14987
  },
14872
14988
  themeState: state,
14873
14989
  testID: "input-label-asterisk"
14874
- }, "*"), label)), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputAndLabelContainer, null, renderInput$1({
14990
+ }, "*"), /*#__PURE__*/React__namespace.default.createElement(Typography.Body, null, label))), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputAndLabelContainer, null, renderInput$1({
14875
14991
  variant: variant,
14876
14992
  nativeInputProps: nativeInputProps,
14877
14993
  renderInputValue: renderInputValue,
14878
14994
  ref: function ref(rnTextInputRef) {
14879
14995
  innerTextInput.current = rnTextInputRef;
14880
- }
14996
+ },
14997
+ theme: theme
14881
14998
  })), renderSuffix$1({
14882
14999
  state: state,
14883
15000
  loading: loading,
@@ -19487,7 +19604,8 @@ var StyledWrapper$2 = index$a(reactNative.View)(function (_ref) {
19487
19604
  borderRadius: theme.__hd__["switch"].radii.rounded,
19488
19605
  backgroundColor: theme.__hd__["switch"].colors.backgroundColors[themeVariant],
19489
19606
  display: 'flex',
19490
- justifyContent: 'center'
19607
+ justifyContent: 'center',
19608
+ opacity: themeVariant.includes('disabled') ? 0.4 : 1
19491
19609
  };
19492
19610
  });
19493
19611
  var StyledKnot = index$a(reactNative.Animated.View)(function (_ref2) {
@@ -39842,7 +39960,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
39842
39960
  backgroundColor: theme.__hd__.textInput.colors.labelBackground
39843
39961
  },
39844
39962
  themeState: state
39845
- }, "*"), label)), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputContainer, {
39963
+ }, "*"), /*#__PURE__*/React__namespace.default.createElement(Typography.Body, null, label))), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputContainer, {
39846
39964
  onLayout: onLayout
39847
39965
  }, /*#__PURE__*/React__namespace.default.createElement(StyledBorderBackDrop, {
39848
39966
  themeState: state,
@@ -40237,6 +40355,7 @@ var SearchOneLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
40237
40355
  _React$useState2 = _slicedToArray(_React$useState, 2),
40238
40356
  isFocused = _React$useState2[0],
40239
40357
  setIsFocused = _React$useState2[1];
40358
+ var theme = useTheme();
40240
40359
  var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
40241
40360
  var isEmptyValue = displayText.length === 0;
40242
40361
  var state = getState({
@@ -40321,7 +40440,8 @@ var SearchOneLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
40321
40440
  maxLength: maxLength,
40322
40441
  value: value,
40323
40442
  defaultValue: defaultValue,
40324
- placeholder: placeholder
40443
+ placeholder: placeholder,
40444
+ placeholderTextColor: theme.__hd__.textInput.colors.placeholder
40325
40445
  }),
40326
40446
  ref: function ref(rnTextInputRef) {
40327
40447
  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.3",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",