react-native-tab-view 4.0.0-alpha.0 → 4.0.0-alpha.10
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 +4 -4
- package/lib/commonjs/PanResponderAdapter.js.map +1 -1
- package/lib/commonjs/PlatformPressable.js +24 -3
- 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 +112 -97
- package/lib/commonjs/TabBar.js.map +1 -1
- package/lib/commonjs/TabBarIndicator.js +21 -16
- package/lib/commonjs/TabBarIndicator.js.map +1 -1
- package/lib/commonjs/TabBarItem.js +58 -80
- package/lib/commonjs/TabBarItem.js.map +1 -1
- package/lib/commonjs/TabBarItemLabel.js +4 -4
- package/lib/commonjs/TabBarItemLabel.js.map +1 -1
- package/lib/commonjs/TabView.js +3 -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 +2 -2
- package/lib/module/PanResponderAdapter.js.map +1 -1
- package/lib/module/PlatformPressable.js +22 -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 +110 -95
- package/lib/module/TabBar.js.map +1 -1
- package/lib/module/TabBarIndicator.js +19 -14
- package/lib/module/TabBarIndicator.js.map +1 -1
- package/lib/module/TabBarItem.js +56 -78
- 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/module/TabView.js +1 -1
- 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/PlatformPressable.d.ts +4 -3
- 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 +7 -18
- package/lib/typescript/src/TabBar.d.ts.map +1 -1
- package/lib/typescript/src/TabBarIndicator.d.ts +3 -3
- package/lib/typescript/src/TabBarIndicator.d.ts.map +1 -1
- package/lib/typescript/src/TabBarItem.d.ts +4 -19
- 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 -5
- 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 +25 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/PagerViewAdapter.tsx +2 -2
- package/src/PanResponderAdapter.tsx +4 -4
- package/src/PlatformPressable.tsx +31 -2
- package/src/SceneMap.tsx +1 -3
- package/src/SceneView.tsx +4 -4
- package/src/TabBar.tsx +178 -179
- package/src/TabBarIndicator.tsx +22 -14
- package/src/TabBarItem.tsx +92 -118
- package/src/TabBarItemLabel.tsx +2 -1
- package/src/TabView.tsx +5 -5
- package/src/index.tsx +6 -1
- package/src/types.tsx +25 -1
|
@@ -72,21 +72,26 @@ export function TabBarIndicator(_ref) {
|
|
|
72
72
|
translateX: direction === 'rtl' ? -0.5 : 0.5
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
const styleList = [];
|
|
76
|
+
|
|
77
|
+
// scaleX doesn't work properly on chrome and opera for linux and android
|
|
78
|
+
if (Platform.OS === 'web' && width === 'auto') {
|
|
79
|
+
styleList.push({
|
|
80
|
+
width: transform[1].scaleX
|
|
81
|
+
}, {
|
|
82
|
+
left: transform[0].translateX
|
|
83
|
+
});
|
|
84
|
+
} else {
|
|
85
|
+
styleList.push({
|
|
77
86
|
width: width === 'auto' ? 1 : width
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
// This avoids rendering delay until we are able to calculate translateX
|
|
81
|
-
// If platform is macos use `left` property as `transform` is broken at the moment.
|
|
82
|
-
// See: https://github.com/microsoft/react-native-macos/issues/280
|
|
83
|
-
layout.width && Platform.OS !== 'macos' ? {
|
|
84
|
-
left: 0
|
|
85
|
-
} : {
|
|
86
|
-
left: `${100 / routes.length * navigationState.index}%`
|
|
87
|
+
}, {
|
|
88
|
+
start: `${100 / routes.length * navigationState.index}%`
|
|
87
89
|
}, {
|
|
88
90
|
transform
|
|
89
|
-
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
94
|
+
style: [styles.indicator, styleList, width === 'auto' ? {
|
|
90
95
|
opacity: opacity
|
|
91
96
|
} : null, style]
|
|
92
97
|
}, children);
|
|
@@ -95,9 +100,9 @@ const styles = StyleSheet.create({
|
|
|
95
100
|
indicator: {
|
|
96
101
|
backgroundColor: '#ffeb3b',
|
|
97
102
|
position: 'absolute',
|
|
98
|
-
|
|
103
|
+
start: 0,
|
|
99
104
|
bottom: 0,
|
|
100
|
-
|
|
105
|
+
end: 0,
|
|
101
106
|
height: 2
|
|
102
107
|
}
|
|
103
108
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","Easing","Platform","StyleSheet","useAnimatedValue","getTranslateX","position","routes","getTabWidth","direction","gap","inputRange","map","_","i","outputRange","reduce","acc","translateX","interpolate","extrapolate","multiply","TabBarIndicator","layout","navigationState","width","style","children","isIndicatorShown","useRef","isWidthDynamic","opacity","indicatorVisible","slice","index","every","r","useEffect","fadeInIndicator","current","timing","toValue","duration","easing","in","linear","useNativeDriver","start","stopAnimation","transform","length","push","scaleX","
|
|
1
|
+
{"version":3,"names":["React","Animated","Easing","Platform","StyleSheet","useAnimatedValue","getTranslateX","position","routes","getTabWidth","direction","gap","inputRange","map","_","i","outputRange","reduce","acc","translateX","interpolate","extrapolate","multiply","TabBarIndicator","_ref","layout","navigationState","width","style","children","isIndicatorShown","useRef","isWidthDynamic","opacity","indicatorVisible","slice","index","every","r","useEffect","fadeInIndicator","current","timing","toValue","duration","easing","in","linear","useNativeDriver","start","stopAnimation","transform","length","push","scaleX","styleList","OS","left","createElement","View","styles","indicator","create","backgroundColor","bottom","end","height"],"sourceRoot":"../../src","sources":["TabBarIndicator.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,MAAM,EACNC,QAAQ,EAERC,UAAU,QAEL,cAAc;AAQrB,SAASC,gBAAgB,QAAQ,oBAAoB;AAcrD,MAAMC,aAAa,GAAGA,CACpBC,QAAgD,EAChDC,MAAe,EACfC,WAAwB,EACxBC,SAA0B,EAC1BC,GAAY,KACT;EACH,MAAMC,UAAU,GAAGJ,MAAM,CAACK,GAAG,CAAC,CAACC,CAAC,EAAEC,CAAC,KA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AAE;EACV;AACF,CAAC,CAAC"}
|
package/lib/module/TabBarItem.js
CHANGED
|
@@ -6,6 +6,7 @@ import { PlatformPressable } from './PlatformPressable';
|
|
|
6
6
|
import { TabBarItemLabel } from './TabBarItemLabel';
|
|
7
7
|
const DEFAULT_ACTIVE_COLOR = 'rgba(255, 255, 255, 1)';
|
|
8
8
|
const DEFAULT_INACTIVE_COLOR = 'rgba(255, 255, 255, 0.7)';
|
|
9
|
+
const ICON_SIZE = 24;
|
|
9
10
|
const getActiveOpacity = (position, routesLength, tabIndex) => {
|
|
10
11
|
if (routesLength > 1) {
|
|
11
12
|
const inputRange = Array.from({
|
|
@@ -36,13 +37,12 @@ const TabBarItemInternal = _ref => {
|
|
|
36
37
|
let {
|
|
37
38
|
accessibilityLabel,
|
|
38
39
|
accessible,
|
|
39
|
-
label:
|
|
40
|
+
label: customlabel,
|
|
40
41
|
testID,
|
|
41
42
|
onLongPress,
|
|
42
43
|
onPress,
|
|
43
44
|
isFocused,
|
|
44
45
|
position,
|
|
45
|
-
route,
|
|
46
46
|
style,
|
|
47
47
|
inactiveColor: inactiveColorCustom,
|
|
48
48
|
activeColor: activeColorCustom,
|
|
@@ -51,83 +51,70 @@ const TabBarItemInternal = _ref => {
|
|
|
51
51
|
index: tabIndex,
|
|
52
52
|
pressColor,
|
|
53
53
|
pressOpacity,
|
|
54
|
-
renderBadge,
|
|
55
|
-
renderIcon,
|
|
56
54
|
defaultTabWidth,
|
|
55
|
+
icon: customIcon,
|
|
56
|
+
badge: customBadge,
|
|
57
|
+
href,
|
|
58
|
+
labelText,
|
|
57
59
|
routesLength,
|
|
58
|
-
renderLabel: renderLabelCustom,
|
|
59
60
|
android_ripple = {
|
|
60
61
|
borderless: true
|
|
61
|
-
}
|
|
62
|
+
},
|
|
63
|
+
labelAllowFontScaling,
|
|
64
|
+
route
|
|
62
65
|
} = _ref;
|
|
63
66
|
const labelColorFromStyle = StyleSheet.flatten(labelStyle || {}).color;
|
|
64
67
|
const activeColor = activeColorCustom !== undefined ? activeColorCustom : typeof labelColorFromStyle === 'string' ? labelColorFromStyle : DEFAULT_ACTIVE_COLOR;
|
|
65
68
|
const inactiveColor = inactiveColorCustom !== undefined ? inactiveColorCustom : typeof labelColorFromStyle === 'string' ? labelColorFromStyle : DEFAULT_INACTIVE_COLOR;
|
|
66
69
|
const activeOpacity = getActiveOpacity(position, routesLength, tabIndex);
|
|
67
70
|
const inactiveOpacity = getInactiveOpacity(position, routesLength, tabIndex);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
focused: true,
|
|
74
|
-
color: activeColor
|
|
75
|
-
});
|
|
76
|
-
const inactiveIcon = renderIcon({
|
|
77
|
-
route,
|
|
71
|
+
const icon = React.useMemo(() => {
|
|
72
|
+
if (!customIcon) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
const inactiveIcon = customIcon({
|
|
78
76
|
focused: false,
|
|
79
|
-
color: inactiveColor
|
|
77
|
+
color: inactiveColor,
|
|
78
|
+
size: ICON_SIZE,
|
|
79
|
+
route
|
|
80
80
|
});
|
|
81
|
-
|
|
82
|
-
icon = /*#__PURE__*/React.createElement(View, {
|
|
83
|
-
style: styles.icon
|
|
84
|
-
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
85
|
-
style: {
|
|
86
|
-
opacity: inactiveOpacity
|
|
87
|
-
}
|
|
88
|
-
}, inactiveIcon), /*#__PURE__*/React.createElement(Animated.View, {
|
|
89
|
-
style: [StyleSheet.absoluteFill, {
|
|
90
|
-
opacity: activeOpacity
|
|
91
|
-
}]
|
|
92
|
-
}, activeIcon));
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
const renderLabel = renderLabelCustom ? renderLabelCustom : labelProps => /*#__PURE__*/React.createElement(TabBarItemLabel, _extends({}, labelProps, {
|
|
96
|
-
icon: icon,
|
|
97
|
-
label: labelText,
|
|
98
|
-
labelStyle: labelStyle
|
|
99
|
-
}));
|
|
100
|
-
if (renderLabel) {
|
|
101
|
-
const activeLabel = renderLabel({
|
|
102
|
-
route,
|
|
81
|
+
const activeIcon = customIcon({
|
|
103
82
|
focused: true,
|
|
104
|
-
color: activeColor
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
route,
|
|
108
|
-
focused: false,
|
|
109
|
-
color: inactiveColor
|
|
83
|
+
color: activeColor,
|
|
84
|
+
size: ICON_SIZE,
|
|
85
|
+
route
|
|
110
86
|
});
|
|
111
|
-
|
|
87
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
88
|
+
style: styles.icon
|
|
89
|
+
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
112
90
|
style: {
|
|
113
91
|
opacity: inactiveOpacity
|
|
114
92
|
}
|
|
115
|
-
},
|
|
93
|
+
}, inactiveIcon), /*#__PURE__*/React.createElement(Animated.View, {
|
|
116
94
|
style: [StyleSheet.absoluteFill, {
|
|
117
95
|
opacity: activeOpacity
|
|
118
96
|
}]
|
|
119
|
-
},
|
|
120
|
-
}
|
|
97
|
+
}, activeIcon));
|
|
98
|
+
}, [activeColor, activeOpacity, customIcon, inactiveColor, inactiveOpacity, route]);
|
|
99
|
+
const renderLabel = React.useCallback(focused => customlabel ? customlabel({
|
|
100
|
+
focused,
|
|
101
|
+
color: focused ? activeColor : inactiveColor,
|
|
102
|
+
style: labelStyle,
|
|
103
|
+
label: labelText,
|
|
104
|
+
allowFontScaling: labelAllowFontScaling,
|
|
105
|
+
route
|
|
106
|
+
}) : /*#__PURE__*/React.createElement(TabBarItemLabel, {
|
|
107
|
+
color: focused ? activeColor : inactiveColor,
|
|
108
|
+
icon: icon,
|
|
109
|
+
label: labelText,
|
|
110
|
+
labelStyle: labelStyle
|
|
111
|
+
}), [customlabel, activeColor, labelStyle, labelText, labelAllowFontScaling, route, inactiveColor, icon]);
|
|
121
112
|
const tabStyle = StyleSheet.flatten(style);
|
|
122
|
-
const isWidthSet =
|
|
113
|
+
const isWidthSet = tabStyle?.width !== undefined;
|
|
123
114
|
const tabContainerStyle = isWidthSet ? null : {
|
|
124
115
|
width: defaultTabWidth
|
|
125
116
|
};
|
|
126
|
-
const scene = {
|
|
127
|
-
route
|
|
128
|
-
};
|
|
129
117
|
accessibilityLabel = typeof accessibilityLabel !== 'undefined' ? accessibilityLabel : labelText;
|
|
130
|
-
const badge = renderBadge ? renderBadge(scene) : null;
|
|
131
118
|
return /*#__PURE__*/React.createElement(PlatformPressable, {
|
|
132
119
|
android_ripple: android_ripple,
|
|
133
120
|
testID: testID,
|
|
@@ -136,23 +123,29 @@ const TabBarItemInternal = _ref => {
|
|
|
136
123
|
accessibilityRole: "tab",
|
|
137
124
|
accessibilityState: {
|
|
138
125
|
selected: isFocused
|
|
139
|
-
}
|
|
140
|
-
// @ts-ignore: this is to support older React Native versions
|
|
141
|
-
,
|
|
142
|
-
accessibilityStates: isFocused ? ['selected'] : [],
|
|
126
|
+
},
|
|
143
127
|
pressColor: pressColor,
|
|
144
128
|
pressOpacity: pressOpacity,
|
|
145
|
-
|
|
129
|
+
unstable_pressDelay: 0,
|
|
146
130
|
onLayout: onLayout,
|
|
147
131
|
onPress: onPress,
|
|
148
132
|
onLongPress: onLongPress,
|
|
133
|
+
href: href,
|
|
149
134
|
style: [styles.pressable, tabContainerStyle]
|
|
150
135
|
}, /*#__PURE__*/React.createElement(View, {
|
|
151
136
|
pointerEvents: "none",
|
|
152
137
|
style: [styles.item, tabStyle]
|
|
153
|
-
}, icon,
|
|
138
|
+
}, icon, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Animated.View, {
|
|
139
|
+
style: {
|
|
140
|
+
opacity: inactiveOpacity
|
|
141
|
+
}
|
|
142
|
+
}, renderLabel(false)), /*#__PURE__*/React.createElement(Animated.View, {
|
|
143
|
+
style: [StyleSheet.absoluteFill, {
|
|
144
|
+
opacity: activeOpacity
|
|
145
|
+
}]
|
|
146
|
+
}, renderLabel(true))), customBadge != null ? /*#__PURE__*/React.createElement(View, {
|
|
154
147
|
style: styles.badge
|
|
155
|
-
},
|
|
148
|
+
}, customBadge()) : null));
|
|
156
149
|
};
|
|
157
150
|
const MemoizedTabBarItemInternal = /*#__PURE__*/React.memo(TabBarItemInternal);
|
|
158
151
|
export function TabBarItem(props) {
|
|
@@ -162,23 +155,12 @@ export function TabBarItem(props) {
|
|
|
162
155
|
onLayout,
|
|
163
156
|
navigationState,
|
|
164
157
|
route,
|
|
165
|
-
getAccessibilityLabel,
|
|
166
|
-
getLabelText,
|
|
167
|
-
getTestID,
|
|
168
|
-
getAccessible,
|
|
169
158
|
...rest
|
|
170
159
|
} = props;
|
|
171
160
|
const onPressLatest = useLatestCallback(onPress);
|
|
172
161
|
const onLongPressLatest = useLatestCallback(onLongPress);
|
|
173
162
|
const onLayoutLatest = useLatestCallback(onLayout ? onLayout : () => {});
|
|
174
163
|
const tabIndex = navigationState.routes.indexOf(route);
|
|
175
|
-
const scene = {
|
|
176
|
-
route
|
|
177
|
-
};
|
|
178
|
-
const accessibilityLabel = getAccessibilityLabel(scene);
|
|
179
|
-
const label = getLabelText(scene);
|
|
180
|
-
const testID = getTestID(scene);
|
|
181
|
-
const accessible = getAccessible(scene);
|
|
182
164
|
return /*#__PURE__*/React.createElement(MemoizedTabBarItemInternal, _extends({}, rest, {
|
|
183
165
|
onPress: onPressLatest,
|
|
184
166
|
onLayout: onLayoutLatest,
|
|
@@ -186,11 +168,7 @@ export function TabBarItem(props) {
|
|
|
186
168
|
isFocused: navigationState.index === tabIndex,
|
|
187
169
|
route: route,
|
|
188
170
|
index: tabIndex,
|
|
189
|
-
routesLength: navigationState.routes.length
|
|
190
|
-
accessibilityLabel: accessibilityLabel,
|
|
191
|
-
label: label,
|
|
192
|
-
testID: testID,
|
|
193
|
-
accessible: accessible
|
|
171
|
+
routesLength: navigationState.routes.length
|
|
194
172
|
}));
|
|
195
173
|
}
|
|
196
174
|
const styles = StyleSheet.create({
|
|
@@ -207,7 +185,7 @@ const styles = StyleSheet.create({
|
|
|
207
185
|
badge: {
|
|
208
186
|
position: 'absolute',
|
|
209
187
|
top: 0,
|
|
210
|
-
|
|
188
|
+
end: 0
|
|
211
189
|
},
|
|
212
190
|
pressable: {
|
|
213
191
|
// The label is not pressable on Windows
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","StyleSheet","View","useLatestCallback","PlatformPressable","TabBarItemLabel","DEFAULT_ACTIVE_COLOR","DEFAULT_INACTIVE_COLOR","getActiveOpacity","position","routesLength","tabIndex","inputRange","Array","from","length","_","i","interpolate","outputRange","map","getInactiveOpacity","TabBarItemInternal","accessibilityLabel","accessible","label","
|
|
1
|
+
{"version":3,"names":["React","Animated","StyleSheet","View","useLatestCallback","PlatformPressable","TabBarItemLabel","DEFAULT_ACTIVE_COLOR","DEFAULT_INACTIVE_COLOR","ICON_SIZE","getActiveOpacity","position","routesLength","tabIndex","inputRange","Array","from","length","_","i","interpolate","outputRange","map","getInactiveOpacity","TabBarItemInternal","_ref","accessibilityLabel","accessible","label","customlabel","testID","onLongPress","onPress","isFocused","style","inactiveColor","inactiveColorCustom","activeColor","activeColorCustom","labelStyle","onLayout","index","pressColor","pressOpacity","defaultTabWidth","icon","customIcon","badge","customBadge","href","labelText","android_ripple","borderless","labelAllowFontScaling","route","labelColorFromStyle","flatten","color","undefined","activeOpacity","inactiveOpacity","useMemo","inactiveIcon","focused","size","activeIcon","createElement","styles","opacity","absoluteFill","renderLabel","useCallback","allowFontScaling","tabStyle","isWidthSet","width","tabContainerStyle","accessibilityRole","accessibilityState","selected","unstable_pressDelay","pressable","pointerEvents","item","MemoizedTabBarItemInternal","memo","TabBarItem","props","navigationState","rest","onPressLatest","onLongPressLatest","onLayoutLatest","routes","indexOf","_extends","create","margin","flex","alignItems","justifyContent","padding","minHeight","top","end","backgroundColor"],"sourceRoot":"../../src","sources":["TabBarItem.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EAIRC,UAAU,EAEV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kD,MAAM,GAAGjE,UAAU,CAAC8F,MAAM,CAAC;EAC/BnD,IAAI,EAAE;IACJoD,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;EACDvD,KAAK,EAAE;IACLpC,QAAQ,EAAE,UAAU;IACpB4F,GAAG,EAAE,CAAC;IACNC,GAAG,EAAE;EACP,CAAC;EACDvB,SAAS,EAAE;IACT;IACA;IACAwB,eAAe,EAAE;EACnB;AACF,CAAC,CAAC"}
|
|
@@ -21,8 +21,9 @@ export const TabBarItemLabel = /*#__PURE__*/React.memo(_ref => {
|
|
|
21
21
|
const styles = StyleSheet.create({
|
|
22
22
|
label: {
|
|
23
23
|
margin: 4,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
fontSize: 14,
|
|
25
|
+
fontWeight: '500',
|
|
26
|
+
backgroundColor: 'transparent'
|
|
26
27
|
}
|
|
27
28
|
});
|
|
28
29
|
//# sourceMappingURL=TabBarItemLabel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","StyleSheet","TabBarItemLabel","memo","color","label","labelStyle","icon","styles","marginTop","create","margin","
|
|
1
|
+
{"version":3,"names":["React","Animated","StyleSheet","TabBarItemLabel","memo","_ref","color","label","labelStyle","icon","createElement","Text","style","styles","marginTop","create","margin","fontSize","fontWeight","backgroundColor"],"sourceRoot":"../../src","sources":["TabBarItemLabel.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AASnD,OAAO,MAAMC,eAAe,gBAAGH,KAAK,CAACI,IAAI,CACvCC,IAAA,IAA8D;EAAA,IAA7D;IAAEC,KAAK;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAA2B,CAAC,GAAAJ,IAAA;EACvD,IAAI,CAACE,KAAK,EAAE;IACV,OAAO,IAAI;EACb;EAEA,oBACEP,KAAA,CAAAU,aAAA,CAACT,QAAQ,CAACU,IAAI;IACZC,KAAK,EAAE,CACLC,MAAM,CAACN,KAAK,EACZE,IAAI,GAAG;MAAEK,SAAS,EAAE;IAAE,CAAC,GAAG,IAAI,EAC9BN,UAAU,EACV;MAAEF,KAAK,EAAEA;IAAM,CAAC;EAChB,GAEDC,KACY,CAAC;AAEpB,CACF,CAAC;AAED,MAAMM,MAAM,GAAGX,UAAU,CAACa,MAAM,CAAC;EAC/BR,KAAK,EAAE;IACLS,MAAM,EAAE,CAAC;IACTC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC"}
|
package/lib/module/TabView.js
CHANGED
|
@@ -76,7 +76,7 @@ export function TabView(_ref) {
|
|
|
76
76
|
addEnterListener,
|
|
77
77
|
jumpTo
|
|
78
78
|
} = _ref2;
|
|
79
|
-
// All
|
|
79
|
+
// All the props here must not change between re-renders
|
|
80
80
|
// This is crucial to optimizing the routes with PureComponent
|
|
81
81
|
const sceneRendererProps = {
|
|
82
82
|
position,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","I18nManager","Platform","StyleSheet","View","Pager","SceneView","TabBar","TabView","onIndexChange","navigationState","renderScene","initialLayout","keyboardDismissMode","lazy","lazyPreloadDistance","onSwipeStart","onSwipeEnd","renderLazyPlaceholder","renderTabBar","props","sceneContainerStyle","pagerStyle","style","direction","getConstants","isRTL","swipeEnabled","tabBarPosition","animationEnabled","overScrollMode","OS","console","warn","layout","setLayout","useState","width","height","jumpToIndex","index","handleLayout","e","nativeEvent","prevLayout","styles","pager","position","render","addEnterListener","jumpTo","sceneRendererProps","routes","map","route","i","key","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,aAAa;AACvC,SAASC,MAAM,QAAQ,UAAU;AA4BjC,OAAO,SAASC,
|
|
1
|
+
{"version":3,"names":["React","I18nManager","Platform","StyleSheet","View","Pager","SceneView","TabBar","TabView","_ref","onIndexChange","navigationState","renderScene","initialLayout","keyboardDismissMode","lazy","lazyPreloadDistance","onSwipeStart","onSwipeEnd","renderLazyPlaceholder","renderTabBar","props","createElement","sceneContainerStyle","pagerStyle","style","direction","getConstants","isRTL","swipeEnabled","tabBarPosition","animationEnabled","overScrollMode","OS","console","warn","layout","setLayout","useState","width","height","jumpToIndex","index","handleLayout","e","nativeEvent","prevLayout","onLayout","styles","pager","layoutDirection","_ref2","position","render","addEnterListener","jumpTo","sceneRendererProps","Fragment","routes","map","route","i","_extends","key","_ref3","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,aAAa;AACvC,SAASC,MAAM,QAAQ,UAAU;AA4BjC,OAAO,SAASC,OAAOA,CAAAC,IAAA,EAoBV;EAAA,IApB4B;IACvCC,aAAa;IACbC,eAAe;IACfC,WAAW;IACXC,aAAa;IACbC,mBAAmB,GAAG,MAAM;IAC5BC,IAAI,GAAG,KAAK;IACZC,mBAAmB,GAAG,CAAC;IACvBC,YAAY;IACZC,UAAU;IACVC,qBAAqB,GAAGA,CAAA,KAAM,IAAI;IAClCC,YAAY,GAAIC,KAAK,iBAAKrB,KAAA,CAAAsB,aAAA,CAACf,MAAM,EAAKc,KAAQ,CAAC;IAC/CE,mBAAmB;IACnBC,UAAU;IAC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A;QAAA,IAAC;UAAEC;QAAQ,CAAC,GAAAD,KAAA;QAAA,OACXC,OAAO,GACH9C,qBAAqB,CAAC;UAAEyC;QAAM,CAAC,CAAC,GAChChD,WAAW,CAAC;UACV,GAAG4C,kBAAkB;UACrBI;QACF,CAAC,CAAC;MAAA,CAEC,CAAC;IAEhB,CAAC,CACH,CAAC,EACA9B,cAAc,KAAK,QAAQ,IAC1BV,YAAY,CAAC;MACX,GAAGoC,kBAAkB;MACrB7C;IACF,CAAC,CACW,CAAC;EAErB,CACK,CACH,CAAC;AAEX;AAEA,MAAMqC,MAAM,GAAG7C,UAAU,CAAC+D,MAAM,CAAC;EAC/BjB,KAAK,EAAE;IACLkB,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SceneMap","TabBar","TabBarIndicator","TabBarItem","TabView"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,YAAY;AAErC,SAASC,MAAM,QAAQ,UAAU;AAEjC,SAASC,eAAe,QAAQ,mBAAmB;AAEnD,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,OAAO,QAAQ,WAAW"}
|
|
1
|
+
{"version":3,"names":["SceneMap","TabBar","TabBarIndicator","TabBarItem","TabView"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,YAAY;AAErC,SAASC,MAAM,QAAQ,UAAU;AAEjC,SAASC,eAAe,QAAQ,mBAAmB;AAEnD,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,OAAO,QAAQ,WAAW"}
|
package/lib/module/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","useAnimatedValue","initialValue","lazyRef","useRef","current","undefined","Value"],"sourceRoot":"../../src","sources":["useAnimatedValue.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,cAAc;AAEvC,OAAO,SAASC,
|
|
1
|
+
{"version":3,"names":["React","Animated","useAnimatedValue","initialValue","lazyRef","useRef","current","undefined","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,CAAiB,CAAC;EAE9C,IAAID,OAAO,CAACE,OAAO,KAAKC,SAAS,EAAE;IACjCH,OAAO,CAACE,OAAO,GAAG,IAAIL,QAAQ,CAACO,KAAK,CAACL,YAAY,CAAC;EACpD;EAEA,OAAOC,OAAO,CAACE,OAAO;AACxB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
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
|
+
children: React.ReactNode;
|
|
4
5
|
pressColor?: string;
|
|
5
6
|
pressOpacity?: number;
|
|
6
|
-
|
|
7
|
+
href?: string;
|
|
7
8
|
};
|
|
8
9
|
/**
|
|
9
10
|
* PlatformPressable provides an abstraction on top of TouchableNativeFeedback and
|
|
@@ -12,5 +13,5 @@ export type Props = PressableProps & {
|
|
|
12
13
|
* On Android, you can pass the props of TouchableNativeFeedback.
|
|
13
14
|
* On other platforms, you can pass the props of TouchableOpacity.
|
|
14
15
|
*/
|
|
15
|
-
export declare function PlatformPressable({ android_ripple, pressColor, pressOpacity, style, ...rest }: Props): JSX.Element;
|
|
16
|
+
export declare function PlatformPressable({ disabled, android_ripple, pressColor, pressOpacity, style, onPress, ...rest }: Props): React.JSX.Element;
|
|
16
17
|
//# 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,
|
|
1
|
+
{"version":3,"file":"PlatformPressable.d.ts","sourceRoot":"","sources":["../../../src/PlatformPressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,KAAK,GAAG,cAAc,GAAG;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAMF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,cAAc,EACd,UAAiC,EACjC,YAAY,EACZ,KAAK,EACL,OAAO,EACP,GAAG,IAAI,EACR,EAAE,KAAK,qBAoCP"}
|
|
@@ -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, LocaleDirection, 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, 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,
|
|
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,CAAC;AAGjB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S,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;AAgRF,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,15 +1,15 @@
|
|
|
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 { LocaleDirection, NavigationState, Route, SceneRendererProps } from './types';
|
|
4
4
|
export type GetTabWidth = (index: number) => number;
|
|
5
5
|
export type Props<T extends Route> = SceneRendererProps & {
|
|
6
6
|
navigationState: NavigationState<T>;
|
|
7
|
-
width:
|
|
7
|
+
width: 'auto' | `${number}%` | number;
|
|
8
8
|
getTabWidth: GetTabWidth;
|
|
9
9
|
direction: LocaleDirection;
|
|
10
10
|
style?: StyleProp<ViewStyle>;
|
|
11
11
|
gap?: number;
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
};
|
|
14
|
-
export declare function TabBarIndicator<T extends Route>({ getTabWidth, layout, navigationState, position, width, direction, gap, style, children, }: 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;
|
|
15
15
|
//# sourceMappingURL=TabBarIndicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,SAAS,
|
|
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,qBAiGV"}
|