@hero-design/rn 8.16.1 → 8.17.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.
package/lib/index.js CHANGED
@@ -9,6 +9,7 @@ var reactNativeSafeAreaContext = require('react-native-safe-area-context');
9
9
  var DateTimePicker = require('@react-native-community/datetimepicker');
10
10
  var RnSlider = require('@react-native-community/slider');
11
11
  var reactNativeGestureHandler = require('react-native-gesture-handler');
12
+ var LinearGradient = require('react-native-linear-gradient');
12
13
  var PagerView = require('react-native-pager-view');
13
14
  var events = require('events');
14
15
  var reactNativeWebview = require('react-native-webview');
@@ -37,6 +38,7 @@ var reactNative__namespace = /*#__PURE__*/_interopNamespace(reactNative);
37
38
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
38
39
  var DateTimePicker__default = /*#__PURE__*/_interopDefaultLegacy(DateTimePicker);
39
40
  var RnSlider__default = /*#__PURE__*/_interopDefaultLegacy(RnSlider);
41
+ var LinearGradient__default = /*#__PURE__*/_interopDefaultLegacy(LinearGradient);
40
42
  var PagerView__default = /*#__PURE__*/_interopDefaultLegacy(PagerView);
41
43
 
42
44
  function ownKeys(object, enumerableOnly) {
@@ -2606,6 +2608,26 @@ var getSelectTheme = function getSelectTheme(theme) {
2606
2608
  };
2607
2609
  };
2608
2610
 
2611
+ var getSkeletonTheme = function getSkeletonTheme(theme) {
2612
+ var colors = {
2613
+ lightBackground: theme.colors.neutralGlobalSurface,
2614
+ darkBackground: theme.colors.defaultGlobalSurface,
2615
+ lightGradientStart: theme.colors.neutralGlobalSurface,
2616
+ lightGradientEnd: theme.colors.archivedSurface,
2617
+ darkGradientStart: theme.colors.defaultGlobalSurface,
2618
+ darkGradientEnd: theme.colors.archivedSurface
2619
+ };
2620
+ var radii = {
2621
+ rectangular: 0,
2622
+ circular: theme.radii.rounded,
2623
+ rounded: theme.radii.xlarge
2624
+ };
2625
+ return {
2626
+ colors: colors,
2627
+ radii: radii
2628
+ };
2629
+ };
2630
+
2609
2631
  var getSliderTheme = function getSliderTheme(theme) {
2610
2632
  var colors = {
2611
2633
  minimumTrackTint: theme.colors.primary,
@@ -3028,6 +3050,7 @@ var getTheme$1 = function getTheme() {
3028
3050
  richTextEditor: getRichTextEditorTheme(globalTheme),
3029
3051
  sectionHeading: getSectionHeadingTheme(globalTheme),
3030
3052
  select: getSelectTheme(globalTheme),
3053
+ skeleton: getSkeletonTheme(globalTheme),
3031
3054
  slider: getSliderTheme(globalTheme),
3032
3055
  spinner: getSpinnerTheme(globalTheme),
3033
3056
  swipeable: getSwipeableTheme(globalTheme),
@@ -6050,7 +6073,7 @@ var StyledText$3 = index$a(reactNative.Text)(function (_ref) {
6050
6073
  });
6051
6074
  });
6052
6075
 
6053
- var _excluded$q = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
6076
+ var _excluded$r = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
6054
6077
  var Text = function Text(_ref) {
6055
6078
  var children = _ref.children,
6056
6079
  _ref$fontSize = _ref.fontSize,
@@ -6063,7 +6086,7 @@ var Text = function Text(_ref) {
6063
6086
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6064
6087
  _ref$allowFontScaling = _ref.allowFontScaling,
6065
6088
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
6066
- nativeProps = _objectWithoutProperties(_ref, _excluded$q);
6089
+ nativeProps = _objectWithoutProperties(_ref, _excluded$r);
6067
6090
  return /*#__PURE__*/React__default["default"].createElement(StyledText$3, _extends$1({}, nativeProps, {
6068
6091
  themeFontSize: fontSize,
6069
6092
  themeFontWeight: fontWeight,
@@ -6584,10 +6607,10 @@ var StyledHeroIcon = index$a(HeroIcon)(function (_ref) {
6584
6607
  };
6585
6608
  });
6586
6609
 
6587
- var _excluded$p = ["style"];
6610
+ var _excluded$q = ["style"];
6588
6611
  var AnimatedIcon = function AnimatedIcon(_ref) {
6589
6612
  var style = _ref.style,
6590
- otherProps = _objectWithoutProperties(_ref, _excluded$p);
6613
+ otherProps = _objectWithoutProperties(_ref, _excluded$q);
6591
6614
  var rotateAnimation = React.useRef(new reactNative.Animated.Value(0));
6592
6615
  React.useEffect(function () {
6593
6616
  var animation = reactNative.Animated.loop(reactNative.Animated.timing(rotateAnimation.current, {
@@ -6693,7 +6716,7 @@ var AccordionItem = function AccordionItem(_ref) {
6693
6716
  }, content));
6694
6717
  };
6695
6718
 
6696
- var _excluded$o = ["key"];
6719
+ var _excluded$p = ["key"];
6697
6720
  var Accordion = function Accordion(_ref) {
6698
6721
  var items = _ref.items,
6699
6722
  activeItemKey = _ref.activeItemKey,
@@ -6714,7 +6737,7 @@ var Accordion = function Accordion(_ref) {
6714
6737
  testID: testID
6715
6738
  }, items.map(function (_ref2, index) {
6716
6739
  var key = _ref2.key,
6717
- props = _objectWithoutProperties(_ref2, _excluded$o);
6740
+ props = _objectWithoutProperties(_ref2, _excluded$p);
6718
6741
  var open = _activeItemKey === key;
6719
6742
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
6720
6743
  key: key
@@ -6829,7 +6852,7 @@ var Alert = function Alert(_ref2) {
6829
6852
  })) : null);
6830
6853
  };
6831
6854
 
6832
- var StyledContainer$5 = index$a(reactNative.View)({
6855
+ var StyledContainer$6 = index$a(reactNative.View)({
6833
6856
  alignItems: 'center',
6834
6857
  flexDirection: 'row'
6835
6858
  });
@@ -6871,7 +6894,7 @@ var Attachment = function Attachment(_ref) {
6871
6894
  backgroundHighlighted = _ref$backgroundHighli === void 0 ? false : _ref$backgroundHighli,
6872
6895
  style = _ref.style,
6873
6896
  testID = _ref.testID;
6874
- return /*#__PURE__*/React__default["default"].createElement(StyledContainer$5, {
6897
+ return /*#__PURE__*/React__default["default"].createElement(StyledContainer$6, {
6875
6898
  testID: testID,
6876
6899
  style: style
6877
6900
  }, /*#__PURE__*/React__default["default"].createElement(StyledContentContainer$1, {
@@ -7111,7 +7134,7 @@ var StyledStatus = index$a(reactNative.Animated.View)(function (_ref3) {
7111
7134
  };
7112
7135
  });
7113
7136
 
7114
- var _excluded$n = ["children", "visible", "intent", "style", "testID"];
7137
+ var _excluded$o = ["children", "visible", "intent", "style", "testID"];
7115
7138
  var Status = function Status(_ref) {
7116
7139
  var children = _ref.children,
7117
7140
  _ref$visible = _ref.visible,
@@ -7120,7 +7143,7 @@ var Status = function Status(_ref) {
7120
7143
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
7121
7144
  style = _ref.style,
7122
7145
  testID = _ref.testID,
7123
- nativeProps = _objectWithoutProperties(_ref, _excluded$n);
7146
+ nativeProps = _objectWithoutProperties(_ref, _excluded$o);
7124
7147
  var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
7125
7148
  opacity = _React$useRef.current;
7126
7149
  var isFirstRendering = React__default["default"].useRef(true);
@@ -7153,7 +7176,7 @@ var Status = function Status(_ref) {
7153
7176
  }));
7154
7177
  };
7155
7178
 
7156
- var _excluded$m = ["content", "visible", "max", "intent", "style", "testID"];
7179
+ var _excluded$n = ["content", "visible", "max", "intent", "style", "testID"];
7157
7180
  var DEFAULT_MAX_NUMBER = 99;
7158
7181
  var getPaddingState = function getPaddingState(content) {
7159
7182
  return content.length > 1 ? 'wideContent' : 'narrowContent';
@@ -7168,7 +7191,7 @@ var Badge = function Badge(_ref) {
7168
7191
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
7169
7192
  style = _ref.style,
7170
7193
  testID = _ref.testID,
7171
- nativeProps = _objectWithoutProperties(_ref, _excluded$m);
7194
+ nativeProps = _objectWithoutProperties(_ref, _excluded$n);
7172
7195
  var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
7173
7196
  opacity = _React$useRef.current;
7174
7197
  var isFirstRendering = React__default["default"].useRef(true);
@@ -7272,7 +7295,7 @@ function omit(keys, obj) {
7272
7295
  return result;
7273
7296
  }
7274
7297
 
7275
- var _excluded$l = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
7298
+ var _excluded$m = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
7276
7299
  var getInactiveIcon = function getInactiveIcon(icon) {
7277
7300
  var inactiveIcon = "".concat(icon, "-outlined");
7278
7301
  return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
@@ -7283,7 +7306,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
7283
7306
  renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
7284
7307
  selectedTabKey = _ref.selectedTabKey,
7285
7308
  tabs = _ref.tabs,
7286
- nativeProps = _objectWithoutProperties(_ref, _excluded$l);
7309
+ nativeProps = _objectWithoutProperties(_ref, _excluded$m);
7287
7310
  var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
7288
7311
  /**
7289
7312
  * List of loaded tabs, tabs will be loaded when navigated to.
@@ -7370,13 +7393,13 @@ var StyledDivider = index$a(reactNative.View)(function (_ref) {
7370
7393
  }, horizontalMargin), verticalMargin);
7371
7394
  });
7372
7395
 
7373
- var _excluded$k = ["marginHorizontal", "marginVertical", "style", "testID"];
7396
+ var _excluded$l = ["marginHorizontal", "marginVertical", "style", "testID"];
7374
7397
  var Divider = function Divider(_ref) {
7375
7398
  var marginHorizontal = _ref.marginHorizontal,
7376
7399
  marginVertical = _ref.marginVertical,
7377
7400
  style = _ref.style,
7378
7401
  testID = _ref.testID,
7379
- nativeProps = _objectWithoutProperties(_ref, _excluded$k);
7402
+ nativeProps = _objectWithoutProperties(_ref, _excluded$l);
7380
7403
  return /*#__PURE__*/React__default["default"].createElement(StyledDivider, _extends$1({}, nativeProps, {
7381
7404
  themeMarginHorizontal: marginHorizontal,
7382
7405
  themeMarginVertical: marginVertical,
@@ -7506,7 +7529,7 @@ var StyledLoadingDot = index$a(reactNative.View)(function (_ref2) {
7506
7529
  }, themeStyling());
7507
7530
  });
7508
7531
 
7509
- var _excluded$j = ["count", "size", "testID", "themeVariant"];
7532
+ var _excluded$k = ["count", "size", "testID", "themeVariant"];
7510
7533
  var AnimatedLoadingIndicatorWrapper = reactNative.Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
7511
7534
  var AnimatedLoadingDot = reactNative.Animated.createAnimatedComponent(StyledLoadingDot);
7512
7535
  var renderDotComponent = function renderDotComponent(_ref) {
@@ -7538,7 +7561,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
7538
7561
  size = _ref2$size === void 0 ? 12 : _ref2$size,
7539
7562
  testID = _ref2.testID,
7540
7563
  themeVariant = _ref2.themeVariant,
7541
- nativeProps = _objectWithoutProperties(_ref2, _excluded$j);
7564
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$k);
7542
7565
  var progressAnimation = React.useRef(new reactNative.Animated.Value(0));
7543
7566
  React.useEffect(function () {
7544
7567
  var animation = reactNative.Animated.loop(reactNative.Animated.timing(progressAnimation.current, {
@@ -7968,11 +7991,11 @@ var Header = function Header(_ref) {
7968
7991
  })) : null), showDivider ? /*#__PURE__*/React__default["default"].createElement(Divider, null) : null);
7969
7992
  };
7970
7993
 
7971
- var _excluded$i = ["scrollEventThrottle"];
7994
+ var _excluded$j = ["scrollEventThrottle"];
7972
7995
  var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
7973
7996
  var _ref$scrollEventThrot = _ref.scrollEventThrottle,
7974
7997
  scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
7975
- props = _objectWithoutProperties(_ref, _excluded$i);
7998
+ props = _objectWithoutProperties(_ref, _excluded$j);
7976
7999
  var _useContext = React.useContext(BottomSheetContext),
7977
8000
  setInternalShowDivider = _useContext.setInternalShowDivider;
7978
8001
  var onScrollBeginDrag = React.useCallback(function (e) {
@@ -8287,7 +8310,7 @@ var borderWidths = {
8287
8310
  var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
8288
8311
  var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
8289
8312
 
8290
- var _excluded$h = ["theme"];
8313
+ var _excluded$i = ["theme"];
8291
8314
  var getThemeValue = function getThemeValue(theme, key, props) {
8292
8315
  var propConfig = config[key];
8293
8316
  var propValue = props[key];
@@ -8314,18 +8337,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
8314
8337
  var configKeys = Object.keys(config);
8315
8338
  var StyledBox = index$a(reactNative.View)(function (_ref5) {
8316
8339
  var theme = _ref5.theme,
8317
- otherProps = _objectWithoutProperties(_ref5, _excluded$h);
8340
+ otherProps = _objectWithoutProperties(_ref5, _excluded$i);
8318
8341
  var styleProps = pick(configKeys, otherProps);
8319
8342
  var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
8320
8343
  return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
8321
8344
  });
8322
8345
 
8323
- var _excluded$g = ["children", "style", "testID"];
8346
+ var _excluded$h = ["children", "style", "testID"];
8324
8347
  var Box = function Box(_ref) {
8325
8348
  var children = _ref.children,
8326
8349
  style = _ref.style,
8327
8350
  testID = _ref.testID,
8328
- otherProps = _objectWithoutProperties(_ref, _excluded$g);
8351
+ otherProps = _objectWithoutProperties(_ref, _excluded$h);
8329
8352
  return /*#__PURE__*/React__default["default"].createElement(StyledBox, _extends$1({}, otherProps, {
8330
8353
  style: style,
8331
8354
  testID: testID
@@ -10651,7 +10674,7 @@ function ContentNavigator(_ref) {
10651
10674
  }));
10652
10675
  }
10653
10676
 
10654
- var StyledContainer$4 = index$a(reactNative.View)(function (_ref) {
10677
+ var StyledContainer$5 = index$a(reactNative.View)(function (_ref) {
10655
10678
  var theme = _ref.theme;
10656
10679
  return {
10657
10680
  backgroundColor: theme.__hd__.calendar.colors.background
@@ -10834,7 +10857,7 @@ var Calendar = function Calendar(_ref) {
10834
10857
  var disableNextButton = maxDate === undefined ? false : !daysOfNextMonth.some(function (date) {
10835
10858
  return date !== undefined;
10836
10859
  }) || maxDate <= lastDateOfMonth;
10837
- return /*#__PURE__*/React__default["default"].createElement(StyledContainer$4, null, /*#__PURE__*/React__default["default"].createElement(StyledCalendarHeader, null, /*#__PURE__*/React__default["default"].createElement(ContentNavigator, {
10860
+ return /*#__PURE__*/React__default["default"].createElement(StyledContainer$5, null, /*#__PURE__*/React__default["default"].createElement(StyledCalendarHeader, null, /*#__PURE__*/React__default["default"].createElement(ContentNavigator, {
10838
10861
  value: formatTime('MMMM yyyy', visibleDate),
10839
10862
  onPreviousPress: onPreviousPress,
10840
10863
  onNextPress: onNextPress,
@@ -10890,7 +10913,7 @@ var Calendar = function Calendar(_ref) {
10890
10913
  })));
10891
10914
  };
10892
10915
 
10893
- var _excluded$f = ["rounded", "size", "testID", "style"];
10916
+ var _excluded$g = ["rounded", "size", "testID", "style"];
10894
10917
  var Image = function Image(_ref) {
10895
10918
  var _ref$rounded = _ref.rounded,
10896
10919
  rounded = _ref$rounded === void 0 ? false : _ref$rounded,
@@ -10898,7 +10921,7 @@ var Image = function Image(_ref) {
10898
10921
  size = _ref$size === void 0 ? '6xlarge' : _ref$size,
10899
10922
  testID = _ref.testID,
10900
10923
  style = _ref.style,
10901
- imageNativeProps = _objectWithoutProperties(_ref, _excluded$f);
10924
+ imageNativeProps = _objectWithoutProperties(_ref, _excluded$g);
10902
10925
  var theme = useTheme();
10903
10926
  var imageSize = theme.__hd__.image.sizes[size];
10904
10927
  return /*#__PURE__*/React__default["default"].createElement(reactNative.Image, _extends$1({
@@ -11091,12 +11114,12 @@ var Indicator = index$a(reactNative.View)(function (_ref2) {
11091
11114
  };
11092
11115
  });
11093
11116
 
11094
- var _excluded$e = ["intent", "children"];
11117
+ var _excluded$f = ["intent", "children"];
11095
11118
  var DataCard = function DataCard(_ref) {
11096
11119
  var _ref$intent = _ref.intent,
11097
11120
  intent = _ref$intent === void 0 ? 'info' : _ref$intent,
11098
11121
  children = _ref.children,
11099
- nativeProps = _objectWithoutProperties(_ref, _excluded$e);
11122
+ nativeProps = _objectWithoutProperties(_ref, _excluded$f);
11100
11123
  return /*#__PURE__*/React__default["default"].createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__default["default"].createElement(Indicator, {
11101
11124
  themeIntent: intent,
11102
11125
  testID: "data-card-indicator"
@@ -11114,11 +11137,11 @@ var StyledCard$1 = index$a(reactNative.View)(function (_ref) {
11114
11137
  });
11115
11138
  });
11116
11139
 
11117
- var _excluded$d = ["intent", "children"];
11140
+ var _excluded$e = ["intent", "children"];
11118
11141
  var Card = function Card(_ref) {
11119
11142
  var intent = _ref.intent,
11120
11143
  children = _ref.children,
11121
- nativeProps = _objectWithoutProperties(_ref, _excluded$d);
11144
+ nativeProps = _objectWithoutProperties(_ref, _excluded$e);
11122
11145
  return /*#__PURE__*/React__default["default"].createElement(StyledCard$1, _extends$1({}, nativeProps, {
11123
11146
  themeIntent: intent
11124
11147
  }), children);
@@ -11306,7 +11329,7 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
11306
11329
  }));
11307
11330
  });
11308
11331
 
11309
- var _excluded$c = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination"];
11332
+ var _excluded$d = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination"];
11310
11333
  function useStateFromProp(initialValue) {
11311
11334
  var _useState = React.useState(initialValue),
11312
11335
  _useState2 = _slicedToArray(_useState, 2),
@@ -11328,7 +11351,7 @@ var Carousel = function Carousel(_ref) {
11328
11351
  shouldShowPagination = _ref$shouldShowPagina === void 0 ? function () {
11329
11352
  return true;
11330
11353
  } : _ref$shouldShowPagina,
11331
- nativeProps = _objectWithoutProperties(_ref, _excluded$c);
11354
+ nativeProps = _objectWithoutProperties(_ref, _excluded$d);
11332
11355
  var carouselRef = React.useRef(null);
11333
11356
  var _useStateFromProp = useStateFromProp(selectedItemIndex),
11334
11357
  _useStateFromProp2 = _slicedToArray(_useStateFromProp, 2),
@@ -11488,7 +11511,7 @@ var Checkbox = function Checkbox(_ref) {
11488
11511
  })));
11489
11512
  };
11490
11513
 
11491
- var StyledContainer$3 = index$a(reactNative.View)(function (_ref) {
11514
+ var StyledContainer$4 = index$a(reactNative.View)(function (_ref) {
11492
11515
  var theme = _ref.theme;
11493
11516
  return {
11494
11517
  width: '100%',
@@ -11640,7 +11663,7 @@ var StyledErrorAndMaxLengthContainer = index$a(reactNative.View)(function () {
11640
11663
  };
11641
11664
  });
11642
11665
 
11643
- var _excluded$b = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
11666
+ var _excluded$c = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
11644
11667
  var getVariant$1 = function getVariant(_ref) {
11645
11668
  var disabled = _ref.disabled,
11646
11669
  error = _ref.error,
@@ -11688,7 +11711,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11688
11711
  renderInputValue = _ref2.renderInputValue,
11689
11712
  _ref2$allowFontScalin = _ref2.allowFontScaling,
11690
11713
  allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
11691
- nativeProps = _objectWithoutProperties(_ref2, _excluded$b);
11714
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$c);
11692
11715
  var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
11693
11716
  var isEmptyValue = displayText.length === 0;
11694
11717
  var actualSuffix = loading ? 'loading' : suffix;
@@ -11799,7 +11822,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11799
11822
  defaultValue: defaultValue,
11800
11823
  placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
11801
11824
  });
11802
- return /*#__PURE__*/React__default["default"].createElement(StyledContainer$3, {
11825
+ return /*#__PURE__*/React__default["default"].createElement(StyledContainer$4, {
11803
11826
  style: styleWithoutBackgroundColor,
11804
11827
  pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
11805
11828
  testID: testID
@@ -12017,7 +12040,7 @@ var DatePicker = function DatePicker(props) {
12017
12040
  };
12018
12041
 
12019
12042
  var AnimatedPressable = reactNative.Animated.createAnimatedComponent(reactNative.Pressable);
12020
- var StyledContainer$2 = index$a(reactNative.View)(function (_ref) {
12043
+ var StyledContainer$3 = index$a(reactNative.View)(function (_ref) {
12021
12044
  var theme = _ref.theme,
12022
12045
  enableShadow = _ref.enableShadow;
12023
12046
  return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
@@ -12276,7 +12299,7 @@ var Drawer = function Drawer(_ref) {
12276
12299
  return animation.stop();
12277
12300
  };
12278
12301
  }, [visible]);
12279
- return /*#__PURE__*/React__default["default"].createElement(StyledContainer$2, {
12302
+ return /*#__PURE__*/React__default["default"].createElement(StyledContainer$3, {
12280
12303
  testID: testID,
12281
12304
  enableShadow: enableShadow,
12282
12305
  pointerEvents: "box-none"
@@ -12445,7 +12468,7 @@ var StyledErrorDescription = index$a(Typography.Text)(function (_ref9) {
12445
12468
  };
12446
12469
  });
12447
12470
 
12448
- var _excluded$a = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
12471
+ var _excluded$b = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
12449
12472
  _excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
12450
12473
  var renderImage = function renderImage(image) {
12451
12474
  if ( /*#__PURE__*/React.isValidElement(image)) {
@@ -12471,14 +12494,14 @@ var ErrorPage = function ErrorPage(_ref) {
12471
12494
  onCtaPress = _ref.onCtaPress,
12472
12495
  secondaryCtaText = _ref.secondaryCtaText,
12473
12496
  onSecondaryCtaPress = _ref.onSecondaryCtaPress,
12474
- nativeProps = _objectWithoutProperties(_ref, _excluded$a);
12497
+ nativeProps = _objectWithoutProperties(_ref, _excluded$b);
12475
12498
  var showCta = ctaText && onCtaPress !== undefined;
12476
12499
  var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
12477
12500
  var showButtonContainer = showCta || showSecondaryCta;
12478
- return /*#__PURE__*/React__default["default"].createElement(StyledErrorContainer$1, {
12501
+ return /*#__PURE__*/React__default["default"].createElement(StyledErrorContainer$1, _extends$1({
12479
12502
  testID: testID,
12480
12503
  themeVariant: variant
12481
- }, /*#__PURE__*/React__default["default"].createElement(StyledErrorContent, nativeProps, image && /*#__PURE__*/React__default["default"].createElement(StyledErrorImageContainer, null, renderImage(image)), /*#__PURE__*/React__default["default"].createElement(StyledErrorTitle, null, title), description && /*#__PURE__*/React__default["default"].createElement(StyledErrorDescription, null, description)), showButtonContainer && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonPrimary, {
12504
+ }, nativeProps), /*#__PURE__*/React__default["default"].createElement(StyledErrorContent, null, image && /*#__PURE__*/React__default["default"].createElement(StyledErrorImageContainer, null, renderImage(image)), /*#__PURE__*/React__default["default"].createElement(StyledErrorTitle, null, title), description && /*#__PURE__*/React__default["default"].createElement(StyledErrorDescription, null, description)), showButtonContainer && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonPrimary, {
12482
12505
  variant: "filled",
12483
12506
  text: ctaText,
12484
12507
  onPress: onCtaPress
@@ -12615,11 +12638,11 @@ var StyledFABText = index$a(Typography.Text)(function (_ref3) {
12615
12638
  };
12616
12639
  });
12617
12640
 
12618
- var _excluded$9 = ["active"];
12641
+ var _excluded$a = ["active"];
12619
12642
  var AnimatedIcons = reactNative.Animated.createAnimatedComponent(StyledFABIcon);
12620
12643
  var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
12621
12644
  var active = _ref.active,
12622
- iconProps = _objectWithoutProperties(_ref, _excluded$9);
12645
+ iconProps = _objectWithoutProperties(_ref, _excluded$a);
12623
12646
  var rotateAnimation = React.useRef(new reactNative.Animated.Value(active ? 1 : 0));
12624
12647
  React.useEffect(function () {
12625
12648
  var animation = reactNative.Animated.timing(rotateAnimation.current, {
@@ -12745,7 +12768,7 @@ var ActionItem = function ActionItem(_ref) {
12745
12768
  }), /*#__PURE__*/React__default["default"].createElement(StyledActionItemText, null, title)));
12746
12769
  };
12747
12770
 
12748
- var StyledContainer$1 = index$a(reactNative.View)({
12771
+ var StyledContainer$2 = index$a(reactNative.View)({
12749
12772
  position: 'absolute',
12750
12773
  left: 0,
12751
12774
  right: 0,
@@ -12832,7 +12855,7 @@ var ActionGroup = function ActionGroup(_ref2) {
12832
12855
  inputRange: [0, 1],
12833
12856
  outputRange: [0, 1]
12834
12857
  });
12835
- return /*#__PURE__*/React__default["default"].createElement(StyledContainer$1, {
12858
+ return /*#__PURE__*/React__default["default"].createElement(StyledContainer$2, {
12836
12859
  testID: testID,
12837
12860
  pointerEvents: "box-none",
12838
12861
  style: style
@@ -13292,7 +13315,7 @@ var THEME_INTENT_MAP = {
13292
13315
  'archived-inverted': 'archivedInverted'
13293
13316
  };
13294
13317
 
13295
- var StyledContainer = index$a(reactNative.View)(function (_ref) {
13318
+ var StyledContainer$1 = index$a(reactNative.View)(function (_ref) {
13296
13319
  var theme = _ref.theme;
13297
13320
  return {
13298
13321
  flexDirection: 'row',
@@ -13358,7 +13381,7 @@ var StyledStrokeEnd = index$a(reactNative.View)(function (_ref6) {
13358
13381
  };
13359
13382
  });
13360
13383
 
13361
- var _excluded$8 = ["value", "renderValue", "intent", "style", "testID"];
13384
+ var _excluded$9 = ["value", "renderValue", "intent", "style", "testID"];
13362
13385
  var HalfCircle = function HalfCircle(_ref) {
13363
13386
  var type = _ref.type,
13364
13387
  themeIntent = _ref.themeIntent;
@@ -13379,7 +13402,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
13379
13402
  intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
13380
13403
  style = _ref2.style,
13381
13404
  testID = _ref2.testID,
13382
- nativeProps = _objectWithoutProperties(_ref2, _excluded$8);
13405
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$9);
13383
13406
  var theme = useTheme$1();
13384
13407
  var radius = theme.__hd__.progress.sizes.circleDiameter / 2;
13385
13408
  var progressAnimatedValue = React.useRef(new reactNative.Animated.Value(0));
@@ -13419,7 +13442,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
13419
13442
  return /*#__PURE__*/React__default["default"].createElement(reactNative.View, _extends$1({}, nativeProps, {
13420
13443
  testID: testID,
13421
13444
  style: style
13422
- }), /*#__PURE__*/React__default["default"].createElement(StyledContainer, null, /*#__PURE__*/React__default["default"].createElement(reactNative.View, null, /*#__PURE__*/React__default["default"].createElement(HalfCircle, {
13445
+ }), /*#__PURE__*/React__default["default"].createElement(StyledContainer$1, null, /*#__PURE__*/React__default["default"].createElement(reactNative.View, null, /*#__PURE__*/React__default["default"].createElement(HalfCircle, {
13423
13446
  type: "foreground",
13424
13447
  themeIntent: intent
13425
13448
  }), /*#__PURE__*/React__default["default"].createElement(reactNative.Animated.View, {
@@ -13496,14 +13519,14 @@ var StyledInner = index$a(reactNative.Animated.View)(function (_ref2) {
13496
13519
  };
13497
13520
  });
13498
13521
 
13499
- var _excluded$7 = ["value", "intent", "style", "testID"];
13522
+ var _excluded$8 = ["value", "intent", "style", "testID"];
13500
13523
  var ProgressBar = function ProgressBar(_ref) {
13501
13524
  var value = _ref.value,
13502
13525
  _ref$intent = _ref.intent,
13503
13526
  intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
13504
13527
  style = _ref.style,
13505
13528
  testID = _ref.testID,
13506
- nativeProps = _objectWithoutProperties(_ref, _excluded$7);
13529
+ nativeProps = _objectWithoutProperties(_ref, _excluded$8);
13507
13530
  var _useState = React.useState(0),
13508
13531
  _useState2 = _slicedToArray(_useState, 2),
13509
13532
  width = _useState2[0],
@@ -13694,14 +13717,14 @@ var AnimatedSpinner = function AnimatedSpinner(_ref) {
13694
13717
  }, dotProps))));
13695
13718
  };
13696
13719
 
13697
- var _excluded$6 = ["testID", "size", "intent"];
13720
+ var _excluded$7 = ["testID", "size", "intent"];
13698
13721
  var Spinner = function Spinner(_ref) {
13699
13722
  var testID = _ref.testID,
13700
13723
  _ref$size = _ref.size,
13701
13724
  size = _ref$size === void 0 ? 'medium' : _ref$size,
13702
13725
  _ref$intent = _ref.intent,
13703
13726
  intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
13704
- nativeProps = _objectWithoutProperties(_ref, _excluded$6);
13727
+ nativeProps = _objectWithoutProperties(_ref, _excluded$7);
13705
13728
  return /*#__PURE__*/React__default["default"].createElement(StyledView$1, nativeProps, /*#__PURE__*/React__default["default"].createElement(StyledSpinnerContainer, {
13706
13729
  testID: testID
13707
13730
  }, /*#__PURE__*/React__default["default"].createElement(AnimatedSpinner, {
@@ -13734,7 +13757,7 @@ var SwipeableAction = function SwipeableAction(_ref) {
13734
13757
  }, children);
13735
13758
  };
13736
13759
 
13737
- var _excluded$5 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
13760
+ var _excluded$6 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
13738
13761
  var renderActions = function renderActions(actions, width, progress, direction) {
13739
13762
  var trans = progress.interpolate({
13740
13763
  inputRange: [0, 1],
@@ -13759,7 +13782,7 @@ var Swipeable = function Swipeable(_ref) {
13759
13782
  leftActionsWidth = _ref.leftActionsWidth,
13760
13783
  rightActions = _ref.rightActions,
13761
13784
  rightActionsWidth = _ref.rightActionsWidth,
13762
- swipeableProps = _objectWithoutProperties(_ref, _excluded$5);
13785
+ swipeableProps = _objectWithoutProperties(_ref, _excluded$6);
13763
13786
  var _useWindowDimensions = reactNative.useWindowDimensions(),
13764
13787
  width = _useWindowDimensions.width;
13765
13788
  var swipeableRef = React.useRef(null);
@@ -14064,7 +14087,7 @@ var StyledSectionList = index$a(reactNative.SectionList)(function (_ref4) {
14064
14087
  };
14065
14088
  });
14066
14089
 
14067
- var _excluded$4 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
14090
+ var _excluded$5 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
14068
14091
  var BaseOptionList = function BaseOptionList(_ref) {
14069
14092
  var keyExtractor = _ref.keyExtractor,
14070
14093
  loading = _ref.loading,
@@ -14073,7 +14096,7 @@ var BaseOptionList = function BaseOptionList(_ref) {
14073
14096
  sections = _ref.sections,
14074
14097
  renderItem = _ref.renderItem,
14075
14098
  sectionListRef = _ref.sectionListRef,
14076
- rest = _objectWithoutProperties(_ref, _excluded$4);
14099
+ rest = _objectWithoutProperties(_ref, _excluded$5);
14077
14100
  var theme = useTheme$1();
14078
14101
  var _useState = React.useState(false),
14079
14102
  _useState2 = _slicedToArray(_useState, 2),
@@ -14142,7 +14165,7 @@ var Option$2 = function Option(_ref) {
14142
14165
  return highlighted === true ? /*#__PURE__*/React__default["default"].createElement(List.Item, props) : /*#__PURE__*/React__default["default"].createElement(List.BasicItem, props);
14143
14166
  };
14144
14167
 
14145
- var _excluded$3 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
14168
+ var _excluded$4 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
14146
14169
  var OptionList$1 = function OptionList(_ref) {
14147
14170
  var keyExtractor = _ref.keyExtractor,
14148
14171
  loading = _ref.loading,
@@ -14153,7 +14176,7 @@ var OptionList$1 = function OptionList(_ref) {
14153
14176
  renderOption = _ref.renderOption,
14154
14177
  value = _ref.value,
14155
14178
  sectionListRef = _ref.sectionListRef,
14156
- rest = _objectWithoutProperties(_ref, _excluded$3);
14179
+ rest = _objectWithoutProperties(_ref, _excluded$4);
14157
14180
  var renderItem = function renderItem(info) {
14158
14181
  var item = info.item;
14159
14182
  var selected = value.includes(info.item.value);
@@ -14341,7 +14364,7 @@ var StyledOptionList = index$a(BaseOptionList)(function (_ref) {
14341
14364
  };
14342
14365
  });
14343
14366
 
14344
- var _excluded$2 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
14367
+ var _excluded$3 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
14345
14368
  var OptionList = function OptionList(_ref) {
14346
14369
  var keyExtractor = _ref.keyExtractor,
14347
14370
  loading = _ref.loading,
@@ -14352,7 +14375,7 @@ var OptionList = function OptionList(_ref) {
14352
14375
  renderOption = _ref.renderOption,
14353
14376
  value = _ref.value,
14354
14377
  sectionListRef = _ref.sectionListRef,
14355
- rest = _objectWithoutProperties(_ref, _excluded$2);
14378
+ rest = _objectWithoutProperties(_ref, _excluded$3);
14356
14379
  var renderItem = function renderItem(info) {
14357
14380
  var item = info.item;
14358
14381
  var selected = item.value === value;
@@ -14499,6 +14522,120 @@ var index$4 = Object.assign(SingleSelect, {
14499
14522
  Multi: MultiSelect
14500
14523
  });
14501
14524
 
14525
+ var StyledContainer = index$a(Box)(function (_ref) {
14526
+ var theme = _ref.theme,
14527
+ themeIntent = _ref.themeIntent,
14528
+ themeVariant = _ref.themeVariant;
14529
+ return {
14530
+ backgroundColor: themeIntent === 'light' ? theme.__hd__.skeleton.colors.lightBackground : theme.__hd__.skeleton.colors.darkBackground,
14531
+ borderRadius: theme.__hd__.skeleton.radii[themeVariant]
14532
+ };
14533
+ });
14534
+ var StyledGradientContainer = index$a(Box)(function (_ref2) {
14535
+ var theme = _ref2.theme,
14536
+ themeVariant = _ref2.themeVariant;
14537
+ return {
14538
+ overflow: 'hidden',
14539
+ borderRadius: theme.__hd__.skeleton.radii[themeVariant]
14540
+ };
14541
+ });
14542
+
14543
+ var _excluded$2 = ["intent", "variant", "style", "onLayout"];
14544
+ var AnimatedLinearGradient = reactNative.Animated.createAnimatedComponent(LinearGradient__default["default"]);
14545
+ var gradientPositions = {
14546
+ start: {
14547
+ x: 0,
14548
+ y: 0
14549
+ },
14550
+ end: {
14551
+ x: 1,
14552
+ y: 0
14553
+ }
14554
+ };
14555
+ var getGradientColors = function getGradientColors(theme, intent) {
14556
+ switch (intent) {
14557
+ case 'light':
14558
+ {
14559
+ return [theme.__hd__.skeleton.colors.lightGradientStart, theme.__hd__.skeleton.colors.lightGradientEnd, theme.__hd__.skeleton.colors.lightGradientStart];
14560
+ }
14561
+ case 'dark':
14562
+ {
14563
+ return [theme.__hd__.skeleton.colors.darkGradientStart, theme.__hd__.skeleton.colors.darkGradientEnd, theme.__hd__.skeleton.colors.darkGradientStart];
14564
+ }
14565
+ }
14566
+ };
14567
+ var Skeleton = function Skeleton(_ref) {
14568
+ var _StyleSheet$flatten, _StyleSheet$flatten2;
14569
+ var _ref$intent = _ref.intent,
14570
+ intent = _ref$intent === void 0 ? 'light' : _ref$intent,
14571
+ _ref$variant = _ref.variant,
14572
+ variant = _ref$variant === void 0 ? 'rounded' : _ref$variant,
14573
+ style = _ref.style,
14574
+ onLayout = _ref.onLayout,
14575
+ props = _objectWithoutProperties(_ref, _excluded$2);
14576
+ var theme = useTheme();
14577
+ var colors = React.useMemo(function () {
14578
+ return getGradientColors(theme, intent);
14579
+ }, [theme, intent]);
14580
+ var _useState = React.useState(Number((_StyleSheet$flatten = reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.width) || 0),
14581
+ _useState2 = _slicedToArray(_useState, 2),
14582
+ containerWidth = _useState2[0],
14583
+ setContainerWidth = _useState2[1];
14584
+ var _useState3 = React.useState(Number((_StyleSheet$flatten2 = reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten2 === void 0 ? void 0 : _StyleSheet$flatten2.height) || 0),
14585
+ _useState4 = _slicedToArray(_useState3, 2),
14586
+ containerHeight = _useState4[0],
14587
+ setContainerHeight = _useState4[1];
14588
+ var _useState5 = React.useState(false),
14589
+ _useState6 = _slicedToArray(_useState5, 2),
14590
+ shouldStartAnimation = _useState6[0],
14591
+ setShouldStartAnimation = _useState6[1];
14592
+ var animatedValue = React.useRef(new reactNative.Animated.Value(0)).current;
14593
+ React.useEffect(function () {
14594
+ if (shouldStartAnimation) {
14595
+ reactNative.Animated.loop(reactNative.Animated.timing(animatedValue, {
14596
+ toValue: 1,
14597
+ duration: 1000,
14598
+ easing: reactNative.Easing.linear,
14599
+ useNativeDriver: reactNative.Platform.OS === 'ios' || reactNative.Platform.OS === 'android'
14600
+ })).start();
14601
+ }
14602
+ }, [shouldStartAnimation]);
14603
+ var translateX = animatedValue.interpolate({
14604
+ inputRange: [0, 1],
14605
+ outputRange: [-containerWidth, containerWidth]
14606
+ });
14607
+ var onContainerLayout = React.useCallback(function (e) {
14608
+ var _e$nativeEvent$layout = e.nativeEvent.layout,
14609
+ width = _e$nativeEvent$layout.width,
14610
+ height = _e$nativeEvent$layout.height;
14611
+ setContainerHeight(height);
14612
+ setContainerWidth(width);
14613
+ if (!shouldStartAnimation) {
14614
+ setShouldStartAnimation(true);
14615
+ }
14616
+ onLayout === null || onLayout === void 0 ? void 0 : onLayout(e);
14617
+ }, []);
14618
+ return /*#__PURE__*/React__default["default"].createElement(StyledContainer, _extends$1({
14619
+ style: style,
14620
+ themeVariant: variant,
14621
+ themeIntent: intent,
14622
+ onLayout: onContainerLayout
14623
+ }, props), /*#__PURE__*/React__default["default"].createElement(StyledGradientContainer, {
14624
+ themeVariant: variant
14625
+ }, /*#__PURE__*/React__default["default"].createElement(AnimatedLinearGradient, {
14626
+ start: gradientPositions.start,
14627
+ end: gradientPositions.end,
14628
+ style: {
14629
+ width: containerWidth,
14630
+ height: containerHeight,
14631
+ transform: [{
14632
+ translateX: translateX
14633
+ }]
14634
+ },
14635
+ colors: colors
14636
+ })));
14637
+ };
14638
+
14502
14639
  var StyledWrapper$1 = index$a(reactNative.View)(function (_ref) {
14503
14640
  var theme = _ref.theme;
14504
14641
  return {
@@ -32082,7 +32219,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
32082
32219
  break;
32083
32220
  }
32084
32221
  }, []);
32085
- return /*#__PURE__*/React__default["default"].createElement(StyledContainer$3, {
32222
+ return /*#__PURE__*/React__default["default"].createElement(StyledContainer$4, {
32086
32223
  testID: testID
32087
32224
  }, /*#__PURE__*/React__default["default"].createElement(StyledTextInputContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledBorderBackDrop, {
32088
32225
  themeVariant: variant,
@@ -32173,6 +32310,7 @@ exports.RefreshControl = RefreshControl;
32173
32310
  exports.RichTextEditor = index;
32174
32311
  exports.SectionHeading = SectionHeading;
32175
32312
  exports.Select = index$4;
32313
+ exports.Skeleton = Skeleton;
32176
32314
  exports.Slider = Slider;
32177
32315
  exports.Spinner = Spinner;
32178
32316
  exports.Swipeable = index$5;