@kiosinc/commons-rn 0.1.7
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/LICENSE +20 -0
- package/README.md +31 -0
- package/lib/commonjs/auth/api/authentication.js +20 -0
- package/lib/commonjs/auth/api/authentication.js.map +1 -0
- package/lib/commonjs/auth/appLogo.svg +9 -0
- package/lib/commonjs/auth/hooks/useAuthenticateRequests.js +52 -0
- package/lib/commonjs/auth/hooks/useAuthenticateRequests.js.map +1 -0
- package/lib/commonjs/auth/hooks/useAuthentication.js +89 -0
- package/lib/commonjs/auth/hooks/useAuthentication.js.map +1 -0
- package/lib/commonjs/auth/index.js +33 -0
- package/lib/commonjs/auth/index.js.map +1 -0
- package/lib/commonjs/auth/providers/authentication/AuthenticationProvider.js +57 -0
- package/lib/commonjs/auth/providers/authentication/AuthenticationProvider.js.map +1 -0
- package/lib/commonjs/auth/providers/authentication/actions/authentication.actions.js +13 -0
- package/lib/commonjs/auth/providers/authentication/actions/authentication.actions.js.map +1 -0
- package/lib/commonjs/auth/providers/authentication/index.js +50 -0
- package/lib/commonjs/auth/providers/authentication/index.js.map +1 -0
- package/lib/commonjs/auth/providers/authentication/reducer/authentication.reducer.js +21 -0
- package/lib/commonjs/auth/providers/authentication/reducer/authentication.reducer.js.map +1 -0
- package/lib/commonjs/auth/providers/authentication/types/authentication.types.js +11 -0
- package/lib/commonjs/auth/providers/authentication/types/authentication.types.js.map +1 -0
- package/lib/commonjs/auth/screens/LoginScreen.js +131 -0
- package/lib/commonjs/auth/screens/LoginScreen.js.map +1 -0
- package/lib/commonjs/auth/screens/ResetPassword.js +90 -0
- package/lib/commonjs/auth/screens/ResetPassword.js.map +1 -0
- package/lib/commonjs/auth/screens/ResetPasswordInstructionsSent.js +34 -0
- package/lib/commonjs/auth/screens/ResetPasswordInstructionsSent.js.map +1 -0
- package/lib/commonjs/auth/screens/SignUp.js +176 -0
- package/lib/commonjs/auth/screens/SignUp.js.map +1 -0
- package/lib/commonjs/auth/screens/SignUpPassword.js +103 -0
- package/lib/commonjs/auth/screens/SignUpPassword.js.map +1 -0
- package/lib/commonjs/auth/screens/VerifyPhoneNumber.js +95 -0
- package/lib/commonjs/auth/screens/VerifyPhoneNumber.js.map +1 -0
- package/lib/commonjs/auth/screens/index.js +37 -0
- package/lib/commonjs/auth/screens/index.js.map +1 -0
- package/lib/commonjs/auth/screens/validators.js +39 -0
- package/lib/commonjs/auth/screens/validators.js.map +1 -0
- package/lib/commonjs/components/Alert.js +109 -0
- package/lib/commonjs/components/Alert.js.map +1 -0
- package/lib/commonjs/components/Badge.js +20 -0
- package/lib/commonjs/components/Badge.js.map +1 -0
- package/lib/commonjs/components/BottomSheet.js +60 -0
- package/lib/commonjs/components/BottomSheet.js.map +1 -0
- package/lib/commonjs/components/Button.js +20 -0
- package/lib/commonjs/components/Button.js.map +1 -0
- package/lib/commonjs/components/Card.js +19 -0
- package/lib/commonjs/components/Card.js.map +1 -0
- package/lib/commonjs/components/Divider.js +19 -0
- package/lib/commonjs/components/Divider.js.map +1 -0
- package/lib/commonjs/components/FAB.js +19 -0
- package/lib/commonjs/components/FAB.js.map +1 -0
- package/lib/commonjs/components/Header.js +73 -0
- package/lib/commonjs/components/Header.js.map +1 -0
- package/lib/commonjs/components/IconButton.js +19 -0
- package/lib/commonjs/components/IconButton.js.map +1 -0
- package/lib/commonjs/components/Image.js +45 -0
- package/lib/commonjs/components/Image.js.map +1 -0
- package/lib/commonjs/components/KeyboardAvoidingView.js +23 -0
- package/lib/commonjs/components/KeyboardAvoidingView.js.map +1 -0
- package/lib/commonjs/components/LineLoader.js +61 -0
- package/lib/commonjs/components/LineLoader.js.map +1 -0
- package/lib/commonjs/components/LinkButton.js +32 -0
- package/lib/commonjs/components/LinkButton.js.map +1 -0
- package/lib/commonjs/components/OtpInputs.js +97 -0
- package/lib/commonjs/components/OtpInputs.js.map +1 -0
- package/lib/commonjs/components/ParentView.js +81 -0
- package/lib/commonjs/components/ParentView.js.map +1 -0
- package/lib/commonjs/components/Searchbar.js +22 -0
- package/lib/commonjs/components/Searchbar.js.map +1 -0
- package/lib/commonjs/components/SelectionDialog.js +130 -0
- package/lib/commonjs/components/SelectionDialog.js.map +1 -0
- package/lib/commonjs/components/Snackbar.js +69 -0
- package/lib/commonjs/components/Snackbar.js.map +1 -0
- package/lib/commonjs/components/Surface.js +19 -0
- package/lib/commonjs/components/Surface.js.map +1 -0
- package/lib/commonjs/components/Text.js +20 -0
- package/lib/commonjs/components/Text.js.map +1 -0
- package/lib/commonjs/components/TextInput.js +65 -0
- package/lib/commonjs/components/TextInput.js.map +1 -0
- package/lib/commonjs/components/ToggleButton.js +19 -0
- package/lib/commonjs/components/ToggleButton.js.map +1 -0
- package/lib/commonjs/components/Video.js +42 -0
- package/lib/commonjs/components/Video.js.map +1 -0
- package/lib/commonjs/components/View.js +20 -0
- package/lib/commonjs/components/View.js.map +1 -0
- package/lib/commonjs/components/index.js +174 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/index.js +37 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/theme/index.js +43 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/theme/theme.js +126 -0
- package/lib/commonjs/theme/theme.js.map +1 -0
- package/lib/commonjs/theme/tokens.js +204 -0
- package/lib/commonjs/theme/tokens.js.map +1 -0
- package/lib/commonjs/types/index.d.js +2 -0
- package/lib/commonjs/types/index.d.js.map +1 -0
- package/lib/commonjs/types/svg.d.js +2 -0
- package/lib/commonjs/types/svg.d.js.map +1 -0
- package/lib/module/auth/api/authentication.js +11 -0
- package/lib/module/auth/api/authentication.js.map +1 -0
- package/lib/module/auth/appLogo.svg +9 -0
- package/lib/module/auth/hooks/useAuthenticateRequests.js +44 -0
- package/lib/module/auth/hooks/useAuthenticateRequests.js.map +1 -0
- package/lib/module/auth/hooks/useAuthentication.js +81 -0
- package/lib/module/auth/hooks/useAuthentication.js.map +1 -0
- package/lib/module/auth/index.js +5 -0
- package/lib/module/auth/index.js.map +1 -0
- package/lib/module/auth/providers/authentication/AuthenticationProvider.js +45 -0
- package/lib/module/auth/providers/authentication/AuthenticationProvider.js.map +1 -0
- package/lib/module/auth/providers/authentication/actions/authentication.actions.js +6 -0
- package/lib/module/auth/providers/authentication/actions/authentication.actions.js.map +1 -0
- package/lib/module/auth/providers/authentication/index.js +5 -0
- package/lib/module/auth/providers/authentication/index.js.map +1 -0
- package/lib/module/auth/providers/authentication/reducer/authentication.reducer.js +14 -0
- package/lib/module/auth/providers/authentication/reducer/authentication.reducer.js.map +1 -0
- package/lib/module/auth/providers/authentication/types/authentication.types.js +5 -0
- package/lib/module/auth/providers/authentication/types/authentication.types.js.map +1 -0
- package/lib/module/auth/screens/LoginScreen.js +121 -0
- package/lib/module/auth/screens/LoginScreen.js.map +1 -0
- package/lib/module/auth/screens/ResetPassword.js +82 -0
- package/lib/module/auth/screens/ResetPassword.js.map +1 -0
- package/lib/module/auth/screens/ResetPasswordInstructionsSent.js +26 -0
- package/lib/module/auth/screens/ResetPasswordInstructionsSent.js.map +1 -0
- package/lib/module/auth/screens/SignUp.js +168 -0
- package/lib/module/auth/screens/SignUp.js.map +1 -0
- package/lib/module/auth/screens/SignUpPassword.js +95 -0
- package/lib/module/auth/screens/SignUpPassword.js.map +1 -0
- package/lib/module/auth/screens/VerifyPhoneNumber.js +87 -0
- package/lib/module/auth/screens/VerifyPhoneNumber.js.map +1 -0
- package/lib/module/auth/screens/index.js +29 -0
- package/lib/module/auth/screens/index.js.map +1 -0
- package/lib/module/auth/screens/validators.js +31 -0
- package/lib/module/auth/screens/validators.js.map +1 -0
- package/lib/module/components/Alert.js +100 -0
- package/lib/module/components/Alert.js.map +1 -0
- package/lib/module/components/Badge.js +12 -0
- package/lib/module/components/Badge.js.map +1 -0
- package/lib/module/components/BottomSheet.js +52 -0
- package/lib/module/components/BottomSheet.js.map +1 -0
- package/lib/module/components/Button.js +12 -0
- package/lib/module/components/Button.js.map +1 -0
- package/lib/module/components/Card.js +11 -0
- package/lib/module/components/Card.js.map +1 -0
- package/lib/module/components/Divider.js +11 -0
- package/lib/module/components/Divider.js.map +1 -0
- package/lib/module/components/FAB.js +11 -0
- package/lib/module/components/FAB.js.map +1 -0
- package/lib/module/components/Header.js +66 -0
- package/lib/module/components/Header.js.map +1 -0
- package/lib/module/components/IconButton.js +11 -0
- package/lib/module/components/IconButton.js.map +1 -0
- package/lib/module/components/Image.js +35 -0
- package/lib/module/components/Image.js.map +1 -0
- package/lib/module/components/KeyboardAvoidingView.js +15 -0
- package/lib/module/components/KeyboardAvoidingView.js.map +1 -0
- package/lib/module/components/LineLoader.js +52 -0
- package/lib/module/components/LineLoader.js.map +1 -0
- package/lib/module/components/LinkButton.js +24 -0
- package/lib/module/components/LinkButton.js.map +1 -0
- package/lib/module/components/OtpInputs.js +87 -0
- package/lib/module/components/OtpInputs.js.map +1 -0
- package/lib/module/components/ParentView.js +72 -0
- package/lib/module/components/ParentView.js.map +1 -0
- package/lib/module/components/Searchbar.js +14 -0
- package/lib/module/components/Searchbar.js.map +1 -0
- package/lib/module/components/SelectionDialog.js +121 -0
- package/lib/module/components/SelectionDialog.js.map +1 -0
- package/lib/module/components/Snackbar.js +60 -0
- package/lib/module/components/Snackbar.js.map +1 -0
- package/lib/module/components/Surface.js +11 -0
- package/lib/module/components/Surface.js.map +1 -0
- package/lib/module/components/Text.js +12 -0
- package/lib/module/components/Text.js.map +1 -0
- package/lib/module/components/TextInput.js +56 -0
- package/lib/module/components/TextInput.js.map +1 -0
- package/lib/module/components/ToggleButton.js +11 -0
- package/lib/module/components/ToggleButton.js.map +1 -0
- package/lib/module/components/Video.js +32 -0
- package/lib/module/components/Video.js.map +1 -0
- package/lib/module/components/View.js +12 -0
- package/lib/module/components/View.js.map +1 -0
- package/lib/module/components/index.js +25 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/theme/index.js +36 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/theme.js +119 -0
- package/lib/module/theme/theme.js.map +1 -0
- package/lib/module/theme/tokens.js +198 -0
- package/lib/module/theme/tokens.js.map +1 -0
- package/lib/module/types/index.d.js +2 -0
- package/lib/module/types/index.d.js.map +1 -0
- package/lib/module/types/svg.d.js +2 -0
- package/lib/module/types/svg.d.js.map +1 -0
- package/lib/typescript/src/auth/api/authentication.d.ts +4 -0
- package/lib/typescript/src/auth/api/authentication.d.ts.map +1 -0
- package/lib/typescript/src/auth/hooks/useAuthenticateRequests.d.ts +2 -0
- package/lib/typescript/src/auth/hooks/useAuthenticateRequests.d.ts.map +1 -0
- package/lib/typescript/src/auth/hooks/useAuthentication.d.ts +19 -0
- package/lib/typescript/src/auth/hooks/useAuthentication.d.ts.map +1 -0
- package/lib/typescript/src/auth/index.d.ts +5 -0
- package/lib/typescript/src/auth/index.d.ts.map +1 -0
- package/lib/typescript/src/auth/providers/authentication/AuthenticationProvider.d.ts +8 -0
- package/lib/typescript/src/auth/providers/authentication/AuthenticationProvider.d.ts.map +1 -0
- package/lib/typescript/src/auth/providers/authentication/actions/authentication.actions.d.ts +3 -0
- package/lib/typescript/src/auth/providers/authentication/actions/authentication.actions.d.ts.map +1 -0
- package/lib/typescript/src/auth/providers/authentication/index.d.ts +5 -0
- package/lib/typescript/src/auth/providers/authentication/index.d.ts.map +1 -0
- package/lib/typescript/src/auth/providers/authentication/reducer/authentication.reducer.d.ts +3 -0
- package/lib/typescript/src/auth/providers/authentication/reducer/authentication.reducer.d.ts.map +1 -0
- package/lib/typescript/src/auth/providers/authentication/types/authentication.types.d.ts +15 -0
- package/lib/typescript/src/auth/providers/authentication/types/authentication.types.d.ts.map +1 -0
- package/lib/typescript/src/auth/screens/LoginScreen.d.ts +3 -0
- package/lib/typescript/src/auth/screens/LoginScreen.d.ts.map +1 -0
- package/lib/typescript/src/auth/screens/ResetPassword.d.ts +3 -0
- package/lib/typescript/src/auth/screens/ResetPassword.d.ts.map +1 -0
- package/lib/typescript/src/auth/screens/ResetPasswordInstructionsSent.d.ts +8 -0
- package/lib/typescript/src/auth/screens/ResetPasswordInstructionsSent.d.ts.map +1 -0
- package/lib/typescript/src/auth/screens/SignUp.d.ts +9 -0
- package/lib/typescript/src/auth/screens/SignUp.d.ts.map +1 -0
- package/lib/typescript/src/auth/screens/SignUpPassword.d.ts +8 -0
- package/lib/typescript/src/auth/screens/SignUpPassword.d.ts.map +1 -0
- package/lib/typescript/src/auth/screens/VerifyPhoneNumber.d.ts +8 -0
- package/lib/typescript/src/auth/screens/VerifyPhoneNumber.d.ts.map +1 -0
- package/lib/typescript/src/auth/screens/index.d.ts +3 -0
- package/lib/typescript/src/auth/screens/index.d.ts.map +1 -0
- package/lib/typescript/src/auth/screens/validators.d.ts +36 -0
- package/lib/typescript/src/auth/screens/validators.d.ts.map +1 -0
- package/lib/typescript/src/components/Alert.d.ts +19 -0
- package/lib/typescript/src/components/Alert.d.ts.map +1 -0
- package/lib/typescript/src/components/Badge.d.ts +9 -0
- package/lib/typescript/src/components/Badge.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet.d.ts +7 -0
- package/lib/typescript/src/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/Button.d.ts +9 -0
- package/lib/typescript/src/components/Button.d.ts.map +1 -0
- package/lib/typescript/src/components/Card.d.ts +9 -0
- package/lib/typescript/src/components/Card.d.ts.map +1 -0
- package/lib/typescript/src/components/Divider.d.ts +9 -0
- package/lib/typescript/src/components/Divider.d.ts.map +1 -0
- package/lib/typescript/src/components/FAB.d.ts +9 -0
- package/lib/typescript/src/components/FAB.d.ts.map +1 -0
- package/lib/typescript/src/components/Header.d.ts +18 -0
- package/lib/typescript/src/components/Header.d.ts.map +1 -0
- package/lib/typescript/src/components/IconButton.d.ts +9 -0
- package/lib/typescript/src/components/IconButton.d.ts.map +1 -0
- package/lib/typescript/src/components/Image.d.ts +9 -0
- package/lib/typescript/src/components/Image.d.ts.map +1 -0
- package/lib/typescript/src/components/KeyboardAvoidingView.d.ts +9 -0
- package/lib/typescript/src/components/KeyboardAvoidingView.d.ts.map +1 -0
- package/lib/typescript/src/components/LineLoader.d.ts +10 -0
- package/lib/typescript/src/components/LineLoader.d.ts.map +1 -0
- package/lib/typescript/src/components/LinkButton.d.ts +9 -0
- package/lib/typescript/src/components/LinkButton.d.ts.map +1 -0
- package/lib/typescript/src/components/OtpInputs.d.ts +18 -0
- package/lib/typescript/src/components/OtpInputs.d.ts.map +1 -0
- package/lib/typescript/src/components/ParentView.d.ts +19 -0
- package/lib/typescript/src/components/ParentView.d.ts.map +1 -0
- package/lib/typescript/src/components/Searchbar.d.ts +9 -0
- package/lib/typescript/src/components/Searchbar.d.ts.map +1 -0
- package/lib/typescript/src/components/SelectionDialog.d.ts +20 -0
- package/lib/typescript/src/components/SelectionDialog.d.ts.map +1 -0
- package/lib/typescript/src/components/Snackbar.d.ts +15 -0
- package/lib/typescript/src/components/Snackbar.d.ts.map +1 -0
- package/lib/typescript/src/components/Surface.d.ts +9 -0
- package/lib/typescript/src/components/Surface.d.ts.map +1 -0
- package/lib/typescript/src/components/Text.d.ts +13 -0
- package/lib/typescript/src/components/Text.d.ts.map +1 -0
- package/lib/typescript/src/components/TextInput.d.ts +12 -0
- package/lib/typescript/src/components/TextInput.d.ts.map +1 -0
- package/lib/typescript/src/components/ToggleButton.d.ts +9 -0
- package/lib/typescript/src/components/ToggleButton.d.ts.map +1 -0
- package/lib/typescript/src/components/Video.d.ts +4 -0
- package/lib/typescript/src/components/Video.d.ts.map +1 -0
- package/lib/typescript/src/components/View.d.ts +9 -0
- package/lib/typescript/src/components/View.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +25 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/theme/index.d.ts +284 -0
- package/lib/typescript/src/theme/index.d.ts.map +1 -0
- package/lib/typescript/src/theme/theme.d.ts +4 -0
- package/lib/typescript/src/theme/theme.d.ts.map +1 -0
- package/lib/typescript/src/theme/tokens.d.ts +371 -0
- package/lib/typescript/src/theme/tokens.d.ts.map +1 -0
- package/package.json +191 -0
- package/src/auth/api/authentication.ts +13 -0
- package/src/auth/appLogo.svg +9 -0
- package/src/auth/hooks/useAuthenticateRequests.ts +56 -0
- package/src/auth/hooks/useAuthentication.ts +106 -0
- package/src/auth/index.ts +4 -0
- package/src/auth/providers/authentication/AuthenticationProvider.tsx +68 -0
- package/src/auth/providers/authentication/actions/authentication.actions.ts +10 -0
- package/src/auth/providers/authentication/index.ts +4 -0
- package/src/auth/providers/authentication/reducer/authentication.reducer.ts +21 -0
- package/src/auth/providers/authentication/types/authentication.types.ts +17 -0
- package/src/auth/screens/LoginScreen.tsx +140 -0
- package/src/auth/screens/ResetPassword.tsx +85 -0
- package/src/auth/screens/ResetPasswordInstructionsSent.tsx +32 -0
- package/src/auth/screens/SignUp.tsx +176 -0
- package/src/auth/screens/SignUpPassword.tsx +124 -0
- package/src/auth/screens/VerifyPhoneNumber.tsx +100 -0
- package/src/auth/screens/index.tsx +26 -0
- package/src/auth/screens/validators.ts +73 -0
- package/src/components/Alert.tsx +157 -0
- package/src/components/Badge.tsx +50 -0
- package/src/components/BottomSheet.tsx +72 -0
- package/src/components/Button.tsx +47 -0
- package/src/components/Card.tsx +47 -0
- package/src/components/Divider.tsx +47 -0
- package/src/components/FAB.tsx +47 -0
- package/src/components/Header.tsx +123 -0
- package/src/components/IconButton.tsx +47 -0
- package/src/components/Image.tsx +78 -0
- package/src/components/KeyboardAvoidingView.tsx +55 -0
- package/src/components/LineLoader.tsx +70 -0
- package/src/components/LinkButton.tsx +64 -0
- package/src/components/OtpInputs.tsx +149 -0
- package/src/components/ParentView.tsx +164 -0
- package/src/components/Searchbar.tsx +47 -0
- package/src/components/SelectionDialog.tsx +191 -0
- package/src/components/Snackbar.tsx +83 -0
- package/src/components/Surface.tsx +47 -0
- package/src/components/Text.tsx +70 -0
- package/src/components/TextInput.tsx +116 -0
- package/src/components/ToggleButton.tsx +47 -0
- package/src/components/Video.tsx +37 -0
- package/src/components/View.tsx +55 -0
- package/src/components/index.ts +24 -0
- package/src/index.tsx +5 -0
- package/src/theme/index.ts +37 -0
- package/src/theme/theme.ts +125 -0
- package/src/theme/tokens.ts +209 -0
- package/src/types/index.d.ts +1 -0
- package/src/types/svg.d.ts +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ParentView","Text","View","Button","KeyboardAvoidingView","TextInput","React","useTranslation","Controller","useForm","yupResolver","passwordVerificationSchema","useAuthentication","SignUpPassword","route","params","t","useVerifyPhoneNumber","mutate","verifyPhoneNumber","isLoading","isVerifyingPhoneNumber","passwordExpectations","handleSubmit","control","formState","errors","isSubmitted","criteriaMode","resolver","defaultValues","password","onSubmit","data","createElement","justifyContent","px","alignItems","textAlign","variant","render","field","onChange","onBlur","value","passwordErrors","Object","values","types","flat","mt","error","message","my","secureTextEntry","mode","autoComplete","onChangeText","label","pt","map","expectation","index","didExpectationFoundInErrors","includes","flexDirection","key","color","name","loading","onPress"],"sourceRoot":"../../../../src","sources":["auth/screens/SignUpPassword.tsx"],"mappings":"AAAA,SACEA,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,MAAM,EACNC,oBAAoB,EACpBC,SAAS,QACJ,kBAAkB;AAEzB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,UAAU,EAAEC,OAAO,QAAQ,iBAAiB;AACrD,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,0BAA0B,QAAQ,cAAc;AACzD,SAASC,iBAAiB,QAAQ,4BAA4B;AAU9D,OAAO,MAAMC,cAA6C,GAAGA,CAAC;EAAEC;AAAM,CAAC,KAAK;EAC1E,MAAMC,MAAM,GAAGD,KAAK,CAACC,MAAM;EAC3B,MAAM;IAAEC;EAAE,CAA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,CAAC;IAEX,CAAE;IACFO,IAAI,EAAC;EAAU,CAChB,CAAC,eACF9D,KAAA,CAAA4B,aAAA,CAAC/B,MAAM;IACL+C,EAAE,EAAC,IAAI;IACPmB,OAAO,EAAEhD,sBAAuB;IAChCkC,IAAI,EAAC,WAAW;IAChBe,OAAO,EAAE/C,YAAY,CAACS,QAAQ;EAAE,GAE/BhB,CAAC,CAAC,UAAU,CACP,CACY,CACZ,CAAC;AAEjB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ParentView, Text, View, Button, LinkButton, OtpInputs, KeyboardAvoidingView } from '../../components';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { Controller, useForm } from 'react-hook-form';
|
|
5
|
+
import { yupResolver } from '@hookform/resolvers/yup';
|
|
6
|
+
import { verificationValidationSchema } from './validators';
|
|
7
|
+
import { useAuthentication } from '../hooks/useAuthentication';
|
|
8
|
+
export const VerifyPhoneNumberScreen = ({
|
|
9
|
+
route
|
|
10
|
+
}) => {
|
|
11
|
+
const params = route.params;
|
|
12
|
+
const {
|
|
13
|
+
t
|
|
14
|
+
} = useTranslation();
|
|
15
|
+
const {
|
|
16
|
+
useSignUp,
|
|
17
|
+
useVerifyPhoneNumber
|
|
18
|
+
} = useAuthentication();
|
|
19
|
+
const {
|
|
20
|
+
mutate: signUp,
|
|
21
|
+
isLoading: isSigningUp
|
|
22
|
+
} = useSignUp();
|
|
23
|
+
const {
|
|
24
|
+
mutate: resendCode,
|
|
25
|
+
isLoading: isResendingCode
|
|
26
|
+
} = useVerifyPhoneNumber();
|
|
27
|
+
const {
|
|
28
|
+
handleSubmit,
|
|
29
|
+
control
|
|
30
|
+
} = useForm({
|
|
31
|
+
resolver: yupResolver(verificationValidationSchema),
|
|
32
|
+
defaultValues: {
|
|
33
|
+
code: ''
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const onSubmit = data => {
|
|
37
|
+
signUp({
|
|
38
|
+
params,
|
|
39
|
+
code: data.code
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
return /*#__PURE__*/React.createElement(ParentView, {
|
|
43
|
+
justifyContent: "center",
|
|
44
|
+
px: "16"
|
|
45
|
+
}, /*#__PURE__*/React.createElement(KeyboardAvoidingView, null, /*#__PURE__*/React.createElement(View, {
|
|
46
|
+
alignItems: "center"
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
48
|
+
pb: "8",
|
|
49
|
+
textAlign: "center",
|
|
50
|
+
variant: "titleLarge"
|
|
51
|
+
}, t('authentication.verifyYourNumber')), /*#__PURE__*/React.createElement(Text, {
|
|
52
|
+
color: "onSurfaceVariant",
|
|
53
|
+
pb: "48",
|
|
54
|
+
textAlign: "center",
|
|
55
|
+
variant: "bodyLarge"
|
|
56
|
+
}, t('authentication.codeSent'))), /*#__PURE__*/React.createElement(Controller, {
|
|
57
|
+
control: control,
|
|
58
|
+
render: ({
|
|
59
|
+
field: {
|
|
60
|
+
onChange,
|
|
61
|
+
value
|
|
62
|
+
}
|
|
63
|
+
}) => {
|
|
64
|
+
return /*#__PURE__*/React.createElement(OtpInputs, {
|
|
65
|
+
handleChange: onChange,
|
|
66
|
+
code: value,
|
|
67
|
+
numberOfInputs: 6
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
name: "code"
|
|
71
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
72
|
+
mt: "48",
|
|
73
|
+
disabled: isResendingCode,
|
|
74
|
+
loading: isSigningUp,
|
|
75
|
+
mode: "contained",
|
|
76
|
+
onPress: handleSubmit(onSubmit)
|
|
77
|
+
}, t('continue')), /*#__PURE__*/React.createElement(LinkButton, {
|
|
78
|
+
disabled: isSigningUp,
|
|
79
|
+
loading: isResendingCode,
|
|
80
|
+
mt: "48",
|
|
81
|
+
mode: "text",
|
|
82
|
+
onPress: () => {
|
|
83
|
+
resendCode(params);
|
|
84
|
+
}
|
|
85
|
+
}, t('authentication.resendCode'))));
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=VerifyPhoneNumber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ParentView","Text","View","Button","LinkButton","OtpInputs","KeyboardAvoidingView","React","useTranslation","Controller","useForm","yupResolver","verificationValidationSchema","useAuthentication","VerifyPhoneNumberScreen","route","params","t","useSignUp","useVerifyPhoneNumber","mutate","signUp","isLoading","isSigningUp","resendCode","isResendingCode","handleSubmit","control","resolver","defaultValues","code","onSubmit","data","createElement","justifyContent","px","alignItems","pb","textAlign","variant","color","render","field","onChange","value","handleChange","numberOfInputs","name","mt","disabled","loading","mode","onPress"],"sourceRoot":"../../../../src","sources":["auth/screens/VerifyPhoneNumber.tsx"],"mappings":"AAAA,SACEA,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,MAAM,EACNC,UAAU,EACVC,SAAS,EACTC,oBAAoB,QACf,kBAAkB;AAEzB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,UAAU,EAAEC,OAAO,QAAQ,iBAAiB;AACrD,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,4BAA4B,QAAQ,cAAc;AAC3D,SAASC,iBAAiB,QAAQ,4BAA4B;AAU9D,OAAO,MAAMC,uBAEZ,GAAGA,CAAC;EAAEC;AAAM,CAAC,KAAK;EACjB,MAAMC,MAAM,GAAGD,KAAK,CAACC,MAAM;EAC3B,MAAM;IAAEC;EAAE,CAAC,GAAGT,cAAc,CAAC,CAAC;EAC9B,MAAM;IAAEU,SAAS;IAAEC;EAAqB,CAAC,GAAGN,iBAAiB,CAAC,CAAC;EAE/D,MAAM;IAAEO,MAAM,EAAEC,MAAM;IAAEC,SAAS,EAAEC;EAAY,CAAC,GAAGL,SAAS,CAAC,CAAC;EAC9D,MAAM;IAAEE,MAAM,EAAEI,UAAU;IAAEF,SAAS,EAAEG;EAAgB,CAAC,GACtDN,oBAAoB,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,eACFxC,KAAA,CAAA0B,aAAA,CAAC9B,MAAM;IACL6C,EAAE,EAAC,IAAI;IACPC,QAAQ,EAAExB,eAAgB;IAC1ByB,OAAO,EAAE3B,WAAY;IACrB4B,IAAI,EAAC,WAAW;IAChBC,OAAO,EAAE1B,YAAY,CAACK,QAAQ;EAAE,GAE/Bd,CAAC,CAAC,UAAU,CACP,CAAC,eACTV,KAAA,CAAA0B,aAAA,CAAC7B,UAAU;IACT6C,QAAQ,EAAE1B,WAAY;IACtB2B,OAAO,EAAEzB,eAAgB;IACzBuB,EAAE,EAAC,IAAI;IACPG,IAAI,EAAC,MAAM;IACXC,OAAO,EAAEA,CAAA,KAAM;MACb5B,UAAU,CAACR,MAAa,CAAC;IAC3B;EAAE,GAEDC,CAAC,CAAC,2BAA2B,CACpB,CACQ,CACZ,CAAC;AAEjB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LoginScreen } from './LoginScreen';
|
|
3
|
+
import { ResetPasswordScreen } from './ResetPassword';
|
|
4
|
+
import { ResetPasswordInstructionSent } from './ResetPasswordInstructionsSent';
|
|
5
|
+
import { SignUpScreen } from './SignUp';
|
|
6
|
+
import { VerifyPhoneNumberScreen } from './VerifyPhoneNumber';
|
|
7
|
+
import { SignUpPassword } from './SignUpPassword';
|
|
8
|
+
export const renderAuthNavigator = RootStack => {
|
|
9
|
+
return /*#__PURE__*/React.createElement(RootStack.Group, null, /*#__PURE__*/React.createElement(RootStack.Screen, {
|
|
10
|
+
name: "Login",
|
|
11
|
+
component: LoginScreen
|
|
12
|
+
}), /*#__PURE__*/React.createElement(RootStack.Screen, {
|
|
13
|
+
name: "ResetPassword",
|
|
14
|
+
component: ResetPasswordScreen
|
|
15
|
+
}), /*#__PURE__*/React.createElement(RootStack.Screen, {
|
|
16
|
+
name: "ResetPasswordInstructionSent",
|
|
17
|
+
component: ResetPasswordInstructionSent
|
|
18
|
+
}), /*#__PURE__*/React.createElement(RootStack.Screen, {
|
|
19
|
+
name: "SignUp",
|
|
20
|
+
component: SignUpScreen
|
|
21
|
+
}), /*#__PURE__*/React.createElement(RootStack.Screen, {
|
|
22
|
+
name: "VerifyPhoneNumber",
|
|
23
|
+
component: VerifyPhoneNumberScreen
|
|
24
|
+
}), /*#__PURE__*/React.createElement(RootStack.Screen, {
|
|
25
|
+
name: "SignUpPassword",
|
|
26
|
+
component: SignUpPassword
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","LoginScreen","ResetPasswordScreen","ResetPasswordInstructionSent","SignUpScreen","VerifyPhoneNumberScreen","SignUpPassword","renderAuthNavigator","RootStack","createElement","Group","Screen","name","component"],"sourceRoot":"../../../../src","sources":["auth/screens/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,mBAAmB,QAAQ,iBAAiB;AACrD,SAASC,4BAA4B,QAAQ,iCAAiC;AAC9E,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,uBAAuB,QAAQ,qBAAqB;AAC7D,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,OAAO,MAAMC,mBAAmB,GAAIC,SAAc,IAAK;EACrD,oBACER,KAAA,CAAAS,aAAA,CAACD,SAAS,CAACE,KAAK,qBACdV,KAAA,CAAAS,aAAA,CAACD,SAAS,CAACG,MAAM;IAACC,IAAI,EAAC,OAAO;IAACC,SAAS,EAAEZ;EAAY,CAAE,CAAC,eACzDD,KAAA,CAAAS,aAAA,CAACD,SAAS,CAACG,MAAM;IAACC,IAAI,EAAC,eAAe;IAACC,SAAS,EAAEX;EAAoB,CAAE,CAAC,eACzEF,KAAA,CAAAS,aAAA,CAACD,SAAS,CAACG,MAAM;IACfC,IAAI,EAAC,8BAA8B;IACnCC,SAAS,EAAEV;EAA6B,CACzC,CAAC,eACFH,KAAA,CAAAS,aAAA,CAACD,SAAS,CAACG,MAAM;IAACC,IAAI,EAAC,QAAQ;IAACC,SAAS,EAAET;EAAa,CAAE,CAAC,eAC3DJ,KAAA,CAAAS,aAAA,CAACD,SAAS,CAACG,MAAM;IACfC,IAAI,EAAC,mBAAmB;IACxBC,SAAS,EAAER;EAAwB,CACpC,CAAC,eACFL,KAAA,CAAAS,aAAA,CAACD,SAAS,CAACG,MAAM;IAACC,IAAI,EAAC,gBAAgB;IAACC,SAAS,EAAEP;EAAe,CAAE,CACrD,CAAC;AAEtB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { t } from 'i18next';
|
|
2
|
+
import * as yup from 'yup';
|
|
3
|
+
export const EMAIL_REGEX = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$|^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[^@\s]+\.[^@\s]+$/;
|
|
4
|
+
const displayName = yup.string().required(t('authentication.displayNameRequired')).label(t('authentication.displayNameRequired'));
|
|
5
|
+
const businessName = yup.string().required(t('authentication.businessNameRequired')).label(t('authentication.businessName'));
|
|
6
|
+
const emailForLogin = yup.string().required(t('authentication.requiredEmailForLogin')).matches(EMAIL_REGEX, t('authentication.validEmail')).label(t('authentication.email'));
|
|
7
|
+
const emailForSignup = yup.string().required(t('authentication.requiredEmailForSignUp')).matches(EMAIL_REGEX, t('authentication.validEmail')).label(t('authentication.email'));
|
|
8
|
+
const phoneNumber = yup.string().required(t('authentication.requiredPhoneNumber')).label(t('authentication.phoneNumber'));
|
|
9
|
+
const password = yup.string().required(t('authentication.requiredPassword')).label(t('authentication.password'));
|
|
10
|
+
const newPassword = yup.string().required().min(8, t('authentication.minLength')).matches(/[a-z]/, t('authentication.1lowerChar')).matches(/[A-Z]/, t('authentication.1upperChar')).matches(/[0-9]/, t('authentication.1number')).matches(/[!@#$%^&*(),.?":{}|<>]/, t('authentication.1special')).label(t('authentication.password'));
|
|
11
|
+
const code = yup.string().required().min(6);
|
|
12
|
+
export const signUpValidationSchema = yup.object().shape({
|
|
13
|
+
displayName,
|
|
14
|
+
email: emailForSignup,
|
|
15
|
+
phoneNumber,
|
|
16
|
+
name: businessName
|
|
17
|
+
});
|
|
18
|
+
export const loginValidationSchema = yup.object().shape({
|
|
19
|
+
email: emailForLogin,
|
|
20
|
+
password
|
|
21
|
+
});
|
|
22
|
+
export const resetPasswordValidationSchema = yup.object().shape({
|
|
23
|
+
email: emailForLogin
|
|
24
|
+
});
|
|
25
|
+
export const verificationValidationSchema = yup.object().shape({
|
|
26
|
+
code
|
|
27
|
+
});
|
|
28
|
+
export const passwordVerificationSchema = yup.object().shape({
|
|
29
|
+
password: newPassword
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["t","yup","EMAIL_REGEX","displayName","string","required","label","businessName","emailForLogin","matches","emailForSignup","phoneNumber","password","newPassword","min","code","signUpValidationSchema","object","shape","email","name","loginValidationSchema","resetPasswordValidationSchema","verificationValidationSchema","passwordVerificationSchema"],"sourceRoot":"../../../../src","sources":["auth/screens/validators.ts"],"mappings":"AAAA,SAASA,CAAC,QAAQ,SAAS;AAC3B,OAAO,KAAKC,GAAG,MAAM,KAAK;AAE1B,OAAO,MAAMC,WAAW,GACtB,4LAA4L;AAE9L,MAAMC,WAAW,GAAGF,GAAG,CACpBG,MAAM,CAAC,CAAC,CACRC,QAAQ,CAACL,CAAC,CAAC,oCAAoC,CAAC,CAAC,CACjDM,KAAK,CAACN,CAAC,CAAC,oCAAoC,CAAC,CAAC;AAEjD,MAAMO,YAAY,GAAGN,GAAG,CACrBG,MAAM,CAAC,CAAC,CACRC,QAAQ,CAACL,CAAC,CAAC,qCAAqC,CAAC,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AyB,CAAC,CAAC,CAC/DM,KAAK,CAACN,CAAC,CAAC,yBAAyB,CAAC,CAAC;AAEtC,MAAMe,IAAI,GAAGd,GAAG,CAACG,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACS,GAAG,CAAC,CAAC,CAAC;AAE3C,OAAO,MAAME,sBAAsB,GAAGf,GAAG,CAACgB,MAAM,CAAC,CAAC,CAACC,KAAK,CAAC;EACvDf,WAAW;EACXgB,KAAK,EAAET,cAAc;EACrBC,WAAW;EACXS,IAAI,EAAEb;AACR,CAAC,CAAC;AAEF,OAAO,MAAMc,qBAAqB,GAAGpB,GAAG,CAACgB,MAAM,CAAC,CAAC,CAACC,KAAK,CAAC;EACtDC,KAAK,EAAEX,aAAa;EACpBI;AACF,CAAC,CAAC;AAEF,OAAO,MAAMU,6BAA6B,GAAGrB,GAAG,CAACgB,MAAM,CAAC,CAAC,CAACC,KAAK,CAAC;EAC9DC,KAAK,EAAEX;AACT,CAAC,CAAC;AAEF,OAAO,MAAMe,4BAA4B,GAAGtB,GAAG,CAACgB,MAAM,CAAC,CAAC,CAACC,KAAK,CAAC;EAC7DH;AACF,CAAC,CAAC;AAEF,OAAO,MAAMS,0BAA0B,GAAGvB,GAAG,CAACgB,MAAM,CAAC,CAAC,CAACC,KAAK,CAAC;EAC3DN,QAAQ,EAAEC;AACZ,CAAC,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React, { useState, useCallback } from 'react';
|
|
2
|
+
import { Dialog, Text, useTheme } from 'react-native-paper';
|
|
3
|
+
import { t } from 'i18next';
|
|
4
|
+
import { Button } from './Button';
|
|
5
|
+
const useAlertHook = () => {
|
|
6
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
7
|
+
const [params, setParams] = useState({});
|
|
8
|
+
const {
|
|
9
|
+
title = '',
|
|
10
|
+
description = '',
|
|
11
|
+
isDismissable = true,
|
|
12
|
+
buttons = []
|
|
13
|
+
} = params;
|
|
14
|
+
const show = useCallback(parameters => {
|
|
15
|
+
setParams(parameters);
|
|
16
|
+
setIsVisible(true);
|
|
17
|
+
}, []);
|
|
18
|
+
const hide = useCallback(() => {
|
|
19
|
+
setIsVisible(false);
|
|
20
|
+
}, []);
|
|
21
|
+
return {
|
|
22
|
+
isVisible,
|
|
23
|
+
show,
|
|
24
|
+
hide,
|
|
25
|
+
title,
|
|
26
|
+
description,
|
|
27
|
+
isDismissable,
|
|
28
|
+
buttons
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
let rootLevelRef = null;
|
|
32
|
+
export const Alert = () => {
|
|
33
|
+
const {
|
|
34
|
+
isVisible,
|
|
35
|
+
show,
|
|
36
|
+
hide,
|
|
37
|
+
buttons,
|
|
38
|
+
isDismissable,
|
|
39
|
+
title,
|
|
40
|
+
description
|
|
41
|
+
} = useAlertHook();
|
|
42
|
+
const theme = useTheme();
|
|
43
|
+
const [button1 = {
|
|
44
|
+
label: t('ok'),
|
|
45
|
+
onPress: () => {},
|
|
46
|
+
mode: 'text'
|
|
47
|
+
}, button2, button3] = buttons;
|
|
48
|
+
const ref = React.useRef(null);
|
|
49
|
+
React.useImperativeHandle(ref, React.useCallback(() => ({
|
|
50
|
+
show
|
|
51
|
+
}), [show]));
|
|
52
|
+
React.useEffect(() => {
|
|
53
|
+
rootLevelRef = ref.current;
|
|
54
|
+
}, [ref]);
|
|
55
|
+
return /*#__PURE__*/React.createElement(Dialog, {
|
|
56
|
+
style: {
|
|
57
|
+
backgroundColor: theme.colors.background
|
|
58
|
+
},
|
|
59
|
+
dismissable: isDismissable,
|
|
60
|
+
dismissableBackButton: isDismissable,
|
|
61
|
+
onDismiss: () => {
|
|
62
|
+
if (isVisible) {
|
|
63
|
+
hide();
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
visible: isVisible
|
|
67
|
+
}, Boolean(title) && /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(Text, {
|
|
68
|
+
variant: "titleMedium"
|
|
69
|
+
}, title)), Boolean(description) && /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(Text, {
|
|
70
|
+
variant: "bodyMedium"
|
|
71
|
+
}, description)), /*#__PURE__*/React.createElement(Dialog.Actions, null, button3 && /*#__PURE__*/React.createElement(Button, {
|
|
72
|
+
mx: "8",
|
|
73
|
+
mode: button3?.mode || 'text',
|
|
74
|
+
onPress: () => {
|
|
75
|
+
hide();
|
|
76
|
+
button3?.onPress?.();
|
|
77
|
+
}
|
|
78
|
+
}, button3.label), button2 && /*#__PURE__*/React.createElement(Button, {
|
|
79
|
+
ml: "2",
|
|
80
|
+
mode: button2?.mode || 'text',
|
|
81
|
+
onPress: () => {
|
|
82
|
+
hide();
|
|
83
|
+
button2?.onPress?.();
|
|
84
|
+
}
|
|
85
|
+
}, button2?.label), button1 && /*#__PURE__*/React.createElement(Button, {
|
|
86
|
+
ml: "2",
|
|
87
|
+
mode: button1?.mode || 'text',
|
|
88
|
+
onPress: () => {
|
|
89
|
+
hide();
|
|
90
|
+
button1?.onPress?.();
|
|
91
|
+
}
|
|
92
|
+
}, button1.label)));
|
|
93
|
+
};
|
|
94
|
+
Alert.displayName = 'Alert';
|
|
95
|
+
|
|
96
|
+
//@ts-ignore
|
|
97
|
+
Alert.show = params => {
|
|
98
|
+
rootLevelRef?.show(params);
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=Alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","useCallback","Dialog","Text","useTheme","t","Button","useAlertHook","isVisible","setIsVisible","params","setParams","title","description","isDismissable","buttons","show","parameters","hide","rootLevelRef","Alert","theme","button1","label","onPress","mode","button2","button3","ref","useRef","useImperativeHandle","useEffect","current","createElement","style","backgroundColor","colors","background","dismissable","dismissableBackButton","onDismiss","visible","Boolean","Content","variant","Actions","mx","ml","displayName"],"sourceRoot":"../../../src","sources":["components/Alert.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC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IAAI,EAAEE,OAAO,EAAEF,IAAI,IAAI,MAAO;IAC9BD,OAAO,EAAEA,CAAA,KAAM;MACbN,IAAI,CAAC,CAAC;MACNS,OAAO,EAAEH,OAAO,GAAG,CAAC;IACtB;EAAE,GAEDG,OAAO,CAACJ,KACH,CACT,EACAG,OAAO,iBACN3B,KAAA,CAAAkC,aAAA,CAAC3B,MAAM;IACLyC,EAAE,EAAC,GAAG;IACNtB,IAAI,EAAEC,OAAO,EAAED,IAAI,IAAI,MAAO;IAC9BD,OAAO,EAAEA,CAAA,KAAM;MACbN,IAAI,CAAC,CAAC;MACNQ,OAAO,EAAEF,OAAO,GAAG,CAAC;IACtB;EAAE,GAEDE,OAAO,EAAEH,KACJ,CACT,EACAD,OAAO,iBACNvB,KAAA,CAAAkC,aAAA,CAAC3B,MAAM;IACLyC,EAAE,EAAC,GAAG;IACNtB,IAAI,EAAEH,OAAO,EAAEG,IAAI,IAAI,MAAO;IAC9BD,OAAO,EAAEA,CAAA,KAAM;MACbN,IAAI,CAAC,CAAC;MACNI,OAAO,EAAEE,OAAO,GAAG,CAAC;IACtB;EAAE,GAEDF,OAAO,CAACC,KACH,CAEI,CACV,CAAC;AAEb,CAAC;AAEDH,KAAK,CAAC4B,WAAW,GAAG,OAAO;;AAE3B;AACA5B,KAAK,CAACJ,IAAI,GAAIN,MAAmB,IAAK;EACpCS,YAAY,EAAEH,IAAI,CAACN,MAAM,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Badge as B } from 'react-native-paper';
|
|
2
|
+
import { backgroundColor, backgroundColorShorthand, border, composeRestyleFunctions, layout, position, spacing, spacingShorthand, useRestyle } from '@shopify/restyle';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
const restyleFunctions = composeRestyleFunctions([spacing, spacingShorthand, layout, position, border, backgroundColor, backgroundColorShorthand]);
|
|
5
|
+
export const Badge = ({
|
|
6
|
+
children,
|
|
7
|
+
...rest
|
|
8
|
+
}) => {
|
|
9
|
+
const props = useRestyle(restyleFunctions, rest);
|
|
10
|
+
return /*#__PURE__*/React.createElement(B, props, children);
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=Badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Badge","B","backgroundColor","backgroundColorShorthand","border","composeRestyleFunctions","layout","position","spacing","spacingShorthand","useRestyle","React","restyleFunctions","children","rest","props","createElement"],"sourceRoot":"../../../src","sources":["components/Badge.tsx"],"mappings":"AAAA,SAASA,KAAK,IAAIC,CAAC,QAAyB,oBAAoB;AAEhE,SACEC,eAAe,EACfC,wBAAwB,EAExBC,MAAM,EAGNC,uBAAuB,EACvBC,MAAM,EAENC,QAAQ,EAERC,OAAO,EAEPC,gBAAgB,EAEhBC,UAAU,QAEL,kBAAkB;AAGzB,OAAOC,KAAK,MAAM,OAAO;AAWzB,MAAMC,gBAAgB,GAAGP,uBAAuB,CAA0B,CACxEG,OAAO,EACPC,gBAAgB,EAChBH,MAAM,EACNC,QAAQ,EACRH,MAAM,EACNF,eAAe,EACfC,wBAAwB,CACzB,CAAC;AAIF,OAAO,MAAMH,KAAK,GAAGA,CAAC;EAAEa,QAAQ;EAAE,GAAGC;AAAgB,CAAC,KAAK;EACzD,MAAMC,KAAK,GAAGL,UAAU,CAACE,gBAAgB,EAAEE,IAAI,CAAC;EAChD,oBAAOH,KAAA,CAAAK,aAAA,CAACf,CAAC,EAAKc,KAAK,EAAGF,QAAY,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { useCallback } from 'react';
|
|
3
|
+
import { useTheme } from 'react-native-paper';
|
|
4
|
+
import { ParentView, View } from '../components';
|
|
5
|
+
import BS, { BottomSheetBackdrop } from '@gorhom/bottom-sheet';
|
|
6
|
+
import { StyleSheet } from 'react-native';
|
|
7
|
+
export const BottomSheet = /*#__PURE__*/React.forwardRef(({
|
|
8
|
+
children,
|
|
9
|
+
pressBehavior = 'none',
|
|
10
|
+
snapPoints,
|
|
11
|
+
...rest
|
|
12
|
+
}, ref) => {
|
|
13
|
+
const theme = useTheme();
|
|
14
|
+
const renderBackdrop = useCallback(props => /*#__PURE__*/React.createElement(BottomSheetBackdrop, _extends({}, props, {
|
|
15
|
+
pressBehavior: pressBehavior,
|
|
16
|
+
disappearsOnIndex: -1,
|
|
17
|
+
appearsOnIndex: 1
|
|
18
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
19
|
+
style: [styles.backdrop, {
|
|
20
|
+
backgroundColor: theme.colors.backdrop
|
|
21
|
+
}]
|
|
22
|
+
})),
|
|
23
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24
|
+
[]);
|
|
25
|
+
return /*#__PURE__*/React.createElement(BS, _extends({
|
|
26
|
+
android_keyboardInputMode: "adjustPan",
|
|
27
|
+
keyboardBlurBehavior: "restore",
|
|
28
|
+
handleStyle: [styles.handleStyle, {
|
|
29
|
+
backgroundColor: theme.colors.background
|
|
30
|
+
}],
|
|
31
|
+
handleIndicatorStyle: {
|
|
32
|
+
backgroundColor: theme.colors.onBackground
|
|
33
|
+
},
|
|
34
|
+
backdropComponent: renderBackdrop,
|
|
35
|
+
enablePanDownToClose: true,
|
|
36
|
+
snapPoints: snapPoints,
|
|
37
|
+
ref: ref,
|
|
38
|
+
index: -1
|
|
39
|
+
}, rest), /*#__PURE__*/React.createElement(ParentView, {
|
|
40
|
+
topInset: false
|
|
41
|
+
}, children));
|
|
42
|
+
});
|
|
43
|
+
const styles = StyleSheet.create({
|
|
44
|
+
backdrop: {
|
|
45
|
+
flex: 1
|
|
46
|
+
},
|
|
47
|
+
handleStyle: {
|
|
48
|
+
borderTopRightRadius: 10,
|
|
49
|
+
borderTopLeftRadius: 10
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=BottomSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useTheme","ParentView","View","BS","BottomSheetBackdrop","StyleSheet","BottomSheet","forwardRef","children","pressBehavior","snapPoints","rest","ref","theme","renderBackdrop","props","createElement","_extends","disappearsOnIndex","appearsOnIndex","style","styles","backdrop","backgroundColor","colors","android_keyboardInputMode","keyboardBlurBehavior","handleStyle","background","handleIndicatorStyle","onBackground","backdropComponent","enablePanDownToClose","index","topInset","create","flex","borderTopRightRadius","borderTopLeftRadius"],"sourceRoot":"../../../src","sources":["components/BottomSheet.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,UAAU,EAAEC,IAAI,QAAQ,eAAe;AAChD,OAAOC,EAAE,IAAIC,mBAAmB,QAAQ,sBAAsB;AAC9D,SAASC,UAAU,QAAQ,cAAc;AAEzC,OAAO,MAAMC,WAAW,gBAAGR,KAAK,CAACS,UAAU,CAOzC,CAAC;EAAEC,QAAQ;EAAEC,aAAa,GAAG,MAAM;EAAEC,UAAU;EAAE,GAAGC;AAAK,CAAC,EAAEC,GAAG,KAAK;EACpE,MAAMC,KAAK,GAAGb,QAAQ,CAAC,CAAC;EAExB,MAAMc,cAAc,GAAGf,WAAW,CAC/BgB,KAAU,iBACTjB,KAAA,CAAAkB,aAAA,CAACZ,mBAAmB,EAAAa,QAAA,KACdF,KAAK;IACTN,aAAa,EAAEA,aAAc;IAC7BS,iBAAiB,EAAE,CAAC,CAAE;IACtBC,cAAc,EAAE;EAAE,iBAElBrB,KAAA,CAAAkB,aAAA,CAACd,IAAI;IACHkB,KAAK,EAAE,CACLC,MAAM,CAACC,QAAQ,EACf;MACEC,eAAe,EAAEV,KAAK,CAACW,MAAM,CAACF;IAChC,CAAC;EACD,CACH,CACkB,CACtB;EACD;EACA,EACF,CAAC;EAED,oBACExB,KAAA,CAAAkB,aAAA,CAACb,EAAE,EAAAc,QAAA;IACDQ,yBAAyB,EAAC,WAAW;IACrCC,oBAAoB,EAAC,SAAS;IAC9BC,WAAW,EAAE,CACXN,MAAM,CAACM,WAAW,EAClB;MACEJ,eAAe,EAAEV,KAAK,CAACW,MAAM,CAACI;IAChC,CAAC,CACD;IACFC,oBAAoB,EAAE;MACpBN,eAAe,EAAEV,KAAK,CAACW,MAAM,CAACM;IAChC,CAAE;IACFC,iBAAiB,EAAEjB,cAAe;IAClCkB,oBAAoB,EAAE,IAAK;IAC3BtB,UAAU,EAAEA,UAAW;IACvBE,GAAG,EAAEA,GAAW;IAChBqB,KAAK,EAAE,CAAC;EAAE,GACNtB,IAAI,gBAERb,KAAA,CAAAkB,aAAA,CAACf,UAAU;IAACiC,QAAQ,EAAE;EAAM,GAAE1B,QAAqB,CACjD,CAAC;AAET,CAAC,CAAC;AAEF,MAAMa,MAAM,GAAGhB,UAAU,CAAC8B,MAAM,CAAC;EAC/Bb,QAAQ,EAAE;IACRc,IAAI,EAAE;EACR,CAAC;EACDT,WAAW,EAAE;IACXU,oBAAoB,EAAE,EAAE;IACxBC,mBAAmB,EAAE;EACvB;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button as B } from 'react-native-paper';
|
|
3
|
+
import { useRestyle, spacing, border, composeRestyleFunctions, backgroundColor, backgroundColorShorthand, layout, position, spacingShorthand } from '@shopify/restyle';
|
|
4
|
+
const restyleFunctions = composeRestyleFunctions([spacing, spacingShorthand, layout, position, border, backgroundColor, backgroundColorShorthand]);
|
|
5
|
+
export const Button = ({
|
|
6
|
+
children,
|
|
7
|
+
...rest
|
|
8
|
+
}) => {
|
|
9
|
+
const restyleProps = useRestyle(restyleFunctions, rest);
|
|
10
|
+
return /*#__PURE__*/React.createElement(B, restyleProps, children);
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Button","B","useRestyle","spacing","border","composeRestyleFunctions","backgroundColor","backgroundColorShorthand","layout","position","spacingShorthand","restyleFunctions","children","rest","restyleProps","createElement"],"sourceRoot":"../../../src","sources":["components/Button.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,IAAIC,CAAC,QAA0B,oBAAoB;AAClE,SACEC,UAAU,EACVC,OAAO,EACPC,MAAM,EACNC,uBAAuB,EAIvBC,eAAe,EACfC,wBAAwB,EACxBC,MAAM,EACNC,QAAQ,EACRC,gBAAgB,QAKX,kBAAkB;AAWzB,MAAMC,gBAAgB,GAAGN,uBAAuB,CAA0B,CACxEF,OAAO,EACPO,gBAAgB,EAChBF,MAAM,EACNC,QAAQ,EACRL,MAAM,EACNE,eAAe,EACfC,wBAAwB,CACzB,CAAC;AAIF,OAAO,MAAMP,MAA2B,GAAGA,CAAC;EAAEY,QAAQ;EAAE,GAAGC;AAAK,CAAC,KAAK;EACpE,MAAMC,YAAY,GAAGZ,UAAU,CAACS,gBAAgB,EAAEE,IAAI,CAAC;EAEvD,oBAAOd,KAAA,CAAAgB,aAAA,CAACd,CAAC,EAAKa,YAAY,EAAGF,QAAY,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Card as C } from 'react-native-paper';
|
|
3
|
+
import { useRestyle, spacing, border, backgroundColor, backgroundColorShorthand, composeRestyleFunctions, spacingShorthand, layout, position } from '@shopify/restyle';
|
|
4
|
+
const restyleFunctions = composeRestyleFunctions([spacing, spacingShorthand, layout, position, border, backgroundColor, backgroundColorShorthand]);
|
|
5
|
+
export const Card = ({
|
|
6
|
+
...rest
|
|
7
|
+
}) => {
|
|
8
|
+
const props = useRestyle(restyleFunctions, rest);
|
|
9
|
+
return /*#__PURE__*/React.createElement(C, props);
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Card","C","useRestyle","spacing","border","backgroundColor","backgroundColorShorthand","composeRestyleFunctions","spacingShorthand","layout","position","restyleFunctions","rest","props","createElement"],"sourceRoot":"../../../src","sources":["components/Card.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,IAAIC,CAAC,QAAwB,oBAAoB;AAC9D,SACEC,UAAU,EACVC,OAAO,EACPC,MAAM,EACNC,eAAe,EACfC,wBAAwB,EAIxBC,uBAAuB,EAIvBC,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,QAEH,kBAAkB;AAWzB,MAAMC,gBAAgB,GAAGJ,uBAAuB,CAA0B,CACxEJ,OAAO,EACPK,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,EACRN,MAAM,EACNC,eAAe,EACfC,wBAAwB,CACzB,CAAC;AAIF,OAAO,MAAMN,IAAI,GAAGA,CAAC;EAAE,GAAGY;AAAY,CAAC,KAAK;EAC1C,MAAMC,KAAK,GAAGX,UAAU,CAACS,gBAAgB,EAASC,IAAI,CAAC;EAEvD,oBAAOb,KAAA,CAAAe,aAAA,CAACb,CAAC,EAAMY,KAAgB,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Divider as D } from 'react-native-paper';
|
|
3
|
+
import { useRestyle, spacing, border, backgroundColor, backgroundColorShorthand, composeRestyleFunctions, spacingShorthand, layout, position } from '@shopify/restyle';
|
|
4
|
+
const restyleFunctions = composeRestyleFunctions([spacing, spacingShorthand, layout, position, border, backgroundColor, backgroundColorShorthand]);
|
|
5
|
+
export const Divider = ({
|
|
6
|
+
...rest
|
|
7
|
+
}) => {
|
|
8
|
+
const props = useRestyle(restyleFunctions, rest);
|
|
9
|
+
return /*#__PURE__*/React.createElement(D, props);
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=Divider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Divider","D","useRestyle","spacing","border","backgroundColor","backgroundColorShorthand","composeRestyleFunctions","spacingShorthand","layout","position","restyleFunctions","rest","props","createElement"],"sourceRoot":"../../../src","sources":["components/Divider.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,IAAIC,CAAC,QAA2B,oBAAoB;AACpE,SACEC,UAAU,EACVC,OAAO,EACPC,MAAM,EACNC,eAAe,EACfC,wBAAwB,EAIxBC,uBAAuB,EAIvBC,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,QAEH,kBAAkB;AAWzB,MAAMC,gBAAgB,GAAGJ,uBAAuB,CAA0B,CACxEJ,OAAO,EACPK,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,EACRN,MAAM,EACNC,eAAe,EACfC,wBAAwB,CACzB,CAAC;AAIF,OAAO,MAAMN,OAAO,GAAGA,CAAC;EAAE,GAAGY;AAAY,CAAC,KAAK;EAC7C,MAAMC,KAAK,GAAGX,UAAU,CAACS,gBAAgB,EAASC,IAAI,CAAC;EAEvD,oBAAOb,KAAA,CAAAe,aAAA,CAACb,CAAC,EAAKY,KAAQ,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FAB as F } from 'react-native-paper';
|
|
3
|
+
import { useRestyle, spacing, border, backgroundColor, backgroundColorShorthand, composeRestyleFunctions, spacingShorthand, layout, position } from '@shopify/restyle';
|
|
4
|
+
const restyleFunctions = composeRestyleFunctions([spacing, spacingShorthand, layout, position, border, backgroundColor, backgroundColorShorthand]);
|
|
5
|
+
export const FAB = ({
|
|
6
|
+
...rest
|
|
7
|
+
}) => {
|
|
8
|
+
const props = useRestyle(restyleFunctions, rest);
|
|
9
|
+
return /*#__PURE__*/React.createElement(F, props);
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=FAB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","FAB","F","useRestyle","spacing","border","backgroundColor","backgroundColorShorthand","composeRestyleFunctions","spacingShorthand","layout","position","restyleFunctions","rest","props","createElement"],"sourceRoot":"../../../src","sources":["components/FAB.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,GAAG,IAAIC,CAAC,QAAuB,oBAAoB;AAC5D,SACEC,UAAU,EACVC,OAAO,EACPC,MAAM,EACNC,eAAe,EACfC,wBAAwB,EAIxBC,uBAAuB,EAIvBC,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,QAEH,kBAAkB;AAWzB,MAAMC,gBAAgB,GAAGJ,uBAAuB,CAA0B,CACxEJ,OAAO,EACPK,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,EACRN,MAAM,EACNC,eAAe,EACfC,wBAAwB,CACzB,CAAC;AAIF,OAAO,MAAMN,GAAG,GAAGA,CAAC;EAAE,GAAGY;AAAY,CAAC,KAAK;EACzC,MAAMC,KAAK,GAAGX,UAAU,CAACS,gBAAgB,EAASC,IAAI,CAAC;EAEvD,oBAAOb,KAAA,CAAAe,aAAA,CAACb,CAAC,EAAKY,KAAQ,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Text } from '../components';
|
|
4
|
+
import { Appbar, Menu, useTheme } from 'react-native-paper';
|
|
5
|
+
import { IconButton } from '../components';
|
|
6
|
+
import { View } from '../components';
|
|
7
|
+
import { useNavigation } from '@react-navigation/native';
|
|
8
|
+
import { useRestyle, spacing, border, backgroundColor, backgroundColorShorthand, composeRestyleFunctions, spacingShorthand, layout, position } from '@shopify/restyle';
|
|
9
|
+
const restyleFunctions = composeRestyleFunctions([spacing, spacingShorthand, layout, position, border, backgroundColor, backgroundColorShorthand]);
|
|
10
|
+
export const Header = ({
|
|
11
|
+
title,
|
|
12
|
+
menuOptions,
|
|
13
|
+
textAlign = 'center',
|
|
14
|
+
customRightOptions = null,
|
|
15
|
+
...rest
|
|
16
|
+
}) => {
|
|
17
|
+
const props = useRestyle(restyleFunctions, rest);
|
|
18
|
+
const navigation = useNavigation();
|
|
19
|
+
const [visible, setVisible] = React.useState(false);
|
|
20
|
+
const theme = useTheme();
|
|
21
|
+
const openMenu = () => setVisible(true);
|
|
22
|
+
const closeMenu = () => setVisible(false);
|
|
23
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
24
|
+
height: 60,
|
|
25
|
+
flexDirection: "row",
|
|
26
|
+
alignItems: "center"
|
|
27
|
+
}, props), navigation.canGoBack() ? /*#__PURE__*/React.createElement(IconButton, {
|
|
28
|
+
icon: "arrow-left",
|
|
29
|
+
onPress: navigation.goBack
|
|
30
|
+
}) : /*#__PURE__*/React.createElement(View, {
|
|
31
|
+
width: 40
|
|
32
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
33
|
+
flex: 1,
|
|
34
|
+
textAlign: textAlign,
|
|
35
|
+
variant: "titleMedium"
|
|
36
|
+
}, title), menuOptions && /*#__PURE__*/React.createElement(Menu, {
|
|
37
|
+
style: {
|
|
38
|
+
backgroundColor: theme.colors.background
|
|
39
|
+
},
|
|
40
|
+
contentStyle: {
|
|
41
|
+
backgroundColor: theme.colors.background
|
|
42
|
+
},
|
|
43
|
+
visible: visible,
|
|
44
|
+
onDismiss: closeMenu,
|
|
45
|
+
anchor: /*#__PURE__*/React.createElement(Appbar.Action, {
|
|
46
|
+
icon: "dots-vertical",
|
|
47
|
+
onPress: openMenu
|
|
48
|
+
})
|
|
49
|
+
}, menuOptions.map(menuOption => {
|
|
50
|
+
const onPress = () => {
|
|
51
|
+
closeMenu();
|
|
52
|
+
menuOption.onPress();
|
|
53
|
+
};
|
|
54
|
+
return /*#__PURE__*/React.createElement(Menu.Item, _extends({
|
|
55
|
+
style: {
|
|
56
|
+
backgroundColor: theme.colors.background
|
|
57
|
+
},
|
|
58
|
+
key: menuOption.title
|
|
59
|
+
}, menuOption, {
|
|
60
|
+
onPress: onPress
|
|
61
|
+
}));
|
|
62
|
+
})), customRightOptions, !menuOptions && !customRightOptions && /*#__PURE__*/React.createElement(View, {
|
|
63
|
+
width: 40
|
|
64
|
+
}));
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=Header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","Appbar","Menu","useTheme","IconButton","View","useNavigation","useRestyle","spacing","border","backgroundColor","backgroundColorShorthand","composeRestyleFunctions","spacingShorthand","layout","position","restyleFunctions","Header","title","menuOptions","textAlign","customRightOptions","rest","props","navigation","visible","setVisible","useState","theme","openMenu","closeMenu","createElement","_extends","height","flexDirection","alignItems","canGoBack","icon","onPress","goBack","width","flex","variant","style","colors","background","contentStyle","onDismiss","anchor","Action","map","menuOption","Item","key"],"sourceRoot":"../../../src","sources":["components/Header.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,oBAAoB;AAC3D,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,aAAa,QAAQ,0BAA0B;AAExD,SACEC,UAAU,EACVC,OAAO,EACPC,MAAM,EACNC,eAAe,EACfC,wBAAwB,EAIxBC,uBAAuB,EAIvBC,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,QAEH,kBAAkB;AAWzB,MAAMC,gBAAgB,GAAGJ,uBAAuB,CAA0B,CACxEJ,OAAO,EACPK,gBAAg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EkB,KAAK,CAACgB,MAAM,CAACC;IAChC,CAAE;IACFC,YAAY,EAAE;MACZpC,eAAe,EAAEkB,KAAK,CAACgB,MAAM,CAACC;IAChC,CAAE;IACFpB,OAAO,EAAEA,OAAQ;IACjBsB,SAAS,EAAEjB,SAAU;IACrBkB,MAAM,eAAEjD,KAAA,CAAAgC,aAAA,CAAC9B,MAAM,CAACgD,MAAM;MAACZ,IAAI,EAAC,eAAe;MAACC,OAAO,EAAET;IAAS,CAAE;EAAE,GAEjEV,WAAW,CAAC+B,GAAG,CAAEC,UAAU,IAAK;IAC/B,MAAMb,OAAO,GAAGA,CAAA,KAAM;MACpBR,SAAS,CAAC,CAAC;MACXqB,UAAU,CAACb,OAAO,CAAC,CAAC;IACtB,CAAC;IACD,oBACEvC,KAAA,CAAAgC,aAAA,CAAC7B,IAAI,CAACkD,IAAI,EAAApB,QAAA;MACRW,KAAK,EAAE;QACLjC,eAAe,EAAEkB,KAAK,CAACgB,MAAM,CAACC;MAChC,CAAE;MACFQ,GAAG,EAAEF,UAAU,CAACjC;IAAM,GAClBiC,UAAU;MACdb,OAAO,EAAEA;IAAQ,EAClB,CAAC;EAEN,CAAC,CACG,CACP,EACAjB,kBAAkB,EAClB,CAACF,WAAW,IAAI,CAACE,kBAAkB,iBAAItB,KAAA,CAAAgC,aAAA,CAAC1B,IAAI;IAACmC,KAAK,EAAE;EAAG,CAAE,CACtD,CAAC;AAEX,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconButton as I } from 'react-native-paper';
|
|
3
|
+
import { useRestyle, spacing, border, backgroundColor, backgroundColorShorthand, composeRestyleFunctions, spacingShorthand, layout, position } from '@shopify/restyle';
|
|
4
|
+
const restyleFunctions = composeRestyleFunctions([spacing, spacingShorthand, layout, position, border, backgroundColor, backgroundColorShorthand]);
|
|
5
|
+
export const IconButton = ({
|
|
6
|
+
...rest
|
|
7
|
+
}) => {
|
|
8
|
+
const props = useRestyle(restyleFunctions, rest);
|
|
9
|
+
return /*#__PURE__*/React.createElement(I, props);
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=IconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","IconButton","I","useRestyle","spacing","border","backgroundColor","backgroundColorShorthand","composeRestyleFunctions","spacingShorthand","layout","position","restyleFunctions","rest","props","createElement"],"sourceRoot":"../../../src","sources":["components/IconButton.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,IAAIC,CAAC,QAA8B,oBAAoB;AAC1E,SACEC,UAAU,EACVC,OAAO,EACPC,MAAM,EACNC,eAAe,EACfC,wBAAwB,EAIxBC,uBAAuB,EAIvBC,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,QAEH,kBAAkB;AAWzB,MAAMC,gBAAgB,GAAGJ,uBAAuB,CAA0B,CACxEJ,OAAO,EACPK,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,EACRN,MAAM,EACNC,eAAe,EACfC,wBAAwB,CACzB,CAAC;AAIF,OAAO,MAAMN,UAAU,GAAGA,CAAC;EAAE,GAAGY;AAAY,CAAC,KAAK;EAChD,MAAMC,KAAK,GAAGX,UAAU,CAACS,gBAAgB,EAASC,IAAI,CAAC;EAEvD,oBAAOb,KAAA,CAAAe,aAAA,CAACb,CAAC,EAAKY,KAAQ,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import { View } from './View';
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { ActivityIndicator } from 'react-native-paper';
|
|
5
|
+
import { IconButton } from './IconButton';
|
|
6
|
+
import { useRestyle, spacing, border, backgroundColor, backgroundColorShorthand, composeRestyleFunctions, spacingShorthand, layout, position } from '@shopify/restyle';
|
|
7
|
+
import FastImage from 'react-native-fast-image';
|
|
8
|
+
const restyleFunctions = composeRestyleFunctions([spacing, spacingShorthand, layout, position, border, backgroundColor, backgroundColorShorthand]);
|
|
9
|
+
export const Image = ({
|
|
10
|
+
...rest
|
|
11
|
+
}) => {
|
|
12
|
+
const props = useRestyle(restyleFunctions, rest);
|
|
13
|
+
const [status, setStatus] = useState('loading');
|
|
14
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
15
|
+
flex: 1
|
|
16
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
17
|
+
top: 0,
|
|
18
|
+
bottom: 0,
|
|
19
|
+
right: 0,
|
|
20
|
+
left: 0,
|
|
21
|
+
position: "absolute",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
justifyContent: "center"
|
|
24
|
+
}, status === 'loading' && /*#__PURE__*/React.createElement(ActivityIndicator, null), status === 'failed' && /*#__PURE__*/React.createElement(IconButton, {
|
|
25
|
+
icon: "image-broken-variant"
|
|
26
|
+
})), /*#__PURE__*/React.createElement(FastImage, _extends({}, props, {
|
|
27
|
+
onLoad: () => {
|
|
28
|
+
setStatus('success');
|
|
29
|
+
},
|
|
30
|
+
onError: () => {
|
|
31
|
+
setStatus('failed');
|
|
32
|
+
}
|
|
33
|
+
})));
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=Image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","React","useState","ActivityIndicator","IconButton","useRestyle","spacing","border","backgroundColor","backgroundColorShorthand","composeRestyleFunctions","spacingShorthand","layout","position","FastImage","restyleFunctions","Image","rest","props","status","setStatus","createElement","flex","top","bottom","right","left","alignItems","justifyContent","icon","_extends","onLoad","onError"],"sourceRoot":"../../../src","sources":["components/Image.tsx"],"mappings":";AAAA,SAASA,IAAI,QAAQ,QAAQ;AAC7B,OAAOC,KAAK,IAAIC,QAA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AAC,SAAS,CAAC;IACtB,CAAE;IACFY,OAAO,EAAEA,CAAA,KAAM;MACbZ,SAAS,CAAC,QAAQ,CAAC;IACrB;EAAE,EACH,CACG,CAAC;AAEX,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { KeyboardAvoidingView as KV } from 'react-native';
|
|
4
|
+
import { useRestyle, spacing, border, backgroundColor, backgroundColorShorthand, composeRestyleFunctions, spacingShorthand, layout, position } from '@shopify/restyle';
|
|
5
|
+
const restyleFunctions = composeRestyleFunctions([spacing, spacingShorthand, layout, position, border, backgroundColor, backgroundColorShorthand]);
|
|
6
|
+
export const KeyboardAvoidingView = ({
|
|
7
|
+
children,
|
|
8
|
+
...rest
|
|
9
|
+
}) => {
|
|
10
|
+
const props = useRestyle(restyleFunctions, rest);
|
|
11
|
+
return /*#__PURE__*/React.createElement(KV, _extends({
|
|
12
|
+
behavior: "padding"
|
|
13
|
+
}, props), children);
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=KeyboardAvoidingView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","KeyboardAvoidingView","KV","useRestyle","spacing","border","backgroundColor","backgroundColorShorthand","composeRestyleFunctions","spacingShorthand","layout","position","restyleFunctions","children","rest","props","createElement","_extends","behavior"],"sourceRoot":"../../../src","sources":["components/KeyboardAvoidingView.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,oBAAoB,IAAIC,EAAE,QAErB,cAAc;AAErB,SACEC,UAAU,EACVC,OAAO,EACPC,MAAM,EACNC,eAAe,EACfC,wBAAwB,EAIxBC,uBAAuB,EAIvBC,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,QAEH,kBAAkB;AAWzB,MAAMC,gBAAgB,GAAGJ,uBAAuB,CAA0B,CACxEJ,OAAO,EACPK,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,EACRN,MAAM,EACNC,eAAe,EACfC,wBAAwB,CACzB,CAAC;AAIF,OAAO,MAAMN,oBAAoB,GAAGA,CAAC;EAAEY,QAAQ;EAAE,GAAGC;AAAY,CAAC,KAAK;EACpE,MAAMC,KAAK,GAAGZ,UAAU,CAACS,gBAAgB,EAAEE,IAAI,CAAC;EAEhD,oBACEd,KAAA,CAAAgB,aAAA,CAACd,EAAE,EAAAe,QAAA;IAACC,QAAQ,EAAC;EAAS,GAAKH,KAAK,GAC7BF,QACC,CAAC;AAET,CAAC"}
|