@momo-kits/foundation 0.169.16-beta.3 → 0.169.16-beta.31
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/Application/BottomSheet.tsx +2 -2
- package/Application/BottomTab/BottomTabBar.styles.ts +1 -1
- package/Application/BottomTab/DuoTabBar.styles.ts +1 -1
- package/Application/BottomTab/TabBarIcon.tsx +1 -1
- package/Application/ModalScreen.tsx +2 -2
- package/Application/StackScreen.tsx +2 -6
- package/Application/TooltipPortal.tsx +3 -3
- package/Application/hooks.ts +1 -1
- package/Assets/icon_deprecated.json +44 -0
- package/Assets/icon_new.json +1052 -0
- package/Button/index.tsx +2 -2
- package/Divider/DashDivider.tsx +2 -2
- package/Divider/index.tsx +3 -3
- package/FoundationList/index.tsx +1 -1
- package/Icon/index.tsx +18 -12
- package/Icon/types.ts +2 -1
- package/Icon/utils.ts +65 -0
- package/Image/index.tsx +7 -62
- package/Image/styles.ts +0 -2
- package/Image/types.ts +1 -9
- package/Input/Input.tsx +2 -2
- package/Input/InputMoney.tsx +2 -7
- package/Input/InputMoneyView.tsx +2 -2
- package/Input/InputOTP.tsx +2 -2
- package/Input/InputPhoneNumber.tsx +2 -2
- package/Input/InputSearch.tsx +2 -2
- package/Input/InputTextArea.tsx +2 -2
- package/Input/SearchTextTyping.tsx +2 -2
- package/Input/SystemTextInput.tsx +1 -2
- package/Input/TextTyping.tsx +2 -7
- package/Pagination/types.ts +2 -6
- package/package.json +25 -27
|
@@ -215,7 +215,7 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
|
215
215
|
onRequestClose={() => {
|
|
216
216
|
handleDismiss();
|
|
217
217
|
}}
|
|
218
|
-
style={StyleSheet.
|
|
218
|
+
style={StyleSheet.absoluteFillObject}
|
|
219
219
|
isModalKit={true}
|
|
220
220
|
supportedOrientations={isDuo ? DUO_ORIENTATIONS : undefined}
|
|
221
221
|
>
|
|
@@ -230,7 +230,7 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
|
230
230
|
style={styles.container}
|
|
231
231
|
>
|
|
232
232
|
<Pressable
|
|
233
|
-
style={StyleSheet.
|
|
233
|
+
style={StyleSheet.absoluteFillObject}
|
|
234
234
|
onPress={() => {
|
|
235
235
|
action.current = 'touch';
|
|
236
236
|
handleDismiss();
|
|
@@ -68,7 +68,7 @@ export const styles = StyleSheet.create({
|
|
|
68
68
|
},
|
|
69
69
|
// custom label content over the label text, centered and unclipped
|
|
70
70
|
ctaLabelOverlay: {
|
|
71
|
-
...
|
|
71
|
+
...StyleSheet.absoluteFillObject,
|
|
72
72
|
alignItems: 'center',
|
|
73
73
|
justifyContent: 'center',
|
|
74
74
|
},
|
|
@@ -57,7 +57,7 @@ export const styles = StyleSheet.create({
|
|
|
57
57
|
},
|
|
58
58
|
// custom label content over the label text, centered and unclipped
|
|
59
59
|
railCtaLabelOverlay: {
|
|
60
|
-
...
|
|
60
|
+
...StyleSheet.absoluteFillObject,
|
|
61
61
|
alignItems: 'center',
|
|
62
62
|
justifyContent: 'center',
|
|
63
63
|
},
|
|
@@ -150,7 +150,7 @@ const styles = StyleSheet.create({
|
|
|
150
150
|
height: TabBarMetrics.iconSize,
|
|
151
151
|
},
|
|
152
152
|
layer: {
|
|
153
|
-
...
|
|
153
|
+
...StyleSheet.absoluteFillObject,
|
|
154
154
|
alignItems: 'center',
|
|
155
155
|
justifyContent: 'center',
|
|
156
156
|
},
|
|
@@ -161,7 +161,7 @@ const Modal: React.FC<ModalParams> = props => {
|
|
|
161
161
|
transparent
|
|
162
162
|
visible={true}
|
|
163
163
|
onRequestClose={handleDismiss}
|
|
164
|
-
style={StyleSheet.
|
|
164
|
+
style={StyleSheet.absoluteFillObject}
|
|
165
165
|
isModalKit={true}
|
|
166
166
|
supportedOrientations={isDuo ? DUO_ORIENTATIONS : undefined}
|
|
167
167
|
>
|
|
@@ -170,7 +170,7 @@ const Modal: React.FC<ModalParams> = props => {
|
|
|
170
170
|
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
|
|
171
171
|
>
|
|
172
172
|
<Pressable
|
|
173
|
-
style={StyleSheet.
|
|
173
|
+
style={StyleSheet.absoluteFillObject}
|
|
174
174
|
onPress={() => handleDismiss(undefined, barrierDismissible)}
|
|
175
175
|
>
|
|
176
176
|
<Animated.View style={[styles.overlayContent, scrimStyle]} />
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useContext, useEffect, useLayoutEffect, useRef } from 'react';
|
|
2
|
+
import { InteractionManager } from 'react-native';
|
|
2
3
|
import { useHeaderHeight } from '@react-navigation/elements';
|
|
3
4
|
import { ScreenTrackingParams } from './types';
|
|
4
5
|
import Navigation from './Navigation';
|
|
@@ -13,12 +14,7 @@ const TRACKING_TIMEOUT = 5000;
|
|
|
13
14
|
const ELEMENT_IDLE_TIMEOUT = 2000;
|
|
14
15
|
const LOADING_IDLE_TIMEOUT = 2000;
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
// Giữ nguyên shape trả về { cancel } để code bên dưới (timeoutInteraction?.cancel?.()) không đổi.
|
|
18
|
-
const runAfterInteractions = (task: () => void) => {
|
|
19
|
-
const handle = requestIdleCallback(() => task());
|
|
20
|
-
return { cancel: () => cancelIdleCallback(handle) };
|
|
21
|
-
};
|
|
17
|
+
const runAfterInteractions = InteractionManager.runAfterInteractions;
|
|
22
18
|
|
|
23
19
|
/**
|
|
24
20
|
* Hosts a feature screen in the stack: applies its header options, provides
|
|
@@ -8,13 +8,13 @@ import React, {
|
|
|
8
8
|
useReducer,
|
|
9
9
|
useRef,
|
|
10
10
|
} from 'react';
|
|
11
|
-
import { StyleSheet, View
|
|
11
|
+
import { StyleSheet, View } from 'react-native';
|
|
12
12
|
|
|
13
13
|
interface TooltipPortalContextValue {
|
|
14
14
|
register: (id: string, content: ReactNode) => void;
|
|
15
15
|
unregister: (id: string, immediate?: boolean) => void;
|
|
16
16
|
portals: Map<string, ReactNode>;
|
|
17
|
-
hostRef: RefObject<
|
|
17
|
+
hostRef: RefObject<View | null>;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const TooltipPortalContext = createContext<TooltipPortalContextValue | null>(
|
|
@@ -30,7 +30,7 @@ export const TooltipPortalProvider: React.FC<{ children: ReactNode }> = ({
|
|
|
30
30
|
}) => {
|
|
31
31
|
// The ref map updates synchronously; the reducer only triggers re-renders.
|
|
32
32
|
const portalsRef = useRef<Map<string, ReactNode>>(new Map());
|
|
33
|
-
const hostRef = useRef<
|
|
33
|
+
const hostRef = useRef<View>(null);
|
|
34
34
|
const [updateCounter, forceUpdate] = useReducer((x: number) => x + 1, 0);
|
|
35
35
|
const pendingUpdateRef = useRef<any>(null);
|
|
36
36
|
|
package/Application/hooks.ts
CHANGED
|
@@ -54,7 +54,7 @@ const useAppState = () => {
|
|
|
54
54
|
|
|
55
55
|
useEffect(() => {
|
|
56
56
|
const subscription = AppState.addEventListener('change', nextAppState => {
|
|
57
|
-
const wasInBackground = /inactive|background/.test(appState.current
|
|
57
|
+
const wasInBackground = /inactive|background/.test(appState.current);
|
|
58
58
|
const isReturning = wasInBackground && nextAppState === 'active';
|
|
59
59
|
isBackgroundToForeground.current = isReturning;
|
|
60
60
|
appState.current = nextAppState;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Phonebook": "phone_call_phonebook_outline",
|
|
3
|
+
"arrow-back": "arrow_back",
|
|
4
|
+
"arrow_arrow-down": "arrow_down",
|
|
5
|
+
"arrow_arrow-next": "arrow_next",
|
|
6
|
+
"arrow_arrow-top": "arrow_top",
|
|
7
|
+
"arrow_arrow_bold_forward": "arrow_bold_forward",
|
|
8
|
+
"arrow_arrow_reply": "arrow_reply",
|
|
9
|
+
"arrow_arrow_undo": "arrow_undo_2",
|
|
10
|
+
"arrow_undo": "arrow_undo_1",
|
|
11
|
+
"basic_Moon": "basic_moon",
|
|
12
|
+
"chat_back_space": "chatting_back_space",
|
|
13
|
+
"chat_comment": "chatting_comment",
|
|
14
|
+
"chat_comment_delete": "chatting_comment_delete",
|
|
15
|
+
"chat_comment_empty": "chatting_comment_empty",
|
|
16
|
+
"chat_q_and_a": "chatting_q_and_a_right",
|
|
17
|
+
"chat_sent": "chatting_sent",
|
|
18
|
+
"chat_sticker": "chatting_sticker",
|
|
19
|
+
"connection_share": "connection_share_1",
|
|
20
|
+
"file_Billsetting": "file_bill_setting",
|
|
21
|
+
"file_clipboard_checked": "file_clipboard_check",
|
|
22
|
+
"file_plus": "file_file_plus",
|
|
23
|
+
"file_search": "file_file_search",
|
|
24
|
+
"file_text": "file_file_text",
|
|
25
|
+
"finance_safe": "finance_safe_box",
|
|
26
|
+
"help_center": "basic_help_center_1",
|
|
27
|
+
"logicstics_delivery": "logistics_delivery",
|
|
28
|
+
"logicstics_delivery_fast": "logistics_delivery_fast",
|
|
29
|
+
"logicstics_delivey_bike": "logistics_delivery_bike",
|
|
30
|
+
"logicstics_package": "logistics_package",
|
|
31
|
+
"logicstics_package_cancel": "logistics_package_cancel",
|
|
32
|
+
"logicstics_package_list": "logistics_package_list",
|
|
33
|
+
"navigation_AR": "navigation_ar",
|
|
34
|
+
"navigation_close_circle_full_2": "navigation_close_circle_full",
|
|
35
|
+
"navigation_qrcode": "navigation_qr_code",
|
|
36
|
+
"phonebook_outline": "phone_call_phonebook_outline",
|
|
37
|
+
"security_verifiedface_id": "security_verified_face_id",
|
|
38
|
+
"time_calendar": "time_calendar_1",
|
|
39
|
+
"travel_airconditional": "travel_air_conditional",
|
|
40
|
+
"travel_bed-single": "travel_bed_single",
|
|
41
|
+
"travel_kid_area": "travel_children_area",
|
|
42
|
+
"travel_led_Light": "travel_led_light",
|
|
43
|
+
"travel_people_family": "travel_family"
|
|
44
|
+
}
|