@dloizides/auth-web 1.20.0 → 1.21.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.
- package/CHANGELOG.md +626 -619
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -660,6 +660,18 @@ function useSubmitOnEnter(submit) {
|
|
|
660
660
|
[submit]
|
|
661
661
|
);
|
|
662
662
|
}
|
|
663
|
+
|
|
664
|
+
// src/components/usernameFieldProps.ts
|
|
665
|
+
var EMAIL_USERNAME_PROPS = {
|
|
666
|
+
autoComplete: "username",
|
|
667
|
+
inputMode: "email",
|
|
668
|
+
keyboardType: "email-address",
|
|
669
|
+
textContentType: "username"
|
|
670
|
+
};
|
|
671
|
+
var NO_EXTRA_PROPS = {};
|
|
672
|
+
function usernameFieldProps(emailUsername) {
|
|
673
|
+
return emailUsername ? EMAIL_USERNAME_PROPS : NO_EXTRA_PROPS;
|
|
674
|
+
}
|
|
663
675
|
var BffAuthStatus = /* @__PURE__ */ ((BffAuthStatus2) => {
|
|
664
676
|
BffAuthStatus2["Loading"] = "loading";
|
|
665
677
|
BffAuthStatus2["Authenticated"] = "authenticated";
|
|
@@ -775,7 +787,8 @@ function LoginForm({
|
|
|
775
787
|
initialUsername,
|
|
776
788
|
initialPassword,
|
|
777
789
|
prefillNonce,
|
|
778
|
-
prefillIntent
|
|
790
|
+
prefillIntent,
|
|
791
|
+
emailUsername = false
|
|
779
792
|
}) {
|
|
780
793
|
const theme = useAuthTheme(themeProp);
|
|
781
794
|
const styles3 = useAuthStyles(theme);
|
|
@@ -807,6 +820,7 @@ function LoginForm({
|
|
|
807
820
|
/* @__PURE__ */ jsx(
|
|
808
821
|
TextInput,
|
|
809
822
|
{
|
|
823
|
+
...usernameFieldProps(emailUsername),
|
|
810
824
|
accessibilityHint: labels.usernamePlaceholder,
|
|
811
825
|
accessibilityLabel: labels.usernameLabel,
|
|
812
826
|
autoCapitalize: "none",
|