@dloizides/auth-web 1.2.1 → 1.2.2
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/dist/index.d.mts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -18,6 +18,7 @@ var DEFAULT_LOGIN_LABELS = {
|
|
|
18
18
|
submit: "Sign in",
|
|
19
19
|
submitting: "Signing in...",
|
|
20
20
|
forgotPassword: "Forgot password?",
|
|
21
|
+
signUp: "Create an account",
|
|
21
22
|
invalidCredentials: "Incorrect username or password.",
|
|
22
23
|
missingFields: "Enter both your username and password."
|
|
23
24
|
};
|
|
@@ -85,6 +86,7 @@ var AuthTestIds = {
|
|
|
85
86
|
loginPasswordInput: "auth-login-password",
|
|
86
87
|
loginSubmitButton: "auth-login-submit",
|
|
87
88
|
loginForgotLink: "auth-login-forgot-link",
|
|
89
|
+
loginSignUpLink: "auth-login-signup-link",
|
|
88
90
|
loginError: "auth-login-error",
|
|
89
91
|
forgotPasswordForm: "auth-forgot-form",
|
|
90
92
|
forgotPasswordEmailInput: "auth-forgot-email",
|
|
@@ -358,6 +360,7 @@ function LoginForm({
|
|
|
358
360
|
labels: labelsProp,
|
|
359
361
|
onSuccess,
|
|
360
362
|
onForgotPassword,
|
|
363
|
+
onSignUp,
|
|
361
364
|
testIdPrefix
|
|
362
365
|
}) {
|
|
363
366
|
const theme = useAuthTheme(themeProp);
|
|
@@ -464,7 +467,20 @@ function LoginForm({
|
|
|
464
467
|
onPress: handleSubmit,
|
|
465
468
|
children: isSubmitting ? /* @__PURE__ */ jsx(ActivityIndicator, { color: theme.colors.onPrimary, size: "small" }) : /* @__PURE__ */ jsx(Text, { style: styles.primaryButtonText, children: labels.submit })
|
|
466
469
|
}
|
|
467
|
-
)
|
|
470
|
+
),
|
|
471
|
+
onSignUp !== void 0 ? /* @__PURE__ */ jsx(
|
|
472
|
+
TouchableOpacity,
|
|
473
|
+
{
|
|
474
|
+
accessibilityHint: labels.signUp,
|
|
475
|
+
accessibilityLabel: labels.signUp,
|
|
476
|
+
accessibilityRole: "link",
|
|
477
|
+
disabled: isSubmitting,
|
|
478
|
+
style: styles.fieldGroup,
|
|
479
|
+
testID: withTestIdPrefix(AuthTestIds.loginSignUpLink, testIdPrefix),
|
|
480
|
+
onPress: onSignUp,
|
|
481
|
+
children: /* @__PURE__ */ jsx(Text, { style: styles.linkText, children: labels.signUp })
|
|
482
|
+
}
|
|
483
|
+
) : null
|
|
468
484
|
] }) });
|
|
469
485
|
}
|
|
470
486
|
function useBffForgotPassword(options) {
|