react-native-tab-view 3.5.2 → 4.0.0-alpha.1
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/lib/commonjs/Pager.android.js.map +1 -1
- package/lib/commonjs/Pager.ios.js.map +1 -1
- package/lib/commonjs/Pager.js.map +1 -1
- package/lib/commonjs/PagerViewAdapter.js +9 -13
- package/lib/commonjs/PagerViewAdapter.js.map +1 -1
- package/lib/commonjs/PanResponderAdapter.js +10 -9
- package/lib/commonjs/PanResponderAdapter.js.map +1 -1
- package/lib/commonjs/PlatformPressable.js +2 -2
- package/lib/commonjs/PlatformPressable.js.map +1 -1
- package/lib/commonjs/SceneMap.js +2 -2
- package/lib/commonjs/SceneMap.js.map +1 -1
- package/lib/commonjs/SceneView.js +3 -4
- package/lib/commonjs/SceneView.js.map +1 -1
- package/lib/commonjs/TabBar.js +86 -40
- package/lib/commonjs/TabBar.js.map +1 -1
- package/lib/commonjs/TabBarIndicator.js +10 -8
- package/lib/commonjs/TabBarIndicator.js.map +1 -1
- package/lib/commonjs/TabBarItem.js +5 -8
- package/lib/commonjs/TabBarItem.js.map +1 -1
- package/lib/commonjs/TabBarItemLabel.js +1 -2
- package/lib/commonjs/TabBarItemLabel.js.map +1 -1
- package/lib/commonjs/TabView.js +8 -3
- package/lib/commonjs/TabView.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useAnimatedValue.js +2 -2
- package/lib/commonjs/useAnimatedValue.js.map +1 -1
- package/lib/module/Pager.android.js.map +1 -1
- package/lib/module/Pager.ios.js.map +1 -1
- package/lib/module/Pager.js.map +1 -1
- package/lib/module/PagerViewAdapter.js +7 -11
- package/lib/module/PagerViewAdapter.js.map +1 -1
- package/lib/module/PanResponderAdapter.js +9 -8
- package/lib/module/PanResponderAdapter.js.map +1 -1
- package/lib/module/PlatformPressable.js.map +1 -1
- package/lib/module/SceneMap.js.map +1 -1
- package/lib/module/SceneView.js +1 -2
- package/lib/module/SceneView.js.map +1 -1
- package/lib/module/TabBar.js +84 -38
- package/lib/module/TabBar.js.map +1 -1
- package/lib/module/TabBarIndicator.js +9 -7
- package/lib/module/TabBarIndicator.js.map +1 -1
- package/lib/module/TabBarItem.js +3 -6
- package/lib/module/TabBarItem.js.map +1 -1
- package/lib/module/TabBarItemLabel.js.map +1 -1
- package/lib/module/TabView.js +7 -2
- package/lib/module/TabView.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/useAnimatedValue.js.map +1 -1
- package/lib/typescript/src/PanResponderAdapter.d.ts +1 -1
- package/lib/typescript/src/PanResponderAdapter.d.ts.map +1 -1
- package/lib/typescript/src/PlatformPressable.d.ts +2 -2
- package/lib/typescript/src/PlatformPressable.d.ts.map +1 -1
- package/lib/typescript/src/SceneMap.d.ts +2 -2
- package/lib/typescript/src/SceneMap.d.ts.map +1 -1
- package/lib/typescript/src/SceneView.d.ts +2 -2
- package/lib/typescript/src/SceneView.d.ts.map +1 -1
- package/lib/typescript/src/TabBar.d.ts +6 -5
- package/lib/typescript/src/TabBar.d.ts.map +1 -1
- package/lib/typescript/src/TabBarIndicator.d.ts +8 -5
- package/lib/typescript/src/TabBarIndicator.d.ts.map +1 -1
- package/lib/typescript/src/TabBarItem.d.ts +2 -2
- package/lib/typescript/src/TabBarItem.d.ts.map +1 -1
- package/lib/typescript/src/TabBarItemLabel.d.ts +1 -1
- package/lib/typescript/src/TabBarItemLabel.d.ts.map +1 -1
- package/lib/typescript/src/TabView.d.ts +5 -4
- package/lib/typescript/src/TabView.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +1 -0
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +10 -10
- package/src/PagerViewAdapter.tsx +2 -2
- package/src/PanResponderAdapter.tsx +9 -7
- package/src/PlatformPressable.tsx +1 -1
- package/src/SceneMap.tsx +1 -3
- package/src/SceneView.tsx +2 -2
- package/src/TabBar.tsx +154 -58
- package/src/TabBarIndicator.tsx +23 -10
- package/src/TabBarItem.tsx +6 -8
- package/src/TabView.tsx +21 -4
- package/src/types.tsx +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanResponderAdapter.d.ts","sourceRoot":"","sources":["../../../src/PanResponderAdapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"PanResponderAdapter.d.ts","sourceRoot":"","sources":["../../../src/PanResponderAdapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EAOT,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EACV,iBAAiB,EACjB,MAAM,EAEN,eAAe,EACf,UAAU,EACV,KAAK,EACN,MAAM,SAAS,CAAC;AAGjB,KAAK,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI,UAAU,GAAG;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IACpC,QAAQ,EAAE,CACR,KAAK,EAAE,iBAAiB,GAAG;QAGzB,QAAQ,EAAE,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAGjD,MAAM,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,CAAC;QAGvD,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;KAC/B,KACE,KAAK,CAAC,YAAY,CAAC;CACzB,CAAC;AAYF,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,KAAK,EAAE,EACnD,MAAM,EACN,mBAA4B,EAC5B,YAAmB,EACnB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,KAAK,EACL,gBAAwB,EACxB,eAAuB,GACxB,EAAE,KAAK,CAAC,CAAC,CAAC,sEA+QV"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { PressableProps } from 'react-native';
|
|
2
|
+
import { type PressableProps } from 'react-native';
|
|
3
3
|
export type Props = PressableProps & {
|
|
4
4
|
pressColor?: string;
|
|
5
5
|
pressOpacity?: number;
|
|
@@ -12,5 +12,5 @@ export type Props = PressableProps & {
|
|
|
12
12
|
* On Android, you can pass the props of TouchableNativeFeedback.
|
|
13
13
|
* On other platforms, you can pass the props of TouchableOpacity.
|
|
14
14
|
*/
|
|
15
|
-
export declare function PlatformPressable({ android_ripple, pressColor, pressOpacity, style, ...rest }: Props): JSX.Element;
|
|
15
|
+
export declare function PlatformPressable({ android_ripple, pressColor, pressOpacity, style, ...rest }: Props): React.JSX.Element;
|
|
16
16
|
//# sourceMappingURL=PlatformPressable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformPressable.d.ts","sourceRoot":"","sources":["../../../src/PlatformPressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAuB,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"PlatformPressable.d.ts","sourceRoot":"","sources":["../../../src/PlatformPressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAExE,MAAM,MAAM,KAAK,GAAG,cAAc,GAAG;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAMF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,cAAc,EACd,UAAiC,EACjC,YAAY,EACZ,KAAK,EACL,GAAG,IAAI,EACR,EAAE,KAAK,qBAeP"}
|
|
@@ -3,8 +3,8 @@ import type { SceneRendererProps } from './types';
|
|
|
3
3
|
type SceneProps = {
|
|
4
4
|
route: any;
|
|
5
5
|
} & Omit<SceneRendererProps, 'layout'>;
|
|
6
|
-
export declare function SceneMap<T
|
|
6
|
+
export declare function SceneMap<T>(scenes: {
|
|
7
7
|
[key: string]: React.ComponentType<T>;
|
|
8
|
-
}): ({ route, jumpTo, position }: SceneProps) => JSX.Element;
|
|
8
|
+
}): ({ route, jumpTo, position }: SceneProps) => React.JSX.Element;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=SceneMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneMap.d.ts","sourceRoot":"","sources":["../../../src/SceneMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,GAAG,CAAC;CACZ,GAAG,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;AAWvC,wBAAgB,QAAQ,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"SceneMap.d.ts","sourceRoot":"","sources":["../../../src/SceneMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,GAAG,CAAC;CACZ,GAAG,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;AAWvC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;CAAE,iCACtC,UAAU,uBAShD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
import type { EventEmitterProps, NavigationState, Route, SceneRendererProps } from './types';
|
|
4
4
|
type Props<T extends Route> = SceneRendererProps & EventEmitterProps & {
|
|
5
5
|
navigationState: NavigationState<T>;
|
|
@@ -11,6 +11,6 @@ type Props<T extends Route> = SceneRendererProps & EventEmitterProps & {
|
|
|
11
11
|
}) => React.ReactNode;
|
|
12
12
|
style?: StyleProp<ViewStyle>;
|
|
13
13
|
};
|
|
14
|
-
export declare function SceneView<T extends Route>({ children, navigationState, lazy, layout, index, lazyPreloadDistance, addEnterListener, style, }: Props<T>): JSX.Element;
|
|
14
|
+
export declare function SceneView<T extends Route>({ children, navigationState, lazy, layout, index, lazyPreloadDistance, addEnterListener, style, }: Props<T>): React.JSX.Element;
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=SceneView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneView.d.ts","sourceRoot":"","sources":["../../../src/SceneView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"SceneView.d.ts","sourceRoot":"","sources":["../../../src/SceneView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,KAAK,EACL,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAEjB,KAAK,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI,kBAAkB,GAC9C,iBAAiB,GAAG;IAClB,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAC3D,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEJ,wBAAgB,SAAS,CAAC,CAAC,SAAS,KAAK,EAAE,EACzC,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,MAAM,EACN,KAAK,EACL,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,GACN,EAAE,KAAK,CAAC,CAAC,CAAC,qBAsEV"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { PressableAndroidRippleConfig, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
-
import { Props as IndicatorProps } from './TabBarIndicator';
|
|
4
|
-
import { Props as TabBarItemProps } from './TabBarItem';
|
|
5
|
-
import type { Event, NavigationState, Route, Scene, SceneRendererProps } from './types';
|
|
2
|
+
import { type PressableAndroidRippleConfig, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
import { type Props as IndicatorProps } from './TabBarIndicator';
|
|
4
|
+
import { type Props as TabBarItemProps } from './TabBarItem';
|
|
5
|
+
import type { Event, LocaleDirection, NavigationState, Route, Scene, SceneRendererProps } from './types';
|
|
6
6
|
export type Props<T extends Route> = SceneRendererProps & {
|
|
7
7
|
navigationState: NavigationState<T>;
|
|
8
8
|
scrollEnabled?: boolean;
|
|
@@ -36,9 +36,10 @@ export type Props<T extends Route> = SceneRendererProps & {
|
|
|
36
36
|
labelStyle?: StyleProp<TextStyle>;
|
|
37
37
|
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
38
38
|
style?: StyleProp<ViewStyle>;
|
|
39
|
+
direction?: LocaleDirection;
|
|
39
40
|
gap?: number;
|
|
40
41
|
testID?: string;
|
|
41
42
|
android_ripple?: PressableAndroidRippleConfig;
|
|
42
43
|
};
|
|
43
|
-
export declare function TabBar<T extends Route>({ getLabelText, getAccessible, getAccessibilityLabel, getTestID, renderIndicator, gap, scrollEnabled, jumpTo, navigationState, position, activeColor, bounces, contentContainerStyle, inactiveColor, indicatorContainerStyle, indicatorStyle, labelStyle, onTabLongPress, onTabPress, pressColor, pressOpacity, renderBadge, renderIcon, renderLabel, renderTabBarItem, style, tabStyle, testID, android_ripple, }: Props<T>): JSX.Element;
|
|
44
|
+
export declare function TabBar<T extends Route>({ getLabelText, getAccessible, getAccessibilityLabel, getTestID, renderIndicator, gap, scrollEnabled, jumpTo, navigationState, position, activeColor, bounces, contentContainerStyle, inactiveColor, indicatorContainerStyle, indicatorStyle, labelStyle, onTabLongPress, onTabPress, pressColor, pressOpacity, renderBadge, renderIcon, renderLabel, direction, renderTabBarItem, style, tabStyle, layout: propLayout, testID, android_ripple, }: Props<T>): React.JSX.Element;
|
|
44
45
|
//# sourceMappingURL=TabBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../../src/TabBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../../src/TabBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAQL,KAAK,4BAA4B,EACjC,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,KAAK,KAAK,IAAI,cAAc,EAE7B,MAAM,mBAAm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rB,aAAa,EACb,uBAAuB,EACvB,cAAc,EACd,UAAU,EACV,cAAc,EACd,UAAU,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,UAAU,EACV,WAAW,EACX,SAA4D,EAC5D,gBAAgB,EAChB,KAAK,EACL,QAAQ,EACR,MAAM,EAAE,UAAU,EAClB,MAAM,EACN,cAAc,GACf,EAAE,KAAK,CAAC,CAAC,CAAC,qBAuUV"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { LocaleDirection, NavigationState, Route, SceneRendererProps } from './types';
|
|
3
4
|
export type GetTabWidth = (index: number) => number;
|
|
4
5
|
export type Props<T extends Route> = SceneRendererProps & {
|
|
5
6
|
navigationState: NavigationState<T>;
|
|
6
|
-
width:
|
|
7
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
+
width: 'auto' | `${number}%` | number;
|
|
8
8
|
getTabWidth: GetTabWidth;
|
|
9
|
+
direction: LocaleDirection;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
9
11
|
gap?: number;
|
|
12
|
+
children?: React.ReactNode;
|
|
10
13
|
};
|
|
11
|
-
export declare function TabBarIndicator<T extends Route>({ getTabWidth, layout, navigationState, position, width, gap, style, }: Props<T>): JSX.Element;
|
|
14
|
+
export declare function TabBarIndicator<T extends Route>({ getTabWidth, layout, navigationState, position, width, direction, gap, style, children, }: Props<T>): React.JSX.Element;
|
|
12
15
|
//# sourceMappingURL=TabBarIndicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBarIndicator.d.ts","sourceRoot":"","sources":["../../../src/TabBarIndicator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabBarIndicator.d.ts","sourceRoot":"","sources":["../../../src/TabBarIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,KAAK,EACL,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;AAEpD,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI,kBAAkB,GAAG;IACxD,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IACpC,KAAK,EAAE,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,MAAM,CAAC;IACtC,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,eAAe,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AA0BF,wBAAgB,eAAe,CAAC,CAAC,SAAS,KAAK,EAAE,EAC/C,WAAW,EACX,MAAM,EACN,eAAe,EACf,QAAQ,EACR,KAAK,EACL,SAAS,EACT,GAAG,EACH,KAAK,EACL,QAAQ,GACT,EAAE,KAAK,CAAC,CAAC,CAAC,qBAyFV"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Animated, LayoutChangeEvent, PressableAndroidRippleConfig, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
import { Animated, type LayoutChangeEvent, type PressableAndroidRippleConfig, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
3
|
import type { NavigationState, Route, Scene } from './types';
|
|
4
4
|
export type Props<T extends Route> = {
|
|
5
5
|
position: Animated.AnimatedInterpolation<number>;
|
|
@@ -32,5 +32,5 @@ export type Props<T extends Route> = {
|
|
|
32
32
|
style: StyleProp<ViewStyle>;
|
|
33
33
|
android_ripple?: PressableAndroidRippleConfig;
|
|
34
34
|
};
|
|
35
|
-
export declare function TabBarItem<T extends Route>(props: Props<T>): JSX.Element;
|
|
35
|
+
export declare function TabBarItem<T extends Route>(props: Props<T>): React.JSX.Element;
|
|
36
36
|
//# sourceMappingURL=TabBarItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBarItem.d.ts","sourceRoot":"","sources":["../../../src/TabBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,iBAAiB,
|
|
1
|
+
{"version":3,"file":"TabBarItem.d.ts","sourceRoot":"","sources":["../../../src/TabBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,EACjC,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAE7D,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI;IACnC,QAAQ,EAAE,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC;IACT,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,MAAM,GAAG,SAAS,CAAC;IACtD,aAAa,EAAE,CAAC,KAAK,E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
9
|
-
export declare const TabBarItemLabel: React.MemoExoticComponent<({ color, label, labelStyle, icon }: TabBarItemLabelProps) => JSX.Element | null>;
|
|
9
|
+
export declare const TabBarItemLabel: React.MemoExoticComponent<({ color, label, labelStyle, icon }: TabBarItemLabelProps) => React.JSX.Element | null>;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=TabBarItemLabel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBarItemLabel.d.ts","sourceRoot":"","sources":["../../../src/TabBarItemLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACvB;AAED,eAAO,MAAM,eAAe,iEACW,oBAAoB,
|
|
1
|
+
{"version":3,"file":"TabBarItemLabel.d.ts","sourceRoot":"","sources":["../../../src/TabBarItemLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACvB;AAED,eAAO,MAAM,eAAe,iEACW,oBAAoB,8BAkB1D,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import type { Layout, NavigationState, PagerProps, Route, SceneRendererProps } from './types';
|
|
4
|
-
export type Props<T extends Route> = PagerProps & {
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { Layout, LocaleDirection, NavigationState, PagerProps, Route, SceneRendererProps } from './types';
|
|
4
|
+
export type Props<T extends Route> = Omit<PagerProps, 'layoutDirection'> & {
|
|
5
5
|
onIndexChange: (index: number) => void;
|
|
6
6
|
navigationState: NavigationState<T>;
|
|
7
7
|
renderScene: (props: SceneRendererProps & {
|
|
@@ -20,8 +20,9 @@ export type Props<T extends Route> = PagerProps & {
|
|
|
20
20
|
}) => boolean) | boolean;
|
|
21
21
|
lazyPreloadDistance?: number;
|
|
22
22
|
sceneContainerStyle?: StyleProp<ViewStyle>;
|
|
23
|
+
direction?: LocaleDirection;
|
|
23
24
|
pagerStyle?: StyleProp<ViewStyle>;
|
|
24
25
|
style?: StyleProp<ViewStyle>;
|
|
25
26
|
};
|
|
26
|
-
export declare function TabView<T extends Route>({ onIndexChange, navigationState, renderScene, initialLayout, keyboardDismissMode, lazy, lazyPreloadDistance, onSwipeStart, onSwipeEnd, renderLazyPlaceholder, renderTabBar, sceneContainerStyle, pagerStyle, style, swipeEnabled, tabBarPosition, animationEnabled, overScrollMode, }: Props<T>): JSX.Element;
|
|
27
|
+
export declare function TabView<T extends Route>({ onIndexChange, navigationState, renderScene, initialLayout, keyboardDismissMode, lazy, lazyPreloadDistance, onSwipeStart, onSwipeEnd, renderLazyPlaceholder, renderTabBar, sceneContainerStyle, pagerStyle, style, direction, swipeEnabled, tabBarPosition, animationEnabled, overScrollMode, }: Props<T>): React.JSX.Element;
|
|
27
28
|
//# sourceMappingURL=TabView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabView.d.ts","sourceRoot":"","sources":["../../../src/TabView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+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O,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-tab-view",
|
|
3
3
|
"description": "Tab view component for React Native",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0-alpha.1",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -39,20 +39,20 @@
|
|
|
39
39
|
"clean": "del lib"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"use-latest-callback": "^0.1.
|
|
42
|
+
"use-latest-callback": "^0.1.9"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"del-cli": "^5.
|
|
45
|
+
"del-cli": "^5.1.0",
|
|
46
46
|
"react": "18.2.0",
|
|
47
|
-
"react-native": "0.
|
|
48
|
-
"react-native-builder-bob": "^0.
|
|
49
|
-
"react-native-pager-view": "6.
|
|
50
|
-
"typescript": "^
|
|
47
|
+
"react-native": "0.72.6",
|
|
48
|
+
"react-native-builder-bob": "^0.23.1",
|
|
49
|
+
"react-native-pager-view": "6.2.0",
|
|
50
|
+
"typescript": "^5.2.2"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"react": "*",
|
|
54
|
-
"react-native": "
|
|
55
|
-
"react-native-pager-view": "
|
|
54
|
+
"react-native": "0.72.6",
|
|
55
|
+
"react-native-pager-view": "6.2.0"
|
|
56
56
|
},
|
|
57
57
|
"react-native-builder-bob": {
|
|
58
58
|
"source": "src",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
]
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "858a8746a5c007a623206c920f70d55935ed39b4"
|
|
72
72
|
}
|
package/src/PagerViewAdapter.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Animated, Keyboard, StyleSheet } from 'react-native';
|
|
3
3
|
import ViewPager, {
|
|
4
|
-
PageScrollStateChangedNativeEvent,
|
|
4
|
+
type PageScrollStateChangedNativeEvent,
|
|
5
5
|
} from 'react-native-pager-view';
|
|
6
6
|
|
|
7
7
|
import type {
|
|
@@ -49,7 +49,7 @@ export function PagerViewAdapter<T extends Route>({
|
|
|
49
49
|
|
|
50
50
|
const listenersRef = React.useRef<Listener[]>([]);
|
|
51
51
|
|
|
52
|
-
const pagerRef = React.useRef<ViewPager>();
|
|
52
|
+
const pagerRef = React.useRef<ViewPager>(null);
|
|
53
53
|
const indexRef = React.useRef<number>(index);
|
|
54
54
|
const navigationStateRef = React.useRef(navigationState);
|
|
55
55
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Animated,
|
|
4
|
-
GestureResponderEvent,
|
|
5
|
-
I18nManager,
|
|
4
|
+
type GestureResponderEvent,
|
|
6
5
|
Keyboard,
|
|
7
6
|
PanResponder,
|
|
8
|
-
PanResponderGestureState,
|
|
7
|
+
type PanResponderGestureState,
|
|
9
8
|
StyleSheet,
|
|
10
9
|
View,
|
|
11
10
|
} from 'react-native';
|
|
@@ -60,6 +59,7 @@ export function PanResponderAdapter<T extends Route>({
|
|
|
60
59
|
children,
|
|
61
60
|
style,
|
|
62
61
|
animationEnabled = false,
|
|
62
|
+
layoutDirection = 'ltr',
|
|
63
63
|
}: Props<T>) {
|
|
64
64
|
const { routes, index } = navigationState;
|
|
65
65
|
|
|
@@ -147,7 +147,8 @@ export function PanResponderAdapter<T extends Route>({
|
|
|
147
147
|
return false;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
const diffX =
|
|
150
|
+
const diffX =
|
|
151
|
+
layoutDirection === 'rtl' ? -gestureState.dx : gestureState.dx;
|
|
151
152
|
|
|
152
153
|
return (
|
|
153
154
|
isMovingHorizontally(event, gestureState) &&
|
|
@@ -172,7 +173,8 @@ export function PanResponderAdapter<T extends Route>({
|
|
|
172
173
|
_: GestureResponderEvent,
|
|
173
174
|
gestureState: PanResponderGestureState
|
|
174
175
|
) => {
|
|
175
|
-
const diffX =
|
|
176
|
+
const diffX =
|
|
177
|
+
layoutDirection === 'rtl' ? -gestureState.dx : gestureState.dx;
|
|
176
178
|
|
|
177
179
|
if (
|
|
178
180
|
// swiping left
|
|
@@ -222,7 +224,7 @@ export function PanResponderAdapter<T extends Route>({
|
|
|
222
224
|
Math.min(
|
|
223
225
|
Math.max(
|
|
224
226
|
0,
|
|
225
|
-
|
|
227
|
+
layoutDirection === 'rtl'
|
|
226
228
|
? currentIndex + gestureState.dx / Math.abs(gestureState.dx)
|
|
227
229
|
: currentIndex - gestureState.dx / Math.abs(gestureState.dx)
|
|
228
230
|
),
|
|
@@ -281,7 +283,7 @@ export function PanResponderAdapter<T extends Route>({
|
|
|
281
283
|
outputRange: [-maxTranslate, 0],
|
|
282
284
|
extrapolate: 'clamp',
|
|
283
285
|
}),
|
|
284
|
-
|
|
286
|
+
layoutDirection === 'rtl' ? -1 : 1
|
|
285
287
|
);
|
|
286
288
|
|
|
287
289
|
const position = React.useMemo(
|
package/src/SceneMap.tsx
CHANGED
|
@@ -15,9 +15,7 @@ const SceneComponent = React.memo(
|
|
|
15
15
|
}
|
|
16
16
|
);
|
|
17
17
|
|
|
18
|
-
export function SceneMap<T
|
|
19
|
-
[key: string]: React.ComponentType<T>;
|
|
20
|
-
}) {
|
|
18
|
+
export function SceneMap<T>(scenes: { [key: string]: React.ComponentType<T> }) {
|
|
21
19
|
return ({ route, jumpTo, position }: SceneProps) => (
|
|
22
20
|
<SceneComponent
|
|
23
21
|
key={route.key}
|
package/src/SceneView.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
|
2
|
+
import { type StyleProp, StyleSheet, View, type ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import type {
|
|
5
5
|
EventEmitterProps,
|
|
@@ -54,7 +54,7 @@ export function SceneView<T extends Route>({
|
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
let unsubscribe: (() => void) | undefined;
|
|
57
|
-
let timer:
|
|
57
|
+
let timer: NodeJS.Timeout | undefined;
|
|
58
58
|
|
|
59
59
|
if (lazy && isLoading) {
|
|
60
60
|
// If lazy mode is enabled, listen to when we enter screens
|