@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/lib/index.js
CHANGED
|
@@ -9,6 +9,7 @@ var reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
|
9
9
|
var DateTimePicker = require('@react-native-community/datetimepicker');
|
|
10
10
|
var RnSlider = require('@react-native-community/slider');
|
|
11
11
|
var reactNativeGestureHandler = require('react-native-gesture-handler');
|
|
12
|
+
var LinearGradient = require('react-native-linear-gradient');
|
|
12
13
|
var PagerView = require('react-native-pager-view');
|
|
13
14
|
var events = require('events');
|
|
14
15
|
var reactNativeWebview = require('react-native-webview');
|
|
@@ -37,6 +38,7 @@ var reactNative__namespace = /*#__PURE__*/_interopNamespace(reactNative);
|
|
|
37
38
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
38
39
|
var DateTimePicker__default = /*#__PURE__*/_interopDefaultLegacy(DateTimePicker);
|
|
39
40
|
var RnSlider__default = /*#__PURE__*/_interopDefaultLegacy(RnSlider);
|
|
41
|
+
var LinearGradient__default = /*#__PURE__*/_interopDefaultLegacy(LinearGradient);
|
|
40
42
|
var PagerView__default = /*#__PURE__*/_interopDefaultLegacy(PagerView);
|
|
41
43
|
|
|
42
44
|
function ownKeys(object, enumerableOnly) {
|
|
@@ -2606,6 +2608,26 @@ var getSelectTheme = function getSelectTheme(theme) {
|
|
|
2606
2608
|
};
|
|
2607
2609
|
};
|
|
2608
2610
|
|
|
2611
|
+
var getSkeletonTheme = function getSkeletonTheme(theme) {
|
|
2612
|
+
var colors = {
|
|
2613
|
+
lightBackground: theme.colors.neutralGlobalSurface,
|
|
2614
|
+
darkBackground: theme.colors.defaultGlobalSurface,
|
|
2615
|
+
lightGradientStart: theme.colors.neutralGlobalSurface,
|
|
2616
|
+
lightGradientEnd: theme.colors.archivedSurface,
|
|
2617
|
+
darkGradientStart: theme.colors.defaultGlobalSurface,
|
|
2618
|
+
darkGradientEnd: theme.colors.archivedSurface
|
|
2619
|
+
};
|
|
2620
|
+
var radii = {
|
|
2621
|
+
rectangular: 0,
|
|
2622
|
+
circular: theme.radii.rounded,
|
|
2623
|
+
rounded: theme.radii.xlarge
|
|
2624
|
+
};
|
|
2625
|
+
return {
|
|
2626
|
+
colors: colors,
|
|
2627
|
+
radii: radii
|
|
2628
|
+
};
|
|
2629
|
+
};
|
|
2630
|
+
|
|
2609
2631
|
var getSliderTheme = function getSliderTheme(theme) {
|
|
2610
2632
|
var colors = {
|
|
2611
2633
|
minimumTrackTint: theme.colors.primary,
|
|
@@ -3028,6 +3050,7 @@ var getTheme$1 = function getTheme() {
|
|
|
3028
3050
|
richTextEditor: getRichTextEditorTheme(globalTheme),
|
|
3029
3051
|
sectionHeading: getSectionHeadingTheme(globalTheme),
|
|
3030
3052
|
select: getSelectTheme(globalTheme),
|
|
3053
|
+
skeleton: getSkeletonTheme(globalTheme),
|
|
3031
3054
|
slider: getSliderTheme(globalTheme),
|
|
3032
3055
|
spinner: getSpinnerTheme(globalTheme),
|
|
3033
3056
|
swipeable: getSwipeableTheme(globalTheme),
|
|
@@ -6050,7 +6073,7 @@ var StyledText$3 = index$a(reactNative.Text)(function (_ref) {
|
|
|
6050
6073
|
});
|
|
6051
6074
|
});
|
|
6052
6075
|
|
|
6053
|
-
var _excluded$
|
|
6076
|
+
var _excluded$r = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
|
|
6054
6077
|
var Text = function Text(_ref) {
|
|
6055
6078
|
var children = _ref.children,
|
|
6056
6079
|
_ref$fontSize = _ref.fontSize,
|
|
@@ -6063,7 +6086,7 @@ var Text = function Text(_ref) {
|
|
|
6063
6086
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
6064
6087
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6065
6088
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6066
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
6089
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
6067
6090
|
return /*#__PURE__*/React__default["default"].createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
6068
6091
|
themeFontSize: fontSize,
|
|
6069
6092
|
themeFontWeight: fontWeight,
|
|
@@ -6584,10 +6607,10 @@ var StyledHeroIcon = index$a(HeroIcon)(function (_ref) {
|
|
|
6584
6607
|
};
|
|
6585
6608
|
});
|
|
6586
6609
|
|
|
6587
|
-
var _excluded$
|
|
6610
|
+
var _excluded$q = ["style"];
|
|
6588
6611
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
6589
6612
|
var style = _ref.style,
|
|
6590
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
6613
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$q);
|
|
6591
6614
|
var rotateAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
6592
6615
|
React.useEffect(function () {
|
|
6593
6616
|
var animation = reactNative.Animated.loop(reactNative.Animated.timing(rotateAnimation.current, {
|
|
@@ -6693,7 +6716,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
6693
6716
|
}, content));
|
|
6694
6717
|
};
|
|
6695
6718
|
|
|
6696
|
-
var _excluded$
|
|
6719
|
+
var _excluded$p = ["key"];
|
|
6697
6720
|
var Accordion = function Accordion(_ref) {
|
|
6698
6721
|
var items = _ref.items,
|
|
6699
6722
|
activeItemKey = _ref.activeItemKey,
|
|
@@ -6714,7 +6737,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
6714
6737
|
testID: testID
|
|
6715
6738
|
}, items.map(function (_ref2, index) {
|
|
6716
6739
|
var key = _ref2.key,
|
|
6717
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
6740
|
+
props = _objectWithoutProperties(_ref2, _excluded$p);
|
|
6718
6741
|
var open = _activeItemKey === key;
|
|
6719
6742
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
6720
6743
|
key: key
|
|
@@ -6829,7 +6852,7 @@ var Alert = function Alert(_ref2) {
|
|
|
6829
6852
|
})) : null);
|
|
6830
6853
|
};
|
|
6831
6854
|
|
|
6832
|
-
var StyledContainer$
|
|
6855
|
+
var StyledContainer$6 = index$a(reactNative.View)({
|
|
6833
6856
|
alignItems: 'center',
|
|
6834
6857
|
flexDirection: 'row'
|
|
6835
6858
|
});
|
|
@@ -6871,7 +6894,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
6871
6894
|
backgroundHighlighted = _ref$backgroundHighli === void 0 ? false : _ref$backgroundHighli,
|
|
6872
6895
|
style = _ref.style,
|
|
6873
6896
|
testID = _ref.testID;
|
|
6874
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$
|
|
6897
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$6, {
|
|
6875
6898
|
testID: testID,
|
|
6876
6899
|
style: style
|
|
6877
6900
|
}, /*#__PURE__*/React__default["default"].createElement(StyledContentContainer$1, {
|
|
@@ -7111,7 +7134,7 @@ var StyledStatus = index$a(reactNative.Animated.View)(function (_ref3) {
|
|
|
7111
7134
|
};
|
|
7112
7135
|
});
|
|
7113
7136
|
|
|
7114
|
-
var _excluded$
|
|
7137
|
+
var _excluded$o = ["children", "visible", "intent", "style", "testID"];
|
|
7115
7138
|
var Status = function Status(_ref) {
|
|
7116
7139
|
var children = _ref.children,
|
|
7117
7140
|
_ref$visible = _ref.visible,
|
|
@@ -7120,7 +7143,7 @@ var Status = function Status(_ref) {
|
|
|
7120
7143
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7121
7144
|
style = _ref.style,
|
|
7122
7145
|
testID = _ref.testID,
|
|
7123
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7146
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$o);
|
|
7124
7147
|
var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
7125
7148
|
opacity = _React$useRef.current;
|
|
7126
7149
|
var isFirstRendering = React__default["default"].useRef(true);
|
|
@@ -7153,7 +7176,7 @@ var Status = function Status(_ref) {
|
|
|
7153
7176
|
}));
|
|
7154
7177
|
};
|
|
7155
7178
|
|
|
7156
|
-
var _excluded$
|
|
7179
|
+
var _excluded$n = ["content", "visible", "max", "intent", "style", "testID"];
|
|
7157
7180
|
var DEFAULT_MAX_NUMBER = 99;
|
|
7158
7181
|
var getPaddingState = function getPaddingState(content) {
|
|
7159
7182
|
return content.length > 1 ? 'wideContent' : 'narrowContent';
|
|
@@ -7168,7 +7191,7 @@ var Badge = function Badge(_ref) {
|
|
|
7168
7191
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7169
7192
|
style = _ref.style,
|
|
7170
7193
|
testID = _ref.testID,
|
|
7171
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7194
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$n);
|
|
7172
7195
|
var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
7173
7196
|
opacity = _React$useRef.current;
|
|
7174
7197
|
var isFirstRendering = React__default["default"].useRef(true);
|
|
@@ -7272,7 +7295,7 @@ function omit(keys, obj) {
|
|
|
7272
7295
|
return result;
|
|
7273
7296
|
}
|
|
7274
7297
|
|
|
7275
|
-
var _excluded$
|
|
7298
|
+
var _excluded$m = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
|
|
7276
7299
|
var getInactiveIcon = function getInactiveIcon(icon) {
|
|
7277
7300
|
var inactiveIcon = "".concat(icon, "-outlined");
|
|
7278
7301
|
return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
|
|
@@ -7283,7 +7306,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
7283
7306
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
7284
7307
|
selectedTabKey = _ref.selectedTabKey,
|
|
7285
7308
|
tabs = _ref.tabs,
|
|
7286
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7309
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$m);
|
|
7287
7310
|
var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
7288
7311
|
/**
|
|
7289
7312
|
* List of loaded tabs, tabs will be loaded when navigated to.
|
|
@@ -7370,13 +7393,13 @@ var StyledDivider = index$a(reactNative.View)(function (_ref) {
|
|
|
7370
7393
|
}, horizontalMargin), verticalMargin);
|
|
7371
7394
|
});
|
|
7372
7395
|
|
|
7373
|
-
var _excluded$
|
|
7396
|
+
var _excluded$l = ["marginHorizontal", "marginVertical", "style", "testID"];
|
|
7374
7397
|
var Divider = function Divider(_ref) {
|
|
7375
7398
|
var marginHorizontal = _ref.marginHorizontal,
|
|
7376
7399
|
marginVertical = _ref.marginVertical,
|
|
7377
7400
|
style = _ref.style,
|
|
7378
7401
|
testID = _ref.testID,
|
|
7379
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7402
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$l);
|
|
7380
7403
|
return /*#__PURE__*/React__default["default"].createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
7381
7404
|
themeMarginHorizontal: marginHorizontal,
|
|
7382
7405
|
themeMarginVertical: marginVertical,
|
|
@@ -7506,7 +7529,7 @@ var StyledLoadingDot = index$a(reactNative.View)(function (_ref2) {
|
|
|
7506
7529
|
}, themeStyling());
|
|
7507
7530
|
});
|
|
7508
7531
|
|
|
7509
|
-
var _excluded$
|
|
7532
|
+
var _excluded$k = ["count", "size", "testID", "themeVariant"];
|
|
7510
7533
|
var AnimatedLoadingIndicatorWrapper = reactNative.Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
|
|
7511
7534
|
var AnimatedLoadingDot = reactNative.Animated.createAnimatedComponent(StyledLoadingDot);
|
|
7512
7535
|
var renderDotComponent = function renderDotComponent(_ref) {
|
|
@@ -7538,7 +7561,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
7538
7561
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
7539
7562
|
testID = _ref2.testID,
|
|
7540
7563
|
themeVariant = _ref2.themeVariant,
|
|
7541
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
7564
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$k);
|
|
7542
7565
|
var progressAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
7543
7566
|
React.useEffect(function () {
|
|
7544
7567
|
var animation = reactNative.Animated.loop(reactNative.Animated.timing(progressAnimation.current, {
|
|
@@ -7968,11 +7991,11 @@ var Header = function Header(_ref) {
|
|
|
7968
7991
|
})) : null), showDivider ? /*#__PURE__*/React__default["default"].createElement(Divider, null) : null);
|
|
7969
7992
|
};
|
|
7970
7993
|
|
|
7971
|
-
var _excluded$
|
|
7994
|
+
var _excluded$j = ["scrollEventThrottle"];
|
|
7972
7995
|
var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
7973
7996
|
var _ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
7974
7997
|
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
|
|
7975
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7998
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
7976
7999
|
var _useContext = React.useContext(BottomSheetContext),
|
|
7977
8000
|
setInternalShowDivider = _useContext.setInternalShowDivider;
|
|
7978
8001
|
var onScrollBeginDrag = React.useCallback(function (e) {
|
|
@@ -8287,7 +8310,7 @@ var borderWidths = {
|
|
|
8287
8310
|
var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
|
|
8288
8311
|
var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
|
|
8289
8312
|
|
|
8290
|
-
var _excluded$
|
|
8313
|
+
var _excluded$i = ["theme"];
|
|
8291
8314
|
var getThemeValue = function getThemeValue(theme, key, props) {
|
|
8292
8315
|
var propConfig = config[key];
|
|
8293
8316
|
var propValue = props[key];
|
|
@@ -8314,18 +8337,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
|
|
|
8314
8337
|
var configKeys = Object.keys(config);
|
|
8315
8338
|
var StyledBox = index$a(reactNative.View)(function (_ref5) {
|
|
8316
8339
|
var theme = _ref5.theme,
|
|
8317
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
8340
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$i);
|
|
8318
8341
|
var styleProps = pick(configKeys, otherProps);
|
|
8319
8342
|
var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
|
|
8320
8343
|
return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
|
|
8321
8344
|
});
|
|
8322
8345
|
|
|
8323
|
-
var _excluded$
|
|
8346
|
+
var _excluded$h = ["children", "style", "testID"];
|
|
8324
8347
|
var Box = function Box(_ref) {
|
|
8325
8348
|
var children = _ref.children,
|
|
8326
8349
|
style = _ref.style,
|
|
8327
8350
|
testID = _ref.testID,
|
|
8328
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
8351
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$h);
|
|
8329
8352
|
return /*#__PURE__*/React__default["default"].createElement(StyledBox, _extends$1({}, otherProps, {
|
|
8330
8353
|
style: style,
|
|
8331
8354
|
testID: testID
|
|
@@ -10651,7 +10674,7 @@ function ContentNavigator(_ref) {
|
|
|
10651
10674
|
}));
|
|
10652
10675
|
}
|
|
10653
10676
|
|
|
10654
|
-
var StyledContainer$
|
|
10677
|
+
var StyledContainer$5 = index$a(reactNative.View)(function (_ref) {
|
|
10655
10678
|
var theme = _ref.theme;
|
|
10656
10679
|
return {
|
|
10657
10680
|
backgroundColor: theme.__hd__.calendar.colors.background
|
|
@@ -10834,7 +10857,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
10834
10857
|
var disableNextButton = maxDate === undefined ? false : !daysOfNextMonth.some(function (date) {
|
|
10835
10858
|
return date !== undefined;
|
|
10836
10859
|
}) || maxDate <= lastDateOfMonth;
|
|
10837
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$
|
|
10860
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$5, null, /*#__PURE__*/React__default["default"].createElement(StyledCalendarHeader, null, /*#__PURE__*/React__default["default"].createElement(ContentNavigator, {
|
|
10838
10861
|
value: formatTime('MMMM yyyy', visibleDate),
|
|
10839
10862
|
onPreviousPress: onPreviousPress,
|
|
10840
10863
|
onNextPress: onNextPress,
|
|
@@ -10890,7 +10913,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
10890
10913
|
})));
|
|
10891
10914
|
};
|
|
10892
10915
|
|
|
10893
|
-
var _excluded$
|
|
10916
|
+
var _excluded$g = ["rounded", "size", "testID", "style"];
|
|
10894
10917
|
var Image = function Image(_ref) {
|
|
10895
10918
|
var _ref$rounded = _ref.rounded,
|
|
10896
10919
|
rounded = _ref$rounded === void 0 ? false : _ref$rounded,
|
|
@@ -10898,7 +10921,7 @@ var Image = function Image(_ref) {
|
|
|
10898
10921
|
size = _ref$size === void 0 ? '6xlarge' : _ref$size,
|
|
10899
10922
|
testID = _ref.testID,
|
|
10900
10923
|
style = _ref.style,
|
|
10901
|
-
imageNativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
10924
|
+
imageNativeProps = _objectWithoutProperties(_ref, _excluded$g);
|
|
10902
10925
|
var theme = useTheme();
|
|
10903
10926
|
var imageSize = theme.__hd__.image.sizes[size];
|
|
10904
10927
|
return /*#__PURE__*/React__default["default"].createElement(reactNative.Image, _extends$1({
|
|
@@ -11091,12 +11114,12 @@ var Indicator = index$a(reactNative.View)(function (_ref2) {
|
|
|
11091
11114
|
};
|
|
11092
11115
|
});
|
|
11093
11116
|
|
|
11094
|
-
var _excluded$
|
|
11117
|
+
var _excluded$f = ["intent", "children"];
|
|
11095
11118
|
var DataCard = function DataCard(_ref) {
|
|
11096
11119
|
var _ref$intent = _ref.intent,
|
|
11097
11120
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
11098
11121
|
children = _ref.children,
|
|
11099
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11122
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$f);
|
|
11100
11123
|
return /*#__PURE__*/React__default["default"].createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__default["default"].createElement(Indicator, {
|
|
11101
11124
|
themeIntent: intent,
|
|
11102
11125
|
testID: "data-card-indicator"
|
|
@@ -11114,11 +11137,11 @@ var StyledCard$1 = index$a(reactNative.View)(function (_ref) {
|
|
|
11114
11137
|
});
|
|
11115
11138
|
});
|
|
11116
11139
|
|
|
11117
|
-
var _excluded$
|
|
11140
|
+
var _excluded$e = ["intent", "children"];
|
|
11118
11141
|
var Card = function Card(_ref) {
|
|
11119
11142
|
var intent = _ref.intent,
|
|
11120
11143
|
children = _ref.children,
|
|
11121
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11144
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$e);
|
|
11122
11145
|
return /*#__PURE__*/React__default["default"].createElement(StyledCard$1, _extends$1({}, nativeProps, {
|
|
11123
11146
|
themeIntent: intent
|
|
11124
11147
|
}), children);
|
|
@@ -11306,7 +11329,7 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
11306
11329
|
}));
|
|
11307
11330
|
});
|
|
11308
11331
|
|
|
11309
|
-
var _excluded$
|
|
11332
|
+
var _excluded$d = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination"];
|
|
11310
11333
|
function useStateFromProp(initialValue) {
|
|
11311
11334
|
var _useState = React.useState(initialValue),
|
|
11312
11335
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11328,7 +11351,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
11328
11351
|
shouldShowPagination = _ref$shouldShowPagina === void 0 ? function () {
|
|
11329
11352
|
return true;
|
|
11330
11353
|
} : _ref$shouldShowPagina,
|
|
11331
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11354
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$d);
|
|
11332
11355
|
var carouselRef = React.useRef(null);
|
|
11333
11356
|
var _useStateFromProp = useStateFromProp(selectedItemIndex),
|
|
11334
11357
|
_useStateFromProp2 = _slicedToArray(_useStateFromProp, 2),
|
|
@@ -11488,7 +11511,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
11488
11511
|
})));
|
|
11489
11512
|
};
|
|
11490
11513
|
|
|
11491
|
-
var StyledContainer$
|
|
11514
|
+
var StyledContainer$4 = index$a(reactNative.View)(function (_ref) {
|
|
11492
11515
|
var theme = _ref.theme;
|
|
11493
11516
|
return {
|
|
11494
11517
|
width: '100%',
|
|
@@ -11640,7 +11663,7 @@ var StyledErrorAndMaxLengthContainer = index$a(reactNative.View)(function () {
|
|
|
11640
11663
|
};
|
|
11641
11664
|
});
|
|
11642
11665
|
|
|
11643
|
-
var _excluded$
|
|
11666
|
+
var _excluded$c = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
|
|
11644
11667
|
var getVariant$1 = function getVariant(_ref) {
|
|
11645
11668
|
var disabled = _ref.disabled,
|
|
11646
11669
|
error = _ref.error,
|
|
@@ -11688,7 +11711,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
11688
11711
|
renderInputValue = _ref2.renderInputValue,
|
|
11689
11712
|
_ref2$allowFontScalin = _ref2.allowFontScaling,
|
|
11690
11713
|
allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
|
|
11691
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
11714
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$c);
|
|
11692
11715
|
var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
|
|
11693
11716
|
var isEmptyValue = displayText.length === 0;
|
|
11694
11717
|
var actualSuffix = loading ? 'loading' : suffix;
|
|
@@ -11799,7 +11822,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
11799
11822
|
defaultValue: defaultValue,
|
|
11800
11823
|
placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
|
|
11801
11824
|
});
|
|
11802
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$
|
|
11825
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$4, {
|
|
11803
11826
|
style: styleWithoutBackgroundColor,
|
|
11804
11827
|
pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
|
|
11805
11828
|
testID: testID
|
|
@@ -12017,7 +12040,7 @@ var DatePicker = function DatePicker(props) {
|
|
|
12017
12040
|
};
|
|
12018
12041
|
|
|
12019
12042
|
var AnimatedPressable = reactNative.Animated.createAnimatedComponent(reactNative.Pressable);
|
|
12020
|
-
var StyledContainer$
|
|
12043
|
+
var StyledContainer$3 = index$a(reactNative.View)(function (_ref) {
|
|
12021
12044
|
var theme = _ref.theme,
|
|
12022
12045
|
enableShadow = _ref.enableShadow;
|
|
12023
12046
|
return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
@@ -12276,7 +12299,7 @@ var Drawer = function Drawer(_ref) {
|
|
|
12276
12299
|
return animation.stop();
|
|
12277
12300
|
};
|
|
12278
12301
|
}, [visible]);
|
|
12279
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$
|
|
12302
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$3, {
|
|
12280
12303
|
testID: testID,
|
|
12281
12304
|
enableShadow: enableShadow,
|
|
12282
12305
|
pointerEvents: "box-none"
|
|
@@ -12408,8 +12431,16 @@ var StyledErrorButtonSecondary = index$a(CompoundButton)(function (_ref5) {
|
|
|
12408
12431
|
padding: theme.__hd__.error.space.button.padding
|
|
12409
12432
|
};
|
|
12410
12433
|
});
|
|
12411
|
-
var
|
|
12434
|
+
var StyledErrorImageContainer = index$a(reactNative.View)(function (_ref6) {
|
|
12412
12435
|
var theme = _ref6.theme;
|
|
12436
|
+
return {
|
|
12437
|
+
marginBottom: theme.__hd__.error.space.imageMarginBottom,
|
|
12438
|
+
width: theme.__hd__.error.sizes.image,
|
|
12439
|
+
height: theme.__hd__.error.sizes.image
|
|
12440
|
+
};
|
|
12441
|
+
});
|
|
12442
|
+
var StyledErrorImage = index$a(Image)(function (_ref7) {
|
|
12443
|
+
var theme = _ref7.theme;
|
|
12413
12444
|
return {
|
|
12414
12445
|
marginBottom: theme.__hd__.error.space.imageMarginBottom,
|
|
12415
12446
|
width: theme.__hd__.error.sizes.image,
|
|
@@ -12417,8 +12448,8 @@ var StyledErrorImage = index$a(Image)(function (_ref6) {
|
|
|
12417
12448
|
resizeMode: 'contain'
|
|
12418
12449
|
};
|
|
12419
12450
|
});
|
|
12420
|
-
var StyledErrorTitle = index$a(Typography.Text)(function (
|
|
12421
|
-
var theme =
|
|
12451
|
+
var StyledErrorTitle = index$a(Typography.Text)(function (_ref8) {
|
|
12452
|
+
var theme = _ref8.theme;
|
|
12422
12453
|
return {
|
|
12423
12454
|
fontFamily: theme.__hd__.error.fonts.title,
|
|
12424
12455
|
fontSize: theme.__hd__.error.fontSizes.title,
|
|
@@ -12427,8 +12458,8 @@ var StyledErrorTitle = index$a(Typography.Text)(function (_ref7) {
|
|
|
12427
12458
|
color: theme.__hd__.error.colors.title
|
|
12428
12459
|
};
|
|
12429
12460
|
});
|
|
12430
|
-
var StyledErrorDescription = index$a(Typography.Text)(function (
|
|
12431
|
-
var theme =
|
|
12461
|
+
var StyledErrorDescription = index$a(Typography.Text)(function (_ref9) {
|
|
12462
|
+
var theme = _ref9.theme;
|
|
12432
12463
|
return {
|
|
12433
12464
|
fontFamily: theme.__hd__.error.fonts.description,
|
|
12434
12465
|
fontSize: theme.__hd__.error.fontSizes.description,
|
|
@@ -12437,8 +12468,21 @@ var StyledErrorDescription = index$a(Typography.Text)(function (_ref8) {
|
|
|
12437
12468
|
};
|
|
12438
12469
|
});
|
|
12439
12470
|
|
|
12440
|
-
var _excluded$
|
|
12471
|
+
var _excluded$b = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
|
|
12441
12472
|
_excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
12473
|
+
var renderImage = function renderImage(image) {
|
|
12474
|
+
if ( /*#__PURE__*/React.isValidElement(image)) {
|
|
12475
|
+
return /*#__PURE__*/React__default["default"].cloneElement(image, {
|
|
12476
|
+
testID: 'error-image'
|
|
12477
|
+
});
|
|
12478
|
+
}
|
|
12479
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledErrorImage, {
|
|
12480
|
+
source: typeof image === 'string' ? {
|
|
12481
|
+
uri: image
|
|
12482
|
+
} : image,
|
|
12483
|
+
testID: "error-image"
|
|
12484
|
+
});
|
|
12485
|
+
};
|
|
12442
12486
|
var ErrorPage = function ErrorPage(_ref) {
|
|
12443
12487
|
var _ref$variant = _ref.variant,
|
|
12444
12488
|
variant = _ref$variant === void 0 ? 'in-page' : _ref$variant,
|
|
@@ -12450,19 +12494,14 @@ var ErrorPage = function ErrorPage(_ref) {
|
|
|
12450
12494
|
onCtaPress = _ref.onCtaPress,
|
|
12451
12495
|
secondaryCtaText = _ref.secondaryCtaText,
|
|
12452
12496
|
onSecondaryCtaPress = _ref.onSecondaryCtaPress,
|
|
12453
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
12497
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$b);
|
|
12454
12498
|
var showCta = ctaText && onCtaPress !== undefined;
|
|
12455
12499
|
var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
|
|
12456
12500
|
var showButtonContainer = showCta || showSecondaryCta;
|
|
12457
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledErrorContainer$1, {
|
|
12501
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledErrorContainer$1, _extends$1({
|
|
12458
12502
|
testID: testID,
|
|
12459
12503
|
themeVariant: variant
|
|
12460
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledErrorContent,
|
|
12461
|
-
source: typeof image === 'string' ? {
|
|
12462
|
-
uri: image
|
|
12463
|
-
} : image,
|
|
12464
|
-
testID: "error-image"
|
|
12465
|
-
}), /*#__PURE__*/React__default["default"].createElement(StyledErrorTitle, null, title), description && /*#__PURE__*/React__default["default"].createElement(StyledErrorDescription, null, description)), showButtonContainer && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonPrimary, {
|
|
12504
|
+
}, nativeProps), /*#__PURE__*/React__default["default"].createElement(StyledErrorContent, null, image && /*#__PURE__*/React__default["default"].createElement(StyledErrorImageContainer, null, renderImage(image)), /*#__PURE__*/React__default["default"].createElement(StyledErrorTitle, null, title), description && /*#__PURE__*/React__default["default"].createElement(StyledErrorDescription, null, description)), showButtonContainer && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonPrimary, {
|
|
12466
12505
|
variant: "filled",
|
|
12467
12506
|
text: ctaText,
|
|
12468
12507
|
onPress: onCtaPress
|
|
@@ -12599,11 +12638,11 @@ var StyledFABText = index$a(Typography.Text)(function (_ref3) {
|
|
|
12599
12638
|
};
|
|
12600
12639
|
});
|
|
12601
12640
|
|
|
12602
|
-
var _excluded$
|
|
12641
|
+
var _excluded$a = ["active"];
|
|
12603
12642
|
var AnimatedIcons = reactNative.Animated.createAnimatedComponent(StyledFABIcon);
|
|
12604
12643
|
var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
|
|
12605
12644
|
var active = _ref.active,
|
|
12606
|
-
iconProps = _objectWithoutProperties(_ref, _excluded$
|
|
12645
|
+
iconProps = _objectWithoutProperties(_ref, _excluded$a);
|
|
12607
12646
|
var rotateAnimation = React.useRef(new reactNative.Animated.Value(active ? 1 : 0));
|
|
12608
12647
|
React.useEffect(function () {
|
|
12609
12648
|
var animation = reactNative.Animated.timing(rotateAnimation.current, {
|
|
@@ -12729,7 +12768,7 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
12729
12768
|
}), /*#__PURE__*/React__default["default"].createElement(StyledActionItemText, null, title)));
|
|
12730
12769
|
};
|
|
12731
12770
|
|
|
12732
|
-
var StyledContainer$
|
|
12771
|
+
var StyledContainer$2 = index$a(reactNative.View)({
|
|
12733
12772
|
position: 'absolute',
|
|
12734
12773
|
left: 0,
|
|
12735
12774
|
right: 0,
|
|
@@ -12816,7 +12855,7 @@ var ActionGroup = function ActionGroup(_ref2) {
|
|
|
12816
12855
|
inputRange: [0, 1],
|
|
12817
12856
|
outputRange: [0, 1]
|
|
12818
12857
|
});
|
|
12819
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$
|
|
12858
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$2, {
|
|
12820
12859
|
testID: testID,
|
|
12821
12860
|
pointerEvents: "box-none",
|
|
12822
12861
|
style: style
|
|
@@ -13276,7 +13315,7 @@ var THEME_INTENT_MAP = {
|
|
|
13276
13315
|
'archived-inverted': 'archivedInverted'
|
|
13277
13316
|
};
|
|
13278
13317
|
|
|
13279
|
-
var StyledContainer = index$a(reactNative.View)(function (_ref) {
|
|
13318
|
+
var StyledContainer$1 = index$a(reactNative.View)(function (_ref) {
|
|
13280
13319
|
var theme = _ref.theme;
|
|
13281
13320
|
return {
|
|
13282
13321
|
flexDirection: 'row',
|
|
@@ -13342,7 +13381,7 @@ var StyledStrokeEnd = index$a(reactNative.View)(function (_ref6) {
|
|
|
13342
13381
|
};
|
|
13343
13382
|
});
|
|
13344
13383
|
|
|
13345
|
-
var _excluded$
|
|
13384
|
+
var _excluded$9 = ["value", "renderValue", "intent", "style", "testID"];
|
|
13346
13385
|
var HalfCircle = function HalfCircle(_ref) {
|
|
13347
13386
|
var type = _ref.type,
|
|
13348
13387
|
themeIntent = _ref.themeIntent;
|
|
@@ -13363,7 +13402,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
13363
13402
|
intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
|
|
13364
13403
|
style = _ref2.style,
|
|
13365
13404
|
testID = _ref2.testID,
|
|
13366
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
13405
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$9);
|
|
13367
13406
|
var theme = useTheme$1();
|
|
13368
13407
|
var radius = theme.__hd__.progress.sizes.circleDiameter / 2;
|
|
13369
13408
|
var progressAnimatedValue = React.useRef(new reactNative.Animated.Value(0));
|
|
@@ -13403,7 +13442,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
13403
13442
|
return /*#__PURE__*/React__default["default"].createElement(reactNative.View, _extends$1({}, nativeProps, {
|
|
13404
13443
|
testID: testID,
|
|
13405
13444
|
style: style
|
|
13406
|
-
}), /*#__PURE__*/React__default["default"].createElement(StyledContainer, null, /*#__PURE__*/React__default["default"].createElement(reactNative.View, null, /*#__PURE__*/React__default["default"].createElement(HalfCircle, {
|
|
13445
|
+
}), /*#__PURE__*/React__default["default"].createElement(StyledContainer$1, null, /*#__PURE__*/React__default["default"].createElement(reactNative.View, null, /*#__PURE__*/React__default["default"].createElement(HalfCircle, {
|
|
13407
13446
|
type: "foreground",
|
|
13408
13447
|
themeIntent: intent
|
|
13409
13448
|
}), /*#__PURE__*/React__default["default"].createElement(reactNative.Animated.View, {
|
|
@@ -13480,14 +13519,14 @@ var StyledInner = index$a(reactNative.Animated.View)(function (_ref2) {
|
|
|
13480
13519
|
};
|
|
13481
13520
|
});
|
|
13482
13521
|
|
|
13483
|
-
var _excluded$
|
|
13522
|
+
var _excluded$8 = ["value", "intent", "style", "testID"];
|
|
13484
13523
|
var ProgressBar = function ProgressBar(_ref) {
|
|
13485
13524
|
var value = _ref.value,
|
|
13486
13525
|
_ref$intent = _ref.intent,
|
|
13487
13526
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
13488
13527
|
style = _ref.style,
|
|
13489
13528
|
testID = _ref.testID,
|
|
13490
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
13529
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$8);
|
|
13491
13530
|
var _useState = React.useState(0),
|
|
13492
13531
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13493
13532
|
width = _useState2[0],
|
|
@@ -13678,14 +13717,14 @@ var AnimatedSpinner = function AnimatedSpinner(_ref) {
|
|
|
13678
13717
|
}, dotProps))));
|
|
13679
13718
|
};
|
|
13680
13719
|
|
|
13681
|
-
var _excluded$
|
|
13720
|
+
var _excluded$7 = ["testID", "size", "intent"];
|
|
13682
13721
|
var Spinner = function Spinner(_ref) {
|
|
13683
13722
|
var testID = _ref.testID,
|
|
13684
13723
|
_ref$size = _ref.size,
|
|
13685
13724
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
13686
13725
|
_ref$intent = _ref.intent,
|
|
13687
13726
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
13688
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
13727
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
13689
13728
|
return /*#__PURE__*/React__default["default"].createElement(StyledView$1, nativeProps, /*#__PURE__*/React__default["default"].createElement(StyledSpinnerContainer, {
|
|
13690
13729
|
testID: testID
|
|
13691
13730
|
}, /*#__PURE__*/React__default["default"].createElement(AnimatedSpinner, {
|
|
@@ -13718,7 +13757,7 @@ var SwipeableAction = function SwipeableAction(_ref) {
|
|
|
13718
13757
|
}, children);
|
|
13719
13758
|
};
|
|
13720
13759
|
|
|
13721
|
-
var _excluded$
|
|
13760
|
+
var _excluded$6 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
|
|
13722
13761
|
var renderActions = function renderActions(actions, width, progress, direction) {
|
|
13723
13762
|
var trans = progress.interpolate({
|
|
13724
13763
|
inputRange: [0, 1],
|
|
@@ -13743,7 +13782,7 @@ var Swipeable = function Swipeable(_ref) {
|
|
|
13743
13782
|
leftActionsWidth = _ref.leftActionsWidth,
|
|
13744
13783
|
rightActions = _ref.rightActions,
|
|
13745
13784
|
rightActionsWidth = _ref.rightActionsWidth,
|
|
13746
|
-
swipeableProps = _objectWithoutProperties(_ref, _excluded$
|
|
13785
|
+
swipeableProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
13747
13786
|
var _useWindowDimensions = reactNative.useWindowDimensions(),
|
|
13748
13787
|
width = _useWindowDimensions.width;
|
|
13749
13788
|
var swipeableRef = React.useRef(null);
|
|
@@ -14048,7 +14087,7 @@ var StyledSectionList = index$a(reactNative.SectionList)(function (_ref4) {
|
|
|
14048
14087
|
};
|
|
14049
14088
|
});
|
|
14050
14089
|
|
|
14051
|
-
var _excluded$
|
|
14090
|
+
var _excluded$5 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
|
|
14052
14091
|
var BaseOptionList = function BaseOptionList(_ref) {
|
|
14053
14092
|
var keyExtractor = _ref.keyExtractor,
|
|
14054
14093
|
loading = _ref.loading,
|
|
@@ -14057,7 +14096,7 @@ var BaseOptionList = function BaseOptionList(_ref) {
|
|
|
14057
14096
|
sections = _ref.sections,
|
|
14058
14097
|
renderItem = _ref.renderItem,
|
|
14059
14098
|
sectionListRef = _ref.sectionListRef,
|
|
14060
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14099
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
14061
14100
|
var theme = useTheme$1();
|
|
14062
14101
|
var _useState = React.useState(false),
|
|
14063
14102
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -14126,7 +14165,7 @@ var Option$2 = function Option(_ref) {
|
|
|
14126
14165
|
return highlighted === true ? /*#__PURE__*/React__default["default"].createElement(List.Item, props) : /*#__PURE__*/React__default["default"].createElement(List.BasicItem, props);
|
|
14127
14166
|
};
|
|
14128
14167
|
|
|
14129
|
-
var _excluded$
|
|
14168
|
+
var _excluded$4 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
14130
14169
|
var OptionList$1 = function OptionList(_ref) {
|
|
14131
14170
|
var keyExtractor = _ref.keyExtractor,
|
|
14132
14171
|
loading = _ref.loading,
|
|
@@ -14137,7 +14176,7 @@ var OptionList$1 = function OptionList(_ref) {
|
|
|
14137
14176
|
renderOption = _ref.renderOption,
|
|
14138
14177
|
value = _ref.value,
|
|
14139
14178
|
sectionListRef = _ref.sectionListRef,
|
|
14140
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14179
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
14141
14180
|
var renderItem = function renderItem(info) {
|
|
14142
14181
|
var item = info.item;
|
|
14143
14182
|
var selected = value.includes(info.item.value);
|
|
@@ -14325,7 +14364,7 @@ var StyledOptionList = index$a(BaseOptionList)(function (_ref) {
|
|
|
14325
14364
|
};
|
|
14326
14365
|
});
|
|
14327
14366
|
|
|
14328
|
-
var _excluded$
|
|
14367
|
+
var _excluded$3 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
14329
14368
|
var OptionList = function OptionList(_ref) {
|
|
14330
14369
|
var keyExtractor = _ref.keyExtractor,
|
|
14331
14370
|
loading = _ref.loading,
|
|
@@ -14336,7 +14375,7 @@ var OptionList = function OptionList(_ref) {
|
|
|
14336
14375
|
renderOption = _ref.renderOption,
|
|
14337
14376
|
value = _ref.value,
|
|
14338
14377
|
sectionListRef = _ref.sectionListRef,
|
|
14339
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14378
|
+
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
14340
14379
|
var renderItem = function renderItem(info) {
|
|
14341
14380
|
var item = info.item;
|
|
14342
14381
|
var selected = item.value === value;
|
|
@@ -14483,6 +14522,120 @@ var index$4 = Object.assign(SingleSelect, {
|
|
|
14483
14522
|
Multi: MultiSelect
|
|
14484
14523
|
});
|
|
14485
14524
|
|
|
14525
|
+
var StyledContainer = index$a(Box)(function (_ref) {
|
|
14526
|
+
var theme = _ref.theme,
|
|
14527
|
+
themeIntent = _ref.themeIntent,
|
|
14528
|
+
themeVariant = _ref.themeVariant;
|
|
14529
|
+
return {
|
|
14530
|
+
backgroundColor: themeIntent === 'light' ? theme.__hd__.skeleton.colors.lightBackground : theme.__hd__.skeleton.colors.darkBackground,
|
|
14531
|
+
borderRadius: theme.__hd__.skeleton.radii[themeVariant]
|
|
14532
|
+
};
|
|
14533
|
+
});
|
|
14534
|
+
var StyledGradientContainer = index$a(Box)(function (_ref2) {
|
|
14535
|
+
var theme = _ref2.theme,
|
|
14536
|
+
themeVariant = _ref2.themeVariant;
|
|
14537
|
+
return {
|
|
14538
|
+
overflow: 'hidden',
|
|
14539
|
+
borderRadius: theme.__hd__.skeleton.radii[themeVariant]
|
|
14540
|
+
};
|
|
14541
|
+
});
|
|
14542
|
+
|
|
14543
|
+
var _excluded$2 = ["intent", "variant", "style", "onLayout"];
|
|
14544
|
+
var AnimatedLinearGradient = reactNative.Animated.createAnimatedComponent(LinearGradient__default["default"]);
|
|
14545
|
+
var gradientPositions = {
|
|
14546
|
+
start: {
|
|
14547
|
+
x: 0,
|
|
14548
|
+
y: 0
|
|
14549
|
+
},
|
|
14550
|
+
end: {
|
|
14551
|
+
x: 1,
|
|
14552
|
+
y: 0
|
|
14553
|
+
}
|
|
14554
|
+
};
|
|
14555
|
+
var getGradientColors = function getGradientColors(theme, intent) {
|
|
14556
|
+
switch (intent) {
|
|
14557
|
+
case 'light':
|
|
14558
|
+
{
|
|
14559
|
+
return [theme.__hd__.skeleton.colors.lightGradientStart, theme.__hd__.skeleton.colors.lightGradientEnd, theme.__hd__.skeleton.colors.lightGradientStart];
|
|
14560
|
+
}
|
|
14561
|
+
case 'dark':
|
|
14562
|
+
{
|
|
14563
|
+
return [theme.__hd__.skeleton.colors.darkGradientStart, theme.__hd__.skeleton.colors.darkGradientEnd, theme.__hd__.skeleton.colors.darkGradientStart];
|
|
14564
|
+
}
|
|
14565
|
+
}
|
|
14566
|
+
};
|
|
14567
|
+
var Skeleton = function Skeleton(_ref) {
|
|
14568
|
+
var _StyleSheet$flatten, _StyleSheet$flatten2;
|
|
14569
|
+
var _ref$intent = _ref.intent,
|
|
14570
|
+
intent = _ref$intent === void 0 ? 'light' : _ref$intent,
|
|
14571
|
+
_ref$variant = _ref.variant,
|
|
14572
|
+
variant = _ref$variant === void 0 ? 'rounded' : _ref$variant,
|
|
14573
|
+
style = _ref.style,
|
|
14574
|
+
onLayout = _ref.onLayout,
|
|
14575
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
14576
|
+
var theme = useTheme();
|
|
14577
|
+
var colors = React.useMemo(function () {
|
|
14578
|
+
return getGradientColors(theme, intent);
|
|
14579
|
+
}, [theme, intent]);
|
|
14580
|
+
var _useState = React.useState(Number((_StyleSheet$flatten = reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.width) || 0),
|
|
14581
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14582
|
+
containerWidth = _useState2[0],
|
|
14583
|
+
setContainerWidth = _useState2[1];
|
|
14584
|
+
var _useState3 = React.useState(Number((_StyleSheet$flatten2 = reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten2 === void 0 ? void 0 : _StyleSheet$flatten2.height) || 0),
|
|
14585
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14586
|
+
containerHeight = _useState4[0],
|
|
14587
|
+
setContainerHeight = _useState4[1];
|
|
14588
|
+
var _useState5 = React.useState(false),
|
|
14589
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
14590
|
+
shouldStartAnimation = _useState6[0],
|
|
14591
|
+
setShouldStartAnimation = _useState6[1];
|
|
14592
|
+
var animatedValue = React.useRef(new reactNative.Animated.Value(0)).current;
|
|
14593
|
+
React.useEffect(function () {
|
|
14594
|
+
if (shouldStartAnimation) {
|
|
14595
|
+
reactNative.Animated.loop(reactNative.Animated.timing(animatedValue, {
|
|
14596
|
+
toValue: 1,
|
|
14597
|
+
duration: 1000,
|
|
14598
|
+
easing: reactNative.Easing.linear,
|
|
14599
|
+
useNativeDriver: reactNative.Platform.OS === 'ios' || reactNative.Platform.OS === 'android'
|
|
14600
|
+
})).start();
|
|
14601
|
+
}
|
|
14602
|
+
}, [shouldStartAnimation]);
|
|
14603
|
+
var translateX = animatedValue.interpolate({
|
|
14604
|
+
inputRange: [0, 1],
|
|
14605
|
+
outputRange: [-containerWidth, containerWidth]
|
|
14606
|
+
});
|
|
14607
|
+
var onContainerLayout = React.useCallback(function (e) {
|
|
14608
|
+
var _e$nativeEvent$layout = e.nativeEvent.layout,
|
|
14609
|
+
width = _e$nativeEvent$layout.width,
|
|
14610
|
+
height = _e$nativeEvent$layout.height;
|
|
14611
|
+
setContainerHeight(height);
|
|
14612
|
+
setContainerWidth(width);
|
|
14613
|
+
if (!shouldStartAnimation) {
|
|
14614
|
+
setShouldStartAnimation(true);
|
|
14615
|
+
}
|
|
14616
|
+
onLayout === null || onLayout === void 0 ? void 0 : onLayout(e);
|
|
14617
|
+
}, []);
|
|
14618
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer, _extends$1({
|
|
14619
|
+
style: style,
|
|
14620
|
+
themeVariant: variant,
|
|
14621
|
+
themeIntent: intent,
|
|
14622
|
+
onLayout: onContainerLayout
|
|
14623
|
+
}, props), /*#__PURE__*/React__default["default"].createElement(StyledGradientContainer, {
|
|
14624
|
+
themeVariant: variant
|
|
14625
|
+
}, /*#__PURE__*/React__default["default"].createElement(AnimatedLinearGradient, {
|
|
14626
|
+
start: gradientPositions.start,
|
|
14627
|
+
end: gradientPositions.end,
|
|
14628
|
+
style: {
|
|
14629
|
+
width: containerWidth,
|
|
14630
|
+
height: containerHeight,
|
|
14631
|
+
transform: [{
|
|
14632
|
+
translateX: translateX
|
|
14633
|
+
}]
|
|
14634
|
+
},
|
|
14635
|
+
colors: colors
|
|
14636
|
+
})));
|
|
14637
|
+
};
|
|
14638
|
+
|
|
14486
14639
|
var StyledWrapper$1 = index$a(reactNative.View)(function (_ref) {
|
|
14487
14640
|
var theme = _ref.theme;
|
|
14488
14641
|
return {
|
|
@@ -32066,7 +32219,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
32066
32219
|
break;
|
|
32067
32220
|
}
|
|
32068
32221
|
}, []);
|
|
32069
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$
|
|
32222
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$4, {
|
|
32070
32223
|
testID: testID
|
|
32071
32224
|
}, /*#__PURE__*/React__default["default"].createElement(StyledTextInputContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledBorderBackDrop, {
|
|
32072
32225
|
themeVariant: variant,
|
|
@@ -32157,6 +32310,7 @@ exports.RefreshControl = RefreshControl;
|
|
|
32157
32310
|
exports.RichTextEditor = index;
|
|
32158
32311
|
exports.SectionHeading = SectionHeading;
|
|
32159
32312
|
exports.Select = index$4;
|
|
32313
|
+
exports.Skeleton = Skeleton;
|
|
32160
32314
|
exports.Slider = Slider;
|
|
32161
32315
|
exports.Spinner = Spinner;
|
|
32162
32316
|
exports.Swipeable = index$5;
|