@hero-design/rn 8.16.1 → 8.18.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/.turbo/turbo-build.log +9 -9
- package/es/index.js +204 -66
- package/lib/index.js +205 -65
- package/package.json +7 -5
- package/rollup.config.js +1 -0
- package/src/components/Error/index.tsx +6 -2
- package/src/components/Skeleton/StyledSkeleton.tsx +25 -0
- package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +498 -0
- package/src/components/Skeleton/__tests__/index.spec.tsx +30 -0
- package/src/components/Skeleton/index.tsx +134 -0
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +15 -0
- package/src/theme/components/skeleton.ts +22 -0
- package/src/theme/getTheme.ts +3 -0
- package/types/components/Skeleton/StyledSkeleton.d.ts +17 -0
- package/types/components/Skeleton/index.d.ts +13 -0
- package/types/index.d.ts +2 -1
- package/types/theme/components/skeleton.d.ts +17 -0
- package/types/theme/getTheme.d.ts +2 -0
package/es/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
|
6
6
|
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
7
7
|
import RnSlider from '@react-native-community/slider';
|
|
8
8
|
import { RectButton, GestureHandlerRootView, Swipeable as Swipeable$1 } from 'react-native-gesture-handler';
|
|
9
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
9
10
|
import PagerView from 'react-native-pager-view';
|
|
10
11
|
import { EventEmitter } from 'events';
|
|
11
12
|
import { WebView } from 'react-native-webview';
|
|
@@ -984,6 +985,8 @@ var blue$1 = colorScales.blue,
|
|
|
984
985
|
dodgerBlueDark15: ultramarineBlue$3.darken15,
|
|
985
986
|
dodgerBlueDark30: ultramarineBlue$3.darken30,
|
|
986
987
|
dodgerBlueLight30: ultramarineBlue$3.lighten30,
|
|
988
|
+
dodgerBlueLight45: ultramarineBlue$3.lighten45,
|
|
989
|
+
dodgerBlueLight60: ultramarineBlue$3.lighten60,
|
|
987
990
|
dodgerBlueLight75: ultramarineBlue$3.lighten75,
|
|
988
991
|
dodgerBlueLight90: ultramarineBlue$3.lighten90,
|
|
989
992
|
green: green$1.base,
|
|
@@ -2577,6 +2580,26 @@ var getSelectTheme = function getSelectTheme(theme) {
|
|
|
2577
2580
|
};
|
|
2578
2581
|
};
|
|
2579
2582
|
|
|
2583
|
+
var getSkeletonTheme = function getSkeletonTheme(theme) {
|
|
2584
|
+
var colors = {
|
|
2585
|
+
lightBackground: theme.colors.neutralGlobalSurface,
|
|
2586
|
+
darkBackground: theme.colors.defaultGlobalSurface,
|
|
2587
|
+
lightGradientStart: theme.colors.neutralGlobalSurface,
|
|
2588
|
+
lightGradientEnd: theme.colors.archivedSurface,
|
|
2589
|
+
darkGradientStart: theme.colors.defaultGlobalSurface,
|
|
2590
|
+
darkGradientEnd: theme.colors.archivedSurface
|
|
2591
|
+
};
|
|
2592
|
+
var radii = {
|
|
2593
|
+
rectangular: 0,
|
|
2594
|
+
circular: theme.radii.rounded,
|
|
2595
|
+
rounded: theme.radii.xlarge
|
|
2596
|
+
};
|
|
2597
|
+
return {
|
|
2598
|
+
colors: colors,
|
|
2599
|
+
radii: radii
|
|
2600
|
+
};
|
|
2601
|
+
};
|
|
2602
|
+
|
|
2580
2603
|
var getSliderTheme = function getSliderTheme(theme) {
|
|
2581
2604
|
var colors = {
|
|
2582
2605
|
minimumTrackTint: theme.colors.primary,
|
|
@@ -2999,6 +3022,7 @@ var getTheme$1 = function getTheme() {
|
|
|
2999
3022
|
richTextEditor: getRichTextEditorTheme(globalTheme),
|
|
3000
3023
|
sectionHeading: getSectionHeadingTheme(globalTheme),
|
|
3001
3024
|
select: getSelectTheme(globalTheme),
|
|
3025
|
+
skeleton: getSkeletonTheme(globalTheme),
|
|
3002
3026
|
slider: getSliderTheme(globalTheme),
|
|
3003
3027
|
spinner: getSpinnerTheme(globalTheme),
|
|
3004
3028
|
swipeable: getSwipeableTheme(globalTheme),
|
|
@@ -6021,7 +6045,7 @@ var StyledText$3 = index$a(Text$1)(function (_ref) {
|
|
|
6021
6045
|
});
|
|
6022
6046
|
});
|
|
6023
6047
|
|
|
6024
|
-
var _excluded$
|
|
6048
|
+
var _excluded$r = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
|
|
6025
6049
|
var Text = function Text(_ref) {
|
|
6026
6050
|
var children = _ref.children,
|
|
6027
6051
|
_ref$fontSize = _ref.fontSize,
|
|
@@ -6034,7 +6058,7 @@ var Text = function Text(_ref) {
|
|
|
6034
6058
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
6035
6059
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6036
6060
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6037
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
6061
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
6038
6062
|
return /*#__PURE__*/React.createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
6039
6063
|
themeFontSize: fontSize,
|
|
6040
6064
|
themeFontWeight: fontWeight,
|
|
@@ -6555,10 +6579,10 @@ var StyledHeroIcon = index$a(HeroIcon)(function (_ref) {
|
|
|
6555
6579
|
};
|
|
6556
6580
|
});
|
|
6557
6581
|
|
|
6558
|
-
var _excluded$
|
|
6582
|
+
var _excluded$q = ["style"];
|
|
6559
6583
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
6560
6584
|
var style = _ref.style,
|
|
6561
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
6585
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$q);
|
|
6562
6586
|
var rotateAnimation = useRef(new Animated.Value(0));
|
|
6563
6587
|
useEffect(function () {
|
|
6564
6588
|
var animation = Animated.loop(Animated.timing(rotateAnimation.current, {
|
|
@@ -6664,7 +6688,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
6664
6688
|
}, content));
|
|
6665
6689
|
};
|
|
6666
6690
|
|
|
6667
|
-
var _excluded$
|
|
6691
|
+
var _excluded$p = ["key"];
|
|
6668
6692
|
var Accordion = function Accordion(_ref) {
|
|
6669
6693
|
var items = _ref.items,
|
|
6670
6694
|
activeItemKey = _ref.activeItemKey,
|
|
@@ -6685,7 +6709,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
6685
6709
|
testID: testID
|
|
6686
6710
|
}, items.map(function (_ref2, index) {
|
|
6687
6711
|
var key = _ref2.key,
|
|
6688
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
6712
|
+
props = _objectWithoutProperties(_ref2, _excluded$p);
|
|
6689
6713
|
var open = _activeItemKey === key;
|
|
6690
6714
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
6691
6715
|
key: key
|
|
@@ -6800,7 +6824,7 @@ var Alert = function Alert(_ref2) {
|
|
|
6800
6824
|
})) : null);
|
|
6801
6825
|
};
|
|
6802
6826
|
|
|
6803
|
-
var StyledContainer$
|
|
6827
|
+
var StyledContainer$6 = index$a(View)({
|
|
6804
6828
|
alignItems: 'center',
|
|
6805
6829
|
flexDirection: 'row'
|
|
6806
6830
|
});
|
|
@@ -6842,7 +6866,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
6842
6866
|
backgroundHighlighted = _ref$backgroundHighli === void 0 ? false : _ref$backgroundHighli,
|
|
6843
6867
|
style = _ref.style,
|
|
6844
6868
|
testID = _ref.testID;
|
|
6845
|
-
return /*#__PURE__*/React.createElement(StyledContainer$
|
|
6869
|
+
return /*#__PURE__*/React.createElement(StyledContainer$6, {
|
|
6846
6870
|
testID: testID,
|
|
6847
6871
|
style: style
|
|
6848
6872
|
}, /*#__PURE__*/React.createElement(StyledContentContainer$1, {
|
|
@@ -7082,7 +7106,7 @@ var StyledStatus = index$a(Animated.View)(function (_ref3) {
|
|
|
7082
7106
|
};
|
|
7083
7107
|
});
|
|
7084
7108
|
|
|
7085
|
-
var _excluded$
|
|
7109
|
+
var _excluded$o = ["children", "visible", "intent", "style", "testID"];
|
|
7086
7110
|
var Status = function Status(_ref) {
|
|
7087
7111
|
var children = _ref.children,
|
|
7088
7112
|
_ref$visible = _ref.visible,
|
|
@@ -7091,7 +7115,7 @@ var Status = function Status(_ref) {
|
|
|
7091
7115
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7092
7116
|
style = _ref.style,
|
|
7093
7117
|
testID = _ref.testID,
|
|
7094
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7118
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$o);
|
|
7095
7119
|
var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
7096
7120
|
opacity = _React$useRef.current;
|
|
7097
7121
|
var isFirstRendering = React.useRef(true);
|
|
@@ -7124,7 +7148,7 @@ var Status = function Status(_ref) {
|
|
|
7124
7148
|
}));
|
|
7125
7149
|
};
|
|
7126
7150
|
|
|
7127
|
-
var _excluded$
|
|
7151
|
+
var _excluded$n = ["content", "visible", "max", "intent", "style", "testID"];
|
|
7128
7152
|
var DEFAULT_MAX_NUMBER = 99;
|
|
7129
7153
|
var getPaddingState = function getPaddingState(content) {
|
|
7130
7154
|
return content.length > 1 ? 'wideContent' : 'narrowContent';
|
|
@@ -7139,7 +7163,7 @@ var Badge = function Badge(_ref) {
|
|
|
7139
7163
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7140
7164
|
style = _ref.style,
|
|
7141
7165
|
testID = _ref.testID,
|
|
7142
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7166
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$n);
|
|
7143
7167
|
var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
7144
7168
|
opacity = _React$useRef.current;
|
|
7145
7169
|
var isFirstRendering = React.useRef(true);
|
|
@@ -7243,7 +7267,7 @@ function omit(keys, obj) {
|
|
|
7243
7267
|
return result;
|
|
7244
7268
|
}
|
|
7245
7269
|
|
|
7246
|
-
var _excluded$
|
|
7270
|
+
var _excluded$m = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
|
|
7247
7271
|
var getInactiveIcon = function getInactiveIcon(icon) {
|
|
7248
7272
|
var inactiveIcon = "".concat(icon, "-outlined");
|
|
7249
7273
|
return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
|
|
@@ -7254,7 +7278,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
7254
7278
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
7255
7279
|
selectedTabKey = _ref.selectedTabKey,
|
|
7256
7280
|
tabs = _ref.tabs,
|
|
7257
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7281
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$m);
|
|
7258
7282
|
var insets = useSafeAreaInsets();
|
|
7259
7283
|
/**
|
|
7260
7284
|
* List of loaded tabs, tabs will be loaded when navigated to.
|
|
@@ -7341,13 +7365,13 @@ var StyledDivider = index$a(View)(function (_ref) {
|
|
|
7341
7365
|
}, horizontalMargin), verticalMargin);
|
|
7342
7366
|
});
|
|
7343
7367
|
|
|
7344
|
-
var _excluded$
|
|
7368
|
+
var _excluded$l = ["marginHorizontal", "marginVertical", "style", "testID"];
|
|
7345
7369
|
var Divider = function Divider(_ref) {
|
|
7346
7370
|
var marginHorizontal = _ref.marginHorizontal,
|
|
7347
7371
|
marginVertical = _ref.marginVertical,
|
|
7348
7372
|
style = _ref.style,
|
|
7349
7373
|
testID = _ref.testID,
|
|
7350
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7374
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$l);
|
|
7351
7375
|
return /*#__PURE__*/React.createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
7352
7376
|
themeMarginHorizontal: marginHorizontal,
|
|
7353
7377
|
themeMarginVertical: marginVertical,
|
|
@@ -7477,7 +7501,7 @@ var StyledLoadingDot = index$a(View)(function (_ref2) {
|
|
|
7477
7501
|
}, themeStyling());
|
|
7478
7502
|
});
|
|
7479
7503
|
|
|
7480
|
-
var _excluded$
|
|
7504
|
+
var _excluded$k = ["count", "size", "testID", "themeVariant"];
|
|
7481
7505
|
var AnimatedLoadingIndicatorWrapper = Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
|
|
7482
7506
|
var AnimatedLoadingDot = Animated.createAnimatedComponent(StyledLoadingDot);
|
|
7483
7507
|
var renderDotComponent = function renderDotComponent(_ref) {
|
|
@@ -7509,7 +7533,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
7509
7533
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
7510
7534
|
testID = _ref2.testID,
|
|
7511
7535
|
themeVariant = _ref2.themeVariant,
|
|
7512
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
7536
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$k);
|
|
7513
7537
|
var progressAnimation = useRef(new Animated.Value(0));
|
|
7514
7538
|
useEffect(function () {
|
|
7515
7539
|
var animation = Animated.loop(Animated.timing(progressAnimation.current, {
|
|
@@ -7939,11 +7963,11 @@ var Header = function Header(_ref) {
|
|
|
7939
7963
|
})) : null), showDivider ? /*#__PURE__*/React.createElement(Divider, null) : null);
|
|
7940
7964
|
};
|
|
7941
7965
|
|
|
7942
|
-
var _excluded$
|
|
7966
|
+
var _excluded$j = ["scrollEventThrottle"];
|
|
7943
7967
|
var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
7944
7968
|
var _ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
7945
7969
|
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
|
|
7946
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7970
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
7947
7971
|
var _useContext = useContext(BottomSheetContext),
|
|
7948
7972
|
setInternalShowDivider = _useContext.setInternalShowDivider;
|
|
7949
7973
|
var onScrollBeginDrag = useCallback(function (e) {
|
|
@@ -8258,7 +8282,7 @@ var borderWidths = {
|
|
|
8258
8282
|
var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
|
|
8259
8283
|
var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
|
|
8260
8284
|
|
|
8261
|
-
var _excluded$
|
|
8285
|
+
var _excluded$i = ["theme"];
|
|
8262
8286
|
var getThemeValue = function getThemeValue(theme, key, props) {
|
|
8263
8287
|
var propConfig = config[key];
|
|
8264
8288
|
var propValue = props[key];
|
|
@@ -8285,18 +8309,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
|
|
|
8285
8309
|
var configKeys = Object.keys(config);
|
|
8286
8310
|
var StyledBox = index$a(View)(function (_ref5) {
|
|
8287
8311
|
var theme = _ref5.theme,
|
|
8288
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
8312
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$i);
|
|
8289
8313
|
var styleProps = pick(configKeys, otherProps);
|
|
8290
8314
|
var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
|
|
8291
8315
|
return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
|
|
8292
8316
|
});
|
|
8293
8317
|
|
|
8294
|
-
var _excluded$
|
|
8318
|
+
var _excluded$h = ["children", "style", "testID"];
|
|
8295
8319
|
var Box = function Box(_ref) {
|
|
8296
8320
|
var children = _ref.children,
|
|
8297
8321
|
style = _ref.style,
|
|
8298
8322
|
testID = _ref.testID,
|
|
8299
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
8323
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$h);
|
|
8300
8324
|
return /*#__PURE__*/React.createElement(StyledBox, _extends$1({}, otherProps, {
|
|
8301
8325
|
style: style,
|
|
8302
8326
|
testID: testID
|
|
@@ -10622,7 +10646,7 @@ function ContentNavigator(_ref) {
|
|
|
10622
10646
|
}));
|
|
10623
10647
|
}
|
|
10624
10648
|
|
|
10625
|
-
var StyledContainer$
|
|
10649
|
+
var StyledContainer$5 = index$a(View)(function (_ref) {
|
|
10626
10650
|
var theme = _ref.theme;
|
|
10627
10651
|
return {
|
|
10628
10652
|
backgroundColor: theme.__hd__.calendar.colors.background
|
|
@@ -10805,7 +10829,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
10805
10829
|
var disableNextButton = maxDate === undefined ? false : !daysOfNextMonth.some(function (date) {
|
|
10806
10830
|
return date !== undefined;
|
|
10807
10831
|
}) || maxDate <= lastDateOfMonth;
|
|
10808
|
-
return /*#__PURE__*/React.createElement(StyledContainer$
|
|
10832
|
+
return /*#__PURE__*/React.createElement(StyledContainer$5, null, /*#__PURE__*/React.createElement(StyledCalendarHeader, null, /*#__PURE__*/React.createElement(ContentNavigator, {
|
|
10809
10833
|
value: formatTime('MMMM yyyy', visibleDate),
|
|
10810
10834
|
onPreviousPress: onPreviousPress,
|
|
10811
10835
|
onNextPress: onNextPress,
|
|
@@ -10861,7 +10885,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
10861
10885
|
})));
|
|
10862
10886
|
};
|
|
10863
10887
|
|
|
10864
|
-
var _excluded$
|
|
10888
|
+
var _excluded$g = ["rounded", "size", "testID", "style"];
|
|
10865
10889
|
var Image = function Image(_ref) {
|
|
10866
10890
|
var _ref$rounded = _ref.rounded,
|
|
10867
10891
|
rounded = _ref$rounded === void 0 ? false : _ref$rounded,
|
|
@@ -10869,7 +10893,7 @@ var Image = function Image(_ref) {
|
|
|
10869
10893
|
size = _ref$size === void 0 ? '6xlarge' : _ref$size,
|
|
10870
10894
|
testID = _ref.testID,
|
|
10871
10895
|
style = _ref.style,
|
|
10872
|
-
imageNativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
10896
|
+
imageNativeProps = _objectWithoutProperties(_ref, _excluded$g);
|
|
10873
10897
|
var theme = useTheme();
|
|
10874
10898
|
var imageSize = theme.__hd__.image.sizes[size];
|
|
10875
10899
|
return /*#__PURE__*/React.createElement(Image$1, _extends$1({
|
|
@@ -11062,12 +11086,12 @@ var Indicator = index$a(View)(function (_ref2) {
|
|
|
11062
11086
|
};
|
|
11063
11087
|
});
|
|
11064
11088
|
|
|
11065
|
-
var _excluded$
|
|
11089
|
+
var _excluded$f = ["intent", "children"];
|
|
11066
11090
|
var DataCard = function DataCard(_ref) {
|
|
11067
11091
|
var _ref$intent = _ref.intent,
|
|
11068
11092
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
11069
11093
|
children = _ref.children,
|
|
11070
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11094
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$f);
|
|
11071
11095
|
return /*#__PURE__*/React.createElement(StyledDataCard, nativeProps, /*#__PURE__*/React.createElement(Indicator, {
|
|
11072
11096
|
themeIntent: intent,
|
|
11073
11097
|
testID: "data-card-indicator"
|
|
@@ -11085,11 +11109,11 @@ var StyledCard$1 = index$a(View)(function (_ref) {
|
|
|
11085
11109
|
});
|
|
11086
11110
|
});
|
|
11087
11111
|
|
|
11088
|
-
var _excluded$
|
|
11112
|
+
var _excluded$e = ["intent", "children"];
|
|
11089
11113
|
var Card = function Card(_ref) {
|
|
11090
11114
|
var intent = _ref.intent,
|
|
11091
11115
|
children = _ref.children,
|
|
11092
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11116
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$e);
|
|
11093
11117
|
return /*#__PURE__*/React.createElement(StyledCard$1, _extends$1({}, nativeProps, {
|
|
11094
11118
|
themeIntent: intent
|
|
11095
11119
|
}), children);
|
|
@@ -11277,7 +11301,7 @@ var CardCarousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
11277
11301
|
}));
|
|
11278
11302
|
});
|
|
11279
11303
|
|
|
11280
|
-
var _excluded$
|
|
11304
|
+
var _excluded$d = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination"];
|
|
11281
11305
|
function useStateFromProp(initialValue) {
|
|
11282
11306
|
var _useState = useState(initialValue),
|
|
11283
11307
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11299,7 +11323,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
11299
11323
|
shouldShowPagination = _ref$shouldShowPagina === void 0 ? function () {
|
|
11300
11324
|
return true;
|
|
11301
11325
|
} : _ref$shouldShowPagina,
|
|
11302
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11326
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$d);
|
|
11303
11327
|
var carouselRef = useRef(null);
|
|
11304
11328
|
var _useStateFromProp = useStateFromProp(selectedItemIndex),
|
|
11305
11329
|
_useStateFromProp2 = _slicedToArray(_useStateFromProp, 2),
|
|
@@ -11459,7 +11483,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
11459
11483
|
})));
|
|
11460
11484
|
};
|
|
11461
11485
|
|
|
11462
|
-
var StyledContainer$
|
|
11486
|
+
var StyledContainer$4 = index$a(View)(function (_ref) {
|
|
11463
11487
|
var theme = _ref.theme;
|
|
11464
11488
|
return {
|
|
11465
11489
|
width: '100%',
|
|
@@ -11611,7 +11635,7 @@ var StyledErrorAndMaxLengthContainer = index$a(View)(function () {
|
|
|
11611
11635
|
};
|
|
11612
11636
|
});
|
|
11613
11637
|
|
|
11614
|
-
var _excluded$
|
|
11638
|
+
var _excluded$c = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
|
|
11615
11639
|
var getVariant$1 = function getVariant(_ref) {
|
|
11616
11640
|
var disabled = _ref.disabled,
|
|
11617
11641
|
error = _ref.error,
|
|
@@ -11659,7 +11683,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
11659
11683
|
renderInputValue = _ref2.renderInputValue,
|
|
11660
11684
|
_ref2$allowFontScalin = _ref2.allowFontScaling,
|
|
11661
11685
|
allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
|
|
11662
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
11686
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$c);
|
|
11663
11687
|
var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
|
|
11664
11688
|
var isEmptyValue = displayText.length === 0;
|
|
11665
11689
|
var actualSuffix = loading ? 'loading' : suffix;
|
|
@@ -11770,7 +11794,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
11770
11794
|
defaultValue: defaultValue,
|
|
11771
11795
|
placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
|
|
11772
11796
|
});
|
|
11773
|
-
return /*#__PURE__*/React.createElement(StyledContainer$
|
|
11797
|
+
return /*#__PURE__*/React.createElement(StyledContainer$4, {
|
|
11774
11798
|
style: styleWithoutBackgroundColor,
|
|
11775
11799
|
pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
|
|
11776
11800
|
testID: testID
|
|
@@ -11988,7 +12012,7 @@ var DatePicker = function DatePicker(props) {
|
|
|
11988
12012
|
};
|
|
11989
12013
|
|
|
11990
12014
|
var AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
11991
|
-
var StyledContainer$
|
|
12015
|
+
var StyledContainer$3 = index$a(View)(function (_ref) {
|
|
11992
12016
|
var theme = _ref.theme,
|
|
11993
12017
|
enableShadow = _ref.enableShadow;
|
|
11994
12018
|
return _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
@@ -12247,7 +12271,7 @@ var Drawer = function Drawer(_ref) {
|
|
|
12247
12271
|
return animation.stop();
|
|
12248
12272
|
};
|
|
12249
12273
|
}, [visible]);
|
|
12250
|
-
return /*#__PURE__*/React.createElement(StyledContainer$
|
|
12274
|
+
return /*#__PURE__*/React.createElement(StyledContainer$3, {
|
|
12251
12275
|
testID: testID,
|
|
12252
12276
|
enableShadow: enableShadow,
|
|
12253
12277
|
pointerEvents: "box-none"
|
|
@@ -12416,7 +12440,7 @@ var StyledErrorDescription = index$a(Typography.Text)(function (_ref9) {
|
|
|
12416
12440
|
};
|
|
12417
12441
|
});
|
|
12418
12442
|
|
|
12419
|
-
var _excluded$
|
|
12443
|
+
var _excluded$b = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
|
|
12420
12444
|
_excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
12421
12445
|
var renderImage = function renderImage(image) {
|
|
12422
12446
|
if ( /*#__PURE__*/isValidElement(image)) {
|
|
@@ -12442,14 +12466,14 @@ var ErrorPage = function ErrorPage(_ref) {
|
|
|
12442
12466
|
onCtaPress = _ref.onCtaPress,
|
|
12443
12467
|
secondaryCtaText = _ref.secondaryCtaText,
|
|
12444
12468
|
onSecondaryCtaPress = _ref.onSecondaryCtaPress,
|
|
12445
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
12469
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$b);
|
|
12446
12470
|
var showCta = ctaText && onCtaPress !== undefined;
|
|
12447
12471
|
var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
|
|
12448
12472
|
var showButtonContainer = showCta || showSecondaryCta;
|
|
12449
|
-
return /*#__PURE__*/React.createElement(StyledErrorContainer$1, {
|
|
12473
|
+
return /*#__PURE__*/React.createElement(StyledErrorContainer$1, _extends$1({
|
|
12450
12474
|
testID: testID,
|
|
12451
12475
|
themeVariant: variant
|
|
12452
|
-
}, /*#__PURE__*/React.createElement(StyledErrorContent,
|
|
12476
|
+
}, nativeProps), /*#__PURE__*/React.createElement(StyledErrorContent, null, image && /*#__PURE__*/React.createElement(StyledErrorImageContainer, null, renderImage(image)), /*#__PURE__*/React.createElement(StyledErrorTitle, null, title), description && /*#__PURE__*/React.createElement(StyledErrorDescription, null, description)), showButtonContainer && /*#__PURE__*/React.createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React.createElement(StyledErrorButtonPrimary, {
|
|
12453
12477
|
variant: "filled",
|
|
12454
12478
|
text: ctaText,
|
|
12455
12479
|
onPress: onCtaPress
|
|
@@ -12586,11 +12610,11 @@ var StyledFABText = index$a(Typography.Text)(function (_ref3) {
|
|
|
12586
12610
|
};
|
|
12587
12611
|
});
|
|
12588
12612
|
|
|
12589
|
-
var _excluded$
|
|
12613
|
+
var _excluded$a = ["active"];
|
|
12590
12614
|
var AnimatedIcons = Animated.createAnimatedComponent(StyledFABIcon);
|
|
12591
12615
|
var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
|
|
12592
12616
|
var active = _ref.active,
|
|
12593
|
-
iconProps = _objectWithoutProperties(_ref, _excluded$
|
|
12617
|
+
iconProps = _objectWithoutProperties(_ref, _excluded$a);
|
|
12594
12618
|
var rotateAnimation = useRef(new Animated.Value(active ? 1 : 0));
|
|
12595
12619
|
useEffect(function () {
|
|
12596
12620
|
var animation = Animated.timing(rotateAnimation.current, {
|
|
@@ -12716,7 +12740,7 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
12716
12740
|
}), /*#__PURE__*/React.createElement(StyledActionItemText, null, title)));
|
|
12717
12741
|
};
|
|
12718
12742
|
|
|
12719
|
-
var StyledContainer$
|
|
12743
|
+
var StyledContainer$2 = index$a(View)({
|
|
12720
12744
|
position: 'absolute',
|
|
12721
12745
|
left: 0,
|
|
12722
12746
|
right: 0,
|
|
@@ -12803,7 +12827,7 @@ var ActionGroup = function ActionGroup(_ref2) {
|
|
|
12803
12827
|
inputRange: [0, 1],
|
|
12804
12828
|
outputRange: [0, 1]
|
|
12805
12829
|
});
|
|
12806
|
-
return /*#__PURE__*/React.createElement(StyledContainer$
|
|
12830
|
+
return /*#__PURE__*/React.createElement(StyledContainer$2, {
|
|
12807
12831
|
testID: testID,
|
|
12808
12832
|
pointerEvents: "box-none",
|
|
12809
12833
|
style: style
|
|
@@ -13263,7 +13287,7 @@ var THEME_INTENT_MAP = {
|
|
|
13263
13287
|
'archived-inverted': 'archivedInverted'
|
|
13264
13288
|
};
|
|
13265
13289
|
|
|
13266
|
-
var StyledContainer = index$a(View)(function (_ref) {
|
|
13290
|
+
var StyledContainer$1 = index$a(View)(function (_ref) {
|
|
13267
13291
|
var theme = _ref.theme;
|
|
13268
13292
|
return {
|
|
13269
13293
|
flexDirection: 'row',
|
|
@@ -13329,7 +13353,7 @@ var StyledStrokeEnd = index$a(View)(function (_ref6) {
|
|
|
13329
13353
|
};
|
|
13330
13354
|
});
|
|
13331
13355
|
|
|
13332
|
-
var _excluded$
|
|
13356
|
+
var _excluded$9 = ["value", "renderValue", "intent", "style", "testID"];
|
|
13333
13357
|
var HalfCircle = function HalfCircle(_ref) {
|
|
13334
13358
|
var type = _ref.type,
|
|
13335
13359
|
themeIntent = _ref.themeIntent;
|
|
@@ -13350,7 +13374,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
13350
13374
|
intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
|
|
13351
13375
|
style = _ref2.style,
|
|
13352
13376
|
testID = _ref2.testID,
|
|
13353
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
13377
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$9);
|
|
13354
13378
|
var theme = useTheme$1();
|
|
13355
13379
|
var radius = theme.__hd__.progress.sizes.circleDiameter / 2;
|
|
13356
13380
|
var progressAnimatedValue = useRef(new Animated.Value(0));
|
|
@@ -13390,7 +13414,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
13390
13414
|
return /*#__PURE__*/React.createElement(View, _extends$1({}, nativeProps, {
|
|
13391
13415
|
testID: testID,
|
|
13392
13416
|
style: style
|
|
13393
|
-
}), /*#__PURE__*/React.createElement(StyledContainer, null, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(HalfCircle, {
|
|
13417
|
+
}), /*#__PURE__*/React.createElement(StyledContainer$1, null, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(HalfCircle, {
|
|
13394
13418
|
type: "foreground",
|
|
13395
13419
|
themeIntent: intent
|
|
13396
13420
|
}), /*#__PURE__*/React.createElement(Animated.View, {
|
|
@@ -13467,14 +13491,14 @@ var StyledInner = index$a(Animated.View)(function (_ref2) {
|
|
|
13467
13491
|
};
|
|
13468
13492
|
});
|
|
13469
13493
|
|
|
13470
|
-
var _excluded$
|
|
13494
|
+
var _excluded$8 = ["value", "intent", "style", "testID"];
|
|
13471
13495
|
var ProgressBar = function ProgressBar(_ref) {
|
|
13472
13496
|
var value = _ref.value,
|
|
13473
13497
|
_ref$intent = _ref.intent,
|
|
13474
13498
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
13475
13499
|
style = _ref.style,
|
|
13476
13500
|
testID = _ref.testID,
|
|
13477
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
13501
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$8);
|
|
13478
13502
|
var _useState = useState(0),
|
|
13479
13503
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13480
13504
|
width = _useState2[0],
|
|
@@ -13665,14 +13689,14 @@ var AnimatedSpinner = function AnimatedSpinner(_ref) {
|
|
|
13665
13689
|
}, dotProps))));
|
|
13666
13690
|
};
|
|
13667
13691
|
|
|
13668
|
-
var _excluded$
|
|
13692
|
+
var _excluded$7 = ["testID", "size", "intent"];
|
|
13669
13693
|
var Spinner = function Spinner(_ref) {
|
|
13670
13694
|
var testID = _ref.testID,
|
|
13671
13695
|
_ref$size = _ref.size,
|
|
13672
13696
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
13673
13697
|
_ref$intent = _ref.intent,
|
|
13674
13698
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
13675
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
13699
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
13676
13700
|
return /*#__PURE__*/React.createElement(StyledView$1, nativeProps, /*#__PURE__*/React.createElement(StyledSpinnerContainer, {
|
|
13677
13701
|
testID: testID
|
|
13678
13702
|
}, /*#__PURE__*/React.createElement(AnimatedSpinner, {
|
|
@@ -13705,7 +13729,7 @@ var SwipeableAction = function SwipeableAction(_ref) {
|
|
|
13705
13729
|
}, children);
|
|
13706
13730
|
};
|
|
13707
13731
|
|
|
13708
|
-
var _excluded$
|
|
13732
|
+
var _excluded$6 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
|
|
13709
13733
|
var renderActions = function renderActions(actions, width, progress, direction) {
|
|
13710
13734
|
var trans = progress.interpolate({
|
|
13711
13735
|
inputRange: [0, 1],
|
|
@@ -13730,7 +13754,7 @@ var Swipeable = function Swipeable(_ref) {
|
|
|
13730
13754
|
leftActionsWidth = _ref.leftActionsWidth,
|
|
13731
13755
|
rightActions = _ref.rightActions,
|
|
13732
13756
|
rightActionsWidth = _ref.rightActionsWidth,
|
|
13733
|
-
swipeableProps = _objectWithoutProperties(_ref, _excluded$
|
|
13757
|
+
swipeableProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
13734
13758
|
var _useWindowDimensions = useWindowDimensions(),
|
|
13735
13759
|
width = _useWindowDimensions.width;
|
|
13736
13760
|
var swipeableRef = useRef(null);
|
|
@@ -14035,7 +14059,7 @@ var StyledSectionList = index$a(SectionList)(function (_ref4) {
|
|
|
14035
14059
|
};
|
|
14036
14060
|
});
|
|
14037
14061
|
|
|
14038
|
-
var _excluded$
|
|
14062
|
+
var _excluded$5 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
|
|
14039
14063
|
var BaseOptionList = function BaseOptionList(_ref) {
|
|
14040
14064
|
var keyExtractor = _ref.keyExtractor,
|
|
14041
14065
|
loading = _ref.loading,
|
|
@@ -14044,7 +14068,7 @@ var BaseOptionList = function BaseOptionList(_ref) {
|
|
|
14044
14068
|
sections = _ref.sections,
|
|
14045
14069
|
renderItem = _ref.renderItem,
|
|
14046
14070
|
sectionListRef = _ref.sectionListRef,
|
|
14047
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14071
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
14048
14072
|
var theme = useTheme$1();
|
|
14049
14073
|
var _useState = useState(false),
|
|
14050
14074
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -14113,7 +14137,7 @@ var Option$2 = function Option(_ref) {
|
|
|
14113
14137
|
return highlighted === true ? /*#__PURE__*/React.createElement(List.Item, props) : /*#__PURE__*/React.createElement(List.BasicItem, props);
|
|
14114
14138
|
};
|
|
14115
14139
|
|
|
14116
|
-
var _excluded$
|
|
14140
|
+
var _excluded$4 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
14117
14141
|
var OptionList$1 = function OptionList(_ref) {
|
|
14118
14142
|
var keyExtractor = _ref.keyExtractor,
|
|
14119
14143
|
loading = _ref.loading,
|
|
@@ -14124,7 +14148,7 @@ var OptionList$1 = function OptionList(_ref) {
|
|
|
14124
14148
|
renderOption = _ref.renderOption,
|
|
14125
14149
|
value = _ref.value,
|
|
14126
14150
|
sectionListRef = _ref.sectionListRef,
|
|
14127
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14151
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
14128
14152
|
var renderItem = function renderItem(info) {
|
|
14129
14153
|
var item = info.item;
|
|
14130
14154
|
var selected = value.includes(info.item.value);
|
|
@@ -14312,7 +14336,7 @@ var StyledOptionList = index$a(BaseOptionList)(function (_ref) {
|
|
|
14312
14336
|
};
|
|
14313
14337
|
});
|
|
14314
14338
|
|
|
14315
|
-
var _excluded$
|
|
14339
|
+
var _excluded$3 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
14316
14340
|
var OptionList = function OptionList(_ref) {
|
|
14317
14341
|
var keyExtractor = _ref.keyExtractor,
|
|
14318
14342
|
loading = _ref.loading,
|
|
@@ -14323,7 +14347,7 @@ var OptionList = function OptionList(_ref) {
|
|
|
14323
14347
|
renderOption = _ref.renderOption,
|
|
14324
14348
|
value = _ref.value,
|
|
14325
14349
|
sectionListRef = _ref.sectionListRef,
|
|
14326
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14350
|
+
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
14327
14351
|
var renderItem = function renderItem(info) {
|
|
14328
14352
|
var item = info.item;
|
|
14329
14353
|
var selected = item.value === value;
|
|
@@ -14470,6 +14494,120 @@ var index$4 = Object.assign(SingleSelect, {
|
|
|
14470
14494
|
Multi: MultiSelect
|
|
14471
14495
|
});
|
|
14472
14496
|
|
|
14497
|
+
var StyledContainer = index$a(Box)(function (_ref) {
|
|
14498
|
+
var theme = _ref.theme,
|
|
14499
|
+
themeIntent = _ref.themeIntent,
|
|
14500
|
+
themeVariant = _ref.themeVariant;
|
|
14501
|
+
return {
|
|
14502
|
+
backgroundColor: themeIntent === 'light' ? theme.__hd__.skeleton.colors.lightBackground : theme.__hd__.skeleton.colors.darkBackground,
|
|
14503
|
+
borderRadius: theme.__hd__.skeleton.radii[themeVariant]
|
|
14504
|
+
};
|
|
14505
|
+
});
|
|
14506
|
+
var StyledGradientContainer = index$a(Box)(function (_ref2) {
|
|
14507
|
+
var theme = _ref2.theme,
|
|
14508
|
+
themeVariant = _ref2.themeVariant;
|
|
14509
|
+
return {
|
|
14510
|
+
overflow: 'hidden',
|
|
14511
|
+
borderRadius: theme.__hd__.skeleton.radii[themeVariant]
|
|
14512
|
+
};
|
|
14513
|
+
});
|
|
14514
|
+
|
|
14515
|
+
var _excluded$2 = ["intent", "variant", "style", "onLayout"];
|
|
14516
|
+
var AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);
|
|
14517
|
+
var gradientPositions = {
|
|
14518
|
+
start: {
|
|
14519
|
+
x: 0,
|
|
14520
|
+
y: 0
|
|
14521
|
+
},
|
|
14522
|
+
end: {
|
|
14523
|
+
x: 1,
|
|
14524
|
+
y: 0
|
|
14525
|
+
}
|
|
14526
|
+
};
|
|
14527
|
+
var getGradientColors = function getGradientColors(theme, intent) {
|
|
14528
|
+
switch (intent) {
|
|
14529
|
+
case 'light':
|
|
14530
|
+
{
|
|
14531
|
+
return [theme.__hd__.skeleton.colors.lightGradientStart, theme.__hd__.skeleton.colors.lightGradientEnd, theme.__hd__.skeleton.colors.lightGradientStart];
|
|
14532
|
+
}
|
|
14533
|
+
case 'dark':
|
|
14534
|
+
{
|
|
14535
|
+
return [theme.__hd__.skeleton.colors.darkGradientStart, theme.__hd__.skeleton.colors.darkGradientEnd, theme.__hd__.skeleton.colors.darkGradientStart];
|
|
14536
|
+
}
|
|
14537
|
+
}
|
|
14538
|
+
};
|
|
14539
|
+
var Skeleton = function Skeleton(_ref) {
|
|
14540
|
+
var _StyleSheet$flatten, _StyleSheet$flatten2;
|
|
14541
|
+
var _ref$intent = _ref.intent,
|
|
14542
|
+
intent = _ref$intent === void 0 ? 'light' : _ref$intent,
|
|
14543
|
+
_ref$variant = _ref.variant,
|
|
14544
|
+
variant = _ref$variant === void 0 ? 'rounded' : _ref$variant,
|
|
14545
|
+
style = _ref.style,
|
|
14546
|
+
onLayout = _ref.onLayout,
|
|
14547
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
14548
|
+
var theme = useTheme();
|
|
14549
|
+
var colors = useMemo(function () {
|
|
14550
|
+
return getGradientColors(theme, intent);
|
|
14551
|
+
}, [theme, intent]);
|
|
14552
|
+
var _useState = useState(Number((_StyleSheet$flatten = StyleSheet$1.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.width) || 0),
|
|
14553
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14554
|
+
containerWidth = _useState2[0],
|
|
14555
|
+
setContainerWidth = _useState2[1];
|
|
14556
|
+
var _useState3 = useState(Number((_StyleSheet$flatten2 = StyleSheet$1.flatten(style)) === null || _StyleSheet$flatten2 === void 0 ? void 0 : _StyleSheet$flatten2.height) || 0),
|
|
14557
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14558
|
+
containerHeight = _useState4[0],
|
|
14559
|
+
setContainerHeight = _useState4[1];
|
|
14560
|
+
var _useState5 = useState(false),
|
|
14561
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
14562
|
+
shouldStartAnimation = _useState6[0],
|
|
14563
|
+
setShouldStartAnimation = _useState6[1];
|
|
14564
|
+
var animatedValue = useRef(new Animated.Value(0)).current;
|
|
14565
|
+
useEffect(function () {
|
|
14566
|
+
if (shouldStartAnimation) {
|
|
14567
|
+
Animated.loop(Animated.timing(animatedValue, {
|
|
14568
|
+
toValue: 1,
|
|
14569
|
+
duration: 1000,
|
|
14570
|
+
easing: Easing.linear,
|
|
14571
|
+
useNativeDriver: Platform.OS === 'ios' || Platform.OS === 'android'
|
|
14572
|
+
})).start();
|
|
14573
|
+
}
|
|
14574
|
+
}, [shouldStartAnimation]);
|
|
14575
|
+
var translateX = animatedValue.interpolate({
|
|
14576
|
+
inputRange: [0, 1],
|
|
14577
|
+
outputRange: [-containerWidth, containerWidth]
|
|
14578
|
+
});
|
|
14579
|
+
var onContainerLayout = useCallback(function (e) {
|
|
14580
|
+
var _e$nativeEvent$layout = e.nativeEvent.layout,
|
|
14581
|
+
width = _e$nativeEvent$layout.width,
|
|
14582
|
+
height = _e$nativeEvent$layout.height;
|
|
14583
|
+
setContainerHeight(height);
|
|
14584
|
+
setContainerWidth(width);
|
|
14585
|
+
if (!shouldStartAnimation) {
|
|
14586
|
+
setShouldStartAnimation(true);
|
|
14587
|
+
}
|
|
14588
|
+
onLayout === null || onLayout === void 0 ? void 0 : onLayout(e);
|
|
14589
|
+
}, []);
|
|
14590
|
+
return /*#__PURE__*/React.createElement(StyledContainer, _extends$1({
|
|
14591
|
+
style: style,
|
|
14592
|
+
themeVariant: variant,
|
|
14593
|
+
themeIntent: intent,
|
|
14594
|
+
onLayout: onContainerLayout
|
|
14595
|
+
}, props), /*#__PURE__*/React.createElement(StyledGradientContainer, {
|
|
14596
|
+
themeVariant: variant
|
|
14597
|
+
}, /*#__PURE__*/React.createElement(AnimatedLinearGradient, {
|
|
14598
|
+
start: gradientPositions.start,
|
|
14599
|
+
end: gradientPositions.end,
|
|
14600
|
+
style: {
|
|
14601
|
+
width: containerWidth,
|
|
14602
|
+
height: containerHeight,
|
|
14603
|
+
transform: [{
|
|
14604
|
+
translateX: translateX
|
|
14605
|
+
}]
|
|
14606
|
+
},
|
|
14607
|
+
colors: colors
|
|
14608
|
+
})));
|
|
14609
|
+
};
|
|
14610
|
+
|
|
14473
14611
|
var StyledWrapper$1 = index$a(View)(function (_ref) {
|
|
14474
14612
|
var theme = _ref.theme;
|
|
14475
14613
|
return {
|
|
@@ -32053,7 +32191,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
32053
32191
|
break;
|
|
32054
32192
|
}
|
|
32055
32193
|
}, []);
|
|
32056
|
-
return /*#__PURE__*/React.createElement(StyledContainer$
|
|
32194
|
+
return /*#__PURE__*/React.createElement(StyledContainer$4, {
|
|
32057
32195
|
testID: testID
|
|
32058
32196
|
}, /*#__PURE__*/React.createElement(StyledTextInputContainer, null, /*#__PURE__*/React.createElement(StyledBorderBackDrop, {
|
|
32059
32197
|
themeVariant: variant,
|
|
@@ -32112,4 +32250,4 @@ var index = Object.assign(RichTextEditor$1, {
|
|
|
32112
32250
|
Toolbar: EditorToolbar
|
|
32113
32251
|
});
|
|
32114
32252
|
|
|
32115
|
-
export { Accordion, Alert, Attachment, index$9 as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, Card$1 as Card, index$8 as Carousel, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$7 as Drawer, Empty, Error$1 as Error, index$6 as FAB, Icon, Image, List, PageControl, PinInput, Progress, CompoundRadio as Radio, RefreshControl, index as RichTextEditor, SectionHeading, index$4 as Select, Slider, Spinner, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, getTheme$1 as getTheme, jobsSystemPalette, scale, swagDarkSystemPalette, swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };
|
|
32253
|
+
export { Accordion, Alert, Attachment, index$9 as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, Card$1 as Card, index$8 as Carousel, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$7 as Drawer, Empty, Error$1 as Error, index$6 as FAB, Icon, Image, List, PageControl, PinInput, Progress, CompoundRadio as Radio, RefreshControl, index as RichTextEditor, SectionHeading, index$4 as Select, Skeleton, Slider, Spinner, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, getTheme$1 as getTheme, jobsSystemPalette, scale, swagDarkSystemPalette, swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };
|