@hero-design/rn 8.68.0 → 8.70.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 +32 -0
- package/es/index.js +310 -164
- package/lib/index.js +310 -163
- package/package.json +2 -2
- package/src/components/BottomSheet/Header.tsx +50 -27
- package/src/components/BottomSheet/StyledBottomSheet.tsx +35 -8
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +352 -1
- package/src/components/BottomSheet/__tests__/index.spec.tsx +30 -0
- package/src/components/BottomSheet/index.tsx +47 -30
- package/src/components/Card/StyledCard.tsx +6 -2
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +1 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +7 -0
- package/src/components/Card/__tests__/index.spec.tsx +12 -0
- package/src/components/Card/index.tsx +8 -2
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +4 -0
- package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +1 -0
- package/src/components/Chip/StyledChip.tsx +15 -45
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +145 -389
- package/src/components/Chip/__tests__/index.spec.tsx +6 -26
- package/src/components/Chip/index.tsx +26 -33
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -1
- package/src/components/Progress/ProgressStep.tsx +87 -0
- package/src/components/Progress/StyledStep.tsx +48 -0
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +209 -0
- package/src/components/Progress/__tests__/index.spec.js +26 -0
- package/src/components/Progress/index.tsx +6 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -1
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +25 -6
- package/src/theme/components/bottomSheet.ts +7 -0
- package/src/theme/components/card.ts +1 -0
- package/src/theme/components/chip.ts +8 -6
- package/src/theme/components/progress.ts +11 -1
- package/src/theme/global/colors/__tests__/__snapshots__/swagLight.spec.ts.snap +12 -12
- package/src/theme/global/colors/__tests__/__snapshots__/swagLightGlobal.spec.ts.snap +39 -0
- package/src/theme/global/colors/__tests__/__snapshots__/swagLightJobs.spec.ts.snap +50 -0
- package/src/theme/global/colors/__tests__/swagLightGlobal.spec.ts +7 -0
- package/src/theme/global/colors/__tests__/swagLightJobs.spec.ts +7 -0
- package/src/theme/global/colors/swagLight.ts +9 -10
- package/src/theme/global/colors/swagLightGlobal.ts +14 -0
- package/src/theme/global/colors/swagLightJobs.ts +11 -0
- package/src/theme/global/colors/types.ts +4 -0
- package/src/theme/global/index.ts +2 -0
- package/src/theme/index.ts +2 -0
- package/stats/8.69.0/rn-stats.html +4842 -0
- package/stats/8.70.0/rn-stats.html +4842 -0
- package/types/components/BottomSheet/Header.d.ts +3 -2
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +16 -2
- package/types/components/BottomSheet/index.d.ts +5 -1
- package/types/components/Box/StyledBox.d.ts +1 -1
- package/types/components/Card/StyledCard.d.ts +1 -0
- package/types/components/Card/index.d.ts +2 -1
- package/types/components/Chip/StyledChip.d.ts +1 -19
- package/types/components/Chip/index.d.ts +6 -2
- package/types/components/Progress/ProgressStep.d.ts +20 -0
- package/types/components/Progress/StyledStep.d.ts +21 -0
- package/types/components/Progress/index.d.ts +1 -0
- package/types/index.d.ts +2 -2
- package/types/theme/components/bottomSheet.d.ts +7 -0
- package/types/theme/components/card.d.ts +1 -0
- package/types/theme/components/chip.d.ts +8 -6
- package/types/theme/components/progress.d.ts +9 -0
- package/types/theme/global/colors/swagLightGlobal.d.ts +3 -0
- package/types/theme/global/colors/swagLightJobs.d.ts +47 -0
- package/types/theme/global/colors/types.d.ts +2 -0
- package/types/theme/global/index.d.ts +4 -1
- package/types/theme/index.d.ts +2 -2
package/lib/index.js
CHANGED
|
@@ -1385,7 +1385,8 @@ var BASE_COLORS = {
|
|
|
1385
1385
|
theatreGold: '#a56822',
|
|
1386
1386
|
uniformGreen: '#4d4628',
|
|
1387
1387
|
yellow: '#fadb14',
|
|
1388
|
-
windsorGrey: '#606065'
|
|
1388
|
+
windsorGrey: '#606065',
|
|
1389
|
+
woodsmoke: '#121214'
|
|
1389
1390
|
};
|
|
1390
1391
|
var colorScales = Object.entries(BASE_COLORS).reduce(function (acc, _ref16) {
|
|
1391
1392
|
var _ref17 = _slicedToArray(_ref16, 2),
|
|
@@ -1766,9 +1767,13 @@ var palette$4 = Object.assign(Object.assign({}, palette$9), {
|
|
|
1766
1767
|
violet: violet1$1.base,
|
|
1767
1768
|
mauve: mauve$1.base
|
|
1768
1769
|
});
|
|
1769
|
-
var violet$3 = colorScales.violet
|
|
1770
|
+
var violet$3 = colorScales.violet,
|
|
1771
|
+
woodsmoke = colorScales.woodsmoke;
|
|
1770
1772
|
var palette$3 = Object.assign(Object.assign({}, palette$9), {
|
|
1771
|
-
|
|
1773
|
+
violetLight90: violet$3.lighten90,
|
|
1774
|
+
offBlack: woodsmoke.base,
|
|
1775
|
+
offBlackLight30: woodsmoke.lighten30,
|
|
1776
|
+
offBlackLight50: woodsmoke.lighten50
|
|
1772
1777
|
});
|
|
1773
1778
|
var scarletGum = colorScales.scarletGum,
|
|
1774
1779
|
violet1 = colorScales.violet1,
|
|
@@ -1934,18 +1939,33 @@ var swagDarkBrandSystemPalette = {
|
|
|
1934
1939
|
};
|
|
1935
1940
|
var swagDarkSystemPalette = _objectSpread2(_objectSpread2({}, globalPalette), swagDarkBrandSystemPalette);
|
|
1936
1941
|
|
|
1942
|
+
var swagLightGlobalPalette = _objectSpread2(_objectSpread2({}, globalPalette$1), {}, {
|
|
1943
|
+
onDefaultGlobalSurface: palette$3.offBlack,
|
|
1944
|
+
mutedOnDefaultGlobalSurface: palette$3.offBlackLight30,
|
|
1945
|
+
inactiveOnDefaultGlobalSurface: palette$3.offBlackLight50,
|
|
1946
|
+
primaryOutline: palette$3.offBlack,
|
|
1947
|
+
inactiveOutline: palette$3.offBlackLight50
|
|
1948
|
+
});
|
|
1949
|
+
|
|
1937
1950
|
var swagBrandSystemPallete = {
|
|
1938
|
-
primary:
|
|
1939
|
-
onPrimary: '#
|
|
1940
|
-
secondary: '#
|
|
1951
|
+
primary: '#460078',
|
|
1952
|
+
onPrimary: '#fdfbff',
|
|
1953
|
+
secondary: '#b382fd',
|
|
1941
1954
|
onSecondary: palette$3.white,
|
|
1942
|
-
defaultSurface: '#
|
|
1943
|
-
highlightedSurface:
|
|
1955
|
+
defaultSurface: '#fdfbff',
|
|
1956
|
+
highlightedSurface: palette$3.violetLight90,
|
|
1944
1957
|
pressedSurface: '#380060',
|
|
1945
|
-
decorativePrimary: '#
|
|
1946
|
-
decorativePrimarySurface: '#
|
|
1958
|
+
decorativePrimary: '#fdfbff',
|
|
1959
|
+
decorativePrimarySurface: '#dacce4'
|
|
1947
1960
|
};
|
|
1948
|
-
var swagSystemPalette = _objectSpread2(_objectSpread2({},
|
|
1961
|
+
var swagSystemPalette = _objectSpread2(_objectSpread2({}, swagLightGlobalPalette), swagBrandSystemPallete);
|
|
1962
|
+
|
|
1963
|
+
var swagLightJobsSystemPalette = _objectSpread2(_objectSpread2({}, swagSystemPalette), {}, {
|
|
1964
|
+
secondary: '#40d1ff',
|
|
1965
|
+
onSecondary: '#460078',
|
|
1966
|
+
decorativeSecondary: '#fdfbff',
|
|
1967
|
+
decorativeSecondarySurface: '#d9f6ff'
|
|
1968
|
+
});
|
|
1949
1969
|
|
|
1950
1970
|
var workBrandSystemPallete = {
|
|
1951
1971
|
primary: palette.black,
|
|
@@ -2392,17 +2412,22 @@ var getBottomSheetTheme = function getBottomSheetTheme(theme) {
|
|
|
2392
2412
|
var colors = {
|
|
2393
2413
|
shadow: theme.colors.primaryOutline,
|
|
2394
2414
|
background: theme.colors.defaultGlobalSurface,
|
|
2395
|
-
backdrop: theme.colors.overlayGlobalSurface
|
|
2415
|
+
backdrop: theme.colors.overlayGlobalSurface,
|
|
2416
|
+
floatingHeaderIconBackground: theme.colors.archivedSurface
|
|
2396
2417
|
};
|
|
2397
2418
|
var sizes = {
|
|
2398
|
-
closeIcon: theme.sizes.xxxlarge
|
|
2419
|
+
closeIcon: theme.sizes.xxxlarge,
|
|
2420
|
+
floatingCloseIcon: theme.sizes.smallMedium
|
|
2399
2421
|
};
|
|
2400
2422
|
var space = {
|
|
2401
2423
|
headerWrapperVerticalPadding: theme.space.small,
|
|
2402
2424
|
headerWrapperHorizontalPadding: theme.space.medium,
|
|
2403
2425
|
closeIconMargin: theme.space.smallMedium,
|
|
2404
2426
|
footerVerticalPadding: theme.space.xxsmall,
|
|
2405
|
-
footerHorizontalPadding: theme.space.smallMedium
|
|
2427
|
+
footerHorizontalPadding: theme.space.smallMedium,
|
|
2428
|
+
floatingContentMargin: theme.space.medium,
|
|
2429
|
+
floatingInnerPadding: theme.space.small,
|
|
2430
|
+
floatingHeaderIconPadding: theme.space.small
|
|
2406
2431
|
};
|
|
2407
2432
|
var shadows = {
|
|
2408
2433
|
offset: {
|
|
@@ -2414,7 +2439,9 @@ var getBottomSheetTheme = function getBottomSheetTheme(theme) {
|
|
|
2414
2439
|
elevation: 10
|
|
2415
2440
|
};
|
|
2416
2441
|
var radii = {
|
|
2417
|
-
"default": theme.radii.xlarge
|
|
2442
|
+
"default": theme.radii.xlarge,
|
|
2443
|
+
floating: theme.radii['5xlarge'],
|
|
2444
|
+
floatingHeaderIcon: theme.radii.rounded
|
|
2418
2445
|
};
|
|
2419
2446
|
return {
|
|
2420
2447
|
colors: colors,
|
|
@@ -2540,7 +2567,8 @@ var getCardTheme = function getCardTheme(theme) {
|
|
|
2540
2567
|
indicatorWidth: theme.sizes.medium
|
|
2541
2568
|
};
|
|
2542
2569
|
var radii = {
|
|
2543
|
-
"default": theme.radii.large
|
|
2570
|
+
"default": theme.radii.large,
|
|
2571
|
+
superRound: theme.radii.xxxlarge
|
|
2544
2572
|
};
|
|
2545
2573
|
return {
|
|
2546
2574
|
colors: colors,
|
|
@@ -2629,21 +2657,23 @@ var getCheckboxTheme = function getCheckboxTheme(theme) {
|
|
|
2629
2657
|
|
|
2630
2658
|
var getChipTheme = function getChipTheme(theme) {
|
|
2631
2659
|
var colors = {
|
|
2632
|
-
primaryBackground: theme.colors.darkGlobalSurface,
|
|
2633
2660
|
secondaryBackground: theme.colors.highlightedSurface,
|
|
2634
2661
|
filledBackground: theme.colors.defaultGlobalSurface,
|
|
2635
|
-
outlinedBackground: 'transparent',
|
|
2636
|
-
wrapperBorder: theme.colors.primaryOutline,
|
|
2637
2662
|
wrapperSelectedBorder: 'transparent',
|
|
2638
|
-
|
|
2663
|
+
outlinedDefaultBackground: theme.colors.defaultGlobalSurface,
|
|
2664
|
+
outlinedSelectedBackground: theme.colors.secondaryOutline,
|
|
2665
|
+
outlinedSelectedBorder: theme.colors.primaryOutline,
|
|
2666
|
+
outlinedDefaultBorder: theme.colors.disabledOnDefaultGlobalSurface
|
|
2639
2667
|
};
|
|
2640
2668
|
var space = {
|
|
2641
2669
|
wrapperHorizontalPadding: theme.space.smallMedium,
|
|
2642
2670
|
wrapperVerticalPadding: theme.space.small,
|
|
2643
|
-
|
|
2671
|
+
iconWrapperHorizontalMargin: theme.space.small,
|
|
2672
|
+
outlinedSelectedMarginTop: -theme.space.xxsmall
|
|
2644
2673
|
};
|
|
2645
2674
|
var sizes = {
|
|
2646
|
-
|
|
2675
|
+
outlinedDefaultBorder: theme.borderWidths.base,
|
|
2676
|
+
outlinedSelectedBorder: theme.borderWidths.medium
|
|
2647
2677
|
};
|
|
2648
2678
|
var radii = {
|
|
2649
2679
|
wrapper: theme.radii.rounded
|
|
@@ -3067,20 +3097,30 @@ var getProgressTheme = function getProgressTheme(theme) {
|
|
|
3067
3097
|
dangerInverted: theme.colors.mutedError,
|
|
3068
3098
|
infoInverted: theme.colors.mutedInfo,
|
|
3069
3099
|
archivedInverted: theme.colors.mutedArchived
|
|
3100
|
+
},
|
|
3101
|
+
step: {
|
|
3102
|
+
complete: theme.colors.primary,
|
|
3103
|
+
incomplete: theme.colors.archivedSurface,
|
|
3104
|
+
current: '#DACCE4'
|
|
3070
3105
|
}
|
|
3071
3106
|
};
|
|
3072
3107
|
var sizes = {
|
|
3073
3108
|
circleDiameter: theme.sizes['6xlarge'],
|
|
3074
3109
|
circleCompletenessHeight: theme.sizes.small,
|
|
3075
|
-
barHeight: theme.sizes.small
|
|
3110
|
+
barHeight: theme.sizes.small,
|
|
3111
|
+
stepHeight: theme.sizes.small
|
|
3076
3112
|
};
|
|
3077
3113
|
var radii = {
|
|
3078
3114
|
"default": theme.radii.rounded
|
|
3079
3115
|
};
|
|
3116
|
+
var space = {
|
|
3117
|
+
stepGap: theme.space.xsmall
|
|
3118
|
+
};
|
|
3080
3119
|
return {
|
|
3081
3120
|
colors: colors,
|
|
3082
3121
|
sizes: sizes,
|
|
3083
|
-
radii: radii
|
|
3122
|
+
radii: radii,
|
|
3123
|
+
space: space
|
|
3084
3124
|
};
|
|
3085
3125
|
};
|
|
3086
3126
|
|
|
@@ -6988,7 +7028,7 @@ var StyledText$3 = index$9(reactNative.Text)(function (_ref) {
|
|
|
6988
7028
|
});
|
|
6989
7029
|
});
|
|
6990
7030
|
|
|
6991
|
-
var _excluded$
|
|
7031
|
+
var _excluded$F = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
|
|
6992
7032
|
var Text = function Text(_ref) {
|
|
6993
7033
|
var children = _ref.children,
|
|
6994
7034
|
_ref$fontSize = _ref.fontSize,
|
|
@@ -7001,7 +7041,7 @@ var Text = function Text(_ref) {
|
|
|
7001
7041
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
7002
7042
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
7003
7043
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
7004
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7044
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$F);
|
|
7005
7045
|
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.');
|
|
7006
7046
|
return /*#__PURE__*/React__namespace.default.createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
7007
7047
|
themeFontSize: fontSize,
|
|
@@ -7031,7 +7071,7 @@ var StyledCaption = index$9(reactNative.Text)(function (_ref) {
|
|
|
7031
7071
|
};
|
|
7032
7072
|
});
|
|
7033
7073
|
|
|
7034
|
-
var _excluded$
|
|
7074
|
+
var _excluded$E = ["children", "fontWeight", "intent", "allowFontScaling"];
|
|
7035
7075
|
var Caption = function Caption(_ref) {
|
|
7036
7076
|
var children = _ref.children,
|
|
7037
7077
|
_ref$fontWeight = _ref.fontWeight,
|
|
@@ -7040,7 +7080,7 @@ var Caption = function Caption(_ref) {
|
|
|
7040
7080
|
intent = _ref$intent === void 0 ? 'body' : _ref$intent,
|
|
7041
7081
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
7042
7082
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
7043
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7083
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$E);
|
|
7044
7084
|
return /*#__PURE__*/React__namespace.default.createElement(StyledCaption, _extends$1({}, nativeProps, {
|
|
7045
7085
|
themeFontWeight: fontWeight,
|
|
7046
7086
|
themeIntent: intent,
|
|
@@ -7048,7 +7088,7 @@ var Caption = function Caption(_ref) {
|
|
|
7048
7088
|
}), children);
|
|
7049
7089
|
};
|
|
7050
7090
|
|
|
7051
|
-
var StyledLabel
|
|
7091
|
+
var StyledLabel = index$9(reactNative.Text)(function (_ref) {
|
|
7052
7092
|
var themeIntent = _ref.themeIntent,
|
|
7053
7093
|
theme = _ref.theme;
|
|
7054
7094
|
return {
|
|
@@ -7059,15 +7099,15 @@ var StyledLabel$1 = index$9(reactNative.Text)(function (_ref) {
|
|
|
7059
7099
|
};
|
|
7060
7100
|
});
|
|
7061
7101
|
|
|
7062
|
-
var _excluded$
|
|
7102
|
+
var _excluded$D = ["children", "intent", "allowFontScaling"];
|
|
7063
7103
|
var Label = function Label(_ref) {
|
|
7064
7104
|
var children = _ref.children,
|
|
7065
7105
|
_ref$intent = _ref.intent,
|
|
7066
7106
|
intent = _ref$intent === void 0 ? 'body' : _ref$intent,
|
|
7067
7107
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
7068
7108
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
7069
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7070
|
-
return /*#__PURE__*/React__namespace.default.createElement(StyledLabel
|
|
7109
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$D);
|
|
7110
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledLabel, _extends$1({}, nativeProps, {
|
|
7071
7111
|
themeIntent: intent,
|
|
7072
7112
|
allowFontScaling: allowFontScaling
|
|
7073
7113
|
}), children);
|
|
@@ -7087,7 +7127,7 @@ var StyledTitle$1 = index$9(reactNative.Text)(function (_ref) {
|
|
|
7087
7127
|
};
|
|
7088
7128
|
});
|
|
7089
7129
|
|
|
7090
|
-
var _excluded$
|
|
7130
|
+
var _excluded$C = ["children", "intent", "allowFontScaling", "level", "typeface"];
|
|
7091
7131
|
var Title = function Title(_ref) {
|
|
7092
7132
|
var children = _ref.children,
|
|
7093
7133
|
_ref$intent = _ref.intent,
|
|
@@ -7098,7 +7138,7 @@ var Title = function Title(_ref) {
|
|
|
7098
7138
|
level = _ref$level === void 0 ? 'h1' : _ref$level,
|
|
7099
7139
|
_ref$typeface = _ref.typeface,
|
|
7100
7140
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
7101
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7141
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$C);
|
|
7102
7142
|
return /*#__PURE__*/React__namespace.default.createElement(StyledTitle$1, _extends$1({}, nativeProps, {
|
|
7103
7143
|
themeLevel: level,
|
|
7104
7144
|
themeTypeface: typeface,
|
|
@@ -7133,7 +7173,7 @@ var StyledBody$1 = index$9(reactNative.Text)(function (_ref) {
|
|
|
7133
7173
|
};
|
|
7134
7174
|
});
|
|
7135
7175
|
|
|
7136
|
-
var _excluded$
|
|
7176
|
+
var _excluded$B = ["children", "intent", "allowFontScaling", "typeface", "variant"];
|
|
7137
7177
|
var Body = function Body(_ref) {
|
|
7138
7178
|
var children = _ref.children,
|
|
7139
7179
|
_ref$intent = _ref.intent,
|
|
@@ -7144,7 +7184,7 @@ var Body = function Body(_ref) {
|
|
|
7144
7184
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
7145
7185
|
_ref$variant = _ref.variant,
|
|
7146
7186
|
variant = _ref$variant === void 0 ? 'regular' : _ref$variant,
|
|
7147
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7187
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$B);
|
|
7148
7188
|
return /*#__PURE__*/React__namespace.default.createElement(StyledBody$1, _extends$1({}, nativeProps, {
|
|
7149
7189
|
themeTypeface: typeface,
|
|
7150
7190
|
themeIntent: intent,
|
|
@@ -7711,10 +7751,10 @@ var StyledHeroIcon = index$9(HeroIcon)(function (_ref) {
|
|
|
7711
7751
|
};
|
|
7712
7752
|
});
|
|
7713
7753
|
|
|
7714
|
-
var _excluded$
|
|
7754
|
+
var _excluded$A = ["style"];
|
|
7715
7755
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
7716
7756
|
var style = _ref.style,
|
|
7717
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
7757
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$A);
|
|
7718
7758
|
var rotateAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
7719
7759
|
React.useEffect(function () {
|
|
7720
7760
|
var animation = reactNative.Animated.loop(reactNative.Animated.timing(rotateAnimation.current, {
|
|
@@ -7819,7 +7859,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
7819
7859
|
}, content));
|
|
7820
7860
|
};
|
|
7821
7861
|
|
|
7822
|
-
var _excluded$
|
|
7862
|
+
var _excluded$z = ["key"];
|
|
7823
7863
|
var Accordion = function Accordion(_ref) {
|
|
7824
7864
|
var items = _ref.items,
|
|
7825
7865
|
activeItemKey = _ref.activeItemKey,
|
|
@@ -7840,7 +7880,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
7840
7880
|
testID: testID
|
|
7841
7881
|
}, items.map(function (_ref2, index) {
|
|
7842
7882
|
var key = _ref2.key,
|
|
7843
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
7883
|
+
props = _objectWithoutProperties(_ref2, _excluded$z);
|
|
7844
7884
|
var open = _activeItemKey === key;
|
|
7845
7885
|
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, {
|
|
7846
7886
|
key: key
|
|
@@ -7875,7 +7915,7 @@ var IconContainer$1 = index$9(reactNative.View)(function (_ref2) {
|
|
|
7875
7915
|
paddingLeft: theme.__hd__.alert.space.iconLeftPadding
|
|
7876
7916
|
};
|
|
7877
7917
|
});
|
|
7878
|
-
var StyledIcon$
|
|
7918
|
+
var StyledIcon$1 = index$9(Icon)(function (_ref3) {
|
|
7879
7919
|
var theme = _ref3.theme,
|
|
7880
7920
|
themeIntent = _ref3.themeIntent;
|
|
7881
7921
|
return {
|
|
@@ -7934,7 +7974,7 @@ var AlertIcon = function AlertIcon(_ref) {
|
|
|
7934
7974
|
intent = _ref.intent;
|
|
7935
7975
|
return icon ? /*#__PURE__*/React__namespace.default.createElement(IconContainer$1, {
|
|
7936
7976
|
testID: "alert-left-icon"
|
|
7937
|
-
}, /*#__PURE__*/React__namespace.default.createElement(StyledIcon$
|
|
7977
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledIcon$1, {
|
|
7938
7978
|
icon: icon,
|
|
7939
7979
|
size: "small",
|
|
7940
7980
|
themeIntent: intent
|
|
@@ -7975,7 +8015,7 @@ var Alert = function Alert(_ref2) {
|
|
|
7975
8015
|
}, typeof actionLabel === 'string' ? /*#__PURE__*/React__namespace.default.createElement(StyledBody, {
|
|
7976
8016
|
variant: "small-bold",
|
|
7977
8017
|
themeIntent: intent
|
|
7978
|
-
}, actionLabel) : /*#__PURE__*/React__namespace.default.createElement(StyledIcon$
|
|
8018
|
+
}, actionLabel) : /*#__PURE__*/React__namespace.default.createElement(StyledIcon$1, {
|
|
7979
8019
|
icon: "cancel",
|
|
7980
8020
|
size: "small",
|
|
7981
8021
|
themeIntent: intent
|
|
@@ -8334,7 +8374,7 @@ var borderWidths = {
|
|
|
8334
8374
|
var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
|
|
8335
8375
|
var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
|
|
8336
8376
|
|
|
8337
|
-
var _excluded$
|
|
8377
|
+
var _excluded$y = ["theme"];
|
|
8338
8378
|
var getThemeValue = function getThemeValue(theme, key, props) {
|
|
8339
8379
|
var propConfig = config[key];
|
|
8340
8380
|
var propValue = props[key];
|
|
@@ -8361,18 +8401,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
|
|
|
8361
8401
|
var configKeys = Object.keys(config);
|
|
8362
8402
|
var StyledBox = index$9(reactNative.View)(function (_ref5) {
|
|
8363
8403
|
var theme = _ref5.theme,
|
|
8364
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
8404
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$y);
|
|
8365
8405
|
var styleProps = pick(configKeys, otherProps);
|
|
8366
8406
|
var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
|
|
8367
8407
|
return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
|
|
8368
8408
|
});
|
|
8369
8409
|
|
|
8370
|
-
var _excluded$
|
|
8410
|
+
var _excluded$x = ["children", "style", "testID"];
|
|
8371
8411
|
var Box = function Box(_ref) {
|
|
8372
8412
|
var children = _ref.children,
|
|
8373
8413
|
style = _ref.style,
|
|
8374
8414
|
testID = _ref.testID,
|
|
8375
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
8415
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$x);
|
|
8376
8416
|
return /*#__PURE__*/React__namespace.default.createElement(StyledBox, _extends$1({}, otherProps, {
|
|
8377
8417
|
style: style,
|
|
8378
8418
|
testID: testID
|
|
@@ -8591,7 +8631,7 @@ var StyledStatus = index$9(reactNative.Animated.View)(function (_ref3) {
|
|
|
8591
8631
|
};
|
|
8592
8632
|
});
|
|
8593
8633
|
|
|
8594
|
-
var _excluded$
|
|
8634
|
+
var _excluded$w = ["children", "visible", "intent", "style", "testID"];
|
|
8595
8635
|
var Status = function Status(_ref) {
|
|
8596
8636
|
var children = _ref.children,
|
|
8597
8637
|
_ref$visible = _ref.visible,
|
|
@@ -8600,7 +8640,7 @@ var Status = function Status(_ref) {
|
|
|
8600
8640
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
8601
8641
|
style = _ref.style,
|
|
8602
8642
|
testID = _ref.testID,
|
|
8603
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
8643
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$w);
|
|
8604
8644
|
var _React$useRef = React__namespace.default.useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
8605
8645
|
opacity = _React$useRef.current;
|
|
8606
8646
|
var isFirstRendering = React__namespace.default.useRef(true);
|
|
@@ -8633,7 +8673,7 @@ var Status = function Status(_ref) {
|
|
|
8633
8673
|
}));
|
|
8634
8674
|
};
|
|
8635
8675
|
|
|
8636
|
-
var _excluded$
|
|
8676
|
+
var _excluded$v = ["content", "visible", "max", "intent", "style", "testID", "size"];
|
|
8637
8677
|
var DEFAULT_MAX_NUMBER = 99;
|
|
8638
8678
|
var getPaddingState = function getPaddingState(content) {
|
|
8639
8679
|
return content.length > 1 ? 'wideContent' : 'narrowContent';
|
|
@@ -8650,7 +8690,7 @@ var Badge = function Badge(_ref) {
|
|
|
8650
8690
|
testID = _ref.testID,
|
|
8651
8691
|
_ref$size = _ref.size,
|
|
8652
8692
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
8653
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
8693
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$v);
|
|
8654
8694
|
var _React$useRef = React__namespace.default.useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
8655
8695
|
opacity = _React$useRef.current;
|
|
8656
8696
|
var isFirstRendering = React__namespace.default.useRef(true);
|
|
@@ -8740,7 +8780,7 @@ var StyledBottomBarText = index$9(Typography.Caption)(function (_ref3) {
|
|
|
8740
8780
|
};
|
|
8741
8781
|
});
|
|
8742
8782
|
|
|
8743
|
-
var _excluded$
|
|
8783
|
+
var _excluded$u = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
|
|
8744
8784
|
var getInactiveIcon = function getInactiveIcon(icon) {
|
|
8745
8785
|
var inactiveIcon = "".concat(icon, "-outlined");
|
|
8746
8786
|
return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
|
|
@@ -8751,7 +8791,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8751
8791
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
8752
8792
|
selectedTabKey = _ref.selectedTabKey,
|
|
8753
8793
|
tabs = _ref.tabs,
|
|
8754
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
8794
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$u);
|
|
8755
8795
|
var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
8756
8796
|
/**
|
|
8757
8797
|
* List of loaded tabs, tabs will be loaded when navigated to.
|
|
@@ -8837,13 +8877,13 @@ var StyledDivider = index$9(reactNative.View)(function (_ref) {
|
|
|
8837
8877
|
}, horizontalMargin), verticalMargin);
|
|
8838
8878
|
});
|
|
8839
8879
|
|
|
8840
|
-
var _excluded$
|
|
8880
|
+
var _excluded$t = ["marginHorizontal", "marginVertical", "style", "testID"];
|
|
8841
8881
|
var Divider = function Divider(_ref) {
|
|
8842
8882
|
var marginHorizontal = _ref.marginHorizontal,
|
|
8843
8883
|
marginVertical = _ref.marginVertical,
|
|
8844
8884
|
style = _ref.style,
|
|
8845
8885
|
testID = _ref.testID,
|
|
8846
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
8886
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$t);
|
|
8847
8887
|
return /*#__PURE__*/React__namespace.default.createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
8848
8888
|
themeMarginHorizontal: marginHorizontal,
|
|
8849
8889
|
themeMarginVertical: marginVertical,
|
|
@@ -8863,8 +8903,29 @@ var StyledKeyboardAvoidingView = index$9(reactNative.KeyboardAvoidingView)(funct
|
|
|
8863
8903
|
flexDirection: 'column-reverse'
|
|
8864
8904
|
};
|
|
8865
8905
|
});
|
|
8866
|
-
var
|
|
8906
|
+
var StyledFloatingWrapper = index$9(AnimatedSafeAreaView)(function (_ref) {
|
|
8867
8907
|
var theme = _ref.theme;
|
|
8908
|
+
return {
|
|
8909
|
+
margin: theme.__hd__.bottomSheet.space.floatingContentMargin
|
|
8910
|
+
};
|
|
8911
|
+
});
|
|
8912
|
+
var StyledFloatingBottomSheet = index$9(reactNative.Animated.View)(function (_ref2) {
|
|
8913
|
+
var theme = _ref2.theme;
|
|
8914
|
+
return {
|
|
8915
|
+
width: '100%',
|
|
8916
|
+
shadowColor: theme.__hd__.bottomSheet.colors.shadow,
|
|
8917
|
+
shadowOffset: theme.__hd__.bottomSheet.shadows.offset,
|
|
8918
|
+
shadowOpacity: theme.__hd__.bottomSheet.shadows.opacity,
|
|
8919
|
+
shadowRadius: theme.__hd__.bottomSheet.shadows.radius,
|
|
8920
|
+
elevation: theme.__hd__.bottomSheet.shadows.elevation,
|
|
8921
|
+
backgroundColor: theme.__hd__.bottomSheet.colors.background,
|
|
8922
|
+
borderRadius: theme.__hd__.bottomSheet.radii.floating,
|
|
8923
|
+
maxHeight: '100%',
|
|
8924
|
+
padding: theme.__hd__.bottomSheet.space.floatingInnerPadding
|
|
8925
|
+
};
|
|
8926
|
+
});
|
|
8927
|
+
var StyledBottomSheet = index$9(AnimatedSafeAreaView)(function (_ref3) {
|
|
8928
|
+
var theme = _ref3.theme;
|
|
8868
8929
|
return {
|
|
8869
8930
|
borderTopLeftRadius: theme.__hd__.bottomSheet.radii["default"],
|
|
8870
8931
|
borderTopRightRadius: theme.__hd__.bottomSheet.radii["default"],
|
|
@@ -8878,15 +8939,15 @@ var StyledBottomSheet = index$9(AnimatedSafeAreaView)(function (_ref) {
|
|
|
8878
8939
|
maxHeight: '94%'
|
|
8879
8940
|
};
|
|
8880
8941
|
});
|
|
8881
|
-
var StyledBackdrop$2 = index$9(AnimatedPressable$2)(function (
|
|
8882
|
-
var theme =
|
|
8942
|
+
var StyledBackdrop$2 = index$9(AnimatedPressable$2)(function (_ref4) {
|
|
8943
|
+
var theme = _ref4.theme;
|
|
8883
8944
|
return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
8884
8945
|
backgroundColor: theme.__hd__.bottomSheet.colors.backdrop,
|
|
8885
8946
|
opacity: 0.4
|
|
8886
8947
|
});
|
|
8887
8948
|
});
|
|
8888
|
-
var StyledHeaderWrapper = index$9(reactNative.View)(function (
|
|
8889
|
-
var theme =
|
|
8949
|
+
var StyledHeaderWrapper = index$9(reactNative.View)(function (_ref5) {
|
|
8950
|
+
var theme = _ref5.theme;
|
|
8890
8951
|
return {
|
|
8891
8952
|
flexDirection: 'row',
|
|
8892
8953
|
paddingVertical: theme.__hd__.bottomSheet.space.headerWrapperVerticalPadding,
|
|
@@ -8897,8 +8958,8 @@ var StyledHeader = index$9(reactNative.View)({
|
|
|
8897
8958
|
flex: 1,
|
|
8898
8959
|
justifyContent: 'center'
|
|
8899
8960
|
});
|
|
8900
|
-
var StyledFooter = index$9(reactNative.View)(function (
|
|
8901
|
-
var theme =
|
|
8961
|
+
var StyledFooter = index$9(reactNative.View)(function (_ref6) {
|
|
8962
|
+
var theme = _ref6.theme;
|
|
8902
8963
|
return {
|
|
8903
8964
|
paddingHorizontal: theme.__hd__.bottomSheet.space.footerHorizontalPadding,
|
|
8904
8965
|
paddingVertical: theme.__hd__.bottomSheet.space.footerVerticalPadding,
|
|
@@ -8907,16 +8968,24 @@ var StyledFooter = index$9(reactNative.View)(function (_ref4) {
|
|
|
8907
8968
|
flexDirection: 'row'
|
|
8908
8969
|
};
|
|
8909
8970
|
});
|
|
8910
|
-
var StyledIconWrapper$
|
|
8911
|
-
var theme =
|
|
8971
|
+
var StyledIconWrapper$3 = index$9(reactNative.View)(function (_ref7) {
|
|
8972
|
+
var theme = _ref7.theme;
|
|
8912
8973
|
return {
|
|
8913
|
-
alignItems: '
|
|
8974
|
+
alignItems: 'flex-end',
|
|
8914
8975
|
justifyContent: 'center',
|
|
8915
8976
|
width: theme.__hd__.bottomSheet.sizes.closeIcon,
|
|
8916
8977
|
height: theme.__hd__.bottomSheet.sizes.closeIcon,
|
|
8917
8978
|
marginLeft: theme.__hd__.bottomSheet.space.closeIconMargin
|
|
8918
8979
|
};
|
|
8919
8980
|
});
|
|
8981
|
+
var StyledFloatingHeaderWrapper = index$9(reactNative.TouchableOpacity)(function (_ref8) {
|
|
8982
|
+
var theme = _ref8.theme;
|
|
8983
|
+
return {
|
|
8984
|
+
padding: theme.__hd__.bottomSheet.space.floatingHeaderIconPadding,
|
|
8985
|
+
backgroundColor: theme.__hd__.bottomSheet.colors.floatingHeaderIconBackground,
|
|
8986
|
+
borderRadius: theme.__hd__.bottomSheet.radii.floatingHeaderIcon
|
|
8987
|
+
};
|
|
8988
|
+
});
|
|
8920
8989
|
|
|
8921
8990
|
var Footer$1 = function Footer(_ref) {
|
|
8922
8991
|
var children = _ref.children,
|
|
@@ -8924,6 +8993,9 @@ var Footer$1 = function Footer(_ref) {
|
|
|
8924
8993
|
return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, null, showDivider ? /*#__PURE__*/React__namespace.default.createElement(Divider, null) : null, /*#__PURE__*/React__namespace.default.createElement(StyledFooter, null, children));
|
|
8925
8994
|
};
|
|
8926
8995
|
|
|
8996
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
8997
|
+
var noop$1 = function noop() {};
|
|
8998
|
+
|
|
8927
8999
|
var genLoadingIndicatorStyles = function genLoadingIndicatorStyles(theme, intent) {
|
|
8928
9000
|
return {
|
|
8929
9001
|
backgroundColor: theme.__hd__.button.colors[intent]
|
|
@@ -8967,7 +9039,7 @@ var StyledLoadingDot = index$9(reactNative.View)(function (_ref) {
|
|
|
8967
9039
|
}, themeStyling());
|
|
8968
9040
|
});
|
|
8969
9041
|
|
|
8970
|
-
var _excluded$
|
|
9042
|
+
var _excluded$s = ["count", "size", "testID", "themeVariant"];
|
|
8971
9043
|
var AnimatedLoadingIndicatorWrapper = reactNative.Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
|
|
8972
9044
|
var AnimatedLoadingDot = reactNative.Animated.createAnimatedComponent(StyledLoadingDot);
|
|
8973
9045
|
var renderDotComponent = function renderDotComponent(_ref) {
|
|
@@ -8999,7 +9071,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
8999
9071
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
9000
9072
|
testID = _ref2.testID,
|
|
9001
9073
|
themeVariant = _ref2.themeVariant,
|
|
9002
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
9074
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$s);
|
|
9003
9075
|
var progressAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
9004
9076
|
React.useEffect(function () {
|
|
9005
9077
|
var animation = reactNative.Animated.loop(reactNative.Animated.timing(progressAnimation.current, {
|
|
@@ -9410,35 +9482,43 @@ var CompoundButton = Button;
|
|
|
9410
9482
|
CompoundButton.Icon = IconButton;
|
|
9411
9483
|
CompoundButton.Utility = UtilityButton;
|
|
9412
9484
|
|
|
9413
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
9414
|
-
var noop$1 = function noop() {};
|
|
9415
|
-
|
|
9416
9485
|
var Header = function Header(_ref) {
|
|
9417
9486
|
var content = _ref.content,
|
|
9418
9487
|
showDivider = _ref.showDivider,
|
|
9419
9488
|
_ref$onRequestClose = _ref.onRequestClose,
|
|
9420
9489
|
onRequestClose = _ref$onRequestClose === void 0 ? noop$1 : _ref$onRequestClose,
|
|
9421
|
-
showCloseButton = _ref.showCloseButton
|
|
9490
|
+
showCloseButton = _ref.showCloseButton,
|
|
9491
|
+
_ref$variant = _ref.variant,
|
|
9492
|
+
variant = _ref$variant === void 0 ? 'fixed' : _ref$variant;
|
|
9493
|
+
var theme = useTheme();
|
|
9422
9494
|
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(StyledHeaderWrapper, null, typeof content === 'string' ? /*#__PURE__*/React__namespace.default.createElement(StyledHeader, null, /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
|
|
9423
9495
|
variant: "regular-bold"
|
|
9424
9496
|
}, content)) : /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
9425
9497
|
style: {
|
|
9426
9498
|
flex: 1
|
|
9427
9499
|
}
|
|
9428
|
-
}, content), showCloseButton ? /*#__PURE__*/React__namespace.default.createElement(StyledIconWrapper$
|
|
9500
|
+
}, content), showCloseButton ? /*#__PURE__*/React__namespace.default.createElement(StyledIconWrapper$3, null, variant === 'fixed' ? /*#__PURE__*/React__namespace.default.createElement(CompoundButton.Icon, {
|
|
9429
9501
|
icon: "cancel",
|
|
9430
9502
|
onPress: onRequestClose,
|
|
9431
9503
|
intent: "text",
|
|
9432
9504
|
testID: "bottom-sheet-close-icon",
|
|
9433
9505
|
size: "xsmall"
|
|
9434
|
-
})
|
|
9506
|
+
}) : /*#__PURE__*/React__namespace.default.createElement(StyledFloatingHeaderWrapper, {
|
|
9507
|
+
onPress: onRequestClose,
|
|
9508
|
+
testID: "bottom-sheet-close-icon"
|
|
9509
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
9510
|
+
icon: "cancel",
|
|
9511
|
+
style: {
|
|
9512
|
+
fontSize: theme.__hd__.bottomSheet.sizes.floatingCloseIcon
|
|
9513
|
+
}
|
|
9514
|
+
}))) : null), showDivider ? /*#__PURE__*/React__namespace.default.createElement(Divider, null) : null);
|
|
9435
9515
|
};
|
|
9436
9516
|
|
|
9437
|
-
var _excluded$
|
|
9517
|
+
var _excluded$r = ["scrollEventThrottle"];
|
|
9438
9518
|
var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
9439
9519
|
var _ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
9440
9520
|
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
|
|
9441
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
9521
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
9442
9522
|
var _useContext = React.useContext(BottomSheetContext),
|
|
9443
9523
|
setInternalShowDivider = _useContext.setInternalShowDivider;
|
|
9444
9524
|
var onScrollBeginDrag = React.useCallback(function (e) {
|
|
@@ -9484,7 +9564,9 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
9484
9564
|
_ref$keyboardAvoiding = _ref.keyboardAvoidingViewProps,
|
|
9485
9565
|
keyboardAvoidingViewProps = _ref$keyboardAvoiding === void 0 ? {} : _ref$keyboardAvoiding,
|
|
9486
9566
|
_ref$supportedOrienta = _ref.supportedOrientations,
|
|
9487
|
-
supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta
|
|
9567
|
+
supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta,
|
|
9568
|
+
_ref$variant = _ref.variant,
|
|
9569
|
+
variant = _ref$variant === void 0 ? 'fixed' : _ref$variant;
|
|
9488
9570
|
var _Dimensions$get = reactNative.Dimensions.get('window'),
|
|
9489
9571
|
height = _Dimensions$get.height;
|
|
9490
9572
|
// Internal state to control modal open/close timing with animation
|
|
@@ -9542,6 +9624,8 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
9542
9624
|
setInternalShowDivider: setInternalShowDivider
|
|
9543
9625
|
};
|
|
9544
9626
|
}, [setInternalShowDivider]);
|
|
9627
|
+
var BottomSheetWrapperComponent = variant === 'fixed' ? React__namespace.default.Fragment : StyledFloatingWrapper;
|
|
9628
|
+
var BottomSheetComponent = variant === 'fixed' ? StyledBottomSheet : StyledFloatingBottomSheet;
|
|
9545
9629
|
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Modal, {
|
|
9546
9630
|
visible: visible,
|
|
9547
9631
|
onRequestClose: onRequestClose,
|
|
@@ -9558,7 +9642,7 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
9558
9642
|
opacity: interpolateOpacity
|
|
9559
9643
|
},
|
|
9560
9644
|
onPress: onRequestClose
|
|
9561
|
-
}), /*#__PURE__*/React__namespace.default.createElement(
|
|
9645
|
+
}), /*#__PURE__*/React__namespace.default.createElement(BottomSheetWrapperComponent, null, /*#__PURE__*/React__namespace.default.createElement(BottomSheetComponent, {
|
|
9562
9646
|
style: [style, {
|
|
9563
9647
|
transform: [{
|
|
9564
9648
|
scaleY: height > 0 ? 1 : 0
|
|
@@ -9567,6 +9651,7 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
9567
9651
|
}]
|
|
9568
9652
|
}]
|
|
9569
9653
|
}, header !== undefined ? /*#__PURE__*/React__namespace.default.createElement(Header, {
|
|
9654
|
+
variant: variant,
|
|
9570
9655
|
content: header,
|
|
9571
9656
|
showDivider: internalShowDivider,
|
|
9572
9657
|
onRequestClose: onRequestClose,
|
|
@@ -9575,7 +9660,7 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
9575
9660
|
value: BottomSheetContextValue
|
|
9576
9661
|
}, children), footer ? /*#__PURE__*/React__namespace.default.createElement(Footer$1, {
|
|
9577
9662
|
showDivider: showDivider
|
|
9578
|
-
}, footer) : null))));
|
|
9663
|
+
}, footer) : null)))));
|
|
9579
9664
|
};
|
|
9580
9665
|
var BottomSheet$1 = Object.assign(BottomSheet, {
|
|
9581
9666
|
ScrollView: BottomSheetScrollView
|
|
@@ -12250,12 +12335,12 @@ var Indicator = index$9(reactNative.View)(function (_ref2) {
|
|
|
12250
12335
|
};
|
|
12251
12336
|
});
|
|
12252
12337
|
|
|
12253
|
-
var _excluded$
|
|
12338
|
+
var _excluded$q = ["intent", "children"];
|
|
12254
12339
|
var DataCard = function DataCard(_ref) {
|
|
12255
12340
|
var _ref$intent = _ref.intent,
|
|
12256
12341
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
12257
12342
|
children = _ref.children,
|
|
12258
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
12343
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$q);
|
|
12259
12344
|
return /*#__PURE__*/React__namespace.default.createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__namespace.default.createElement(Indicator, {
|
|
12260
12345
|
themeIntent: intent,
|
|
12261
12346
|
testID: "data-card-indicator"
|
|
@@ -12264,22 +12349,26 @@ var DataCard = function DataCard(_ref) {
|
|
|
12264
12349
|
|
|
12265
12350
|
var StyledCard$1 = index$9(reactNative.View)(function (_ref) {
|
|
12266
12351
|
var theme = _ref.theme,
|
|
12267
|
-
themeIntent = _ref.themeIntent
|
|
12352
|
+
themeIntent = _ref.themeIntent,
|
|
12353
|
+
themeVariant = _ref.themeVariant;
|
|
12268
12354
|
return _objectSpread2(_objectSpread2({}, themeIntent !== undefined && {
|
|
12269
12355
|
backgroundColor: theme.__hd__.card.colors[themeIntent]
|
|
12270
12356
|
}), {}, {
|
|
12271
|
-
borderRadius: theme.__hd__.card.radii["default"],
|
|
12357
|
+
borderRadius: themeVariant === 'basic' ? theme.__hd__.card.radii["default"] : theme.__hd__.card.radii.superRound,
|
|
12272
12358
|
overflow: 'hidden'
|
|
12273
12359
|
});
|
|
12274
12360
|
});
|
|
12275
12361
|
|
|
12276
|
-
var _excluded$
|
|
12362
|
+
var _excluded$p = ["intent", "children", "variant"];
|
|
12277
12363
|
var Card = function Card(_ref) {
|
|
12278
12364
|
var intent = _ref.intent,
|
|
12279
12365
|
children = _ref.children,
|
|
12280
|
-
|
|
12366
|
+
_ref$variant = _ref.variant,
|
|
12367
|
+
variant = _ref$variant === void 0 ? 'basic' : _ref$variant,
|
|
12368
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$p);
|
|
12281
12369
|
return /*#__PURE__*/React__namespace.default.createElement(StyledCard$1, _extends$1({}, nativeProps, {
|
|
12282
|
-
themeIntent: intent
|
|
12370
|
+
themeIntent: intent,
|
|
12371
|
+
themeVariant: variant
|
|
12283
12372
|
}), children);
|
|
12284
12373
|
};
|
|
12285
12374
|
var Card$1 = Object.assign(Card, {
|
|
@@ -12538,7 +12627,7 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
12538
12627
|
});
|
|
12539
12628
|
CardCarousel.displayName = 'CardCarousel';
|
|
12540
12629
|
|
|
12541
|
-
var _excluded$
|
|
12630
|
+
var _excluded$o = ["rounded", "size", "testID", "style"];
|
|
12542
12631
|
var Image = function Image(_ref) {
|
|
12543
12632
|
var _ref$rounded = _ref.rounded,
|
|
12544
12633
|
rounded = _ref$rounded === void 0 ? false : _ref$rounded,
|
|
@@ -12546,7 +12635,7 @@ var Image = function Image(_ref) {
|
|
|
12546
12635
|
size = _ref$size === void 0 ? '6xlarge' : _ref$size,
|
|
12547
12636
|
testID = _ref.testID,
|
|
12548
12637
|
style = _ref.style,
|
|
12549
|
-
imageNativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
12638
|
+
imageNativeProps = _objectWithoutProperties(_ref, _excluded$o);
|
|
12550
12639
|
var theme = useTheme();
|
|
12551
12640
|
var imageSize = theme.__hd__.image.sizes[size];
|
|
12552
12641
|
return /*#__PURE__*/React__namespace.default.createElement(reactNative.Image, _extends$1({
|
|
@@ -12680,7 +12769,7 @@ var CarouselItem = function CarouselItem(_ref) {
|
|
|
12680
12769
|
}, heading), !!body && /*#__PURE__*/React__namespace.default.createElement(Typography.Body, null, body)));
|
|
12681
12770
|
};
|
|
12682
12771
|
|
|
12683
|
-
var _excluded$
|
|
12772
|
+
var _excluded$n = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "testID", "pageControlPosition"];
|
|
12684
12773
|
function useStateFromProp(initialValue) {
|
|
12685
12774
|
var _useState = React.useState(initialValue),
|
|
12686
12775
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -12707,7 +12796,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
12707
12796
|
testID = _ref.testID,
|
|
12708
12797
|
_ref$pageControlPosit = _ref.pageControlPosition,
|
|
12709
12798
|
pageControlPosition = _ref$pageControlPosit === void 0 ? 'top' : _ref$pageControlPosit,
|
|
12710
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
12799
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$n);
|
|
12711
12800
|
useDeprecation("shouldShowPagination prop has been deprecated", shouldShowPagination !== noop);
|
|
12712
12801
|
useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition === 'bottom');
|
|
12713
12802
|
var theme = useTheme();
|
|
@@ -12831,26 +12920,19 @@ var StyledChipWrapper = index$9(reactNative.TouchableOpacity)(function (_ref) {
|
|
|
12831
12920
|
}
|
|
12832
12921
|
};
|
|
12833
12922
|
var getBorderStyles = function getBorderStyles() {
|
|
12834
|
-
var commonStyle = {
|
|
12835
|
-
borderWidth: theme.__hd__.chip.sizes.wrapperBorder
|
|
12836
|
-
};
|
|
12837
|
-
if (themeSelected) {
|
|
12838
|
-
return _objectSpread2(_objectSpread2({}, commonStyle), {}, {
|
|
12839
|
-
borderColor: theme.__hd__.chip.colors.wrapperSelectedBorder
|
|
12840
|
-
});
|
|
12841
|
-
}
|
|
12842
12923
|
switch (themeVariant) {
|
|
12843
12924
|
case 'outlined':
|
|
12844
12925
|
{
|
|
12845
|
-
return
|
|
12846
|
-
borderColor: theme.__hd__.chip.colors.
|
|
12847
|
-
|
|
12926
|
+
return {
|
|
12927
|
+
borderColor: themeSelected ? theme.__hd__.chip.colors.outlinedSelectedBorder : theme.__hd__.chip.colors.outlinedDefaultBorder,
|
|
12928
|
+
borderWidth: themeSelected ? theme.__hd__.chip.sizes.outlinedSelectedBorder : theme.__hd__.chip.sizes.outlinedDefaultBorder
|
|
12929
|
+
};
|
|
12848
12930
|
}
|
|
12849
12931
|
case 'filled':
|
|
12850
12932
|
{
|
|
12851
|
-
return
|
|
12933
|
+
return {
|
|
12852
12934
|
borderColor: theme.__hd__.chip.colors.wrapperSelectedBorder
|
|
12853
|
-
}
|
|
12935
|
+
};
|
|
12854
12936
|
}
|
|
12855
12937
|
}
|
|
12856
12938
|
};
|
|
@@ -12860,7 +12942,7 @@ var StyledChipWrapper = index$9(reactNative.TouchableOpacity)(function (_ref) {
|
|
|
12860
12942
|
case 'outlined':
|
|
12861
12943
|
{
|
|
12862
12944
|
return {
|
|
12863
|
-
backgroundColor: theme.__hd__.chip.colors.
|
|
12945
|
+
backgroundColor: themeSelected ? theme.__hd__.chip.colors.outlinedSelectedBackground : theme.__hd__.chip.colors.outlinedDefaultBackground
|
|
12864
12946
|
};
|
|
12865
12947
|
}
|
|
12866
12948
|
case 'filled':
|
|
@@ -12873,7 +12955,7 @@ var StyledChipWrapper = index$9(reactNative.TouchableOpacity)(function (_ref) {
|
|
|
12873
12955
|
case 'outlined':
|
|
12874
12956
|
{
|
|
12875
12957
|
return {
|
|
12876
|
-
backgroundColor: theme.__hd__.chip.colors.
|
|
12958
|
+
backgroundColor: theme.__hd__.chip.colors.outlinedDefaultBackground
|
|
12877
12959
|
};
|
|
12878
12960
|
}
|
|
12879
12961
|
case 'filled':
|
|
@@ -12891,33 +12973,11 @@ var StyledChipWrapper = index$9(reactNative.TouchableOpacity)(function (_ref) {
|
|
|
12891
12973
|
borderRadius: theme.__hd__.chip.radii.wrapper,
|
|
12892
12974
|
paddingVertical: theme.__hd__.chip.space.wrapperVerticalPadding,
|
|
12893
12975
|
paddingHorizontal: theme.__hd__.chip.space.wrapperHorizontalPadding,
|
|
12894
|
-
|
|
12976
|
+
marginTop: themeSelected ? theme.__hd__.chip.space.outlinedSelectedMarginTop : undefined
|
|
12895
12977
|
}, getShadowStyles()), getBorderStyles()), getBackgroundStyles());
|
|
12896
12978
|
});
|
|
12897
|
-
var StyledIconWrapper$3 = index$9(Box)(function (_ref2) {
|
|
12898
|
-
var theme = _ref2.theme;
|
|
12899
|
-
return {
|
|
12900
|
-
marginRight: theme.__hd__.chip.space.iconWrapperMarginRight
|
|
12901
|
-
};
|
|
12902
|
-
});
|
|
12903
|
-
var StyledLabel = index$9(Typography.Body)(function (_ref3) {
|
|
12904
|
-
var themeSelected = _ref3.themeSelected,
|
|
12905
|
-
themeVariant = _ref3.themeVariant,
|
|
12906
|
-
theme = _ref3.theme;
|
|
12907
|
-
return {
|
|
12908
|
-
color: themeSelected && themeVariant === 'outlined' ? theme.__hd__.chip.colors.selectedPrimaryText : undefined
|
|
12909
|
-
};
|
|
12910
|
-
});
|
|
12911
|
-
var StyledIcon$1 = index$9(Icon)(function (_ref4) {
|
|
12912
|
-
var themeSelected = _ref4.themeSelected,
|
|
12913
|
-
themeVariant = _ref4.themeVariant,
|
|
12914
|
-
theme = _ref4.theme;
|
|
12915
|
-
return {
|
|
12916
|
-
color: themeSelected && themeVariant === 'outlined' ? theme.__hd__.chip.colors.selectedPrimaryText : undefined
|
|
12917
|
-
};
|
|
12918
|
-
});
|
|
12919
12979
|
|
|
12920
|
-
var _excluded$
|
|
12980
|
+
var _excluded$m = ["label", "variant", "selected", "icon", "onPress", "showSelectedIcon"];
|
|
12921
12981
|
var Chip = function Chip(_ref) {
|
|
12922
12982
|
var label = _ref.label,
|
|
12923
12983
|
_ref$variant = _ref.variant,
|
|
@@ -12926,31 +12986,27 @@ var Chip = function Chip(_ref) {
|
|
|
12926
12986
|
selected = _ref$selected === void 0 ? false : _ref$selected,
|
|
12927
12987
|
icon = _ref.icon,
|
|
12928
12988
|
onPress = _ref.onPress,
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12933
|
-
}
|
|
12934
|
-
if (selected) {
|
|
12935
|
-
return 'checkmark';
|
|
12936
|
-
}
|
|
12937
|
-
return undefined;
|
|
12938
|
-
}, [icon, selected, variant]);
|
|
12989
|
+
_ref$showSelectedIcon = _ref.showSelectedIcon,
|
|
12990
|
+
showSelectedIcon = _ref$showSelectedIcon === void 0 ? true : _ref$showSelectedIcon,
|
|
12991
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$m);
|
|
12992
|
+
var shouldShowSelectedIcon = variant === 'outlined' && selected && showSelectedIcon;
|
|
12939
12993
|
return /*#__PURE__*/React__namespace.default.createElement(StyledChipWrapper, _extends$1({
|
|
12940
12994
|
onPress: onPress,
|
|
12941
12995
|
themeVariant: variant,
|
|
12942
12996
|
themeSelected: selected
|
|
12943
|
-
}, otherProps),
|
|
12997
|
+
}, otherProps), icon && /*#__PURE__*/React__namespace.default.createElement(Box, {
|
|
12998
|
+
marginRight: "small"
|
|
12999
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
12944
13000
|
size: "xsmall",
|
|
12945
|
-
icon:
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
}
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
}
|
|
13001
|
+
icon: icon,
|
|
13002
|
+
testID: "chip-icon-".concat(icon)
|
|
13003
|
+
})), /*#__PURE__*/React__namespace.default.createElement(Typography.Body, null, label), shouldShowSelectedIcon && /*#__PURE__*/React__namespace.default.createElement(Box, {
|
|
13004
|
+
marginLeft: "small"
|
|
13005
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
13006
|
+
size: "xsmall",
|
|
13007
|
+
icon: "cancel",
|
|
13008
|
+
testID: "selected-chip-icon-cancel"
|
|
13009
|
+
})));
|
|
12954
13010
|
};
|
|
12955
13011
|
|
|
12956
13012
|
var StyledWrapper$7 = index$9(reactNative.TouchableOpacity)(function (_ref) {
|
|
@@ -13173,7 +13229,7 @@ var StyledErrorAndMaxLengthContainer = index$9(reactNative.View)(function () {
|
|
|
13173
13229
|
};
|
|
13174
13230
|
});
|
|
13175
13231
|
|
|
13176
|
-
var _excluded$
|
|
13232
|
+
var _excluded$l = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "hideCharacterCount", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling", "variant"];
|
|
13177
13233
|
var getState$2 = function getState(_ref) {
|
|
13178
13234
|
var disabled = _ref.disabled,
|
|
13179
13235
|
error = _ref.error,
|
|
@@ -13285,7 +13341,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
|
|
|
13285
13341
|
allowFontScaling = _ref8$allowFontScalin === void 0 ? false : _ref8$allowFontScalin,
|
|
13286
13342
|
_ref8$variant = _ref8.variant,
|
|
13287
13343
|
variant = _ref8$variant === void 0 ? 'text' : _ref8$variant,
|
|
13288
|
-
nativeProps = _objectWithoutProperties(_ref8, _excluded$
|
|
13344
|
+
nativeProps = _objectWithoutProperties(_ref8, _excluded$l);
|
|
13289
13345
|
var displayText = getDisplayText(value, defaultValue);
|
|
13290
13346
|
var isEmptyValue = displayText.length === 0;
|
|
13291
13347
|
var _React$useState = React__namespace.default.useState({
|
|
@@ -13830,11 +13886,11 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
13830
13886
|
}))));
|
|
13831
13887
|
};
|
|
13832
13888
|
|
|
13833
|
-
var _excluded$
|
|
13889
|
+
var _excluded$k = ["variant"];
|
|
13834
13890
|
var DatePicker = function DatePicker(_ref) {
|
|
13835
13891
|
var _ref$variant = _ref.variant,
|
|
13836
13892
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
13837
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
13893
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
13838
13894
|
if (variant === 'calendar') {
|
|
13839
13895
|
return /*#__PURE__*/React__namespace.default.createElement(DatePickerCalendar, props);
|
|
13840
13896
|
}
|
|
@@ -14388,7 +14444,7 @@ var Portal$1 = Object.assign(Portal, {
|
|
|
14388
14444
|
Host: PortalHost
|
|
14389
14445
|
});
|
|
14390
14446
|
|
|
14391
|
-
var _excluded$
|
|
14447
|
+
var _excluded$j = ["visible"];
|
|
14392
14448
|
var DEFAULT_BACKDROP_OPACITY = 0.4;
|
|
14393
14449
|
var DEFAULT_ANIMATION_CONFIG = {
|
|
14394
14450
|
easing: reactNative.Easing.inOut(reactNative.Easing.cubic),
|
|
@@ -14484,7 +14540,7 @@ var Modal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14484
14540
|
var ModalWrapper = function ModalWrapper(_ref3) {
|
|
14485
14541
|
var _ref3$visible = _ref3.visible,
|
|
14486
14542
|
visible = _ref3$visible === void 0 ? true : _ref3$visible,
|
|
14487
|
-
props = _objectWithoutProperties(_ref3, _excluded$
|
|
14543
|
+
props = _objectWithoutProperties(_ref3, _excluded$j);
|
|
14488
14544
|
var modalRef = React.useRef(null);
|
|
14489
14545
|
var _useState = React.useState(visible),
|
|
14490
14546
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -14594,7 +14650,7 @@ var StyledErrorDescription = index$9(Typography.Body)(function (_ref9) {
|
|
|
14594
14650
|
};
|
|
14595
14651
|
});
|
|
14596
14652
|
|
|
14597
|
-
var _excluded$
|
|
14653
|
+
var _excluded$i = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
|
|
14598
14654
|
_excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
14599
14655
|
var renderImage$1 = function renderImage(image) {
|
|
14600
14656
|
if ( /*#__PURE__*/React.isValidElement(image)) {
|
|
@@ -14620,7 +14676,7 @@ var ErrorPage = function ErrorPage(_ref) {
|
|
|
14620
14676
|
onCtaPress = _ref.onCtaPress,
|
|
14621
14677
|
secondaryCtaText = _ref.secondaryCtaText,
|
|
14622
14678
|
onSecondaryCtaPress = _ref.onSecondaryCtaPress,
|
|
14623
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
14679
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$i);
|
|
14624
14680
|
var showCta = ctaText && onCtaPress !== undefined;
|
|
14625
14681
|
var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
|
|
14626
14682
|
var showButtonContainer = showCta || showSecondaryCta;
|
|
@@ -14781,11 +14837,11 @@ var StyledIconContainer = index$9(Box)(function (_ref4) {
|
|
|
14781
14837
|
};
|
|
14782
14838
|
});
|
|
14783
14839
|
|
|
14784
|
-
var _excluded$
|
|
14840
|
+
var _excluded$h = ["active"];
|
|
14785
14841
|
var AnimatedIcons = reactNative.Animated.createAnimatedComponent(StyledFABIcon);
|
|
14786
14842
|
var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
|
|
14787
14843
|
var active = _ref.active,
|
|
14788
|
-
iconProps = _objectWithoutProperties(_ref, _excluded$
|
|
14844
|
+
iconProps = _objectWithoutProperties(_ref, _excluded$h);
|
|
14789
14845
|
var rotateAnimation = React.useRef(new reactNative.Animated.Value(active ? 1 : 0));
|
|
14790
14846
|
React.useEffect(function () {
|
|
14791
14847
|
var animation = reactNative.Animated.spring(rotateAnimation.current, {
|
|
@@ -16034,7 +16090,7 @@ var StyledStrokeEnd = index$9(reactNative.View)(function (_ref6) {
|
|
|
16034
16090
|
};
|
|
16035
16091
|
});
|
|
16036
16092
|
|
|
16037
|
-
var _excluded$
|
|
16093
|
+
var _excluded$g = ["value", "renderValue", "intent", "style", "testID"];
|
|
16038
16094
|
var HalfCircle = function HalfCircle(_ref) {
|
|
16039
16095
|
var type = _ref.type,
|
|
16040
16096
|
themeIntent = _ref.themeIntent;
|
|
@@ -16055,7 +16111,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
16055
16111
|
intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
|
|
16056
16112
|
style = _ref2.style,
|
|
16057
16113
|
testID = _ref2.testID,
|
|
16058
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
16114
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$g);
|
|
16059
16115
|
var theme = useTheme$1();
|
|
16060
16116
|
var radius = theme.__hd__.progress.sizes.circleDiameter / 2;
|
|
16061
16117
|
var progressAnimatedValue = React.useRef(new reactNative.Animated.Value(0));
|
|
@@ -16171,14 +16227,14 @@ var StyledInner = index$9(reactNative.Animated.View)(function (_ref2) {
|
|
|
16171
16227
|
};
|
|
16172
16228
|
});
|
|
16173
16229
|
|
|
16174
|
-
var _excluded$
|
|
16230
|
+
var _excluded$f = ["value", "intent", "style", "testID"];
|
|
16175
16231
|
var ProgressBar = function ProgressBar(_ref) {
|
|
16176
16232
|
var value = _ref.value,
|
|
16177
16233
|
_ref$intent = _ref.intent,
|
|
16178
16234
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
16179
16235
|
style = _ref.style,
|
|
16180
16236
|
testID = _ref.testID,
|
|
16181
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
16237
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$f);
|
|
16182
16238
|
var _useState = React.useState(0),
|
|
16183
16239
|
_useState2 = _slicedToArray(_useState, 2),
|
|
16184
16240
|
width = _useState2[0],
|
|
@@ -16224,9 +16280,99 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
16224
16280
|
}));
|
|
16225
16281
|
};
|
|
16226
16282
|
|
|
16283
|
+
var StyledStepContainer = index$9(Box)({
|
|
16284
|
+
display: 'flex',
|
|
16285
|
+
flexDirection: 'row',
|
|
16286
|
+
justifyContent: 'space-between',
|
|
16287
|
+
alignItems: 'center'
|
|
16288
|
+
});
|
|
16289
|
+
var StyledStep = index$9(Box)(function (_ref) {
|
|
16290
|
+
var theme = _ref.theme,
|
|
16291
|
+
themeState = _ref.themeState,
|
|
16292
|
+
themeWidth = _ref.themeWidth;
|
|
16293
|
+
return {
|
|
16294
|
+
height: theme.__hd__.progress.sizes.stepHeight,
|
|
16295
|
+
borderRadius: theme.__hd__.progress.radii["default"],
|
|
16296
|
+
backgroundColor: theme.__hd__.progress.colors.step[themeState],
|
|
16297
|
+
width: themeWidth
|
|
16298
|
+
};
|
|
16299
|
+
});
|
|
16300
|
+
var StyledSingleStepContainer = index$9(Box)(function (_ref2) {
|
|
16301
|
+
var theme = _ref2.theme;
|
|
16302
|
+
return {
|
|
16303
|
+
height: theme.__hd__.progress.sizes.stepHeight,
|
|
16304
|
+
borderRadius: theme.__hd__.progress.radii["default"],
|
|
16305
|
+
backgroundColor: theme.__hd__.progress.colors.step.current,
|
|
16306
|
+
width: '100%',
|
|
16307
|
+
position: 'relative'
|
|
16308
|
+
};
|
|
16309
|
+
});
|
|
16310
|
+
var StyledSingleStep = index$9(Box)(function (_ref3) {
|
|
16311
|
+
var theme = _ref3.theme;
|
|
16312
|
+
return {
|
|
16313
|
+
height: theme.__hd__.progress.sizes.stepHeight,
|
|
16314
|
+
borderRadius: theme.__hd__.progress.radii["default"],
|
|
16315
|
+
backgroundColor: theme.__hd__.progress.colors.step.complete,
|
|
16316
|
+
width: '70%',
|
|
16317
|
+
position: 'absolute',
|
|
16318
|
+
top: 0,
|
|
16319
|
+
left: 0,
|
|
16320
|
+
bottom: 0,
|
|
16321
|
+
right: 0
|
|
16322
|
+
};
|
|
16323
|
+
});
|
|
16324
|
+
|
|
16325
|
+
var _excluded$e = ["steps", "current", "onLayout"];
|
|
16326
|
+
var getStepState = function getStepState(current, index) {
|
|
16327
|
+
if (index < current) {
|
|
16328
|
+
return 'complete';
|
|
16329
|
+
}
|
|
16330
|
+
if (index === current) {
|
|
16331
|
+
return 'current';
|
|
16332
|
+
}
|
|
16333
|
+
return 'incomplete';
|
|
16334
|
+
};
|
|
16335
|
+
var ProgressStep = function ProgressStep(_ref) {
|
|
16336
|
+
var steps = _ref.steps,
|
|
16337
|
+
current = _ref.current,
|
|
16338
|
+
onLayout = _ref.onLayout,
|
|
16339
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
16340
|
+
var theme = useTheme$1();
|
|
16341
|
+
var _React$useState = React__namespace.default.useState(0),
|
|
16342
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
16343
|
+
containerWidth = _React$useState2[0],
|
|
16344
|
+
setContainerWidth = _React$useState2[1];
|
|
16345
|
+
var onContainerLayout = function onContainerLayout(event) {
|
|
16346
|
+
setContainerWidth(event.nativeEvent.layout.width);
|
|
16347
|
+
onLayout === null || onLayout === void 0 || onLayout(event);
|
|
16348
|
+
};
|
|
16349
|
+
// Calculate the width for each step
|
|
16350
|
+
var stepWidth = React.useMemo(function () {
|
|
16351
|
+
var width = 0;
|
|
16352
|
+
if (containerWidth > 0) {
|
|
16353
|
+
width = (containerWidth - (steps - 1) * theme.__hd__.progress.space.stepGap) / steps;
|
|
16354
|
+
}
|
|
16355
|
+
return width;
|
|
16356
|
+
}, [containerWidth, steps, theme]);
|
|
16357
|
+
if (steps === 1) {
|
|
16358
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledSingleStepContainer, props, /*#__PURE__*/React__namespace.default.createElement(StyledSingleStep, null));
|
|
16359
|
+
}
|
|
16360
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledStepContainer, _extends$1({}, props, {
|
|
16361
|
+
onLayout: onContainerLayout
|
|
16362
|
+
}), Array.from({
|
|
16363
|
+
length: steps
|
|
16364
|
+
}).map(function (_, index) {
|
|
16365
|
+
return /*#__PURE__*/React__namespace.default.createElement(StyledStep, {
|
|
16366
|
+
themeState: getStepState(current - 1, index),
|
|
16367
|
+
themeWidth: stepWidth
|
|
16368
|
+
});
|
|
16369
|
+
}));
|
|
16370
|
+
};
|
|
16371
|
+
|
|
16227
16372
|
var Progress = {
|
|
16228
16373
|
Circle: ProgressCircle,
|
|
16229
|
-
Bar: ProgressBar
|
|
16374
|
+
Bar: ProgressBar,
|
|
16375
|
+
Step: ProgressStep
|
|
16230
16376
|
};
|
|
16231
16377
|
|
|
16232
16378
|
var Slider = function Slider(_ref) {
|
|
@@ -36556,6 +36702,7 @@ exports.getTheme = getTheme$1;
|
|
|
36556
36702
|
exports.jobsSystemPalette = jobsSystemPalette;
|
|
36557
36703
|
exports.scale = scale;
|
|
36558
36704
|
exports.swagDarkSystemPalette = swagDarkSystemPalette;
|
|
36705
|
+
exports.swagLightJobsSystemPalette = swagLightJobsSystemPalette;
|
|
36559
36706
|
exports.swagLightSystemPalette = swagSystemPalette;
|
|
36560
36707
|
exports.swagSystemPalette = swagSystemPalette$1;
|
|
36561
36708
|
exports.theme = defaultTheme;
|