@hero-design/rn 8.103.6 → 8.104.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/CHANGELOG.md +18 -0
  3. package/es/index.js +343 -79
  4. package/lib/index.js +343 -78
  5. package/package.json +1 -1
  6. package/src/components/DatePicker/DatePickerAndroid.tsx +18 -4
  7. package/src/components/DatePicker/DatePickerCalendar.tsx +18 -4
  8. package/src/components/DatePicker/DatePickerIOS.tsx +18 -4
  9. package/src/components/DatePicker/StyledDatePicker.tsx +19 -2
  10. package/src/components/DatePicker/__tests__/DatePicker.spec.tsx +102 -1
  11. package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +3 -0
  12. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
  13. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +1 -0
  14. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +2 -0
  15. package/src/components/DatePicker/types.ts +11 -0
  16. package/src/components/FilterTrigger/StyledFilterTrigger.tsx +104 -0
  17. package/src/components/FilterTrigger/__tests__/__snapshots__/index.spec.tsx.snap +637 -0
  18. package/src/components/FilterTrigger/__tests__/index.spec.tsx +161 -0
  19. package/src/components/FilterTrigger/index.tsx +106 -0
  20. package/src/components/Icon/HeroIcon/index.tsx +3 -1
  21. package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +45 -0
  22. package/src/components/Icon/__tests__/index.spec.tsx +1 -0
  23. package/src/components/Icon/index.tsx +2 -1
  24. package/src/components/TimePicker/StyledTimePicker.tsx +19 -2
  25. package/src/components/TimePicker/TimePickerAndroid.tsx +18 -4
  26. package/src/components/TimePicker/TimePickerIOS.tsx +21 -5
  27. package/src/components/TimePicker/__tests__/TimePicker.spec.tsx +72 -1
  28. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +2 -0
  29. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +2 -0
  30. package/src/components/TimePicker/types.ts +11 -0
  31. package/src/components/Toolbar/StyledToolbar.tsx +0 -1
  32. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarMessage.spec.tsx.snap +0 -4
  33. package/src/index.ts +2 -0
  34. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +71 -0
  35. package/src/theme/components/filterTrigger.ts +88 -0
  36. package/src/theme/components/icon.ts +1 -0
  37. package/src/theme/getTheme.ts +3 -0
  38. package/stats/8.103.6/rn-stats.html +0 -2
  39. package/stats/8.103.7/rn-stats.html +4844 -0
  40. package/stats/8.104.0/rn-stats.html +4844 -0
  41. package/types/components/DatePicker/DatePickerAndroid.d.ts +1 -1
  42. package/types/components/DatePicker/DatePickerCalendar.d.ts +1 -1
  43. package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
  44. package/types/components/DatePicker/StyledDatePicker.d.ts +8 -1
  45. package/types/components/DatePicker/types.d.ts +11 -0
  46. package/types/components/FilterTrigger/StyledFilterTrigger.d.ts +20 -0
  47. package/types/components/FilterTrigger/index.d.ts +39 -0
  48. package/types/components/Icon/HeroIcon/index.d.ts +1 -1
  49. package/types/components/Icon/index.d.ts +1 -1
  50. package/types/components/TimePicker/StyledTimePicker.d.ts +8 -1
  51. package/types/components/TimePicker/TimePickerAndroid.d.ts +1 -1
  52. package/types/components/TimePicker/TimePickerIOS.d.ts +1 -1
  53. package/types/components/TimePicker/types.d.ts +11 -0
  54. package/types/index.d.ts +2 -1
  55. package/types/theme/components/filterTrigger.d.ts +72 -0
  56. package/types/theme/components/icon.d.ts +1 -0
  57. package/types/theme/getTheme.d.ts +2 -0
package/es/index.js CHANGED
@@ -6248,7 +6248,8 @@ var getIconTheme = function getIconTheme(theme) {
6248
6248
  warning: theme.colors.warning,
6249
6249
  disabledText: theme.colors.disabledOnDefaultGlobalSurface,
6250
6250
  invertedText: theme.colors.onDarkGlobalSurface,
6251
- muted: theme.colors.mutedOnDefaultGlobalSurface
6251
+ muted: theme.colors.mutedOnDefaultGlobalSurface,
6252
+ inactive: theme.colors.inactiveOnDefaultGlobalSurface
6252
6253
  };
6253
6254
  var sizes = {
6254
6255
  xxxsmall: theme.fontSizes.small,
@@ -7378,6 +7379,85 @@ var getAppCueTheme = function getAppCueTheme(theme) {
7378
7379
  };
7379
7380
  };
7380
7381
 
7382
+ var getFilterTriggerTheme = function getFilterTriggerTheme(theme) {
7383
+ var borderWidths = {
7384
+ wrapper: {
7385
+ filled: theme.borderWidths.medium,
7386
+ outlined: theme.borderWidths.medium,
7387
+ ghost: 0
7388
+ }
7389
+ };
7390
+ var colors = {
7391
+ wrapper: {
7392
+ activeBackground: theme.colors.highlightedSurface,
7393
+ inactiveBackground: theme.colors.neutralGlobalSurface,
7394
+ background: {
7395
+ active: {
7396
+ filled: theme.colors.highlightedSurface,
7397
+ outlined: 'transparent',
7398
+ ghost: 'transparent',
7399
+ filledLabeless: theme.colors.neutralGlobalSurface
7400
+ },
7401
+ inactive: {
7402
+ filled: theme.colors.neutralGlobalSurface,
7403
+ outlined: 'transparent',
7404
+ ghost: 'transparent'
7405
+ }
7406
+ },
7407
+ border: {
7408
+ active: {
7409
+ filled: theme.colors.highlightedSurface,
7410
+ outlined: theme.colors.primaryOutline,
7411
+ ghost: 'transparent',
7412
+ filledLabeless: theme.colors.neutralGlobalSurface
7413
+ },
7414
+ inactive: {
7415
+ filled: theme.colors.neutralGlobalSurface,
7416
+ outlined: theme.colors.secondaryOutline,
7417
+ ghost: 'transparent'
7418
+ }
7419
+ }
7420
+ }
7421
+ };
7422
+ var space = {
7423
+ wrapper: {
7424
+ "default": {
7425
+ paddingHorizontal: theme.space.smallMedium,
7426
+ paddingVertical: theme.space.xsmall
7427
+ },
7428
+ labeless: {
7429
+ paddingHorizontal: theme.space.small,
7430
+ paddingVertical: theme.space.xsmall
7431
+ },
7432
+ itemGap: theme.space.xsmall
7433
+ },
7434
+ badge: {
7435
+ labelessRight: theme.space.xxsmall,
7436
+ labelessBottom: theme.space.xxsmall
7437
+ }
7438
+ };
7439
+ var radii = {
7440
+ wrapper: {
7441
+ "default": theme.radii.xxxlarge,
7442
+ labeless: theme.radii.xlarge
7443
+ }
7444
+ };
7445
+ var sizes = {
7446
+ wrapperHeight: scale(36)
7447
+ };
7448
+ var lineHeights = {
7449
+ text: theme.lineHeights.small
7450
+ };
7451
+ return {
7452
+ colors: colors,
7453
+ space: space,
7454
+ radii: radii,
7455
+ borderWidths: borderWidths,
7456
+ sizes: sizes,
7457
+ lineHeights: lineHeights
7458
+ };
7459
+ };
7460
+
7381
7461
  var getTheme = function getTheme() {
7382
7462
  var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : scale$1;
7383
7463
  var systemPallete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : swagSystemPalette$2;
@@ -7410,6 +7490,7 @@ var getTheme = function getTheme() {
7410
7490
  empty: getEmptyTheme(globalTheme),
7411
7491
  error: getErrorTheme(globalTheme),
7412
7492
  fab: getFABTheme(globalTheme),
7493
+ filterTrigger: getFilterTriggerTheme(globalTheme),
7413
7494
  icon: getIconTheme(globalTheme),
7414
7495
  image: getImageTheme(globalTheme),
7415
7496
  list: getListTheme(globalTheme),
@@ -7615,7 +7696,7 @@ var FONTWEIGHT_MAP$2 = {
7615
7696
  regular: 'regular',
7616
7697
  'semi-bold': 'semiBold'
7617
7698
  };
7618
- var StyledText$3 = index$b(Text$1)(function (_ref) {
7699
+ var StyledText$4 = index$b(Text$1)(function (_ref) {
7619
7700
  var themeFontSize = _ref.themeFontSize,
7620
7701
  themeFontWeight = _ref.themeFontWeight,
7621
7702
  themeIntent = _ref.themeIntent,
@@ -7647,7 +7728,7 @@ var Text = function Text(_ref) {
7647
7728
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
7648
7729
  nativeProps = _objectWithoutProperties(_ref, _excluded$O);
7649
7730
  useDeprecation('Typography.Text is deprecated and will be removed in the next major release, please refer to https://design.employmenthero.com/mobile/Components/typography for the appropriate alternatives.');
7650
- return /*#__PURE__*/React__default.createElement(StyledText$3, _extends$1({}, nativeProps, {
7731
+ return /*#__PURE__*/React__default.createElement(StyledText$4, _extends$1({}, nativeProps, {
7651
7732
  themeFontSize: fontSize,
7652
7733
  themeFontWeight: fontWeight,
7653
7734
  themeIntent: intent,
@@ -8377,7 +8458,8 @@ var COLOR_INTENTS = {
8377
8458
  warning: 'warning',
8378
8459
  'disabled-text': 'disabledText',
8379
8460
  'text-inverted': 'invertedText',
8380
- muted: 'muted'
8461
+ muted: 'muted',
8462
+ inactive: 'inactive'
8381
8463
  };
8382
8464
  var StyledHeroIcon = index$b(HeroIcon)(function (_ref) {
8383
8465
  var themeIntent = _ref.themeIntent,
@@ -9104,7 +9186,7 @@ var StyledTextWrapper$1 = index$b(View)(function () {
9104
9186
  height: '100%'
9105
9187
  };
9106
9188
  });
9107
- var StyledText$2 = index$b(Typography.Body)(function (_ref2) {
9189
+ var StyledText$3 = index$b(Typography.Body)(function (_ref2) {
9108
9190
  var themeSize = _ref2.themeSize,
9109
9191
  theme = _ref2.theme;
9110
9192
  return _objectSpread2({
@@ -9159,7 +9241,7 @@ var Avatar = function Avatar(_ref) {
9159
9241
  themeIntent: intent,
9160
9242
  themeSize: size,
9161
9243
  style: style
9162
- }, (source === undefined || hasImageError) && /*#__PURE__*/React__default.createElement(StyledTextWrapper$1, null, /*#__PURE__*/React__default.createElement(StyledText$2, {
9244
+ }, (source === undefined || hasImageError) && /*#__PURE__*/React__default.createElement(StyledTextWrapper$1, null, /*#__PURE__*/React__default.createElement(StyledText$3, {
9163
9245
  themeSize: size
9164
9246
  }, title)), source !== undefined && /*#__PURE__*/React__default.createElement(StyledImage$1, {
9165
9247
  resizeMode: "cover",
@@ -9684,7 +9766,7 @@ var StyledView$2 = index$b(Animated.View)(function (_ref) {
9684
9766
  borderColor: themeVariant === 'outlined' ? theme.__hd__.badge.colors.border : theme.__hd__.badge.colors[themeIntent]
9685
9767
  };
9686
9768
  });
9687
- var StyledText$1 = index$b(Typography.Caption)(function (_ref2) {
9769
+ var StyledText$2 = index$b(Typography.Caption)(function (_ref2) {
9688
9770
  var theme = _ref2.theme,
9689
9771
  themeSize = _ref2.themeSize;
9690
9772
  return {
@@ -9874,7 +9956,7 @@ var Badge = function Badge(_ref) {
9874
9956
  icon: icon,
9875
9957
  themeSize: size,
9876
9958
  intent: "text-inverted"
9877
- }) : /*#__PURE__*/React__default.createElement(StyledText$1, {
9959
+ }) : /*#__PURE__*/React__default.createElement(StyledText$2, {
9878
9960
  themeSize: size
9879
9961
  }, content));
9880
9962
  };
@@ -20415,6 +20497,30 @@ var useFormatDate = function useFormatDate(_ref) {
20415
20497
  };
20416
20498
  };
20417
20499
 
20500
+ var StyledPickerWrapper$1 = index$b(View)(function (_ref) {
20501
+ var theme = _ref.theme;
20502
+ return {
20503
+ height: theme.__hd__.datePicker.sizes.height,
20504
+ alignItems: 'center'
20505
+ };
20506
+ });
20507
+ var getZIndexByState$2 = function getZIndexByState(_ref2) {
20508
+ var themeHasError = _ref2.themeHasError;
20509
+ if (themeHasError) {
20510
+ return 1;
20511
+ }
20512
+ return 0;
20513
+ };
20514
+ var StyledTouchableOpacity$2 = index$b(TouchableOpacity)(function (_ref3) {
20515
+ var themeGroupStyleEnabled = _ref3.themeGroupStyleEnabled,
20516
+ themeHasError = _ref3.themeHasError;
20517
+ return _objectSpread2({}, themeGroupStyleEnabled && {
20518
+ zIndex: getZIndexByState$2({
20519
+ themeHasError: themeHasError
20520
+ })
20521
+ });
20522
+ });
20523
+
20418
20524
  var DatePickerAndroid = function DatePickerAndroid(_ref) {
20419
20525
  var value = _ref.value,
20420
20526
  minDate = _ref.minDate,
@@ -20434,7 +20540,10 @@ var DatePickerAndroid = function DatePickerAndroid(_ref) {
20434
20540
  variant = _ref$variant === void 0 ? 'default' : _ref$variant,
20435
20541
  renderSelectedValue = _ref.renderSelectedValue,
20436
20542
  locale = _ref.locale,
20437
- TextInputComponent = _ref.TextInputComponent;
20543
+ TextInputComponent = _ref.TextInputComponent,
20544
+ inputProps = _ref.inputProps,
20545
+ _ref$groupStyleEnable = _ref.groupStyleEnabled,
20546
+ groupStyleEnabled = _ref$groupStyleEnable === void 0 ? false : _ref$groupStyleEnable;
20438
20547
  var _useState = useState(false),
20439
20548
  _useState2 = _slicedToArray(_useState, 2),
20440
20549
  open = _useState2[0],
@@ -20453,15 +20562,19 @@ var DatePickerAndroid = function DatePickerAndroid(_ref) {
20453
20562
  value: value
20454
20563
  });
20455
20564
  var InputComponent = TextInputComponent || TextInput;
20456
- return /*#__PURE__*/React__default.createElement(TouchableOpacity, {
20457
- onPress: function onPress() {
20458
- return setOpen(true);
20459
- },
20460
- disabled: disabled
20565
+ var onPress = useCallback(function () {
20566
+ setOpen(true);
20567
+ }, []);
20568
+ return /*#__PURE__*/React__default.createElement(StyledTouchableOpacity$2, {
20569
+ onPress: onPress,
20570
+ disabled: disabled,
20571
+ themeGroupStyleEnabled: groupStyleEnabled,
20572
+ themeHasError: !!error,
20573
+ testID: "date-picker-android-touchable-opacity"
20461
20574
  }, /*#__PURE__*/React__default.createElement(View, {
20462
20575
  pointerEvents: "none",
20463
20576
  testID: "datePickerInputAndroid"
20464
- }, /*#__PURE__*/React__default.createElement(InputComponent, {
20577
+ }, /*#__PURE__*/React__default.createElement(InputComponent, _extends$1({}, inputProps, {
20465
20578
  label: label,
20466
20579
  value: displayValue,
20467
20580
  suffix: "calendar-dates-outlined",
@@ -20478,7 +20591,7 @@ var DatePickerAndroid = function DatePickerAndroid(_ref) {
20478
20591
  formattedDateString: displayValue
20479
20592
  }, props);
20480
20593
  } : undefined
20481
- })), /*#__PURE__*/React__default.createElement(AndroidDatePickerDialog, {
20594
+ }))), /*#__PURE__*/React__default.createElement(AndroidDatePickerDialog, {
20482
20595
  open: open,
20483
20596
  onClose: function onClose() {
20484
20597
  return setOpen(false);
@@ -20557,7 +20670,10 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
20557
20670
  supportedOrientations = _ref2$supportedOrient === void 0 ? ['portrait'] : _ref2$supportedOrient,
20558
20671
  renderSelectedValue = _ref2.renderSelectedValue,
20559
20672
  locale = _ref2.locale,
20560
- TextInputComponent = _ref2.TextInputComponent;
20673
+ TextInputComponent = _ref2.TextInputComponent,
20674
+ inputProps = _ref2.inputProps,
20675
+ _ref2$groupStyleEnabl = _ref2.groupStyleEnabled,
20676
+ groupStyleEnabled = _ref2$groupStyleEnabl === void 0 ? false : _ref2$groupStyleEnabl;
20561
20677
  var _useState5 = useState(false),
20562
20678
  _useState6 = _slicedToArray(_useState5, 2),
20563
20679
  open = _useState6[0],
@@ -20584,15 +20700,19 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
20584
20700
  value: value
20585
20701
  });
20586
20702
  var InputComponent = TextInputComponent || TextInput;
20587
- return /*#__PURE__*/React__default.createElement(TouchableOpacity, {
20588
- onPress: function onPress() {
20589
- return setOpen(true);
20590
- },
20591
- disabled: disabled
20703
+ var onPress = useCallback(function () {
20704
+ setOpen(true);
20705
+ }, []);
20706
+ return /*#__PURE__*/React__default.createElement(StyledTouchableOpacity$2, {
20707
+ onPress: onPress,
20708
+ disabled: disabled,
20709
+ themeGroupStyleEnabled: groupStyleEnabled,
20710
+ themeHasError: !!error,
20711
+ testID: "date-picker-calendar-touchable-opacity"
20592
20712
  }, /*#__PURE__*/React__default.createElement(View, {
20593
20713
  pointerEvents: "none",
20594
20714
  testID: "datePickerCalendar"
20595
- }, /*#__PURE__*/React__default.createElement(InputComponent, {
20715
+ }, /*#__PURE__*/React__default.createElement(InputComponent, _extends$1({}, inputProps, {
20596
20716
  label: label,
20597
20717
  value: displayValue,
20598
20718
  suffix: "calendar-dates-outlined",
@@ -20609,7 +20729,7 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
20609
20729
  formattedDateString: displayValue
20610
20730
  }, props);
20611
20731
  } : undefined
20612
- })), /*#__PURE__*/React__default.createElement(BottomSheet$1, {
20732
+ }))), /*#__PURE__*/React__default.createElement(BottomSheet$1, {
20613
20733
  open: open,
20614
20734
  onRequestClose: function onRequestClose() {
20615
20735
  return setOpen(false);
@@ -20639,14 +20759,6 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
20639
20759
  }))));
20640
20760
  };
20641
20761
 
20642
- var StyledPickerWrapper$1 = index$b(View)(function (_ref) {
20643
- var theme = _ref.theme;
20644
- return {
20645
- height: theme.__hd__.datePicker.sizes.height,
20646
- alignItems: 'center'
20647
- };
20648
- });
20649
-
20650
20762
  var IOSDatePickerDialog = function IOSDatePickerDialog(_ref) {
20651
20763
  var label = _ref.label,
20652
20764
  open = _ref.open,
@@ -20740,7 +20852,10 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
20740
20852
  variant = _ref$variant === void 0 ? 'default' : _ref$variant,
20741
20853
  locale = _ref.locale,
20742
20854
  renderSelectedValue = _ref.renderSelectedValue,
20743
- TextInputComponent = _ref.TextInputComponent;
20855
+ TextInputComponent = _ref.TextInputComponent,
20856
+ inputProps = _ref.inputProps,
20857
+ _ref$groupStyleEnable = _ref.groupStyleEnabled,
20858
+ groupStyleEnabled = _ref$groupStyleEnable === void 0 ? false : _ref$groupStyleEnable;
20744
20859
  var _useState = useState(false),
20745
20860
  _useState2 = _slicedToArray(_useState, 2),
20746
20861
  open = _useState2[0],
@@ -20761,15 +20876,19 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
20761
20876
  value: value
20762
20877
  });
20763
20878
  var InputComponent = TextInputComponent || TextInput;
20764
- return /*#__PURE__*/React__default.createElement(TouchableOpacity, {
20765
- onPress: function onPress() {
20766
- return setOpen(true);
20767
- },
20768
- disabled: disabled
20879
+ var onPress = useCallback(function () {
20880
+ setOpen(true);
20881
+ }, []);
20882
+ return /*#__PURE__*/React__default.createElement(StyledTouchableOpacity$2, {
20883
+ onPress: onPress,
20884
+ disabled: disabled,
20885
+ themeGroupStyleEnabled: groupStyleEnabled,
20886
+ themeHasError: !!error,
20887
+ testID: "date-picker-ios-touchable-opacity"
20769
20888
  }, /*#__PURE__*/React__default.createElement(View, {
20770
20889
  pointerEvents: "none",
20771
20890
  testID: "datePickerInputIOS"
20772
- }, /*#__PURE__*/React__default.createElement(InputComponent, {
20891
+ }, /*#__PURE__*/React__default.createElement(InputComponent, _extends$1({}, inputProps, {
20773
20892
  label: label,
20774
20893
  value: displayValue,
20775
20894
  suffix: "calendar-dates-outlined",
@@ -20786,7 +20905,7 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
20786
20905
  formattedDateString: displayValue
20787
20906
  }, props);
20788
20907
  } : undefined
20789
- })), /*#__PURE__*/React__default.createElement(IOSDatePickerDialog, {
20908
+ }))), /*#__PURE__*/React__default.createElement(IOSDatePickerDialog, {
20790
20909
  value: value,
20791
20910
  onChange: onChange,
20792
20911
  open: open,
@@ -23634,7 +23753,7 @@ var StyledContent = index$b(View)(function (_ref2) {
23634
23753
  alignItems: 'center'
23635
23754
  };
23636
23755
  });
23637
- var StyledBadge$1 = index$b(View)(function (_ref3) {
23756
+ var StyledBadge$2 = index$b(View)(function (_ref3) {
23638
23757
  var theme = _ref3.theme;
23639
23758
  return {
23640
23759
  right: theme.__hd__.mapPin.space.iconRight,
@@ -23722,7 +23841,7 @@ var MapPin = function MapPin(_ref) {
23722
23841
  icon: icon,
23723
23842
  size: "xsmall",
23724
23843
  testID: testID ? "".concat(testID, "-icon") : undefined
23725
- })), badgeIcon && /*#__PURE__*/React__default.createElement(StyledBadge$1, {
23844
+ })), badgeIcon && /*#__PURE__*/React__default.createElement(StyledBadge$2, {
23726
23845
  testID: testID ? "".concat(testID, "-badge") : undefined
23727
23846
  }, /*#__PURE__*/React__default.createElement(StyledBadgeIcon, {
23728
23847
  icon: badgeIcon,
@@ -24923,18 +25042,18 @@ var StyledSectionList = index$b(SectionList)(function (_ref4) {
24923
25042
  paddingHorizontal: theme.__hd__.select.space.optionListHorizontalPadding
24924
25043
  };
24925
25044
  });
24926
- var getZIndexByState = function getZIndexByState(_ref5) {
25045
+ var getZIndexByState$1 = function getZIndexByState(_ref5) {
24927
25046
  var themeHasError = _ref5.themeHasError;
24928
25047
  if (themeHasError) {
24929
25048
  return 1;
24930
25049
  }
24931
25050
  return 0;
24932
25051
  };
24933
- var StyledTouchableOpacity = index$b(TouchableOpacity)(function (_ref6) {
25052
+ var StyledTouchableOpacity$1 = index$b(TouchableOpacity)(function (_ref6) {
24934
25053
  var themeGroupStyleEnabled = _ref6.themeGroupStyleEnabled,
24935
25054
  themeHasError = _ref6.themeHasError;
24936
25055
  return _objectSpread2({}, themeGroupStyleEnabled && {
24937
- zIndex: getZIndexByState({
25056
+ zIndex: getZIndexByState$1({
24938
25057
  themeHasError: themeHasError
24939
25058
  })
24940
25059
  });
@@ -25139,7 +25258,7 @@ function MultiSelect(_ref) {
25139
25258
  }, [open, value]);
25140
25259
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(View, {
25141
25260
  pointerEvents: !editable || disabled || inputProps !== null && inputProps !== void 0 && inputProps.loading ? 'none' : 'auto'
25142
- }, /*#__PURE__*/React__default.createElement(StyledTouchableOpacity, {
25261
+ }, /*#__PURE__*/React__default.createElement(StyledTouchableOpacity$1, {
25143
25262
  onPress: onPress,
25144
25263
  themeGroupStyleEnabled: groupStyleEnabled,
25145
25264
  themeHasError: !!error,
@@ -25347,7 +25466,7 @@ var SingleSelect = function SingleSelect(_ref) {
25347
25466
  }, []);
25348
25467
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(View, {
25349
25468
  pointerEvents: !editable || disabled || inputProps !== null && inputProps !== void 0 && inputProps.loading ? 'none' : 'auto'
25350
- }, /*#__PURE__*/React__default.createElement(StyledTouchableOpacity, {
25469
+ }, /*#__PURE__*/React__default.createElement(StyledTouchableOpacity$1, {
25351
25470
  onPress: onPress,
25352
25471
  themeGroupStyleEnabled: groupStyleEnabled,
25353
25472
  themeHasError: !!error,
@@ -26662,7 +26781,7 @@ var StyledView = index$b(View)(function (_ref) {
26662
26781
  paddingHorizontal: theme.__hd__.tag.space.horizontalPadding
26663
26782
  };
26664
26783
  });
26665
- var StyledText = index$b(Typography.Caption)(function (_ref2) {
26784
+ var StyledText$1 = index$b(Typography.Caption)(function (_ref2) {
26666
26785
  var themeIntent = _ref2.themeIntent,
26667
26786
  theme = _ref2.theme;
26668
26787
  return {
@@ -26688,12 +26807,36 @@ var Tag = function Tag(_ref) {
26688
26807
  themeIntent: intent,
26689
26808
  style: style,
26690
26809
  testID: testID
26691
- }), typeof content === 'string' ? /*#__PURE__*/React__default.createElement(StyledText, {
26810
+ }), typeof content === 'string' ? /*#__PURE__*/React__default.createElement(StyledText$1, {
26692
26811
  themeIntent: intent,
26693
26812
  fontWeight: "semi-bold"
26694
26813
  }, content) : content);
26695
26814
  };
26696
26815
 
26816
+ var StyledPickerWrapper = index$b(View)(function (_ref) {
26817
+ var theme = _ref.theme;
26818
+ return {
26819
+ height: theme.__hd__.timePicker.sizes.height,
26820
+ alignItems: 'center'
26821
+ };
26822
+ });
26823
+ var getZIndexByState = function getZIndexByState(_ref2) {
26824
+ var themeHasError = _ref2.themeHasError;
26825
+ if (themeHasError) {
26826
+ return 1;
26827
+ }
26828
+ return 0;
26829
+ };
26830
+ var StyledTouchableOpacity = index$b(TouchableOpacity)(function (_ref3) {
26831
+ var themeGroupStyleEnabled = _ref3.themeGroupStyleEnabled,
26832
+ themeHasError = _ref3.themeHasError;
26833
+ return _objectSpread2({}, themeGroupStyleEnabled && {
26834
+ zIndex: getZIndexByState({
26835
+ themeHasError: themeHasError
26836
+ })
26837
+ });
26838
+ });
26839
+
26697
26840
  var TimePickerAndroid = function TimePickerAndroid(_ref) {
26698
26841
  var value = _ref.value,
26699
26842
  label = _ref.label,
@@ -26710,7 +26853,10 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
26710
26853
  testID = _ref.testID,
26711
26854
  _ref$showSuffix = _ref.showSuffix,
26712
26855
  showSuffix = _ref$showSuffix === void 0 ? true : _ref$showSuffix,
26713
- TextInputComponent = _ref.TextInputComponent;
26856
+ TextInputComponent = _ref.TextInputComponent,
26857
+ inputProps = _ref.inputProps,
26858
+ _ref$groupStyleEnable = _ref.groupStyleEnabled,
26859
+ groupStyleEnabled = _ref$groupStyleEnable === void 0 ? false : _ref$groupStyleEnable;
26714
26860
  var _useState = useState(false),
26715
26861
  _useState2 = _slicedToArray(_useState, 2),
26716
26862
  open = _useState2[0],
@@ -26719,15 +26865,19 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
26719
26865
  var displayValue = value ? formatTime(displayFormat, value) : '';
26720
26866
  var pickerInitValue = value || new Date();
26721
26867
  var InputComponent = TextInputComponent || TextInput;
26722
- return /*#__PURE__*/React__default.createElement(TouchableOpacity, {
26723
- onPress: function onPress() {
26724
- return setOpen(true);
26725
- },
26726
- disabled: disabled
26868
+ var onPress = useCallback(function () {
26869
+ setOpen(true);
26870
+ }, []);
26871
+ return /*#__PURE__*/React__default.createElement(StyledTouchableOpacity, {
26872
+ onPress: onPress,
26873
+ disabled: disabled,
26874
+ themeGroupStyleEnabled: groupStyleEnabled,
26875
+ themeHasError: !!error,
26876
+ testID: "time-picker-android-touchable-opacity"
26727
26877
  }, /*#__PURE__*/React__default.createElement(View, {
26728
26878
  pointerEvents: "none",
26729
26879
  testID: "timePickerInputAndroid"
26730
- }, /*#__PURE__*/React__default.createElement(InputComponent, {
26880
+ }, /*#__PURE__*/React__default.createElement(InputComponent, _extends$1({}, inputProps, {
26731
26881
  label: label,
26732
26882
  value: displayValue,
26733
26883
  suffix: showSuffix ? 'clock-3' : undefined,
@@ -26738,7 +26888,7 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
26738
26888
  helpText: helpText,
26739
26889
  style: style,
26740
26890
  testID: testID
26741
- })), open ? /*#__PURE__*/React__default.createElement(DateTimePicker, {
26891
+ }))), open ? /*#__PURE__*/React__default.createElement(DateTimePicker, {
26742
26892
  testID: "timePickerAndroid",
26743
26893
  mode: "time",
26744
26894
  value: pickerInitValue,
@@ -26753,14 +26903,6 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
26753
26903
  }) : null);
26754
26904
  };
26755
26905
 
26756
- var StyledPickerWrapper = index$b(View)(function (_ref) {
26757
- var theme = _ref.theme;
26758
- return {
26759
- height: theme.__hd__.timePicker.sizes.height,
26760
- alignItems: 'center'
26761
- };
26762
- });
26763
-
26764
26906
  var TimePickerIOS = function TimePickerIOS(_ref) {
26765
26907
  var value = _ref.value,
26766
26908
  label = _ref.label,
@@ -26780,7 +26922,10 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
26780
26922
  showSuffix = _ref$showSuffix === void 0 ? true : _ref$showSuffix,
26781
26923
  _ref$supportedOrienta = _ref.supportedOrientations,
26782
26924
  supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta,
26783
- TextInputComponent = _ref.TextInputComponent;
26925
+ TextInputComponent = _ref.TextInputComponent,
26926
+ inputProps = _ref.inputProps,
26927
+ _ref$groupStyleEnable = _ref.groupStyleEnabled,
26928
+ groupStyleEnabled = _ref$groupStyleEnable === void 0 ? false : _ref$groupStyleEnable;
26784
26929
  var _useState = useState(value || new Date()),
26785
26930
  _useState2 = _slicedToArray(_useState, 2),
26786
26931
  selectingDate = _useState2[0],
@@ -26796,15 +26941,19 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
26796
26941
  useEffect(function () {
26797
26942
  setSelectingDate(value || new Date());
26798
26943
  }, [value]);
26799
- return /*#__PURE__*/React__default.createElement(TouchableOpacity, {
26800
- onPress: function onPress() {
26801
- return setOpen(true);
26802
- },
26803
- disabled: disabled
26944
+ var onPress = useCallback(function () {
26945
+ setOpen(true);
26946
+ }, []);
26947
+ return /*#__PURE__*/React__default.createElement(StyledTouchableOpacity, {
26948
+ onPress: onPress,
26949
+ disabled: disabled,
26950
+ themeGroupStyleEnabled: groupStyleEnabled,
26951
+ themeHasError: !!error,
26952
+ testID: "time-picker-ios-touchable-opacity"
26804
26953
  }, /*#__PURE__*/React__default.createElement(View, {
26805
26954
  pointerEvents: "none",
26806
26955
  testID: "timePickerInputIOS"
26807
- }, /*#__PURE__*/React__default.createElement(InputComponent, {
26956
+ }, /*#__PURE__*/React__default.createElement(InputComponent, _extends$1({}, inputProps, {
26808
26957
  label: label,
26809
26958
  value: displayValue,
26810
26959
  suffix: showSuffix ? 'clock-3' : undefined,
@@ -26815,7 +26964,7 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
26815
26964
  helpText: helpText,
26816
26965
  testID: testID,
26817
26966
  style: style
26818
- })), /*#__PURE__*/React__default.createElement(BottomSheet$1, {
26967
+ }))), /*#__PURE__*/React__default.createElement(BottomSheet$1, {
26819
26968
  open: open,
26820
26969
  onRequestClose: function onRequestClose() {
26821
26970
  return setOpen(false);
@@ -26949,8 +27098,7 @@ var StyledInputContainer$1 = index$b(View)(function (_ref8) {
26949
27098
  backgroundColor: theme.__hd__.toolbar.colors.inputContainerBackground,
26950
27099
  borderRadius: theme.__hd__.toolbar.radii.messageContainer,
26951
27100
  height: theme.__hd__.toolbar.sizes.messageInputHeight,
26952
- paddingHorizontal: theme.__hd__.toolbar.space.messageInputPaddingHorizontal,
26953
- paddingVertical: theme.__hd__.toolbar.space.messageInputPaddingVertical
27101
+ paddingHorizontal: theme.__hd__.toolbar.space.messageInputPaddingHorizontal
26954
27102
  };
26955
27103
  });
26956
27104
  var StyledInput$1 = index$b(TextInput$1)(function (_ref9) {
@@ -46510,7 +46658,7 @@ var StyledHandlerContainer = index$b(View)(function (_ref5) {
46510
46658
  paddingVertical: theme.__hd__.search.space.inputVerticalPadding
46511
46659
  };
46512
46660
  });
46513
- var StyledBadge = index$b(Badge$1)(function (_ref6) {
46661
+ var StyledBadge$1 = index$b(Badge$1)(function (_ref6) {
46514
46662
  var theme = _ref6.theme;
46515
46663
  return {
46516
46664
  position: 'absolute',
@@ -46712,12 +46860,12 @@ var renderBadge = function renderBadge(props) {
46712
46860
  var content = props.content,
46713
46861
  icon = props.icon,
46714
46862
  rest = _objectWithoutProperties(props, _excluded$1);
46715
- if (content) return /*#__PURE__*/React__default.createElement(StyledBadge, _extends$1({
46863
+ if (content) return /*#__PURE__*/React__default.createElement(StyledBadge$1, _extends$1({
46716
46864
  intent: "primary",
46717
46865
  content: content,
46718
46866
  size: "small"
46719
46867
  }, rest));
46720
- if (icon) return /*#__PURE__*/React__default.createElement(StyledBadge, _extends$1({
46868
+ if (icon) return /*#__PURE__*/React__default.createElement(StyledBadge$1, _extends$1({
46721
46869
  intent: "primary",
46722
46870
  icon: icon,
46723
46871
  size: "small"
@@ -46827,4 +46975,120 @@ var FloatingIsland = function FloatingIsland(_ref2) {
46827
46975
  }));
46828
46976
  };
46829
46977
 
46830
- export { Accordion, Alert, AppCue, Attachment, index$a as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar$1 as Calendar, Card$1 as Card, index$9 as Carousel, Chart, Checkbox, Chip, Collapse, ContentNavigator, index$8 as DatePicker, Divider, index$7 as Drawer, Empty, ErrorComponent as Error, FAB, FlatListWithFAB, FloatingIsland, HeroDesignProvider, Icon, Image, List$1 as List, LocaleProvider, index$6 as MapPin, PageControl, PinInput, Portal$1 as Portal, Progress, CompoundRadio as Radio, Rate, RefreshControl, index as RichTextEditor, ScrollViewWithFAB, Search, SectionHeading, SectionListWithFAB, index$4 as Select, Skeleton, Slider, Spinner, Success, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, PublicTimePicker as TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, ehJobsSystemPalette, ehWorkDarkSystemPalette, ehWorkSystemPalette, getTheme, jobsSystemPalette, scale, index$b as styled, swagDarkSystemPalette, swagLightJobsSystemPalette, swagSystemPalette$1 as swagLightSystemPalette, swagSystemPalette$2 as swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };
46978
+ var getBackgroundColor = function getBackgroundColor(theme, themeIsActive, themeHasLabel, themeVariant) {
46979
+ var colors = theme.__hd__.filterTrigger.colors;
46980
+ if (themeIsActive && !themeHasLabel && themeVariant === 'filled') {
46981
+ return colors.wrapper.background.active.filledLabeless;
46982
+ }
46983
+ var state = themeIsActive ? 'active' : 'inactive';
46984
+ return colors.wrapper.background[state][themeVariant];
46985
+ };
46986
+ var getBorderStyles = function getBorderStyles(theme, themeIsActive, themeHasLabel, themeVariant) {
46987
+ var _theme$__hd__$filterT = theme.__hd__.filterTrigger,
46988
+ colors = _theme$__hd__$filterT.colors,
46989
+ borderWidths = _theme$__hd__$filterT.borderWidths,
46990
+ radii = _theme$__hd__$filterT.radii;
46991
+ var borderColor;
46992
+ if (themeIsActive && !themeHasLabel && themeVariant === 'filled') {
46993
+ borderColor = colors.wrapper.border.active.filledLabeless;
46994
+ } else {
46995
+ var state = themeIsActive ? 'active' : 'inactive';
46996
+ borderColor = colors.wrapper.border[state][themeVariant];
46997
+ }
46998
+ return {
46999
+ borderWidth: borderWidths.wrapper[themeVariant],
47000
+ borderColor: borderColor,
47001
+ borderRadius: themeHasLabel ? radii.wrapper["default"] : radii.wrapper.labeless
47002
+ };
47003
+ };
47004
+ var getSpacingStyles = function getSpacingStyles(theme, themeHasLabel) {
47005
+ var space = theme.__hd__.filterTrigger.space;
47006
+ var paddingConfig = themeHasLabel ? space.wrapper["default"] : space.wrapper.labeless;
47007
+ return {
47008
+ gap: space.wrapper.itemGap,
47009
+ paddingHorizontal: paddingConfig.paddingHorizontal,
47010
+ paddingVertical: paddingConfig.paddingVertical
47011
+ };
47012
+ };
47013
+ var StyledFilterWrapper = index$b(TouchableOpacity)(function (_ref) {
47014
+ var theme = _ref.theme,
47015
+ themeActive = _ref.themeActive,
47016
+ themeVariant = _ref.themeVariant,
47017
+ themeHasLabel = _ref.themeHasLabel;
47018
+ return _objectSpread2(_objectSpread2({
47019
+ position: 'relative',
47020
+ flexDirection: 'row',
47021
+ alignItems: 'center',
47022
+ justifyContent: 'center',
47023
+ alignSelf: 'flex-start',
47024
+ height: theme.__hd__.filterTrigger.sizes.wrapperHeight,
47025
+ backgroundColor: getBackgroundColor(theme, themeActive, themeHasLabel, themeVariant)
47026
+ }, getBorderStyles(theme, themeActive, themeHasLabel, themeVariant)), getSpacingStyles(theme, themeHasLabel));
47027
+ });
47028
+ var StyledBadge = index$b(Badge$1)(function (_ref2) {
47029
+ var theme = _ref2.theme,
47030
+ themeHasLabel = _ref2.themeHasLabel;
47031
+ return _objectSpread2({
47032
+ position: 'absolute'
47033
+ }, themeHasLabel ? {
47034
+ right: 0,
47035
+ bottom: 0
47036
+ } : {
47037
+ right: -theme.__hd__.filterTrigger.space.badge.labelessRight,
47038
+ bottom: -theme.__hd__.filterTrigger.space.badge.labelessBottom
47039
+ });
47040
+ });
47041
+ var StyledText = index$b(Typography.Body)(function (_ref3) {
47042
+ var theme = _ref3.theme;
47043
+ return {
47044
+ lineHeight: theme.__hd__.filterTrigger.lineHeights.text,
47045
+ textAlignVertical: 'center',
47046
+ includeFontPadding: false
47047
+ };
47048
+ });
47049
+
47050
+ var FilterTrigger = function FilterTrigger(_ref) {
47051
+ var label = _ref.label,
47052
+ _ref$active = _ref.active,
47053
+ active = _ref$active === void 0 ? false : _ref$active,
47054
+ _ref$filterCount = _ref.filterCount,
47055
+ filterCount = _ref$filterCount === void 0 ? 0 : _ref$filterCount,
47056
+ _ref$variant = _ref.variant,
47057
+ variant = _ref$variant === void 0 ? 'filled' : _ref$variant,
47058
+ suffix = _ref.suffix,
47059
+ onPress = _ref.onPress,
47060
+ testID = _ref.testID,
47061
+ style = _ref.style;
47062
+ var shouldShowBadge = filterCount > 0 && active;
47063
+ var iconIntent = active ? 'text' : 'inactive';
47064
+ var typographyVariant = active ? 'small-bold' : 'small';
47065
+ return /*#__PURE__*/React__default.createElement(StyledFilterWrapper, {
47066
+ testID: testID,
47067
+ style: style,
47068
+ themeActive: active,
47069
+ themeVariant: variant,
47070
+ onPress: onPress,
47071
+ themeHasLabel: !!label
47072
+ }, label ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledText, {
47073
+ variant: typographyVariant
47074
+ }, label), shouldShowBadge && /*#__PURE__*/React__default.createElement(Badge$1, {
47075
+ content: filterCount,
47076
+ size: "small"
47077
+ }), suffix && /*#__PURE__*/React__default.createElement(Icon, {
47078
+ icon: suffix,
47079
+ size: "xxxsmall",
47080
+ intent: iconIntent,
47081
+ testID: "".concat(testID, "-suffix")
47082
+ })) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, suffix && /*#__PURE__*/React__default.createElement(Icon, {
47083
+ icon: suffix,
47084
+ size: "xsmall",
47085
+ intent: iconIntent,
47086
+ testID: "".concat(testID, "-suffix")
47087
+ }), shouldShowBadge && /*#__PURE__*/React__default.createElement(StyledBadge, {
47088
+ content: filterCount,
47089
+ size: "small",
47090
+ themeHasLabel: !!label
47091
+ })));
47092
+ };
47093
+
47094
+ export { Accordion, Alert, AppCue, Attachment, index$a as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar$1 as Calendar, Card$1 as Card, index$9 as Carousel, Chart, Checkbox, Chip, Collapse, ContentNavigator, index$8 as DatePicker, Divider, index$7 as Drawer, Empty, ErrorComponent as Error, FAB, FilterTrigger, FlatListWithFAB, FloatingIsland, HeroDesignProvider, Icon, Image, List$1 as List, LocaleProvider, index$6 as MapPin, PageControl, PinInput, Portal$1 as Portal, Progress, CompoundRadio as Radio, Rate, RefreshControl, index as RichTextEditor, ScrollViewWithFAB, Search, SectionHeading, SectionListWithFAB, index$4 as Select, Skeleton, Slider, Spinner, Success, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, PublicTimePicker as TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, ehJobsSystemPalette, ehWorkDarkSystemPalette, ehWorkSystemPalette, getTheme, jobsSystemPalette, scale, index$b as styled, swagDarkSystemPalette, swagLightJobsSystemPalette, swagSystemPalette$1 as swagLightSystemPalette, swagSystemPalette$2 as swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };