@rownd/react-native 0.1.11 → 0.2.0

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 (45) hide show
  1. package/README.md +15 -6
  2. package/lib/commonjs/assets/images/error-icon-material.svg +1 -0
  3. package/lib/commonjs/components/AutoSigninDialog.js +21 -14
  4. package/lib/commonjs/components/AutoSigninDialog.js.map +1 -1
  5. package/lib/commonjs/components/BottomSheetTextInput/BottomSheetTextInput.js +65 -0
  6. package/lib/commonjs/components/BottomSheetTextInput/BottomSheetTextInput.js.map +1 -0
  7. package/lib/commonjs/components/BottomSheetTextInput/index.js +16 -0
  8. package/lib/commonjs/components/BottomSheetTextInput/index.js.map +1 -0
  9. package/lib/commonjs/components/BottomSheetTextInput/types.js +6 -0
  10. package/lib/commonjs/components/BottomSheetTextInput/types.js.map +1 -0
  11. package/lib/commonjs/components/RowndComponents.js +4 -6
  12. package/lib/commonjs/components/RowndComponents.js.map +1 -1
  13. package/lib/commonjs/components/SignIn.js +39 -35
  14. package/lib/commonjs/components/SignIn.js.map +1 -1
  15. package/lib/commonjs/components/images/ErrorIcon.js +31 -0
  16. package/lib/commonjs/components/images/ErrorIcon.js.map +1 -0
  17. package/lib/module/assets/images/error-icon-material.svg +1 -0
  18. package/lib/module/components/AutoSigninDialog.js +17 -13
  19. package/lib/module/components/AutoSigninDialog.js.map +1 -1
  20. package/lib/module/components/BottomSheetTextInput/BottomSheetTextInput.js +52 -0
  21. package/lib/module/components/BottomSheetTextInput/BottomSheetTextInput.js.map +1 -0
  22. package/lib/module/components/BottomSheetTextInput/index.js +3 -0
  23. package/lib/module/components/BottomSheetTextInput/index.js.map +1 -0
  24. package/lib/module/components/BottomSheetTextInput/types.js +2 -0
  25. package/lib/module/components/BottomSheetTextInput/types.js.map +1 -0
  26. package/lib/module/components/RowndComponents.js +5 -5
  27. package/lib/module/components/RowndComponents.js.map +1 -1
  28. package/lib/module/components/SignIn.js +38 -36
  29. package/lib/module/components/SignIn.js.map +1 -1
  30. package/lib/module/components/images/ErrorIcon.js +18 -0
  31. package/lib/module/components/images/ErrorIcon.js.map +1 -0
  32. package/lib/package.json +3 -5
  33. package/lib/typescript/src/components/BottomSheetTextInput/BottomSheetTextInput.d.ts +4 -0
  34. package/lib/typescript/src/components/BottomSheetTextInput/index.d.ts +2 -0
  35. package/lib/typescript/src/components/BottomSheetTextInput/types.d.ts +3 -0
  36. package/lib/typescript/src/components/images/ErrorIcon.d.ts +4 -0
  37. package/package.json +3 -5
  38. package/src/assets/images/error-icon-material.svg +1 -0
  39. package/src/components/AutoSigninDialog.tsx +16 -10
  40. package/src/components/BottomSheetTextInput/BottomSheetTextInput.tsx +57 -0
  41. package/src/components/BottomSheetTextInput/index.ts +5 -0
  42. package/src/components/BottomSheetTextInput/types.ts +3 -0
  43. package/src/components/RowndComponents.tsx +3 -3
  44. package/src/components/SignIn.tsx +44 -35
  45. package/src/components/images/ErrorIcon.tsx +11 -0
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Rownd bindings for React Native
4
4
 
5
5
  ## Prerequisites
6
- You must be using React Native v0.64 or higher.
6
+ You must be using React Native v0.61 or higher.
7
7
 
8
8
  ## Installation
9
9
 
@@ -15,11 +15,20 @@ npm install @rownd/react-native
15
15
 
16
16
  Due to some native peer-dependencies, you'll also need to run the following command to get modules with native code working properly.
17
17
 
18
- ```sh
19
- npm install @gorhom/bottom-sheet @react-native-clipboard/clipboard \
20
- react-native-device-info react-native-gesture-handler react-native-mmkv \
21
- react-native-reanimated react-native-sha256 react-native-svg
22
- ```
18
+ > If you already use `react-native-gesture-handler` and/or `react-native-reanimated` run the following command:
19
+ ```sh
20
+ npm install @gorhom/bottom-sheet@2 @react-native-clipboard/clipboard \
21
+ react-native-device-info react-native-gesture-handler@1 react-native-mmkv \
22
+ react-native-reanimated@1 react-native-sha256 react-native-svg
23
+ ```
24
+
25
+ > If you **do not** use the aforementioned libraries _or_ are on v2.x, run this command instead:
26
+ ```sh
27
+ npm install @gorhom/bottom-sheet @react-native-clipboard/clipboard \
28
+ react-native-device-info react-native-gesture-handler react-native-mmkv \
29
+ react-native-reanimated react-native-sha256 react-native-svg
30
+ ```
31
+
23
32
 
24
33
  Once those are installed, run this command to ensure the iOS build can find the native components.
25
34
 
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path d="M24 34q.7 0 1.175-.475.475-.475.475-1.175 0-.7-.475-1.175Q24.7 30.7 24 30.7q-.7 0-1.175.475-.475.475-.475 1.175 0 .7.475 1.175Q23.3 34 24 34Zm-1.35-7.65h3V13.7h-3ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 23.95q0-4.1 1.575-7.75 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24.05 4q4.1 0 7.75 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm.05-3q7.05 0 12-4.975T41 23.95q0-7.05-4.95-12T24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24.05 41ZM24 24Z"/></svg>
@@ -11,14 +11,18 @@ var _reactNative = require("react-native");
11
11
 
12
12
  var _bottomSheet = require("@gorhom/bottom-sheet");
13
13
 
14
- var _usehooksTs = require("usehooks-ts");
14
+ var _package = _interopRequireDefault(require("@gorhom/bottom-sheet/package.json"));
15
15
 
16
- var _vectorIcons = require("@expo/vector-icons");
16
+ var _usehooksTs = require("usehooks-ts");
17
17
 
18
18
  var _hooks = require("../hooks");
19
19
 
20
20
  var _GlobalContext = require("./GlobalContext");
21
21
 
22
+ var _ErrorIcon = _interopRequireDefault(require("./images/ErrorIcon"));
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
+
22
26
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
27
 
24
28
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -55,24 +59,24 @@ function AutoSigninDialog() {
55
59
  const renderBackdrop = (0, _react.useCallback)(props => /*#__PURE__*/_react.default.createElement(_bottomSheet.BottomSheetBackdrop, _extends({}, props, {
56
60
  pressBehavior: "none"
57
61
  })), []);
58
- return /*#__PURE__*/_react.default.createElement(_bottomSheet.BottomSheetModal, {
62
+ let extraBottomSheetProps = {};
63
+
64
+ if (_package.default.version.startsWith('4')) {
65
+ extraBottomSheetProps.keyboardBehavior = 'fillParent';
66
+ extraBottomSheetProps.android_keyboardInputMode = 'adjustResize';
67
+ extraBottomSheetProps.enablePanDownToClose = state.nav.options.type === 'error';
68
+ }
69
+
70
+ return /*#__PURE__*/_react.default.createElement(_bottomSheet.BottomSheetModal, _extends({
59
71
  snapPoints: snapPoints,
60
72
  index: 0,
61
73
  backdropComponent: renderBackdrop,
62
- keyboardBehavior: "fillParent",
63
- android_keyboardInputMode: "adjustResize",
64
- enablePanDownToClose: state.nav.options.type === 'error',
65
74
  onDismiss: handleClose,
66
75
  style: styles.bottomSheet,
67
76
  ref: bottomSheetModalRef
68
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
77
+ }, extraBottomSheetProps), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
69
78
  style: styles.innerContainer
70
- }, state.nav.options.type === 'error' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_vectorIcons.MaterialIcons, {
71
- name: "error",
72
- size: 24,
73
- color: "#DA1E28",
74
- style: styles.errorIcon
75
- }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
79
+ }, state.nav.options.type === 'error' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ErrorIcon.default, null), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
76
80
  style: styles.errorMessage
77
81
  }, state.nav.options.message || 'An error occurred. Please try again.')), state.nav.options.type === 'sign-in' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
78
82
  size: "large",
@@ -113,7 +117,10 @@ const styles = _reactNative.StyleSheet.create({
113
117
  padding: 20
114
118
  },
115
119
  errorIcon: {
116
- textAlign: 'center'
120
+ textAlign: 'center',
121
+ color: '#DA1E28',
122
+ height: 24,
123
+ width: 24
117
124
  }
118
125
  });
119
126
  //# sourceMappingURL=AutoSigninDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["AutoSigninDialog","navTo","useNav","state","useGlobalContext","useTimeout","nav","options","type","handleClose","bottomSheetModalRef","useRef","useEffect","current","present","useCallback","setTimeout","hide","snapPoints","useMemo","renderBackdrop","props","styles","bottomSheet","innerContainer","errorIcon","errorMessage","message","signInMessage","StyleSheet","create","modal","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","borderRadius","borderColor","borderWidth","padding","textAlign","fontSize"],"sources":["AutoSigninDialog.tsx"],"sourcesContent":["import React, { useMemo, useCallback, useEffect, useRef } from 'react';\nimport { View, Text, StyleSheet, ActivityIndicator } from 'react-native';\nimport {\n BottomSheetBackdrop,\n BottomSheetBackdropProps,\n BottomSheetModal,\n} from '@gorhom/bottom-sheet';\nimport { useTimeout } from 'usehooks-ts';\nimport { MaterialIcons } from '@expo/vector-icons';\n\nimport { useNav } from '../hooks';\nimport { useGlobalContext } from './GlobalContext';\n\nexport function AutoSigninDialog() {\n const navTo = useNav();\n const { state } = useGlobalContext();\n\n // Let the user know they're auto signing-in, then close when done\n useTimeout(() => {\n if (state.nav.options.type === 'error') {\n return;\n }\n\n handleClose();\n }, 3000);\n\n const bottomSheetModalRef = useRef<BottomSheetModal>(null);\n useEffect(() => {\n if (bottomSheetModalRef.current) {\n bottomSheetModalRef.current.present();\n }\n }, []);\n\n const handleClose = useCallback(() => {\n setTimeout(() => {\n navTo({ hide: true });\n }, 150);\n }, [navTo]);\n\n const snapPoints = useMemo(() => ['30%', '60%'], []);\n\n const renderBackdrop = useCallback(\n (props: BottomSheetBackdropProps) => (\n <BottomSheetBackdrop {...props} pressBehavior=\"none\" />\n ),\n []\n );\n\n return (\n <BottomSheetModal\n snapPoints={snapPoints}\n index={0}\n backdropComponent={renderBackdrop}\n keyboardBehavior=\"fillParent\"\n android_keyboardInputMode=\"adjustResize\"\n enablePanDownToClose={state.nav.options.type === 'error'}\n onDismiss={handleClose}\n style={styles.bottomSheet}\n ref={bottomSheetModalRef}\n >\n <View style={styles.innerContainer}>\n {state.nav.options.type === 'error' && (\n <>\n <MaterialIcons\n name=\"error\"\n size={24}\n color=\"#DA1E28\"\n style={styles.errorIcon}\n />\n <Text style={styles.errorMessage}>\n {state.nav.options.message ||\n 'An error occurred. Please try again.'}\n </Text>\n </>\n )}\n\n {state.nav.options.type === 'sign-in' && (\n <>\n <ActivityIndicator size=\"large\" color=\"#5b0ae0\" />\n <Text style={styles.signInMessage}>\n Automatically signing you in. Just a sec...\n </Text>\n </>\n )}\n </View>\n </BottomSheetModal>\n );\n}\n\nconst styles = StyleSheet.create({\n modal: {\n // flex: 1,\n },\n bottomSheet: {\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 12,\n },\n shadowOpacity: 0.58,\n shadowRadius: 16.0,\n\n elevation: 24,\n },\n innerContainer: {\n borderRadius: 20,\n borderColor: 'transparent',\n borderWidth: 0,\n padding: 25,\n textAlign: 'center',\n },\n signInMessage: {\n textAlign: 'center',\n fontSize: 24,\n padding: 20,\n },\n errorMessage: {\n textAlign: 'center',\n fontSize: 24,\n padding: 20,\n },\n errorIcon: {\n textAlign: 'center',\n },\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAKA;;AACA;;AAEA;;AACA;;;;;;;;AAEO,SAASA,gBAAT,GAA4B;EACjC,MAAMC,KAAK,GAAG,IAAAC,aAAA,GAAd;EACA,MAAM;IAAEC;EAAF,IAAY,IAAAC,+BAAA,GAAlB,CAFiC,CAIjC;;EACA,IAAAC,sBAAA,EAAW,MAAM;IACf,IAAIF,KAAK,CAACG,GAAN,CAAUC,OAAV,CAAkBC,IAAlB,KAA2B,OAA/B,EAAwC;MACtC;IACD;;IAEDC,WAAW;EACZ,CAND,EAMG,IANH;EAQA,MAAMC,mBAAmB,GAAG,IAAAC,aAAA,EAAyB,IAAzB,CAA5B;EACA,IAAAC,gBAAA,EAAU,MAAM;IACd,IAAIF,mBAAmB,CAACG,OAAxB,EAAiC;MAC/BH,mBAAmB,CAACG,OAApB,CAA4BC,OAA5B;IACD;EACF,CAJD,EAIG,EAJH;EAMA,MAAML,WAAW,GAAG,IAAAM,kBAAA,EAAY,MAAM;IACpCC,UAAU,CAAC,MAAM;MACff,KAAK,CAAC;QAAEgB,IAAI,EAAE;MAAR,CAAD,CAAL;IACD,CAFS,EAEP,GAFO,CAAV;EAGD,CAJmB,EAIjB,CAAChB,KAAD,CAJiB,CAApB;EAMA,MAAMiB,UAAU,GAAG,IAAAC,cAAA,EAAQ,MAAM,CAAC,KAAD,EAAQ,KAAR,CAAd,EAA8B,EAA9B,CAAnB;EAEA,MAAMC,cAAc,GAAG,IAAAL,kBAAA,EACpBM,KAAD,iBACE,6BAAC,gCAAD,eAAyBA,KAAzB;IAAgC,aAAa,EAAC;EAA9C,GAFmB,EAIrB,EAJqB,CAAvB;EAOA,oBACE,6BAAC,6BAAD;IACE,UAAU,EAAEH,UADd;IAEE,KAAK,EAAE,CAFT;IAGE,iBAAiB,EAAEE,cAHrB;IAIE,gBAAgB,EAAC,YAJnB;IAKE,yBAAyB,EAAC,cAL5B;IAME,oBAAoB,EAAEjB,KAAK,CAACG,GAAN,CAAUC,OAAV,CAAkBC,IAAlB,KAA2B,OANnD;IAOE,SAAS,EAAEC,WAPb;IAQE,KAAK,EAAEa,MAAM,CAACC,WARhB;IASE,GAAG,EAAEb;EATP,gBAWE,6BAAC,iBAAD;IAAM,KAAK,EAAEY,MAAM,CAACE;EAApB,GACGrB,KAAK,CAACG,GAAN,CAAUC,OAAV,CAAkBC,IAAlB,KAA2B,OAA3B,iBACC,yEACE,6BAAC,0BAAD;IACE,IAAI,EAAC,OADP;IAEE,IAAI,EAAE,EAFR;IAGE,KAAK,EAAC,SAHR;IAIE,KAAK,EAAEc,MAAM,CAACG;EAJhB,EADF,eAOE,6BAAC,iBAAD;IAAM,KAAK,EAAEH,MAAM,CAACI;EAApB,GACGvB,KAAK,CAACG,GAAN,CAAUC,OAAV,CAAkBoB,OAAlB,IACC,sCAFJ,CAPF,CAFJ,EAgBGxB,KAAK,CAACG,GAAN,CAAUC,OAAV,CAAkBC,IAAlB,KAA2B,SAA3B,iBACC,yEACE,6BAAC,8BAAD;IAAmB,IAAI,EAAC,OAAxB;IAAgC,KAAK,EAAC;EAAtC,EADF,eAEE,6BAAC,iBAAD;IAAM,KAAK,EAAEc,MAAM,CAACM;EAApB,iDAFF,CAjBJ,CAXF,CADF;AAuCD;;AAED,MAAMN,MAAM,GAAGO,uBAAA,CAAWC,MAAX,CAAkB;EAC/BC,KAAK,EAAE,CACL;EADK,CADwB;EAI/BR,WAAW,EAAE;IACXS,WAAW,EAAE,MADF;IAEXC,YAAY,EAAE;MACZC,KAAK,EAAE,CADK;MAEZC,MAAM,EAAE;IAFI,CAFH;IAMXC,aAAa,EAAE,IANJ;IAOXC,YAAY,EAAE,IAPH;IASXC,SAAS,EAAE;EATA,CAJkB;EAe/Bd,cAAc,EAAE;IACde,YAAY,EAAE,EADA;IAEdC,WAAW,EAAE,aAFC;IAGdC,WAAW,EAAE,CAHC;IAIdC,OAAO,EAAE,EAJK;IAKdC,SAAS,EAAE;EALG,CAfe;EAsB/Bf,aAAa,EAAE;IACbe,SAAS,EAAE,QADE;IAEbC,QAAQ,EAAE,EAFG;IAGbF,OAAO,EAAE;EAHI,CAtBgB;EA2B/BhB,YAAY,EAAE;IACZiB,SAAS,EAAE,QADC;IAEZC,QAAQ,EAAE,EAFE;IAGZF,OAAO,EAAE;EAHG,CA3BiB;EAgC/BjB,SAAS,EAAE;IACTkB,SAAS,EAAE;EADF;AAhCoB,CAAlB,CAAf"}
1
+ {"version":3,"names":["AutoSigninDialog","navTo","useNav","state","useGlobalContext","useTimeout","nav","options","type","handleClose","bottomSheetModalRef","useRef","useEffect","current","present","useCallback","setTimeout","hide","snapPoints","useMemo","renderBackdrop","props","extraBottomSheetProps","bottomSheetMeta","version","startsWith","keyboardBehavior","android_keyboardInputMode","enablePanDownToClose","styles","bottomSheet","innerContainer","errorMessage","message","signInMessage","StyleSheet","create","modal","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","borderRadius","borderColor","borderWidth","padding","textAlign","fontSize","errorIcon","color"],"sources":["AutoSigninDialog.tsx"],"sourcesContent":["import React, { useMemo, useCallback, useEffect, useRef } from 'react';\nimport { View, Text, StyleSheet, ActivityIndicator } from 'react-native';\nimport {\n BottomSheetBackdrop,\n BottomSheetBackdropProps,\n BottomSheetModal,\n} from '@gorhom/bottom-sheet';\nimport bottomSheetMeta from '@gorhom/bottom-sheet/package.json';\nimport { useTimeout } from 'usehooks-ts';\n\nimport { useNav } from '../hooks';\nimport { useGlobalContext } from './GlobalContext';\n\nimport ErrorIcon from './images/ErrorIcon';\n\nexport function AutoSigninDialog() {\n const navTo = useNav();\n const { state } = useGlobalContext();\n\n // Let the user know they're auto signing-in, then close when done\n useTimeout(() => {\n if (state.nav.options.type === 'error') {\n return;\n }\n\n handleClose();\n }, 3000);\n\n const bottomSheetModalRef = useRef<BottomSheetModal>(null);\n useEffect(() => {\n if (bottomSheetModalRef.current) {\n bottomSheetModalRef.current.present();\n }\n }, []);\n\n const handleClose = useCallback(() => {\n setTimeout(() => {\n navTo({ hide: true });\n }, 150);\n }, [navTo]);\n\n const snapPoints = useMemo(() => ['30%', '60%'], []);\n\n const renderBackdrop = useCallback(\n (props: BottomSheetBackdropProps) => (\n <BottomSheetBackdrop {...props} pressBehavior=\"none\" />\n ),\n []\n );\n\n let extraBottomSheetProps: any = {};\n if (bottomSheetMeta.version.startsWith('4')) {\n extraBottomSheetProps.keyboardBehavior = 'fillParent';\n extraBottomSheetProps.android_keyboardInputMode = 'adjustResize';\n extraBottomSheetProps.enablePanDownToClose =\n state.nav.options.type === 'error';\n }\n\n return (\n <BottomSheetModal\n snapPoints={snapPoints}\n index={0}\n backdropComponent={renderBackdrop}\n onDismiss={handleClose}\n style={styles.bottomSheet}\n ref={bottomSheetModalRef}\n {...extraBottomSheetProps}\n >\n <View style={styles.innerContainer}>\n {state.nav.options.type === 'error' && (\n <>\n <ErrorIcon />\n <Text style={styles.errorMessage}>\n {state.nav.options.message ||\n 'An error occurred. Please try again.'}\n </Text>\n </>\n )}\n\n {state.nav.options.type === 'sign-in' && (\n <>\n <ActivityIndicator size=\"large\" color=\"#5b0ae0\" />\n <Text style={styles.signInMessage}>\n Automatically signing you in. Just a sec...\n </Text>\n </>\n )}\n </View>\n </BottomSheetModal>\n );\n}\n\nconst styles = StyleSheet.create({\n modal: {\n // flex: 1,\n },\n bottomSheet: {\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 12,\n },\n shadowOpacity: 0.58,\n shadowRadius: 16.0,\n\n elevation: 24,\n },\n innerContainer: {\n borderRadius: 20,\n borderColor: 'transparent',\n borderWidth: 0,\n padding: 25,\n textAlign: 'center',\n },\n signInMessage: {\n textAlign: 'center',\n fontSize: 24,\n padding: 20,\n },\n errorMessage: {\n textAlign: 'center',\n fontSize: 24,\n padding: 20,\n },\n errorIcon: {\n textAlign: 'center',\n color: '#DA1E28',\n height: 24,\n width: 24,\n },\n});\n"],"mappings":"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"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _reactNativeGestureHandler = require("react-native-gesture-handler");
11
+
12
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
+
14
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+
16
+ 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); }
17
+
18
+ // @ts-ignore
19
+ const {
20
+ useBottomSheetInternal
21
+ } = require('@gorhom/bottom-sheet/src/hooks/useBottomSheetInternal');
22
+
23
+ const BottomSheetTextInputComponent = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
24
+ let {
25
+ onFocus,
26
+ onBlur,
27
+ ...rest
28
+ } = _ref;
29
+ //#region hooks
30
+ // @ts-ignore
31
+ let {
32
+ shouldHandleKeyboardEvents
33
+ } = useBottomSheetInternal(); //#endregion
34
+
35
+ if (!shouldHandleKeyboardEvents) {
36
+ shouldHandleKeyboardEvents = {};
37
+ } //#region callbacks
38
+
39
+
40
+ const handleOnFocus = (0, _react.useCallback)(args => {
41
+ shouldHandleKeyboardEvents.value = true;
42
+
43
+ if (onFocus) {
44
+ onFocus(args);
45
+ }
46
+ }, [onFocus, shouldHandleKeyboardEvents]);
47
+ const handleOnBlur = (0, _react.useCallback)(args => {
48
+ shouldHandleKeyboardEvents.value = false;
49
+
50
+ if (onBlur) {
51
+ onBlur(args);
52
+ }
53
+ }, [onBlur, shouldHandleKeyboardEvents]); //#endregion
54
+
55
+ return /*#__PURE__*/_react.default.createElement(_reactNativeGestureHandler.TextInput, _extends({
56
+ ref: ref,
57
+ onFocus: handleOnFocus,
58
+ onBlur: handleOnBlur
59
+ }, rest));
60
+ });
61
+ const BottomSheetTextInput = /*#__PURE__*/(0, _react.memo)(BottomSheetTextInputComponent);
62
+ BottomSheetTextInput.displayName = 'BottomSheetTextInput';
63
+ var _default = BottomSheetTextInput;
64
+ exports.default = _default;
65
+ //# sourceMappingURL=BottomSheetTextInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useBottomSheetInternal","require","BottomSheetTextInputComponent","forwardRef","ref","onFocus","onBlur","rest","shouldHandleKeyboardEvents","handleOnFocus","useCallback","args","value","handleOnBlur","BottomSheetTextInput","memo","displayName"],"sources":["BottomSheetTextInput.tsx"],"sourcesContent":["import React, { memo, useCallback, forwardRef } from 'react';\nimport { TextInput } from 'react-native-gesture-handler';\nimport type { BottomSheetTextInputProps } from './types';\n\n// @ts-ignore\nconst {\n useBottomSheetInternal,\n} = require('@gorhom/bottom-sheet/src/hooks/useBottomSheetInternal');\n\nconst BottomSheetTextInputComponent = forwardRef<\n TextInput,\n BottomSheetTextInputProps\n>(({ onFocus, onBlur, ...rest }, ref) => {\n //#region hooks\n // @ts-ignore\n let { shouldHandleKeyboardEvents } = useBottomSheetInternal();\n //#endregion\n\n if (!shouldHandleKeyboardEvents) {\n shouldHandleKeyboardEvents = {};\n }\n\n //#region callbacks\n const handleOnFocus = useCallback(\n (args) => {\n shouldHandleKeyboardEvents.value = true;\n if (onFocus) {\n onFocus(args);\n }\n },\n [onFocus, shouldHandleKeyboardEvents]\n );\n const handleOnBlur = useCallback(\n (args) => {\n shouldHandleKeyboardEvents.value = false;\n if (onBlur) {\n onBlur(args);\n }\n },\n [onBlur, shouldHandleKeyboardEvents]\n );\n //#endregion\n\n return (\n <TextInput\n ref={ref}\n onFocus={handleOnFocus}\n onBlur={handleOnBlur}\n {...rest}\n />\n );\n});\n\nconst BottomSheetTextInput = memo(BottomSheetTextInputComponent);\nBottomSheetTextInput.displayName = 'BottomSheetTextInput';\n\nexport default BottomSheetTextInput;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;;;;;AAGA;AACA,MAAM;EACJA;AADI,IAEFC,OAAO,CAAC,uDAAD,CAFX;;AAIA,MAAMC,6BAA6B,gBAAG,IAAAC,iBAAA,EAGpC,OAA+BC,GAA/B,KAAuC;EAAA,IAAtC;IAAEC,OAAF;IAAWC,MAAX;IAAmB,GAAGC;EAAtB,CAAsC;EACvC;EACA;EACA,IAAI;IAAEC;EAAF,IAAiCR,sBAAsB,EAA3D,CAHuC,CAIvC;;EAEA,IAAI,CAACQ,0BAAL,EAAiC;IAC/BA,0BAA0B,GAAG,EAA7B;EACD,CARsC,CAUvC;;;EACA,MAAMC,aAAa,GAAG,IAAAC,kBAAA,EACnBC,IAAD,IAAU;IACRH,0BAA0B,CAACI,KAA3B,GAAmC,IAAnC;;IACA,IAAIP,OAAJ,EAAa;MACXA,OAAO,CAACM,IAAD,CAAP;IACD;EACF,CANmB,EAOpB,CAACN,OAAD,EAAUG,0BAAV,CAPoB,CAAtB;EASA,MAAMK,YAAY,GAAG,IAAAH,kBAAA,EAClBC,IAAD,IAAU;IACRH,0BAA0B,CAACI,KAA3B,GAAmC,KAAnC;;IACA,IAAIN,MAAJ,EAAY;MACVA,MAAM,CAACK,IAAD,CAAN;IACD;EACF,CANkB,EAOnB,CAACL,MAAD,EAASE,0BAAT,CAPmB,CAArB,CApBuC,CA6BvC;;EAEA,oBACE,6BAAC,oCAAD;IACE,GAAG,EAAEJ,GADP;IAEE,OAAO,EAAEK,aAFX;IAGE,MAAM,EAAEI;EAHV,GAIMN,IAJN,EADF;AAQD,CA1CqC,CAAtC;AA4CA,MAAMO,oBAAoB,gBAAG,IAAAC,WAAA,EAAKb,6BAAL,CAA7B;AACAY,oBAAoB,CAACE,WAArB,GAAmC,sBAAnC;eAEeF,oB"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "default", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _BottomSheetTextInput.default;
10
+ }
11
+ });
12
+
13
+ var _BottomSheetTextInput = _interopRequireDefault(require("./BottomSheetTextInput"));
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["// @ts-ignore\nexport { default } from './BottomSheetTextInput';\n\n// @ts-ignore\nexport type { BottomSheetTextInputProps } from './types';\n"],"mappings":";;;;;;;;;;;;AACA"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { TextInputProps } from 'react-native';\n\nexport interface BottomSheetTextInputProps extends TextInputProps {}\n"],"mappings":""}
@@ -7,10 +7,6 @@ exports.RowndComponents = RowndComponents;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _twrnc = require("twrnc");
11
-
12
- var _tailwind = _interopRequireDefault(require("../utils/tailwind"));
13
-
14
10
  var _SignIn = require("./SignIn");
15
11
 
16
12
  var _AutoSigninDialog = require("./AutoSigninDialog");
@@ -19,11 +15,13 @@ var _GlobalContext = require("./GlobalContext");
19
15
 
20
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
17
 
18
+ // import { useDeviceContext } from 'twrnc';
19
+ // import tw from '../utils/tailwind';
22
20
  function RowndComponents() {
23
21
  const {
24
22
  state
25
- } = (0, _GlobalContext.useGlobalContext)();
26
- (0, _twrnc.useDeviceContext)(_tailwind.default);
23
+ } = (0, _GlobalContext.useGlobalContext)(); // useDeviceContext(tw);
24
+
27
25
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, state.nav.current_route === '/account/login' && /*#__PURE__*/_react.default.createElement(_SignIn.SignIn, null), state.nav.current_route === '/account/auto-signin' && /*#__PURE__*/_react.default.createElement(_AutoSigninDialog.AutoSigninDialog, null));
28
26
  }
29
27
  //# sourceMappingURL=RowndComponents.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["RowndComponents","state","useGlobalContext","useDeviceContext","tw","nav","current_route"],"sources":["RowndComponents.tsx"],"sourcesContent":["import React from 'react';\nimport { useDeviceContext } from 'twrnc';\n\nimport tw from '../utils/tailwind';\nimport { SignIn } from './SignIn';\nimport { AutoSigninDialog } from './AutoSigninDialog';\nimport { useGlobalContext } from './GlobalContext';\n\nexport function RowndComponents() {\n const { state } = useGlobalContext();\n useDeviceContext(tw);\n\n return (\n <>\n {state.nav.current_route === '/account/login' && <SignIn />}\n {state.nav.current_route === '/account/auto-signin' && (\n <AutoSigninDialog />\n )}\n </>\n );\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;AAEO,SAASA,eAAT,GAA2B;EAChC,MAAM;IAAEC;EAAF,IAAY,IAAAC,+BAAA,GAAlB;EACA,IAAAC,uBAAA,EAAiBC,iBAAjB;EAEA,oBACE,4DACGH,KAAK,CAACI,GAAN,CAAUC,aAAV,KAA4B,gBAA5B,iBAAgD,6BAAC,cAAD,OADnD,EAEGL,KAAK,CAACI,GAAN,CAAUC,aAAV,KAA4B,sBAA5B,iBACC,6BAAC,kCAAD,OAHJ,CADF;AAQD"}
1
+ {"version":3,"names":["RowndComponents","state","useGlobalContext","nav","current_route"],"sources":["RowndComponents.tsx"],"sourcesContent":["import React from 'react';\n// import { useDeviceContext } from 'twrnc';\n\n// import tw from '../utils/tailwind';\nimport { SignIn } from './SignIn';\nimport { AutoSigninDialog } from './AutoSigninDialog';\nimport { useGlobalContext } from './GlobalContext';\n\nexport function RowndComponents() {\n const { state } = useGlobalContext();\n // useDeviceContext(tw);\n\n return (\n <>\n {state.nav.current_route === '/account/login' && <SignIn />}\n {state.nav.current_route === '/account/auto-signin' && (\n <AutoSigninDialog />\n )}\n </>\n );\n}\n"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AACA;;;;AALA;AAEA;AAKO,SAASA,eAAT,GAA2B;EAChC,MAAM;IAAEC;EAAF,IAAY,IAAAC,+BAAA,GAAlB,CADgC,CAEhC;;EAEA,oBACE,4DACGD,KAAK,CAACE,GAAN,CAAUC,aAAV,KAA4B,gBAA5B,iBAAgD,6BAAC,cAAD,OADnD,EAEGH,KAAK,CAACE,GAAN,CAAUC,aAAV,KAA4B,sBAA5B,iBACC,6BAAC,kCAAD,OAHJ,CADF;AAQD"}
@@ -21,6 +21,10 @@ var _jwtDecode = _interopRequireDefault(require("jwt-decode"));
21
21
 
22
22
  var _bottomSheet = require("@gorhom/bottom-sheet");
23
23
 
24
+ var _BottomSheetTextInput = _interopRequireDefault(require("./BottomSheetTextInput"));
25
+
26
+ var _package = _interopRequireDefault(require("@gorhom/bottom-sheet/package.json"));
27
+
24
28
  var _hooks = require("../hooks");
25
29
 
26
30
  var _GlobalContext = require("./GlobalContext");
@@ -398,17 +402,22 @@ function SignIn() {
398
402
  const renderBackdrop = (0, _react.useCallback)(cbProps => /*#__PURE__*/_react.default.createElement(_bottomSheet.BottomSheetBackdrop, _extends({}, cbProps, {
399
403
  pressBehavior: "close"
400
404
  })), []);
401
- return /*#__PURE__*/_react.default.createElement(_bottomSheet.BottomSheetModal, {
405
+ let extraBottomSheetProps = {};
406
+
407
+ if (_package.default.version.startsWith('4')) {
408
+ extraBottomSheetProps.keyboardBehavior = 'fillParent';
409
+ extraBottomSheetProps.android_keyboardInputMode = 'adjustResize';
410
+ extraBottomSheetProps.enablePanDownToClose = state.nav.options.type === 'error';
411
+ }
412
+
413
+ return /*#__PURE__*/_react.default.createElement(_bottomSheet.BottomSheetModal, _extends({
402
414
  snapPoints: snapPoints,
403
415
  index: 1,
404
416
  backdropComponent: renderBackdrop,
405
- keyboardBehavior: "fillParent",
406
- android_keyboardInputMode: "adjustResize",
407
- enablePanDownToClose: true,
408
417
  onDismiss: handleClose,
409
418
  style: styles.bottomSheet,
410
419
  ref: bottomSheetModalRef
411
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
420
+ }, extraBottomSheetProps), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
412
421
  style: styles.innerContainer
413
422
  }, step === LoginStep.INIT && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (app === null || app === void 0 ? void 0 : (_app$config6 = app.config) === null || _app$config6 === void 0 ? void 0 : (_app$config6$hub = _app$config6.hub) === null || _app$config6$hub === void 0 ? void 0 : (_app$config6$hub$auth = _app$config6$hub.auth) === null || _app$config6$hub$auth === void 0 ? void 0 : _app$config6$hub$auth.show_app_icon) && (app === null || app === void 0 ? void 0 : app.icon) && (app.icon_content_type === 'image/svg+xml' ? /*#__PURE__*/_react.default.createElement(_reactNativeSvg.SvgCssUri, {
414
423
  uri: app.icon,
@@ -422,7 +431,7 @@ function SignIn() {
422
431
  style: styles.dialogHeading
423
432
  }, "Sign in or sign up"), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
424
433
  style: styles.inputLabel
425
- }, "Email or phone number"), /*#__PURE__*/_react.default.createElement(_bottomSheet.BottomSheetTextInput, {
434
+ }, "Email or phone number"), /*#__PURE__*/_react.default.createElement(_BottomSheetTextInput.default, {
426
435
  style: styles.identifierInput,
427
436
  placeholder: "Enter here",
428
437
  keyboardType: "email-address",
@@ -440,25 +449,25 @@ function SignIn() {
440
449
  value: addlFieldValues[field.name] || '',
441
450
  [['input', 'text', 'tel', 'email'].includes(field.type) ? 'onInput' : 'onChange']: handleAddlFieldChange
442
451
  });
443
- })), /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
444
- style: _ref => {
445
- let {
446
- pressed
447
- } = _ref;
448
- return [styles.button, !isValidUserIdentifier && styles.buttonDisabled, pressed && styles.buttonPressed, isSubmitting && styles.buttonSubmitting];
449
- },
452
+ })), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
450
453
  disabled: !isValidUserIdentifier || isSubmitting,
451
454
  onPress: initSignIn
452
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, isSubmitting && /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
453
- size: "small",
454
- color: "#efefef"
455
- }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
455
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
456
+ style: { ...styles.button,
457
+ ...(!isValidUserIdentifier && styles.buttonDisabled),
458
+ ...(isSubmitting && styles.buttonSubmitting)
459
+ }
460
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
456
461
  style: styles.buttonText
457
462
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
458
463
  style: isValidUserIdentifier ? styles.buttonContent : { ...styles.buttonContent,
459
464
  ...styles.buttonDisabledText
460
465
  }
461
- }, isSubmitting ? 'Just a sec...' : 'Continue')))), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
466
+ }, isSubmitting && /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
467
+ size: "small",
468
+ color: "#efefef",
469
+ style: styles.loadingIndicator
470
+ }), isSubmitting ? 'Just a sec...' : 'Continue')))), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
462
471
  style: styles.signInNoticeText
463
472
  }, "By continuing, you're agreeing to the terms of service that govern this app and to receive email or text messages for verification purposes.")), step === LoginStep.WAITING && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
464
473
  style: styles.dialogHeading
@@ -471,13 +480,8 @@ function SignIn() {
471
480
  onPress: () => setStep(LoginStep.INIT)
472
481
  }, "\xA0Re-send message")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
473
482
  style: styles.signInVerificationImage
474
- }, loginType === 'phone' ? /*#__PURE__*/_react.default.createElement(_PhoneVerifyWaiting.default, null) : /*#__PURE__*/_react.default.createElement(_EmailVerifyWaiting.default, null)), /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
475
- style: _ref2 => {
476
- let {
477
- pressed
478
- } = _ref2;
479
- return [styles.button, pressed && styles.buttonPressed];
480
- },
483
+ }, loginType === 'phone' ? /*#__PURE__*/_react.default.createElement(_PhoneVerifyWaiting.default, null) : /*#__PURE__*/_react.default.createElement(_EmailVerifyWaiting.default, null)), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
484
+ style: [styles.button],
481
485
  onPress: () => setStep(LoginStep.INIT)
482
486
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
483
487
  style: styles.buttonContent
@@ -485,7 +489,7 @@ function SignIn() {
485
489
  style: styles.signInVerificationImage
486
490
  }, /*#__PURE__*/_react.default.createElement(_CheckmarkFilled.default, null))), step === LoginStep.FAILURE && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
487
491
  style: _tailwind.default.style('text-base')
488
- }, "Whoops, that didn't work!"), /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
492
+ }, "Whoops, that didn't work!"), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
489
493
  style: styles.button,
490
494
  onPress: () => setStep(LoginStep.INIT)
491
495
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
@@ -494,7 +498,7 @@ function SignIn() {
494
498
  style: _tailwind.default.style('text-base')
495
499
  }, "An error occurred while signing you in."), !!error && /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
496
500
  style: _tailwind.default.style('text-rose-800')
497
- }, error), /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
501
+ }, error), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
498
502
  style: styles.button,
499
503
  onPress: () => setStep(LoginStep.INIT)
500
504
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
@@ -571,9 +575,11 @@ const styles = _reactNative.StyleSheet.create({
571
575
  marginBottom: 30,
572
576
  elevation: 0,
573
577
  backgroundColor: '#5b0ae0',
578
+ color: '#fff',
574
579
  display: 'flex',
575
580
  alignItems: 'center',
576
- justifyContent: 'center'
581
+ justifyContent: 'center' // height: 45,
582
+
577
583
  },
578
584
  buttonDisabled: {
579
585
  backgroundColor: '#eee'
@@ -586,10 +592,10 @@ const styles = _reactNative.StyleSheet.create({
586
592
  fontSize: 18,
587
593
  color: '#fff'
588
594
  },
589
- buttonText: {
590
- marginLeft: 10,
591
- paddingLeft: 10,
592
- fontSize: 18
595
+ buttonText: {// marginHorizontal: 10,
596
+ // paddingHorizontal: 10,
597
+ // fontSize: 18,
598
+ // color: '#fff',
593
599
  },
594
600
  buttonTextInner: {
595
601
  fontSize: 18
@@ -602,9 +608,7 @@ const styles = _reactNative.StyleSheet.create({
602
608
  color: '#c7c7c7'
603
609
  },
604
610
  loadingIndicator: {
605
- textAlignVertical: 'center',
606
- padding: 20,
607
- margin: 20
611
+ marginRight: 10
608
612
  },
609
613
  signInNoticeText: {
610
614
  fontSize: 12,