@fadyshawky/react-native-magic 2.0.4 → 2.0.5

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.
Files changed (110) hide show
  1. package/package.json +1 -1
  2. package/template/src/common/ImageResources.g.ts +33 -1
  3. package/template/src/common/components/Background.tsx +3 -1
  4. package/template/src/common/components/Container.tsx +1 -1
  5. package/template/src/common/components/OTPInput.tsx +3 -2
  6. package/template/src/common/components/PrimaryButton.tsx +23 -23
  7. package/template/src/common/components/PrimaryTextInput.tsx +189 -199
  8. package/template/src/common/components/RadioIcon.tsx +4 -4
  9. package/template/src/common/components/SafeText.tsx +41 -0
  10. package/template/src/common/components/SearchBar.tsx +19 -17
  11. package/template/src/common/components/TryAgain.tsx +3 -3
  12. package/template/src/common/localization/localization.ts +10 -0
  13. package/template/src/common/localization/translations/commonLocalization.ts +97 -0
  14. package/template/src/common/localization/translations/homeLocalization.ts +24 -0
  15. package/template/src/common/localization/translations/loginLocalization.ts +28 -2
  16. package/template/src/common/localization/translations/mainNavigationLocalization.ts +30 -0
  17. package/template/src/common/localization/translations/navigationLocalization.ts +48 -0
  18. package/template/src/common/localization/translations/otpLocalization.ts +28 -0
  19. package/template/src/common/localization/translations/passwordLocalization.ts +54 -0
  20. package/template/src/common/localization/translations/posLocalization.ts +196 -0
  21. package/template/src/common/utils/FeesCaalculation.tsx +37 -0
  22. package/template/src/common/utils/index.tsx +11 -0
  23. package/template/src/common/utils/printData.tsx +161 -0
  24. package/template/src/common/validations/errorValidations.ts +3 -2
  25. package/template/src/components/PrinterExample.js +226 -0
  26. package/template/src/core/api/serverHeaders.ts +62 -1
  27. package/template/src/core/store/Categories/categoryActions.ts +33 -0
  28. package/template/src/core/store/Categories/categorySlice.ts +75 -0
  29. package/template/src/core/store/Categories/categoryState.ts +41 -0
  30. package/template/src/core/store/Providers/providersActions.ts +102 -0
  31. package/template/src/core/store/Providers/providersSlice.ts +136 -0
  32. package/template/src/core/store/Providers/providersState.ts +37 -0
  33. package/template/src/core/store/Services/servicesActions.ts +191 -0
  34. package/template/src/core/store/Services/servicesSlice.ts +205 -0
  35. package/template/src/core/store/Services/servicesState.ts +466 -0
  36. package/template/src/core/store/app/appSlice.ts +13 -5
  37. package/template/src/core/store/app/appState.ts +10 -2
  38. package/template/src/core/store/rootReducer.ts +6 -1
  39. package/template/src/core/store/store.tsx +55 -2
  40. package/template/src/core/store/user/userActions.ts +164 -26
  41. package/template/src/core/store/user/userSlice.ts +193 -21
  42. package/template/src/core/store/user/userState.ts +148 -25
  43. package/template/src/core/theme/colors.ts +70 -94
  44. package/template/src/core/theme/commonConsts.ts +1 -1
  45. package/template/src/core/theme/commonSizes.ts +94 -119
  46. package/template/src/core/theme/commonStyles.ts +22 -22
  47. package/template/src/core/theme/fonts.ts +14 -13
  48. package/template/src/core/theme/themes.ts +75 -386
  49. package/template/src/core/theme/types.ts +15 -201
  50. package/template/src/core/utils/stringUtils.ts +114 -0
  51. package/template/src/modules/SunmiCard.js +212 -0
  52. package/template/src/modules/SunmiPrepaid.ts +122 -0
  53. package/template/src/navigation/AuthStack.tsx +8 -0
  54. package/template/src/navigation/HeaderComponents.tsx +76 -1
  55. package/template/src/navigation/MainNavigation.tsx +3 -1
  56. package/template/src/navigation/MainStack.tsx +130 -56
  57. package/template/src/navigation/TabBar.tsx +111 -59
  58. package/template/src/navigation/types.ts +24 -0
  59. package/template/src/screens/Categories/Categories.tsx +141 -0
  60. package/template/src/screens/Categories/hooks/useCategoriesData.ts +33 -0
  61. package/template/src/screens/Categories/types.ts +7 -0
  62. package/template/src/screens/Favorites/Favorites.tsx +130 -0
  63. package/template/src/screens/ForceChangePassword/ForceChangePasswordScreen.tsx +155 -0
  64. package/template/src/screens/History/History.tsx +430 -0
  65. package/template/src/screens/History/hooks/useHistoryData.ts +49 -0
  66. package/template/src/screens/History/types.ts +7 -0
  67. package/template/src/screens/InquiredBill/InquiredBill.tsx +443 -0
  68. package/template/src/screens/InquiredBill/hooks/useInquiredData.ts +91 -0
  69. package/template/src/screens/Login/Login.tsx +85 -85
  70. package/template/src/screens/OTP/OTPScreen.tsx +170 -0
  71. package/template/src/screens/PaymentConfirmation/PaymentConfirmation.tsx +326 -0
  72. package/template/src/screens/Providers/Providers.tsx +166 -0
  73. package/template/src/screens/Providers/hooks/useProvidersData.ts +33 -0
  74. package/template/src/screens/Providers/types.ts +7 -0
  75. package/template/src/screens/ReceiptScreen/ReceiptScreen.tsx +181 -0
  76. package/template/src/screens/ReceiptScreen/hooks/useReceiptData.ts +46 -0
  77. package/template/src/screens/ReceiptScreen/utils/utils.tsx +156 -0
  78. package/template/src/screens/Services/Services.tsx +144 -0
  79. package/template/src/screens/Services/hooks/useServicesData.ts +41 -0
  80. package/template/src/screens/SingleService/Components/FawryInputs.tsx +446 -0
  81. package/template/src/screens/SingleService/SingleService.tsx +229 -0
  82. package/template/src/screens/SingleService/hooks/useServiceData.ts +164 -0
  83. package/template/src/screens/home/Components/PayByCode.tsx +129 -0
  84. package/template/src/screens/home/HomeScreen.tsx +268 -77
  85. package/template/src/screens/home/hooks/useHomeData.ts +32 -38
  86. package/template/src/screens/index.tsx +24 -0
  87. package/template/src/screens/profile/Profile.tsx +290 -2
  88. package/template/src/services/SunmiPrinterInternal.js +268 -0
  89. package/template/src/types/sunmiPrepaid.d.ts +20 -0
  90. package/template/src/utils/SunmiPrinter.ts +442 -0
  91. package/template/src/utils/feesCalculator.ts +92 -0
  92. package/template/src/common/components/Stepper.tsx +0 -153
  93. package/template/src/common/components/Svg.tsx +0 -25
  94. package/template/src/common/hooks/useDebounce.ts +0 -17
  95. package/template/src/common/hooks/usePrevious.ts +0 -11
  96. package/template/src/common/localization/intlFormatter.ts +0 -37
  97. package/template/src/common/urls/emailUrl.ts +0 -20
  98. package/template/src/common/urls/mapUrl.ts +0 -22
  99. package/template/src/common/utils/listHandlers.ts +0 -30
  100. package/template/src/common/utils/serializeQueryParams.ts +0 -10
  101. package/template/src/common/validations/hooks/useDatesError.ts +0 -40
  102. package/template/src/common/validations/profileValidations.ts +0 -30
  103. package/template/src/core/theme/shadows.ts +0 -135
  104. package/template/src/navigation/TopTabBar.tsx +0 -77
  105. package/template/src/screens/Settings/Settings.tsx +0 -5
  106. package/template/src/screens/home/components/CarouselSection.tsx +0 -79
  107. package/template/src/screens/home/components/FeaturedCarousel.tsx +0 -128
  108. package/template/src/screens/main/Main.tsx +0 -5
  109. package/template/src/screens/registration/RegistrationScreen.tsx +0 -198
  110. package/template/src/screens/resetPassword/ForgotPasswordScreen.tsx +0 -129
@@ -6,8 +6,8 @@ import {
6
6
  ViewStyle,
7
7
  } from 'react-native';
8
8
  import {Theme} from './types';
9
+ import {FontSizes, LineHeight, Spacing} from './commonSizes';
9
10
  import {Fonts} from './fonts';
10
- import {CommonSizes} from './commonSizes';
11
11
 
12
12
  export const screenComponentWidth = Dimensions.get('screen').width - 60;
13
13
  export const screenWidth = Dimensions.get('screen').width;
@@ -131,34 +131,34 @@ export const createThemedStyles = (theme: Theme) =>
131
131
  } as TextStyle,
132
132
  h4_semiBold: {
133
133
  fontFamily: Fonts.semiBold,
134
- fontSize: CommonSizes.font.medium,
135
- lineHeight: CommonSizes.lineHeight.medium,
134
+ fontSize: FontSizes.medium,
135
+ lineHeight: LineHeight.medium,
136
136
  } as TextStyle,
137
137
  h4_regular: {
138
138
  fontFamily: Fonts.regular,
139
- fontSize: CommonSizes.font.medium,
140
- lineHeight: CommonSizes.lineHeight.medium,
139
+ fontSize: FontSizes.medium,
140
+ lineHeight: LineHeight.medium,
141
141
  } as TextStyle,
142
142
  body_bold: {
143
143
  fontFamily: Fonts.bold,
144
- fontSize: CommonSizes.font.small,
145
- lineHeight: CommonSizes.lineHeight.small,
144
+ fontSize: FontSizes.small,
145
+ lineHeight: LineHeight.small,
146
146
  } as TextStyle,
147
147
  body_bold_underlined: {
148
148
  fontFamily: Fonts.bold,
149
- fontSize: CommonSizes.font.small,
150
- lineHeight: CommonSizes.lineHeight.small,
149
+ fontSize: FontSizes.small,
150
+ lineHeight: LineHeight.small,
151
151
  textDecorationLine: 'underline',
152
152
  } as TextStyle,
153
153
  body_semiBold: {
154
154
  fontFamily: Fonts.semiBold,
155
- fontSize: CommonSizes.font.small,
156
- lineHeight: CommonSizes.lineHeight.small,
155
+ fontSize: FontSizes.small,
156
+ lineHeight: LineHeight.small,
157
157
  } as TextStyle,
158
158
  body_regular: {
159
159
  fontFamily: Fonts.regular,
160
- fontSize: CommonSizes.font.small,
161
- lineHeight: CommonSizes.lineHeight.small,
160
+ fontSize: FontSizes.small,
161
+ lineHeight: LineHeight.small,
162
162
  } as TextStyle,
163
163
  tabBar_bold: {
164
164
  fontFamily: Fonts.bold,
@@ -204,47 +204,47 @@ export const CommonStyles = createThemedStyles({
204
204
  text: {
205
205
  header1: {
206
206
  fontFamily: Fonts.medium,
207
- fontSize: CommonSizes.font.large,
207
+ fontSize: FontSizes.header1,
208
208
  color: '#000000',
209
209
  },
210
210
  header2: {
211
211
  fontFamily: Fonts.normal,
212
- fontSize: CommonSizes.font.largePlus,
212
+ fontSize: FontSizes.header2,
213
213
  color: '#000000',
214
214
  },
215
215
  body1: {
216
216
  fontFamily: Fonts.light,
217
- fontSize: CommonSizes.font.medium,
217
+ fontSize: FontSizes.body1,
218
218
  color: '#000000',
219
219
  },
220
220
  body2: {
221
221
  fontFamily: Fonts.regular,
222
- fontSize: CommonSizes.font.mediumPlus,
222
+ fontSize: FontSizes.body2,
223
223
  color: '#000000',
224
224
  },
225
225
  button: {
226
226
  fontFamily: Fonts.regular,
227
- fontSize: CommonSizes.font.mediumPlus,
227
+ fontSize: FontSizes.button,
228
228
  color: '#FFFFFF',
229
229
  },
230
230
  cards: {
231
231
  fontFamily: Fonts.semiBold,
232
- fontSize: CommonSizes.font.mediumPlus,
232
+ fontSize: FontSizes.card,
233
233
  color: '#000000',
234
234
  },
235
235
  SearchBar: {
236
236
  fontFamily: Fonts.light,
237
- fontSize: CommonSizes.font.mediumPlus,
237
+ fontSize: FontSizes.searchBar,
238
238
  color: '#000000',
239
239
  },
240
240
  label: {
241
241
  fontFamily: Fonts.light,
242
- fontSize: CommonSizes.font.mediumPlus,
242
+ fontSize: FontSizes.label,
243
243
  color: '#000000',
244
244
  },
245
245
  hyperlink: {
246
246
  fontFamily: Fonts.light,
247
- fontSize: CommonSizes.font.mediumPlus,
247
+ fontSize: FontSizes.hyperlink,
248
248
  color: '#000000',
249
249
  textDecorationLine: 'underline',
250
250
  },
@@ -1,16 +1,17 @@
1
1
  export const Fonts = {
2
- // Almarai Font Family
3
- light: 'Almarai-Light',
4
- regular: 'Almarai-Regular',
5
- bold: 'Almarai-Bold',
6
- extraBold: 'Almarai-ExtraBold',
2
+ // Inter Variable Font
3
+ regular: 'Inter-VariableFont_opsz,wght',
4
+ italic: 'Inter-Italic-VariableFont_opsz,wght',
7
5
 
8
- // Legacy support - keeping these for backward compatibility
9
- // but they now map to Almarai equivalents
10
- thin: 'Almarai-Light',
11
- normal: 'Almarai-Regular',
12
- medium: 'Almarai-Regular',
13
- semiBold: 'Almarai-Bold',
14
- black: 'Almarai-ExtraBold',
15
- italic: 'Almarai-Regular', // Almarai doesn't have italic variant
6
+ // Kanit Font
7
+ medium: 'Kanit-Medium',
8
+
9
+ // Font weights for Inter Variable Font
10
+ thin: 'Inter-Thin',
11
+ light: 'Inter-Light',
12
+ normal: 'Inter-Regular',
13
+ semiBold: 'Inter-SemiBold',
14
+ bold: 'Inter-Bold',
15
+ extraBold: 'Inter-ExtraBold',
16
+ black: 'Inter-Black',
16
17
  };