react-native-tab-view 4.0.0-alpha.5 → 4.0.0-alpha.7
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/PlatformPressable.js +22 -1
- package/lib/commonjs/PlatformPressable.js.map +1 -1
- package/lib/commonjs/TabBar.js +75 -59
- package/lib/commonjs/TabBar.js.map +1 -1
- package/lib/commonjs/TabBarItem.js +52 -71
- package/lib/commonjs/TabBarItem.js.map +1 -1
- package/lib/commonjs/TabBarItemLabel.js +3 -2
- package/lib/commonjs/TabBarItemLabel.js.map +1 -1
- package/lib/module/PlatformPressable.js +22 -1
- package/lib/module/PlatformPressable.js.map +1 -1
- package/lib/module/TabBar.js +75 -59
- package/lib/module/TabBar.js.map +1 -1
- package/lib/module/TabBarItem.js +52 -71
- package/lib/module/TabBarItem.js.map +1 -1
- package/lib/module/TabBarItemLabel.js +3 -2
- package/lib/module/TabBarItemLabel.js.map +1 -1
- package/lib/typescript/src/PlatformPressable.d.ts +3 -2
- package/lib/typescript/src/PlatformPressable.d.ts.map +1 -1
- package/lib/typescript/src/TabBar.d.ts +4 -15
- package/lib/typescript/src/TabBar.d.ts.map +1 -1
- package/lib/typescript/src/TabBarItem.d.ts +2 -17
- package/lib/typescript/src/TabBarItem.d.ts.map +1 -1
- package/lib/typescript/src/TabView.d.ts +3 -3
- package/lib/typescript/src/TabView.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +26 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/PlatformPressable.tsx +31 -2
- package/src/TabBar.tsx +107 -115
- package/src/TabBarItem.tsx +81 -105
- package/src/TabBarItemLabel.tsx +2 -1
- package/src/TabView.tsx +1 -1
- package/src/index.tsx +6 -1
- package/src/types.tsx +26 -1
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { type PressableAndroidRippleConfig, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
3
|
import { type Props as IndicatorProps } from './TabBarIndicator';
|
|
4
4
|
import { type Props as TabBarItemProps } from './TabBarItem';
|
|
5
|
-
import type { Event, LocaleDirection, NavigationState, Route, Scene, SceneRendererProps } from './types';
|
|
5
|
+
import type { Event, LocaleDirection, NavigationState, Route, Scene, SceneRendererProps, TabDescriptor } from './types';
|
|
6
6
|
export type Props<T extends Route> = SceneRendererProps & {
|
|
7
7
|
navigationState: NavigationState<T>;
|
|
8
8
|
scrollEnabled?: boolean;
|
|
@@ -11,19 +11,8 @@ export type Props<T extends Route> = SceneRendererProps & {
|
|
|
11
11
|
inactiveColor?: string;
|
|
12
12
|
pressColor?: string;
|
|
13
13
|
pressOpacity?: number;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
getAccessibilityLabel?: (scene: Scene<T>) => string | undefined;
|
|
17
|
-
getTestID?: (scene: Scene<T>) => string | undefined;
|
|
18
|
-
renderLabel?: (scene: Scene<T> & {
|
|
19
|
-
focused: boolean;
|
|
20
|
-
color: string;
|
|
21
|
-
}) => React.ReactNode;
|
|
22
|
-
renderIcon?: (scene: Scene<T> & {
|
|
23
|
-
focused: boolean;
|
|
24
|
-
color: string;
|
|
25
|
-
}) => React.ReactNode;
|
|
26
|
-
renderBadge?: (scene: Scene<T>) => React.ReactNode;
|
|
14
|
+
options?: Record<string, TabDescriptor<T>>;
|
|
15
|
+
commonOptions?: TabDescriptor<T>;
|
|
27
16
|
renderIndicator?: (props: IndicatorProps<T>) => React.ReactNode;
|
|
28
17
|
renderTabBarItem?: (props: TabBarItemProps<T> & {
|
|
29
18
|
key: string;
|
|
@@ -41,5 +30,5 @@ export type Props<T extends Route> = SceneRendererProps & {
|
|
|
41
30
|
testID?: string;
|
|
42
31
|
android_ripple?: PressableAndroidRippleConfig;
|
|
43
32
|
};
|
|
44
|
-
export declare function TabBar<T extends Route>({
|
|
33
|
+
export declare function TabBar<T extends Route>({ renderIndicator, gap, scrollEnabled, jumpTo, navigationState, position, activeColor, bounces, contentContainerStyle, inactiveColor, indicatorContainerStyle, indicatorStyle, labelStyle, onTabLongPress, onTabPress, pressColor, pressOpacity, direction, renderTabBarItem, style, tabStyle, layout: propLayout, testID, android_ripple, options, commonOptions, }: Props<T>): React.JSX.Element;
|
|
45
34
|
//# 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,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,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,KAAK,IAAI,eAAe,EAAc,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EACV,KAAK,EAEL,eAAe,EACf,eAAe,EACf,KAAK,EACL,KAAK,EACL,kBAAkB,
|
|
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,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,KAAK,IAAI,eAAe,EAAc,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EACV,KAAK,EAEL,eAAe,EACf,eAAe,EACf,KAAK,EACL,KAAK,EACL,kBAAkB,EAClB,aAAa,EACd,MAAM,SAAS,CA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AC7B,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,4BAA4B,CAAC;CAC/C,CAAC;AA0QF,wBAAgB,MAAM,CAAC,CAAC,SAAS,KAAK,EAAE,EACtC,eAAwC,EACxC,GAAO,EACP,aAAa,EACb,MAAM,EACN,eAAe,EACf,QAAQ,EACR,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,aAAa,EACb,uBAAuB,EACvB,cAAc,EACd,UAAU,EACV,cAAc,EACd,UAAU,EACV,UAAU,EACV,YAAY,EACZ,SAA4D,EAC5D,gBAAgB,EAChB,KAAK,EACL,QAAQ,EACR,MAAM,EAAE,UAAU,EAClB,MAAM,EACN,cAAc,EACd,OAAO,EACP,aAAa,GACd,EAAE,KAAK,CAAC,CAAC,CAAC,qBAmVV"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Animated, type LayoutChangeEvent, type PressableAndroidRippleConfig, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
-
import type { NavigationState, Route,
|
|
4
|
-
export type Props<T extends Route> = {
|
|
3
|
+
import type { NavigationState, Route, TabDescriptor } from './types';
|
|
4
|
+
export type Props<T extends Route> = TabDescriptor<T> & {
|
|
5
5
|
position: Animated.AnimatedInterpolation<number>;
|
|
6
6
|
route: T;
|
|
7
7
|
navigationState: NavigationState<T>;
|
|
@@ -9,21 +9,6 @@ export type Props<T extends Route> = {
|
|
|
9
9
|
inactiveColor?: string;
|
|
10
10
|
pressColor?: string;
|
|
11
11
|
pressOpacity?: number;
|
|
12
|
-
getLabelText: (scene: Scene<T>) => string | undefined;
|
|
13
|
-
getAccessible: (scene: Scene<T>) => boolean | undefined;
|
|
14
|
-
getAccessibilityLabel: (scene: Scene<T>) => string | undefined;
|
|
15
|
-
getTestID: (scene: Scene<T>) => string | undefined;
|
|
16
|
-
renderLabel?: (scene: {
|
|
17
|
-
route: T;
|
|
18
|
-
focused: boolean;
|
|
19
|
-
color: string;
|
|
20
|
-
}) => React.ReactNode;
|
|
21
|
-
renderIcon?: (scene: {
|
|
22
|
-
route: T;
|
|
23
|
-
focused: boolean;
|
|
24
|
-
color: string;
|
|
25
|
-
}) => React.ReactNode;
|
|
26
|
-
renderBadge?: (scene: Scene<T>) => React.ReactNode;
|
|
27
12
|
onLayout?: (event: LayoutChangeEvent) => void;
|
|
28
13
|
onPress: () => void;
|
|
29
14
|
onLongPress: () => void;
|
|
@@ -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,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,
|
|
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,aAAa,EAAE,MAAM,SAAS,CAAC;AAErE,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI,aAAa,CAAC,CAAC,CAAC,GAAG;IACtD,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,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5B,cAAc,CAAC,EAAE,4BAA4B,CAAC;CAC/C,CAAC;AA6NF,wBAAgB,UAAU,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,qBAsB1D"}
|
|
@@ -4,9 +4,6 @@ import type { Layout, LocaleDirection, NavigationState, PagerProps, Route, Scene
|
|
|
4
4
|
export type Props<T extends Route> = Omit<PagerProps, 'layoutDirection'> & {
|
|
5
5
|
onIndexChange: (index: number) => void;
|
|
6
6
|
navigationState: NavigationState<T>;
|
|
7
|
-
renderScene: (props: SceneRendererProps & {
|
|
8
|
-
route: T;
|
|
9
|
-
}) => React.ReactNode;
|
|
10
7
|
renderLazyPlaceholder?: (props: {
|
|
11
8
|
route: T;
|
|
12
9
|
}) => React.ReactNode;
|
|
@@ -23,6 +20,9 @@ export type Props<T extends Route> = Omit<PagerProps, 'layoutDirection'> & {
|
|
|
23
20
|
direction?: LocaleDirection;
|
|
24
21
|
pagerStyle?: StyleProp<ViewStyle>;
|
|
25
22
|
style?: StyleProp<ViewStyle>;
|
|
23
|
+
renderScene: (props: SceneRendererProps & {
|
|
24
|
+
route: T;
|
|
25
|
+
}) => React.ReactNode;
|
|
26
26
|
};
|
|
27
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;
|
|
28
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,EAIL,KAAK,SAAS,EAGd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EACV,MAAM,EACN,eAAe,EACf,eAAe,EACf,UAAU,EACV,KAAK,EACL,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,GAAG;IACzE,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IACpC,
|
|
1
|
+
{"version":3,"file":"TabView.d.ts","sourceRoot":"","sources":["../../../src/TabView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,KAAK,SAAS,EAGd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EACV,MAAM,EACN,eAAe,EACf,eAAe,EACf,UAAU,EACV,KAAK,EACL,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,GAAG;IACzE,aAAa,EAAE,CAAC,KAAK,E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,CAAC,CAAC,CAAC,qBAuGV"}
|
|
@@ -7,5 +7,5 @@ export type { Props as TabBarItemProps } from './TabBarItem';
|
|
|
7
7
|
export { TabBarItem } from './TabBarItem';
|
|
8
8
|
export type { Props as TabViewProps } from './TabView';
|
|
9
9
|
export { TabView } from './TabView';
|
|
10
|
-
export type { NavigationState, Route, SceneRendererProps } from './types';
|
|
10
|
+
export type { NavigationState, Route, SceneRendererProps, TabDescriptor, } from './types';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,KAAK,IAAI,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,KAAK,IAAI,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EACV,eAAe,EACf,KAAK,EACL,kBAAkB,EAClB,aAAa,GACd,MAAM,SAAS,CAAC"}
|
|
@@ -1,5 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Animated, StyleProp, TextStyle } from 'react-native';
|
|
2
3
|
import type { PagerViewProps } from 'react-native-pager-view';
|
|
4
|
+
export type TabDescriptor<T extends Route> = {
|
|
5
|
+
accessibilityLabel?: string;
|
|
6
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
7
|
+
accessible?: boolean;
|
|
8
|
+
testID?: string;
|
|
9
|
+
labelText?: string;
|
|
10
|
+
labelAllowFontScaling?: boolean;
|
|
11
|
+
href?: string;
|
|
12
|
+
label?: (props: {
|
|
13
|
+
focused: boolean;
|
|
14
|
+
color: string;
|
|
15
|
+
style?: StyleProp<TextStyle>;
|
|
16
|
+
allowFontScaling?: boolean;
|
|
17
|
+
label?: string;
|
|
18
|
+
route: T;
|
|
19
|
+
}) => React.ReactElement;
|
|
20
|
+
icon?: (props: {
|
|
21
|
+
focused: boolean;
|
|
22
|
+
color: string;
|
|
23
|
+
size: number;
|
|
24
|
+
route: T;
|
|
25
|
+
}) => React.ReactElement;
|
|
26
|
+
badge?: () => React.ReactElement;
|
|
27
|
+
};
|
|
3
28
|
export type LocaleDirection = 'ltr' | 'rtl';
|
|
4
29
|
export type Route = {
|
|
5
30
|
key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":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AC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;IAClD,YAAY,CAAC,EAAE,OAAO,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.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.7",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
]
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "4278a3d0a5deca93206771a1fa746aa03b86900e"
|
|
72
72
|
}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
type GestureResponderEvent,
|
|
4
|
+
Platform,
|
|
5
|
+
Pressable,
|
|
6
|
+
type PressableProps,
|
|
7
|
+
} from 'react-native';
|
|
3
8
|
|
|
4
9
|
export type Props = PressableProps & {
|
|
10
|
+
children: React.ReactNode;
|
|
5
11
|
pressColor?: string;
|
|
6
12
|
pressOpacity?: number;
|
|
7
|
-
|
|
13
|
+
href?: string;
|
|
8
14
|
};
|
|
9
15
|
|
|
10
16
|
const ANDROID_VERSION_LOLLIPOP = 21;
|
|
@@ -19,12 +25,34 @@ const ANDROID_SUPPORTS_RIPPLE =
|
|
|
19
25
|
* On other platforms, you can pass the props of TouchableOpacity.
|
|
20
26
|
*/
|
|
21
27
|
export function PlatformPressable({
|
|
28
|
+
disabled,
|
|
22
29
|
android_ripple,
|
|
23
30
|
pressColor = 'rgba(0, 0, 0, .32)',
|
|
24
31
|
pressOpacity,
|
|
25
32
|
style,
|
|
33
|
+
onPress,
|
|
26
34
|
...rest
|
|
27
35
|
}: Props) {
|
|
36
|
+
const handlePress = (e: GestureResponderEvent) => {
|
|
37
|
+
// @ts-expect-error: these properties exist on web, but not in React Native
|
|
38
|
+
const hasModifierKey = e.metaKey || e.altKey || e.ctrlKey || e.shiftKey; // ignore clicks with modifier keys
|
|
39
|
+
// @ts-expect-error: these properties exist on web, but not in React Native
|
|
40
|
+
const isLeftClick = e.button == null || e.button === 0; // only handle left clicks
|
|
41
|
+
const isSelfTarget = [undefined, null, '', 'self'].includes(
|
|
42
|
+
// @ts-expect-error: these properties exist on web, but not in React Native
|
|
43
|
+
e.currentTarget?.target
|
|
44
|
+
); // let browser handle "target=_blank" etc.
|
|
45
|
+
|
|
46
|
+
if (Platform.OS === 'web' && rest.href != null) {
|
|
47
|
+
if (!hasModifierKey && isLeftClick && isSelfTarget) {
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
onPress?.(e);
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
onPress?.(e);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
28
56
|
return (
|
|
29
57
|
<Pressable
|
|
30
58
|
android_ripple={
|
|
@@ -36,6 +64,7 @@ export function PlatformPressable({
|
|
|
36
64
|
{ opacity: pressed && !ANDROID_SUPPORTS_RIPPLE ? pressOpacity : 1 },
|
|
37
65
|
typeof style === 'function' ? style({ pressed }) : style,
|
|
38
66
|
]}
|
|
67
|
+
onPress={disabled ? undefined : handlePress}
|
|
39
68
|
{...rest}
|
|
40
69
|
/>
|
|
41
70
|
);
|
package/src/TabBar.tsx
CHANGED
|
@@ -30,6 +30,7 @@ import type {
|
|
|
30
30
|
Route,
|
|
31
31
|
Scene,
|
|
32
32
|
SceneRendererProps,
|
|
33
|
+
TabDescriptor,
|
|
33
34
|
} from './types';
|
|
34
35
|
import { useAnimatedValue } from './useAnimatedValue';
|
|
35
36
|
|
|
@@ -41,23 +42,8 @@ export type Props<T extends Route> = SceneRendererProps & {
|
|
|
41
42
|
inactiveColor?: string;
|
|
42
43
|
pressColor?: string;
|
|
43
44
|
pressOpacity?: number;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
getAccessibilityLabel?: (scene: Scene<T>) => string | undefined;
|
|
47
|
-
getTestID?: (scene: Scene<T>) => string | undefined;
|
|
48
|
-
renderLabel?: (
|
|
49
|
-
scene: Scene<T> & {
|
|
50
|
-
focused: boolean;
|
|
51
|
-
color: string;
|
|
52
|
-
}
|
|
53
|
-
) => React.ReactNode;
|
|
54
|
-
renderIcon?: (
|
|
55
|
-
scene: Scene<T> & {
|
|
56
|
-
focused: boolean;
|
|
57
|
-
color: string;
|
|
58
|
-
}
|
|
59
|
-
) => React.ReactNode;
|
|
60
|
-
renderBadge?: (scene: Scene<T>) => React.ReactNode;
|
|
45
|
+
options?: Record<string, TabDescriptor<T>>;
|
|
46
|
+
commonOptions?: TabDescriptor<T>;
|
|
61
47
|
renderIndicator?: (props: IndicatorProps<T>) => React.ReactNode;
|
|
62
48
|
renderTabBarItem?: (
|
|
63
49
|
props: TabBarItemProps<T> & { key: string }
|
|
@@ -318,7 +304,6 @@ const getScrollAmount = <T extends Route>({
|
|
|
318
304
|
direction,
|
|
319
305
|
});
|
|
320
306
|
};
|
|
321
|
-
|
|
322
307
|
const getLabelTextDefault = ({ route }: Scene<Route>) => route.title;
|
|
323
308
|
|
|
324
309
|
const getAccessibleDefault = ({ route }: Scene<Route>) =>
|
|
@@ -342,10 +327,6 @@ const getTestIdDefault = ({ route }: Scene<Route>) => route.testID;
|
|
|
342
327
|
const MEASURE_PER_BATCH = 10;
|
|
343
328
|
|
|
344
329
|
export function TabBar<T extends Route>({
|
|
345
|
-
getLabelText = getLabelTextDefault,
|
|
346
|
-
getAccessible = getAccessibleDefault,
|
|
347
|
-
getAccessibilityLabel = getAccessibilityLabelDefault,
|
|
348
|
-
getTestID = getTestIdDefault,
|
|
349
330
|
renderIndicator = renderIndicatorDefault,
|
|
350
331
|
gap = 0,
|
|
351
332
|
scrollEnabled,
|
|
@@ -363,9 +344,6 @@ export function TabBar<T extends Route>({
|
|
|
363
344
|
onTabPress,
|
|
364
345
|
pressColor,
|
|
365
346
|
pressOpacity,
|
|
366
|
-
renderBadge,
|
|
367
|
-
renderIcon,
|
|
368
|
-
renderLabel,
|
|
369
347
|
direction = I18nManager.getConstants().isRTL ? 'rtl' : 'ltr',
|
|
370
348
|
renderTabBarItem,
|
|
371
349
|
style,
|
|
@@ -373,6 +351,8 @@ export function TabBar<T extends Route>({
|
|
|
373
351
|
layout: propLayout,
|
|
374
352
|
testID,
|
|
375
353
|
android_ripple,
|
|
354
|
+
options,
|
|
355
|
+
commonOptions,
|
|
376
356
|
}: Props<T>) {
|
|
377
357
|
const [layout, setLayout] = React.useState<Layout>(
|
|
378
358
|
propLayout ?? { width: 0, height: 0 }
|
|
@@ -463,86 +443,103 @@ export function TabBar<T extends Route>({
|
|
|
463
443
|
|
|
464
444
|
const renderItem = React.useCallback(
|
|
465
445
|
({ item: route, index }: ListRenderItemInfo<T>) => {
|
|
466
|
-
const
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
route
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
renderIcon: renderIcon,
|
|
477
|
-
renderLabel: renderLabel,
|
|
478
|
-
activeColor: activeColor,
|
|
479
|
-
inactiveColor: inactiveColor,
|
|
480
|
-
pressColor: pressColor,
|
|
481
|
-
pressOpacity: pressOpacity,
|
|
482
|
-
onLayout: isWidthDynamic
|
|
483
|
-
? (e: LayoutChangeEvent) => {
|
|
484
|
-
measuredTabWidths.current[route.key] = e.nativeEvent.layout.width;
|
|
446
|
+
const {
|
|
447
|
+
testID = getTestIdDefault({ route }),
|
|
448
|
+
labelText = getLabelTextDefault({ route }),
|
|
449
|
+
accessible = getAccessibleDefault({ route }),
|
|
450
|
+
accessibilityLabel = getAccessibilityLabelDefault({ route }),
|
|
451
|
+
href,
|
|
452
|
+
} = {
|
|
453
|
+
...commonOptions,
|
|
454
|
+
...options?.[route.key],
|
|
455
|
+
};
|
|
485
456
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
} else if (
|
|
500
|
-
routes.every(
|
|
457
|
+
const onLayout = isWidthDynamic
|
|
458
|
+
? (e: LayoutChangeEvent) => {
|
|
459
|
+
measuredTabWidths.current[route.key] = e.nativeEvent.layout.width;
|
|
460
|
+
|
|
461
|
+
// When we have measured widths for all of the tabs, we should updates the state
|
|
462
|
+
// We avoid doing separate setState for each layout since it triggers multiple renders and slows down app
|
|
463
|
+
// If we have more than 10 routes divide updating tabWidths into multiple batches. Here we update only first batch of 10 items.
|
|
464
|
+
if (
|
|
465
|
+
routes.length > MEASURE_PER_BATCH &&
|
|
466
|
+
index === MEASURE_PER_BATCH &&
|
|
467
|
+
routes
|
|
468
|
+
.slice(0, MEASURE_PER_BATCH)
|
|
469
|
+
.every(
|
|
501
470
|
(r) => typeof measuredTabWidths.current[r.key] === 'number'
|
|
502
471
|
)
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
472
|
+
) {
|
|
473
|
+
setTabWidths({ ...measuredTabWidths.current });
|
|
474
|
+
} else if (
|
|
475
|
+
routes.every(
|
|
476
|
+
(r) => typeof measuredTabWidths.current[r.key] === 'number'
|
|
477
|
+
)
|
|
478
|
+
) {
|
|
479
|
+
// When we have measured widths for all of the tabs, we should updates the state
|
|
480
|
+
// We avoid doing separate setState for each layout since it triggers multiple renders and slows down app
|
|
481
|
+
setTabWidths({ ...measuredTabWidths.current });
|
|
508
482
|
}
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
483
|
+
}
|
|
484
|
+
: undefined;
|
|
485
|
+
|
|
486
|
+
const onPress = () => {
|
|
487
|
+
const event: Scene<T> & Event = {
|
|
488
|
+
route,
|
|
489
|
+
defaultPrevented: false,
|
|
490
|
+
preventDefault: () => {
|
|
491
|
+
event.defaultPrevented = true;
|
|
492
|
+
},
|
|
493
|
+
};
|
|
518
494
|
|
|
519
|
-
|
|
495
|
+
onTabPress?.(event);
|
|
520
496
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
497
|
+
if (event.defaultPrevented) {
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
jumpTo(route.key);
|
|
502
|
+
};
|
|
524
503
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
504
|
+
const onLongPress = () => onTabLongPress?.({ route });
|
|
505
|
+
|
|
506
|
+
// Calculate the default width for tab for FlatList to work
|
|
507
|
+
const defaultTabWidth = !isWidthDynamic
|
|
508
|
+
? getComputedTabWidth(
|
|
509
|
+
index,
|
|
510
|
+
layout,
|
|
511
|
+
routes,
|
|
512
|
+
scrollEnabled,
|
|
513
|
+
tabWidths,
|
|
514
|
+
getFlattenedTabWidth(tabStyle),
|
|
515
|
+
getFlattenedPaddingRight(contentContainerStyle),
|
|
516
|
+
getFlattenedPaddingLeft(contentContainerStyle),
|
|
517
|
+
gap
|
|
518
|
+
)
|
|
519
|
+
: undefined;
|
|
520
|
+
|
|
521
|
+
const props = {
|
|
522
|
+
href,
|
|
523
|
+
key: route.key,
|
|
524
|
+
position,
|
|
525
|
+
route,
|
|
526
|
+
navigationState,
|
|
527
|
+
testID,
|
|
528
|
+
labelText,
|
|
529
|
+
accessible,
|
|
530
|
+
accessibilityLabel,
|
|
531
|
+
activeColor,
|
|
532
|
+
inactiveColor,
|
|
533
|
+
pressColor,
|
|
534
|
+
pressOpacity,
|
|
535
|
+
onLayout,
|
|
536
|
+
onPress,
|
|
537
|
+
onLongPress,
|
|
538
|
+
labelStyle,
|
|
529
539
|
style: tabStyle,
|
|
530
|
-
|
|
531
|
-
defaultTabWidth: !isWidthDynamic
|
|
532
|
-
? getComputedTabWidth(
|
|
533
|
-
index,
|
|
534
|
-
layout,
|
|
535
|
-
routes,
|
|
536
|
-
scrollEnabled,
|
|
537
|
-
tabWidths,
|
|
538
|
-
getFlattenedTabWidth(tabStyle),
|
|
539
|
-
getFlattenedPaddingRight(contentContainerStyle),
|
|
540
|
-
getFlattenedPaddingLeft(contentContainerStyle),
|
|
541
|
-
gap
|
|
542
|
-
)
|
|
543
|
-
: undefined,
|
|
540
|
+
defaultTabWidth,
|
|
544
541
|
android_ripple,
|
|
545
|
-
};
|
|
542
|
+
} satisfies TabBarItemProps<T> & { key: string };
|
|
546
543
|
|
|
547
544
|
return (
|
|
548
545
|
<>
|
|
@@ -556,33 +553,28 @@ export function TabBar<T extends Route>({
|
|
|
556
553
|
);
|
|
557
554
|
},
|
|
558
555
|
[
|
|
556
|
+
position,
|
|
557
|
+
navigationState,
|
|
558
|
+
commonOptions,
|
|
559
|
+
options,
|
|
559
560
|
activeColor,
|
|
560
|
-
android_ripple,
|
|
561
|
-
gap,
|
|
562
|
-
getAccessibilityLabel,
|
|
563
|
-
getAccessible,
|
|
564
|
-
getLabelText,
|
|
565
|
-
getTestID,
|
|
566
561
|
inactiveColor,
|
|
562
|
+
pressColor,
|
|
563
|
+
pressOpacity,
|
|
567
564
|
isWidthDynamic,
|
|
568
|
-
jumpTo,
|
|
569
565
|
labelStyle,
|
|
566
|
+
tabStyle,
|
|
570
567
|
layout,
|
|
571
|
-
navigationState,
|
|
572
|
-
onTabLongPress,
|
|
573
|
-
onTabPress,
|
|
574
|
-
position,
|
|
575
|
-
pressColor,
|
|
576
|
-
pressOpacity,
|
|
577
|
-
renderBadge,
|
|
578
|
-
renderIcon,
|
|
579
|
-
renderLabel,
|
|
580
|
-
renderTabBarItem,
|
|
581
568
|
routes,
|
|
582
569
|
scrollEnabled,
|
|
583
|
-
tabStyle,
|
|
584
|
-
contentContainerStyle,
|
|
585
570
|
tabWidths,
|
|
571
|
+
contentContainerStyle,
|
|
572
|
+
gap,
|
|
573
|
+
android_ripple,
|
|
574
|
+
renderTabBarItem,
|
|
575
|
+
onTabPress,
|
|
576
|
+
jumpTo,
|
|
577
|
+
onTabLongPress,
|
|
586
578
|
]
|
|
587
579
|
);
|
|
588
580
|
|