@hero-design/rn 8.121.0 → 8.123.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
@@ -5644,6 +5644,7 @@ var getAttachmentTheme = function getAttachmentTheme(theme) {
5644
5644
 
5645
5645
  var getAvatarTheme = function getAvatarTheme(theme) {
5646
5646
  var colors = {
5647
+ neutral: palette$8.maasstrichtBlueLight25,
5647
5648
  primary: theme.colors.primary,
5648
5649
  info: theme.colors.info,
5649
5650
  danger: theme.colors.error,
@@ -7915,6 +7916,23 @@ var getSegmentedControlTheme = function getSegmentedControlTheme(theme) {
7915
7916
  };
7916
7917
  };
7917
7918
 
7919
+ var getInlineLoaderTheme = function getInlineLoaderTheme(theme) {
7920
+ return {
7921
+ space: {
7922
+ gap: theme.space.small
7923
+ },
7924
+ icon: {
7925
+ lineHeights: {
7926
+ xsmall: theme.lineHeights.xsmall,
7927
+ small: theme.lineHeights.small,
7928
+ medium: theme.lineHeights.medium,
7929
+ large: theme.lineHeights.large,
7930
+ xlarge: theme.lineHeights.xlarge
7931
+ }
7932
+ }
7933
+ };
7934
+ };
7935
+
7918
7936
  var getTheme = function getTheme() {
7919
7937
  var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : scale$1;
7920
7938
  var systemPallete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : swagSystemPalette$2;
@@ -7976,6 +7994,7 @@ var getTheme = function getTheme() {
7976
7994
  toolbar: getToolbarTheme(globalTheme),
7977
7995
  typography: getTypographyTheme(globalTheme),
7978
7996
  floatingIsland: getFloatingIslandTheme(globalTheme),
7997
+ inlineLoader: getInlineLoaderTheme(globalTheme),
7979
7998
  segmentedControl: getSegmentedControlTheme(globalTheme)
7980
7999
  }
7981
8000
  });
@@ -9426,7 +9445,7 @@ var StyledContent$1 = index$c(reactNative.View)(function (_ref) {
9426
9445
  alignSelf: 'center'
9427
9446
  };
9428
9447
  });
9429
- var StyledContainer$9 = index$c(reactNative.View)(function (_ref2) {
9448
+ var StyledContainer$a = index$c(reactNative.View)(function (_ref2) {
9430
9449
  var theme = _ref2.theme;
9431
9450
  return {
9432
9451
  width: '100%',
@@ -9434,7 +9453,7 @@ var StyledContainer$9 = index$c(reactNative.View)(function (_ref2) {
9434
9453
  backgroundColor: theme.__hd__.appCue.colors.backdropColor
9435
9454
  };
9436
9455
  });
9437
- var StyledIconContainer$1 = index$c(reactNative.Animated.View)(function (_ref3) {
9456
+ var StyledIconContainer$2 = index$c(reactNative.Animated.View)(function (_ref3) {
9438
9457
  var theme = _ref3.theme,
9439
9458
  themePlacement = _ref3.themePlacement;
9440
9459
  return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
@@ -9749,7 +9768,7 @@ var AppCue = function AppCue(_ref) {
9749
9768
  onPress: function onPress() {
9750
9769
  return setVisible(false);
9751
9770
  }
9752
- }, /*#__PURE__*/React__namespace.default.createElement(StyledContainer$9, null, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
9771
+ }, /*#__PURE__*/React__namespace.default.createElement(StyledContainer$a, null, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
9753
9772
  style: reactNative.StyleSheet.flatten([{
9754
9773
  position: 'absolute',
9755
9774
  top: pos.top,
@@ -9764,7 +9783,7 @@ var AppCue = function AppCue(_ref) {
9764
9783
  maxWidth: maxWidth
9765
9784
  },
9766
9785
  testID: testID && "".concat(testID, "-content")
9767
- }, renderContent()), /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer$1, {
9786
+ }, renderContent()), /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer$2, {
9768
9787
  themePlacement: placement,
9769
9788
  testID: testID && "".concat(testID, "-arrow")
9770
9789
  }, /*#__PURE__*/React__namespace.default.createElement(Icon, {
@@ -9773,7 +9792,7 @@ var AppCue = function AppCue(_ref) {
9773
9792
  })))))));
9774
9793
  };
9775
9794
 
9776
- var StyledContainer$8 = index$c(reactNative.View)({
9795
+ var StyledContainer$9 = index$c(reactNative.View)({
9777
9796
  alignItems: 'center',
9778
9797
  flexDirection: 'row'
9779
9798
  });
@@ -9815,7 +9834,7 @@ var Attachment = function Attachment(_ref) {
9815
9834
  backgroundHighlighted = _ref$backgroundHighli === void 0 ? false : _ref$backgroundHighli,
9816
9835
  style = _ref.style,
9817
9836
  testID = _ref.testID;
9818
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$8, {
9837
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$9, {
9819
9838
  testID: testID,
9820
9839
  style: style
9821
9840
  }, /*#__PURE__*/React__namespace.default.createElement(StyledContentContainer$1, {
@@ -9903,7 +9922,7 @@ var Avatar = function Avatar(_ref) {
9903
9922
  _ref$size = _ref.size,
9904
9923
  size = _ref$size === void 0 ? 'small' : _ref$size,
9905
9924
  _ref$intent = _ref.intent,
9906
- intent = _ref$intent === void 0 ? 'primary' : _ref$intent;
9925
+ intent = _ref$intent === void 0 ? 'neutral' : _ref$intent;
9907
9926
  var _useState = React.useState(false),
9908
9927
  _useState2 = _slicedToArray(_useState, 2),
9909
9928
  hasImageError = _useState2[0],
@@ -13937,7 +13956,7 @@ function ContentNavigator(_ref) {
13937
13956
  }));
13938
13957
  }
13939
13958
 
13940
- var StyledContainer$7 = index$c(reactNative.View)(function (_ref) {
13959
+ var StyledContainer$8 = index$c(reactNative.View)(function (_ref) {
13941
13960
  var theme = _ref.theme;
13942
13961
  return {
13943
13962
  backgroundColor: theme.__hd__.calendar.colors.background
@@ -14372,7 +14391,7 @@ var CalendarRange = function CalendarRange(_ref) {
14372
14391
  textIntent: isCurrentMonth ? undefined : 'subdued'
14373
14392
  });
14374
14393
  };
14375
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$7, {
14394
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$8, {
14376
14395
  testID: testID
14377
14396
  }, /*#__PURE__*/React__namespace.default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__namespace.default.createElement(ContentNavigator, {
14378
14397
  value: !shouldShowMonthPicker ? formatTime('MMMM yyyy', visibleDate) : /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
@@ -14506,7 +14525,7 @@ var Calendar = function Calendar(_ref) {
14506
14525
  monthPickerVisible = _useState2[0],
14507
14526
  setMonthPickerVisible = _useState2[1];
14508
14527
  var now = new Date();
14509
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$7, {
14528
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$8, {
14510
14529
  testID: testID
14511
14530
  }, /*#__PURE__*/React__namespace.default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__namespace.default.createElement(ContentNavigator, {
14512
14531
  value: !shouldShowMonthPicker ? formatTime('MMMM yyyy', visibleDate) : /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
@@ -20654,7 +20673,7 @@ var index$9 = Object.assign(DefaultCheckbox, {
20654
20673
  Inline: InlineCheckbox
20655
20674
  });
20656
20675
 
20657
- var StyledContainer$6 = index$c(reactNative.View)(function (_ref) {
20676
+ var StyledContainer$7 = index$c(reactNative.View)(function (_ref) {
20658
20677
  var theme = _ref.theme;
20659
20678
  return {
20660
20679
  width: '100%',
@@ -21042,7 +21061,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
21042
21061
  defaultValue: defaultValue,
21043
21062
  placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
21044
21063
  });
21045
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$6, {
21064
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$7, {
21046
21065
  style: styleWithoutBackgroundColor,
21047
21066
  pointerEvents: state === 'disabled' || state === 'readonly' ? 'none' : 'auto',
21048
21067
  testID: testID
@@ -21722,7 +21741,7 @@ var index$8 = Object.assign(PublicDatePicker, {
21722
21741
  });
21723
21742
 
21724
21743
  var AnimatedPressable = reactNative.Animated.createAnimatedComponent(reactNative.Pressable);
21725
- var StyledContainer$5 = index$c(reactNative.View)(function (_ref) {
21744
+ var StyledContainer$6 = index$c(reactNative.View)(function (_ref) {
21726
21745
  var theme = _ref.theme,
21727
21746
  enableShadow = _ref.enableShadow;
21728
21747
  return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
@@ -21982,7 +22001,7 @@ var Drawer = function Drawer(_ref) {
21982
22001
  return animation.stop();
21983
22002
  };
21984
22003
  }, [visible]);
21985
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$5, {
22004
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$6, {
21986
22005
  testID: testID,
21987
22006
  enableShadow: enableShadow,
21988
22007
  pointerEvents: "box-none"
@@ -23973,7 +23992,7 @@ var StyledFABText = index$c(Typography.Body)(function (_ref3) {
23973
23992
  marginHorizontal: theme.__hd__.fab.space.titleMarginHorizontal
23974
23993
  };
23975
23994
  });
23976
- var StyledIconContainer = index$c(Box)(function (_ref4) {
23995
+ var StyledIconContainer$1 = index$c(Box)(function (_ref4) {
23977
23996
  var theme = _ref4.theme;
23978
23997
  return {
23979
23998
  width: theme.__hd__.fab.sizes.iconContainerWidth,
@@ -24017,7 +24036,7 @@ var ActionItem = function ActionItem(_ref) {
24017
24036
  style: style,
24018
24037
  onPress: onPress,
24019
24038
  testID: testID
24020
- }, /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledIcon$3, {
24039
+ }, /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer$1, null, /*#__PURE__*/React__namespace.default.createElement(StyledIcon$3, {
24021
24040
  size: "xsmall",
24022
24041
  icon: icon
24023
24042
  })), /*#__PURE__*/React__namespace.default.createElement(StyledActionItemText, null, title))));
@@ -24066,14 +24085,14 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
24066
24085
  animated = _ref.animated,
24067
24086
  active = _ref.active;
24068
24087
  if (animated) {
24069
- return /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(AnimatedFABIcon, {
24088
+ return /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer$1, null, /*#__PURE__*/React__namespace.default.createElement(AnimatedFABIcon, {
24070
24089
  active: active,
24071
24090
  icon: icon,
24072
24091
  testID: "animated-fab-icon",
24073
24092
  size: "xsmall"
24074
24093
  }));
24075
24094
  }
24076
- return /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledFABIcon, {
24095
+ return /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer$1, null, /*#__PURE__*/React__namespace.default.createElement(StyledFABIcon, {
24077
24096
  size: "xsmall",
24078
24097
  icon: icon,
24079
24098
  testID: "styled-fab-icon"
@@ -24082,7 +24101,7 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
24082
24101
  var IconWithTextContent = function IconWithTextContent(_ref2) {
24083
24102
  var icon = _ref2.icon,
24084
24103
  title = _ref2.title;
24085
- return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledFABIcon, {
24104
+ return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer$1, null, /*#__PURE__*/React__namespace.default.createElement(StyledFABIcon, {
24086
24105
  size: "xsmall",
24087
24106
  icon: icon,
24088
24107
  testID: "styled-fab-icon"
@@ -24240,7 +24259,7 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
24240
24259
  });
24241
24260
  FAB$1.displayName = 'FAB';
24242
24261
 
24243
- var StyledContainer$4 = index$c(reactNative.View)({
24262
+ var StyledContainer$5 = index$c(reactNative.View)({
24244
24263
  position: 'absolute',
24245
24264
  left: 0,
24246
24265
  right: 0,
@@ -24347,7 +24366,7 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
24347
24366
  inputRange: [0, 1],
24348
24367
  outputRange: [0, 1]
24349
24368
  });
24350
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$4, {
24369
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$5, {
24351
24370
  testID: testID,
24352
24371
  pointerEvents: "box-none",
24353
24372
  style: style
@@ -25078,7 +25097,7 @@ var HeroDesignProvider = function HeroDesignProvider(_ref) {
25078
25097
  }, /*#__PURE__*/React__namespace.default.createElement(Toast.Provider, null, /*#__PURE__*/React__namespace.default.createElement(Portal$1.Provider, null, children))));
25079
25098
  };
25080
25099
 
25081
- var StyledContainer$3 = index$c(reactNative.View)(function (_ref) {
25100
+ var StyledContainer$4 = index$c(reactNative.View)(function (_ref) {
25082
25101
  var theme = _ref.theme;
25083
25102
  return {
25084
25103
  width: theme.__hd__.mapPin.sizes["default"],
@@ -25158,7 +25177,7 @@ var MapPinFocussed = function MapPinFocussed(_ref) {
25158
25177
  var style = _ref.style,
25159
25178
  testID = _ref.testID,
25160
25179
  nativeProps = _objectWithoutProperties(_ref, _excluded$o);
25161
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$3, _extends$1({}, nativeProps, {
25180
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$4, _extends$1({}, nativeProps, {
25162
25181
  style: style,
25163
25182
  testID: testID
25164
25183
  }), /*#__PURE__*/React__namespace.default.createElement(StyledFocusIcon, {
@@ -25185,7 +25204,7 @@ var MapPin = function MapPin(_ref) {
25185
25204
  icon = _ref.icon,
25186
25205
  nativeProps = _objectWithoutProperties(_ref, _excluded$n);
25187
25206
  var badgeIcon = getBadgeIconName(state);
25188
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$3, _extends$1({}, nativeProps, {
25207
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$4, _extends$1({}, nativeProps, {
25189
25208
  style: style,
25190
25209
  testID: testID
25191
25210
  }), /*#__PURE__*/React__namespace.default.createElement(StyledContent, {
@@ -25467,7 +25486,7 @@ var PinInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
25467
25486
  });
25468
25487
  PinInput.displayName = 'PinInput';
25469
25488
 
25470
- var StyledContainer$2 = index$c(reactNative.View)(function (_ref) {
25489
+ var StyledContainer$3 = index$c(reactNative.View)(function (_ref) {
25471
25490
  var theme = _ref.theme;
25472
25491
  return {
25473
25492
  flexDirection: 'row',
@@ -25539,7 +25558,7 @@ var ProgressCircle = function ProgressCircle(_ref) {
25539
25558
  return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, _extends$1({}, nativeProps, {
25540
25559
  testID: testID,
25541
25560
  style: style
25542
- }), /*#__PURE__*/React__namespace.default.createElement(StyledContainer$2, null, /*#__PURE__*/React__namespace.default.createElement(Svg__default.default, {
25561
+ }), /*#__PURE__*/React__namespace.default.createElement(StyledContainer$3, null, /*#__PURE__*/React__namespace.default.createElement(Svg__default.default, {
25543
25562
  width: size,
25544
25563
  height: size,
25545
25564
  viewBox: "0 0 ".concat(size, " ").concat(size)
@@ -27273,7 +27292,7 @@ var index$4 = Object.assign(SingleSelect, {
27273
27292
  Multi: MultiSelect
27274
27293
  });
27275
27294
 
27276
- var StyledContainer$1 = index$c(Box)(function (_ref) {
27295
+ var StyledContainer$2 = index$c(Box)(function (_ref) {
27277
27296
  var theme = _ref.theme,
27278
27297
  themeIntent = _ref.themeIntent,
27279
27298
  themeVariant = _ref.themeVariant;
@@ -27359,7 +27378,7 @@ var Skeleton = function Skeleton(_ref) {
27359
27378
  }
27360
27379
  onLayout === null || onLayout === void 0 || onLayout(e);
27361
27380
  }, []);
27362
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$1, _extends$1({
27381
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$2, _extends$1({
27363
27382
  style: style,
27364
27383
  themeVariant: variant,
27365
27384
  themeIntent: intent,
@@ -41334,7 +41353,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
41334
41353
  onBlur === null || onBlur === void 0 || onBlur();
41335
41354
  setIsFocused(false);
41336
41355
  }, [onBlur]);
41337
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$6, {
41356
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$7, {
41338
41357
  testID: testID
41339
41358
  }, /*#__PURE__*/React__namespace.default.createElement(StyledLabelContainerInsideTextInput, {
41340
41359
  themeHasPrefix: false,
@@ -41588,7 +41607,7 @@ function SectionListWithFAB(_ref) {
41588
41607
  });
41589
41608
  }
41590
41609
 
41591
- var StyledContainer = index$c(reactNative.View)(function () {
41610
+ var StyledContainer$1 = index$c(reactNative.View)(function () {
41592
41611
  return {
41593
41612
  width: '100%'
41594
41613
  };
@@ -41693,7 +41712,7 @@ var SearchTwoLine = function SearchTwoLine(props) {
41693
41712
  _props$variant = props.variant,
41694
41713
  variant = _props$variant === void 0 ? 'basic' : _props$variant,
41695
41714
  accessible = props.accessible;
41696
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer, {
41715
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$1, {
41697
41716
  style: style,
41698
41717
  testID: testID,
41699
41718
  accessible: accessible
@@ -41810,7 +41829,7 @@ var SearchOneLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
41810
41829
  }));
41811
41830
  };
41812
41831
  var shouldShowClearButton = clearable && (state === 'filled' || isFocused) && !isEmptyValue;
41813
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer, {
41832
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$1, {
41814
41833
  pointerEvents: state === 'disabled' || state === 'readonly' ? 'none' : 'auto',
41815
41834
  testID: testID,
41816
41835
  style: style,
@@ -42267,6 +42286,237 @@ var FilterTrigger = function FilterTrigger(_ref) {
42267
42286
  })));
42268
42287
  };
42269
42288
 
42289
+ var ANIMATION_DURATION_MS = 2000;
42290
+ var AnimatedGradientText = function AnimatedGradientText(_ref) {
42291
+ var children = _ref.children,
42292
+ fontSize = _ref.fontSize,
42293
+ lineHeight = _ref.lineHeight;
42294
+ var theme = useTheme();
42295
+ var gradient = theme.colors.gradients.aiHorizontal;
42296
+ var _useState = React.useState(null),
42297
+ _useState2 = _slicedToArray(_useState, 2),
42298
+ size = _useState2[0],
42299
+ setSize = _useState2[1];
42300
+ var animatedValue = React.useRef(new reactNative.Animated.Value(0));
42301
+ var onLayout = React.useCallback(function (event) {
42302
+ var _event$nativeEvent$la = event.nativeEvent.layout,
42303
+ width = _event$nativeEvent$la.width,
42304
+ height = _event$nativeEvent$la.height;
42305
+ setSize(function (prev) {
42306
+ if ((prev === null || prev === void 0 ? void 0 : prev.width) === width && (prev === null || prev === void 0 ? void 0 : prev.height) === height) return prev;
42307
+ return {
42308
+ width: width,
42309
+ height: height
42310
+ };
42311
+ });
42312
+ }, []);
42313
+ React.useEffect(function () {
42314
+ if (!size) return;
42315
+ animatedValue.current.setValue(0);
42316
+ var animation = reactNative.Animated.loop(reactNative.Animated.timing(animatedValue.current, {
42317
+ toValue: 1,
42318
+ duration: ANIMATION_DURATION_MS,
42319
+ easing: reactNative.Easing.linear,
42320
+ useNativeDriver: reactNative.Platform.OS !== 'web'
42321
+ }));
42322
+ animation.start();
42323
+ return function () {
42324
+ return animation.stop();
42325
+ };
42326
+ }, [size]);
42327
+ // Slide left by one full text-width per loop cycle.
42328
+ // Starting at 0 keeps the gradient visible from the first frame.
42329
+ var translateX = size ? animatedValue.current.interpolate({
42330
+ inputRange: [0, 1],
42331
+ outputRange: [0, -size.width]
42332
+ }) : animatedValue.current;
42333
+ return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, null, /*#__PURE__*/React__namespace.default.createElement(MaskedView__default.default, {
42334
+ accessibilityElementsHidden: true,
42335
+ importantForAccessibility: "no-hide-descendants",
42336
+ maskElement: /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
42337
+ onLayout: onLayout,
42338
+ style: {
42339
+ backgroundColor: 'transparent'
42340
+ },
42341
+ testID: "animated-gradient-text-mask"
42342
+ }, /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
42343
+ intent: "body",
42344
+ style: {
42345
+ fontSize: fontSize,
42346
+ lineHeight: lineHeight
42347
+ }
42348
+ }, children))
42349
+ }, size ? /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
42350
+ style: {
42351
+ width: size.width,
42352
+ height: size.height,
42353
+ overflow: 'hidden'
42354
+ }
42355
+ }, /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
42356
+ style: {
42357
+ width: size.width * 2,
42358
+ height: size.height,
42359
+ transform: [{
42360
+ translateX: translateX
42361
+ }]
42362
+ }
42363
+ }, /*#__PURE__*/React__namespace.default.createElement(expoLinearGradient.LinearGradient, {
42364
+ start: gradient.start,
42365
+ end: gradient.end,
42366
+ colors: [gradient.colors[0], gradient.colors[1], gradient.colors[2], gradient.colors[1], gradient.colors[0]],
42367
+ locations: [0, 0.25, 0.5, 0.75, 1.0],
42368
+ style: {
42369
+ width: '100%',
42370
+ height: '100%'
42371
+ }
42372
+ }))) : /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
42373
+ intent: "body",
42374
+ style: {
42375
+ fontSize: fontSize,
42376
+ lineHeight: lineHeight
42377
+ }
42378
+ }, children)), /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
42379
+ style: {
42380
+ position: 'absolute',
42381
+ opacity: 0
42382
+ },
42383
+ importantForAccessibility: "yes",
42384
+ accessibilityElementsHidden: false
42385
+ }, /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
42386
+ intent: "body",
42387
+ style: {
42388
+ fontSize: fontSize,
42389
+ lineHeight: lineHeight
42390
+ }
42391
+ }, children)));
42392
+ };
42393
+
42394
+ var TEXT_SIZE_NAMES = {
42395
+ 10: 'xsmall',
42396
+ 12: 'small',
42397
+ 14: 'medium',
42398
+ 16: 'large',
42399
+ 18: 'xlarge'
42400
+ };
42401
+ var getTextSizeName = function getTextSizeName(size) {
42402
+ return TEXT_SIZE_NAMES[size];
42403
+ };
42404
+ var getIconName = function getIconName(state) {
42405
+ switch (state) {
42406
+ case 'idle':
42407
+ return 'circle-ok-outlined';
42408
+ case 'loading':
42409
+ return 'loading';
42410
+ case 'success':
42411
+ return 'circle-check';
42412
+ case 'error':
42413
+ return 'circle-cancel-outlined';
42414
+ }
42415
+ };
42416
+ var getIconIntent = function getIconIntent(state, intent) {
42417
+ switch (state) {
42418
+ case 'idle':
42419
+ return 'inactive';
42420
+ case 'loading':
42421
+ return intent === 'ai' ? 'ai' : 'primary';
42422
+ case 'success':
42423
+ return 'success';
42424
+ case 'error':
42425
+ return 'danger';
42426
+ }
42427
+ };
42428
+ var getIconSize = function getIconSize(textSize) {
42429
+ switch (textSize) {
42430
+ case 10:
42431
+ return {
42432
+ size: 'xxxsmall'
42433
+ };
42434
+ case 12:
42435
+ return {
42436
+ size: 'xxxsmall',
42437
+ styleFontSize: 14
42438
+ };
42439
+ case 14:
42440
+ return {
42441
+ size: 'xxxsmall',
42442
+ styleFontSize: 14
42443
+ };
42444
+ case 16:
42445
+ return {
42446
+ size: 'xsmall'
42447
+ };
42448
+ case 18:
42449
+ return {
42450
+ size: 'small'
42451
+ };
42452
+ }
42453
+ };
42454
+
42455
+ var StyledContainer = index$c(reactNative.View)(function (_ref) {
42456
+ var theme = _ref.theme;
42457
+ return {
42458
+ flexDirection: 'row',
42459
+ alignItems: 'flex-start',
42460
+ gap: theme.__hd__.inlineLoader.space.gap
42461
+ };
42462
+ });
42463
+ var StyledIconContainer = index$c(reactNative.View)(function (_ref2) {
42464
+ var themeSize = _ref2.themeSize,
42465
+ theme = _ref2.theme;
42466
+ return {
42467
+ height: theme.__hd__.inlineLoader.icon.lineHeights[themeSize],
42468
+ justifyContent: 'center'
42469
+ };
42470
+ });
42471
+
42472
+ var InlineLoader = function InlineLoader(_ref) {
42473
+ var text = _ref.text,
42474
+ _ref$state = _ref.state,
42475
+ state = _ref$state === void 0 ? 'idle' : _ref$state,
42476
+ _ref$intent = _ref.intent,
42477
+ intent = _ref$intent === void 0 ? 'neutral' : _ref$intent,
42478
+ _ref$size = _ref.size,
42479
+ size = _ref$size === void 0 ? 14 : _ref$size,
42480
+ style = _ref.style,
42481
+ testID = _ref.testID;
42482
+ var theme = useTheme();
42483
+ var textSizeName = getTextSizeName(size);
42484
+ var lineHeight = theme.__hd__.inlineLoader.icon.lineHeights[textSizeName];
42485
+ var iconName = getIconName(state);
42486
+ var iconIntent = getIconIntent(state, intent);
42487
+ var _getIconSize = getIconSize(size),
42488
+ iconSize = _getIconSize.size,
42489
+ styleFontSize = _getIconSize.styleFontSize;
42490
+ var iconStyle = styleFontSize ? {
42491
+ fontSize: styleFontSize
42492
+ } : undefined;
42493
+ var isAiLoading = state === 'loading' && intent === 'ai';
42494
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer, {
42495
+ testID: testID,
42496
+ style: style
42497
+ }, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, {
42498
+ themeSize: textSizeName
42499
+ }, /*#__PURE__*/React__namespace.default.createElement(Icon, {
42500
+ icon: iconName,
42501
+ intent: iconIntent,
42502
+ size: iconSize,
42503
+ spin: state === 'loading',
42504
+ style: iconStyle,
42505
+ accessible: false,
42506
+ accessibilityElementsHidden: true,
42507
+ importantForAccessibility: "no-hide-descendants"
42508
+ })), isAiLoading ? /*#__PURE__*/React__namespace.default.createElement(AnimatedGradientText, {
42509
+ fontSize: size,
42510
+ lineHeight: lineHeight
42511
+ }, text) : /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
42512
+ intent: "body",
42513
+ style: {
42514
+ fontSize: size,
42515
+ lineHeight: lineHeight
42516
+ }
42517
+ }, text));
42518
+ };
42519
+
42270
42520
  exports.Accordion = Accordion;
42271
42521
  exports.Alert = Alert;
42272
42522
  exports.AppCue = AppCue;
@@ -42299,6 +42549,7 @@ exports.Icon = Icon;
42299
42549
  exports.Illustration = Illustration;
42300
42550
  exports.IllustrationList = IllustrationList;
42301
42551
  exports.Image = Image;
42552
+ exports.InlineLoader = InlineLoader;
42302
42553
  exports.List = List$1;
42303
42554
  exports.LocaleProvider = LocaleProvider;
42304
42555
  exports.MapPin = index$6;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.121.0",
3
+ "version": "8.123.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -26,9 +26,9 @@ export interface AvatarProps extends ViewProps {
26
26
  */
27
27
  title?: string;
28
28
  /**
29
- * Intent of the Icon.
29
+ * Visual intent of the Avatar. Defaults to `'neutral'`.
30
30
  */
31
- intent?: 'primary' | 'info' | 'danger' | 'success' | 'warning';
31
+ intent?: 'neutral' | 'primary' | 'info' | 'danger' | 'success' | 'warning';
32
32
  /**
33
33
  * Size of the avatar.
34
34
  */
@@ -58,7 +58,7 @@ const Avatar = ({
58
58
  style,
59
59
  title,
60
60
  size = 'small',
61
- intent = 'primary',
61
+ intent = 'neutral',
62
62
  }: AvatarProps) => {
63
63
  const [hasImageError, setHasImageError] = useState(false);
64
64
 
@@ -12,7 +12,13 @@ type ThemeSize =
12
12
  | 'xxxlarge'
13
13
  | 'xxxxlarge'
14
14
  | 'xxxxxlarge';
15
- type ThemeIntent = 'primary' | 'info' | 'danger' | 'success' | 'warning';
15
+ type ThemeIntent =
16
+ | 'neutral'
17
+ | 'primary'
18
+ | 'info'
19
+ | 'danger'
20
+ | 'success'
21
+ | 'warning';
16
22
 
17
23
  const StyledWrapper = styled(TouchableOpacity)<{
18
24
  themeSize: ThemeSize;