@web3auth/modal 11.0.0-beta.0 → 11.0.0-beta.1
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/lib.cjs/packages/modal/src/account-linking/index.js +12 -0
- package/dist/lib.cjs/packages/modal/src/account-linking/react.js +22 -0
- package/dist/lib.cjs/packages/modal/src/account-linking/vue.js +22 -0
- package/dist/lib.cjs/packages/modal/src/config.js +1 -1
- package/dist/lib.cjs/packages/modal/src/modalManager.js +446 -26
- package/dist/lib.cjs/packages/modal/src/react/index.js +7 -3
- package/dist/lib.cjs/packages/modal/src/react/wagmi/provider.js +27 -12
- package/dist/lib.cjs/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +13 -13
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +4 -4
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +10 -10
- package/dist/lib.cjs/packages/modal/src/ui/components/Footer/Footer.js +7 -7
- package/dist/lib.cjs/packages/modal/src/ui/components/Image/Image.js +4 -4
- package/dist/lib.cjs/packages/modal/src/ui/components/Loader/Loader.js +28 -28
- package/dist/lib.cjs/packages/modal/src/ui/components/LoginHint/LoginHint.js +3 -3
- package/dist/lib.cjs/packages/modal/src/ui/components/Modal/Modal.js +19 -19
- package/dist/lib.cjs/packages/modal/src/ui/components/Otp/Otp.js +10 -10
- package/dist/lib.cjs/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +4 -4
- package/dist/lib.cjs/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +21 -21
- package/dist/lib.cjs/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.js +1 -1
- package/dist/lib.cjs/packages/modal/src/ui/components/Toast/Toast.js +11 -11
- package/dist/lib.cjs/packages/modal/src/ui/containers/AccountLinking/AccountLinking.js +109 -0
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWallet.js +14 -3
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +7 -7
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +9 -9
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +9 -8
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletList/ConnectWalletList.js +19 -19
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +8 -8
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +5 -5
- package/dist/lib.cjs/packages/modal/src/ui/containers/Embed/Embed.js +11 -11
- package/dist/lib.cjs/packages/modal/src/ui/containers/Login/Login.js +45 -41
- package/dist/lib.cjs/packages/modal/src/ui/containers/Login/LoginOtp/LoginOtp.js +11 -11
- package/dist/lib.cjs/packages/modal/src/ui/containers/Login/LoginPasswordLess/LoginPasswordLess.js +13 -13
- package/dist/lib.cjs/packages/modal/src/ui/containers/Root/Root.js +24 -9
- package/dist/lib.cjs/packages/modal/src/ui/containers/Root/RootBodySheets/RootBodySheets.js +16 -16
- package/dist/lib.cjs/packages/modal/src/ui/containers/Widget/Widget.js +6 -2
- package/dist/lib.cjs/packages/modal/src/ui/context/ModalStateContext.js +1 -0
- package/dist/lib.cjs/packages/modal/src/ui/css/index.css.js +1 -1
- package/dist/lib.cjs/packages/modal/src/ui/i18n/dutch.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/english.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/french.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/german.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/japanese.json.js +26 -12
- package/dist/lib.cjs/packages/modal/src/ui/i18n/korean.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/mandarin.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/portuguese.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/spanish.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/turkish.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/interfaces.js +26 -0
- package/dist/lib.cjs/packages/modal/src/ui/loginModal.js +113 -4
- package/dist/lib.cjs/packages/modal/src/vue/index.js +7 -3
- package/dist/lib.cjs/packages/modal/src/vue/wagmi/provider.js +27 -14
- package/dist/lib.cjs/types/account-linking/index.d.ts +1 -0
- package/dist/lib.cjs/types/account-linking/react.d.ts +2 -0
- package/dist/lib.cjs/types/account-linking/vue.d.ts +2 -0
- package/dist/lib.cjs/types/modalManager.d.ts +40 -2
- package/dist/lib.cjs/types/react/hooks/index.d.ts +1 -0
- package/dist/lib.cjs/types/react/hooks/useWallets.d.ts +2 -0
- package/dist/lib.cjs/types/ui/containers/AccountLinking/AccountLinking.d.ts +6 -0
- package/dist/lib.cjs/types/ui/containers/AccountLinking/index.d.ts +1 -0
- package/dist/lib.cjs/types/ui/containers/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.type.d.ts +1 -0
- package/dist/lib.cjs/types/ui/containers/Root/Root.d.ts +1 -1
- package/dist/lib.cjs/types/ui/interfaces.d.ts +43 -8
- package/dist/lib.cjs/types/ui/loginModal.d.ts +27 -2
- package/dist/lib.cjs/types/ui/utils.d.ts +1 -1
- package/dist/lib.cjs/types/vue/composables/index.d.ts +1 -0
- package/dist/lib.cjs/types/vue/composables/useWallets.d.ts +2 -0
- package/dist/lib.esm/packages/modal/src/account-linking/index.js +1 -0
- package/dist/lib.esm/packages/modal/src/account-linking/react.js +1 -0
- package/dist/lib.esm/packages/modal/src/account-linking/vue.js +1 -0
- package/dist/lib.esm/packages/modal/src/config.js +1 -1
- package/dist/lib.esm/packages/modal/src/modalManager.js +451 -28
- package/dist/lib.esm/packages/modal/src/react/index.js +1 -1
- package/dist/lib.esm/packages/modal/src/react/wagmi/provider.js +28 -13
- package/dist/lib.esm/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +13 -13
- package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +4 -4
- package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +10 -10
- package/dist/lib.esm/packages/modal/src/ui/components/Footer/Footer.js +7 -7
- package/dist/lib.esm/packages/modal/src/ui/components/Image/Image.js +4 -4
- package/dist/lib.esm/packages/modal/src/ui/components/Loader/Loader.js +28 -28
- package/dist/lib.esm/packages/modal/src/ui/components/LoginHint/LoginHint.js +3 -3
- package/dist/lib.esm/packages/modal/src/ui/components/Modal/Modal.js +19 -19
- package/dist/lib.esm/packages/modal/src/ui/components/Otp/Otp.js +10 -10
- package/dist/lib.esm/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +4 -4
- package/dist/lib.esm/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +21 -21
- package/dist/lib.esm/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.js +1 -1
- package/dist/lib.esm/packages/modal/src/ui/components/Toast/Toast.js +11 -11
- package/dist/lib.esm/packages/modal/src/ui/containers/AccountLinking/AccountLinking.js +107 -0
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWallet.js +14 -3
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +7 -7
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +9 -9
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +9 -8
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletList/ConnectWalletList.js +19 -19
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +8 -8
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +5 -5
- package/dist/lib.esm/packages/modal/src/ui/containers/Embed/Embed.js +11 -11
- package/dist/lib.esm/packages/modal/src/ui/containers/Login/Login.js +46 -42
- package/dist/lib.esm/packages/modal/src/ui/containers/Login/LoginOtp/LoginOtp.js +11 -11
- package/dist/lib.esm/packages/modal/src/ui/containers/Login/LoginPasswordLess/LoginPasswordLess.js +13 -13
- package/dist/lib.esm/packages/modal/src/ui/containers/Root/Root.js +24 -9
- package/dist/lib.esm/packages/modal/src/ui/containers/Root/RootBodySheets/RootBodySheets.js +16 -16
- package/dist/lib.esm/packages/modal/src/ui/containers/Widget/Widget.js +6 -2
- package/dist/lib.esm/packages/modal/src/ui/context/ModalStateContext.js +2 -1
- package/dist/lib.esm/packages/modal/src/ui/css/index.css.js +1 -1
- package/dist/lib.esm/packages/modal/src/ui/i18n/dutch.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/english.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/french.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/german.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/japanese.json.js +26 -12
- package/dist/lib.esm/packages/modal/src/ui/i18n/korean.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/mandarin.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/portuguese.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/spanish.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/turkish.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/interfaces.js +24 -1
- package/dist/lib.esm/packages/modal/src/ui/loginModal.js +115 -6
- package/dist/lib.esm/packages/modal/src/vue/index.js +1 -1
- package/dist/lib.esm/packages/modal/src/vue/wagmi/provider.js +28 -15
- package/package.json +42 -19
|
@@ -13,7 +13,7 @@ function NoWalletsFound() {
|
|
|
13
13
|
i18n: localeImport
|
|
14
14
|
});
|
|
15
15
|
return jsxRuntime.jsx("div", {
|
|
16
|
-
className: "
|
|
16
|
+
className: "wta:flex wta:w-full wta:items-center wta:justify-center wta:py-6 wta:text-center wta:text-app-gray-400 wta:dark:text-app-gray-500",
|
|
17
17
|
children: t("modal.external.no-wallets-found")
|
|
18
18
|
});
|
|
19
19
|
}
|
|
@@ -34,20 +34,20 @@ function WalletsFound(props) {
|
|
|
34
34
|
} = uiConfig;
|
|
35
35
|
if (isLoading) {
|
|
36
36
|
return jsxRuntime.jsx("div", {
|
|
37
|
-
className: "
|
|
37
|
+
className: "wta:flex wta:flex-col wta:gap-y-2",
|
|
38
38
|
children: Array.from({
|
|
39
39
|
length: 6
|
|
40
40
|
}).map((_, index) => jsxRuntime.jsx("div", {
|
|
41
|
-
className: utils.cn("
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
41
|
+
className: utils.cn("wta:h-12 wta:w-full wta:animate-pulse wta:rounded-2xl wta:bg-app-gray-200 wta:dark:bg-app-gray-700", {
|
|
42
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
43
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
44
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
45
45
|
})
|
|
46
46
|
}, `loader-${index}`))
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
return jsxRuntime.jsx("div", {
|
|
50
|
-
className: "
|
|
50
|
+
className: "wta:flex wta:flex-col wta:gap-y-2",
|
|
51
51
|
children: externalButtons.map(button => jsxRuntime.jsx(Button, {
|
|
52
52
|
type: Button_type.BUTTON_TYPE.WALLET,
|
|
53
53
|
props: {
|
|
@@ -86,19 +86,19 @@ function MoreWalletsButton(props) {
|
|
|
86
86
|
};
|
|
87
87
|
if (isLoading && initialWalletCount < totalExternalWalletsCount) {
|
|
88
88
|
return jsxRuntime.jsx("div", {
|
|
89
|
-
className: utils.cn("
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
89
|
+
className: utils.cn("wta:h-12 wta:w-full wta:animate-pulse wta:bg-app-gray-200 wta:dark:bg-app-gray-700", {
|
|
90
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
91
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
92
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
93
93
|
})
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
return jsxRuntime.jsxs("button", {
|
|
97
97
|
type: "button",
|
|
98
|
-
className: utils.cn("
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
98
|
+
className: utils.cn("wta:flex wta:items-center wta:justify-start wta:gap-x-2 wta:bg-app-gray-50 wta:p-3 wta:hover:bg-app-gray-200 wta:dark:bg-app-gray-800 wta:dark:hover:bg-app-gray-600 wta:active:scale-95 wta:transition-all wta:duration-150", {
|
|
99
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
100
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
101
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
102
102
|
}),
|
|
103
103
|
onClick: onMoreWalletsClick,
|
|
104
104
|
children: [jsxRuntime.jsx("img", {
|
|
@@ -107,10 +107,10 @@ function MoreWalletsButton(props) {
|
|
|
107
107
|
height: "24",
|
|
108
108
|
width: "24"
|
|
109
109
|
}), jsxRuntime.jsx("p", {
|
|
110
|
-
className: "
|
|
110
|
+
className: "wta:text-base wta:font-normal wta:text-app-gray-700 wta:dark:text-app-white",
|
|
111
111
|
children: t("modal.connect-wallet.more-wallets")
|
|
112
112
|
}), jsxRuntime.jsx("span", {
|
|
113
|
-
className: "
|
|
113
|
+
className: "wta:inline-flex wta:items-center wta:rounded-full 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",
|
|
114
114
|
children: totalExternalWalletsCount - initialWalletCount
|
|
115
115
|
})]
|
|
116
116
|
});
|
|
@@ -133,8 +133,8 @@ function ConnectWalletList(props) {
|
|
|
133
133
|
const showMoreWalletsButton = !isShowAllWallets;
|
|
134
134
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
135
135
|
children: [jsxRuntime.jsx("ul", {
|
|
136
|
-
className: utils.cn("
|
|
137
|
-
"
|
|
136
|
+
className: utils.cn("wta:overflow-y-auto wta:flex wta:flex-col wta:gap-y-2 wta:h-[280px] w3a--social-container wta:-mx-5 wta:px-5", {
|
|
137
|
+
"wta:h-[328px]": !showMoreWalletsButton
|
|
138
138
|
}),
|
|
139
139
|
children: externalButtons.length === 0 ? jsxRuntime.jsx(NoWalletsFound, {}) : jsxRuntime.jsx(WalletsFound, {
|
|
140
140
|
externalButtons: externalButtons,
|
|
@@ -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: "
|
|
54
|
+
className: "wta:contents",
|
|
55
55
|
children: [qrCodeValue ? jsxRuntime.jsxs("div", {
|
|
56
|
-
className: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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="
|
|
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
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
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("
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
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: "
|
|
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: "
|
|
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",
|
|
@@ -76,10 +76,6 @@ function Login(props) {
|
|
|
76
76
|
const [passwordlessErrorMessage, setPasswordlessErrorMessage] = react.useState("");
|
|
77
77
|
const [otpErrorMessage, setOtpErrorMessage] = react.useState("");
|
|
78
78
|
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
79
|
const [isPasswordLessCtaClicked, setIsPasswordLessCtaClicked] = react.useState(false);
|
|
84
80
|
const [showOtpFlow, setShowOtpFlow] = react.useState(false);
|
|
85
81
|
const [authConnection, setAuthConnection] = react.useState(undefined);
|
|
@@ -93,7 +89,12 @@ function Login(props) {
|
|
|
93
89
|
setExpandSocialLogins(prev => !prev);
|
|
94
90
|
setIsPasswordLessCtaClicked(false);
|
|
95
91
|
};
|
|
96
|
-
|
|
92
|
+
const {
|
|
93
|
+
visibleRow,
|
|
94
|
+
otherRow,
|
|
95
|
+
mainOptionsRow,
|
|
96
|
+
canShowMore
|
|
97
|
+
} = react.useMemo(() => {
|
|
97
98
|
const maxOptions = Object.keys(socialLoginsConfig.loginMethods).filter(loginMethodKey => {
|
|
98
99
|
return socialLoginsConfig.loginMethods[loginMethodKey].showOnModal && !restrictedLoginMethods.includes(loginMethodKey);
|
|
99
100
|
});
|
|
@@ -160,11 +161,13 @@ function Login(props) {
|
|
|
160
161
|
}
|
|
161
162
|
otherRows.push(rows);
|
|
162
163
|
});
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
return {
|
|
165
|
+
visibleRow: visibleRows,
|
|
166
|
+
otherRow: otherRows,
|
|
167
|
+
mainOptionsRow: mainOptionsRows,
|
|
168
|
+
canShowMore: maxOptions.length > 4
|
|
169
|
+
};
|
|
170
|
+
}, [socialLoginsConfig, isDark]);
|
|
168
171
|
const handleCustomLogin = async (authConnection, loginHint) => {
|
|
169
172
|
try {
|
|
170
173
|
const handler = factory.createPasswordlessHandler(authConnection, {
|
|
@@ -247,7 +250,7 @@ function Login(props) {
|
|
|
247
250
|
}
|
|
248
251
|
}
|
|
249
252
|
}
|
|
250
|
-
setPasswordlessErrorMessage(
|
|
253
|
+
setPasswordlessErrorMessage(getInvalidInputErrorMessage());
|
|
251
254
|
setIsPasswordLessLoading(false);
|
|
252
255
|
return undefined;
|
|
253
256
|
};
|
|
@@ -261,11 +264,11 @@ function Login(props) {
|
|
|
261
264
|
if (isEmailPasswordLessLoginVisible) return "name@example.com";
|
|
262
265
|
return "+(00)123456";
|
|
263
266
|
}, [isEmailPasswordLessLoginVisible, isSmsPasswordLessLoginVisible]);
|
|
264
|
-
const
|
|
267
|
+
const getInvalidInputErrorMessage = () => {
|
|
265
268
|
if (isEmailPasswordLessLoginVisible && isSmsPasswordLessLoginVisible) return t("modal.errors-invalid-number-email");
|
|
266
269
|
if (isEmailPasswordLessLoginVisible) return t("modal.errors-invalid-email");
|
|
267
270
|
return t("modal.errors-invalid-number");
|
|
268
|
-
}
|
|
271
|
+
};
|
|
269
272
|
react.useEffect(() => {
|
|
270
273
|
const getLocation = async () => {
|
|
271
274
|
const result = await utils.getUserCountry();
|
|
@@ -375,6 +378,7 @@ function Login(props) {
|
|
|
375
378
|
}, [analytics, handleExternalWalletBtnClick, installedExternalWallets.length, totalExternalWallets]);
|
|
376
379
|
react.useEffect(() => {
|
|
377
380
|
if (showExternalWalletButton && !areSocialLoginsVisible && !showPasswordLessInput) {
|
|
381
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect -- intentional
|
|
378
382
|
handleConnectWallet();
|
|
379
383
|
}
|
|
380
384
|
}, [showExternalWalletButton, areSocialLoginsVisible, showPasswordLessInput, handleConnectWallet]);
|
|
@@ -418,25 +422,25 @@ function Login(props) {
|
|
|
418
422
|
};
|
|
419
423
|
const externalWalletSection = () => {
|
|
420
424
|
return jsxRuntime.jsxs("div", {
|
|
421
|
-
className: utils.cn("
|
|
425
|
+
className: utils.cn("wta:flex wta:w-full wta:flex-col wta:items-start wta:justify-start wta:gap-y-2"),
|
|
422
426
|
children: [installedExternalWallets.length > 0 && installedExternalWallets.map(wallet => jsxRuntime.jsxs("button", {
|
|
423
427
|
type: "button",
|
|
424
|
-
className: utils.cn("w3a--btn
|
|
425
|
-
"
|
|
426
|
-
"
|
|
427
|
-
"
|
|
428
|
+
className: utils.cn("w3a--btn wta:justify-between! wta:group wta:relative wta:overflow-hidden", {
|
|
429
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
430
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
431
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
428
432
|
}),
|
|
429
433
|
onClick: () => handleInstalledWalletClick(wallet),
|
|
430
434
|
children: [jsxRuntime.jsx("p", {
|
|
431
|
-
className: "
|
|
435
|
+
className: "wta:max-w-[180px] wta:truncate wta:text-base wta:font-normal wta:text-app-gray-700 wta:dark:text-app-white",
|
|
432
436
|
children: wallet.displayName
|
|
433
437
|
}), jsxRuntime.jsxs("div", {
|
|
434
|
-
className: "
|
|
438
|
+
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
439
|
children: [wallet.hasInjectedWallet && jsxRuntime.jsx("span", {
|
|
436
|
-
className: "
|
|
440
|
+
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
441
|
children: t("modal.external.installed")
|
|
438
442
|
}), jsxRuntime.jsx("figure", {
|
|
439
|
-
className: "
|
|
443
|
+
className: "wta:size-5",
|
|
440
444
|
children: jsxRuntime.jsx(Image, {
|
|
441
445
|
imageData: wallet.icon,
|
|
442
446
|
imageId: `login-${wallet.name}`,
|
|
@@ -450,28 +454,28 @@ function Login(props) {
|
|
|
450
454
|
})]
|
|
451
455
|
}), jsxRuntime.jsx("img", {
|
|
452
456
|
id: "injected-wallet-arrow",
|
|
453
|
-
className: "
|
|
457
|
+
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
458
|
src: utils.getIcons(isDark ? "chevron-right-dark" : "chevron-right-light"),
|
|
455
459
|
alt: "arrow"
|
|
456
460
|
})]
|
|
457
461
|
}, wallet.name)), remainingUndisplayedWallets > 0 && jsxRuntime.jsxs("button", {
|
|
458
462
|
type: "button",
|
|
459
|
-
className: utils.cn("w3a--btn
|
|
460
|
-
"
|
|
461
|
-
"
|
|
462
|
-
"
|
|
463
|
+
className: utils.cn("w3a--btn wta:justify-between! wta:group wta:relative wta:overflow-hidden", {
|
|
464
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
465
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
466
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
463
467
|
}),
|
|
464
468
|
onClick: handleConnectWallet,
|
|
465
469
|
children: [jsxRuntime.jsx("p", {
|
|
466
|
-
className: "
|
|
470
|
+
className: "wta:text-base wta:font-normal wta:text-app-gray-900 wta:dark:text-app-white",
|
|
467
471
|
children: t("modal.external.all-wallets")
|
|
468
472
|
}), showExternalWalletCount && jsxRuntime.jsx("div", {
|
|
469
473
|
id: "external-wallet-count",
|
|
470
|
-
className: "
|
|
474
|
+
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
475
|
children: remainingUndisplayedWallets
|
|
472
476
|
}), jsxRuntime.jsx("img", {
|
|
473
477
|
id: "external-wallet-arrow",
|
|
474
|
-
className: "
|
|
478
|
+
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
479
|
src: utils.getIcons(isDark ? "chevron-right-dark" : "chevron-right-light"),
|
|
476
480
|
alt: "arrow"
|
|
477
481
|
})]
|
|
@@ -481,14 +485,14 @@ function Login(props) {
|
|
|
481
485
|
const headerLogo = [constants.DEFAULT_LOGO_DARK, constants.DEFAULT_LOGO_LIGHT].includes(appLogo) ? "" : appLogo;
|
|
482
486
|
const delimiter = index => {
|
|
483
487
|
return jsxRuntime.jsxs("div", {
|
|
484
|
-
className: utils.cn("
|
|
488
|
+
className: utils.cn("wta:flex wta:w-full wta:items-center wta:gap-x-2", headerLogo ? "wta:my-2" : "wta:my-4"),
|
|
485
489
|
children: [jsxRuntime.jsx("div", {
|
|
486
|
-
className: "
|
|
490
|
+
className: "wta:h-px wta:w-full wta:bg-app-gray-200 wta:dark:bg-app-gray-500"
|
|
487
491
|
}), jsxRuntime.jsx("p", {
|
|
488
|
-
className: "
|
|
492
|
+
className: "wta:text-xs wta:font-normal wta:uppercase wta:text-app-gray-400 wta:dark:text-app-gray-400",
|
|
489
493
|
children: "or"
|
|
490
494
|
}), jsxRuntime.jsx("div", {
|
|
491
|
-
className: "
|
|
495
|
+
className: "wta:h-px wta:w-full wta:bg-app-gray-200 wta:dark:bg-app-gray-500"
|
|
492
496
|
})]
|
|
493
497
|
}, `section-delimiter-${index}`);
|
|
494
498
|
};
|
|
@@ -536,18 +540,18 @@ function Login(props) {
|
|
|
536
540
|
};
|
|
537
541
|
const socialLoginExpandedView = () => socialLoginSection(otherRow);
|
|
538
542
|
return jsxRuntime.jsxs("div", {
|
|
539
|
-
className: "
|
|
543
|
+
className: "wta:flex wta:flex-col wta:items-center wta:gap-y-4 wta:p-2",
|
|
540
544
|
children: [jsxRuntime.jsxs("div", {
|
|
541
|
-
className: utils.cn("
|
|
545
|
+
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
546
|
children: [headerLogo && jsxRuntime.jsx("figure", {
|
|
543
|
-
className: utils.cn("
|
|
547
|
+
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
548
|
children: jsxRuntime.jsx("img", {
|
|
545
549
|
src: headerLogo,
|
|
546
550
|
alt: "Logo",
|
|
547
|
-
className: "
|
|
551
|
+
className: "wta:size-full wta:object-contain"
|
|
548
552
|
})
|
|
549
553
|
}), jsxRuntime.jsx("p", {
|
|
550
|
-
className: utils.cn("
|
|
554
|
+
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
555
|
children: t("modal.social.sign-in")
|
|
552
556
|
})]
|
|
553
557
|
}), jsxRuntime.jsx(HCaptcha, {
|
|
@@ -561,10 +565,10 @@ function Login(props) {
|
|
|
561
565
|
onError: () => setCaptchaError("passwordless.captcha-default-error"),
|
|
562
566
|
onChalExpired: () => setCaptchaError("passwordless.captcha-default-error")
|
|
563
567
|
}), captchaError && showCaptcha && jsxRuntime.jsx("p", {
|
|
564
|
-
className: "
|
|
568
|
+
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
569
|
children: t(captchaError)
|
|
566
570
|
}), !showCaptcha && jsxRuntime.jsxs("div", {
|
|
567
|
-
className: "
|
|
571
|
+
className: "wta:flex wta:w-full wta:flex-col wta:items-center wta:justify-center wta:gap-y-2",
|
|
568
572
|
children: [!expandSocialLogins && defaultView(), expandSocialLogins && socialLoginExpandedView()]
|
|
569
573
|
})]
|
|
570
574
|
});
|
|
@@ -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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
61
|
+
className: "wta:size-auto"
|
|
62
62
|
}), jsxRuntime.jsxs("div", {
|
|
63
|
-
className: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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,
|
package/dist/lib.cjs/packages/modal/src/ui/containers/Login/LoginPasswordLess/LoginPasswordLess.js
CHANGED
|
@@ -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
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
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: "
|
|
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: "
|
|
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 && "
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
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("
|
|
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: "
|
|
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: "
|
|
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
|
});
|