@ledgerhq/lumen-ui-rnative 0.1.3 → 0.1.4
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/dist/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/TabBar/TabBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/TabBar/TabBar.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEvD,eAAO,MAAM,cAAc,KAAK,CAAC;AAGjC;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,IAAI,EACJ,UAAU,EACV,KAAK,EACL,GAAG,KAAK,EACT,EAAE,eAAe,2CAgGjB;yBAvGe,UAAU;;;AA2G1B;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,2CA0Fb"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { BlurView } from '@sbaiahmed1/react-native-blur';
|
|
3
3
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
4
|
-
import { StyleSheet, Text } from 'react-native';
|
|
4
|
+
import { Platform, StyleSheet, Text, View, } from 'react-native';
|
|
5
5
|
import Animated, { Easing, useAnimatedStyle, useSharedValue, withDelay, withSequence, withTiming, } from 'react-native-reanimated';
|
|
6
6
|
import { useStyleSheet, useTheme } from '../../../styles';
|
|
7
7
|
import { Placeholder } from '../../Symbols';
|
|
@@ -127,9 +127,9 @@ export function TabBar({ active, onTabPress, children, ...props }) {
|
|
|
127
127
|
width: itemWidth.value,
|
|
128
128
|
height: itemHeight.value - PILL_INSET * 2,
|
|
129
129
|
}), [pillProgress, itemWidth, itemHeight]);
|
|
130
|
-
return (_jsx(TabBarContextProvider, { value: { active, onTabPress: handleTabPress }, children: _jsxs(Box, { style: styles.container, onLayout: onLayout, accessibilityRole: 'tablist', ...props, children: [children, _jsx(BlurView, { style: styles.blur, blurAmount: theme.blur.lg, blurType: colorScheme === 'dark' ? 'dark' : 'light', overlayColor: colorScheme === 'dark'
|
|
130
|
+
return (_jsx(TabBarContextProvider, { value: { active, onTabPress: handleTabPress }, children: _jsxs(Box, { style: styles.container, onLayout: onLayout, accessibilityRole: 'tablist', ...props, children: [children, Platform.OS === 'android' ? (_jsx(View, { style: styles.androidBackground })) : (_jsx(BlurView, { style: styles.blur, blurAmount: theme.blur.lg, blurType: colorScheme === 'dark' ? 'dark' : 'light', overlayColor: colorScheme === 'dark'
|
|
131
131
|
? 'rgba(0,0,0,0.15)'
|
|
132
|
-
: 'rgba(255,255,255,0.2)' }), _jsx(Animated.View, { style: [styles.pill, animatedPillStyle] })] }) }));
|
|
132
|
+
: 'rgba(255,255,255,0.2)' })), _jsx(Animated.View, { style: [styles.pill, animatedPillStyle] })] }) }));
|
|
133
133
|
}
|
|
134
134
|
const useStyles = () => useStyleSheet((t) => ({
|
|
135
135
|
container: {
|
|
@@ -144,9 +144,14 @@ const useStyles = () => useStyleSheet((t) => ({
|
|
|
144
144
|
},
|
|
145
145
|
blur: {
|
|
146
146
|
...StyleSheet.absoluteFillObject,
|
|
147
|
-
|
|
147
|
+
height: TAB_BAR_HEIGHT + t.sizes.s16,
|
|
148
148
|
zIndex: -1,
|
|
149
149
|
},
|
|
150
|
+
androidBackground: {
|
|
151
|
+
...StyleSheet.absoluteFillObject,
|
|
152
|
+
zIndex: -1,
|
|
153
|
+
backgroundColor: t.colors.bg.muted,
|
|
154
|
+
},
|
|
150
155
|
item: {
|
|
151
156
|
flex: 1,
|
|
152
157
|
paddingVertical: t.spacings.s4,
|
package/package.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { BlurView } from '@sbaiahmed1/react-native-blur';
|
|
2
2
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
LayoutChangeEvent,
|
|
5
|
+
Platform,
|
|
6
|
+
StyleSheet,
|
|
7
|
+
Text,
|
|
8
|
+
View,
|
|
9
|
+
} from 'react-native';
|
|
4
10
|
import Animated, {
|
|
5
11
|
Easing,
|
|
6
12
|
useAnimatedStyle,
|
|
@@ -228,16 +234,20 @@ export function TabBar({
|
|
|
228
234
|
{...props}
|
|
229
235
|
>
|
|
230
236
|
{children}
|
|
231
|
-
|
|
232
|
-
style={styles.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
{Platform.OS === 'android' ? (
|
|
238
|
+
<View style={styles.androidBackground} />
|
|
239
|
+
) : (
|
|
240
|
+
<BlurView
|
|
241
|
+
style={styles.blur}
|
|
242
|
+
blurAmount={theme.blur.lg}
|
|
243
|
+
blurType={colorScheme === 'dark' ? 'dark' : 'light'}
|
|
244
|
+
overlayColor={
|
|
245
|
+
colorScheme === 'dark'
|
|
246
|
+
? 'rgba(0,0,0,0.15)'
|
|
247
|
+
: 'rgba(255,255,255,0.2)'
|
|
248
|
+
}
|
|
249
|
+
/>
|
|
250
|
+
)}
|
|
241
251
|
<Animated.View style={[styles.pill, animatedPillStyle]} />
|
|
242
252
|
</Box>
|
|
243
253
|
</TabBarContextProvider>
|
|
@@ -259,9 +269,14 @@ const useStyles = () =>
|
|
|
259
269
|
},
|
|
260
270
|
blur: {
|
|
261
271
|
...StyleSheet.absoluteFillObject,
|
|
262
|
-
|
|
272
|
+
height: TAB_BAR_HEIGHT + t.sizes.s16,
|
|
263
273
|
zIndex: -1,
|
|
264
274
|
},
|
|
275
|
+
androidBackground: {
|
|
276
|
+
...StyleSheet.absoluteFillObject,
|
|
277
|
+
zIndex: -1,
|
|
278
|
+
backgroundColor: t.colors.bg.muted,
|
|
279
|
+
},
|
|
265
280
|
item: {
|
|
266
281
|
flex: 1,
|
|
267
282
|
paddingVertical: t.spacings.s4,
|