@crossmint/client-sdk-react-ui 1.10.7 → 1.11.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/chunk-2POV64LQ.js +1 -0
- package/dist/chunk-2U6DCZSI.js +1 -0
- package/dist/chunk-2VILTRL5.js +1 -0
- package/dist/chunk-2VQLMU5A.cjs +1 -0
- package/dist/chunk-2WSEHVNP.cjs +1 -0
- package/dist/chunk-33OQI6MO.js +1 -0
- package/dist/chunk-3BUVHV54.js +0 -0
- package/dist/chunk-3EQVCVCE.cjs +1 -0
- package/dist/chunk-3FQDW3IU.js +1 -0
- package/dist/chunk-3GIMVKF3.js +1 -0
- package/dist/chunk-4IHRWQWT.js +1 -0
- package/dist/chunk-4ITU7JF2.js +1 -0
- package/dist/chunk-56YL3XJW.cjs +1 -0
- package/dist/chunk-5IFQJPBE.cjs +1 -0
- package/dist/chunk-5M3BWY6T.cjs +1 -0
- package/dist/chunk-6IRIZUTM.cjs +1 -0
- package/dist/chunk-6M5OP7SM.js +1 -0
- package/dist/chunk-72MMCJ2E.js +0 -0
- package/dist/chunk-72P3JMXX.js +1 -0
- package/dist/chunk-77PBG2JJ.js +1 -0
- package/dist/chunk-7ANJ2GZG.cjs +1 -0
- package/dist/chunk-7ASOCI4Q.js +1 -0
- package/dist/chunk-7B364FBM.cjs +1 -0
- package/dist/chunk-7VI5AXX5.cjs +1 -0
- package/dist/chunk-AUSETHZ3.cjs +1 -0
- package/dist/chunk-AXMHJC73.cjs +1 -0
- package/dist/chunk-BR77Q3PK.cjs +1 -0
- package/dist/chunk-BV7CQ2QS.js +1 -0
- package/dist/chunk-C3JRTLQP.js +1 -0
- package/dist/chunk-CW33KBH3.cjs +1 -0
- package/dist/chunk-D3255LVM.cjs +1 -0
- package/dist/chunk-D4K2AGJK.cjs +1 -0
- package/dist/chunk-DGZQUCSD.js +1 -0
- package/dist/chunk-DPUG72P3.cjs +1 -0
- package/dist/chunk-E4TBJMOO.js +1 -0
- package/dist/chunk-EA7H4AXL.js +1 -0
- package/dist/chunk-EUXGP4IN.cjs +1 -0
- package/dist/chunk-EVADF7QA.js +1 -0
- package/dist/chunk-FON43I6G.cjs +1 -0
- package/dist/chunk-G4LT7I7W.js +1 -0
- package/dist/chunk-GPGY5B6G.js +1 -0
- package/dist/chunk-GPQZG7HC.cjs +1 -0
- package/dist/chunk-HG5ML6KX.cjs +1 -0
- package/dist/chunk-HJ4ZXU2X.js +1 -0
- package/dist/chunk-I4GMMHQR.cjs +1 -0
- package/dist/chunk-IAJBYU5C.js +1 -0
- package/dist/chunk-IMRZHYQK.cjs +1 -0
- package/dist/chunk-IMV35JZB.cjs +1 -0
- package/dist/chunk-IV4ACZQE.js +1 -0
- package/dist/chunk-IZGR67ZI.js +1 -0
- package/dist/chunk-JDYEU555.cjs +1 -0
- package/dist/chunk-JGM3G5E2.js +1 -0
- package/dist/chunk-JSNUJJQJ.js +1 -0
- package/dist/chunk-KFL42A3A.js +1 -0
- package/dist/chunk-KI4HRYHD.cjs +1 -0
- package/dist/chunk-LMSKJDGS.js +1 -0
- package/dist/chunk-M42BIIZJ.cjs +1 -0
- package/dist/chunk-N7OESP3W.js +1 -0
- package/dist/chunk-NB7AJIPT.js +0 -0
- package/dist/chunk-NBJIJZGO.js +1 -0
- package/dist/chunk-NCDVID2B.js +1 -0
- package/dist/chunk-NEKICGOA.cjs +1 -0
- package/dist/chunk-NFLGT52C.cjs +1 -0
- package/dist/chunk-NRN4WNQL.cjs +1 -0
- package/dist/chunk-NU6UB76I.cjs +1 -0
- package/dist/chunk-NZQIZ4ZY.cjs +1 -0
- package/dist/chunk-O5J2ZIJ6.cjs +1 -0
- package/dist/chunk-O73L7XWQ.js +1 -0
- package/dist/chunk-OOLXYAO7.js +1 -0
- package/dist/chunk-PDEAWPX3.cjs +1 -0
- package/dist/chunk-PW7TOKQ2.cjs +1 -0
- package/dist/chunk-PXDN3KFO.js +1 -0
- package/dist/chunk-QASKWI5Y.js +1 -0
- package/dist/chunk-QYQERFYL.cjs +1 -0
- package/dist/chunk-ROJ6HFVK.js +1 -0
- package/dist/chunk-RYQRCUKB.js +1 -0
- package/dist/chunk-S73E6EBO.cjs +1 -0
- package/dist/chunk-SFDQPSSP.js +1 -0
- package/dist/chunk-SRQAQHYK.cjs +1 -0
- package/dist/chunk-T6FFMX2I.js +1 -0
- package/dist/chunk-TD56X3VP.js +1 -0
- package/dist/chunk-TM7WDKYR.cjs +1 -0
- package/dist/chunk-TNCETEEL.js +1 -0
- package/dist/chunk-TXOVDTYK.cjs +1 -0
- package/dist/chunk-UAFW3OWA.js +1 -0
- package/dist/chunk-UEC3RXWE.cjs +1 -0
- package/dist/chunk-UHKWPOFV.js +1 -0
- package/dist/chunk-UP4F7YLI.cjs +1 -0
- package/dist/chunk-UYSB2EMS.cjs +1 -0
- package/dist/chunk-VHNBXIOC.js +1 -0
- package/dist/chunk-VI6TW7JT.cjs +1 -0
- package/dist/chunk-VLDE23JX.js +1 -0
- package/dist/chunk-VWBAHXIO.cjs +1 -0
- package/dist/chunk-VWL76U5G.js +1 -0
- package/dist/chunk-W4UPIFFS.cjs +1 -0
- package/dist/chunk-WABJHG6B.cjs +1 -0
- package/dist/chunk-WECMBN4Z.cjs +1 -0
- package/dist/chunk-WHFUW3W3.js +0 -0
- package/dist/chunk-WW3LYPGC.cjs +1 -0
- package/dist/chunk-X5BBXO27.cjs +1 -0
- package/dist/chunk-XIVIIEY5.js +1 -0
- package/dist/chunk-XUQK2ILL.cjs +1 -0
- package/dist/chunk-XUT4N66R.cjs +1 -0
- package/dist/chunk-YV6LD2NU.js +1 -0
- package/dist/chunk-YXF74MVI.cjs +1 -0
- package/dist/chunk-Z2FGFHRQ.cjs +1 -0
- package/dist/chunk-Z5PEH5AD.js +1 -0
- package/dist/chunk-ZUZEZZX7.js +1 -0
- package/dist/components/CrossmintNFTCollectionView.cjs +1 -9
- package/dist/components/CrossmintNFTCollectionView.js +1 -9
- package/dist/components/CrossmintNFTDetail.cjs +1 -9
- package/dist/components/CrossmintNFTDetail.js +1 -9
- package/dist/components/auth/AuthForm.cjs +1 -30
- package/dist/components/auth/AuthForm.js +1 -30
- package/dist/components/auth/AuthFormBackButton.cjs +1 -30
- package/dist/components/auth/AuthFormBackButton.js +1 -30
- package/dist/components/auth/AuthFormDialog.cjs +1 -30
- package/dist/components/auth/AuthFormDialog.js +1 -30
- package/dist/components/auth/EmbeddedAuthForm.cjs +1 -31
- package/dist/components/auth/EmbeddedAuthForm.js +1 -31
- package/dist/components/auth/PasskeyPrompt.cjs +1 -14
- package/dist/components/auth/PasskeyPrompt.js +1 -14
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs +1 -30
- package/dist/components/auth/methods/email/EmailAuthFlow.js +1 -30
- package/dist/components/auth/methods/email/EmailOTPInput.cjs +1 -32
- package/dist/components/auth/methods/email/EmailOTPInput.js +1 -32
- package/dist/components/auth/methods/email/EmailSignIn.cjs +1 -30
- package/dist/components/auth/methods/email/EmailSignIn.js +1 -30
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +1 -30
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +1 -30
- package/dist/components/auth/methods/google/GoogleSignIn.cjs +1 -30
- package/dist/components/auth/methods/google/GoogleSignIn.js +1 -30
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +1 -67
- package/dist/components/auth/methods/web3/Web3AuthFlow.js +1 -67
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs +1 -33
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.js +1 -33
- package/dist/components/auth/methods/web3/Web3Connector.cjs +1 -65
- package/dist/components/auth/methods/web3/Web3Connector.js +1 -65
- package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs +1 -53
- package/dist/components/auth/methods/web3/Web3ConnectorButton.js +1 -53
- package/dist/components/auth/methods/web3/Web3Connectors.cjs +1 -31
- package/dist/components/auth/methods/web3/Web3Connectors.js +1 -31
- package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.cjs +1 -0
- package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.d.cts +9 -0
- package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.d.ts +9 -0
- package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.js +1 -0
- package/dist/components/common/CrossmintLogoV2/consts.cjs +1 -0
- package/dist/components/common/CrossmintLogoV2/consts.d.cts +35 -0
- package/dist/components/common/CrossmintLogoV2/consts.d.ts +35 -0
- package/dist/components/common/CrossmintLogoV2/consts.js +1 -0
- package/dist/components/common/CrossmintLogoV2/schemas.cjs +1 -0
- package/dist/components/common/CrossmintLogoV2/schemas.d.cts +199 -0
- package/dist/components/common/CrossmintLogoV2/schemas.d.ts +199 -0
- package/dist/components/common/CrossmintLogoV2/schemas.js +1 -0
- package/dist/components/common/Dialog.cjs +1 -26
- package/dist/components/common/Dialog.js +1 -26
- package/dist/components/common/Divider.cjs +1 -30
- package/dist/components/common/Divider.js +1 -30
- package/dist/components/common/InputOTP.cjs +1 -14
- package/dist/components/common/InputOTP.js +1 -14
- package/dist/components/common/PoweredByCrossmint.cjs +1 -10
- package/dist/components/common/PoweredByCrossmint.js +1 -10
- package/dist/components/common/Spinner.cjs +1 -9
- package/dist/components/common/Spinner.js +1 -9
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs +1 -8
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js +1 -8
- package/dist/components/embed/EmbeddedCheckoutIFrame.cjs +1 -8
- package/dist/components/embed/EmbeddedCheckoutIFrame.js +1 -8
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs +1 -11
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js +1 -11
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs +1 -10
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js +1 -10
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs +1 -11
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.js +1 -11
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs +1 -10
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js +1 -10
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs +1 -75
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.js +1 -75
- package/dist/components/embed/index.cjs +1 -14
- package/dist/components/embed/index.js +1 -14
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +1 -32
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -32
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +1 -31
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +1 -31
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +1 -142
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +1 -142
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs +1 -70
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js +1 -70
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs +1 -8
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js +1 -8
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs +1 -52
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js +1 -52
- package/dist/components/embed/v3/index.cjs +1 -33
- package/dist/components/embed/v3/index.js +1 -33
- package/dist/components/hosted/CrossmintPayButton.cjs +1 -11
- package/dist/components/hosted/CrossmintPayButton.js +1 -11
- package/dist/components/hosted/index.cjs +1 -12
- package/dist/components/hosted/index.d.cts +1 -0
- package/dist/components/hosted/index.d.ts +1 -0
- package/dist/components/hosted/index.js +1 -12
- package/dist/components/hosted/styles.cjs +1 -10
- package/dist/components/hosted/styles.js +1 -10
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs +1 -0
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.d.cts +8 -0
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.d.ts +8 -0
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js +1 -0
- package/dist/components/hosted/v3/index.cjs +1 -0
- package/dist/components/hosted/v3/index.d.cts +4 -0
- package/dist/components/hosted/v3/index.d.ts +4 -0
- package/dist/components/hosted/v3/index.js +1 -0
- package/dist/components/index.cjs +1 -63
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -63
- package/dist/consts/version.cjs +1 -8
- package/dist/consts/version.js +1 -8
- package/dist/hooks/index.cjs +1 -42
- package/dist/hooks/index.js +1 -42
- package/dist/hooks/useAuth.cjs +1 -30
- package/dist/hooks/useAuth.js +1 -30
- package/dist/hooks/useCrossmint.cjs +1 -10
- package/dist/hooks/useCrossmint.js +1 -10
- package/dist/hooks/useCrossmintAuth.cjs +1 -30
- package/dist/hooks/useCrossmintAuth.js +1 -30
- package/dist/hooks/useCrossmintCheckout.cjs +1 -13
- package/dist/hooks/useCrossmintCheckout.js +1 -13
- package/dist/hooks/useDeepEffect.cjs +1 -8
- package/dist/hooks/useDeepEffect.js +1 -8
- package/dist/hooks/useEnvironment.cjs +1 -8
- package/dist/hooks/useEnvironment.js +1 -8
- package/dist/hooks/useOAuthWindowListener.cjs +1 -30
- package/dist/hooks/useOAuthWindowListener.js +1 -30
- package/dist/hooks/useWallet.cjs +1 -30
- package/dist/hooks/useWallet.js +1 -30
- package/dist/icons/alert.cjs +1 -8
- package/dist/icons/alert.js +1 -8
- package/dist/icons/base64Icons.cjs +1 -12
- package/dist/icons/base64Icons.js +1 -12
- package/dist/icons/chevronRight.cjs +1 -8
- package/dist/icons/chevronRight.js +1 -8
- package/dist/icons/discord.cjs +1 -29
- package/dist/icons/discord.js +1 -29
- package/dist/icons/emailOTP.cjs +1 -8
- package/dist/icons/emailOTP.js +1 -8
- package/dist/icons/farcaster.cjs +1 -8
- package/dist/icons/farcaster.js +1 -8
- package/dist/icons/fingerprint.cjs +1 -8
- package/dist/icons/fingerprint.js +1 -8
- package/dist/icons/google.cjs +1 -8
- package/dist/icons/google.js +1 -8
- package/dist/icons/leftArrow.cjs +1 -8
- package/dist/icons/leftArrow.js +1 -8
- package/dist/icons/passkey.cjs +1 -8
- package/dist/icons/passkey.js +1 -8
- package/dist/icons/passkeyPromptLogo.cjs +1 -8
- package/dist/icons/passkeyPromptLogo.js +1 -8
- package/dist/icons/poweredByLeaf.cjs +1 -8
- package/dist/icons/poweredByLeaf.js +1 -8
- package/dist/icons/wallet.cjs +1 -8
- package/dist/icons/wallet.js +1 -8
- package/dist/icons/x.cjs +1 -29
- package/dist/icons/x.js +1 -29
- package/dist/index.cjs +1 -119
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -119
- package/dist/providers/CrossmintAuthProvider.cjs +1 -32
- package/dist/providers/CrossmintAuthProvider.js +1 -32
- package/dist/providers/CrossmintWalletProvider.cjs +1 -32
- package/dist/providers/CrossmintWalletProvider.js +1 -32
- package/dist/providers/TwindProvider.cjs +1 -9
- package/dist/providers/TwindProvider.js +1 -9
- package/dist/providers/auth/AuthFormProvider.cjs +1 -32
- package/dist/providers/auth/AuthFormProvider.js +1 -32
- package/dist/providers/auth/FarcasterProvider.cjs +1 -8
- package/dist/providers/auth/FarcasterProvider.js +1 -8
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.cjs +1 -33
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.js +1 -33
- package/dist/providers/index.cjs +1 -36
- package/dist/providers/index.js +1 -36
- package/dist/testUtils.cjs +1 -8
- package/dist/testUtils.js +1 -8
- package/dist/twind.config.cjs +1 -8
- package/dist/twind.config.js +1 -8
- package/dist/types/auth.cjs +1 -1
- package/dist/types/auth.js +0 -1
- package/dist/utils/classNames.cjs +1 -8
- package/dist/utils/classNames.js +1 -8
- package/dist/utils/createCrossmintApiClient.cjs +1 -9
- package/dist/utils/createCrossmintApiClient.js +1 -9
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.cjs +1 -8
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.js +1 -8
- package/package.json +8 -8
- package/dist/chunk-2ROLE4XU.cjs +0 -31
- package/dist/chunk-2ROLE4XU.cjs.map +0 -1
- package/dist/chunk-2T2VCED7.js +0 -17
- package/dist/chunk-2T2VCED7.js.map +0 -1
- package/dist/chunk-33WZFL2D.js +0 -80
- package/dist/chunk-33WZFL2D.js.map +0 -1
- package/dist/chunk-35RV5AOT.cjs +0 -70
- package/dist/chunk-35RV5AOT.cjs.map +0 -1
- package/dist/chunk-3J6CUUWT.js +0 -50
- package/dist/chunk-3J6CUUWT.js.map +0 -1
- package/dist/chunk-3KR4GYLF.js +0 -26
- package/dist/chunk-3KR4GYLF.js.map +0 -1
- package/dist/chunk-43P7QWBK.cjs +0 -17
- package/dist/chunk-43P7QWBK.cjs.map +0 -1
- package/dist/chunk-4DAZAO6Y.cjs +0 -59
- package/dist/chunk-4DAZAO6Y.cjs.map +0 -1
- package/dist/chunk-5EE2IAIP.js +0 -87
- package/dist/chunk-5EE2IAIP.js.map +0 -1
- package/dist/chunk-5KK3YQWD.cjs +0 -1
- package/dist/chunk-5KK3YQWD.cjs.map +0 -1
- package/dist/chunk-5RX5WFEW.cjs +0 -11
- package/dist/chunk-5RX5WFEW.cjs.map +0 -1
- package/dist/chunk-5UXGDXPR.js +0 -153
- package/dist/chunk-5UXGDXPR.js.map +0 -1
- package/dist/chunk-6CPZDD6Y.js +0 -29
- package/dist/chunk-6CPZDD6Y.js.map +0 -1
- package/dist/chunk-6EX2VR7S.js +0 -14
- package/dist/chunk-6EX2VR7S.js.map +0 -1
- package/dist/chunk-6FG6NL44.js +0 -30
- package/dist/chunk-6FG6NL44.js.map +0 -1
- package/dist/chunk-6LO4NSRH.cjs +0 -21
- package/dist/chunk-6LO4NSRH.cjs.map +0 -1
- package/dist/chunk-6PPUWTTF.cjs +0 -31
- package/dist/chunk-6PPUWTTF.cjs.map +0 -1
- package/dist/chunk-7BZSIPWM.js +0 -31
- package/dist/chunk-7BZSIPWM.js.map +0 -1
- package/dist/chunk-7KIY6DLW.js +0 -28
- package/dist/chunk-7KIY6DLW.js.map +0 -1
- package/dist/chunk-7SBZ6OIH.js +0 -1
- package/dist/chunk-7SBZ6OIH.js.map +0 -1
- package/dist/chunk-A2JCJ2OV.cjs +0 -119
- package/dist/chunk-A2JCJ2OV.cjs.map +0 -1
- package/dist/chunk-A6Q4Z5TO.js +0 -31
- package/dist/chunk-A6Q4Z5TO.js.map +0 -1
- package/dist/chunk-A7J4DAE7.js +0 -16
- package/dist/chunk-A7J4DAE7.js.map +0 -1
- package/dist/chunk-ATHR4S2P.js +0 -48
- package/dist/chunk-ATHR4S2P.js.map +0 -1
- package/dist/chunk-AUCL5NPW.cjs +0 -31
- package/dist/chunk-AUCL5NPW.cjs.map +0 -1
- package/dist/chunk-AUEQQ4D3.js +0 -119
- package/dist/chunk-AUEQQ4D3.js.map +0 -1
- package/dist/chunk-AXZLLRBU.cjs +0 -26
- package/dist/chunk-AXZLLRBU.cjs.map +0 -1
- package/dist/chunk-B7LYPQ4K.cjs +0 -38
- package/dist/chunk-B7LYPQ4K.cjs.map +0 -1
- package/dist/chunk-BE2ZLB3L.cjs +0 -19
- package/dist/chunk-BE2ZLB3L.cjs.map +0 -1
- package/dist/chunk-BFTVVPCU.js +0 -81
- package/dist/chunk-BFTVVPCU.js.map +0 -1
- package/dist/chunk-BKVDVDKX.cjs +0 -1
- package/dist/chunk-BKVDVDKX.cjs.map +0 -1
- package/dist/chunk-BURUD6IV.cjs +0 -64
- package/dist/chunk-BURUD6IV.cjs.map +0 -1
- package/dist/chunk-C2VARNXL.js +0 -70
- package/dist/chunk-C2VARNXL.js.map +0 -1
- package/dist/chunk-CPYPI45H.js +0 -98
- package/dist/chunk-CPYPI45H.js.map +0 -1
- package/dist/chunk-CRTRMMJ7.js +0 -59
- package/dist/chunk-CRTRMMJ7.js.map +0 -1
- package/dist/chunk-DCMLWFDK.js +0 -31
- package/dist/chunk-DCMLWFDK.js.map +0 -1
- package/dist/chunk-DR67KSE7.js +0 -31
- package/dist/chunk-DR67KSE7.js.map +0 -1
- package/dist/chunk-DZ5MGN25.js +0 -147
- package/dist/chunk-DZ5MGN25.js.map +0 -1
- package/dist/chunk-ENCR5SUW.cjs +0 -51
- package/dist/chunk-ENCR5SUW.cjs.map +0 -1
- package/dist/chunk-EOWJ7775.js +0 -18
- package/dist/chunk-EOWJ7775.js.map +0 -1
- package/dist/chunk-FGHABNQM.js +0 -10
- package/dist/chunk-FGHABNQM.js.map +0 -1
- package/dist/chunk-FKIMKZ4Y.js +0 -17
- package/dist/chunk-FKIMKZ4Y.js.map +0 -1
- package/dist/chunk-GMKTZIU2.cjs +0 -22
- package/dist/chunk-GMKTZIU2.cjs.map +0 -1
- package/dist/chunk-H4F7UVPT.js +0 -34
- package/dist/chunk-H4F7UVPT.js.map +0 -1
- package/dist/chunk-HATQVB6H.js +0 -19
- package/dist/chunk-HATQVB6H.js.map +0 -1
- package/dist/chunk-HCW4RO2O.cjs +0 -29
- package/dist/chunk-HCW4RO2O.cjs.map +0 -1
- package/dist/chunk-HOTEC5UH.js +0 -22
- package/dist/chunk-HOTEC5UH.js.map +0 -1
- package/dist/chunk-HPOZ6I54.cjs +0 -44
- package/dist/chunk-HPOZ6I54.cjs.map +0 -1
- package/dist/chunk-HW2Q6J4R.js +0 -64
- package/dist/chunk-HW2Q6J4R.js.map +0 -1
- package/dist/chunk-HZ26XTTK.cjs +0 -81
- package/dist/chunk-HZ26XTTK.cjs.map +0 -1
- package/dist/chunk-I63FQCIV.js +0 -189
- package/dist/chunk-I63FQCIV.js.map +0 -1
- package/dist/chunk-IP4HQL5I.cjs +0 -147
- package/dist/chunk-IP4HQL5I.cjs.map +0 -1
- package/dist/chunk-IQPA3QOV.js +0 -27
- package/dist/chunk-IQPA3QOV.js.map +0 -1
- package/dist/chunk-K5S6RUJ3.cjs +0 -153
- package/dist/chunk-K5S6RUJ3.cjs.map +0 -1
- package/dist/chunk-KEKBOJCF.cjs +0 -50
- package/dist/chunk-KEKBOJCF.cjs.map +0 -1
- package/dist/chunk-KLWDDALZ.cjs +0 -14
- package/dist/chunk-KLWDDALZ.cjs.map +0 -1
- package/dist/chunk-KNOUJZN5.cjs +0 -32
- package/dist/chunk-KNOUJZN5.cjs.map +0 -1
- package/dist/chunk-L3FKENHU.js +0 -14
- package/dist/chunk-L3FKENHU.js.map +0 -1
- package/dist/chunk-LGY5FQOZ.cjs +0 -29
- package/dist/chunk-LGY5FQOZ.cjs.map +0 -1
- package/dist/chunk-LJA62EVT.cjs +0 -87
- package/dist/chunk-LJA62EVT.cjs.map +0 -1
- package/dist/chunk-MCINXS2Y.cjs +0 -1111
- package/dist/chunk-MCINXS2Y.cjs.map +0 -1
- package/dist/chunk-MH37OJT2.cjs +0 -80
- package/dist/chunk-MH37OJT2.cjs.map +0 -1
- package/dist/chunk-MJHLKJ6X.cjs +0 -212
- package/dist/chunk-MJHLKJ6X.cjs.map +0 -1
- package/dist/chunk-MUS7DUPS.cjs +0 -98
- package/dist/chunk-MUS7DUPS.cjs.map +0 -1
- package/dist/chunk-NMXFWIFA.js +0 -133
- package/dist/chunk-NMXFWIFA.js.map +0 -1
- package/dist/chunk-O53ZB544.js +0 -1111
- package/dist/chunk-O53ZB544.js.map +0 -1
- package/dist/chunk-PBSL6JOF.cjs +0 -17
- package/dist/chunk-PBSL6JOF.cjs.map +0 -1
- package/dist/chunk-PHCGCJSA.js +0 -107
- package/dist/chunk-PHCGCJSA.js.map +0 -1
- package/dist/chunk-Q3M4UH5U.cjs +0 -48
- package/dist/chunk-Q3M4UH5U.cjs.map +0 -1
- package/dist/chunk-QDKAU3H2.js +0 -31
- package/dist/chunk-QDKAU3H2.js.map +0 -1
- package/dist/chunk-QFZ6GZZR.cjs +0 -14
- package/dist/chunk-QFZ6GZZR.cjs.map +0 -1
- package/dist/chunk-QQXBYOKA.cjs +0 -16
- package/dist/chunk-QQXBYOKA.cjs.map +0 -1
- package/dist/chunk-QT7UEJZG.cjs +0 -133
- package/dist/chunk-QT7UEJZG.cjs.map +0 -1
- package/dist/chunk-QTL5I5C2.js +0 -38
- package/dist/chunk-QTL5I5C2.js.map +0 -1
- package/dist/chunk-R6IL3WOE.cjs +0 -31
- package/dist/chunk-R6IL3WOE.cjs.map +0 -1
- package/dist/chunk-RZPQIRIY.js +0 -11
- package/dist/chunk-RZPQIRIY.js.map +0 -1
- package/dist/chunk-RZT2J42J.js +0 -29
- package/dist/chunk-RZT2J42J.js.map +0 -1
- package/dist/chunk-SBA6FMFT.cjs +0 -18
- package/dist/chunk-SBA6FMFT.cjs.map +0 -1
- package/dist/chunk-SBTNHVSD.cjs +0 -30
- package/dist/chunk-SBTNHVSD.cjs.map +0 -1
- package/dist/chunk-SZA3XDJ5.cjs +0 -1
- package/dist/chunk-SZA3XDJ5.cjs.map +0 -1
- package/dist/chunk-TH42AO6J.js +0 -17
- package/dist/chunk-TH42AO6J.js.map +0 -1
- package/dist/chunk-U7LXB3SM.js +0 -50
- package/dist/chunk-U7LXB3SM.js.map +0 -1
- package/dist/chunk-UASNCH3A.cjs +0 -27
- package/dist/chunk-UASNCH3A.cjs.map +0 -1
- package/dist/chunk-UGHW5HMB.cjs +0 -31
- package/dist/chunk-UGHW5HMB.cjs.map +0 -1
- package/dist/chunk-UQAKJ4T7.cjs +0 -29
- package/dist/chunk-UQAKJ4T7.cjs.map +0 -1
- package/dist/chunk-URKPLEPV.cjs +0 -189
- package/dist/chunk-URKPLEPV.cjs.map +0 -1
- package/dist/chunk-VZIXXIU5.js +0 -32
- package/dist/chunk-VZIXXIU5.js.map +0 -1
- package/dist/chunk-XDJ6F7N4.cjs +0 -107
- package/dist/chunk-XDJ6F7N4.cjs.map +0 -1
- package/dist/chunk-XEZF7G64.js +0 -212
- package/dist/chunk-XEZF7G64.js.map +0 -1
- package/dist/chunk-XXJ7LQ44.js +0 -1
- package/dist/chunk-XXJ7LQ44.js.map +0 -1
- package/dist/chunk-XYMYRPVT.js +0 -1
- package/dist/chunk-XYMYRPVT.js.map +0 -1
- package/dist/chunk-Y3SUMTUI.cjs +0 -10
- package/dist/chunk-Y3SUMTUI.cjs.map +0 -1
- package/dist/chunk-YE55IKBP.cjs +0 -34
- package/dist/chunk-YE55IKBP.cjs.map +0 -1
- package/dist/chunk-YNBGMNE6.cjs +0 -17
- package/dist/chunk-YNBGMNE6.cjs.map +0 -1
- package/dist/chunk-YWVQCHQF.js +0 -51
- package/dist/chunk-YWVQCHQF.js.map +0 -1
- package/dist/chunk-ZDQGQY7Z.js +0 -29
- package/dist/chunk-ZDQGQY7Z.js.map +0 -1
- package/dist/chunk-ZIHCLVCD.js +0 -44
- package/dist/chunk-ZIHCLVCD.js.map +0 -1
- package/dist/chunk-ZJC4OB5Z.cjs +0 -50
- package/dist/chunk-ZJC4OB5Z.cjs.map +0 -1
- package/dist/chunk-ZMSST6ZZ.cjs +0 -28
- package/dist/chunk-ZMSST6ZZ.cjs.map +0 -1
- package/dist/chunk-ZUIS3FET.js +0 -21
- package/dist/chunk-ZUIS3FET.js.map +0 -1
- package/dist/components/CrossmintNFTCollectionView.cjs.map +0 -1
- package/dist/components/CrossmintNFTCollectionView.js.map +0 -1
- package/dist/components/CrossmintNFTDetail.cjs.map +0 -1
- package/dist/components/CrossmintNFTDetail.js.map +0 -1
- package/dist/components/auth/AuthForm.cjs.map +0 -1
- package/dist/components/auth/AuthForm.js.map +0 -1
- package/dist/components/auth/AuthFormBackButton.cjs.map +0 -1
- package/dist/components/auth/AuthFormBackButton.js.map +0 -1
- package/dist/components/auth/AuthFormDialog.cjs.map +0 -1
- package/dist/components/auth/AuthFormDialog.js.map +0 -1
- package/dist/components/auth/EmbeddedAuthForm.cjs.map +0 -1
- package/dist/components/auth/EmbeddedAuthForm.js.map +0 -1
- package/dist/components/auth/PasskeyPrompt.cjs.map +0 -1
- package/dist/components/auth/PasskeyPrompt.js.map +0 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs.map +0 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.js.map +0 -1
- package/dist/components/auth/methods/email/EmailOTPInput.cjs.map +0 -1
- package/dist/components/auth/methods/email/EmailOTPInput.js.map +0 -1
- package/dist/components/auth/methods/email/EmailSignIn.cjs.map +0 -1
- package/dist/components/auth/methods/email/EmailSignIn.js.map +0 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs.map +0 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js.map +0 -1
- package/dist/components/auth/methods/google/GoogleSignIn.cjs.map +0 -1
- package/dist/components/auth/methods/google/GoogleSignIn.js.map +0 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs.map +0 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.js.map +0 -1
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs.map +0 -1
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.js.map +0 -1
- package/dist/components/auth/methods/web3/Web3Connector.cjs.map +0 -1
- package/dist/components/auth/methods/web3/Web3Connector.js.map +0 -1
- package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs.map +0 -1
- package/dist/components/auth/methods/web3/Web3ConnectorButton.js.map +0 -1
- package/dist/components/auth/methods/web3/Web3Connectors.cjs.map +0 -1
- package/dist/components/auth/methods/web3/Web3Connectors.js.map +0 -1
- package/dist/components/common/Dialog.cjs.map +0 -1
- package/dist/components/common/Dialog.js.map +0 -1
- package/dist/components/common/Divider.cjs.map +0 -1
- package/dist/components/common/Divider.js.map +0 -1
- package/dist/components/common/InputOTP.cjs.map +0 -1
- package/dist/components/common/InputOTP.js.map +0 -1
- package/dist/components/common/PoweredByCrossmint.cjs.map +0 -1
- package/dist/components/common/PoweredByCrossmint.js.map +0 -1
- package/dist/components/common/Spinner.cjs.map +0 -1
- package/dist/components/common/Spinner.js.map +0 -1
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs.map +0 -1
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js.map +0 -1
- package/dist/components/embed/EmbeddedCheckoutIFrame.cjs.map +0 -1
- package/dist/components/embed/EmbeddedCheckoutIFrame.js.map +0 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs.map +0 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js.map +0 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs.map +0 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js.map +0 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs.map +0 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.js.map +0 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs.map +0 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js.map +0 -1
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs.map +0 -1
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.js.map +0 -1
- package/dist/components/embed/index.cjs.map +0 -1
- package/dist/components/embed/index.js.map +0 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs.map +0 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js.map +0 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs.map +0 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js.map +0 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs.map +0 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js.map +0 -1
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs.map +0 -1
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js.map +0 -1
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs.map +0 -1
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js.map +0 -1
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs.map +0 -1
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js.map +0 -1
- package/dist/components/embed/v3/index.cjs.map +0 -1
- package/dist/components/embed/v3/index.js.map +0 -1
- package/dist/components/hosted/CrossmintPayButton.cjs.map +0 -1
- package/dist/components/hosted/CrossmintPayButton.js.map +0 -1
- package/dist/components/hosted/index.cjs.map +0 -1
- package/dist/components/hosted/index.js.map +0 -1
- package/dist/components/hosted/styles.cjs.map +0 -1
- package/dist/components/hosted/styles.js.map +0 -1
- package/dist/components/index.cjs.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/consts/version.cjs.map +0 -1
- package/dist/consts/version.js.map +0 -1
- package/dist/hooks/index.cjs.map +0 -1
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/useAuth.cjs.map +0 -1
- package/dist/hooks/useAuth.js.map +0 -1
- package/dist/hooks/useCrossmint.cjs.map +0 -1
- package/dist/hooks/useCrossmint.js.map +0 -1
- package/dist/hooks/useCrossmintAuth.cjs.map +0 -1
- package/dist/hooks/useCrossmintAuth.js.map +0 -1
- package/dist/hooks/useCrossmintCheckout.cjs.map +0 -1
- package/dist/hooks/useCrossmintCheckout.js.map +0 -1
- package/dist/hooks/useDeepEffect.cjs.map +0 -1
- package/dist/hooks/useDeepEffect.js.map +0 -1
- package/dist/hooks/useEnvironment.cjs.map +0 -1
- package/dist/hooks/useEnvironment.js.map +0 -1
- package/dist/hooks/useOAuthWindowListener.cjs.map +0 -1
- package/dist/hooks/useOAuthWindowListener.js.map +0 -1
- package/dist/hooks/useWallet.cjs.map +0 -1
- package/dist/hooks/useWallet.js.map +0 -1
- package/dist/icons/alert.cjs.map +0 -1
- package/dist/icons/alert.js.map +0 -1
- package/dist/icons/base64Icons.cjs.map +0 -1
- package/dist/icons/base64Icons.js.map +0 -1
- package/dist/icons/chevronRight.cjs.map +0 -1
- package/dist/icons/chevronRight.js.map +0 -1
- package/dist/icons/discord.cjs.map +0 -1
- package/dist/icons/discord.js.map +0 -1
- package/dist/icons/emailOTP.cjs.map +0 -1
- package/dist/icons/emailOTP.js.map +0 -1
- package/dist/icons/farcaster.cjs.map +0 -1
- package/dist/icons/farcaster.js.map +0 -1
- package/dist/icons/fingerprint.cjs.map +0 -1
- package/dist/icons/fingerprint.js.map +0 -1
- package/dist/icons/google.cjs.map +0 -1
- package/dist/icons/google.js.map +0 -1
- package/dist/icons/leftArrow.cjs.map +0 -1
- package/dist/icons/leftArrow.js.map +0 -1
- package/dist/icons/passkey.cjs.map +0 -1
- package/dist/icons/passkey.js.map +0 -1
- package/dist/icons/passkeyPromptLogo.cjs.map +0 -1
- package/dist/icons/passkeyPromptLogo.js.map +0 -1
- package/dist/icons/poweredByLeaf.cjs.map +0 -1
- package/dist/icons/poweredByLeaf.js.map +0 -1
- package/dist/icons/wallet.cjs.map +0 -1
- package/dist/icons/wallet.js.map +0 -1
- package/dist/icons/x.cjs.map +0 -1
- package/dist/icons/x.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/providers/CrossmintAuthProvider.cjs.map +0 -1
- package/dist/providers/CrossmintAuthProvider.js.map +0 -1
- package/dist/providers/CrossmintWalletProvider.cjs.map +0 -1
- package/dist/providers/CrossmintWalletProvider.js.map +0 -1
- package/dist/providers/TwindProvider.cjs.map +0 -1
- package/dist/providers/TwindProvider.js.map +0 -1
- package/dist/providers/auth/AuthFormProvider.cjs.map +0 -1
- package/dist/providers/auth/AuthFormProvider.js.map +0 -1
- package/dist/providers/auth/FarcasterProvider.cjs.map +0 -1
- package/dist/providers/auth/FarcasterProvider.js.map +0 -1
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.cjs.map +0 -1
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.js.map +0 -1
- package/dist/providers/index.cjs.map +0 -1
- package/dist/providers/index.js.map +0 -1
- package/dist/testUtils.cjs.map +0 -1
- package/dist/testUtils.js.map +0 -1
- package/dist/twind.config.cjs.map +0 -1
- package/dist/twind.config.js.map +0 -1
- package/dist/types/auth.cjs.map +0 -1
- package/dist/types/auth.js.map +0 -1
- package/dist/utils/classNames.cjs.map +0 -1
- package/dist/utils/classNames.js.map +0 -1
- package/dist/utils/createCrossmintApiClient.cjs.map +0 -1
- package/dist/utils/createCrossmintApiClient.js.map +0 -1
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.cjs.map +0 -1
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.js.map +0 -1
- package/src/components/CrossmintCollectionView.test.tsx +0 -36
- package/src/components/CrossmintNFTCollectionView.tsx +0 -25
- package/src/components/CrossmintNFTDetail.test.tsx +0 -38
- package/src/components/CrossmintNFTDetail.tsx +0 -25
- package/src/components/auth/AuthForm.tsx +0 -84
- package/src/components/auth/AuthFormBackButton.tsx +0 -30
- package/src/components/auth/AuthFormDialog.tsx +0 -38
- package/src/components/auth/EmbeddedAuthForm.tsx +0 -5
- package/src/components/auth/PasskeyPrompt.tsx +0 -258
- package/src/components/auth/methods/email/EmailAuthFlow.tsx +0 -19
- package/src/components/auth/methods/email/EmailOTPInput.tsx +0 -124
- package/src/components/auth/methods/email/EmailSignIn.tsx +0 -110
- package/src/components/auth/methods/farcaster/FarcasterSignIn.tsx +0 -169
- package/src/components/auth/methods/google/GoogleSignIn.tsx +0 -53
- package/src/components/auth/methods/web3/Web3AuthFlow.tsx +0 -35
- package/src/components/auth/methods/web3/Web3AuthFlowButton.tsx +0 -44
- package/src/components/auth/methods/web3/Web3Connector.tsx +0 -62
- package/src/components/auth/methods/web3/Web3ConnectorButton.tsx +0 -38
- package/src/components/auth/methods/web3/Web3Connectors.tsx +0 -28
- package/src/components/common/Dialog.tsx +0 -122
- package/src/components/common/Divider.tsx +0 -25
- package/src/components/common/InputOTP.tsx +0 -94
- package/src/components/common/PoweredByCrossmint.tsx +0 -10
- package/src/components/common/Spinner.tsx +0 -22
- package/src/components/dynamic-xyz/DynamicContextProviderWrapper.tsx +0 -31
- package/src/components/embed/CrossmintPaymentElement.test.tsx +0 -79
- package/src/components/embed/EmbeddedCheckoutIFrame.tsx +0 -71
- package/src/components/embed/crypto/CryptoEmbeddedCheckout.tsx +0 -11
- package/src/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.tsx +0 -108
- package/src/components/embed/fiat/FiatEmbeddedCheckout.tsx +0 -7
- package/src/components/embed/fiat/FiatEmbeddedCheckoutIFrame.tsx +0 -21
- package/src/components/embed/fiat/FiatPaymentElement_OLD.tsx +0 -73
- package/src/components/embed/index.tsx +0 -19
- package/src/components/embed/v3/CrossmintEmbeddedCheckoutV3.tsx +0 -7
- package/src/components/embed/v3/EmbeddedCheckoutV3IFrame.tsx +0 -83
- package/src/components/embed/v3/crypto/CryptoWalletConnectionHandler.tsx +0 -144
- package/src/components/embed/v3/crypto/utils/handleEvmTransaction.ts +0 -78
- package/src/components/embed/v3/crypto/utils/handleSendTransaction.ts +0 -29
- package/src/components/embed/v3/crypto/utils/handleSolanaTransaction.ts +0 -54
- package/src/components/embed/v3/index.ts +0 -1
- package/src/components/hosted/CrossmintPayButton.test.tsx +0 -188
- package/src/components/hosted/CrossmintPayButton.tsx +0 -132
- package/src/components/hosted/index.ts +0 -1
- package/src/components/hosted/styles.ts +0 -58
- package/src/components/index.ts +0 -8
- package/src/consts/version.ts +0 -3
- package/src/hooks/index.ts +0 -4
- package/src/hooks/useAuth.ts +0 -11
- package/src/hooks/useCrossmint.test.tsx +0 -103
- package/src/hooks/useCrossmint.tsx +0 -57
- package/src/hooks/useCrossmintAuth.ts +0 -12
- package/src/hooks/useCrossmintCheckout.tsx +0 -56
- package/src/hooks/useDeepEffect.ts +0 -15
- package/src/hooks/useEnvironment.ts +0 -10
- package/src/hooks/useOAuthWindowListener.ts +0 -84
- package/src/hooks/useWallet.ts +0 -13
- package/src/icons/alert.tsx +0 -19
- package/src/icons/base64Icons.ts +0 -8
- package/src/icons/chevronRight.tsx +0 -21
- package/src/icons/discord.tsx +0 -18
- package/src/icons/emailOTP.tsx +0 -147
- package/src/icons/farcaster.tsx +0 -26
- package/src/icons/fingerprint.tsx +0 -25
- package/src/icons/google.tsx +0 -30
- package/src/icons/leftArrow.tsx +0 -20
- package/src/icons/passkey.tsx +0 -18
- package/src/icons/passkeyPromptLogo.tsx +0 -76
- package/src/icons/poweredByLeaf.tsx +0 -85
- package/src/icons/wallet.tsx +0 -23
- package/src/icons/x.tsx +0 -19
- package/src/index.ts +0 -23
- package/src/providers/CrossmintAuthProvider.test.tsx +0 -269
- package/src/providers/CrossmintAuthProvider.tsx +0 -211
- package/src/providers/CrossmintWalletProvider.test.tsx +0 -218
- package/src/providers/CrossmintWalletProvider.tsx +0 -155
- package/src/providers/TwindProvider.tsx +0 -14
- package/src/providers/auth/AuthFormProvider.test.tsx +0 -142
- package/src/providers/auth/AuthFormProvider.tsx +0 -109
- package/src/providers/auth/FarcasterProvider.tsx +0 -12
- package/src/providers/auth/web3/DynamicWeb3WalletConnect.tsx +0 -73
- package/src/providers/index.ts +0 -2
- package/src/testUtils.ts +0 -1
- package/src/twind.config.ts +0 -114
- package/src/types/auth.ts +0 -4
- package/src/utils/classNames.ts +0 -12
- package/src/utils/createCrossmintApiClient.ts +0 -17
- package/src/utils/dynamic/dynamicChainToCrossmintChain.ts +0 -20
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
|
2
|
-
import { useAuthForm } from "@/providers/auth/AuthFormProvider";
|
|
3
|
-
import { AuthForm } from "./AuthForm";
|
|
4
|
-
import { Dialog, DialogContent, DialogDescription, DialogTitle } from "../common/Dialog";
|
|
5
|
-
import { useEffect } from "react";
|
|
6
|
-
|
|
7
|
-
export default function AuthFormDialog({ open }: { open: boolean }) {
|
|
8
|
-
const { appearance, setDialogOpen } = useAuthForm();
|
|
9
|
-
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
document.body.style.overflow = open ? "hidden" : "";
|
|
12
|
-
}, [open]);
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<Dialog modal={false} open={open} onOpenChange={setDialogOpen}>
|
|
16
|
-
<DialogContent
|
|
17
|
-
onInteractOutside={(e) => e.preventDefault()}
|
|
18
|
-
onOpenAutoFocus={(e) => e.preventDefault()}
|
|
19
|
-
closeButtonColor={appearance?.colors?.textPrimary}
|
|
20
|
-
closeButtonRingColor={appearance?.colors?.accent}
|
|
21
|
-
className="cm-responsive-border-radius-auth-dialog !p-0 !min-[480px]:p-0"
|
|
22
|
-
style={{
|
|
23
|
-
borderRadius: appearance?.borderRadius,
|
|
24
|
-
backgroundColor: appearance?.colors?.background,
|
|
25
|
-
}}
|
|
26
|
-
>
|
|
27
|
-
<VisuallyHidden asChild>
|
|
28
|
-
<DialogTitle>Crossmint Auth</DialogTitle>
|
|
29
|
-
</VisuallyHidden>
|
|
30
|
-
<VisuallyHidden asChild>
|
|
31
|
-
<DialogDescription>Sign in via Crossmint</DialogDescription>
|
|
32
|
-
</VisuallyHidden>
|
|
33
|
-
|
|
34
|
-
<AuthForm className="max-w-[448px]" />
|
|
35
|
-
</DialogContent>
|
|
36
|
-
</Dialog>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { Button, Dialog, Transition } from "@headlessui/react";
|
|
2
|
-
import { type CSSProperties, Fragment, type ReactNode } from "react";
|
|
3
|
-
import type { UIConfig } from "@crossmint/common-sdk-base";
|
|
4
|
-
|
|
5
|
-
import FingerprintIcon from "../../icons/fingerprint";
|
|
6
|
-
import PasskeyIcon from "../../icons/passkey";
|
|
7
|
-
import PasskeyPromptLogo from "../../icons/passkeyPromptLogo";
|
|
8
|
-
import { PoweredByCrossmint } from "../common/PoweredByCrossmint";
|
|
9
|
-
import { classNames } from "@/utils/classNames";
|
|
10
|
-
|
|
11
|
-
type PasskeyPromptCoreProps = {
|
|
12
|
-
title: string;
|
|
13
|
-
content: ReactNode;
|
|
14
|
-
primaryButton: ReactNode;
|
|
15
|
-
secondaryAction?: ReactNode;
|
|
16
|
-
appearance?: UIConfig;
|
|
17
|
-
};
|
|
18
|
-
function PasskeyPromptCore({ title, content, primaryButton, secondaryAction, appearance }: PasskeyPromptCoreProps) {
|
|
19
|
-
return (
|
|
20
|
-
<Dialog
|
|
21
|
-
open
|
|
22
|
-
onClose={() => {}}
|
|
23
|
-
className={classNames("fixed inset-0 z-20 flex items-center justify-center overflow-y-auto")}
|
|
24
|
-
>
|
|
25
|
-
{/* This is a hacky workaround to have the foreground transparent styles to work. */}
|
|
26
|
-
<Transition.Child
|
|
27
|
-
as={Fragment}
|
|
28
|
-
enter="ease-out duration-400"
|
|
29
|
-
enterFrom="opacity-0"
|
|
30
|
-
enterTo="opacity-100"
|
|
31
|
-
leave="ease-in duration-400"
|
|
32
|
-
leaveFrom="opacity-100"
|
|
33
|
-
leaveTo="opacity-0"
|
|
34
|
-
>
|
|
35
|
-
<div
|
|
36
|
-
className={classNames(
|
|
37
|
-
"fixed inset-0 bg-[rgba(139,151,151,0.2)] backdrop-blur-[2px] transition-opacity duration-300 ease-in-out -z-10"
|
|
38
|
-
)}
|
|
39
|
-
/>
|
|
40
|
-
</Transition.Child>
|
|
41
|
-
<div
|
|
42
|
-
style={{
|
|
43
|
-
display: "flex",
|
|
44
|
-
flexDirection: "column",
|
|
45
|
-
alignItems: "center",
|
|
46
|
-
width: "100%",
|
|
47
|
-
maxWidth: "28rem",
|
|
48
|
-
borderRadius: "1rem",
|
|
49
|
-
boxShadow: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
50
|
-
zIndex: 30,
|
|
51
|
-
border: "1px solid",
|
|
52
|
-
backgroundColor: appearance?.colors?.background || "white",
|
|
53
|
-
borderColor: appearance?.colors?.border || "#D0D5DD",
|
|
54
|
-
}}
|
|
55
|
-
onClick={(e) => e.stopPropagation()}
|
|
56
|
-
>
|
|
57
|
-
<div className="pt-12 pb-10 px-8">
|
|
58
|
-
<div className="flex justify-center left-1.5 relative">
|
|
59
|
-
<PasskeyPromptLogo appearance={appearance} />
|
|
60
|
-
</div>
|
|
61
|
-
<div className="flex justify-center">
|
|
62
|
-
<p
|
|
63
|
-
style={{
|
|
64
|
-
fontSize: "1.125rem",
|
|
65
|
-
lineHeight: "1.75rem",
|
|
66
|
-
fontWeight: "bold",
|
|
67
|
-
color: appearance?.colors?.textPrimary || "#20343E",
|
|
68
|
-
}}
|
|
69
|
-
>
|
|
70
|
-
{title}
|
|
71
|
-
</p>
|
|
72
|
-
</div>
|
|
73
|
-
<div className="mt-4 mb-9">
|
|
74
|
-
<div
|
|
75
|
-
style={{
|
|
76
|
-
fontWeight: "normal",
|
|
77
|
-
color: appearance?.colors?.textSecondary || "#67797F",
|
|
78
|
-
}}
|
|
79
|
-
>
|
|
80
|
-
{content}
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
<div className="flex flex-col gap-4 justify-center">
|
|
84
|
-
{primaryButton}
|
|
85
|
-
{secondaryAction}
|
|
86
|
-
</div>
|
|
87
|
-
<div className="flex justify-center pt-4">
|
|
88
|
-
<PoweredByCrossmint color={appearance?.colors?.textSecondary} />
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
</Dialog>
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
type PromptType = "create-wallet" | "transaction" | "not-supported" | "create-wallet-error" | "transaction-error";
|
|
97
|
-
|
|
98
|
-
type PasskeyPromptProps = {
|
|
99
|
-
state: {
|
|
100
|
-
type: PromptType;
|
|
101
|
-
primaryActionOnClick: () => void;
|
|
102
|
-
secondaryActionOnClick?: () => void;
|
|
103
|
-
};
|
|
104
|
-
appearance?: UIConfig;
|
|
105
|
-
};
|
|
106
|
-
export function PasskeyPrompt({ state, appearance }: PasskeyPromptProps) {
|
|
107
|
-
// These components are currently assembled based on the mockups.
|
|
108
|
-
switch (state.type) {
|
|
109
|
-
case "create-wallet":
|
|
110
|
-
return (
|
|
111
|
-
<PasskeyPromptCore
|
|
112
|
-
title="Create Your Wallet"
|
|
113
|
-
appearance={appearance}
|
|
114
|
-
content={
|
|
115
|
-
<>
|
|
116
|
-
<div className="mb-4">You're about to create a wallet.</div>
|
|
117
|
-
<div className="flex flex-col gap-2">
|
|
118
|
-
<div className="flex gap-2">
|
|
119
|
-
<div>
|
|
120
|
-
<PasskeyIcon />
|
|
121
|
-
</div>
|
|
122
|
-
Your wallet will be secured with a passkey
|
|
123
|
-
</div>
|
|
124
|
-
|
|
125
|
-
<div className="flex gap-2">
|
|
126
|
-
<div>
|
|
127
|
-
<FingerprintIcon />
|
|
128
|
-
</div>
|
|
129
|
-
Your device will ask you for your fingerprint, face, or screen lock to set it up
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
</>
|
|
133
|
-
}
|
|
134
|
-
primaryButton={
|
|
135
|
-
<Button style={primaryButtonStyles(appearance)} onClick={state.primaryActionOnClick}>
|
|
136
|
-
Create Wallet
|
|
137
|
-
</Button>
|
|
138
|
-
}
|
|
139
|
-
/>
|
|
140
|
-
);
|
|
141
|
-
|
|
142
|
-
case "create-wallet-error":
|
|
143
|
-
return (
|
|
144
|
-
<PasskeyPromptCore
|
|
145
|
-
title="Wallet Creation Failed"
|
|
146
|
-
appearance={appearance}
|
|
147
|
-
content={
|
|
148
|
-
<div className="mb-6">
|
|
149
|
-
We couldn't create your wallet. This could be due to rejecting the request, a timeout, or
|
|
150
|
-
not having access to your passkey on this device.
|
|
151
|
-
</div>
|
|
152
|
-
}
|
|
153
|
-
primaryButton={
|
|
154
|
-
<Button style={primaryButtonStyles(appearance)} onClick={state.primaryActionOnClick}>
|
|
155
|
-
Try again
|
|
156
|
-
</Button>
|
|
157
|
-
}
|
|
158
|
-
/>
|
|
159
|
-
);
|
|
160
|
-
|
|
161
|
-
case "transaction":
|
|
162
|
-
return (
|
|
163
|
-
<PasskeyPromptCore
|
|
164
|
-
title="First Time Using Your Wallet"
|
|
165
|
-
appearance={appearance}
|
|
166
|
-
content={
|
|
167
|
-
<div className="flex flex-col gap-2">
|
|
168
|
-
<div className="flex gap-2">
|
|
169
|
-
<div>
|
|
170
|
-
<FingerprintIcon />
|
|
171
|
-
</div>
|
|
172
|
-
<span>
|
|
173
|
-
Your device will ask you for your fingerprint, face, or screen lock to authorize
|
|
174
|
-
this action.
|
|
175
|
-
</span>
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
}
|
|
179
|
-
primaryButton={
|
|
180
|
-
<Button style={primaryButtonStyles(appearance)} onClick={state.primaryActionOnClick}>
|
|
181
|
-
Use Wallet
|
|
182
|
-
</Button>
|
|
183
|
-
}
|
|
184
|
-
/>
|
|
185
|
-
);
|
|
186
|
-
|
|
187
|
-
case "transaction-error":
|
|
188
|
-
return (
|
|
189
|
-
<PasskeyPromptCore
|
|
190
|
-
title="Wallet Access Failed"
|
|
191
|
-
appearance={appearance}
|
|
192
|
-
content={
|
|
193
|
-
<div className="mb-6">
|
|
194
|
-
We couldn't access your wallet. This could be due to rejecting the request, a timeout, or
|
|
195
|
-
not having access to your passkey on this device.
|
|
196
|
-
</div>
|
|
197
|
-
}
|
|
198
|
-
primaryButton={
|
|
199
|
-
<Button style={primaryButtonStyles(appearance)} onClick={state.primaryActionOnClick}>
|
|
200
|
-
Try again
|
|
201
|
-
</Button>
|
|
202
|
-
}
|
|
203
|
-
secondaryAction={
|
|
204
|
-
<a
|
|
205
|
-
href="https://docs.crossmint.com/wallets/smart-wallets/users/troubleshoot"
|
|
206
|
-
rel="noopener noreferrer"
|
|
207
|
-
target="_blank"
|
|
208
|
-
style={{
|
|
209
|
-
padding: "0.875rem",
|
|
210
|
-
width: "100%",
|
|
211
|
-
textAlign: "center",
|
|
212
|
-
textDecoration: "none",
|
|
213
|
-
borderRadius: "0.5rem",
|
|
214
|
-
fontWeight: "bold",
|
|
215
|
-
backgroundColor: appearance?.colors?.inputBackground || "#F0F2F4",
|
|
216
|
-
color: appearance?.colors?.textSecondary || "#00150D",
|
|
217
|
-
}}
|
|
218
|
-
>
|
|
219
|
-
Troubleshoot
|
|
220
|
-
</a>
|
|
221
|
-
}
|
|
222
|
-
/>
|
|
223
|
-
);
|
|
224
|
-
|
|
225
|
-
case "not-supported":
|
|
226
|
-
return (
|
|
227
|
-
<PasskeyPromptCore
|
|
228
|
-
title="Passkeys Not Supported on This Device"
|
|
229
|
-
appearance={appearance}
|
|
230
|
-
content={
|
|
231
|
-
<div className="mb-6">
|
|
232
|
-
To access your wallet with a passkey, switch to a device or browser that supports passkeys,
|
|
233
|
-
such as Chrome or Safari on a smartphone, tablet, or modern computer
|
|
234
|
-
</div>
|
|
235
|
-
}
|
|
236
|
-
primaryButton={
|
|
237
|
-
<Button style={primaryButtonStyles(appearance)} onClick={state.primaryActionOnClick}>
|
|
238
|
-
Understood
|
|
239
|
-
</Button>
|
|
240
|
-
}
|
|
241
|
-
/>
|
|
242
|
-
);
|
|
243
|
-
|
|
244
|
-
default:
|
|
245
|
-
return null;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
const primaryButtonStyles = (appearance?: UIConfig): CSSProperties => ({
|
|
250
|
-
padding: "0.875rem",
|
|
251
|
-
width: "100%",
|
|
252
|
-
backgroundColor: appearance?.colors?.buttonBackground ?? "#04AA6D",
|
|
253
|
-
color: appearance?.colors?.textPrimary ?? "white",
|
|
254
|
-
borderRadius: appearance?.borderRadius ?? "8px",
|
|
255
|
-
borderColor: appearance?.colors?.border ?? "#04AA6D",
|
|
256
|
-
borderWidth: "1px",
|
|
257
|
-
fontWeight: "bold",
|
|
258
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { EmailOTPInput } from "./EmailOTPInput";
|
|
3
|
-
import { EmailSignIn } from "./EmailSignIn";
|
|
4
|
-
import { useAuthForm } from "@/providers/auth/AuthFormProvider";
|
|
5
|
-
import type { OtpEmailPayload } from "@/types/auth";
|
|
6
|
-
|
|
7
|
-
export function EmailAuthFlow() {
|
|
8
|
-
const { step } = useAuthForm();
|
|
9
|
-
const [otpEmailData, setOtpEmailData] = useState<OtpEmailPayload | null>(null);
|
|
10
|
-
|
|
11
|
-
if (step === "otp") {
|
|
12
|
-
return <EmailOTPInput otpEmailData={otpEmailData} setOtpEmailData={setOtpEmailData} />;
|
|
13
|
-
}
|
|
14
|
-
if (step === "initial") {
|
|
15
|
-
return <EmailSignIn setOtpEmailData={setOtpEmailData} />;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { InputOTP, InputOTPGroup, InputOTPSlot } from "@/components/common/InputOTP";
|
|
3
|
-
import { EmailOtpIcon } from "@/icons/emailOTP";
|
|
4
|
-
import { useAuthForm } from "@/providers/auth/AuthFormProvider";
|
|
5
|
-
import type { OtpEmailPayload } from "@/types/auth";
|
|
6
|
-
import { AuthFormBackButton } from "../../AuthFormBackButton";
|
|
7
|
-
import { useCrossmintAuth } from "@/hooks/useCrossmintAuth";
|
|
8
|
-
|
|
9
|
-
export const EMAIL_VERIFICATION_TOKEN_LENGTH = 6;
|
|
10
|
-
|
|
11
|
-
export function EmailOTPInput({
|
|
12
|
-
otpEmailData,
|
|
13
|
-
setOtpEmailData,
|
|
14
|
-
}: { otpEmailData: OtpEmailPayload | null; setOtpEmailData: (data: OtpEmailPayload | null) => void }) {
|
|
15
|
-
const { crossmintAuth } = useCrossmintAuth();
|
|
16
|
-
const { appearance, setDialogOpen, setStep, setError } = useAuthForm();
|
|
17
|
-
|
|
18
|
-
const [token, setToken] = useState("");
|
|
19
|
-
const [hasError, setHasError] = useState(false);
|
|
20
|
-
const [loading, setLoading] = useState(false);
|
|
21
|
-
|
|
22
|
-
const handleOnSubmit = async () => {
|
|
23
|
-
setLoading(true);
|
|
24
|
-
try {
|
|
25
|
-
const oneTimeSecret = await crossmintAuth?.confirmEmailOtp(
|
|
26
|
-
otpEmailData?.email ?? "",
|
|
27
|
-
otpEmailData?.emailId ?? "",
|
|
28
|
-
token
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
await crossmintAuth?.handleRefreshAuthMaterial(oneTimeSecret as string);
|
|
32
|
-
setDialogOpen(false);
|
|
33
|
-
setStep("initial");
|
|
34
|
-
} catch (error) {
|
|
35
|
-
console.error("Error confirming email OTP", error);
|
|
36
|
-
setError("Invalid code. Please try again.");
|
|
37
|
-
setHasError(true);
|
|
38
|
-
} finally {
|
|
39
|
-
setLoading(false);
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const handleOnBack = () => {
|
|
44
|
-
setStep("initial");
|
|
45
|
-
setOtpEmailData(null);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<div>
|
|
50
|
-
<AuthFormBackButton
|
|
51
|
-
onClick={handleOnBack}
|
|
52
|
-
iconColor={appearance?.colors?.textPrimary}
|
|
53
|
-
ringColor={appearance?.colors?.accent}
|
|
54
|
-
/>
|
|
55
|
-
|
|
56
|
-
<div className="flex flex-col items-center justify-start w-full">
|
|
57
|
-
<div className="relative left-3">
|
|
58
|
-
<EmailOtpIcon
|
|
59
|
-
customAccentColor={appearance?.colors?.accent}
|
|
60
|
-
customButtonBackgroundColor={appearance?.colors?.buttonBackground}
|
|
61
|
-
customBackgroundColor={appearance?.colors?.background}
|
|
62
|
-
/>
|
|
63
|
-
</div>
|
|
64
|
-
<p
|
|
65
|
-
className="text-base font-normal mt-4 mb-1 text-center text-cm-text-primary"
|
|
66
|
-
style={{ color: appearance?.colors?.textPrimary }}
|
|
67
|
-
>
|
|
68
|
-
{"Check your email"}
|
|
69
|
-
</p>
|
|
70
|
-
<p
|
|
71
|
-
className="text-center text-cm-text-secondary px-4"
|
|
72
|
-
style={{ color: appearance?.colors?.textSecondary }}
|
|
73
|
-
>
|
|
74
|
-
{"A temporary login code has been sent to your email"}
|
|
75
|
-
</p>
|
|
76
|
-
<div className="py-8">
|
|
77
|
-
<InputOTP
|
|
78
|
-
maxLength={EMAIL_VERIFICATION_TOKEN_LENGTH}
|
|
79
|
-
value={token}
|
|
80
|
-
onChange={(val) => {
|
|
81
|
-
setToken(val);
|
|
82
|
-
setHasError(false);
|
|
83
|
-
setError(null);
|
|
84
|
-
}}
|
|
85
|
-
onComplete={handleOnSubmit}
|
|
86
|
-
disabled={loading}
|
|
87
|
-
customStyles={{
|
|
88
|
-
accent: appearance?.colors?.accent ?? "#04AA6D",
|
|
89
|
-
danger: appearance?.colors?.danger ?? "#f44336",
|
|
90
|
-
border: appearance?.colors?.border ?? "#E5E7EB",
|
|
91
|
-
textPrimary: appearance?.colors?.textPrimary ?? "#909ca3",
|
|
92
|
-
buttonBackground: appearance?.colors?.buttonBackground ?? "#eff6ff",
|
|
93
|
-
inputBackground: appearance?.colors?.inputBackground ?? "#FFFFFF",
|
|
94
|
-
borderRadius: appearance?.borderRadius,
|
|
95
|
-
}}
|
|
96
|
-
>
|
|
97
|
-
<InputOTPGroup>
|
|
98
|
-
<InputOTPSlot index={0} hasError={hasError} />
|
|
99
|
-
<InputOTPSlot index={1} hasError={hasError} />
|
|
100
|
-
<InputOTPSlot index={2} hasError={hasError} />
|
|
101
|
-
<InputOTPSlot index={3} hasError={hasError} />
|
|
102
|
-
<InputOTPSlot index={4} hasError={hasError} />
|
|
103
|
-
<InputOTPSlot index={5} hasError={hasError} />
|
|
104
|
-
</InputOTPGroup>
|
|
105
|
-
</InputOTP>
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
<p className="text-sm leading-tight text-cm-text-secondary text-center">
|
|
109
|
-
<span style={{ color: appearance?.colors?.textSecondary }}>
|
|
110
|
-
Can't find the email? Check spam folder or contact
|
|
111
|
-
</span>{" "}
|
|
112
|
-
<a
|
|
113
|
-
key="resend-email-link"
|
|
114
|
-
className="transition-opacity duration-150 text-cm-link hover:opacity-70"
|
|
115
|
-
style={{ color: appearance?.colors?.textLink }}
|
|
116
|
-
href="mailto:support@crossmint.io"
|
|
117
|
-
>
|
|
118
|
-
support@crossmint.io
|
|
119
|
-
</a>
|
|
120
|
-
</p>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
);
|
|
124
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { type FormEvent, useState } from "react";
|
|
2
|
-
import Color from "color";
|
|
3
|
-
|
|
4
|
-
import { Spinner } from "@/components/common/Spinner";
|
|
5
|
-
import { classNames } from "@/utils/classNames";
|
|
6
|
-
import { AlertIcon } from "../../../../icons/alert";
|
|
7
|
-
import { isEmailValid } from "@crossmint/common-sdk-auth";
|
|
8
|
-
import { useAuthForm } from "@/providers/auth/AuthFormProvider";
|
|
9
|
-
import type { OtpEmailPayload } from "@/types/auth";
|
|
10
|
-
import { useCrossmintAuth } from "@/hooks/useCrossmintAuth";
|
|
11
|
-
|
|
12
|
-
export function EmailSignIn({ setOtpEmailData }: { setOtpEmailData: (data: OtpEmailPayload) => void }) {
|
|
13
|
-
const { crossmintAuth } = useCrossmintAuth();
|
|
14
|
-
const { appearance, setStep, setError } = useAuthForm();
|
|
15
|
-
|
|
16
|
-
const [emailInput, setEmailInput] = useState("");
|
|
17
|
-
const [emailError, setEmailError] = useState("");
|
|
18
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
19
|
-
|
|
20
|
-
async function handleOnSubmit(e: FormEvent<HTMLFormElement>) {
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
|
|
23
|
-
if (!isEmailValid(emailInput)) {
|
|
24
|
-
setEmailError("Please enter a valid email address");
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
setIsLoading(true);
|
|
29
|
-
|
|
30
|
-
try {
|
|
31
|
-
const trimmedEmailInput = emailInput.trim().toLowerCase();
|
|
32
|
-
const emailSignInRes = (await crossmintAuth?.sendEmailOtp(trimmedEmailInput)) as { emailId: string };
|
|
33
|
-
|
|
34
|
-
setOtpEmailData({ email: trimmedEmailInput, emailId: emailSignInRes.emailId });
|
|
35
|
-
setStep("otp");
|
|
36
|
-
} catch (_e: unknown) {
|
|
37
|
-
setIsLoading(false);
|
|
38
|
-
setError("Failed to send email. Please try again or contact support.");
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<>
|
|
44
|
-
<div className="flex flex-col items-start justify-start w-full rounded-lg">
|
|
45
|
-
<div className="w-full">
|
|
46
|
-
<form
|
|
47
|
-
role="form"
|
|
48
|
-
className="relative"
|
|
49
|
-
onSubmit={handleOnSubmit}
|
|
50
|
-
noValidate // we want to handle validation ourselves
|
|
51
|
-
>
|
|
52
|
-
<label htmlFor="emailInput" className="sr-only">
|
|
53
|
-
Email
|
|
54
|
-
</label>
|
|
55
|
-
<input
|
|
56
|
-
className={classNames(
|
|
57
|
-
"flex-grow text-cm-text-secondary text-left pl-[16px] pr-[80px] h-[58px] w-full border border-cm-border rounded-xl bg-cm-background-primary placeholder:text-sm placeholder:text-opacity-60",
|
|
58
|
-
"transition-none duration-200 ease-in-out",
|
|
59
|
-
"focus:outline-none focus-ring-custom", // Add focus ring
|
|
60
|
-
emailError ? "border-red-500" : ""
|
|
61
|
-
)}
|
|
62
|
-
style={{
|
|
63
|
-
color: appearance?.colors?.textPrimary,
|
|
64
|
-
borderRadius: appearance?.borderRadius,
|
|
65
|
-
borderColor: emailError ? appearance?.colors?.danger : appearance?.colors?.border,
|
|
66
|
-
backgroundColor: appearance?.colors?.inputBackground,
|
|
67
|
-
// @ts-expect-error Add custom ring color to tailwind
|
|
68
|
-
"--focus-ring-color": new Color(appearance?.colors?.accent ?? "#04AA6D")
|
|
69
|
-
.alpha(0.18)
|
|
70
|
-
.toString(),
|
|
71
|
-
}}
|
|
72
|
-
type="email"
|
|
73
|
-
placeholder="Enter email"
|
|
74
|
-
value={emailInput}
|
|
75
|
-
onChange={(e) => {
|
|
76
|
-
setEmailInput(e.target.value);
|
|
77
|
-
setEmailError("");
|
|
78
|
-
setError(null);
|
|
79
|
-
}}
|
|
80
|
-
readOnly={isLoading}
|
|
81
|
-
aria-describedby="emailError"
|
|
82
|
-
/>
|
|
83
|
-
<div className="absolute inset-y-0 right-0 flex items-center pr-4">
|
|
84
|
-
{emailError && <AlertIcon customColor={appearance?.colors?.danger} />}
|
|
85
|
-
{isLoading && (
|
|
86
|
-
<Spinner
|
|
87
|
-
style={{
|
|
88
|
-
color: appearance?.colors?.textSecondary,
|
|
89
|
-
fill: appearance?.colors?.textPrimary,
|
|
90
|
-
}}
|
|
91
|
-
/>
|
|
92
|
-
)}
|
|
93
|
-
{!emailError && !isLoading && (
|
|
94
|
-
<button
|
|
95
|
-
type="submit"
|
|
96
|
-
className={classNames("cursor-pointer font-medium text-cm-accent text-nowrap")}
|
|
97
|
-
style={{ color: appearance?.colors?.accent }}
|
|
98
|
-
disabled={!emailInput}
|
|
99
|
-
>
|
|
100
|
-
Sign in
|
|
101
|
-
</button>
|
|
102
|
-
)}
|
|
103
|
-
</div>
|
|
104
|
-
</form>
|
|
105
|
-
{emailError && <p className="text-xs text-red-500 mb-2 pt-2">{emailError}</p>}
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
</>
|
|
109
|
-
);
|
|
110
|
-
}
|