@zoverdoser/react-native-tab-view 1.0.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/LICENSE +21 -0
- package/README.md +5 -0
- package/lib/module/Pager.android.js +4 -0
- package/lib/module/Pager.android.js.map +1 -0
- package/lib/module/Pager.ios.js +4 -0
- package/lib/module/Pager.ios.js.map +1 -0
- package/lib/module/Pager.js +4 -0
- package/lib/module/Pager.js.map +1 -0
- package/lib/module/PagerViewAdapter.js +131 -0
- package/lib/module/PagerViewAdapter.js.map +1 -0
- package/lib/module/PanResponderAdapter.js +209 -0
- package/lib/module/PanResponderAdapter.js.map +1 -0
- package/lib/module/PlatformPressable.js +61 -0
- package/lib/module/PlatformPressable.js.map +1 -0
- package/lib/module/SceneMap.js +24 -0
- package/lib/module/SceneMap.js.map +1 -0
- package/lib/module/SceneView.js +72 -0
- package/lib/module/SceneView.js.map +1 -0
- package/lib/module/TabBar.js +470 -0
- package/lib/module/TabBar.js.map +1 -0
- package/lib/module/TabBarIndicator.js +122 -0
- package/lib/module/TabBarIndicator.js.map +1 -0
- package/lib/module/TabBarItem.js +209 -0
- package/lib/module/TabBarItem.js.map +1 -0
- package/lib/module/TabBarItemLabel.js +34 -0
- package/lib/module/TabBarItemLabel.js.map +1 -0
- package/lib/module/TabView.js +141 -0
- package/lib/module/TabView.js.map +1 -0
- package/lib/module/index.js +8 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/useAnimatedValue.js +12 -0
- package/lib/module/useAnimatedValue.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/Pager.android.d.ts +2 -0
- package/lib/typescript/src/Pager.android.d.ts.map +1 -0
- package/lib/typescript/src/Pager.d.ts +2 -0
- package/lib/typescript/src/Pager.d.ts.map +1 -0
- package/lib/typescript/src/Pager.ios.d.ts +2 -0
- package/lib/typescript/src/Pager.ios.d.ts.map +1 -0
- package/lib/typescript/src/PagerViewAdapter.d.ts +18 -0
- package/lib/typescript/src/PagerViewAdapter.d.ts.map +1 -0
- package/lib/typescript/src/PanResponderAdapter.d.ts +19 -0
- package/lib/typescript/src/PanResponderAdapter.d.ts.map +1 -0
- package/lib/typescript/src/PlatformPressable.d.ts +14 -0
- package/lib/typescript/src/PlatformPressable.d.ts.map +1 -0
- package/lib/typescript/src/SceneMap.d.ts +10 -0
- package/lib/typescript/src/SceneMap.d.ts.map +1 -0
- package/lib/typescript/src/SceneView.d.ts +16 -0
- package/lib/typescript/src/SceneView.d.ts.map +1 -0
- package/lib/typescript/src/TabBar.d.ts +31 -0
- package/lib/typescript/src/TabBar.d.ts.map +1 -0
- package/lib/typescript/src/TabBarIndicator.d.ts +15 -0
- package/lib/typescript/src/TabBarIndicator.d.ts.map +1 -0
- package/lib/typescript/src/TabBarItem.d.ts +18 -0
- package/lib/typescript/src/TabBarItem.d.ts.map +1 -0
- package/lib/typescript/src/TabBarItemLabel.d.ts +13 -0
- package/lib/typescript/src/TabBarItemLabel.d.ts.map +1 -0
- package/lib/typescript/src/TabView.d.ts +33 -0
- package/lib/typescript/src/TabView.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +11 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +76 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/useAnimatedValue.d.ts +3 -0
- package/lib/typescript/src/useAnimatedValue.d.ts.map +1 -0
- package/package.json +84 -0
- package/src/Pager.android.tsx +1 -0
- package/src/Pager.ios.tsx +1 -0
- package/src/Pager.tsx +1 -0
- package/src/PagerViewAdapter.tsx +186 -0
- package/src/PanResponderAdapter.tsx +344 -0
- package/src/PlatformPressable.tsx +91 -0
- package/src/SceneMap.tsx +30 -0
- package/src/SceneView.tsx +106 -0
- package/src/TabBar.tsx +725 -0
- package/src/TabBarIndicator.tsx +190 -0
- package/src/TabBarItem.tsx +301 -0
- package/src/TabBarItemLabel.tsx +50 -0
- package/src/TabView.tsx +198 -0
- package/src/index.tsx +16 -0
- package/src/types.tsx +94 -0
- package/src/useAnimatedValue.tsx +12 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Animated, Platform, StyleSheet, View } from 'react-native';
|
|
5
|
+
import { interpolateColor, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
|
|
6
|
+
import useLatestCallback from 'use-latest-callback';
|
|
7
|
+
import { PlatformPressable } from "./PlatformPressable.js";
|
|
8
|
+
import { TabBarItemLabel } from "./TabBarItemLabel.js";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const DEFAULT_ACTIVE_COLOR = 'rgba(255, 255, 255, 1)';
|
|
11
|
+
const DEFAULT_INACTIVE_COLOR = 'rgba(255, 255, 255, 0.7)';
|
|
12
|
+
const ICON_SIZE = 24;
|
|
13
|
+
const ANDROID_RIPPLE_DEFAULT = {
|
|
14
|
+
borderless: true
|
|
15
|
+
};
|
|
16
|
+
const TabBarItemInternal = ({
|
|
17
|
+
accessibilityLabel,
|
|
18
|
+
accessible,
|
|
19
|
+
label: customlabel,
|
|
20
|
+
testID,
|
|
21
|
+
onLongPress,
|
|
22
|
+
onPress,
|
|
23
|
+
isFocused,
|
|
24
|
+
position,
|
|
25
|
+
style,
|
|
26
|
+
labelStyle,
|
|
27
|
+
onLayout,
|
|
28
|
+
index: tabIndex,
|
|
29
|
+
pressColor,
|
|
30
|
+
pressOpacity,
|
|
31
|
+
defaultTabWidth,
|
|
32
|
+
icon: customIcon,
|
|
33
|
+
badge: customBadge,
|
|
34
|
+
href,
|
|
35
|
+
labelText,
|
|
36
|
+
routesLength,
|
|
37
|
+
android_ripple = ANDROID_RIPPLE_DEFAULT,
|
|
38
|
+
labelAllowFontScaling,
|
|
39
|
+
route,
|
|
40
|
+
animatedStyles
|
|
41
|
+
}) => {
|
|
42
|
+
const inputRange = React.useMemo(() => Array.from({
|
|
43
|
+
length: routesLength
|
|
44
|
+
}, (_, i) => i), [routesLength]);
|
|
45
|
+
const labelColorFromStyle = StyleSheet.flatten(labelStyle || {}).color;
|
|
46
|
+
const activeColor = animatedStyles?.color ? animatedStyles?.color[1] : typeof labelColorFromStyle === 'string' ? labelColorFromStyle : DEFAULT_ACTIVE_COLOR;
|
|
47
|
+
const inactiveColor = animatedStyles?.color ? animatedStyles?.color[0] : typeof labelColorFromStyle === 'string' ? labelColorFromStyle : DEFAULT_INACTIVE_COLOR;
|
|
48
|
+
const ReAnimatedProgress = useSharedValue(isFocused ? 1 : 0);
|
|
49
|
+
React.useEffect(() => {
|
|
50
|
+
const listenerId = position.addListener(({
|
|
51
|
+
value
|
|
52
|
+
}) => {
|
|
53
|
+
const progress = Math.abs(tabIndex - value) > 1 ? 0 : 1 - Math.abs(tabIndex - value);
|
|
54
|
+
ReAnimatedProgress.value = progress;
|
|
55
|
+
});
|
|
56
|
+
return () => {
|
|
57
|
+
position.removeListener(listenerId);
|
|
58
|
+
};
|
|
59
|
+
}, [position, ReAnimatedProgress, tabIndex, route.key]);
|
|
60
|
+
const ReAnimatedStyleRef = React.useRef(useAnimatedStyle(() => {
|
|
61
|
+
const color = interpolateColor(ReAnimatedProgress.value, [0, 1], [inactiveColor, activeColor]);
|
|
62
|
+
return {
|
|
63
|
+
color
|
|
64
|
+
};
|
|
65
|
+
}, [ReAnimatedProgress, activeColor, inactiveColor]));
|
|
66
|
+
const opacity = animatedStyles?.opacity ? position.interpolate({
|
|
67
|
+
inputRange: Array.from({
|
|
68
|
+
length: routesLength
|
|
69
|
+
}, (_, i) => i),
|
|
70
|
+
outputRange: inputRange.map(i => i === tabIndex ? animatedStyles.opacity[1] : animatedStyles.opacity[0]),
|
|
71
|
+
extrapolate: 'clamp'
|
|
72
|
+
}) : 1;
|
|
73
|
+
const scale = animatedStyles?.scale ? position.interpolate({
|
|
74
|
+
inputRange: Array.from({
|
|
75
|
+
length: routesLength
|
|
76
|
+
}, (_, i) => i),
|
|
77
|
+
outputRange: inputRange.map(i => i === tabIndex ? animatedStyles.scale[1] : animatedStyles.scale[0]),
|
|
78
|
+
extrapolate: 'clamp'
|
|
79
|
+
}) : 1;
|
|
80
|
+
const icon = React.useMemo(() => {
|
|
81
|
+
if (!customIcon) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
const iconEle = customIcon({
|
|
85
|
+
focused: isFocused,
|
|
86
|
+
color: ReAnimatedStyleRef.current.color,
|
|
87
|
+
size: ICON_SIZE,
|
|
88
|
+
route
|
|
89
|
+
});
|
|
90
|
+
return /*#__PURE__*/_jsx(View, {
|
|
91
|
+
style: styles.icon,
|
|
92
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
93
|
+
style: {
|
|
94
|
+
opacity
|
|
95
|
+
},
|
|
96
|
+
children: iconEle
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
}, [customIcon, route, isFocused, ReAnimatedStyleRef, opacity]);
|
|
100
|
+
const renderLabel = React.useCallback(() => customlabel ? customlabel({
|
|
101
|
+
focused: isFocused,
|
|
102
|
+
style: labelStyle,
|
|
103
|
+
animatedStyles: ReAnimatedStyleRef.current,
|
|
104
|
+
labelText,
|
|
105
|
+
allowFontScaling: labelAllowFontScaling,
|
|
106
|
+
route
|
|
107
|
+
}) : /*#__PURE__*/_jsx(TabBarItemLabel, {
|
|
108
|
+
icon: icon,
|
|
109
|
+
label: labelText,
|
|
110
|
+
style: labelStyle,
|
|
111
|
+
animatedStyles: ReAnimatedStyleRef.current,
|
|
112
|
+
labelAllowFontScaling: labelAllowFontScaling
|
|
113
|
+
}), [customlabel, labelStyle, labelText, labelAllowFontScaling, route, icon, isFocused, ReAnimatedStyleRef]);
|
|
114
|
+
const tabStyle = StyleSheet.flatten(style);
|
|
115
|
+
const isWidthSet = tabStyle?.width !== undefined;
|
|
116
|
+
const tabContainerStyle = isWidthSet ? null : {
|
|
117
|
+
width: defaultTabWidth
|
|
118
|
+
};
|
|
119
|
+
const ariaLabel = typeof accessibilityLabel !== 'undefined' ? accessibilityLabel : labelText;
|
|
120
|
+
return /*#__PURE__*/_jsx(PlatformPressable, {
|
|
121
|
+
android_ripple: android_ripple,
|
|
122
|
+
testID: testID,
|
|
123
|
+
accessible: accessible,
|
|
124
|
+
role: "tab",
|
|
125
|
+
"aria-label": ariaLabel,
|
|
126
|
+
"aria-selected": isFocused,
|
|
127
|
+
pressColor: pressColor,
|
|
128
|
+
pressOpacity: pressOpacity,
|
|
129
|
+
unstable_pressDelay: 0,
|
|
130
|
+
onLayout: onLayout,
|
|
131
|
+
onPress: onPress,
|
|
132
|
+
onLongPress: onLongPress,
|
|
133
|
+
href: href,
|
|
134
|
+
style: [styles.pressable, tabContainerStyle],
|
|
135
|
+
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
136
|
+
pointerEvents: "none",
|
|
137
|
+
style: [styles.item, tabStyle, {
|
|
138
|
+
opacity,
|
|
139
|
+
transform: [{
|
|
140
|
+
scale
|
|
141
|
+
}]
|
|
142
|
+
}],
|
|
143
|
+
children: [icon, /*#__PURE__*/_jsx(View, {
|
|
144
|
+
children: renderLabel()
|
|
145
|
+
}), customBadge != null ? /*#__PURE__*/_jsx(View, {
|
|
146
|
+
style: styles.badge,
|
|
147
|
+
children: customBadge({
|
|
148
|
+
route
|
|
149
|
+
})
|
|
150
|
+
}) : null]
|
|
151
|
+
})
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
const MemoizedTabBarItemInternal = /*#__PURE__*/React.memo(TabBarItemInternal);
|
|
155
|
+
export function TabBarItem(props) {
|
|
156
|
+
const {
|
|
157
|
+
onPress,
|
|
158
|
+
onLongPress,
|
|
159
|
+
onLayout,
|
|
160
|
+
navigationState,
|
|
161
|
+
route,
|
|
162
|
+
...rest
|
|
163
|
+
} = props;
|
|
164
|
+
const onPressLatest = useLatestCallback(onPress);
|
|
165
|
+
const onLongPressLatest = useLatestCallback(onLongPress);
|
|
166
|
+
const onLayoutLatest = useLatestCallback(onLayout ? onLayout : () => {});
|
|
167
|
+
const tabIndex = navigationState.routes.indexOf(route);
|
|
168
|
+
return /*#__PURE__*/_jsx(MemoizedTabBarItemInternal, {
|
|
169
|
+
...rest,
|
|
170
|
+
onPress: onPressLatest,
|
|
171
|
+
onLayout: onLayoutLatest,
|
|
172
|
+
onLongPress: onLongPressLatest,
|
|
173
|
+
isFocused: navigationState.index === tabIndex,
|
|
174
|
+
route: route,
|
|
175
|
+
index: tabIndex,
|
|
176
|
+
routesLength: navigationState.routes.length
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
const styles = StyleSheet.create({
|
|
180
|
+
icon: {
|
|
181
|
+
margin: 2
|
|
182
|
+
},
|
|
183
|
+
item: {
|
|
184
|
+
flex: 1,
|
|
185
|
+
alignItems: 'center',
|
|
186
|
+
justifyContent: 'center',
|
|
187
|
+
padding: 10,
|
|
188
|
+
minHeight: 48
|
|
189
|
+
},
|
|
190
|
+
badge: {
|
|
191
|
+
position: 'absolute',
|
|
192
|
+
top: 0,
|
|
193
|
+
end: 0
|
|
194
|
+
},
|
|
195
|
+
pressable: {
|
|
196
|
+
// The label is not pressable on Windows
|
|
197
|
+
// Adding backgroundColor: 'transparent' seems to fix it
|
|
198
|
+
backgroundColor: 'transparent',
|
|
199
|
+
...Platform.select({
|
|
200
|
+
// Roundness for iPad hover effect
|
|
201
|
+
ios: {
|
|
202
|
+
borderRadius: 10,
|
|
203
|
+
borderCurve: 'continuous'
|
|
204
|
+
},
|
|
205
|
+
default: null
|
|
206
|
+
})
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
//# sourceMappingURL=TabBarItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Animated","Platform","StyleSheet","View","interpolateColor","useAnimatedStyle","useSharedValue","useLatestCallback","PlatformPressable","TabBarItemLabel","jsx","_jsx","jsxs","_jsxs","DEFAULT_ACTIVE_COLOR","DEFAULT_INACTIVE_COLOR","ICON_SIZE","ANDROID_RIPPLE_DEFAULT","borderless","TabBarItemInternal","accessibilityLabel","accessible","label","customlabel","testID","onLongPress","onPress","isFocused","position","style","labelStyle","onLayout","index","tabIndex","pressColor","pressOpacity","defaultTabWidth","icon","customIcon","badge","customBadge","href","labelText","routesLength","android_ripple","labelAllowFontScaling","route","animatedStyles","inputRange","useMemo","Array","from","length","_","i","labelColorFromStyle","flatten","color","activeColor","inactiveColor","ReAnimatedProgress","useEffect","listenerId","addListener","value","progress","Math","abs","removeListener","key","ReAnimatedStyleRef","useRef","opacity","interpolate","outputRange","map","extrapolate","scale","iconEle","focused","current","size","styles","children","renderLabel","useCallback","allowFontScaling","tabStyle","isWidthSet","width","undefined","tabContainerStyle","ariaLabel","role","unstable_pressDelay","pressable","pointerEvents","item","transform","MemoizedTabBarItemInternal","memo","TabBarItem","props","navigationState","rest","onPressLatest","onLongPressLatest","onLayoutLatest","routes","indexOf","create","margin","flex","alignItems","justifyContent","padding","minHeight","top","end","backgroundColor","select","ios","borderRadius","borderCurve","default"],"sourceRoot":"../../src","sources":["TabBarItem.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EAERC,QAAQ,EAGRC,UAAU,EACVC,IAAI,QAEC,cAAc;AACrB,SACEC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,QACT,yBAAyB;AAChC,OAAOC,iBAAiB,MAAM,qBAAqB;AAEnD,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,eAAe,QAAQ,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAuBpD,MAAMC,oBAAoB,GAAG,wBAAwB;AACrD,MAAMC,sBAAsB,GAAG,0BAA0B;AACzD,MAAMC,SAAS,GAAG,EAAE;AAgBpB,MAAMC,sBAAsB,GAAG;E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EA,KAAM;IACbd,KAAK,EAAEC,QAAS;IAChBU,YAAY,EAAE4D,eAAe,CAACK,MAAM,CAACxD;EAAO,CAC7C,CAAC;AAEN;AAEA,MAAM8B,MAAM,GAAGhF,UAAU,CAAC4G,MAAM,CAAC;EAC/BzE,IAAI,EAAE;IACJ0E,MAAM,EAAE;EACV,CAAC;EACDd,IAAI,EAAE;IACJe,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,OAAO,EAAE,EAAE;IACXC,SAAS,EAAE;EACb,CAAC;EACD7E,KAAK,EAAE;IACLX,QAAQ,EAAE,UAAU;IACpByF,GAAG,EAAE,CAAC;IACNC,GAAG,EAAE;EACP,CAAC;EACDvB,SAAS,EAAE;IACT;IACA;IACAwB,eAAe,EAAE,aAAa;IAC9B,GAAGtH,QAAQ,CAACuH,MAAM,CAAC;MACjB;MACAC,GAAG,EAAE;QACHC,YAAY,EAAE,EAAE;QAChBC,WAAW,EAAE;MACf,CAAC;MACDC,OAAO,EAAE;IACX,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
|
+
import Animated from 'react-native-reanimated';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const TabBarItemLabel = /*#__PURE__*/React.memo(({
|
|
8
|
+
label,
|
|
9
|
+
style,
|
|
10
|
+
animatedStyles,
|
|
11
|
+
icon,
|
|
12
|
+
labelAllowFontScaling
|
|
13
|
+
}) => {
|
|
14
|
+
if (!label) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return /*#__PURE__*/_jsx(Animated.Text, {
|
|
18
|
+
style: [styles.label, icon ? {
|
|
19
|
+
marginTop: 0
|
|
20
|
+
} : undefined, style, animatedStyles],
|
|
21
|
+
allowFontScaling: labelAllowFontScaling,
|
|
22
|
+
children: label
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
TabBarItemLabel.displayName = 'TabBarItemLabel';
|
|
26
|
+
const styles = StyleSheet.create({
|
|
27
|
+
label: {
|
|
28
|
+
margin: 4,
|
|
29
|
+
fontSize: 14,
|
|
30
|
+
fontWeight: '500',
|
|
31
|
+
backgroundColor: 'transparent'
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=TabBarItemLabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","Animated","jsx","_jsx","TabBarItemLabel","memo","label","style","animatedStyles","icon","labelAllowFontScaling","Text","styles","marginTop","undefined","allowFontScaling","children","displayName","create","margin","fontSize","fontWeight","backgroundColor"],"sourceRoot":"../../src","sources":["TabBarItemLabel.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,MAA8B,yBAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASvE,OAAO,MAAMC,eAAe,gBAAGL,KAAK,CAACM,IAAI,CACvC,CAAC;EACCC,KAAK;EACLC,KAAK;EACLC,cAAc;EACdC,IAAI;EACJC;AACoB,CAAC,KAAK;EAC1B,IAAI,CAACJ,KAAK,EAAE;IACV,OAAO,IAAI;EACb;EAEA,oBACEH,IAAA,CAACF,QAAQ,CAACU,IAAI;IACZJ,KAAK,EAAE,CACLK,MAAM,CAACN,KAAK,EACZG,IAAI,GAAG;MAAEI,SAAS,EAAE;IAAE,CAAC,GAAGC,SAAS,EACnCP,KAAK,EACLC,cAAc,CACd;IACFO,gBAAgB,EAAEL,qBAAsB;IAAAM,QAAA,EAEvCV;EAAK,CACO,CAAC;AAEpB,CACF,CAAC;AAEDF,eAAe,CAACa,WAAW,GAAG,iBAAiB;AAE/C,MAAML,MAAM,GAAGZ,UAAU,CAACkB,MAAM,CAAC;EAC/BZ,KAAK,EAAE;IACLa,MAAM,EAAE,CAAC;IACTC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { I18nManager, Platform, StyleSheet, View } from 'react-native';
|
|
5
|
+
import { Pager } from './Pager';
|
|
6
|
+
import { SceneView } from "./SceneView.js";
|
|
7
|
+
import { TabBar } from "./TabBar.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
const renderLazyPlaceholderDefault = () => null;
|
|
10
|
+
export function TabView({
|
|
11
|
+
onIndexChange,
|
|
12
|
+
onTabSelect,
|
|
13
|
+
navigationState,
|
|
14
|
+
renderScene,
|
|
15
|
+
initialLayout,
|
|
16
|
+
keyboardDismissMode = 'auto',
|
|
17
|
+
lazy = false,
|
|
18
|
+
lazyPreloadDistance = 0,
|
|
19
|
+
onSwipeStart,
|
|
20
|
+
onSwipeEnd,
|
|
21
|
+
renderLazyPlaceholder = renderLazyPlaceholderDefault,
|
|
22
|
+
// eslint-disable-next-line @eslint-react/no-unstable-default-props
|
|
23
|
+
renderTabBar = props => /*#__PURE__*/_jsx(TabBar, {
|
|
24
|
+
...props
|
|
25
|
+
}),
|
|
26
|
+
pagerStyle,
|
|
27
|
+
style,
|
|
28
|
+
direction = I18nManager.getConstants().isRTL ? 'rtl' : 'ltr',
|
|
29
|
+
swipeEnabled = true,
|
|
30
|
+
tabBarPosition = 'top',
|
|
31
|
+
animationEnabled = true,
|
|
32
|
+
overScrollMode,
|
|
33
|
+
options: sceneOptions,
|
|
34
|
+
commonOptions
|
|
35
|
+
}) {
|
|
36
|
+
if (Platform.OS !== 'web' && direction !== (I18nManager.getConstants().isRTL ? 'rtl' : 'ltr')) {
|
|
37
|
+
console.warn(`The 'direction' prop is set to '${direction}' but the effective value is '${I18nManager.getConstants().isRTL ? 'rtl' : 'ltr'}'. This is not supported. Make sure to match the 'direction' prop with the writing direction of the app.`);
|
|
38
|
+
}
|
|
39
|
+
const [layout, setLayout] = React.useState({
|
|
40
|
+
width: 0,
|
|
41
|
+
height: 0,
|
|
42
|
+
...initialLayout
|
|
43
|
+
});
|
|
44
|
+
const jumpToIndex = index => {
|
|
45
|
+
if (index !== navigationState.index) {
|
|
46
|
+
onIndexChange(index);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const handleLayout = e => {
|
|
50
|
+
const {
|
|
51
|
+
height,
|
|
52
|
+
width
|
|
53
|
+
} = e.nativeEvent.layout;
|
|
54
|
+
setLayout(prevLayout => {
|
|
55
|
+
if (prevLayout.width === width && prevLayout.height === height) {
|
|
56
|
+
return prevLayout;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
height,
|
|
60
|
+
width
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
const options = Object.fromEntries(navigationState.routes.map(route => [route.key, {
|
|
65
|
+
...commonOptions,
|
|
66
|
+
...sceneOptions?.[route.key]
|
|
67
|
+
}]));
|
|
68
|
+
return /*#__PURE__*/_jsx(View, {
|
|
69
|
+
onLayout: handleLayout,
|
|
70
|
+
style: [styles.pager, style],
|
|
71
|
+
children: /*#__PURE__*/_jsx(Pager, {
|
|
72
|
+
layout: layout,
|
|
73
|
+
navigationState: navigationState,
|
|
74
|
+
keyboardDismissMode: keyboardDismissMode,
|
|
75
|
+
swipeEnabled: swipeEnabled,
|
|
76
|
+
onSwipeStart: onSwipeStart,
|
|
77
|
+
onSwipeEnd: onSwipeEnd,
|
|
78
|
+
onIndexChange: jumpToIndex,
|
|
79
|
+
onTabSelect: onTabSelect,
|
|
80
|
+
animationEnabled: animationEnabled,
|
|
81
|
+
overScrollMode: overScrollMode,
|
|
82
|
+
style: pagerStyle,
|
|
83
|
+
layoutDirection: direction,
|
|
84
|
+
children: ({
|
|
85
|
+
position,
|
|
86
|
+
render,
|
|
87
|
+
addEnterListener,
|
|
88
|
+
jumpTo
|
|
89
|
+
}) => {
|
|
90
|
+
// All the props here must not change between re-renders
|
|
91
|
+
// This is crucial to optimizing the routes with PureComponent
|
|
92
|
+
const sceneRendererProps = {
|
|
93
|
+
position,
|
|
94
|
+
layout,
|
|
95
|
+
jumpTo
|
|
96
|
+
};
|
|
97
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
98
|
+
children: [tabBarPosition === 'top' && renderTabBar({
|
|
99
|
+
...sceneRendererProps,
|
|
100
|
+
options,
|
|
101
|
+
navigationState
|
|
102
|
+
}), render(navigationState.routes.map((route, i) => {
|
|
103
|
+
const {
|
|
104
|
+
sceneStyle
|
|
105
|
+
} = options?.[route.key] ?? {};
|
|
106
|
+
return /*#__PURE__*/_jsx(SceneView, {
|
|
107
|
+
...sceneRendererProps,
|
|
108
|
+
addEnterListener: addEnterListener,
|
|
109
|
+
index: i,
|
|
110
|
+
lazy: typeof lazy === 'function' ? lazy({
|
|
111
|
+
route
|
|
112
|
+
}) : lazy,
|
|
113
|
+
lazyPreloadDistance: lazyPreloadDistance,
|
|
114
|
+
navigationState: navigationState,
|
|
115
|
+
style: sceneStyle,
|
|
116
|
+
children: ({
|
|
117
|
+
loading
|
|
118
|
+
}) => loading ? renderLazyPlaceholder({
|
|
119
|
+
route
|
|
120
|
+
}) : renderScene({
|
|
121
|
+
...sceneRendererProps,
|
|
122
|
+
route
|
|
123
|
+
})
|
|
124
|
+
}, route.key);
|
|
125
|
+
})), tabBarPosition === 'bottom' && renderTabBar({
|
|
126
|
+
...sceneRendererProps,
|
|
127
|
+
options,
|
|
128
|
+
navigationState
|
|
129
|
+
})]
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
const styles = StyleSheet.create({
|
|
136
|
+
pager: {
|
|
137
|
+
flex: 1,
|
|
138
|
+
overflow: 'hidden'
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
//# sourceMappingURL=TabView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","I18nManager","Platform","StyleSheet","View","Pager","SceneView","TabBar","jsx","_jsx","jsxs","_jsxs","renderLazyPlaceholderDefault","TabView","onIndexChange","onTabSelect","navigationState","renderScene","initialLayout","keyboardDismissMode","lazy","lazyPreloadDistance","onSwipeStart","onSwipeEnd","renderLazyPlaceholder","renderTabBar","props","pagerStyle","style","direction","getConstants","isRTL","swipeEnabled","tabBarPosition","animationEnabled","overScrollMode","options","sceneOptions","commonOptions","OS","console","warn","layout","setLayout","useState","width","height","jumpToIndex","index","handleLayout","e","nativeEvent","prevLayout","Object","fromEntries","routes","map","route","key","onLayout","styles","pager","children","layoutDirection","position","render","addEnterListener","jumpTo","sceneRendererProps","Fragment","i","sceneStyle","loading","create","flex","overflow"],"sourceRoot":"../../src","sources":["TabView.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,WAAW,EAEXC,QAAQ,EAERC,UAAU,EACVC,IAAI,QAEC,cAAc;AAErB,SAASC,KAAK,QAAQ,SAAS;AAC/B,SAASC,SAAS,QAAQ,gBAAa;AACvC,SAASC,MAAM,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAkClC,MAAMC,4BAA4B,GAAGA,CAAA,KAAM,IAAI;AAE/C,OAAO,SAASC,OAAOA,CAAkB;EACvCC,aAAa;EACbC,WAAW;EACXC,eAAe;EACfC,WAAW;EACXC,aAAa;EACbC,mBAAmB,GAAG,MAAM;EAC5BC,IAAI,GAAG,KAAK;EACZC,mBAAmB,GAAG,CAAC;EACvBC,YAAY;EACZC,UAAU;EACVC,qBAAqB,GAAGZ,4BAA4B;EACpD;EACAa,YAAY,GAAIC,KAAK,iBAAKjB,IAAA,CA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ACC,GAAG,CAAC,IAAI,CAAC,CAAC;YAEjD,oBACEjD,IAAA,CAACH,SAAS;cAAA,GAEJ8D,kBAAkB;cACtBF,gBAAgB,EAAEA,gBAAiB;cACnClB,KAAK,EAAEsB,CAAE;cACTlD,IAAI,EAAE,OAAOA,IAAI,KAAK,UAAU,GAAGA,IAAI,CAAC;gBAAEqC;cAAM,CAAC,CAAC,GAAGrC,IAAK;cAC1DC,mBAAmB,EAAEA,mBAAoB;cACzCL,eAAe,EAAEA,eAAgB;cACjCY,KAAK,EAAE2C,UAAW;cAAAT,QAAA,EAEjBA,CAAC;gBAAEU;cAAQ,CAAC,KACXA,OAAO,GACHhD,qBAAqB,CAAC;gBAAEiC;cAAM,CAAC,CAAC,GAChCxC,WAAW,CAAC;gBACV,GAAGmD,kBAAkB;gBACrBX;cACF,CAAC;YAAC,GAfHA,KAAK,CAACC,GAiBF,CAAC;UAEhB,CAAC,CACH,CAAC,EACAzB,cAAc,KAAK,QAAQ,IAC1BR,YAAY,CAAC;YACX,GAAG2C,kBAAkB;YACrBhC,OAAO;YACPpB;UACF,CAAC,CAAC;QAAA,CACU,CAAC;MAErB;IAAC,CACI;EAAC,CACJ,CAAC;AAEX;AAEA,MAAM4C,MAAM,GAAGzD,UAAU,CAACsE,MAAM,CAAC;EAC/BZ,KAAK,EAAE;IACLa,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export { SceneMap } from "./SceneMap.js";
|
|
4
|
+
export { TabBar } from "./TabBar.js";
|
|
5
|
+
export { TabBarIndicator } from "./TabBarIndicator.js";
|
|
6
|
+
export { TabBarItem } from "./TabBarItem.js";
|
|
7
|
+
export { TabView } from "./TabView.js";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SceneMap","TabBar","TabBarIndicator","TabBarItem","TabView"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,eAAY;AAErC,SAASC,MAAM,QAAQ,aAAU;AAEjC,SAASC,eAAe,QAAQ,sBAAmB;AAEnD,SAASC,UAAU,QAAQ,iBAAc;AAEzC,SAASC,OAAO,QAAQ,cAAW","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Animated } from 'react-native';
|
|
5
|
+
export function useAnimatedValue(initialValue) {
|
|
6
|
+
const lazyRef = React.useRef(undefined);
|
|
7
|
+
if (lazyRef.current === undefined) {
|
|
8
|
+
lazyRef.current = new Animated.Value(initialValue);
|
|
9
|
+
}
|
|
10
|
+
return lazyRef.current;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=useAnimatedValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Animated","useAnimatedValue","initialValue","lazyRef","useRef","undefined","current","Value"],"sourceRoot":"../../src","sources":["useAnimatedValue.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,cAAc;AAEvC,OAAO,SAASC,gBAAgBA,CAACC,YAAoB,EAAE;EACrD,MAAMC,OAAO,GAAGJ,KAAK,CAACK,MAAM,CAAiBC,SAAS,CAAC;EAEvD,IAAIF,OAAO,CAACG,OAAO,KAAKD,SAAS,EAAE;IACjCF,OAAO,CAACG,OAAO,GAAG,IAAIN,QAAQ,CAACO,KAAK,CAACL,YAAY,CAAC;EACpD;EAEA,OAAOC,OAAO,CAACG,OAAO;AACxB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pager.android.d.ts","sourceRoot":"","sources":["../../../src/Pager.android.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pager.d.ts","sourceRoot":"","sources":["../../../src/Pager.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,IAAI,KAAK,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pager.ios.d.ts","sourceRoot":"","sources":["../../../src/Pager.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Animated } from 'react-native';
|
|
3
|
+
import type { EventEmitterProps, NavigationState, PagerProps, Route } from './types';
|
|
4
|
+
type Props<T extends Route> = PagerProps & {
|
|
5
|
+
onIndexChange: (index: number) => void;
|
|
6
|
+
onTabSelect?: (props: {
|
|
7
|
+
index: number;
|
|
8
|
+
}) => void;
|
|
9
|
+
navigationState: NavigationState<T>;
|
|
10
|
+
children: (props: EventEmitterProps & {
|
|
11
|
+
position: Animated.AnimatedInterpolation<number>;
|
|
12
|
+
render: (children: React.ReactNode) => React.ReactNode;
|
|
13
|
+
jumpTo: (key: string) => void;
|
|
14
|
+
}) => React.ReactElement;
|
|
15
|
+
};
|
|
16
|
+
export declare function PagerViewAdapter<T extends Route>({ keyboardDismissMode, swipeEnabled, navigationState, onIndexChange, onTabSelect, onSwipeStart, onSwipeEnd, children, style, animationEnabled, ...rest }: Props<T>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=PagerViewAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PagerViewAdapter.d.ts","sourceRoot":"","sources":["../../../src/PagerViewAdapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAkC,MAAM,cAAc,CAAC;AAMxE,OAAO,KAAK,EACV,iBAAiB,EAEjB,eAAe,EACf,UAAU,EACV,KAAK,EACN,MAAM,SAAS,CAAC;AAKjB,KAAK,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI,UAAU,GAAG;IACzC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACjD,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;AAIF,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,KAAK,EAAE,EAChD,mBAA4B,EAC5B,YAAmB,EACnB,eAAe,EACf,aAAa,EACb,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,KAAK,EACL,gBAAgB,EAChB,GAAG,IAAI,EACR,EAAE,KAAK,CAAC,CAAC,CAAC,0EAgIV"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Animated } from 'react-native';
|
|
3
|
+
import type { EventEmitterProps, Layout, NavigationState, PagerProps, Route } from './types';
|
|
4
|
+
type Props<T extends Route> = PagerProps & {
|
|
5
|
+
layout: Layout;
|
|
6
|
+
onIndexChange: (index: number) => void;
|
|
7
|
+
onTabSelect?: (props: {
|
|
8
|
+
index: number;
|
|
9
|
+
}) => void;
|
|
10
|
+
navigationState: NavigationState<T>;
|
|
11
|
+
children: (props: EventEmitterProps & {
|
|
12
|
+
position: Animated.AnimatedInterpolation<number>;
|
|
13
|
+
render: (children: React.ReactNode) => React.ReactNode;
|
|
14
|
+
jumpTo: (key: string) => void;
|
|
15
|
+
}) => React.ReactElement;
|
|
16
|
+
};
|
|
17
|
+
export declare function PanResponderAdapter<T extends Route>({ layout, keyboardDismissMode, swipeEnabled, navigationState, onIndexChange, onTabSelect, onSwipeStart, onSwipeEnd, children, style, animationEnabled, layoutDirection, }: Props<T>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=PanResponderAdapter.d.ts.map
|
|
@@ -0,0 +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,EAOT,MAAM,cAAc,CAAC;AAGtB,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,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACjD,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,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,KAAK,EACL,gBAAwB,EACxB,eAAuB,GACxB,EAAE,KAAK,CAAC,CAAC,CAAC,0EA8QV"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type GestureResponderEvent, type PressableProps } from 'react-native';
|
|
3
|
+
export type Props = Omit<PressableProps, 'onPress'> & {
|
|
4
|
+
href?: string;
|
|
5
|
+
pressColor?: string;
|
|
6
|
+
pressOpacity?: number;
|
|
7
|
+
onPress?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => void;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* PlatformPressable provides an abstraction on top of Pressable to handle platform differences.
|
|
12
|
+
*/
|
|
13
|
+
export declare function PlatformPressable({ disabled, android_ripple, pressColor, pressOpacity, style, onPress, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=PlatformPressable.d.ts.map
|
|
@@ -0,0 +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,EACL,KAAK,qBAAqB,EAG1B,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,GAAG;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,CACR,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,qBAAqB,KACvE,IAAI,CAAC;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAMF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,cAAc,EACd,UAAiC,EACjC,YAAY,EACZ,KAAK,EACL,OAAO,EACP,GAAG,IAAI,EACR,EAAE,KAAK,2CAyDP"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { SceneRendererProps } from './types';
|
|
3
|
+
type SceneProps = {
|
|
4
|
+
route: any;
|
|
5
|
+
} & Omit<SceneRendererProps, 'layout'>;
|
|
6
|
+
export declare function SceneMap<T>(scenes: {
|
|
7
|
+
[key: string]: React.ComponentType<T>;
|
|
8
|
+
}): ({ route, jumpTo, position }: SceneProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=SceneMap.d.ts.map
|
|
@@ -0,0 +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;AAavC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;CAAE,IACnE,6BAA6B,UAAU,6CAShD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { EventEmitterProps, NavigationState, Route, SceneRendererProps } from './types';
|
|
4
|
+
type Props<T extends Route> = SceneRendererProps & EventEmitterProps & {
|
|
5
|
+
navigationState: NavigationState<T>;
|
|
6
|
+
lazy: boolean;
|
|
7
|
+
lazyPreloadDistance: number;
|
|
8
|
+
index: number;
|
|
9
|
+
children: (props: {
|
|
10
|
+
loading: boolean;
|
|
11
|
+
}) => React.ReactNode;
|
|
12
|
+
style?: StyleProp<ViewStyle>;
|
|
13
|
+
};
|
|
14
|
+
export declare function SceneView<T extends Route>({ children, navigationState, lazy, layout, index, lazyPreloadDistance, addEnterListener, style, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=SceneView.d.ts.map
|
|
@@ -0,0 +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,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,2CAqEV"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type PressableAndroidRippleConfig, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import { type Props as IndicatorProps } from './TabBarIndicator';
|
|
4
|
+
import { type Props as TabBarItemProps } from './TabBarItem';
|
|
5
|
+
import type { AnimatedStyles, Event, LocaleDirection, NavigationState, Route, Scene, SceneRendererProps, TabDescriptor } from './types';
|
|
6
|
+
export type Props<T extends Route> = SceneRendererProps & {
|
|
7
|
+
navigationState: NavigationState<T>;
|
|
8
|
+
scrollEnabled?: boolean;
|
|
9
|
+
bounces?: boolean;
|
|
10
|
+
pressColor?: string;
|
|
11
|
+
pressOpacity?: number;
|
|
12
|
+
options?: Record<string, TabDescriptor<T>>;
|
|
13
|
+
renderIndicator?: (props: IndicatorProps<T>) => React.ReactNode;
|
|
14
|
+
renderTabBarItem?: (props: TabBarItemProps<T> & {
|
|
15
|
+
key: string;
|
|
16
|
+
}) => React.ReactElement;
|
|
17
|
+
onTabPress?: (scene: Scene<T> & Event) => void;
|
|
18
|
+
onTabLongPress?: (scene: Scene<T>) => void;
|
|
19
|
+
tabStyle?: StyleProp<ViewStyle>;
|
|
20
|
+
indicatorStyle?: StyleProp<ViewStyle>;
|
|
21
|
+
indicatorContainerStyle?: StyleProp<ViewStyle>;
|
|
22
|
+
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
23
|
+
style?: StyleProp<ViewStyle>;
|
|
24
|
+
direction?: LocaleDirection;
|
|
25
|
+
gap?: number;
|
|
26
|
+
testID?: string;
|
|
27
|
+
android_ripple?: PressableAndroidRippleConfig;
|
|
28
|
+
animatedStyles?: AnimatedStyles;
|
|
29
|
+
};
|
|
30
|
+
export declare function TabBar<T extends Route>({ renderIndicator, gap, scrollEnabled, jumpTo, navigationState, position, bounces, contentContainerStyle, indicatorContainerStyle, indicatorStyle, onTabLongPress, onTabPress, pressColor, pressOpacity, direction, renderTabBarItem, style, tabStyle, layout: propLayout, testID, android_ripple, options, animatedStyles, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=TabBar.d.ts.map
|
|
@@ -0,0 +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,EAGd,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,cAAc,EACd,KAAK,EAEL,eAAe,EACf,eAAe,EACf,KAAK,EACL,KAAK,EACL,kBAAkB,EAClB,aAAa,EACd,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI,kBAAkB,GAAG;IACxD,eAAe,EAAE,eAAe,CAAC,C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