@hero-design/rn-work-uikit 1.12.5 → 1.13.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @hero-design/rn-work-uikit
2
2
 
3
+ ## 1.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`65005affb073e5de21dbe2511a8ef42251aa21ca`](https://github.com/Thinkei/hero-design/commit/65005affb073e5de21dbe2511a8ef42251aa21ca)]:
8
+ - @hero-design/rn@8.123.0
9
+
10
+ ## 1.13.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [#4992](https://github.com/Thinkei/hero-design/pull/4992) [`87bd2b334180c9908328a7cdd2e686694dae1d7d`](https://github.com/Thinkei/hero-design/commit/87bd2b334180c9908328a7cdd2e686694dae1d7d) Thanks [@haudao-eh](https://github.com/haudao-eh)! - [Avatar] Add `neutral` intent to Avatar. `neutral` is now the default intent, replacing `primary`.
15
+
16
+ **Note:** Any Avatar rendered without an explicit `intent` prop will now
17
+ display a teal-grey background instead of dark purple. Add `intent="primary"`
18
+ to preserve the previous appearance.
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [[`87bd2b334180c9908328a7cdd2e686694dae1d7d`](https://github.com/Thinkei/hero-design/commit/87bd2b334180c9908328a7cdd2e686694dae1d7d)]:
23
+ - @hero-design/rn@8.122.0
24
+
3
25
  ## 1.12.5
4
26
 
5
27
  ### Patch Changes
package/es/index.js CHANGED
@@ -5924,6 +5924,7 @@ var getAttachmentTheme = function getAttachmentTheme(theme) {
5924
5924
 
5925
5925
  var getAvatarTheme = function getAvatarTheme(theme) {
5926
5926
  var colors = {
5927
+ neutral: palette$8.maasstrichtBlueLight25,
5927
5928
  primary: theme.colors.primary,
5928
5929
  info: theme.colors.info,
5929
5930
  danger: theme.colors.error,
@@ -8037,6 +8038,23 @@ var getSegmentedControlTheme = function getSegmentedControlTheme(theme) {
8037
8038
  };
8038
8039
  };
8039
8040
 
8041
+ var getInlineLoaderTheme = function getInlineLoaderTheme(theme) {
8042
+ return {
8043
+ space: {
8044
+ gap: theme.space.small
8045
+ },
8046
+ icon: {
8047
+ lineHeights: {
8048
+ xsmall: theme.lineHeights.xsmall,
8049
+ small: theme.lineHeights.small,
8050
+ medium: theme.lineHeights.medium,
8051
+ large: theme.lineHeights.large,
8052
+ xlarge: theme.lineHeights.xlarge
8053
+ }
8054
+ }
8055
+ };
8056
+ };
8057
+
8040
8058
  var getTheme$1 = function getTheme() {
8041
8059
  var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : scale$1;
8042
8060
  var systemPallete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : swagSystemPalette$2;
@@ -8098,6 +8116,7 @@ var getTheme$1 = function getTheme() {
8098
8116
  toolbar: getToolbarTheme(globalTheme),
8099
8117
  typography: getTypographyTheme(globalTheme),
8100
8118
  floatingIsland: getFloatingIslandTheme(globalTheme),
8119
+ inlineLoader: getInlineLoaderTheme(globalTheme),
8101
8120
  segmentedControl: getSegmentedControlTheme(globalTheme)
8102
8121
  }
8103
8122
  });
@@ -10286,7 +10305,7 @@ var Box = function Box(_ref) {
10286
10305
  }), children);
10287
10306
  };
10288
10307
 
10289
- var StyledContainer$a = index$c(View)(function (_ref) {
10308
+ var StyledContainer$b = index$c(View)(function (_ref) {
10290
10309
  var theme = _ref.theme;
10291
10310
  return {
10292
10311
  width: '100%',
@@ -10675,7 +10694,7 @@ var TextInput$1 = /*#__PURE__*/forwardRef(function (_ref8, ref) {
10675
10694
  defaultValue: defaultValue,
10676
10695
  placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE$1
10677
10696
  });
10678
- return /*#__PURE__*/React__default.createElement(StyledContainer$a, {
10697
+ return /*#__PURE__*/React__default.createElement(StyledContainer$b, {
10679
10698
  style: styleWithoutBackgroundColor,
10680
10699
  pointerEvents: state === 'disabled' || state === 'readonly' ? 'none' : 'auto',
10681
10700
  testID: testID
@@ -14227,7 +14246,7 @@ function ContentNavigator(_ref) {
14227
14246
  }));
14228
14247
  }
14229
14248
 
14230
- var StyledContainer$9 = index$c(View)(function (_ref) {
14249
+ var StyledContainer$a = index$c(View)(function (_ref) {
14231
14250
  var theme = _ref.theme;
14232
14251
  return {
14233
14252
  backgroundColor: theme.__hd__.calendar.colors.background
@@ -14669,7 +14688,7 @@ var CalendarRange = function CalendarRange(_ref) {
14669
14688
  textIntent: isCurrentMonth ? undefined : 'subdued'
14670
14689
  });
14671
14690
  };
14672
- return /*#__PURE__*/React__default.createElement(StyledContainer$9, {
14691
+ return /*#__PURE__*/React__default.createElement(StyledContainer$a, {
14673
14692
  testID: testID
14674
14693
  }, /*#__PURE__*/React__default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__default.createElement(ContentNavigator, {
14675
14694
  value: !shouldShowMonthPicker ? formatTime('MMMM yyyy', visibleDate) : /*#__PURE__*/React__default.createElement(TouchableOpacity, {
@@ -14803,7 +14822,7 @@ var Calendar$1 = function Calendar(_ref) {
14803
14822
  monthPickerVisible = _useState2[0],
14804
14823
  setMonthPickerVisible = _useState2[1];
14805
14824
  var now = new Date();
14806
- return /*#__PURE__*/React__default.createElement(StyledContainer$9, {
14825
+ return /*#__PURE__*/React__default.createElement(StyledContainer$a, {
14807
14826
  testID: testID
14808
14827
  }, /*#__PURE__*/React__default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__default.createElement(ContentNavigator, {
14809
14828
  value: !shouldShowMonthPicker ? formatTime('MMMM yyyy', visibleDate) : /*#__PURE__*/React__default.createElement(TouchableOpacity, {
@@ -15785,7 +15804,7 @@ var StyledContent$1 = index$c(View)(function (_ref) {
15785
15804
  alignSelf: 'center'
15786
15805
  };
15787
15806
  });
15788
- var StyledContainer$8 = index$c(View)(function (_ref2) {
15807
+ var StyledContainer$9 = index$c(View)(function (_ref2) {
15789
15808
  var theme = _ref2.theme;
15790
15809
  return {
15791
15810
  width: '100%',
@@ -15793,7 +15812,7 @@ var StyledContainer$8 = index$c(View)(function (_ref2) {
15793
15812
  backgroundColor: theme.__hd__.appCue.colors.backdropColor
15794
15813
  };
15795
15814
  });
15796
- var StyledIconContainer$1 = index$c(Animated.View)(function (_ref3) {
15815
+ var StyledIconContainer$2 = index$c(Animated.View)(function (_ref3) {
15797
15816
  var theme = _ref3.theme,
15798
15817
  themePlacement = _ref3.themePlacement;
15799
15818
  return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
@@ -16109,7 +16128,7 @@ var AppCue = function AppCue(_ref) {
16109
16128
  onPress: function onPress() {
16110
16129
  return setVisible(false);
16111
16130
  }
16112
- }, /*#__PURE__*/React__default.createElement(StyledContainer$8, null, /*#__PURE__*/React__default.createElement(View, {
16131
+ }, /*#__PURE__*/React__default.createElement(StyledContainer$9, null, /*#__PURE__*/React__default.createElement(View, {
16113
16132
  style: StyleSheet$1.flatten([{
16114
16133
  position: 'absolute',
16115
16134
  top: pos.top,
@@ -16124,7 +16143,7 @@ var AppCue = function AppCue(_ref) {
16124
16143
  maxWidth: maxWidth
16125
16144
  },
16126
16145
  testID: testID && "".concat(testID, "-content")
16127
- }, renderContent()), /*#__PURE__*/React__default.createElement(StyledIconContainer$1, {
16146
+ }, renderContent()), /*#__PURE__*/React__default.createElement(StyledIconContainer$2, {
16128
16147
  themePlacement: placement,
16129
16148
  testID: testID && "".concat(testID, "-arrow")
16130
16149
  }, /*#__PURE__*/React__default.createElement(Icon, {
@@ -16133,7 +16152,7 @@ var AppCue = function AppCue(_ref) {
16133
16152
  })))))));
16134
16153
  };
16135
16154
 
16136
- var StyledContainer$7 = index$c(View)({
16155
+ var StyledContainer$8 = index$c(View)({
16137
16156
  alignItems: 'center',
16138
16157
  flexDirection: 'row'
16139
16158
  });
@@ -16175,7 +16194,7 @@ var Attachment = function Attachment(_ref) {
16175
16194
  backgroundHighlighted = _ref$backgroundHighli === void 0 ? false : _ref$backgroundHighli,
16176
16195
  style = _ref.style,
16177
16196
  testID = _ref.testID;
16178
- return /*#__PURE__*/React__default.createElement(StyledContainer$7, {
16197
+ return /*#__PURE__*/React__default.createElement(StyledContainer$8, {
16179
16198
  testID: testID,
16180
16199
  style: style
16181
16200
  }, /*#__PURE__*/React__default.createElement(StyledContentContainer, {
@@ -16263,7 +16282,7 @@ var Avatar = function Avatar(_ref) {
16263
16282
  _ref$size = _ref.size,
16264
16283
  size = _ref$size === void 0 ? 'small' : _ref$size,
16265
16284
  _ref$intent = _ref.intent,
16266
- intent = _ref$intent === void 0 ? 'primary' : _ref$intent;
16285
+ intent = _ref$intent === void 0 ? 'neutral' : _ref$intent;
16267
16286
  var _useState = useState(false),
16268
16287
  _useState2 = _slicedToArray(_useState, 2),
16269
16288
  hasImageError = _useState2[0],
@@ -22756,7 +22775,7 @@ Object.assign(PublicDatePicker, {
22756
22775
  });
22757
22776
 
22758
22777
  var AnimatedPressable = Animated.createAnimatedComponent(Pressable);
22759
- var StyledContainer$6 = index$c(View)(function (_ref) {
22778
+ var StyledContainer$7 = index$c(View)(function (_ref) {
22760
22779
  var theme = _ref.theme,
22761
22780
  enableShadow = _ref.enableShadow;
22762
22781
  return _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
@@ -23021,7 +23040,7 @@ var Drawer = function Drawer(_ref) {
23021
23040
  return animation.stop();
23022
23041
  };
23023
23042
  }, [visible]);
23024
- return /*#__PURE__*/React__default.createElement(StyledContainer$6, {
23043
+ return /*#__PURE__*/React__default.createElement(StyledContainer$7, {
23025
23044
  testID: testID,
23026
23045
  enableShadow: enableShadow,
23027
23046
  pointerEvents: "box-none"
@@ -25015,7 +25034,7 @@ var StyledFABText = index$c(Typography.Body)(function (_ref3) {
25015
25034
  marginHorizontal: theme.__hd__.fab.space.titleMarginHorizontal
25016
25035
  };
25017
25036
  });
25018
- var StyledIconContainer = index$c(Box)(function (_ref4) {
25037
+ var StyledIconContainer$1 = index$c(Box)(function (_ref4) {
25019
25038
  var theme = _ref4.theme;
25020
25039
  return {
25021
25040
  width: theme.__hd__.fab.sizes.iconContainerWidth,
@@ -25059,7 +25078,7 @@ var ActionItem = function ActionItem(_ref) {
25059
25078
  style: style,
25060
25079
  onPress: onPress,
25061
25080
  testID: testID
25062
- }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledIconContainer, null, /*#__PURE__*/React__default.createElement(StyledIcon$3, {
25081
+ }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledIconContainer$1, null, /*#__PURE__*/React__default.createElement(StyledIcon$3, {
25063
25082
  size: "xsmall",
25064
25083
  icon: icon
25065
25084
  })), /*#__PURE__*/React__default.createElement(StyledActionItemText, null, title))));
@@ -25108,14 +25127,14 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
25108
25127
  animated = _ref.animated,
25109
25128
  active = _ref.active;
25110
25129
  if (animated) {
25111
- return /*#__PURE__*/React__default.createElement(StyledIconContainer, null, /*#__PURE__*/React__default.createElement(AnimatedFABIcon, {
25130
+ return /*#__PURE__*/React__default.createElement(StyledIconContainer$1, null, /*#__PURE__*/React__default.createElement(AnimatedFABIcon, {
25112
25131
  active: active,
25113
25132
  icon: icon,
25114
25133
  testID: "animated-fab-icon",
25115
25134
  size: "xsmall"
25116
25135
  }));
25117
25136
  }
25118
- return /*#__PURE__*/React__default.createElement(StyledIconContainer, null, /*#__PURE__*/React__default.createElement(StyledFABIcon, {
25137
+ return /*#__PURE__*/React__default.createElement(StyledIconContainer$1, null, /*#__PURE__*/React__default.createElement(StyledFABIcon, {
25119
25138
  size: "xsmall",
25120
25139
  icon: icon,
25121
25140
  testID: "styled-fab-icon"
@@ -25124,7 +25143,7 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
25124
25143
  var IconWithTextContent = function IconWithTextContent(_ref2) {
25125
25144
  var icon = _ref2.icon,
25126
25145
  title = _ref2.title;
25127
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledIconContainer, null, /*#__PURE__*/React__default.createElement(StyledFABIcon, {
25146
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledIconContainer$1, null, /*#__PURE__*/React__default.createElement(StyledFABIcon, {
25128
25147
  size: "xsmall",
25129
25148
  icon: icon,
25130
25149
  testID: "styled-fab-icon"
@@ -25282,7 +25301,7 @@ var FAB$1 = /*#__PURE__*/forwardRef(function (_ref3, ref) {
25282
25301
  });
25283
25302
  FAB$1.displayName = 'FAB';
25284
25303
 
25285
- var StyledContainer$5 = index$c(View)({
25304
+ var StyledContainer$6 = index$c(View)({
25286
25305
  position: 'absolute',
25287
25306
  left: 0,
25288
25307
  right: 0,
@@ -25389,7 +25408,7 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
25389
25408
  inputRange: [0, 1],
25390
25409
  outputRange: [0, 1]
25391
25410
  });
25392
- return /*#__PURE__*/React__default.createElement(StyledContainer$5, {
25411
+ return /*#__PURE__*/React__default.createElement(StyledContainer$6, {
25393
25412
  testID: testID,
25394
25413
  pointerEvents: "box-none",
25395
25414
  style: style
@@ -26120,7 +26139,7 @@ var HeroDesignProvider = function HeroDesignProvider(_ref) {
26120
26139
  }, /*#__PURE__*/React__default.createElement(Toast.Provider, null, /*#__PURE__*/React__default.createElement(Portal.Provider, null, children))));
26121
26140
  };
26122
26141
 
26123
- var StyledContainer$4 = index$c(View)(function (_ref) {
26142
+ var StyledContainer$5 = index$c(View)(function (_ref) {
26124
26143
  var theme = _ref.theme;
26125
26144
  return {
26126
26145
  width: theme.__hd__.mapPin.sizes["default"],
@@ -26200,7 +26219,7 @@ var MapPinFocussed = function MapPinFocussed(_ref) {
26200
26219
  var style = _ref.style,
26201
26220
  testID = _ref.testID,
26202
26221
  nativeProps = _objectWithoutProperties(_ref, _excluded$l);
26203
- return /*#__PURE__*/React__default.createElement(StyledContainer$4, _extends$1({}, nativeProps, {
26222
+ return /*#__PURE__*/React__default.createElement(StyledContainer$5, _extends$1({}, nativeProps, {
26204
26223
  style: style,
26205
26224
  testID: testID
26206
26225
  }), /*#__PURE__*/React__default.createElement(StyledFocusIcon, {
@@ -26227,7 +26246,7 @@ var MapPin = function MapPin(_ref) {
26227
26246
  icon = _ref.icon,
26228
26247
  nativeProps = _objectWithoutProperties(_ref, _excluded$k);
26229
26248
  var badgeIcon = getBadgeIconName(state);
26230
- return /*#__PURE__*/React__default.createElement(StyledContainer$4, _extends$1({}, nativeProps, {
26249
+ return /*#__PURE__*/React__default.createElement(StyledContainer$5, _extends$1({}, nativeProps, {
26231
26250
  style: style,
26232
26251
  testID: testID
26233
26252
  }), /*#__PURE__*/React__default.createElement(StyledContent, {
@@ -26510,7 +26529,7 @@ var PinInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
26510
26529
  });
26511
26530
  PinInput.displayName = 'PinInput';
26512
26531
 
26513
- var StyledContainer$3 = index$c(View)(function (_ref) {
26532
+ var StyledContainer$4 = index$c(View)(function (_ref) {
26514
26533
  var theme = _ref.theme;
26515
26534
  return {
26516
26535
  flexDirection: 'row',
@@ -26583,7 +26602,7 @@ var ProgressCircle = function ProgressCircle(_ref) {
26583
26602
  return /*#__PURE__*/React__default.createElement(View, _extends$1({}, nativeProps, {
26584
26603
  testID: testID,
26585
26604
  style: style
26586
- }), /*#__PURE__*/React__default.createElement(StyledContainer$3, null, /*#__PURE__*/React__default.createElement(Svg, {
26605
+ }), /*#__PURE__*/React__default.createElement(StyledContainer$4, null, /*#__PURE__*/React__default.createElement(Svg, {
26587
26606
  width: size,
26588
26607
  height: size,
26589
26608
  viewBox: "0 0 ".concat(size, " ").concat(size)
@@ -27566,7 +27585,7 @@ Object.assign(SingleSelect$1, {
27566
27585
  Multi: MultiSelect$1
27567
27586
  });
27568
27587
 
27569
- var StyledContainer$2 = index$c(Box)(function (_ref) {
27588
+ var StyledContainer$3 = index$c(Box)(function (_ref) {
27570
27589
  var theme = _ref.theme,
27571
27590
  themeIntent = _ref.themeIntent,
27572
27591
  themeVariant = _ref.themeVariant;
@@ -27652,7 +27671,7 @@ var Skeleton = function Skeleton(_ref) {
27652
27671
  }
27653
27672
  onLayout === null || onLayout === void 0 || onLayout(e);
27654
27673
  }, []);
27655
- return /*#__PURE__*/React__default.createElement(StyledContainer$2, _extends$1({
27674
+ return /*#__PURE__*/React__default.createElement(StyledContainer$3, _extends$1({
27656
27675
  style: style,
27657
27676
  themeVariant: variant,
27658
27677
  themeIntent: intent,
@@ -41438,7 +41457,7 @@ var RichTextEditor$1 = function RichTextEditor(_ref) {
41438
41457
  onBlur === null || onBlur === void 0 || onBlur();
41439
41458
  setIsFocused(false);
41440
41459
  }, [onBlur]);
41441
- return /*#__PURE__*/React__default.createElement(StyledContainer$a, {
41460
+ return /*#__PURE__*/React__default.createElement(StyledContainer$b, {
41442
41461
  testID: testID
41443
41462
  }, /*#__PURE__*/React__default.createElement(StyledLabelContainerInsideTextInput, {
41444
41463
  themeHasPrefix: false,
@@ -41700,7 +41719,7 @@ function SectionListWithFAB(_ref) {
41700
41719
  });
41701
41720
  }
41702
41721
 
41703
- var StyledContainer$1 = index$c(View)(function () {
41722
+ var StyledContainer$2 = index$c(View)(function () {
41704
41723
  return {
41705
41724
  width: '100%'
41706
41725
  };
@@ -41805,7 +41824,7 @@ var SearchTwoLine = function SearchTwoLine(props) {
41805
41824
  _props$variant = props.variant,
41806
41825
  variant = _props$variant === void 0 ? 'basic' : _props$variant,
41807
41826
  accessible = props.accessible;
41808
- return /*#__PURE__*/React__default.createElement(StyledContainer$1, {
41827
+ return /*#__PURE__*/React__default.createElement(StyledContainer$2, {
41809
41828
  style: style,
41810
41829
  testID: testID,
41811
41830
  accessible: accessible
@@ -41922,7 +41941,7 @@ var SearchOneLine = /*#__PURE__*/forwardRef(function (props, ref) {
41922
41941
  }));
41923
41942
  };
41924
41943
  var shouldShowClearButton = clearable && (state === 'filled' || isFocused) && !isEmptyValue;
41925
- return /*#__PURE__*/React__default.createElement(StyledContainer$1, {
41944
+ return /*#__PURE__*/React__default.createElement(StyledContainer$2, {
41926
41945
  pointerEvents: state === 'disabled' || state === 'readonly' ? 'none' : 'auto',
41927
41946
  testID: testID,
41928
41947
  style: style,
@@ -42379,6 +42398,238 @@ var FilterTrigger = function FilterTrigger(_ref) {
42379
42398
  })));
42380
42399
  };
42381
42400
 
42401
+ var ANIMATION_DURATION_MS = 2000;
42402
+ var AnimatedGradientText = function AnimatedGradientText(_ref) {
42403
+ var children = _ref.children,
42404
+ fontSize = _ref.fontSize,
42405
+ lineHeight = _ref.lineHeight;
42406
+ var theme = useTheme();
42407
+ var gradient = theme.colors.gradients.aiHorizontal;
42408
+ var _useState = useState(null),
42409
+ _useState2 = _slicedToArray(_useState, 2),
42410
+ size = _useState2[0],
42411
+ setSize = _useState2[1];
42412
+ var animatedValue = useRef(new Animated.Value(0));
42413
+ var onLayout = useCallback(function (event) {
42414
+ var _event$nativeEvent$la = event.nativeEvent.layout,
42415
+ width = _event$nativeEvent$la.width,
42416
+ height = _event$nativeEvent$la.height;
42417
+ setSize(function (prev) {
42418
+ if ((prev === null || prev === void 0 ? void 0 : prev.width) === width && (prev === null || prev === void 0 ? void 0 : prev.height) === height) return prev;
42419
+ return {
42420
+ width: width,
42421
+ height: height
42422
+ };
42423
+ });
42424
+ }, []);
42425
+ useEffect(function () {
42426
+ if (!size) return;
42427
+ animatedValue.current.setValue(0);
42428
+ var animation = Animated.loop(Animated.timing(animatedValue.current, {
42429
+ toValue: 1,
42430
+ duration: ANIMATION_DURATION_MS,
42431
+ easing: Easing.linear,
42432
+ useNativeDriver: Platform.OS !== 'web'
42433
+ }));
42434
+ animation.start();
42435
+ return function () {
42436
+ return animation.stop();
42437
+ };
42438
+ }, [size]);
42439
+
42440
+ // Slide left by one full text-width per loop cycle.
42441
+ // Starting at 0 keeps the gradient visible from the first frame.
42442
+ var translateX = size ? animatedValue.current.interpolate({
42443
+ inputRange: [0, 1],
42444
+ outputRange: [0, -size.width]
42445
+ }) : animatedValue.current;
42446
+ return /*#__PURE__*/React__default.createElement(View, null, /*#__PURE__*/React__default.createElement(MaskedView, {
42447
+ accessibilityElementsHidden: true,
42448
+ importantForAccessibility: "no-hide-descendants",
42449
+ maskElement: /*#__PURE__*/React__default.createElement(View, {
42450
+ onLayout: onLayout,
42451
+ style: {
42452
+ backgroundColor: 'transparent'
42453
+ },
42454
+ testID: "animated-gradient-text-mask"
42455
+ }, /*#__PURE__*/React__default.createElement(Typography.Body, {
42456
+ intent: "body",
42457
+ style: {
42458
+ fontSize: fontSize,
42459
+ lineHeight: lineHeight
42460
+ }
42461
+ }, children))
42462
+ }, size ? /*#__PURE__*/React__default.createElement(View, {
42463
+ style: {
42464
+ width: size.width,
42465
+ height: size.height,
42466
+ overflow: 'hidden'
42467
+ }
42468
+ }, /*#__PURE__*/React__default.createElement(Animated.View, {
42469
+ style: {
42470
+ width: size.width * 2,
42471
+ height: size.height,
42472
+ transform: [{
42473
+ translateX: translateX
42474
+ }]
42475
+ }
42476
+ }, /*#__PURE__*/React__default.createElement(LinearGradient, {
42477
+ start: gradient.start,
42478
+ end: gradient.end,
42479
+ colors: [gradient.colors[0], gradient.colors[1], gradient.colors[2], gradient.colors[1], gradient.colors[0]],
42480
+ locations: [0, 0.25, 0.5, 0.75, 1.0],
42481
+ style: {
42482
+ width: '100%',
42483
+ height: '100%'
42484
+ }
42485
+ }))) : /*#__PURE__*/React__default.createElement(Typography.Body, {
42486
+ intent: "body",
42487
+ style: {
42488
+ fontSize: fontSize,
42489
+ lineHeight: lineHeight
42490
+ }
42491
+ }, children)), /*#__PURE__*/React__default.createElement(View, {
42492
+ style: {
42493
+ position: 'absolute',
42494
+ opacity: 0
42495
+ },
42496
+ importantForAccessibility: "yes",
42497
+ accessibilityElementsHidden: false
42498
+ }, /*#__PURE__*/React__default.createElement(Typography.Body, {
42499
+ intent: "body",
42500
+ style: {
42501
+ fontSize: fontSize,
42502
+ lineHeight: lineHeight
42503
+ }
42504
+ }, children)));
42505
+ };
42506
+
42507
+ var TEXT_SIZE_NAMES = {
42508
+ 10: 'xsmall',
42509
+ 12: 'small',
42510
+ 14: 'medium',
42511
+ 16: 'large',
42512
+ 18: 'xlarge'
42513
+ };
42514
+ var getTextSizeName = function getTextSizeName(size) {
42515
+ return TEXT_SIZE_NAMES[size];
42516
+ };
42517
+ var getIconName = function getIconName(state) {
42518
+ switch (state) {
42519
+ case 'idle':
42520
+ return 'circle-ok-outlined';
42521
+ case 'loading':
42522
+ return 'loading';
42523
+ case 'success':
42524
+ return 'circle-check';
42525
+ case 'error':
42526
+ return 'circle-cancel-outlined';
42527
+ }
42528
+ };
42529
+ var getIconIntent = function getIconIntent(state, intent) {
42530
+ switch (state) {
42531
+ case 'idle':
42532
+ return 'inactive';
42533
+ case 'loading':
42534
+ return intent === 'ai' ? 'ai' : 'primary';
42535
+ case 'success':
42536
+ return 'success';
42537
+ case 'error':
42538
+ return 'danger';
42539
+ }
42540
+ };
42541
+ var getIconSize = function getIconSize(textSize) {
42542
+ switch (textSize) {
42543
+ case 10:
42544
+ return {
42545
+ size: 'xxxsmall'
42546
+ };
42547
+ case 12:
42548
+ return {
42549
+ size: 'xxxsmall',
42550
+ styleFontSize: 14
42551
+ };
42552
+ case 14:
42553
+ return {
42554
+ size: 'xxxsmall',
42555
+ styleFontSize: 14
42556
+ };
42557
+ case 16:
42558
+ return {
42559
+ size: 'xsmall'
42560
+ };
42561
+ case 18:
42562
+ return {
42563
+ size: 'small'
42564
+ };
42565
+ }
42566
+ };
42567
+
42568
+ var StyledContainer$1 = index$c(View)(function (_ref) {
42569
+ var theme = _ref.theme;
42570
+ return {
42571
+ flexDirection: 'row',
42572
+ alignItems: 'flex-start',
42573
+ gap: theme.__hd__.inlineLoader.space.gap
42574
+ };
42575
+ });
42576
+ var StyledIconContainer = index$c(View)(function (_ref2) {
42577
+ var themeSize = _ref2.themeSize,
42578
+ theme = _ref2.theme;
42579
+ return {
42580
+ height: theme.__hd__.inlineLoader.icon.lineHeights[themeSize],
42581
+ justifyContent: 'center'
42582
+ };
42583
+ });
42584
+
42585
+ var InlineLoader = function InlineLoader(_ref) {
42586
+ var text = _ref.text,
42587
+ _ref$state = _ref.state,
42588
+ state = _ref$state === void 0 ? 'idle' : _ref$state,
42589
+ _ref$intent = _ref.intent,
42590
+ intent = _ref$intent === void 0 ? 'neutral' : _ref$intent,
42591
+ _ref$size = _ref.size,
42592
+ size = _ref$size === void 0 ? 14 : _ref$size,
42593
+ style = _ref.style,
42594
+ testID = _ref.testID;
42595
+ var theme = useTheme();
42596
+ var textSizeName = getTextSizeName(size);
42597
+ var lineHeight = theme.__hd__.inlineLoader.icon.lineHeights[textSizeName];
42598
+ var iconName = getIconName(state);
42599
+ var iconIntent = getIconIntent(state, intent);
42600
+ var _getIconSize = getIconSize(size),
42601
+ iconSize = _getIconSize.size,
42602
+ styleFontSize = _getIconSize.styleFontSize;
42603
+ var iconStyle = styleFontSize ? {
42604
+ fontSize: styleFontSize
42605
+ } : undefined;
42606
+ var isAiLoading = state === 'loading' && intent === 'ai';
42607
+ return /*#__PURE__*/React__default.createElement(StyledContainer$1, {
42608
+ testID: testID,
42609
+ style: style
42610
+ }, /*#__PURE__*/React__default.createElement(StyledIconContainer, {
42611
+ themeSize: textSizeName
42612
+ }, /*#__PURE__*/React__default.createElement(Icon, {
42613
+ icon: iconName,
42614
+ intent: iconIntent,
42615
+ size: iconSize,
42616
+ spin: state === 'loading',
42617
+ style: iconStyle,
42618
+ accessible: false,
42619
+ accessibilityElementsHidden: true,
42620
+ importantForAccessibility: "no-hide-descendants"
42621
+ })), isAiLoading ? /*#__PURE__*/React__default.createElement(AnimatedGradientText, {
42622
+ fontSize: size,
42623
+ lineHeight: lineHeight
42624
+ }, text) : /*#__PURE__*/React__default.createElement(Typography.Body, {
42625
+ intent: "body",
42626
+ style: {
42627
+ fontSize: size,
42628
+ lineHeight: lineHeight
42629
+ }
42630
+ }, text));
42631
+ };
42632
+
42382
42633
  var getZIndexByState = function getZIndexByState(_ref) {
42383
42634
  var themeFocused = _ref.themeFocused,
42384
42635
  themeHasError = _ref.themeHasError;
@@ -55658,4 +55909,4 @@ var index = Object.assign(RichTextEditorWithRef, {
55658
55909
  Base: RichTextEditorInput
55659
55910
  });
55660
55911
 
55661
- export { Accordion, Alert, AppCue, Attachment, index$b as Avatar, Badge, BottomNavigation, BottomSheet, Box, CompoundButton as Button, Calendar, Card, index$a as Carousel, Chart, index$9 as Checkbox, Chip, Collapse, ContentNavigator, index$1 as DatePicker, Divider, index$8 as Drawer, Empty, ErrorComponent as Error, FAB, FilterTrigger, FlatListWithFAB, FloatingIsland, FormGroup, HeroDesignProvider, Icon, Illustration, IllustrationList, Image, List$1 as List, LocaleProvider, index$7 as MapPin, PageControl, PinInput, Portal, Progress, CompoundRadio as Radio, Rate, RefreshControl, index as RichTextEditor, ScrollViewWithFAB, Search, SectionHeading, SectionListWithFAB, SegmentedControl, index$2 as Select, Skeleton, Slider, Spinner, Success, index$6 as Swipeable, index$5 as Switch, index$4 as Tabs, Tag, TextInput, WorkThemeProvider as ThemeProvider, WorkThemeSwitcher as ThemeSwitcher, TimePicker, Toast, index$3 as Toolbar, Typography, eBensSystemPalette, ehJobsSystemPalette, ehWorkDarkSystemPalette, ehWorkSystemPalette, getTheme, jobsSystemPalette, scale, index$c as styled, swagDarkSystemPalette, swagLightJobsSystemPalette, swagSystemPalette$1 as swagLightSystemPalette, swagSystemPalette$2 as swagSystemPalette, defaultTheme as theme, useAvatarColors, useWorkTheme as useTheme, walletSystemPalette, withWorkTheme as withTheme, workSystemPalette };
55912
+ export { Accordion, Alert, AppCue, Attachment, index$b as Avatar, Badge, BottomNavigation, BottomSheet, Box, CompoundButton as Button, Calendar, Card, index$a as Carousel, Chart, index$9 as Checkbox, Chip, Collapse, ContentNavigator, index$1 as DatePicker, Divider, index$8 as Drawer, Empty, ErrorComponent as Error, FAB, FilterTrigger, FlatListWithFAB, FloatingIsland, FormGroup, HeroDesignProvider, Icon, Illustration, IllustrationList, Image, InlineLoader, List$1 as List, LocaleProvider, index$7 as MapPin, PageControl, PinInput, Portal, Progress, CompoundRadio as Radio, Rate, RefreshControl, index as RichTextEditor, ScrollViewWithFAB, Search, SectionHeading, SectionListWithFAB, SegmentedControl, index$2 as Select, Skeleton, Slider, Spinner, Success, index$6 as Swipeable, index$5 as Switch, index$4 as Tabs, Tag, TextInput, WorkThemeProvider as ThemeProvider, WorkThemeSwitcher as ThemeSwitcher, TimePicker, Toast, index$3 as Toolbar, Typography, eBensSystemPalette, ehJobsSystemPalette, ehWorkDarkSystemPalette, ehWorkSystemPalette, getTheme, jobsSystemPalette, scale, index$c as styled, swagDarkSystemPalette, swagLightJobsSystemPalette, swagSystemPalette$1 as swagLightSystemPalette, swagSystemPalette$2 as swagSystemPalette, defaultTheme as theme, useAvatarColors, useWorkTheme as useTheme, walletSystemPalette, withWorkTheme as withTheme, workSystemPalette };
package/lib/index.js CHANGED
@@ -5954,6 +5954,7 @@ var getAttachmentTheme = function getAttachmentTheme(theme) {
5954
5954
 
5955
5955
  var getAvatarTheme = function getAvatarTheme(theme) {
5956
5956
  var colors = {
5957
+ neutral: palette$8.maasstrichtBlueLight25,
5957
5958
  primary: theme.colors.primary,
5958
5959
  info: theme.colors.info,
5959
5960
  danger: theme.colors.error,
@@ -8067,6 +8068,23 @@ var getSegmentedControlTheme = function getSegmentedControlTheme(theme) {
8067
8068
  };
8068
8069
  };
8069
8070
 
8071
+ var getInlineLoaderTheme = function getInlineLoaderTheme(theme) {
8072
+ return {
8073
+ space: {
8074
+ gap: theme.space.small
8075
+ },
8076
+ icon: {
8077
+ lineHeights: {
8078
+ xsmall: theme.lineHeights.xsmall,
8079
+ small: theme.lineHeights.small,
8080
+ medium: theme.lineHeights.medium,
8081
+ large: theme.lineHeights.large,
8082
+ xlarge: theme.lineHeights.xlarge
8083
+ }
8084
+ }
8085
+ };
8086
+ };
8087
+
8070
8088
  var getTheme$1 = function getTheme() {
8071
8089
  var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : scale$1;
8072
8090
  var systemPallete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : swagSystemPalette$2;
@@ -8128,6 +8146,7 @@ var getTheme$1 = function getTheme() {
8128
8146
  toolbar: getToolbarTheme(globalTheme),
8129
8147
  typography: getTypographyTheme(globalTheme),
8130
8148
  floatingIsland: getFloatingIslandTheme(globalTheme),
8149
+ inlineLoader: getInlineLoaderTheme(globalTheme),
8131
8150
  segmentedControl: getSegmentedControlTheme(globalTheme)
8132
8151
  }
8133
8152
  });
@@ -10316,7 +10335,7 @@ var Box = function Box(_ref) {
10316
10335
  }), children);
10317
10336
  };
10318
10337
 
10319
- var StyledContainer$a = index$c(reactNative.View)(function (_ref) {
10338
+ var StyledContainer$b = index$c(reactNative.View)(function (_ref) {
10320
10339
  var theme = _ref.theme;
10321
10340
  return {
10322
10341
  width: '100%',
@@ -10705,7 +10724,7 @@ var TextInput$1 = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
10705
10724
  defaultValue: defaultValue,
10706
10725
  placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE$1
10707
10726
  });
10708
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$a, {
10727
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$b, {
10709
10728
  style: styleWithoutBackgroundColor,
10710
10729
  pointerEvents: state === 'disabled' || state === 'readonly' ? 'none' : 'auto',
10711
10730
  testID: testID
@@ -14257,7 +14276,7 @@ function ContentNavigator(_ref) {
14257
14276
  }));
14258
14277
  }
14259
14278
 
14260
- var StyledContainer$9 = index$c(reactNative.View)(function (_ref) {
14279
+ var StyledContainer$a = index$c(reactNative.View)(function (_ref) {
14261
14280
  var theme = _ref.theme;
14262
14281
  return {
14263
14282
  backgroundColor: theme.__hd__.calendar.colors.background
@@ -14699,7 +14718,7 @@ var CalendarRange = function CalendarRange(_ref) {
14699
14718
  textIntent: isCurrentMonth ? undefined : 'subdued'
14700
14719
  });
14701
14720
  };
14702
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$9, {
14721
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$a, {
14703
14722
  testID: testID
14704
14723
  }, /*#__PURE__*/React__namespace.default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__namespace.default.createElement(ContentNavigator, {
14705
14724
  value: !shouldShowMonthPicker ? formatTime('MMMM yyyy', visibleDate) : /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
@@ -14833,7 +14852,7 @@ var Calendar = function Calendar(_ref) {
14833
14852
  monthPickerVisible = _useState2[0],
14834
14853
  setMonthPickerVisible = _useState2[1];
14835
14854
  var now = new Date();
14836
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$9, {
14855
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$a, {
14837
14856
  testID: testID
14838
14857
  }, /*#__PURE__*/React__namespace.default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__namespace.default.createElement(ContentNavigator, {
14839
14858
  value: !shouldShowMonthPicker ? formatTime('MMMM yyyy', visibleDate) : /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
@@ -15815,7 +15834,7 @@ var StyledContent$1 = index$c(reactNative.View)(function (_ref) {
15815
15834
  alignSelf: 'center'
15816
15835
  };
15817
15836
  });
15818
- var StyledContainer$8 = index$c(reactNative.View)(function (_ref2) {
15837
+ var StyledContainer$9 = index$c(reactNative.View)(function (_ref2) {
15819
15838
  var theme = _ref2.theme;
15820
15839
  return {
15821
15840
  width: '100%',
@@ -15823,7 +15842,7 @@ var StyledContainer$8 = index$c(reactNative.View)(function (_ref2) {
15823
15842
  backgroundColor: theme.__hd__.appCue.colors.backdropColor
15824
15843
  };
15825
15844
  });
15826
- var StyledIconContainer$1 = index$c(reactNative.Animated.View)(function (_ref3) {
15845
+ var StyledIconContainer$2 = index$c(reactNative.Animated.View)(function (_ref3) {
15827
15846
  var theme = _ref3.theme,
15828
15847
  themePlacement = _ref3.themePlacement;
15829
15848
  return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
@@ -16139,7 +16158,7 @@ var AppCue = function AppCue(_ref) {
16139
16158
  onPress: function onPress() {
16140
16159
  return setVisible(false);
16141
16160
  }
16142
- }, /*#__PURE__*/React__namespace.default.createElement(StyledContainer$8, null, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
16161
+ }, /*#__PURE__*/React__namespace.default.createElement(StyledContainer$9, null, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
16143
16162
  style: reactNative.StyleSheet.flatten([{
16144
16163
  position: 'absolute',
16145
16164
  top: pos.top,
@@ -16154,7 +16173,7 @@ var AppCue = function AppCue(_ref) {
16154
16173
  maxWidth: maxWidth
16155
16174
  },
16156
16175
  testID: testID && "".concat(testID, "-content")
16157
- }, renderContent()), /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer$1, {
16176
+ }, renderContent()), /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer$2, {
16158
16177
  themePlacement: placement,
16159
16178
  testID: testID && "".concat(testID, "-arrow")
16160
16179
  }, /*#__PURE__*/React__namespace.default.createElement(Icon, {
@@ -16163,7 +16182,7 @@ var AppCue = function AppCue(_ref) {
16163
16182
  })))))));
16164
16183
  };
16165
16184
 
16166
- var StyledContainer$7 = index$c(reactNative.View)({
16185
+ var StyledContainer$8 = index$c(reactNative.View)({
16167
16186
  alignItems: 'center',
16168
16187
  flexDirection: 'row'
16169
16188
  });
@@ -16205,7 +16224,7 @@ var Attachment = function Attachment(_ref) {
16205
16224
  backgroundHighlighted = _ref$backgroundHighli === void 0 ? false : _ref$backgroundHighli,
16206
16225
  style = _ref.style,
16207
16226
  testID = _ref.testID;
16208
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$7, {
16227
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$8, {
16209
16228
  testID: testID,
16210
16229
  style: style
16211
16230
  }, /*#__PURE__*/React__namespace.default.createElement(StyledContentContainer, {
@@ -16293,7 +16312,7 @@ var Avatar = function Avatar(_ref) {
16293
16312
  _ref$size = _ref.size,
16294
16313
  size = _ref$size === void 0 ? 'small' : _ref$size,
16295
16314
  _ref$intent = _ref.intent,
16296
- intent = _ref$intent === void 0 ? 'primary' : _ref$intent;
16315
+ intent = _ref$intent === void 0 ? 'neutral' : _ref$intent;
16297
16316
  var _useState = React.useState(false),
16298
16317
  _useState2 = _slicedToArray(_useState, 2),
16299
16318
  hasImageError = _useState2[0],
@@ -22786,7 +22805,7 @@ Object.assign(PublicDatePicker, {
22786
22805
  });
22787
22806
 
22788
22807
  var AnimatedPressable = reactNative.Animated.createAnimatedComponent(reactNative.Pressable);
22789
- var StyledContainer$6 = index$c(reactNative.View)(function (_ref) {
22808
+ var StyledContainer$7 = index$c(reactNative.View)(function (_ref) {
22790
22809
  var theme = _ref.theme,
22791
22810
  enableShadow = _ref.enableShadow;
22792
22811
  return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
@@ -23051,7 +23070,7 @@ var Drawer = function Drawer(_ref) {
23051
23070
  return animation.stop();
23052
23071
  };
23053
23072
  }, [visible]);
23054
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$6, {
23073
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$7, {
23055
23074
  testID: testID,
23056
23075
  enableShadow: enableShadow,
23057
23076
  pointerEvents: "box-none"
@@ -25045,7 +25064,7 @@ var StyledFABText = index$c(Typography.Body)(function (_ref3) {
25045
25064
  marginHorizontal: theme.__hd__.fab.space.titleMarginHorizontal
25046
25065
  };
25047
25066
  });
25048
- var StyledIconContainer = index$c(Box)(function (_ref4) {
25067
+ var StyledIconContainer$1 = index$c(Box)(function (_ref4) {
25049
25068
  var theme = _ref4.theme;
25050
25069
  return {
25051
25070
  width: theme.__hd__.fab.sizes.iconContainerWidth,
@@ -25089,7 +25108,7 @@ var ActionItem = function ActionItem(_ref) {
25089
25108
  style: style,
25090
25109
  onPress: onPress,
25091
25110
  testID: testID
25092
- }, /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledIcon$3, {
25111
+ }, /*#__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, {
25093
25112
  size: "xsmall",
25094
25113
  icon: icon
25095
25114
  })), /*#__PURE__*/React__namespace.default.createElement(StyledActionItemText, null, title))));
@@ -25138,14 +25157,14 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
25138
25157
  animated = _ref.animated,
25139
25158
  active = _ref.active;
25140
25159
  if (animated) {
25141
- return /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(AnimatedFABIcon, {
25160
+ return /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer$1, null, /*#__PURE__*/React__namespace.default.createElement(AnimatedFABIcon, {
25142
25161
  active: active,
25143
25162
  icon: icon,
25144
25163
  testID: "animated-fab-icon",
25145
25164
  size: "xsmall"
25146
25165
  }));
25147
25166
  }
25148
- return /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledFABIcon, {
25167
+ return /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer$1, null, /*#__PURE__*/React__namespace.default.createElement(StyledFABIcon, {
25149
25168
  size: "xsmall",
25150
25169
  icon: icon,
25151
25170
  testID: "styled-fab-icon"
@@ -25154,7 +25173,7 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
25154
25173
  var IconWithTextContent = function IconWithTextContent(_ref2) {
25155
25174
  var icon = _ref2.icon,
25156
25175
  title = _ref2.title;
25157
- return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledFABIcon, {
25176
+ 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, {
25158
25177
  size: "xsmall",
25159
25178
  icon: icon,
25160
25179
  testID: "styled-fab-icon"
@@ -25312,7 +25331,7 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
25312
25331
  });
25313
25332
  FAB$1.displayName = 'FAB';
25314
25333
 
25315
- var StyledContainer$5 = index$c(reactNative.View)({
25334
+ var StyledContainer$6 = index$c(reactNative.View)({
25316
25335
  position: 'absolute',
25317
25336
  left: 0,
25318
25337
  right: 0,
@@ -25419,7 +25438,7 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
25419
25438
  inputRange: [0, 1],
25420
25439
  outputRange: [0, 1]
25421
25440
  });
25422
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$5, {
25441
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$6, {
25423
25442
  testID: testID,
25424
25443
  pointerEvents: "box-none",
25425
25444
  style: style
@@ -26150,7 +26169,7 @@ var HeroDesignProvider = function HeroDesignProvider(_ref) {
26150
26169
  }, /*#__PURE__*/React__namespace.default.createElement(Toast.Provider, null, /*#__PURE__*/React__namespace.default.createElement(Portal$1.Provider, null, children))));
26151
26170
  };
26152
26171
 
26153
- var StyledContainer$4 = index$c(reactNative.View)(function (_ref) {
26172
+ var StyledContainer$5 = index$c(reactNative.View)(function (_ref) {
26154
26173
  var theme = _ref.theme;
26155
26174
  return {
26156
26175
  width: theme.__hd__.mapPin.sizes["default"],
@@ -26230,7 +26249,7 @@ var MapPinFocussed = function MapPinFocussed(_ref) {
26230
26249
  var style = _ref.style,
26231
26250
  testID = _ref.testID,
26232
26251
  nativeProps = _objectWithoutProperties(_ref, _excluded$l);
26233
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$4, _extends$1({}, nativeProps, {
26252
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$5, _extends$1({}, nativeProps, {
26234
26253
  style: style,
26235
26254
  testID: testID
26236
26255
  }), /*#__PURE__*/React__namespace.default.createElement(StyledFocusIcon, {
@@ -26257,7 +26276,7 @@ var MapPin = function MapPin(_ref) {
26257
26276
  icon = _ref.icon,
26258
26277
  nativeProps = _objectWithoutProperties(_ref, _excluded$k);
26259
26278
  var badgeIcon = getBadgeIconName(state);
26260
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$4, _extends$1({}, nativeProps, {
26279
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$5, _extends$1({}, nativeProps, {
26261
26280
  style: style,
26262
26281
  testID: testID
26263
26282
  }), /*#__PURE__*/React__namespace.default.createElement(StyledContent, {
@@ -26540,7 +26559,7 @@ var PinInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
26540
26559
  });
26541
26560
  PinInput.displayName = 'PinInput';
26542
26561
 
26543
- var StyledContainer$3 = index$c(reactNative.View)(function (_ref) {
26562
+ var StyledContainer$4 = index$c(reactNative.View)(function (_ref) {
26544
26563
  var theme = _ref.theme;
26545
26564
  return {
26546
26565
  flexDirection: 'row',
@@ -26613,7 +26632,7 @@ var ProgressCircle = function ProgressCircle(_ref) {
26613
26632
  return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, _extends$1({}, nativeProps, {
26614
26633
  testID: testID,
26615
26634
  style: style
26616
- }), /*#__PURE__*/React__namespace.default.createElement(StyledContainer$3, null, /*#__PURE__*/React__namespace.default.createElement(Svg__default.default, {
26635
+ }), /*#__PURE__*/React__namespace.default.createElement(StyledContainer$4, null, /*#__PURE__*/React__namespace.default.createElement(Svg__default.default, {
26617
26636
  width: size,
26618
26637
  height: size,
26619
26638
  viewBox: "0 0 ".concat(size, " ").concat(size)
@@ -27596,7 +27615,7 @@ Object.assign(SingleSelect$1, {
27596
27615
  Multi: MultiSelect$1
27597
27616
  });
27598
27617
 
27599
- var StyledContainer$2 = index$c(Box)(function (_ref) {
27618
+ var StyledContainer$3 = index$c(Box)(function (_ref) {
27600
27619
  var theme = _ref.theme,
27601
27620
  themeIntent = _ref.themeIntent,
27602
27621
  themeVariant = _ref.themeVariant;
@@ -27682,7 +27701,7 @@ var Skeleton = function Skeleton(_ref) {
27682
27701
  }
27683
27702
  onLayout === null || onLayout === void 0 || onLayout(e);
27684
27703
  }, []);
27685
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$2, _extends$1({
27704
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$3, _extends$1({
27686
27705
  style: style,
27687
27706
  themeVariant: variant,
27688
27707
  themeIntent: intent,
@@ -41468,7 +41487,7 @@ var RichTextEditor$1 = function RichTextEditor(_ref) {
41468
41487
  onBlur === null || onBlur === void 0 || onBlur();
41469
41488
  setIsFocused(false);
41470
41489
  }, [onBlur]);
41471
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$a, {
41490
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$b, {
41472
41491
  testID: testID
41473
41492
  }, /*#__PURE__*/React__namespace.default.createElement(StyledLabelContainerInsideTextInput, {
41474
41493
  themeHasPrefix: false,
@@ -41730,7 +41749,7 @@ function SectionListWithFAB(_ref) {
41730
41749
  });
41731
41750
  }
41732
41751
 
41733
- var StyledContainer$1 = index$c(reactNative.View)(function () {
41752
+ var StyledContainer$2 = index$c(reactNative.View)(function () {
41734
41753
  return {
41735
41754
  width: '100%'
41736
41755
  };
@@ -41835,7 +41854,7 @@ var SearchTwoLine = function SearchTwoLine(props) {
41835
41854
  _props$variant = props.variant,
41836
41855
  variant = _props$variant === void 0 ? 'basic' : _props$variant,
41837
41856
  accessible = props.accessible;
41838
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$1, {
41857
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$2, {
41839
41858
  style: style,
41840
41859
  testID: testID,
41841
41860
  accessible: accessible
@@ -41952,7 +41971,7 @@ var SearchOneLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
41952
41971
  }));
41953
41972
  };
41954
41973
  var shouldShowClearButton = clearable && (state === 'filled' || isFocused) && !isEmptyValue;
41955
- return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$1, {
41974
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$2, {
41956
41975
  pointerEvents: state === 'disabled' || state === 'readonly' ? 'none' : 'auto',
41957
41976
  testID: testID,
41958
41977
  style: style,
@@ -42409,6 +42428,238 @@ var FilterTrigger = function FilterTrigger(_ref) {
42409
42428
  })));
42410
42429
  };
42411
42430
 
42431
+ var ANIMATION_DURATION_MS = 2000;
42432
+ var AnimatedGradientText = function AnimatedGradientText(_ref) {
42433
+ var children = _ref.children,
42434
+ fontSize = _ref.fontSize,
42435
+ lineHeight = _ref.lineHeight;
42436
+ var theme = useTheme();
42437
+ var gradient = theme.colors.gradients.aiHorizontal;
42438
+ var _useState = React.useState(null),
42439
+ _useState2 = _slicedToArray(_useState, 2),
42440
+ size = _useState2[0],
42441
+ setSize = _useState2[1];
42442
+ var animatedValue = React.useRef(new reactNative.Animated.Value(0));
42443
+ var onLayout = React.useCallback(function (event) {
42444
+ var _event$nativeEvent$la = event.nativeEvent.layout,
42445
+ width = _event$nativeEvent$la.width,
42446
+ height = _event$nativeEvent$la.height;
42447
+ setSize(function (prev) {
42448
+ if ((prev === null || prev === void 0 ? void 0 : prev.width) === width && (prev === null || prev === void 0 ? void 0 : prev.height) === height) return prev;
42449
+ return {
42450
+ width: width,
42451
+ height: height
42452
+ };
42453
+ });
42454
+ }, []);
42455
+ React.useEffect(function () {
42456
+ if (!size) return;
42457
+ animatedValue.current.setValue(0);
42458
+ var animation = reactNative.Animated.loop(reactNative.Animated.timing(animatedValue.current, {
42459
+ toValue: 1,
42460
+ duration: ANIMATION_DURATION_MS,
42461
+ easing: reactNative.Easing.linear,
42462
+ useNativeDriver: reactNative.Platform.OS !== 'web'
42463
+ }));
42464
+ animation.start();
42465
+ return function () {
42466
+ return animation.stop();
42467
+ };
42468
+ }, [size]);
42469
+
42470
+ // Slide left by one full text-width per loop cycle.
42471
+ // Starting at 0 keeps the gradient visible from the first frame.
42472
+ var translateX = size ? animatedValue.current.interpolate({
42473
+ inputRange: [0, 1],
42474
+ outputRange: [0, -size.width]
42475
+ }) : animatedValue.current;
42476
+ return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, null, /*#__PURE__*/React__namespace.default.createElement(MaskedView__default.default, {
42477
+ accessibilityElementsHidden: true,
42478
+ importantForAccessibility: "no-hide-descendants",
42479
+ maskElement: /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
42480
+ onLayout: onLayout,
42481
+ style: {
42482
+ backgroundColor: 'transparent'
42483
+ },
42484
+ testID: "animated-gradient-text-mask"
42485
+ }, /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
42486
+ intent: "body",
42487
+ style: {
42488
+ fontSize: fontSize,
42489
+ lineHeight: lineHeight
42490
+ }
42491
+ }, children))
42492
+ }, size ? /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
42493
+ style: {
42494
+ width: size.width,
42495
+ height: size.height,
42496
+ overflow: 'hidden'
42497
+ }
42498
+ }, /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
42499
+ style: {
42500
+ width: size.width * 2,
42501
+ height: size.height,
42502
+ transform: [{
42503
+ translateX: translateX
42504
+ }]
42505
+ }
42506
+ }, /*#__PURE__*/React__namespace.default.createElement(expoLinearGradient.LinearGradient, {
42507
+ start: gradient.start,
42508
+ end: gradient.end,
42509
+ colors: [gradient.colors[0], gradient.colors[1], gradient.colors[2], gradient.colors[1], gradient.colors[0]],
42510
+ locations: [0, 0.25, 0.5, 0.75, 1.0],
42511
+ style: {
42512
+ width: '100%',
42513
+ height: '100%'
42514
+ }
42515
+ }))) : /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
42516
+ intent: "body",
42517
+ style: {
42518
+ fontSize: fontSize,
42519
+ lineHeight: lineHeight
42520
+ }
42521
+ }, children)), /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
42522
+ style: {
42523
+ position: 'absolute',
42524
+ opacity: 0
42525
+ },
42526
+ importantForAccessibility: "yes",
42527
+ accessibilityElementsHidden: false
42528
+ }, /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
42529
+ intent: "body",
42530
+ style: {
42531
+ fontSize: fontSize,
42532
+ lineHeight: lineHeight
42533
+ }
42534
+ }, children)));
42535
+ };
42536
+
42537
+ var TEXT_SIZE_NAMES = {
42538
+ 10: 'xsmall',
42539
+ 12: 'small',
42540
+ 14: 'medium',
42541
+ 16: 'large',
42542
+ 18: 'xlarge'
42543
+ };
42544
+ var getTextSizeName = function getTextSizeName(size) {
42545
+ return TEXT_SIZE_NAMES[size];
42546
+ };
42547
+ var getIconName = function getIconName(state) {
42548
+ switch (state) {
42549
+ case 'idle':
42550
+ return 'circle-ok-outlined';
42551
+ case 'loading':
42552
+ return 'loading';
42553
+ case 'success':
42554
+ return 'circle-check';
42555
+ case 'error':
42556
+ return 'circle-cancel-outlined';
42557
+ }
42558
+ };
42559
+ var getIconIntent = function getIconIntent(state, intent) {
42560
+ switch (state) {
42561
+ case 'idle':
42562
+ return 'inactive';
42563
+ case 'loading':
42564
+ return intent === 'ai' ? 'ai' : 'primary';
42565
+ case 'success':
42566
+ return 'success';
42567
+ case 'error':
42568
+ return 'danger';
42569
+ }
42570
+ };
42571
+ var getIconSize = function getIconSize(textSize) {
42572
+ switch (textSize) {
42573
+ case 10:
42574
+ return {
42575
+ size: 'xxxsmall'
42576
+ };
42577
+ case 12:
42578
+ return {
42579
+ size: 'xxxsmall',
42580
+ styleFontSize: 14
42581
+ };
42582
+ case 14:
42583
+ return {
42584
+ size: 'xxxsmall',
42585
+ styleFontSize: 14
42586
+ };
42587
+ case 16:
42588
+ return {
42589
+ size: 'xsmall'
42590
+ };
42591
+ case 18:
42592
+ return {
42593
+ size: 'small'
42594
+ };
42595
+ }
42596
+ };
42597
+
42598
+ var StyledContainer$1 = index$c(reactNative.View)(function (_ref) {
42599
+ var theme = _ref.theme;
42600
+ return {
42601
+ flexDirection: 'row',
42602
+ alignItems: 'flex-start',
42603
+ gap: theme.__hd__.inlineLoader.space.gap
42604
+ };
42605
+ });
42606
+ var StyledIconContainer = index$c(reactNative.View)(function (_ref2) {
42607
+ var themeSize = _ref2.themeSize,
42608
+ theme = _ref2.theme;
42609
+ return {
42610
+ height: theme.__hd__.inlineLoader.icon.lineHeights[themeSize],
42611
+ justifyContent: 'center'
42612
+ };
42613
+ });
42614
+
42615
+ var InlineLoader = function InlineLoader(_ref) {
42616
+ var text = _ref.text,
42617
+ _ref$state = _ref.state,
42618
+ state = _ref$state === void 0 ? 'idle' : _ref$state,
42619
+ _ref$intent = _ref.intent,
42620
+ intent = _ref$intent === void 0 ? 'neutral' : _ref$intent,
42621
+ _ref$size = _ref.size,
42622
+ size = _ref$size === void 0 ? 14 : _ref$size,
42623
+ style = _ref.style,
42624
+ testID = _ref.testID;
42625
+ var theme = useTheme();
42626
+ var textSizeName = getTextSizeName(size);
42627
+ var lineHeight = theme.__hd__.inlineLoader.icon.lineHeights[textSizeName];
42628
+ var iconName = getIconName(state);
42629
+ var iconIntent = getIconIntent(state, intent);
42630
+ var _getIconSize = getIconSize(size),
42631
+ iconSize = _getIconSize.size,
42632
+ styleFontSize = _getIconSize.styleFontSize;
42633
+ var iconStyle = styleFontSize ? {
42634
+ fontSize: styleFontSize
42635
+ } : undefined;
42636
+ var isAiLoading = state === 'loading' && intent === 'ai';
42637
+ return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$1, {
42638
+ testID: testID,
42639
+ style: style
42640
+ }, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, {
42641
+ themeSize: textSizeName
42642
+ }, /*#__PURE__*/React__namespace.default.createElement(Icon, {
42643
+ icon: iconName,
42644
+ intent: iconIntent,
42645
+ size: iconSize,
42646
+ spin: state === 'loading',
42647
+ style: iconStyle,
42648
+ accessible: false,
42649
+ accessibilityElementsHidden: true,
42650
+ importantForAccessibility: "no-hide-descendants"
42651
+ })), isAiLoading ? /*#__PURE__*/React__namespace.default.createElement(AnimatedGradientText, {
42652
+ fontSize: size,
42653
+ lineHeight: lineHeight
42654
+ }, text) : /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
42655
+ intent: "body",
42656
+ style: {
42657
+ fontSize: size,
42658
+ lineHeight: lineHeight
42659
+ }
42660
+ }, text));
42661
+ };
42662
+
42412
42663
  var getZIndexByState = function getZIndexByState(_ref) {
42413
42664
  var themeFocused = _ref.themeFocused,
42414
42665
  themeHasError = _ref.themeHasError;
@@ -55721,6 +55972,7 @@ exports.Icon = Icon;
55721
55972
  exports.Illustration = Illustration;
55722
55973
  exports.IllustrationList = IllustrationList;
55723
55974
  exports.Image = Image;
55975
+ exports.InlineLoader = InlineLoader;
55724
55976
  exports.List = List$1;
55725
55977
  exports.LocaleProvider = LocaleProvider;
55726
55978
  exports.MapPin = index$7;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn-work-uikit",
3
- "version": "1.12.5",
3
+ "version": "1.13.1",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "@emotion/native": "^11.9.3",
25
25
  "@emotion/react": "^11.9.3",
26
- "@hero-design/rn": "8.121.0",
26
+ "@hero-design/rn": "8.123.0",
27
27
  "hero-editor": "^1.17.0"
28
28
  },
29
29
  "peerDependencies": {