@hero-design/rn 8.71.0 → 8.72.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 +3 -3
- package/CHANGELOG.md +23 -0
- package/es/index.js +353 -208
- package/lib/index.js +353 -208
- package/package.json +1 -1
- package/src/components/Accordion/AccordionItem.tsx +1 -1
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -8
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/Badge/StyledBadge.tsx +17 -2
- package/src/components/Badge/__tests__/Badge.spec.tsx +15 -0
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +187 -0
- package/src/components/Badge/index.tsx +20 -36
- package/src/components/Badge/types.ts +55 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +3 -3
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +7 -7
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +6 -6
- package/src/components/FAB/FAB.tsx +6 -1
- package/src/components/FAB/Pair/StyledFAB.tsx +19 -0
- package/src/components/FAB/Pair/__tests__/__snapshots__/index.spec.tsx.snap +276 -0
- package/src/components/FAB/Pair/__tests__/index.spec.tsx +39 -0
- package/src/components/FAB/Pair/index.tsx +46 -0
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +31 -14
- package/src/components/FAB/index.tsx +3 -1
- package/src/components/Progress/ProgressStep.tsx +3 -1
- package/src/components/Progress/StyledStep.tsx +13 -11
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +215 -4
- package/src/components/Progress/__tests__/index.spec.js +16 -4
- package/src/components/Search/SearchOneLine.tsx +7 -1
- package/src/components/Search/SearchSuffixIcon.tsx +12 -1
- package/src/components/Search/SearchTwoLine.tsx +7 -1
- package/src/components/Search/StyledSearch.tsx +42 -16
- package/src/components/Search/__tests__/SearchOneLine.spec.tsx +30 -0
- package/src/components/Search/__tests__/SearchTwoLine.spec.tsx +15 -0
- package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +166 -10
- package/src/components/Search/__tests__/__snapshots__/SearchSuffixIcon.spec.tsx.snap +3 -0
- package/src/components/Search/__tests__/__snapshots__/SearchTwoLine.spec.tsx.snap +182 -2
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +1 -1
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +9 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +6 -0
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +3 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +9 -0
- package/src/components/Toolbar/StyledToolbar.tsx +11 -0
- package/src/components/Toolbar/ToolbarItem.tsx +3 -3
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +24 -4
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +46 -9
- package/src/theme/components/badge.ts +10 -1
- package/src/theme/components/button.ts +2 -2
- package/src/theme/components/fab.ts +3 -0
- package/src/theme/components/search.ts +30 -5
- package/src/theme/components/switch.ts +2 -2
- package/src/theme/components/toolbar.ts +1 -1
- package/stats/8.72.0/rn-stats.html +4844 -0
- package/types/components/Badge/StyledBadge.d.ts +9 -1
- package/types/components/Badge/index.d.ts +3 -34
- package/types/components/Badge/types.d.ts +53 -0
- package/types/components/FAB/Pair/StyledFAB.d.ts +12 -0
- package/types/components/FAB/Pair/index.d.ts +16 -0
- package/types/components/FAB/index.d.ts +1 -0
- package/types/components/Progress/StyledStep.d.ts +2 -0
- package/types/components/Search/SearchOneLine.d.ts +5 -0
- package/types/components/Search/SearchTwoLine.d.ts +5 -0
- package/types/components/Search/StyledSearch.d.ts +7 -2
- package/types/components/Toolbar/StyledToolbar.d.ts +9 -2
- package/types/theme/components/badge.d.ts +8 -0
- package/types/theme/components/fab.d.ts +3 -0
- package/types/theme/components/search.d.ts +31 -5
package/lib/index.js
CHANGED
|
@@ -2334,7 +2334,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
|
|
|
2334
2334
|
success: theme.colors.onSuccessSurface,
|
|
2335
2335
|
warning: theme.colors.onWarningSurface,
|
|
2336
2336
|
archived: theme.colors.onArchivedSurface,
|
|
2337
|
-
text: theme.colors.onDarkGlobalSurface
|
|
2337
|
+
text: theme.colors.onDarkGlobalSurface,
|
|
2338
|
+
border: theme.colors.defaultGlobalSurface
|
|
2338
2339
|
};
|
|
2339
2340
|
var fonts = {
|
|
2340
2341
|
medium: theme.fonts.neutral.regular,
|
|
@@ -2342,7 +2343,11 @@ var getBadgeTheme = function getBadgeTheme(theme) {
|
|
|
2342
2343
|
};
|
|
2343
2344
|
var fontSizes = {
|
|
2344
2345
|
medium: theme.fontSizes.small,
|
|
2345
|
-
small: 8
|
|
2346
|
+
small: 8,
|
|
2347
|
+
icon: {
|
|
2348
|
+
medium: theme.fontSizes.small,
|
|
2349
|
+
small: 8
|
|
2350
|
+
}
|
|
2346
2351
|
};
|
|
2347
2352
|
var lineHeights = {
|
|
2348
2353
|
medium: theme.lineHeights.small,
|
|
@@ -2360,6 +2365,9 @@ var getBadgeTheme = function getBadgeTheme(theme) {
|
|
|
2360
2365
|
statusHeight: theme.sizes.small,
|
|
2361
2366
|
statusWidth: theme.sizes.small
|
|
2362
2367
|
};
|
|
2368
|
+
var borderWidths = {
|
|
2369
|
+
"default": theme.borderWidths.medium
|
|
2370
|
+
};
|
|
2363
2371
|
var space = {
|
|
2364
2372
|
medium: {
|
|
2365
2373
|
horizontalPadding: theme.space.small
|
|
@@ -2376,7 +2384,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
|
|
|
2376
2384
|
fontSizes: fontSizes,
|
|
2377
2385
|
sizes: sizes,
|
|
2378
2386
|
space: space,
|
|
2379
|
-
lineHeights: lineHeights
|
|
2387
|
+
lineHeights: lineHeights,
|
|
2388
|
+
borderWidths: borderWidths
|
|
2380
2389
|
};
|
|
2381
2390
|
};
|
|
2382
2391
|
|
|
@@ -2481,7 +2490,7 @@ var getButtonTheme = function getButtonTheme(theme) {
|
|
|
2481
2490
|
};
|
|
2482
2491
|
var colors = {
|
|
2483
2492
|
primary: theme.colors.primary,
|
|
2484
|
-
secondary: theme.colors.
|
|
2493
|
+
secondary: theme.colors.mutedOnDefaultGlobalSurface,
|
|
2485
2494
|
danger: theme.colors.onErrorSurface,
|
|
2486
2495
|
defaultText: theme.colors.onDefaultGlobalSurface,
|
|
2487
2496
|
disabledText: theme.colors.disabledOnDefaultGlobalSurface,
|
|
@@ -2498,7 +2507,7 @@ var getButtonTheme = function getButtonTheme(theme) {
|
|
|
2498
2507
|
outlinedSecondary: theme.colors.highlightedSurface,
|
|
2499
2508
|
outlineDanger: theme.colors.errorSurface,
|
|
2500
2509
|
textPrimary: theme.colors.highlightedSurface,
|
|
2501
|
-
textSecondary: theme.colors.
|
|
2510
|
+
textSecondary: theme.colors.neutralGlobalSurface,
|
|
2502
2511
|
textDanger: theme.colors.errorSurface
|
|
2503
2512
|
}
|
|
2504
2513
|
};
|
|
@@ -2865,7 +2874,9 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
2865
2874
|
width: theme.sizes.xxxxxlarge,
|
|
2866
2875
|
height: theme.sizes.xxxxxlarge,
|
|
2867
2876
|
iconContainerWidth: theme.sizes.large,
|
|
2868
|
-
iconContainerHeight: theme.sizes.large
|
|
2877
|
+
iconContainerHeight: theme.sizes.large,
|
|
2878
|
+
fabPairHeight: theme.sizes.xxxlarge,
|
|
2879
|
+
fabPairIconOnlyWidth: theme.sizes.xxxlarge
|
|
2869
2880
|
};
|
|
2870
2881
|
var fonts = {
|
|
2871
2882
|
actionItemText: theme.fonts.neutral.regular,
|
|
@@ -2895,7 +2906,8 @@ var getFABTheme = function getFABTheme(theme) {
|
|
|
2895
2906
|
buttonMarginTop: theme.space.large,
|
|
2896
2907
|
buttonMarginRight: theme.space.large,
|
|
2897
2908
|
containerPadding: theme.space.large - theme.space.xsmall,
|
|
2898
|
-
titleMarginHorizontal: theme.space.small
|
|
2909
|
+
titleMarginHorizontal: theme.space.small,
|
|
2910
|
+
fabPairMarginRight: theme.space.small
|
|
2899
2911
|
};
|
|
2900
2912
|
var radii = {
|
|
2901
2913
|
actionItem: theme.radii.rounded
|
|
@@ -3382,9 +3394,9 @@ var getSwitchTheme = function getSwitchTheme(theme) {
|
|
|
3382
3394
|
checked: theme.colors.primary,
|
|
3383
3395
|
unchecked: theme.colors.inactiveOnDefaultGlobalSurface,
|
|
3384
3396
|
'disabled-checked': theme.colors.highlightedSurface,
|
|
3385
|
-
'disabled-unchecked': theme.colors.
|
|
3397
|
+
'disabled-unchecked': theme.colors.mutedOnDefaultGlobalSurface
|
|
3386
3398
|
},
|
|
3387
|
-
thumb: theme.colors.
|
|
3399
|
+
thumb: theme.colors.onDarkGlobalSurface,
|
|
3388
3400
|
selector: {
|
|
3389
3401
|
background: theme.colors.defaultGlobalSurface,
|
|
3390
3402
|
textBackground: theme.colors.decorativePrimarySurface
|
|
@@ -3655,7 +3667,7 @@ var getToolbarTheme = function getToolbarTheme(theme) {
|
|
|
3655
3667
|
background: theme.colors.defaultGlobalSurface,
|
|
3656
3668
|
border: theme.colors.secondaryOutline,
|
|
3657
3669
|
primary: theme.colors.primary,
|
|
3658
|
-
secondary: theme.colors.
|
|
3670
|
+
secondary: theme.colors.mutedOnDefaultGlobalSurface,
|
|
3659
3671
|
info: theme.colors.info,
|
|
3660
3672
|
success: theme.colors.success,
|
|
3661
3673
|
danger: theme.colors.warning,
|
|
@@ -3859,15 +3871,32 @@ var getTypographyTheme = function getTypographyTheme(theme) {
|
|
|
3859
3871
|
|
|
3860
3872
|
var getSearchTheme = function getSearchTheme(theme) {
|
|
3861
3873
|
var colors = {
|
|
3862
|
-
|
|
3863
|
-
|
|
3874
|
+
basic: {
|
|
3875
|
+
containerBackground: theme.colors.neutralGlobalSurface,
|
|
3876
|
+
border: theme.colors.neutralGlobalSurface,
|
|
3877
|
+
focusedBorder: theme.colors.primaryOutline
|
|
3878
|
+
},
|
|
3879
|
+
reversed: {
|
|
3880
|
+
containerBackground: theme.colors.defaultGlobalSurface,
|
|
3881
|
+
border: theme.colors.secondaryOutline,
|
|
3882
|
+
focusedBorder: theme.colors.primaryOutline
|
|
3883
|
+
},
|
|
3884
|
+
suffixBackground: theme.colors.defaultGlobalSurface,
|
|
3864
3885
|
text: theme.colors.onDefaultGlobalSurface,
|
|
3865
|
-
|
|
3886
|
+
shadow: theme.colors.primaryOutline
|
|
3887
|
+
};
|
|
3888
|
+
var shadows = {
|
|
3889
|
+
offset: theme.shadows["default"].shadowOffset,
|
|
3890
|
+
opacity: theme.shadows["default"].shadowOpacity,
|
|
3891
|
+
radius: theme.shadows["default"].shadowRadius,
|
|
3892
|
+
elevation: theme.shadows["default"].elevation,
|
|
3893
|
+
color: theme.shadows["default"].shadowColor
|
|
3866
3894
|
};
|
|
3867
3895
|
var space = {
|
|
3868
3896
|
containerHorizontalPadding: theme.space.small,
|
|
3869
3897
|
containerVerticalPadding: theme.space.small,
|
|
3870
3898
|
inputHorizontalMargin: theme.space.small,
|
|
3899
|
+
inputVerticalPadding: theme.space.xxsmall,
|
|
3871
3900
|
prefixHorizontalPadding: theme.space.xsmall,
|
|
3872
3901
|
surfixPadding: theme.space.small,
|
|
3873
3902
|
badgeTop: -theme.space.xxsmall,
|
|
@@ -3881,8 +3910,14 @@ var getSearchTheme = function getSearchTheme(theme) {
|
|
|
3881
3910
|
};
|
|
3882
3911
|
var borderWidths = {
|
|
3883
3912
|
container: {
|
|
3884
|
-
|
|
3885
|
-
|
|
3913
|
+
basic: {
|
|
3914
|
+
normal: theme.borderWidths.medium,
|
|
3915
|
+
focused: theme.borderWidths.medium
|
|
3916
|
+
},
|
|
3917
|
+
reversed: {
|
|
3918
|
+
normal: theme.borderWidths.base,
|
|
3919
|
+
focused: theme.borderWidths.medium
|
|
3920
|
+
}
|
|
3886
3921
|
}
|
|
3887
3922
|
};
|
|
3888
3923
|
var radii = {
|
|
@@ -3899,7 +3934,8 @@ var getSearchTheme = function getSearchTheme(theme) {
|
|
|
3899
3934
|
fontSizes: fontSizes,
|
|
3900
3935
|
borderWidths: borderWidths,
|
|
3901
3936
|
radii: radii,
|
|
3902
|
-
sizes: sizes
|
|
3937
|
+
sizes: sizes,
|
|
3938
|
+
shadows: shadows
|
|
3903
3939
|
};
|
|
3904
3940
|
};
|
|
3905
3941
|
|
|
@@ -7032,7 +7068,7 @@ var StyledText$3 = index$9(reactNative.Text)(function (_ref) {
|
|
|
7032
7068
|
});
|
|
7033
7069
|
});
|
|
7034
7070
|
|
|
7035
|
-
var _excluded$
|
|
7071
|
+
var _excluded$H = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
|
|
7036
7072
|
var Text = function Text(_ref) {
|
|
7037
7073
|
var children = _ref.children,
|
|
7038
7074
|
_ref$fontSize = _ref.fontSize,
|
|
@@ -7045,7 +7081,7 @@ var Text = function Text(_ref) {
|
|
|
7045
7081
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
7046
7082
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
7047
7083
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
7048
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7084
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$H);
|
|
7049
7085
|
useDeprecation('Typography.Text is deprecated and will be removed in the next major release, please refer to https://design.employmenthero.com/mobile/Components/typography for the appropriate alternatives.');
|
|
7050
7086
|
return /*#__PURE__*/React__namespace.default.createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
7051
7087
|
themeFontSize: fontSize,
|
|
@@ -7075,7 +7111,7 @@ var StyledCaption = index$9(reactNative.Text)(function (_ref) {
|
|
|
7075
7111
|
};
|
|
7076
7112
|
});
|
|
7077
7113
|
|
|
7078
|
-
var _excluded$
|
|
7114
|
+
var _excluded$G = ["children", "fontWeight", "intent", "allowFontScaling"];
|
|
7079
7115
|
var Caption = function Caption(_ref) {
|
|
7080
7116
|
var children = _ref.children,
|
|
7081
7117
|
_ref$fontWeight = _ref.fontWeight,
|
|
@@ -7084,7 +7120,7 @@ var Caption = function Caption(_ref) {
|
|
|
7084
7120
|
intent = _ref$intent === void 0 ? 'body' : _ref$intent,
|
|
7085
7121
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
7086
7122
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
7087
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7123
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$G);
|
|
7088
7124
|
return /*#__PURE__*/React__namespace.default.createElement(StyledCaption, _extends$1({}, nativeProps, {
|
|
7089
7125
|
themeFontWeight: fontWeight,
|
|
7090
7126
|
themeIntent: intent,
|
|
@@ -7092,7 +7128,7 @@ var Caption = function Caption(_ref) {
|
|
|
7092
7128
|
}), children);
|
|
7093
7129
|
};
|
|
7094
7130
|
|
|
7095
|
-
var StyledLabel = index$9(reactNative.Text)(function (_ref) {
|
|
7131
|
+
var StyledLabel$1 = index$9(reactNative.Text)(function (_ref) {
|
|
7096
7132
|
var themeIntent = _ref.themeIntent,
|
|
7097
7133
|
theme = _ref.theme;
|
|
7098
7134
|
return {
|
|
@@ -7103,15 +7139,15 @@ var StyledLabel = index$9(reactNative.Text)(function (_ref) {
|
|
|
7103
7139
|
};
|
|
7104
7140
|
});
|
|
7105
7141
|
|
|
7106
|
-
var _excluded$
|
|
7142
|
+
var _excluded$F = ["children", "intent", "allowFontScaling"];
|
|
7107
7143
|
var Label = function Label(_ref) {
|
|
7108
7144
|
var children = _ref.children,
|
|
7109
7145
|
_ref$intent = _ref.intent,
|
|
7110
7146
|
intent = _ref$intent === void 0 ? 'body' : _ref$intent,
|
|
7111
7147
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
7112
7148
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
7113
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7114
|
-
return /*#__PURE__*/React__namespace.default.createElement(StyledLabel, _extends$1({}, nativeProps, {
|
|
7149
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$F);
|
|
7150
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledLabel$1, _extends$1({}, nativeProps, {
|
|
7115
7151
|
themeIntent: intent,
|
|
7116
7152
|
allowFontScaling: allowFontScaling
|
|
7117
7153
|
}), children);
|
|
@@ -7131,7 +7167,7 @@ var StyledTitle$1 = index$9(reactNative.Text)(function (_ref) {
|
|
|
7131
7167
|
};
|
|
7132
7168
|
});
|
|
7133
7169
|
|
|
7134
|
-
var _excluded$
|
|
7170
|
+
var _excluded$E = ["children", "intent", "allowFontScaling", "level", "typeface"];
|
|
7135
7171
|
var Title = function Title(_ref) {
|
|
7136
7172
|
var children = _ref.children,
|
|
7137
7173
|
_ref$intent = _ref.intent,
|
|
@@ -7142,7 +7178,7 @@ var Title = function Title(_ref) {
|
|
|
7142
7178
|
level = _ref$level === void 0 ? 'h1' : _ref$level,
|
|
7143
7179
|
_ref$typeface = _ref.typeface,
|
|
7144
7180
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
7145
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7181
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$E);
|
|
7146
7182
|
return /*#__PURE__*/React__namespace.default.createElement(StyledTitle$1, _extends$1({}, nativeProps, {
|
|
7147
7183
|
themeLevel: level,
|
|
7148
7184
|
themeTypeface: typeface,
|
|
@@ -7177,7 +7213,7 @@ var StyledBody$1 = index$9(reactNative.Text)(function (_ref) {
|
|
|
7177
7213
|
};
|
|
7178
7214
|
});
|
|
7179
7215
|
|
|
7180
|
-
var _excluded$
|
|
7216
|
+
var _excluded$D = ["children", "intent", "allowFontScaling", "typeface", "variant"];
|
|
7181
7217
|
var Body = function Body(_ref) {
|
|
7182
7218
|
var children = _ref.children,
|
|
7183
7219
|
_ref$intent = _ref.intent,
|
|
@@ -7188,7 +7224,7 @@ var Body = function Body(_ref) {
|
|
|
7188
7224
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
7189
7225
|
_ref$variant = _ref.variant,
|
|
7190
7226
|
variant = _ref$variant === void 0 ? 'regular' : _ref$variant,
|
|
7191
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7227
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$D);
|
|
7192
7228
|
return /*#__PURE__*/React__namespace.default.createElement(StyledBody$1, _extends$1({}, nativeProps, {
|
|
7193
7229
|
themeTypeface: typeface,
|
|
7194
7230
|
themeIntent: intent,
|
|
@@ -7755,10 +7791,10 @@ var StyledHeroIcon = index$9(HeroIcon)(function (_ref) {
|
|
|
7755
7791
|
};
|
|
7756
7792
|
});
|
|
7757
7793
|
|
|
7758
|
-
var _excluded$
|
|
7794
|
+
var _excluded$C = ["style"];
|
|
7759
7795
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
7760
7796
|
var style = _ref.style,
|
|
7761
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
7797
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$C);
|
|
7762
7798
|
var rotateAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
7763
7799
|
React.useEffect(function () {
|
|
7764
7800
|
var animation = reactNative.Animated.loop(reactNative.Animated.timing(rotateAnimation.current, {
|
|
@@ -7856,14 +7892,14 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
7856
7892
|
variant: "regular-bold"
|
|
7857
7893
|
}, header) : header, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
7858
7894
|
icon: open ? 'arrow-up' : 'arrow-down',
|
|
7859
|
-
intent: "
|
|
7895
|
+
intent: "primary",
|
|
7860
7896
|
size: "small"
|
|
7861
7897
|
})), /*#__PURE__*/React__namespace.default.createElement(StyledCollapse, {
|
|
7862
7898
|
open: open
|
|
7863
7899
|
}, content));
|
|
7864
7900
|
};
|
|
7865
7901
|
|
|
7866
|
-
var _excluded$
|
|
7902
|
+
var _excluded$B = ["key"];
|
|
7867
7903
|
var Accordion = function Accordion(_ref) {
|
|
7868
7904
|
var items = _ref.items,
|
|
7869
7905
|
activeItemKey = _ref.activeItemKey,
|
|
@@ -7884,7 +7920,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
7884
7920
|
testID: testID
|
|
7885
7921
|
}, items.map(function (_ref2, index) {
|
|
7886
7922
|
var key = _ref2.key,
|
|
7887
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
7923
|
+
props = _objectWithoutProperties(_ref2, _excluded$B);
|
|
7888
7924
|
var open = _activeItemKey === key;
|
|
7889
7925
|
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, {
|
|
7890
7926
|
key: key
|
|
@@ -7919,7 +7955,7 @@ var IconContainer$1 = index$9(reactNative.View)(function (_ref2) {
|
|
|
7919
7955
|
paddingLeft: theme.__hd__.alert.space.iconLeftPadding
|
|
7920
7956
|
};
|
|
7921
7957
|
});
|
|
7922
|
-
var StyledIcon$
|
|
7958
|
+
var StyledIcon$2 = index$9(Icon)(function (_ref3) {
|
|
7923
7959
|
var theme = _ref3.theme,
|
|
7924
7960
|
themeIntent = _ref3.themeIntent;
|
|
7925
7961
|
return {
|
|
@@ -7978,7 +8014,7 @@ var AlertIcon = function AlertIcon(_ref) {
|
|
|
7978
8014
|
intent = _ref.intent;
|
|
7979
8015
|
return icon ? /*#__PURE__*/React__namespace.default.createElement(IconContainer$1, {
|
|
7980
8016
|
testID: "alert-left-icon"
|
|
7981
|
-
}, /*#__PURE__*/React__namespace.default.createElement(StyledIcon$
|
|
8017
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledIcon$2, {
|
|
7982
8018
|
icon: icon,
|
|
7983
8019
|
size: "small",
|
|
7984
8020
|
themeIntent: intent
|
|
@@ -8019,7 +8055,7 @@ var Alert = function Alert(_ref2) {
|
|
|
8019
8055
|
}, typeof actionLabel === 'string' ? /*#__PURE__*/React__namespace.default.createElement(StyledBody, {
|
|
8020
8056
|
variant: "small-bold",
|
|
8021
8057
|
themeIntent: intent
|
|
8022
|
-
}, actionLabel) : /*#__PURE__*/React__namespace.default.createElement(StyledIcon$
|
|
8058
|
+
}, actionLabel) : /*#__PURE__*/React__namespace.default.createElement(StyledIcon$2, {
|
|
8023
8059
|
icon: "cancel",
|
|
8024
8060
|
size: "small",
|
|
8025
8061
|
themeIntent: intent
|
|
@@ -8378,7 +8414,7 @@ var borderWidths = {
|
|
|
8378
8414
|
var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
|
|
8379
8415
|
var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
|
|
8380
8416
|
|
|
8381
|
-
var _excluded$
|
|
8417
|
+
var _excluded$A = ["theme"];
|
|
8382
8418
|
var getThemeValue = function getThemeValue(theme, key, props) {
|
|
8383
8419
|
var propConfig = config[key];
|
|
8384
8420
|
var propValue = props[key];
|
|
@@ -8405,18 +8441,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
|
|
|
8405
8441
|
var configKeys = Object.keys(config);
|
|
8406
8442
|
var StyledBox = index$9(reactNative.View)(function (_ref5) {
|
|
8407
8443
|
var theme = _ref5.theme,
|
|
8408
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
8444
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$A);
|
|
8409
8445
|
var styleProps = pick(configKeys, otherProps);
|
|
8410
8446
|
var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
|
|
8411
8447
|
return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
|
|
8412
8448
|
});
|
|
8413
8449
|
|
|
8414
|
-
var _excluded$
|
|
8450
|
+
var _excluded$z = ["children", "style", "testID"];
|
|
8415
8451
|
var Box = function Box(_ref) {
|
|
8416
8452
|
var children = _ref.children,
|
|
8417
8453
|
style = _ref.style,
|
|
8418
8454
|
testID = _ref.testID,
|
|
8419
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
8455
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$z);
|
|
8420
8456
|
return /*#__PURE__*/React__namespace.default.createElement(StyledBox, _extends$1({}, otherProps, {
|
|
8421
8457
|
style: style,
|
|
8422
8458
|
testID: testID
|
|
@@ -8597,6 +8633,7 @@ var StyledView$2 = index$9(reactNative.Animated.View)(function (_ref) {
|
|
|
8597
8633
|
var themeIntent = _ref.themeIntent,
|
|
8598
8634
|
themePadding = _ref.themePadding,
|
|
8599
8635
|
themeSize = _ref.themeSize,
|
|
8636
|
+
themeVariant = _ref.themeVariant,
|
|
8600
8637
|
theme = _ref.theme;
|
|
8601
8638
|
return {
|
|
8602
8639
|
height: theme.__hd__.badge.sizes[themeSize].height,
|
|
@@ -8605,7 +8642,9 @@ var StyledView$2 = index$9(reactNative.Animated.View)(function (_ref) {
|
|
|
8605
8642
|
justifyContent: 'center',
|
|
8606
8643
|
backgroundColor: theme.__hd__.badge.colors[themeIntent],
|
|
8607
8644
|
borderRadius: theme.radii.rounded,
|
|
8608
|
-
paddingHorizontal: themePadding === 'wideContent' ? theme.__hd__.badge.space[themeSize].horizontalPadding : undefined
|
|
8645
|
+
paddingHorizontal: themePadding === 'wideContent' ? theme.__hd__.badge.space[themeSize].horizontalPadding : undefined,
|
|
8646
|
+
borderWidth: theme.__hd__.badge.borderWidths["default"],
|
|
8647
|
+
borderColor: themeVariant === 'outlined' ? theme.__hd__.badge.colors.border : theme.__hd__.badge.colors[themeIntent]
|
|
8609
8648
|
};
|
|
8610
8649
|
});
|
|
8611
8650
|
var StyledText$1 = index$9(Typography.Caption)(function (_ref2) {
|
|
@@ -8634,8 +8673,15 @@ var StyledStatus = index$9(reactNative.Animated.View)(function (_ref3) {
|
|
|
8634
8673
|
borderRadius: theme.radii.rounded
|
|
8635
8674
|
};
|
|
8636
8675
|
});
|
|
8676
|
+
var StyledIcon$1 = index$9(Icon)(function (_ref4) {
|
|
8677
|
+
var themeSize = _ref4.themeSize,
|
|
8678
|
+
theme = _ref4.theme;
|
|
8679
|
+
return {
|
|
8680
|
+
fontSize: theme.__hd__.badge.fontSizes[themeSize]
|
|
8681
|
+
};
|
|
8682
|
+
});
|
|
8637
8683
|
|
|
8638
|
-
var _excluded$
|
|
8684
|
+
var _excluded$y = ["children", "visible", "intent", "style", "testID"];
|
|
8639
8685
|
var Status = function Status(_ref) {
|
|
8640
8686
|
var children = _ref.children,
|
|
8641
8687
|
_ref$visible = _ref.visible,
|
|
@@ -8644,7 +8690,7 @@ var Status = function Status(_ref) {
|
|
|
8644
8690
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
8645
8691
|
style = _ref.style,
|
|
8646
8692
|
testID = _ref.testID,
|
|
8647
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
8693
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$y);
|
|
8648
8694
|
var _React$useRef = React__namespace.default.useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
8649
8695
|
opacity = _React$useRef.current;
|
|
8650
8696
|
var isFirstRendering = React__namespace.default.useRef(true);
|
|
@@ -8677,7 +8723,7 @@ var Status = function Status(_ref) {
|
|
|
8677
8723
|
}));
|
|
8678
8724
|
};
|
|
8679
8725
|
|
|
8680
|
-
var _excluded$
|
|
8726
|
+
var _excluded$x = ["content", "visible", "max", "intent", "style", "testID", "size", "variant", "icon"];
|
|
8681
8727
|
var DEFAULT_MAX_NUMBER = 99;
|
|
8682
8728
|
var getPaddingState = function getPaddingState(content) {
|
|
8683
8729
|
return content.length > 1 ? 'wideContent' : 'narrowContent';
|
|
@@ -8694,7 +8740,10 @@ var Badge = function Badge(_ref) {
|
|
|
8694
8740
|
testID = _ref.testID,
|
|
8695
8741
|
_ref$size = _ref.size,
|
|
8696
8742
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
8697
|
-
|
|
8743
|
+
_ref$variant = _ref.variant,
|
|
8744
|
+
variant = _ref$variant === void 0 ? 'filled' : _ref$variant,
|
|
8745
|
+
icon = _ref.icon,
|
|
8746
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$x);
|
|
8698
8747
|
var _React$useRef = React__namespace.default.useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
8699
8748
|
opacity = _React$useRef.current;
|
|
8700
8749
|
var isFirstRendering = React__namespace.default.useRef(true);
|
|
@@ -8710,11 +8759,18 @@ var Badge = function Badge(_ref) {
|
|
|
8710
8759
|
useNativeDriver: true
|
|
8711
8760
|
}).start();
|
|
8712
8761
|
}, [visible, opacity]);
|
|
8713
|
-
var
|
|
8762
|
+
var isIconBadge = !!icon;
|
|
8763
|
+
var content = React.useMemo(function () {
|
|
8764
|
+
if (isIconBadge) {
|
|
8765
|
+
return '';
|
|
8766
|
+
}
|
|
8767
|
+
return typeof originalContent === 'number' && originalContent > max ? "".concat(max, "+") : String(originalContent);
|
|
8768
|
+
}, [isIconBadge, originalContent, max]);
|
|
8714
8769
|
return /*#__PURE__*/React__namespace.default.createElement(StyledView$2, _extends$1({}, nativeProps, {
|
|
8715
8770
|
themeIntent: intent,
|
|
8716
8771
|
themePadding: getPaddingState(content),
|
|
8717
8772
|
themeSize: size,
|
|
8773
|
+
themeVariant: variant,
|
|
8718
8774
|
style: [{
|
|
8719
8775
|
opacity: opacity,
|
|
8720
8776
|
transform: [{
|
|
@@ -8725,7 +8781,11 @@ var Badge = function Badge(_ref) {
|
|
|
8725
8781
|
}]
|
|
8726
8782
|
}, style],
|
|
8727
8783
|
testID: testID
|
|
8728
|
-
}), /*#__PURE__*/React__namespace.default.createElement(
|
|
8784
|
+
}), isIconBadge ? /*#__PURE__*/React__namespace.default.createElement(StyledIcon$1, {
|
|
8785
|
+
icon: icon,
|
|
8786
|
+
themeSize: size,
|
|
8787
|
+
intent: "text-inverted"
|
|
8788
|
+
}) : /*#__PURE__*/React__namespace.default.createElement(StyledText$1, {
|
|
8729
8789
|
themeSize: size
|
|
8730
8790
|
}, content));
|
|
8731
8791
|
};
|
|
@@ -8784,7 +8844,7 @@ var StyledBottomBarText = index$9(Typography.Caption)(function (_ref3) {
|
|
|
8784
8844
|
};
|
|
8785
8845
|
});
|
|
8786
8846
|
|
|
8787
|
-
var _excluded$
|
|
8847
|
+
var _excluded$w = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
|
|
8788
8848
|
var getInactiveIcon = function getInactiveIcon(icon) {
|
|
8789
8849
|
var inactiveIcon = "".concat(icon, "-outlined");
|
|
8790
8850
|
return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
|
|
@@ -8795,7 +8855,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8795
8855
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
8796
8856
|
selectedTabKey = _ref.selectedTabKey,
|
|
8797
8857
|
tabs = _ref.tabs,
|
|
8798
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
8858
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$w);
|
|
8799
8859
|
var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
8800
8860
|
/**
|
|
8801
8861
|
* List of loaded tabs, tabs will be loaded when navigated to.
|
|
@@ -8881,13 +8941,13 @@ var StyledDivider = index$9(reactNative.View)(function (_ref) {
|
|
|
8881
8941
|
}, horizontalMargin), verticalMargin);
|
|
8882
8942
|
});
|
|
8883
8943
|
|
|
8884
|
-
var _excluded$
|
|
8944
|
+
var _excluded$v = ["marginHorizontal", "marginVertical", "style", "testID"];
|
|
8885
8945
|
var Divider = function Divider(_ref) {
|
|
8886
8946
|
var marginHorizontal = _ref.marginHorizontal,
|
|
8887
8947
|
marginVertical = _ref.marginVertical,
|
|
8888
8948
|
style = _ref.style,
|
|
8889
8949
|
testID = _ref.testID,
|
|
8890
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
8950
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$v);
|
|
8891
8951
|
return /*#__PURE__*/React__namespace.default.createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
8892
8952
|
themeMarginHorizontal: marginHorizontal,
|
|
8893
8953
|
themeMarginVertical: marginVertical,
|
|
@@ -9043,7 +9103,7 @@ var StyledLoadingDot = index$9(reactNative.View)(function (_ref) {
|
|
|
9043
9103
|
}, themeStyling());
|
|
9044
9104
|
});
|
|
9045
9105
|
|
|
9046
|
-
var _excluded$
|
|
9106
|
+
var _excluded$u = ["count", "size", "testID", "themeVariant"];
|
|
9047
9107
|
var AnimatedLoadingIndicatorWrapper = reactNative.Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
|
|
9048
9108
|
var AnimatedLoadingDot = reactNative.Animated.createAnimatedComponent(StyledLoadingDot);
|
|
9049
9109
|
var renderDotComponent = function renderDotComponent(_ref) {
|
|
@@ -9075,7 +9135,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
9075
9135
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
9076
9136
|
testID = _ref2.testID,
|
|
9077
9137
|
themeVariant = _ref2.themeVariant,
|
|
9078
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
9138
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$u);
|
|
9079
9139
|
var progressAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
9080
9140
|
React.useEffect(function () {
|
|
9081
9141
|
var animation = reactNative.Animated.loop(reactNative.Animated.timing(progressAnimation.current, {
|
|
@@ -9518,11 +9578,11 @@ var Header = function Header(_ref) {
|
|
|
9518
9578
|
}))) : null), showDivider ? /*#__PURE__*/React__namespace.default.createElement(Divider, null) : null);
|
|
9519
9579
|
};
|
|
9520
9580
|
|
|
9521
|
-
var _excluded$
|
|
9581
|
+
var _excluded$t = ["scrollEventThrottle"];
|
|
9522
9582
|
var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
9523
9583
|
var _ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
9524
9584
|
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
|
|
9525
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
9585
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
9526
9586
|
var _useContext = React.useContext(BottomSheetContext),
|
|
9527
9587
|
setInternalShowDivider = _useContext.setInternalShowDivider;
|
|
9528
9588
|
var onScrollBeginDrag = React.useCallback(function (e) {
|
|
@@ -12339,12 +12399,12 @@ var Indicator = index$9(reactNative.View)(function (_ref2) {
|
|
|
12339
12399
|
};
|
|
12340
12400
|
});
|
|
12341
12401
|
|
|
12342
|
-
var _excluded$
|
|
12402
|
+
var _excluded$s = ["intent", "children"];
|
|
12343
12403
|
var DataCard = function DataCard(_ref) {
|
|
12344
12404
|
var _ref$intent = _ref.intent,
|
|
12345
12405
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
12346
12406
|
children = _ref.children,
|
|
12347
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
12407
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$s);
|
|
12348
12408
|
return /*#__PURE__*/React__namespace.default.createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__namespace.default.createElement(Indicator, {
|
|
12349
12409
|
themeIntent: intent,
|
|
12350
12410
|
testID: "data-card-indicator"
|
|
@@ -12363,13 +12423,13 @@ var StyledCard$1 = index$9(reactNative.View)(function (_ref) {
|
|
|
12363
12423
|
});
|
|
12364
12424
|
});
|
|
12365
12425
|
|
|
12366
|
-
var _excluded$
|
|
12426
|
+
var _excluded$r = ["intent", "children", "variant"];
|
|
12367
12427
|
var Card = function Card(_ref) {
|
|
12368
12428
|
var intent = _ref.intent,
|
|
12369
12429
|
children = _ref.children,
|
|
12370
12430
|
_ref$variant = _ref.variant,
|
|
12371
12431
|
variant = _ref$variant === void 0 ? 'basic' : _ref$variant,
|
|
12372
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
12432
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
12373
12433
|
return /*#__PURE__*/React__namespace.default.createElement(StyledCard$1, _extends$1({}, nativeProps, {
|
|
12374
12434
|
themeIntent: intent,
|
|
12375
12435
|
themeVariant: variant
|
|
@@ -12631,7 +12691,7 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
12631
12691
|
});
|
|
12632
12692
|
CardCarousel.displayName = 'CardCarousel';
|
|
12633
12693
|
|
|
12634
|
-
var _excluded$
|
|
12694
|
+
var _excluded$q = ["rounded", "size", "testID", "style"];
|
|
12635
12695
|
var Image = function Image(_ref) {
|
|
12636
12696
|
var _ref$rounded = _ref.rounded,
|
|
12637
12697
|
rounded = _ref$rounded === void 0 ? false : _ref$rounded,
|
|
@@ -12639,7 +12699,7 @@ var Image = function Image(_ref) {
|
|
|
12639
12699
|
size = _ref$size === void 0 ? '6xlarge' : _ref$size,
|
|
12640
12700
|
testID = _ref.testID,
|
|
12641
12701
|
style = _ref.style,
|
|
12642
|
-
imageNativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
12702
|
+
imageNativeProps = _objectWithoutProperties(_ref, _excluded$q);
|
|
12643
12703
|
var theme = useTheme();
|
|
12644
12704
|
var imageSize = theme.__hd__.image.sizes[size];
|
|
12645
12705
|
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Image, _extends$1({
|
|
@@ -12773,7 +12833,7 @@ var CarouselItem = function CarouselItem(_ref) {
|
|
|
12773
12833
|
}, heading), !!body && /*#__PURE__*/React__namespace.default.createElement(Typography.Body, null, body)));
|
|
12774
12834
|
};
|
|
12775
12835
|
|
|
12776
|
-
var _excluded$
|
|
12836
|
+
var _excluded$p = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "testID", "pageControlPosition"];
|
|
12777
12837
|
function useStateFromProp(initialValue) {
|
|
12778
12838
|
var _useState = React.useState(initialValue),
|
|
12779
12839
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -12800,7 +12860,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
12800
12860
|
testID = _ref.testID,
|
|
12801
12861
|
_ref$pageControlPosit = _ref.pageControlPosition,
|
|
12802
12862
|
pageControlPosition = _ref$pageControlPosit === void 0 ? 'top' : _ref$pageControlPosit,
|
|
12803
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
12863
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$p);
|
|
12804
12864
|
useDeprecation("shouldShowPagination prop has been deprecated", shouldShowPagination !== noop);
|
|
12805
12865
|
useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition === 'bottom');
|
|
12806
12866
|
var theme = useTheme();
|
|
@@ -13015,7 +13075,7 @@ var StyledChipWrapper = index$9(reactNative.TouchableOpacity)(function (_ref) {
|
|
|
13015
13075
|
}, getShadowStyles()), getBorderStyles()), getPaddingStyles()), getBackgroundStyles());
|
|
13016
13076
|
});
|
|
13017
13077
|
|
|
13018
|
-
var _excluded$
|
|
13078
|
+
var _excluded$o = ["label", "variant", "selected", "icon", "onPress", "showSelectedIcon"];
|
|
13019
13079
|
var Chip = function Chip(_ref) {
|
|
13020
13080
|
var label = _ref.label,
|
|
13021
13081
|
_ref$variant = _ref.variant,
|
|
@@ -13026,7 +13086,7 @@ var Chip = function Chip(_ref) {
|
|
|
13026
13086
|
onPress = _ref.onPress,
|
|
13027
13087
|
_ref$showSelectedIcon = _ref.showSelectedIcon,
|
|
13028
13088
|
showSelectedIcon = _ref$showSelectedIcon === void 0 ? true : _ref$showSelectedIcon,
|
|
13029
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
13089
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$o);
|
|
13030
13090
|
var shouldShowSelectedIcon = variant === 'outlined' && selected && showSelectedIcon;
|
|
13031
13091
|
return /*#__PURE__*/React__namespace.default.createElement(StyledChipWrapper, _extends$1({
|
|
13032
13092
|
onPress: onPress,
|
|
@@ -13267,7 +13327,7 @@ var StyledErrorAndMaxLengthContainer = index$9(reactNative.View)(function () {
|
|
|
13267
13327
|
};
|
|
13268
13328
|
});
|
|
13269
13329
|
|
|
13270
|
-
var _excluded$
|
|
13330
|
+
var _excluded$n = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "hideCharacterCount", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling", "variant"];
|
|
13271
13331
|
var getState$2 = function getState(_ref) {
|
|
13272
13332
|
var disabled = _ref.disabled,
|
|
13273
13333
|
error = _ref.error,
|
|
@@ -13379,7 +13439,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
|
|
|
13379
13439
|
allowFontScaling = _ref8$allowFontScalin === void 0 ? false : _ref8$allowFontScalin,
|
|
13380
13440
|
_ref8$variant = _ref8.variant,
|
|
13381
13441
|
variant = _ref8$variant === void 0 ? 'text' : _ref8$variant,
|
|
13382
|
-
nativeProps = _objectWithoutProperties(_ref8, _excluded$
|
|
13442
|
+
nativeProps = _objectWithoutProperties(_ref8, _excluded$n);
|
|
13383
13443
|
var displayText = getDisplayText(value, defaultValue);
|
|
13384
13444
|
var isEmptyValue = displayText.length === 0;
|
|
13385
13445
|
var _React$useState = React__namespace.default.useState({
|
|
@@ -13924,11 +13984,11 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
13924
13984
|
}))));
|
|
13925
13985
|
};
|
|
13926
13986
|
|
|
13927
|
-
var _excluded$
|
|
13987
|
+
var _excluded$m = ["variant"];
|
|
13928
13988
|
var DatePicker = function DatePicker(_ref) {
|
|
13929
13989
|
var _ref$variant = _ref.variant,
|
|
13930
13990
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
13931
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
13991
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
13932
13992
|
if (variant === 'calendar') {
|
|
13933
13993
|
return /*#__PURE__*/React__namespace.default.createElement(DatePickerCalendar, props);
|
|
13934
13994
|
}
|
|
@@ -14482,7 +14542,7 @@ var Portal$1 = Object.assign(Portal, {
|
|
|
14482
14542
|
Host: PortalHost
|
|
14483
14543
|
});
|
|
14484
14544
|
|
|
14485
|
-
var _excluded$
|
|
14545
|
+
var _excluded$l = ["visible"];
|
|
14486
14546
|
var DEFAULT_BACKDROP_OPACITY = 0.4;
|
|
14487
14547
|
var DEFAULT_ANIMATION_CONFIG = {
|
|
14488
14548
|
easing: reactNative.Easing.inOut(reactNative.Easing.cubic),
|
|
@@ -14578,7 +14638,7 @@ var Modal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14578
14638
|
var ModalWrapper = function ModalWrapper(_ref3) {
|
|
14579
14639
|
var _ref3$visible = _ref3.visible,
|
|
14580
14640
|
visible = _ref3$visible === void 0 ? true : _ref3$visible,
|
|
14581
|
-
props = _objectWithoutProperties(_ref3, _excluded$
|
|
14641
|
+
props = _objectWithoutProperties(_ref3, _excluded$l);
|
|
14582
14642
|
var modalRef = React.useRef(null);
|
|
14583
14643
|
var _useState = React.useState(visible),
|
|
14584
14644
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -14688,7 +14748,7 @@ var StyledErrorDescription = index$9(Typography.Body)(function (_ref9) {
|
|
|
14688
14748
|
};
|
|
14689
14749
|
});
|
|
14690
14750
|
|
|
14691
|
-
var _excluded$
|
|
14751
|
+
var _excluded$k = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
|
|
14692
14752
|
_excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
14693
14753
|
var renderImage$1 = function renderImage(image) {
|
|
14694
14754
|
if ( /*#__PURE__*/React.isValidElement(image)) {
|
|
@@ -14714,7 +14774,7 @@ var ErrorPage = function ErrorPage(_ref) {
|
|
|
14714
14774
|
onCtaPress = _ref.onCtaPress,
|
|
14715
14775
|
secondaryCtaText = _ref.secondaryCtaText,
|
|
14716
14776
|
onSecondaryCtaPress = _ref.onSecondaryCtaPress,
|
|
14717
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
14777
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$k);
|
|
14718
14778
|
var showCta = ctaText && onCtaPress !== undefined;
|
|
14719
14779
|
var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
|
|
14720
14780
|
var showButtonContainer = showCta || showSecondaryCta;
|
|
@@ -14827,8 +14887,35 @@ var ErrorComponent = function ErrorComponent(_ref2) {
|
|
|
14827
14887
|
}, nativeProps));
|
|
14828
14888
|
};
|
|
14829
14889
|
|
|
14890
|
+
var StyledActionItem = index$9(reactNative.TouchableHighlight)(function (_ref) {
|
|
14891
|
+
var theme = _ref.theme;
|
|
14892
|
+
return {
|
|
14893
|
+
padding: theme.__hd__.fab.space.actionItemPadding,
|
|
14894
|
+
margin: theme.__hd__.fab.space.actionItemMargin,
|
|
14895
|
+
marginRight: theme.__hd__.fab.space.actionItemMarginRight,
|
|
14896
|
+
backgroundColor: theme.__hd__.fab.colors.actionItemBackground,
|
|
14897
|
+
borderRadius: theme.__hd__.fab.radii.actionItem,
|
|
14898
|
+
flexDirection: 'row',
|
|
14899
|
+
alignItems: 'center',
|
|
14900
|
+
alignSelf: 'flex-end',
|
|
14901
|
+
overflow: 'hidden'
|
|
14902
|
+
};
|
|
14903
|
+
});
|
|
14904
|
+
var StyledActionItemText = index$9(Typography.Body)(function (_ref2) {
|
|
14905
|
+
var theme = _ref2.theme;
|
|
14906
|
+
return {
|
|
14907
|
+
color: theme.__hd__.fab.colors.actionItemText
|
|
14908
|
+
};
|
|
14909
|
+
});
|
|
14910
|
+
var StyledIcon = index$9(Icon)(function (_ref3) {
|
|
14911
|
+
var theme = _ref3.theme;
|
|
14912
|
+
return {
|
|
14913
|
+
color: theme.__hd__.fab.colors.actionItemText
|
|
14914
|
+
};
|
|
14915
|
+
});
|
|
14916
|
+
|
|
14830
14917
|
var AnimatedTouchableHighlight = reactNative.Animated.createAnimatedComponent(reactNative.TouchableHighlight);
|
|
14831
|
-
var StyledFAB$
|
|
14918
|
+
var StyledFAB$2 = index$9(AnimatedTouchableHighlight)(function (_ref) {
|
|
14832
14919
|
var theme = _ref.theme,
|
|
14833
14920
|
themeActive = _ref.themeActive;
|
|
14834
14921
|
return {
|
|
@@ -14875,11 +14962,52 @@ var StyledIconContainer = index$9(Box)(function (_ref4) {
|
|
|
14875
14962
|
};
|
|
14876
14963
|
});
|
|
14877
14964
|
|
|
14878
|
-
var
|
|
14965
|
+
var ActionItem = function ActionItem(_ref) {
|
|
14966
|
+
var icon = _ref.icon,
|
|
14967
|
+
title = _ref.title,
|
|
14968
|
+
onPress = _ref.onPress,
|
|
14969
|
+
style = _ref.style,
|
|
14970
|
+
testID = _ref.testID,
|
|
14971
|
+
index = _ref.index,
|
|
14972
|
+
_ref$active = _ref.active,
|
|
14973
|
+
active = _ref$active === void 0 ? false : _ref$active;
|
|
14974
|
+
var theme = useTheme();
|
|
14975
|
+
var animatedValue = React__namespace.default.useRef(new reactNative.Animated.Value(0));
|
|
14976
|
+
var translateY = animatedValue.current.interpolate({
|
|
14977
|
+
inputRange: [0, 1],
|
|
14978
|
+
outputRange: [50, 0]
|
|
14979
|
+
});
|
|
14980
|
+
React__namespace.default.useEffect(function () {
|
|
14981
|
+
reactNative.Animated.spring(animatedValue.current, {
|
|
14982
|
+
toValue: active ? 1 : 0,
|
|
14983
|
+
useNativeDriver: reactNative.Platform.OS !== 'web',
|
|
14984
|
+
delay: index * 30,
|
|
14985
|
+
speed: 10,
|
|
14986
|
+
bounciness: 10
|
|
14987
|
+
}).start();
|
|
14988
|
+
}, [active, index]);
|
|
14989
|
+
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
14990
|
+
style: {
|
|
14991
|
+
transform: [{
|
|
14992
|
+
translateY: translateY
|
|
14993
|
+
}]
|
|
14994
|
+
}
|
|
14995
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledActionItem, {
|
|
14996
|
+
underlayColor: theme.__hd__.fab.colors.actionItemPressedBackground,
|
|
14997
|
+
style: style,
|
|
14998
|
+
onPress: onPress,
|
|
14999
|
+
testID: testID
|
|
15000
|
+
}, /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledIcon, {
|
|
15001
|
+
size: "xsmall",
|
|
15002
|
+
icon: icon
|
|
15003
|
+
})), /*#__PURE__*/React__namespace.default.createElement(StyledActionItemText, null, title))));
|
|
15004
|
+
};
|
|
15005
|
+
|
|
15006
|
+
var _excluded$j = ["active"];
|
|
14879
15007
|
var AnimatedIcons = reactNative.Animated.createAnimatedComponent(StyledFABIcon);
|
|
14880
15008
|
var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
|
|
14881
15009
|
var active = _ref.active,
|
|
14882
|
-
iconProps = _objectWithoutProperties(_ref, _excluded$
|
|
15010
|
+
iconProps = _objectWithoutProperties(_ref, _excluded$j);
|
|
14883
15011
|
var rotateAnimation = React.useRef(new reactNative.Animated.Value(active ? 1 : 0));
|
|
14884
15012
|
React.useEffect(function () {
|
|
14885
15013
|
var animation = reactNative.Animated.spring(rotateAnimation.current, {
|
|
@@ -14919,13 +15047,15 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
|
|
|
14919
15047
|
return /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(AnimatedFABIcon, {
|
|
14920
15048
|
active: active,
|
|
14921
15049
|
icon: icon,
|
|
14922
|
-
testID: "animated-fab-icon"
|
|
15050
|
+
testID: "animated-fab-icon",
|
|
15051
|
+
size: "xsmall"
|
|
14923
15052
|
}));
|
|
14924
15053
|
}
|
|
14925
|
-
return /*#__PURE__*/React__namespace.default.createElement(StyledFABIcon, {
|
|
15054
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledFABIcon, {
|
|
15055
|
+
size: "xsmall",
|
|
14926
15056
|
icon: icon,
|
|
14927
15057
|
testID: "styled-fab-icon"
|
|
14928
|
-
});
|
|
15058
|
+
}));
|
|
14929
15059
|
};
|
|
14930
15060
|
var IconWithTextContent = function IconWithTextContent(_ref2) {
|
|
14931
15061
|
var icon = _ref2.icon,
|
|
@@ -15023,7 +15153,7 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
15023
15153
|
}
|
|
15024
15154
|
};
|
|
15025
15155
|
}, []);
|
|
15026
|
-
return /*#__PURE__*/React__namespace.default.createElement(StyledFAB$
|
|
15156
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledFAB$2, {
|
|
15027
15157
|
onLayout: function onLayout(event) {
|
|
15028
15158
|
return !hasSetButtonWidth && !active && setButtonWidth(event.nativeEvent.layout.width);
|
|
15029
15159
|
},
|
|
@@ -15059,74 +15189,6 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
15059
15189
|
});
|
|
15060
15190
|
FAB$1.displayName = 'FAB';
|
|
15061
15191
|
|
|
15062
|
-
var StyledActionItem = index$9(reactNative.TouchableHighlight)(function (_ref) {
|
|
15063
|
-
var theme = _ref.theme;
|
|
15064
|
-
return {
|
|
15065
|
-
padding: theme.__hd__.fab.space.actionItemPadding,
|
|
15066
|
-
margin: theme.__hd__.fab.space.actionItemMargin,
|
|
15067
|
-
marginRight: theme.__hd__.fab.space.actionItemMarginRight,
|
|
15068
|
-
backgroundColor: theme.__hd__.fab.colors.actionItemBackground,
|
|
15069
|
-
borderRadius: theme.__hd__.fab.radii.actionItem,
|
|
15070
|
-
flexDirection: 'row',
|
|
15071
|
-
alignItems: 'center',
|
|
15072
|
-
alignSelf: 'flex-end',
|
|
15073
|
-
overflow: 'hidden'
|
|
15074
|
-
};
|
|
15075
|
-
});
|
|
15076
|
-
var StyledActionItemText = index$9(Typography.Body)(function (_ref2) {
|
|
15077
|
-
var theme = _ref2.theme;
|
|
15078
|
-
return {
|
|
15079
|
-
color: theme.__hd__.fab.colors.actionItemText
|
|
15080
|
-
};
|
|
15081
|
-
});
|
|
15082
|
-
var StyledIcon = index$9(Icon)(function (_ref3) {
|
|
15083
|
-
var theme = _ref3.theme;
|
|
15084
|
-
return {
|
|
15085
|
-
color: theme.__hd__.fab.colors.actionItemText
|
|
15086
|
-
};
|
|
15087
|
-
});
|
|
15088
|
-
|
|
15089
|
-
var ActionItem = function ActionItem(_ref) {
|
|
15090
|
-
var icon = _ref.icon,
|
|
15091
|
-
title = _ref.title,
|
|
15092
|
-
onPress = _ref.onPress,
|
|
15093
|
-
style = _ref.style,
|
|
15094
|
-
testID = _ref.testID,
|
|
15095
|
-
index = _ref.index,
|
|
15096
|
-
_ref$active = _ref.active,
|
|
15097
|
-
active = _ref$active === void 0 ? false : _ref$active;
|
|
15098
|
-
var theme = useTheme();
|
|
15099
|
-
var animatedValue = React__namespace.default.useRef(new reactNative.Animated.Value(0));
|
|
15100
|
-
var translateY = animatedValue.current.interpolate({
|
|
15101
|
-
inputRange: [0, 1],
|
|
15102
|
-
outputRange: [50, 0]
|
|
15103
|
-
});
|
|
15104
|
-
React__namespace.default.useEffect(function () {
|
|
15105
|
-
reactNative.Animated.spring(animatedValue.current, {
|
|
15106
|
-
toValue: active ? 1 : 0,
|
|
15107
|
-
useNativeDriver: reactNative.Platform.OS !== 'web',
|
|
15108
|
-
delay: index * 30,
|
|
15109
|
-
speed: 10,
|
|
15110
|
-
bounciness: 10
|
|
15111
|
-
}).start();
|
|
15112
|
-
}, [active, index]);
|
|
15113
|
-
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, {
|
|
15114
|
-
style: {
|
|
15115
|
-
transform: [{
|
|
15116
|
-
translateY: translateY
|
|
15117
|
-
}]
|
|
15118
|
-
}
|
|
15119
|
-
}, /*#__PURE__*/React__namespace.default.createElement(StyledActionItem, {
|
|
15120
|
-
underlayColor: theme.__hd__.fab.colors.actionItemPressedBackground,
|
|
15121
|
-
style: style,
|
|
15122
|
-
onPress: onPress,
|
|
15123
|
-
testID: testID
|
|
15124
|
-
}, /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledIconContainer, null, /*#__PURE__*/React__namespace.default.createElement(StyledIcon, {
|
|
15125
|
-
size: "xsmall",
|
|
15126
|
-
icon: icon
|
|
15127
|
-
})), /*#__PURE__*/React__namespace.default.createElement(StyledActionItemText, null, title))));
|
|
15128
|
-
};
|
|
15129
|
-
|
|
15130
15192
|
var StyledContainer$3 = index$9(reactNative.View)({
|
|
15131
15193
|
position: 'absolute',
|
|
15132
15194
|
left: 0,
|
|
@@ -15150,7 +15212,7 @@ var StyledActionGroupContainer = index$9(reactNative.Animated.View)({
|
|
|
15150
15212
|
justifyContent: 'flex-end',
|
|
15151
15213
|
width: '70%'
|
|
15152
15214
|
});
|
|
15153
|
-
var StyledFAB = index$9(FAB$1)(function (_ref) {
|
|
15215
|
+
var StyledFAB$1 = index$9(FAB$1)(function (_ref) {
|
|
15154
15216
|
var theme = _ref.theme;
|
|
15155
15217
|
return {
|
|
15156
15218
|
marginRight: theme.__hd__.fab.space.buttonMarginRight,
|
|
@@ -15227,7 +15289,7 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
15227
15289
|
testID: testID,
|
|
15228
15290
|
pointerEvents: "box-none",
|
|
15229
15291
|
style: style
|
|
15230
|
-
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, null, /*#__PURE__*/React__namespace.default.createElement(StyledFAB, {
|
|
15292
|
+
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.Animated.View, null, /*#__PURE__*/React__namespace.default.createElement(StyledFAB$1, {
|
|
15231
15293
|
key: "fab",
|
|
15232
15294
|
testID: "fab",
|
|
15233
15295
|
icon: fabIcon,
|
|
@@ -15265,7 +15327,7 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
15265
15327
|
index: active ? index : items.length - index,
|
|
15266
15328
|
active: active
|
|
15267
15329
|
}));
|
|
15268
|
-
}))), active && /*#__PURE__*/React__namespace.default.createElement(StyledFAB
|
|
15330
|
+
}))), active && /*#__PURE__*/React__namespace.default.createElement(StyledFAB$1
|
|
15269
15331
|
// This FAB is moved up a bit compared to the original FAB,
|
|
15270
15332
|
// set marginBottom to negative value to compensate for it
|
|
15271
15333
|
, {
|
|
@@ -15283,8 +15345,51 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
15283
15345
|
});
|
|
15284
15346
|
ActionGroup.displayName = 'FAB.ActionGroup';
|
|
15285
15347
|
|
|
15348
|
+
var StyledFABPairWrapper = index$9(Box)({
|
|
15349
|
+
flexDirection: 'row',
|
|
15350
|
+
justifyContent: 'center',
|
|
15351
|
+
alignItems: 'center'
|
|
15352
|
+
});
|
|
15353
|
+
var StyledFAB = index$9(FAB$1)(function (_ref) {
|
|
15354
|
+
var theme = _ref.theme,
|
|
15355
|
+
_ref$iconOnly = _ref.iconOnly,
|
|
15356
|
+
iconOnly = _ref$iconOnly === void 0 ? false : _ref$iconOnly,
|
|
15357
|
+
_ref$isLast = _ref.isLast,
|
|
15358
|
+
isLast = _ref$isLast === void 0 ? false : _ref$isLast;
|
|
15359
|
+
return {
|
|
15360
|
+
height: theme.__hd__.fab.sizes.fabPairHeight,
|
|
15361
|
+
width: iconOnly ? theme.__hd__.fab.sizes.fabPairIconOnlyWidth : undefined,
|
|
15362
|
+
marginRight: isLast ? undefined : theme.__hd__.fab.space.fabPairMarginRight
|
|
15363
|
+
};
|
|
15364
|
+
});
|
|
15365
|
+
|
|
15366
|
+
var _excluded$i = ["fabConfig", "onCancel"];
|
|
15367
|
+
var Pair = function Pair(_ref) {
|
|
15368
|
+
var fabConfig = _ref.fabConfig,
|
|
15369
|
+
onCancel = _ref.onCancel,
|
|
15370
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
15371
|
+
var icon = fabConfig.icon,
|
|
15372
|
+
title = fabConfig.title,
|
|
15373
|
+
onPress = fabConfig.onPress,
|
|
15374
|
+
testID = fabConfig.testID;
|
|
15375
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledFABPairWrapper, props, /*#__PURE__*/React__namespace.default.createElement(StyledFAB, {
|
|
15376
|
+
icon: "cancel",
|
|
15377
|
+
onPress: onCancel,
|
|
15378
|
+
testID: "fab-pair-cancel",
|
|
15379
|
+
iconOnly: true
|
|
15380
|
+
}), /*#__PURE__*/React__namespace.default.createElement(StyledFAB, {
|
|
15381
|
+
icon: icon,
|
|
15382
|
+
title: title,
|
|
15383
|
+
onPress: onPress,
|
|
15384
|
+
testID: testID,
|
|
15385
|
+
iconOnly: !title,
|
|
15386
|
+
isLast: true
|
|
15387
|
+
}));
|
|
15388
|
+
};
|
|
15389
|
+
|
|
15286
15390
|
var FAB = Object.assign(FAB$1, {
|
|
15287
|
-
ActionGroup: ActionGroup
|
|
15391
|
+
ActionGroup: ActionGroup,
|
|
15392
|
+
Pair: Pair
|
|
15288
15393
|
});
|
|
15289
15394
|
|
|
15290
15395
|
var ToastContainerWrapper = index$9(reactNative.View)(function (_ref) {
|
|
@@ -16128,7 +16233,7 @@ var StyledStrokeEnd = index$9(reactNative.View)(function (_ref6) {
|
|
|
16128
16233
|
};
|
|
16129
16234
|
});
|
|
16130
16235
|
|
|
16131
|
-
var _excluded$
|
|
16236
|
+
var _excluded$h = ["value", "renderValue", "intent", "style", "testID"];
|
|
16132
16237
|
var HalfCircle = function HalfCircle(_ref) {
|
|
16133
16238
|
var type = _ref.type,
|
|
16134
16239
|
themeIntent = _ref.themeIntent;
|
|
@@ -16149,7 +16254,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
16149
16254
|
intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
|
|
16150
16255
|
style = _ref2.style,
|
|
16151
16256
|
testID = _ref2.testID,
|
|
16152
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
16257
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$h);
|
|
16153
16258
|
var theme = useTheme$1();
|
|
16154
16259
|
var radius = theme.__hd__.progress.sizes.circleDiameter / 2;
|
|
16155
16260
|
var progressAnimatedValue = React.useRef(new reactNative.Animated.Value(0));
|
|
@@ -16265,14 +16370,14 @@ var StyledInner = index$9(reactNative.Animated.View)(function (_ref2) {
|
|
|
16265
16370
|
};
|
|
16266
16371
|
});
|
|
16267
16372
|
|
|
16268
|
-
var _excluded$
|
|
16373
|
+
var _excluded$g = ["value", "intent", "style", "testID"];
|
|
16269
16374
|
var ProgressBar = function ProgressBar(_ref) {
|
|
16270
16375
|
var value = _ref.value,
|
|
16271
16376
|
_ref$intent = _ref.intent,
|
|
16272
16377
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
16273
16378
|
style = _ref.style,
|
|
16274
16379
|
testID = _ref.testID,
|
|
16275
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
16380
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$g);
|
|
16276
16381
|
var _useState = React.useState(0),
|
|
16277
16382
|
_useState2 = _slicedToArray(_useState, 2),
|
|
16278
16383
|
width = _useState2[0],
|
|
@@ -16346,12 +16451,13 @@ var StyledSingleStepContainer = index$9(Box)(function (_ref2) {
|
|
|
16346
16451
|
};
|
|
16347
16452
|
});
|
|
16348
16453
|
var StyledSingleStep = index$9(Box)(function (_ref3) {
|
|
16349
|
-
var theme = _ref3.theme
|
|
16454
|
+
var theme = _ref3.theme,
|
|
16455
|
+
themeState = _ref3.themeState;
|
|
16350
16456
|
return {
|
|
16351
16457
|
height: theme.__hd__.progress.sizes.stepHeight,
|
|
16352
16458
|
borderRadius: theme.__hd__.progress.radii["default"],
|
|
16353
16459
|
backgroundColor: theme.__hd__.progress.colors.step.complete,
|
|
16354
|
-
width: '70%',
|
|
16460
|
+
width: themeState === 'complete' ? '100%' : '70%',
|
|
16355
16461
|
position: 'absolute',
|
|
16356
16462
|
top: 0,
|
|
16357
16463
|
left: 0,
|
|
@@ -16360,7 +16466,7 @@ var StyledSingleStep = index$9(Box)(function (_ref3) {
|
|
|
16360
16466
|
};
|
|
16361
16467
|
});
|
|
16362
16468
|
|
|
16363
|
-
var _excluded$
|
|
16469
|
+
var _excluded$f = ["steps", "current", "onLayout"];
|
|
16364
16470
|
var getStepState = function getStepState(current, index) {
|
|
16365
16471
|
if (index < current) {
|
|
16366
16472
|
return 'complete';
|
|
@@ -16374,7 +16480,7 @@ var ProgressStep = function ProgressStep(_ref) {
|
|
|
16374
16480
|
var steps = _ref.steps,
|
|
16375
16481
|
current = _ref.current,
|
|
16376
16482
|
onLayout = _ref.onLayout,
|
|
16377
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16483
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
16378
16484
|
var theme = useTheme$1();
|
|
16379
16485
|
var _React$useState = React__namespace.default.useState(0),
|
|
16380
16486
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -16393,7 +16499,9 @@ var ProgressStep = function ProgressStep(_ref) {
|
|
|
16393
16499
|
return width;
|
|
16394
16500
|
}, [containerWidth, steps, theme]);
|
|
16395
16501
|
if (steps === 1) {
|
|
16396
|
-
return /*#__PURE__*/React__namespace.default.createElement(StyledSingleStepContainer, props, /*#__PURE__*/React__namespace.default.createElement(StyledSingleStep,
|
|
16502
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledSingleStepContainer, props, /*#__PURE__*/React__namespace.default.createElement(StyledSingleStep, {
|
|
16503
|
+
themeState: current >= steps ? 'complete' : 'incomplete'
|
|
16504
|
+
}));
|
|
16397
16505
|
}
|
|
16398
16506
|
return /*#__PURE__*/React__namespace.default.createElement(StyledStepContainer, _extends$1({}, props, {
|
|
16399
16507
|
onLayout: onContainerLayout
|
|
@@ -16553,14 +16661,14 @@ var AnimatedSpinner = function AnimatedSpinner(_ref) {
|
|
|
16553
16661
|
}, dotProps))));
|
|
16554
16662
|
};
|
|
16555
16663
|
|
|
16556
|
-
var _excluded$
|
|
16664
|
+
var _excluded$e = ["testID", "size", "intent"];
|
|
16557
16665
|
var Spinner = function Spinner(_ref) {
|
|
16558
16666
|
var testID = _ref.testID,
|
|
16559
16667
|
_ref$size = _ref.size,
|
|
16560
16668
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
16561
16669
|
_ref$intent = _ref.intent,
|
|
16562
16670
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
16563
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
16671
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$e);
|
|
16564
16672
|
return /*#__PURE__*/React__namespace.default.createElement(StyledView$1, nativeProps, /*#__PURE__*/React__namespace.default.createElement(StyledSpinnerContainer, {
|
|
16565
16673
|
testID: testID
|
|
16566
16674
|
}, /*#__PURE__*/React__namespace.default.createElement(AnimatedSpinner, {
|
|
@@ -16593,7 +16701,7 @@ var SwipeableAction = function SwipeableAction(_ref) {
|
|
|
16593
16701
|
}, children);
|
|
16594
16702
|
};
|
|
16595
16703
|
|
|
16596
|
-
var _excluded$
|
|
16704
|
+
var _excluded$d = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth", "variant"];
|
|
16597
16705
|
var renderActions = function renderActions(actions, width, progress, direction) {
|
|
16598
16706
|
var trans = progress.interpolate({
|
|
16599
16707
|
inputRange: [0, 1],
|
|
@@ -16622,7 +16730,7 @@ var Swipeable = function Swipeable(_ref) {
|
|
|
16622
16730
|
rightActionsWidth = _ref.rightActionsWidth,
|
|
16623
16731
|
_ref$variant = _ref.variant,
|
|
16624
16732
|
variant = _ref$variant === void 0 ? 'card' : _ref$variant,
|
|
16625
|
-
swipeableProps = _objectWithoutProperties(_ref, _excluded$
|
|
16733
|
+
swipeableProps = _objectWithoutProperties(_ref, _excluded$d);
|
|
16626
16734
|
var theme = useTheme();
|
|
16627
16735
|
var _useWindowDimensions = reactNative.useWindowDimensions(),
|
|
16628
16736
|
width = _useWindowDimensions.width;
|
|
@@ -16973,7 +17081,7 @@ var StyledSectionList = index$9(reactNative.SectionList)(function (_ref4) {
|
|
|
16973
17081
|
};
|
|
16974
17082
|
});
|
|
16975
17083
|
|
|
16976
|
-
var _excluded$
|
|
17084
|
+
var _excluded$c = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
|
|
16977
17085
|
var BaseOptionList = function BaseOptionList(_ref) {
|
|
16978
17086
|
var keyExtractor = _ref.keyExtractor,
|
|
16979
17087
|
loading = _ref.loading,
|
|
@@ -16982,7 +17090,7 @@ var BaseOptionList = function BaseOptionList(_ref) {
|
|
|
16982
17090
|
sections = _ref.sections,
|
|
16983
17091
|
renderItem = _ref.renderItem,
|
|
16984
17092
|
sectionListRef = _ref.sectionListRef,
|
|
16985
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17093
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
16986
17094
|
var theme = useTheme$1();
|
|
16987
17095
|
var _useState = React.useState(false),
|
|
16988
17096
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -17052,7 +17160,7 @@ var Option$2 = function Option(_ref) {
|
|
|
17052
17160
|
return highlighted === true ? /*#__PURE__*/React__namespace.default.createElement(List.Item, props) : /*#__PURE__*/React__namespace.default.createElement(List.BasicItem, props);
|
|
17053
17161
|
};
|
|
17054
17162
|
|
|
17055
|
-
var _excluded$
|
|
17163
|
+
var _excluded$b = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
17056
17164
|
var OptionList$1 = function OptionList(_ref) {
|
|
17057
17165
|
var keyExtractor = _ref.keyExtractor,
|
|
17058
17166
|
loading = _ref.loading,
|
|
@@ -17063,7 +17171,7 @@ var OptionList$1 = function OptionList(_ref) {
|
|
|
17063
17171
|
renderOption = _ref.renderOption,
|
|
17064
17172
|
value = _ref.value,
|
|
17065
17173
|
sectionListRef = _ref.sectionListRef,
|
|
17066
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17174
|
+
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
17067
17175
|
var renderItem = function renderItem(info) {
|
|
17068
17176
|
var item = info.item;
|
|
17069
17177
|
var selected = value.includes(info.item.value);
|
|
@@ -17254,7 +17362,7 @@ var StyledOptionList = index$9(BaseOptionList)(function (_ref) {
|
|
|
17254
17362
|
};
|
|
17255
17363
|
});
|
|
17256
17364
|
|
|
17257
|
-
var _excluded$
|
|
17365
|
+
var _excluded$a = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
17258
17366
|
var OptionList = function OptionList(_ref) {
|
|
17259
17367
|
var keyExtractor = _ref.keyExtractor,
|
|
17260
17368
|
loading = _ref.loading,
|
|
@@ -17265,7 +17373,7 @@ var OptionList = function OptionList(_ref) {
|
|
|
17265
17373
|
renderOption = _ref.renderOption,
|
|
17266
17374
|
value = _ref.value,
|
|
17267
17375
|
sectionListRef = _ref.sectionListRef,
|
|
17268
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17376
|
+
rest = _objectWithoutProperties(_ref, _excluded$a);
|
|
17269
17377
|
var renderItem = function renderItem(info) {
|
|
17270
17378
|
var item = info.item;
|
|
17271
17379
|
var selected = item.value === value;
|
|
@@ -17433,7 +17541,7 @@ var StyledGradientContainer = index$9(Box)(function (_ref2) {
|
|
|
17433
17541
|
};
|
|
17434
17542
|
});
|
|
17435
17543
|
|
|
17436
|
-
var _excluded$
|
|
17544
|
+
var _excluded$9 = ["intent", "variant", "style", "onLayout"];
|
|
17437
17545
|
var AnimatedLinearGradient = reactNative.Animated.createAnimatedComponent(LinearGradient__default.default);
|
|
17438
17546
|
var gradientPositions = {
|
|
17439
17547
|
start: {
|
|
@@ -17465,7 +17573,7 @@ var Skeleton = function Skeleton(_ref) {
|
|
|
17465
17573
|
variant = _ref$variant === void 0 ? 'rounded' : _ref$variant,
|
|
17466
17574
|
style = _ref.style,
|
|
17467
17575
|
onLayout = _ref.onLayout,
|
|
17468
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17576
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
17469
17577
|
var theme = useTheme();
|
|
17470
17578
|
var colors = React.useMemo(function () {
|
|
17471
17579
|
return getGradientColors(theme, intent);
|
|
@@ -17597,7 +17705,7 @@ var StyledSuccessModal = index$9(ModalWrapper)({
|
|
|
17597
17705
|
width: '100%'
|
|
17598
17706
|
});
|
|
17599
17707
|
|
|
17600
|
-
var _excluded$
|
|
17708
|
+
var _excluded$8 = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
17601
17709
|
var renderImage = function renderImage(image) {
|
|
17602
17710
|
if ( /*#__PURE__*/React.isValidElement(image)) {
|
|
17603
17711
|
return /*#__PURE__*/React__namespace.default.cloneElement(image, {
|
|
@@ -17623,7 +17731,7 @@ var SuccessPage = function SuccessPage(_ref) {
|
|
|
17623
17731
|
onCtaPress = _ref$onCtaPress === void 0 ? noop$1 : _ref$onCtaPress,
|
|
17624
17732
|
secondaryCtaText = _ref.secondaryCtaText,
|
|
17625
17733
|
onSecondaryCtaPress = _ref.onSecondaryCtaPress,
|
|
17626
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
17734
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$8);
|
|
17627
17735
|
var showSecondaryButton = secondaryCtaText && onSecondaryCtaPress;
|
|
17628
17736
|
return /*#__PURE__*/React__namespace.default.createElement(StyledSuccessContainer, _extends$1({
|
|
17629
17737
|
testID: testID,
|
|
@@ -18641,7 +18749,7 @@ var StyledText = index$9(Typography.Caption)(function (_ref2) {
|
|
|
18641
18749
|
};
|
|
18642
18750
|
});
|
|
18643
18751
|
|
|
18644
|
-
var _excluded$
|
|
18752
|
+
var _excluded$7 = ["content", "variant", "intent", "style", "testID"];
|
|
18645
18753
|
var Tag = function Tag(_ref) {
|
|
18646
18754
|
var content = _ref.content,
|
|
18647
18755
|
_ref$variant = _ref.variant,
|
|
@@ -18650,7 +18758,7 @@ var Tag = function Tag(_ref) {
|
|
|
18650
18758
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
18651
18759
|
style = _ref.style,
|
|
18652
18760
|
testID = _ref.testID,
|
|
18653
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
18761
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$7);
|
|
18654
18762
|
useDeprecation("Tag's variant prop is deprecated and will be removed in the next major release. Please remove it.", variant !== undefined);
|
|
18655
18763
|
return /*#__PURE__*/React__namespace.default.createElement(StyledView, _extends$1({}, nativeProps, {
|
|
18656
18764
|
themeIntent: intent,
|
|
@@ -18879,6 +18987,13 @@ var IconButtonLabel = index$9(Typography.Body)(function (_ref5) {
|
|
|
18879
18987
|
marginLeft: theme.__hd__.toolbar.space.iconButtonLabelMarginLeft
|
|
18880
18988
|
};
|
|
18881
18989
|
});
|
|
18990
|
+
var StyledLabel = index$9(Typography.Body)(function (_ref6) {
|
|
18991
|
+
var theme = _ref6.theme,
|
|
18992
|
+
intent = _ref6.intent;
|
|
18993
|
+
return {
|
|
18994
|
+
color: intent === 'secondary' ? theme.__hd__.toolbar.colors.secondary : theme.__hd__.typography.colors[intent]
|
|
18995
|
+
};
|
|
18996
|
+
});
|
|
18882
18997
|
|
|
18883
18998
|
var IconItem = function IconItem(_ref) {
|
|
18884
18999
|
var icon = _ref.icon,
|
|
@@ -18913,7 +19028,7 @@ var ToolbarItemContent = function ToolbarItemContent(_ref2) {
|
|
|
18913
19028
|
});
|
|
18914
19029
|
}
|
|
18915
19030
|
if (label) {
|
|
18916
|
-
return /*#__PURE__*/React__namespace.default.createElement(
|
|
19031
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledLabel, {
|
|
18917
19032
|
variant: "regular-bold",
|
|
18918
19033
|
intent: disabled ? 'disabled' : intent,
|
|
18919
19034
|
allowFontScaling: false,
|
|
@@ -18968,10 +19083,10 @@ var ToolbarGroup = function ToolbarGroup(_ref) {
|
|
|
18968
19083
|
}));
|
|
18969
19084
|
};
|
|
18970
19085
|
|
|
18971
|
-
var _excluded$
|
|
19086
|
+
var _excluded$6 = ["children"];
|
|
18972
19087
|
var Toolbar = function Toolbar(_ref) {
|
|
18973
19088
|
var children = _ref.children,
|
|
18974
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
19089
|
+
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
18975
19090
|
return /*#__PURE__*/React__namespace.default.createElement(ToolbarWrapper, rest, children);
|
|
18976
19091
|
};
|
|
18977
19092
|
var index$1 = Object.assign(Toolbar, {
|
|
@@ -18990,7 +19105,7 @@ var StyledIconWrapper = index$9(AnimatedBox)(function (_ref) {
|
|
|
18990
19105
|
};
|
|
18991
19106
|
});
|
|
18992
19107
|
|
|
18993
|
-
var _excluded$
|
|
19108
|
+
var _excluded$5 = ["options", "value", "onChange", "readonly", "disabled"];
|
|
18994
19109
|
var Rate = function Rate(_ref) {
|
|
18995
19110
|
var options = _ref.options,
|
|
18996
19111
|
value = _ref.value,
|
|
@@ -18999,7 +19114,7 @@ var Rate = function Rate(_ref) {
|
|
|
18999
19114
|
readonly = _ref$readonly === void 0 ? false : _ref$readonly,
|
|
19000
19115
|
_ref$disabled = _ref.disabled,
|
|
19001
19116
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
19002
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
19117
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$5);
|
|
19003
19118
|
var valueIndex = React.useMemo(function () {
|
|
19004
19119
|
return options.findIndex(function (item) {
|
|
19005
19120
|
return item.value === value;
|
|
@@ -36390,30 +36505,30 @@ function AnimatedScroller(_ref) {
|
|
|
36390
36505
|
}));
|
|
36391
36506
|
}
|
|
36392
36507
|
|
|
36393
|
-
var _excluded$
|
|
36508
|
+
var _excluded$4 = ["fabProps"];
|
|
36394
36509
|
var ScrollViewWithFAB = function ScrollViewWithFAB(_ref) {
|
|
36395
36510
|
var fabProps = _ref.fabProps,
|
|
36396
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
36511
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
36397
36512
|
return /*#__PURE__*/React__namespace.default.createElement(AnimatedScroller, {
|
|
36398
36513
|
ScrollComponent: /*#__PURE__*/React__namespace.default.createElement(reactNative.ScrollView, props),
|
|
36399
36514
|
fabProps: fabProps
|
|
36400
36515
|
});
|
|
36401
36516
|
};
|
|
36402
36517
|
|
|
36403
|
-
var _excluded$
|
|
36518
|
+
var _excluded$3 = ["fabProps"];
|
|
36404
36519
|
function FlatListWithFAB(_ref) {
|
|
36405
36520
|
var fabProps = _ref.fabProps,
|
|
36406
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
36521
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
36407
36522
|
return /*#__PURE__*/React__namespace.default.createElement(AnimatedScroller, {
|
|
36408
36523
|
ScrollComponent: /*#__PURE__*/React__namespace.default.createElement(reactNative.FlatList, props),
|
|
36409
36524
|
fabProps: fabProps
|
|
36410
36525
|
});
|
|
36411
36526
|
}
|
|
36412
36527
|
|
|
36413
|
-
var _excluded$
|
|
36528
|
+
var _excluded$2 = ["fabProps"];
|
|
36414
36529
|
function SectionListWithFAB(_ref) {
|
|
36415
36530
|
var fabProps = _ref.fabProps,
|
|
36416
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
36531
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
36417
36532
|
return /*#__PURE__*/React__namespace.default.createElement(AnimatedScroller, {
|
|
36418
36533
|
ScrollComponent: /*#__PURE__*/React__namespace.default.createElement(reactNative.SectionList, props),
|
|
36419
36534
|
fabProps: fabProps
|
|
@@ -36425,20 +36540,30 @@ var StyledContainer = index$9(reactNative.View)(function () {
|
|
|
36425
36540
|
width: '100%'
|
|
36426
36541
|
};
|
|
36427
36542
|
});
|
|
36543
|
+
var getBorderWidth = function getBorderWidth(theme, themeFocused, themeVariant) {
|
|
36544
|
+
return themeFocused ? theme.__hd__.search.borderWidths.container[themeVariant].focused : theme.__hd__.search.borderWidths.container[themeVariant].normal;
|
|
36545
|
+
};
|
|
36428
36546
|
var StyledInputContainer = index$9(reactNative.View)(function (_ref) {
|
|
36429
36547
|
var theme = _ref.theme,
|
|
36430
|
-
themeFocused = _ref.themeFocused
|
|
36431
|
-
|
|
36548
|
+
themeFocused = _ref.themeFocused,
|
|
36549
|
+
themeVariant = _ref.themeVariant;
|
|
36550
|
+
var borderWidth = getBorderWidth(theme, themeFocused, themeVariant);
|
|
36551
|
+
return _objectSpread2({
|
|
36432
36552
|
flexDirection: 'row',
|
|
36433
36553
|
alignItems: 'center',
|
|
36434
|
-
paddingHorizontal: theme.__hd__.search.space.containerHorizontalPadding,
|
|
36435
|
-
paddingVertical: theme.__hd__.search.space.containerVerticalPadding,
|
|
36436
|
-
backgroundColor: theme.__hd__.search.colors.containerBackground,
|
|
36554
|
+
paddingHorizontal: theme.__hd__.search.space.containerHorizontalPadding - borderWidth,
|
|
36555
|
+
paddingVertical: theme.__hd__.search.space.containerVerticalPadding - borderWidth,
|
|
36556
|
+
backgroundColor: theme.__hd__.search.colors[themeVariant].containerBackground,
|
|
36437
36557
|
height: 56,
|
|
36438
36558
|
borderRadius: theme.__hd__.search.radii.container,
|
|
36439
|
-
borderWidth:
|
|
36440
|
-
borderColor: themeFocused ? theme.__hd__.search.colors.
|
|
36441
|
-
}
|
|
36559
|
+
borderWidth: borderWidth,
|
|
36560
|
+
borderColor: themeFocused ? theme.__hd__.search.colors[themeVariant].focusedBorder : theme.__hd__.search.colors[themeVariant].border
|
|
36561
|
+
}, themeVariant === 'reversed' && {
|
|
36562
|
+
elevation: theme.__hd__.search.shadows.elevation,
|
|
36563
|
+
shadowOffset: theme.__hd__.search.shadows.offset,
|
|
36564
|
+
shadowOpacity: theme.__hd__.search.shadows.opacity,
|
|
36565
|
+
shadowRadius: theme.__hd__.search.shadows.radius
|
|
36566
|
+
});
|
|
36442
36567
|
});
|
|
36443
36568
|
var StyledAffixContainer = index$9(reactNative.View)(function (_ref2) {
|
|
36444
36569
|
var theme = _ref2.theme;
|
|
@@ -36454,7 +36579,7 @@ var StyledSuffixContainer = index$9(reactNative.View)(function (_ref3) {
|
|
|
36454
36579
|
alignItems: 'center',
|
|
36455
36580
|
width: theme.__hd__.search.sizes.surfixSize,
|
|
36456
36581
|
height: theme.__hd__.search.sizes.surfixSize,
|
|
36457
|
-
backgroundColor: theme.__hd__.search.colors.
|
|
36582
|
+
backgroundColor: theme.__hd__.search.colors.suffixBackground,
|
|
36458
36583
|
borderRadius: theme.__hd__.search.radii.surfix
|
|
36459
36584
|
};
|
|
36460
36585
|
});
|
|
@@ -36480,7 +36605,8 @@ var StyledHandlerContainer = index$9(reactNative.View)(function (_ref5) {
|
|
|
36480
36605
|
alignItems: 'flex-start',
|
|
36481
36606
|
flexGrow: 1,
|
|
36482
36607
|
height: '100%',
|
|
36483
|
-
marginHorizontal: theme.__hd__.search.space.inputHorizontalMargin
|
|
36608
|
+
marginHorizontal: theme.__hd__.search.space.inputHorizontalMargin,
|
|
36609
|
+
paddingVertical: theme.__hd__.search.space.inputVerticalPadding
|
|
36484
36610
|
};
|
|
36485
36611
|
});
|
|
36486
36612
|
var StyledBadge = index$9(Badge$1)(function (_ref6) {
|
|
@@ -36519,12 +36645,15 @@ var SearchTwoLine = function SearchTwoLine(props) {
|
|
|
36519
36645
|
style = props.style,
|
|
36520
36646
|
label = props.label,
|
|
36521
36647
|
content = props.content,
|
|
36522
|
-
testID = props.testID
|
|
36648
|
+
testID = props.testID,
|
|
36649
|
+
_props$variant = props.variant,
|
|
36650
|
+
variant = _props$variant === void 0 ? 'basic' : _props$variant;
|
|
36523
36651
|
return /*#__PURE__*/React__namespace.default.createElement(StyledContainer, {
|
|
36524
36652
|
style: style,
|
|
36525
36653
|
testID: testID
|
|
36526
36654
|
}, /*#__PURE__*/React__namespace.default.createElement(StyledInputContainer, {
|
|
36527
|
-
themeFocused: false
|
|
36655
|
+
themeFocused: false,
|
|
36656
|
+
themeVariant: variant
|
|
36528
36657
|
}, renderPrefix({
|
|
36529
36658
|
prefix: prefix
|
|
36530
36659
|
}), /*#__PURE__*/React__namespace.default.createElement(StyledHandlerContainer, null, /*#__PURE__*/React__namespace.default.createElement(Typography.Caption, {
|
|
@@ -36534,7 +36663,7 @@ var SearchTwoLine = function SearchTwoLine(props) {
|
|
|
36534
36663
|
})));
|
|
36535
36664
|
};
|
|
36536
36665
|
|
|
36537
|
-
var _excluded = ["prefix", "suffix", "style", "allowFontScaling", "accessibilityLabelledBy", "editable", "maxLength", "value", "defaultValue", "placeholder", "disabled", "testID"];
|
|
36666
|
+
var _excluded$1 = ["prefix", "suffix", "style", "allowFontScaling", "accessibilityLabelledBy", "editable", "maxLength", "value", "defaultValue", "placeholder", "disabled", "testID", "variant"];
|
|
36538
36667
|
var getState = function getState(_ref) {
|
|
36539
36668
|
var disabled = _ref.disabled,
|
|
36540
36669
|
editable = _ref.editable,
|
|
@@ -36574,7 +36703,9 @@ var SearchOneLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
36574
36703
|
_props$disabled = props.disabled,
|
|
36575
36704
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
36576
36705
|
testID = props.testID,
|
|
36577
|
-
|
|
36706
|
+
_props$variant = props.variant,
|
|
36707
|
+
variant = _props$variant === void 0 ? 'basic' : _props$variant,
|
|
36708
|
+
nativeProps = _objectWithoutProperties(props, _excluded$1);
|
|
36578
36709
|
var _React$useState = React__namespace.default.useState(false),
|
|
36579
36710
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
36580
36711
|
isFocused = _React$useState2[0],
|
|
@@ -36621,7 +36752,8 @@ var SearchOneLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
36621
36752
|
testID: testID,
|
|
36622
36753
|
style: style
|
|
36623
36754
|
}, /*#__PURE__*/React__namespace.default.createElement(StyledInputContainer, {
|
|
36624
|
-
themeFocused: isFocused
|
|
36755
|
+
themeFocused: isFocused,
|
|
36756
|
+
themeVariant: variant
|
|
36625
36757
|
}, renderPrefix({
|
|
36626
36758
|
prefix: prefix
|
|
36627
36759
|
}), renderInput({
|
|
@@ -36657,6 +36789,23 @@ var SearchOneLine = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
36657
36789
|
})));
|
|
36658
36790
|
});
|
|
36659
36791
|
|
|
36792
|
+
var _excluded = ["content", "icon"];
|
|
36793
|
+
var renderBadge = function renderBadge(props) {
|
|
36794
|
+
var content = props.content,
|
|
36795
|
+
icon = props.icon,
|
|
36796
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
36797
|
+
if (content) return /*#__PURE__*/React__namespace.default.createElement(StyledBadge, _extends$1({
|
|
36798
|
+
intent: "primary",
|
|
36799
|
+
content: content,
|
|
36800
|
+
size: "small"
|
|
36801
|
+
}, rest));
|
|
36802
|
+
if (icon) return /*#__PURE__*/React__namespace.default.createElement(StyledBadge, _extends$1({
|
|
36803
|
+
intent: "primary",
|
|
36804
|
+
icon: icon,
|
|
36805
|
+
size: "small"
|
|
36806
|
+
}, rest));
|
|
36807
|
+
return null;
|
|
36808
|
+
};
|
|
36660
36809
|
var SearchSuffixIcon = function SearchSuffixIcon(props) {
|
|
36661
36810
|
var suffix = props.suffix,
|
|
36662
36811
|
testID = props.testID,
|
|
@@ -36665,11 +36814,7 @@ var SearchSuffixIcon = function SearchSuffixIcon(props) {
|
|
|
36665
36814
|
return /*#__PURE__*/React__namespace.default.createElement(StyledSuffixContainer, {
|
|
36666
36815
|
testID: testID,
|
|
36667
36816
|
style: style
|
|
36668
|
-
}, !!badge &&
|
|
36669
|
-
intent: "primary"
|
|
36670
|
-
}, badge, {
|
|
36671
|
-
size: "small"
|
|
36672
|
-
})), renderSuffix({
|
|
36817
|
+
}, !!badge && renderBadge(badge), renderSuffix({
|
|
36673
36818
|
suffix: suffix
|
|
36674
36819
|
}));
|
|
36675
36820
|
};
|