@hero-design/rn 8.22.0 → 8.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +9 -9
- package/es/index.js +235 -65
- package/lib/index.js +235 -64
- package/package.json +5 -5
- package/src/components/Alert/index.tsx +6 -0
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +5 -5
- package/src/components/List/ListItem.tsx +12 -8
- package/src/components/Success/StyledSuccess.tsx +87 -0
- package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +497 -0
- package/src/components/Success/__tests__/index.spec.tsx +78 -0
- package/src/components/Success/index.tsx +129 -0
- package/src/components/Tag/StyledTag.tsx +1 -1
- package/src/components/Tag/__tests__/Tag.spec.tsx +22 -71
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +106 -53
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +265 -0
- package/src/components/TextInput/__tests__/index.spec.tsx +29 -0
- package/src/components/TextInput/index.tsx +6 -1
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +33 -3
- package/src/theme/components/empty.ts +1 -1
- package/src/theme/components/error.ts +1 -1
- package/src/theme/components/success.ts +40 -0
- package/src/theme/components/tag.ts +1 -1
- package/src/theme/getTheme.ts +3 -0
- package/src/utils/hooks.ts +1 -1
- package/types/components/Success/StyledSuccess.d.ts +54 -0
- package/types/components/Success/index.d.ts +42 -0
- package/types/components/TextInput/index.d.ts +5 -1
- package/types/index.d.ts +2 -1
- package/types/theme/components/success.d.ts +32 -0
- package/types/theme/getTheme.d.ts +2 -0
package/es/index.js
CHANGED
|
@@ -2181,7 +2181,7 @@ var getDrawerTheme = function getDrawerTheme(theme) {
|
|
|
2181
2181
|
|
|
2182
2182
|
var getEmptyTheme = function getEmptyTheme(theme) {
|
|
2183
2183
|
var space = {
|
|
2184
|
-
titleMargin: theme.space.
|
|
2184
|
+
titleMargin: theme.space.small,
|
|
2185
2185
|
imageMargin: theme.space.large,
|
|
2186
2186
|
wrapperPadding: theme.space.medium
|
|
2187
2187
|
};
|
|
@@ -2214,7 +2214,7 @@ var getEmptyTheme = function getEmptyTheme(theme) {
|
|
|
2214
2214
|
var getErrorTheme = function getErrorTheme(theme) {
|
|
2215
2215
|
var space = {
|
|
2216
2216
|
titleMarginBottom: theme.space.small,
|
|
2217
|
-
imageMarginBottom: theme.space.
|
|
2217
|
+
imageMarginBottom: theme.space.large,
|
|
2218
2218
|
wrapperPadding: theme.space.large,
|
|
2219
2219
|
button: {
|
|
2220
2220
|
wrapperHorizontalPadding: theme.space.medium,
|
|
@@ -2693,6 +2693,44 @@ var getSpinnerTheme = function getSpinnerTheme(theme) {
|
|
|
2693
2693
|
};
|
|
2694
2694
|
};
|
|
2695
2695
|
|
|
2696
|
+
var getSuccessTheme = function getSuccessTheme(theme) {
|
|
2697
|
+
var space = {
|
|
2698
|
+
titleMarginBottom: theme.space.small,
|
|
2699
|
+
imageMarginBottom: theme.space.xlarge,
|
|
2700
|
+
wrapperPadding: theme.space.large,
|
|
2701
|
+
button: {
|
|
2702
|
+
wrapperHorizontalPadding: theme.space.medium,
|
|
2703
|
+
wrapperVerticalPadding: theme.space.xxxlarge,
|
|
2704
|
+
margin: theme.space.medium,
|
|
2705
|
+
padding: theme.space.medium
|
|
2706
|
+
}
|
|
2707
|
+
};
|
|
2708
|
+
var sizes = {
|
|
2709
|
+
image: theme.sizes['19xlarge']
|
|
2710
|
+
};
|
|
2711
|
+
var colors = {
|
|
2712
|
+
title: theme.colors.onDefaultGlobalSurface,
|
|
2713
|
+
description: theme.colors.mutedOnDefaultGlobalSurface,
|
|
2714
|
+
fullScreenBackground: theme.colors.decorativePrimarySurface,
|
|
2715
|
+
inPageBackground: theme.colors.neutralGlobalSurface
|
|
2716
|
+
};
|
|
2717
|
+
var fontSizes = {
|
|
2718
|
+
title: theme.fontSizes.xxxlarge,
|
|
2719
|
+
description: theme.fontSizes.xlarge
|
|
2720
|
+
};
|
|
2721
|
+
var fonts = {
|
|
2722
|
+
title: theme.fonts.playful.semiBold,
|
|
2723
|
+
description: theme.fonts.playful.regular
|
|
2724
|
+
};
|
|
2725
|
+
return {
|
|
2726
|
+
fontSizes: fontSizes,
|
|
2727
|
+
colors: colors,
|
|
2728
|
+
sizes: sizes,
|
|
2729
|
+
space: space,
|
|
2730
|
+
fonts: fonts
|
|
2731
|
+
};
|
|
2732
|
+
};
|
|
2733
|
+
|
|
2696
2734
|
var getSwipeableTheme = function getSwipeableTheme(theme) {
|
|
2697
2735
|
var colors = {
|
|
2698
2736
|
success: theme.colors.success,
|
|
@@ -2787,7 +2825,7 @@ var getTagTheme = function getTagTheme(theme) {
|
|
|
2787
2825
|
"default": theme.borderWidths.base
|
|
2788
2826
|
};
|
|
2789
2827
|
var colors = {
|
|
2790
|
-
primary: theme.colors.
|
|
2828
|
+
primary: theme.colors.onDefaultGlobalSurface,
|
|
2791
2829
|
primaryBackground: undefined,
|
|
2792
2830
|
info: theme.colors.onInfoSurface,
|
|
2793
2831
|
infoBackground: theme.colors.infoSurface,
|
|
@@ -3076,6 +3114,7 @@ var getTheme$1 = function getTheme() {
|
|
|
3076
3114
|
skeleton: getSkeletonTheme(globalTheme),
|
|
3077
3115
|
slider: getSliderTheme(globalTheme),
|
|
3078
3116
|
spinner: getSpinnerTheme(globalTheme),
|
|
3117
|
+
success: getSuccessTheme(globalTheme),
|
|
3079
3118
|
swipeable: getSwipeableTheme(globalTheme),
|
|
3080
3119
|
"switch": getSwitchTheme(globalTheme),
|
|
3081
3120
|
tabs: getTabsTheme(globalTheme),
|
|
@@ -6000,7 +6039,7 @@ var useDeprecation = function useDeprecation(message) {
|
|
|
6000
6039
|
useEffect(function () {
|
|
6001
6040
|
// eslint-disable-next-line no-console
|
|
6002
6041
|
if (cond) {
|
|
6003
|
-
console.
|
|
6042
|
+
console.warn(message);
|
|
6004
6043
|
}
|
|
6005
6044
|
}, [message, cond]);
|
|
6006
6045
|
};
|
|
@@ -6096,7 +6135,7 @@ var StyledText$3 = index$a(Text$1)(function (_ref) {
|
|
|
6096
6135
|
});
|
|
6097
6136
|
});
|
|
6098
6137
|
|
|
6099
|
-
var _excluded$
|
|
6138
|
+
var _excluded$t = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
|
|
6100
6139
|
var Text = function Text(_ref) {
|
|
6101
6140
|
var children = _ref.children,
|
|
6102
6141
|
_ref$fontSize = _ref.fontSize,
|
|
@@ -6109,7 +6148,7 @@ var Text = function Text(_ref) {
|
|
|
6109
6148
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
6110
6149
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6111
6150
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6112
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
6151
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$t);
|
|
6113
6152
|
return /*#__PURE__*/React.createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
6114
6153
|
themeFontSize: fontSize,
|
|
6115
6154
|
themeFontWeight: fontWeight,
|
|
@@ -6631,10 +6670,10 @@ var StyledHeroIcon = index$a(HeroIcon)(function (_ref) {
|
|
|
6631
6670
|
};
|
|
6632
6671
|
});
|
|
6633
6672
|
|
|
6634
|
-
var _excluded$
|
|
6673
|
+
var _excluded$s = ["style"];
|
|
6635
6674
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
6636
6675
|
var style = _ref.style,
|
|
6637
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
6676
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$s);
|
|
6638
6677
|
var rotateAnimation = useRef(new Animated.Value(0));
|
|
6639
6678
|
useEffect(function () {
|
|
6640
6679
|
var animation = Animated.loop(Animated.timing(rotateAnimation.current, {
|
|
@@ -6740,7 +6779,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
6740
6779
|
}, content));
|
|
6741
6780
|
};
|
|
6742
6781
|
|
|
6743
|
-
var _excluded$
|
|
6782
|
+
var _excluded$r = ["key"];
|
|
6744
6783
|
var Accordion = function Accordion(_ref) {
|
|
6745
6784
|
var items = _ref.items,
|
|
6746
6785
|
activeItemKey = _ref.activeItemKey,
|
|
@@ -6761,7 +6800,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
6761
6800
|
testID: testID
|
|
6762
6801
|
}, items.map(function (_ref2, index) {
|
|
6763
6802
|
var key = _ref2.key,
|
|
6764
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
6803
|
+
props = _objectWithoutProperties(_ref2, _excluded$r);
|
|
6765
6804
|
var open = _activeItemKey === key;
|
|
6766
6805
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
6767
6806
|
key: key
|
|
@@ -6856,6 +6895,7 @@ var Alert = function Alert(_ref2) {
|
|
|
6856
6895
|
variant = _ref2$variant === void 0 ? 'rounded' : _ref2$variant,
|
|
6857
6896
|
style = _ref2.style,
|
|
6858
6897
|
testID = _ref2.testID;
|
|
6898
|
+
useDeprecation("Alert's notification intent is deprecated and will be removed in the next major release. Please use other intents instead.", intent === 'notification');
|
|
6859
6899
|
return /*#__PURE__*/React.createElement(Container$1, {
|
|
6860
6900
|
themeVariant: variant,
|
|
6861
6901
|
themeIntent: intent,
|
|
@@ -7158,7 +7198,7 @@ var StyledStatus = index$a(Animated.View)(function (_ref3) {
|
|
|
7158
7198
|
};
|
|
7159
7199
|
});
|
|
7160
7200
|
|
|
7161
|
-
var _excluded$
|
|
7201
|
+
var _excluded$q = ["children", "visible", "intent", "style", "testID"];
|
|
7162
7202
|
var Status = function Status(_ref) {
|
|
7163
7203
|
var children = _ref.children,
|
|
7164
7204
|
_ref$visible = _ref.visible,
|
|
@@ -7167,7 +7207,7 @@ var Status = function Status(_ref) {
|
|
|
7167
7207
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7168
7208
|
style = _ref.style,
|
|
7169
7209
|
testID = _ref.testID,
|
|
7170
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7210
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$q);
|
|
7171
7211
|
var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
7172
7212
|
opacity = _React$useRef.current;
|
|
7173
7213
|
var isFirstRendering = React.useRef(true);
|
|
@@ -7200,7 +7240,7 @@ var Status = function Status(_ref) {
|
|
|
7200
7240
|
}));
|
|
7201
7241
|
};
|
|
7202
7242
|
|
|
7203
|
-
var _excluded$
|
|
7243
|
+
var _excluded$p = ["content", "visible", "max", "intent", "style", "testID"];
|
|
7204
7244
|
var DEFAULT_MAX_NUMBER = 99;
|
|
7205
7245
|
var getPaddingState = function getPaddingState(content) {
|
|
7206
7246
|
return content.length > 1 ? 'wideContent' : 'narrowContent';
|
|
@@ -7215,7 +7255,7 @@ var Badge = function Badge(_ref) {
|
|
|
7215
7255
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7216
7256
|
style = _ref.style,
|
|
7217
7257
|
testID = _ref.testID,
|
|
7218
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7258
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$p);
|
|
7219
7259
|
var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
7220
7260
|
opacity = _React$useRef.current;
|
|
7221
7261
|
var isFirstRendering = React.useRef(true);
|
|
@@ -7319,7 +7359,7 @@ function omit(keys, obj) {
|
|
|
7319
7359
|
return result;
|
|
7320
7360
|
}
|
|
7321
7361
|
|
|
7322
|
-
var _excluded$
|
|
7362
|
+
var _excluded$o = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
|
|
7323
7363
|
var getInactiveIcon = function getInactiveIcon(icon) {
|
|
7324
7364
|
var inactiveIcon = "".concat(icon, "-outlined");
|
|
7325
7365
|
return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
|
|
@@ -7330,7 +7370,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
7330
7370
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
7331
7371
|
selectedTabKey = _ref.selectedTabKey,
|
|
7332
7372
|
tabs = _ref.tabs,
|
|
7333
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7373
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$o);
|
|
7334
7374
|
var insets = useSafeAreaInsets();
|
|
7335
7375
|
/**
|
|
7336
7376
|
* List of loaded tabs, tabs will be loaded when navigated to.
|
|
@@ -7417,13 +7457,13 @@ var StyledDivider = index$a(View)(function (_ref) {
|
|
|
7417
7457
|
}, horizontalMargin), verticalMargin);
|
|
7418
7458
|
});
|
|
7419
7459
|
|
|
7420
|
-
var _excluded$
|
|
7460
|
+
var _excluded$n = ["marginHorizontal", "marginVertical", "style", "testID"];
|
|
7421
7461
|
var Divider = function Divider(_ref) {
|
|
7422
7462
|
var marginHorizontal = _ref.marginHorizontal,
|
|
7423
7463
|
marginVertical = _ref.marginVertical,
|
|
7424
7464
|
style = _ref.style,
|
|
7425
7465
|
testID = _ref.testID,
|
|
7426
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7466
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$n);
|
|
7427
7467
|
return /*#__PURE__*/React.createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
7428
7468
|
themeMarginHorizontal: marginHorizontal,
|
|
7429
7469
|
themeMarginVertical: marginVertical,
|
|
@@ -7553,7 +7593,7 @@ var StyledLoadingDot = index$a(View)(function (_ref2) {
|
|
|
7553
7593
|
}, themeStyling());
|
|
7554
7594
|
});
|
|
7555
7595
|
|
|
7556
|
-
var _excluded$
|
|
7596
|
+
var _excluded$m = ["count", "size", "testID", "themeVariant"];
|
|
7557
7597
|
var AnimatedLoadingIndicatorWrapper = Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
|
|
7558
7598
|
var AnimatedLoadingDot = Animated.createAnimatedComponent(StyledLoadingDot);
|
|
7559
7599
|
var renderDotComponent = function renderDotComponent(_ref) {
|
|
@@ -7585,7 +7625,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
7585
7625
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
7586
7626
|
testID = _ref2.testID,
|
|
7587
7627
|
themeVariant = _ref2.themeVariant,
|
|
7588
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
7628
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$m);
|
|
7589
7629
|
var progressAnimation = useRef(new Animated.Value(0));
|
|
7590
7630
|
useEffect(function () {
|
|
7591
7631
|
var animation = Animated.loop(Animated.timing(progressAnimation.current, {
|
|
@@ -8012,11 +8052,11 @@ var Header = function Header(_ref) {
|
|
|
8012
8052
|
})) : null), showDivider ? /*#__PURE__*/React.createElement(Divider, null) : null);
|
|
8013
8053
|
};
|
|
8014
8054
|
|
|
8015
|
-
var _excluded$
|
|
8055
|
+
var _excluded$l = ["scrollEventThrottle"];
|
|
8016
8056
|
var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
8017
8057
|
var _ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
8018
8058
|
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
|
|
8019
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8059
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
8020
8060
|
var _useContext = useContext(BottomSheetContext),
|
|
8021
8061
|
setInternalShowDivider = _useContext.setInternalShowDivider;
|
|
8022
8062
|
var onScrollBeginDrag = useCallback(function (e) {
|
|
@@ -8331,7 +8371,7 @@ var borderWidths = {
|
|
|
8331
8371
|
var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
|
|
8332
8372
|
var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
|
|
8333
8373
|
|
|
8334
|
-
var _excluded$
|
|
8374
|
+
var _excluded$k = ["theme"];
|
|
8335
8375
|
var getThemeValue = function getThemeValue(theme, key, props) {
|
|
8336
8376
|
var propConfig = config[key];
|
|
8337
8377
|
var propValue = props[key];
|
|
@@ -8358,18 +8398,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
|
|
|
8358
8398
|
var configKeys = Object.keys(config);
|
|
8359
8399
|
var StyledBox = index$a(View)(function (_ref5) {
|
|
8360
8400
|
var theme = _ref5.theme,
|
|
8361
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
8401
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$k);
|
|
8362
8402
|
var styleProps = pick(configKeys, otherProps);
|
|
8363
8403
|
var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
|
|
8364
8404
|
return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
|
|
8365
8405
|
});
|
|
8366
8406
|
|
|
8367
|
-
var _excluded$
|
|
8407
|
+
var _excluded$j = ["children", "style", "testID"];
|
|
8368
8408
|
var Box = function Box(_ref) {
|
|
8369
8409
|
var children = _ref.children,
|
|
8370
8410
|
style = _ref.style,
|
|
8371
8411
|
testID = _ref.testID,
|
|
8372
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
8412
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$j);
|
|
8373
8413
|
return /*#__PURE__*/React.createElement(StyledBox, _extends$1({}, otherProps, {
|
|
8374
8414
|
style: style,
|
|
8375
8415
|
testID: testID
|
|
@@ -10937,7 +10977,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
10937
10977
|
})));
|
|
10938
10978
|
};
|
|
10939
10979
|
|
|
10940
|
-
var _excluded$
|
|
10980
|
+
var _excluded$i = ["rounded", "size", "testID", "style"];
|
|
10941
10981
|
var Image = function Image(_ref) {
|
|
10942
10982
|
var _ref$rounded = _ref.rounded,
|
|
10943
10983
|
rounded = _ref$rounded === void 0 ? false : _ref$rounded,
|
|
@@ -10945,7 +10985,7 @@ var Image = function Image(_ref) {
|
|
|
10945
10985
|
size = _ref$size === void 0 ? '6xlarge' : _ref$size,
|
|
10946
10986
|
testID = _ref.testID,
|
|
10947
10987
|
style = _ref.style,
|
|
10948
|
-
imageNativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
10988
|
+
imageNativeProps = _objectWithoutProperties(_ref, _excluded$i);
|
|
10949
10989
|
var theme = useTheme();
|
|
10950
10990
|
var imageSize = theme.__hd__.image.sizes[size];
|
|
10951
10991
|
return /*#__PURE__*/React.createElement(Image$1, _extends$1({
|
|
@@ -11149,12 +11189,12 @@ var Indicator = index$a(View)(function (_ref2) {
|
|
|
11149
11189
|
};
|
|
11150
11190
|
});
|
|
11151
11191
|
|
|
11152
|
-
var _excluded$
|
|
11192
|
+
var _excluded$h = ["intent", "children"];
|
|
11153
11193
|
var DataCard = function DataCard(_ref) {
|
|
11154
11194
|
var _ref$intent = _ref.intent,
|
|
11155
11195
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
11156
11196
|
children = _ref.children,
|
|
11157
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11197
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$h);
|
|
11158
11198
|
return /*#__PURE__*/React.createElement(StyledDataCard, nativeProps, /*#__PURE__*/React.createElement(Indicator, {
|
|
11159
11199
|
themeIntent: intent,
|
|
11160
11200
|
testID: "data-card-indicator"
|
|
@@ -11172,11 +11212,11 @@ var StyledCard$1 = index$a(View)(function (_ref) {
|
|
|
11172
11212
|
});
|
|
11173
11213
|
});
|
|
11174
11214
|
|
|
11175
|
-
var _excluded$
|
|
11215
|
+
var _excluded$g = ["intent", "children"];
|
|
11176
11216
|
var Card = function Card(_ref) {
|
|
11177
11217
|
var intent = _ref.intent,
|
|
11178
11218
|
children = _ref.children,
|
|
11179
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11219
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$g);
|
|
11180
11220
|
return /*#__PURE__*/React.createElement(StyledCard$1, _extends$1({}, nativeProps, {
|
|
11181
11221
|
themeIntent: intent
|
|
11182
11222
|
}), children);
|
|
@@ -11364,7 +11404,7 @@ var CardCarousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
11364
11404
|
}));
|
|
11365
11405
|
});
|
|
11366
11406
|
|
|
11367
|
-
var _excluded$
|
|
11407
|
+
var _excluded$f = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "pageControlPosition"];
|
|
11368
11408
|
function useStateFromProp(initialValue) {
|
|
11369
11409
|
var _useState = useState(initialValue),
|
|
11370
11410
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11389,7 +11429,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
11389
11429
|
shouldShowPagination = _ref$shouldShowPagina === void 0 ? noop : _ref$shouldShowPagina,
|
|
11390
11430
|
_ref$pageControlPosit = _ref.pageControlPosition,
|
|
11391
11431
|
pageControlPosition = _ref$pageControlPosit === void 0 ? 'bottom' : _ref$pageControlPosit,
|
|
11392
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11432
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$f);
|
|
11393
11433
|
useDeprecation("shouldShowPagination prop has been deprecated", shouldShowPagination !== noop);
|
|
11394
11434
|
useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition === 'bottom');
|
|
11395
11435
|
var carouselRef = useRef(null);
|
|
@@ -11706,7 +11746,7 @@ var StyledErrorAndMaxLengthContainer = index$a(View)(function () {
|
|
|
11706
11746
|
};
|
|
11707
11747
|
});
|
|
11708
11748
|
|
|
11709
|
-
var _excluded$
|
|
11749
|
+
var _excluded$e = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "hideCharacterCount", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
|
|
11710
11750
|
var getVariant$1 = function getVariant(_ref) {
|
|
11711
11751
|
var disabled = _ref.disabled,
|
|
11712
11752
|
error = _ref.error,
|
|
@@ -11748,13 +11788,15 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
11748
11788
|
_ref2$loading = _ref2.loading,
|
|
11749
11789
|
loading = _ref2$loading === void 0 ? false : _ref2$loading,
|
|
11750
11790
|
maxLength = _ref2.maxLength,
|
|
11791
|
+
_ref2$hideCharacterCo = _ref2.hideCharacterCount,
|
|
11792
|
+
hideCharacterCount = _ref2$hideCharacterCo === void 0 ? false : _ref2$hideCharacterCo,
|
|
11751
11793
|
helpText = _ref2.helpText,
|
|
11752
11794
|
value = _ref2.value,
|
|
11753
11795
|
defaultValue = _ref2.defaultValue,
|
|
11754
11796
|
renderInputValue = _ref2.renderInputValue,
|
|
11755
11797
|
_ref2$allowFontScalin = _ref2.allowFontScaling,
|
|
11756
11798
|
allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
|
|
11757
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
11799
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$e);
|
|
11758
11800
|
var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
|
|
11759
11801
|
var isEmptyValue = displayText.length === 0;
|
|
11760
11802
|
var actualSuffix = loading ? 'loading' : suffix;
|
|
@@ -11770,7 +11812,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
11770
11812
|
isFocused: isFocused,
|
|
11771
11813
|
isEmptyValue: isEmptyValue
|
|
11772
11814
|
});
|
|
11773
|
-
var shouldShowMaxLength = maxLength !== undefined;
|
|
11815
|
+
var shouldShowMaxLength = maxLength !== undefined && !hideCharacterCount;
|
|
11774
11816
|
var theme = useTheme();
|
|
11775
11817
|
var innerTextInput = React.useRef();
|
|
11776
11818
|
React.useImperativeHandle(ref, function () {
|
|
@@ -12179,11 +12221,11 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
12179
12221
|
}))));
|
|
12180
12222
|
};
|
|
12181
12223
|
|
|
12182
|
-
var _excluded$
|
|
12224
|
+
var _excluded$d = ["variant"];
|
|
12183
12225
|
var DatePicker = function DatePicker(_ref) {
|
|
12184
12226
|
var _ref$variant = _ref.variant,
|
|
12185
12227
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
12186
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
12228
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
12187
12229
|
if (variant === 'calendar') {
|
|
12188
12230
|
return /*#__PURE__*/React.createElement(DatePickerCalendar, props);
|
|
12189
12231
|
}
|
|
@@ -12622,9 +12664,9 @@ var StyledErrorDescription = index$a(Typography.Text)(function (_ref9) {
|
|
|
12622
12664
|
};
|
|
12623
12665
|
});
|
|
12624
12666
|
|
|
12625
|
-
var _excluded$
|
|
12667
|
+
var _excluded$c = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
|
|
12626
12668
|
_excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
12627
|
-
var renderImage = function renderImage(image) {
|
|
12669
|
+
var renderImage$1 = function renderImage(image) {
|
|
12628
12670
|
if ( /*#__PURE__*/isValidElement(image)) {
|
|
12629
12671
|
return /*#__PURE__*/React.cloneElement(image, {
|
|
12630
12672
|
testID: 'error-image'
|
|
@@ -12648,14 +12690,14 @@ var ErrorPage = function ErrorPage(_ref) {
|
|
|
12648
12690
|
onCtaPress = _ref.onCtaPress,
|
|
12649
12691
|
secondaryCtaText = _ref.secondaryCtaText,
|
|
12650
12692
|
onSecondaryCtaPress = _ref.onSecondaryCtaPress,
|
|
12651
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
12693
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$c);
|
|
12652
12694
|
var showCta = ctaText && onCtaPress !== undefined;
|
|
12653
12695
|
var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
|
|
12654
12696
|
var showButtonContainer = showCta || showSecondaryCta;
|
|
12655
12697
|
return /*#__PURE__*/React.createElement(StyledErrorContainer$1, _extends$1({
|
|
12656
12698
|
testID: testID,
|
|
12657
12699
|
themeVariant: variant
|
|
12658
|
-
}, nativeProps), /*#__PURE__*/React.createElement(StyledErrorContent, null, image && /*#__PURE__*/React.createElement(StyledErrorImageContainer, null, renderImage(image)), /*#__PURE__*/React.createElement(StyledErrorTitle, null, title), description && /*#__PURE__*/React.createElement(StyledErrorDescription, null, description)), showButtonContainer && /*#__PURE__*/React.createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React.createElement(StyledErrorButtonPrimary, {
|
|
12700
|
+
}, nativeProps), /*#__PURE__*/React.createElement(StyledErrorContent, null, image && /*#__PURE__*/React.createElement(StyledErrorImageContainer, null, renderImage$1(image)), /*#__PURE__*/React.createElement(StyledErrorTitle, null, title), description && /*#__PURE__*/React.createElement(StyledErrorDescription, null, description)), showButtonContainer && /*#__PURE__*/React.createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React.createElement(StyledErrorButtonPrimary, {
|
|
12659
12701
|
variant: "filled",
|
|
12660
12702
|
text: ctaText,
|
|
12661
12703
|
onPress: onCtaPress
|
|
@@ -12802,11 +12844,11 @@ var StyledFABContainer = index$a(Box)(function (_ref4) {
|
|
|
12802
12844
|
};
|
|
12803
12845
|
});
|
|
12804
12846
|
|
|
12805
|
-
var _excluded$
|
|
12847
|
+
var _excluded$b = ["active"];
|
|
12806
12848
|
var AnimatedIcons = Animated.createAnimatedComponent(StyledFABIcon);
|
|
12807
12849
|
var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
|
|
12808
12850
|
var active = _ref.active,
|
|
12809
|
-
iconProps = _objectWithoutProperties(_ref, _excluded$
|
|
12851
|
+
iconProps = _objectWithoutProperties(_ref, _excluded$b);
|
|
12810
12852
|
var rotateAnimation = useRef(new Animated.Value(active ? 1 : 0));
|
|
12811
12853
|
useEffect(function () {
|
|
12812
12854
|
var animation = Animated.timing(rotateAnimation.current, {
|
|
@@ -13163,10 +13205,10 @@ var ListItem = function ListItem(_ref) {
|
|
|
13163
13205
|
}, prefix && /*#__PURE__*/React.createElement(StyledPrefixContainer$1, null, typeof prefix === 'string' ? /*#__PURE__*/React.createElement(Icon, {
|
|
13164
13206
|
icon: prefix,
|
|
13165
13207
|
intent: disabled ? 'disabled-text' : 'primary'
|
|
13166
|
-
}) : prefix), /*#__PURE__*/React.createElement(StyledTitleContainer$1, null, /*#__PURE__*/React.createElement(Typography.Text, {
|
|
13208
|
+
}) : prefix), /*#__PURE__*/React.createElement(StyledTitleContainer$1, null, typeof title === 'string' ? /*#__PURE__*/React.createElement(Typography.Text, {
|
|
13167
13209
|
intent: "body",
|
|
13168
13210
|
fontSize: "large"
|
|
13169
|
-
}, title), !!subtitle && /*#__PURE__*/React.createElement(Typography.Text, {
|
|
13211
|
+
}, title) : title, !!subtitle && /*#__PURE__*/React.createElement(Typography.Text, {
|
|
13170
13212
|
intent: "subdued",
|
|
13171
13213
|
fontSize: "small"
|
|
13172
13214
|
}, subtitle)), suffix && /*#__PURE__*/React.createElement(StyledSuffixContainer$1, null, typeof suffix === 'string' ? /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -13546,7 +13588,7 @@ var StyledStrokeEnd = index$a(View)(function (_ref6) {
|
|
|
13546
13588
|
};
|
|
13547
13589
|
});
|
|
13548
13590
|
|
|
13549
|
-
var _excluded$
|
|
13591
|
+
var _excluded$a = ["value", "renderValue", "intent", "style", "testID"];
|
|
13550
13592
|
var HalfCircle = function HalfCircle(_ref) {
|
|
13551
13593
|
var type = _ref.type,
|
|
13552
13594
|
themeIntent = _ref.themeIntent;
|
|
@@ -13567,7 +13609,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
13567
13609
|
intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
|
|
13568
13610
|
style = _ref2.style,
|
|
13569
13611
|
testID = _ref2.testID,
|
|
13570
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
13612
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$a);
|
|
13571
13613
|
var theme = useTheme$1();
|
|
13572
13614
|
var radius = theme.__hd__.progress.sizes.circleDiameter / 2;
|
|
13573
13615
|
var progressAnimatedValue = useRef(new Animated.Value(0));
|
|
@@ -13684,14 +13726,14 @@ var StyledInner = index$a(Animated.View)(function (_ref2) {
|
|
|
13684
13726
|
};
|
|
13685
13727
|
});
|
|
13686
13728
|
|
|
13687
|
-
var _excluded$
|
|
13729
|
+
var _excluded$9 = ["value", "intent", "style", "testID"];
|
|
13688
13730
|
var ProgressBar = function ProgressBar(_ref) {
|
|
13689
13731
|
var value = _ref.value,
|
|
13690
13732
|
_ref$intent = _ref.intent,
|
|
13691
13733
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
13692
13734
|
style = _ref.style,
|
|
13693
13735
|
testID = _ref.testID,
|
|
13694
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
13736
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$9);
|
|
13695
13737
|
var _useState = useState(0),
|
|
13696
13738
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13697
13739
|
width = _useState2[0],
|
|
@@ -13882,14 +13924,14 @@ var AnimatedSpinner = function AnimatedSpinner(_ref) {
|
|
|
13882
13924
|
}, dotProps))));
|
|
13883
13925
|
};
|
|
13884
13926
|
|
|
13885
|
-
var _excluded$
|
|
13927
|
+
var _excluded$8 = ["testID", "size", "intent"];
|
|
13886
13928
|
var Spinner = function Spinner(_ref) {
|
|
13887
13929
|
var testID = _ref.testID,
|
|
13888
13930
|
_ref$size = _ref.size,
|
|
13889
13931
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
13890
13932
|
_ref$intent = _ref.intent,
|
|
13891
13933
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
13892
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
13934
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$8);
|
|
13893
13935
|
return /*#__PURE__*/React.createElement(StyledView$1, nativeProps, /*#__PURE__*/React.createElement(StyledSpinnerContainer, {
|
|
13894
13936
|
testID: testID
|
|
13895
13937
|
}, /*#__PURE__*/React.createElement(AnimatedSpinner, {
|
|
@@ -13922,7 +13964,7 @@ var SwipeableAction = function SwipeableAction(_ref) {
|
|
|
13922
13964
|
}, children);
|
|
13923
13965
|
};
|
|
13924
13966
|
|
|
13925
|
-
var _excluded$
|
|
13967
|
+
var _excluded$7 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
|
|
13926
13968
|
var renderActions = function renderActions(actions, width, progress, direction) {
|
|
13927
13969
|
var trans = progress.interpolate({
|
|
13928
13970
|
inputRange: [0, 1],
|
|
@@ -13947,7 +13989,7 @@ var Swipeable = function Swipeable(_ref) {
|
|
|
13947
13989
|
leftActionsWidth = _ref.leftActionsWidth,
|
|
13948
13990
|
rightActions = _ref.rightActions,
|
|
13949
13991
|
rightActionsWidth = _ref.rightActionsWidth,
|
|
13950
|
-
swipeableProps = _objectWithoutProperties(_ref, _excluded$
|
|
13992
|
+
swipeableProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
13951
13993
|
var _useWindowDimensions = useWindowDimensions(),
|
|
13952
13994
|
width = _useWindowDimensions.width;
|
|
13953
13995
|
var swipeableRef = useRef(null);
|
|
@@ -14252,7 +14294,7 @@ var StyledSectionList = index$a(SectionList)(function (_ref4) {
|
|
|
14252
14294
|
};
|
|
14253
14295
|
});
|
|
14254
14296
|
|
|
14255
|
-
var _excluded$
|
|
14297
|
+
var _excluded$6 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
|
|
14256
14298
|
var BaseOptionList = function BaseOptionList(_ref) {
|
|
14257
14299
|
var keyExtractor = _ref.keyExtractor,
|
|
14258
14300
|
loading = _ref.loading,
|
|
@@ -14261,7 +14303,7 @@ var BaseOptionList = function BaseOptionList(_ref) {
|
|
|
14261
14303
|
sections = _ref.sections,
|
|
14262
14304
|
renderItem = _ref.renderItem,
|
|
14263
14305
|
sectionListRef = _ref.sectionListRef,
|
|
14264
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14306
|
+
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
14265
14307
|
var theme = useTheme$1();
|
|
14266
14308
|
var _useState = useState(false),
|
|
14267
14309
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -14330,7 +14372,7 @@ var Option$2 = function Option(_ref) {
|
|
|
14330
14372
|
return highlighted === true ? /*#__PURE__*/React.createElement(List.Item, props) : /*#__PURE__*/React.createElement(List.BasicItem, props);
|
|
14331
14373
|
};
|
|
14332
14374
|
|
|
14333
|
-
var _excluded$
|
|
14375
|
+
var _excluded$5 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
14334
14376
|
var OptionList$1 = function OptionList(_ref) {
|
|
14335
14377
|
var keyExtractor = _ref.keyExtractor,
|
|
14336
14378
|
loading = _ref.loading,
|
|
@@ -14341,7 +14383,7 @@ var OptionList$1 = function OptionList(_ref) {
|
|
|
14341
14383
|
renderOption = _ref.renderOption,
|
|
14342
14384
|
value = _ref.value,
|
|
14343
14385
|
sectionListRef = _ref.sectionListRef,
|
|
14344
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14386
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
14345
14387
|
var renderItem = function renderItem(info) {
|
|
14346
14388
|
var item = info.item;
|
|
14347
14389
|
var selected = value.includes(info.item.value);
|
|
@@ -14529,7 +14571,7 @@ var StyledOptionList = index$a(BaseOptionList)(function (_ref) {
|
|
|
14529
14571
|
};
|
|
14530
14572
|
});
|
|
14531
14573
|
|
|
14532
|
-
var _excluded$
|
|
14574
|
+
var _excluded$4 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
14533
14575
|
var OptionList = function OptionList(_ref) {
|
|
14534
14576
|
var keyExtractor = _ref.keyExtractor,
|
|
14535
14577
|
loading = _ref.loading,
|
|
@@ -14540,7 +14582,7 @@ var OptionList = function OptionList(_ref) {
|
|
|
14540
14582
|
renderOption = _ref.renderOption,
|
|
14541
14583
|
value = _ref.value,
|
|
14542
14584
|
sectionListRef = _ref.sectionListRef,
|
|
14543
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14585
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
14544
14586
|
var renderItem = function renderItem(info) {
|
|
14545
14587
|
var item = info.item;
|
|
14546
14588
|
var selected = item.value === value;
|
|
@@ -14705,7 +14747,7 @@ var StyledGradientContainer = index$a(Box)(function (_ref2) {
|
|
|
14705
14747
|
};
|
|
14706
14748
|
});
|
|
14707
14749
|
|
|
14708
|
-
var _excluded$
|
|
14750
|
+
var _excluded$3 = ["intent", "variant", "style", "onLayout"];
|
|
14709
14751
|
var AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);
|
|
14710
14752
|
var gradientPositions = {
|
|
14711
14753
|
start: {
|
|
@@ -14737,7 +14779,7 @@ var Skeleton = function Skeleton(_ref) {
|
|
|
14737
14779
|
variant = _ref$variant === void 0 ? 'rounded' : _ref$variant,
|
|
14738
14780
|
style = _ref.style,
|
|
14739
14781
|
onLayout = _ref.onLayout,
|
|
14740
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
14782
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
14741
14783
|
var theme = useTheme();
|
|
14742
14784
|
var colors = useMemo(function () {
|
|
14743
14785
|
return getGradientColors(theme, intent);
|
|
@@ -14801,6 +14843,134 @@ var Skeleton = function Skeleton(_ref) {
|
|
|
14801
14843
|
})));
|
|
14802
14844
|
};
|
|
14803
14845
|
|
|
14846
|
+
var StyledSuccessContainer = index$a(View)(function (_ref) {
|
|
14847
|
+
var theme = _ref.theme,
|
|
14848
|
+
themeVariant = _ref.themeVariant;
|
|
14849
|
+
return {
|
|
14850
|
+
display: 'flex',
|
|
14851
|
+
flex: 1,
|
|
14852
|
+
flexDirection: 'column',
|
|
14853
|
+
backgroundColor: themeVariant === 'in-page' ? theme.__hd__.success.colors.inPageBackground : theme.__hd__.success.colors.fullScreenBackground
|
|
14854
|
+
};
|
|
14855
|
+
});
|
|
14856
|
+
var StyledSuccessImage = index$a(Image)(function (_ref2) {
|
|
14857
|
+
var theme = _ref2.theme;
|
|
14858
|
+
return {
|
|
14859
|
+
marginBottom: theme.__hd__.success.space.imageMarginBottom,
|
|
14860
|
+
width: theme.__hd__.success.sizes.image,
|
|
14861
|
+
height: theme.__hd__.success.sizes.image,
|
|
14862
|
+
resizeMode: 'contain'
|
|
14863
|
+
};
|
|
14864
|
+
});
|
|
14865
|
+
var StyledSuccessContent = index$a(View)(function (_ref3) {
|
|
14866
|
+
var theme = _ref3.theme;
|
|
14867
|
+
return {
|
|
14868
|
+
display: 'flex',
|
|
14869
|
+
flex: 1,
|
|
14870
|
+
flexDirection: 'column',
|
|
14871
|
+
justifyContent: 'center',
|
|
14872
|
+
alignItems: 'center',
|
|
14873
|
+
padding: theme.__hd__.success.space.wrapperPadding
|
|
14874
|
+
};
|
|
14875
|
+
});
|
|
14876
|
+
var StyledSuccessImageContainer = index$a(View)(function (_ref4) {
|
|
14877
|
+
var theme = _ref4.theme;
|
|
14878
|
+
return {
|
|
14879
|
+
marginBottom: theme.__hd__.success.space.imageMarginBottom,
|
|
14880
|
+
width: theme.__hd__.success.sizes.image,
|
|
14881
|
+
height: theme.__hd__.success.sizes.image
|
|
14882
|
+
};
|
|
14883
|
+
});
|
|
14884
|
+
var StyledSuccessTitle = index$a(Typography.Text)(function (_ref5) {
|
|
14885
|
+
var theme = _ref5.theme;
|
|
14886
|
+
return {
|
|
14887
|
+
fontFamily: theme.__hd__.success.fonts.title,
|
|
14888
|
+
fontSize: theme.__hd__.success.fontSizes.title,
|
|
14889
|
+
textAlign: 'center',
|
|
14890
|
+
marginBottom: theme.__hd__.success.space.titleMarginBottom,
|
|
14891
|
+
color: theme.__hd__.success.colors.title
|
|
14892
|
+
};
|
|
14893
|
+
});
|
|
14894
|
+
var StyledSuccessDescription = index$a(Typography.Text)(function (_ref6) {
|
|
14895
|
+
var theme = _ref6.theme;
|
|
14896
|
+
return {
|
|
14897
|
+
fontFamily: theme.__hd__.success.fonts.description,
|
|
14898
|
+
fontSize: theme.__hd__.success.fontSizes.description,
|
|
14899
|
+
textAlign: 'center',
|
|
14900
|
+
color: theme.__hd__.success.colors.description
|
|
14901
|
+
};
|
|
14902
|
+
});
|
|
14903
|
+
var StyledSuccessButtonContainer = index$a(View)(function (_ref7) {
|
|
14904
|
+
var theme = _ref7.theme;
|
|
14905
|
+
return {
|
|
14906
|
+
display: 'flex',
|
|
14907
|
+
flexDirection: 'column',
|
|
14908
|
+
justifyContent: 'center',
|
|
14909
|
+
alignItems: 'center',
|
|
14910
|
+
paddingHorizontal: theme.__hd__.success.space.button.wrapperHorizontalPadding,
|
|
14911
|
+
paddingVertical: theme.__hd__.success.space.button.wrapperVerticalPadding
|
|
14912
|
+
};
|
|
14913
|
+
});
|
|
14914
|
+
var StyledSuccessButtonPrimary = index$a(CompoundButton)(function (_ref8) {
|
|
14915
|
+
var theme = _ref8.theme;
|
|
14916
|
+
return {
|
|
14917
|
+
padding: theme.__hd__.success.space.button.padding
|
|
14918
|
+
};
|
|
14919
|
+
});
|
|
14920
|
+
var StyledSuccessModal = index$a(Modal)({
|
|
14921
|
+
height: '100%',
|
|
14922
|
+
width: '100%'
|
|
14923
|
+
});
|
|
14924
|
+
|
|
14925
|
+
var _excluded$2 = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress"];
|
|
14926
|
+
var renderImage = function renderImage(image) {
|
|
14927
|
+
if ( /*#__PURE__*/isValidElement(image)) {
|
|
14928
|
+
return /*#__PURE__*/React.cloneElement(image, {
|
|
14929
|
+
testID: 'success-image'
|
|
14930
|
+
});
|
|
14931
|
+
}
|
|
14932
|
+
return /*#__PURE__*/React.createElement(StyledSuccessImage, {
|
|
14933
|
+
source: typeof image === 'string' ? {
|
|
14934
|
+
uri: image
|
|
14935
|
+
} : image,
|
|
14936
|
+
testID: "success-image"
|
|
14937
|
+
});
|
|
14938
|
+
};
|
|
14939
|
+
var SuccessPage = function SuccessPage(_ref) {
|
|
14940
|
+
var _ref$variant = _ref.variant,
|
|
14941
|
+
variant = _ref$variant === void 0 ? 'in-page' : _ref$variant,
|
|
14942
|
+
title = _ref.title,
|
|
14943
|
+
description = _ref.description,
|
|
14944
|
+
image = _ref.image,
|
|
14945
|
+
testID = _ref.testID,
|
|
14946
|
+
ctaText = _ref.ctaText,
|
|
14947
|
+
_ref$onCtaPress = _ref.onCtaPress,
|
|
14948
|
+
onCtaPress = _ref$onCtaPress === void 0 ? noop$1 : _ref$onCtaPress,
|
|
14949
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
14950
|
+
return /*#__PURE__*/React.createElement(StyledSuccessContainer, _extends$1({
|
|
14951
|
+
testID: testID,
|
|
14952
|
+
themeVariant: variant
|
|
14953
|
+
}, nativeProps), /*#__PURE__*/React.createElement(StyledSuccessContent, null, !!image && /*#__PURE__*/React.createElement(StyledSuccessImageContainer, null, renderImage(image)), /*#__PURE__*/React.createElement(StyledSuccessTitle, null, title), !!description && /*#__PURE__*/React.createElement(StyledSuccessDescription, null, description)), !!ctaText && /*#__PURE__*/React.createElement(StyledSuccessButtonContainer, null, /*#__PURE__*/React.createElement(StyledSuccessButtonPrimary, {
|
|
14954
|
+
text: ctaText,
|
|
14955
|
+
onPress: onCtaPress
|
|
14956
|
+
})));
|
|
14957
|
+
};
|
|
14958
|
+
/**
|
|
14959
|
+
* Renders success page
|
|
14960
|
+
*
|
|
14961
|
+
* @param {SuccessProps} props
|
|
14962
|
+
* @return {*} {ReactElement}
|
|
14963
|
+
*/
|
|
14964
|
+
var Success = function Success(props) {
|
|
14965
|
+
var variant = props.variant;
|
|
14966
|
+
if (variant === 'full-screen') {
|
|
14967
|
+
return /*#__PURE__*/React.createElement(StyledSuccessModal, {
|
|
14968
|
+
animationType: "slide"
|
|
14969
|
+
}, /*#__PURE__*/React.createElement(SuccessPage, props));
|
|
14970
|
+
}
|
|
14971
|
+
return /*#__PURE__*/React.createElement(SuccessPage, props);
|
|
14972
|
+
};
|
|
14973
|
+
|
|
14804
14974
|
var StyledWrapper$1 = index$a(View)(function (_ref) {
|
|
14805
14975
|
var theme = _ref.theme;
|
|
14806
14976
|
return {
|
|
@@ -15431,7 +15601,7 @@ var index$2 = Object.assign(Tabs, {
|
|
|
15431
15601
|
|
|
15432
15602
|
var getFilledStyles = function getFilledStyles(themeIntent, theme) {
|
|
15433
15603
|
return {
|
|
15434
|
-
textColor: theme.__hd__.tag.colors
|
|
15604
|
+
textColor: theme.__hd__.tag.colors[themeIntent],
|
|
15435
15605
|
borderColor: theme.__hd__.tag.colors["".concat(themeIntent, "Background")],
|
|
15436
15606
|
backgroundColor: theme.__hd__.tag.colors["".concat(themeIntent, "Background")]
|
|
15437
15607
|
};
|
|
@@ -32445,4 +32615,4 @@ var index = Object.assign(RichTextEditor$1, {
|
|
|
32445
32615
|
Toolbar: EditorToolbar
|
|
32446
32616
|
});
|
|
32447
32617
|
|
|
32448
|
-
export { Accordion, Alert, Attachment, index$9 as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, Card$1 as Card, index$8 as Carousel, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$7 as Drawer, Empty, Error$1 as Error, index$6 as FAB, Icon, Image, List, PageControl, PinInput, Progress, CompoundRadio as Radio, RefreshControl, index as RichTextEditor, SectionHeading, index$4 as Select, Skeleton, Slider, Spinner, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, getTheme$1 as getTheme, jobsSystemPalette, scale, swagDarkSystemPalette, swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };
|
|
32618
|
+
export { Accordion, Alert, Attachment, index$9 as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, Card$1 as Card, index$8 as Carousel, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$7 as Drawer, Empty, Error$1 as Error, index$6 as FAB, Icon, Image, List, PageControl, PinInput, Progress, CompoundRadio as Radio, RefreshControl, index as RichTextEditor, SectionHeading, index$4 as Select, Skeleton, Slider, Spinner, Success, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, getTheme$1 as getTheme, jobsSystemPalette, scale, swagDarkSystemPalette, swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };
|