@oxyhq/services 5.4.3 → 5.4.4
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/README.md +14 -0
- package/lib/commonjs/assets/assets/illustrations/HighFive.tsx +41 -0
- package/lib/commonjs/assets/icons/OxyServices.js +1 -1
- package/lib/commonjs/assets/illustrations/HighFive.js +61 -0
- package/lib/commonjs/assets/illustrations/HighFive.js.map +1 -0
- package/lib/commonjs/core/index.js +2 -2
- package/lib/commonjs/index.js +22 -22
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/node/createAuth.js +95 -0
- package/lib/commonjs/node/createAuth.js.map +1 -0
- package/lib/commonjs/node/index.js +15 -6
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/ui/components/Avatar.js +3 -3
- package/lib/commonjs/ui/components/Avatar.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +3 -3
- package/lib/commonjs/ui/components/GroupedSection.js +1 -1
- package/lib/commonjs/ui/components/OxyLogo.js +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +146 -141
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +2 -2
- package/lib/commonjs/ui/components/ProfileCard.js +2 -2
- package/lib/commonjs/ui/components/Section.js +1 -1
- package/lib/commonjs/ui/components/SectionTitle.js +1 -1
- package/lib/commonjs/ui/components/icon/index.js +1 -1
- package/lib/commonjs/ui/components/index.js +12 -12
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +213 -0
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -0
- package/lib/commonjs/ui/components/internal/TextField.js +576 -0
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +1 -1
- package/lib/commonjs/ui/index.js +19 -11
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +23 -18
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +18 -18
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +4 -4
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +5 -5
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +3 -3
- package/lib/commonjs/ui/screens/AppInfoScreen.js +6 -6
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +3 -3
- package/lib/commonjs/ui/screens/FeedbackScreen.js +1169 -0
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +3 -3
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +3 -3
- package/lib/commonjs/ui/screens/ProfileScreen.js +2 -2
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +2 -2
- package/lib/commonjs/ui/screens/SignInScreen.js +182 -304
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +811 -712
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -3
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +1 -1
- package/lib/commonjs/ui/store/index.js +52 -0
- package/lib/commonjs/ui/store/index.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +2 -2
- package/lib/commonjs/ui/styles/theme.js +1 -1
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/module/assets/assets/illustrations/HighFive.tsx +41 -0
- package/lib/module/assets/icons/OxyServices.js +1 -1
- package/lib/module/assets/icons/OxyServices.js.map +1 -1
- package/lib/module/assets/illustrations/HighFive.js +55 -0
- package/lib/module/assets/illustrations/HighFive.js.map +1 -0
- package/lib/module/core/index.js +2 -2
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +10 -10
- package/lib/module/index.js.map +1 -1
- package/lib/module/node/createAuth.js +90 -0
- package/lib/module/node/createAuth.js.map +1 -0
- package/lib/module/node/index.js +8 -4
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/ui/components/Avatar.js +2 -2
- package/lib/module/ui/components/Avatar.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +3 -3
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/GroupedSection.js +1 -1
- package/lib/module/ui/components/GroupedSection.js.map +1 -1
- package/lib/module/ui/components/OxyLogo.js +1 -1
- package/lib/module/ui/components/OxyLogo.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +143 -138
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +2 -2
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +2 -2
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/components/Section.js +1 -1
- package/lib/module/ui/components/Section.js.map +1 -1
- package/lib/module/ui/components/SectionTitle.js +1 -1
- package/lib/module/ui/components/SectionTitle.js.map +1 -1
- package/lib/module/ui/components/icon/index.js +1 -1
- package/lib/module/ui/components/icon/index.js.map +1 -1
- package/lib/module/ui/components/index.js +12 -12
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +208 -0
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -0
- package/lib/module/ui/components/internal/TextField.js +571 -0
- package/lib/module/ui/components/internal/TextField.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +1 -1
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/index.js +12 -10
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +23 -18
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +5 -5
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +2 -2
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +4 -4
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +5 -5
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +3 -3
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +6 -6
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/BillingManagementScreen.js +3 -3
- package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +1164 -0
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +3 -3
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +3 -3
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +2 -2
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +2 -2
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +182 -304
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +810 -712
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -3
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/store/index.js +44 -0
- package/lib/module/ui/store/index.js.map +1 -0
- package/lib/module/ui/styles/index.js +2 -2
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/module/ui/styles/theme.js +1 -1
- package/lib/module/ui/styles/theme.js.map +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/assets/illustrations/HighFive.d.ts +9 -0
- package/lib/typescript/assets/illustrations/HighFive.d.ts.map +1 -0
- package/lib/typescript/node/createAuth.d.ts +7 -0
- package/lib/typescript/node/createAuth.d.ts.map +1 -0
- package/lib/typescript/node/index.d.ts +2 -0
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/types/expo-vector-icons.d.ts +3 -0
- package/lib/typescript/types/express.d.ts +5 -0
- package/lib/typescript/types/react-redux.d.ts +5 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts +18 -0
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts +25 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +2 -0
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
- package/lib/typescript/ui/store/index.d.ts +19 -0
- package/lib/typescript/ui/store/index.d.ts.map +1 -0
- package/package.json +10 -25
- package/src/assets/illustrations/HighFive.tsx +41 -0
- package/src/node/createAuth.ts +116 -0
- package/src/node/index.ts +4 -0
- package/src/types/expo-vector-icons.d.ts +3 -0
- package/src/types/express.d.ts +5 -0
- package/src/types/react-redux.d.ts +5 -0
- package/src/ui/components/OxyProvider.tsx +136 -135
- package/src/ui/components/internal/GroupedPillButtons.tsx +253 -0
- package/src/ui/components/internal/TextField.tsx +694 -0
- package/src/ui/index.ts +6 -2
- package/src/ui/navigation/OxyRouter.tsx +8 -3
- package/src/ui/screens/FeedbackScreen.tsx +1042 -0
- package/src/ui/screens/SignInScreen.tsx +179 -222
- package/src/ui/screens/SignUpScreen.tsx +772 -608
- package/src/ui/store/index.ts +51 -0
|
@@ -6,18 +6,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _OxyContext = require("../context/OxyContext
|
|
10
|
-
var
|
|
11
|
-
var _Avatar = _interopRequireDefault(require("../components/Avatar
|
|
9
|
+
var _OxyContext = require("../context/OxyContext");
|
|
10
|
+
var _styles = require("../styles");
|
|
11
|
+
var _Avatar = _interopRequireDefault(require("../components/Avatar"));
|
|
12
12
|
var _vectorIcons = require("@expo/vector-icons");
|
|
13
|
-
var
|
|
14
|
-
var _sonner = require("../../lib/sonner
|
|
13
|
+
var _HighFive = _interopRequireDefault(require("../../assets/illustrations/HighFive"));
|
|
14
|
+
var _sonner = require("../../lib/sonner");
|
|
15
|
+
var _GroupedPillButtons = _interopRequireDefault(require("../components/internal/GroupedPillButtons"));
|
|
16
|
+
var _TextField = _interopRequireDefault(require("../components/internal/TextField"));
|
|
15
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
20
|
const SignInScreen = ({
|
|
19
21
|
navigate,
|
|
20
22
|
goBack,
|
|
23
|
+
onAuthenticated,
|
|
21
24
|
theme
|
|
22
25
|
}) => {
|
|
23
26
|
// Form data states
|
|
@@ -49,8 +52,8 @@ const SignInScreen = ({
|
|
|
49
52
|
sessions,
|
|
50
53
|
oxyServices
|
|
51
54
|
} = (0, _OxyContext.useOxy)();
|
|
52
|
-
const colors = (0,
|
|
53
|
-
const commonStyles = (0,
|
|
55
|
+
const colors = (0, _styles.useThemeColors)(theme);
|
|
56
|
+
const commonStyles = (0, _styles.createCommonStyles)(theme);
|
|
54
57
|
|
|
55
58
|
// Check if this should be treated as "Add Account" mode
|
|
56
59
|
const isAddAccountMode = (0, _react.useMemo)(() => user && isAuthenticated && sessions && sessions.length > 0, [user, isAuthenticated, sessions]);
|
|
@@ -272,42 +275,39 @@ const SignInScreen = ({
|
|
|
272
275
|
animateTransition(currentStep - 1);
|
|
273
276
|
}
|
|
274
277
|
}, [currentStep, progressAnim, animateTransition]);
|
|
275
|
-
|
|
278
|
+
|
|
279
|
+
// Custom next handlers for validation
|
|
280
|
+
const handleUsernameContinue = (0, _react.useCallback)(() => {
|
|
276
281
|
if (!username) {
|
|
277
|
-
_sonner.toast.error('Please enter your username');
|
|
282
|
+
_sonner.toast.error('Please enter your username.');
|
|
278
283
|
return;
|
|
279
284
|
}
|
|
280
|
-
if (validationStatus
|
|
281
|
-
|
|
282
|
-
if (!errorMessage) {
|
|
283
|
-
_sonner.toast.error('Please enter a valid username');
|
|
284
|
-
}
|
|
285
|
+
if (validationStatus !== 'valid' || !userProfile) {
|
|
286
|
+
_sonner.toast.error('Please enter a valid username.');
|
|
285
287
|
return;
|
|
286
288
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
+
setErrorMessage('');
|
|
290
|
+
nextStep();
|
|
291
|
+
}, [username, validationStatus, userProfile, setErrorMessage, nextStep]);
|
|
292
|
+
const handleSignIn = (0, _react.useCallback)(async () => {
|
|
293
|
+
if (!password) {
|
|
294
|
+
_sonner.toast.error('Please enter your password.');
|
|
289
295
|
return;
|
|
290
296
|
}
|
|
291
|
-
if (
|
|
292
|
-
|
|
293
|
-
nextStep();
|
|
294
|
-
} else {
|
|
295
|
-
_sonner.toast.error('Please enter a valid username');
|
|
296
|
-
}
|
|
297
|
-
}, [username, validationStatus, userProfile, errorMessage, nextStep]);
|
|
298
|
-
const handleLogin = (0, _react.useCallback)(async () => {
|
|
299
|
-
if (!username || !password) {
|
|
300
|
-
_sonner.toast.error('Please enter both username and password');
|
|
297
|
+
if (!username || !userProfile) {
|
|
298
|
+
_sonner.toast.error('Please enter a valid username first.');
|
|
301
299
|
return;
|
|
302
300
|
}
|
|
303
301
|
try {
|
|
304
302
|
setErrorMessage('');
|
|
305
|
-
await login(username, password);
|
|
306
|
-
|
|
303
|
+
const user = await login(username, password);
|
|
304
|
+
if (onAuthenticated) {
|
|
305
|
+
onAuthenticated(user);
|
|
306
|
+
}
|
|
307
307
|
} catch (error) {
|
|
308
308
|
_sonner.toast.error(error.message || 'Login failed');
|
|
309
309
|
}
|
|
310
|
-
}, [username, password, login]);
|
|
310
|
+
}, [username, password, login, onAuthenticated, setErrorMessage, userProfile]);
|
|
311
311
|
|
|
312
312
|
// Memoized step components
|
|
313
313
|
const renderUsernameStep = (0, _react.useMemo)(() => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
|
|
@@ -319,109 +319,16 @@ const SignInScreen = ({
|
|
|
319
319
|
scale: scaleAnim
|
|
320
320
|
}]
|
|
321
321
|
}],
|
|
322
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
width: 280,
|
|
326
|
-
height: 160,
|
|
327
|
-
viewBox: "0 0 280 160",
|
|
328
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.Defs, {
|
|
329
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.LinearGradient, {
|
|
330
|
-
id: "primaryGradient",
|
|
331
|
-
x1: "0%",
|
|
332
|
-
y1: "0%",
|
|
333
|
-
x2: "100%",
|
|
334
|
-
y2: "100%",
|
|
335
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
336
|
-
offset: "0%",
|
|
337
|
-
stopColor: colors.primary,
|
|
338
|
-
stopOpacity: "0.8"
|
|
339
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
340
|
-
offset: "100%",
|
|
341
|
-
stopColor: colors.primary,
|
|
342
|
-
stopOpacity: "0.2"
|
|
343
|
-
})]
|
|
344
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.LinearGradient, {
|
|
345
|
-
id: "secondaryGradient",
|
|
346
|
-
x1: "0%",
|
|
347
|
-
y1: "0%",
|
|
348
|
-
x2: "100%",
|
|
349
|
-
y2: "100%",
|
|
350
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
351
|
-
offset: "0%",
|
|
352
|
-
stopColor: colors.primary,
|
|
353
|
-
stopOpacity: "0.1"
|
|
354
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
355
|
-
offset: "100%",
|
|
356
|
-
stopColor: colors.primary,
|
|
357
|
-
stopOpacity: "0.3"
|
|
358
|
-
})]
|
|
359
|
-
})]
|
|
360
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
|
|
361
|
-
cx: "80",
|
|
362
|
-
cy: "80",
|
|
363
|
-
r: "45",
|
|
364
|
-
fill: "url(#primaryGradient)"
|
|
365
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
|
|
366
|
-
cx: "200",
|
|
367
|
-
cy: "80",
|
|
368
|
-
r: "35",
|
|
369
|
-
fill: "url(#secondaryGradient)"
|
|
370
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
371
|
-
d: "M40 120 Q80 40 140 80 Q200 120 240 60",
|
|
372
|
-
stroke: colors.primary,
|
|
373
|
-
strokeWidth: "4",
|
|
374
|
-
fill: "none",
|
|
375
|
-
strokeLinecap: "round"
|
|
376
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
|
|
377
|
-
cx: "60",
|
|
378
|
-
cy: "50",
|
|
379
|
-
r: "8",
|
|
380
|
-
fill: colors.primary,
|
|
381
|
-
opacity: "0.6"
|
|
382
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
|
|
383
|
-
cx: "220",
|
|
384
|
-
cy: "120",
|
|
385
|
-
r: "6",
|
|
386
|
-
fill: colors.primary,
|
|
387
|
-
opacity: "0.4"
|
|
388
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
|
|
389
|
-
cx: "250",
|
|
390
|
-
cy: "40",
|
|
391
|
-
r: "4",
|
|
392
|
-
fill: colors.primary,
|
|
393
|
-
opacity: "0.8"
|
|
394
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
|
|
395
|
-
cx: "140",
|
|
396
|
-
cy: "80",
|
|
397
|
-
r: "25",
|
|
398
|
-
fill: colors.background,
|
|
399
|
-
opacity: "0.9"
|
|
400
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
|
|
401
|
-
cx: "135",
|
|
402
|
-
cy: "75",
|
|
403
|
-
r: "3",
|
|
404
|
-
fill: colors.primary
|
|
405
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
|
|
406
|
-
cx: "145",
|
|
407
|
-
cy: "75",
|
|
408
|
-
r: "3",
|
|
409
|
-
fill: colors.primary
|
|
410
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
411
|
-
d: "M132 85 Q140 92 148 85",
|
|
412
|
-
stroke: colors.primary,
|
|
413
|
-
strokeWidth: "2",
|
|
414
|
-
fill: "none",
|
|
415
|
-
strokeLinecap: "round"
|
|
416
|
-
})]
|
|
417
|
-
})
|
|
322
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HighFive.default, {
|
|
323
|
+
width: 100,
|
|
324
|
+
height: 100
|
|
418
325
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
419
326
|
style: styles.modernHeader,
|
|
420
327
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
421
328
|
style: [styles.modernTitle, {
|
|
422
329
|
color: colors.text
|
|
423
330
|
}],
|
|
424
|
-
children: isAddAccountMode ? 'Add Account' : '
|
|
331
|
+
children: isAddAccountMode ? 'Add Another Account' : 'Sign In'
|
|
425
332
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
426
333
|
style: [styles.modernSubtitle, {
|
|
427
334
|
color: colors.secondaryText
|
|
@@ -461,118 +368,129 @@ const SignInScreen = ({
|
|
|
461
368
|
}],
|
|
462
369
|
children: errorMessage
|
|
463
370
|
})]
|
|
464
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.
|
|
371
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
465
372
|
style: [styles.modernInputContainer, {
|
|
466
373
|
transform: [{
|
|
467
374
|
scale: inputScaleAnim
|
|
468
375
|
}]
|
|
469
376
|
}],
|
|
470
|
-
children:
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
style: styles.validationIndicator
|
|
505
|
-
})]
|
|
506
|
-
}), validationStatus === 'valid' && userProfile && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
507
|
-
style: [styles.validationSuccessCard, {
|
|
508
|
-
backgroundColor: colors.success + '15'
|
|
509
|
-
}],
|
|
510
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
377
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
|
|
378
|
+
label: "Username",
|
|
379
|
+
icon: "person-outline",
|
|
380
|
+
value: username,
|
|
381
|
+
onChangeText: handleUsernameChange,
|
|
382
|
+
onFocus: handleInputFocus,
|
|
383
|
+
onBlur: handleInputBlur,
|
|
384
|
+
autoCapitalize: "none",
|
|
385
|
+
autoCorrect: false,
|
|
386
|
+
testID: "username-input",
|
|
387
|
+
colors: colors,
|
|
388
|
+
variant: "filled",
|
|
389
|
+
error: validationStatus === 'invalid' && username.length >= 3 ? 'Username not found' : undefined,
|
|
390
|
+
loading: validationStatus === 'validating',
|
|
391
|
+
success: validationStatus === 'valid'
|
|
392
|
+
})
|
|
393
|
+
}), validationStatus === 'valid' && userProfile && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
394
|
+
style: [styles.validationSuccessCard, {
|
|
395
|
+
backgroundColor: colors.success + '10',
|
|
396
|
+
borderWidth: 1,
|
|
397
|
+
borderColor: colors.success + '30',
|
|
398
|
+
padding: 16
|
|
399
|
+
}],
|
|
400
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
401
|
+
style: {
|
|
402
|
+
width: 32,
|
|
403
|
+
height: 32,
|
|
404
|
+
borderRadius: 16,
|
|
405
|
+
backgroundColor: colors.success + '20',
|
|
406
|
+
justifyContent: 'center',
|
|
407
|
+
alignItems: 'center',
|
|
408
|
+
marginRight: 12
|
|
409
|
+
},
|
|
410
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
511
411
|
name: "checkmark-circle",
|
|
512
412
|
size: 16,
|
|
513
413
|
color: colors.success
|
|
514
|
-
})
|
|
414
|
+
})
|
|
415
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
416
|
+
style: {
|
|
417
|
+
flex: 1
|
|
418
|
+
},
|
|
419
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
515
420
|
style: [styles.validationText, {
|
|
516
|
-
color: colors.success
|
|
421
|
+
color: colors.success,
|
|
422
|
+
fontWeight: '600',
|
|
423
|
+
marginBottom: 2
|
|
517
424
|
}],
|
|
518
|
-
children: ["
|
|
425
|
+
children: ["Welcome back, ", userProfile?.displayName || userProfile?.name || username, "!"]
|
|
426
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
427
|
+
style: [styles.validationText, {
|
|
428
|
+
color: colors.secondaryText,
|
|
429
|
+
fontSize: 11,
|
|
430
|
+
opacity: 0.8
|
|
431
|
+
}],
|
|
432
|
+
children: "Ready to continue where you left off"
|
|
519
433
|
})]
|
|
520
|
-
})
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
434
|
+
})]
|
|
435
|
+
}), validationStatus === 'invalid' && username.length >= 3 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
436
|
+
style: [styles.validationErrorCard, {
|
|
437
|
+
backgroundColor: colors.error + '10',
|
|
438
|
+
borderWidth: 1,
|
|
439
|
+
borderColor: colors.error + '30',
|
|
440
|
+
padding: 16
|
|
441
|
+
}],
|
|
442
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
443
|
+
style: {
|
|
444
|
+
width: 32,
|
|
445
|
+
height: 32,
|
|
446
|
+
borderRadius: 16,
|
|
447
|
+
backgroundColor: colors.error + '20',
|
|
448
|
+
justifyContent: 'center',
|
|
449
|
+
alignItems: 'center',
|
|
450
|
+
marginRight: 12
|
|
451
|
+
},
|
|
452
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
525
453
|
name: "alert-circle",
|
|
526
454
|
size: 16,
|
|
527
455
|
color: colors.error
|
|
528
|
-
})
|
|
456
|
+
})
|
|
457
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
458
|
+
style: {
|
|
459
|
+
flex: 1
|
|
460
|
+
},
|
|
461
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
529
462
|
style: [styles.validationText, {
|
|
530
|
-
color: colors.error
|
|
463
|
+
color: colors.error,
|
|
464
|
+
fontWeight: '600',
|
|
465
|
+
marginBottom: 2
|
|
531
466
|
}],
|
|
532
467
|
children: "Username not found"
|
|
468
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
469
|
+
style: [styles.validationText, {
|
|
470
|
+
color: colors.secondaryText,
|
|
471
|
+
fontSize: 11,
|
|
472
|
+
opacity: 0.8
|
|
473
|
+
}],
|
|
474
|
+
children: "Check spelling or sign up"
|
|
533
475
|
})]
|
|
534
476
|
})]
|
|
535
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
opacity: !username || validationStatus !== 'valid' ? 0.5 : 1,
|
|
539
|
-
shadowColor: colors.primary
|
|
540
|
-
}],
|
|
541
|
-
onPress: handleUsernameNext,
|
|
542
|
-
disabled: !username || validationStatus !== 'valid' || isValidating,
|
|
543
|
-
testID: "username-next-button",
|
|
544
|
-
children: isValidating ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
545
|
-
color: "#FFFFFF",
|
|
546
|
-
size: "small"
|
|
547
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
548
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
549
|
-
style: styles.modernButtonText,
|
|
550
|
-
children: "Continue"
|
|
551
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
552
|
-
name: "arrow-forward",
|
|
553
|
-
size: 20,
|
|
554
|
-
color: "#FFFFFF",
|
|
555
|
-
style: styles.buttonIcon
|
|
556
|
-
})]
|
|
557
|
-
})
|
|
558
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
559
|
-
style: styles.footerTextContainer,
|
|
560
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
561
|
-
style: [styles.footerText, {
|
|
562
|
-
color: colors.secondaryText
|
|
563
|
-
}],
|
|
564
|
-
children: ["Don't have an account?", ' ']
|
|
565
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
477
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GroupedPillButtons.default, {
|
|
478
|
+
buttons: [{
|
|
479
|
+
text: 'Sign Up',
|
|
566
480
|
onPress: () => navigate('SignUp'),
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
481
|
+
icon: 'person-add',
|
|
482
|
+
variant: 'transparent'
|
|
483
|
+
}, {
|
|
484
|
+
text: 'Continue',
|
|
485
|
+
onPress: handleUsernameContinue,
|
|
486
|
+
icon: 'arrow-forward',
|
|
487
|
+
variant: 'primary',
|
|
488
|
+
loading: isValidating,
|
|
489
|
+
testID: 'username-next-button'
|
|
490
|
+
}],
|
|
491
|
+
colors: colors
|
|
574
492
|
})]
|
|
575
|
-
}), [fadeAnim, slideAnim, scaleAnim, colors, isAddAccountMode, user?.username, errorMessage, inputScaleAnim, isInputFocused, username, validationStatus, userProfile, isValidating, handleInputFocus, handleInputBlur, handleUsernameChange,
|
|
493
|
+
}), [fadeAnim, slideAnim, scaleAnim, colors, isAddAccountMode, user?.username, errorMessage, inputScaleAnim, isInputFocused, username, validationStatus, userProfile, isValidating, handleInputFocus, handleInputBlur, handleUsernameChange, handleUsernameContinue, navigate, styles]);
|
|
576
494
|
const renderPasswordStep = (0, _react.useMemo)(() => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
|
|
577
495
|
style: [styles.stepContainer, {
|
|
578
496
|
opacity: fadeAnim,
|
|
@@ -646,79 +564,36 @@ const SignInScreen = ({
|
|
|
646
564
|
scale: inputScaleAnim
|
|
647
565
|
}]
|
|
648
566
|
}],
|
|
649
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
placeholderTextColor: colors.placeholder,
|
|
664
|
-
value: password,
|
|
665
|
-
onChangeText: handlePasswordChange,
|
|
666
|
-
onFocus: handleInputFocus,
|
|
667
|
-
onBlur: handleInputBlur,
|
|
668
|
-
secureTextEntry: !showPassword,
|
|
669
|
-
autoCapitalize: "none",
|
|
670
|
-
testID: "password-input"
|
|
671
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
672
|
-
style: styles.passwordToggle,
|
|
673
|
-
onPress: () => setShowPassword(!showPassword),
|
|
674
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
675
|
-
name: showPassword ? "eye-off" : "eye",
|
|
676
|
-
size: 20,
|
|
677
|
-
color: colors.secondaryText
|
|
678
|
-
})
|
|
679
|
-
})]
|
|
567
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
|
|
568
|
+
label: "Password",
|
|
569
|
+
icon: "lock-closed-outline",
|
|
570
|
+
value: password,
|
|
571
|
+
onChangeText: handlePasswordChange,
|
|
572
|
+
onFocus: handleInputFocus,
|
|
573
|
+
onBlur: handleInputBlur,
|
|
574
|
+
secureTextEntry: !showPassword,
|
|
575
|
+
autoCapitalize: "none",
|
|
576
|
+
autoCorrect: false,
|
|
577
|
+
testID: "password-input",
|
|
578
|
+
colors: colors,
|
|
579
|
+
variant: "filled",
|
|
580
|
+
error: errorMessage
|
|
680
581
|
})
|
|
681
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
opacity: !password ? 0.5 : 1,
|
|
685
|
-
shadowColor: colors.primary
|
|
686
|
-
}],
|
|
687
|
-
onPress: handleLogin,
|
|
688
|
-
disabled: !password || isLoading,
|
|
689
|
-
testID: "login-button",
|
|
690
|
-
children: isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
691
|
-
color: "#FFFFFF",
|
|
692
|
-
size: "small"
|
|
693
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
694
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
695
|
-
style: styles.modernButtonText,
|
|
696
|
-
children: "Sign In"
|
|
697
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
698
|
-
name: "log-in",
|
|
699
|
-
size: 20,
|
|
700
|
-
color: "#FFFFFF",
|
|
701
|
-
style: styles.buttonIcon
|
|
702
|
-
})]
|
|
703
|
-
})
|
|
704
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
705
|
-
style: styles.modernNavigationButtons,
|
|
706
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
707
|
-
style: [styles.modernBackButton, {
|
|
708
|
-
borderColor: colors.border
|
|
709
|
-
}],
|
|
582
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GroupedPillButtons.default, {
|
|
583
|
+
buttons: [{
|
|
584
|
+
text: 'Back',
|
|
710
585
|
onPress: prevStep,
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
586
|
+
icon: 'arrow-back',
|
|
587
|
+
variant: 'transparent'
|
|
588
|
+
}, {
|
|
589
|
+
text: 'Sign In',
|
|
590
|
+
onPress: handleSignIn,
|
|
591
|
+
icon: 'log-in',
|
|
592
|
+
variant: 'primary',
|
|
593
|
+
loading: isLoading,
|
|
594
|
+
testID: 'login-button'
|
|
595
|
+
}],
|
|
596
|
+
colors: colors
|
|
722
597
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
723
598
|
style: styles.securityNotice,
|
|
724
599
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
@@ -732,7 +607,7 @@ const SignInScreen = ({
|
|
|
732
607
|
children: "Your data is encrypted and secure"
|
|
733
608
|
})]
|
|
734
609
|
})]
|
|
735
|
-
}), [fadeAnim, slideAnim, scaleAnim, colors, userProfile, username, theme, logoAnim, errorMessage, inputScaleAnim, isInputFocused, password, showPassword, handleInputFocus, handleInputBlur, handlePasswordChange,
|
|
610
|
+
}), [fadeAnim, slideAnim, scaleAnim, colors, userProfile, username, theme, logoAnim, errorMessage, inputScaleAnim, isInputFocused, password, showPassword, handleInputFocus, handleInputBlur, handlePasswordChange, handleSignIn, isLoading, prevStep, styles]);
|
|
736
611
|
const renderCurrentStep = (0, _react.useCallback)(() => {
|
|
737
612
|
switch (currentStep) {
|
|
738
613
|
case 0:
|
|
@@ -768,30 +643,25 @@ const createStyles = (colors, theme) => _reactNative.StyleSheet.create({
|
|
|
768
643
|
scrollContent: {
|
|
769
644
|
flexGrow: 1,
|
|
770
645
|
paddingHorizontal: 24,
|
|
771
|
-
paddingTop:
|
|
772
|
-
paddingBottom:
|
|
646
|
+
paddingTop: 4,
|
|
647
|
+
paddingBottom: 20
|
|
773
648
|
},
|
|
774
649
|
stepContainer: {
|
|
775
650
|
flex: 1,
|
|
776
|
-
justifyContent: '
|
|
777
|
-
alignItems: '
|
|
778
|
-
minHeight: 600
|
|
779
|
-
},
|
|
780
|
-
modernImageContainer: {
|
|
781
|
-
alignItems: 'center',
|
|
782
|
-
marginBottom: 40
|
|
651
|
+
justifyContent: 'flex-start',
|
|
652
|
+
alignItems: 'flex-start'
|
|
783
653
|
},
|
|
784
654
|
modernHeader: {
|
|
785
655
|
alignItems: 'flex-start',
|
|
786
656
|
width: '100%',
|
|
787
|
-
marginBottom:
|
|
657
|
+
marginBottom: 24
|
|
788
658
|
},
|
|
789
659
|
modernTitle: {
|
|
790
660
|
fontFamily: _reactNative.Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
|
|
791
661
|
fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
|
|
792
|
-
fontSize:
|
|
662
|
+
fontSize: 62,
|
|
793
663
|
lineHeight: 48,
|
|
794
|
-
marginBottom:
|
|
664
|
+
marginBottom: 18,
|
|
795
665
|
textAlign: 'left',
|
|
796
666
|
letterSpacing: -1
|
|
797
667
|
},
|
|
@@ -902,6 +772,12 @@ const createStyles = (colors, theme) => _reactNative.StyleSheet.create({
|
|
|
902
772
|
buttonIcon: {
|
|
903
773
|
marginLeft: 4
|
|
904
774
|
},
|
|
775
|
+
// Enhanced Label Styles
|
|
776
|
+
modernLabel: {
|
|
777
|
+
fontSize: 12,
|
|
778
|
+
fontWeight: '500',
|
|
779
|
+
marginBottom: 2
|
|
780
|
+
},
|
|
905
781
|
modernLinkText: {
|
|
906
782
|
fontSize: 14,
|
|
907
783
|
lineHeight: 20,
|
|
@@ -911,7 +787,7 @@ const createStyles = (colors, theme) => _reactNative.StyleSheet.create({
|
|
|
911
787
|
footerTextContainer: {
|
|
912
788
|
flexDirection: 'row',
|
|
913
789
|
justifyContent: 'center',
|
|
914
|
-
marginTop:
|
|
790
|
+
marginTop: 16
|
|
915
791
|
},
|
|
916
792
|
footerText: {
|
|
917
793
|
fontSize: 15
|
|
@@ -971,8 +847,10 @@ const createStyles = (colors, theme) => _reactNative.StyleSheet.create({
|
|
|
971
847
|
modernNavigationButtons: {
|
|
972
848
|
flexDirection: 'row',
|
|
973
849
|
justifyContent: 'center',
|
|
974
|
-
marginTop:
|
|
975
|
-
marginBottom:
|
|
850
|
+
marginTop: 16,
|
|
851
|
+
marginBottom: 8,
|
|
852
|
+
width: '100%',
|
|
853
|
+
gap: 8
|
|
976
854
|
},
|
|
977
855
|
modernBackButton: {
|
|
978
856
|
flexDirection: 'row',
|