@hero-design/rn 8.19.0 → 8.21.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 (44) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/es/index.js +190 -60
  3. package/lib/index.js +190 -60
  4. package/package.json +5 -5
  5. package/src/components/Button/Button.tsx +1 -1
  6. package/src/components/Button/StyledButton.tsx +0 -3
  7. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +0 -10
  8. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +0 -16
  9. package/src/components/Calendar/index.tsx +7 -2
  10. package/src/components/Carousel/StyledCarousel.tsx +11 -3
  11. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +791 -6
  12. package/src/components/Carousel/__tests__/index.spec.tsx +41 -31
  13. package/src/components/Carousel/index.tsx +39 -7
  14. package/src/components/DatePicker/DatePickerAndroid.tsx +1 -1
  15. package/src/components/DatePicker/DatePickerCalendar.tsx +110 -0
  16. package/src/components/DatePicker/DatePickerIOS.tsx +1 -1
  17. package/src/components/DatePicker/__tests__/DatePicker.spec.tsx +27 -8
  18. package/src/components/DatePicker/__tests__/DatePickerCalendar.spec.tsx +61 -0
  19. package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +670 -0
  20. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +220 -0
  21. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +0 -1
  22. package/src/components/DatePicker/index.tsx +5 -1
  23. package/src/components/DatePicker/types.ts +7 -1
  24. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  25. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +0 -1
  26. package/src/components/TimePicker/types.ts +1 -1
  27. package/src/components/Toast/Toast.tsx +3 -1
  28. package/src/components/Toast/types.ts +4 -0
  29. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +2 -3
  30. package/src/theme/components/button.ts +0 -5
  31. package/src/theme/components/carousel.ts +3 -0
  32. package/types/components/Calendar/index.d.ts +6 -2
  33. package/types/components/Carousel/StyledCarousel.d.ts +7 -1
  34. package/types/components/Carousel/index.d.ts +7 -1
  35. package/types/components/DatePicker/DatePickerAndroid.d.ts +1 -1
  36. package/types/components/DatePicker/DatePickerCalendar.d.ts +3 -0
  37. package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
  38. package/types/components/DatePicker/index.d.ts +1 -1
  39. package/types/components/DatePicker/types.d.ts +7 -1
  40. package/types/components/TimePicker/types.d.ts +1 -1
  41. package/types/components/Toast/Toast.d.ts +1 -1
  42. package/types/components/Toast/types.d.ts +4 -0
  43. package/types/theme/components/button.d.ts +0 -3
  44. package/types/theme/components/carousel.d.ts +2 -0
@@ -1,9 +1,9 @@
1
- @hero-design/rn:build: cache hit, replaying output c1d5a13d0b76f6c2
2
- @hero-design/rn:build: $ yarn build:js && yarn build:types
3
- @hero-design/rn:build: $ rollup -c
4
- @hero-design/rn:build: 
5
- @hero-design/rn:build: src/index.ts → lib/index.js, es/index.js...
6
- @hero-design/rn:build: (!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
7
- @hero-design/rn:build: (!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
8
- @hero-design/rn:build: created lib/index.js, es/index.js in 24.3s
9
- @hero-design/rn:build: $ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
1
+ @hero-design/rn:build: cache hit, replaying output 46270a3aa1e515d5
2
+ @hero-design/rn:build: $ yarn build:js && yarn build:types
3
+ @hero-design/rn:build: $ rollup -c
4
+ @hero-design/rn:build: 
5
+ @hero-design/rn:build: src/index.ts → lib/index.js, es/index.js...
6
+ @hero-design/rn:build: (!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
7
+ @hero-design/rn:build: (!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
8
+ @hero-design/rn:build: created lib/index.js, es/index.js in 25s
9
+ @hero-design/rn:build: $ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
package/es/index.js CHANGED
@@ -1868,9 +1868,6 @@ var getButtonTheme = function getButtonTheme(theme) {
1868
1868
  utility: theme.fontSizes.large,
1869
1869
  textVariant: theme.fontSizes.large
1870
1870
  };
1871
- var lineHeight = {
1872
- "default": theme.lineHeights.large
1873
- };
1874
1871
  var borderWidth = {
1875
1872
  "default": theme.space.xxsmall
1876
1873
  };
@@ -1918,7 +1915,6 @@ var getButtonTheme = function getButtonTheme(theme) {
1918
1915
  sizes: sizes,
1919
1916
  radii: radii,
1920
1917
  colors: colors,
1921
- lineHeight: lineHeight,
1922
1918
  space: space
1923
1919
  };
1924
1920
  };
@@ -1985,7 +1981,9 @@ var getCarouselTheme = function getCarouselTheme(theme) {
1985
1981
  headingMarginBottom: theme.space.medium,
1986
1982
  footerPaddingHorizontal: theme.space.large,
1987
1983
  footerPaddingVertical: theme.space.medium,
1988
- footerMarginBottom: theme.space.large
1984
+ footerMarginBottom: theme.space.large,
1985
+ pageControlPaddingVertical: theme.space.small,
1986
+ pageControlWrapperHeight: scale(48)
1989
1987
  };
1990
1988
  var fontSizes = {
1991
1989
  heading: theme.fontSizes['xxxxxlarge']
@@ -6045,7 +6043,7 @@ var StyledText$3 = index$a(Text$1)(function (_ref) {
6045
6043
  });
6046
6044
  });
6047
6045
 
6048
- var _excluded$r = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
6046
+ var _excluded$s = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
6049
6047
  var Text = function Text(_ref) {
6050
6048
  var children = _ref.children,
6051
6049
  _ref$fontSize = _ref.fontSize,
@@ -6058,7 +6056,7 @@ var Text = function Text(_ref) {
6058
6056
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6059
6057
  _ref$allowFontScaling = _ref.allowFontScaling,
6060
6058
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
6061
- nativeProps = _objectWithoutProperties(_ref, _excluded$r);
6059
+ nativeProps = _objectWithoutProperties(_ref, _excluded$s);
6062
6060
  return /*#__PURE__*/React.createElement(StyledText$3, _extends$1({}, nativeProps, {
6063
6061
  themeFontSize: fontSize,
6064
6062
  themeFontWeight: fontWeight,
@@ -6580,10 +6578,10 @@ var StyledHeroIcon = index$a(HeroIcon)(function (_ref) {
6580
6578
  };
6581
6579
  });
6582
6580
 
6583
- var _excluded$q = ["style"];
6581
+ var _excluded$r = ["style"];
6584
6582
  var AnimatedIcon = function AnimatedIcon(_ref) {
6585
6583
  var style = _ref.style,
6586
- otherProps = _objectWithoutProperties(_ref, _excluded$q);
6584
+ otherProps = _objectWithoutProperties(_ref, _excluded$r);
6587
6585
  var rotateAnimation = useRef(new Animated.Value(0));
6588
6586
  useEffect(function () {
6589
6587
  var animation = Animated.loop(Animated.timing(rotateAnimation.current, {
@@ -6689,7 +6687,7 @@ var AccordionItem = function AccordionItem(_ref) {
6689
6687
  }, content));
6690
6688
  };
6691
6689
 
6692
- var _excluded$p = ["key"];
6690
+ var _excluded$q = ["key"];
6693
6691
  var Accordion = function Accordion(_ref) {
6694
6692
  var items = _ref.items,
6695
6693
  activeItemKey = _ref.activeItemKey,
@@ -6710,7 +6708,7 @@ var Accordion = function Accordion(_ref) {
6710
6708
  testID: testID
6711
6709
  }, items.map(function (_ref2, index) {
6712
6710
  var key = _ref2.key,
6713
- props = _objectWithoutProperties(_ref2, _excluded$p);
6711
+ props = _objectWithoutProperties(_ref2, _excluded$q);
6714
6712
  var open = _activeItemKey === key;
6715
6713
  return /*#__PURE__*/React.createElement(React.Fragment, {
6716
6714
  key: key
@@ -7107,7 +7105,7 @@ var StyledStatus = index$a(Animated.View)(function (_ref3) {
7107
7105
  };
7108
7106
  });
7109
7107
 
7110
- var _excluded$o = ["children", "visible", "intent", "style", "testID"];
7108
+ var _excluded$p = ["children", "visible", "intent", "style", "testID"];
7111
7109
  var Status = function Status(_ref) {
7112
7110
  var children = _ref.children,
7113
7111
  _ref$visible = _ref.visible,
@@ -7116,7 +7114,7 @@ var Status = function Status(_ref) {
7116
7114
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
7117
7115
  style = _ref.style,
7118
7116
  testID = _ref.testID,
7119
- nativeProps = _objectWithoutProperties(_ref, _excluded$o);
7117
+ nativeProps = _objectWithoutProperties(_ref, _excluded$p);
7120
7118
  var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
7121
7119
  opacity = _React$useRef.current;
7122
7120
  var isFirstRendering = React.useRef(true);
@@ -7149,7 +7147,7 @@ var Status = function Status(_ref) {
7149
7147
  }));
7150
7148
  };
7151
7149
 
7152
- var _excluded$n = ["content", "visible", "max", "intent", "style", "testID"];
7150
+ var _excluded$o = ["content", "visible", "max", "intent", "style", "testID"];
7153
7151
  var DEFAULT_MAX_NUMBER = 99;
7154
7152
  var getPaddingState = function getPaddingState(content) {
7155
7153
  return content.length > 1 ? 'wideContent' : 'narrowContent';
@@ -7164,7 +7162,7 @@ var Badge = function Badge(_ref) {
7164
7162
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
7165
7163
  style = _ref.style,
7166
7164
  testID = _ref.testID,
7167
- nativeProps = _objectWithoutProperties(_ref, _excluded$n);
7165
+ nativeProps = _objectWithoutProperties(_ref, _excluded$o);
7168
7166
  var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
7169
7167
  opacity = _React$useRef.current;
7170
7168
  var isFirstRendering = React.useRef(true);
@@ -7268,7 +7266,7 @@ function omit(keys, obj) {
7268
7266
  return result;
7269
7267
  }
7270
7268
 
7271
- var _excluded$m = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
7269
+ var _excluded$n = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
7272
7270
  var getInactiveIcon = function getInactiveIcon(icon) {
7273
7271
  var inactiveIcon = "".concat(icon, "-outlined");
7274
7272
  return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
@@ -7279,7 +7277,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
7279
7277
  renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
7280
7278
  selectedTabKey = _ref.selectedTabKey,
7281
7279
  tabs = _ref.tabs,
7282
- nativeProps = _objectWithoutProperties(_ref, _excluded$m);
7280
+ nativeProps = _objectWithoutProperties(_ref, _excluded$n);
7283
7281
  var insets = useSafeAreaInsets();
7284
7282
  /**
7285
7283
  * List of loaded tabs, tabs will be loaded when navigated to.
@@ -7366,13 +7364,13 @@ var StyledDivider = index$a(View)(function (_ref) {
7366
7364
  }, horizontalMargin), verticalMargin);
7367
7365
  });
7368
7366
 
7369
- var _excluded$l = ["marginHorizontal", "marginVertical", "style", "testID"];
7367
+ var _excluded$m = ["marginHorizontal", "marginVertical", "style", "testID"];
7370
7368
  var Divider = function Divider(_ref) {
7371
7369
  var marginHorizontal = _ref.marginHorizontal,
7372
7370
  marginVertical = _ref.marginVertical,
7373
7371
  style = _ref.style,
7374
7372
  testID = _ref.testID,
7375
- nativeProps = _objectWithoutProperties(_ref, _excluded$l);
7373
+ nativeProps = _objectWithoutProperties(_ref, _excluded$m);
7376
7374
  return /*#__PURE__*/React.createElement(StyledDivider, _extends$1({}, nativeProps, {
7377
7375
  themeMarginHorizontal: marginHorizontal,
7378
7376
  themeMarginVertical: marginVertical,
@@ -7502,7 +7500,7 @@ var StyledLoadingDot = index$a(View)(function (_ref2) {
7502
7500
  }, themeStyling());
7503
7501
  });
7504
7502
 
7505
- var _excluded$k = ["count", "size", "testID", "themeVariant"];
7503
+ var _excluded$l = ["count", "size", "testID", "themeVariant"];
7506
7504
  var AnimatedLoadingIndicatorWrapper = Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
7507
7505
  var AnimatedLoadingDot = Animated.createAnimatedComponent(StyledLoadingDot);
7508
7506
  var renderDotComponent = function renderDotComponent(_ref) {
@@ -7534,7 +7532,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
7534
7532
  size = _ref2$size === void 0 ? 12 : _ref2$size,
7535
7533
  testID = _ref2.testID,
7536
7534
  themeVariant = _ref2.themeVariant,
7537
- nativeProps = _objectWithoutProperties(_ref2, _excluded$k);
7535
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$l);
7538
7536
  var progressAnimation = useRef(new Animated.Value(0));
7539
7537
  useEffect(function () {
7540
7538
  var animation = Animated.loop(Animated.timing(progressAnimation.current, {
@@ -7619,8 +7617,7 @@ var genOutlineTextStyles = function genOutlineTextStyles(theme, intent, disabled
7619
7617
  };
7620
7618
  };
7621
7619
  return _objectSpread2({
7622
- fontSize: theme.__hd__.button.fontSize["default"],
7623
- lineHeight: theme.__hd__.button.lineHeight["default"]
7620
+ fontSize: theme.__hd__.button.fontSize["default"]
7624
7621
  }, textColorStyling());
7625
7622
  };
7626
7623
  var genTextVariantTextStyles = function genTextVariantTextStyles(theme, intent, disabled) {
@@ -7635,8 +7632,7 @@ var genTextVariantTextStyles = function genTextVariantTextStyles(theme, intent,
7635
7632
  };
7636
7633
  };
7637
7634
  return _objectSpread2({
7638
- fontSize: theme.__hd__.button.fontSize.textVariant,
7639
- lineHeight: theme.__hd__.button.lineHeight["default"]
7635
+ fontSize: theme.__hd__.button.fontSize.textVariant
7640
7636
  }, textColorStyling());
7641
7637
  };
7642
7638
  var StyledButtonContainer = index$a(TouchableHighlight)(function (_ref) {
@@ -7684,7 +7680,6 @@ var StyledButtonText = index$a(Typography.Text)(function (_ref2) {
7684
7680
  case 'filled-danger':
7685
7681
  return {
7686
7682
  fontSize: theme.__hd__.button.fontSize["default"],
7687
- lineHeight: theme.__hd__.button.lineHeight["default"],
7688
7683
  color: theme.__hd__.button.colors.invertedText
7689
7684
  };
7690
7685
  case 'outlined-primary':
@@ -7844,9 +7839,9 @@ var Button = function Button(_ref) {
7844
7839
  testID: "".concat(testID, "-left-icon"),
7845
7840
  themeVariant: themeVariant
7846
7841
  })), /*#__PURE__*/React.createElement(StyledButtonText, {
7847
- disabled: disabled,
7848
7842
  ellipsizeMode: "tail",
7849
7843
  numberOfLines: 1,
7844
+ disabled: disabled,
7850
7845
  themeVariant: themeVariant
7851
7846
  }, text), rightIcon !== undefined && /*#__PURE__*/React.createElement(StyledButtonIconWrapper, {
7852
7847
  themePosition: "right"
@@ -7940,13 +7935,13 @@ CompoundButton.Icon = IconButton;
7940
7935
  CompoundButton.Utility = UtilityButton;
7941
7936
 
7942
7937
  // eslint-disable-next-line @typescript-eslint/no-empty-function
7943
- var noop = function noop() {};
7938
+ var noop$1 = function noop() {};
7944
7939
 
7945
7940
  var Header = function Header(_ref) {
7946
7941
  var content = _ref.content,
7947
7942
  showDivider = _ref.showDivider,
7948
7943
  _ref$onRequestClose = _ref.onRequestClose,
7949
- onRequestClose = _ref$onRequestClose === void 0 ? noop : _ref$onRequestClose,
7944
+ onRequestClose = _ref$onRequestClose === void 0 ? noop$1 : _ref$onRequestClose,
7950
7945
  showCloseButton = _ref.showCloseButton;
7951
7946
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledHeaderWrapper, null, typeof content === 'string' ? /*#__PURE__*/React.createElement(StyledHeader, null, /*#__PURE__*/React.createElement(Typography.Text, {
7952
7947
  fontSize: "large",
@@ -7964,11 +7959,11 @@ var Header = function Header(_ref) {
7964
7959
  })) : null), showDivider ? /*#__PURE__*/React.createElement(Divider, null) : null);
7965
7960
  };
7966
7961
 
7967
- var _excluded$j = ["scrollEventThrottle"];
7962
+ var _excluded$k = ["scrollEventThrottle"];
7968
7963
  var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
7969
7964
  var _ref$scrollEventThrot = _ref.scrollEventThrottle,
7970
7965
  scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
7971
- props = _objectWithoutProperties(_ref, _excluded$j);
7966
+ props = _objectWithoutProperties(_ref, _excluded$k);
7972
7967
  var _useContext = useContext(BottomSheetContext),
7973
7968
  setInternalShowDivider = _useContext.setInternalShowDivider;
7974
7969
  var onScrollBeginDrag = useCallback(function (e) {
@@ -8283,7 +8278,7 @@ var borderWidths = {
8283
8278
  var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
8284
8279
  var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
8285
8280
 
8286
- var _excluded$i = ["theme"];
8281
+ var _excluded$j = ["theme"];
8287
8282
  var getThemeValue = function getThemeValue(theme, key, props) {
8288
8283
  var propConfig = config[key];
8289
8284
  var propValue = props[key];
@@ -8310,18 +8305,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
8310
8305
  var configKeys = Object.keys(config);
8311
8306
  var StyledBox = index$a(View)(function (_ref5) {
8312
8307
  var theme = _ref5.theme,
8313
- otherProps = _objectWithoutProperties(_ref5, _excluded$i);
8308
+ otherProps = _objectWithoutProperties(_ref5, _excluded$j);
8314
8309
  var styleProps = pick(configKeys, otherProps);
8315
8310
  var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
8316
8311
  return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
8317
8312
  });
8318
8313
 
8319
- var _excluded$h = ["children", "style", "testID"];
8314
+ var _excluded$i = ["children", "style", "testID"];
8320
8315
  var Box = function Box(_ref) {
8321
8316
  var children = _ref.children,
8322
8317
  style = _ref.style,
8323
8318
  testID = _ref.testID,
8324
- otherProps = _objectWithoutProperties(_ref, _excluded$h);
8319
+ otherProps = _objectWithoutProperties(_ref, _excluded$i);
8325
8320
  return /*#__PURE__*/React.createElement(StyledBox, _extends$1({}, otherProps, {
8326
8321
  style: style,
8327
8322
  testID: testID
@@ -10791,15 +10786,16 @@ var Calendar = function Calendar(_ref) {
10791
10786
  visibleDate = _ref.visibleDate,
10792
10787
  onChange = _ref.onChange,
10793
10788
  _ref$onPreviousPress = _ref.onPreviousPress,
10794
- onPreviousPress = _ref$onPreviousPress === void 0 ? noop : _ref$onPreviousPress,
10789
+ onPreviousPress = _ref$onPreviousPress === void 0 ? noop$1 : _ref$onPreviousPress,
10795
10790
  _ref$onNextPress = _ref.onNextPress,
10796
- onNextPress = _ref$onNextPress === void 0 ? noop : _ref$onNextPress,
10791
+ onNextPress = _ref$onNextPress === void 0 ? noop$1 : _ref$onNextPress,
10797
10792
  _ref$onTitlePress = _ref.onTitlePress,
10798
- onTitlePress = _ref$onTitlePress === void 0 ? noop : _ref$onTitlePress,
10793
+ onTitlePress = _ref$onTitlePress === void 0 ? noop$1 : _ref$onTitlePress,
10799
10794
  minDate = _ref.minDate,
10800
10795
  maxDate = _ref.maxDate,
10801
10796
  _ref$markedDates = _ref.markedDates,
10802
- markedDates = _ref$markedDates === void 0 ? [] : _ref$markedDates;
10797
+ markedDates = _ref$markedDates === void 0 ? [] : _ref$markedDates,
10798
+ testID = _ref.testID;
10803
10799
  var currentMonth = visibleDate.getMonth();
10804
10800
  var currentYear = visibleDate.getFullYear();
10805
10801
  var now = new Date();
@@ -10830,7 +10826,9 @@ var Calendar = function Calendar(_ref) {
10830
10826
  var disableNextButton = maxDate === undefined ? false : !daysOfNextMonth.some(function (date) {
10831
10827
  return date !== undefined;
10832
10828
  }) || maxDate <= lastDateOfMonth;
10833
- return /*#__PURE__*/React.createElement(StyledContainer$5, null, /*#__PURE__*/React.createElement(StyledCalendarHeader, null, /*#__PURE__*/React.createElement(ContentNavigator, {
10829
+ return /*#__PURE__*/React.createElement(StyledContainer$5, {
10830
+ testID: testID
10831
+ }, /*#__PURE__*/React.createElement(StyledCalendarHeader, null, /*#__PURE__*/React.createElement(ContentNavigator, {
10834
10832
  value: formatTime('MMMM yyyy', visibleDate),
10835
10833
  onPreviousPress: onPreviousPress,
10836
10834
  onNextPress: onNextPress,
@@ -10886,7 +10884,7 @@ var Calendar = function Calendar(_ref) {
10886
10884
  })));
10887
10885
  };
10888
10886
 
10889
- var _excluded$g = ["rounded", "size", "testID", "style"];
10887
+ var _excluded$h = ["rounded", "size", "testID", "style"];
10890
10888
  var Image = function Image(_ref) {
10891
10889
  var _ref$rounded = _ref.rounded,
10892
10890
  rounded = _ref$rounded === void 0 ? false : _ref$rounded,
@@ -10894,7 +10892,7 @@ var Image = function Image(_ref) {
10894
10892
  size = _ref$size === void 0 ? '6xlarge' : _ref$size,
10895
10893
  testID = _ref.testID,
10896
10894
  style = _ref.style,
10897
- imageNativeProps = _objectWithoutProperties(_ref, _excluded$g);
10895
+ imageNativeProps = _objectWithoutProperties(_ref, _excluded$h);
10898
10896
  var theme = useTheme();
10899
10897
  var imageSize = theme.__hd__.image.sizes[size];
10900
10898
  return /*#__PURE__*/React.createElement(Image$1, _extends$1({
@@ -11024,8 +11022,19 @@ var StyledCarouselFooterWrapper = index$a(View)(function (_ref5) {
11024
11022
  marginBottom: theme.__hd__.carousel.space.footerMarginBottom
11025
11023
  };
11026
11024
  });
11027
- var StyledPageControl$1 = index$a(PageControl)({
11028
- marginStart: 'auto'
11025
+ var StyledPageControl$1 = index$a(PageControl)(function (_ref6) {
11026
+ var theme = _ref6.theme;
11027
+ return {
11028
+ paddingVertical: theme.__hd__.carousel.space.pageControlPaddingVertical
11029
+ };
11030
+ });
11031
+ var StyledPageControlWrapper = index$a(View)(function (_ref7) {
11032
+ var theme = _ref7.theme;
11033
+ return {
11034
+ alignItems: 'center',
11035
+ justifyContent: 'center',
11036
+ height: theme.__hd__.carousel.space.pageControlWrapperHeight
11037
+ };
11029
11038
  });
11030
11039
 
11031
11040
  function isCarouselImageProps(image) {
@@ -11087,12 +11096,12 @@ var Indicator = index$a(View)(function (_ref2) {
11087
11096
  };
11088
11097
  });
11089
11098
 
11090
- var _excluded$f = ["intent", "children"];
11099
+ var _excluded$g = ["intent", "children"];
11091
11100
  var DataCard = function DataCard(_ref) {
11092
11101
  var _ref$intent = _ref.intent,
11093
11102
  intent = _ref$intent === void 0 ? 'info' : _ref$intent,
11094
11103
  children = _ref.children,
11095
- nativeProps = _objectWithoutProperties(_ref, _excluded$f);
11104
+ nativeProps = _objectWithoutProperties(_ref, _excluded$g);
11096
11105
  return /*#__PURE__*/React.createElement(StyledDataCard, nativeProps, /*#__PURE__*/React.createElement(Indicator, {
11097
11106
  themeIntent: intent,
11098
11107
  testID: "data-card-indicator"
@@ -11110,11 +11119,11 @@ var StyledCard$1 = index$a(View)(function (_ref) {
11110
11119
  });
11111
11120
  });
11112
11121
 
11113
- var _excluded$e = ["intent", "children"];
11122
+ var _excluded$f = ["intent", "children"];
11114
11123
  var Card = function Card(_ref) {
11115
11124
  var intent = _ref.intent,
11116
11125
  children = _ref.children,
11117
- nativeProps = _objectWithoutProperties(_ref, _excluded$e);
11126
+ nativeProps = _objectWithoutProperties(_ref, _excluded$f);
11118
11127
  return /*#__PURE__*/React.createElement(StyledCard$1, _extends$1({}, nativeProps, {
11119
11128
  themeIntent: intent
11120
11129
  }), children);
@@ -11302,7 +11311,7 @@ var CardCarousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
11302
11311
  }));
11303
11312
  });
11304
11313
 
11305
- var _excluded$d = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination"];
11314
+ var _excluded$e = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "pageControlPosition"];
11306
11315
  function useStateFromProp(initialValue) {
11307
11316
  var _useState = useState(initialValue),
11308
11317
  _useState2 = _slicedToArray(_useState, 2),
@@ -11313,6 +11322,9 @@ function useStateFromProp(initialValue) {
11313
11322
  }, [initialValue]);
11314
11323
  return [value, setValue];
11315
11324
  }
11325
+ var noop = function noop(_) {
11326
+ return true;
11327
+ };
11316
11328
  var Carousel = function Carousel(_ref) {
11317
11329
  var items = _ref.items,
11318
11330
  onItemIndexChange = _ref.onItemIndexChange,
@@ -11321,10 +11333,12 @@ var Carousel = function Carousel(_ref) {
11321
11333
  selectedItemIndex = _ref$selectedItemInde === void 0 ? 0 : _ref$selectedItemInde,
11322
11334
  style = _ref.style,
11323
11335
  _ref$shouldShowPagina = _ref.shouldShowPagination,
11324
- shouldShowPagination = _ref$shouldShowPagina === void 0 ? function () {
11325
- return true;
11326
- } : _ref$shouldShowPagina,
11327
- nativeProps = _objectWithoutProperties(_ref, _excluded$d);
11336
+ shouldShowPagination = _ref$shouldShowPagina === void 0 ? noop : _ref$shouldShowPagina,
11337
+ _ref$pageControlPosit = _ref.pageControlPosition,
11338
+ pageControlPosition = _ref$pageControlPosit === void 0 ? 'bottom' : _ref$pageControlPosit,
11339
+ nativeProps = _objectWithoutProperties(_ref, _excluded$e);
11340
+ useDeprecation("shouldShowPagination prop has been deprecated", shouldShowPagination !== noop);
11341
+ useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition !== 'bottom');
11328
11342
  var carouselRef = useRef(null);
11329
11343
  var _useStateFromProp = useStateFromProp(selectedItemIndex),
11330
11344
  _useStateFromProp2 = _slicedToArray(_useStateFromProp, 2),
@@ -11366,7 +11380,10 @@ var Carousel = function Carousel(_ref) {
11366
11380
  style: style
11367
11381
  }, nativeProps), /*#__PURE__*/React.createElement(StyledBackDrop, {
11368
11382
  themeSlideBackground: items[currentSlideIndex].background
11369
- }), /*#__PURE__*/React.createElement(StyledCarouselView, null, /*#__PURE__*/React.createElement(FlatList, {
11383
+ }), /*#__PURE__*/React.createElement(StyledPageControlWrapper, null, pageControlPosition === 'top' && shouldShowPagination(currentSlideIndex) && /*#__PURE__*/React.createElement(StyledPageControl$1, {
11384
+ numberOfPages: items.length,
11385
+ currentPage: currentSlideIndex
11386
+ })), /*#__PURE__*/React.createElement(StyledCarouselView, null, /*#__PURE__*/React.createElement(FlatList, {
11370
11387
  horizontal: true,
11371
11388
  showsHorizontalScrollIndicator: false,
11372
11389
  pagingEnabled: true,
@@ -11400,7 +11417,7 @@ var Carousel = function Carousel(_ref) {
11400
11417
  width: width
11401
11418
  });
11402
11419
  }
11403
- }), /*#__PURE__*/React.createElement(StyledCarouselFooterWrapper, null, renderActions && renderActions(currentSlideIndex), shouldShowPagination(currentSlideIndex) && /*#__PURE__*/React.createElement(StyledPageControl$1, {
11420
+ }), /*#__PURE__*/React.createElement(StyledCarouselFooterWrapper, null, renderActions && renderActions(currentSlideIndex), pageControlPosition === 'bottom' && shouldShowPagination(currentSlideIndex) && /*#__PURE__*/React.createElement(StyledPageControl$1, {
11404
11421
  numberOfPages: items.length,
11405
11422
  currentPage: currentSlideIndex
11406
11423
  }))));
@@ -11636,7 +11653,7 @@ var StyledErrorAndMaxLengthContainer = index$a(View)(function () {
11636
11653
  };
11637
11654
  });
11638
11655
 
11639
- var _excluded$c = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
11656
+ var _excluded$d = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
11640
11657
  var getVariant$1 = function getVariant(_ref) {
11641
11658
  var disabled = _ref.disabled,
11642
11659
  error = _ref.error,
@@ -11684,7 +11701,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
11684
11701
  renderInputValue = _ref2.renderInputValue,
11685
11702
  _ref2$allowFontScalin = _ref2.allowFontScaling,
11686
11703
  allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
11687
- nativeProps = _objectWithoutProperties(_ref2, _excluded$c);
11704
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$d);
11688
11705
  var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
11689
11706
  var isEmptyValue = displayText.length === 0;
11690
11707
  var actualSuffix = loading ? 'loading' : suffix;
@@ -11917,6 +11934,110 @@ var DatePickerAndroid = function DatePickerAndroid(_ref) {
11917
11934
  }) : null);
11918
11935
  };
11919
11936
 
11937
+ var InternalCalendar = function InternalCalendar(_ref) {
11938
+ var minDate = _ref.minDate,
11939
+ maxDate = _ref.maxDate,
11940
+ value = _ref.value,
11941
+ _onChange = _ref.onChange;
11942
+ var _useState = useState(value || new Date()),
11943
+ _useState2 = _slicedToArray(_useState, 2),
11944
+ visibleDate = _useState2[0],
11945
+ setVisibleDate = _useState2[1];
11946
+ var _useState3 = useState(value || new Date()),
11947
+ _useState4 = _slicedToArray(_useState3, 2),
11948
+ selectingDate = _useState4[0],
11949
+ setSelectingDate = _useState4[1];
11950
+ return /*#__PURE__*/React.createElement(Calendar, {
11951
+ testID: "calendar",
11952
+ value: selectingDate,
11953
+ visibleDate: visibleDate,
11954
+ onChange: function onChange(date) {
11955
+ setSelectingDate(date);
11956
+ if (_onChange) {
11957
+ _onChange(date);
11958
+ }
11959
+ },
11960
+ onPreviousPress: function onPreviousPress() {
11961
+ return setVisibleDate(new Date(visibleDate.getFullYear(), visibleDate.getMonth() - 1, 1));
11962
+ },
11963
+ onNextPress: function onNextPress() {
11964
+ return setVisibleDate(new Date(visibleDate.getFullYear(), visibleDate.getMonth() + 1, 1));
11965
+ },
11966
+ minDate: minDate,
11967
+ maxDate: maxDate
11968
+ });
11969
+ };
11970
+ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
11971
+ var value = _ref2.value,
11972
+ _ref2$minDate = _ref2.minDate,
11973
+ minDate = _ref2$minDate === void 0 ? new Date('1900-01-01T00:00:00.000Z') : _ref2$minDate,
11974
+ _ref2$maxDate = _ref2.maxDate,
11975
+ maxDate = _ref2$maxDate === void 0 ? new Date('2100-01-01T00:00:00.000Z') : _ref2$maxDate,
11976
+ label = _ref2.label,
11977
+ placeholder = _ref2.placeholder,
11978
+ onChange = _ref2.onChange,
11979
+ confirmLabel = _ref2.confirmLabel,
11980
+ _ref2$displayFormat = _ref2.displayFormat,
11981
+ displayFormat = _ref2$displayFormat === void 0 ? 'dd/MM/yyyy' : _ref2$displayFormat,
11982
+ _ref2$disabled = _ref2.disabled,
11983
+ disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
11984
+ required = _ref2.required,
11985
+ error = _ref2.error,
11986
+ helpText = _ref2.helpText,
11987
+ style = _ref2.style,
11988
+ testID = _ref2.testID;
11989
+ var _useState5 = useState(false),
11990
+ _useState6 = _slicedToArray(_useState5, 2),
11991
+ open = _useState6[0],
11992
+ setOpen = _useState6[1];
11993
+ var _useState7 = useState(value || new Date()),
11994
+ _useState8 = _slicedToArray(_useState7, 2),
11995
+ selectingDate = _useState8[0],
11996
+ setSelectingDate = _useState8[1];
11997
+ var displayValue = value ? formatTime(displayFormat, value) : '';
11998
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
11999
+ onPress: function onPress() {
12000
+ return setOpen(true);
12001
+ },
12002
+ disabled: disabled
12003
+ }, /*#__PURE__*/React.createElement(View, {
12004
+ pointerEvents: "none",
12005
+ testID: "datePickerCalendar"
12006
+ }, /*#__PURE__*/React.createElement(TextInput, {
12007
+ label: label,
12008
+ value: displayValue,
12009
+ suffix: "calendar-dates-outlined",
12010
+ placeholder: placeholder || displayFormat,
12011
+ disabled: disabled,
12012
+ error: error,
12013
+ required: required,
12014
+ helpText: helpText,
12015
+ testID: testID,
12016
+ style: style
12017
+ })), /*#__PURE__*/React.createElement(BottomSheet$1, {
12018
+ open: open,
12019
+ onRequestClose: function onRequestClose() {
12020
+ return setOpen(false);
12021
+ },
12022
+ header: label,
12023
+ footer: /*#__PURE__*/React.createElement(CompoundButton, {
12024
+ variant: "text",
12025
+ text: confirmLabel,
12026
+ onPress: function onPress() {
12027
+ if (selectingDate) {
12028
+ onChange(selectingDate);
12029
+ }
12030
+ setOpen(false);
12031
+ }
12032
+ })
12033
+ }, /*#__PURE__*/React.createElement(InternalCalendar, {
12034
+ minDate: minDate,
12035
+ maxDate: maxDate,
12036
+ value: value,
12037
+ onChange: setSelectingDate
12038
+ })));
12039
+ };
12040
+
11920
12041
  var StyledPickerWrapper$1 = index$a(View)(function (_ref) {
11921
12042
  var theme = _ref.theme;
11922
12043
  return {
@@ -12005,7 +12126,14 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
12005
12126
  }))));
12006
12127
  };
12007
12128
 
12008
- var DatePicker = function DatePicker(props) {
12129
+ var _excluded$c = ["variant"];
12130
+ var DatePicker = function DatePicker(_ref) {
12131
+ var _ref$variant = _ref.variant,
12132
+ variant = _ref$variant === void 0 ? 'default' : _ref$variant,
12133
+ props = _objectWithoutProperties(_ref, _excluded$c);
12134
+ if (variant === 'calendar') {
12135
+ return /*#__PURE__*/React.createElement(DatePickerCalendar, props);
12136
+ }
12009
12137
  if (Platform.OS === 'ios') {
12010
12138
  return /*#__PURE__*/React.createElement(DatePickerIOS, props);
12011
12139
  }
@@ -15566,7 +15694,9 @@ var Toast$1 = function Toast(_ref2) {
15566
15694
  autoDismiss = _ref2$autoDismiss === void 0 ? true : _ref2$autoDismiss,
15567
15695
  onAction = _ref2.onAction,
15568
15696
  actionLabel = _ref2.actionLabel,
15569
- onDismiss = _ref2.onDismiss;
15697
+ onDismiss = _ref2.onDismiss,
15698
+ _ref2$distance = _ref2.distance,
15699
+ distance = _ref2$distance === void 0 ? 0 : _ref2$distance;
15570
15700
  var animatedValue = useRef(new Animated.Value(0)).current;
15571
15701
  var toastConfig = useToastConfig();
15572
15702
  useEffect(function () {
@@ -15594,7 +15724,7 @@ var Toast$1 = function Toast(_ref2) {
15594
15724
  });
15595
15725
  var interpolateY = animatedValue.interpolate({
15596
15726
  inputRange: [0, 1],
15597
- outputRange: [toastConfig.position === 'top' ? -20 : 20, 0]
15727
+ outputRange: toastConfig.position === 'top' ? [-20, distance] : [20, -distance]
15598
15728
  });
15599
15729
  return /*#__PURE__*/React.createElement(Container, {
15600
15730
  themeVariant: variant,