@crossmint/client-sdk-react-ui 2.2.20 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-23YVHBPI.js +11 -0
- package/dist/chunk-2SBA4RZZ.cjs +17 -0
- package/dist/chunk-36S5R2NM.js +53 -0
- package/dist/{chunk-L2FU52RJ.js → chunk-3NEYD7GW.js} +1 -1
- package/dist/{chunk-BUJDXHVE.js → chunk-3TUDRFXX.js} +1 -1
- package/dist/chunk-3X24JZVG.cjs +6 -0
- package/dist/{chunk-DQHM2ITY.js → chunk-44MREOU3.js} +1 -1
- package/dist/{chunk-F2PJZF7H.cjs → chunk-4RD5CZ3D.cjs} +1 -1
- package/dist/chunk-56YL3XJW.cjs +1 -0
- package/dist/chunk-5J6CUTGJ.cjs +53 -0
- package/dist/chunk-5MRPY46P.js +46 -0
- package/dist/chunk-5OQLZOD4.cjs +231 -0
- package/dist/chunk-5VJQFSG6.js +1 -0
- package/dist/{chunk-L2LMLMMN.js → chunk-6QJNYB7C.js} +1 -1
- package/dist/chunk-7U6Q4ELB.cjs +35 -0
- package/dist/chunk-A5BH5XDB.js +1 -0
- package/dist/chunk-AHMPKIEY.cjs +14 -0
- package/dist/{chunk-7SLUOHO2.cjs → chunk-ALORBDLN.cjs} +1 -1
- package/dist/{chunk-JO7RY6MG.cjs → chunk-ANSLIVQ7.cjs} +1 -1
- package/dist/chunk-AO2V2B62.cjs +160 -0
- package/dist/chunk-AOBO3CEQ.js +14 -0
- package/dist/chunk-BABEX7ZC.js +2 -0
- package/dist/chunk-BAXCSO7J.js +1 -0
- package/dist/{chunk-2RMGS33N.js → chunk-BG2YKGGE.js} +1 -1
- package/dist/chunk-BPEDL7VV.cjs +1 -0
- package/dist/chunk-BPHJ7DTH.cjs +1 -0
- package/dist/chunk-BWCRTWMO.js +3 -0
- package/dist/chunk-CDQFTAM2.cjs +1 -0
- package/dist/chunk-DFSB3TWF.js +1 -0
- package/dist/chunk-DJZOP4MT.cjs +34 -0
- package/dist/chunk-EA7H4AXL.js +1 -0
- package/dist/{chunk-ND3NGHHK.js → chunk-EAUAF6IQ.js} +1 -1
- package/dist/chunk-EAWYV5ZO.cjs +1 -0
- package/dist/chunk-EDALAJ5I.cjs +1 -0
- package/dist/chunk-EO53B7LL.cjs +1 -0
- package/dist/chunk-G7JHUDRI.cjs +1 -0
- package/dist/{chunk-ZCIYQIQJ.cjs → chunk-GH7J7WBI.cjs} +1 -1
- package/dist/chunk-GKVX7FEM.js +40 -0
- package/dist/chunk-H3CPTTQQ.js +1 -0
- package/dist/chunk-H4XBJVSE.cjs +98 -0
- package/dist/chunk-HHI2XRKR.js +1 -0
- package/dist/chunk-HJGCM4XH.js +13 -0
- package/dist/chunk-I4D3YJW2.js +0 -0
- package/dist/chunk-IBDJ3NF2.js +1 -0
- package/dist/{chunk-NXNLHCGF.cjs → chunk-JGZA7M5Q.cjs} +1 -1
- package/dist/chunk-JL7YHC7D.js +34 -0
- package/dist/chunk-JVXYIBS3.cjs +46 -0
- package/dist/{chunk-T7XPEJNO.cjs → chunk-JYZ5GRCH.cjs} +1 -1
- package/dist/chunk-KFFPM6JM.js +1 -0
- package/dist/{chunk-F7JUPGHV.cjs → chunk-KSK4MJU7.cjs} +1 -1
- package/dist/chunk-KXQ5HCBO.js +231 -0
- package/dist/chunk-L2E6XMSV.js +1 -0
- package/dist/chunk-LUSXGZYB.js +66 -0
- package/dist/chunk-MN6UTXVP.js +160 -0
- package/dist/chunk-NL42M74L.cjs +2 -0
- package/dist/chunk-NZUCXN2O.js +6 -0
- package/dist/chunk-O5IPDCMT.js +48 -0
- package/dist/chunk-OAHZHKRR.js +1 -0
- package/dist/chunk-OIBR6K7M.js +2 -0
- package/dist/{chunk-2OIZFMK3.cjs → chunk-OSSEBYGB.cjs} +1 -1
- package/dist/chunk-OVJIGWD7.cjs +66 -0
- package/dist/chunk-QFUZG5YR.js +1 -0
- package/dist/chunk-QQP4GR7V.js +35 -0
- package/dist/{chunk-S5S2XFIC.cjs → chunk-RH2CVOIS.cjs} +1 -1
- package/dist/{chunk-4M6MLYJX.js → chunk-RVASNIDI.js} +1 -1
- package/dist/chunk-S4BKL6MR.cjs +11 -0
- package/dist/chunk-S7ZQ4UUK.cjs +2 -0
- package/dist/chunk-SCHRLC2I.cjs +3 -0
- package/dist/chunk-SHJCMWEH.js +98 -0
- package/dist/chunk-TBD7RAFW.js +17 -0
- package/dist/chunk-UG5R7IPH.js +3 -0
- package/dist/chunk-UHFCB2EY.js +1 -0
- package/dist/chunk-UMWTEGO6.cjs +1 -0
- package/dist/chunk-VRFL53NP.cjs +40 -0
- package/dist/chunk-VXAHFAP4.cjs +1 -0
- package/dist/{chunk-4BH7ZTBT.cjs → chunk-W3W7VNA6.cjs} +1 -1
- package/dist/chunk-W5RDCN5G.cjs +1 -0
- package/dist/chunk-WK3BTTQG.cjs +13 -0
- package/dist/{chunk-5H3ARLI7.js → chunk-XAFMKKD2.js} +1 -1
- package/dist/chunk-XBXL7GMY.cjs +48 -0
- package/dist/chunk-XFYW7RD2.js +1 -0
- package/dist/{chunk-JQQUNBXY.cjs → chunk-Y66ATVFL.cjs} +1 -1
- package/dist/{chunk-B3PLOTUC.js → chunk-YAFI3AUR.js} +1 -1
- package/dist/chunk-YCYSZLQ2.cjs +1 -0
- package/dist/chunk-YGN7O63X.cjs +3 -0
- package/dist/chunk-YNISB2IC.cjs +1 -0
- package/dist/{chunk-3EQH236A.js → chunk-YYS3QKWM.js} +1 -1
- package/dist/chunk-ZT6OJ47F.cjs +1 -0
- package/dist/components/CrossmintNFTCollectionView.cjs +1 -1
- package/dist/components/CrossmintNFTCollectionView.js +1 -1
- package/dist/components/CrossmintNFTDetail.cjs +1 -1
- package/dist/components/CrossmintNFTDetail.js +1 -1
- package/dist/components/auth/AuthForm.cjs +1 -1
- package/dist/components/auth/AuthForm.d.cts +3 -2
- package/dist/components/auth/AuthForm.d.ts +3 -2
- package/dist/components/auth/AuthForm.js +1 -1
- package/dist/components/auth/AuthFormBackButton.cjs +1 -1
- package/dist/components/auth/AuthFormBackButton.d.cts +3 -1
- package/dist/components/auth/AuthFormBackButton.d.ts +3 -1
- package/dist/components/auth/AuthFormBackButton.js +1 -1
- package/dist/components/auth/AuthFormDialog.cjs +1 -1
- package/dist/components/auth/AuthFormDialog.js +1 -1
- package/dist/components/auth/EmbeddedAuthForm.cjs +1 -1
- package/dist/components/auth/EmbeddedAuthForm.js +1 -1
- package/dist/components/auth/PasskeyPrompt.cjs +1 -1
- package/dist/components/auth/PasskeyPrompt.d.cts +3 -2
- package/dist/components/auth/PasskeyPrompt.d.ts +3 -2
- package/dist/components/auth/PasskeyPrompt.js +1 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs +1 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.js +1 -1
- package/dist/components/auth/methods/email/EmailOTPInput.cjs +1 -1
- package/dist/components/auth/methods/email/EmailOTPInput.d.cts +1 -2
- package/dist/components/auth/methods/email/EmailOTPInput.d.ts +1 -2
- package/dist/components/auth/methods/email/EmailOTPInput.js +1 -1
- package/dist/components/auth/methods/email/EmailSignIn.cjs +1 -1
- package/dist/components/auth/methods/email/EmailSignIn.js +1 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +1 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +1 -1
- package/dist/components/auth/methods/google/ContinueWithGoogle.cjs +1 -1
- package/dist/components/auth/methods/google/ContinueWithGoogle.js +1 -1
- package/dist/components/auth/methods/google/GoogleSignIn.cjs +1 -1
- package/dist/components/auth/methods/google/GoogleSignIn.js +1 -1
- package/dist/components/auth/methods/twitter/TwitterSignIn.cjs +1 -1
- package/dist/components/auth/methods/twitter/TwitterSignIn.js +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.js +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.js +1 -1
- package/dist/components/auth/methods/web3/Web3Connectors.cjs +1 -1
- package/dist/components/auth/methods/web3/Web3Connectors.js +1 -1
- package/dist/components/common/CountdownButton.cjs +1 -1
- package/dist/components/common/CountdownButton.js +1 -1
- package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.cjs +1 -1
- package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.js +1 -1
- package/dist/components/common/Dialog.cjs +1 -1
- package/dist/components/common/Dialog.d.cts +24 -21
- package/dist/components/common/Dialog.d.ts +24 -21
- package/dist/components/common/Dialog.js +1 -1
- package/dist/components/common/Divider.cjs +1 -1
- package/dist/components/common/Divider.js +1 -1
- package/dist/components/common/InputOTP.cjs +1 -1
- package/dist/components/common/InputOTP.d.cts +2 -10
- package/dist/components/common/InputOTP.d.ts +2 -10
- package/dist/components/common/InputOTP.js +1 -1
- package/dist/components/common/OAuthButton.cjs +1 -0
- package/dist/components/common/OAuthButton.d.cts +14 -0
- package/dist/components/common/OAuthButton.d.ts +14 -0
- package/dist/components/common/OAuthButton.js +1 -0
- package/dist/components/common/ScreenReaderText.cjs +1 -0
- package/dist/components/common/ScreenReaderText.d.cts +6 -0
- package/dist/components/common/ScreenReaderText.d.ts +6 -0
- package/dist/components/common/ScreenReaderText.js +1 -0
- package/dist/components/common/SecuredByCrossmint.cjs +1 -1
- package/dist/components/common/SecuredByCrossmint.d.cts +2 -2
- package/dist/components/common/SecuredByCrossmint.d.ts +2 -2
- package/dist/components/common/SecuredByCrossmint.js +1 -1
- package/dist/components/common/Spinner.cjs +1 -1
- package/dist/components/common/Spinner.d.cts +1 -2
- package/dist/components/common/Spinner.d.ts +1 -2
- package/dist/components/common/Spinner.js +1 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +1 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +1 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +1 -1
- package/dist/components/embed/v3/index.cjs +1 -1
- package/dist/components/embed/v3/index.js +1 -1
- package/dist/components/hosted/CrossmintPayButton_DEPRECATED.cjs +1 -1
- package/dist/components/hosted/CrossmintPayButton_DEPRECATED.js +1 -1
- package/dist/components/hosted/index.cjs +1 -1
- package/dist/components/hosted/index.js +1 -1
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs +1 -1
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js +1 -1
- package/dist/components/hosted/v3/index.cjs +1 -1
- package/dist/components/hosted/v3/index.js +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.cts +0 -4
- package/dist/components/index.d.ts +0 -4
- package/dist/components/index.js +1 -1
- package/dist/components/signers/BaseConfirmation.cjs +1 -0
- package/dist/components/signers/BaseConfirmation.d.cts +14 -0
- package/dist/components/signers/BaseConfirmation.d.ts +14 -0
- package/dist/components/signers/BaseConfirmation.js +1 -0
- package/dist/components/signers/BaseOTPInput.cjs +1 -0
- package/dist/components/signers/BaseOTPInput.d.cts +19 -0
- package/dist/components/signers/BaseOTPInput.d.ts +19 -0
- package/dist/components/signers/BaseOTPInput.js +1 -0
- package/dist/components/signers/EmailSignersDialog.cjs +1 -1
- package/dist/components/signers/EmailSignersDialog.d.cts +1 -1
- package/dist/components/signers/EmailSignersDialog.d.ts +1 -1
- package/dist/components/signers/EmailSignersDialog.js +1 -1
- package/dist/components/signers/PhoneSignersDialog.cjs +1 -1
- package/dist/components/signers/PhoneSignersDialog.d.cts +1 -1
- package/dist/components/signers/PhoneSignersDialog.d.ts +1 -1
- package/dist/components/signers/PhoneSignersDialog.js +1 -1
- package/dist/components/signers/index.cjs +1 -1
- package/dist/components/signers/index.d.cts +0 -4
- package/dist/components/signers/index.d.ts +0 -4
- package/dist/components/signers/index.js +1 -1
- package/dist/consts/version.cjs +1 -1
- package/dist/consts/version.js +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useAuth.cjs +1 -1
- package/dist/hooks/useAuth.js +1 -1
- package/dist/hooks/useCrossmintAuth.cjs +1 -1
- package/dist/hooks/useCrossmintAuth.js +1 -1
- package/dist/hooks/useCrossmintCheckout.cjs +1 -1
- package/dist/hooks/useCrossmintCheckout.js +1 -1
- package/dist/hooks/useOAuthWindowListener.cjs +1 -1
- package/dist/hooks/useOAuthWindowListener.d.cts +1 -0
- package/dist/hooks/useOAuthWindowListener.d.ts +1 -0
- package/dist/hooks/useOAuthWindowListener.js +1 -1
- package/dist/icons/chevronRight.cjs +1 -1
- package/dist/icons/chevronRight.d.cts +1 -2
- package/dist/icons/chevronRight.d.ts +1 -2
- package/dist/icons/chevronRight.js +1 -1
- package/dist/icons/discord.cjs +1 -1
- package/dist/icons/discord.d.cts +2 -2
- package/dist/icons/discord.d.ts +2 -2
- package/dist/icons/discord.js +1 -1
- package/dist/icons/farcaster.cjs +1 -1
- package/dist/icons/farcaster.d.cts +2 -2
- package/dist/icons/farcaster.d.ts +2 -2
- package/dist/icons/farcaster.js +1 -1
- package/dist/icons/google.cjs +1 -1
- package/dist/icons/google.d.cts +2 -2
- package/dist/icons/google.d.ts +2 -2
- package/dist/icons/google.js +1 -1
- package/dist/icons/leftArrow.cjs +1 -1
- package/dist/icons/leftArrow.d.cts +1 -2
- package/dist/icons/leftArrow.d.ts +1 -2
- package/dist/icons/leftArrow.js +1 -1
- package/dist/icons/mail.cjs +1 -0
- package/dist/icons/mail.d.cts +6 -0
- package/dist/icons/mail.d.ts +6 -0
- package/dist/icons/mail.js +1 -0
- package/dist/icons/phone.cjs +1 -0
- package/dist/icons/phone.d.cts +6 -0
- package/dist/icons/phone.d.ts +6 -0
- package/dist/icons/phone.js +1 -0
- package/dist/icons/phoneOTP.cjs +1 -1
- package/dist/icons/phoneOTP.d.cts +1 -2
- package/dist/icons/phoneOTP.d.ts +1 -2
- package/dist/icons/phoneOTP.js +1 -1
- package/dist/icons/twitter.cjs +1 -1
- package/dist/icons/twitter.d.cts +2 -2
- package/dist/icons/twitter.d.ts +2 -2
- package/dist/icons/twitter.js +1 -1
- package/dist/icons/wallet.cjs +1 -1
- package/dist/icons/wallet.d.cts +1 -2
- package/dist/icons/wallet.d.ts +1 -2
- package/dist/icons/wallet.js +1 -1
- package/dist/icons/x.cjs +1 -1
- package/dist/icons/x.d.cts +2 -2
- package/dist/icons/x.d.ts +2 -2
- package/dist/icons/x.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +0 -4
- package/dist/index.d.ts +0 -4
- package/dist/index.js +1 -1
- package/dist/providers/CrossmintAuthProvider.cjs +1 -1
- package/dist/providers/CrossmintAuthProvider.js +1 -1
- package/dist/providers/CrossmintAuthProviderInternal.cjs +1 -1
- package/dist/providers/CrossmintAuthProviderInternal.js +1 -1
- package/dist/providers/CrossmintWalletProvider.cjs +1 -1
- package/dist/providers/CrossmintWalletProvider.js +1 -1
- package/dist/providers/auth/OAuthFlowProvider.cjs +1 -1
- package/dist/providers/auth/OAuthFlowProvider.d.cts +1 -0
- package/dist/providers/auth/OAuthFlowProvider.d.ts +1 -0
- package/dist/providers/auth/OAuthFlowProvider.js +1 -1
- package/dist/providers/dynamic/DynamicWalletProvider.cjs +1 -1
- package/dist/providers/dynamic/DynamicWalletProvider.js +1 -1
- package/dist/providers/index.cjs +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/styles/globals.cjs +1 -0
- package/dist/styles/globals.d.cts +5 -0
- package/dist/styles/globals.d.ts +5 -0
- package/dist/styles/globals.js +1 -0
- package/dist/styles/index.cjs +1 -0
- package/dist/styles/index.d.cts +3 -0
- package/dist/styles/index.d.ts +3 -0
- package/dist/styles/index.js +1 -0
- package/dist/styles/theme.cjs +1 -0
- package/dist/styles/theme.d.cts +13 -0
- package/dist/styles/theme.d.ts +13 -0
- package/dist/styles/theme.js +1 -0
- package/dist/utils/createCrossmintApiClient.cjs +1 -1
- package/dist/utils/createCrossmintApiClient.js +1 -1
- package/package.json +5 -7
- package/dist/chunk-2F3EMF5G.cjs +0 -1
- package/dist/chunk-2LLVSWMJ.js +0 -1
- package/dist/chunk-2NZ6SYFP.cjs +0 -1
- package/dist/chunk-34ULQ2PW.cjs +0 -1
- package/dist/chunk-3PHT3DAK.cjs +0 -1
- package/dist/chunk-4EQ23ZKC.cjs +0 -1
- package/dist/chunk-4ROE755V.cjs +0 -1
- package/dist/chunk-6BFWRGAS.cjs +0 -1
- package/dist/chunk-6IMXTTW4.cjs +0 -1
- package/dist/chunk-6LFJ3UC3.js +0 -1
- package/dist/chunk-6QVBCF3C.js +0 -1
- package/dist/chunk-7OJVAIXA.cjs +0 -1
- package/dist/chunk-7YO3UHAR.cjs +0 -1
- package/dist/chunk-CW4GAQRA.js +0 -1
- package/dist/chunk-CZ7CTBCO.js +0 -1
- package/dist/chunk-DCELWGNS.js +0 -1
- package/dist/chunk-DSBQW65Y.cjs +0 -1
- package/dist/chunk-E4DYZZKZ.cjs +0 -1
- package/dist/chunk-E4TBJMOO.js +0 -1
- package/dist/chunk-E5D2JTKO.js +0 -1
- package/dist/chunk-E65EGG73.cjs +0 -1
- package/dist/chunk-EOMXTZMF.js +0 -1
- package/dist/chunk-FPE5X5RH.cjs +0 -1
- package/dist/chunk-GGUEHZAY.js +0 -1
- package/dist/chunk-GHRFRG65.js +0 -1
- package/dist/chunk-GLOKRANI.cjs +0 -1
- package/dist/chunk-GONS3X7J.js +0 -2
- package/dist/chunk-I7KK3D7J.js +0 -1
- package/dist/chunk-J2YZL55W.js +0 -1
- package/dist/chunk-J4QPNKHC.cjs +0 -1
- package/dist/chunk-JGT6RWSD.js +0 -1
- package/dist/chunk-JPJKOERH.js +0 -1
- package/dist/chunk-JU37JPL7.js +0 -1
- package/dist/chunk-KIESVSW4.js +0 -1
- package/dist/chunk-LSQT2KG6.cjs +0 -1
- package/dist/chunk-NI4D3UIR.cjs +0 -2
- package/dist/chunk-ONU6TI5W.cjs +0 -1
- package/dist/chunk-P453UQYI.js +0 -11
- package/dist/chunk-PGE5M3Q5.cjs +0 -1
- package/dist/chunk-PIUCKVF7.js +0 -1
- package/dist/chunk-PZUWRGVP.cjs +0 -1
- package/dist/chunk-QHDN67N5.js +0 -1
- package/dist/chunk-QQTPO5IF.js +0 -1
- package/dist/chunk-RWWMM4HD.js +0 -1
- package/dist/chunk-SFDQPSSP.js +0 -1
- package/dist/chunk-SGP6SK6O.js +0 -1
- package/dist/chunk-SQ6GQUV4.js +0 -1
- package/dist/chunk-SRQAQHYK.cjs +0 -1
- package/dist/chunk-TM7WDKYR.cjs +0 -1
- package/dist/chunk-TXOVDTYK.cjs +0 -1
- package/dist/chunk-UILJI3DM.js +0 -1
- package/dist/chunk-UMCSEFX6.cjs +0 -11
- package/dist/chunk-VLDE23JX.js +0 -1
- package/dist/chunk-VNY6LU32.cjs +0 -1
- package/dist/chunk-VUIDQYBY.cjs +0 -1
- package/dist/chunk-VWL76U5G.js +0 -1
- package/dist/chunk-WAMK2K23.cjs +0 -1
- package/dist/chunk-WW6GUXHG.js +0 -1
- package/dist/chunk-YGYMICXJ.cjs +0 -1
- package/dist/chunk-YXF74MVI.cjs +0 -1
- package/dist/chunk-ZBQCXWMD.cjs +0 -1
- package/dist/chunk-ZKXBJNL7.js +0 -2
- package/dist/chunk-ZNDVEP3D.js +0 -1
- package/dist/chunk-ZSJQWAT2.js +0 -1
- package/dist/chunk-ZWMCD7KM.cjs +0 -2
- package/dist/components/auth/methods/web3/Web3Connector.cjs +0 -1
- package/dist/components/auth/methods/web3/Web3Connector.d.cts +0 -13
- package/dist/components/auth/methods/web3/Web3Connector.d.ts +0 -13
- package/dist/components/auth/methods/web3/Web3Connector.js +0 -1
- package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs +0 -1
- package/dist/components/auth/methods/web3/Web3ConnectorButton.d.cts +0 -11
- package/dist/components/auth/methods/web3/Web3ConnectorButton.d.ts +0 -11
- package/dist/components/auth/methods/web3/Web3ConnectorButton.js +0 -1
- package/dist/components/signers/EmailConfirmation.cjs +0 -1
- package/dist/components/signers/EmailConfirmation.d.cts +0 -12
- package/dist/components/signers/EmailConfirmation.d.ts +0 -12
- package/dist/components/signers/EmailConfirmation.js +0 -1
- package/dist/components/signers/EmailOTPInput.cjs +0 -1
- package/dist/components/signers/EmailOTPInput.d.cts +0 -12
- package/dist/components/signers/EmailOTPInput.d.ts +0 -12
- package/dist/components/signers/EmailOTPInput.js +0 -1
- package/dist/components/signers/PhoneConfirmation.cjs +0 -1
- package/dist/components/signers/PhoneConfirmation.d.cts +0 -12
- package/dist/components/signers/PhoneConfirmation.d.ts +0 -12
- package/dist/components/signers/PhoneConfirmation.js +0 -1
- package/dist/components/signers/PhoneOTPInput.cjs +0 -1
- package/dist/components/signers/PhoneOTPInput.d.cts +0 -12
- package/dist/components/signers/PhoneOTPInput.d.ts +0 -12
- package/dist/components/signers/PhoneOTPInput.js +0 -1
- package/dist/components/signers/consts.cjs +0 -1
- package/dist/components/signers/consts.d.cts +0 -3
- package/dist/components/signers/consts.d.ts +0 -3
- package/dist/components/signers/consts.js +0 -1
- package/dist/twind-instance.cjs +0 -1
- package/dist/twind-instance.d.cts +0 -8
- package/dist/twind-instance.d.ts +0 -8
- package/dist/twind-instance.js +0 -1
- package/dist/twind.config.cjs +0 -1
- package/dist/twind.config.d.cts +0 -8
- package/dist/twind.config.d.ts +0 -8
- package/dist/twind.config.js +0 -1
- package/dist/utils/classNames.cjs +0 -1
- package/dist/utils/classNames.d.cts +0 -12
- package/dist/utils/classNames.d.ts +0 -12
- package/dist/utils/classNames.js +0 -1
- package/dist/utils/errorUtils.cjs +0 -1
- package/dist/utils/errorUtils.d.cts +0 -6
- package/dist/utils/errorUtils.d.ts +0 -6
- package/dist/utils/errorUtils.js +0 -1
- /package/dist/{chunk-VAKQ4II7.js → chunk-HGHYGPCN.js} +0 -0
- /package/dist/{chunk-4YRSANGA.cjs → chunk-QHI4DOG7.cjs} +0 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import{a as _t}from"./chunk-44MREOU3.js";import{a as $t}from"./chunk-JSNUJJQJ.js";import{b as St}from"./chunk-4KDASQO6.js";import{a as Pt}from"./chunk-LD3MRJ3F.js";import{a as Bt}from"./chunk-TBD7RAFW.js";import{a as Q}from"./chunk-GKVX7FEM.js";import{a as Rt}from"./chunk-23YVHBPI.js";import{a as tt}from"./chunk-QQP4GR7V.js";import{a as w,b as Lt}from"./chunk-WK7PY5WL.js";import{a as Ft}from"./chunk-JL7YHC7D.js";import{a as Wt,b as kt,c as Tt}from"./chunk-O5IPDCMT.js";import{a as K}from"./chunk-AOBO3CEQ.js";import{a as Ot,b as Et,c as It}from"./chunk-MN6UTXVP.js";import{a as Mt}from"./chunk-UG5R7IPH.js";import{a as q}from"./chunk-NZUCXN2O.js";import{a as c}from"./chunk-DFSB3TWF.js";import{a as zt}from"./chunk-KFFPM6JM.js";import{a as Ut}from"./chunk-C3JRTLQP.js";import{a as Dt}from"./chunk-UHFCB2EY.js";import{a as ot}from"./chunk-OAHZHKRR.js";import{a as et}from"./chunk-UAFW3OWA.js";import{a as G,b as H,c as Z,d as x}from"./chunk-PXDN3KFO.js";import Po from"color";import pe from"@emotion/styled";import{useState as so}from"react";import{useState as dt}from"react";import L from"@emotion/styled";import{useContext as He}from"react";import{createContext as Le,useEffect as ut,useMemo as Zt,useRef as te,useState as $,useCallback as z}from"react";import{CrossmintAuth as Re,getCookie as Be}from"@crossmint/client-sdk-auth";import{validateApiKeyAndGetCrossmintBaseUrl as De}from"@crossmint/common-sdk-base";import{SESSION_PREFIX as Me}from"@crossmint/common-sdk-auth";import{useCrossmint as $e}from"@crossmint/client-sdk-react-base";import{createContext as Se,useCallback as Ht,useContext as Oe,useEffect as Ee,useState as Kt}from"react";import{ChildWindow as ye,PopupWindow as Ce}from"@crossmint/client-sdk-window";import{useEffect as ve,useRef as we,useState as Ae,useCallback as be}from"react";import{z as rt}from"zod";var Gt=(o,e)=>{let{crossmintAuth:t}=O(),[r,i]=Ae(null),n=we(null);return ve(()=>(n.current==null&&(n.current=new ye(window.opener||window.parent,"*",{incomingEvents:Pe})),()=>{n.current!=null&&n.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:be((u,y)=>x(void 0,null,function*(){if(n.current==null)throw new Error("Child window not initialized");i(u),e(null);let a=new URL(o[u]);if(y!=null){let m=Array.from(a.searchParams.entries());a.search="",y&&a.searchParams.append("provider_login_hint",y),m.forEach(([s,f])=>{a.searchParams.append(s,f)})}let C=yield Ce.init(a.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),d=m=>x(void 0,null,function*(){var s,f;yield t==null?void 0:t.handleRefreshAuthMaterial(m.oneTimeSecret),(s=n.current)==null||s.off("authMaterialFromPopupCallback"),(f=C.window)==null||f.close(),i(null)}),l=m=>{var s,f;e(m.error),(s=n.current)==null||s.off("errorFromPopupCallback"),(f=C.window)==null||f.close(),i(null)};n.current.on("authMaterialFromPopupCallback",d),n.current.on("errorFromPopupCallback",l);let g=setInterval(()=>{var m,s;(m=C.window)!=null&&m.closed&&(clearInterval(g),i(null),(s=n.current)==null||s.off("authMaterialFromPopupCallback"))},2500)}),[o,t,e]),isLoading:r!=null,activeOAuthProvider:r}},Pe={authMaterialFromPopupCallback:rt.object({oneTimeSecret:rt.string()}),errorFromPopupCallback:rt.object({error:rt.string()})};import{jsx as Ie}from"react/jsx-runtime";var Qt={google:"",twitter:""},Nt=Se(void 0);function U(){let o=Oe(Nt);if(!o)throw new Error("useOAuthFlow must be used within an OAuthFlowProvider");return o}function jt({children:o,prefetchOAuthUrls:e}){let{crossmintAuth:t,loginMethods:r}=O(),{setError:i}=w(),[n,p]=Kt(Qt),[u,y]=Kt(!0),{createPopupAndSetupListeners:a,isLoading:C,activeOAuthProvider:d}=Gt(n,i),l=Ht(()=>x(this,null,function*(){y(!0);try{let f=(r||[]).filter(h=>h in Qt).map(h=>x(this,null,function*(){let A=yield t==null?void 0:t.getOAuthUrl(h);return{[h]:A}})),v=Object.assign({},...yield Promise.all(f));p(v)}catch(s){i(s instanceof Error?s.message:"Unable to load oauth providers. Please try again later.")}finally{y(!1)}}),[r,t,i]);Ee(()=>{e&&l()},[l,e]);let m={startOAuthLogin:Ht((s,f)=>x(this,null,function*(){yield a(s,f)}),[a]),isLoading:u||C,activeOAuthProvider:d};return Ie(Nt.Provider,{value:m,children:o})}import{useEffect as ct,useMemo as Vt}from"react";import{useDynamicContext as Fe}from"@dynamic-labs/sdk-react-core";import{isEthereumWallet as We}from"@dynamic-labs/ethereum";import{isSolanaWallet as ke}from"@dynamic-labs/solana";import{EthereumWalletConnectors as qt}from"@dynamic-labs/ethereum";import{SolanaWalletConnectors as Jt}from"@dynamic-labs/solana";import Te from"bs58";import{jsx as Xt}from"react/jsx-runtime";function Ue({children:o,enabled:e,onSdkLoaded:t,onWalletConnected:r,jwt:i}){let{primaryWallet:n,sdkHasLoaded:p,removeWallet:u,handleUnlinkWallet:y}=Fe(),a=!e||p;return ct(()=>{a&&(t==null||t(a))},[a,t]),ct(()=>{i==null&&a&&n!=null&&(u(n.id),y(n.id))},[i,a,n,u,y]),ct(()=>{function C(){return x(this,null,function*(){try{if(We(n)){let d=yield n.getWalletClient(),l={type:"external-wallet",address:d.account.address,viemAccount:H(G({},d.account),{signMessage:g=>x(this,null,function*(){return yield d.signMessage({message:g.message})})})};r(l)}else if(ke(n)){let d=yield n.getSigner(),l={type:"external-wallet",address:n.address,onSignTransaction:g=>x(this,null,function*(){return yield d.signTransaction(g)})};r(l)}else throw new Error("Unsupported wallet type")}catch(d){throw console.error("Failed to get admin signer",d),new Error("Failed to get admin signer")}})}n!=null&&i!=null&&C()},[n,i,r]),o}function Yt({children:o,enabled:e=!0,apiKeyEnvironment:t,loginMethods:r=["web3"],appearance:i,onSdkLoaded:n,onWalletConnected:p}){var d,l;let{crossmintAuth:u,jwt:y}=O(),a=Vt(()=>{var g,m;return`.powered-by-dynamic { display: none !important; }
|
|
2
|
+
.wallet-list__scroll-container { padding: 0px !important; }
|
|
3
|
+
.wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; }
|
|
4
|
+
.dynamic-footer { display: none !important; }
|
|
5
|
+
h1 { color: ${(g=i==null?void 0:i.colors)==null?void 0:g.textPrimary} !important; }
|
|
6
|
+
* { color: ${(m=i==null?void 0:i.colors)==null?void 0:m.textSecondary} !important; }`},[(d=i==null?void 0:i.colors)==null?void 0:d.textPrimary,(l=i==null?void 0:i.colors)==null?void 0:l.textSecondary]),C=Vt(()=>{if(e)return r.includes("web3:evm-only")?[qt]:r.includes("web3:solana-only")?[Jt]:[qt,Jt]},[e,r]);return Xt(Pt,{apiKeyEnvironment:t,settings:{walletConnectors:C,cssOverrides:a,events:{onAuthFailure(g,m){console.error("[DynamicWalletProvider] onAuthFailure",g,m)}},handlers:{handleConnectedWallet:g=>x(this,null,function*(){var s;if(!u)return console.error("[DynamicWalletProvider] crossmintAuth is not available"),!1;let m=g.address;if(m==null)return console.error("[DynamicWalletProvider] handleConnectedWallet: address is missing"),!1;try{let v=(yield St(g))==="solana"?"solana":"evm",h=yield u.signInWithSmartWallet(m,v);if((h==null?void 0:h.challenge)==null)throw new Error("No challenge received from signInWithSmartWallet");let A=yield(s=g.connector)==null?void 0:s.proveOwnership(m,h.challenge);if(A==null)throw new Error("Failed to get signature from wallet");let k=A;if(v==="solana"){let D=Buffer.from(A,"base64");k=Te.encode(D)}let b=yield u.authenticateSmartWallet(m,v,k);if((b==null?void 0:b.oneTimeSecret)==null)throw new Error("No oneTimeSecret received from authenticateSmartWallet");return yield u.handleRefreshAuthMaterial(b.oneTimeSecret),!0}catch(f){return console.error("[DynamicWalletProvider] Error handling wallet connection:",f),!1}})}},children:Xt(Ue,{enabled:e,onSdkLoaded:n,onWalletConnected:p,jwt:y,children:o})},`${t}-${r.join(",")}`)}import{Fragment as Ge,jsx as N,jsxs as ee}from"react/jsx-runtime";var ze={crossmintAuth:void 0,login:()=>{},experimental_loginWithOAuth:()=>{},logout:()=>{},jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},experimental_externalWalletSigner:void 0,loginMethods:[]},mt=Le(ze);function dr({children:o,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r=!0,authModalTitle:i,onLoginSuccess:n,loginMethods:p=["email","google"],refreshRoute:u,logoutRoute:y}){let{crossmint:a}=$e("CrossmintAuthProvider must be used within CrossmintProvider"),[C,d]=$(void 0),[l,g]=$(void 0),m=De(a.apiKey),[s,f]=$(!1),[v,h]=$(!1),[A,k]=$(void 0),[b,D]=$(!0),M=p.some(P=>P.startsWith("web3")),[Ct,he]=$(void 0),at=te(null),_=Zt(()=>(at.current||(at.current=Re.from(a,{callbacks:{onLogout:()=>{d(void 0),g(void 0)},onTokenRefresh:P=>{d(P.user),g(P.jwt)}},refreshRoute:u,logoutRoute:y})),at.current),[]),V=te(null),lt=z(()=>{n==null||n()},[n]);ut(()=>{if(l==null){let P=Be(Me);g(P)}h(!0)},[l]),ut(()=>{l!=null&&s&&(f(!1),lt())},[l,s,lt]);let vt=z(P=>{if(l!=null){console.log("User already logged in");return}P!=null&&typeof P=="string"&&k(P),f(!0)},[l]),wt=z(()=>{_.logout()},[_]),st=z(()=>!v||M&&!b?"initializing":l!=null?"logged-in":s?"in-progress":"logged-out",[v,M,b,l,s]),At=z(()=>x(this,null,function*(){if(l==null){console.log("User not logged in");return}let P=yield _.getUser();return d(P),P}),[l,_]),bt=z(P=>x(this,null,function*(){var Y;yield(Y=V.current)==null?void 0:Y.call(V,P)}),[V]),xe=Zt(()=>({crossmintAuth:_,login:vt,experimental_loginWithOAuth:bt,logout:wt,jwt:l,user:C,status:st(),getUser:At,loginMethods:p,experimental_externalWalletSigner:Ct}),[_,vt,bt,wt,l,C,st,At,p,Ct]);return N(mt.Provider,{value:xe,children:N(Lt,{setDialogOpen:(P,Y)=>{f(P),Y&<()},initialState:{appearance:e,loginMethods:p,termsOfServiceText:t,authModalTitle:i,baseUrl:m,defaultEmail:A},children:N(jt,{prefetchOAuthUrls:st()==="logged-out"&&r,children:N(_e,{loginWithOAuthRef:V,children:M?ee(Yt,{apiKeyEnvironment:a.apiKey.includes("production")?"production":"staging",loginMethods:p,appearance:e,onSdkLoaded:D,onWalletConnected:he,children:[o,N(nt,{open:s})]}):ee(Ge,{children:[o,N(nt,{open:s})]})})})})})}function _e({children:o,loginWithOAuthRef:e}){let{startOAuthLogin:t}=U(),{jwt:r}=O(),i=z(n=>x(this,null,function*(){if(r!=null){console.log("User already logged in");return}yield t(n)}),[r,t]);return ut(()=>{e.current=i},[i,e]),o}var O=()=>{let o=He(mt);if(!o)throw new Error("useCrossmintAuth must be used within CrossmintAuthProvider");return o};import{jsx as S,jsxs as J}from"react/jsx-runtime";var Ke=L.div`
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
`,Qe=L.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: flex-start;
|
|
14
|
+
width: 100%;
|
|
15
|
+
`,Ne=L.div`
|
|
16
|
+
position: relative;
|
|
17
|
+
left: 12px;
|
|
18
|
+
`,je=L.p`
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
margin: 16px 0 4px 0;
|
|
22
|
+
text-align: center;
|
|
23
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||c["cm-text-primary"]}};
|
|
24
|
+
`,Ve=L.p`
|
|
25
|
+
text-align: center;
|
|
26
|
+
padding: 0 16px;
|
|
27
|
+
margin: 0;
|
|
28
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||c["cm-text-secondary"]}};
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
line-height: 1.4;
|
|
31
|
+
`,qe=L.div`
|
|
32
|
+
padding: 32px 0;
|
|
33
|
+
`,j=L(Tt)`
|
|
34
|
+
@media (max-width: 379px) {
|
|
35
|
+
width: 40px;
|
|
36
|
+
height: 56px;
|
|
37
|
+
font-size: 28px;
|
|
38
|
+
margin: 0;
|
|
39
|
+
}
|
|
40
|
+
`,Je=L.div`
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
line-height: 1.3;
|
|
43
|
+
text-align: center;
|
|
44
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||c["cm-text-secondary"]}};
|
|
45
|
+
`;function oe({otpEmailData:o,setOtpEmailData:e}){var f,v,h,A,k;let{crossmintAuth:t}=O(),{appearance:r,setDialogOpen:i,setStep:n,setError:p}=w(),[u,y]=dt(""),[a,C]=dt(!1),[d,l]=dt(!1),g=()=>x(this,null,function*(){var b,D;l(!0);try{let M=yield t==null?void 0:t.confirmEmailOtp((b=o==null?void 0:o.email)!=null?b:"",(D=o==null?void 0:o.emailId)!=null?D:"",u);yield t==null?void 0:t.handleRefreshAuthMaterial(M),i(!1,!0),n("initial")}catch(M){console.error("Error confirming email OTP",M),p("Invalid code. Please try again."),C(!0)}finally{l(!1)}}),m=()=>x(this,null,function*(){var b;try{yield t==null?void 0:t.sendEmailOtp((b=o==null?void 0:o.email)!=null?b:"")}catch(D){p("Failed to resend code. Please try again.")}});return J(Ke,{children:[S(tt,{onClick:()=>{n("initial"),e(null)},iconColor:(f=r==null?void 0:r.colors)==null?void 0:f.textPrimary,ringColor:(v=r==null?void 0:r.colors)==null?void 0:v.accent}),J(Qe,{children:[S(Ne,{children:S(Ut,{customAccentColor:(h=r==null?void 0:r.colors)==null?void 0:h.accent,customButtonBackgroundColor:(A=r==null?void 0:r.colors)==null?void 0:A.buttonBackground,customBackgroundColor:(k=r==null?void 0:r.colors)==null?void 0:k.background})}),S(je,{appearance:r,children:"Check your email"}),J(Ve,{appearance:r,children:["A temporary login code has been sent to",S("br",{}),o!=null&&o.email?S("strong",{children:o.email}):"your email address"]}),S(qe,{children:S(Wt,{maxLength:6,value:u,onChange:b=>{y(b),C(!1),p(null)},onComplete:g,disabled:d,appearance:r,children:J(kt,{children:[S(j,{index:0,hasError:a}),S(j,{index:1,hasError:a}),S(j,{index:2,hasError:a}),S(j,{index:3,hasError:a}),S(j,{index:4,hasError:a}),S(j,{index:5,hasError:a})]})})}),J(Je,{appearance:r,children:["Can't find the email? Check spam folder.",S("br",{}),"Some emails may take several minutes to arrive."]}),S(Ft,{initialSeconds:60,appearance:r,countdownText:b=>`Re-send code in ${b}s`,countdownCompleteText:"Re-send code",handleOnClick:m})]})]})}import{useState as gt}from"react";import ie from"color";import R from"@emotion/styled";import{isEmailValid as ft}from"@crossmint/common-sdk-auth";import re from"@emotion/styled";import{jsx as pt,jsxs as Ze}from"react/jsx-runtime";var Xe=re.button`
|
|
46
|
+
${q}
|
|
47
|
+
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
gap: 8px;
|
|
52
|
+
height: 32px;
|
|
53
|
+
padding: 0 10px;
|
|
54
|
+
border: 1px solid ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.border)||c["cm-border"]}};
|
|
55
|
+
border-radius: ${o=>{var e;return((e=o.appearance)==null?void 0:e.borderRadius)||"12px"}};
|
|
56
|
+
background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.buttonBackground)||c["cm-background-primary"]}};
|
|
57
|
+
cursor: ${o=>o.isLoading?"not-allowed":"pointer"};
|
|
58
|
+
|
|
59
|
+
/* Hover and focus states */
|
|
60
|
+
&:hover {
|
|
61
|
+
background-color: ${o=>o.isLoading?c["cm-muted-primary"]:c["cm-hover"]};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:focus {
|
|
65
|
+
outline: none;
|
|
66
|
+
background-color: theme["cm-hover"];
|
|
67
|
+
}
|
|
68
|
+
`,Ye=re.span`
|
|
69
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||c["cm-accent"]}};
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
font-weight: 400;
|
|
72
|
+
`;function ne({emailInput:o,appearance:e}){var n,p;let{startOAuthLogin:t,activeOAuthProvider:r}=U(),i=r==="google";return Ze(Xe,{type:"button",appearance:e,isLoading:i,onClick:i?void 0:()=>t("google",o.trim().toLowerCase()),children:[pt(ot,{style:{height:"18px",width:"18px"}}),i?pt(K,{style:{color:(n=e==null?void 0:e.colors)==null?void 0:n.textSecondary,fill:(p=e==null?void 0:e.colors)==null?void 0:p.textPrimary,width:"18px",height:"18px"}}):pt(Ye,{appearance:e,children:"Continue"})]})}import{jsx as T,jsxs as ht}from"react/jsx-runtime";var to=R.div`
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
align-items: flex-start;
|
|
76
|
+
justify-content: flex-start;
|
|
77
|
+
width: 100%;
|
|
78
|
+
border-radius: 8px;
|
|
79
|
+
`,eo=R.div`
|
|
80
|
+
width: 100%;
|
|
81
|
+
`,oo=R.label`
|
|
82
|
+
display: block;
|
|
83
|
+
margin-bottom: 5px;
|
|
84
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||c["cm-text-primary"]}};
|
|
85
|
+
font-size: 14px;
|
|
86
|
+
font-weight: 400;
|
|
87
|
+
`,ro=R.form`
|
|
88
|
+
position: relative;
|
|
89
|
+
`,no=R.input`
|
|
90
|
+
${q}
|
|
91
|
+
|
|
92
|
+
/* Base input styles */
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-grow: 1;
|
|
95
|
+
text-align: left;
|
|
96
|
+
padding-left: 16px;
|
|
97
|
+
padding-right: ${o=>o.showGoogleButton?"132px":"80px"};
|
|
98
|
+
height: 58px;
|
|
99
|
+
width: 100%;
|
|
100
|
+
border: 1px solid;
|
|
101
|
+
border-color: ${o=>{var e,t,r,i;return o.hasError?((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||c["cm-danger"]:((i=(r=o.appearance)==null?void 0:r.colors)==null?void 0:i.border)||c["cm-border"]}};
|
|
102
|
+
border-radius: ${o=>{var e;return((e=o.appearance)==null?void 0:e.borderRadius)||"12px"}};
|
|
103
|
+
background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||c["cm-background-primary"]}};
|
|
104
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||c["cm-text-primary"]}};
|
|
105
|
+
font-size: 16px;
|
|
106
|
+
transition: border-color 200ms ease-in-out, box-shadow 200ms ease-in-out;
|
|
107
|
+
|
|
108
|
+
&::placeholder {
|
|
109
|
+
font-weight: 400;
|
|
110
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||c["cm-text-secondary"]}};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&:focus {
|
|
114
|
+
outline: none;
|
|
115
|
+
box-shadow: 0 0 0 2px ${o=>{var e,t;return new ie(((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||c["cm-accent"]).alpha(.18).toString()}};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&:read-only {
|
|
119
|
+
cursor: not-allowed;
|
|
120
|
+
opacity: 0.7;
|
|
121
|
+
}
|
|
122
|
+
`,io=R.div`
|
|
123
|
+
position: absolute;
|
|
124
|
+
right: 0;
|
|
125
|
+
top: 0;
|
|
126
|
+
bottom: 0;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
padding-right: 16px;
|
|
130
|
+
aspect-ratio: 1/1;
|
|
131
|
+
`,ao=R.button`
|
|
132
|
+
${q}
|
|
133
|
+
|
|
134
|
+
font-weight: 500;
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||c["cm-background-primary"]}};
|
|
137
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||c["cm-accent"]}};
|
|
138
|
+
cursor: ${o=>o.disabled?"not-allowed":"pointer"};
|
|
139
|
+
opacity: ${o=>o.disabled?.6:1};
|
|
140
|
+
border: none;
|
|
141
|
+
padding: 8px 12px;
|
|
142
|
+
border-radius: 6px;
|
|
143
|
+
transition: opacity 200ms ease;
|
|
144
|
+
|
|
145
|
+
&:hover:not(:disabled) {
|
|
146
|
+
opacity: 0.8;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&:focus-visible {
|
|
150
|
+
outline: 2px solid ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||c["cm-accent"]}};
|
|
151
|
+
outline-offset: 2px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&:not(:disabled):focus-visible {
|
|
155
|
+
box-shadow: 0 0 0 2px ${o=>{var e,t;return new ie(((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||c["cm-accent"]).alpha(.18).toString()}};
|
|
156
|
+
}
|
|
157
|
+
`,lo=R.p`
|
|
158
|
+
font-size: 12px;
|
|
159
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||c["cm-danger"]}};
|
|
160
|
+
margin: 8px 0 8px 0;
|
|
161
|
+
`;function ae({setOtpEmailData:o}){var s,f,v;let{crossmintAuth:e}=O(),{appearance:t,defaultEmail:r,setStep:i,setError:n,loginMethods:p}=w(),[u,y]=gt(r!=null?r:""),[a,C]=gt(""),[d,l]=gt(!1),g=u.toLowerCase().includes("@gmail.com")&&!u.toLowerCase().includes("+")&&ft(u)&&!d&&p.includes("google");function m(h){return x(this,null,function*(){h.preventDefault(),l(!0);try{let A=u.trim().toLowerCase(),k=yield e==null?void 0:e.sendEmailOtp(A);o({email:A,emailId:k.emailId}),i("otp")}catch(A){l(!1),n("Failed to send email. Please try again or contact support.")}})}return T(to,{children:ht(eo,{children:[T(oo,{appearance:t,children:"Email"}),ht(ro,{role:"form",onSubmit:h=>{if(g){h.preventDefault();return}ft(u)?m(h):h.preventDefault()},noValidate:!0,children:[T(Rt,{children:"Email"}),T(no,{id:"emailInput",appearance:t,hasError:!!a,showGoogleButton:g,type:"email",placeholder:"your@email.com",value:u,onChange:h=>{y(h.target.value),C(""),n(null)},readOnly:d,"aria-describedby":"emailError"}),ht(io,{children:[a&&T(et,{customColor:(s=t==null?void 0:t.colors)==null?void 0:s.danger}),d&&T(K,{style:{color:(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary,fill:(v=t==null?void 0:t.colors)==null?void 0:v.textPrimary}}),g?T(ne,{emailInput:u,appearance:t}):!a&&!d?T(ao,{type:"submit",appearance:t,disabled:!ft(u)||d,children:"Submit"}):null]})]}),a&&T(lo,{appearance:t,id:"emailError",children:a})]})})}import{jsx as le}from"react/jsx-runtime";function se(){let{step:o}=w(),[e,t]=so(null);return o==="otp"?le(oe,{otpEmailData:e,setOtpEmailData:t}):o==="initial"?le(ae,{setOtpEmailData:t}):null}import{jsx as xt}from"react/jsx-runtime";function ce(e){var o=Z(e,[]);var u;let{step:t,appearance:r}=w(),{startOAuthLogin:i,activeOAuthProvider:n}=U(),p=n==="google";return t!=="initial"?null:xt(Q,H(G({icon:xt(ot,{style:{height:"25px",width:"25px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("google")},o),{children:xt("span",{style:{color:(u=r==null?void 0:r.colors)==null?void 0:u.textPrimary},children:"Sign in with Google"})}))}import{useEffect as yt,useMemo as co,useState as uo}from"react";import{useSignIn as mo,QRCode as po}from"@farcaster/auth-kit";import B from"@emotion/styled";import{Fragment as bo,jsx as W,jsxs as it}from"react/jsx-runtime";var go=B.div`
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: column;
|
|
164
|
+
align-items: center;
|
|
165
|
+
gap: 16px;
|
|
166
|
+
`,fo=B.div`
|
|
167
|
+
text-align: center;
|
|
168
|
+
`,ho=B.h3`
|
|
169
|
+
font-size: 18px;
|
|
170
|
+
font-weight: 600;
|
|
171
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||c["cm-text-primary"]}};
|
|
172
|
+
margin: 0 0 8px 0;
|
|
173
|
+
`,xo=B.p`
|
|
174
|
+
font-size: 16px;
|
|
175
|
+
font-weight: 400;
|
|
176
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||c["cm-text-secondary"]}};
|
|
177
|
+
margin: 0;
|
|
178
|
+
`,yo=B.div`
|
|
179
|
+
background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||c["cm-background-primary"]}};
|
|
180
|
+
aspect-ratio: 1;
|
|
181
|
+
border-radius: ${o=>{var e;return((e=o.appearance)==null?void 0:e.borderRadius)||"8px"}};
|
|
182
|
+
padding: 16px;
|
|
183
|
+
display: flex;
|
|
184
|
+
align-items: center;
|
|
185
|
+
justify-content: center;
|
|
186
|
+
`,Co=B.div`
|
|
187
|
+
min-height: 246px;
|
|
188
|
+
display: flex;
|
|
189
|
+
align-items: center;
|
|
190
|
+
justify-content: center;
|
|
191
|
+
`,vo=B.p`
|
|
192
|
+
font-size: 16px;
|
|
193
|
+
text-align: center;
|
|
194
|
+
font-weight: 400;
|
|
195
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||c["cm-text-secondary"]}};
|
|
196
|
+
margin: 0;
|
|
197
|
+
`,wo=B.a`
|
|
198
|
+
font-size: 16px;
|
|
199
|
+
font-weight: 400;
|
|
200
|
+
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textLink)||c["cm-accent"]}};
|
|
201
|
+
text-decoration: none;
|
|
202
|
+
|
|
203
|
+
&:hover {
|
|
204
|
+
text-decoration: underline;
|
|
205
|
+
}
|
|
206
|
+
`;function ue(){let{step:o,appearance:e,setStep:t,setError:r}=w();return o==="initial"?W(Q,{icon:W(Dt,{style:{height:"25px",width:"25px"}}),appearance:e,onButtonClick:()=>{t("qrCode"),r(null)},children:"Sign in with Farcaster"}):o==="qrCode"?W(Ao,{}):null}function Ao(){var m,s,f,v;let{crossmintAuth:o}=O(),{appearance:e,setStep:t,setDialogOpen:r,setError:i}=w(),[n,p]=uo(null),u=co(()=>({onSuccess:h=>{p(h)}}),[]),{signIn:y,url:a,connect:C,signOut:d,isConnected:l}=mo(u),g=h=>x(this,null,function*(){i(null);try{let A=yield o==null?void 0:o.signInWithFarcaster(h);yield o==null?void 0:o.handleRefreshAuthMaterial(A),r(!1),t("initial")}catch(A){console.error("Error during Farcaster sign-in:",A),i("Failed to sign in with Farcaster")}});return yt(()=>{n!=null&&g(n)},[n]),yt(()=>{l&&y()},[l]),yt(()=>{C()},[]),it("div",{children:[W(tt,{onClick:()=>{d(),t("initial")},iconColor:(m=e==null?void 0:e.colors)==null?void 0:m.textPrimary,ringColor:(s=e==null?void 0:e.colors)==null?void 0:s.accent}),it(go,{children:[it(fo,{children:[W(ho,{appearance:e,children:"Sign in with Farcaster"}),W(xo,{appearance:e,children:"Scan with your phone's camera to continue."})]}),W(yo,{appearance:e,children:a!=null?W(po,{uri:a,size:280}):W(Co,{children:W(K,{style:{color:(f=e==null?void 0:e.colors)==null?void 0:f.textSecondary,fill:(v=e==null?void 0:e.colors)==null?void 0:v.textPrimary}})})}),a?it(bo,{children:[W(vo,{appearance:e,children:"Alternatively, click on this link to open Warpcast."}),W(wo,{href:a,rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Open Warpcast"})]}):W("div",{style:{height:"66px"}})]})]})}import{jsx as me}from"react/jsx-runtime";function de(e){var o=Z(e,[]);let{step:t,appearance:r}=w(),{startOAuthLogin:i,activeOAuthProvider:n}=U(),p=n==="twitter";return t!=="initial"?null:me(Q,H(G({icon:me(zt,{style:{height:"22px",width:"22px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("twitter")},o),{children:"Sign in with X"}))}import{jsx as E,jsxs as X}from"react/jsx-runtime";var So=pe.div`
|
|
207
|
+
position: relative;
|
|
208
|
+
padding: 40px 24px 30px 24px;
|
|
209
|
+
display: flex;
|
|
210
|
+
flex-direction: column;
|
|
211
|
+
gap: 10px;
|
|
212
|
+
-webkit-font-smoothing: antialiased;
|
|
213
|
+
animation: none;
|
|
214
|
+
|
|
215
|
+
@media (min-width: 480px) {
|
|
216
|
+
padding: 40px 40px 30px 40px;
|
|
217
|
+
}
|
|
218
|
+
`,Oo=pe.div`
|
|
219
|
+
display: flex;
|
|
220
|
+
align-items: flex-start;
|
|
221
|
+
justify-content: flex-start;
|
|
222
|
+
border-radius: 8px;
|
|
223
|
+
padding: 8px;
|
|
224
|
+
gap: 8px;
|
|
225
|
+
margin-top: 34px;
|
|
226
|
+
background-color: ${o=>{var e,t,r;return new Po((r=(t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)!=null?r:c["cm-danger"]).alpha(.12).toString()}};
|
|
227
|
+
`;function ge({style:o}){var y,a,C,d,l,g,m,s,f,v;let{step:e,appearance:t,loginMethods:r,baseUrl:i,error:n,termsOfServiceText:p,authModalTitle:u}=w();return X(So,{style:o,children:[n!=null?X(Oo,{appearance:t,children:[E("div",{style:{minWidth:"20px"},children:E(et,{customColor:(a=(y=t==null?void 0:t.colors)==null?void 0:y.danger)!=null?a:c["cm-danger"]})}),E("p",{style:{fontSize:"14px",margin:0,color:(d=(C=t==null?void 0:t.colors)==null?void 0:C.danger)!=null?d:c["cm-danger"]},children:n})]}):null,e==="initial"?X("div",{children:[E(Et,{appearance:t,children:u!=null?u:"Sign in to Crossmint"}),E(It,{appearance:t,children:"Access using one of the options below."})]}):null,r.includes("google")?E(ce,{}):null,r.includes("farcaster")?E($t,{baseUrl:i,children:E(ue,{})}):null,r.includes("twitter")?E(de,{}):null,r.some(h=>h.startsWith("web3"))?E(_t,{}):null,r.includes("email")?X("div",{children:[r.length>1?E(Bt,{appearance:t,text:"OR"}):null,E(se,{})]}):null,e==="initial"&&p!=null?X("div",{style:{fontSize:"0.875rem",textAlign:"center",marginTop:"0.5rem",color:(g=(l=t==null?void 0:t.colors)==null?void 0:l.textSecondary)!=null?g:c["cm-text-secondary"]},children:[E("style",{children:`
|
|
228
|
+
p a {
|
|
229
|
+
color: ${(s=(m=t==null?void 0:t.colors)==null?void 0:m.textLink)!=null?s:c["cm-link"]};
|
|
230
|
+
}
|
|
231
|
+
`}),p]}):null,e==="initial"||e==="otp"?E(Mt,{style:{marginTop:"1rem",justifyContent:"center"},color:(v=(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary)!=null?v:c["cm-text-secondary"]}):null]})}import{jsx as fe}from"react/jsx-runtime";function nt({open:o}){let{appearance:e,setDialogOpen:t}=w();return fe(Ot,{open:o,setDialogOpen:t,appearance:e,children:fe(ge,{style:{maxWidth:"448px",padding:"0px"}})})}export{nt as a,Gt as b,U as c,jt as d,Yt as e,mt as f,dr as g,O as h,oe as i,ne as j,ae as k,se as l,ce as m,ue as n,de as o,ge as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as C}from"./chunk-EA7H4AXL.js";import{a}from"./chunk-3NEYD7GW.js";import{a as m,b as u,c as s}from"./chunk-PXDN3KFO.js";import{useEffect as M,useState as N}from"react";import{useCrossmint as R}from"@crossmint/client-sdk-react-base";import{crossmintHostedCheckoutV3Service as T,crossmintHostedCheckoutV3StylesService as j}from"@crossmint/client-sdk-base";import w from"clsx";import{jsx as l,jsxs as D}from"react/jsx-runtime";function F(d){let[f,h]=N(!1),{crossmint:k}=R(),y=a(k),c=d,{recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v}=c,b=s(c,["recipient","locale","lineItems","payment","appearance","metadata"]),n={recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v},x=T({apiClient:y,hostedCheckoutProps:n}),t=j(n),p=b,{onClick:r,className:E,children:o}=p,I=s(p,["onClick","className","children"]);function B(e){e.preventDefault(),e.stopPropagation(),x.createWindow(),r&&r(e)}let i=t.generateCss();return M(()=>{let{cleanup:e}=t.injectCss(i);return h(!0),e},[i]),f?D("button",u(m({onClick:B,className:w(t.identifiers.buttonClassNames,E)},I),{children:[l(C,{style:{marginRight:"12px",flex:"none"},displayType:"icon-only",id:t.identifiers.logoId,height:16,width:16}),o!=null?o:l("p",{style:{margin:0},children:t.getButtonText()})]})):null}export{F as a};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import{a as f}from"./chunk-AOBO3CEQ.js";import{a}from"./chunk-DFSB3TWF.js";import{d as g}from"./chunk-PXDN3KFO.js";import{useState as C}from"react";import r from"@emotion/styled";import{jsx as i,jsxs as s}from"react/jsx-runtime";var b=r.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
max-width: 448px;
|
|
6
|
+
margin: 0 auto;
|
|
7
|
+
border-radius: 12px;
|
|
8
|
+
`,h=r.h2`
|
|
9
|
+
margin: 6px 0 8px 0;
|
|
10
|
+
font-size: 18px;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
color: ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.textPrimary)||a["cm-text-primary"]}};
|
|
13
|
+
`,v=r.div`
|
|
14
|
+
margin-bottom: 32px;
|
|
15
|
+
padding: 16px;
|
|
16
|
+
border-radius: 12px;
|
|
17
|
+
border: 1px solid ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.border)||a["cm-border"]}};
|
|
18
|
+
`,I=r.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
`,B=r.div`
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
margin-right: 12px;
|
|
24
|
+
`,w=r.span`
|
|
25
|
+
color: ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.textPrimary)||a["cm-text-primary"]}};
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
overflow-wrap: anywhere;
|
|
28
|
+
`,k=r.div`
|
|
29
|
+
color: ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.danger)||a["cm-danger"]}};
|
|
30
|
+
margin-bottom: 16px;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
`,S=r.div`
|
|
33
|
+
display: flex;
|
|
34
|
+
gap: 12px;
|
|
35
|
+
`,x=r.button`
|
|
36
|
+
flex: 1;
|
|
37
|
+
padding: 16px 24px;
|
|
38
|
+
border-radius: 9999px;
|
|
39
|
+
text-align: center;
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
font-size: 16px;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
transition: opacity 200ms ease;
|
|
44
|
+
border: none;
|
|
45
|
+
&:disabled {
|
|
46
|
+
cursor: not-allowed;
|
|
47
|
+
}
|
|
48
|
+
`,U=r(x)`
|
|
49
|
+
background: transparent;
|
|
50
|
+
border: 1px solid ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.border)||a["cm-border"]}};
|
|
51
|
+
color: ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.textPrimary)||a["cm-text-primary"]}};
|
|
52
|
+
&:hover:not(:disabled) {
|
|
53
|
+
opacity: 0.8;
|
|
54
|
+
}
|
|
55
|
+
`,$=r(x)`
|
|
56
|
+
background-color: ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.accent)||a["cm-accent"]}};
|
|
57
|
+
color: white;
|
|
58
|
+
opacity: ${e=>e.isLoading?.7:1};
|
|
59
|
+
&:hover:not(:disabled) {
|
|
60
|
+
opacity: 0.9;
|
|
61
|
+
}
|
|
62
|
+
`,L=r.div`
|
|
63
|
+
display: flex;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
align-items: center;
|
|
66
|
+
`;function T({contactInfo:e,icon:o,onConfirm:n,onCancel:u,appearance:t}){var m;let[c,d]=C(!1),[p,l]=C("");return s(b,{children:[i(h,{appearance:t,children:"Send authorization code to"}),i(v,{appearance:t,children:s(I,{children:[i(B,{children:o}),i(w,{appearance:t,children:e})]})}),p&&i(k,{appearance:t,children:p}),s(S,{children:[i(U,{onClick:u,appearance:t,children:"Cancel"}),i($,{onClick:()=>g(this,null,function*(){d(!0),l("");try{yield n(e)}catch(y){console.error("Error sending authorization code:",y),l("Failed to send code. Please try again.")}finally{d(!1)}}),disabled:c,isLoading:c,appearance:t,children:c?i(L,{children:i(f,{style:{color:((m=t==null?void 0:t.colors)==null?void 0:m.background)||a["cm-background-primary"]}})}):"Send code"})]})]})}export{T as a};
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import{a as l}from"./chunk-NZUCXN2O.js";import{a as o}from"./chunk-DFSB3TWF.js";import{a as p}from"./chunk-PXDN3KFO.js";import*as r from"react";import{createPortal as h}from"react-dom";import c from"@emotion/styled";import{CSSTransition as v}from"react-transition-group";import{jsx as n,jsxs as m}from"react/jsx-runtime";var C=c.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
inset: 0;
|
|
4
|
+
z-index: 999;
|
|
5
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
6
|
+
backdrop-filter: blur(8px);
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
padding: 16px;
|
|
11
|
+
|
|
12
|
+
/* Transition classes */
|
|
13
|
+
&.dialog-enter {
|
|
14
|
+
opacity: 0;
|
|
15
|
+
}
|
|
16
|
+
&.dialog-enter-active {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
transition: opacity 100ms ease;
|
|
19
|
+
}
|
|
20
|
+
&.dialog-exit {
|
|
21
|
+
opacity: 1;
|
|
22
|
+
}
|
|
23
|
+
&.dialog-exit-active {
|
|
24
|
+
opacity: 0;
|
|
25
|
+
transition: opacity 200ms ease;
|
|
26
|
+
}
|
|
27
|
+
`,R=c.dialog`
|
|
28
|
+
${l}
|
|
29
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
30
|
+
|
|
31
|
+
/* Modal styling */
|
|
32
|
+
position: relative;
|
|
33
|
+
background-color: ${t=>{var e,a;return((a=(e=t.appearance)==null?void 0:e.colors)==null?void 0:a.background)||o["cm-background-primary"]}};
|
|
34
|
+
border-radius: ${t=>{var e;return((e=t.appearance)==null?void 0:e.borderRadius)||"16px"}};
|
|
35
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
36
|
+
width: 100%;
|
|
37
|
+
max-height: 90vh;
|
|
38
|
+
padding: 32px;
|
|
39
|
+
overflow-y: auto;
|
|
40
|
+
|
|
41
|
+
/* Focus management */
|
|
42
|
+
&:focus {
|
|
43
|
+
outline: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Desktop styles and animations */
|
|
47
|
+
@media (min-width: 480px) {
|
|
48
|
+
max-width: 448px;
|
|
49
|
+
border-radius: ${t=>{var e;return((e=t.appearance)==null?void 0:e.borderRadius)||"24px"}};
|
|
50
|
+
padding: 40px 40px 30px;
|
|
51
|
+
|
|
52
|
+
/* Desktop transition classes */
|
|
53
|
+
.dialog-enter & {
|
|
54
|
+
transform: scale(0.95);
|
|
55
|
+
opacity: 0;
|
|
56
|
+
}
|
|
57
|
+
.dialog-enter-active & {
|
|
58
|
+
transform: scale(1);
|
|
59
|
+
opacity: 1;
|
|
60
|
+
transition: transform 200ms ease, opacity 100ms ease;
|
|
61
|
+
}
|
|
62
|
+
.dialog-exit & {
|
|
63
|
+
transform: scale(1);
|
|
64
|
+
opacity: 1;
|
|
65
|
+
}
|
|
66
|
+
.dialog-exit-active & {
|
|
67
|
+
transform: scale(0.95);
|
|
68
|
+
opacity: 0;
|
|
69
|
+
transition: transform 200ms ease, opacity 200ms ease;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Mobile styles and animations */
|
|
74
|
+
@media (max-width: 479px) {
|
|
75
|
+
position: fixed;
|
|
76
|
+
left: 0;
|
|
77
|
+
right: 0;
|
|
78
|
+
bottom: 8px;
|
|
79
|
+
width: calc(100% - 16px);
|
|
80
|
+
max-height: calc(100vh - 18px);
|
|
81
|
+
border-radius: ${t=>{var e;return((e=t.appearance)==null?void 0:e.borderRadius)||"36px 36px 50px 50px"}};
|
|
82
|
+
padding: 40px 30px;
|
|
83
|
+
margin: 0 auto;
|
|
84
|
+
|
|
85
|
+
/* Mobile transition classes */
|
|
86
|
+
.dialog-enter & {
|
|
87
|
+
transform: translateY(100%);
|
|
88
|
+
}
|
|
89
|
+
.dialog-enter-active & {
|
|
90
|
+
transform: translateY(0);
|
|
91
|
+
transition: transform 200ms ease;
|
|
92
|
+
}
|
|
93
|
+
.dialog-exit & {
|
|
94
|
+
transform: translateY(0);
|
|
95
|
+
}
|
|
96
|
+
.dialog-exit-active & {
|
|
97
|
+
transform: translateY(100%);
|
|
98
|
+
transition: transform 200ms ease;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`,k=c.button`
|
|
102
|
+
${l}
|
|
103
|
+
|
|
104
|
+
/* Close button styling */
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 28px;
|
|
107
|
+
right: 28px;
|
|
108
|
+
width: 32px;
|
|
109
|
+
height: 32px;
|
|
110
|
+
border-radius: 6px;
|
|
111
|
+
border: none;
|
|
112
|
+
z-index: 1000;
|
|
113
|
+
background-color: transparent;
|
|
114
|
+
color: ${t=>{var e,a,i;return(i=(a=(e=t.appearance)==null?void 0:e.colors)==null?void 0:a.textPrimary)!=null?i:o["cm-text-secondary"]}};
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
transition: all 0.15s ease;
|
|
120
|
+
|
|
121
|
+
&:hover {
|
|
122
|
+
background-color: ${t=>{var e,a;return((a=(e=t==null?void 0:t.appearance)==null?void 0:e.colors)==null?void 0:a.backgroundSecondary)||o["cm-hover"]}};
|
|
123
|
+
color: ${t=>{var e,a,i;return(i=(a=(e=t.appearance)==null?void 0:e.colors)==null?void 0:a.textPrimary)!=null?i:o["cm-text-secondary"]}};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:focus {
|
|
127
|
+
outline: none;
|
|
128
|
+
background-color: ${t=>{var e,a;return((a=(e=t==null?void 0:t.appearance)==null?void 0:e.colors)==null?void 0:a.backgroundSecondary)||o["cm-hover"]}};
|
|
129
|
+
box-shadow: 0 0 0 2px ${t=>{var e,a;return((a=(e=t.appearance)==null?void 0:e.colors)==null?void 0:a.accent)||o["cm-accent"]}};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
svg {
|
|
133
|
+
width: 28px;
|
|
134
|
+
height: 28px;
|
|
135
|
+
}
|
|
136
|
+
`,w=c.h2`
|
|
137
|
+
${l}
|
|
138
|
+
|
|
139
|
+
/* Title styling */
|
|
140
|
+
display: block;
|
|
141
|
+
font-size: 24px;
|
|
142
|
+
font-weight: 600;
|
|
143
|
+
line-height: 1.3;
|
|
144
|
+
color: ${t=>{var e,a;return((a=(e=t.appearance)==null?void 0:e.colors)==null?void 0:a.textPrimary)||o["cm-text-primary"]}};
|
|
145
|
+
margin: 0 0 2px 0;
|
|
146
|
+
`,S=c.p`
|
|
147
|
+
${l}
|
|
148
|
+
|
|
149
|
+
/* Description styling */
|
|
150
|
+
display: block;
|
|
151
|
+
font-size: 16px;
|
|
152
|
+
font-weight: 400;
|
|
153
|
+
line-height: 1.5;
|
|
154
|
+
color: ${t=>{var e,a;return((a=(e=t.appearance)==null?void 0:e.colors)==null?void 0:a.textSecondary)||o["cm-text-secondary"]}};
|
|
155
|
+
margin: 0 0 12px 0;
|
|
156
|
+
`,$=c.div`
|
|
157
|
+
/* Content wrapper */
|
|
158
|
+
display: flex;
|
|
159
|
+
flex-direction: column;
|
|
160
|
+
`,B=({open:t,setDialogOpen:e,appearance:a,style:i,children:f,closeOnOverlayClick:x=!1,showCloseButton:y=!0})=>{let[g,u]=r.useState(!1),d=r.useRef(null);return r.useEffect(()=>{u(!0)},[]),r.useEffect(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]),r.useEffect(()=>{let s=b=>{b.key==="Escape"&&t&&(e==null||e(!1))};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t,e]),g?h(n(v,{nodeRef:d,in:t,timeout:200,classNames:"dialog",unmountOnExit:!0,mountOnEnter:!0,children:n(C,{ref:d,onClick:x?s=>{s.target===s.currentTarget&&(e==null||e(!1))}:void 0,children:m(R,{appearance:a,style:p({},i),children:[y&&n(k,{onClick:()=>e==null?void 0:e(!1),appearance:a,children:m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n("path",{d:"M18 6 6 18"}),n("path",{d:"m6 6 12 12"})]})}),n($,{children:f})]})})}),document.body):null},F=({children:t,style:e,appearance:a})=>n(w,{style:e,appearance:a,children:t}),N=({children:t,style:e,appearance:a})=>n(S,{style:e,appearance:a,children:t});export{B as a,F as b,N as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkOVJIGWD7cjs = require('./chunk-OVJIGWD7.cjs');var _chunk5J6CUTGJcjs = require('./chunk-5J6CUTGJ.cjs');var _chunkEDALAJ5Icjs = require('./chunk-EDALAJ5I.cjs');var _chunkYGN7O63Xcjs = require('./chunk-YGN7O63X.cjs');var _chunkAO2V2B62cjs = require('./chunk-AO2V2B62.cjs');var _jsxruntime = require('react/jsx-runtime');function B({phone:i,open:e,setOpen:S,step:r,onSubmitOTP:v,onResendOTPCode:D,onSubmitPhone:h,rejectRef:n,appearance:o}){var l,m;function s(O){var c;(e||O)&&((c=n.current)==null||c.call(n,new Error),S(!1))}return _jsxruntime.jsxs.call(void 0, _chunkAO2V2B62cjs.a,{open:e,setDialogOpen:s,appearance:o,style:{overflow:"hidden"},children:[r==="initial"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkAO2V2B62cjs.b,{appearance:o,children:"Confirm it's you"}),_jsxruntime.jsx.call(void 0, _chunkAO2V2B62cjs.c,{appearance:o,children:"You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code via SMS."})]}):null,r==="otp"?_jsxruntime.jsx.call(void 0, _chunk5J6CUTGJcjs.a,{contactInfo:i!=null?i:"",contactType:"phone",icon:_jsxruntime.jsx.call(void 0, _chunkYGN7O63Xcjs.a,{customAccentColor:(l=o==null?void 0:o.colors)==null?void 0:l.accent,customBackgroundColor:(m=o==null?void 0:o.colors)==null?void 0:m.background}),title:"Check your phone",description:`A temporary login code has been sent via SMS to <strong>${i}</strong>`,helpText:`Can't receive the SMS? Check your phone number.
|
|
2
|
+
Some messages may take several minutes to arrive.`,onSubmitOTP:v,onResendCode:D,appearance:o}):_jsxruntime.jsx.call(void 0, _chunkOVJIGWD7cjs.a,{contactInfo:i!=null?i:"",icon:_jsxruntime.jsx.call(void 0, _chunkEDALAJ5Icjs.a,{}),onConfirm:h,onCancel:s,appearance:o})]})}exports.a = B;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import{a as r}from"./chunk-DFSB3TWF.js";import{a as s,b as f,c as d}from"./chunk-PXDN3KFO.js";import*as c from"react";import{OTPInput as R,OTPInputContext as h}from"input-otp";import{createContext as I,useContext as b}from"react";import p from"@emotion/styled";import{keyframes as g}from"@emotion/react";import{jsx as i,jsxs as B}from"react/jsx-runtime";var C=I(void 0),O=p.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 8px;
|
|
5
|
+
|
|
6
|
+
&:has(:disabled) {
|
|
7
|
+
opacity: 0.5;
|
|
8
|
+
}
|
|
9
|
+
`,T=p(R)`
|
|
10
|
+
&:disabled {
|
|
11
|
+
cursor: not-allowed;
|
|
12
|
+
}
|
|
13
|
+
`,v=c.forwardRef((n,o)=>{var a=n,{appearance:e}=a,t=d(a,["appearance"]);return i(C.Provider,{value:e,children:i(O,{children:i(T,s({autoFocus:!0,ref:o},t))})})});v.displayName="InputOTP";var k=p.div`
|
|
14
|
+
display: flex;
|
|
15
|
+
gap: 8px;
|
|
16
|
+
align-items: center;
|
|
17
|
+
`,$=c.forwardRef((o,t)=>{var e=d(o,[]);return i(k,s({ref:t},e))});$.displayName="InputOTPGroup";var w=g`
|
|
18
|
+
0%, 50% { opacity: 1; }
|
|
19
|
+
51%, 100% { opacity: 0; }
|
|
20
|
+
`,E=p.div`
|
|
21
|
+
position: relative;
|
|
22
|
+
display: flex;
|
|
23
|
+
height: 56px;
|
|
24
|
+
width: 48px;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
border: 1px solid;
|
|
28
|
+
font-size: 18px;
|
|
29
|
+
transition: all 200ms ease;
|
|
30
|
+
border-radius: ${e=>{var t;return((t=e.appearance)==null?void 0:t.borderRadius)||"6px"}};
|
|
31
|
+
border-color: ${e=>{var t,o,n,a;return e.hasError?((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.danger)||r["cm-danger"]:((a=(n=e.appearance)==null?void 0:n.colors)==null?void 0:a.border)||r["cm-border"]}};
|
|
32
|
+
background-color: ${e=>{var t,o,n,a;return e.hasChar?((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.buttonBackground)||r["cm-muted-primary"]:((a=(n=e.appearance)==null?void 0:n.colors)==null?void 0:a.inputBackground)||r["cm-background-primary"]}};
|
|
33
|
+
color: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.textPrimary)||r["cm-text-primary"]}};
|
|
34
|
+
box-shadow: ${e=>{var t,o;return e.isActive?`0 0 0 2px ${((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.accent)||r["cm-accent"]}`:"none"}};
|
|
35
|
+
z-index: ${e=>e.isActive?10:1};
|
|
36
|
+
`,S=p.div`
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
position: absolute;
|
|
39
|
+
inset: 0;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
`,A=p.div`
|
|
44
|
+
height: 18px;
|
|
45
|
+
width: 1px;
|
|
46
|
+
background-color: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.textPrimary)||r["cm-text-primary"]}};
|
|
47
|
+
animation: ${w} 1000ms infinite;
|
|
48
|
+
`,U=c.forwardRef((a,n)=>{var l=a,{index:e,hasError:t}=l,o=d(l,["index","hasError"]);let P=c.useContext(h),{char:m,hasFakeCaret:x,isActive:y}=P.slots[e],u=b(C);return B(E,f(s({ref:n,appearance:u,hasError:t,isActive:y,hasChar:!!m},o),{children:[m,x&&i(S,{children:i(A,{appearance:u})})]}))});U.displayName="InputOTPSlot";export{v as a,$ as b,U as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as l,jsxs as h}from"react/jsx-runtime";function C({style:t}){return h("svg",{width:"25",height:"25",x:"0px",y:"0px",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",style:t,children:[l("path",{fill:"#fbc02d",d:"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12 s5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24s8.955,20,20,20 s20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"}),l("path",{fill:"#e53935",d:"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039 l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"}),l("path",{fill:"#4caf50",d:"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36 c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"}),l("path",{fill:"#1565c0",d:"M43.611,20.083L43.595,20L42,20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571 c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"})]})}export{C as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-LUSXGZYB.js";import{a as u}from"./chunk-36S5R2NM.js";import{a as C}from"./chunk-XFYW7RD2.js";import{a as P}from"./chunk-BWCRTWMO.js";import{a as g,b as d,c as f}from"./chunk-MN6UTXVP.js";import{Fragment as y,jsx as t,jsxs as b}from"react/jsx-runtime";function A({phone:i,open:e,setOpen:S,step:r,onSubmitOTP:v,onResendOTPCode:D,onSubmitPhone:h,rejectRef:n,appearance:o}){var l,m;function s(O){var c;(e||O)&&((c=n.current)==null||c.call(n,new Error),S(!1))}return b(g,{open:e,setDialogOpen:s,appearance:o,style:{overflow:"hidden"},children:[r==="initial"?b(y,{children:[t(d,{appearance:o,children:"Confirm it's you"}),t(f,{appearance:o,children:"You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code via SMS."})]}):null,r==="otp"?t(u,{contactInfo:i!=null?i:"",contactType:"phone",icon:t(P,{customAccentColor:(l=o==null?void 0:o.colors)==null?void 0:l.accent,customBackgroundColor:(m=o==null?void 0:o.colors)==null?void 0:m.background}),title:"Check your phone",description:`A temporary login code has been sent via SMS to <strong>${i}</strong>`,helpText:`Can't receive the SMS? Check your phone number.
|
|
2
|
+
Some messages may take several minutes to arrive.`,onSubmitOTP:v,onResendCode:D,appearance:o}):t(a,{contactInfo:i!=null?i:"",icon:t(C,{}),onConfirm:h,onCancel:s,appearance:o})]})}export{A as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4RD5CZ3Dcjs = require('./chunk-4RD5CZ3D.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');function n(r){_clientsdkbase.assertValidValidateNFTDetailProps.call(void 0, r);let o=_clientsdkbase.getNFTDetailSrc.call(void 0, r,_chunk4RD5CZ3Dcjs.a);return _jsxruntime.jsx.call(void 0, "iframe",{src:o,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-details"})}exports.a = n;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkAHMPKIEYcjs = require('./chunk-AHMPKIEY.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _jsxruntime = require('react/jsx-runtime');var b=_styled2.default.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
max-width: 448px;
|
|
6
|
+
margin: 0 auto;
|
|
7
|
+
border-radius: 12px;
|
|
8
|
+
`,h=_styled2.default.h2`
|
|
9
|
+
margin: 6px 0 8px 0;
|
|
10
|
+
font-size: 18px;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
color: ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.textPrimary)||_chunkEAWYV5ZOcjs.a["cm-text-primary"]}};
|
|
13
|
+
`,v=_styled2.default.div`
|
|
14
|
+
margin-bottom: 32px;
|
|
15
|
+
padding: 16px;
|
|
16
|
+
border-radius: 12px;
|
|
17
|
+
border: 1px solid ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.border)||_chunkEAWYV5ZOcjs.a["cm-border"]}};
|
|
18
|
+
`,I=_styled2.default.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
`,B=_styled2.default.div`
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
margin-right: 12px;
|
|
24
|
+
`,w=_styled2.default.span`
|
|
25
|
+
color: ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.textPrimary)||_chunkEAWYV5ZOcjs.a["cm-text-primary"]}};
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
overflow-wrap: anywhere;
|
|
28
|
+
`,k=_styled2.default.div`
|
|
29
|
+
color: ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.danger)||_chunkEAWYV5ZOcjs.a["cm-danger"]}};
|
|
30
|
+
margin-bottom: 16px;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
`,S=_styled2.default.div`
|
|
33
|
+
display: flex;
|
|
34
|
+
gap: 12px;
|
|
35
|
+
`,x=_styled2.default.button`
|
|
36
|
+
flex: 1;
|
|
37
|
+
padding: 16px 24px;
|
|
38
|
+
border-radius: 9999px;
|
|
39
|
+
text-align: center;
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
font-size: 16px;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
transition: opacity 200ms ease;
|
|
44
|
+
border: none;
|
|
45
|
+
&:disabled {
|
|
46
|
+
cursor: not-allowed;
|
|
47
|
+
}
|
|
48
|
+
`,U=_styled2.default.call(void 0, x)`
|
|
49
|
+
background: transparent;
|
|
50
|
+
border: 1px solid ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.border)||_chunkEAWYV5ZOcjs.a["cm-border"]}};
|
|
51
|
+
color: ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.textPrimary)||_chunkEAWYV5ZOcjs.a["cm-text-primary"]}};
|
|
52
|
+
&:hover:not(:disabled) {
|
|
53
|
+
opacity: 0.8;
|
|
54
|
+
}
|
|
55
|
+
`,$=_styled2.default.call(void 0, x)`
|
|
56
|
+
background-color: ${e=>{var o,n;return((n=(o=e.appearance)==null?void 0:o.colors)==null?void 0:n.accent)||_chunkEAWYV5ZOcjs.a["cm-accent"]}};
|
|
57
|
+
color: white;
|
|
58
|
+
opacity: ${e=>e.isLoading?.7:1};
|
|
59
|
+
&:hover:not(:disabled) {
|
|
60
|
+
opacity: 0.9;
|
|
61
|
+
}
|
|
62
|
+
`,L=_styled2.default.div`
|
|
63
|
+
display: flex;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
align-items: center;
|
|
66
|
+
`;function R({contactInfo:e,icon:o,onConfirm:n,onCancel:u,appearance:t}){var m;let[c,d]=_react.useState.call(void 0, !1),[p,l]=_react.useState.call(void 0, "");return _jsxruntime.jsxs.call(void 0, b,{children:[_jsxruntime.jsx.call(void 0, h,{appearance:t,children:"Send authorization code to"}),_jsxruntime.jsx.call(void 0, v,{appearance:t,children:_jsxruntime.jsxs.call(void 0, I,{children:[_jsxruntime.jsx.call(void 0, B,{children:o}),_jsxruntime.jsx.call(void 0, w,{appearance:t,children:e})]})}),p&&_jsxruntime.jsx.call(void 0, k,{appearance:t,children:p}),_jsxruntime.jsxs.call(void 0, S,{children:[_jsxruntime.jsx.call(void 0, U,{onClick:u,appearance:t,children:"Cancel"}),_jsxruntime.jsx.call(void 0, $,{onClick:()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){d(!0),l("");try{yield n(e)}catch(y){console.error("Error sending authorization code:",y),l("Failed to send code. Please try again.")}finally{d(!1)}}),disabled:c,isLoading:c,appearance:t,children:c?_jsxruntime.jsx.call(void 0, L,{children:_jsxruntime.jsx.call(void 0, _chunkAHMPKIEYcjs.a,{style:{color:((m=t==null?void 0:t.colors)==null?void 0:m.background)||_chunkEAWYV5ZOcjs.a["cm-background-primary"]}})}):"Send code"})]})]})}exports.a = R;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";function s({style:o}){return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:o,children:[t("path",{d:"m12 19-7-7 7-7"}),t("path",{d:"M19 12H5"})]})}export{s as a};
|