nx-react-native-cli 2.7.1 → 3.0.1
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/index.cjs +27 -27
- package/package.json +1 -1
- package/templates/shared/apps/mobile/src/app/index.tsx +13 -8
- package/templates/shared/apps/mobile/src/components/atoms/AlertManager/alert-manager.component.tsx +134 -0
- package/templates/shared/apps/mobile/src/components/atoms/AlertManager/alert-manager.types.ts +18 -0
- package/templates/shared/apps/mobile/src/components/atoms/AlertManager/alert.service.ts +27 -0
- package/templates/shared/apps/mobile/src/components/atoms/AlertManager/index.ts +3 -0
- package/templates/shared/apps/mobile/src/components/atoms/BottomSheet/bottom-sheet.component.tsx +14 -8
- package/templates/shared/apps/mobile/src/components/atoms/Button/button.component.tsx +1 -1
- package/templates/shared/apps/mobile/src/components/atoms/DateModalInput/date-modal-input.component.tsx +69 -0
- package/templates/shared/apps/mobile/src/components/atoms/DateModalInput/index.ts +1 -0
- package/templates/shared/apps/mobile/src/components/atoms/DatePicker/date-picker.component.tsx +44 -0
- package/templates/shared/apps/mobile/src/components/atoms/DatePicker/index.ts +1 -0
- package/templates/shared/apps/mobile/src/components/atoms/DateTextInput/date-text-input.component.tsx +218 -0
- package/templates/shared/apps/mobile/src/components/atoms/DateTextInput/index.ts +1 -0
- package/templates/shared/apps/mobile/src/components/atoms/Divider/divider-component.tsx +1 -1
- package/templates/shared/apps/mobile/src/components/atoms/GradientBackground/gradient-background.component.tsx +45 -0
- package/templates/shared/apps/mobile/src/components/atoms/GradientBackground/index.ts +1 -0
- package/templates/shared/apps/mobile/src/components/atoms/InputLayout/input-layout.component.tsx +12 -4
- package/templates/shared/apps/mobile/src/components/atoms/KeyboardAccessory/keyboard-accessory.component.tsx +6 -3
- package/templates/shared/apps/mobile/src/components/atoms/Modal/modal.component.tsx +2 -0
- package/templates/shared/apps/mobile/src/components/atoms/ScreenLoader/screen-loader.component.tsx +6 -1
- package/templates/shared/apps/mobile/src/components/atoms/SelectDropdown/index.ts +1 -0
- package/templates/shared/apps/mobile/src/components/atoms/SelectDropdown/select-dropdown.component.tsx +223 -0
- package/templates/shared/apps/mobile/src/components/atoms/Skeleton/skeleton.component.tsx +1 -1
- package/templates/shared/apps/mobile/src/components/atoms/TextInput/bottom-sheet-text-input.component.tsx +4 -3
- package/templates/shared/apps/mobile/src/components/atoms/TextInput/text-input.component.tsx +8 -4
- package/templates/shared/apps/mobile/src/components/atoms/ThemeManager/index.ts +1 -0
- package/templates/shared/apps/mobile/src/components/atoms/ThemeManager/theme-manager.component.tsx +27 -0
- package/templates/shared/apps/mobile/src/components/atoms/ToastManager/index.ts +3 -0
- package/templates/shared/apps/mobile/src/components/atoms/ToastManager/toast-manager.component.tsx +109 -0
- package/templates/shared/apps/mobile/src/components/atoms/ToastManager/toast-manager.types.ts +10 -0
- package/templates/shared/apps/mobile/src/components/atoms/ToastManager/toast.service.ts +27 -0
- package/templates/shared/apps/mobile/src/components/atoms/Typography/typography.component.tsx +1 -1
- package/templates/shared/apps/mobile/src/components/atoms/index.ts +8 -0
- package/templates/shared/apps/mobile/src/components/molecules/BackButton/back-button.component.tsx +1 -1
- package/templates/shared/apps/mobile/src/components/molecules/ScreenContainer/screen-container.component.tsx +2 -22
- package/templates/shared/apps/mobile/src/components/molecules/ScreenHeader/screen-header.component.tsx +2 -2
- package/templates/shared/apps/mobile/src/hooks/index.ts +1 -0
- package/templates/shared/apps/mobile/src/hooks/usePushNotifications.hook.ts +104 -0
- package/templates/shared/apps/mobile/src/hooks/useToggleDarkMode.hook.tsx +24 -2
- package/templates/shared/apps/mobile/src/icons/alert-triangle.svg +5 -0
- package/templates/shared/apps/mobile/src/icons/check-circle.svg +4 -0
- package/templates/shared/apps/mobile/src/icons/chevron-down.svg +1 -0
- package/templates/shared/apps/mobile/src/icons/chevron-right.svg +1 -0
- package/templates/shared/apps/mobile/src/icons/index.ts +18 -1
- package/templates/shared/apps/mobile/src/icons/info.svg +5 -0
- package/templates/shared/apps/mobile/src/icons/x-circle.svg +5 -0
- package/templates/shared/apps/mobile/src/routes/index.tsx +19 -14
- package/templates/shared/apps/mobile/src/screens/LandingScreen/landing.screen.tsx +232 -8
- package/templates/shared/apps/mobile/src/stores/local-storage.store.ts +9 -5
- package/templates/shared/apps/mobile/src/stores/theme.slice.ts +15 -0
- package/templates/shared/apps/mobile/src/stores/user.slice.ts +5 -1
- package/templates/shared/apps/mobile/src/tailwind/index.ts +3 -3
- package/templates/shared/apps/mobile/tailwind.config.js +14 -0
- package/templates/shared/patches/react-native-animatable+1.4.0.patch +71 -0
|
@@ -9,14 +9,18 @@ export type User = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export type UserSlice = {
|
|
12
|
+
pushNotificationsEnabled: boolean;
|
|
12
13
|
setUser: (user: User | null) => void;
|
|
14
|
+
setPushNotificationsEnabled: (value: boolean) => void;
|
|
13
15
|
signOut: () => void;
|
|
14
16
|
user: User | null;
|
|
15
17
|
clear: () => void;
|
|
16
18
|
};
|
|
17
19
|
|
|
18
20
|
export const createUserSlice: StateCreator<UserSlice> = (set) => ({
|
|
19
|
-
clear: () => set({ user: null }),
|
|
21
|
+
clear: () => set({ pushNotificationsEnabled: true, user: null }),
|
|
22
|
+
pushNotificationsEnabled: true,
|
|
23
|
+
setPushNotificationsEnabled: (value: boolean) => set({ pushNotificationsEnabled: value }),
|
|
20
24
|
setUser: (user: User | null) => set({ user }),
|
|
21
25
|
signOut: () => set({ user: null }),
|
|
22
26
|
user: null,
|
|
@@ -60,13 +60,13 @@ export const errorContainerStyle = (err: boolean) => err && tw`border-red-600`;
|
|
|
60
60
|
|
|
61
61
|
export const disabledInputStyle = (isDisabled: boolean) => isDisabled && tw`opacity-50`;
|
|
62
62
|
|
|
63
|
-
export const focusedInputStyle = (isFocused: boolean) => isFocused && tw
|
|
63
|
+
export const focusedInputStyle = (isFocused: boolean) => isFocused && tw`border-primary-400`;
|
|
64
64
|
|
|
65
65
|
export const errorTextStyle = (err: boolean) => err && tw`text-red-600`;
|
|
66
66
|
|
|
67
|
-
export const defaultInputContainerStyle = tw`ios:px-4 ios:py-3.5 android:py-1 android:px-3 android:min-h-[50px] flex-row rounded-xl border border-
|
|
67
|
+
export const defaultInputContainerStyle = tw`ios:px-4 ios:py-3.5 android:py-1 android:px-3 android:min-h-[50px] flex-row rounded-xl border border-gray-300 bg-white`;
|
|
68
68
|
export const defaultInputTextStyle = [
|
|
69
|
-
tw`flex-1 font-normal text-
|
|
69
|
+
tw`flex-1 font-normal text-gray-900`,
|
|
70
70
|
CONFIG.IS_ANDROID ? { textAlignVertical: 'center' } : null,
|
|
71
71
|
];
|
|
72
72
|
|
|
@@ -39,6 +39,20 @@ module.exports = {
|
|
|
39
39
|
2: '2 2 0%',
|
|
40
40
|
},
|
|
41
41
|
colors: {
|
|
42
|
+
white: '#ffffff',
|
|
43
|
+
background: '#0f1419',
|
|
44
|
+
disabled: '#6b7280',
|
|
45
|
+
divider: '#3a4556',
|
|
46
|
+
error: '#ef4444',
|
|
47
|
+
foreground: '#f8f9fa',
|
|
48
|
+
muted: '#e1e4e8',
|
|
49
|
+
overlay: '#1e2d3d',
|
|
50
|
+
placeholder: '#8b92a0',
|
|
51
|
+
sheet: '#1a2332',
|
|
52
|
+
subtitle: '#8b92a0',
|
|
53
|
+
success: '#22c55e',
|
|
54
|
+
surface: '#2a3544',
|
|
55
|
+
underlay: '#131a26',
|
|
42
56
|
// https://uicolors.app/create
|
|
43
57
|
gray: {
|
|
44
58
|
50: '#f7f8f8',
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
diff --git a/node_modules/react-native-animatable/createAnimatableComponent.js b/node_modules/react-native-animatable/createAnimatableComponent.js
|
|
2
|
+
index 7be96ea..e8fd51a 100644
|
|
3
|
+
--- a/node_modules/react-native-animatable/createAnimatableComponent.js
|
|
4
|
+
+++ b/node_modules/react-native-animatable/createAnimatableComponent.js
|
|
5
|
+
@@ -31,6 +31,9 @@ const INTERPOLATION_STYLE_PROPERTIES = [
|
|
6
|
+
'textDecorationColor',
|
|
7
|
+
// Image styles
|
|
8
|
+
'tintColor',
|
|
9
|
+
+ // 'width', 'height'
|
|
10
|
+
+ 'width',
|
|
11
|
+
+ 'height'
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
const ZERO_CLAMPED_STYLE_PROPERTIES = ['width', 'height'];
|
|
15
|
+
@@ -241,10 +244,7 @@ export default function createAnimatableComponent(WrappedComponent) {
|
|
16
|
+
);
|
|
17
|
+
Object.keys(currentTransitionValues).forEach((key) => {
|
|
18
|
+
const value = currentTransitionValues[key];
|
|
19
|
+
- if (
|
|
20
|
+
- INTERPOLATION_STYLE_PROPERTIES.indexOf(key) !== -1 ||
|
|
21
|
+
- typeof value !== 'number'
|
|
22
|
+
- ) {
|
|
23
|
+
+ if (INTERPOLATION_STYLE_PROPERTIES.indexOf(key) !== -1) {
|
|
24
|
+
transitionValues[key] = new Animated.Value(0);
|
|
25
|
+
styleValues[key] = value;
|
|
26
|
+
} else {
|
|
27
|
+
@@ -454,30 +454,18 @@ export default function createAnimatableComponent(WrappedComponent) {
|
|
28
|
+
if (!transitionValue) {
|
|
29
|
+
transitionValue = new Animated.Value(0);
|
|
30
|
+
}
|
|
31
|
+
- const needsInterpolation =
|
|
32
|
+
- INTERPOLATION_STYLE_PROPERTIES.indexOf(property) !== -1 ||
|
|
33
|
+
- typeof value !== 'number';
|
|
34
|
+
- const needsZeroClamping =
|
|
35
|
+
- ZERO_CLAMPED_STYLE_PROPERTIES.indexOf(property) !== -1;
|
|
36
|
+
+ const needsInterpolation = INTERPOLATION_STYLE_PROPERTIES.indexOf(property) !== -1;
|
|
37
|
+
+ const needsZeroClamping = ZERO_CLAMPED_STYLE_PROPERTIES.indexOf(property) !== -1;
|
|
38
|
+
if (needsInterpolation) {
|
|
39
|
+
transitionValue.setValue(0);
|
|
40
|
+
transitionStyle[property] = transitionValue.interpolate({
|
|
41
|
+
inputRange: [0, 1],
|
|
42
|
+
outputRange: [fromValue, toValue],
|
|
43
|
+
+ extrapolateLeft: needsZeroClamping ? 'clamp' : 'extend'
|
|
44
|
+
});
|
|
45
|
+
currentTransitionValues[property] = toValue;
|
|
46
|
+
toValuesFlat[property] = 1;
|
|
47
|
+
} else {
|
|
48
|
+
- if (needsZeroClamping) {
|
|
49
|
+
- transitionStyle[property] = transitionValue.interpolate({
|
|
50
|
+
- inputRange: [0, 1],
|
|
51
|
+
- outputRange: [0, 1],
|
|
52
|
+
- extrapolateLeft: 'clamp',
|
|
53
|
+
- });
|
|
54
|
+
- currentTransitionValues[property] = toValue;
|
|
55
|
+
- } else {
|
|
56
|
+
- transitionStyle[property] = transitionValue;
|
|
57
|
+
- }
|
|
58
|
+
transitionValue.setValue(fromValue);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
@@ -504,9 +492,7 @@ export default function createAnimatableComponent(WrappedComponent) {
|
|
62
|
+
|
|
63
|
+
Object.keys(toValuesFlat).forEach((property) => {
|
|
64
|
+
const toValue = toValuesFlat[property];
|
|
65
|
+
- const needsInterpolation =
|
|
66
|
+
- INTERPOLATION_STYLE_PROPERTIES.indexOf(property) !== -1 ||
|
|
67
|
+
- typeof value !== 'number';
|
|
68
|
+
+ const needsInterpolation = INTERPOLATION_STYLE_PROPERTIES.indexOf(property) !== -1;
|
|
69
|
+
const needsZeroClamping =
|
|
70
|
+
ZERO_CLAMPED_STYLE_PROPERTIES.indexOf(property) !== -1;
|
|
71
|
+
const transitionStyle = this.state.transitionStyle[property];
|