@web3auth/modal 11.0.0-beta.0 → 11.0.0-beta.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.
Files changed (121) hide show
  1. package/README.md +4 -0
  2. package/dist/lib.cjs/packages/modal/src/account-linking/index.js +12 -0
  3. package/dist/lib.cjs/packages/modal/src/account-linking/react.js +22 -0
  4. package/dist/lib.cjs/packages/modal/src/account-linking/vue.js +22 -0
  5. package/dist/lib.cjs/packages/modal/src/config.js +1 -1
  6. package/dist/lib.cjs/packages/modal/src/modalManager.js +446 -26
  7. package/dist/lib.cjs/packages/modal/src/react/index.js +7 -3
  8. package/dist/lib.cjs/packages/modal/src/react/wagmi/provider.js +27 -12
  9. package/dist/lib.cjs/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +13 -13
  10. package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +4 -4
  11. package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +10 -10
  12. package/dist/lib.cjs/packages/modal/src/ui/components/Footer/Footer.js +7 -7
  13. package/dist/lib.cjs/packages/modal/src/ui/components/Image/Image.js +4 -4
  14. package/dist/lib.cjs/packages/modal/src/ui/components/Loader/Loader.js +28 -28
  15. package/dist/lib.cjs/packages/modal/src/ui/components/LoginHint/LoginHint.js +3 -3
  16. package/dist/lib.cjs/packages/modal/src/ui/components/Modal/Modal.js +19 -19
  17. package/dist/lib.cjs/packages/modal/src/ui/components/Otp/Otp.js +10 -10
  18. package/dist/lib.cjs/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +4 -4
  19. package/dist/lib.cjs/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +21 -21
  20. package/dist/lib.cjs/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.js +1 -1
  21. package/dist/lib.cjs/packages/modal/src/ui/components/Toast/Toast.js +11 -11
  22. package/dist/lib.cjs/packages/modal/src/ui/config.js +3 -1
  23. package/dist/lib.cjs/packages/modal/src/ui/containers/AccountLinking/AccountLinking.js +109 -0
  24. package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWallet.js +14 -3
  25. package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +7 -7
  26. package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +9 -9
  27. package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +9 -8
  28. package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletList/ConnectWalletList.js +19 -19
  29. package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +8 -8
  30. package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +5 -5
  31. package/dist/lib.cjs/packages/modal/src/ui/containers/Embed/Embed.js +11 -11
  32. package/dist/lib.cjs/packages/modal/src/ui/containers/Login/Login.js +48 -42
  33. package/dist/lib.cjs/packages/modal/src/ui/containers/Login/LoginOtp/LoginOtp.js +11 -11
  34. package/dist/lib.cjs/packages/modal/src/ui/containers/Login/LoginPasswordLess/LoginPasswordLess.js +13 -13
  35. package/dist/lib.cjs/packages/modal/src/ui/containers/Root/Root.js +24 -9
  36. package/dist/lib.cjs/packages/modal/src/ui/containers/Root/RootBodySheets/RootBodySheets.js +16 -16
  37. package/dist/lib.cjs/packages/modal/src/ui/containers/Widget/Widget.js +6 -2
  38. package/dist/lib.cjs/packages/modal/src/ui/context/ModalStateContext.js +1 -0
  39. package/dist/lib.cjs/packages/modal/src/ui/css/index.css.js +1 -1
  40. package/dist/lib.cjs/packages/modal/src/ui/i18n/dutch.json.js +14 -0
  41. package/dist/lib.cjs/packages/modal/src/ui/i18n/english.json.js +14 -0
  42. package/dist/lib.cjs/packages/modal/src/ui/i18n/french.json.js +14 -0
  43. package/dist/lib.cjs/packages/modal/src/ui/i18n/german.json.js +14 -0
  44. package/dist/lib.cjs/packages/modal/src/ui/i18n/japanese.json.js +26 -12
  45. package/dist/lib.cjs/packages/modal/src/ui/i18n/korean.json.js +14 -0
  46. package/dist/lib.cjs/packages/modal/src/ui/i18n/mandarin.json.js +14 -0
  47. package/dist/lib.cjs/packages/modal/src/ui/i18n/portuguese.json.js +14 -0
  48. package/dist/lib.cjs/packages/modal/src/ui/i18n/spanish.json.js +14 -0
  49. package/dist/lib.cjs/packages/modal/src/ui/i18n/turkish.json.js +14 -0
  50. package/dist/lib.cjs/packages/modal/src/ui/interfaces.js +26 -0
  51. package/dist/lib.cjs/packages/modal/src/ui/loginModal.js +113 -4
  52. package/dist/lib.cjs/packages/modal/src/vue/index.js +7 -3
  53. package/dist/lib.cjs/packages/modal/src/vue/wagmi/provider.js +27 -14
  54. package/dist/lib.cjs/types/account-linking/index.d.ts +1 -0
  55. package/dist/lib.cjs/types/account-linking/react.d.ts +2 -0
  56. package/dist/lib.cjs/types/account-linking/vue.d.ts +2 -0
  57. package/dist/lib.cjs/types/modalManager.d.ts +40 -2
  58. package/dist/lib.cjs/types/react/hooks/index.d.ts +1 -0
  59. package/dist/lib.cjs/types/react/hooks/useWallets.d.ts +2 -0
  60. package/dist/lib.cjs/types/ui/containers/AccountLinking/AccountLinking.d.ts +6 -0
  61. package/dist/lib.cjs/types/ui/containers/AccountLinking/index.d.ts +1 -0
  62. package/dist/lib.cjs/types/ui/containers/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.type.d.ts +1 -0
  63. package/dist/lib.cjs/types/ui/containers/Root/Root.d.ts +1 -1
  64. package/dist/lib.cjs/types/ui/interfaces.d.ts +43 -8
  65. package/dist/lib.cjs/types/ui/loginModal.d.ts +27 -2
  66. package/dist/lib.cjs/types/ui/utils.d.ts +1 -1
  67. package/dist/lib.cjs/types/vue/composables/index.d.ts +1 -0
  68. package/dist/lib.cjs/types/vue/composables/useWallets.d.ts +2 -0
  69. package/dist/lib.esm/packages/modal/src/account-linking/index.js +1 -0
  70. package/dist/lib.esm/packages/modal/src/account-linking/react.js +1 -0
  71. package/dist/lib.esm/packages/modal/src/account-linking/vue.js +1 -0
  72. package/dist/lib.esm/packages/modal/src/config.js +1 -1
  73. package/dist/lib.esm/packages/modal/src/modalManager.js +451 -28
  74. package/dist/lib.esm/packages/modal/src/react/index.js +1 -1
  75. package/dist/lib.esm/packages/modal/src/react/wagmi/provider.js +28 -13
  76. package/dist/lib.esm/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +13 -13
  77. package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +4 -4
  78. package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +10 -10
  79. package/dist/lib.esm/packages/modal/src/ui/components/Footer/Footer.js +7 -7
  80. package/dist/lib.esm/packages/modal/src/ui/components/Image/Image.js +4 -4
  81. package/dist/lib.esm/packages/modal/src/ui/components/Loader/Loader.js +28 -28
  82. package/dist/lib.esm/packages/modal/src/ui/components/LoginHint/LoginHint.js +3 -3
  83. package/dist/lib.esm/packages/modal/src/ui/components/Modal/Modal.js +19 -19
  84. package/dist/lib.esm/packages/modal/src/ui/components/Otp/Otp.js +10 -10
  85. package/dist/lib.esm/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +4 -4
  86. package/dist/lib.esm/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +21 -21
  87. package/dist/lib.esm/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.js +1 -1
  88. package/dist/lib.esm/packages/modal/src/ui/components/Toast/Toast.js +11 -11
  89. package/dist/lib.esm/packages/modal/src/ui/config.js +3 -1
  90. package/dist/lib.esm/packages/modal/src/ui/containers/AccountLinking/AccountLinking.js +107 -0
  91. package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWallet.js +14 -3
  92. package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +7 -7
  93. package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +9 -9
  94. package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +9 -8
  95. package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletList/ConnectWalletList.js +19 -19
  96. package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +8 -8
  97. package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +5 -5
  98. package/dist/lib.esm/packages/modal/src/ui/containers/Embed/Embed.js +11 -11
  99. package/dist/lib.esm/packages/modal/src/ui/containers/Login/Login.js +49 -43
  100. package/dist/lib.esm/packages/modal/src/ui/containers/Login/LoginOtp/LoginOtp.js +11 -11
  101. package/dist/lib.esm/packages/modal/src/ui/containers/Login/LoginPasswordLess/LoginPasswordLess.js +13 -13
  102. package/dist/lib.esm/packages/modal/src/ui/containers/Root/Root.js +24 -9
  103. package/dist/lib.esm/packages/modal/src/ui/containers/Root/RootBodySheets/RootBodySheets.js +16 -16
  104. package/dist/lib.esm/packages/modal/src/ui/containers/Widget/Widget.js +6 -2
  105. package/dist/lib.esm/packages/modal/src/ui/context/ModalStateContext.js +2 -1
  106. package/dist/lib.esm/packages/modal/src/ui/css/index.css.js +1 -1
  107. package/dist/lib.esm/packages/modal/src/ui/i18n/dutch.json.js +14 -0
  108. package/dist/lib.esm/packages/modal/src/ui/i18n/english.json.js +14 -0
  109. package/dist/lib.esm/packages/modal/src/ui/i18n/french.json.js +14 -0
  110. package/dist/lib.esm/packages/modal/src/ui/i18n/german.json.js +14 -0
  111. package/dist/lib.esm/packages/modal/src/ui/i18n/japanese.json.js +26 -12
  112. package/dist/lib.esm/packages/modal/src/ui/i18n/korean.json.js +14 -0
  113. package/dist/lib.esm/packages/modal/src/ui/i18n/mandarin.json.js +14 -0
  114. package/dist/lib.esm/packages/modal/src/ui/i18n/portuguese.json.js +14 -0
  115. package/dist/lib.esm/packages/modal/src/ui/i18n/spanish.json.js +14 -0
  116. package/dist/lib.esm/packages/modal/src/ui/i18n/turkish.json.js +14 -0
  117. package/dist/lib.esm/packages/modal/src/ui/interfaces.js +24 -1
  118. package/dist/lib.esm/packages/modal/src/ui/loginModal.js +115 -6
  119. package/dist/lib.esm/packages/modal/src/vue/index.js +1 -1
  120. package/dist/lib.esm/packages/modal/src/vue/wagmi/provider.js +28 -15
  121. package/package.json +43 -20
@@ -51,12 +51,12 @@ function ConnectWalletQrCode(props) {
51
51
  const modalColor = ((_getComputedStyle = getComputedStyle(root)) === null || _getComputedStyle === void 0 || (_getComputedStyle = _getComputedStyle.getPropertyValue("--app-gray-800")) === null || _getComputedStyle === void 0 ? void 0 : _getComputedStyle.trim()) || "#1f2a37";
52
52
  const qrColor = primaryColor && primaryColor.toLowerCase() === "#ffffff" ? "#000000" : primaryColor;
53
53
  return jsxRuntime.jsxs("div", {
54
- className: "w3a--contents",
54
+ className: "wta:contents",
55
55
  children: [qrCodeValue ? jsxRuntime.jsxs("div", {
56
- className: "w3a--flex w3a--flex-col w3a--items-center w3a--justify-center w3a--gap-y-4 w3a--rounded-2xl w3a--border w3a--border-app-gray-200 w3a--p-4 dark:w3a--border-app-gray-700",
56
+ className: "wta:flex wta:flex-col wta:items-center wta:justify-center wta:gap-y-4 wta:rounded-2xl wta:border wta:border-app-gray-200 wta:p-4 wta:dark:border-app-gray-700",
57
57
  children: [jsxRuntime.jsx("button", {
58
58
  type: "button",
59
- className: "w3a--relative w3a--flex w3a--size-[300px] w3a--appearance-none w3a--items-center w3a--justify-center w3a--rounded-2xl",
59
+ className: "wta:relative wta:flex wta:size-[300px] wta:appearance-none wta:items-center wta:justify-center wta:rounded-2xl",
60
60
  onClick: () => {
61
61
  navigator.clipboard.writeText(qrCodeValue);
62
62
  setToast({
@@ -79,11 +79,11 @@ function ConnectWalletQrCode(props) {
79
79
  fgColor: isDark ? whiteColor : blackColor
80
80
  })
81
81
  }), jsxRuntime.jsx("p", {
82
- className: "w3a--text-center w3a--text-sm w3a--font-normal w3a--text-app-gray-500 dark:w3a--text-app-gray-300",
82
+ className: "wta:text-center wta:text-sm wta:font-normal wta:text-app-gray-500 wta:dark:text-app-gray-300",
83
83
  children: t("modal.external.walletconnect-copy")
84
84
  })]
85
85
  }) : jsxRuntime.jsx("div", {
86
- className: "w3a--mx-auto w3a--flex w3a--size-[300px] w3a--animate-pulse w3a--items-center w3a--justify-center w3a--rounded-lg w3a--bg-app-gray-200 w3a--p-2 dark:w3a--bg-app-gray-700",
86
+ className: "wta:mx-auto wta:flex wta:size-[300px] wta:animate-pulse wta:items-center wta:justify-center wta:rounded-lg wta:bg-app-gray-200 wta:p-2 wta:dark:bg-app-gray-700",
87
87
  children: jsxRuntime.jsx(Image, {
88
88
  imageId: `login-${selectedButton.name}`,
89
89
  hoverImageId: `login-${selectedButton.name}`,
@@ -94,15 +94,15 @@ function ConnectWalletQrCode(props) {
94
94
  extension: selectedButton.imgExtension
95
95
  })
96
96
  }), showGetWalletComponent && jsxRuntime.jsxs("div", {
97
- className: "w3a--flex w3a--w-full w3a--items-center w3a--justify-between w3a--rounded-2xl w3a--bg-app-gray-50 \n w3a--px-4 w3a--py-2 w3a--text-app-gray-900 dark:w3a--bg-app-gray-800 dark:w3a--text-app-white",
97
+ className: "wta:flex wta:w-full wta:items-center wta:justify-between wta:rounded-2xl wta:bg-app-gray-50 \n wta:px-4 wta:py-2 wta:text-app-gray-900 wta:dark:bg-app-gray-800 wta:dark:text-app-white",
98
98
  children: [jsxRuntime.jsxs("p", {
99
- className: "w3a--text-sm w3a--text-app-gray-900 dark:w3a--text-app-white",
99
+ className: "wta:text-sm wta:text-app-gray-900 wta:dark:text-app-white",
100
100
  children: [t("modal.external.dont-have"), " ", jsxRuntime.jsx("span", {
101
101
  children: selectedButton === null || selectedButton === void 0 ? void 0 : selectedButton.displayName
102
102
  }), "?"]
103
103
  }), jsxRuntime.jsx("button", {
104
104
  type: "button",
105
- className: "w3a--appearance-none w3a--rounded-full w3a--border w3a--border-app-gray-200 w3a--bg-transparent w3a--px-5 w3a--py-2 w3a--text-base w3a--font-normal w3a--text-app-gray-700 w3a--transition-all w3a--duration-150 hover:w3a--border-transparent hover:w3a--shadow-light active:w3a--scale-95 dark:w3a--border-app-gray-700 dark:w3a--text-app-gray-300 dark:hover:w3a--border-transparent dark:hover:w3a--shadow-dark",
105
+ className: "wta:appearance-none wta:rounded-full wta:border wta:border-app-gray-200 wta:bg-transparent wta:px-5 wta:py-2 wta:text-base wta:font-normal wta:text-app-gray-700 wta:transition-all wta:duration-150 wta:hover:border-transparent wta:hover:shadow-light wta:active:scale-95 wta:dark:border-app-gray-700 wta:dark:text-app-gray-300 wta:dark:hover:border-transparent wta:dark:hover:shadow-dark",
106
106
  onClick: () => {
107
107
  setBodyState(_objectSpread(_objectSpread({}, bodyState), {}, {
108
108
  installLinks: {
@@ -30,7 +30,7 @@ function ConnectWalletSearch(props) {
30
30
  };
31
31
  // const isShowSearch = totalExternalWalletCount > 15 && !isLoading;
32
32
  // if (!isShowSearch) {
33
- // return <div className="w3a--h-[50px] w3a--w-full w3a--animate-pulse w3a--rounded-full w3a--bg-app-gray-200 dark:w3a--bg-app-gray-700" />;
33
+ // return <div className="wta:h-[50px] wta:w-full wta:animate-pulse wta:rounded-full wta:bg-app-gray-200 wta:dark:bg-app-gray-700" />;
34
34
  // }
35
35
  return jsxRuntime.jsx("input", {
36
36
  type: "text",
@@ -50,10 +50,10 @@ function ConnectWalletSearch(props) {
50
50
  count: totalExternalWalletCount
51
51
  }),
52
52
  disabled: isLoading,
53
- className: utils.cn("w3a--input w3a--appearance-none w3a--outline-none active:w3a--outline-none focus:w3a--outline-none w3a--bg-transparent placeholder:w3a--text-app-gray-400 dark:placeholder:w3a--text-app-gray-500 w3a--text-app-gray-900 dark:w3a--text-app-white", isInputFocused && "!w3a--border-app-primary-600", {
54
- "w3a--rounded-full": buttonRadius === "pill",
55
- "w3a--rounded-lg": buttonRadius === "rounded",
56
- "w3a--rounded-none": buttonRadius === "square"
53
+ className: utils.cn("w3a--input wta:appearance-none wta:outline-none wta:active:outline-none wta:focus:outline-none wta:bg-transparent wta:placeholder:text-app-gray-400 wta:dark:placeholder:text-app-gray-500 wta:text-app-gray-900 wta:dark:text-app-white", isInputFocused && "wta:border-app-primary-600!", {
54
+ "wta:rounded-full": buttonRadius === "pill",
55
+ "wta:rounded-lg": buttonRadius === "rounded",
56
+ "wta:rounded-none": buttonRadius === "square"
57
57
  })
58
58
  });
59
59
  }
@@ -37,18 +37,18 @@ function Embed(props) {
37
37
  };
38
38
  if (!isOpen) return null;
39
39
  return jsxRuntime.jsxs("div", {
40
- className: utils.cn("w3a--bg-app-light-surface1 dark:w3a--bg-app-dark-surface-main w3a--rounded-3xl w3a--w-[356px] [@media(min-width:375px)]:w3a--w-[393px] w3a--h-auto w3a--flex w3a--flex-col w3a--duration-500", {
41
- "w3a--translate-y-0 w3a--delay-100": isOpen,
42
- "w3a--translate-y-[100vh]": !isOpen,
43
- "w3a--p-4": padding,
44
- "w3a--shadow-xl sm:w3a--shadow-lg": shadow,
45
- "w3a--border w3a--border-app-gray-100 dark:w3a--border-app-gray-800": border,
46
- "w3a--rounded-[30px]": borderRadius === "large",
47
- "w3a--rounded-2xl": borderRadius === "medium",
48
- "w3a--rounded-none": borderRadius === "small"
40
+ className: utils.cn("wta:bg-app-light-surface1 wta:dark:bg-app-dark-surface-main wta:rounded-3xl wta:w-[356px] wta:[@media(min-width:375px)]:w-[393px] wta:h-auto wta:flex wta:flex-col wta:duration-500", {
41
+ "wta:translate-y-0 wta:delay-100": isOpen,
42
+ "wta:translate-y-[100vh]": !isOpen,
43
+ "wta:p-4": padding,
44
+ "wta:shadow-xl wta:sm:shadow-lg": shadow,
45
+ "wta:border wta:border-app-gray-100 wta:dark:border-app-gray-800": border,
46
+ "wta:rounded-[30px]": borderRadius === "large",
47
+ "wta:rounded-2xl": borderRadius === "medium",
48
+ "wta:rounded-none": borderRadius === "small"
49
49
  }),
50
50
  children: [showCloseIcon && jsxRuntime.jsx("div", {
51
- className: "w3a--absolute w3a--right-6 w3a--top-[30px] w3a--z-10 w3a--cursor-pointer",
51
+ className: "wta:absolute wta:right-6 wta:top-[30px] wta:z-10 wta:cursor-pointer",
52
52
  children: jsxRuntime.jsx("svg", {
53
53
  width: "13",
54
54
  height: "13",
@@ -56,7 +56,7 @@ function Embed(props) {
56
56
  fill: "none",
57
57
  xmlns: "http://www.w3.org/2000/svg",
58
58
  onClick: onCloseHandler,
59
- className: "w3a--text-app-gray-900 dark:w3a--text-app-white",
59
+ className: "wta:text-app-gray-900 wta:dark:text-app-white",
60
60
  children: jsxRuntime.jsx("path", {
61
61
  fillRule: "evenodd",
62
62
  clipRule: "evenodd",
@@ -22,7 +22,9 @@ var utils = require('../../utils.js');
22
22
  var LoginOtp = require('./LoginOtp/LoginOtp.js');
23
23
  var LoginPasswordLess = require('./LoginPasswordLess/LoginPasswordLess.js');
24
24
 
25
- const restrictedLoginMethods = [auth.AUTH_CONNECTION.SMS_PASSWORDLESS, auth.AUTH_CONNECTION.EMAIL_PASSWORDLESS, auth.AUTH_CONNECTION.AUTHENTICATOR, auth.AUTH_CONNECTION.PASSKEYS, auth.AUTH_CONNECTION.TELEGRAM, auth.AUTH_CONNECTION.CUSTOM];
25
+ const restrictedLoginMethods = [auth.AUTH_CONNECTION.SMS_PASSWORDLESS, auth.AUTH_CONNECTION.EMAIL_PASSWORDLESS, auth.AUTH_CONNECTION.AUTHENTICATOR, auth.AUTH_CONNECTION.PASSKEYS, auth.AUTH_CONNECTION.TELEGRAM, auth.AUTH_CONNECTION.CUSTOM,
26
+ // Farcaster login is deprecated and no longer supported by the Web3Auth SDKs.
27
+ auth.AUTH_CONNECTION.FARCASTER];
26
28
  function Login(props) {
27
29
  const {
28
30
  installedExternalWalletConfig,
@@ -76,10 +78,6 @@ function Login(props) {
76
78
  const [passwordlessErrorMessage, setPasswordlessErrorMessage] = react.useState("");
77
79
  const [otpErrorMessage, setOtpErrorMessage] = react.useState("");
78
80
  const [expandSocialLogins, setExpandSocialLogins] = react.useState(false);
79
- const [canShowMore, setCanShowMore] = react.useState(false);
80
- const [visibleRow, setVisibleRow] = react.useState([]);
81
- const [otherRow, setOtherRow] = react.useState([]);
82
- const [mainOptionsRow, setMainOptionsRow] = react.useState([]);
83
81
  const [isPasswordLessCtaClicked, setIsPasswordLessCtaClicked] = react.useState(false);
84
82
  const [showOtpFlow, setShowOtpFlow] = react.useState(false);
85
83
  const [authConnection, setAuthConnection] = react.useState(undefined);
@@ -93,7 +91,12 @@ function Login(props) {
93
91
  setExpandSocialLogins(prev => !prev);
94
92
  setIsPasswordLessCtaClicked(false);
95
93
  };
96
- react.useEffect(() => {
94
+ const {
95
+ visibleRow,
96
+ otherRow,
97
+ mainOptionsRow,
98
+ canShowMore
99
+ } = react.useMemo(() => {
97
100
  const maxOptions = Object.keys(socialLoginsConfig.loginMethods).filter(loginMethodKey => {
98
101
  return socialLoginsConfig.loginMethods[loginMethodKey].showOnModal && !restrictedLoginMethods.includes(loginMethodKey);
99
102
  });
@@ -160,11 +163,13 @@ function Login(props) {
160
163
  }
161
164
  otherRows.push(rows);
162
165
  });
163
- setVisibleRow(visibleRows);
164
- setOtherRow(otherRows);
165
- setMainOptionsRow(mainOptionsRows);
166
- setCanShowMore(maxOptions.length > 4); // Update the state based on the condition
167
- }, [socialLoginsConfig, isDark, buttonRadius]);
166
+ return {
167
+ visibleRow: visibleRows,
168
+ otherRow: otherRows,
169
+ mainOptionsRow: mainOptionsRows,
170
+ canShowMore: maxOptions.length > 4
171
+ };
172
+ }, [socialLoginsConfig, isDark]);
168
173
  const handleCustomLogin = async (authConnection, loginHint) => {
169
174
  try {
170
175
  const handler = factory.createPasswordlessHandler(authConnection, {
@@ -247,7 +252,7 @@ function Login(props) {
247
252
  }
248
253
  }
249
254
  }
250
- setPasswordlessErrorMessage(invalidInputErrorMessage);
255
+ setPasswordlessErrorMessage(getInvalidInputErrorMessage());
251
256
  setIsPasswordLessLoading(false);
252
257
  return undefined;
253
258
  };
@@ -261,11 +266,11 @@ function Login(props) {
261
266
  if (isEmailPasswordLessLoginVisible) return "name@example.com";
262
267
  return "+(00)123456";
263
268
  }, [isEmailPasswordLessLoginVisible, isSmsPasswordLessLoginVisible]);
264
- const invalidInputErrorMessage = react.useMemo(() => {
269
+ const getInvalidInputErrorMessage = () => {
265
270
  if (isEmailPasswordLessLoginVisible && isSmsPasswordLessLoginVisible) return t("modal.errors-invalid-number-email");
266
271
  if (isEmailPasswordLessLoginVisible) return t("modal.errors-invalid-email");
267
272
  return t("modal.errors-invalid-number");
268
- }, [isEmailPasswordLessLoginVisible, isSmsPasswordLessLoginVisible, t]);
273
+ };
269
274
  react.useEffect(() => {
270
275
  const getLocation = async () => {
271
276
  const result = await utils.getUserCountry();
@@ -375,6 +380,7 @@ function Login(props) {
375
380
  }, [analytics, handleExternalWalletBtnClick, installedExternalWallets.length, totalExternalWallets]);
376
381
  react.useEffect(() => {
377
382
  if (showExternalWalletButton && !areSocialLoginsVisible && !showPasswordLessInput) {
383
+ // eslint-disable-next-line react-hooks/set-state-in-effect -- intentional
378
384
  handleConnectWallet();
379
385
  }
380
386
  }, [showExternalWalletButton, areSocialLoginsVisible, showPasswordLessInput, handleConnectWallet]);
@@ -418,25 +424,25 @@ function Login(props) {
418
424
  };
419
425
  const externalWalletSection = () => {
420
426
  return jsxRuntime.jsxs("div", {
421
- className: utils.cn("w3a--flex w3a--w-full w3a--flex-col w3a--items-start w3a--justify-start w3a--gap-y-2"),
427
+ className: utils.cn("wta:flex wta:w-full wta:flex-col wta:items-start wta:justify-start wta:gap-y-2"),
422
428
  children: [installedExternalWallets.length > 0 && installedExternalWallets.map(wallet => jsxRuntime.jsxs("button", {
423
429
  type: "button",
424
- className: utils.cn("w3a--btn !w3a--justify-between w3a--group w3a--relative w3a--overflow-hidden", {
425
- "w3a--rounded-full": buttonRadius === "pill",
426
- "w3a--rounded-lg": buttonRadius === "rounded",
427
- "w3a--rounded-none": buttonRadius === "square"
430
+ className: utils.cn("w3a--btn wta:justify-between! wta:group wta:relative wta:overflow-hidden", {
431
+ "wta:rounded-full": buttonRadius === "pill",
432
+ "wta:rounded-lg": buttonRadius === "rounded",
433
+ "wta:rounded-none": buttonRadius === "square"
428
434
  }),
429
435
  onClick: () => handleInstalledWalletClick(wallet),
430
436
  children: [jsxRuntime.jsx("p", {
431
- className: "w3a--max-w-[180px] w3a--truncate w3a--text-base w3a--font-normal w3a--text-app-gray-700 dark:w3a--text-app-white",
437
+ className: "wta:max-w-[180px] wta:truncate wta:text-base wta:font-normal wta:text-app-gray-700 wta:dark:text-app-white",
432
438
  children: wallet.displayName
433
439
  }), jsxRuntime.jsxs("div", {
434
- className: "w3a--absolute w3a--right-4 w3a--top-1/2 w3a--flex w3a--w-auto -w3a--translate-y-1/2 w3a--items-center w3a--gap-x-2 w3a--transition-all w3a--duration-300 group-hover:w3a--translate-x-6 group-hover:w3a--opacity-0",
440
+ className: "wta:absolute wta:right-4 wta:top-1/2 wta:flex wta:w-auto wta:-translate-y-1/2 wta:items-center wta:gap-x-2 wta:transition-all wta:duration-300 wta:group-hover:translate-x-6 wta:group-hover:opacity-0",
435
441
  children: [wallet.hasInjectedWallet && jsxRuntime.jsx("span", {
436
- className: "w3a--inline-flex w3a--items-center w3a--rounded-md w3a--bg-app-primary-100 w3a--px-2 w3a--py-1 w3a--text-xs w3a--font-medium w3a--text-app-primary-800 \n dark:w3a--border dark:w3a--border-app-primary-400 dark:w3a--bg-transparent dark:w3a--text-app-primary-400",
442
+ className: "wta:inline-flex wta:items-center wta:rounded-md wta:bg-app-primary-100 wta:px-2 wta:py-1 wta:text-xs wta:font-medium wta:text-app-primary-800 \n wta:dark:border wta:dark:border-app-primary-400 wta:dark:bg-transparent wta:dark:text-app-primary-400",
437
443
  children: t("modal.external.installed")
438
444
  }), jsxRuntime.jsx("figure", {
439
- className: "w3a--size-5",
445
+ className: "wta:size-5",
440
446
  children: jsxRuntime.jsx(Image, {
441
447
  imageData: wallet.icon,
442
448
  imageId: `login-${wallet.name}`,
@@ -450,28 +456,28 @@ function Login(props) {
450
456
  })]
451
457
  }), jsxRuntime.jsx("img", {
452
458
  id: "injected-wallet-arrow",
453
- className: "w3a--absolute w3a--right-4 w3a--top-1/2 -w3a--translate-x-10 -w3a--translate-y-1/2 w3a--opacity-0 w3a--transition-all w3a--duration-300\n group-hover:w3a--translate-x-0 group-hover:w3a--opacity-100",
459
+ className: "wta:absolute wta:right-4 wta:top-1/2 wta:-translate-x-10 wta:-translate-y-1/2 wta:opacity-0 wta:transition-all wta:duration-300\n wta:group-hover:translate-x-0 wta:group-hover:opacity-100",
454
460
  src: utils.getIcons(isDark ? "chevron-right-dark" : "chevron-right-light"),
455
461
  alt: "arrow"
456
462
  })]
457
463
  }, wallet.name)), remainingUndisplayedWallets > 0 && jsxRuntime.jsxs("button", {
458
464
  type: "button",
459
- className: utils.cn("w3a--btn !w3a--justify-between w3a--group w3a--relative w3a--overflow-hidden", {
460
- "w3a--rounded-full": buttonRadius === "pill",
461
- "w3a--rounded-lg": buttonRadius === "rounded",
462
- "w3a--rounded-none": buttonRadius === "square"
465
+ className: utils.cn("w3a--btn wta:justify-between! wta:group wta:relative wta:overflow-hidden", {
466
+ "wta:rounded-full": buttonRadius === "pill",
467
+ "wta:rounded-lg": buttonRadius === "rounded",
468
+ "wta:rounded-none": buttonRadius === "square"
463
469
  }),
464
470
  onClick: handleConnectWallet,
465
471
  children: [jsxRuntime.jsx("p", {
466
- className: "w3a--text-base w3a--font-normal w3a--text-app-gray-900 dark:w3a--text-app-white",
472
+ className: "wta:text-base wta:font-normal wta:text-app-gray-900 wta:dark:text-app-white",
467
473
  children: t("modal.external.all-wallets")
468
474
  }), showExternalWalletCount && jsxRuntime.jsx("div", {
469
475
  id: "external-wallet-count",
470
- className: "w3a--absolute w3a--right-4 w3a--top-1/2 w3a--w-auto -w3a--translate-y-1/2 w3a--rounded-full w3a--bg-app-primary-100 w3a--px-2.5 w3a--py-0.5 w3a--text-xs w3a--font-medium w3a--text-app-primary-800 w3a--transition-all w3a--delay-300 w3a--duration-300 group-hover:w3a--translate-x-6 group-hover:w3a--opacity-0 group-hover:w3a--delay-0 dark:w3a--border dark:w3a--border-app-primary-500 dark:w3a--bg-transparent dark:w3a--text-app-primary-500",
476
+ className: "wta:absolute wta:right-4 wta:top-1/2 wta:w-auto wta:-translate-y-1/2 wta:rounded-full wta:bg-app-primary-100 wta:px-2.5 wta:py-0.5 wta:text-xs wta:font-medium wta:text-app-primary-800 wta:transition-all wta:delay-300 wta:duration-300 wta:group-hover:translate-x-6 wta:group-hover:opacity-0 wta:group-hover:delay-0 wta:dark:border wta:dark:border-app-primary-500 wta:dark:bg-transparent wta:dark:text-app-primary-500",
471
477
  children: remainingUndisplayedWallets
472
478
  }), jsxRuntime.jsx("img", {
473
479
  id: "external-wallet-arrow",
474
- className: "w3a--absolute w3a--right-4 w3a--top-1/2 -w3a--translate-x-10 -w3a--translate-y-1/2 w3a--opacity-0 w3a--transition-all w3a--duration-300\n group-hover:w3a--translate-x-0 group-hover:w3a--opacity-100",
480
+ className: "wta:absolute wta:right-4 wta:top-1/2 wta:-translate-x-10 wta:-translate-y-1/2 wta:opacity-0 wta:transition-all wta:duration-300\n wta:group-hover:translate-x-0 wta:group-hover:opacity-100",
475
481
  src: utils.getIcons(isDark ? "chevron-right-dark" : "chevron-right-light"),
476
482
  alt: "arrow"
477
483
  })]
@@ -481,14 +487,14 @@ function Login(props) {
481
487
  const headerLogo = [constants.DEFAULT_LOGO_DARK, constants.DEFAULT_LOGO_LIGHT].includes(appLogo) ? "" : appLogo;
482
488
  const delimiter = index => {
483
489
  return jsxRuntime.jsxs("div", {
484
- className: utils.cn("w3a--flex w3a--w-full w3a--items-center w3a--gap-x-2", headerLogo ? "w3a--my-2" : "w3a--my-4"),
490
+ className: utils.cn("wta:flex wta:w-full wta:items-center wta:gap-x-2", headerLogo ? "wta:my-2" : "wta:my-4"),
485
491
  children: [jsxRuntime.jsx("div", {
486
- className: "w3a--h-px w3a--w-full w3a--bg-app-gray-200 dark:w3a--bg-app-gray-500"
492
+ className: "wta:h-px wta:w-full wta:bg-app-gray-200 wta:dark:bg-app-gray-500"
487
493
  }), jsxRuntime.jsx("p", {
488
- className: "w3a--text-xs w3a--font-normal w3a--uppercase w3a--text-app-gray-400 dark:w3a--text-app-gray-400",
494
+ className: "wta:text-xs wta:font-normal wta:uppercase wta:text-app-gray-400 wta:dark:text-app-gray-400",
489
495
  children: "or"
490
496
  }), jsxRuntime.jsx("div", {
491
- className: "w3a--h-px w3a--w-full w3a--bg-app-gray-200 dark:w3a--bg-app-gray-500"
497
+ className: "wta:h-px wta:w-full wta:bg-app-gray-200 wta:dark:bg-app-gray-500"
492
498
  })]
493
499
  }, `section-delimiter-${index}`);
494
500
  };
@@ -536,18 +542,18 @@ function Login(props) {
536
542
  };
537
543
  const socialLoginExpandedView = () => socialLoginSection(otherRow);
538
544
  return jsxRuntime.jsxs("div", {
539
- className: "w3a--flex w3a--flex-col w3a--items-center w3a--gap-y-4 w3a--p-2",
545
+ className: "wta:flex wta:flex-col wta:items-center wta:gap-y-4 wta:p-2",
540
546
  children: [jsxRuntime.jsxs("div", {
541
- className: utils.cn("w3a--flex w3a--flex-col w3a--items-center w3a--justify-center w3a--gap-y-2 w3a--pt-6", logoAlignment === "center" ? "" : "w3a--w-full"),
547
+ className: utils.cn("wta:flex wta:flex-col wta:items-center wta:justify-center wta:gap-y-2 wta:pt-6", logoAlignment === "center" ? "" : "wta:w-full"),
542
548
  children: [headerLogo && jsxRuntime.jsx("figure", {
543
- className: utils.cn("w3a--mx-auto w3a--h-12 w3a--w-[200px]", logoAlignment === "center" ? "w3a--flex w3a--justify-center w3a--items-center" : "w3a--ml-0 w3a--w-auto"),
549
+ className: utils.cn("wta:mx-auto wta:h-12 wta:w-[200px]", logoAlignment === "center" ? "wta:flex wta:justify-center wta:items-center" : "wta:ml-0 wta:w-auto"),
544
550
  children: jsxRuntime.jsx("img", {
545
551
  src: headerLogo,
546
552
  alt: "Logo",
547
- className: "w3a--size-full w3a--object-contain"
553
+ className: "wta:size-full wta:object-contain"
548
554
  })
549
555
  }), jsxRuntime.jsx("p", {
550
- className: utils.cn("w3a--text-app-gray-900 dark:w3a--text-app-white", logoAlignment === "center" ? "w3a--text-center" : "w3a--text-left w3a--w-full w3a--ml-4", headerLogo ? "w3a--text-lg w3a--font-semibold" : "w3a--text-3xl w3a--font-medium"),
556
+ className: utils.cn("wta:text-app-gray-900 wta:dark:text-app-white", logoAlignment === "center" ? "wta:text-center" : "wta:text-left wta:w-full wta:ml-4", headerLogo ? "wta:text-lg wta:font-semibold" : "wta:text-3xl wta:font-medium"),
551
557
  children: t("modal.social.sign-in")
552
558
  })]
553
559
  }), jsxRuntime.jsx(HCaptcha, {
@@ -561,10 +567,10 @@ function Login(props) {
561
567
  onError: () => setCaptchaError("passwordless.captcha-default-error"),
562
568
  onChalExpired: () => setCaptchaError("passwordless.captcha-default-error")
563
569
  }), captchaError && showCaptcha && jsxRuntime.jsx("p", {
564
- className: "-w3a--mt-2 w3a--w-full w3a--pl-6 w3a--text-start w3a--text-xs w3a--font-normal w3a--text-app-red-500 dark:w3a--text-app-red-400",
570
+ className: "wta:-mt-2 wta:w-full wta:pl-6 wta:text-start wta:text-xs wta:font-normal wta:text-app-red-500 wta:dark:text-app-red-400",
565
571
  children: t(captchaError)
566
572
  }), !showCaptcha && jsxRuntime.jsxs("div", {
567
- className: "w3a--flex w3a--w-full w3a--flex-col w3a--items-center w3a--justify-center w3a--gap-y-2",
573
+ className: "wta:flex wta:w-full wta:flex-col wta:items-center wta:justify-center wta:gap-y-2",
568
574
  children: [!expandSocialLogins && defaultView(), expandSocialLogins && socialLoginExpandedView()]
569
575
  })]
570
576
  });
@@ -35,16 +35,16 @@ function OtpInput(props) {
35
35
  }, [loginHint, authConnection, countryFlag]);
36
36
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
37
37
  children: [jsxRuntime.jsx("div", {
38
- className: "w3a--mr-auto w3a--flex w3a--w-full w3a--items-start w3a--justify-start",
38
+ className: "wta:mr-auto wta:flex wta:w-full wta:items-start wta:justify-start",
39
39
  children: jsxRuntime.jsx("button", {
40
40
  type: "button",
41
- className: "w3a--z-20 w3a--flex w3a--size-5 w3a--cursor-pointer w3a--items-center w3a--justify-center w3a--rounded-full",
41
+ className: "wta:z-20 wta:flex wta:size-5 wta:cursor-pointer wta:items-center wta:justify-center wta:rounded-full",
42
42
  onClick: () => setShowOtpFlow(false),
43
43
  children: jsxRuntime.jsx("svg", {
44
44
  xmlns: "http://www.w3.org/2000/svg",
45
45
  fill: "none",
46
46
  viewBox: "0 0 20 20",
47
- className: "w3a--text-app-gray-900 dark:w3a--text-app-white",
47
+ className: "wta:text-app-gray-900 wta:dark:text-app-white",
48
48
  children: jsxRuntime.jsx("path", {
49
49
  fill: "currentColor",
50
50
  fillRule: "evenodd",
@@ -54,23 +54,23 @@ function OtpInput(props) {
54
54
  })
55
55
  })
56
56
  }), jsxRuntime.jsxs("div", {
57
- className: "-w3a--mt-10 w3a--flex w3a--size-full w3a--flex-1 w3a--flex-col w3a--items-center w3a--justify-center w3a--gap-y-4",
57
+ className: "wta:-mt-10 wta:flex wta:size-full wta:flex-1 wta:flex-col wta:items-center wta:justify-center wta:gap-y-4",
58
58
  children: [jsxRuntime.jsx("img", {
59
59
  src: utils.getIcons(isMobileOtp ? "sms-otp-light" : "email-otp-light"),
60
60
  alt: "otp",
61
- className: "w3a--size-auto"
61
+ className: "wta:size-auto"
62
62
  }), jsxRuntime.jsxs("div", {
63
- className: "w3a--mx-auto -w3a--mt-6 w3a--flex w3a--w-full w3a--flex-col w3a--items-center w3a--justify-center w3a--gap-y-2",
63
+ className: "wta:mx-auto wta:-mt-6 wta:flex wta:w-full wta:flex-col wta:items-center wta:justify-center wta:gap-y-2",
64
64
  children: [jsxRuntime.jsx("p", {
65
- className: "w3a--text-lg w3a--font-bold w3a--text-app-gray-900 dark:w3a--text-app-white",
65
+ className: "wta:text-lg wta:font-bold wta:text-app-gray-900 wta:dark:text-app-white",
66
66
  children: isMobileOtp ? t("modal.otp.mobile-title") : t("modal.otp.email-title")
67
67
  }), jsxRuntime.jsxs("div", {
68
- className: "w3a--mx-auto w3a--flex w3a--w-full w3a--flex-col w3a--items-center w3a--justify-center w3a--gap-y-1",
68
+ className: "wta:mx-auto wta:flex wta:w-full wta:flex-col wta:items-center wta:justify-center wta:gap-y-1",
69
69
  children: [jsxRuntime.jsx("p", {
70
- className: "w3a--text-center w3a--text-sm w3a--font-normal w3a--text-app-gray-500 dark:w3a--text-app-gray-300",
70
+ className: "wta:text-center wta:text-sm wta:font-normal wta:text-app-gray-500 wta:dark:text-app-gray-300",
71
71
  children: isMobileOtp ? t("modal.otp.mobile-subtext") : t("modal.otp.email-subtext")
72
72
  }), jsxRuntime.jsx("p", {
73
- className: "w3a--text-center w3a--text-sm w3a--font-normal w3a--text-app-gray-500 dark:w3a--text-app-gray-300",
73
+ className: "wta:text-center wta:text-sm wta:font-normal wta:text-app-gray-500 wta:dark:text-app-gray-300",
74
74
  children: isMobileOtp ? parsedLoginHint : t("modal.otp.email-subtext-example", {
75
75
  email: parsedLoginHint
76
76
  })
@@ -103,7 +103,7 @@ function LoginOtp(props) {
103
103
  countryFlag
104
104
  } = props;
105
105
  return jsxRuntime.jsx("div", {
106
- className: "w3a--flex w3a--size-full w3a--flex-1 w3a--flex-col w3a--items-center w3a--justify-center w3a--gap-y-4",
106
+ className: "wta:flex wta:size-full wta:flex-1 wta:flex-col wta:items-center wta:justify-center wta:gap-y-4",
107
107
  children: jsxRuntime.jsx(OtpInput, {
108
108
  errorMessage: errorMessage,
109
109
  setShowOtpFlow: setShowOtpFlow,
@@ -59,22 +59,22 @@ function LoginPasswordLess(props) {
59
59
  if (!isPasswordLessCtaClicked) {
60
60
  return jsxRuntime.jsxs("button", {
61
61
  type: "button",
62
- className: utils.cn("w3a--btn !w3a--justify-between w3a--relative w3a--group w3a--overflow-hidden", {
63
- "w3a--rounded-full": buttonRadius === "pill",
64
- "w3a--rounded-lg": buttonRadius === "rounded",
65
- "w3a--rounded-none": buttonRadius === "square"
62
+ className: utils.cn("w3a--btn wta:justify-between! wta:relative wta:group wta:overflow-hidden", {
63
+ "wta:rounded-full": buttonRadius === "pill",
64
+ "wta:rounded-lg": buttonRadius === "rounded",
65
+ "wta:rounded-none": buttonRadius === "square"
66
66
  }),
67
67
  onClick: () => {
68
68
  setIsPasswordLessCtaClicked(true);
69
69
  },
70
70
  children: [jsxRuntime.jsx("p", {
71
- className: "w3a--text-app-gray-900 dark:w3a--text-app-white",
71
+ className: "wta:text-app-gray-900 wta:dark:text-app-white",
72
72
  children: t("modal.passwordless.title", {
73
73
  title
74
74
  })
75
75
  }), jsxRuntime.jsx("img", {
76
76
  id: "passwordless-arrow",
77
- className: "w3a--absolute w3a--right-4 w3a--top-1/2 -w3a--translate-x-6 -w3a--translate-y-1/2 w3a--opacity-0 w3a--transition-all w3a--duration-300\n group-hover:w3a--translate-x-0 group-hover:w3a--opacity-100",
77
+ className: "wta:absolute wta:right-4 wta:top-1/2 wta:-translate-x-6 wta:-translate-y-1/2 wta:opacity-0 wta:transition-all wta:duration-300\n wta:group-hover:translate-x-0 wta:group-hover:opacity-100",
78
78
  src: utils.getIcons(isDark ? "chevron-right-dark" : "chevron-right-light"),
79
79
  alt: "arrow"
80
80
  })]
@@ -82,10 +82,10 @@ function LoginPasswordLess(props) {
82
82
  }
83
83
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
84
84
  children: [jsxRuntime.jsxs("div", {
85
- className: utils.cn("w3a--input", isInputFocused && "!w3a--border-app-primary-600", {
86
- "w3a--rounded-full": buttonRadius === "pill",
87
- "w3a--rounded-lg": buttonRadius === "rounded",
88
- "w3a--rounded-none": buttonRadius === "square"
85
+ className: utils.cn("w3a--input", isInputFocused && "wta:border-app-primary-600!", {
86
+ "wta:rounded-full": buttonRadius === "pill",
87
+ "wta:rounded-lg": buttonRadius === "rounded",
88
+ "wta:rounded-none": buttonRadius === "square"
89
89
  }),
90
90
  children: [jsxRuntime.jsx("input", {
91
91
  ref: inputRef,
@@ -100,12 +100,12 @@ function LoginPasswordLess(props) {
100
100
  setIsInputFocused(false);
101
101
  },
102
102
  type: "text",
103
- className: utils.cn("w3a--w-full w3a--appearance-none w3a--bg-transparent w3a--text-app-gray-900 w3a--outline-none placeholder:w3a--text-xs placeholder:w3a--text-app-gray-400 focus:w3a--outline-none active:w3a--outline-none dark:w3a--text-app-white dark:placeholder:w3a--text-app-gray-500"),
103
+ className: utils.cn("wta:w-full wta:appearance-none wta:bg-transparent wta:text-app-gray-900 wta:outline-none wta:placeholder:text-xs wta:placeholder:text-app-gray-400 wta:focus:outline-none wta:active:outline-none wta:dark:text-app-white wta:dark:placeholder:text-app-gray-500"),
104
104
  onKeyDown: e => handleEnter(e),
105
105
  disabled: isPasswordLessLoading
106
106
  }), isPasswordLessLoading && jsxRuntime.jsx(PulseLoader, {}), inputValue && !isPasswordLessLoading && jsxRuntime.jsx("button", {
107
107
  type: "button",
108
- className: "w3a--appearance-none",
108
+ className: "wta:appearance-none",
109
109
  onClick: onFormSubmit,
110
110
  children: jsxRuntime.jsx("img", {
111
111
  src: utils.getIcons(isDark ? "chevron-right-dark" : "chevron-right-light"),
@@ -113,7 +113,7 @@ function LoginPasswordLess(props) {
113
113
  })
114
114
  })]
115
115
  }), errorMessage && !isInputFocused && isPasswordLessCtaClicked && jsxRuntime.jsx("p", {
116
- className: "w3a--w-full w3a--pl-6 w3a--text-start w3a--text-xs w3a--font-normal w3a--text-app-red-500 dark:w3a--text-app-red-400",
116
+ className: "wta:w-full wta:pl-6 wta:text-start wta:text-xs wta:font-normal wta:text-app-red-500 wta:dark:text-app-red-400",
117
117
  children: errorMessage
118
118
  })]
119
119
  });
@@ -4,7 +4,7 @@ var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var noModal = require('@web3auth/no-modal');
6
6
  var react = require('react');
7
- var tailwindMerge = require('tailwind-merge');
7
+ var reactI18next = require('react-i18next');
8
8
  var Footer = require('../../components/Footer/Footer.js');
9
9
  var Loader = require('../../components/Loader/Loader.js');
10
10
  var Toast = require('../../components/Toast/Toast.js');
@@ -13,6 +13,8 @@ var ModalStateContext = require('../../context/ModalStateContext.js');
13
13
  var RootContext = require('../../context/RootContext.js');
14
14
  var WidgetContext = require('../../context/WidgetContext.js');
15
15
  var interfaces = require('../../interfaces.js');
16
+ var localeImport = require('../../localeImport.js');
17
+ var AccountLinking = require('../AccountLinking/AccountLinking.js');
16
18
  var ConnectWallet = require('../ConnectWallet/ConnectWallet.js');
17
19
  var Login = require('../Login/Login.js');
18
20
  var RootBodySheets = require('./RootBodySheets/RootBodySheets.js');
@@ -21,6 +23,9 @@ function RootContent(props) {
21
23
  const {
22
24
  onCloseLoader
23
25
  } = props;
26
+ const [t] = reactI18next.useTranslation(undefined, {
27
+ i18n: localeImport
28
+ });
24
29
  const {
25
30
  modalState,
26
31
  shouldShowLoginPage,
@@ -178,14 +183,21 @@ function RootContent(props) {
178
183
  const isExternalWalletModeOnly = react.useMemo(() => {
179
184
  return !showPasswordLessInput && !areSocialLoginsVisible;
180
185
  }, [areSocialLoginsVisible, showPasswordLessInput]);
186
+ const isWalletConnectAccountLinkingVisible = react.useMemo(() => {
187
+ return modalState.accountLinking.active && modalState.accountLinking.transportConnectorName === noModal.WALLET_CONNECTORS.WALLET_CONNECT_V2;
188
+ }, [modalState.accountLinking.active, modalState.accountLinking.transportConnectorName]);
181
189
  const isShowLoader = react.useMemo(() => {
182
- return modalState.status !== interfaces.MODAL_STATUS.INITIALIZED;
183
- }, [modalState.status]);
184
- const isConsentRequiringStatus = modalState.status === interfaces.MODAL_STATUS.CONSENT_REQUIRING;
190
+ return !isWalletConnectAccountLinkingVisible && modalState.status !== interfaces.MODAL_STATUS.INITIALIZED;
191
+ }, [isWalletConnectAccountLinkingVisible, modalState.status]);
192
+ const loaderMessage = react.useMemo(() => {
193
+ const message = modalState.postLoadingMessage;
194
+ if (!message) return undefined;
195
+ return localeImport.exists(message) ? t(message) : message;
196
+ }, [modalState.postLoadingMessage, t]);
185
197
  return jsxRuntime.jsxs("div", {
186
- className: "w3a--relative w3a--flex w3a--flex-col",
198
+ className: "wta:relative wta:flex wta:flex-col",
187
199
  children: [jsxRuntime.jsxs("div", {
188
- className: "w3a-modal-container w3a--relative w3a--flex w3a--flex-col w3a--overflow-hidden",
200
+ className: "w3a-modal-container wta:relative wta:flex wta:flex-col wta:overflow-hidden",
189
201
  style: {
190
202
  height: containerHeight
191
203
  },
@@ -193,11 +205,12 @@ function RootContent(props) {
193
205
  className: "w3a--modal-curtain"
194
206
  }), jsxRuntime.jsxs("div", {
195
207
  ref: contentRef,
196
- className: tailwindMerge.twMerge("w3a--relative w3a--flex w3a--flex-col w3a--p-6", isShowLoader && !isConsentRequiringStatus ? "w3a--flex-1" : "w3a--flex-none"),
208
+ className: "wta:relative wta:flex wta:flex-none wta:flex-col wta:p-6",
197
209
  children: [isShowLoader ? jsxRuntime.jsx(Loader, {
198
210
  connector: modalState.detailedLoaderConnector,
199
211
  connectorName: modalState.detailedLoaderConnectorName,
200
212
  modalStatus: modalState.status,
213
+ message: loaderMessage,
201
214
  onClose: onCloseLoader,
202
215
  isConnectAndSignAuthenticationMode: isConnectAndSignAuthenticationMode,
203
216
  externalWalletsConfig: modalState.externalWalletsConfig,
@@ -208,11 +221,13 @@ function RootContent(props) {
208
221
  privacyPolicy: privacyPolicy,
209
222
  tncLink: tncLink
210
223
  }) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
211
- children: [modalState.currentPage === constants.PAGES.LOGIN_OPTIONS && shouldShowLoginPage && modalState.status === interfaces.MODAL_STATUS.INITIALIZED && jsxRuntime.jsx(Login, {
224
+ children: [isWalletConnectAccountLinkingVisible && jsxRuntime.jsx(AccountLinking, {
225
+ allExternalWallets: allExternalWallets
226
+ }), !isWalletConnectAccountLinkingVisible && !modalState.accountLinking.pickerActive && modalState.currentPage === constants.PAGES.LOGIN_OPTIONS && shouldShowLoginPage && modalState.status === interfaces.MODAL_STATUS.INITIALIZED && jsxRuntime.jsx(Login, {
212
227
  installedExternalWalletConfig: topInstalledConnectorButtons,
213
228
  totalExternalWallets: allExternalWallets.length,
214
229
  remainingUndisplayedWallets: remainingUndisplayedWallets
215
- }), modalState.currentPage === constants.PAGES.WALLET_LIST && (!shouldShowLoginPage || isExternalWalletModeOnly) && modalState.status === interfaces.MODAL_STATUS.INITIALIZED && jsxRuntime.jsx(ConnectWallet, {
230
+ }), !isWalletConnectAccountLinkingVisible && modalState.currentPage === constants.PAGES.WALLET_LIST && (!shouldShowLoginPage || isExternalWalletModeOnly || modalState.accountLinking.pickerActive) && modalState.status === interfaces.MODAL_STATUS.INITIALIZED && jsxRuntime.jsx(ConnectWallet, {
216
231
  allRegistryButtons: allRegistryButtons,
217
232
  connectorVisibilityMap: connectorVisibilityMap,
218
233
  customConnectorButtons: customConnectorButtons,