@hero-design/rn 8.65.1-alpha.0 → 8.65.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +541 -534
- package/package.json +1 -1
- package/rollup.config.mjs +2 -0
package/lib/index.js
CHANGED
|
@@ -13,7 +13,10 @@ var PagerView = require('react-native-pager-view');
|
|
|
13
13
|
var events = require('events');
|
|
14
14
|
var reactNativeWebview = require('react-native-webview');
|
|
15
15
|
|
|
16
|
-
function
|
|
16
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
17
|
+
|
|
18
|
+
function _interopNamespaceCompat(e) {
|
|
19
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
17
20
|
var n = Object.create(null);
|
|
18
21
|
if (e) {
|
|
19
22
|
Object.keys(e).forEach(function (k) {
|
|
@@ -30,8 +33,12 @@ function _interopNamespaceDefault(e) {
|
|
|
30
33
|
return Object.freeze(n);
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
var reactNative__namespace = /*#__PURE__*/
|
|
34
|
-
var React__namespace = /*#__PURE__*/
|
|
36
|
+
var reactNative__namespace = /*#__PURE__*/_interopNamespaceCompat(reactNative);
|
|
37
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
38
|
+
var DateTimePicker__default = /*#__PURE__*/_interopDefaultCompat(DateTimePicker);
|
|
39
|
+
var RnSlider__default = /*#__PURE__*/_interopDefaultCompat(RnSlider);
|
|
40
|
+
var LinearGradient__default = /*#__PURE__*/_interopDefaultCompat(LinearGradient);
|
|
41
|
+
var PagerView__default = /*#__PURE__*/_interopDefaultCompat(PagerView);
|
|
35
42
|
|
|
36
43
|
function _iterableToArrayLimit(r, l) {
|
|
37
44
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
@@ -5004,15 +5011,15 @@ var ThemeSwitcher = function ThemeSwitcher(_ref) {
|
|
|
5004
5011
|
return getTheme$1(scale$1, swagDarkSystemPalette);
|
|
5005
5012
|
}
|
|
5006
5013
|
}, [name]);
|
|
5007
|
-
return /*#__PURE__*/
|
|
5014
|
+
return /*#__PURE__*/React__namespace.default.createElement(ThemeProvider, {
|
|
5008
5015
|
theme: theme
|
|
5009
5016
|
}, children);
|
|
5010
5017
|
};
|
|
5011
5018
|
var withTheme = function withTheme(C, themeName) {
|
|
5012
5019
|
return function (props) {
|
|
5013
|
-
return /*#__PURE__*/
|
|
5020
|
+
return /*#__PURE__*/React__namespace.default.createElement(ThemeSwitcher, {
|
|
5014
5021
|
name: themeName
|
|
5015
|
-
}, /*#__PURE__*/
|
|
5022
|
+
}, /*#__PURE__*/React__namespace.default.createElement(C, props));
|
|
5016
5023
|
};
|
|
5017
5024
|
};
|
|
5018
5025
|
|
|
@@ -6749,14 +6756,14 @@ var index$9 = components.reduce(function (acc, comp) {
|
|
|
6749
6756
|
|
|
6750
6757
|
// Get previous state value
|
|
6751
6758
|
var usePrevious = function usePrevious(value) {
|
|
6752
|
-
var ref =
|
|
6753
|
-
|
|
6759
|
+
var ref = React__namespace.default.useRef();
|
|
6760
|
+
React__namespace.default.useEffect(function () {
|
|
6754
6761
|
ref.current = value;
|
|
6755
6762
|
}, [value]);
|
|
6756
6763
|
return ref.current;
|
|
6757
6764
|
};
|
|
6758
6765
|
function usePropsOrInternalState(initialState, state, setState) {
|
|
6759
|
-
var _React$useState =
|
|
6766
|
+
var _React$useState = React__namespace.default.useState(initialState),
|
|
6760
6767
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
6761
6768
|
internalState = _React$useState2[0],
|
|
6762
6769
|
setInternalState = _React$useState2[1];
|
|
@@ -6804,11 +6811,11 @@ var Collapse = function Collapse(_ref) {
|
|
|
6804
6811
|
testID = _ref.testID,
|
|
6805
6812
|
style = _ref.style,
|
|
6806
6813
|
onLayout = _ref.onLayout;
|
|
6807
|
-
var _React$useState =
|
|
6814
|
+
var _React$useState = React__namespace.default.useState(0),
|
|
6808
6815
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
6809
6816
|
contentHeight = _React$useState2[0],
|
|
6810
6817
|
setContentHeight = _React$useState2[1];
|
|
6811
|
-
var _React$useState3 =
|
|
6818
|
+
var _React$useState3 = React__namespace.default.useState(false),
|
|
6812
6819
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
6813
6820
|
componentMounted = _React$useState4[0],
|
|
6814
6821
|
setComponentMounted = _React$useState4[1];
|
|
@@ -6826,13 +6833,13 @@ var Collapse = function Collapse(_ref) {
|
|
|
6826
6833
|
setComponentMounted(true);
|
|
6827
6834
|
onLayout === null || onLayout === void 0 || onLayout(e);
|
|
6828
6835
|
}, []);
|
|
6829
|
-
return /*#__PURE__*/
|
|
6836
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$d, {
|
|
6830
6837
|
style: {
|
|
6831
6838
|
height: open ? contentHeight : 0
|
|
6832
6839
|
},
|
|
6833
6840
|
onLayout: onCollapseLayout,
|
|
6834
6841
|
testID: testID
|
|
6835
|
-
}, /*#__PURE__*/
|
|
6842
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledHiddenWrapper, null, /*#__PURE__*/React__namespace.default.createElement(StyledChildWrapper, {
|
|
6836
6843
|
onLayout: function onLayout(event) {
|
|
6837
6844
|
return fetchMaxHeight(event.nativeEvent.layout);
|
|
6838
6845
|
},
|
|
@@ -6908,7 +6915,7 @@ var Text = function Text(_ref) {
|
|
|
6908
6915
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6909
6916
|
nativeProps = _objectWithoutProperties(_ref, _excluded$D);
|
|
6910
6917
|
useDeprecation('Typography.Text is deprecated and will be removed in the next major release, please refer to https://design.employmenthero.com/mobile/Components/typography for the appropriate alternatives.');
|
|
6911
|
-
return /*#__PURE__*/
|
|
6918
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
6912
6919
|
themeFontSize: fontSize,
|
|
6913
6920
|
themeFontWeight: fontWeight,
|
|
6914
6921
|
themeIntent: intent,
|
|
@@ -6946,7 +6953,7 @@ var Caption = function Caption(_ref) {
|
|
|
6946
6953
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6947
6954
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6948
6955
|
nativeProps = _objectWithoutProperties(_ref, _excluded$C);
|
|
6949
|
-
return /*#__PURE__*/
|
|
6956
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledCaption, _extends$1({}, nativeProps, {
|
|
6950
6957
|
themeFontWeight: fontWeight,
|
|
6951
6958
|
themeIntent: intent,
|
|
6952
6959
|
allowFontScaling: allowFontScaling
|
|
@@ -6972,7 +6979,7 @@ var Label = function Label(_ref) {
|
|
|
6972
6979
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6973
6980
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6974
6981
|
nativeProps = _objectWithoutProperties(_ref, _excluded$B);
|
|
6975
|
-
return /*#__PURE__*/
|
|
6982
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledLabel$1, _extends$1({}, nativeProps, {
|
|
6976
6983
|
themeIntent: intent,
|
|
6977
6984
|
allowFontScaling: allowFontScaling
|
|
6978
6985
|
}), children);
|
|
@@ -7004,7 +7011,7 @@ var Title = function Title(_ref) {
|
|
|
7004
7011
|
_ref$typeface = _ref.typeface,
|
|
7005
7012
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
7006
7013
|
nativeProps = _objectWithoutProperties(_ref, _excluded$A);
|
|
7007
|
-
return /*#__PURE__*/
|
|
7014
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledTitle$1, _extends$1({}, nativeProps, {
|
|
7008
7015
|
themeLevel: level,
|
|
7009
7016
|
themeTypeface: typeface,
|
|
7010
7017
|
themeIntent: intent,
|
|
@@ -7050,7 +7057,7 @@ var Body = function Body(_ref) {
|
|
|
7050
7057
|
_ref$variant = _ref.variant,
|
|
7051
7058
|
variant = _ref$variant === void 0 ? 'regular' : _ref$variant,
|
|
7052
7059
|
nativeProps = _objectWithoutProperties(_ref, _excluded$z);
|
|
7053
|
-
return /*#__PURE__*/
|
|
7060
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledBody, _extends$1({}, nativeProps, {
|
|
7054
7061
|
themeTypeface: typeface,
|
|
7055
7062
|
themeIntent: intent,
|
|
7056
7063
|
themeVariant: variant,
|
|
@@ -7637,13 +7644,13 @@ var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
|
7637
7644
|
inputRange: [0, 1],
|
|
7638
7645
|
outputRange: ['0deg', '360deg']
|
|
7639
7646
|
});
|
|
7640
|
-
return /*#__PURE__*/
|
|
7647
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
7641
7648
|
style: [{
|
|
7642
7649
|
transform: [{
|
|
7643
7650
|
rotate: interpolatedRotateAnimation
|
|
7644
7651
|
}]
|
|
7645
7652
|
}, style]
|
|
7646
|
-
}, /*#__PURE__*/
|
|
7653
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledHeroIcon, otherProps));
|
|
7647
7654
|
};
|
|
7648
7655
|
|
|
7649
7656
|
var Icon = function Icon(_ref) {
|
|
@@ -7681,13 +7688,13 @@ var Icon = function Icon(_ref) {
|
|
|
7681
7688
|
accessibilityViewIsModal: accessibilityViewIsModal,
|
|
7682
7689
|
accessibilityActions: accessibilityActions
|
|
7683
7690
|
};
|
|
7684
|
-
return spin ? /*#__PURE__*/
|
|
7691
|
+
return spin ? /*#__PURE__*/React__namespace.default.createElement(AnimatedIcon, _extends$1({
|
|
7685
7692
|
name: icon,
|
|
7686
7693
|
themeIntent: intent,
|
|
7687
7694
|
themeSize: size,
|
|
7688
7695
|
style: style,
|
|
7689
7696
|
testID: testID
|
|
7690
|
-
}, accessibilityProps)) : /*#__PURE__*/
|
|
7697
|
+
}, accessibilityProps)) : /*#__PURE__*/React__namespace.default.createElement(StyledHeroIcon, _extends$1({
|
|
7691
7698
|
name: icon,
|
|
7692
7699
|
themeIntent: intent,
|
|
7693
7700
|
themeSize: size,
|
|
@@ -7707,19 +7714,19 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
7707
7714
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
7708
7715
|
style = _ref.style,
|
|
7709
7716
|
testID = _ref.testID;
|
|
7710
|
-
return /*#__PURE__*/
|
|
7717
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledItemWrapper$1, {
|
|
7711
7718
|
themeVariant: variant,
|
|
7712
7719
|
style: style,
|
|
7713
7720
|
testID: testID
|
|
7714
|
-
}, /*#__PURE__*/
|
|
7721
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledHeaderWrapper$1, {
|
|
7715
7722
|
onPress: onPress
|
|
7716
|
-
}, typeof header === 'string' ? /*#__PURE__*/
|
|
7723
|
+
}, typeof header === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
7717
7724
|
variant: "regular-bold"
|
|
7718
|
-
}, header) : header, /*#__PURE__*/
|
|
7725
|
+
}, header) : header, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
7719
7726
|
icon: open ? 'arrow-up' : 'arrow-down',
|
|
7720
7727
|
intent: "secondary",
|
|
7721
7728
|
size: "small"
|
|
7722
|
-
})), /*#__PURE__*/
|
|
7729
|
+
})), /*#__PURE__*/React__namespace.default.createElement(StyledCollapse, {
|
|
7723
7730
|
open: open
|
|
7724
7731
|
}, content));
|
|
7725
7732
|
};
|
|
@@ -7740,18 +7747,18 @@ var Accordion = function Accordion(_ref) {
|
|
|
7740
7747
|
_usePropsOrInternalSt2 = _slicedToArray(_usePropsOrInternalSt, 2),
|
|
7741
7748
|
_activeItemKey = _usePropsOrInternalSt2[0],
|
|
7742
7749
|
_onItemPress = _usePropsOrInternalSt2[1];
|
|
7743
|
-
return /*#__PURE__*/
|
|
7750
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$c, {
|
|
7744
7751
|
style: style,
|
|
7745
7752
|
testID: testID
|
|
7746
7753
|
}, items.map(function (_ref2, index) {
|
|
7747
7754
|
var key = _ref2.key,
|
|
7748
7755
|
props = _objectWithoutProperties(_ref2, _excluded$x);
|
|
7749
7756
|
var open = _activeItemKey === key;
|
|
7750
|
-
return /*#__PURE__*/
|
|
7757
|
+
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, {
|
|
7751
7758
|
key: key
|
|
7752
|
-
}, variant === 'card' && index !== 0 && /*#__PURE__*/
|
|
7759
|
+
}, variant === 'card' && index !== 0 && /*#__PURE__*/React__namespace.default.createElement(Spacer$1, {
|
|
7753
7760
|
testID: "accordion-spacer"
|
|
7754
|
-
}), /*#__PURE__*/
|
|
7761
|
+
}), /*#__PURE__*/React__namespace.default.createElement(AccordionItem, _extends$1({}, props, {
|
|
7755
7762
|
open: open,
|
|
7756
7763
|
onPress: function onPress() {
|
|
7757
7764
|
return _onItemPress(open ? defaultValue : key);
|
|
@@ -7822,9 +7829,9 @@ var getIntentIcon$1 = function getIntentIcon(intent) {
|
|
|
7822
7829
|
};
|
|
7823
7830
|
var AlertIcon = function AlertIcon(_ref) {
|
|
7824
7831
|
var icon = _ref.icon;
|
|
7825
|
-
return icon ? /*#__PURE__*/
|
|
7832
|
+
return icon ? /*#__PURE__*/React__namespace.default.createElement(IconContainer$1, {
|
|
7826
7833
|
testID: "alert-left-icon"
|
|
7827
|
-
}, /*#__PURE__*/
|
|
7834
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
7828
7835
|
icon: icon,
|
|
7829
7836
|
size: "small"
|
|
7830
7837
|
})) : null;
|
|
@@ -7842,25 +7849,25 @@ var Alert = function Alert(_ref2) {
|
|
|
7842
7849
|
testID = _ref2.testID,
|
|
7843
7850
|
actionLabel = _ref2.actionLabel;
|
|
7844
7851
|
useDeprecation("Alert's notification intent is deprecated and will be removed in the next major release. Please use other intents instead.", intent === 'notification');
|
|
7845
|
-
return /*#__PURE__*/
|
|
7852
|
+
return /*#__PURE__*/React__namespace.default.createElement(Container$1, {
|
|
7846
7853
|
themeVariant: variant,
|
|
7847
7854
|
themeIntent: intent,
|
|
7848
7855
|
style: style,
|
|
7849
7856
|
testID: testID
|
|
7850
|
-
}, /*#__PURE__*/
|
|
7857
|
+
}, /*#__PURE__*/React__namespace.default.createElement(ContentContainer$1, {
|
|
7851
7858
|
showDivider: !!onClose
|
|
7852
|
-
}, icon !== null ? /*#__PURE__*/
|
|
7859
|
+
}, icon !== null ? /*#__PURE__*/React__namespace.default.createElement(AlertIcon, {
|
|
7853
7860
|
icon: icon || getIntentIcon$1(intent)
|
|
7854
|
-
}) : null, /*#__PURE__*/
|
|
7861
|
+
}) : null, /*#__PURE__*/React__namespace.default.createElement(TextContainer$1, null, typeof title === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
7855
7862
|
variant: "small-bold"
|
|
7856
|
-
}, title) : title, typeof content === 'string' ? /*#__PURE__*/
|
|
7863
|
+
}, title) : title, typeof content === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
7857
7864
|
variant: "small"
|
|
7858
|
-
}, content) : content)), onClose ? /*#__PURE__*/
|
|
7865
|
+
}, content) : content)), onClose ? /*#__PURE__*/React__namespace.default.createElement(CTAWrapper$1, {
|
|
7859
7866
|
onPress: onClose,
|
|
7860
7867
|
testID: "alert-close-icon"
|
|
7861
|
-
}, typeof actionLabel === 'string' ? /*#__PURE__*/
|
|
7868
|
+
}, typeof actionLabel === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
7862
7869
|
variant: "small-bold"
|
|
7863
|
-
}, actionLabel) : /*#__PURE__*/
|
|
7870
|
+
}, actionLabel) : /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
7864
7871
|
icon: "cancel",
|
|
7865
7872
|
size: "small"
|
|
7866
7873
|
})) : null);
|
|
@@ -7908,26 +7915,26 @@ var Attachment = function Attachment(_ref) {
|
|
|
7908
7915
|
backgroundHighlighted = _ref$backgroundHighli === void 0 ? false : _ref$backgroundHighli,
|
|
7909
7916
|
style = _ref.style,
|
|
7910
7917
|
testID = _ref.testID;
|
|
7911
|
-
return /*#__PURE__*/
|
|
7918
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$6, {
|
|
7912
7919
|
testID: testID,
|
|
7913
7920
|
style: style
|
|
7914
|
-
}, /*#__PURE__*/
|
|
7921
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledContentContainer$1, {
|
|
7915
7922
|
themeHighlighted: backgroundHighlighted
|
|
7916
|
-
}, previewElement, filename ? /*#__PURE__*/
|
|
7923
|
+
}, previewElement, filename ? /*#__PURE__*/React__namespace.default.createElement(StyledTextContainer, {
|
|
7917
7924
|
testID: "attachment-content"
|
|
7918
|
-
}, /*#__PURE__*/
|
|
7925
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
7919
7926
|
variant: "small",
|
|
7920
7927
|
numberOfLines: 1
|
|
7921
|
-
}, filename)) : null), onDownload ? /*#__PURE__*/
|
|
7928
|
+
}, filename)) : null), onDownload ? /*#__PURE__*/React__namespace.default.createElement(StyledCTAWrapper, {
|
|
7922
7929
|
onPress: onDownload,
|
|
7923
7930
|
testID: "attachment-download-icon"
|
|
7924
|
-
}, /*#__PURE__*/
|
|
7931
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
7925
7932
|
icon: "download-outlined",
|
|
7926
7933
|
size: "small"
|
|
7927
|
-
})) : null, onRemove ? /*#__PURE__*/
|
|
7934
|
+
})) : null, onRemove ? /*#__PURE__*/React__namespace.default.createElement(StyledCTAWrapper, {
|
|
7928
7935
|
onPress: onRemove,
|
|
7929
7936
|
testID: "attachment-remove-icon"
|
|
7930
|
-
}, /*#__PURE__*/
|
|
7937
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
7931
7938
|
icon: "trash-bin-outlined",
|
|
7932
7939
|
size: "small",
|
|
7933
7940
|
intent: "danger"
|
|
@@ -8003,16 +8010,16 @@ var Avatar = function Avatar(_ref) {
|
|
|
8003
8010
|
hasImageError = _useState2[0],
|
|
8004
8011
|
setHasImageError = _useState2[1];
|
|
8005
8012
|
if (title === undefined && source === undefined) return null;
|
|
8006
|
-
return /*#__PURE__*/
|
|
8013
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$b, {
|
|
8007
8014
|
testID: testID,
|
|
8008
8015
|
onPress: onPress,
|
|
8009
8016
|
disabled: onPress === undefined,
|
|
8010
8017
|
themeIntent: intent,
|
|
8011
8018
|
themeSize: size,
|
|
8012
8019
|
style: style
|
|
8013
|
-
}, (source === undefined || hasImageError) && /*#__PURE__*/
|
|
8020
|
+
}, (source === undefined || hasImageError) && /*#__PURE__*/React__namespace.default.createElement(StyledTextWrapper$1, null, /*#__PURE__*/React__namespace.default.createElement(StyledText$2, {
|
|
8014
8021
|
themeSize: size
|
|
8015
|
-
}, title)), source !== undefined && /*#__PURE__*/
|
|
8022
|
+
}, title)), source !== undefined && /*#__PURE__*/React__namespace.default.createElement(StyledImage, {
|
|
8016
8023
|
resizeMode: "cover",
|
|
8017
8024
|
source: source,
|
|
8018
8025
|
themeSize: size,
|
|
@@ -8257,7 +8264,7 @@ var Box = function Box(_ref) {
|
|
|
8257
8264
|
style = _ref.style,
|
|
8258
8265
|
testID = _ref.testID,
|
|
8259
8266
|
otherProps = _objectWithoutProperties(_ref, _excluded$v);
|
|
8260
|
-
return /*#__PURE__*/
|
|
8267
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledBox, _extends$1({}, otherProps, {
|
|
8261
8268
|
style: style,
|
|
8262
8269
|
testID: testID
|
|
8263
8270
|
}), children);
|
|
@@ -8356,7 +8363,7 @@ var Surplus = function Surplus(_ref) {
|
|
|
8356
8363
|
backgroundColor = _ref.backgroundColor;
|
|
8357
8364
|
if (value > 0) {
|
|
8358
8365
|
if (renderSurplus) {
|
|
8359
|
-
return /*#__PURE__*/
|
|
8366
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledSurplusContainer, {
|
|
8360
8367
|
testID: "surplus-container",
|
|
8361
8368
|
themeSize: size,
|
|
8362
8369
|
themeVariant: variant,
|
|
@@ -8366,7 +8373,7 @@ var Surplus = function Surplus(_ref) {
|
|
|
8366
8373
|
}
|
|
8367
8374
|
}, renderSurplus(value));
|
|
8368
8375
|
}
|
|
8369
|
-
return /*#__PURE__*/
|
|
8376
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledAvatar, {
|
|
8370
8377
|
testID: "surplus-container",
|
|
8371
8378
|
themeVariant: variant,
|
|
8372
8379
|
title: "+".concat(value),
|
|
@@ -8402,7 +8409,7 @@ var AvatarStack = function AvatarStack(_ref2) {
|
|
|
8402
8409
|
}
|
|
8403
8410
|
return remain;
|
|
8404
8411
|
}();
|
|
8405
|
-
return /*#__PURE__*/
|
|
8412
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$a, {
|
|
8406
8413
|
themeSize: size,
|
|
8407
8414
|
themeAvatarCount: avatars.length,
|
|
8408
8415
|
themeHasSurplus: remainingAvatar > 0,
|
|
@@ -8410,7 +8417,7 @@ var AvatarStack = function AvatarStack(_ref2) {
|
|
|
8410
8417
|
testID: testID,
|
|
8411
8418
|
themeVariant: variant
|
|
8412
8419
|
}, avatars.map(function (avt, index) {
|
|
8413
|
-
return /*#__PURE__*/
|
|
8420
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledAvatar, _extends$1({
|
|
8414
8421
|
themeVariant: variant
|
|
8415
8422
|
}, avt.props, {
|
|
8416
8423
|
size: size,
|
|
@@ -8419,7 +8426,7 @@ var AvatarStack = function AvatarStack(_ref2) {
|
|
|
8419
8426
|
backgroundColor: colors[index % colors.length]
|
|
8420
8427
|
}
|
|
8421
8428
|
}));
|
|
8422
|
-
}), /*#__PURE__*/
|
|
8429
|
+
}), /*#__PURE__*/React__namespace.default.createElement(Surplus, {
|
|
8423
8430
|
value: remainingAvatar,
|
|
8424
8431
|
index: avatars.length,
|
|
8425
8432
|
size: size,
|
|
@@ -8480,10 +8487,10 @@ var Status = function Status(_ref) {
|
|
|
8480
8487
|
style = _ref.style,
|
|
8481
8488
|
testID = _ref.testID,
|
|
8482
8489
|
nativeProps = _objectWithoutProperties(_ref, _excluded$u);
|
|
8483
|
-
var _React$useRef =
|
|
8490
|
+
var _React$useRef = React__namespace.default.useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
8484
8491
|
opacity = _React$useRef.current;
|
|
8485
|
-
var isFirstRendering =
|
|
8486
|
-
|
|
8492
|
+
var isFirstRendering = React__namespace.default.useRef(true);
|
|
8493
|
+
React__namespace.default.useEffect(function () {
|
|
8487
8494
|
// Do not run animation on very first rendering
|
|
8488
8495
|
if (isFirstRendering.current) {
|
|
8489
8496
|
isFirstRendering.current = false;
|
|
@@ -8495,10 +8502,10 @@ var Status = function Status(_ref) {
|
|
|
8495
8502
|
useNativeDriver: true
|
|
8496
8503
|
}).start();
|
|
8497
8504
|
}, [visible, opacity]);
|
|
8498
|
-
return /*#__PURE__*/
|
|
8505
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, _extends$1({}, nativeProps, {
|
|
8499
8506
|
style: style,
|
|
8500
8507
|
testID: testID
|
|
8501
|
-
}), children, /*#__PURE__*/
|
|
8508
|
+
}), children, /*#__PURE__*/React__namespace.default.createElement(StyledStatus, {
|
|
8502
8509
|
style: {
|
|
8503
8510
|
opacity: opacity,
|
|
8504
8511
|
transform: [{
|
|
@@ -8528,10 +8535,10 @@ var Badge = function Badge(_ref) {
|
|
|
8528
8535
|
style = _ref.style,
|
|
8529
8536
|
testID = _ref.testID,
|
|
8530
8537
|
nativeProps = _objectWithoutProperties(_ref, _excluded$t);
|
|
8531
|
-
var _React$useRef =
|
|
8538
|
+
var _React$useRef = React__namespace.default.useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
8532
8539
|
opacity = _React$useRef.current;
|
|
8533
|
-
var isFirstRendering =
|
|
8534
|
-
|
|
8540
|
+
var isFirstRendering = React__namespace.default.useRef(true);
|
|
8541
|
+
React__namespace.default.useEffect(function () {
|
|
8535
8542
|
// Do not run animation on very first rendering
|
|
8536
8543
|
if (isFirstRendering.current) {
|
|
8537
8544
|
isFirstRendering.current = false;
|
|
@@ -8544,7 +8551,7 @@ var Badge = function Badge(_ref) {
|
|
|
8544
8551
|
}).start();
|
|
8545
8552
|
}, [visible, opacity]);
|
|
8546
8553
|
var content = typeof originalContent === 'number' && originalContent > max ? "".concat(max, "+") : String(originalContent);
|
|
8547
|
-
return /*#__PURE__*/
|
|
8554
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledView$2, _extends$1({}, nativeProps, {
|
|
8548
8555
|
themeIntent: intent,
|
|
8549
8556
|
themePadding: getPaddingState(content),
|
|
8550
8557
|
style: [{
|
|
@@ -8557,7 +8564,7 @@ var Badge = function Badge(_ref) {
|
|
|
8557
8564
|
}]
|
|
8558
8565
|
}, style],
|
|
8559
8566
|
testID: testID
|
|
8560
|
-
}), /*#__PURE__*/
|
|
8567
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledText$1, null, content));
|
|
8561
8568
|
};
|
|
8562
8569
|
var Badge$1 = Object.assign(Badge, {
|
|
8563
8570
|
Status: Status
|
|
@@ -8630,7 +8637,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8630
8637
|
/**
|
|
8631
8638
|
* List of loaded tabs, tabs will be loaded when navigated to.
|
|
8632
8639
|
*/
|
|
8633
|
-
var _React$useState =
|
|
8640
|
+
var _React$useState = React__namespace.default.useState([selectedTabKey]),
|
|
8634
8641
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
8635
8642
|
loaded = _React$useState2[0],
|
|
8636
8643
|
setLoaded = _React$useState2[1];
|
|
@@ -8640,7 +8647,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8640
8647
|
return [].concat(_toConsumableArray(loadedState), [selectedTabKey]);
|
|
8641
8648
|
});
|
|
8642
8649
|
}
|
|
8643
|
-
return /*#__PURE__*/
|
|
8650
|
+
return /*#__PURE__*/React__namespace.default.createElement(BottomNavigationContainer, nativeProps, /*#__PURE__*/React__namespace.default.createElement(ContentWrapper, null, tabs.map(function (tab) {
|
|
8644
8651
|
var key = tab.key,
|
|
8645
8652
|
component = tab.component,
|
|
8646
8653
|
testID = tab.testID;
|
|
@@ -8652,7 +8659,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8652
8659
|
// Don't render a screen if we've never navigated to it
|
|
8653
8660
|
return null;
|
|
8654
8661
|
}
|
|
8655
|
-
return /*#__PURE__*/
|
|
8662
|
+
return /*#__PURE__*/React__namespace.default.createElement(BottomNavigationTab, {
|
|
8656
8663
|
key: key,
|
|
8657
8664
|
testID: testID ? "route-screen-".concat(testID) : undefined,
|
|
8658
8665
|
pointerEvents: active ? 'auto' : 'none',
|
|
@@ -8665,26 +8672,26 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8665
8672
|
isIOS ? selectedTabKey !== key : true,
|
|
8666
8673
|
themeVisibility: active
|
|
8667
8674
|
}, component);
|
|
8668
|
-
})), /*#__PURE__*/
|
|
8675
|
+
})), /*#__PURE__*/React__namespace.default.createElement(BottomBarWrapper, {
|
|
8669
8676
|
themeInsets: insets
|
|
8670
|
-
}, /*#__PURE__*/
|
|
8677
|
+
}, /*#__PURE__*/React__namespace.default.createElement(BottomBar, null, tabs.map(function (tab) {
|
|
8671
8678
|
var key = tab.key,
|
|
8672
8679
|
icon = tab.icon,
|
|
8673
8680
|
title = tab.title,
|
|
8674
8681
|
testID = tab.testID;
|
|
8675
8682
|
var active = selectedTabKey === key;
|
|
8676
8683
|
var inactiveIcon = getInactiveIcon(icon);
|
|
8677
|
-
return /*#__PURE__*/
|
|
8684
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableWithoutFeedback, {
|
|
8678
8685
|
key: key,
|
|
8679
8686
|
onPress: function onPress() {
|
|
8680
8687
|
return onTabPress(key);
|
|
8681
8688
|
},
|
|
8682
8689
|
testID: testID
|
|
8683
|
-
}, /*#__PURE__*/
|
|
8690
|
+
}, /*#__PURE__*/React__namespace.default.createElement(BottomBarItem, null, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
8684
8691
|
icon: active ? icon : inactiveIcon,
|
|
8685
8692
|
intent: active ? 'primary' : 'text',
|
|
8686
8693
|
testID: "hero-icon-".concat(icon)
|
|
8687
|
-
}), !!title && /*#__PURE__*/
|
|
8694
|
+
}), !!title && /*#__PURE__*/React__namespace.default.createElement(StyledBottomBarText, {
|
|
8688
8695
|
fontWeight: "semi-bold",
|
|
8689
8696
|
intent: active ? 'primary' : 'body',
|
|
8690
8697
|
numberOfLines: 1
|
|
@@ -8718,7 +8725,7 @@ var Divider = function Divider(_ref) {
|
|
|
8718
8725
|
style = _ref.style,
|
|
8719
8726
|
testID = _ref.testID,
|
|
8720
8727
|
nativeProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
8721
|
-
return /*#__PURE__*/
|
|
8728
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
8722
8729
|
themeMarginHorizontal: marginHorizontal,
|
|
8723
8730
|
themeMarginVertical: marginVertical,
|
|
8724
8731
|
style: style,
|
|
@@ -8795,7 +8802,7 @@ var StyledIconWrapper$4 = index$9(reactNative.View)(function (_ref5) {
|
|
|
8795
8802
|
var Footer$1 = function Footer(_ref) {
|
|
8796
8803
|
var children = _ref.children,
|
|
8797
8804
|
showDivider = _ref.showDivider;
|
|
8798
|
-
return /*#__PURE__*/
|
|
8805
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, null, showDivider ? /*#__PURE__*/React__namespace.default.createElement(Divider, null) : null, /*#__PURE__*/React__namespace.default.createElement(StyledFooter, null, children));
|
|
8799
8806
|
};
|
|
8800
8807
|
|
|
8801
8808
|
var genLoadingIndicatorStyles = function genLoadingIndicatorStyles(theme, intent) {
|
|
@@ -8854,14 +8861,14 @@ var renderDotComponent = function renderDotComponent(_ref) {
|
|
|
8854
8861
|
inputRange: [0.0, (index + 0.5) / (count + 1), (index + 1.0) / (count + 1), (index + 1.5) / (count + 1), 1.0],
|
|
8855
8862
|
outputRange: [1.0, 1.36, 1.56, 1.06, 1.0]
|
|
8856
8863
|
});
|
|
8857
|
-
return /*#__PURE__*/
|
|
8864
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
8858
8865
|
style: reactNative.StyleSheet.flatten([{
|
|
8859
8866
|
transform: [{
|
|
8860
8867
|
scale: interpolatedProgressAnimation
|
|
8861
8868
|
}]
|
|
8862
8869
|
}]),
|
|
8863
8870
|
key: index
|
|
8864
|
-
}, /*#__PURE__*/
|
|
8871
|
+
}, /*#__PURE__*/React__namespace.default.createElement(AnimatedLoadingDot, {
|
|
8865
8872
|
size: size,
|
|
8866
8873
|
themeVariant: themeVariant
|
|
8867
8874
|
}));
|
|
@@ -8899,7 +8906,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
8899
8906
|
}
|
|
8900
8907
|
return null;
|
|
8901
8908
|
};
|
|
8902
|
-
return /*#__PURE__*/
|
|
8909
|
+
return /*#__PURE__*/React__namespace.default.createElement(AnimatedLoadingIndicatorWrapper, _extends$1({
|
|
8903
8910
|
testID: testID
|
|
8904
8911
|
}, nativeProps), Array.from(new Array(count), renderLoadingDot, themeVariant));
|
|
8905
8912
|
};
|
|
@@ -9166,7 +9173,7 @@ var Button = function Button(_ref) {
|
|
|
9166
9173
|
return getUnderlayColor(theme, themeVariant);
|
|
9167
9174
|
}, [theme, themeVariant]);
|
|
9168
9175
|
useDeprecation("Button variant ".concat(deprecatedVariants.join(', '), " are deprecated."), deprecatedVariants.includes(themeVariant));
|
|
9169
|
-
return /*#__PURE__*/
|
|
9176
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledButtonContainer, {
|
|
9170
9177
|
accessibilityHint: accessibilityHint,
|
|
9171
9178
|
accessibilityLabel: accessibilityLabel,
|
|
9172
9179
|
disabled: disabled || loading,
|
|
@@ -9176,31 +9183,31 @@ var Button = function Button(_ref) {
|
|
|
9176
9183
|
themeButtonVariant: themeVariant,
|
|
9177
9184
|
style: style,
|
|
9178
9185
|
underlayColor: underlayColor
|
|
9179
|
-
}, loading === true ? /*#__PURE__*/
|
|
9186
|
+
}, loading === true ? /*#__PURE__*/React__namespace.default.createElement(LoadingIndicator, {
|
|
9180
9187
|
testID: "".concat(testID, "-loading-indicator"),
|
|
9181
9188
|
themeVariant: themeVariant
|
|
9182
|
-
}) : /*#__PURE__*/
|
|
9189
|
+
}) : /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, icon !== undefined && /*#__PURE__*/React__namespace.default.createElement(StyledButtonIconWrapper, {
|
|
9183
9190
|
themePosition: "left"
|
|
9184
|
-
}, isIconName(icon) ? /*#__PURE__*/
|
|
9191
|
+
}, isIconName(icon) ? /*#__PURE__*/React__namespace.default.createElement(StyledButtonIcon, {
|
|
9185
9192
|
disabled: disabled,
|
|
9186
9193
|
icon: icon,
|
|
9187
9194
|
testID: "".concat(testID, "-left-icon"),
|
|
9188
9195
|
themeButtonVariant: themeVariant
|
|
9189
|
-
}) : icon), isTextVariant(themeVariant) ? /*#__PURE__*/
|
|
9196
|
+
}) : icon), isTextVariant(themeVariant) ? /*#__PURE__*/React__namespace.default.createElement(StyledButtonTitleOfVariantText, {
|
|
9190
9197
|
variant: "regular-bold",
|
|
9191
9198
|
ellipsizeMode: "tail",
|
|
9192
9199
|
numberOfLines: 1,
|
|
9193
9200
|
disabled: disabled,
|
|
9194
9201
|
themeButtonVariant: themeVariant
|
|
9195
|
-
}, text) : /*#__PURE__*/
|
|
9202
|
+
}, text) : /*#__PURE__*/React__namespace.default.createElement(StyledButtonText, {
|
|
9196
9203
|
level: "h5",
|
|
9197
9204
|
ellipsizeMode: "tail",
|
|
9198
9205
|
numberOfLines: 1,
|
|
9199
9206
|
disabled: disabled,
|
|
9200
9207
|
themeButtonVariant: themeVariant
|
|
9201
|
-
}, text), rightIcon !== undefined && /*#__PURE__*/
|
|
9208
|
+
}, text), rightIcon !== undefined && /*#__PURE__*/React__namespace.default.createElement(StyledButtonIconWrapper, {
|
|
9202
9209
|
themePosition: "right"
|
|
9203
|
-
}, isIconName(rightIcon) ? /*#__PURE__*/
|
|
9210
|
+
}, isIconName(rightIcon) ? /*#__PURE__*/React__namespace.default.createElement(StyledButtonIcon, {
|
|
9204
9211
|
disabled: disabled,
|
|
9205
9212
|
icon: rightIcon,
|
|
9206
9213
|
testID: "".concat(testID, "-right-icon"),
|
|
@@ -9217,13 +9224,13 @@ var IconButton = function IconButton(_ref) {
|
|
|
9217
9224
|
style = _ref.style,
|
|
9218
9225
|
size = _ref.size,
|
|
9219
9226
|
intent = _ref.intent;
|
|
9220
|
-
return /*#__PURE__*/
|
|
9227
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
|
|
9221
9228
|
style: style,
|
|
9222
9229
|
onPress: onPress,
|
|
9223
9230
|
testID: testID,
|
|
9224
9231
|
hitSlop: hitSlop,
|
|
9225
9232
|
disabled: disabled
|
|
9226
|
-
}, /*#__PURE__*/
|
|
9233
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
9227
9234
|
icon: icon,
|
|
9228
9235
|
size: size,
|
|
9229
9236
|
intent: disabled ? 'disabled-text' : intent
|
|
@@ -9266,16 +9273,16 @@ var UtilityButton = function UtilityButton(_ref) {
|
|
|
9266
9273
|
intent = _ref$intent === void 0 ? 'text' : _ref$intent,
|
|
9267
9274
|
style = _ref.style,
|
|
9268
9275
|
hitSlop = _ref.hitSlop;
|
|
9269
|
-
return /*#__PURE__*/
|
|
9276
|
+
return /*#__PURE__*/React__namespace.default.createElement(ButtonContainer, {
|
|
9270
9277
|
style: style,
|
|
9271
9278
|
onPress: onPress,
|
|
9272
9279
|
testID: testID,
|
|
9273
9280
|
hitSlop: hitSlop
|
|
9274
|
-
}, /*#__PURE__*/
|
|
9281
|
+
}, /*#__PURE__*/React__namespace.default.createElement(IconWrapper, null, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
9275
9282
|
icon: icon,
|
|
9276
9283
|
intent: intent,
|
|
9277
9284
|
testID: "".concat(testID, "-icon")
|
|
9278
|
-
})), /*#__PURE__*/
|
|
9285
|
+
})), /*#__PURE__*/React__namespace.default.createElement(ButtonText, {
|
|
9279
9286
|
intent: TEXT_INTENTS[intent]
|
|
9280
9287
|
}, text));
|
|
9281
9288
|
};
|
|
@@ -9293,19 +9300,19 @@ var Header = function Header(_ref) {
|
|
|
9293
9300
|
_ref$onRequestClose = _ref.onRequestClose,
|
|
9294
9301
|
onRequestClose = _ref$onRequestClose === void 0 ? noop$1 : _ref$onRequestClose,
|
|
9295
9302
|
showCloseButton = _ref.showCloseButton;
|
|
9296
|
-
return /*#__PURE__*/
|
|
9303
|
+
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledHeaderWrapper, null, typeof content === 'string' ? /*#__PURE__*/React__namespace.default.createElement(StyledHeader, null, /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
9297
9304
|
variant: "regular-bold"
|
|
9298
|
-
}, content)) : /*#__PURE__*/
|
|
9305
|
+
}, content)) : /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
9299
9306
|
style: {
|
|
9300
9307
|
flex: 1
|
|
9301
9308
|
}
|
|
9302
|
-
}, content), showCloseButton ? /*#__PURE__*/
|
|
9309
|
+
}, content), showCloseButton ? /*#__PURE__*/React__namespace.default.createElement(StyledIconWrapper$4, null, /*#__PURE__*/React__namespace.default.createElement(CompoundButton.Icon, {
|
|
9303
9310
|
icon: "cancel",
|
|
9304
9311
|
onPress: onRequestClose,
|
|
9305
9312
|
intent: "text",
|
|
9306
9313
|
testID: "bottom-sheet-close-icon",
|
|
9307
9314
|
size: "xsmall"
|
|
9308
|
-
})) : null), showDivider ? /*#__PURE__*/
|
|
9315
|
+
})) : null), showDivider ? /*#__PURE__*/React__namespace.default.createElement(Divider, null) : null);
|
|
9309
9316
|
};
|
|
9310
9317
|
|
|
9311
9318
|
var _excluded$p = ["scrollEventThrottle"];
|
|
@@ -9330,7 +9337,7 @@ var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
|
9330
9337
|
setInternalShowDivider(false);
|
|
9331
9338
|
props === null || props === void 0 || (_props$onMomentumScro2 = props.onMomentumScrollEnd) === null || _props$onMomentumScro2 === void 0 || _props$onMomentumScro2.call(props, e);
|
|
9332
9339
|
}, []);
|
|
9333
|
-
return /*#__PURE__*/
|
|
9340
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.ScrollView, _extends$1({}, props, {
|
|
9334
9341
|
onScrollBeginDrag: onScrollBeginDrag,
|
|
9335
9342
|
onMomentumScrollBegin: onMomentumScrollBegin,
|
|
9336
9343
|
onMomentumScrollEnd: onMomentumScrollEnd,
|
|
@@ -9416,23 +9423,23 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
9416
9423
|
setInternalShowDivider: setInternalShowDivider
|
|
9417
9424
|
};
|
|
9418
9425
|
}, [setInternalShowDivider]);
|
|
9419
|
-
return /*#__PURE__*/
|
|
9426
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Modal, {
|
|
9420
9427
|
visible: visible,
|
|
9421
9428
|
onRequestClose: onRequestClose,
|
|
9422
9429
|
transparent: true,
|
|
9423
9430
|
testID: testID,
|
|
9424
9431
|
onShow: onOpen,
|
|
9425
9432
|
supportedOrientations: supportedOrientations
|
|
9426
|
-
}, /*#__PURE__*/
|
|
9433
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$9, {
|
|
9427
9434
|
pointerEvents: "box-none"
|
|
9428
|
-
}, /*#__PURE__*/
|
|
9435
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledKeyboardAvoidingView, _extends$1({
|
|
9429
9436
|
behavior: reactNative.Platform.OS === 'ios' ? 'padding' : 'height'
|
|
9430
|
-
}, keyboardAvoidingViewProps), /*#__PURE__*/
|
|
9437
|
+
}, keyboardAvoidingViewProps), /*#__PURE__*/React__namespace.default.createElement(StyledBackdrop$2, {
|
|
9431
9438
|
style: {
|
|
9432
9439
|
opacity: interpolateOpacity
|
|
9433
9440
|
},
|
|
9434
9441
|
onPress: onRequestClose
|
|
9435
|
-
}), /*#__PURE__*/
|
|
9442
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledBottomSheet, {
|
|
9436
9443
|
style: [style, {
|
|
9437
9444
|
transform: [{
|
|
9438
9445
|
scaleY: height > 0 ? 1 : 0
|
|
@@ -9440,14 +9447,14 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
9440
9447
|
translateY: interpolateY
|
|
9441
9448
|
}]
|
|
9442
9449
|
}]
|
|
9443
|
-
}, header !== undefined ? /*#__PURE__*/
|
|
9450
|
+
}, header !== undefined ? /*#__PURE__*/React__namespace.default.createElement(Header, {
|
|
9444
9451
|
content: header,
|
|
9445
9452
|
showDivider: internalShowDivider,
|
|
9446
9453
|
onRequestClose: onRequestClose,
|
|
9447
9454
|
showCloseButton: showCloseButton
|
|
9448
|
-
}) : null, /*#__PURE__*/
|
|
9455
|
+
}) : null, /*#__PURE__*/React__namespace.default.createElement(BottomSheetContext.Provider, {
|
|
9449
9456
|
value: BottomSheetContextValue
|
|
9450
|
-
}, children), footer ? /*#__PURE__*/
|
|
9457
|
+
}, children), footer ? /*#__PURE__*/React__namespace.default.createElement(Footer$1, {
|
|
9451
9458
|
showDivider: showDivider
|
|
9452
9459
|
}, footer) : null))));
|
|
9453
9460
|
};
|
|
@@ -11740,29 +11747,29 @@ function ContentNavigator(_ref) {
|
|
|
11740
11747
|
testID = _ref.testID,
|
|
11741
11748
|
style = _ref.style;
|
|
11742
11749
|
var theme = useTheme();
|
|
11743
|
-
return /*#__PURE__*/
|
|
11750
|
+
return /*#__PURE__*/React__namespace.default.createElement(Wrapper, {
|
|
11744
11751
|
testID: testID,
|
|
11745
11752
|
style: style
|
|
11746
|
-
}, /*#__PURE__*/
|
|
11753
|
+
}, /*#__PURE__*/React__namespace.default.createElement(CompoundButton.Icon, {
|
|
11747
11754
|
icon: "arrow-left",
|
|
11748
11755
|
onPress: onPreviousPress,
|
|
11749
11756
|
disabled: previousDisabled,
|
|
11750
11757
|
testID: "previous-icon-button"
|
|
11751
|
-
}), fontSize === 'medium' ? /*#__PURE__*/
|
|
11758
|
+
}), fontSize === 'medium' ? /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
11752
11759
|
style: {
|
|
11753
11760
|
paddingHorizontal: theme.__hd__.contentNavigator.space.valueHorizontalPadding
|
|
11754
11761
|
},
|
|
11755
11762
|
variant: "small-bold",
|
|
11756
11763
|
onPress: onPress,
|
|
11757
11764
|
testID: "content-navigator-value"
|
|
11758
|
-
}, value) : /*#__PURE__*/
|
|
11765
|
+
}, value) : /*#__PURE__*/React__namespace.default.createElement(Typography.Title, {
|
|
11759
11766
|
style: {
|
|
11760
11767
|
paddingHorizontal: theme.__hd__.contentNavigator.space.valueHorizontalPadding
|
|
11761
11768
|
},
|
|
11762
11769
|
level: "h5",
|
|
11763
11770
|
onPress: onPress,
|
|
11764
11771
|
testID: "content-navigator-value"
|
|
11765
|
-
}, value), /*#__PURE__*/
|
|
11772
|
+
}, value), /*#__PURE__*/React__namespace.default.createElement(CompoundButton.Icon, {
|
|
11766
11773
|
icon: "arrow-right",
|
|
11767
11774
|
onPress: onNextPress,
|
|
11768
11775
|
disabled: nextDisabled,
|
|
@@ -11870,16 +11877,16 @@ var CalendarRowItem = function CalendarRowItem(_ref) {
|
|
|
11870
11877
|
_ref$marked = _ref.marked,
|
|
11871
11878
|
marked = _ref$marked === void 0 ? false : _ref$marked,
|
|
11872
11879
|
itemWidth = _ref.itemWidth;
|
|
11873
|
-
return /*#__PURE__*/
|
|
11880
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledCalendarRowItem, {
|
|
11874
11881
|
testID: "calendar-date-cell",
|
|
11875
11882
|
themeItemWidth: itemWidth
|
|
11876
|
-
}, /*#__PURE__*/
|
|
11883
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledCalendarCell, {
|
|
11877
11884
|
variant: getCellVariant(isSelected, isCurrent),
|
|
11878
11885
|
onPress: onPress
|
|
11879
|
-
}, /*#__PURE__*/
|
|
11886
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
11880
11887
|
variant: "small",
|
|
11881
11888
|
intent: isSelected ? 'inverted' : textIntent
|
|
11882
|
-
}, date ? date.getDate() : ''), marked ? /*#__PURE__*/
|
|
11889
|
+
}, date ? date.getDate() : ''), marked ? /*#__PURE__*/React__namespace.default.createElement(StyledMark, {
|
|
11883
11890
|
testID: "calendar-date-mark",
|
|
11884
11891
|
variant: isSelected ? 'inverted' : 'primary'
|
|
11885
11892
|
}) : null));
|
|
@@ -11984,26 +11991,26 @@ var Calendar = function Calendar(_ref) {
|
|
|
11984
11991
|
var disableNextButton = maxDate === undefined ? false : !daysOfNextMonth.some(function (date) {
|
|
11985
11992
|
return date !== undefined;
|
|
11986
11993
|
}) || maxDate <= lastDateOfMonth;
|
|
11987
|
-
return /*#__PURE__*/
|
|
11994
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$5, {
|
|
11988
11995
|
testID: testID
|
|
11989
|
-
}, /*#__PURE__*/
|
|
11990
|
-
value: !useMonthPicker ? format('MMMM yyyy', visibleDate) : /*#__PURE__*/
|
|
11996
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__namespace.default.createElement(ContentNavigator, {
|
|
11997
|
+
value: !useMonthPicker ? format('MMMM yyyy', visibleDate) : /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
|
|
11991
11998
|
testID: "calendar-month-picker",
|
|
11992
11999
|
onPress: function onPress() {
|
|
11993
12000
|
onToggleMonthPicker === null || onToggleMonthPicker === void 0 || onToggleMonthPicker(!monthPickerVisible);
|
|
11994
12001
|
setMonthPickerVisible(!monthPickerVisible);
|
|
11995
12002
|
}
|
|
11996
|
-
}, /*#__PURE__*/
|
|
12003
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Box, {
|
|
11997
12004
|
flexDirection: "row",
|
|
11998
12005
|
justifyContent: "center",
|
|
11999
12006
|
alignItems: "center"
|
|
12000
|
-
}, /*#__PURE__*/
|
|
12007
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Typography.Title, {
|
|
12001
12008
|
level: "h5",
|
|
12002
12009
|
style: {
|
|
12003
12010
|
textAlign: 'center',
|
|
12004
12011
|
marginRight: theme.__hd__.calendar.space.headerMarginRight
|
|
12005
12012
|
}
|
|
12006
|
-
}, format('MMMM yyyy', visibleDate)), /*#__PURE__*/
|
|
12013
|
+
}, format('MMMM yyyy', visibleDate)), /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
12007
12014
|
icon: monthPickerVisible ? 'arrow-up' : 'arrow-down',
|
|
12008
12015
|
size: "small"
|
|
12009
12016
|
}))),
|
|
@@ -12013,11 +12020,11 @@ var Calendar = function Calendar(_ref) {
|
|
|
12013
12020
|
previousDisabled: disablePrevButton,
|
|
12014
12021
|
nextDisabled: disableNextButton,
|
|
12015
12022
|
fontSize: "large"
|
|
12016
|
-
})), reactNative.Platform.OS === 'ios' && monthPickerVisible ? /*#__PURE__*/
|
|
12023
|
+
})), reactNative.Platform.OS === 'ios' && monthPickerVisible ? /*#__PURE__*/React__namespace.default.createElement(Box, {
|
|
12017
12024
|
style: {
|
|
12018
12025
|
overflow: 'hidden'
|
|
12019
12026
|
}
|
|
12020
|
-
}, /*#__PURE__*/
|
|
12027
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNativeMonthYearPicker.MonthYearPickerViewIOS, {
|
|
12021
12028
|
value: value,
|
|
12022
12029
|
minimumDate: minDate,
|
|
12023
12030
|
maximumDate: maxDate,
|
|
@@ -12027,7 +12034,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
12027
12034
|
marginVertical: -theme.__hd__.calendar.space.iosPickerMarginVertical,
|
|
12028
12035
|
width: contentWidth
|
|
12029
12036
|
}
|
|
12030
|
-
})) : /*#__PURE__*/
|
|
12037
|
+
})) : /*#__PURE__*/React__namespace.default.createElement(Box, {
|
|
12031
12038
|
onLayout: reactNative.Platform.OS === 'ios' ? function (e) {
|
|
12032
12039
|
var _e$nativeEvent$layout = e.nativeEvent.layout,
|
|
12033
12040
|
width = _e$nativeEvent$layout.width,
|
|
@@ -12035,16 +12042,16 @@ var Calendar = function Calendar(_ref) {
|
|
|
12035
12042
|
setContentHeight(height);
|
|
12036
12043
|
setContentWidth(width);
|
|
12037
12044
|
} : undefined
|
|
12038
|
-
}, /*#__PURE__*/
|
|
12039
|
-
return /*#__PURE__*/
|
|
12045
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledCalendarRow, null, DAYS_OF_WEEK.map(function (day) {
|
|
12046
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledCalendarRowItem, {
|
|
12040
12047
|
key: day
|
|
12041
|
-
}, /*#__PURE__*/
|
|
12048
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledCalendarDayNameCell, {
|
|
12042
12049
|
themeItemWidth: calendarItemWidth
|
|
12043
|
-
}, /*#__PURE__*/
|
|
12050
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
12044
12051
|
variant: "small"
|
|
12045
12052
|
}, day)));
|
|
12046
|
-
})), /*#__PURE__*/
|
|
12047
|
-
return date ? /*#__PURE__*/
|
|
12053
|
+
})), /*#__PURE__*/React__namespace.default.createElement(StyledCalendarRow, null, daysOfPreviousMonth.map(function (date) {
|
|
12054
|
+
return date ? /*#__PURE__*/React__namespace.default.createElement(CalendarRowItem, {
|
|
12048
12055
|
key: date.toDateString(),
|
|
12049
12056
|
date: date,
|
|
12050
12057
|
isCurrent: isEqDate(now, date),
|
|
@@ -12055,12 +12062,12 @@ var Calendar = function Calendar(_ref) {
|
|
|
12055
12062
|
textIntent: "subdued",
|
|
12056
12063
|
marked: parsedMaskedDate[date.toDateString()],
|
|
12057
12064
|
itemWidth: contentWidth > 0 ? contentWidth / 7 : undefined
|
|
12058
|
-
}) : /*#__PURE__*/
|
|
12065
|
+
}) : /*#__PURE__*/React__namespace.default.createElement(StyledDisabledCalendarRowItem, {
|
|
12059
12066
|
themeItemWidth: calendarItemWidth,
|
|
12060
12067
|
testID: "calendar-disabled-cell"
|
|
12061
12068
|
});
|
|
12062
12069
|
}), daysOfCurrentMonth.map(function (date) {
|
|
12063
|
-
return date ? /*#__PURE__*/
|
|
12070
|
+
return date ? /*#__PURE__*/React__namespace.default.createElement(CalendarRowItem, {
|
|
12064
12071
|
itemWidth: calendarItemWidth,
|
|
12065
12072
|
key: date.toDateString(),
|
|
12066
12073
|
date: date,
|
|
@@ -12070,12 +12077,12 @@ var Calendar = function Calendar(_ref) {
|
|
|
12070
12077
|
return onChange === null || onChange === void 0 ? void 0 : onChange(date);
|
|
12071
12078
|
},
|
|
12072
12079
|
marked: parsedMaskedDate[date.toDateString()]
|
|
12073
|
-
}) : /*#__PURE__*/
|
|
12080
|
+
}) : /*#__PURE__*/React__namespace.default.createElement(StyledDisabledCalendarRowItem, {
|
|
12074
12081
|
themeItemWidth: calendarItemWidth,
|
|
12075
12082
|
testID: "calendar-disabled-cell"
|
|
12076
12083
|
});
|
|
12077
12084
|
}), daysOfNextMonth.map(function (date) {
|
|
12078
|
-
return date ? /*#__PURE__*/
|
|
12085
|
+
return date ? /*#__PURE__*/React__namespace.default.createElement(CalendarRowItem, {
|
|
12079
12086
|
itemWidth: calendarItemWidth,
|
|
12080
12087
|
key: date.toDateString(),
|
|
12081
12088
|
date: date,
|
|
@@ -12086,11 +12093,11 @@ var Calendar = function Calendar(_ref) {
|
|
|
12086
12093
|
},
|
|
12087
12094
|
textIntent: "subdued",
|
|
12088
12095
|
marked: parsedMaskedDate[date.toDateString()]
|
|
12089
|
-
}) : /*#__PURE__*/
|
|
12096
|
+
}) : /*#__PURE__*/React__namespace.default.createElement(StyledDisabledCalendarRowItem, {
|
|
12090
12097
|
themeItemWidth: calendarItemWidth,
|
|
12091
12098
|
testID: "calendar-disabled-cell"
|
|
12092
12099
|
});
|
|
12093
|
-
})), reactNative.Platform.OS === 'android' && monthPickerVisible && /*#__PURE__*/
|
|
12100
|
+
})), reactNative.Platform.OS === 'android' && monthPickerVisible && /*#__PURE__*/React__namespace.default.createElement(reactNativeMonthYearPicker.MonthYearPickerDialogueAndroid, {
|
|
12094
12101
|
doneButtonLabel: monthPickerConfirmLabel,
|
|
12095
12102
|
cancelButtonLabel: monthPickerCancelLabel,
|
|
12096
12103
|
value: value,
|
|
@@ -12130,7 +12137,7 @@ var DataCard = function DataCard(_ref) {
|
|
|
12130
12137
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
12131
12138
|
children = _ref.children,
|
|
12132
12139
|
nativeProps = _objectWithoutProperties(_ref, _excluded$o);
|
|
12133
|
-
return /*#__PURE__*/
|
|
12140
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__namespace.default.createElement(Indicator, {
|
|
12134
12141
|
themeIntent: intent,
|
|
12135
12142
|
testID: "data-card-indicator"
|
|
12136
12143
|
}), children);
|
|
@@ -12152,7 +12159,7 @@ var Card = function Card(_ref) {
|
|
|
12152
12159
|
var intent = _ref.intent,
|
|
12153
12160
|
children = _ref.children,
|
|
12154
12161
|
nativeProps = _objectWithoutProperties(_ref, _excluded$n);
|
|
12155
|
-
return /*#__PURE__*/
|
|
12162
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledCard$1, _extends$1({}, nativeProps, {
|
|
12156
12163
|
themeIntent: intent
|
|
12157
12164
|
}), children);
|
|
12158
12165
|
};
|
|
@@ -12184,14 +12191,14 @@ var PageControl = function PageControl(_ref) {
|
|
|
12184
12191
|
testID = _ref.testID,
|
|
12185
12192
|
style = _ref.style;
|
|
12186
12193
|
var theme = useTheme();
|
|
12187
|
-
var animatedValue =
|
|
12188
|
-
|
|
12194
|
+
var animatedValue = React__namespace.default.useRef(new reactNative.Animated.Value(currentPage)).current;
|
|
12195
|
+
React__namespace.default.useEffect(function () {
|
|
12189
12196
|
reactNative.Animated.spring(animatedValue, {
|
|
12190
12197
|
toValue: currentPage,
|
|
12191
12198
|
useNativeDriver: false // Native driver does not support animating width, it will cause the app to crash if set to true
|
|
12192
12199
|
}).start();
|
|
12193
12200
|
}, [currentPage]);
|
|
12194
|
-
return /*#__PURE__*/
|
|
12201
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledPageControl$2, {
|
|
12195
12202
|
testID: testID,
|
|
12196
12203
|
style: style
|
|
12197
12204
|
}, new Array(numberOfPages).fill('').map(function (_, index) {
|
|
@@ -12206,7 +12213,7 @@ var PageControl = function PageControl(_ref) {
|
|
|
12206
12213
|
outputRange: [0.5, 1, 0.5],
|
|
12207
12214
|
extrapolate: 'clamp'
|
|
12208
12215
|
});
|
|
12209
|
-
return /*#__PURE__*/
|
|
12216
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledPageControlAnimatedView, {
|
|
12210
12217
|
accessibilityState: {
|
|
12211
12218
|
selected: index === currentPage
|
|
12212
12219
|
},
|
|
@@ -12304,7 +12311,7 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
12304
12311
|
viewPosition: viewPosition
|
|
12305
12312
|
});
|
|
12306
12313
|
}, [currentIndex, items.length, viewPosition]);
|
|
12307
|
-
|
|
12314
|
+
React__namespace.default.useImperativeHandle(ref, function () {
|
|
12308
12315
|
return {
|
|
12309
12316
|
snapToIndex: function snapToIndex(index) {
|
|
12310
12317
|
_snapToIndex(index);
|
|
@@ -12350,17 +12357,17 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
12350
12357
|
}, [setFlatListWidth, onLayout]);
|
|
12351
12358
|
var renderItem = React.useCallback(function (_ref3) {
|
|
12352
12359
|
var item = _ref3.item;
|
|
12353
|
-
return /*#__PURE__*/
|
|
12360
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledItemWrapper, {
|
|
12354
12361
|
style: {
|
|
12355
12362
|
width: itemWidth
|
|
12356
12363
|
}
|
|
12357
|
-
}, /*#__PURE__*/
|
|
12364
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledCard, null, item));
|
|
12358
12365
|
}, [itemWidth]);
|
|
12359
12366
|
var contentContainerPaddingHorizontal = theme.__hd__.cardCarousel.space.contentContainerPaddingHorizontal;
|
|
12360
|
-
return /*#__PURE__*/
|
|
12367
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$8, {
|
|
12361
12368
|
style: style,
|
|
12362
12369
|
testID: testID
|
|
12363
|
-
}, /*#__PURE__*/
|
|
12370
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.FlatList, {
|
|
12364
12371
|
contentInset: {
|
|
12365
12372
|
top: 0,
|
|
12366
12373
|
left: contentContainerPaddingHorizontal,
|
|
@@ -12368,14 +12375,14 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
12368
12375
|
right: contentContainerPaddingHorizontal
|
|
12369
12376
|
},
|
|
12370
12377
|
ListHeaderComponent: reactNative.Platform.select({
|
|
12371
|
-
android: /*#__PURE__*/
|
|
12378
|
+
android: /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
12372
12379
|
style: {
|
|
12373
12380
|
width: contentContainerPaddingHorizontal
|
|
12374
12381
|
}
|
|
12375
12382
|
})
|
|
12376
12383
|
}),
|
|
12377
12384
|
ListFooterComponent: reactNative.Platform.select({
|
|
12378
|
-
android: /*#__PURE__*/
|
|
12385
|
+
android: /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
12379
12386
|
style: {
|
|
12380
12387
|
width: contentContainerPaddingHorizontal
|
|
12381
12388
|
}
|
|
@@ -12404,7 +12411,7 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
12404
12411
|
viewabilityConfig: {
|
|
12405
12412
|
itemVisiblePercentThreshold: 80
|
|
12406
12413
|
}
|
|
12407
|
-
}), !hidePageControl && /*#__PURE__*/
|
|
12414
|
+
}), !hidePageControl && /*#__PURE__*/React__namespace.default.createElement(StyledPageControl$1, {
|
|
12408
12415
|
testID: "pageControl",
|
|
12409
12416
|
currentPage: currentIndex,
|
|
12410
12417
|
numberOfPages: items.length
|
|
@@ -12423,7 +12430,7 @@ var Image = function Image(_ref) {
|
|
|
12423
12430
|
imageNativeProps = _objectWithoutProperties(_ref, _excluded$m);
|
|
12424
12431
|
var theme = useTheme();
|
|
12425
12432
|
var imageSize = theme.__hd__.image.sizes[size];
|
|
12426
|
-
return /*#__PURE__*/
|
|
12433
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Image, _extends$1({
|
|
12427
12434
|
testID: testID,
|
|
12428
12435
|
style: [{
|
|
12429
12436
|
width: imageSize,
|
|
@@ -12517,10 +12524,10 @@ var CarouselItem = function CarouselItem(_ref) {
|
|
|
12517
12524
|
heading = _ref.heading,
|
|
12518
12525
|
body = _ref.body;
|
|
12519
12526
|
var theme = useTheme$1();
|
|
12520
|
-
var ImageComponent =
|
|
12527
|
+
var ImageComponent = React__namespace.default.useMemo(function () {
|
|
12521
12528
|
if (image) {
|
|
12522
12529
|
if (isCarouselImageProps(image)) {
|
|
12523
|
-
return /*#__PURE__*/
|
|
12530
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledCustomSizeCarouselImage, {
|
|
12524
12531
|
source: image,
|
|
12525
12532
|
themeHeight: image.height,
|
|
12526
12533
|
themeWidth: image.width,
|
|
@@ -12530,7 +12537,7 @@ var CarouselItem = function CarouselItem(_ref) {
|
|
|
12530
12537
|
}
|
|
12531
12538
|
});
|
|
12532
12539
|
}
|
|
12533
|
-
return /*#__PURE__*/
|
|
12540
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledCarouselImage, {
|
|
12534
12541
|
source: typeof image === 'string' ? {
|
|
12535
12542
|
uri: image
|
|
12536
12543
|
} : image,
|
|
@@ -12541,17 +12548,17 @@ var CarouselItem = function CarouselItem(_ref) {
|
|
|
12541
12548
|
}
|
|
12542
12549
|
return null;
|
|
12543
12550
|
}, [image]);
|
|
12544
|
-
return /*#__PURE__*/
|
|
12551
|
+
return /*#__PURE__*/React__namespace.default.createElement(Box, {
|
|
12545
12552
|
style: {
|
|
12546
12553
|
width: width
|
|
12547
12554
|
}
|
|
12548
|
-
}, ImageComponent, /*#__PURE__*/
|
|
12555
|
+
}, ImageComponent, /*#__PURE__*/React__namespace.default.createElement(StyledCarouselContentWrapper, {
|
|
12549
12556
|
paddingHorizontal: "medium",
|
|
12550
12557
|
width: width
|
|
12551
|
-
}, content, !!heading && /*#__PURE__*/
|
|
12558
|
+
}, content, !!heading && /*#__PURE__*/React__namespace.default.createElement(StyledCarouselHeading, {
|
|
12552
12559
|
level: "h1",
|
|
12553
12560
|
typeface: "playful"
|
|
12554
|
-
}, heading), !!body && /*#__PURE__*/
|
|
12561
|
+
}, heading), !!body && /*#__PURE__*/React__namespace.default.createElement(Typography.Body, null, body)));
|
|
12555
12562
|
};
|
|
12556
12563
|
|
|
12557
12564
|
var _excluded$l = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "testID", "pageControlPosition"];
|
|
@@ -12632,15 +12639,15 @@ var Carousel = function Carousel(_ref) {
|
|
|
12632
12639
|
internalOnItemIndexChange(firstVisibleItem.index || 0);
|
|
12633
12640
|
}
|
|
12634
12641
|
});
|
|
12635
|
-
return /*#__PURE__*/
|
|
12642
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, _extends$1({
|
|
12636
12643
|
style: style,
|
|
12637
12644
|
testID: testID
|
|
12638
|
-
}, nativeProps), /*#__PURE__*/
|
|
12645
|
+
}, nativeProps), /*#__PURE__*/React__namespace.default.createElement(StyledBackDrop, {
|
|
12639
12646
|
themeSlideBackground: ((_items$currentSlideIn = items[currentSlideIndex]) === null || _items$currentSlideIn === void 0 ? void 0 : _items$currentSlideIn.background) || theme.colors.defaultGlobalSurface
|
|
12640
|
-
}), /*#__PURE__*/
|
|
12647
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledPageControlWrapper, null, pageControlPosition === 'top' && shouldRenderPagination && /*#__PURE__*/React__namespace.default.createElement(StyledPageControl, {
|
|
12641
12648
|
numberOfPages: items.length,
|
|
12642
12649
|
currentPage: currentSlideIndex
|
|
12643
|
-
})), /*#__PURE__*/
|
|
12650
|
+
})), /*#__PURE__*/React__namespace.default.createElement(StyledCarouselView, null, /*#__PURE__*/React__namespace.default.createElement(reactNative.FlatList, {
|
|
12644
12651
|
onLayout: flatListOnLayout,
|
|
12645
12652
|
testID: testID ? "".concat(testID, "_flatlist") : undefined,
|
|
12646
12653
|
horizontal: true,
|
|
@@ -12668,7 +12675,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
12668
12675
|
heading = item.heading,
|
|
12669
12676
|
body = item.body,
|
|
12670
12677
|
content = item.content;
|
|
12671
|
-
return /*#__PURE__*/
|
|
12678
|
+
return /*#__PURE__*/React__namespace.default.createElement(CarouselItem, {
|
|
12672
12679
|
image: image,
|
|
12673
12680
|
heading: heading,
|
|
12674
12681
|
body: body,
|
|
@@ -12683,7 +12690,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
12683
12690
|
index: index
|
|
12684
12691
|
};
|
|
12685
12692
|
}
|
|
12686
|
-
}), /*#__PURE__*/
|
|
12693
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledCarouselFooterWrapper, null, renderActions && renderActions(currentSlideIndex), pageControlPosition === 'bottom' && shouldRenderPagination && /*#__PURE__*/React__namespace.default.createElement(StyledPageControl, {
|
|
12687
12694
|
numberOfPages: items.length,
|
|
12688
12695
|
currentPage: currentSlideIndex
|
|
12689
12696
|
}))));
|
|
@@ -12801,7 +12808,7 @@ var Chip = function Chip(_ref) {
|
|
|
12801
12808
|
icon = _ref.icon,
|
|
12802
12809
|
onPress = _ref.onPress,
|
|
12803
12810
|
otherProps = _objectWithoutProperties(_ref, _excluded$k);
|
|
12804
|
-
var internalIcon =
|
|
12811
|
+
var internalIcon = React__namespace.default.useMemo(function () {
|
|
12805
12812
|
if (icon && variant === 'filled') {
|
|
12806
12813
|
return icon;
|
|
12807
12814
|
}
|
|
@@ -12810,17 +12817,17 @@ var Chip = function Chip(_ref) {
|
|
|
12810
12817
|
}
|
|
12811
12818
|
return undefined;
|
|
12812
12819
|
}, [icon, selected, variant]);
|
|
12813
|
-
return /*#__PURE__*/
|
|
12820
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledChipWrapper, _extends$1({
|
|
12814
12821
|
onPress: onPress,
|
|
12815
12822
|
themeVariant: variant,
|
|
12816
12823
|
themeSelected: selected
|
|
12817
|
-
}, otherProps), internalIcon && /*#__PURE__*/
|
|
12824
|
+
}, otherProps), internalIcon && /*#__PURE__*/React__namespace.default.createElement(StyledIconWrapper$3, null, /*#__PURE__*/React__namespace.default.createElement(StyledIcon$1, {
|
|
12818
12825
|
size: "xsmall",
|
|
12819
12826
|
icon: internalIcon,
|
|
12820
12827
|
themeSelected: selected,
|
|
12821
12828
|
themeVariant: variant,
|
|
12822
12829
|
testID: "chip-icon-".concat(internalIcon)
|
|
12823
|
-
})), /*#__PURE__*/
|
|
12830
|
+
})), /*#__PURE__*/React__namespace.default.createElement(StyledLabel, {
|
|
12824
12831
|
variant: "small",
|
|
12825
12832
|
themeVariant: variant,
|
|
12826
12833
|
themeSelected: selected
|
|
@@ -12901,20 +12908,20 @@ var Checkbox = function Checkbox(_ref2) {
|
|
|
12901
12908
|
disabled: disabled,
|
|
12902
12909
|
readonly: readonly
|
|
12903
12910
|
});
|
|
12904
|
-
return /*#__PURE__*/
|
|
12911
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$7, {
|
|
12905
12912
|
onPress: onPress,
|
|
12906
12913
|
disabled: disabled || readonly,
|
|
12907
12914
|
themeState: themeState,
|
|
12908
12915
|
style: style,
|
|
12909
12916
|
testID: testID
|
|
12910
|
-
}, !!description && /*#__PURE__*/
|
|
12917
|
+
}, !!description && /*#__PURE__*/React__namespace.default.createElement(StyledDescription$1, {
|
|
12911
12918
|
intent: disabled ? 'subdued' : 'body',
|
|
12912
12919
|
variant: "small"
|
|
12913
|
-
}, description), /*#__PURE__*/
|
|
12920
|
+
}, description), /*#__PURE__*/React__namespace.default.createElement(StyledCheckboxContainer, null, checked && /*#__PURE__*/React__namespace.default.createElement(StyledCheckMark, {
|
|
12914
12921
|
icon: "box-check",
|
|
12915
12922
|
testID: "check-mark",
|
|
12916
12923
|
themeState: themeState
|
|
12917
|
-
}), /*#__PURE__*/
|
|
12924
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledCheckbox, {
|
|
12918
12925
|
themeState: themeState
|
|
12919
12926
|
})));
|
|
12920
12927
|
};
|
|
@@ -13075,21 +13082,21 @@ var LABEL_ANIMATION_DURATION = 150;
|
|
|
13075
13082
|
var renderErrorOrHelpText = function renderErrorOrHelpText(_ref2) {
|
|
13076
13083
|
var error = _ref2.error,
|
|
13077
13084
|
helpText = _ref2.helpText;
|
|
13078
|
-
return error ? /*#__PURE__*/
|
|
13085
|
+
return error ? /*#__PURE__*/React__namespace.default.createElement(StyledErrorContainer$2, null, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
13079
13086
|
testID: "input-error-icon",
|
|
13080
13087
|
icon: "circle-info",
|
|
13081
13088
|
size: "xsmall",
|
|
13082
13089
|
intent: "danger"
|
|
13083
|
-
}), /*#__PURE__*/
|
|
13090
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledError, {
|
|
13084
13091
|
testID: "input-error-message"
|
|
13085
|
-
}, error)) : !!helpText && /*#__PURE__*/
|
|
13092
|
+
}, error)) : !!helpText && /*#__PURE__*/React__namespace.default.createElement(StyledHelperText, null, helpText);
|
|
13086
13093
|
};
|
|
13087
13094
|
var renderInput = function renderInput(_ref3) {
|
|
13088
13095
|
var variant = _ref3.variant,
|
|
13089
13096
|
nativeInputProps = _ref3.nativeInputProps,
|
|
13090
13097
|
renderInputValue = _ref3.renderInputValue,
|
|
13091
13098
|
ref = _ref3.ref;
|
|
13092
|
-
return renderInputValue ? renderInputValue(nativeInputProps) : /*#__PURE__*/
|
|
13099
|
+
return renderInputValue ? renderInputValue(nativeInputProps) : /*#__PURE__*/React__namespace.default.createElement(StyledTextInput, _extends$1({}, nativeInputProps, {
|
|
13093
13100
|
themeVariant: variant,
|
|
13094
13101
|
multiline: variant === 'textarea' || nativeInputProps.multiline,
|
|
13095
13102
|
ref: ref
|
|
@@ -13100,7 +13107,7 @@ var renderSuffix = function renderSuffix(_ref4) {
|
|
|
13100
13107
|
loading = _ref4.loading,
|
|
13101
13108
|
suffix = _ref4.suffix;
|
|
13102
13109
|
var actualSuffix = loading ? 'loading' : suffix;
|
|
13103
|
-
return typeof actualSuffix === 'string' ? /*#__PURE__*/
|
|
13110
|
+
return typeof actualSuffix === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
13104
13111
|
intent: state === 'disabled' ? 'disabled-text' : 'text',
|
|
13105
13112
|
testID: "input-suffix",
|
|
13106
13113
|
icon: actualSuffix,
|
|
@@ -13111,7 +13118,7 @@ var renderSuffix = function renderSuffix(_ref4) {
|
|
|
13111
13118
|
var renderPrefix = function renderPrefix(_ref5) {
|
|
13112
13119
|
var state = _ref5.state,
|
|
13113
13120
|
prefix = _ref5.prefix;
|
|
13114
|
-
return typeof prefix === 'string' ? /*#__PURE__*/
|
|
13121
|
+
return typeof prefix === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
13115
13122
|
intent: state === 'disabled' ? 'disabled-text' : 'text',
|
|
13116
13123
|
testID: "input-prefix",
|
|
13117
13124
|
icon: prefix,
|
|
@@ -13124,7 +13131,7 @@ var renderMaxLengthMessage = function renderMaxLengthMessage(_ref6) {
|
|
|
13124
13131
|
currentLength = _ref6.currentLength,
|
|
13125
13132
|
hideCharacterCount = _ref6.hideCharacterCount;
|
|
13126
13133
|
var shouldShowMaxLength = maxLength !== undefined && !hideCharacterCount;
|
|
13127
|
-
return shouldShowMaxLength && /*#__PURE__*/
|
|
13134
|
+
return shouldShowMaxLength && /*#__PURE__*/React__namespace.default.createElement(StyledMaxLengthMessage, {
|
|
13128
13135
|
themeState: state
|
|
13129
13136
|
}, currentLength, "/", maxLength);
|
|
13130
13137
|
};
|
|
@@ -13162,22 +13169,22 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
|
|
|
13162
13169
|
nativeProps = _objectWithoutProperties(_ref8, _excluded$j);
|
|
13163
13170
|
var displayText = getDisplayText(value, defaultValue);
|
|
13164
13171
|
var isEmptyValue = displayText.length === 0;
|
|
13165
|
-
var _React$useState =
|
|
13172
|
+
var _React$useState = React__namespace.default.useState({
|
|
13166
13173
|
height: 0,
|
|
13167
13174
|
width: 0
|
|
13168
13175
|
}),
|
|
13169
13176
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
13170
13177
|
inputSize = _React$useState2[0],
|
|
13171
13178
|
setInputSize = _React$useState2[1];
|
|
13172
|
-
var _React$useState3 =
|
|
13179
|
+
var _React$useState3 = React__namespace.default.useState(0),
|
|
13173
13180
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
13174
13181
|
labelWidth = _React$useState4[0],
|
|
13175
13182
|
setLabelWidth = _React$useState4[1];
|
|
13176
|
-
var _React$useState5 =
|
|
13183
|
+
var _React$useState5 = React__namespace.default.useState(0),
|
|
13177
13184
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
13178
13185
|
prefixWidth = _React$useState6[0],
|
|
13179
13186
|
setPrefixWidth = _React$useState6[1];
|
|
13180
|
-
var _React$useState7 =
|
|
13187
|
+
var _React$useState7 = React__namespace.default.useState(false),
|
|
13181
13188
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
13182
13189
|
isFocused = _React$useState8[0],
|
|
13183
13190
|
setIsFocused = _React$useState8[1];
|
|
@@ -13218,8 +13225,8 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
|
|
|
13218
13225
|
var width = event.nativeEvent.layout.width;
|
|
13219
13226
|
setLabelWidth(width);
|
|
13220
13227
|
}, []);
|
|
13221
|
-
var innerTextInput =
|
|
13222
|
-
|
|
13228
|
+
var innerTextInput = React__namespace.default.useRef();
|
|
13229
|
+
React__namespace.default.useImperativeHandle(ref, function () {
|
|
13223
13230
|
return {
|
|
13224
13231
|
// we don't expose this method, it's for testing https://medium.com/developer-rants/how-to-test-useref-without-mocking-useref-699165f4994e
|
|
13225
13232
|
getNativeTextInputRef: function getNativeTextInputRef() {
|
|
@@ -13311,25 +13318,25 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
|
|
|
13311
13318
|
defaultValue: defaultValue,
|
|
13312
13319
|
placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
|
|
13313
13320
|
});
|
|
13314
|
-
return /*#__PURE__*/
|
|
13321
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$4, {
|
|
13315
13322
|
style: styleWithoutBackgroundColor,
|
|
13316
13323
|
pointerEvents: state === 'disabled' || state === 'readonly' ? 'none' : 'auto',
|
|
13317
13324
|
testID: testID
|
|
13318
|
-
}, /*#__PURE__*/
|
|
13325
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledTextInputContainer, {
|
|
13319
13326
|
onLayout: onLayout
|
|
13320
|
-
}, /*#__PURE__*/
|
|
13327
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledBorderBackDrop, {
|
|
13321
13328
|
themeFocused: isFocused,
|
|
13322
13329
|
themeState: state,
|
|
13323
13330
|
testID: "text-input-border",
|
|
13324
13331
|
style: [{
|
|
13325
13332
|
backgroundColor: backgroundColor
|
|
13326
13333
|
}, borderStyle]
|
|
13327
|
-
}), /*#__PURE__*/
|
|
13334
|
+
}), /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
13328
13335
|
onLayout: onPrefixLayout
|
|
13329
13336
|
}, renderPrefix({
|
|
13330
13337
|
state: state,
|
|
13331
13338
|
prefix: prefix
|
|
13332
|
-
})), /*#__PURE__*/
|
|
13339
|
+
})), /*#__PURE__*/React__namespace.default.createElement(StyledLabelContainerInsideTextInput, {
|
|
13333
13340
|
themeVariant: variant,
|
|
13334
13341
|
pointerEvents: "none",
|
|
13335
13342
|
style: [{
|
|
@@ -13352,13 +13359,13 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
|
|
|
13352
13359
|
})
|
|
13353
13360
|
}]
|
|
13354
13361
|
}]
|
|
13355
|
-
}, required && /*#__PURE__*/
|
|
13362
|
+
}, required && /*#__PURE__*/React__namespace.default.createElement(StyledAsteriskLabelInsideTextInput, {
|
|
13356
13363
|
style: {
|
|
13357
13364
|
backgroundColor: backgroundColor
|
|
13358
13365
|
},
|
|
13359
13366
|
themeState: state,
|
|
13360
13367
|
testID: "input-label-asterisk"
|
|
13361
|
-
}, "*"), !!label && /*#__PURE__*/
|
|
13368
|
+
}, "*"), !!label && /*#__PURE__*/React__namespace.default.createElement(StyledLabelInsideTextInput, {
|
|
13362
13369
|
style: {
|
|
13363
13370
|
backgroundColor: backgroundColor
|
|
13364
13371
|
},
|
|
@@ -13366,7 +13373,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
|
|
|
13366
13373
|
testID: "input-label",
|
|
13367
13374
|
themeState: state,
|
|
13368
13375
|
onLayout: onLabelLayout
|
|
13369
|
-
}, label)), /*#__PURE__*/
|
|
13376
|
+
}, label)), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputAndLabelContainer, null, renderInput({
|
|
13370
13377
|
variant: variant,
|
|
13371
13378
|
nativeInputProps: nativeInputProps,
|
|
13372
13379
|
renderInputValue: renderInputValue,
|
|
@@ -13377,7 +13384,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
|
|
|
13377
13384
|
state: state,
|
|
13378
13385
|
loading: loading,
|
|
13379
13386
|
suffix: suffix
|
|
13380
|
-
})), /*#__PURE__*/
|
|
13387
|
+
})), /*#__PURE__*/React__namespace.default.createElement(StyledErrorAndHelpTextContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledErrorAndMaxLengthContainer, null, renderErrorOrHelpText({
|
|
13381
13388
|
error: error,
|
|
13382
13389
|
helpText: helpText
|
|
13383
13390
|
}), renderMaxLengthMessage({
|
|
@@ -13438,15 +13445,15 @@ var DatePickerAndroid = function DatePickerAndroid(_ref) {
|
|
|
13438
13445
|
onChange: _onChange,
|
|
13439
13446
|
value: value
|
|
13440
13447
|
});
|
|
13441
|
-
return /*#__PURE__*/
|
|
13448
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
|
|
13442
13449
|
onPress: function onPress() {
|
|
13443
13450
|
return setOpen(true);
|
|
13444
13451
|
},
|
|
13445
13452
|
disabled: disabled
|
|
13446
|
-
}, /*#__PURE__*/
|
|
13453
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
13447
13454
|
pointerEvents: "none",
|
|
13448
13455
|
testID: "datePickerInputAndroid"
|
|
13449
|
-
}, /*#__PURE__*/
|
|
13456
|
+
}, /*#__PURE__*/React__namespace.default.createElement(TextInput, {
|
|
13450
13457
|
label: label,
|
|
13451
13458
|
value: displayValue,
|
|
13452
13459
|
suffix: "calendar-dates-outlined",
|
|
@@ -13457,7 +13464,7 @@ var DatePickerAndroid = function DatePickerAndroid(_ref) {
|
|
|
13457
13464
|
helpText: helpText,
|
|
13458
13465
|
style: style,
|
|
13459
13466
|
testID: testID
|
|
13460
|
-
})), open ? /*#__PURE__*/
|
|
13467
|
+
})), open ? /*#__PURE__*/React__namespace.default.createElement(DateTimePicker__default.default, {
|
|
13461
13468
|
testID: "datePickerAndroid",
|
|
13462
13469
|
mode: "date",
|
|
13463
13470
|
value: pickerInitValue,
|
|
@@ -13489,7 +13496,7 @@ var InternalCalendar = function InternalCalendar(_ref) {
|
|
|
13489
13496
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
13490
13497
|
selectingDate = _useState4[0],
|
|
13491
13498
|
setSelectingDate = _useState4[1];
|
|
13492
|
-
return /*#__PURE__*/
|
|
13499
|
+
return /*#__PURE__*/React__namespace.default.createElement(Calendar, {
|
|
13493
13500
|
testID: "calendar",
|
|
13494
13501
|
value: selectingDate,
|
|
13495
13502
|
visibleDate: visibleDate,
|
|
@@ -13558,15 +13565,15 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
|
|
|
13558
13565
|
onChange: onChange,
|
|
13559
13566
|
value: value
|
|
13560
13567
|
});
|
|
13561
|
-
return /*#__PURE__*/
|
|
13568
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
|
|
13562
13569
|
onPress: function onPress() {
|
|
13563
13570
|
return setOpen(true);
|
|
13564
13571
|
},
|
|
13565
13572
|
disabled: disabled
|
|
13566
|
-
}, /*#__PURE__*/
|
|
13573
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
13567
13574
|
pointerEvents: "none",
|
|
13568
13575
|
testID: "datePickerCalendar"
|
|
13569
|
-
}, /*#__PURE__*/
|
|
13576
|
+
}, /*#__PURE__*/React__namespace.default.createElement(TextInput, {
|
|
13570
13577
|
label: label,
|
|
13571
13578
|
value: displayValue,
|
|
13572
13579
|
suffix: "calendar-dates-outlined",
|
|
@@ -13577,13 +13584,13 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
|
|
|
13577
13584
|
helpText: helpText,
|
|
13578
13585
|
testID: testID,
|
|
13579
13586
|
style: style
|
|
13580
|
-
})), /*#__PURE__*/
|
|
13587
|
+
})), /*#__PURE__*/React__namespace.default.createElement(BottomSheet$1, {
|
|
13581
13588
|
open: open,
|
|
13582
13589
|
onRequestClose: function onRequestClose() {
|
|
13583
13590
|
return setOpen(false);
|
|
13584
13591
|
},
|
|
13585
13592
|
header: label,
|
|
13586
|
-
footer: shouldHideToolbar ? undefined : /*#__PURE__*/
|
|
13593
|
+
footer: shouldHideToolbar ? undefined : /*#__PURE__*/React__namespace.default.createElement(CompoundButton, {
|
|
13587
13594
|
variant: "text",
|
|
13588
13595
|
text: confirmLabel,
|
|
13589
13596
|
onPress: function onPress() {
|
|
@@ -13594,7 +13601,7 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
|
|
|
13594
13601
|
}
|
|
13595
13602
|
}),
|
|
13596
13603
|
supportedOrientations: supportedOrientations
|
|
13597
|
-
}, /*#__PURE__*/
|
|
13604
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.ScrollView, null, /*#__PURE__*/React__namespace.default.createElement(InternalCalendar, {
|
|
13598
13605
|
minDate: minDate,
|
|
13599
13606
|
maxDate: maxDate,
|
|
13600
13607
|
value: value,
|
|
@@ -13649,15 +13656,15 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
13649
13656
|
onChange: onChange,
|
|
13650
13657
|
value: value
|
|
13651
13658
|
});
|
|
13652
|
-
return /*#__PURE__*/
|
|
13659
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
|
|
13653
13660
|
onPress: function onPress() {
|
|
13654
13661
|
return setOpen(true);
|
|
13655
13662
|
},
|
|
13656
13663
|
disabled: disabled
|
|
13657
|
-
}, /*#__PURE__*/
|
|
13664
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
13658
13665
|
pointerEvents: "none",
|
|
13659
13666
|
testID: "datePickerInputIOS"
|
|
13660
|
-
}, /*#__PURE__*/
|
|
13667
|
+
}, /*#__PURE__*/React__namespace.default.createElement(TextInput, {
|
|
13661
13668
|
label: label,
|
|
13662
13669
|
value: displayValue,
|
|
13663
13670
|
suffix: "calendar-dates-outlined",
|
|
@@ -13668,13 +13675,13 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
13668
13675
|
helpText: helpText,
|
|
13669
13676
|
testID: testID,
|
|
13670
13677
|
style: style
|
|
13671
|
-
})), /*#__PURE__*/
|
|
13678
|
+
})), /*#__PURE__*/React__namespace.default.createElement(BottomSheet$1, {
|
|
13672
13679
|
open: open,
|
|
13673
13680
|
onRequestClose: function onRequestClose() {
|
|
13674
13681
|
return setOpen(false);
|
|
13675
13682
|
},
|
|
13676
13683
|
header: label,
|
|
13677
|
-
footer: /*#__PURE__*/
|
|
13684
|
+
footer: /*#__PURE__*/React__namespace.default.createElement(CompoundButton, {
|
|
13678
13685
|
variant: "text",
|
|
13679
13686
|
text: confirmLabel,
|
|
13680
13687
|
onPress: function onPress() {
|
|
@@ -13685,7 +13692,7 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
13685
13692
|
}
|
|
13686
13693
|
}),
|
|
13687
13694
|
supportedOrientations: supportedOrientations
|
|
13688
|
-
}, /*#__PURE__*/
|
|
13695
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledPickerWrapper$1, null, /*#__PURE__*/React__namespace.default.createElement(DateTimePicker__default.default, {
|
|
13689
13696
|
testID: "datePickerIOS",
|
|
13690
13697
|
value: selectingDate,
|
|
13691
13698
|
minimumDate: minDate,
|
|
@@ -13710,12 +13717,12 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
13710
13717
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
13711
13718
|
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
13712
13719
|
if (variant === 'calendar') {
|
|
13713
|
-
return /*#__PURE__*/
|
|
13720
|
+
return /*#__PURE__*/React__namespace.default.createElement(DatePickerCalendar, props);
|
|
13714
13721
|
}
|
|
13715
13722
|
if (reactNative.Platform.OS === 'ios') {
|
|
13716
|
-
return /*#__PURE__*/
|
|
13723
|
+
return /*#__PURE__*/React__namespace.default.createElement(DatePickerIOS, props);
|
|
13717
13724
|
}
|
|
13718
|
-
return /*#__PURE__*/
|
|
13725
|
+
return /*#__PURE__*/React__namespace.default.createElement(DatePickerAndroid, props);
|
|
13719
13726
|
};
|
|
13720
13727
|
|
|
13721
13728
|
var AnimatedPressable$1 = reactNative.Animated.createAnimatedComponent(reactNative.Pressable);
|
|
@@ -13926,11 +13933,11 @@ var DragableDrawer = function DragableDrawer(_ref) {
|
|
|
13926
13933
|
setAnimatedToValue(animatedValue);
|
|
13927
13934
|
}
|
|
13928
13935
|
})).current;
|
|
13929
|
-
return /*#__PURE__*/
|
|
13936
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledDragableContainer, {
|
|
13930
13937
|
testID: testID,
|
|
13931
13938
|
enableShadow: true,
|
|
13932
13939
|
pointerEvents: "box-none"
|
|
13933
|
-
}, /*#__PURE__*/
|
|
13940
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledDragableDrawerContainer, {
|
|
13934
13941
|
enableShadow: true,
|
|
13935
13942
|
style: {
|
|
13936
13943
|
transform: [{
|
|
@@ -13943,7 +13950,7 @@ var DragableDrawer = function DragableDrawer(_ref) {
|
|
|
13943
13950
|
var nativeEvent = _ref3.nativeEvent;
|
|
13944
13951
|
setHeight(nativeEvent.layout.height);
|
|
13945
13952
|
}
|
|
13946
|
-
}, /*#__PURE__*/
|
|
13953
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledHandlerContainer, panResponder.panHandlers, /*#__PURE__*/React__namespace.default.createElement(StyledHandler, null)), children));
|
|
13947
13954
|
};
|
|
13948
13955
|
|
|
13949
13956
|
var Drawer = function Drawer(_ref) {
|
|
@@ -13978,17 +13985,17 @@ var Drawer = function Drawer(_ref) {
|
|
|
13978
13985
|
return animation.stop();
|
|
13979
13986
|
};
|
|
13980
13987
|
}, [visible]);
|
|
13981
|
-
return /*#__PURE__*/
|
|
13988
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$3, {
|
|
13982
13989
|
testID: testID,
|
|
13983
13990
|
enableShadow: enableShadow,
|
|
13984
13991
|
pointerEvents: "box-none"
|
|
13985
|
-
}, /*#__PURE__*/
|
|
13992
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledBackdrop$1, {
|
|
13986
13993
|
pointerEvents: visible ? 'auto' : 'box-none',
|
|
13987
13994
|
onPress: onDismiss,
|
|
13988
13995
|
style: {
|
|
13989
13996
|
opacity: interpolateBackdropOpacity
|
|
13990
13997
|
}
|
|
13991
|
-
}), /*#__PURE__*/
|
|
13998
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledDrawerContainer, {
|
|
13992
13999
|
enableShadow: enableShadow,
|
|
13993
14000
|
onLayout: function onLayout(_ref2) {
|
|
13994
14001
|
var nativeEvent = _ref2.nativeEvent;
|
|
@@ -14043,18 +14050,18 @@ var Empty = function Empty(_ref) {
|
|
|
14043
14050
|
_ref$variant = _ref.variant,
|
|
14044
14051
|
variant = _ref$variant === void 0 ? 'light' : _ref$variant;
|
|
14045
14052
|
var theme = useTheme();
|
|
14046
|
-
return /*#__PURE__*/
|
|
14053
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$6, {
|
|
14047
14054
|
style: style,
|
|
14048
14055
|
testID: testID
|
|
14049
|
-
}, image !== undefined && /*#__PURE__*/
|
|
14056
|
+
}, image !== undefined && /*#__PURE__*/React__namespace.default.cloneElement(image, _objectSpread2(_objectSpread2({}, image.props), {}, {
|
|
14050
14057
|
style: [{
|
|
14051
14058
|
marginBottom: theme.__hd__.empty.space.imageMargin
|
|
14052
14059
|
}, image.props.style]
|
|
14053
|
-
})), /*#__PURE__*/
|
|
14060
|
+
})), /*#__PURE__*/React__namespace.default.createElement(StyledTitle, {
|
|
14054
14061
|
themeVariant: variant,
|
|
14055
14062
|
level: "h4",
|
|
14056
14063
|
typeface: "playful"
|
|
14057
|
-
}, title), !!description && /*#__PURE__*/
|
|
14064
|
+
}, title), !!description && /*#__PURE__*/React__namespace.default.createElement(StyledDescription, {
|
|
14058
14065
|
themeVariant: variant,
|
|
14059
14066
|
typeface: "playful"
|
|
14060
14067
|
}, description));
|
|
@@ -14147,7 +14154,7 @@ var PortalHostComponent = function PortalHostComponent(_ref) {
|
|
|
14147
14154
|
deregisterHost();
|
|
14148
14155
|
};
|
|
14149
14156
|
}, []);
|
|
14150
|
-
return /*#__PURE__*/
|
|
14157
|
+
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, state.map(function (item) {
|
|
14151
14158
|
return item.node;
|
|
14152
14159
|
}));
|
|
14153
14160
|
};
|
|
@@ -14215,11 +14222,11 @@ var PortalProviderComponent = function PortalProviderComponent(_ref) {
|
|
|
14215
14222
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
14216
14223
|
state = _useReducer2[0],
|
|
14217
14224
|
dispatch = _useReducer2[1];
|
|
14218
|
-
return /*#__PURE__*/
|
|
14225
|
+
return /*#__PURE__*/React__namespace.default.createElement(PortalDispatchContext.Provider, {
|
|
14219
14226
|
value: dispatch
|
|
14220
|
-
}, /*#__PURE__*/
|
|
14227
|
+
}, /*#__PURE__*/React__namespace.default.createElement(PortalStateContext.Provider, {
|
|
14221
14228
|
value: state
|
|
14222
|
-
}, children, /*#__PURE__*/
|
|
14229
|
+
}, children, /*#__PURE__*/React__namespace.default.createElement(PortalHost, {
|
|
14223
14230
|
name: rootHostName
|
|
14224
14231
|
})));
|
|
14225
14232
|
};
|
|
@@ -14240,7 +14247,7 @@ var PortalComponent = function PortalComponent(_ref) {
|
|
|
14240
14247
|
return name || nanoid();
|
|
14241
14248
|
}, [name]);
|
|
14242
14249
|
var ChildrenComponent = React.useMemo(function () {
|
|
14243
|
-
return /*#__PURE__*/
|
|
14250
|
+
return /*#__PURE__*/React__namespace.default.createElement(ThemeProvider, {
|
|
14244
14251
|
theme: theme || defaultTheme
|
|
14245
14252
|
}, children);
|
|
14246
14253
|
}, [theme, children, defaultTheme]);
|
|
@@ -14340,12 +14347,12 @@ var Modal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14340
14347
|
return backHandler.remove();
|
|
14341
14348
|
};
|
|
14342
14349
|
}, [onRequestClose]);
|
|
14343
|
-
return /*#__PURE__*/
|
|
14350
|
+
return /*#__PURE__*/React__namespace.default.createElement(Portal$1, null, /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
14344
14351
|
style: _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
14345
14352
|
backgroundColor: transparent ? 'transparent' : theme.colors.overlayGlobalSurface,
|
|
14346
14353
|
opacity: animationType !== 'none' ? backdropOpacityAnimation : DEFAULT_BACKDROP_OPACITY
|
|
14347
14354
|
})
|
|
14348
|
-
}), /*#__PURE__*/
|
|
14355
|
+
}), /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
14349
14356
|
testID: testID,
|
|
14350
14357
|
style: _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
14351
14358
|
opacity: animationType === 'fade' ? modalAnimation : 1,
|
|
@@ -14381,7 +14388,7 @@ var ModalWrapper = function ModalWrapper(_ref3) {
|
|
|
14381
14388
|
(_modalRef$current2 = modalRef.current) === null || _modalRef$current2 === void 0 || _modalRef$current2.show();
|
|
14382
14389
|
}
|
|
14383
14390
|
}, [internalVisible]);
|
|
14384
|
-
return internalVisible ? /*#__PURE__*/
|
|
14391
|
+
return internalVisible ? /*#__PURE__*/React__namespace.default.createElement(Modal, _extends$1({
|
|
14385
14392
|
ref: modalRef
|
|
14386
14393
|
}, props)) : null;
|
|
14387
14394
|
};
|
|
@@ -14472,11 +14479,11 @@ var _excluded$g = ["variant", "title", "description", "image", "testID", "ctaTex
|
|
|
14472
14479
|
_excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
14473
14480
|
var renderImage$1 = function renderImage(image) {
|
|
14474
14481
|
if ( /*#__PURE__*/React.isValidElement(image)) {
|
|
14475
|
-
return /*#__PURE__*/
|
|
14482
|
+
return /*#__PURE__*/React__namespace.default.cloneElement(image, {
|
|
14476
14483
|
testID: 'error-image'
|
|
14477
14484
|
});
|
|
14478
14485
|
}
|
|
14479
|
-
return /*#__PURE__*/
|
|
14486
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledErrorImage, {
|
|
14480
14487
|
source: typeof image === 'string' ? {
|
|
14481
14488
|
uri: image
|
|
14482
14489
|
} : image,
|
|
@@ -14498,19 +14505,19 @@ var ErrorPage = function ErrorPage(_ref) {
|
|
|
14498
14505
|
var showCta = ctaText && onCtaPress !== undefined;
|
|
14499
14506
|
var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
|
|
14500
14507
|
var showButtonContainer = showCta || showSecondaryCta;
|
|
14501
|
-
return /*#__PURE__*/
|
|
14508
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledErrorContainer$1, _extends$1({
|
|
14502
14509
|
testID: testID,
|
|
14503
14510
|
themeVariant: variant
|
|
14504
|
-
}, nativeProps), /*#__PURE__*/
|
|
14511
|
+
}, nativeProps), /*#__PURE__*/React__namespace.default.createElement(StyledErrorContent, null, image && /*#__PURE__*/React__namespace.default.createElement(StyledErrorImageContainer, null, renderImage$1(image)), /*#__PURE__*/React__namespace.default.createElement(StyledErrorTitle, {
|
|
14505
14512
|
level: "h4",
|
|
14506
14513
|
typeface: "playful"
|
|
14507
|
-
}, title), description && /*#__PURE__*/
|
|
14514
|
+
}, title), description && /*#__PURE__*/React__namespace.default.createElement(StyledErrorDescription, {
|
|
14508
14515
|
typeface: "playful"
|
|
14509
|
-
}, description)), showButtonContainer && /*#__PURE__*/
|
|
14516
|
+
}, description)), showButtonContainer && /*#__PURE__*/React__namespace.default.createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__namespace.default.createElement(StyledErrorButtonPrimary, {
|
|
14510
14517
|
variant: "filled",
|
|
14511
14518
|
text: ctaText,
|
|
14512
14519
|
onPress: onCtaPress
|
|
14513
|
-
}), showSecondaryCta && /*#__PURE__*/
|
|
14520
|
+
}), showSecondaryCta && /*#__PURE__*/React__namespace.default.createElement(StyledErrorButtonSecondary, {
|
|
14514
14521
|
variant: "text",
|
|
14515
14522
|
text: secondaryCtaText,
|
|
14516
14523
|
onPress: onSecondaryCtaPress
|
|
@@ -14569,7 +14576,7 @@ var ErrorComponent = function ErrorComponent(_ref2) {
|
|
|
14569
14576
|
}
|
|
14570
14577
|
}, [isVisible, onCloseModal]);
|
|
14571
14578
|
if (variant === 'full-screen') {
|
|
14572
|
-
return /*#__PURE__*/
|
|
14579
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledErrorModal, {
|
|
14573
14580
|
visible: isVisible,
|
|
14574
14581
|
onRequestClose: function onRequestClose() {
|
|
14575
14582
|
return setIsVisible(false);
|
|
@@ -14578,7 +14585,7 @@ var ErrorComponent = function ErrorComponent(_ref2) {
|
|
|
14578
14585
|
return setIsVisible(false);
|
|
14579
14586
|
},
|
|
14580
14587
|
animationType: "slide"
|
|
14581
|
-
}, /*#__PURE__*/
|
|
14588
|
+
}, /*#__PURE__*/React__namespace.default.createElement(ErrorPage, _extends$1({
|
|
14582
14589
|
variant: variant,
|
|
14583
14590
|
title: title,
|
|
14584
14591
|
description: description,
|
|
@@ -14594,7 +14601,7 @@ var ErrorComponent = function ErrorComponent(_ref2) {
|
|
|
14594
14601
|
}
|
|
14595
14602
|
}, nativeProps)));
|
|
14596
14603
|
}
|
|
14597
|
-
return /*#__PURE__*/
|
|
14604
|
+
return /*#__PURE__*/React__namespace.default.createElement(ErrorPage, _extends$1({
|
|
14598
14605
|
variant: variant,
|
|
14599
14606
|
title: title,
|
|
14600
14607
|
description: description,
|
|
@@ -14675,13 +14682,13 @@ var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
|
|
|
14675
14682
|
inputRange: [0, 1],
|
|
14676
14683
|
outputRange: ['0deg', '-45deg']
|
|
14677
14684
|
});
|
|
14678
|
-
return /*#__PURE__*/
|
|
14685
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
14679
14686
|
style: reactNative.StyleSheet.flatten([{
|
|
14680
14687
|
transform: [{
|
|
14681
14688
|
rotate: interpolatedRotateAnimation
|
|
14682
14689
|
}]
|
|
14683
14690
|
}])
|
|
14684
|
-
}, /*#__PURE__*/
|
|
14691
|
+
}, /*#__PURE__*/React__namespace.default.createElement(AnimatedIcons, _extends$1({
|
|
14685
14692
|
size: "xsmall"
|
|
14686
14693
|
}, iconProps)));
|
|
14687
14694
|
};
|
|
@@ -14696,13 +14703,13 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
|
|
|
14696
14703
|
animated = _ref.animated,
|
|
14697
14704
|
active = _ref.active;
|
|
14698
14705
|
if (animated) {
|
|
14699
|
-
return /*#__PURE__*/
|
|
14706
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(AnimatedFABIcon, {
|
|
14700
14707
|
active: active,
|
|
14701
14708
|
icon: icon,
|
|
14702
14709
|
testID: "animated-fab-icon"
|
|
14703
14710
|
}));
|
|
14704
14711
|
}
|
|
14705
|
-
return /*#__PURE__*/
|
|
14712
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledFABIcon, {
|
|
14706
14713
|
icon: icon,
|
|
14707
14714
|
testID: "styled-fab-icon"
|
|
14708
14715
|
});
|
|
@@ -14710,11 +14717,11 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
|
|
|
14710
14717
|
var IconWithTextContent = function IconWithTextContent(_ref2) {
|
|
14711
14718
|
var icon = _ref2.icon,
|
|
14712
14719
|
title = _ref2.title;
|
|
14713
|
-
return /*#__PURE__*/
|
|
14720
|
+
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledFABIcon, {
|
|
14714
14721
|
size: "xsmall",
|
|
14715
14722
|
icon: icon,
|
|
14716
14723
|
testID: "styled-fab-icon"
|
|
14717
|
-
})), /*#__PURE__*/
|
|
14724
|
+
})), /*#__PURE__*/React__namespace.default.createElement(StyledFABText, null, title));
|
|
14718
14725
|
};
|
|
14719
14726
|
var animateWidth = function animateWidth() {
|
|
14720
14727
|
reactNative.LayoutAnimation.configureNext({
|
|
@@ -14735,7 +14742,7 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
14735
14742
|
active = _ref3.active,
|
|
14736
14743
|
style = _ref3.style;
|
|
14737
14744
|
var theme = useTheme();
|
|
14738
|
-
var _React$useState =
|
|
14745
|
+
var _React$useState = React__namespace.default.useState({
|
|
14739
14746
|
hideTitle: false,
|
|
14740
14747
|
hideButton: false
|
|
14741
14748
|
}),
|
|
@@ -14744,17 +14751,17 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
14744
14751
|
setDisplayState = _React$useState2[1];
|
|
14745
14752
|
var isIconOnly = displayState.hideTitle || active || !title;
|
|
14746
14753
|
var animatedValues = {
|
|
14747
|
-
opacity:
|
|
14748
|
-
width:
|
|
14749
|
-
translateY:
|
|
14754
|
+
opacity: React__namespace.default.useRef(new reactNative.Animated.Value(1)).current,
|
|
14755
|
+
width: React__namespace.default.useRef(new reactNative.Animated.Value(1)).current,
|
|
14756
|
+
translateY: React__namespace.default.useRef(new reactNative.Animated.Value(0)).current
|
|
14750
14757
|
};
|
|
14751
14758
|
var marginBottom = Number((_StyleSheet$flatten = reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.marginBottom) || 0;
|
|
14752
|
-
var _React$useState3 =
|
|
14759
|
+
var _React$useState3 = React__namespace.default.useState(0),
|
|
14753
14760
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
14754
14761
|
buttonWidth = _React$useState4[0],
|
|
14755
14762
|
setButtonWidth = _React$useState4[1];
|
|
14756
14763
|
var hasSetButtonWidth = buttonWidth > 0;
|
|
14757
|
-
|
|
14764
|
+
React__namespace.default.useImperativeHandle(ref, function () {
|
|
14758
14765
|
return {
|
|
14759
14766
|
show: function show() {
|
|
14760
14767
|
reactNative.Animated.spring(animatedValues.translateY, {
|
|
@@ -14803,7 +14810,7 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
14803
14810
|
}
|
|
14804
14811
|
};
|
|
14805
14812
|
}, []);
|
|
14806
|
-
return /*#__PURE__*/
|
|
14813
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledFAB$1, {
|
|
14807
14814
|
onLayout: function onLayout(event) {
|
|
14808
14815
|
return !hasSetButtonWidth && !active && setButtonWidth(event.nativeEvent.layout.width);
|
|
14809
14816
|
},
|
|
@@ -14820,7 +14827,7 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
14820
14827
|
}],
|
|
14821
14828
|
testID: testID,
|
|
14822
14829
|
themeActive: active
|
|
14823
|
-
}, /*#__PURE__*/
|
|
14830
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
14824
14831
|
style: {
|
|
14825
14832
|
flexDirection: 'row',
|
|
14826
14833
|
opacity: animatedValues.opacity.interpolate({
|
|
@@ -14828,11 +14835,11 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
14828
14835
|
outputRange: [0, 1]
|
|
14829
14836
|
})
|
|
14830
14837
|
}
|
|
14831
|
-
}, isIconOnly ? /*#__PURE__*/
|
|
14838
|
+
}, isIconOnly ? /*#__PURE__*/React__namespace.default.createElement(IconOnlyContent, {
|
|
14832
14839
|
animated: animated,
|
|
14833
14840
|
active: active,
|
|
14834
14841
|
icon: active ? 'add' : icon
|
|
14835
|
-
}) : /*#__PURE__*/
|
|
14842
|
+
}) : /*#__PURE__*/React__namespace.default.createElement(IconWithTextContent, {
|
|
14836
14843
|
icon: icon,
|
|
14837
14844
|
title: title
|
|
14838
14845
|
})));
|
|
@@ -14876,12 +14883,12 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
14876
14883
|
_ref$active = _ref.active,
|
|
14877
14884
|
active = _ref$active === void 0 ? false : _ref$active;
|
|
14878
14885
|
var theme = useTheme();
|
|
14879
|
-
var animatedValue =
|
|
14886
|
+
var animatedValue = React__namespace.default.useRef(new reactNative.Animated.Value(0));
|
|
14880
14887
|
var translateY = animatedValue.current.interpolate({
|
|
14881
14888
|
inputRange: [0, 1],
|
|
14882
14889
|
outputRange: [50, 0]
|
|
14883
14890
|
});
|
|
14884
|
-
|
|
14891
|
+
React__namespace.default.useEffect(function () {
|
|
14885
14892
|
reactNative.Animated.spring(animatedValue.current, {
|
|
14886
14893
|
toValue: active ? 1 : 0,
|
|
14887
14894
|
useNativeDriver: reactNative.Platform.OS !== 'web',
|
|
@@ -14890,21 +14897,21 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
14890
14897
|
bounciness: 10
|
|
14891
14898
|
}).start();
|
|
14892
14899
|
}, [active, index]);
|
|
14893
|
-
return /*#__PURE__*/
|
|
14900
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
14894
14901
|
style: {
|
|
14895
14902
|
transform: [{
|
|
14896
14903
|
translateY: translateY
|
|
14897
14904
|
}]
|
|
14898
14905
|
}
|
|
14899
|
-
}, /*#__PURE__*/
|
|
14906
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledActionItem, {
|
|
14900
14907
|
underlayColor: theme.__hd__.fab.colors.actionItemPressedBackground,
|
|
14901
14908
|
style: style,
|
|
14902
14909
|
onPress: onPress,
|
|
14903
14910
|
testID: testID
|
|
14904
|
-
}, /*#__PURE__*/
|
|
14911
|
+
}, /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledIcon, {
|
|
14905
14912
|
size: "xsmall",
|
|
14906
14913
|
icon: icon
|
|
14907
|
-
})), /*#__PURE__*/
|
|
14914
|
+
})), /*#__PURE__*/React__namespace.default.createElement(StyledActionItemText, null, title))));
|
|
14908
14915
|
};
|
|
14909
14916
|
|
|
14910
14917
|
var StyledContainer$2 = index$9(reactNative.View)({
|
|
@@ -14969,7 +14976,7 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14969
14976
|
var theme = useTheme();
|
|
14970
14977
|
var fabRef = React.useRef(null);
|
|
14971
14978
|
var animatedValue = React.useRef(new reactNative.Animated.Value(active ? 1 : 0));
|
|
14972
|
-
|
|
14979
|
+
React__namespace.default.useImperativeHandle(ref, function () {
|
|
14973
14980
|
return {
|
|
14974
14981
|
showFAB: function showFAB() {
|
|
14975
14982
|
var _fabRef$current;
|
|
@@ -14985,7 +14992,7 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14985
14992
|
}
|
|
14986
14993
|
};
|
|
14987
14994
|
}, [fabRef]);
|
|
14988
|
-
|
|
14995
|
+
React__namespace.default.useEffect(function () {
|
|
14989
14996
|
reactNative.Animated.spring(animatedValue.current, {
|
|
14990
14997
|
toValue: active ? 1 : 0,
|
|
14991
14998
|
delay: 100,
|
|
@@ -15003,11 +15010,11 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
15003
15010
|
inputRange: [0, 1],
|
|
15004
15011
|
outputRange: [0, 1]
|
|
15005
15012
|
});
|
|
15006
|
-
return /*#__PURE__*/
|
|
15013
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$2, {
|
|
15007
15014
|
testID: testID,
|
|
15008
15015
|
pointerEvents: "box-none",
|
|
15009
15016
|
style: style
|
|
15010
|
-
}, /*#__PURE__*/
|
|
15017
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, null, /*#__PURE__*/React__namespace.default.createElement(StyledFAB, {
|
|
15011
15018
|
key: "fab",
|
|
15012
15019
|
testID: "fab",
|
|
15013
15020
|
icon: fabIcon,
|
|
@@ -15016,36 +15023,36 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
15016
15023
|
active: active,
|
|
15017
15024
|
title: fabTitle,
|
|
15018
15025
|
ref: fabRef
|
|
15019
|
-
})), /*#__PURE__*/
|
|
15026
|
+
})), /*#__PURE__*/React__namespace.default.createElement(reactNative.Modal, {
|
|
15020
15027
|
visible: active,
|
|
15021
15028
|
animationType: "fade",
|
|
15022
15029
|
transparent: true,
|
|
15023
15030
|
statusBarTranslucent: true,
|
|
15024
15031
|
supportedOrientations: supportedOrientations
|
|
15025
|
-
}, /*#__PURE__*/
|
|
15032
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledContainerInModal, {
|
|
15026
15033
|
testID: testID,
|
|
15027
15034
|
style: [style]
|
|
15028
|
-
}, /*#__PURE__*/
|
|
15035
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledBackdrop, {
|
|
15029
15036
|
testID: "back-drop",
|
|
15030
15037
|
onPress: onBackdropPress
|
|
15031
|
-
}), /*#__PURE__*/
|
|
15038
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledActionGroupContainer, {
|
|
15032
15039
|
testID: "action-group",
|
|
15033
15040
|
pointerEvents: "box-none",
|
|
15034
15041
|
style: {
|
|
15035
15042
|
opacity: actionGroupOpacity
|
|
15036
15043
|
}
|
|
15037
|
-
}, /*#__PURE__*/
|
|
15044
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Box, {
|
|
15038
15045
|
style: [style, {
|
|
15039
15046
|
paddingBottom: 0
|
|
15040
15047
|
}]
|
|
15041
15048
|
}, items === null || items === void 0 ? void 0 : items.map(function (itemProp, index) {
|
|
15042
|
-
return /*#__PURE__*/
|
|
15049
|
+
return /*#__PURE__*/React__namespace.default.createElement(ActionItem, _extends$1({
|
|
15043
15050
|
key: itemProp.key || "".concat(itemProp.icon, "_").concat(itemProp.title)
|
|
15044
15051
|
}, itemProp, {
|
|
15045
15052
|
index: active ? index : items.length - index,
|
|
15046
15053
|
active: active
|
|
15047
15054
|
}));
|
|
15048
|
-
}))), active && /*#__PURE__*/
|
|
15055
|
+
}))), active && /*#__PURE__*/React__namespace.default.createElement(StyledFAB
|
|
15049
15056
|
// This FAB is moved up a bit compared to the original FAB,
|
|
15050
15057
|
// set marginBottom to negative value to compensate for it
|
|
15051
15058
|
, {
|
|
@@ -15169,9 +15176,9 @@ var getIntentIcon = function getIntentIcon(intent) {
|
|
|
15169
15176
|
var ToastIcon = function ToastIcon(_ref) {
|
|
15170
15177
|
var themeIntent = _ref.themeIntent,
|
|
15171
15178
|
icon = _ref.icon;
|
|
15172
|
-
return icon ? /*#__PURE__*/
|
|
15179
|
+
return icon ? /*#__PURE__*/React__namespace.default.createElement(IconContainer, {
|
|
15173
15180
|
testID: "toast-left-icon"
|
|
15174
|
-
}, /*#__PURE__*/
|
|
15181
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
15175
15182
|
icon: icon,
|
|
15176
15183
|
size: "small",
|
|
15177
15184
|
intent: themeIntent === 'snackbar' ? 'text-inverted' : 'text'
|
|
@@ -15223,7 +15230,7 @@ var Toast$1 = function Toast(_ref2) {
|
|
|
15223
15230
|
inputRange: [0, 1],
|
|
15224
15231
|
outputRange: toastConfig.position === 'top' ? [-20, distance] : [20, -distance]
|
|
15225
15232
|
});
|
|
15226
|
-
return /*#__PURE__*/
|
|
15233
|
+
return /*#__PURE__*/React__namespace.default.createElement(Container, {
|
|
15227
15234
|
testID: "toast-container",
|
|
15228
15235
|
themeVariant: variant,
|
|
15229
15236
|
themeIntent: intent,
|
|
@@ -15233,21 +15240,21 @@ var Toast$1 = function Toast(_ref2) {
|
|
|
15233
15240
|
translateY: interpolateY
|
|
15234
15241
|
}]
|
|
15235
15242
|
}]
|
|
15236
|
-
}, /*#__PURE__*/
|
|
15243
|
+
}, /*#__PURE__*/React__namespace.default.createElement(ContentContainer, {
|
|
15237
15244
|
showDivider: !!actionLabel
|
|
15238
|
-
}, icon !== null ? /*#__PURE__*/
|
|
15245
|
+
}, icon !== null ? /*#__PURE__*/React__namespace.default.createElement(ToastIcon, {
|
|
15239
15246
|
themeIntent: intent,
|
|
15240
15247
|
icon: icon || getIntentIcon(intent)
|
|
15241
|
-
}) : null, /*#__PURE__*/
|
|
15248
|
+
}) : null, /*#__PURE__*/React__namespace.default.createElement(TextContainer, null, typeof content === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
15242
15249
|
variant: "small",
|
|
15243
15250
|
intent: intent === 'snackbar' ? 'inverted' : 'body'
|
|
15244
|
-
}, content) : content)), actionLabel ? /*#__PURE__*/
|
|
15251
|
+
}, content) : content)), actionLabel ? /*#__PURE__*/React__namespace.default.createElement(CTAWrapper, {
|
|
15245
15252
|
testID: "toast-action-button",
|
|
15246
15253
|
onPress: function onPress() {
|
|
15247
15254
|
onAction === null || onAction === void 0 || onAction();
|
|
15248
15255
|
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
15249
15256
|
}
|
|
15250
|
-
}, typeof actionLabel === 'string' ? /*#__PURE__*/
|
|
15257
|
+
}, typeof actionLabel === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
15251
15258
|
variant: "small-bold",
|
|
15252
15259
|
intent: intent === 'snackbar' ? 'inverted' : 'body'
|
|
15253
15260
|
}, actionLabel) : actionLabel) : null);
|
|
@@ -15261,7 +15268,7 @@ var SingleToastDisplay = function SingleToastDisplay(_ref) {
|
|
|
15261
15268
|
setToastList = _ref.setToastList;
|
|
15262
15269
|
var theme = useTheme$1();
|
|
15263
15270
|
var toast = toastList[toastList.length - 1];
|
|
15264
|
-
return toast ? /*#__PURE__*/
|
|
15271
|
+
return toast ? /*#__PURE__*/React__namespace.default.createElement(Toast$1, _extends$1({}, toast.props, {
|
|
15265
15272
|
key: toast.id,
|
|
15266
15273
|
style: {
|
|
15267
15274
|
marginBottom: theme.space.small
|
|
@@ -15277,7 +15284,7 @@ var SingleToastDisplay = function SingleToastDisplay(_ref) {
|
|
|
15277
15284
|
}
|
|
15278
15285
|
})) : null;
|
|
15279
15286
|
};
|
|
15280
|
-
var ToastContainer = /*#__PURE__*/
|
|
15287
|
+
var ToastContainer = /*#__PURE__*/React__namespace.default.forwardRef(function (_ref2, ref) {
|
|
15281
15288
|
var _ref2$displayType = _ref2.displayType,
|
|
15282
15289
|
displayType = _ref2$displayType === void 0 ? 'single' : _ref2$displayType,
|
|
15283
15290
|
_ref2$position = _ref2.position,
|
|
@@ -15312,17 +15319,17 @@ var ToastContainer = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
15312
15319
|
}
|
|
15313
15320
|
};
|
|
15314
15321
|
});
|
|
15315
|
-
return /*#__PURE__*/
|
|
15322
|
+
return /*#__PURE__*/React__namespace.default.createElement(ToastContainerWrapper, {
|
|
15316
15323
|
pointerEvents: "box-none",
|
|
15317
15324
|
position: position,
|
|
15318
15325
|
style: style
|
|
15319
|
-
}, displayType === 'single' ? /*#__PURE__*/
|
|
15326
|
+
}, displayType === 'single' ? /*#__PURE__*/React__namespace.default.createElement(SingleToastDisplay, {
|
|
15320
15327
|
toastList: toastList,
|
|
15321
15328
|
setToastList: setToastList
|
|
15322
15329
|
}) : toastList.map(function (_ref3) {
|
|
15323
15330
|
var id = _ref3.id,
|
|
15324
15331
|
props = _ref3.props;
|
|
15325
|
-
return /*#__PURE__*/
|
|
15332
|
+
return /*#__PURE__*/React__namespace.default.createElement(Toast$1, _extends$1({}, props, {
|
|
15326
15333
|
key: id,
|
|
15327
15334
|
style: {
|
|
15328
15335
|
marginBottom: theme.space.small
|
|
@@ -15364,15 +15371,15 @@ var ToastProvider = function ToastProvider(_ref) {
|
|
|
15364
15371
|
position: position
|
|
15365
15372
|
};
|
|
15366
15373
|
}, [displayType, position]);
|
|
15367
|
-
return /*#__PURE__*/
|
|
15374
|
+
return /*#__PURE__*/React__namespace.default.createElement(ToastContext.Provider, {
|
|
15368
15375
|
value: refState || fallbackToastControlContext
|
|
15369
|
-
}, /*#__PURE__*/
|
|
15376
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
15370
15377
|
style: {
|
|
15371
15378
|
flex: 1
|
|
15372
15379
|
}
|
|
15373
|
-
}, refState ? children : null, /*#__PURE__*/
|
|
15380
|
+
}, refState ? children : null, /*#__PURE__*/React__namespace.default.createElement(ToastConfigContext.Provider, {
|
|
15374
15381
|
value: config
|
|
15375
|
-
}, /*#__PURE__*/
|
|
15382
|
+
}, /*#__PURE__*/React__namespace.default.createElement(ToastContainer, {
|
|
15376
15383
|
ref: toastRef,
|
|
15377
15384
|
displayType: displayType,
|
|
15378
15385
|
position: position
|
|
@@ -15388,9 +15395,9 @@ var Toast = {
|
|
|
15388
15395
|
var HeroDesignProvider = function HeroDesignProvider(_ref) {
|
|
15389
15396
|
var theme = _ref.theme,
|
|
15390
15397
|
children = _ref.children;
|
|
15391
|
-
return /*#__PURE__*/
|
|
15398
|
+
return /*#__PURE__*/React__namespace.default.createElement(ThemeProvider, {
|
|
15392
15399
|
theme: theme
|
|
15393
|
-
}, /*#__PURE__*/
|
|
15400
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Toast.Provider, null, /*#__PURE__*/React__namespace.default.createElement(Portal$1.Provider, null, children)));
|
|
15394
15401
|
};
|
|
15395
15402
|
|
|
15396
15403
|
var StyledListItemContainer$1 = index$9(reactNative.TouchableHighlight)(function (_ref) {
|
|
@@ -15482,7 +15489,7 @@ var ListItem = function ListItem(_ref) {
|
|
|
15482
15489
|
_ref$disabled = _ref.disabled,
|
|
15483
15490
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
15484
15491
|
var theme = useTheme();
|
|
15485
|
-
return /*#__PURE__*/
|
|
15492
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledListItemContainer$1, {
|
|
15486
15493
|
style: style,
|
|
15487
15494
|
testID: testID,
|
|
15488
15495
|
themeSelected: selected,
|
|
@@ -15490,26 +15497,26 @@ var ListItem = function ListItem(_ref) {
|
|
|
15490
15497
|
onPress: onPress,
|
|
15491
15498
|
disabled: disabled,
|
|
15492
15499
|
underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
|
|
15493
|
-
}, /*#__PURE__*/
|
|
15500
|
+
}, /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, leadingStatus && /*#__PURE__*/React__namespace.default.createElement(StyledLeadingStatus, {
|
|
15494
15501
|
themeLeadingStatusIntent: leadingStatus,
|
|
15495
15502
|
testID: "leadingStatus"
|
|
15496
|
-
}), /*#__PURE__*/
|
|
15503
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledContentContainer, null, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
15497
15504
|
style: {
|
|
15498
15505
|
flexDirection: 'row',
|
|
15499
15506
|
alignItems: 'center'
|
|
15500
15507
|
}
|
|
15501
|
-
}, prefix && /*#__PURE__*/
|
|
15508
|
+
}, prefix && /*#__PURE__*/React__namespace.default.createElement(StyledPrefixContainer$1, null, typeof prefix === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
15502
15509
|
icon: prefix,
|
|
15503
15510
|
intent: disabled ? 'disabled-text' : 'primary'
|
|
15504
|
-
}) : prefix), /*#__PURE__*/
|
|
15511
|
+
}) : prefix), /*#__PURE__*/React__namespace.default.createElement(StyledTitleContainer$1, null, typeof title === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
15505
15512
|
intent: "body"
|
|
15506
|
-
}, title) : title, !!subtitle && /*#__PURE__*/
|
|
15513
|
+
}, title) : title, !!subtitle && /*#__PURE__*/React__namespace.default.createElement(Typography.Caption, {
|
|
15507
15514
|
intent: "subdued"
|
|
15508
|
-
}, subtitle)), suffix && /*#__PURE__*/
|
|
15515
|
+
}, subtitle)), suffix && /*#__PURE__*/React__namespace.default.createElement(StyledSuffixContainer$1, null, typeof suffix === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
15509
15516
|
icon: suffix,
|
|
15510
15517
|
intent: disabled ? 'disabled-text' : 'primary',
|
|
15511
15518
|
size: "small"
|
|
15512
|
-
}) : suffix)), children && /*#__PURE__*/
|
|
15519
|
+
}) : suffix)), children && /*#__PURE__*/React__namespace.default.createElement(StyledChildrenContainer, null, children))));
|
|
15513
15520
|
};
|
|
15514
15521
|
|
|
15515
15522
|
var StyledPrefixContainer = index$9(reactNative.View)(function (_ref) {
|
|
@@ -15556,7 +15563,7 @@ var BasicListItem = function BasicListItem(_ref) {
|
|
|
15556
15563
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
15557
15564
|
onPress = _ref.onPress;
|
|
15558
15565
|
var theme = useTheme();
|
|
15559
|
-
return /*#__PURE__*/
|
|
15566
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledListItemContainer, {
|
|
15560
15567
|
style: style,
|
|
15561
15568
|
testID: testID,
|
|
15562
15569
|
themeSelected: selected,
|
|
@@ -15564,14 +15571,14 @@ var BasicListItem = function BasicListItem(_ref) {
|
|
|
15564
15571
|
onPress: onPress,
|
|
15565
15572
|
disabled: disabled,
|
|
15566
15573
|
underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
|
|
15567
|
-
}, /*#__PURE__*/
|
|
15574
|
+
}, /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, prefix && /*#__PURE__*/React__namespace.default.createElement(StyledPrefixContainer, null, typeof prefix === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
15568
15575
|
icon: prefix,
|
|
15569
15576
|
intent: disabled ? 'disabled-text' : 'primary'
|
|
15570
|
-
}) : prefix), /*#__PURE__*/
|
|
15577
|
+
}) : prefix), /*#__PURE__*/React__namespace.default.createElement(StyledTitleContainer, null, typeof title === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
15571
15578
|
intent: "body"
|
|
15572
|
-
}, title) : title, subtitle && /*#__PURE__*/
|
|
15579
|
+
}, title) : title, subtitle && /*#__PURE__*/React__namespace.default.createElement(Typography.Caption, {
|
|
15573
15580
|
intent: "subdued"
|
|
15574
|
-
}, subtitle)), suffix && /*#__PURE__*/
|
|
15581
|
+
}, subtitle)), suffix && /*#__PURE__*/React__namespace.default.createElement(StyledSuffixContainer, null, typeof suffix === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
15575
15582
|
icon: suffix,
|
|
15576
15583
|
size: "small",
|
|
15577
15584
|
intent: disabled ? 'disabled-text' : 'primary'
|
|
@@ -15685,16 +15692,16 @@ function PinCell(_ref) {
|
|
|
15685
15692
|
focused = _ref$focused === void 0 ? false : _ref$focused,
|
|
15686
15693
|
_ref$state = _ref.state,
|
|
15687
15694
|
state = _ref$state === void 0 ? 'default' : _ref$state;
|
|
15688
|
-
return /*#__PURE__*/
|
|
15695
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledCell, {
|
|
15689
15696
|
themeFocused: focused,
|
|
15690
15697
|
themeState: state
|
|
15691
|
-
}, value === '' && /*#__PURE__*/
|
|
15698
|
+
}, value === '' && /*#__PURE__*/React__namespace.default.createElement(StyledMask, {
|
|
15692
15699
|
themeState: state,
|
|
15693
15700
|
testID: "pin-cell-mask"
|
|
15694
|
-
}), value !== '' && secure && /*#__PURE__*/
|
|
15701
|
+
}), value !== '' && secure && /*#__PURE__*/React__namespace.default.createElement(StyledFilledMask, {
|
|
15695
15702
|
themeState: state,
|
|
15696
15703
|
testID: "pin-cell-filled-mask"
|
|
15697
|
-
}), value !== '' && !secure && /*#__PURE__*/
|
|
15704
|
+
}), value !== '' && !secure && /*#__PURE__*/React__namespace.default.createElement(StyledCellText, {
|
|
15698
15705
|
themeState: state,
|
|
15699
15706
|
level: "h3"
|
|
15700
15707
|
}, value));
|
|
@@ -15777,24 +15784,24 @@ var PinInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
15777
15784
|
blur: blur
|
|
15778
15785
|
};
|
|
15779
15786
|
});
|
|
15780
|
-
return /*#__PURE__*/
|
|
15787
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$5, {
|
|
15781
15788
|
style: style,
|
|
15782
15789
|
testID: testID
|
|
15783
|
-
}, /*#__PURE__*/
|
|
15784
|
-
return /*#__PURE__*/
|
|
15790
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledPinWrapper, null, _toConsumableArray(Array(length).keys()).map(function (index) {
|
|
15791
|
+
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, {
|
|
15785
15792
|
key: index
|
|
15786
|
-
}, index !== 0 && /*#__PURE__*/
|
|
15793
|
+
}, index !== 0 && /*#__PURE__*/React__namespace.default.createElement(StyledSpacer, null), /*#__PURE__*/React__namespace.default.createElement(PinCell, {
|
|
15787
15794
|
value: trimmedValue.charAt(index),
|
|
15788
15795
|
secure: secure,
|
|
15789
15796
|
focused: focused && index === trimmedValue.length,
|
|
15790
15797
|
state: state
|
|
15791
15798
|
}));
|
|
15792
|
-
})), state === 'error' && /*#__PURE__*/
|
|
15799
|
+
})), state === 'error' && /*#__PURE__*/React__namespace.default.createElement(StyledErrorContainer, null, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
15793
15800
|
icon: "circle-info",
|
|
15794
15801
|
size: "xsmall",
|
|
15795
15802
|
intent: "danger",
|
|
15796
15803
|
testID: "pin-error-icon"
|
|
15797
|
-
}), /*#__PURE__*/
|
|
15804
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledErrorMessage, null, error)), /*#__PURE__*/React__namespace.default.createElement(StyledHiddenInput, {
|
|
15798
15805
|
themePinLength: length,
|
|
15799
15806
|
ref: inputRef,
|
|
15800
15807
|
value: maskedValueWithExtraSpace,
|
|
@@ -15899,9 +15906,9 @@ var _excluded$e = ["value", "renderValue", "intent", "style", "testID"];
|
|
|
15899
15906
|
var HalfCircle = function HalfCircle(_ref) {
|
|
15900
15907
|
var type = _ref.type,
|
|
15901
15908
|
themeIntent = _ref.themeIntent;
|
|
15902
|
-
return /*#__PURE__*/
|
|
15909
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledHalfCircleWrapper, null, type === 'background' ? /*#__PURE__*/React__namespace.default.createElement(StyledHalfCircleInnerBG, {
|
|
15903
15910
|
themeIntent: themeIntent
|
|
15904
|
-
}) : /*#__PURE__*/
|
|
15911
|
+
}) : /*#__PURE__*/React__namespace.default.createElement(StyledHalfCircleInnerFG, {
|
|
15905
15912
|
themeIntent: themeIntent
|
|
15906
15913
|
}));
|
|
15907
15914
|
};
|
|
@@ -15953,13 +15960,13 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
15953
15960
|
outputRange: ['0deg', '360deg'],
|
|
15954
15961
|
extrapolate: 'clamp'
|
|
15955
15962
|
});
|
|
15956
|
-
return /*#__PURE__*/
|
|
15963
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, _extends$1({}, nativeProps, {
|
|
15957
15964
|
testID: testID,
|
|
15958
15965
|
style: style
|
|
15959
|
-
}), /*#__PURE__*/
|
|
15966
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledContainer$1, null, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, null, /*#__PURE__*/React__namespace.default.createElement(HalfCircle, {
|
|
15960
15967
|
type: "foreground",
|
|
15961
15968
|
themeIntent: intent
|
|
15962
|
-
}), /*#__PURE__*/
|
|
15969
|
+
}), /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
15963
15970
|
style: _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
15964
15971
|
transform: [{
|
|
15965
15972
|
translateX: radius / 2
|
|
@@ -15969,10 +15976,10 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
15969
15976
|
translateX: -radius / 2
|
|
15970
15977
|
}]
|
|
15971
15978
|
})
|
|
15972
|
-
}, /*#__PURE__*/
|
|
15979
|
+
}, /*#__PURE__*/React__namespace.default.createElement(HalfCircle, {
|
|
15973
15980
|
type: "background",
|
|
15974
15981
|
themeIntent: intent
|
|
15975
|
-
}))), /*#__PURE__*/
|
|
15982
|
+
}))), /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
15976
15983
|
style: {
|
|
15977
15984
|
transform: [{
|
|
15978
15985
|
rotate: '180deg'
|
|
@@ -15980,10 +15987,10 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
15980
15987
|
zIndex: 1,
|
|
15981
15988
|
marginLeft: -0.1
|
|
15982
15989
|
}
|
|
15983
|
-
}, /*#__PURE__*/
|
|
15990
|
+
}, /*#__PURE__*/React__namespace.default.createElement(HalfCircle, {
|
|
15984
15991
|
type: "foreground",
|
|
15985
15992
|
themeIntent: intent
|
|
15986
|
-
}), /*#__PURE__*/
|
|
15993
|
+
}), /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
15987
15994
|
style: _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
15988
15995
|
transform: [{
|
|
15989
15996
|
translateX: radius / 2
|
|
@@ -15994,21 +16001,21 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
15994
16001
|
}],
|
|
15995
16002
|
opacity: interpolateOpacityRightHalf
|
|
15996
16003
|
})
|
|
15997
|
-
}, /*#__PURE__*/
|
|
16004
|
+
}, /*#__PURE__*/React__namespace.default.createElement(HalfCircle, {
|
|
15998
16005
|
type: "background",
|
|
15999
16006
|
themeIntent: intent
|
|
16000
|
-
}))), /*#__PURE__*/
|
|
16007
|
+
}))), /*#__PURE__*/React__namespace.default.createElement(StyledStrokeEnd, {
|
|
16001
16008
|
themeIntent: intent
|
|
16002
|
-
}), /*#__PURE__*/
|
|
16009
|
+
}), /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
16003
16010
|
style: _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
16004
16011
|
zIndex: 2,
|
|
16005
16012
|
transform: [{
|
|
16006
16013
|
rotate: interpolateDotRotate
|
|
16007
16014
|
}]
|
|
16008
16015
|
})
|
|
16009
|
-
}, /*#__PURE__*/
|
|
16016
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledStrokeEnd, {
|
|
16010
16017
|
themeIntent: intent
|
|
16011
|
-
})), /*#__PURE__*/
|
|
16018
|
+
})), /*#__PURE__*/React__namespace.default.createElement(StyledDonutCircle, null, /*#__PURE__*/React__namespace.default.createElement(Typography.Body, null, renderValue(value)))));
|
|
16012
16019
|
};
|
|
16013
16020
|
|
|
16014
16021
|
var StyledWrapper$4 = index$9(reactNative.View)(function (_ref) {
|
|
@@ -16065,11 +16072,11 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
16065
16072
|
outputRange: [999, 0],
|
|
16066
16073
|
extrapolate: 'clamp'
|
|
16067
16074
|
});
|
|
16068
|
-
return /*#__PURE__*/
|
|
16075
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$4, _extends$1({}, nativeProps, {
|
|
16069
16076
|
testID: testID,
|
|
16070
16077
|
style: style,
|
|
16071
16078
|
themeIntent: intent
|
|
16072
|
-
}), /*#__PURE__*/
|
|
16079
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledInner, {
|
|
16073
16080
|
themeIntent: intent,
|
|
16074
16081
|
onLayout: function onLayout(_ref2) {
|
|
16075
16082
|
var nativeEvent = _ref2.nativeEvent;
|
|
@@ -16107,7 +16114,7 @@ var Slider = function Slider(_ref) {
|
|
|
16107
16114
|
style = _ref.style,
|
|
16108
16115
|
testID = _ref.testID;
|
|
16109
16116
|
var theme = useTheme();
|
|
16110
|
-
return /*#__PURE__*/
|
|
16117
|
+
return /*#__PURE__*/React__namespace.default.createElement(RnSlider__default.default, {
|
|
16111
16118
|
minimumValue: minimumValue,
|
|
16112
16119
|
maximumValue: maximumValue,
|
|
16113
16120
|
step: step,
|
|
@@ -16209,23 +16216,23 @@ var AnimatedSpinner = function AnimatedSpinner(_ref) {
|
|
|
16209
16216
|
themeSize: size,
|
|
16210
16217
|
themeIntent: intent
|
|
16211
16218
|
};
|
|
16212
|
-
return /*#__PURE__*/
|
|
16219
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
16213
16220
|
style: reactNative.StyleSheet.flatten([{
|
|
16214
16221
|
transform: [{
|
|
16215
16222
|
rotate: interpolatedRotateAnimation
|
|
16216
16223
|
}]
|
|
16217
16224
|
}])
|
|
16218
|
-
}, /*#__PURE__*/
|
|
16225
|
+
}, /*#__PURE__*/React__namespace.default.createElement(AnimatedRow, _extends$1({
|
|
16219
16226
|
themePosition: "top"
|
|
16220
|
-
}, rowProps), /*#__PURE__*/
|
|
16227
|
+
}, rowProps), /*#__PURE__*/React__namespace.default.createElement(AnimatedDot, _extends$1({
|
|
16221
16228
|
themePosition: "topLeft"
|
|
16222
|
-
}, dotProps)), /*#__PURE__*/
|
|
16229
|
+
}, dotProps)), /*#__PURE__*/React__namespace.default.createElement(AnimatedDot, _extends$1({
|
|
16223
16230
|
themePosition: "topRight"
|
|
16224
|
-
}, dotProps))), /*#__PURE__*/
|
|
16231
|
+
}, dotProps))), /*#__PURE__*/React__namespace.default.createElement(AnimatedRow, _extends$1({
|
|
16225
16232
|
themePosition: "bottom"
|
|
16226
|
-
}, rowProps), /*#__PURE__*/
|
|
16233
|
+
}, rowProps), /*#__PURE__*/React__namespace.default.createElement(AnimatedDot, _extends$1({
|
|
16227
16234
|
themePosition: "bottomLeft"
|
|
16228
|
-
}, dotProps)), /*#__PURE__*/
|
|
16235
|
+
}, dotProps)), /*#__PURE__*/React__namespace.default.createElement(AnimatedDot, _extends$1({
|
|
16229
16236
|
themePosition: "bottomRight"
|
|
16230
16237
|
}, dotProps))));
|
|
16231
16238
|
};
|
|
@@ -16238,9 +16245,9 @@ var Spinner = function Spinner(_ref) {
|
|
|
16238
16245
|
_ref$intent = _ref.intent,
|
|
16239
16246
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
16240
16247
|
nativeProps = _objectWithoutProperties(_ref, _excluded$c);
|
|
16241
|
-
return /*#__PURE__*/
|
|
16248
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledView$1, nativeProps, /*#__PURE__*/React__namespace.default.createElement(StyledSpinnerContainer, {
|
|
16242
16249
|
testID: testID
|
|
16243
|
-
}, /*#__PURE__*/
|
|
16250
|
+
}, /*#__PURE__*/React__namespace.default.createElement(AnimatedSpinner, {
|
|
16244
16251
|
size: size,
|
|
16245
16252
|
intent: intent
|
|
16246
16253
|
})));
|
|
@@ -16262,7 +16269,7 @@ var SwipeableAction = function SwipeableAction(_ref) {
|
|
|
16262
16269
|
style = _ref.style,
|
|
16263
16270
|
children = _ref.children,
|
|
16264
16271
|
testID = _ref.testID;
|
|
16265
|
-
return /*#__PURE__*/
|
|
16272
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledRectButton, {
|
|
16266
16273
|
onPress: onPress,
|
|
16267
16274
|
themeIntent: intent,
|
|
16268
16275
|
style: style,
|
|
@@ -16277,7 +16284,7 @@ var renderActions = function renderActions(actions, width, progress, direction)
|
|
|
16277
16284
|
outputRange: direction === 'left' ? [-width, 0] : [width, 0],
|
|
16278
16285
|
extrapolate: 'clamp'
|
|
16279
16286
|
});
|
|
16280
|
-
return /*#__PURE__*/
|
|
16287
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
16281
16288
|
style: {
|
|
16282
16289
|
width: width,
|
|
16283
16290
|
flexDirection: 'row',
|
|
@@ -16304,7 +16311,7 @@ var Swipeable = function Swipeable(_ref) {
|
|
|
16304
16311
|
var _useWindowDimensions = reactNative.useWindowDimensions(),
|
|
16305
16312
|
width = _useWindowDimensions.width;
|
|
16306
16313
|
var swipeableRef = React.useRef(null);
|
|
16307
|
-
var _React$useState =
|
|
16314
|
+
var _React$useState = React__namespace.default.useState(0),
|
|
16308
16315
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
16309
16316
|
containerWidth = _React$useState2[0],
|
|
16310
16317
|
setContainerWidth = _React$useState2[1];
|
|
@@ -16328,11 +16335,11 @@ var Swipeable = function Swipeable(_ref) {
|
|
|
16328
16335
|
break;
|
|
16329
16336
|
}
|
|
16330
16337
|
}, [state]);
|
|
16331
|
-
return /*#__PURE__*/
|
|
16338
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNativeGestureHandler.GestureHandlerRootView, null, /*#__PURE__*/React__namespace.default.createElement(Box, {
|
|
16332
16339
|
onLayout: function onLayout(e) {
|
|
16333
16340
|
return setContainerWidth(e.nativeEvent.layout.width);
|
|
16334
16341
|
}
|
|
16335
|
-
}, /*#__PURE__*/
|
|
16342
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNativeGestureHandler.Swipeable, _extends$1({}, swipeableProps, {
|
|
16336
16343
|
ref: swipeableRef
|
|
16337
16344
|
}, leftActions !== undefined && {
|
|
16338
16345
|
renderLeftActions: renderLeftActions
|
|
@@ -16404,7 +16411,7 @@ var StyledRadio = index$9(List.Item)(function (_ref4) {
|
|
|
16404
16411
|
var RadioCircle = function RadioCircle(_ref) {
|
|
16405
16412
|
var checked = _ref.checked,
|
|
16406
16413
|
text = _ref.text;
|
|
16407
|
-
return /*#__PURE__*/
|
|
16414
|
+
return /*#__PURE__*/React__namespace.default.createElement(Circle, null, checked && /*#__PURE__*/React__namespace.default.createElement(InnerCircle, {
|
|
16408
16415
|
testID: "".concat(text, "-selected-circle")
|
|
16409
16416
|
}));
|
|
16410
16417
|
};
|
|
@@ -16419,12 +16426,12 @@ var Radio = function Radio(_ref2) {
|
|
|
16419
16426
|
_ref2$inactiveIntent = _ref2.inactiveIntent,
|
|
16420
16427
|
inactiveIntent = _ref2$inactiveIntent === void 0 ? 'light' : _ref2$inactiveIntent,
|
|
16421
16428
|
children = _ref2.children;
|
|
16422
|
-
return /*#__PURE__*/
|
|
16429
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledRadio, {
|
|
16423
16430
|
onPress: onPress,
|
|
16424
16431
|
selected: checked,
|
|
16425
16432
|
title: text,
|
|
16426
16433
|
subtitle: subText,
|
|
16427
|
-
suffix: /*#__PURE__*/
|
|
16434
|
+
suffix: /*#__PURE__*/React__namespace.default.createElement(RadioCircle, {
|
|
16428
16435
|
checked: checked,
|
|
16429
16436
|
text: text
|
|
16430
16437
|
}),
|
|
@@ -16455,15 +16462,15 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
16455
16462
|
testID = _ref.testID,
|
|
16456
16463
|
_ref$inactiveIntent = _ref.inactiveIntent,
|
|
16457
16464
|
inactiveIntent = _ref$inactiveIntent === void 0 ? 'light' : _ref$inactiveIntent;
|
|
16458
|
-
return /*#__PURE__*/
|
|
16465
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
16459
16466
|
style: style,
|
|
16460
16467
|
testID: testID
|
|
16461
16468
|
}, options.map(function (option, index) {
|
|
16462
|
-
return /*#__PURE__*/
|
|
16469
|
+
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, {
|
|
16463
16470
|
key: getKey(option, index, keyExtractor)
|
|
16464
|
-
}, index !== 0 && /*#__PURE__*/
|
|
16471
|
+
}, index !== 0 && /*#__PURE__*/React__namespace.default.createElement(Spacer, {
|
|
16465
16472
|
themeIntent: inactiveIntent
|
|
16466
|
-
}), /*#__PURE__*/
|
|
16473
|
+
}), /*#__PURE__*/React__namespace.default.createElement(Radio, {
|
|
16467
16474
|
text: option.text,
|
|
16468
16475
|
subText: option.subText,
|
|
16469
16476
|
checked: option.value === value,
|
|
@@ -16532,20 +16539,20 @@ var SectionHeading = function SectionHeading(_ref) {
|
|
|
16532
16539
|
testID = _ref.testID;
|
|
16533
16540
|
useDeprecation("SectionHeading's fontSize prop is deprecated and will be removed in the next major release, please remove it.", fontSize !== undefined);
|
|
16534
16541
|
useDeprecation("SectionHeading's fontWeight prop is deprecated and will be removed in the next major release, please remove it.", fontWeight !== undefined);
|
|
16535
|
-
return /*#__PURE__*/
|
|
16542
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledHeading, {
|
|
16536
16543
|
themeSize: size,
|
|
16537
16544
|
style: style,
|
|
16538
16545
|
testID: testID
|
|
16539
|
-
}, /*#__PURE__*/
|
|
16546
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$3, null, /*#__PURE__*/React__namespace.default.createElement(StyledIconWrapper$2, null, icon !== undefined && (typeof icon === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
16540
16547
|
icon: icon,
|
|
16541
16548
|
size: ICON_SIZE_MAP[size],
|
|
16542
16549
|
intent: ICON_INTENT_MAP[intent]
|
|
16543
|
-
}) : /*#__PURE__*/
|
|
16550
|
+
}) : /*#__PURE__*/React__namespace.default.cloneElement(icon, _objectSpread2({
|
|
16544
16551
|
size: ICON_SIZE_MAP[size],
|
|
16545
16552
|
intent: ICON_INTENT_MAP[intent]
|
|
16546
|
-
}, icon.props)))), size === 'small' ? /*#__PURE__*/
|
|
16553
|
+
}, icon.props)))), size === 'small' ? /*#__PURE__*/React__namespace.default.createElement(Typography.Caption, {
|
|
16547
16554
|
intent: intent
|
|
16548
|
-
}, text) : /*#__PURE__*/
|
|
16555
|
+
}, text) : /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
16549
16556
|
variant: "small",
|
|
16550
16557
|
intent: intent
|
|
16551
16558
|
}, text)), rightChildren);
|
|
@@ -16554,7 +16561,7 @@ var SectionHeading = function SectionHeading(_ref) {
|
|
|
16554
16561
|
var Footer = function Footer(_ref) {
|
|
16555
16562
|
var label = _ref.label,
|
|
16556
16563
|
onPress = _ref.onPress;
|
|
16557
|
-
return /*#__PURE__*/
|
|
16564
|
+
return /*#__PURE__*/React__namespace.default.createElement(CompoundButton, {
|
|
16558
16565
|
variant: "text",
|
|
16559
16566
|
text: label,
|
|
16560
16567
|
onPress: onPress
|
|
@@ -16665,7 +16672,7 @@ var BaseOptionList = function BaseOptionList(_ref) {
|
|
|
16665
16672
|
_useState2 = _slicedToArray(_useState, 2),
|
|
16666
16673
|
onEndReachedCalled = _useState2[0],
|
|
16667
16674
|
setOnEndReachedCalled = _useState2[1];
|
|
16668
|
-
return /*#__PURE__*/
|
|
16675
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledSectionList, _extends$1({
|
|
16669
16676
|
ref: sectionListRef,
|
|
16670
16677
|
style: _objectSpread2({}, onQueryChange ? {
|
|
16671
16678
|
height: reactNative.Dimensions.get('screen').height
|
|
@@ -16680,16 +16687,16 @@ var BaseOptionList = function BaseOptionList(_ref) {
|
|
|
16680
16687
|
if (onEndReached && onEndReachedCalled && !loading) onEndReached();
|
|
16681
16688
|
setOnEndReachedCalled(false);
|
|
16682
16689
|
},
|
|
16683
|
-
ListFooterComponent: loading ? /*#__PURE__*/
|
|
16690
|
+
ListFooterComponent: loading ? /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
16684
16691
|
style: {
|
|
16685
16692
|
display: 'flex',
|
|
16686
16693
|
alignItems: 'center',
|
|
16687
16694
|
height: theme.space.xxxxlarge
|
|
16688
16695
|
}
|
|
16689
|
-
}, /*#__PURE__*/
|
|
16696
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Spinner, null)) : null,
|
|
16690
16697
|
renderSectionHeader: function renderSectionHeader(_ref2) {
|
|
16691
16698
|
var category = _ref2.section.category;
|
|
16692
|
-
return category !== '' ? /*#__PURE__*/
|
|
16699
|
+
return category !== '' ? /*#__PURE__*/React__namespace.default.createElement(SectionHeading, {
|
|
16693
16700
|
text: category,
|
|
16694
16701
|
style: {
|
|
16695
16702
|
marginBottom: 0
|
|
@@ -16716,7 +16723,7 @@ var Option$2 = function Option(_ref) {
|
|
|
16716
16723
|
disabled: disabled,
|
|
16717
16724
|
onPress: onPress,
|
|
16718
16725
|
title: text,
|
|
16719
|
-
suffix: selected === true ? /*#__PURE__*/
|
|
16726
|
+
suffix: selected === true ? /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
16720
16727
|
testID: typeof text === 'string' ? "selected-icon-".concat(text) : undefined,
|
|
16721
16728
|
icon: "checkmark",
|
|
16722
16729
|
intent: disabled ? 'disabled-text' : 'primary',
|
|
@@ -16726,7 +16733,7 @@ var Option$2 = function Option(_ref) {
|
|
|
16726
16733
|
}
|
|
16727
16734
|
}) : undefined
|
|
16728
16735
|
};
|
|
16729
|
-
return highlighted === true ? /*#__PURE__*/
|
|
16736
|
+
return highlighted === true ? /*#__PURE__*/React__namespace.default.createElement(List.Item, props) : /*#__PURE__*/React__namespace.default.createElement(List.BasicItem, props);
|
|
16730
16737
|
};
|
|
16731
16738
|
|
|
16732
16739
|
var _excluded$9 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
@@ -16756,7 +16763,7 @@ var OptionList$1 = function OptionList(_ref) {
|
|
|
16756
16763
|
return renderOption ? renderOption(_objectSpread2(_objectSpread2({}, info), {}, {
|
|
16757
16764
|
selected: selected,
|
|
16758
16765
|
onPress: onItemPress
|
|
16759
|
-
})) : /*#__PURE__*/
|
|
16766
|
+
})) : /*#__PURE__*/React__namespace.default.createElement(Option$2, {
|
|
16760
16767
|
selected: selected,
|
|
16761
16768
|
text: item.text,
|
|
16762
16769
|
disabled: item.disabled,
|
|
@@ -16764,7 +16771,7 @@ var OptionList$1 = function OptionList(_ref) {
|
|
|
16764
16771
|
highlighted: item.highlighted
|
|
16765
16772
|
});
|
|
16766
16773
|
};
|
|
16767
|
-
return /*#__PURE__*/
|
|
16774
|
+
return /*#__PURE__*/React__namespace.default.createElement(BaseOptionList, _extends$1({
|
|
16768
16775
|
keyExtractor: keyExtractor,
|
|
16769
16776
|
loading: loading,
|
|
16770
16777
|
onEndReached: onEndReached,
|
|
@@ -16823,15 +16830,15 @@ function MultiSelect(_ref) {
|
|
|
16823
16830
|
React.useEffect(function () {
|
|
16824
16831
|
setSelectingValue(value);
|
|
16825
16832
|
}, [open, value]);
|
|
16826
|
-
return /*#__PURE__*/
|
|
16833
|
+
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
16827
16834
|
pointerEvents: !editable || disabled || inputProps !== null && inputProps !== void 0 && inputProps.loading ? 'none' : 'auto'
|
|
16828
|
-
}, /*#__PURE__*/
|
|
16835
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
|
|
16829
16836
|
onPress: function onPress() {
|
|
16830
16837
|
return setOpen(true);
|
|
16831
16838
|
}
|
|
16832
|
-
}, /*#__PURE__*/
|
|
16839
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
16833
16840
|
pointerEvents: "none"
|
|
16834
|
-
}, /*#__PURE__*/
|
|
16841
|
+
}, /*#__PURE__*/React__namespace.default.createElement(TextInput, _extends$1({}, inputProps, {
|
|
16835
16842
|
label: label,
|
|
16836
16843
|
value: renderSelectedValue ? rawValue : displayedValue,
|
|
16837
16844
|
suffix: "arrow-down",
|
|
@@ -16846,7 +16853,7 @@ function MultiSelect(_ref) {
|
|
|
16846
16853
|
renderInputValue: renderSelectedValue !== undefined && (rawValue === null || rawValue === void 0 ? void 0 : rawValue.length) > 0 ? function (props) {
|
|
16847
16854
|
return renderSelectedValue(value, props);
|
|
16848
16855
|
} : undefined
|
|
16849
|
-
}))))), /*#__PURE__*/
|
|
16856
|
+
}))))), /*#__PURE__*/React__namespace.default.createElement(BottomSheet$1, {
|
|
16850
16857
|
open: open,
|
|
16851
16858
|
onRequestClose: function onRequestClose() {
|
|
16852
16859
|
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
@@ -16856,13 +16863,13 @@ function MultiSelect(_ref) {
|
|
|
16856
16863
|
style: {
|
|
16857
16864
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0
|
|
16858
16865
|
},
|
|
16859
|
-
footer: typeof footerLabel === 'string' ? /*#__PURE__*/
|
|
16866
|
+
footer: typeof footerLabel === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Footer, {
|
|
16860
16867
|
label: footerLabel,
|
|
16861
16868
|
onPress: function onPress() {
|
|
16862
16869
|
setOpen(false);
|
|
16863
16870
|
onConfirm(selectingValue);
|
|
16864
16871
|
}
|
|
16865
|
-
}) : /*#__PURE__*/
|
|
16872
|
+
}) : /*#__PURE__*/React__namespace.default.createElement(Box, {
|
|
16866
16873
|
flex: 1,
|
|
16867
16874
|
flexDirection: "row",
|
|
16868
16875
|
justifyContent: "flex-end"
|
|
@@ -16880,13 +16887,13 @@ function MultiSelect(_ref) {
|
|
|
16880
16887
|
}
|
|
16881
16888
|
},
|
|
16882
16889
|
supportedOrientations: supportedOrientations
|
|
16883
|
-
}, onQueryChange && /*#__PURE__*/
|
|
16890
|
+
}, onQueryChange && /*#__PURE__*/React__namespace.default.createElement(StyledSearchBar, null, /*#__PURE__*/React__namespace.default.createElement(TextInput, {
|
|
16884
16891
|
editable: true,
|
|
16885
16892
|
placeholder: "Search",
|
|
16886
16893
|
suffix: "search-outlined",
|
|
16887
16894
|
onChangeText: onQueryChange,
|
|
16888
16895
|
value: query
|
|
16889
|
-
})), /*#__PURE__*/
|
|
16896
|
+
})), /*#__PURE__*/React__namespace.default.createElement(OptionList$1, {
|
|
16890
16897
|
onQueryChange: onQueryChange,
|
|
16891
16898
|
onEndReached: onEndReached,
|
|
16892
16899
|
loading: loading,
|
|
@@ -16921,7 +16928,7 @@ var Option$1 = function Option(_ref) {
|
|
|
16921
16928
|
onPress: onPress,
|
|
16922
16929
|
title: text
|
|
16923
16930
|
};
|
|
16924
|
-
return highlighted === true ? /*#__PURE__*/
|
|
16931
|
+
return highlighted === true ? /*#__PURE__*/React__namespace.default.createElement(List.Item, props) : /*#__PURE__*/React__namespace.default.createElement(List.BasicItem, props);
|
|
16925
16932
|
};
|
|
16926
16933
|
|
|
16927
16934
|
var StyledOptionList = index$9(BaseOptionList)(function (_ref) {
|
|
@@ -16956,7 +16963,7 @@ var OptionList = function OptionList(_ref) {
|
|
|
16956
16963
|
return renderOption ? renderOption(_objectSpread2(_objectSpread2({}, info), {}, {
|
|
16957
16964
|
selected: selected,
|
|
16958
16965
|
onPress: onItemPress
|
|
16959
|
-
})) : /*#__PURE__*/
|
|
16966
|
+
})) : /*#__PURE__*/React__namespace.default.createElement(Option$1, {
|
|
16960
16967
|
selected: selected,
|
|
16961
16968
|
text: item.text,
|
|
16962
16969
|
disabled: item.disabled,
|
|
@@ -16964,7 +16971,7 @@ var OptionList = function OptionList(_ref) {
|
|
|
16964
16971
|
highlighted: item.highlighted
|
|
16965
16972
|
});
|
|
16966
16973
|
};
|
|
16967
|
-
return /*#__PURE__*/
|
|
16974
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledOptionList, _extends$1({
|
|
16968
16975
|
keyExtractor: keyExtractor,
|
|
16969
16976
|
loading: loading,
|
|
16970
16977
|
onEndReached: onEndReached,
|
|
@@ -17017,15 +17024,15 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
17017
17024
|
return value === opt.value;
|
|
17018
17025
|
})) === null || _flatOptions$find === void 0 ? void 0 : _flatOptions$find.text;
|
|
17019
17026
|
var rawValue = value ? String(value) : undefined;
|
|
17020
|
-
return /*#__PURE__*/
|
|
17027
|
+
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
17021
17028
|
pointerEvents: !editable || disabled || inputProps !== null && inputProps !== void 0 && inputProps.loading ? 'none' : 'auto'
|
|
17022
|
-
}, /*#__PURE__*/
|
|
17029
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
|
|
17023
17030
|
onPress: function onPress() {
|
|
17024
17031
|
return setOpen(true);
|
|
17025
17032
|
}
|
|
17026
|
-
}, /*#__PURE__*/
|
|
17033
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
17027
17034
|
pointerEvents: "none"
|
|
17028
|
-
}, /*#__PURE__*/
|
|
17035
|
+
}, /*#__PURE__*/React__namespace.default.createElement(TextInput, _extends$1({}, inputProps, {
|
|
17029
17036
|
label: label,
|
|
17030
17037
|
value: renderSelectedValue ? rawValue : displayedValue,
|
|
17031
17038
|
suffix: "arrow-down",
|
|
@@ -17040,7 +17047,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
17040
17047
|
renderInputValue: renderSelectedValue !== undefined && !!rawValue ? function (props) {
|
|
17041
17048
|
return renderSelectedValue(value, props);
|
|
17042
17049
|
} : undefined
|
|
17043
|
-
}))))), /*#__PURE__*/
|
|
17050
|
+
}))))), /*#__PURE__*/React__namespace.default.createElement(BottomSheet$1, {
|
|
17044
17051
|
open: open,
|
|
17045
17052
|
onRequestClose: function onRequestClose() {
|
|
17046
17053
|
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
@@ -17058,13 +17065,13 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
17058
17065
|
}
|
|
17059
17066
|
},
|
|
17060
17067
|
supportedOrientations: supportedOrientations
|
|
17061
|
-
}, onQueryChange && /*#__PURE__*/
|
|
17068
|
+
}, onQueryChange && /*#__PURE__*/React__namespace.default.createElement(StyledSearchBar, null, /*#__PURE__*/React__namespace.default.createElement(TextInput, {
|
|
17062
17069
|
editable: true,
|
|
17063
17070
|
placeholder: "Search",
|
|
17064
17071
|
suffix: "search-outlined",
|
|
17065
17072
|
onChangeText: onQueryChange,
|
|
17066
17073
|
value: query
|
|
17067
|
-
})), /*#__PURE__*/
|
|
17074
|
+
})), /*#__PURE__*/React__namespace.default.createElement(OptionList, {
|
|
17068
17075
|
onQueryChange: onQueryChange,
|
|
17069
17076
|
onEndReached: onEndReached,
|
|
17070
17077
|
loading: loading,
|
|
@@ -17111,7 +17118,7 @@ var StyledGradientContainer = index$9(Box)(function (_ref2) {
|
|
|
17111
17118
|
});
|
|
17112
17119
|
|
|
17113
17120
|
var _excluded$7 = ["intent", "variant", "style", "onLayout"];
|
|
17114
|
-
var AnimatedLinearGradient = reactNative.Animated.createAnimatedComponent(
|
|
17121
|
+
var AnimatedLinearGradient = reactNative.Animated.createAnimatedComponent(LinearGradient__default.default);
|
|
17115
17122
|
var gradientPositions = {
|
|
17116
17123
|
start: {
|
|
17117
17124
|
x: 0,
|
|
@@ -17178,14 +17185,14 @@ var Skeleton = function Skeleton(_ref) {
|
|
|
17178
17185
|
}
|
|
17179
17186
|
onLayout === null || onLayout === void 0 || onLayout(e);
|
|
17180
17187
|
}, []);
|
|
17181
|
-
return /*#__PURE__*/
|
|
17188
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledContainer, _extends$1({
|
|
17182
17189
|
style: style,
|
|
17183
17190
|
themeVariant: variant,
|
|
17184
17191
|
themeIntent: intent,
|
|
17185
17192
|
onLayout: onContainerLayout
|
|
17186
|
-
}, props), /*#__PURE__*/
|
|
17193
|
+
}, props), /*#__PURE__*/React__namespace.default.createElement(StyledGradientContainer, {
|
|
17187
17194
|
themeVariant: variant
|
|
17188
|
-
}, /*#__PURE__*/
|
|
17195
|
+
}, /*#__PURE__*/React__namespace.default.createElement(AnimatedLinearGradient, {
|
|
17189
17196
|
start: gradientPositions.start,
|
|
17190
17197
|
end: gradientPositions.end,
|
|
17191
17198
|
style: {
|
|
@@ -17277,11 +17284,11 @@ var StyledSuccessModal = index$9(ModalWrapper)({
|
|
|
17277
17284
|
var _excluded$6 = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
17278
17285
|
var renderImage = function renderImage(image) {
|
|
17279
17286
|
if ( /*#__PURE__*/React.isValidElement(image)) {
|
|
17280
|
-
return /*#__PURE__*/
|
|
17287
|
+
return /*#__PURE__*/React__namespace.default.cloneElement(image, {
|
|
17281
17288
|
testID: 'success-image'
|
|
17282
17289
|
});
|
|
17283
17290
|
}
|
|
17284
|
-
return /*#__PURE__*/
|
|
17291
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledSuccessImage, {
|
|
17285
17292
|
source: typeof image === 'string' ? {
|
|
17286
17293
|
uri: image
|
|
17287
17294
|
} : image,
|
|
@@ -17302,16 +17309,16 @@ var SuccessPage = function SuccessPage(_ref) {
|
|
|
17302
17309
|
onSecondaryCtaPress = _ref.onSecondaryCtaPress,
|
|
17303
17310
|
nativeProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
17304
17311
|
var showSecondaryButton = secondaryCtaText && onSecondaryCtaPress;
|
|
17305
|
-
return /*#__PURE__*/
|
|
17312
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledSuccessContainer, _extends$1({
|
|
17306
17313
|
testID: testID,
|
|
17307
17314
|
themeVariant: variant
|
|
17308
|
-
}, nativeProps), /*#__PURE__*/
|
|
17315
|
+
}, nativeProps), /*#__PURE__*/React__namespace.default.createElement(StyledSuccessContent, null, !!image && /*#__PURE__*/React__namespace.default.createElement(StyledSuccessImageContainer, null, renderImage(image)), /*#__PURE__*/React__namespace.default.createElement(StyledSuccessTitle, {
|
|
17309
17316
|
level: "h4",
|
|
17310
17317
|
typeface: "playful"
|
|
17311
|
-
}, title), typeof description === 'string' ? /*#__PURE__*/
|
|
17318
|
+
}, title), typeof description === 'string' ? /*#__PURE__*/React__namespace.default.createElement(StyledSuccessDescription, null, description) : description), !!ctaText && /*#__PURE__*/React__namespace.default.createElement(StyledSuccessButtonContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledSuccessButtonPrimary, {
|
|
17312
17319
|
text: ctaText,
|
|
17313
17320
|
onPress: onCtaPress
|
|
17314
|
-
}), !!showSecondaryButton && /*#__PURE__*/
|
|
17321
|
+
}), !!showSecondaryButton && /*#__PURE__*/React__namespace.default.createElement(StyledSuccessButtonPrimary, {
|
|
17315
17322
|
variant: "text",
|
|
17316
17323
|
text: secondaryCtaText,
|
|
17317
17324
|
onPress: onSecondaryCtaPress
|
|
@@ -17326,11 +17333,11 @@ var SuccessPage = function SuccessPage(_ref) {
|
|
|
17326
17333
|
var Success = function Success(props) {
|
|
17327
17334
|
var variant = props.variant;
|
|
17328
17335
|
if (variant === 'full-screen') {
|
|
17329
|
-
return /*#__PURE__*/
|
|
17336
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledSuccessModal, {
|
|
17330
17337
|
animationType: "slide"
|
|
17331
|
-
}, /*#__PURE__*/
|
|
17338
|
+
}, /*#__PURE__*/React__namespace.default.createElement(SuccessPage, props));
|
|
17332
17339
|
}
|
|
17333
|
-
return /*#__PURE__*/
|
|
17340
|
+
return /*#__PURE__*/React__namespace.default.createElement(SuccessPage, props);
|
|
17334
17341
|
};
|
|
17335
17342
|
|
|
17336
17343
|
var AnimatedView = reactNative.Animated.createAnimatedComponent(reactNative.View);
|
|
@@ -17381,7 +17388,7 @@ var OptionContent = function OptionContent(_ref) {
|
|
|
17381
17388
|
return content;
|
|
17382
17389
|
}
|
|
17383
17390
|
if (badge.type === 'status') {
|
|
17384
|
-
return /*#__PURE__*/
|
|
17391
|
+
return /*#__PURE__*/React__namespace.default.createElement(Badge$1.Status, {
|
|
17385
17392
|
visible: true,
|
|
17386
17393
|
style: {
|
|
17387
17394
|
paddingHorizontal: theme.space.small
|
|
@@ -17413,27 +17420,27 @@ var Option = function Option(_ref2) {
|
|
|
17413
17420
|
}).start();
|
|
17414
17421
|
}, [selected]);
|
|
17415
17422
|
if (selected) {
|
|
17416
|
-
return /*#__PURE__*/
|
|
17423
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledTextWrapper, {
|
|
17417
17424
|
style: {
|
|
17418
17425
|
transform: [{
|
|
17419
17426
|
translateX: translateX
|
|
17420
17427
|
}]
|
|
17421
17428
|
},
|
|
17422
17429
|
onLayout: onLayout
|
|
17423
|
-
}, /*#__PURE__*/
|
|
17424
|
-
content: /*#__PURE__*/
|
|
17430
|
+
}, /*#__PURE__*/React__namespace.default.createElement(OptionContent, {
|
|
17431
|
+
content: /*#__PURE__*/React__namespace.default.createElement(Typography.Body, null, text),
|
|
17425
17432
|
badge: badge
|
|
17426
17433
|
}));
|
|
17427
17434
|
}
|
|
17428
|
-
return /*#__PURE__*/
|
|
17435
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledIconWrapper$1, {
|
|
17429
17436
|
style: {
|
|
17430
17437
|
transform: [{
|
|
17431
17438
|
translateX: translateX
|
|
17432
17439
|
}]
|
|
17433
17440
|
},
|
|
17434
17441
|
onLayout: onLayout
|
|
17435
|
-
}, /*#__PURE__*/
|
|
17436
|
-
content: /*#__PURE__*/
|
|
17442
|
+
}, /*#__PURE__*/React__namespace.default.createElement(OptionContent, {
|
|
17443
|
+
content: /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
17437
17444
|
icon: icon
|
|
17438
17445
|
}),
|
|
17439
17446
|
badge: badge
|
|
@@ -17475,16 +17482,16 @@ var SelectorSwitch = function SelectorSwitch(_ref) {
|
|
|
17475
17482
|
setKnotWidth(e.nativeEvent.layout.width);
|
|
17476
17483
|
}
|
|
17477
17484
|
}, [value]);
|
|
17478
|
-
return /*#__PURE__*/
|
|
17485
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableWithoutFeedback, {
|
|
17479
17486
|
onPress: function onPress() {
|
|
17480
17487
|
return _onPress === null || _onPress === void 0 ? void 0 : _onPress(value);
|
|
17481
17488
|
},
|
|
17482
17489
|
testID: testID
|
|
17483
|
-
}, /*#__PURE__*/
|
|
17490
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$2, {
|
|
17484
17491
|
onLayout: onContainerLayout,
|
|
17485
17492
|
style: style
|
|
17486
17493
|
}, options.map(function (opt, index) {
|
|
17487
|
-
return /*#__PURE__*/
|
|
17494
|
+
return /*#__PURE__*/React__namespace.default.createElement(Option, _extends$1({}, opt, {
|
|
17488
17495
|
selected: opt.value === value
|
|
17489
17496
|
// eslint-disable-next-line react/no-array-index-key
|
|
17490
17497
|
,
|
|
@@ -17494,7 +17501,7 @@ var SelectorSwitch = function SelectorSwitch(_ref) {
|
|
|
17494
17501
|
},
|
|
17495
17502
|
index: index
|
|
17496
17503
|
}));
|
|
17497
|
-
}), /*#__PURE__*/
|
|
17504
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledKnot$1, {
|
|
17498
17505
|
style: {
|
|
17499
17506
|
width: knotWidth,
|
|
17500
17507
|
transform: [{
|
|
@@ -17562,14 +17569,14 @@ var Switch = function Switch(_ref2) {
|
|
|
17562
17569
|
useNativeDriver: false
|
|
17563
17570
|
}).start();
|
|
17564
17571
|
}, [checked]);
|
|
17565
|
-
return /*#__PURE__*/
|
|
17572
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableWithoutFeedback, {
|
|
17566
17573
|
testID: testID,
|
|
17567
17574
|
onPress: onPress,
|
|
17568
17575
|
disabled: disabled
|
|
17569
|
-
}, /*#__PURE__*/
|
|
17576
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledWrapper$1, {
|
|
17570
17577
|
themeVariant: variant,
|
|
17571
17578
|
style: style
|
|
17572
|
-
}, /*#__PURE__*/
|
|
17579
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledKnot, {
|
|
17573
17580
|
style: {
|
|
17574
17581
|
left: animatedOffset
|
|
17575
17582
|
}
|
|
@@ -17633,7 +17640,7 @@ var ActiveTabIndicator = function ActiveTabIndicator(_ref) {
|
|
|
17633
17640
|
inputRange: inputRange,
|
|
17634
17641
|
outputRange: [0, tabsLength * indicatorWidth]
|
|
17635
17642
|
});
|
|
17636
|
-
return /*#__PURE__*/
|
|
17643
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledIndicator, {
|
|
17637
17644
|
themeWidth: indicatorWidth,
|
|
17638
17645
|
style: {
|
|
17639
17646
|
transform: [{
|
|
@@ -17709,18 +17716,18 @@ var SceneView = function SceneView(_ref) {
|
|
|
17709
17716
|
index = _ref.index,
|
|
17710
17717
|
selectedIndex = _ref.selectedIndex,
|
|
17711
17718
|
testID = _ref.testID;
|
|
17712
|
-
var _React$useState =
|
|
17719
|
+
var _React$useState = React__namespace.default.useState(Math.abs(selectedIndex - index) > lazyPreloadDistance),
|
|
17713
17720
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
17714
17721
|
isLoading = _React$useState2[0],
|
|
17715
17722
|
setIsLoading = _React$useState2[1];
|
|
17716
17723
|
var focused = index === selectedIndex;
|
|
17717
|
-
|
|
17724
|
+
React__namespace.default.useEffect(function () {
|
|
17718
17725
|
if (isLoading && Math.abs(selectedIndex - index) <= lazyPreloadDistance) {
|
|
17719
17726
|
// Always render the route when it becomes focused
|
|
17720
17727
|
setIsLoading(false);
|
|
17721
17728
|
}
|
|
17722
17729
|
}, [isLoading, index, selectedIndex, lazyPreloadDistance]);
|
|
17723
|
-
|
|
17730
|
+
React__namespace.default.useEffect(function () {
|
|
17724
17731
|
var timer;
|
|
17725
17732
|
if (!lazy && isLoading) {
|
|
17726
17733
|
// If lazy mode is not enabled, render the scene with a delay if not loaded already
|
|
@@ -17735,7 +17742,7 @@ var SceneView = function SceneView(_ref) {
|
|
|
17735
17742
|
}
|
|
17736
17743
|
};
|
|
17737
17744
|
}, [index, isLoading, lazy, focused]);
|
|
17738
|
-
return /*#__PURE__*/
|
|
17745
|
+
return /*#__PURE__*/React__namespace.default.createElement(TabScreen, {
|
|
17739
17746
|
accessibilityElementsHidden: !focused,
|
|
17740
17747
|
importantForAccessibility: focused ? 'auto' : 'no-hide-descendants',
|
|
17741
17748
|
style: [{
|
|
@@ -17750,9 +17757,9 @@ var TabWithBadge = function TabWithBadge(_ref) {
|
|
|
17750
17757
|
var config = _ref.config,
|
|
17751
17758
|
tabItem = _ref.tabItem;
|
|
17752
17759
|
var theme = useTheme$1();
|
|
17753
|
-
if (!config) return /*#__PURE__*/
|
|
17760
|
+
if (!config) return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, null, tabItem);
|
|
17754
17761
|
if (config.type === 'status') {
|
|
17755
|
-
return /*#__PURE__*/
|
|
17762
|
+
return /*#__PURE__*/React__namespace.default.createElement(Badge$1.Status, {
|
|
17756
17763
|
visible: true,
|
|
17757
17764
|
style: {
|
|
17758
17765
|
paddingHorizontal: theme.space.xsmall
|
|
@@ -17760,7 +17767,7 @@ var TabWithBadge = function TabWithBadge(_ref) {
|
|
|
17760
17767
|
}, tabItem);
|
|
17761
17768
|
}
|
|
17762
17769
|
if (config.type === 'counter') {
|
|
17763
|
-
return /*#__PURE__*/
|
|
17770
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledBadgeWrapper, null, tabItem, /*#__PURE__*/React__namespace.default.createElement(Badge$1, {
|
|
17764
17771
|
content: config.value,
|
|
17765
17772
|
max: config.max,
|
|
17766
17773
|
intent: "info",
|
|
@@ -17769,11 +17776,11 @@ var TabWithBadge = function TabWithBadge(_ref) {
|
|
|
17769
17776
|
}
|
|
17770
17777
|
}));
|
|
17771
17778
|
}
|
|
17772
|
-
return /*#__PURE__*/
|
|
17779
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, null, tabItem);
|
|
17773
17780
|
};
|
|
17774
17781
|
|
|
17775
17782
|
var useAnimatedValueArray = function useAnimatedValueArray(initialValues) {
|
|
17776
|
-
var refs =
|
|
17783
|
+
var refs = React__namespace.default.useRef([]);
|
|
17777
17784
|
refs.current.length = initialValues.length;
|
|
17778
17785
|
initialValues.forEach(function (initialValue, i) {
|
|
17779
17786
|
var _refs$current$i;
|
|
@@ -17792,7 +17799,7 @@ var useInitHighlightedAnimation = function useInitHighlightedAnimation(_ref) {
|
|
|
17792
17799
|
}).map(function (_, i) {
|
|
17793
17800
|
return i === selectedIndex ? 1 : 0;
|
|
17794
17801
|
}));
|
|
17795
|
-
|
|
17802
|
+
React__namespace.default.useEffect(function () {
|
|
17796
17803
|
if (variant !== 'highlighted') {
|
|
17797
17804
|
return;
|
|
17798
17805
|
}
|
|
@@ -17835,7 +17842,7 @@ var useInitUnderlinedAnimation = function useInitUnderlinedAnimation(_ref) {
|
|
|
17835
17842
|
_ref$selectedIndex = _ref.selectedIndex,
|
|
17836
17843
|
selectedIndex = _ref$selectedIndex === void 0 ? 0 : _ref$selectedIndex,
|
|
17837
17844
|
variant = _ref.variant;
|
|
17838
|
-
var previousIndex =
|
|
17845
|
+
var previousIndex = React__namespace.default.useRef(0);
|
|
17839
17846
|
var translateXAnims = useAnimatedValueArray(Array.from({
|
|
17840
17847
|
length: tabsLength
|
|
17841
17848
|
}).map(function () {
|
|
@@ -17858,7 +17865,7 @@ var useInitUnderlinedAnimation = function useInitUnderlinedAnimation(_ref) {
|
|
|
17858
17865
|
outputRange: [0, 1]
|
|
17859
17866
|
});
|
|
17860
17867
|
});
|
|
17861
|
-
|
|
17868
|
+
React__namespace.default.useEffect(function () {
|
|
17862
17869
|
if (variant === 'underlined' && selectedIndex !== undefined && previousIndex.current !== selectedIndex) {
|
|
17863
17870
|
// Prepare for translateX into the right position.
|
|
17864
17871
|
if (selectedIndex > previousIndex.current) {
|
|
@@ -17883,7 +17890,7 @@ var getTabItem$1 = function getTabItem(_ref) {
|
|
|
17883
17890
|
color = _ref.color,
|
|
17884
17891
|
active = _ref.active;
|
|
17885
17892
|
if (isHeroIcon(item)) {
|
|
17886
|
-
return /*#__PURE__*/
|
|
17893
|
+
return /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
17887
17894
|
icon: item,
|
|
17888
17895
|
testID: "hero-icon-".concat(item),
|
|
17889
17896
|
size: "small",
|
|
@@ -17893,7 +17900,7 @@ var getTabItem$1 = function getTabItem(_ref) {
|
|
|
17893
17900
|
});
|
|
17894
17901
|
}
|
|
17895
17902
|
if (typeof item === 'string') {
|
|
17896
|
-
return /*#__PURE__*/
|
|
17903
|
+
return /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
17897
17904
|
variant: active ? 'regular-bold' : 'regular',
|
|
17898
17905
|
numberOfLines: 1,
|
|
17899
17906
|
style: {
|
|
@@ -17921,7 +17928,7 @@ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
|
|
|
17921
17928
|
_ref2$variant = _ref2.variant,
|
|
17922
17929
|
variant = _ref2$variant === void 0 ? 'highlighted' : _ref2$variant;
|
|
17923
17930
|
var theme = useTheme$1();
|
|
17924
|
-
var flatListRef =
|
|
17931
|
+
var flatListRef = React__namespace.default.useRef(null);
|
|
17925
17932
|
// Init underlined animation data
|
|
17926
17933
|
var _useInitUnderlinedAni = useInitUnderlinedAnimation({
|
|
17927
17934
|
tabsLength: tabs.length,
|
|
@@ -17937,7 +17944,7 @@ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
|
|
|
17937
17944
|
variant: variant
|
|
17938
17945
|
}),
|
|
17939
17946
|
tabsAnims = _useInitHighlightedAn.tabsAnims;
|
|
17940
|
-
|
|
17947
|
+
React__namespace.default.useEffect(function () {
|
|
17941
17948
|
if (selectedIndex !== undefined && selectedIndex !== -1) {
|
|
17942
17949
|
var _flatListRef$current;
|
|
17943
17950
|
(_flatListRef$current = flatListRef.current) === null || _flatListRef$current === void 0 || _flatListRef$current.scrollToIndex({
|
|
@@ -17948,10 +17955,10 @@ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
|
|
|
17948
17955
|
return function () {
|
|
17949
17956
|
};
|
|
17950
17957
|
}, [selectedIndex]);
|
|
17951
|
-
return /*#__PURE__*/
|
|
17958
|
+
return /*#__PURE__*/React__namespace.default.createElement(HeaderTabWrapper, {
|
|
17952
17959
|
themeInsets: insets,
|
|
17953
17960
|
style: barStyle
|
|
17954
|
-
}, /*#__PURE__*/
|
|
17961
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.FlatList, {
|
|
17955
17962
|
testID: testID,
|
|
17956
17963
|
ref: flatListRef,
|
|
17957
17964
|
horizontal: true,
|
|
@@ -18000,15 +18007,15 @@ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
|
|
|
18000
18007
|
color: active ? theme.__hd__.tabs.colors.active : theme.__hd__.tabs.colors.inactive,
|
|
18001
18008
|
active: active
|
|
18002
18009
|
});
|
|
18003
|
-
return /*#__PURE__*/
|
|
18010
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableWithoutFeedback, {
|
|
18004
18011
|
key: key,
|
|
18005
18012
|
onPress: function onPress() {
|
|
18006
18013
|
onTabPress(key);
|
|
18007
18014
|
},
|
|
18008
18015
|
testID: tabItemTestID
|
|
18009
|
-
}, /*#__PURE__*/
|
|
18016
|
+
}, /*#__PURE__*/React__namespace.default.createElement(HeaderTabItem, {
|
|
18010
18017
|
isFirstItem: index === 0
|
|
18011
|
-
}, variant === 'highlighted' && /*#__PURE__*/
|
|
18018
|
+
}, variant === 'highlighted' && /*#__PURE__*/React__namespace.default.createElement(HeaderTabItemOutlineWrapper, null, /*#__PURE__*/React__namespace.default.createElement(HeaderTabItemOutline, {
|
|
18012
18019
|
themeActive: active,
|
|
18013
18020
|
style: {
|
|
18014
18021
|
flex: 1,
|
|
@@ -18016,10 +18023,10 @@ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
|
|
|
18016
18023
|
scaleX: outlineScale
|
|
18017
18024
|
}]
|
|
18018
18025
|
}
|
|
18019
|
-
})), /*#__PURE__*/
|
|
18026
|
+
})), /*#__PURE__*/React__namespace.default.createElement(HeaderTabItemWrapper, null, /*#__PURE__*/React__namespace.default.createElement(TabWithBadge, {
|
|
18020
18027
|
config: badge,
|
|
18021
18028
|
tabItem: tabItem
|
|
18022
|
-
})), variant === 'underlined' && /*#__PURE__*/
|
|
18029
|
+
})), variant === 'underlined' && /*#__PURE__*/React__namespace.default.createElement(HeaderTabItemIndicator, {
|
|
18023
18030
|
style: {
|
|
18024
18031
|
opacity: underlinedOpacity[index],
|
|
18025
18032
|
transform: [{
|
|
@@ -18045,11 +18052,11 @@ var useHandlePageScroll = function useHandlePageScroll() {
|
|
|
18045
18052
|
};
|
|
18046
18053
|
};
|
|
18047
18054
|
|
|
18048
|
-
var TabContext = /*#__PURE__*/
|
|
18049
|
-
var ScreenContext = /*#__PURE__*/
|
|
18055
|
+
var TabContext = /*#__PURE__*/React__namespace.default.createContext(null);
|
|
18056
|
+
var ScreenContext = /*#__PURE__*/React__namespace.default.createContext(null);
|
|
18050
18057
|
var useIsFocused = function useIsFocused() {
|
|
18051
|
-
var context =
|
|
18052
|
-
var key =
|
|
18058
|
+
var context = React__namespace.default.useContext(TabContext);
|
|
18059
|
+
var key = React__namespace.default.useContext(ScreenContext);
|
|
18053
18060
|
if (!context || !key) {
|
|
18054
18061
|
return;
|
|
18055
18062
|
}
|
|
@@ -18102,12 +18109,12 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
18102
18109
|
selectedTabKey: selectedTabKey
|
|
18103
18110
|
};
|
|
18104
18111
|
}, [selectedTabKey]);
|
|
18105
|
-
return /*#__PURE__*/
|
|
18112
|
+
return /*#__PURE__*/React__namespace.default.createElement(TabContext.Provider, {
|
|
18106
18113
|
value: tabContextProviderValue
|
|
18107
|
-
}, /*#__PURE__*/
|
|
18114
|
+
}, /*#__PURE__*/React__namespace.default.createElement(TabContainer, {
|
|
18108
18115
|
style: containerStyle,
|
|
18109
18116
|
testID: componentTestID
|
|
18110
|
-
}, /*#__PURE__*/
|
|
18117
|
+
}, /*#__PURE__*/React__namespace.default.createElement(ScrollableTabHeader, {
|
|
18111
18118
|
tabs: tabs,
|
|
18112
18119
|
selectedIndex: selectedTabIndex,
|
|
18113
18120
|
onTabPress: onTabPress,
|
|
@@ -18115,7 +18122,7 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
18115
18122
|
insets: insets,
|
|
18116
18123
|
testID: componentTestID ? "".concat(componentTestID, "-tab-bar") : undefined,
|
|
18117
18124
|
variant: variant
|
|
18118
|
-
}), /*#__PURE__*/
|
|
18125
|
+
}), /*#__PURE__*/React__namespace.default.createElement(PagerView__default.default, {
|
|
18119
18126
|
useNext: true,
|
|
18120
18127
|
initialPage: selectedTabIndex,
|
|
18121
18128
|
ref: pagerViewRef,
|
|
@@ -18137,10 +18144,10 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
18137
18144
|
var key = tab.key,
|
|
18138
18145
|
component = tab.component,
|
|
18139
18146
|
testID = tab.testID;
|
|
18140
|
-
return /*#__PURE__*/
|
|
18147
|
+
return /*#__PURE__*/React__namespace.default.createElement(ScreenContext.Provider, {
|
|
18141
18148
|
value: key,
|
|
18142
18149
|
key: key
|
|
18143
|
-
}, /*#__PURE__*/
|
|
18150
|
+
}, /*#__PURE__*/React__namespace.default.createElement(SceneView, {
|
|
18144
18151
|
testID: testID,
|
|
18145
18152
|
index: index,
|
|
18146
18153
|
selectedIndex: selectedTabIndex,
|
|
@@ -18150,13 +18157,13 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
18150
18157
|
}))));
|
|
18151
18158
|
};
|
|
18152
18159
|
|
|
18153
|
-
var AnimatedPagerView = reactNative.Animated.createAnimatedComponent(
|
|
18160
|
+
var AnimatedPagerView = reactNative.Animated.createAnimatedComponent(PagerView__default.default);
|
|
18154
18161
|
var getTabItem = function getTabItem(_ref) {
|
|
18155
18162
|
var item = _ref.item,
|
|
18156
18163
|
color = _ref.color,
|
|
18157
18164
|
active = _ref.active;
|
|
18158
18165
|
if (typeof item === 'string') {
|
|
18159
|
-
return /*#__PURE__*/
|
|
18166
|
+
return /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
18160
18167
|
variant: active ? 'small-bold' : 'small',
|
|
18161
18168
|
numberOfLines: 1,
|
|
18162
18169
|
style: {
|
|
@@ -18207,16 +18214,16 @@ var Tabs = function Tabs(_ref2) {
|
|
|
18207
18214
|
selectedTabKey: selectedTabKey
|
|
18208
18215
|
};
|
|
18209
18216
|
}, [selectedTabKey]);
|
|
18210
|
-
return /*#__PURE__*/
|
|
18217
|
+
return /*#__PURE__*/React__namespace.default.createElement(TabContext.Provider, {
|
|
18211
18218
|
value: tabContextProviderValue
|
|
18212
|
-
}, /*#__PURE__*/
|
|
18219
|
+
}, /*#__PURE__*/React__namespace.default.createElement(TabContainer$1, {
|
|
18213
18220
|
style: containerStyle,
|
|
18214
18221
|
testID: componentTestID
|
|
18215
|
-
}, /*#__PURE__*/
|
|
18222
|
+
}, /*#__PURE__*/React__namespace.default.createElement(HeaderTabWrapper$1, {
|
|
18216
18223
|
themeInsets: insets,
|
|
18217
18224
|
style: barStyle,
|
|
18218
18225
|
testID: componentTestID ? "".concat(componentTestID, "-tab-bar") : undefined
|
|
18219
|
-
}, /*#__PURE__*/
|
|
18226
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, null, /*#__PURE__*/React__namespace.default.createElement(HeaderTab, {
|
|
18220
18227
|
onLayout: function onLayout(e) {
|
|
18221
18228
|
var width = e.nativeEvent.layout.width;
|
|
18222
18229
|
if (tabsWidth !== width) {
|
|
@@ -18236,22 +18243,22 @@ var Tabs = function Tabs(_ref2) {
|
|
|
18236
18243
|
color: theme.__hd__.tabs.colors.text,
|
|
18237
18244
|
active: active
|
|
18238
18245
|
});
|
|
18239
|
-
return /*#__PURE__*/
|
|
18246
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableWithoutFeedback, {
|
|
18240
18247
|
key: key,
|
|
18241
18248
|
onPress: function onPress() {
|
|
18242
18249
|
onTabPress(key);
|
|
18243
18250
|
},
|
|
18244
18251
|
testID: testID
|
|
18245
|
-
}, /*#__PURE__*/
|
|
18252
|
+
}, /*#__PURE__*/React__namespace.default.createElement(HeaderTabItem$1, null, /*#__PURE__*/React__namespace.default.createElement(TabWithBadge, {
|
|
18246
18253
|
config: badge,
|
|
18247
18254
|
tabItem: tabItem
|
|
18248
18255
|
})));
|
|
18249
|
-
})), /*#__PURE__*/
|
|
18256
|
+
})), /*#__PURE__*/React__namespace.default.createElement(ActiveTabIndicator, {
|
|
18250
18257
|
positionAnimatedValue: positionAnimatedValue,
|
|
18251
18258
|
scrollOffsetAnimatedValue: scrollOffsetAnimatedValue,
|
|
18252
18259
|
tabsLength: tabs.length,
|
|
18253
18260
|
tabsWidth: tabsWidth
|
|
18254
|
-
}))), /*#__PURE__*/
|
|
18261
|
+
}))), /*#__PURE__*/React__namespace.default.createElement(AnimatedPagerView, {
|
|
18255
18262
|
useNext: true,
|
|
18256
18263
|
initialPage: selectedTabIndex,
|
|
18257
18264
|
ref: pagerViewRef,
|
|
@@ -18279,10 +18286,10 @@ var Tabs = function Tabs(_ref2) {
|
|
|
18279
18286
|
var key = tab.key,
|
|
18280
18287
|
component = tab.component,
|
|
18281
18288
|
testID = tab.testID;
|
|
18282
|
-
return /*#__PURE__*/
|
|
18289
|
+
return /*#__PURE__*/React__namespace.default.createElement(ScreenContext.Provider, {
|
|
18283
18290
|
value: key,
|
|
18284
18291
|
key: key
|
|
18285
|
-
}, /*#__PURE__*/
|
|
18292
|
+
}, /*#__PURE__*/React__namespace.default.createElement(SceneView, {
|
|
18286
18293
|
testID: testID,
|
|
18287
18294
|
key: key,
|
|
18288
18295
|
index: index,
|
|
@@ -18329,11 +18336,11 @@ var Tag = function Tag(_ref) {
|
|
|
18329
18336
|
testID = _ref.testID,
|
|
18330
18337
|
nativeProps = _objectWithoutProperties(_ref, _excluded$5);
|
|
18331
18338
|
useDeprecation("Tag's variant prop is deprecated and will be removed in the next major release. Please remove it.", variant !== undefined);
|
|
18332
|
-
return /*#__PURE__*/
|
|
18339
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledView, _extends$1({}, nativeProps, {
|
|
18333
18340
|
themeIntent: intent,
|
|
18334
18341
|
style: style,
|
|
18335
18342
|
testID: testID
|
|
18336
|
-
}), typeof content === 'string' ? /*#__PURE__*/
|
|
18343
|
+
}), typeof content === 'string' ? /*#__PURE__*/React__namespace.default.createElement(StyledText, {
|
|
18337
18344
|
themeIntent: intent,
|
|
18338
18345
|
fontWeight: "semi-bold"
|
|
18339
18346
|
}, content) : content);
|
|
@@ -18362,15 +18369,15 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
18362
18369
|
var is12Hour = displayFormat.includes('hh');
|
|
18363
18370
|
var displayValue = value ? format(displayFormat, value) : '';
|
|
18364
18371
|
var pickerInitValue = value || new Date();
|
|
18365
|
-
return /*#__PURE__*/
|
|
18372
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
|
|
18366
18373
|
onPress: function onPress() {
|
|
18367
18374
|
return setOpen(true);
|
|
18368
18375
|
},
|
|
18369
18376
|
disabled: disabled
|
|
18370
|
-
}, /*#__PURE__*/
|
|
18377
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
18371
18378
|
pointerEvents: "none",
|
|
18372
18379
|
testID: "timePickerInputAndroid"
|
|
18373
|
-
}, /*#__PURE__*/
|
|
18380
|
+
}, /*#__PURE__*/React__namespace.default.createElement(TextInput, {
|
|
18374
18381
|
label: label,
|
|
18375
18382
|
value: displayValue,
|
|
18376
18383
|
suffix: showSuffix ? 'clock-3' : undefined,
|
|
@@ -18381,7 +18388,7 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
18381
18388
|
helpText: helpText,
|
|
18382
18389
|
style: style,
|
|
18383
18390
|
testID: testID
|
|
18384
|
-
})), open ? /*#__PURE__*/
|
|
18391
|
+
})), open ? /*#__PURE__*/React__namespace.default.createElement(DateTimePicker__default.default, {
|
|
18385
18392
|
testID: "timePickerAndroid",
|
|
18386
18393
|
mode: "time",
|
|
18387
18394
|
value: pickerInitValue,
|
|
@@ -18433,15 +18440,15 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
18433
18440
|
var is12Hour = displayFormat.includes('hh');
|
|
18434
18441
|
var displayValue = value ? format(displayFormat, value) : '';
|
|
18435
18442
|
var theme = useTheme();
|
|
18436
|
-
return /*#__PURE__*/
|
|
18443
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
|
|
18437
18444
|
onPress: function onPress() {
|
|
18438
18445
|
return setOpen(true);
|
|
18439
18446
|
},
|
|
18440
18447
|
disabled: disabled
|
|
18441
|
-
}, /*#__PURE__*/
|
|
18448
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
18442
18449
|
pointerEvents: "none",
|
|
18443
18450
|
testID: "timePickerInputIOS"
|
|
18444
|
-
}, /*#__PURE__*/
|
|
18451
|
+
}, /*#__PURE__*/React__namespace.default.createElement(TextInput, {
|
|
18445
18452
|
label: label,
|
|
18446
18453
|
value: displayValue,
|
|
18447
18454
|
suffix: showSuffix ? 'clock-3' : undefined,
|
|
@@ -18452,13 +18459,13 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
18452
18459
|
helpText: helpText,
|
|
18453
18460
|
testID: testID,
|
|
18454
18461
|
style: style
|
|
18455
|
-
})), /*#__PURE__*/
|
|
18462
|
+
})), /*#__PURE__*/React__namespace.default.createElement(BottomSheet$1, {
|
|
18456
18463
|
open: open,
|
|
18457
18464
|
onRequestClose: function onRequestClose() {
|
|
18458
18465
|
return setOpen(false);
|
|
18459
18466
|
},
|
|
18460
18467
|
header: label,
|
|
18461
|
-
footer: /*#__PURE__*/
|
|
18468
|
+
footer: /*#__PURE__*/React__namespace.default.createElement(CompoundButton, {
|
|
18462
18469
|
variant: "text",
|
|
18463
18470
|
text: confirmLabel,
|
|
18464
18471
|
onPress: function onPress() {
|
|
@@ -18469,7 +18476,7 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
18469
18476
|
}
|
|
18470
18477
|
}),
|
|
18471
18478
|
supportedOrientations: supportedOrientations
|
|
18472
|
-
}, /*#__PURE__*/
|
|
18479
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledPickerWrapper, null, /*#__PURE__*/React__namespace.default.createElement(DateTimePicker__default.default, {
|
|
18473
18480
|
testID: "timePickerIOS",
|
|
18474
18481
|
value: selectingDate,
|
|
18475
18482
|
mode: "time"
|
|
@@ -18492,9 +18499,9 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
18492
18499
|
|
|
18493
18500
|
var TimePicker = function TimePicker(props) {
|
|
18494
18501
|
if (reactNative.Platform.OS === 'ios') {
|
|
18495
|
-
return /*#__PURE__*/
|
|
18502
|
+
return /*#__PURE__*/React__namespace.default.createElement(TimePickerIOS, props);
|
|
18496
18503
|
}
|
|
18497
|
-
return /*#__PURE__*/
|
|
18504
|
+
return /*#__PURE__*/React__namespace.default.createElement(TimePickerAndroid, props);
|
|
18498
18505
|
};
|
|
18499
18506
|
|
|
18500
18507
|
var ToolbarWrapper = index$9(reactNative.View)(function (_ref) {
|
|
@@ -18562,12 +18569,12 @@ var IconItem = function IconItem(_ref) {
|
|
|
18562
18569
|
intent = _ref.intent,
|
|
18563
18570
|
disabled = _ref.disabled,
|
|
18564
18571
|
label = _ref.label;
|
|
18565
|
-
return /*#__PURE__*/
|
|
18572
|
+
return /*#__PURE__*/React__namespace.default.createElement(IconButtonWrapper, null, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
18566
18573
|
icon: icon,
|
|
18567
18574
|
size: "medium",
|
|
18568
18575
|
intent: disabled ? 'disabled-text' : intent,
|
|
18569
18576
|
testID: "toolbar-item-icon-".concat(icon)
|
|
18570
|
-
}), label ? /*#__PURE__*/
|
|
18577
|
+
}), label ? /*#__PURE__*/React__namespace.default.createElement(IconButtonLabel, {
|
|
18571
18578
|
variant: "regular-bold",
|
|
18572
18579
|
intent: disabled ? 'subdued' : intent,
|
|
18573
18580
|
allowFontScaling: false,
|
|
@@ -18582,7 +18589,7 @@ var ToolbarItemContent = function ToolbarItemContent(_ref2) {
|
|
|
18582
18589
|
_ref2$disabled = _ref2.disabled,
|
|
18583
18590
|
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled;
|
|
18584
18591
|
if (icon) {
|
|
18585
|
-
return /*#__PURE__*/
|
|
18592
|
+
return /*#__PURE__*/React__namespace.default.createElement(IconItem, {
|
|
18586
18593
|
icon: icon,
|
|
18587
18594
|
intent: intent,
|
|
18588
18595
|
disabled: disabled,
|
|
@@ -18590,7 +18597,7 @@ var ToolbarItemContent = function ToolbarItemContent(_ref2) {
|
|
|
18590
18597
|
});
|
|
18591
18598
|
}
|
|
18592
18599
|
if (label) {
|
|
18593
|
-
return /*#__PURE__*/
|
|
18600
|
+
return /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
18594
18601
|
variant: "regular-bold",
|
|
18595
18602
|
intent: disabled ? 'disabled' : intent,
|
|
18596
18603
|
allowFontScaling: false,
|
|
@@ -18608,11 +18615,11 @@ var ToolbarItem = function ToolbarItem(_ref3) {
|
|
|
18608
18615
|
_ref3$disabled = _ref3.disabled,
|
|
18609
18616
|
disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
|
|
18610
18617
|
style = _ref3.style;
|
|
18611
|
-
return /*#__PURE__*/
|
|
18618
|
+
return /*#__PURE__*/React__namespace.default.createElement(ToolbarItemWrapper, {
|
|
18612
18619
|
onPress: onPress,
|
|
18613
18620
|
disabled: disabled,
|
|
18614
18621
|
style: style
|
|
18615
|
-
}, /*#__PURE__*/
|
|
18622
|
+
}, /*#__PURE__*/React__namespace.default.createElement(ToolbarItemContent, {
|
|
18616
18623
|
icon: icon,
|
|
18617
18624
|
label: label,
|
|
18618
18625
|
intent: intent,
|
|
@@ -18626,7 +18633,7 @@ var ToolbarGroup = function ToolbarGroup(_ref) {
|
|
|
18626
18633
|
_ref$items = _ref.items,
|
|
18627
18634
|
items = _ref$items === void 0 ? [] : _ref$items;
|
|
18628
18635
|
useDeprecation("Toolbar's align prop is deprecated", align !== 'right');
|
|
18629
|
-
return /*#__PURE__*/
|
|
18636
|
+
return /*#__PURE__*/React__namespace.default.createElement(ToolbarGroupWrapper, {
|
|
18630
18637
|
align: align
|
|
18631
18638
|
}, items.map(function (_ref2) {
|
|
18632
18639
|
var label = _ref2.label,
|
|
@@ -18634,7 +18641,7 @@ var ToolbarGroup = function ToolbarGroup(_ref) {
|
|
|
18634
18641
|
onPress = _ref2.onPress,
|
|
18635
18642
|
disabled = _ref2.disabled,
|
|
18636
18643
|
intent = _ref2.intent;
|
|
18637
|
-
return /*#__PURE__*/
|
|
18644
|
+
return /*#__PURE__*/React__namespace.default.createElement(ToolbarItem, {
|
|
18638
18645
|
key: "".concat(label, "-").concat(icon),
|
|
18639
18646
|
label: label,
|
|
18640
18647
|
icon: icon,
|
|
@@ -18649,7 +18656,7 @@ var _excluded$4 = ["children"];
|
|
|
18649
18656
|
var Toolbar = function Toolbar(_ref) {
|
|
18650
18657
|
var children = _ref.children,
|
|
18651
18658
|
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
18652
|
-
return /*#__PURE__*/
|
|
18659
|
+
return /*#__PURE__*/React__namespace.default.createElement(ToolbarWrapper, rest, children);
|
|
18653
18660
|
};
|
|
18654
18661
|
var index$1 = Object.assign(Toolbar, {
|
|
18655
18662
|
Group: ToolbarGroup
|
|
@@ -18694,21 +18701,21 @@ var Rate = function Rate(_ref) {
|
|
|
18694
18701
|
useNativeDriver: reactNative.Platform.OS !== 'web'
|
|
18695
18702
|
}).start();
|
|
18696
18703
|
}, [value, animatedValue]);
|
|
18697
|
-
return /*#__PURE__*/
|
|
18698
|
-
return /*#__PURE__*/
|
|
18704
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledWrapper, otherProps, options.length > 0 && options.map(function (item, index) {
|
|
18705
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Pressable, {
|
|
18699
18706
|
key: item.value,
|
|
18700
18707
|
disabled: disabled || readonly,
|
|
18701
18708
|
onPress: function onPress() {
|
|
18702
18709
|
return onChange === null || onChange === void 0 ? void 0 : onChange(item.value);
|
|
18703
18710
|
},
|
|
18704
18711
|
testID: item.value.toString()
|
|
18705
|
-
}, /*#__PURE__*/
|
|
18712
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledIconWrapper, {
|
|
18706
18713
|
style: valueIndex === index && {
|
|
18707
18714
|
transform: [{
|
|
18708
18715
|
scale: scale
|
|
18709
18716
|
}]
|
|
18710
18717
|
}
|
|
18711
|
-
}, /*#__PURE__*/
|
|
18718
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
18712
18719
|
icon: index <= valueIndex ? 'star' : 'star-outlined',
|
|
18713
18720
|
intent: disabled ? 'disabled-text' : 'primary'
|
|
18714
18721
|
})));
|
|
@@ -18718,7 +18725,7 @@ var Rate = function Rate(_ref) {
|
|
|
18718
18725
|
var RefreshControl = function RefreshControl(_ref) {
|
|
18719
18726
|
var props = _extends$1({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
18720
18727
|
var theme = useTheme();
|
|
18721
|
-
return /*#__PURE__*/
|
|
18728
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.RefreshControl, _extends$1({}, props, {
|
|
18722
18729
|
colors: [theme.__hd__.refreshControl.colors.indicator],
|
|
18723
18730
|
tintColor: theme.__hd__.refreshControl.colors.indicator
|
|
18724
18731
|
}));
|
|
@@ -18787,11 +18794,11 @@ var ToolbarButton = function ToolbarButton(_ref) {
|
|
|
18787
18794
|
onPress = _ref.onPress,
|
|
18788
18795
|
testID = _ref.testID,
|
|
18789
18796
|
selected = _ref.selected;
|
|
18790
|
-
return /*#__PURE__*/
|
|
18797
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledToolbarButton, {
|
|
18791
18798
|
selected: selected,
|
|
18792
18799
|
onPress: onPress,
|
|
18793
18800
|
testID: testID
|
|
18794
|
-
}, /*#__PURE__*/
|
|
18801
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
18795
18802
|
size: "small",
|
|
18796
18803
|
icon: icon
|
|
18797
18804
|
}));
|
|
@@ -18889,13 +18896,13 @@ var EditorToolbar = function EditorToolbar(_ref2) {
|
|
|
18889
18896
|
var toolbarButtons = React.useMemo(function () {
|
|
18890
18897
|
return toolbarButtonArray.map(function (button) {
|
|
18891
18898
|
if (button.buttonName === '|') {
|
|
18892
|
-
return /*#__PURE__*/
|
|
18899
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledSeparator, {
|
|
18893
18900
|
key: button.id
|
|
18894
18901
|
});
|
|
18895
18902
|
}
|
|
18896
18903
|
var config = buttonConfigs[button.buttonName];
|
|
18897
18904
|
if (config) {
|
|
18898
|
-
return /*#__PURE__*/
|
|
18905
|
+
return /*#__PURE__*/React__namespace.default.createElement(ToolbarButton, {
|
|
18899
18906
|
key: button.id,
|
|
18900
18907
|
testID: config.icon,
|
|
18901
18908
|
icon: config.icon,
|
|
@@ -18910,7 +18917,7 @@ var EditorToolbar = function EditorToolbar(_ref2) {
|
|
|
18910
18917
|
});
|
|
18911
18918
|
}, [toolbarButtonArray]);
|
|
18912
18919
|
if (show) {
|
|
18913
|
-
return /*#__PURE__*/
|
|
18920
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledToolbar, {
|
|
18914
18921
|
testID: testID
|
|
18915
18922
|
}, toolbarButtons);
|
|
18916
18923
|
}
|
|
@@ -18949,7 +18956,7 @@ var MentionList = function MentionList(_ref) {
|
|
|
18949
18956
|
if (isEmptyString(search)) {
|
|
18950
18957
|
return null;
|
|
18951
18958
|
}
|
|
18952
|
-
return /*#__PURE__*/
|
|
18959
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, null, render(search, function (id, name) {
|
|
18953
18960
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
18954
18961
|
highlighted: false
|
|
18955
18962
|
};
|
|
@@ -19254,7 +19261,7 @@ var hasRequiredReactDom_production_min;
|
|
|
19254
19261
|
function requireReactDom_production_min() {
|
|
19255
19262
|
if (hasRequiredReactDom_production_min) return reactDom_production_min;
|
|
19256
19263
|
hasRequiredReactDom_production_min = 1;
|
|
19257
|
-
var aa =
|
|
19264
|
+
var aa = React__namespace.default,
|
|
19258
19265
|
ca = requireScheduler();
|
|
19259
19266
|
function p(a) {
|
|
19260
19267
|
for (var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++) b += "&args[]=" + encodeURIComponent(arguments[c]);
|
|
@@ -26409,7 +26416,7 @@ function requireLib() {
|
|
|
26409
26416
|
hasRequiredLib = 1;
|
|
26410
26417
|
(function (module, exports) {
|
|
26411
26418
|
!function (e, t) {
|
|
26412
|
-
module.exports = t(
|
|
26419
|
+
module.exports = t(React__namespace.default, requireReactDom());
|
|
26413
26420
|
}(window, function (e, t) {
|
|
26414
26421
|
return function (e) {
|
|
26415
26422
|
var t = {};
|
|
@@ -35719,14 +35726,14 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
35719
35726
|
postMessage(webview.current, message);
|
|
35720
35727
|
}
|
|
35721
35728
|
};
|
|
35722
|
-
var _React$useState =
|
|
35729
|
+
var _React$useState = React__namespace.default.useState({
|
|
35723
35730
|
height: 0,
|
|
35724
35731
|
width: 0
|
|
35725
35732
|
}),
|
|
35726
35733
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
35727
35734
|
inputSize = _React$useState2[0],
|
|
35728
35735
|
setInputSize = _React$useState2[1];
|
|
35729
|
-
var _React$useState3 =
|
|
35736
|
+
var _React$useState3 = React__namespace.default.useState(0),
|
|
35730
35737
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
35731
35738
|
labelWidth = _React$useState4[0],
|
|
35732
35739
|
setLabelWidth = _React$useState4[1];
|
|
@@ -35841,9 +35848,9 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
35841
35848
|
break;
|
|
35842
35849
|
}
|
|
35843
35850
|
}, []);
|
|
35844
|
-
return /*#__PURE__*/
|
|
35851
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$4, {
|
|
35845
35852
|
testID: testID
|
|
35846
|
-
}, /*#__PURE__*/
|
|
35853
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledLabelContainerInsideTextInput, {
|
|
35847
35854
|
themeVariant: "text",
|
|
35848
35855
|
pointerEvents: "none",
|
|
35849
35856
|
testID: "input-label-container",
|
|
@@ -35867,28 +35874,28 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
35867
35874
|
})
|
|
35868
35875
|
}]
|
|
35869
35876
|
}]
|
|
35870
|
-
}, required && /*#__PURE__*/
|
|
35877
|
+
}, required && /*#__PURE__*/React__namespace.default.createElement(StyledAsteriskLabelInsideTextInput, {
|
|
35871
35878
|
style: {
|
|
35872
35879
|
backgroundColor: theme.__hd__.textInput.colors.labelBackground
|
|
35873
35880
|
},
|
|
35874
35881
|
themeState: state
|
|
35875
|
-
}, "*"), !!label && /*#__PURE__*/
|
|
35882
|
+
}, "*"), !!label && /*#__PURE__*/React__namespace.default.createElement(StyledLabelInsideTextInput, {
|
|
35876
35883
|
style: {
|
|
35877
35884
|
backgroundColor: theme.__hd__.textInput.colors.labelBackground
|
|
35878
35885
|
},
|
|
35879
35886
|
testID: "input-label",
|
|
35880
35887
|
themeState: state,
|
|
35881
35888
|
onLayout: onLabelLayout
|
|
35882
|
-
}, label)), /*#__PURE__*/
|
|
35889
|
+
}, label)), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputContainer, {
|
|
35883
35890
|
onLayout: onLayout
|
|
35884
|
-
}, /*#__PURE__*/
|
|
35891
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledBorderBackDrop, {
|
|
35885
35892
|
themeState: state,
|
|
35886
35893
|
themeFocused: isFocused
|
|
35887
|
-
}), /*#__PURE__*/
|
|
35894
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputAndLabelContainer, null, /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableWithoutFeedback, {
|
|
35888
35895
|
onPress: function onPress(e) {
|
|
35889
35896
|
return e.stopPropagation();
|
|
35890
35897
|
}
|
|
35891
|
-
}, /*#__PURE__*/
|
|
35898
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledWebView, {
|
|
35892
35899
|
ref: webview,
|
|
35893
35900
|
testID: "webview",
|
|
35894
35901
|
style: style,
|
|
@@ -35901,17 +35908,17 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
35901
35908
|
hideKeyboardAccessoryView: true,
|
|
35902
35909
|
keyboardDisplayRequiresUserAction: false,
|
|
35903
35910
|
height: webviewHeight
|
|
35904
|
-
})))), /*#__PURE__*/
|
|
35911
|
+
})))), /*#__PURE__*/React__namespace.default.createElement(StyledErrorAndHelpTextContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledErrorAndMaxLengthContainer, null, error ? /*#__PURE__*/React__namespace.default.createElement(StyledErrorContainer$2, null, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
35905
35912
|
testID: "input-error-icon",
|
|
35906
35913
|
icon: "circle-info",
|
|
35907
35914
|
size: "xsmall",
|
|
35908
35915
|
intent: "danger"
|
|
35909
|
-
}), /*#__PURE__*/
|
|
35916
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledError, {
|
|
35910
35917
|
testID: "input-error-message"
|
|
35911
|
-
}, error)) : !!helpText && /*#__PURE__*/
|
|
35918
|
+
}, error)) : !!helpText && /*#__PURE__*/React__namespace.default.createElement(StyledHelperText, null, helpText))));
|
|
35912
35919
|
};
|
|
35913
35920
|
var RichTextEditorWithRef = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
35914
|
-
return /*#__PURE__*/
|
|
35921
|
+
return /*#__PURE__*/React__namespace.default.createElement(RichTextEditor, _extends$1({}, props, {
|
|
35915
35922
|
forwardedRef: ref
|
|
35916
35923
|
}));
|
|
35917
35924
|
});
|
|
@@ -35943,18 +35950,18 @@ var AnimatedFAB = function AnimatedFAB(_ref) {
|
|
|
35943
35950
|
contentHeight = _ref.contentHeight,
|
|
35944
35951
|
layoutHeight = _ref.layoutHeight;
|
|
35945
35952
|
var component = 'items' in fabProps ? 'ActionGroup' : 'FAB';
|
|
35946
|
-
var ref =
|
|
35947
|
-
var currentContentHeight =
|
|
35948
|
-
var currentLayoutHeight =
|
|
35953
|
+
var ref = React__namespace.default.useRef(null);
|
|
35954
|
+
var currentContentHeight = React__namespace.default.useRef(0);
|
|
35955
|
+
var currentLayoutHeight = React__namespace.default.useRef(0);
|
|
35949
35956
|
/** fabState is used to avoid calling duplicated animations. */
|
|
35950
|
-
var fabState =
|
|
35957
|
+
var fabState = React__namespace.default.useRef('show');
|
|
35951
35958
|
/** remainingScrollOffset determines whether to animate the FAB. */
|
|
35952
|
-
var remainingScrollOffset =
|
|
35959
|
+
var remainingScrollOffset = React__namespace.default.useRef(MAX_ANIMATABLE_SCROLL_DISTANCE);
|
|
35953
35960
|
/** currentScrollDirection is used to determine the scroll direction. */
|
|
35954
|
-
var currentScrollDirection =
|
|
35961
|
+
var currentScrollDirection = React__namespace.default.useRef('down');
|
|
35955
35962
|
/** lastScrollY is the scrollY from the preview scroll event. */
|
|
35956
|
-
var lastScrollY =
|
|
35957
|
-
var animateFab =
|
|
35963
|
+
var lastScrollY = React__namespace.default.useRef(0);
|
|
35964
|
+
var animateFab = React__namespace.default.useCallback(function (newState) {
|
|
35958
35965
|
if (fabState.current !== newState) {
|
|
35959
35966
|
if (newState === 'show') {
|
|
35960
35967
|
var _ref$current;
|
|
@@ -35969,7 +35976,7 @@ var AnimatedFAB = function AnimatedFAB(_ref) {
|
|
|
35969
35976
|
fabState.current = newState;
|
|
35970
35977
|
}
|
|
35971
35978
|
}, [component]);
|
|
35972
|
-
|
|
35979
|
+
React__namespace.default.useEffect(function () {
|
|
35973
35980
|
contentHeight.addListener(function (_ref2) {
|
|
35974
35981
|
var value = _ref2.value;
|
|
35975
35982
|
if (value > 0 && value !== currentContentHeight.current) {
|
|
@@ -36024,9 +36031,9 @@ var AnimatedFAB = function AnimatedFAB(_ref) {
|
|
|
36024
36031
|
layoutHeight.removeAllListeners();
|
|
36025
36032
|
};
|
|
36026
36033
|
}, [contentHeight, contentOffsetY, layoutHeight]);
|
|
36027
|
-
return component === 'FAB' ? /*#__PURE__*/
|
|
36034
|
+
return component === 'FAB' ? /*#__PURE__*/React__namespace.default.createElement(FAB, _extends$1({
|
|
36028
36035
|
ref: ref
|
|
36029
|
-
}, fabProps)) : /*#__PURE__*/
|
|
36036
|
+
}, fabProps)) : /*#__PURE__*/React__namespace.default.createElement(ActionGroup, _extends$1({
|
|
36030
36037
|
ref: ref
|
|
36031
36038
|
}, fabProps));
|
|
36032
36039
|
};
|
|
@@ -36034,14 +36041,14 @@ var AnimatedFAB = function AnimatedFAB(_ref) {
|
|
|
36034
36041
|
function AnimatedScroller(_ref) {
|
|
36035
36042
|
var ScrollComponent = _ref.ScrollComponent,
|
|
36036
36043
|
fabProps = _ref.fabProps;
|
|
36037
|
-
var contentOffsetY =
|
|
36038
|
-
var contentHeight =
|
|
36039
|
-
var layoutHeight =
|
|
36044
|
+
var contentOffsetY = React__namespace.default.useRef(new reactNative.Animated.Value(0)).current;
|
|
36045
|
+
var contentHeight = React__namespace.default.useRef(new reactNative.Animated.Value(0)).current;
|
|
36046
|
+
var layoutHeight = React__namespace.default.useRef(new reactNative.Animated.Value(0)).current;
|
|
36040
36047
|
// Common props for all ScrollView, FlatList and SectionList.
|
|
36041
36048
|
var _ScrollComponent$prop = ScrollComponent.props,
|
|
36042
36049
|
onScroll = _ScrollComponent$prop.onScroll,
|
|
36043
36050
|
scrollEventThrottle = _ScrollComponent$prop.scrollEventThrottle;
|
|
36044
|
-
return /*#__PURE__*/
|
|
36051
|
+
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.cloneElement(ScrollComponent, _objectSpread2(_objectSpread2({}, ScrollComponent.props), {}, {
|
|
36045
36052
|
scrollEventThrottle: scrollEventThrottle || 100,
|
|
36046
36053
|
onScroll: reactNative.Animated.event([{
|
|
36047
36054
|
nativeEvent: {
|
|
@@ -36059,7 +36066,7 @@ function AnimatedScroller(_ref) {
|
|
|
36059
36066
|
useNativeDriver: false,
|
|
36060
36067
|
listener: onScroll
|
|
36061
36068
|
})
|
|
36062
|
-
})), !!fabProps && /*#__PURE__*/
|
|
36069
|
+
})), !!fabProps && /*#__PURE__*/React__namespace.default.createElement(AnimatedFAB, {
|
|
36063
36070
|
fabProps: fabProps,
|
|
36064
36071
|
contentOffsetY: contentOffsetY,
|
|
36065
36072
|
contentHeight: contentHeight,
|
|
@@ -36071,8 +36078,8 @@ var _excluded$2 = ["fabProps"];
|
|
|
36071
36078
|
var ScrollViewWithFAB = function ScrollViewWithFAB(_ref) {
|
|
36072
36079
|
var fabProps = _ref.fabProps,
|
|
36073
36080
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
36074
|
-
return /*#__PURE__*/
|
|
36075
|
-
ScrollComponent: /*#__PURE__*/
|
|
36081
|
+
return /*#__PURE__*/React__namespace.default.createElement(AnimatedScroller, {
|
|
36082
|
+
ScrollComponent: /*#__PURE__*/React__namespace.default.createElement(reactNative.ScrollView, props),
|
|
36076
36083
|
fabProps: fabProps
|
|
36077
36084
|
});
|
|
36078
36085
|
};
|
|
@@ -36081,8 +36088,8 @@ var _excluded$1 = ["fabProps"];
|
|
|
36081
36088
|
function FlatListWithFAB(_ref) {
|
|
36082
36089
|
var fabProps = _ref.fabProps,
|
|
36083
36090
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
36084
|
-
return /*#__PURE__*/
|
|
36085
|
-
ScrollComponent: /*#__PURE__*/
|
|
36091
|
+
return /*#__PURE__*/React__namespace.default.createElement(AnimatedScroller, {
|
|
36092
|
+
ScrollComponent: /*#__PURE__*/React__namespace.default.createElement(reactNative.FlatList, props),
|
|
36086
36093
|
fabProps: fabProps
|
|
36087
36094
|
});
|
|
36088
36095
|
}
|
|
@@ -36091,8 +36098,8 @@ var _excluded = ["fabProps"];
|
|
|
36091
36098
|
function SectionListWithFAB(_ref) {
|
|
36092
36099
|
var fabProps = _ref.fabProps,
|
|
36093
36100
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
36094
|
-
return /*#__PURE__*/
|
|
36095
|
-
ScrollComponent: /*#__PURE__*/
|
|
36101
|
+
return /*#__PURE__*/React__namespace.default.createElement(AnimatedScroller, {
|
|
36102
|
+
ScrollComponent: /*#__PURE__*/React__namespace.default.createElement(reactNative.SectionList, props),
|
|
36096
36103
|
fabProps: fabProps
|
|
36097
36104
|
});
|
|
36098
36105
|
}
|