@hero-design/rn 8.16.0 → 8.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +9 -9
- package/es/index.js +229 -77
- package/lib/index.js +229 -75
- package/package.json +7 -5
- package/rollup.config.js +1 -0
- package/src/components/Error/StyledError.tsx +6 -0
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +183 -33
- package/src/components/Error/__tests__/index.spec.tsx +18 -0
- package/src/components/Error/index.tsx +44 -11
- 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/Error/StyledError.d.ts +7 -1
- package/types/components/Error/index.d.ts +4 -3
- 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
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as reactNative from 'react-native';
|
|
2
2
|
import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, Easing, TouchableOpacity, Text as Text$1, Image as Image$1, TouchableWithoutFeedback, Pressable, SafeAreaView, KeyboardAvoidingView, TouchableHighlight, ScrollView, Modal, FlatList, useWindowDimensions, TextInput as TextInput$1, PanResponder, InteractionManager, Keyboard, SectionList, LayoutAnimation, RefreshControl as RefreshControl$1 } from 'react-native';
|
|
3
|
-
import React, { useContext, createContext, createElement, useMemo, forwardRef, useEffect, useCallback, useRef, useState, useLayoutEffect, useImperativeHandle } from 'react';
|
|
3
|
+
import React, { useContext, createContext, createElement, useMemo, forwardRef, useEffect, useCallback, useRef, useState, isValidElement, useLayoutEffect, useImperativeHandle } from 'react';
|
|
4
4
|
import { createIconSet } from 'react-native-vector-icons';
|
|
5
5
|
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';
|
|
@@ -2577,6 +2578,26 @@ var getSelectTheme = function getSelectTheme(theme) {
|
|
|
2577
2578
|
};
|
|
2578
2579
|
};
|
|
2579
2580
|
|
|
2581
|
+
var getSkeletonTheme = function getSkeletonTheme(theme) {
|
|
2582
|
+
var colors = {
|
|
2583
|
+
lightBackground: theme.colors.neutralGlobalSurface,
|
|
2584
|
+
darkBackground: theme.colors.defaultGlobalSurface,
|
|
2585
|
+
lightGradientStart: theme.colors.neutralGlobalSurface,
|
|
2586
|
+
lightGradientEnd: theme.colors.archivedSurface,
|
|
2587
|
+
darkGradientStart: theme.colors.defaultGlobalSurface,
|
|
2588
|
+
darkGradientEnd: theme.colors.archivedSurface
|
|
2589
|
+
};
|
|
2590
|
+
var radii = {
|
|
2591
|
+
rectangular: 0,
|
|
2592
|
+
circular: theme.radii.rounded,
|
|
2593
|
+
rounded: theme.radii.xlarge
|
|
2594
|
+
};
|
|
2595
|
+
return {
|
|
2596
|
+
colors: colors,
|
|
2597
|
+
radii: radii
|
|
2598
|
+
};
|
|
2599
|
+
};
|
|
2600
|
+
|
|
2580
2601
|
var getSliderTheme = function getSliderTheme(theme) {
|
|
2581
2602
|
var colors = {
|
|
2582
2603
|
minimumTrackTint: theme.colors.primary,
|
|
@@ -2999,6 +3020,7 @@ var getTheme$1 = function getTheme() {
|
|
|
2999
3020
|
richTextEditor: getRichTextEditorTheme(globalTheme),
|
|
3000
3021
|
sectionHeading: getSectionHeadingTheme(globalTheme),
|
|
3001
3022
|
select: getSelectTheme(globalTheme),
|
|
3023
|
+
skeleton: getSkeletonTheme(globalTheme),
|
|
3002
3024
|
slider: getSliderTheme(globalTheme),
|
|
3003
3025
|
spinner: getSpinnerTheme(globalTheme),
|
|
3004
3026
|
swipeable: getSwipeableTheme(globalTheme),
|
|
@@ -6021,7 +6043,7 @@ var StyledText$3 = index$a(Text$1)(function (_ref) {
|
|
|
6021
6043
|
});
|
|
6022
6044
|
});
|
|
6023
6045
|
|
|
6024
|
-
var _excluded$
|
|
6046
|
+
var _excluded$r = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
|
|
6025
6047
|
var Text = function Text(_ref) {
|
|
6026
6048
|
var children = _ref.children,
|
|
6027
6049
|
_ref$fontSize = _ref.fontSize,
|
|
@@ -6034,7 +6056,7 @@ var Text = function Text(_ref) {
|
|
|
6034
6056
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
6035
6057
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6036
6058
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6037
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
6059
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
6038
6060
|
return /*#__PURE__*/React.createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
6039
6061
|
themeFontSize: fontSize,
|
|
6040
6062
|
themeFontWeight: fontWeight,
|
|
@@ -6555,10 +6577,10 @@ var StyledHeroIcon = index$a(HeroIcon)(function (_ref) {
|
|
|
6555
6577
|
};
|
|
6556
6578
|
});
|
|
6557
6579
|
|
|
6558
|
-
var _excluded$
|
|
6580
|
+
var _excluded$q = ["style"];
|
|
6559
6581
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
6560
6582
|
var style = _ref.style,
|
|
6561
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
6583
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$q);
|
|
6562
6584
|
var rotateAnimation = useRef(new Animated.Value(0));
|
|
6563
6585
|
useEffect(function () {
|
|
6564
6586
|
var animation = Animated.loop(Animated.timing(rotateAnimation.current, {
|
|
@@ -6664,7 +6686,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
6664
6686
|
}, content));
|
|
6665
6687
|
};
|
|
6666
6688
|
|
|
6667
|
-
var _excluded$
|
|
6689
|
+
var _excluded$p = ["key"];
|
|
6668
6690
|
var Accordion = function Accordion(_ref) {
|
|
6669
6691
|
var items = _ref.items,
|
|
6670
6692
|
activeItemKey = _ref.activeItemKey,
|
|
@@ -6685,7 +6707,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
6685
6707
|
testID: testID
|
|
6686
6708
|
}, items.map(function (_ref2, index) {
|
|
6687
6709
|
var key = _ref2.key,
|
|
6688
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
6710
|
+
props = _objectWithoutProperties(_ref2, _excluded$p);
|
|
6689
6711
|
var open = _activeItemKey === key;
|
|
6690
6712
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
6691
6713
|
key: key
|
|
@@ -6800,7 +6822,7 @@ var Alert = function Alert(_ref2) {
|
|
|
6800
6822
|
})) : null);
|
|
6801
6823
|
};
|
|
6802
6824
|
|
|
6803
|
-
var StyledContainer$
|
|
6825
|
+
var StyledContainer$6 = index$a(View)({
|
|
6804
6826
|
alignItems: 'center',
|
|
6805
6827
|
flexDirection: 'row'
|
|
6806
6828
|
});
|
|
@@ -6842,7 +6864,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
6842
6864
|
backgroundHighlighted = _ref$backgroundHighli === void 0 ? false : _ref$backgroundHighli,
|
|
6843
6865
|
style = _ref.style,
|
|
6844
6866
|
testID = _ref.testID;
|
|
6845
|
-
return /*#__PURE__*/React.createElement(StyledContainer$
|
|
6867
|
+
return /*#__PURE__*/React.createElement(StyledContainer$6, {
|
|
6846
6868
|
testID: testID,
|
|
6847
6869
|
style: style
|
|
6848
6870
|
}, /*#__PURE__*/React.createElement(StyledContentContainer$1, {
|
|
@@ -7082,7 +7104,7 @@ var StyledStatus = index$a(Animated.View)(function (_ref3) {
|
|
|
7082
7104
|
};
|
|
7083
7105
|
});
|
|
7084
7106
|
|
|
7085
|
-
var _excluded$
|
|
7107
|
+
var _excluded$o = ["children", "visible", "intent", "style", "testID"];
|
|
7086
7108
|
var Status = function Status(_ref) {
|
|
7087
7109
|
var children = _ref.children,
|
|
7088
7110
|
_ref$visible = _ref.visible,
|
|
@@ -7091,7 +7113,7 @@ var Status = function Status(_ref) {
|
|
|
7091
7113
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7092
7114
|
style = _ref.style,
|
|
7093
7115
|
testID = _ref.testID,
|
|
7094
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7116
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$o);
|
|
7095
7117
|
var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
7096
7118
|
opacity = _React$useRef.current;
|
|
7097
7119
|
var isFirstRendering = React.useRef(true);
|
|
@@ -7124,7 +7146,7 @@ var Status = function Status(_ref) {
|
|
|
7124
7146
|
}));
|
|
7125
7147
|
};
|
|
7126
7148
|
|
|
7127
|
-
var _excluded$
|
|
7149
|
+
var _excluded$n = ["content", "visible", "max", "intent", "style", "testID"];
|
|
7128
7150
|
var DEFAULT_MAX_NUMBER = 99;
|
|
7129
7151
|
var getPaddingState = function getPaddingState(content) {
|
|
7130
7152
|
return content.length > 1 ? 'wideContent' : 'narrowContent';
|
|
@@ -7139,7 +7161,7 @@ var Badge = function Badge(_ref) {
|
|
|
7139
7161
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7140
7162
|
style = _ref.style,
|
|
7141
7163
|
testID = _ref.testID,
|
|
7142
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7164
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$n);
|
|
7143
7165
|
var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
7144
7166
|
opacity = _React$useRef.current;
|
|
7145
7167
|
var isFirstRendering = React.useRef(true);
|
|
@@ -7243,7 +7265,7 @@ function omit(keys, obj) {
|
|
|
7243
7265
|
return result;
|
|
7244
7266
|
}
|
|
7245
7267
|
|
|
7246
|
-
var _excluded$
|
|
7268
|
+
var _excluded$m = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
|
|
7247
7269
|
var getInactiveIcon = function getInactiveIcon(icon) {
|
|
7248
7270
|
var inactiveIcon = "".concat(icon, "-outlined");
|
|
7249
7271
|
return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
|
|
@@ -7254,7 +7276,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
7254
7276
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
7255
7277
|
selectedTabKey = _ref.selectedTabKey,
|
|
7256
7278
|
tabs = _ref.tabs,
|
|
7257
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7279
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$m);
|
|
7258
7280
|
var insets = useSafeAreaInsets();
|
|
7259
7281
|
/**
|
|
7260
7282
|
* List of loaded tabs, tabs will be loaded when navigated to.
|
|
@@ -7341,13 +7363,13 @@ var StyledDivider = index$a(View)(function (_ref) {
|
|
|
7341
7363
|
}, horizontalMargin), verticalMargin);
|
|
7342
7364
|
});
|
|
7343
7365
|
|
|
7344
|
-
var _excluded$
|
|
7366
|
+
var _excluded$l = ["marginHorizontal", "marginVertical", "style", "testID"];
|
|
7345
7367
|
var Divider = function Divider(_ref) {
|
|
7346
7368
|
var marginHorizontal = _ref.marginHorizontal,
|
|
7347
7369
|
marginVertical = _ref.marginVertical,
|
|
7348
7370
|
style = _ref.style,
|
|
7349
7371
|
testID = _ref.testID,
|
|
7350
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7372
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$l);
|
|
7351
7373
|
return /*#__PURE__*/React.createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
7352
7374
|
themeMarginHorizontal: marginHorizontal,
|
|
7353
7375
|
themeMarginVertical: marginVertical,
|
|
@@ -7477,7 +7499,7 @@ var StyledLoadingDot = index$a(View)(function (_ref2) {
|
|
|
7477
7499
|
}, themeStyling());
|
|
7478
7500
|
});
|
|
7479
7501
|
|
|
7480
|
-
var _excluded$
|
|
7502
|
+
var _excluded$k = ["count", "size", "testID", "themeVariant"];
|
|
7481
7503
|
var AnimatedLoadingIndicatorWrapper = Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
|
|
7482
7504
|
var AnimatedLoadingDot = Animated.createAnimatedComponent(StyledLoadingDot);
|
|
7483
7505
|
var renderDotComponent = function renderDotComponent(_ref) {
|
|
@@ -7509,7 +7531,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
7509
7531
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
7510
7532
|
testID = _ref2.testID,
|
|
7511
7533
|
themeVariant = _ref2.themeVariant,
|
|
7512
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
7534
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$k);
|
|
7513
7535
|
var progressAnimation = useRef(new Animated.Value(0));
|
|
7514
7536
|
useEffect(function () {
|
|
7515
7537
|
var animation = Animated.loop(Animated.timing(progressAnimation.current, {
|
|
@@ -7939,11 +7961,11 @@ var Header = function Header(_ref) {
|
|
|
7939
7961
|
})) : null), showDivider ? /*#__PURE__*/React.createElement(Divider, null) : null);
|
|
7940
7962
|
};
|
|
7941
7963
|
|
|
7942
|
-
var _excluded$
|
|
7964
|
+
var _excluded$j = ["scrollEventThrottle"];
|
|
7943
7965
|
var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
7944
7966
|
var _ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
7945
7967
|
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
|
|
7946
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7968
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
7947
7969
|
var _useContext = useContext(BottomSheetContext),
|
|
7948
7970
|
setInternalShowDivider = _useContext.setInternalShowDivider;
|
|
7949
7971
|
var onScrollBeginDrag = useCallback(function (e) {
|
|
@@ -8258,7 +8280,7 @@ var borderWidths = {
|
|
|
8258
8280
|
var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
|
|
8259
8281
|
var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
|
|
8260
8282
|
|
|
8261
|
-
var _excluded$
|
|
8283
|
+
var _excluded$i = ["theme"];
|
|
8262
8284
|
var getThemeValue = function getThemeValue(theme, key, props) {
|
|
8263
8285
|
var propConfig = config[key];
|
|
8264
8286
|
var propValue = props[key];
|
|
@@ -8285,18 +8307,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
|
|
|
8285
8307
|
var configKeys = Object.keys(config);
|
|
8286
8308
|
var StyledBox = index$a(View)(function (_ref5) {
|
|
8287
8309
|
var theme = _ref5.theme,
|
|
8288
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
8310
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$i);
|
|
8289
8311
|
var styleProps = pick(configKeys, otherProps);
|
|
8290
8312
|
var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
|
|
8291
8313
|
return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
|
|
8292
8314
|
});
|
|
8293
8315
|
|
|
8294
|
-
var _excluded$
|
|
8316
|
+
var _excluded$h = ["children", "style", "testID"];
|
|
8295
8317
|
var Box = function Box(_ref) {
|
|
8296
8318
|
var children = _ref.children,
|
|
8297
8319
|
style = _ref.style,
|
|
8298
8320
|
testID = _ref.testID,
|
|
8299
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
8321
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$h);
|
|
8300
8322
|
return /*#__PURE__*/React.createElement(StyledBox, _extends$1({}, otherProps, {
|
|
8301
8323
|
style: style,
|
|
8302
8324
|
testID: testID
|
|
@@ -10622,7 +10644,7 @@ function ContentNavigator(_ref) {
|
|
|
10622
10644
|
}));
|
|
10623
10645
|
}
|
|
10624
10646
|
|
|
10625
|
-
var StyledContainer$
|
|
10647
|
+
var StyledContainer$5 = index$a(View)(function (_ref) {
|
|
10626
10648
|
var theme = _ref.theme;
|
|
10627
10649
|
return {
|
|
10628
10650
|
backgroundColor: theme.__hd__.calendar.colors.background
|
|
@@ -10805,7 +10827,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
10805
10827
|
var disableNextButton = maxDate === undefined ? false : !daysOfNextMonth.some(function (date) {
|
|
10806
10828
|
return date !== undefined;
|
|
10807
10829
|
}) || maxDate <= lastDateOfMonth;
|
|
10808
|
-
return /*#__PURE__*/React.createElement(StyledContainer$
|
|
10830
|
+
return /*#__PURE__*/React.createElement(StyledContainer$5, null, /*#__PURE__*/React.createElement(StyledCalendarHeader, null, /*#__PURE__*/React.createElement(ContentNavigator, {
|
|
10809
10831
|
value: formatTime('MMMM yyyy', visibleDate),
|
|
10810
10832
|
onPreviousPress: onPreviousPress,
|
|
10811
10833
|
onNextPress: onNextPress,
|
|
@@ -10861,7 +10883,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
10861
10883
|
})));
|
|
10862
10884
|
};
|
|
10863
10885
|
|
|
10864
|
-
var _excluded$
|
|
10886
|
+
var _excluded$g = ["rounded", "size", "testID", "style"];
|
|
10865
10887
|
var Image = function Image(_ref) {
|
|
10866
10888
|
var _ref$rounded = _ref.rounded,
|
|
10867
10889
|
rounded = _ref$rounded === void 0 ? false : _ref$rounded,
|
|
@@ -10869,7 +10891,7 @@ var Image = function Image(_ref) {
|
|
|
10869
10891
|
size = _ref$size === void 0 ? '6xlarge' : _ref$size,
|
|
10870
10892
|
testID = _ref.testID,
|
|
10871
10893
|
style = _ref.style,
|
|
10872
|
-
imageNativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
10894
|
+
imageNativeProps = _objectWithoutProperties(_ref, _excluded$g);
|
|
10873
10895
|
var theme = useTheme();
|
|
10874
10896
|
var imageSize = theme.__hd__.image.sizes[size];
|
|
10875
10897
|
return /*#__PURE__*/React.createElement(Image$1, _extends$1({
|
|
@@ -11062,12 +11084,12 @@ var Indicator = index$a(View)(function (_ref2) {
|
|
|
11062
11084
|
};
|
|
11063
11085
|
});
|
|
11064
11086
|
|
|
11065
|
-
var _excluded$
|
|
11087
|
+
var _excluded$f = ["intent", "children"];
|
|
11066
11088
|
var DataCard = function DataCard(_ref) {
|
|
11067
11089
|
var _ref$intent = _ref.intent,
|
|
11068
11090
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
11069
11091
|
children = _ref.children,
|
|
11070
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11092
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$f);
|
|
11071
11093
|
return /*#__PURE__*/React.createElement(StyledDataCard, nativeProps, /*#__PURE__*/React.createElement(Indicator, {
|
|
11072
11094
|
themeIntent: intent,
|
|
11073
11095
|
testID: "data-card-indicator"
|
|
@@ -11085,11 +11107,11 @@ var StyledCard$1 = index$a(View)(function (_ref) {
|
|
|
11085
11107
|
});
|
|
11086
11108
|
});
|
|
11087
11109
|
|
|
11088
|
-
var _excluded$
|
|
11110
|
+
var _excluded$e = ["intent", "children"];
|
|
11089
11111
|
var Card = function Card(_ref) {
|
|
11090
11112
|
var intent = _ref.intent,
|
|
11091
11113
|
children = _ref.children,
|
|
11092
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11114
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$e);
|
|
11093
11115
|
return /*#__PURE__*/React.createElement(StyledCard$1, _extends$1({}, nativeProps, {
|
|
11094
11116
|
themeIntent: intent
|
|
11095
11117
|
}), children);
|
|
@@ -11277,7 +11299,7 @@ var CardCarousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
11277
11299
|
}));
|
|
11278
11300
|
});
|
|
11279
11301
|
|
|
11280
|
-
var _excluded$
|
|
11302
|
+
var _excluded$d = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination"];
|
|
11281
11303
|
function useStateFromProp(initialValue) {
|
|
11282
11304
|
var _useState = useState(initialValue),
|
|
11283
11305
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11299,7 +11321,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
11299
11321
|
shouldShowPagination = _ref$shouldShowPagina === void 0 ? function () {
|
|
11300
11322
|
return true;
|
|
11301
11323
|
} : _ref$shouldShowPagina,
|
|
11302
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11324
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$d);
|
|
11303
11325
|
var carouselRef = useRef(null);
|
|
11304
11326
|
var _useStateFromProp = useStateFromProp(selectedItemIndex),
|
|
11305
11327
|
_useStateFromProp2 = _slicedToArray(_useStateFromProp, 2),
|
|
@@ -11459,7 +11481,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
11459
11481
|
})));
|
|
11460
11482
|
};
|
|
11461
11483
|
|
|
11462
|
-
var StyledContainer$
|
|
11484
|
+
var StyledContainer$4 = index$a(View)(function (_ref) {
|
|
11463
11485
|
var theme = _ref.theme;
|
|
11464
11486
|
return {
|
|
11465
11487
|
width: '100%',
|
|
@@ -11611,7 +11633,7 @@ var StyledErrorAndMaxLengthContainer = index$a(View)(function () {
|
|
|
11611
11633
|
};
|
|
11612
11634
|
});
|
|
11613
11635
|
|
|
11614
|
-
var _excluded$
|
|
11636
|
+
var _excluded$c = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
|
|
11615
11637
|
var getVariant$1 = function getVariant(_ref) {
|
|
11616
11638
|
var disabled = _ref.disabled,
|
|
11617
11639
|
error = _ref.error,
|
|
@@ -11659,7 +11681,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
11659
11681
|
renderInputValue = _ref2.renderInputValue,
|
|
11660
11682
|
_ref2$allowFontScalin = _ref2.allowFontScaling,
|
|
11661
11683
|
allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
|
|
11662
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
11684
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$c);
|
|
11663
11685
|
var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
|
|
11664
11686
|
var isEmptyValue = displayText.length === 0;
|
|
11665
11687
|
var actualSuffix = loading ? 'loading' : suffix;
|
|
@@ -11770,7 +11792,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
11770
11792
|
defaultValue: defaultValue,
|
|
11771
11793
|
placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
|
|
11772
11794
|
});
|
|
11773
|
-
return /*#__PURE__*/React.createElement(StyledContainer$
|
|
11795
|
+
return /*#__PURE__*/React.createElement(StyledContainer$4, {
|
|
11774
11796
|
style: styleWithoutBackgroundColor,
|
|
11775
11797
|
pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
|
|
11776
11798
|
testID: testID
|
|
@@ -11988,7 +12010,7 @@ var DatePicker = function DatePicker(props) {
|
|
|
11988
12010
|
};
|
|
11989
12011
|
|
|
11990
12012
|
var AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
11991
|
-
var StyledContainer$
|
|
12013
|
+
var StyledContainer$3 = index$a(View)(function (_ref) {
|
|
11992
12014
|
var theme = _ref.theme,
|
|
11993
12015
|
enableShadow = _ref.enableShadow;
|
|
11994
12016
|
return _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
@@ -12247,7 +12269,7 @@ var Drawer = function Drawer(_ref) {
|
|
|
12247
12269
|
return animation.stop();
|
|
12248
12270
|
};
|
|
12249
12271
|
}, [visible]);
|
|
12250
|
-
return /*#__PURE__*/React.createElement(StyledContainer$
|
|
12272
|
+
return /*#__PURE__*/React.createElement(StyledContainer$3, {
|
|
12251
12273
|
testID: testID,
|
|
12252
12274
|
enableShadow: enableShadow,
|
|
12253
12275
|
pointerEvents: "box-none"
|
|
@@ -12379,8 +12401,16 @@ var StyledErrorButtonSecondary = index$a(CompoundButton)(function (_ref5) {
|
|
|
12379
12401
|
padding: theme.__hd__.error.space.button.padding
|
|
12380
12402
|
};
|
|
12381
12403
|
});
|
|
12382
|
-
var
|
|
12404
|
+
var StyledErrorImageContainer = index$a(View)(function (_ref6) {
|
|
12383
12405
|
var theme = _ref6.theme;
|
|
12406
|
+
return {
|
|
12407
|
+
marginBottom: theme.__hd__.error.space.imageMarginBottom,
|
|
12408
|
+
width: theme.__hd__.error.sizes.image,
|
|
12409
|
+
height: theme.__hd__.error.sizes.image
|
|
12410
|
+
};
|
|
12411
|
+
});
|
|
12412
|
+
var StyledErrorImage = index$a(Image)(function (_ref7) {
|
|
12413
|
+
var theme = _ref7.theme;
|
|
12384
12414
|
return {
|
|
12385
12415
|
marginBottom: theme.__hd__.error.space.imageMarginBottom,
|
|
12386
12416
|
width: theme.__hd__.error.sizes.image,
|
|
@@ -12388,8 +12418,8 @@ var StyledErrorImage = index$a(Image)(function (_ref6) {
|
|
|
12388
12418
|
resizeMode: 'contain'
|
|
12389
12419
|
};
|
|
12390
12420
|
});
|
|
12391
|
-
var StyledErrorTitle = index$a(Typography.Text)(function (
|
|
12392
|
-
var theme =
|
|
12421
|
+
var StyledErrorTitle = index$a(Typography.Text)(function (_ref8) {
|
|
12422
|
+
var theme = _ref8.theme;
|
|
12393
12423
|
return {
|
|
12394
12424
|
fontFamily: theme.__hd__.error.fonts.title,
|
|
12395
12425
|
fontSize: theme.__hd__.error.fontSizes.title,
|
|
@@ -12398,8 +12428,8 @@ var StyledErrorTitle = index$a(Typography.Text)(function (_ref7) {
|
|
|
12398
12428
|
color: theme.__hd__.error.colors.title
|
|
12399
12429
|
};
|
|
12400
12430
|
});
|
|
12401
|
-
var StyledErrorDescription = index$a(Typography.Text)(function (
|
|
12402
|
-
var theme =
|
|
12431
|
+
var StyledErrorDescription = index$a(Typography.Text)(function (_ref9) {
|
|
12432
|
+
var theme = _ref9.theme;
|
|
12403
12433
|
return {
|
|
12404
12434
|
fontFamily: theme.__hd__.error.fonts.description,
|
|
12405
12435
|
fontSize: theme.__hd__.error.fontSizes.description,
|
|
@@ -12408,8 +12438,21 @@ var StyledErrorDescription = index$a(Typography.Text)(function (_ref8) {
|
|
|
12408
12438
|
};
|
|
12409
12439
|
});
|
|
12410
12440
|
|
|
12411
|
-
var _excluded$
|
|
12441
|
+
var _excluded$b = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
|
|
12412
12442
|
_excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
12443
|
+
var renderImage = function renderImage(image) {
|
|
12444
|
+
if ( /*#__PURE__*/isValidElement(image)) {
|
|
12445
|
+
return /*#__PURE__*/React.cloneElement(image, {
|
|
12446
|
+
testID: 'error-image'
|
|
12447
|
+
});
|
|
12448
|
+
}
|
|
12449
|
+
return /*#__PURE__*/React.createElement(StyledErrorImage, {
|
|
12450
|
+
source: typeof image === 'string' ? {
|
|
12451
|
+
uri: image
|
|
12452
|
+
} : image,
|
|
12453
|
+
testID: "error-image"
|
|
12454
|
+
});
|
|
12455
|
+
};
|
|
12413
12456
|
var ErrorPage = function ErrorPage(_ref) {
|
|
12414
12457
|
var _ref$variant = _ref.variant,
|
|
12415
12458
|
variant = _ref$variant === void 0 ? 'in-page' : _ref$variant,
|
|
@@ -12421,19 +12464,14 @@ var ErrorPage = function ErrorPage(_ref) {
|
|
|
12421
12464
|
onCtaPress = _ref.onCtaPress,
|
|
12422
12465
|
secondaryCtaText = _ref.secondaryCtaText,
|
|
12423
12466
|
onSecondaryCtaPress = _ref.onSecondaryCtaPress,
|
|
12424
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
12467
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$b);
|
|
12425
12468
|
var showCta = ctaText && onCtaPress !== undefined;
|
|
12426
12469
|
var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
|
|
12427
12470
|
var showButtonContainer = showCta || showSecondaryCta;
|
|
12428
|
-
return /*#__PURE__*/React.createElement(StyledErrorContainer$1, {
|
|
12471
|
+
return /*#__PURE__*/React.createElement(StyledErrorContainer$1, _extends$1({
|
|
12429
12472
|
testID: testID,
|
|
12430
12473
|
themeVariant: variant
|
|
12431
|
-
}, /*#__PURE__*/React.createElement(StyledErrorContent,
|
|
12432
|
-
source: typeof image === 'string' ? {
|
|
12433
|
-
uri: image
|
|
12434
|
-
} : image,
|
|
12435
|
-
testID: "error-image"
|
|
12436
|
-
}), /*#__PURE__*/React.createElement(StyledErrorTitle, null, title), description && /*#__PURE__*/React.createElement(StyledErrorDescription, null, description)), showButtonContainer && /*#__PURE__*/React.createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React.createElement(StyledErrorButtonPrimary, {
|
|
12474
|
+
}, 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, {
|
|
12437
12475
|
variant: "filled",
|
|
12438
12476
|
text: ctaText,
|
|
12439
12477
|
onPress: onCtaPress
|
|
@@ -12570,11 +12608,11 @@ var StyledFABText = index$a(Typography.Text)(function (_ref3) {
|
|
|
12570
12608
|
};
|
|
12571
12609
|
});
|
|
12572
12610
|
|
|
12573
|
-
var _excluded$
|
|
12611
|
+
var _excluded$a = ["active"];
|
|
12574
12612
|
var AnimatedIcons = Animated.createAnimatedComponent(StyledFABIcon);
|
|
12575
12613
|
var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
|
|
12576
12614
|
var active = _ref.active,
|
|
12577
|
-
iconProps = _objectWithoutProperties(_ref, _excluded$
|
|
12615
|
+
iconProps = _objectWithoutProperties(_ref, _excluded$a);
|
|
12578
12616
|
var rotateAnimation = useRef(new Animated.Value(active ? 1 : 0));
|
|
12579
12617
|
useEffect(function () {
|
|
12580
12618
|
var animation = Animated.timing(rotateAnimation.current, {
|
|
@@ -12700,7 +12738,7 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
12700
12738
|
}), /*#__PURE__*/React.createElement(StyledActionItemText, null, title)));
|
|
12701
12739
|
};
|
|
12702
12740
|
|
|
12703
|
-
var StyledContainer$
|
|
12741
|
+
var StyledContainer$2 = index$a(View)({
|
|
12704
12742
|
position: 'absolute',
|
|
12705
12743
|
left: 0,
|
|
12706
12744
|
right: 0,
|
|
@@ -12787,7 +12825,7 @@ var ActionGroup = function ActionGroup(_ref2) {
|
|
|
12787
12825
|
inputRange: [0, 1],
|
|
12788
12826
|
outputRange: [0, 1]
|
|
12789
12827
|
});
|
|
12790
|
-
return /*#__PURE__*/React.createElement(StyledContainer$
|
|
12828
|
+
return /*#__PURE__*/React.createElement(StyledContainer$2, {
|
|
12791
12829
|
testID: testID,
|
|
12792
12830
|
pointerEvents: "box-none",
|
|
12793
12831
|
style: style
|
|
@@ -13247,7 +13285,7 @@ var THEME_INTENT_MAP = {
|
|
|
13247
13285
|
'archived-inverted': 'archivedInverted'
|
|
13248
13286
|
};
|
|
13249
13287
|
|
|
13250
|
-
var StyledContainer = index$a(View)(function (_ref) {
|
|
13288
|
+
var StyledContainer$1 = index$a(View)(function (_ref) {
|
|
13251
13289
|
var theme = _ref.theme;
|
|
13252
13290
|
return {
|
|
13253
13291
|
flexDirection: 'row',
|
|
@@ -13313,7 +13351,7 @@ var StyledStrokeEnd = index$a(View)(function (_ref6) {
|
|
|
13313
13351
|
};
|
|
13314
13352
|
});
|
|
13315
13353
|
|
|
13316
|
-
var _excluded$
|
|
13354
|
+
var _excluded$9 = ["value", "renderValue", "intent", "style", "testID"];
|
|
13317
13355
|
var HalfCircle = function HalfCircle(_ref) {
|
|
13318
13356
|
var type = _ref.type,
|
|
13319
13357
|
themeIntent = _ref.themeIntent;
|
|
@@ -13334,7 +13372,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
13334
13372
|
intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
|
|
13335
13373
|
style = _ref2.style,
|
|
13336
13374
|
testID = _ref2.testID,
|
|
13337
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
13375
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$9);
|
|
13338
13376
|
var theme = useTheme$1();
|
|
13339
13377
|
var radius = theme.__hd__.progress.sizes.circleDiameter / 2;
|
|
13340
13378
|
var progressAnimatedValue = useRef(new Animated.Value(0));
|
|
@@ -13374,7 +13412,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
13374
13412
|
return /*#__PURE__*/React.createElement(View, _extends$1({}, nativeProps, {
|
|
13375
13413
|
testID: testID,
|
|
13376
13414
|
style: style
|
|
13377
|
-
}), /*#__PURE__*/React.createElement(StyledContainer, null, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(HalfCircle, {
|
|
13415
|
+
}), /*#__PURE__*/React.createElement(StyledContainer$1, null, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(HalfCircle, {
|
|
13378
13416
|
type: "foreground",
|
|
13379
13417
|
themeIntent: intent
|
|
13380
13418
|
}), /*#__PURE__*/React.createElement(Animated.View, {
|
|
@@ -13451,14 +13489,14 @@ var StyledInner = index$a(Animated.View)(function (_ref2) {
|
|
|
13451
13489
|
};
|
|
13452
13490
|
});
|
|
13453
13491
|
|
|
13454
|
-
var _excluded$
|
|
13492
|
+
var _excluded$8 = ["value", "intent", "style", "testID"];
|
|
13455
13493
|
var ProgressBar = function ProgressBar(_ref) {
|
|
13456
13494
|
var value = _ref.value,
|
|
13457
13495
|
_ref$intent = _ref.intent,
|
|
13458
13496
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
13459
13497
|
style = _ref.style,
|
|
13460
13498
|
testID = _ref.testID,
|
|
13461
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
13499
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$8);
|
|
13462
13500
|
var _useState = useState(0),
|
|
13463
13501
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13464
13502
|
width = _useState2[0],
|
|
@@ -13649,14 +13687,14 @@ var AnimatedSpinner = function AnimatedSpinner(_ref) {
|
|
|
13649
13687
|
}, dotProps))));
|
|
13650
13688
|
};
|
|
13651
13689
|
|
|
13652
|
-
var _excluded$
|
|
13690
|
+
var _excluded$7 = ["testID", "size", "intent"];
|
|
13653
13691
|
var Spinner = function Spinner(_ref) {
|
|
13654
13692
|
var testID = _ref.testID,
|
|
13655
13693
|
_ref$size = _ref.size,
|
|
13656
13694
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
13657
13695
|
_ref$intent = _ref.intent,
|
|
13658
13696
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
13659
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
13697
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
13660
13698
|
return /*#__PURE__*/React.createElement(StyledView$1, nativeProps, /*#__PURE__*/React.createElement(StyledSpinnerContainer, {
|
|
13661
13699
|
testID: testID
|
|
13662
13700
|
}, /*#__PURE__*/React.createElement(AnimatedSpinner, {
|
|
@@ -13689,7 +13727,7 @@ var SwipeableAction = function SwipeableAction(_ref) {
|
|
|
13689
13727
|
}, children);
|
|
13690
13728
|
};
|
|
13691
13729
|
|
|
13692
|
-
var _excluded$
|
|
13730
|
+
var _excluded$6 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
|
|
13693
13731
|
var renderActions = function renderActions(actions, width, progress, direction) {
|
|
13694
13732
|
var trans = progress.interpolate({
|
|
13695
13733
|
inputRange: [0, 1],
|
|
@@ -13714,7 +13752,7 @@ var Swipeable = function Swipeable(_ref) {
|
|
|
13714
13752
|
leftActionsWidth = _ref.leftActionsWidth,
|
|
13715
13753
|
rightActions = _ref.rightActions,
|
|
13716
13754
|
rightActionsWidth = _ref.rightActionsWidth,
|
|
13717
|
-
swipeableProps = _objectWithoutProperties(_ref, _excluded$
|
|
13755
|
+
swipeableProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
13718
13756
|
var _useWindowDimensions = useWindowDimensions(),
|
|
13719
13757
|
width = _useWindowDimensions.width;
|
|
13720
13758
|
var swipeableRef = useRef(null);
|
|
@@ -14019,7 +14057,7 @@ var StyledSectionList = index$a(SectionList)(function (_ref4) {
|
|
|
14019
14057
|
};
|
|
14020
14058
|
});
|
|
14021
14059
|
|
|
14022
|
-
var _excluded$
|
|
14060
|
+
var _excluded$5 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
|
|
14023
14061
|
var BaseOptionList = function BaseOptionList(_ref) {
|
|
14024
14062
|
var keyExtractor = _ref.keyExtractor,
|
|
14025
14063
|
loading = _ref.loading,
|
|
@@ -14028,7 +14066,7 @@ var BaseOptionList = function BaseOptionList(_ref) {
|
|
|
14028
14066
|
sections = _ref.sections,
|
|
14029
14067
|
renderItem = _ref.renderItem,
|
|
14030
14068
|
sectionListRef = _ref.sectionListRef,
|
|
14031
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14069
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
14032
14070
|
var theme = useTheme$1();
|
|
14033
14071
|
var _useState = useState(false),
|
|
14034
14072
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -14097,7 +14135,7 @@ var Option$2 = function Option(_ref) {
|
|
|
14097
14135
|
return highlighted === true ? /*#__PURE__*/React.createElement(List.Item, props) : /*#__PURE__*/React.createElement(List.BasicItem, props);
|
|
14098
14136
|
};
|
|
14099
14137
|
|
|
14100
|
-
var _excluded$
|
|
14138
|
+
var _excluded$4 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
14101
14139
|
var OptionList$1 = function OptionList(_ref) {
|
|
14102
14140
|
var keyExtractor = _ref.keyExtractor,
|
|
14103
14141
|
loading = _ref.loading,
|
|
@@ -14108,7 +14146,7 @@ var OptionList$1 = function OptionList(_ref) {
|
|
|
14108
14146
|
renderOption = _ref.renderOption,
|
|
14109
14147
|
value = _ref.value,
|
|
14110
14148
|
sectionListRef = _ref.sectionListRef,
|
|
14111
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14149
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
14112
14150
|
var renderItem = function renderItem(info) {
|
|
14113
14151
|
var item = info.item;
|
|
14114
14152
|
var selected = value.includes(info.item.value);
|
|
@@ -14296,7 +14334,7 @@ var StyledOptionList = index$a(BaseOptionList)(function (_ref) {
|
|
|
14296
14334
|
};
|
|
14297
14335
|
});
|
|
14298
14336
|
|
|
14299
|
-
var _excluded$
|
|
14337
|
+
var _excluded$3 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
14300
14338
|
var OptionList = function OptionList(_ref) {
|
|
14301
14339
|
var keyExtractor = _ref.keyExtractor,
|
|
14302
14340
|
loading = _ref.loading,
|
|
@@ -14307,7 +14345,7 @@ var OptionList = function OptionList(_ref) {
|
|
|
14307
14345
|
renderOption = _ref.renderOption,
|
|
14308
14346
|
value = _ref.value,
|
|
14309
14347
|
sectionListRef = _ref.sectionListRef,
|
|
14310
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14348
|
+
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
14311
14349
|
var renderItem = function renderItem(info) {
|
|
14312
14350
|
var item = info.item;
|
|
14313
14351
|
var selected = item.value === value;
|
|
@@ -14454,6 +14492,120 @@ var index$4 = Object.assign(SingleSelect, {
|
|
|
14454
14492
|
Multi: MultiSelect
|
|
14455
14493
|
});
|
|
14456
14494
|
|
|
14495
|
+
var StyledContainer = index$a(Box)(function (_ref) {
|
|
14496
|
+
var theme = _ref.theme,
|
|
14497
|
+
themeIntent = _ref.themeIntent,
|
|
14498
|
+
themeVariant = _ref.themeVariant;
|
|
14499
|
+
return {
|
|
14500
|
+
backgroundColor: themeIntent === 'light' ? theme.__hd__.skeleton.colors.lightBackground : theme.__hd__.skeleton.colors.darkBackground,
|
|
14501
|
+
borderRadius: theme.__hd__.skeleton.radii[themeVariant]
|
|
14502
|
+
};
|
|
14503
|
+
});
|
|
14504
|
+
var StyledGradientContainer = index$a(Box)(function (_ref2) {
|
|
14505
|
+
var theme = _ref2.theme,
|
|
14506
|
+
themeVariant = _ref2.themeVariant;
|
|
14507
|
+
return {
|
|
14508
|
+
overflow: 'hidden',
|
|
14509
|
+
borderRadius: theme.__hd__.skeleton.radii[themeVariant]
|
|
14510
|
+
};
|
|
14511
|
+
});
|
|
14512
|
+
|
|
14513
|
+
var _excluded$2 = ["intent", "variant", "style", "onLayout"];
|
|
14514
|
+
var AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);
|
|
14515
|
+
var gradientPositions = {
|
|
14516
|
+
start: {
|
|
14517
|
+
x: 0,
|
|
14518
|
+
y: 0
|
|
14519
|
+
},
|
|
14520
|
+
end: {
|
|
14521
|
+
x: 1,
|
|
14522
|
+
y: 0
|
|
14523
|
+
}
|
|
14524
|
+
};
|
|
14525
|
+
var getGradientColors = function getGradientColors(theme, intent) {
|
|
14526
|
+
switch (intent) {
|
|
14527
|
+
case 'light':
|
|
14528
|
+
{
|
|
14529
|
+
return [theme.__hd__.skeleton.colors.lightGradientStart, theme.__hd__.skeleton.colors.lightGradientEnd, theme.__hd__.skeleton.colors.lightGradientStart];
|
|
14530
|
+
}
|
|
14531
|
+
case 'dark':
|
|
14532
|
+
{
|
|
14533
|
+
return [theme.__hd__.skeleton.colors.darkGradientStart, theme.__hd__.skeleton.colors.darkGradientEnd, theme.__hd__.skeleton.colors.darkGradientStart];
|
|
14534
|
+
}
|
|
14535
|
+
}
|
|
14536
|
+
};
|
|
14537
|
+
var Skeleton = function Skeleton(_ref) {
|
|
14538
|
+
var _StyleSheet$flatten, _StyleSheet$flatten2;
|
|
14539
|
+
var _ref$intent = _ref.intent,
|
|
14540
|
+
intent = _ref$intent === void 0 ? 'light' : _ref$intent,
|
|
14541
|
+
_ref$variant = _ref.variant,
|
|
14542
|
+
variant = _ref$variant === void 0 ? 'rounded' : _ref$variant,
|
|
14543
|
+
style = _ref.style,
|
|
14544
|
+
onLayout = _ref.onLayout,
|
|
14545
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
14546
|
+
var theme = useTheme();
|
|
14547
|
+
var colors = useMemo(function () {
|
|
14548
|
+
return getGradientColors(theme, intent);
|
|
14549
|
+
}, [theme, intent]);
|
|
14550
|
+
var _useState = useState(Number((_StyleSheet$flatten = StyleSheet$1.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.width) || 0),
|
|
14551
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14552
|
+
containerWidth = _useState2[0],
|
|
14553
|
+
setContainerWidth = _useState2[1];
|
|
14554
|
+
var _useState3 = useState(Number((_StyleSheet$flatten2 = StyleSheet$1.flatten(style)) === null || _StyleSheet$flatten2 === void 0 ? void 0 : _StyleSheet$flatten2.height) || 0),
|
|
14555
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14556
|
+
containerHeight = _useState4[0],
|
|
14557
|
+
setContainerHeight = _useState4[1];
|
|
14558
|
+
var _useState5 = useState(false),
|
|
14559
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
14560
|
+
shouldStartAnimation = _useState6[0],
|
|
14561
|
+
setShouldStartAnimation = _useState6[1];
|
|
14562
|
+
var animatedValue = useRef(new Animated.Value(0)).current;
|
|
14563
|
+
useEffect(function () {
|
|
14564
|
+
if (shouldStartAnimation) {
|
|
14565
|
+
Animated.loop(Animated.timing(animatedValue, {
|
|
14566
|
+
toValue: 1,
|
|
14567
|
+
duration: 1000,
|
|
14568
|
+
easing: Easing.linear,
|
|
14569
|
+
useNativeDriver: Platform.OS === 'ios' || Platform.OS === 'android'
|
|
14570
|
+
})).start();
|
|
14571
|
+
}
|
|
14572
|
+
}, [shouldStartAnimation]);
|
|
14573
|
+
var translateX = animatedValue.interpolate({
|
|
14574
|
+
inputRange: [0, 1],
|
|
14575
|
+
outputRange: [-containerWidth, containerWidth]
|
|
14576
|
+
});
|
|
14577
|
+
var onContainerLayout = useCallback(function (e) {
|
|
14578
|
+
var _e$nativeEvent$layout = e.nativeEvent.layout,
|
|
14579
|
+
width = _e$nativeEvent$layout.width,
|
|
14580
|
+
height = _e$nativeEvent$layout.height;
|
|
14581
|
+
setContainerHeight(height);
|
|
14582
|
+
setContainerWidth(width);
|
|
14583
|
+
if (!shouldStartAnimation) {
|
|
14584
|
+
setShouldStartAnimation(true);
|
|
14585
|
+
}
|
|
14586
|
+
onLayout === null || onLayout === void 0 ? void 0 : onLayout(e);
|
|
14587
|
+
}, []);
|
|
14588
|
+
return /*#__PURE__*/React.createElement(StyledContainer, _extends$1({
|
|
14589
|
+
style: style,
|
|
14590
|
+
themeVariant: variant,
|
|
14591
|
+
themeIntent: intent,
|
|
14592
|
+
onLayout: onContainerLayout
|
|
14593
|
+
}, props), /*#__PURE__*/React.createElement(StyledGradientContainer, {
|
|
14594
|
+
themeVariant: variant
|
|
14595
|
+
}, /*#__PURE__*/React.createElement(AnimatedLinearGradient, {
|
|
14596
|
+
start: gradientPositions.start,
|
|
14597
|
+
end: gradientPositions.end,
|
|
14598
|
+
style: {
|
|
14599
|
+
width: containerWidth,
|
|
14600
|
+
height: containerHeight,
|
|
14601
|
+
transform: [{
|
|
14602
|
+
translateX: translateX
|
|
14603
|
+
}]
|
|
14604
|
+
},
|
|
14605
|
+
colors: colors
|
|
14606
|
+
})));
|
|
14607
|
+
};
|
|
14608
|
+
|
|
14457
14609
|
var StyledWrapper$1 = index$a(View)(function (_ref) {
|
|
14458
14610
|
var theme = _ref.theme;
|
|
14459
14611
|
return {
|
|
@@ -32037,7 +32189,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
32037
32189
|
break;
|
|
32038
32190
|
}
|
|
32039
32191
|
}, []);
|
|
32040
|
-
return /*#__PURE__*/React.createElement(StyledContainer$
|
|
32192
|
+
return /*#__PURE__*/React.createElement(StyledContainer$4, {
|
|
32041
32193
|
testID: testID
|
|
32042
32194
|
}, /*#__PURE__*/React.createElement(StyledTextInputContainer, null, /*#__PURE__*/React.createElement(StyledBorderBackDrop, {
|
|
32043
32195
|
themeVariant: variant,
|
|
@@ -32096,4 +32248,4 @@ var index = Object.assign(RichTextEditor$1, {
|
|
|
32096
32248
|
Toolbar: EditorToolbar
|
|
32097
32249
|
});
|
|
32098
32250
|
|
|
32099
|
-
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 };
|
|
32251
|
+
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 };
|