@hero-design/rn 8.63.2-alpha.3 → 8.63.3
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 +5 -0
- package/CHANGELOG.md +19 -0
- package/es/index.js +17 -15
- package/lib/index.js +17 -15
- package/package.json +4 -5
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Tabs/ScrollableTabs.tsx +5 -4
- package/src/components/Tabs/StyledScrollableTabs.tsx +0 -6
- package/src/components/Tabs/StyledTabs.tsx +0 -8
- package/src/components/Tabs/index.tsx +6 -4
- package/src/components/Toast/Toast.tsx +1 -0
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +7 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +1 -1
- package/src/theme/components/slider.ts +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
[36m
|
|
2
|
+
[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
3
|
+
[1m[33m(!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
4
|
+
[1m[33m(!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/home/runner/work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning[39m[22m
|
|
5
|
+
[32mcreated [1mlib/index.js, es/index.js[22m in [1m1m 3s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.63.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#3129](https://github.com/Thinkei/hero-design/pull/3129) [`116f04b1a`](https://github.com/Thinkei/hero-design/commit/116f04b1ae7a63a4f3563a935989a318200ce044) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - Fix mobile visual tests workflow
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`de331a19e`](https://github.com/Thinkei/hero-design/commit/de331a19ea56e55ff18b060a21b31831df60c794), [`264d28d3c`](https://github.com/Thinkei/hero-design/commit/264d28d3cb2f68b96bc94f4b72a9681cd4c4abb0)]:
|
|
10
|
+
- @hero-design/react-native-month-year-picker@8.42.10
|
|
11
|
+
|
|
12
|
+
## 8.63.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#3112](https://github.com/Thinkei/hero-design/pull/3112) [`81863a4dd`](https://github.com/Thinkei/hero-design/commit/81863a4ddf02cb87ebc21b8e2fab217166c71339) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - Update Error component local name
|
|
17
|
+
|
|
18
|
+
- [#3116](https://github.com/Thinkei/hero-design/pull/3116) [`93ce5c6d4`](https://github.com/Thinkei/hero-design/commit/93ce5c6d461d813ba37a3bc26cb817ecad21ee62) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Slider] Update thumb color
|
|
19
|
+
|
|
20
|
+
- [#3104](https://github.com/Thinkei/hero-design/pull/3104) [`f978158f5`](https://github.com/Thinkei/hero-design/commit/f978158f5e649748fbdd42b2eba4b789458a10f9) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - Upgrade Expo SDK to v50
|
|
21
|
+
|
|
3
22
|
## 8.63.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/es/index.js
CHANGED
|
@@ -3085,7 +3085,7 @@ var getSkeletonTheme = function getSkeletonTheme(theme) {
|
|
|
3085
3085
|
var getSliderTheme = function getSliderTheme(theme) {
|
|
3086
3086
|
var colors = {
|
|
3087
3087
|
minimumTrackTint: theme.colors.primary,
|
|
3088
|
-
thumbTint: theme.colors.
|
|
3088
|
+
thumbTint: theme.colors.primary,
|
|
3089
3089
|
maximumTrackTint: theme.colors.highlightedSurface
|
|
3090
3090
|
};
|
|
3091
3091
|
return {
|
|
@@ -8423,7 +8423,7 @@ var BottomNavigationContainer = index$9(View)({
|
|
|
8423
8423
|
flex: 1,
|
|
8424
8424
|
overflow: 'hidden'
|
|
8425
8425
|
});
|
|
8426
|
-
var ContentWrapper
|
|
8426
|
+
var ContentWrapper = index$9(View)({
|
|
8427
8427
|
flex: 1
|
|
8428
8428
|
});
|
|
8429
8429
|
var BottomBarWrapper = index$9(View)(function (_ref2) {
|
|
@@ -8486,7 +8486,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8486
8486
|
return [].concat(_toConsumableArray(loadedState), [selectedTabKey]);
|
|
8487
8487
|
});
|
|
8488
8488
|
}
|
|
8489
|
-
return /*#__PURE__*/React__default.createElement(BottomNavigationContainer, nativeProps, /*#__PURE__*/React__default.createElement(ContentWrapper
|
|
8489
|
+
return /*#__PURE__*/React__default.createElement(BottomNavigationContainer, nativeProps, /*#__PURE__*/React__default.createElement(ContentWrapper, null, tabs.map(function (tab) {
|
|
8490
8490
|
var key = tab.key,
|
|
8491
8491
|
component = tab.component,
|
|
8492
8492
|
testID = tab.testID;
|
|
@@ -15040,6 +15040,7 @@ var Toast$1 = function Toast(_ref2) {
|
|
|
15040
15040
|
outputRange: toastConfig.position === 'top' ? [-20, distance] : [20, -distance]
|
|
15041
15041
|
});
|
|
15042
15042
|
return /*#__PURE__*/React__default.createElement(Container, {
|
|
15043
|
+
testID: "toast-container",
|
|
15043
15044
|
themeVariant: variant,
|
|
15044
15045
|
themeIntent: intent,
|
|
15045
15046
|
style: [style, {
|
|
@@ -17374,7 +17375,6 @@ var index$3 = Object.assign(Switch, {
|
|
|
17374
17375
|
Selector: SelectorSwitch
|
|
17375
17376
|
});
|
|
17376
17377
|
|
|
17377
|
-
var AnimatedPagerView = Animated.createAnimatedComponent(PagerView);
|
|
17378
17378
|
var TabContainer$1 = index$9(View)({
|
|
17379
17379
|
flex: 1,
|
|
17380
17380
|
overflow: 'hidden'
|
|
@@ -17399,9 +17399,6 @@ var HeaderTabItem$1 = index$9(View)(function (_ref2) {
|
|
|
17399
17399
|
paddingVertical: theme.__hd__.tabs.space.itemVerticalPadding
|
|
17400
17400
|
};
|
|
17401
17401
|
});
|
|
17402
|
-
var ContentWrapper$1 = index$9(AnimatedPagerView)({
|
|
17403
|
-
flex: 1
|
|
17404
|
-
});
|
|
17405
17402
|
index$9(View)({
|
|
17406
17403
|
flex: 1
|
|
17407
17404
|
});
|
|
@@ -17449,10 +17446,6 @@ var TabContainer = index$9(View)({
|
|
|
17449
17446
|
flex: 1,
|
|
17450
17447
|
overflow: 'hidden'
|
|
17451
17448
|
});
|
|
17452
|
-
// @ts-expect-error: Test
|
|
17453
|
-
var ContentWrapper = index$9(PagerView)({
|
|
17454
|
-
flex: 1
|
|
17455
|
-
});
|
|
17456
17449
|
var HeaderTabWrapper = index$9(View)(function (_ref) {
|
|
17457
17450
|
var themeInsets = _ref.themeInsets;
|
|
17458
17451
|
return {
|
|
@@ -17903,7 +17896,8 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17903
17896
|
insets: insets,
|
|
17904
17897
|
testID: componentTestID ? "".concat(componentTestID, "-tab-bar") : undefined,
|
|
17905
17898
|
variant: variant
|
|
17906
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
17899
|
+
}), /*#__PURE__*/React__default.createElement(PagerView, {
|
|
17900
|
+
useNext: true,
|
|
17907
17901
|
initialPage: selectedTabIndex,
|
|
17908
17902
|
ref: pagerViewRef,
|
|
17909
17903
|
onPageScrollStateChanged: function onPageScrollStateChanged(e) {
|
|
@@ -17920,7 +17914,10 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17920
17914
|
});
|
|
17921
17915
|
}
|
|
17922
17916
|
},
|
|
17923
|
-
scrollEnabled: swipeEnabled
|
|
17917
|
+
scrollEnabled: swipeEnabled,
|
|
17918
|
+
style: {
|
|
17919
|
+
flex: 1
|
|
17920
|
+
}
|
|
17924
17921
|
}, tabs.map(function (tab, index) {
|
|
17925
17922
|
var key = tab.key,
|
|
17926
17923
|
component = tab.component,
|
|
@@ -17938,6 +17935,7 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17938
17935
|
}))));
|
|
17939
17936
|
};
|
|
17940
17937
|
|
|
17938
|
+
var AnimatedPagerView = Animated.createAnimatedComponent(PagerView);
|
|
17941
17939
|
var getTabItem = function getTabItem(_ref) {
|
|
17942
17940
|
var item = _ref.item,
|
|
17943
17941
|
color = _ref.color,
|
|
@@ -18035,7 +18033,8 @@ var Tabs = function Tabs(_ref2) {
|
|
|
18035
18033
|
scrollOffsetAnimatedValue: scrollOffsetAnimatedValue,
|
|
18036
18034
|
tabsLength: tabs.length,
|
|
18037
18035
|
tabsWidth: tabsWidth
|
|
18038
|
-
}))), /*#__PURE__*/React__default.createElement(
|
|
18036
|
+
}))), /*#__PURE__*/React__default.createElement(AnimatedPagerView, {
|
|
18037
|
+
useNext: true,
|
|
18039
18038
|
initialPage: selectedTabIndex,
|
|
18040
18039
|
ref: pagerViewRef,
|
|
18041
18040
|
onPageSelected: function onPageSelected(e) {
|
|
@@ -18053,7 +18052,10 @@ var Tabs = function Tabs(_ref2) {
|
|
|
18053
18052
|
}], {
|
|
18054
18053
|
useNativeDriver: true
|
|
18055
18054
|
}),
|
|
18056
|
-
scrollEnabled: swipeEnabled
|
|
18055
|
+
scrollEnabled: swipeEnabled,
|
|
18056
|
+
style: {
|
|
18057
|
+
flex: 1
|
|
18058
|
+
}
|
|
18057
18059
|
}, tabs.map(function (tab, index) {
|
|
18058
18060
|
var key = tab.key,
|
|
18059
18061
|
component = tab.component,
|
package/lib/index.js
CHANGED
|
@@ -3115,7 +3115,7 @@ var getSkeletonTheme = function getSkeletonTheme(theme) {
|
|
|
3115
3115
|
var getSliderTheme = function getSliderTheme(theme) {
|
|
3116
3116
|
var colors = {
|
|
3117
3117
|
minimumTrackTint: theme.colors.primary,
|
|
3118
|
-
thumbTint: theme.colors.
|
|
3118
|
+
thumbTint: theme.colors.primary,
|
|
3119
3119
|
maximumTrackTint: theme.colors.highlightedSurface
|
|
3120
3120
|
};
|
|
3121
3121
|
return {
|
|
@@ -8453,7 +8453,7 @@ var BottomNavigationContainer = index$9(reactNative.View)({
|
|
|
8453
8453
|
flex: 1,
|
|
8454
8454
|
overflow: 'hidden'
|
|
8455
8455
|
});
|
|
8456
|
-
var ContentWrapper
|
|
8456
|
+
var ContentWrapper = index$9(reactNative.View)({
|
|
8457
8457
|
flex: 1
|
|
8458
8458
|
});
|
|
8459
8459
|
var BottomBarWrapper = index$9(reactNative.View)(function (_ref2) {
|
|
@@ -8516,7 +8516,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8516
8516
|
return [].concat(_toConsumableArray(loadedState), [selectedTabKey]);
|
|
8517
8517
|
});
|
|
8518
8518
|
}
|
|
8519
|
-
return /*#__PURE__*/React__default["default"].createElement(BottomNavigationContainer, nativeProps, /*#__PURE__*/React__default["default"].createElement(ContentWrapper
|
|
8519
|
+
return /*#__PURE__*/React__default["default"].createElement(BottomNavigationContainer, nativeProps, /*#__PURE__*/React__default["default"].createElement(ContentWrapper, null, tabs.map(function (tab) {
|
|
8520
8520
|
var key = tab.key,
|
|
8521
8521
|
component = tab.component,
|
|
8522
8522
|
testID = tab.testID;
|
|
@@ -15070,6 +15070,7 @@ var Toast$1 = function Toast(_ref2) {
|
|
|
15070
15070
|
outputRange: toastConfig.position === 'top' ? [-20, distance] : [20, -distance]
|
|
15071
15071
|
});
|
|
15072
15072
|
return /*#__PURE__*/React__default["default"].createElement(Container, {
|
|
15073
|
+
testID: "toast-container",
|
|
15073
15074
|
themeVariant: variant,
|
|
15074
15075
|
themeIntent: intent,
|
|
15075
15076
|
style: [style, {
|
|
@@ -17404,7 +17405,6 @@ var index$3 = Object.assign(Switch, {
|
|
|
17404
17405
|
Selector: SelectorSwitch
|
|
17405
17406
|
});
|
|
17406
17407
|
|
|
17407
|
-
var AnimatedPagerView = reactNative.Animated.createAnimatedComponent(PagerView__default["default"]);
|
|
17408
17408
|
var TabContainer$1 = index$9(reactNative.View)({
|
|
17409
17409
|
flex: 1,
|
|
17410
17410
|
overflow: 'hidden'
|
|
@@ -17429,9 +17429,6 @@ var HeaderTabItem$1 = index$9(reactNative.View)(function (_ref2) {
|
|
|
17429
17429
|
paddingVertical: theme.__hd__.tabs.space.itemVerticalPadding
|
|
17430
17430
|
};
|
|
17431
17431
|
});
|
|
17432
|
-
var ContentWrapper$1 = index$9(AnimatedPagerView)({
|
|
17433
|
-
flex: 1
|
|
17434
|
-
});
|
|
17435
17432
|
index$9(reactNative.View)({
|
|
17436
17433
|
flex: 1
|
|
17437
17434
|
});
|
|
@@ -17479,10 +17476,6 @@ var TabContainer = index$9(reactNative.View)({
|
|
|
17479
17476
|
flex: 1,
|
|
17480
17477
|
overflow: 'hidden'
|
|
17481
17478
|
});
|
|
17482
|
-
// @ts-expect-error: Test
|
|
17483
|
-
var ContentWrapper = index$9(PagerView__default["default"])({
|
|
17484
|
-
flex: 1
|
|
17485
|
-
});
|
|
17486
17479
|
var HeaderTabWrapper = index$9(reactNative.View)(function (_ref) {
|
|
17487
17480
|
var themeInsets = _ref.themeInsets;
|
|
17488
17481
|
return {
|
|
@@ -17933,7 +17926,8 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17933
17926
|
insets: insets,
|
|
17934
17927
|
testID: componentTestID ? "".concat(componentTestID, "-tab-bar") : undefined,
|
|
17935
17928
|
variant: variant
|
|
17936
|
-
}), /*#__PURE__*/React__default["default"].createElement(
|
|
17929
|
+
}), /*#__PURE__*/React__default["default"].createElement(PagerView__default["default"], {
|
|
17930
|
+
useNext: true,
|
|
17937
17931
|
initialPage: selectedTabIndex,
|
|
17938
17932
|
ref: pagerViewRef,
|
|
17939
17933
|
onPageScrollStateChanged: function onPageScrollStateChanged(e) {
|
|
@@ -17950,7 +17944,10 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17950
17944
|
});
|
|
17951
17945
|
}
|
|
17952
17946
|
},
|
|
17953
|
-
scrollEnabled: swipeEnabled
|
|
17947
|
+
scrollEnabled: swipeEnabled,
|
|
17948
|
+
style: {
|
|
17949
|
+
flex: 1
|
|
17950
|
+
}
|
|
17954
17951
|
}, tabs.map(function (tab, index) {
|
|
17955
17952
|
var key = tab.key,
|
|
17956
17953
|
component = tab.component,
|
|
@@ -17968,6 +17965,7 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17968
17965
|
}))));
|
|
17969
17966
|
};
|
|
17970
17967
|
|
|
17968
|
+
var AnimatedPagerView = reactNative.Animated.createAnimatedComponent(PagerView__default["default"]);
|
|
17971
17969
|
var getTabItem = function getTabItem(_ref) {
|
|
17972
17970
|
var item = _ref.item,
|
|
17973
17971
|
color = _ref.color,
|
|
@@ -18065,7 +18063,8 @@ var Tabs = function Tabs(_ref2) {
|
|
|
18065
18063
|
scrollOffsetAnimatedValue: scrollOffsetAnimatedValue,
|
|
18066
18064
|
tabsLength: tabs.length,
|
|
18067
18065
|
tabsWidth: tabsWidth
|
|
18068
|
-
}))), /*#__PURE__*/React__default["default"].createElement(
|
|
18066
|
+
}))), /*#__PURE__*/React__default["default"].createElement(AnimatedPagerView, {
|
|
18067
|
+
useNext: true,
|
|
18069
18068
|
initialPage: selectedTabIndex,
|
|
18070
18069
|
ref: pagerViewRef,
|
|
18071
18070
|
onPageSelected: function onPageSelected(e) {
|
|
@@ -18083,7 +18082,10 @@ var Tabs = function Tabs(_ref2) {
|
|
|
18083
18082
|
}], {
|
|
18084
18083
|
useNativeDriver: true
|
|
18085
18084
|
}),
|
|
18086
|
-
scrollEnabled: swipeEnabled
|
|
18085
|
+
scrollEnabled: swipeEnabled,
|
|
18086
|
+
style: {
|
|
18087
|
+
flex: 1
|
|
18088
|
+
}
|
|
18087
18089
|
}, tabs.map(function (tab, index) {
|
|
18088
18090
|
var key = tab.key,
|
|
18089
18091
|
component = tab.component,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "8.63.
|
|
3
|
+
"version": "8.63.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"nanoid": "^4.0.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@hero-design/react-native-month-year-picker": "^8.42.
|
|
31
|
+
"@hero-design/react-native-month-year-picker": "^8.42.10",
|
|
32
32
|
"@react-native-community/datetimepicker": "^3.5.2 || ^7.6.1",
|
|
33
33
|
"@react-native-community/slider": "^4.5.1",
|
|
34
34
|
"react": "18.2.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@babel/runtime": "^7.20.0",
|
|
49
49
|
"@emotion/jest": "^11.11.0",
|
|
50
50
|
"@hero-design/eslint-plugin": "9.0.0",
|
|
51
|
-
"@hero-design/react-native-month-year-picker": "^8.42.
|
|
51
|
+
"@hero-design/react-native-month-year-picker": "^8.42.10",
|
|
52
52
|
"@react-native-community/datetimepicker": "7.6.1",
|
|
53
53
|
"@react-native-community/slider": "^4.5.1",
|
|
54
54
|
"@rollup/plugin-babel": "^5.3.1",
|
|
@@ -89,6 +89,5 @@
|
|
|
89
89
|
"ts-jest": "^29.1.1",
|
|
90
90
|
"typescript": "4.8.4"
|
|
91
91
|
},
|
|
92
|
-
"prettier": "prettier-config-hd"
|
|
93
|
-
"react-native": "src/index.ts"
|
|
92
|
+
"prettier": "prettier-config-hd"
|
|
94
93
|
}
|
|
@@ -15,7 +15,7 @@ exports[`Slider renders correctly by default 1`] = `
|
|
|
15
15
|
minimumTrackTintColor="#401960"
|
|
16
16
|
minimumValue={0}
|
|
17
17
|
step={0}
|
|
18
|
-
thumbTintColor="#
|
|
18
|
+
thumbTintColor="#401960"
|
|
19
19
|
value={0}
|
|
20
20
|
/>
|
|
21
21
|
<View
|
|
@@ -56,7 +56,7 @@ exports[`Slider renders correctly when disabled 1`] = `
|
|
|
56
56
|
minimumTrackTintColor="#401960"
|
|
57
57
|
minimumValue={0}
|
|
58
58
|
step={0}
|
|
59
|
-
thumbTintColor="#
|
|
59
|
+
thumbTintColor="#401960"
|
|
60
60
|
value={0}
|
|
61
61
|
/>
|
|
62
62
|
<View
|
|
@@ -100,7 +100,7 @@ exports[`Slider renders correctly with props 1`] = `
|
|
|
100
100
|
onSlidingStart={[MockFunction]}
|
|
101
101
|
onValueChange={[MockFunction]}
|
|
102
102
|
step={0.25}
|
|
103
|
-
thumbTintColor="#
|
|
103
|
+
thumbTintColor="#401960"
|
|
104
104
|
value={0.5}
|
|
105
105
|
/>
|
|
106
106
|
<View
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
2
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
3
3
|
import PagerView from 'react-native-pager-view';
|
|
4
|
-
import { TabContainer
|
|
4
|
+
import { TabContainer } from './StyledScrollableTabs';
|
|
5
5
|
import type { TabsProps } from '.';
|
|
6
6
|
import SceneView from './SceneView';
|
|
7
7
|
import ScrollableTabHeader from './ScrollableTabsHeader/ScrollableTabsHeader';
|
|
@@ -68,8 +68,8 @@ const ScrollableTab = ({
|
|
|
68
68
|
testID={componentTestID ? `${componentTestID}-tab-bar` : undefined}
|
|
69
69
|
variant={variant}
|
|
70
70
|
/>
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
<PagerView
|
|
72
|
+
useNext
|
|
73
73
|
initialPage={selectedTabIndex}
|
|
74
74
|
ref={pagerViewRef}
|
|
75
75
|
onPageScrollStateChanged={(e) => {
|
|
@@ -90,6 +90,7 @@ const ScrollableTab = ({
|
|
|
90
90
|
}
|
|
91
91
|
}}
|
|
92
92
|
scrollEnabled={swipeEnabled}
|
|
93
|
+
style={{ flex: 1 }}
|
|
93
94
|
>
|
|
94
95
|
{tabs.map((tab, index) => {
|
|
95
96
|
const { key, component, testID } = tab;
|
|
@@ -108,7 +109,7 @@ const ScrollableTab = ({
|
|
|
108
109
|
</ScreenContext.Provider>
|
|
109
110
|
);
|
|
110
111
|
})}
|
|
111
|
-
</
|
|
112
|
+
</PagerView>
|
|
112
113
|
</TabContainer>
|
|
113
114
|
</TabContext.Provider>
|
|
114
115
|
);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Animated, StyleSheet, View } from 'react-native';
|
|
2
2
|
import styled from '@emotion/native';
|
|
3
|
-
import PagerView from 'react-native-pager-view';
|
|
4
3
|
|
|
5
4
|
const TabScreen = styled(View)({
|
|
6
5
|
flex: 1,
|
|
@@ -11,10 +10,6 @@ const TabContainer = styled(View)({
|
|
|
11
10
|
overflow: 'hidden',
|
|
12
11
|
});
|
|
13
12
|
|
|
14
|
-
const ContentWrapper = styled(PagerView)({
|
|
15
|
-
flex: 1,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
13
|
const HeaderTabWrapper = styled(View)<{
|
|
19
14
|
themeInsets: { top: number; right: number; bottom: number; left: number };
|
|
20
15
|
}>(({ themeInsets }) => ({
|
|
@@ -64,7 +59,6 @@ export {
|
|
|
64
59
|
TabScreen,
|
|
65
60
|
TabContainer,
|
|
66
61
|
HeaderTabWrapper,
|
|
67
|
-
ContentWrapper,
|
|
68
62
|
HeaderTabItemOutlineWrapper,
|
|
69
63
|
HeaderTabItemOutline,
|
|
70
64
|
HeaderTabItemWrapper,
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import styled from '@emotion/native';
|
|
2
2
|
import { Animated, View } from 'react-native';
|
|
3
|
-
import PagerView from 'react-native-pager-view';
|
|
4
|
-
|
|
5
|
-
const AnimatedPagerView = Animated.createAnimatedComponent(PagerView);
|
|
6
3
|
|
|
7
4
|
const TabContainer = styled(View)({
|
|
8
5
|
flex: 1,
|
|
@@ -27,10 +24,6 @@ const HeaderTabItem = styled(View)(({ theme }) => ({
|
|
|
27
24
|
paddingVertical: theme.__hd__.tabs.space.itemVerticalPadding,
|
|
28
25
|
}));
|
|
29
26
|
|
|
30
|
-
const ContentWrapper = styled(AnimatedPagerView)({
|
|
31
|
-
flex: 1,
|
|
32
|
-
});
|
|
33
|
-
|
|
34
27
|
const TabScreen = styled(View)({
|
|
35
28
|
flex: 1,
|
|
36
29
|
});
|
|
@@ -55,7 +48,6 @@ export {
|
|
|
55
48
|
HeaderTabWrapper,
|
|
56
49
|
HeaderTab,
|
|
57
50
|
HeaderTabItem,
|
|
58
|
-
ContentWrapper,
|
|
59
51
|
TabScreen,
|
|
60
52
|
StyledIndicator,
|
|
61
53
|
StyledBadgeWrapper,
|
|
@@ -12,7 +12,6 @@ import ActiveTabIndicator from './ActiveTabIndicator';
|
|
|
12
12
|
import SceneView from './SceneView';
|
|
13
13
|
import ScrollableTabs from './ScrollableTabs';
|
|
14
14
|
import {
|
|
15
|
-
ContentWrapper,
|
|
16
15
|
HeaderTab,
|
|
17
16
|
HeaderTabItem,
|
|
18
17
|
HeaderTabWrapper,
|
|
@@ -78,6 +77,8 @@ export interface TabsProps extends ViewProps {
|
|
|
78
77
|
testID?: string;
|
|
79
78
|
}
|
|
80
79
|
|
|
80
|
+
const AnimatedPagerView = Animated.createAnimatedComponent(PagerView);
|
|
81
|
+
|
|
81
82
|
const getTabItem = ({
|
|
82
83
|
item,
|
|
83
84
|
color,
|
|
@@ -193,8 +194,8 @@ const Tabs = ({
|
|
|
193
194
|
/>
|
|
194
195
|
</View>
|
|
195
196
|
</HeaderTabWrapper>
|
|
196
|
-
|
|
197
|
-
|
|
197
|
+
<AnimatedPagerView
|
|
198
|
+
useNext
|
|
198
199
|
initialPage={selectedTabIndex}
|
|
199
200
|
ref={pagerViewRef}
|
|
200
201
|
onPageSelected={(e) => {
|
|
@@ -218,6 +219,7 @@ const Tabs = ({
|
|
|
218
219
|
}
|
|
219
220
|
)}
|
|
220
221
|
scrollEnabled={swipeEnabled}
|
|
222
|
+
style={{ flex: 1 }}
|
|
221
223
|
>
|
|
222
224
|
{tabs.map((tab, index) => {
|
|
223
225
|
const { key, component, testID } = tab;
|
|
@@ -237,7 +239,7 @@ const Tabs = ({
|
|
|
237
239
|
</ScreenContext.Provider>
|
|
238
240
|
);
|
|
239
241
|
})}
|
|
240
|
-
</
|
|
242
|
+
</AnimatedPagerView>
|
|
241
243
|
</TabContainer>
|
|
242
244
|
</TabContext.Provider>
|
|
243
245
|
);
|
|
@@ -32,6 +32,7 @@ exports[`Toast Icon render custom icon correctly 1`] = `
|
|
|
32
32
|
],
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
+
testID="toast-container"
|
|
35
36
|
themeIntent="info"
|
|
36
37
|
themeVariant="default"
|
|
37
38
|
>
|
|
@@ -166,6 +167,7 @@ exports[`Toast renders correctly when intent is error 1`] = `
|
|
|
166
167
|
],
|
|
167
168
|
}
|
|
168
169
|
}
|
|
170
|
+
testID="toast-container"
|
|
169
171
|
themeIntent="error"
|
|
170
172
|
themeVariant="default"
|
|
171
173
|
>
|
|
@@ -358,6 +360,7 @@ exports[`Toast renders correctly when intent is info 1`] = `
|
|
|
358
360
|
],
|
|
359
361
|
}
|
|
360
362
|
}
|
|
363
|
+
testID="toast-container"
|
|
361
364
|
themeIntent="info"
|
|
362
365
|
themeVariant="default"
|
|
363
366
|
>
|
|
@@ -550,6 +553,7 @@ exports[`Toast renders correctly when intent is notification 1`] = `
|
|
|
550
553
|
],
|
|
551
554
|
}
|
|
552
555
|
}
|
|
556
|
+
testID="toast-container"
|
|
553
557
|
themeIntent="notification"
|
|
554
558
|
themeVariant="default"
|
|
555
559
|
>
|
|
@@ -715,6 +719,7 @@ exports[`Toast renders correctly when intent is snackbar 1`] = `
|
|
|
715
719
|
],
|
|
716
720
|
}
|
|
717
721
|
}
|
|
722
|
+
testID="toast-container"
|
|
718
723
|
themeIntent="snackbar"
|
|
719
724
|
themeVariant="default"
|
|
720
725
|
>
|
|
@@ -880,6 +885,7 @@ exports[`Toast renders correctly when intent is success 1`] = `
|
|
|
880
885
|
],
|
|
881
886
|
}
|
|
882
887
|
}
|
|
888
|
+
testID="toast-container"
|
|
883
889
|
themeIntent="success"
|
|
884
890
|
themeVariant="default"
|
|
885
891
|
>
|
|
@@ -1072,6 +1078,7 @@ exports[`Toast renders correctly when intent is warning 1`] = `
|
|
|
1072
1078
|
],
|
|
1073
1079
|
}
|
|
1074
1080
|
}
|
|
1081
|
+
testID="toast-container"
|
|
1075
1082
|
themeIntent="warning"
|
|
1076
1083
|
themeVariant="default"
|
|
1077
1084
|
>
|
|
@@ -3,7 +3,7 @@ import type { GlobalTheme } from '../global';
|
|
|
3
3
|
const getSliderTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
5
|
minimumTrackTint: theme.colors.primary,
|
|
6
|
-
thumbTint: theme.colors.
|
|
6
|
+
thumbTint: theme.colors.primary,
|
|
7
7
|
maximumTrackTint: theme.colors.highlightedSurface,
|
|
8
8
|
};
|
|
9
9
|
|