@hero-design/rn 8.12.5-alpha.1 → 8.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +9 -9
- package/.turbo/turbo-publish:npm.log +0 -9
- package/es/index.js +286 -74
- package/lib/index.js +286 -73
- package/package.json +5 -5
- package/src/components/Error/StyledError.tsx +86 -0
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +343 -0
- package/src/components/Error/__tests__/index.spec.tsx +74 -0
- package/src/components/Error/index.tsx +215 -0
- package/src/components/Tabs/ScrollableTabs.tsx +167 -208
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +11 -58
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +30 -0
- package/src/theme/components/error.ts +40 -0
- package/src/theme/getTheme.ts +3 -0
- package/src/types.ts +0 -2
- package/types/components/Accordion/AccordionItem.d.ts +0 -0
- package/types/components/Accordion/StyledAccordion.d.ts +0 -0
- package/types/components/Accordion/index.d.ts +0 -0
- package/types/components/Alert/StyledAlert.d.ts +0 -0
- package/types/components/Alert/index.d.ts +0 -0
- package/types/components/Attachment/StyledAttachment.d.ts +0 -0
- package/types/components/Attachment/index.d.ts +0 -0
- package/types/components/Avatar/Avatar.d.ts +0 -0
- package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +0 -0
- package/types/components/Avatar/AvatarStack/index.d.ts +0 -0
- package/types/components/Avatar/AvatarStack/utils.d.ts +0 -0
- package/types/components/Avatar/StyledAvatar.d.ts +0 -0
- package/types/components/Avatar/index.d.ts +0 -0
- package/types/components/Badge/Status.d.ts +0 -0
- package/types/components/Badge/StyledBadge.d.ts +0 -0
- package/types/components/Badge/index.d.ts +0 -0
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
- package/types/components/BottomNavigation/index.d.ts +0 -0
- package/types/components/BottomSheet/BottomSheetContext.d.ts +0 -0
- package/types/components/BottomSheet/Footer.d.ts +0 -0
- package/types/components/BottomSheet/Header.d.ts +0 -0
- package/types/components/BottomSheet/ScrollView.d.ts +0 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -0
- package/types/components/BottomSheet/index.d.ts +0 -0
- package/types/components/Box/StyledBox.d.ts +0 -0
- package/types/components/Box/config.d.ts +0 -0
- package/types/components/Box/index.d.ts +0 -0
- package/types/components/Box/types.d.ts +0 -0
- package/types/components/Button/Button.d.ts +0 -0
- package/types/components/Button/IconButton.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/index.d.ts +0 -0
- package/types/components/Button/StyledButton.d.ts +0 -0
- package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +0 -0
- package/types/components/Button/UtilityButton/index.d.ts +0 -0
- package/types/components/Button/index.d.ts +0 -0
- package/types/components/Calendar/CalendarRowItem.d.ts +0 -0
- package/types/components/Calendar/StyledCalendar.d.ts +0 -0
- package/types/components/Calendar/helpers.d.ts +0 -0
- package/types/components/Calendar/index.d.ts +0 -0
- package/types/components/Card/DataCard/StyledDataCard.d.ts +0 -0
- package/types/components/Card/DataCard/index.d.ts +0 -0
- package/types/components/Card/StyledCard.d.ts +0 -0
- package/types/components/Card/index.d.ts +0 -0
- package/types/components/Carousel/CardCarousel.d.ts +0 -0
- package/types/components/Carousel/CarouselItem.d.ts +0 -0
- package/types/components/Carousel/StyledCardCarousel.d.ts +0 -0
- package/types/components/Carousel/StyledCarousel.d.ts +0 -0
- package/types/components/Carousel/contants.d.ts +0 -0
- package/types/components/Carousel/index.d.ts +0 -0
- package/types/components/Carousel/types.d.ts +0 -0
- package/types/components/Checkbox/StyledCheckbox.d.ts +0 -0
- package/types/components/Checkbox/index.d.ts +0 -0
- package/types/components/Collapse/StyledCollapse.d.ts +0 -0
- package/types/components/Collapse/index.d.ts +0 -0
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +0 -0
- package/types/components/ContentNavigator/index.d.ts +0 -0
- package/types/components/DatePicker/DatePickerAndroid.d.ts +0 -0
- package/types/components/DatePicker/DatePickerIOS.d.ts +0 -0
- package/types/components/DatePicker/StyledDatePicker.d.ts +0 -0
- package/types/components/DatePicker/index.d.ts +0 -0
- package/types/components/DatePicker/types.d.ts +0 -0
- package/types/components/Divider/StyledDivider.d.ts +0 -0
- package/types/components/Divider/index.d.ts +0 -0
- package/types/components/Drawer/DragableDrawer/helpers.d.ts +0 -0
- package/types/components/Drawer/DragableDrawer/index.d.ts +0 -0
- package/types/components/Drawer/StyledDrawer.d.ts +0 -0
- package/types/components/Drawer/index.d.ts +0 -0
- package/types/components/Empty/StyledEmpty.d.ts +0 -0
- package/types/components/Empty/index.d.ts +0 -0
- package/types/components/Error/StyledError.d.ts +54 -0
- package/types/components/Error/index.d.ts +55 -0
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -0
- package/types/components/FAB/ActionGroup/index.d.ts +0 -0
- package/types/components/FAB/AnimatedFABIcon.d.ts +0 -0
- package/types/components/FAB/FAB.d.ts +0 -0
- package/types/components/FAB/StyledFAB.d.ts +0 -0
- package/types/components/FAB/index.d.ts +0 -0
- package/types/components/Icon/AnimatedIcon.d.ts +0 -0
- package/types/components/Icon/HeroIcon/index.d.ts +0 -0
- package/types/components/Icon/IconList.d.ts +0 -0
- package/types/components/Icon/index.d.ts +0 -0
- package/types/components/Icon/utils.d.ts +0 -0
- package/types/components/Image/index.d.ts +0 -0
- package/types/components/List/BasicListItem.d.ts +0 -0
- package/types/components/List/ListItem.d.ts +0 -0
- package/types/components/List/StyledBasicListItem.d.ts +0 -0
- package/types/components/List/StyledListItem.d.ts +0 -0
- package/types/components/List/index.d.ts +0 -0
- package/types/components/PageControl/StyledPageControl.d.ts +0 -0
- package/types/components/PageControl/index.d.ts +0 -0
- package/types/components/PinInput/PinCell.d.ts +0 -0
- package/types/components/PinInput/StyledPinInput.d.ts +0 -0
- package/types/components/PinInput/index.d.ts +0 -0
- package/types/components/Progress/ProgressBar.d.ts +0 -0
- package/types/components/Progress/ProgressCircle.d.ts +0 -0
- package/types/components/Progress/StyledProgressBar.d.ts +0 -0
- package/types/components/Progress/StyledProgressCircle.d.ts +0 -0
- package/types/components/Progress/__tests__/index.spec.d.ts +0 -0
- package/types/components/Progress/constants.d.ts +0 -0
- package/types/components/Progress/index.d.ts +0 -0
- package/types/components/Progress/types.d.ts +0 -0
- package/types/components/Radio/Radio.d.ts +0 -0
- package/types/components/Radio/RadioGroup.d.ts +0 -0
- package/types/components/Radio/StyledRadio.d.ts +0 -0
- package/types/components/Radio/index.d.ts +0 -0
- package/types/components/Radio/types.d.ts +0 -0
- package/types/components/RefreshControl/index.d.ts +0 -0
- package/types/components/RichTextEditor/EditorEvent.d.ts +0 -0
- package/types/components/RichTextEditor/EditorToolbar.d.ts +0 -0
- package/types/components/RichTextEditor/MentionList.d.ts +0 -0
- package/types/components/RichTextEditor/RichTextEditor.d.ts +0 -0
- package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +0 -0
- package/types/components/RichTextEditor/StyledToolbar.d.ts +0 -0
- package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +0 -0
- package/types/components/RichTextEditor/constants.d.ts +0 -0
- package/types/components/RichTextEditor/heroEditorApp.d.ts +0 -0
- package/types/components/RichTextEditor/index.d.ts +0 -0
- package/types/components/RichTextEditor/types.d.ts +0 -0
- package/types/components/RichTextEditor/utils/events.d.ts +0 -0
- package/types/components/RichTextEditor/utils/rnWebView.d.ts +0 -0
- package/types/components/SectionHeading/StyledHeading.d.ts +0 -0
- package/types/components/SectionHeading/index.d.ts +0 -0
- package/types/components/Select/BaseOptionList.d.ts +0 -0
- package/types/components/Select/Footer.d.ts +0 -0
- package/types/components/Select/MultiSelect/Option.d.ts +0 -0
- package/types/components/Select/MultiSelect/OptionList.d.ts +0 -0
- package/types/components/Select/MultiSelect/index.d.ts +0 -0
- package/types/components/Select/SingleSelect/Option.d.ts +0 -0
- package/types/components/Select/SingleSelect/OptionList.d.ts +0 -0
- package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +0 -0
- package/types/components/Select/SingleSelect/index.d.ts +0 -0
- package/types/components/Select/StyledSelect.d.ts +0 -0
- package/types/components/Select/helpers.d.ts +0 -0
- package/types/components/Select/index.d.ts +0 -0
- package/types/components/Select/types.d.ts +0 -0
- package/types/components/Slider/index.d.ts +0 -0
- package/types/components/Spinner/AnimatedSpinner.d.ts +0 -0
- package/types/components/Spinner/StyledSpinner.d.ts +0 -0
- package/types/components/Spinner/index.d.ts +0 -0
- package/types/components/Swipeable/StyledSwipeable.d.ts +0 -0
- package/types/components/Swipeable/SwipeableAction.d.ts +0 -0
- package/types/components/Swipeable/index.d.ts +0 -0
- package/types/components/Switch/SelectorSwitch/Option.d.ts +0 -0
- package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +0 -0
- package/types/components/Switch/SelectorSwitch/index.d.ts +0 -0
- package/types/components/Switch/StyledSwitch.d.ts +0 -0
- package/types/components/Switch/index.d.ts +0 -0
- package/types/components/Tabs/ActiveTabIndicator.d.ts +0 -0
- package/types/components/Tabs/ScrollableTabs.d.ts +1 -8
- package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -0
- package/types/components/Tabs/StyledTabs.d.ts +0 -0
- package/types/components/Tabs/TabWithBadge.d.ts +0 -0
- package/types/components/Tabs/index.d.ts +1 -2
- package/types/components/Tabs/utils.d.ts +0 -0
- package/types/components/Tag/StyledTag.d.ts +0 -0
- package/types/components/Tag/index.d.ts +0 -0
- package/types/components/TextInput/StyledTextInput.d.ts +0 -0
- package/types/components/TextInput/index.d.ts +0 -0
- package/types/components/TimePicker/StyledTimePicker.d.ts +0 -0
- package/types/components/TimePicker/TimePickerAndroid.d.ts +0 -0
- package/types/components/TimePicker/TimePickerIOS.d.ts +0 -0
- package/types/components/TimePicker/index.d.ts +0 -0
- package/types/components/TimePicker/types.d.ts +0 -0
- package/types/components/Toast/StyledToast.d.ts +0 -0
- package/types/components/Toast/Toast.d.ts +0 -0
- package/types/components/Toast/ToastContainer.d.ts +0 -0
- package/types/components/Toast/ToastContext.d.ts +0 -0
- package/types/components/Toast/ToastProvider.d.ts +0 -0
- package/types/components/Toast/index.d.ts +0 -0
- package/types/components/Toast/types.d.ts +0 -0
- package/types/components/Toolbar/StyledToolbar.d.ts +0 -0
- package/types/components/Toolbar/ToolbarGroup.d.ts +0 -0
- package/types/components/Toolbar/ToolbarItem.d.ts +0 -0
- package/types/components/Toolbar/index.d.ts +0 -0
- package/types/components/Typography/Text/StyledText.d.ts +0 -0
- package/types/components/Typography/Text/index.d.ts +0 -0
- package/types/components/Typography/index.d.ts +0 -0
- package/types/index.d.ts +2 -1
- package/types/testHelpers/renderWithTheme.d.ts +0 -0
- package/types/theme/ThemeProvider.d.ts +0 -0
- package/types/theme/ThemeSwitcher.d.ts +0 -0
- package/types/theme/components/accordion.d.ts +0 -0
- package/types/theme/components/alert.d.ts +0 -0
- package/types/theme/components/attachment.d.ts +0 -0
- package/types/theme/components/avatar.d.ts +0 -0
- package/types/theme/components/badge.d.ts +0 -0
- package/types/theme/components/bottomNavigation.d.ts +0 -0
- package/types/theme/components/bottomSheet.d.ts +0 -0
- package/types/theme/components/button.d.ts +0 -0
- package/types/theme/components/calendar.d.ts +0 -0
- package/types/theme/components/card.d.ts +0 -0
- package/types/theme/components/cardCarousel.d.ts +0 -0
- package/types/theme/components/carousel.d.ts +0 -0
- package/types/theme/components/checkbox.d.ts +0 -0
- package/types/theme/components/contentNavigator.d.ts +0 -0
- package/types/theme/components/datePicker.d.ts +0 -0
- package/types/theme/components/divider.d.ts +0 -0
- package/types/theme/components/drawer.d.ts +0 -0
- package/types/theme/components/empty.d.ts +0 -0
- package/types/theme/components/error.d.ts +32 -0
- package/types/theme/components/fab.d.ts +0 -0
- package/types/theme/components/icon.d.ts +0 -0
- package/types/theme/components/image.d.ts +0 -0
- package/types/theme/components/list.d.ts +0 -0
- package/types/theme/components/pageControl.d.ts +0 -0
- package/types/theme/components/pinInput.d.ts +0 -0
- package/types/theme/components/progress.d.ts +0 -0
- package/types/theme/components/radio.d.ts +0 -0
- package/types/theme/components/refreshControl.d.ts +0 -0
- package/types/theme/components/richTextEditor.d.ts +0 -0
- package/types/theme/components/sectionHeading.d.ts +0 -0
- package/types/theme/components/select.d.ts +0 -0
- package/types/theme/components/slider.d.ts +0 -0
- package/types/theme/components/spinner.d.ts +0 -0
- package/types/theme/components/swipeable.d.ts +0 -0
- package/types/theme/components/switch.d.ts +0 -0
- package/types/theme/components/tabs.d.ts +0 -0
- package/types/theme/components/tag.d.ts +0 -0
- package/types/theme/components/textInput.d.ts +0 -0
- package/types/theme/components/timePicker.d.ts +0 -0
- package/types/theme/components/toast.d.ts +0 -0
- package/types/theme/components/toolbar.d.ts +0 -0
- package/types/theme/components/typography.d.ts +0 -0
- package/types/theme/getTheme.d.ts +2 -0
- package/types/theme/global/borders.d.ts +0 -0
- package/types/theme/global/colors/eBens.d.ts +0 -0
- package/types/theme/global/colors/global.d.ts +0 -0
- package/types/theme/global/colors/globalDark.d.ts +0 -0
- package/types/theme/global/colors/jobs.d.ts +0 -0
- package/types/theme/global/colors/swag.d.ts +0 -0
- package/types/theme/global/colors/swagDark.d.ts +0 -0
- package/types/theme/global/colors/types.d.ts +0 -0
- package/types/theme/global/colors/wallet.d.ts +0 -0
- package/types/theme/global/colors/work.d.ts +0 -0
- package/types/theme/global/index.d.ts +0 -0
- package/types/theme/global/scale.d.ts +0 -0
- package/types/theme/global/sizes.d.ts +0 -0
- package/types/theme/global/space.d.ts +0 -0
- package/types/theme/global/typography.d.ts +0 -0
- package/types/theme/index.d.ts +0 -0
- package/types/types.d.ts +1 -2
- package/types/utils/functions.d.ts +0 -0
- package/types/utils/helpers.d.ts +0 -0
- package/types/utils/hooks.d.ts +0 -0
- package/types/utils/scale.d.ts +0 -0
- package/.turbo/turbo-build:types.log +0 -2
- package/.turbo/turbo-lint.log +0 -149
package/lib/index.js
CHANGED
|
@@ -2193,6 +2193,44 @@ var getEmptyTheme = function getEmptyTheme(theme) {
|
|
|
2193
2193
|
};
|
|
2194
2194
|
};
|
|
2195
2195
|
|
|
2196
|
+
var getErrorTheme = function getErrorTheme(theme) {
|
|
2197
|
+
var space = {
|
|
2198
|
+
titleMarginBottom: theme.space.small,
|
|
2199
|
+
imageMarginBottom: theme.space.xlarge,
|
|
2200
|
+
wrapperPadding: theme.space.large,
|
|
2201
|
+
button: {
|
|
2202
|
+
wrapperHorizontalPadding: theme.space.medium,
|
|
2203
|
+
wrapperVerticalPadding: theme.space.xxxlarge,
|
|
2204
|
+
margin: theme.space.medium,
|
|
2205
|
+
padding: theme.space.medium
|
|
2206
|
+
}
|
|
2207
|
+
};
|
|
2208
|
+
var sizes = {
|
|
2209
|
+
image: theme.sizes['19xlarge']
|
|
2210
|
+
};
|
|
2211
|
+
var colors = {
|
|
2212
|
+
title: theme.colors.onDefaultGlobalSurface,
|
|
2213
|
+
description: theme.colors.mutedOnDefaultGlobalSurface,
|
|
2214
|
+
fullScreenBackground: theme.colors.decorativePrimarySurface,
|
|
2215
|
+
inPageBackground: theme.colors.neutralGlobalSurface
|
|
2216
|
+
};
|
|
2217
|
+
var fontSizes = {
|
|
2218
|
+
title: theme.fontSizes.xxxlarge,
|
|
2219
|
+
description: theme.fontSizes.xlarge
|
|
2220
|
+
};
|
|
2221
|
+
var fonts = {
|
|
2222
|
+
title: theme.fonts.playful.semiBold,
|
|
2223
|
+
description: theme.fonts.playful.regular
|
|
2224
|
+
};
|
|
2225
|
+
return {
|
|
2226
|
+
fontSizes: fontSizes,
|
|
2227
|
+
colors: colors,
|
|
2228
|
+
sizes: sizes,
|
|
2229
|
+
space: space,
|
|
2230
|
+
fonts: fonts
|
|
2231
|
+
};
|
|
2232
|
+
};
|
|
2233
|
+
|
|
2196
2234
|
var getFABTheme = function getFABTheme(theme) {
|
|
2197
2235
|
var colors = {
|
|
2198
2236
|
buttonBackground: theme.colors.primary,
|
|
@@ -2973,6 +3011,7 @@ var getTheme$1 = function getTheme() {
|
|
|
2973
3011
|
divider: getDividerTheme(globalTheme),
|
|
2974
3012
|
drawer: getDrawerTheme(globalTheme),
|
|
2975
3013
|
empty: getEmptyTheme(globalTheme),
|
|
3014
|
+
error: getErrorTheme(globalTheme),
|
|
2976
3015
|
fab: getFABTheme(globalTheme),
|
|
2977
3016
|
icon: getIconTheme(globalTheme),
|
|
2978
3017
|
image: getImageTheme(globalTheme),
|
|
@@ -6007,7 +6046,7 @@ var StyledText$3 = index$a(reactNative.Text)(function (_ref) {
|
|
|
6007
6046
|
});
|
|
6008
6047
|
});
|
|
6009
6048
|
|
|
6010
|
-
var _excluded$
|
|
6049
|
+
var _excluded$q = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
|
|
6011
6050
|
var Text = function Text(_ref) {
|
|
6012
6051
|
var children = _ref.children,
|
|
6013
6052
|
_ref$fontSize = _ref.fontSize,
|
|
@@ -6020,7 +6059,7 @@ var Text = function Text(_ref) {
|
|
|
6020
6059
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
6021
6060
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6022
6061
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6023
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
6062
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$q);
|
|
6024
6063
|
return /*#__PURE__*/React__default["default"].createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
6025
6064
|
themeFontSize: fontSize,
|
|
6026
6065
|
themeFontWeight: fontWeight,
|
|
@@ -6527,10 +6566,10 @@ var StyledHeroIcon = index$a(HeroIcon)(function (_ref) {
|
|
|
6527
6566
|
};
|
|
6528
6567
|
});
|
|
6529
6568
|
|
|
6530
|
-
var _excluded$
|
|
6569
|
+
var _excluded$p = ["style"];
|
|
6531
6570
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
6532
6571
|
var style = _ref.style,
|
|
6533
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
6572
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$p);
|
|
6534
6573
|
var rotateAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
6535
6574
|
React.useEffect(function () {
|
|
6536
6575
|
var animation = reactNative.Animated.loop(reactNative.Animated.timing(rotateAnimation.current, {
|
|
@@ -6636,7 +6675,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
6636
6675
|
}, content));
|
|
6637
6676
|
};
|
|
6638
6677
|
|
|
6639
|
-
var _excluded$
|
|
6678
|
+
var _excluded$o = ["key"];
|
|
6640
6679
|
var Accordion = function Accordion(_ref) {
|
|
6641
6680
|
var items = _ref.items,
|
|
6642
6681
|
activeItemKey = _ref.activeItemKey,
|
|
@@ -6657,7 +6696,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
6657
6696
|
testID: testID
|
|
6658
6697
|
}, items.map(function (_ref2, index) {
|
|
6659
6698
|
var key = _ref2.key,
|
|
6660
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
6699
|
+
props = _objectWithoutProperties(_ref2, _excluded$o);
|
|
6661
6700
|
var open = _activeItemKey === key;
|
|
6662
6701
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
6663
6702
|
key: key
|
|
@@ -7043,7 +7082,7 @@ var StyledStatus = index$a(reactNative.Animated.View)(function (_ref3) {
|
|
|
7043
7082
|
};
|
|
7044
7083
|
});
|
|
7045
7084
|
|
|
7046
|
-
var _excluded$
|
|
7085
|
+
var _excluded$n = ["children", "visible", "intent", "style", "testID"];
|
|
7047
7086
|
var Status = function Status(_ref) {
|
|
7048
7087
|
var children = _ref.children,
|
|
7049
7088
|
_ref$visible = _ref.visible,
|
|
@@ -7052,7 +7091,7 @@ var Status = function Status(_ref) {
|
|
|
7052
7091
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7053
7092
|
style = _ref.style,
|
|
7054
7093
|
testID = _ref.testID,
|
|
7055
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7094
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$n);
|
|
7056
7095
|
var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
7057
7096
|
opacity = _React$useRef.current;
|
|
7058
7097
|
var isFirstRendering = React__default["default"].useRef(true);
|
|
@@ -7085,7 +7124,7 @@ var Status = function Status(_ref) {
|
|
|
7085
7124
|
}));
|
|
7086
7125
|
};
|
|
7087
7126
|
|
|
7088
|
-
var _excluded$
|
|
7127
|
+
var _excluded$m = ["content", "visible", "max", "intent", "style", "testID"];
|
|
7089
7128
|
var DEFAULT_MAX_NUMBER = 99;
|
|
7090
7129
|
var getPaddingState = function getPaddingState(content) {
|
|
7091
7130
|
return content.length > 1 ? 'wideContent' : 'narrowContent';
|
|
@@ -7100,7 +7139,7 @@ var Badge = function Badge(_ref) {
|
|
|
7100
7139
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7101
7140
|
style = _ref.style,
|
|
7102
7141
|
testID = _ref.testID,
|
|
7103
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7142
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$m);
|
|
7104
7143
|
var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
7105
7144
|
opacity = _React$useRef.current;
|
|
7106
7145
|
var isFirstRendering = React__default["default"].useRef(true);
|
|
@@ -7204,7 +7243,7 @@ function omit(keys, obj) {
|
|
|
7204
7243
|
return result;
|
|
7205
7244
|
}
|
|
7206
7245
|
|
|
7207
|
-
var _excluded$
|
|
7246
|
+
var _excluded$l = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
|
|
7208
7247
|
var getInactiveIcon = function getInactiveIcon(icon) {
|
|
7209
7248
|
var inactiveIcon = "".concat(icon, "-outlined");
|
|
7210
7249
|
return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
|
|
@@ -7215,7 +7254,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
7215
7254
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
7216
7255
|
selectedTabKey = _ref.selectedTabKey,
|
|
7217
7256
|
tabs = _ref.tabs,
|
|
7218
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7257
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$l);
|
|
7219
7258
|
var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
7220
7259
|
/**
|
|
7221
7260
|
* List of loaded tabs, tabs will be loaded when navigated to.
|
|
@@ -7302,13 +7341,13 @@ var StyledDivider = index$a(reactNative.View)(function (_ref) {
|
|
|
7302
7341
|
}, horizontalMargin), verticalMargin);
|
|
7303
7342
|
});
|
|
7304
7343
|
|
|
7305
|
-
var _excluded$
|
|
7344
|
+
var _excluded$k = ["marginHorizontal", "marginVertical", "style", "testID"];
|
|
7306
7345
|
var Divider = function Divider(_ref) {
|
|
7307
7346
|
var marginHorizontal = _ref.marginHorizontal,
|
|
7308
7347
|
marginVertical = _ref.marginVertical,
|
|
7309
7348
|
style = _ref.style,
|
|
7310
7349
|
testID = _ref.testID,
|
|
7311
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7350
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$k);
|
|
7312
7351
|
return /*#__PURE__*/React__default["default"].createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
7313
7352
|
themeMarginHorizontal: marginHorizontal,
|
|
7314
7353
|
themeMarginVertical: marginVertical,
|
|
@@ -7438,7 +7477,7 @@ var StyledLoadingDot = index$a(reactNative.View)(function (_ref2) {
|
|
|
7438
7477
|
}, themeStyling());
|
|
7439
7478
|
});
|
|
7440
7479
|
|
|
7441
|
-
var _excluded$
|
|
7480
|
+
var _excluded$j = ["count", "size", "testID", "themeVariant"];
|
|
7442
7481
|
var AnimatedLoadingIndicatorWrapper = reactNative.Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
|
|
7443
7482
|
var AnimatedLoadingDot = reactNative.Animated.createAnimatedComponent(StyledLoadingDot);
|
|
7444
7483
|
var renderDotComponent = function renderDotComponent(_ref) {
|
|
@@ -7470,7 +7509,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
7470
7509
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
7471
7510
|
testID = _ref2.testID,
|
|
7472
7511
|
themeVariant = _ref2.themeVariant,
|
|
7473
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
7512
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$j);
|
|
7474
7513
|
var progressAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
7475
7514
|
React.useEffect(function () {
|
|
7476
7515
|
var animation = reactNative.Animated.loop(reactNative.Animated.timing(progressAnimation.current, {
|
|
@@ -7900,11 +7939,11 @@ var Header = function Header(_ref) {
|
|
|
7900
7939
|
})) : null), showDivider ? /*#__PURE__*/React__default["default"].createElement(Divider, null) : null);
|
|
7901
7940
|
};
|
|
7902
7941
|
|
|
7903
|
-
var _excluded$
|
|
7942
|
+
var _excluded$i = ["scrollEventThrottle"];
|
|
7904
7943
|
var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
7905
7944
|
var _ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
7906
7945
|
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
|
|
7907
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7946
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
7908
7947
|
var _useContext = React.useContext(BottomSheetContext),
|
|
7909
7948
|
setInternalShowDivider = _useContext.setInternalShowDivider;
|
|
7910
7949
|
var onScrollBeginDrag = React.useCallback(function (e) {
|
|
@@ -8219,7 +8258,7 @@ var borderWidths = {
|
|
|
8219
8258
|
var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
|
|
8220
8259
|
var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
|
|
8221
8260
|
|
|
8222
|
-
var _excluded$
|
|
8261
|
+
var _excluded$h = ["theme"];
|
|
8223
8262
|
var getThemeValue = function getThemeValue(theme, key, props) {
|
|
8224
8263
|
var propConfig = config[key];
|
|
8225
8264
|
var propValue = props[key];
|
|
@@ -8246,18 +8285,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
|
|
|
8246
8285
|
var configKeys = Object.keys(config);
|
|
8247
8286
|
var StyledBox = index$a(reactNative.View)(function (_ref5) {
|
|
8248
8287
|
var theme = _ref5.theme,
|
|
8249
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
8288
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$h);
|
|
8250
8289
|
var styleProps = pick(configKeys, otherProps);
|
|
8251
8290
|
var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
|
|
8252
8291
|
return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
|
|
8253
8292
|
});
|
|
8254
8293
|
|
|
8255
|
-
var _excluded$
|
|
8294
|
+
var _excluded$g = ["children", "style", "testID"];
|
|
8256
8295
|
var Box = function Box(_ref) {
|
|
8257
8296
|
var children = _ref.children,
|
|
8258
8297
|
style = _ref.style,
|
|
8259
8298
|
testID = _ref.testID,
|
|
8260
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
8299
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$g);
|
|
8261
8300
|
return /*#__PURE__*/React__default["default"].createElement(StyledBox, _extends$1({}, otherProps, {
|
|
8262
8301
|
style: style,
|
|
8263
8302
|
testID: testID
|
|
@@ -10822,7 +10861,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
10822
10861
|
})));
|
|
10823
10862
|
};
|
|
10824
10863
|
|
|
10825
|
-
var _excluded$
|
|
10864
|
+
var _excluded$f = ["rounded", "size", "testID", "style"];
|
|
10826
10865
|
var Image = function Image(_ref) {
|
|
10827
10866
|
var _ref$rounded = _ref.rounded,
|
|
10828
10867
|
rounded = _ref$rounded === void 0 ? false : _ref$rounded,
|
|
@@ -10830,7 +10869,7 @@ var Image = function Image(_ref) {
|
|
|
10830
10869
|
size = _ref$size === void 0 ? '6xlarge' : _ref$size,
|
|
10831
10870
|
testID = _ref.testID,
|
|
10832
10871
|
style = _ref.style,
|
|
10833
|
-
imageNativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
10872
|
+
imageNativeProps = _objectWithoutProperties(_ref, _excluded$f);
|
|
10834
10873
|
var theme = useTheme();
|
|
10835
10874
|
var imageSize = theme.__hd__.image.sizes[size];
|
|
10836
10875
|
return /*#__PURE__*/React__default["default"].createElement(reactNative.Image, _extends$1({
|
|
@@ -11023,12 +11062,12 @@ var Indicator = index$a(reactNative.View)(function (_ref2) {
|
|
|
11023
11062
|
};
|
|
11024
11063
|
});
|
|
11025
11064
|
|
|
11026
|
-
var _excluded$
|
|
11065
|
+
var _excluded$e = ["intent", "children"];
|
|
11027
11066
|
var DataCard = function DataCard(_ref) {
|
|
11028
11067
|
var _ref$intent = _ref.intent,
|
|
11029
11068
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
11030
11069
|
children = _ref.children,
|
|
11031
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11070
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$e);
|
|
11032
11071
|
return /*#__PURE__*/React__default["default"].createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__default["default"].createElement(Indicator, {
|
|
11033
11072
|
themeIntent: intent,
|
|
11034
11073
|
testID: "data-card-indicator"
|
|
@@ -11046,11 +11085,11 @@ var StyledCard$1 = index$a(reactNative.View)(function (_ref) {
|
|
|
11046
11085
|
});
|
|
11047
11086
|
});
|
|
11048
11087
|
|
|
11049
|
-
var _excluded$
|
|
11088
|
+
var _excluded$d = ["intent", "children"];
|
|
11050
11089
|
var Card = function Card(_ref) {
|
|
11051
11090
|
var intent = _ref.intent,
|
|
11052
11091
|
children = _ref.children,
|
|
11053
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11092
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$d);
|
|
11054
11093
|
return /*#__PURE__*/React__default["default"].createElement(StyledCard$1, _extends$1({}, nativeProps, {
|
|
11055
11094
|
themeIntent: intent
|
|
11056
11095
|
}), children);
|
|
@@ -11238,7 +11277,7 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
11238
11277
|
}));
|
|
11239
11278
|
});
|
|
11240
11279
|
|
|
11241
|
-
var _excluded$
|
|
11280
|
+
var _excluded$c = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination"];
|
|
11242
11281
|
function useStateFromProp(initialValue) {
|
|
11243
11282
|
var _useState = React.useState(initialValue),
|
|
11244
11283
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11260,7 +11299,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
11260
11299
|
shouldShowPagination = _ref$shouldShowPagina === void 0 ? function () {
|
|
11261
11300
|
return true;
|
|
11262
11301
|
} : _ref$shouldShowPagina,
|
|
11263
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11302
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$c);
|
|
11264
11303
|
var carouselRef = React.useRef(null);
|
|
11265
11304
|
var _useStateFromProp = useStateFromProp(selectedItemIndex),
|
|
11266
11305
|
_useStateFromProp2 = _slicedToArray(_useStateFromProp, 2),
|
|
@@ -11480,7 +11519,7 @@ var StyledAsteriskLabelInsideTextInput = index$a(Typography.Text)(function (_ref
|
|
|
11480
11519
|
fontSize: theme.__hd__.textInput.fontSizes.asteriskLabel
|
|
11481
11520
|
};
|
|
11482
11521
|
});
|
|
11483
|
-
var StyledErrorContainer$
|
|
11522
|
+
var StyledErrorContainer$2 = index$a(reactNative.View)(function (_ref7) {
|
|
11484
11523
|
var theme = _ref7.theme;
|
|
11485
11524
|
return {
|
|
11486
11525
|
marginRight: theme.__hd__.textInput.space.errorContainerMarginRight,
|
|
@@ -11572,7 +11611,7 @@ var StyledErrorAndMaxLengthContainer = index$a(reactNative.View)(function () {
|
|
|
11572
11611
|
};
|
|
11573
11612
|
});
|
|
11574
11613
|
|
|
11575
|
-
var _excluded$
|
|
11614
|
+
var _excluded$b = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
|
|
11576
11615
|
var getVariant$1 = function getVariant(_ref) {
|
|
11577
11616
|
var disabled = _ref.disabled,
|
|
11578
11617
|
error = _ref.error,
|
|
@@ -11620,7 +11659,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
11620
11659
|
renderInputValue = _ref2.renderInputValue,
|
|
11621
11660
|
_ref2$allowFontScalin = _ref2.allowFontScaling,
|
|
11622
11661
|
allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
|
|
11623
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
11662
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$b);
|
|
11624
11663
|
var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
|
|
11625
11664
|
var isEmptyValue = displayText.length === 0;
|
|
11626
11665
|
var actualSuffix = loading ? 'loading' : suffix;
|
|
@@ -11783,7 +11822,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
11783
11822
|
icon: actualSuffix,
|
|
11784
11823
|
spin: actualSuffix === 'loading',
|
|
11785
11824
|
size: "xsmall"
|
|
11786
|
-
}) : suffix), /*#__PURE__*/React__default["default"].createElement(StyledErrorAndHelpTextContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledErrorAndMaxLengthContainer, null, error ? /*#__PURE__*/React__default["default"].createElement(StyledErrorContainer$
|
|
11825
|
+
}) : suffix), /*#__PURE__*/React__default["default"].createElement(StyledErrorAndHelpTextContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledErrorAndMaxLengthContainer, null, error ? /*#__PURE__*/React__default["default"].createElement(StyledErrorContainer$2, null, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
11787
11826
|
testID: "input-error-icon",
|
|
11788
11827
|
icon: "circle-info",
|
|
11789
11828
|
size: "xsmall",
|
|
@@ -12291,6 +12330,206 @@ var Empty = function Empty(_ref) {
|
|
|
12291
12330
|
}, description));
|
|
12292
12331
|
};
|
|
12293
12332
|
|
|
12333
|
+
var StyledErrorModal = index$a(reactNative.Modal)({
|
|
12334
|
+
height: '100%',
|
|
12335
|
+
width: '100%'
|
|
12336
|
+
});
|
|
12337
|
+
var StyledErrorContainer$1 = index$a(reactNative.View)(function (_ref) {
|
|
12338
|
+
var theme = _ref.theme,
|
|
12339
|
+
themeVariant = _ref.themeVariant;
|
|
12340
|
+
return {
|
|
12341
|
+
display: 'flex',
|
|
12342
|
+
flex: 1,
|
|
12343
|
+
flexDirection: 'column',
|
|
12344
|
+
backgroundColor: themeVariant === 'in-page' ? theme.__hd__.error.colors.inPageBackground : theme.__hd__.error.colors.fullScreenBackground
|
|
12345
|
+
};
|
|
12346
|
+
});
|
|
12347
|
+
var StyledErrorContent = index$a(reactNative.View)(function (_ref2) {
|
|
12348
|
+
var theme = _ref2.theme;
|
|
12349
|
+
return {
|
|
12350
|
+
display: 'flex',
|
|
12351
|
+
flex: 1,
|
|
12352
|
+
flexDirection: 'column',
|
|
12353
|
+
justifyContent: 'center',
|
|
12354
|
+
alignItems: 'center',
|
|
12355
|
+
padding: theme.__hd__.error.space.wrapperPadding
|
|
12356
|
+
};
|
|
12357
|
+
});
|
|
12358
|
+
var StyledErrorButtonContainer = index$a(reactNative.View)(function (_ref3) {
|
|
12359
|
+
var theme = _ref3.theme;
|
|
12360
|
+
return {
|
|
12361
|
+
display: 'flex',
|
|
12362
|
+
flexDirection: 'column',
|
|
12363
|
+
justifyContent: 'center',
|
|
12364
|
+
alignItems: 'center',
|
|
12365
|
+
paddingHorizontal: theme.__hd__.error.space.button.wrapperHorizontalPadding,
|
|
12366
|
+
paddingVertical: theme.__hd__.error.space.button.wrapperVerticalPadding
|
|
12367
|
+
};
|
|
12368
|
+
});
|
|
12369
|
+
var StyledErrorButtonPrimary = index$a(CompoundButton)(function (_ref4) {
|
|
12370
|
+
var theme = _ref4.theme;
|
|
12371
|
+
return {
|
|
12372
|
+
padding: theme.__hd__.error.space.button.padding
|
|
12373
|
+
};
|
|
12374
|
+
});
|
|
12375
|
+
var StyledErrorButtonSecondary = index$a(CompoundButton)(function (_ref5) {
|
|
12376
|
+
var theme = _ref5.theme;
|
|
12377
|
+
return {
|
|
12378
|
+
marginTop: theme.__hd__.error.space.button.margin,
|
|
12379
|
+
padding: theme.__hd__.error.space.button.padding
|
|
12380
|
+
};
|
|
12381
|
+
});
|
|
12382
|
+
var StyledErrorImage = index$a(Image)(function (_ref6) {
|
|
12383
|
+
var theme = _ref6.theme;
|
|
12384
|
+
return {
|
|
12385
|
+
marginBottom: theme.__hd__.error.space.imageMarginBottom,
|
|
12386
|
+
width: theme.__hd__.error.sizes.image,
|
|
12387
|
+
height: theme.__hd__.error.sizes.image,
|
|
12388
|
+
resizeMode: 'contain'
|
|
12389
|
+
};
|
|
12390
|
+
});
|
|
12391
|
+
var StyledErrorTitle = index$a(Typography.Text)(function (_ref7) {
|
|
12392
|
+
var theme = _ref7.theme;
|
|
12393
|
+
return {
|
|
12394
|
+
fontFamily: theme.__hd__.error.fonts.title,
|
|
12395
|
+
fontSize: theme.__hd__.error.fontSizes.title,
|
|
12396
|
+
textAlign: 'center',
|
|
12397
|
+
marginBottom: theme.__hd__.error.space.titleMarginBottom,
|
|
12398
|
+
color: theme.__hd__.error.colors.title
|
|
12399
|
+
};
|
|
12400
|
+
});
|
|
12401
|
+
var StyledErrorDescription = index$a(Typography.Text)(function (_ref8) {
|
|
12402
|
+
var theme = _ref8.theme;
|
|
12403
|
+
return {
|
|
12404
|
+
fontFamily: theme.__hd__.error.fonts.description,
|
|
12405
|
+
fontSize: theme.__hd__.error.fontSizes.description,
|
|
12406
|
+
textAlign: 'center',
|
|
12407
|
+
color: theme.__hd__.error.colors.description
|
|
12408
|
+
};
|
|
12409
|
+
});
|
|
12410
|
+
|
|
12411
|
+
var _excluded$a = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
|
|
12412
|
+
_excluded2 = ["visible", "variant", "title", "description", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
12413
|
+
var ErrorPage = function ErrorPage(_ref) {
|
|
12414
|
+
var _ref$variant = _ref.variant,
|
|
12415
|
+
variant = _ref$variant === void 0 ? 'in-page' : _ref$variant,
|
|
12416
|
+
title = _ref.title,
|
|
12417
|
+
description = _ref.description,
|
|
12418
|
+
image = _ref.image,
|
|
12419
|
+
testID = _ref.testID,
|
|
12420
|
+
ctaText = _ref.ctaText,
|
|
12421
|
+
onCtaPress = _ref.onCtaPress,
|
|
12422
|
+
secondaryCtaText = _ref.secondaryCtaText,
|
|
12423
|
+
onSecondaryCtaPress = _ref.onSecondaryCtaPress,
|
|
12424
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$a);
|
|
12425
|
+
var showCta = ctaText && onCtaPress !== undefined;
|
|
12426
|
+
var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
|
|
12427
|
+
var showButtonContainer = showCta || showSecondaryCta;
|
|
12428
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledErrorContainer$1, {
|
|
12429
|
+
testID: testID,
|
|
12430
|
+
themeVariant: variant
|
|
12431
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledErrorContent, nativeProps, image && /*#__PURE__*/React__default["default"].createElement(StyledErrorImage, {
|
|
12432
|
+
source: typeof image === 'string' ? {
|
|
12433
|
+
uri: image
|
|
12434
|
+
} : image,
|
|
12435
|
+
testID: "error-image"
|
|
12436
|
+
}), /*#__PURE__*/React__default["default"].createElement(StyledErrorTitle, null, title), description && /*#__PURE__*/React__default["default"].createElement(StyledErrorDescription, null, description)), showButtonContainer && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonPrimary, {
|
|
12437
|
+
variant: "filled",
|
|
12438
|
+
text: ctaText,
|
|
12439
|
+
onPress: onCtaPress
|
|
12440
|
+
}), showSecondaryCta && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonSecondary, {
|
|
12441
|
+
variant: "text",
|
|
12442
|
+
text: secondaryCtaText,
|
|
12443
|
+
onPress: onSecondaryCtaPress
|
|
12444
|
+
})));
|
|
12445
|
+
};
|
|
12446
|
+
/**
|
|
12447
|
+
* Renders error page
|
|
12448
|
+
*
|
|
12449
|
+
* @param {ErrorProps}
|
|
12450
|
+
* @return {*} {ReactElement}
|
|
12451
|
+
*/
|
|
12452
|
+
var Error$1 = function Error(_ref2) {
|
|
12453
|
+
var _ref2$visible = _ref2.visible,
|
|
12454
|
+
visible = _ref2$visible === void 0 ? true : _ref2$visible,
|
|
12455
|
+
_ref2$variant = _ref2.variant,
|
|
12456
|
+
variant = _ref2$variant === void 0 ? 'in-page' : _ref2$variant,
|
|
12457
|
+
title = _ref2.title,
|
|
12458
|
+
description = _ref2.description,
|
|
12459
|
+
testID = _ref2.testID,
|
|
12460
|
+
ctaText = _ref2.ctaText,
|
|
12461
|
+
onCtaPress = _ref2.onCtaPress,
|
|
12462
|
+
secondaryCtaText = _ref2.secondaryCtaText,
|
|
12463
|
+
onSecondaryCtaPress = _ref2.onSecondaryCtaPress,
|
|
12464
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
12465
|
+
var _useState = React.useState(visible),
|
|
12466
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12467
|
+
isVisible = _useState2[0],
|
|
12468
|
+
setIsVisible = _useState2[1];
|
|
12469
|
+
var _useState3 = React.useState(null),
|
|
12470
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12471
|
+
ctaPressed = _useState4[0],
|
|
12472
|
+
setCtaPressed = _useState4[1];
|
|
12473
|
+
var onCloseModal = React.useCallback(function () {
|
|
12474
|
+
if (ctaPressed === 'cta' && onCtaPress) {
|
|
12475
|
+
onCtaPress();
|
|
12476
|
+
}
|
|
12477
|
+
if (ctaPressed === 'secondaryCta' && onSecondaryCtaPress) {
|
|
12478
|
+
onSecondaryCtaPress();
|
|
12479
|
+
}
|
|
12480
|
+
setCtaPressed(null);
|
|
12481
|
+
}, [ctaPressed, onCtaPress, onSecondaryCtaPress]);
|
|
12482
|
+
React.useEffect(function () {
|
|
12483
|
+
setIsVisible(visible);
|
|
12484
|
+
}, [visible]);
|
|
12485
|
+
// These useEffect lines prevents race condition error when callback contains navigation logic
|
|
12486
|
+
React.useEffect(function () {
|
|
12487
|
+
if (ctaPressed) {
|
|
12488
|
+
setIsVisible(false);
|
|
12489
|
+
}
|
|
12490
|
+
}, [ctaPressed]);
|
|
12491
|
+
React.useEffect(function () {
|
|
12492
|
+
if (!isVisible) {
|
|
12493
|
+
onCloseModal();
|
|
12494
|
+
}
|
|
12495
|
+
}, [isVisible, onCloseModal]);
|
|
12496
|
+
if (variant === 'full-screen') {
|
|
12497
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledErrorModal, {
|
|
12498
|
+
visible: isVisible,
|
|
12499
|
+
onRequestClose: function onRequestClose() {
|
|
12500
|
+
return setIsVisible(false);
|
|
12501
|
+
},
|
|
12502
|
+
onDismiss: function onDismiss() {
|
|
12503
|
+
return setIsVisible(false);
|
|
12504
|
+
},
|
|
12505
|
+
animationType: "slide"
|
|
12506
|
+
}, /*#__PURE__*/React__default["default"].createElement(ErrorPage, _extends$1({
|
|
12507
|
+
variant: variant,
|
|
12508
|
+
title: title,
|
|
12509
|
+
description: description,
|
|
12510
|
+
testID: testID,
|
|
12511
|
+
ctaText: ctaText,
|
|
12512
|
+
onCtaPress: onCtaPress && function () {
|
|
12513
|
+
setCtaPressed('cta');
|
|
12514
|
+
},
|
|
12515
|
+
secondaryCtaText: secondaryCtaText,
|
|
12516
|
+
onSecondaryCtaPress: onSecondaryCtaPress && function () {
|
|
12517
|
+
setCtaPressed('secondaryCta');
|
|
12518
|
+
}
|
|
12519
|
+
}, nativeProps)));
|
|
12520
|
+
}
|
|
12521
|
+
return /*#__PURE__*/React__default["default"].createElement(ErrorPage, _extends$1({
|
|
12522
|
+
variant: variant,
|
|
12523
|
+
title: title,
|
|
12524
|
+
description: description,
|
|
12525
|
+
testID: testID,
|
|
12526
|
+
ctaText: ctaText,
|
|
12527
|
+
onCtaPress: onCtaPress,
|
|
12528
|
+
secondaryCtaText: secondaryCtaText,
|
|
12529
|
+
onSecondaryCtaPress: onSecondaryCtaPress
|
|
12530
|
+
}, nativeProps));
|
|
12531
|
+
};
|
|
12532
|
+
|
|
12294
12533
|
var StyledFABContainer = index$a(reactNative.TouchableHighlight)(function (_ref) {
|
|
12295
12534
|
var theme = _ref.theme;
|
|
12296
12535
|
return {
|
|
@@ -14557,9 +14796,8 @@ var getTabItem$1 = function getTabItem(_ref) {
|
|
|
14557
14796
|
color: color
|
|
14558
14797
|
});
|
|
14559
14798
|
};
|
|
14560
|
-
var ScrollableTab =
|
|
14561
|
-
var
|
|
14562
|
-
onTabPress = _ref2$onTabPress === void 0 ? noop : _ref2$onTabPress,
|
|
14799
|
+
var ScrollableTab = function ScrollableTab(_ref2) {
|
|
14800
|
+
var onTabPress = _ref2.onTabPress,
|
|
14563
14801
|
selectedTabKey = _ref2.selectedTabKey,
|
|
14564
14802
|
tabs = _ref2.tabs,
|
|
14565
14803
|
containerStyle = _ref2.containerStyle,
|
|
@@ -14581,46 +14819,20 @@ var ScrollableTab = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
14581
14819
|
var tabsAnims = useAnimatedValueArray(tabs.map(function (_, i) {
|
|
14582
14820
|
return i === selectedTabIndex ? 1 : 0;
|
|
14583
14821
|
}));
|
|
14584
|
-
React__default["default"].useImperativeHandle(ref, function () {
|
|
14585
|
-
return {
|
|
14586
|
-
selectTabKey: function selectTabKey(tabKey) {
|
|
14587
|
-
var index = tabs.findIndex(function (item) {
|
|
14588
|
-
return item.key === tabKey;
|
|
14589
|
-
});
|
|
14590
|
-
if (index !== -1) {
|
|
14591
|
-
var _flatListRef$current, _pagerViewRef$current;
|
|
14592
|
-
(_flatListRef$current = flatListRef.current) === null || _flatListRef$current === void 0 ? void 0 : _flatListRef$current.scrollToIndex({
|
|
14593
|
-
index: index,
|
|
14594
|
-
viewPosition: 0.5
|
|
14595
|
-
});
|
|
14596
|
-
(_pagerViewRef$current = pagerViewRef.current) === null || _pagerViewRef$current === void 0 ? void 0 : _pagerViewRef$current.setPage(index);
|
|
14597
|
-
if (onTabPress) {
|
|
14598
|
-
onTabPress(tabKey);
|
|
14599
|
-
}
|
|
14600
|
-
}
|
|
14601
|
-
},
|
|
14602
|
-
getFlatListRef: function getFlatListRef() {
|
|
14603
|
-
return flatListRef.current;
|
|
14604
|
-
},
|
|
14605
|
-
getPagerViewRef: function getPagerViewRef() {
|
|
14606
|
-
return pagerViewRef.current;
|
|
14607
|
-
}
|
|
14608
|
-
};
|
|
14609
|
-
}, [pagerViewRef, flatListRef, tabs]);
|
|
14610
14822
|
React__default["default"].useEffect(function () {
|
|
14611
14823
|
var timeoutHandle = null;
|
|
14612
14824
|
if (selectedTabIndex !== -1) {
|
|
14613
|
-
var _flatListRef$
|
|
14614
|
-
(_flatListRef$
|
|
14825
|
+
var _flatListRef$current;
|
|
14826
|
+
(_flatListRef$current = flatListRef.current) === null || _flatListRef$current === void 0 ? void 0 : _flatListRef$current.scrollToIndex({
|
|
14615
14827
|
index: selectedTabIndex,
|
|
14616
14828
|
viewPosition: 0.5
|
|
14617
14829
|
});
|
|
14618
14830
|
// If the selected tab is changed too quickly, the setPage is crashed and not work anymore
|
|
14619
14831
|
// We apply throttle to prevent this issue https://github.com/Thinkei/hero-design/issues/1715
|
|
14620
14832
|
timeoutHandle = setTimeout(function () {
|
|
14621
|
-
var _pagerViewRef$
|
|
14833
|
+
var _pagerViewRef$current;
|
|
14622
14834
|
// use no animation to prevent unexpected behavior if users select tab too quickly
|
|
14623
|
-
(_pagerViewRef$
|
|
14835
|
+
(_pagerViewRef$current = pagerViewRef.current) === null || _pagerViewRef$current === void 0 ? void 0 : _pagerViewRef$current.setPageWithoutAnimation(selectedTabIndex);
|
|
14624
14836
|
}, 200);
|
|
14625
14837
|
}
|
|
14626
14838
|
var animation = reactNative.Animated.parallel(_toConsumableArray(tabs.map(function (_, i) {
|
|
@@ -14637,7 +14849,7 @@ var ScrollableTab = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
14637
14849
|
clearTimeout(timeoutHandle);
|
|
14638
14850
|
}
|
|
14639
14851
|
};
|
|
14640
|
-
}, [selectedTabIndex,
|
|
14852
|
+
}, [selectedTabIndex, pagerViewRef]);
|
|
14641
14853
|
return /*#__PURE__*/React__default["default"].createElement(TabContainer, {
|
|
14642
14854
|
style: containerStyle,
|
|
14643
14855
|
testID: componentTestID
|
|
@@ -14656,8 +14868,8 @@ var ScrollableTab = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
14656
14868
|
onScrollToIndexFailed: function onScrollToIndexFailed(_ref3) {
|
|
14657
14869
|
var index = _ref3.index;
|
|
14658
14870
|
setTimeout(function () {
|
|
14659
|
-
var _flatListRef$
|
|
14660
|
-
return (_flatListRef$
|
|
14871
|
+
var _flatListRef$current2;
|
|
14872
|
+
return (_flatListRef$current2 = flatListRef.current) === null || _flatListRef$current2 === void 0 ? void 0 : _flatListRef$current2.scrollToIndex({
|
|
14661
14873
|
index: index,
|
|
14662
14874
|
viewPosition: 0.5
|
|
14663
14875
|
});
|
|
@@ -14713,7 +14925,7 @@ var ScrollableTab = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
14713
14925
|
onPageSelected: function onPageSelected(e) {
|
|
14714
14926
|
var index = e.nativeEvent.position;
|
|
14715
14927
|
var selectedItem = tabs[index];
|
|
14716
|
-
if (selectedItem
|
|
14928
|
+
if (selectedItem) {
|
|
14717
14929
|
onTabPress(selectedItem.key);
|
|
14718
14930
|
}
|
|
14719
14931
|
},
|
|
@@ -14733,7 +14945,7 @@ var ScrollableTab = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
14733
14945
|
collapsable: false
|
|
14734
14946
|
}, isLazyScreen ? null : component);
|
|
14735
14947
|
})));
|
|
14736
|
-
}
|
|
14948
|
+
};
|
|
14737
14949
|
|
|
14738
14950
|
var getTabItem = function getTabItem(_ref) {
|
|
14739
14951
|
var item = _ref.item,
|
|
@@ -31858,7 +32070,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
31858
32070
|
hideKeyboardAccessoryView: true,
|
|
31859
32071
|
keyboardDisplayRequiresUserAction: false,
|
|
31860
32072
|
height: webviewHeight
|
|
31861
|
-
})))), /*#__PURE__*/React__default["default"].createElement(StyledErrorAndHelpTextContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledErrorAndMaxLengthContainer, null, error ? /*#__PURE__*/React__default["default"].createElement(StyledErrorContainer$
|
|
32073
|
+
})))), /*#__PURE__*/React__default["default"].createElement(StyledErrorAndHelpTextContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledErrorAndMaxLengthContainer, null, error ? /*#__PURE__*/React__default["default"].createElement(StyledErrorContainer$2, null, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
31862
32074
|
testID: "input-error-icon",
|
|
31863
32075
|
icon: "circle-info",
|
|
31864
32076
|
size: "xsmall",
|
|
@@ -31897,6 +32109,7 @@ exports.DatePicker = DatePicker;
|
|
|
31897
32109
|
exports.Divider = Divider;
|
|
31898
32110
|
exports.Drawer = index$7;
|
|
31899
32111
|
exports.Empty = Empty;
|
|
32112
|
+
exports.Error = Error$1;
|
|
31900
32113
|
exports.FAB = index$6;
|
|
31901
32114
|
exports.Icon = Icon;
|
|
31902
32115
|
exports.Image = Image;
|