@umituz/react-native-design-system 4.25.46 → 4.25.48
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-design-system",
|
|
3
|
-
"version": "4.25.
|
|
3
|
+
"version": "4.25.48",
|
|
4
4
|
"description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive, safe area, exception, infinite scroll, UUID, image, timezone, offline, onboarding, and loading utilities",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -222,9 +222,57 @@
|
|
|
222
222
|
"@react-navigation/native": {
|
|
223
223
|
"optional": true
|
|
224
224
|
},
|
|
225
|
+
"@react-navigation/bottom-tabs": {
|
|
226
|
+
"optional": true
|
|
227
|
+
},
|
|
228
|
+
"@react-navigation/stack": {
|
|
229
|
+
"optional": true
|
|
230
|
+
},
|
|
231
|
+
"@tanstack/query-async-storage-persister": {
|
|
232
|
+
"optional": true
|
|
233
|
+
},
|
|
234
|
+
"@tanstack/react-query": {
|
|
235
|
+
"optional": true
|
|
236
|
+
},
|
|
237
|
+
"@tanstack/react-query-persist-client": {
|
|
238
|
+
"optional": true
|
|
239
|
+
},
|
|
225
240
|
"expo-application": {
|
|
226
241
|
"optional": true
|
|
227
242
|
},
|
|
243
|
+
"expo-clipboard": {
|
|
244
|
+
"optional": true
|
|
245
|
+
},
|
|
246
|
+
"expo-crypto": {
|
|
247
|
+
"optional": true
|
|
248
|
+
},
|
|
249
|
+
"expo-font": {
|
|
250
|
+
"optional": true
|
|
251
|
+
},
|
|
252
|
+
"expo-haptics": {
|
|
253
|
+
"optional": true
|
|
254
|
+
},
|
|
255
|
+
"expo-image": {
|
|
256
|
+
"optional": true
|
|
257
|
+
},
|
|
258
|
+
"expo-image-manipulator": {
|
|
259
|
+
"optional": true
|
|
260
|
+
},
|
|
261
|
+
"expo-image-picker": {
|
|
262
|
+
"optional": true
|
|
263
|
+
},
|
|
264
|
+
"expo-network": {
|
|
265
|
+
"optional": true
|
|
266
|
+
},
|
|
267
|
+
"expo-secure-store": {
|
|
268
|
+
"optional": true
|
|
269
|
+
},
|
|
270
|
+
"expo-sharing": {
|
|
271
|
+
"optional": true
|
|
272
|
+
},
|
|
273
|
+
"expo-video": {
|
|
274
|
+
"optional": true
|
|
275
|
+
},
|
|
228
276
|
"@react-native-community/datetimepicker": {
|
|
229
277
|
"optional": true
|
|
230
278
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef, useImperativeHandle, useState, useCallback,
|
|
1
|
+
import React, { forwardRef, useImperativeHandle, useState, useCallback, useMemo } from 'react';
|
|
2
2
|
import { Modal, View, StyleSheet, Pressable } from 'react-native';
|
|
3
3
|
import { useAppDesignTokens } from '../../../theme';
|
|
4
4
|
import { useSafeAreaInsets } from '../../../safe-area';
|
|
@@ -30,17 +30,6 @@ export const BottomSheetModal = forwardRef<BottomSheetModalRef, BottomSheetModal
|
|
|
30
30
|
|
|
31
31
|
const sheetHeight = PRESET_HEIGHTS[preset] || PRESET_HEIGHTS.medium;
|
|
32
32
|
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
if (__DEV__) {
|
|
35
|
-
console.log({
|
|
36
|
-
visible,
|
|
37
|
-
preset,
|
|
38
|
-
hasChildren: !!children,
|
|
39
|
-
sheetHeight,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}, [visible, preset, children, sheetHeight]);
|
|
43
|
-
|
|
44
33
|
const present = useCallback(() => {
|
|
45
34
|
setVisible(true);
|
|
46
35
|
}, []);
|
|
@@ -62,7 +51,7 @@ export const BottomSheetModal = forwardRef<BottomSheetModalRef, BottomSheetModal
|
|
|
62
51
|
collapse: () => dismiss(),
|
|
63
52
|
}));
|
|
64
53
|
|
|
65
|
-
const styles = StyleSheet.create({
|
|
54
|
+
const styles = useMemo(() => StyleSheet.create({
|
|
66
55
|
overlay: {
|
|
67
56
|
flex: 1,
|
|
68
57
|
backgroundColor: tokens.colors.modalOverlay,
|
|
@@ -87,7 +76,7 @@ export const BottomSheetModal = forwardRef<BottomSheetModalRef, BottomSheetModal
|
|
|
87
76
|
content: {
|
|
88
77
|
flex: 1,
|
|
89
78
|
},
|
|
90
|
-
});
|
|
79
|
+
}), [sheetHeight, backgroundColor, tokens.colors, borderRadius, insets.bottom]);
|
|
91
80
|
|
|
92
81
|
return (
|
|
93
82
|
<Modal
|