@hero-design/rn 8.113.0 → 8.113.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/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +11 -0
- package/es/index.js +116 -133
- package/lib/index.js +115 -132
- package/package.json +4 -4
- package/src/components/Alert/index.tsx +1 -1
- package/src/components/Badge/Count.tsx +2 -2
- package/src/components/Badge/Status.tsx +2 -2
- package/src/components/Badge/index.tsx +2 -1
- package/src/components/BottomNavigation/StyledBottomNavigation.tsx +1 -1
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +32 -36
- package/src/components/BottomNavigation/__tests__/index.spec.tsx +17 -8
- package/src/components/BottomNavigation/index.tsx +4 -5
- package/src/components/BottomSheet/ScrollView.tsx +2 -1
- package/src/components/BottomSheet/index.tsx +1 -1
- package/src/components/Button/Button.tsx +2 -2
- package/src/components/Calendar/__tests__/index.spec.tsx +3 -8
- package/src/components/Card/DataCard/index.tsx +2 -2
- package/src/components/Card/index.tsx +2 -2
- package/src/components/Carousel/index.tsx +2 -2
- package/src/components/DatePicker/Dialog/__tests__/IOSDialog.spec.tsx +0 -6
- package/src/components/DatePicker/__tests__/DatePickerCalendar.spec.tsx +2 -10
- package/src/components/DatePicker/__tests__/DatePickerIOS.spec.tsx +27 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +176 -728
- package/src/components/Drawer/DragableDrawer/index.tsx +2 -2
- package/src/components/Drawer/index.tsx +2 -2
- package/src/components/FAB/__tests__/index.spec.tsx +33 -8
- package/src/components/Image/index.tsx +2 -1
- package/src/components/List/BasicListItem.tsx +2 -1
- package/src/components/List/ListItem.tsx +1 -1
- package/src/components/MapPin/Focussed.tsx +2 -1
- package/src/components/MapPin/index.tsx +2 -1
- package/src/components/Modal/__tests__/index.spec.tsx +46 -0
- package/src/components/Modal/index.tsx +121 -149
- package/src/components/Progress/ProgressBar.tsx +2 -1
- package/src/components/Progress/ProgressCircle.tsx +2 -1
- package/src/components/RichTextEditor/MentionList.tsx +2 -1
- package/src/components/Tabs/ScrollableTabsHeader/ScrollableTabsHeader.tsx +4 -6
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +43 -32
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +105 -129
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +30 -42
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +0 -683
- package/src/components/Tabs/__tests__/index.spec.tsx +37 -25
- package/src/components/Tabs/index.tsx +2 -2
- package/src/components/Tag/index.tsx +1 -1
- package/src/components/TimePicker/__tests__/TimePickerIOS.spec.tsx +0 -6
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +237 -282
- package/src/components/Toast/Toast.tsx +2 -1
- package/src/components/Toolbar/ToolbarItem.tsx +2 -1
- package/src/components/Typography/Label/index.tsx +1 -1
- package/src/testHelpers/renderWithTheme.tsx +2 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +1 -1
- package/src/theme/components/bottomNavigation.ts +1 -1
- package/types/components/Alert/index.d.ts +1 -1
- package/types/components/Badge/Count.d.ts +2 -2
- package/types/components/Badge/Status.d.ts +2 -2
- package/types/components/Badge/index.d.ts +4 -3
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +1 -1
- package/types/components/BottomNavigation/index.d.ts +2 -2
- package/types/components/BottomSheet/index.d.ts +1 -1
- package/types/components/Button/Button.d.ts +2 -2
- package/types/components/Card/DataCard/index.d.ts +2 -2
- package/types/components/Card/index.d.ts +3 -3
- package/types/components/Carousel/index.d.ts +2 -2
- package/types/components/Drawer/DragableDrawer/index.d.ts +2 -2
- package/types/components/Drawer/index.d.ts +3 -3
- package/types/components/Image/index.d.ts +2 -1
- package/types/components/List/BasicListItem.d.ts +2 -1
- package/types/components/List/ListItem.d.ts +1 -1
- package/types/components/MapPin/Focussed.d.ts +2 -1
- package/types/components/MapPin/index.d.ts +3 -2
- package/types/components/Modal/index.d.ts +2 -2
- package/types/components/Progress/ProgressBar.d.ts +2 -1
- package/types/components/Progress/ProgressCircle.d.ts +2 -1
- package/types/components/Progress/index.d.ts +2 -2
- package/types/components/RichTextEditor/MentionList.d.ts +2 -1
- package/types/components/Tabs/index.d.ts +2 -2
- package/types/components/Tag/index.d.ts +1 -1
- package/types/components/Toast/Toast.d.ts +2 -1
- package/types/components/Typography/Label/index.d.ts +1 -1
- package/types/testHelpers/renderWithTheme.d.ts +84 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(node:
|
|
1
|
+
(node:2088) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
|
|
2
2
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
3
3
|
[36m
|
|
4
4
|
[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
@@ -9,9 +9,9 @@ node_modules/d3-selection/src/selection/index.js -> node_modules/d3-selection/sr
|
|
|
9
9
|
...and 12 more
|
|
10
10
|
[1m[33m(!) [plugin replace] @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
11
11
|
[1m[33m(!) [plugin node-resolve] preferring built-in module 'events' over local alternative at '/home/runner/_work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning.or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.[39m[22m
|
|
12
|
-
[32mcreated [1mlib/index.js, es/index.js[22m in [
|
|
12
|
+
[32mcreated [1mlib/index.js, es/index.js[22m in [1m30.6s[22m[39m
|
|
13
13
|
[36m
|
|
14
14
|
[1m/home/runner/_work/hero-design/hero-design/packages/rn/src/locales/en_AU.ts, /home/runner/_work/hero-design/hero-design/packages/rn/src/locales/en_CA.ts, /home/runner/_work/hero-design/hero-design/packages/rn/src/locales/index.ts, /home/runner/_work/hero-design/hero-design/packages/rn/src/locales/types.ts[22m → [1m., .[22m...[39m
|
|
15
15
|
[1m[33m(!) Generated empty chunks[39m[22m
|
|
16
16
|
"locales/types" and "locales/types"
|
|
17
|
-
[32mcreated [1m., .[22m in [
|
|
17
|
+
[32mcreated [1m., .[22m in [1m9.1s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.113.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#4546](https://github.com/Thinkei/hero-design/pull/4546) [`3d952f2800d556206f58098b021b856b0557eb76`](https://github.com/Thinkei/hero-design/commit/3d952f2800d556206f58098b021b856b0557eb76) Thanks [@ttkien](https://github.com/ttkien)! - [Tabs] update Tab highlights animated logic
|
|
8
|
+
|
|
9
|
+
- [#4558](https://github.com/Thinkei/hero-design/pull/4558) [`3dd028bcd49e00d13c9112e18103659e75c1bc95`](https://github.com/Thinkei/hero-design/commit/3dd028bcd49e00d13c9112e18103659e75c1bc95) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [BottomNavigation]
|
|
10
|
+
|
|
11
|
+
- Update label and icon spacing and size.
|
|
12
|
+
- Update text and icon inactive colors to mutedOnDefaultGlobalSurface.
|
|
13
|
+
|
|
3
14
|
## 8.113.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as reactNative from 'react-native';
|
|
2
2
|
import { StyleSheet as StyleSheet$1, Platform, Dimensions, Keyboard, Animated, View, UIManager, LayoutAnimation, TouchableOpacity, Text as Text$1, Easing, useWindowDimensions, TouchableWithoutFeedback, Modal as Modal$1, Image as Image$1, Pressable, SafeAreaView, KeyboardAvoidingView, TouchableHighlight, ScrollView, FlatList, TextInput as TextInput$1, PanResponder, BackHandler, InteractionManager, SectionList, RefreshControl as RefreshControl$1 } from 'react-native';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import React__default, { useState, useEffect, useMemo, useCallback, useRef, useLayoutEffect, createContext, forwardRef, useContext, memo, useReducer,
|
|
4
|
+
import React__default, { useState, useEffect, useMemo, useCallback, useRef, useLayoutEffect, createContext, forwardRef, useContext, memo, useReducer, isValidElement, useImperativeHandle } from 'react';
|
|
5
5
|
import { createIconSet } from 'react-native-vector-icons';
|
|
6
6
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
7
|
import { MonthYearPickerViewIOS, MonthYearPickerDialogueAndroid } from '@hero-design/react-native-month-year-picker';
|
|
@@ -5692,7 +5692,7 @@ var getBottomNavigationTheme = function getBottomNavigationTheme(theme) {
|
|
|
5692
5692
|
wrapper: theme.shadows.medium
|
|
5693
5693
|
};
|
|
5694
5694
|
var space = {
|
|
5695
|
-
titleMarginTop: theme.space.
|
|
5695
|
+
titleMarginTop: theme.space.xxsmall
|
|
5696
5696
|
};
|
|
5697
5697
|
return {
|
|
5698
5698
|
colors: colors,
|
|
@@ -8033,7 +8033,7 @@ var StyledText$4 = index$c(Text$1)(function (_ref) {
|
|
|
8033
8033
|
});
|
|
8034
8034
|
});
|
|
8035
8035
|
|
|
8036
|
-
var _excluded$
|
|
8036
|
+
var _excluded$N = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
|
|
8037
8037
|
/**
|
|
8038
8038
|
* @deprecated 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.
|
|
8039
8039
|
*/
|
|
@@ -8049,7 +8049,7 @@ var Text = function Text(_ref) {
|
|
|
8049
8049
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
8050
8050
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
8051
8051
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
8052
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
8052
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$N);
|
|
8053
8053
|
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.');
|
|
8054
8054
|
return /*#__PURE__*/React__default.createElement(StyledText$4, _extends$1({}, nativeProps, {
|
|
8055
8055
|
themeFontSize: fontSize,
|
|
@@ -8082,7 +8082,7 @@ var StyledCaption = index$c(Text$1)(function (_ref) {
|
|
|
8082
8082
|
};
|
|
8083
8083
|
});
|
|
8084
8084
|
|
|
8085
|
-
var _excluded$
|
|
8085
|
+
var _excluded$M = ["children", "fontWeight", "intent", "allowFontScaling", "fontStyle"];
|
|
8086
8086
|
var Caption = function Caption(_ref) {
|
|
8087
8087
|
var children = _ref.children,
|
|
8088
8088
|
_ref$fontWeight = _ref.fontWeight,
|
|
@@ -8093,7 +8093,7 @@ var Caption = function Caption(_ref) {
|
|
|
8093
8093
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
8094
8094
|
_ref$fontStyle = _ref.fontStyle,
|
|
8095
8095
|
fontStyle = _ref$fontStyle === void 0 ? 'normal' : _ref$fontStyle,
|
|
8096
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
8096
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$M);
|
|
8097
8097
|
return /*#__PURE__*/React__default.createElement(StyledCaption, _extends$1({}, nativeProps, {
|
|
8098
8098
|
themeFontWeight: fontWeight,
|
|
8099
8099
|
themeIntent: intent,
|
|
@@ -8118,7 +8118,7 @@ var StyledLabel$1 = index$c(Text$1)(function (_ref) {
|
|
|
8118
8118
|
};
|
|
8119
8119
|
});
|
|
8120
8120
|
|
|
8121
|
-
var _excluded$
|
|
8121
|
+
var _excluded$L = ["children", "intent", "allowFontScaling", "fontStyle"];
|
|
8122
8122
|
var Label = function Label(_ref) {
|
|
8123
8123
|
var children = _ref.children,
|
|
8124
8124
|
_ref$intent = _ref.intent,
|
|
@@ -8127,7 +8127,7 @@ var Label = function Label(_ref) {
|
|
|
8127
8127
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
8128
8128
|
_ref$fontStyle = _ref.fontStyle,
|
|
8129
8129
|
fontStyle = _ref$fontStyle === void 0 ? 'normal' : _ref$fontStyle,
|
|
8130
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
8130
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$L);
|
|
8131
8131
|
return /*#__PURE__*/React__default.createElement(StyledLabel$1, _extends$1({}, nativeProps, {
|
|
8132
8132
|
themeIntent: intent,
|
|
8133
8133
|
themeIsItalic: fontStyle === 'italic',
|
|
@@ -8150,7 +8150,7 @@ var StyledTitle$1 = index$c(Text$1)(function (_ref) {
|
|
|
8150
8150
|
};
|
|
8151
8151
|
});
|
|
8152
8152
|
|
|
8153
|
-
var _excluded$
|
|
8153
|
+
var _excluded$K = ["children", "intent", "allowFontScaling", "level", "typeface", "fontStyle"];
|
|
8154
8154
|
var Title = function Title(_ref) {
|
|
8155
8155
|
var children = _ref.children,
|
|
8156
8156
|
_ref$intent = _ref.intent,
|
|
@@ -8163,7 +8163,7 @@ var Title = function Title(_ref) {
|
|
|
8163
8163
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
8164
8164
|
_ref$fontStyle = _ref.fontStyle,
|
|
8165
8165
|
fontStyle = _ref$fontStyle === void 0 ? 'normal' : _ref$fontStyle,
|
|
8166
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
8166
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$K);
|
|
8167
8167
|
return /*#__PURE__*/React__default.createElement(StyledTitle$1, _extends$1({}, nativeProps, {
|
|
8168
8168
|
themeLevel: level,
|
|
8169
8169
|
themeTypeface: typeface,
|
|
@@ -8202,7 +8202,7 @@ var StyledBody$2 = index$c(Text$1)(function (_ref) {
|
|
|
8202
8202
|
};
|
|
8203
8203
|
});
|
|
8204
8204
|
|
|
8205
|
-
var _excluded$
|
|
8205
|
+
var _excluded$J = ["children", "intent", "allowFontScaling", "typeface", "variant", "fontStyle"];
|
|
8206
8206
|
var Body = function Body(_ref) {
|
|
8207
8207
|
var children = _ref.children,
|
|
8208
8208
|
_ref$intent = _ref.intent,
|
|
@@ -8215,7 +8215,7 @@ var Body = function Body(_ref) {
|
|
|
8215
8215
|
variant = _ref$variant === void 0 ? 'regular' : _ref$variant,
|
|
8216
8216
|
_ref$fontStyle = _ref.fontStyle,
|
|
8217
8217
|
fontStyle = _ref$fontStyle === void 0 ? 'normal' : _ref$fontStyle,
|
|
8218
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
8218
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$J);
|
|
8219
8219
|
return /*#__PURE__*/React__default.createElement(StyledBody$2, _extends$1({}, nativeProps, {
|
|
8220
8220
|
themeTypeface: typeface,
|
|
8221
8221
|
themeIntent: intent,
|
|
@@ -8829,10 +8829,10 @@ var StyledHeroIcon = index$c(HeroIcon)(function (_ref) {
|
|
|
8829
8829
|
};
|
|
8830
8830
|
});
|
|
8831
8831
|
|
|
8832
|
-
var _excluded$
|
|
8832
|
+
var _excluded$I = ["style"];
|
|
8833
8833
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
8834
8834
|
var style = _ref.style,
|
|
8835
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
8835
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$I);
|
|
8836
8836
|
var rotateAnimation = useRef(new Animated.Value(0));
|
|
8837
8837
|
useEffect(function () {
|
|
8838
8838
|
var animation = Animated.loop(Animated.timing(rotateAnimation.current, {
|
|
@@ -8937,7 +8937,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
8937
8937
|
}, content));
|
|
8938
8938
|
};
|
|
8939
8939
|
|
|
8940
|
-
var _excluded$
|
|
8940
|
+
var _excluded$H = ["key"];
|
|
8941
8941
|
var Accordion = function Accordion(_ref) {
|
|
8942
8942
|
var items = _ref.items,
|
|
8943
8943
|
activeItemKey = _ref.activeItemKey,
|
|
@@ -8960,7 +8960,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
8960
8960
|
accessible: accessible
|
|
8961
8961
|
}, items.map(function (_ref2, index) {
|
|
8962
8962
|
var key = _ref2.key,
|
|
8963
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
8963
|
+
props = _objectWithoutProperties(_ref2, _excluded$H);
|
|
8964
8964
|
var open = _activeItemKey === key;
|
|
8965
8965
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
8966
8966
|
key: key
|
|
@@ -9796,7 +9796,7 @@ var borderWidths = {
|
|
|
9796
9796
|
var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
|
|
9797
9797
|
var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
|
|
9798
9798
|
|
|
9799
|
-
var _excluded$
|
|
9799
|
+
var _excluded$G = ["theme"];
|
|
9800
9800
|
var getThemeValue = function getThemeValue(theme, key, props) {
|
|
9801
9801
|
var propConfig = config[key];
|
|
9802
9802
|
var propValue = props[key];
|
|
@@ -9823,18 +9823,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
|
|
|
9823
9823
|
var configKeys = Object.keys(config);
|
|
9824
9824
|
var StyledBox = index$c(View)(function (_ref5) {
|
|
9825
9825
|
var theme = _ref5.theme,
|
|
9826
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
9826
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$G);
|
|
9827
9827
|
var styleProps = pick(configKeys, otherProps);
|
|
9828
9828
|
var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
|
|
9829
9829
|
return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
|
|
9830
9830
|
});
|
|
9831
9831
|
|
|
9832
|
-
var _excluded$
|
|
9832
|
+
var _excluded$F = ["children", "style", "testID"];
|
|
9833
9833
|
var Box = function Box(_ref) {
|
|
9834
9834
|
var children = _ref.children,
|
|
9835
9835
|
style = _ref.style,
|
|
9836
9836
|
testID = _ref.testID,
|
|
9837
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
9837
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$F);
|
|
9838
9838
|
return /*#__PURE__*/React__default.createElement(StyledBox, _extends$1({}, otherProps, {
|
|
9839
9839
|
style: style,
|
|
9840
9840
|
testID: testID
|
|
@@ -10101,7 +10101,7 @@ var StyledIcon$4 = index$c(Icon)(function (_ref6) {
|
|
|
10101
10101
|
};
|
|
10102
10102
|
});
|
|
10103
10103
|
|
|
10104
|
-
var _excluded$
|
|
10104
|
+
var _excluded$E = ["children", "visible", "intent", "style", "testID"];
|
|
10105
10105
|
var Status$1 = function Status(_ref) {
|
|
10106
10106
|
var children = _ref.children,
|
|
10107
10107
|
_ref$visible = _ref.visible,
|
|
@@ -10110,7 +10110,7 @@ var Status$1 = function Status(_ref) {
|
|
|
10110
10110
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
10111
10111
|
style = _ref.style,
|
|
10112
10112
|
testID = _ref.testID,
|
|
10113
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
10113
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$E);
|
|
10114
10114
|
var _React$useRef = React__default.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
10115
10115
|
opacity = _React$useRef.current;
|
|
10116
10116
|
var isFirstRendering = React__default.useRef(true);
|
|
@@ -10146,7 +10146,7 @@ var Status$1 = function Status(_ref) {
|
|
|
10146
10146
|
|
|
10147
10147
|
var DEFAULT_MAX_NUMBER = 99;
|
|
10148
10148
|
|
|
10149
|
-
var _excluded$
|
|
10149
|
+
var _excluded$D = ["children", "visible", "style", "max", "testID", "content"];
|
|
10150
10150
|
var Status = function Status(_ref) {
|
|
10151
10151
|
var children = _ref.children,
|
|
10152
10152
|
_ref$visible = _ref.visible,
|
|
@@ -10156,7 +10156,7 @@ var Status = function Status(_ref) {
|
|
|
10156
10156
|
max = _ref$max === void 0 ? DEFAULT_MAX_NUMBER : _ref$max,
|
|
10157
10157
|
testID = _ref.testID,
|
|
10158
10158
|
originalContent = _ref.content,
|
|
10159
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
10159
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$D);
|
|
10160
10160
|
var content = useMemo(function () {
|
|
10161
10161
|
return originalContent > max ? "".concat(max, "+") : String(originalContent);
|
|
10162
10162
|
}, [originalContent, max]);
|
|
@@ -10168,7 +10168,7 @@ var Status = function Status(_ref) {
|
|
|
10168
10168
|
}, /*#__PURE__*/React__default.createElement(StyledCountText, null, content)));
|
|
10169
10169
|
};
|
|
10170
10170
|
|
|
10171
|
-
var _excluded$
|
|
10171
|
+
var _excluded$C = ["content", "visible", "max", "intent", "style", "testID", "size", "variant", "icon"];
|
|
10172
10172
|
var getPaddingState = function getPaddingState(content) {
|
|
10173
10173
|
return content.length > 1 ? 'wideContent' : 'narrowContent';
|
|
10174
10174
|
};
|
|
@@ -10187,7 +10187,7 @@ var Badge = function Badge(_ref) {
|
|
|
10187
10187
|
_ref$variant = _ref.variant,
|
|
10188
10188
|
variant = _ref$variant === void 0 ? 'filled' : _ref$variant,
|
|
10189
10189
|
icon = _ref.icon,
|
|
10190
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
10190
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$C);
|
|
10191
10191
|
var _React$useRef = React__default.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
10192
10192
|
opacity = _React$useRef.current;
|
|
10193
10193
|
var isFirstRendering = React__default.useRef(true);
|
|
@@ -10279,14 +10279,14 @@ var BottomBarItem = index$c(View)({
|
|
|
10279
10279
|
flex: 1,
|
|
10280
10280
|
alignItems: 'center'
|
|
10281
10281
|
});
|
|
10282
|
-
var StyledBottomBarText = index$c(Typography.
|
|
10282
|
+
var StyledBottomBarText = index$c(Typography.Label)(function (_ref3) {
|
|
10283
10283
|
var theme = _ref3.theme;
|
|
10284
10284
|
return {
|
|
10285
10285
|
marginTop: theme.__hd__.bottomNavigation.space.titleMarginTop
|
|
10286
10286
|
};
|
|
10287
10287
|
});
|
|
10288
10288
|
|
|
10289
|
-
var _excluded$
|
|
10289
|
+
var _excluded$B = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
|
|
10290
10290
|
var getInactiveIcon = function getInactiveIcon(icon) {
|
|
10291
10291
|
var inactiveIcon = "".concat(icon, "-outlined");
|
|
10292
10292
|
return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
|
|
@@ -10297,7 +10297,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
10297
10297
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
10298
10298
|
selectedTabKey = _ref.selectedTabKey,
|
|
10299
10299
|
tabs = _ref.tabs,
|
|
10300
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
10300
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$B);
|
|
10301
10301
|
var insets = useSafeAreaInsets();
|
|
10302
10302
|
/**
|
|
10303
10303
|
* List of loaded tabs, tabs will be loaded when navigated to.
|
|
@@ -10354,11 +10354,10 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
10354
10354
|
testID: testID
|
|
10355
10355
|
}, /*#__PURE__*/React__default.createElement(BottomBarItem, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
10356
10356
|
icon: active ? icon : inactiveIcon,
|
|
10357
|
-
intent: active ? 'primary' : '
|
|
10357
|
+
intent: active ? 'primary' : 'muted',
|
|
10358
10358
|
testID: "hero-icon-".concat(icon)
|
|
10359
10359
|
}), !!title && /*#__PURE__*/React__default.createElement(StyledBottomBarText, {
|
|
10360
|
-
|
|
10361
|
-
intent: active ? 'primary' : 'body',
|
|
10360
|
+
intent: active ? 'primary' : 'muted',
|
|
10362
10361
|
numberOfLines: 1
|
|
10363
10362
|
}, title)));
|
|
10364
10363
|
}))));
|
|
@@ -10383,13 +10382,13 @@ var StyledDivider = index$c(View)(function (_ref) {
|
|
|
10383
10382
|
}, horizontalMargin), verticalMargin);
|
|
10384
10383
|
});
|
|
10385
10384
|
|
|
10386
|
-
var _excluded$
|
|
10385
|
+
var _excluded$A = ["marginHorizontal", "marginVertical", "style", "testID"];
|
|
10387
10386
|
var Divider = function Divider(_ref) {
|
|
10388
10387
|
var marginHorizontal = _ref.marginHorizontal,
|
|
10389
10388
|
marginVertical = _ref.marginVertical,
|
|
10390
10389
|
style = _ref.style,
|
|
10391
10390
|
testID = _ref.testID,
|
|
10392
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
10391
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$A);
|
|
10393
10392
|
return /*#__PURE__*/React__default.createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
10394
10393
|
themeMarginHorizontal: marginHorizontal,
|
|
10395
10394
|
themeMarginVertical: marginVertical,
|
|
@@ -10519,7 +10518,7 @@ var StyledLoadingDot = index$c(View)(function (_ref) {
|
|
|
10519
10518
|
}, themeStyling());
|
|
10520
10519
|
});
|
|
10521
10520
|
|
|
10522
|
-
var _excluded$
|
|
10521
|
+
var _excluded$z = ["count", "size", "testID", "themeVariant"];
|
|
10523
10522
|
var AnimatedLoadingIndicatorWrapper = Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
|
|
10524
10523
|
var AnimatedLoadingDot = Animated.createAnimatedComponent(StyledLoadingDot);
|
|
10525
10524
|
var renderDotComponent = function renderDotComponent(_ref) {
|
|
@@ -10551,7 +10550,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
10551
10550
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
10552
10551
|
testID = _ref2.testID,
|
|
10553
10552
|
themeVariant = _ref2.themeVariant,
|
|
10554
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
10553
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$z);
|
|
10555
10554
|
var progressAnimation = useRef(new Animated.Value(0));
|
|
10556
10555
|
useEffect(function () {
|
|
10557
10556
|
var animation = Animated.loop(Animated.timing(progressAnimation.current, {
|
|
@@ -11183,11 +11182,11 @@ var Header = function Header(_ref) {
|
|
|
11183
11182
|
}))) : null), showDivider ? /*#__PURE__*/React__default.createElement(Divider, null) : null);
|
|
11184
11183
|
};
|
|
11185
11184
|
|
|
11186
|
-
var _excluded$
|
|
11185
|
+
var _excluded$y = ["scrollEventThrottle"];
|
|
11187
11186
|
var BottomSheetScrollView = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
11188
11187
|
var _ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
11189
11188
|
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
|
|
11190
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11189
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
11191
11190
|
var _useContext = useContext(BottomSheetContext),
|
|
11192
11191
|
setInternalShowDivider = _useContext.setInternalShowDivider;
|
|
11193
11192
|
var onScrollBeginDrag = useCallback(function (e) {
|
|
@@ -14315,12 +14314,12 @@ var Indicator = index$c(View)(function (_ref3) {
|
|
|
14315
14314
|
};
|
|
14316
14315
|
});
|
|
14317
14316
|
|
|
14318
|
-
var _excluded$
|
|
14317
|
+
var _excluded$x = ["intent", "children"];
|
|
14319
14318
|
var DataCard = function DataCard(_ref) {
|
|
14320
14319
|
var _ref$intent = _ref.intent,
|
|
14321
14320
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
14322
14321
|
children = _ref.children,
|
|
14323
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
14322
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$x);
|
|
14324
14323
|
return /*#__PURE__*/React__default.createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__default.createElement(Indicator, {
|
|
14325
14324
|
themeIntent: intent,
|
|
14326
14325
|
testID: "data-card-indicator"
|
|
@@ -14339,13 +14338,13 @@ var StyledCard$1 = index$c(View)(function (_ref) {
|
|
|
14339
14338
|
});
|
|
14340
14339
|
});
|
|
14341
14340
|
|
|
14342
|
-
var _excluded$
|
|
14341
|
+
var _excluded$w = ["intent", "children", "variant"];
|
|
14343
14342
|
var Card = function Card(_ref) {
|
|
14344
14343
|
var intent = _ref.intent,
|
|
14345
14344
|
children = _ref.children,
|
|
14346
14345
|
_ref$variant = _ref.variant,
|
|
14347
14346
|
variant = _ref$variant === void 0 ? 'basic' : _ref$variant,
|
|
14348
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
14347
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$w);
|
|
14349
14348
|
return /*#__PURE__*/React__default.createElement(StyledCard$1, _extends$1({}, nativeProps, {
|
|
14350
14349
|
themeIntent: intent,
|
|
14351
14350
|
themeVariant: variant
|
|
@@ -14612,7 +14611,7 @@ var CardCarousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
14612
14611
|
});
|
|
14613
14612
|
CardCarousel.displayName = 'CardCarousel';
|
|
14614
14613
|
|
|
14615
|
-
var _excluded$
|
|
14614
|
+
var _excluded$v = ["rounded", "size", "testID", "style"];
|
|
14616
14615
|
/**
|
|
14617
14616
|
* @deprecated Image component will soon be deprecated. Please use `Image` from `react-native` instead.
|
|
14618
14617
|
*/
|
|
@@ -14623,7 +14622,7 @@ var Image = function Image(_ref) {
|
|
|
14623
14622
|
size = _ref$size === void 0 ? '6xlarge' : _ref$size,
|
|
14624
14623
|
testID = _ref.testID,
|
|
14625
14624
|
style = _ref.style,
|
|
14626
|
-
imageNativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
14625
|
+
imageNativeProps = _objectWithoutProperties(_ref, _excluded$v);
|
|
14627
14626
|
useDeprecation('Image component will soon be deprecated. Please use `Image` from `react-native` instead.');
|
|
14628
14627
|
var theme = useTheme();
|
|
14629
14628
|
var imageSize = theme.__hd__.image.sizes[size];
|
|
@@ -14758,7 +14757,7 @@ var CarouselItem = function CarouselItem(_ref) {
|
|
|
14758
14757
|
}, heading), !!body && /*#__PURE__*/React__default.createElement(Typography.Body, null, body)));
|
|
14759
14758
|
};
|
|
14760
14759
|
|
|
14761
|
-
var _excluded$
|
|
14760
|
+
var _excluded$u = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "testID", "pageControlPosition"];
|
|
14762
14761
|
function useStateFromProp(initialValue) {
|
|
14763
14762
|
var _useState = useState(initialValue),
|
|
14764
14763
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -14785,7 +14784,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
14785
14784
|
testID = _ref.testID,
|
|
14786
14785
|
_ref$pageControlPosit = _ref.pageControlPosition,
|
|
14787
14786
|
pageControlPosition = _ref$pageControlPosit === void 0 ? 'top' : _ref$pageControlPosit,
|
|
14788
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
14787
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$u);
|
|
14789
14788
|
useDeprecation("shouldShowPagination prop has been deprecated", shouldShowPagination !== noop$1);
|
|
14790
14789
|
useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition === 'bottom');
|
|
14791
14790
|
var theme = useTheme();
|
|
@@ -20056,7 +20055,7 @@ var StyledChipIcon = index$c(Icon)(function (_ref2) {
|
|
|
20056
20055
|
};
|
|
20057
20056
|
});
|
|
20058
20057
|
|
|
20059
|
-
var _excluded$
|
|
20058
|
+
var _excluded$t = ["label", "variant", "selected", "icon", "onPress", "showSelectedIcon", "accessible"];
|
|
20060
20059
|
var getChipLabel = function getChipLabel(label) {
|
|
20061
20060
|
if (typeof label === 'string') {
|
|
20062
20061
|
return /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
@@ -20090,7 +20089,7 @@ var Chip = function Chip(_ref) {
|
|
|
20090
20089
|
_ref$showSelectedIcon = _ref.showSelectedIcon,
|
|
20091
20090
|
showSelectedIcon = _ref$showSelectedIcon === void 0 ? true : _ref$showSelectedIcon,
|
|
20092
20091
|
accessible = _ref.accessible,
|
|
20093
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
20092
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$t);
|
|
20094
20093
|
useDeprecation('Chip variant `outlined` and `filled` are deprecated.', variant === 'outlined' || variant === 'filled');
|
|
20095
20094
|
var renamedVariant = getChipVariant(variant);
|
|
20096
20095
|
var shouldShowSelectedIcon = (renamedVariant === 'selection' || renamedVariant === 'compact-outlined') && selected && showSelectedIcon;
|
|
@@ -20443,7 +20442,7 @@ var StyledErrorAndMaxLengthContainer = index$c(View)(function (_ref12) {
|
|
|
20443
20442
|
};
|
|
20444
20443
|
});
|
|
20445
20444
|
|
|
20446
|
-
var _excluded$
|
|
20445
|
+
var _excluded$s = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "hideCharacterCount", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling", "variant"];
|
|
20447
20446
|
var getState$3 = function getState(_ref) {
|
|
20448
20447
|
var disabled = _ref.disabled,
|
|
20449
20448
|
error = _ref.error,
|
|
@@ -20562,7 +20561,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
20562
20561
|
allowFontScaling = _ref8$allowFontScalin === void 0 ? false : _ref8$allowFontScalin,
|
|
20563
20562
|
_ref8$variant = _ref8.variant,
|
|
20564
20563
|
variant = _ref8$variant === void 0 ? 'text' : _ref8$variant,
|
|
20565
|
-
nativeProps = _objectWithoutProperties(_ref8, _excluded$
|
|
20564
|
+
nativeProps = _objectWithoutProperties(_ref8, _excluded$s);
|
|
20566
20565
|
var displayText = getDisplayText(value, defaultValue);
|
|
20567
20566
|
var isEmptyValue = displayText.length === 0;
|
|
20568
20567
|
var _React$useState = React__default.useState({
|
|
@@ -21341,13 +21340,13 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
21341
21340
|
}));
|
|
21342
21341
|
};
|
|
21343
21342
|
|
|
21344
|
-
var _excluded$
|
|
21343
|
+
var _excluded$r = ["variant", "TextInputComponent"];
|
|
21345
21344
|
var DatePicker = function DatePicker(_ref) {
|
|
21346
21345
|
var _ref$variant = _ref.variant,
|
|
21347
21346
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
21348
21347
|
_ref$TextInputCompone = _ref.TextInputComponent,
|
|
21349
21348
|
TextInputComponent = _ref$TextInputCompone === void 0 ? TextInput : _ref$TextInputCompone,
|
|
21350
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
21349
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
21351
21350
|
if (variant === 'calendar') {
|
|
21352
21351
|
return /*#__PURE__*/React__default.createElement(DatePickerCalendar, _extends$1({}, props, {
|
|
21353
21352
|
TextInputComponent: TextInputComponent
|
|
@@ -23213,15 +23212,16 @@ var Portal$1 = Object.assign(Portal, {
|
|
|
23213
23212
|
Host: PortalHost
|
|
23214
23213
|
});
|
|
23215
23214
|
|
|
23216
|
-
var _excluded$r = ["visible"];
|
|
23217
23215
|
var DEFAULT_BACKDROP_OPACITY = 0.4;
|
|
23218
23216
|
var DEFAULT_ANIMATION_CONFIG = {
|
|
23219
23217
|
easing: Easing.inOut(Easing.cubic),
|
|
23220
23218
|
useNativeDriver: Platform.OS !== 'web',
|
|
23221
23219
|
duration: 400
|
|
23222
23220
|
};
|
|
23223
|
-
var Modal =
|
|
23221
|
+
var Modal = function Modal(_ref) {
|
|
23224
23222
|
var children = _ref.children,
|
|
23223
|
+
_ref$visible = _ref.visible,
|
|
23224
|
+
visible = _ref$visible === void 0 ? true : _ref$visible,
|
|
23225
23225
|
onShow = _ref.onShow,
|
|
23226
23226
|
onRequestClose = _ref.onRequestClose,
|
|
23227
23227
|
testID = _ref.testID,
|
|
@@ -23233,56 +23233,58 @@ var Modal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
23233
23233
|
var theme = useTheme();
|
|
23234
23234
|
var animatedBackdropValue = useRef(new Animated.Value(0)).current;
|
|
23235
23235
|
var animatedModalValue = useRef(new Animated.Value(0)).current;
|
|
23236
|
-
|
|
23237
|
-
|
|
23238
|
-
|
|
23239
|
-
|
|
23240
|
-
|
|
23241
|
-
|
|
23242
|
-
|
|
23243
|
-
|
|
23244
|
-
|
|
23245
|
-
|
|
23246
|
-
|
|
23247
|
-
|
|
23248
|
-
|
|
23249
|
-
|
|
23250
|
-
|
|
23251
|
-
|
|
23252
|
-
|
|
23253
|
-
|
|
23254
|
-
|
|
23255
|
-
|
|
23256
|
-
inputRange: [0, 1],
|
|
23257
|
-
outputRange: [0, DEFAULT_BACKDROP_OPACITY]
|
|
23258
|
-
});
|
|
23259
|
-
var modalAnimation = animatedModalValue.interpolate({
|
|
23260
|
-
inputRange: [0, 1],
|
|
23261
|
-
outputRange: animationType === 'slide' ? [Dimensions.get('window').height, 0] : [0, 1]
|
|
23262
|
-
});
|
|
23263
|
-
useImperativeHandle(ref, function () {
|
|
23264
|
-
return {
|
|
23265
|
-
show: function show() {
|
|
23266
|
-
animateBackdropAndContent({
|
|
23267
|
-
toValue: 1,
|
|
23268
|
-
callback: onShow
|
|
23236
|
+
var _useState = useState(visible),
|
|
23237
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
23238
|
+
mounted = _useState2[0],
|
|
23239
|
+
setMounted = _useState2[1];
|
|
23240
|
+
var previousVisible = useRef(false);
|
|
23241
|
+
// Animate in/out based on visible prop
|
|
23242
|
+
useEffect(function () {
|
|
23243
|
+
if (visible && !previousVisible.current) {
|
|
23244
|
+
// Show animation
|
|
23245
|
+
setMounted(true);
|
|
23246
|
+
if (animationType !== 'none') {
|
|
23247
|
+
if (!transparent) {
|
|
23248
|
+
Animated.timing(animatedBackdropValue, _objectSpread2({
|
|
23249
|
+
toValue: 1
|
|
23250
|
+
}, DEFAULT_ANIMATION_CONFIG)).start();
|
|
23251
|
+
}
|
|
23252
|
+
Animated.timing(animatedModalValue, _objectSpread2({
|
|
23253
|
+
toValue: 1
|
|
23254
|
+
}, DEFAULT_ANIMATION_CONFIG)).start(function () {
|
|
23255
|
+
onShow === null || onShow === void 0 || onShow();
|
|
23269
23256
|
});
|
|
23270
|
-
}
|
|
23271
|
-
|
|
23272
|
-
|
|
23273
|
-
|
|
23274
|
-
|
|
23275
|
-
|
|
23276
|
-
|
|
23277
|
-
|
|
23278
|
-
|
|
23257
|
+
} else {
|
|
23258
|
+
onShow === null || onShow === void 0 || onShow();
|
|
23259
|
+
}
|
|
23260
|
+
} else if (!visible && previousVisible.current) {
|
|
23261
|
+
// Hide animation
|
|
23262
|
+
if (animationType !== 'none') {
|
|
23263
|
+
if (!transparent) {
|
|
23264
|
+
Animated.timing(animatedBackdropValue, _objectSpread2({
|
|
23265
|
+
toValue: 0
|
|
23266
|
+
}, DEFAULT_ANIMATION_CONFIG)).start();
|
|
23267
|
+
}
|
|
23268
|
+
Animated.timing(animatedModalValue, _objectSpread2({
|
|
23269
|
+
toValue: 0
|
|
23270
|
+
}, DEFAULT_ANIMATION_CONFIG)).start(function () {
|
|
23271
|
+
setMounted(false);
|
|
23272
|
+
if (Platform.OS === 'ios') {
|
|
23273
|
+
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
23279
23274
|
}
|
|
23280
23275
|
});
|
|
23276
|
+
} else {
|
|
23277
|
+
setMounted(false);
|
|
23278
|
+
if (Platform.OS === 'ios') {
|
|
23279
|
+
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
23280
|
+
}
|
|
23281
23281
|
}
|
|
23282
|
-
}
|
|
23283
|
-
|
|
23282
|
+
}
|
|
23283
|
+
previousVisible.current = visible;
|
|
23284
|
+
}, [visible, animationType, transparent, onShow, onDismiss]);
|
|
23284
23285
|
// Back button handler
|
|
23285
23286
|
useEffect(function () {
|
|
23287
|
+
if (!visible) return;
|
|
23286
23288
|
var backHandler = BackHandler.addEventListener('hardwareBackPress', function () {
|
|
23287
23289
|
onRequestClose === null || onRequestClose === void 0 || onRequestClose();
|
|
23288
23290
|
return true;
|
|
@@ -23290,7 +23292,18 @@ var Modal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
23290
23292
|
return function () {
|
|
23291
23293
|
return backHandler.remove();
|
|
23292
23294
|
};
|
|
23293
|
-
}, [onRequestClose]);
|
|
23295
|
+
}, [visible, onRequestClose]);
|
|
23296
|
+
var backdropOpacityAnimation = animatedBackdropValue.interpolate({
|
|
23297
|
+
inputRange: [0, 1],
|
|
23298
|
+
outputRange: [0, DEFAULT_BACKDROP_OPACITY]
|
|
23299
|
+
});
|
|
23300
|
+
var modalAnimation = animatedModalValue.interpolate({
|
|
23301
|
+
inputRange: [0, 1],
|
|
23302
|
+
outputRange: animationType === 'slide' ? [Dimensions.get('window').height, 0] : [0, 1]
|
|
23303
|
+
});
|
|
23304
|
+
if (!visible && !mounted) {
|
|
23305
|
+
return null;
|
|
23306
|
+
}
|
|
23294
23307
|
return /*#__PURE__*/React__default.createElement(Portal$1, null, /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
23295
23308
|
style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
23296
23309
|
backgroundColor: transparent ? 'transparent' : theme.colors.overlayGlobalSurface,
|
|
@@ -23305,39 +23318,9 @@ var Modal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
23305
23318
|
}]
|
|
23306
23319
|
})
|
|
23307
23320
|
}, children));
|
|
23308
|
-
});
|
|
23309
|
-
var ModalWrapper = function ModalWrapper(_ref3) {
|
|
23310
|
-
var _ref3$visible = _ref3.visible,
|
|
23311
|
-
visible = _ref3$visible === void 0 ? true : _ref3$visible,
|
|
23312
|
-
props = _objectWithoutProperties(_ref3, _excluded$r);
|
|
23313
|
-
var modalRef = useRef(null);
|
|
23314
|
-
var _useState = useState(visible),
|
|
23315
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
23316
|
-
internalVisible = _useState2[0],
|
|
23317
|
-
setInternalVisible = _useState2[1];
|
|
23318
|
-
useEffect(function () {
|
|
23319
|
-
if (visible) {
|
|
23320
|
-
setInternalVisible(true);
|
|
23321
|
-
} else {
|
|
23322
|
-
var _modalRef$current;
|
|
23323
|
-
// Wait for animation to finish before hiding the modal
|
|
23324
|
-
(_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 || _modalRef$current.hide(function () {
|
|
23325
|
-
return setInternalVisible(false);
|
|
23326
|
-
});
|
|
23327
|
-
}
|
|
23328
|
-
}, [visible]);
|
|
23329
|
-
useEffect(function () {
|
|
23330
|
-
if (internalVisible) {
|
|
23331
|
-
var _modalRef$current2;
|
|
23332
|
-
(_modalRef$current2 = modalRef.current) === null || _modalRef$current2 === void 0 || _modalRef$current2.show();
|
|
23333
|
-
}
|
|
23334
|
-
}, [internalVisible]);
|
|
23335
|
-
return internalVisible ? /*#__PURE__*/React__default.createElement(Modal, _extends$1({
|
|
23336
|
-
ref: modalRef
|
|
23337
|
-
}, props)) : null;
|
|
23338
23321
|
};
|
|
23339
23322
|
|
|
23340
|
-
var StyledErrorModal = index$c(
|
|
23323
|
+
var StyledErrorModal = index$c(Modal)({
|
|
23341
23324
|
height: '100%',
|
|
23342
23325
|
width: '100%'
|
|
23343
23326
|
});
|
|
@@ -26744,7 +26727,7 @@ var StyledSuccessButtonSecondary = index$c(CompoundButton)(function (_ref10) {
|
|
|
26744
26727
|
marginTop: theme.__hd__.success.space.button.secondaryCTAMarginTop
|
|
26745
26728
|
};
|
|
26746
26729
|
});
|
|
26747
|
-
var StyledSuccessModal = index$c(
|
|
26730
|
+
var StyledSuccessModal = index$c(Modal)({
|
|
26748
26731
|
height: '100%',
|
|
26749
26732
|
width: '100%'
|
|
26750
26733
|
});
|
|
@@ -27488,10 +27471,10 @@ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
|
|
|
27488
27471
|
badge = tab.badge;
|
|
27489
27472
|
var active = selectedIndex === index;
|
|
27490
27473
|
var activeAnimated = tabsAnims[index];
|
|
27491
|
-
var outlineScale =
|
|
27474
|
+
var outlineScale = activeAnimated.interpolate({
|
|
27492
27475
|
inputRange: [0, 1],
|
|
27493
27476
|
outputRange: [0.5, 1]
|
|
27494
|
-
})
|
|
27477
|
+
});
|
|
27495
27478
|
var inactiveItem = originalInactiveItem !== null && originalInactiveItem !== void 0 ? originalInactiveItem : activeItem;
|
|
27496
27479
|
var tabItem = getTabItem$1({
|
|
27497
27480
|
item: active ? activeItem : inactiveItem,
|