@openfort/react 0.3.2 → 1.0.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/build/assets/browsers.js +13 -0
- package/build/assets/browsers.js.map +1 -0
- package/build/assets/chains.js +139 -0
- package/build/assets/chains.js.map +1 -0
- package/build/assets/icons.js +41 -0
- package/build/assets/icons.js.map +1 -0
- package/build/assets/logos.js +173 -0
- package/build/assets/logos.js.map +1 -0
- package/build/assets/wave.js +6 -0
- package/build/assets/wave.js.map +1 -0
- package/build/components/BalanceButton/index.js +89 -0
- package/build/components/BalanceButton/index.js.map +1 -0
- package/build/components/Common/Alert/index.js +10 -0
- package/build/components/Common/Alert/index.js.map +1 -0
- package/build/components/Common/Alert/styles.js +55 -0
- package/build/components/Common/Alert/styles.js.map +1 -0
- package/build/components/Common/Avatar/index.d.ts +11 -3
- package/build/components/Common/Avatar/index.js +100 -0
- package/build/components/Common/Avatar/index.js.map +1 -0
- package/build/components/Common/Avatar/styles.js +59 -0
- package/build/components/Common/Avatar/styles.js.map +1 -0
- package/build/components/Common/BrowserIcon/index.js +28 -0
- package/build/components/Common/BrowserIcon/index.js.map +1 -0
- package/build/components/Common/BrowserIcon/styles.js +20 -0
- package/build/components/Common/BrowserIcon/styles.js.map +1 -0
- package/build/components/Common/Button/index.js +36 -0
- package/build/components/Common/Button/index.js.map +1 -0
- package/build/components/Common/Button/styles.js +302 -0
- package/build/components/Common/Button/styles.js.map +1 -0
- package/build/components/Common/Button/types.d.ts +1 -0
- package/build/components/Common/Chain/index.d.ts +8 -0
- package/build/components/Common/Chain/index.js +38 -0
- package/build/components/Common/Chain/index.js.map +1 -0
- package/build/components/Common/Chain/styles.js +94 -0
- package/build/components/Common/Chain/styles.js.map +1 -0
- package/build/components/Common/ConnectorList/index.js +58 -0
- package/build/components/Common/ConnectorList/index.js.map +1 -0
- package/build/components/Common/ConnectorList/styles.js +324 -0
- package/build/components/Common/ConnectorList/styles.js.map +1 -0
- package/build/components/Common/CopyToClipboard/CopyButton.js +12 -0
- package/build/components/Common/CopyToClipboard/CopyButton.js.map +1 -0
- package/build/components/Common/CopyToClipboard/CopyIcon.js +76 -0
- package/build/components/Common/CopyToClipboard/CopyIcon.js.map +1 -0
- package/build/components/Common/CopyToClipboard/CopyIconButton.js +38 -0
- package/build/components/Common/CopyToClipboard/CopyIconButton.js.map +1 -0
- package/build/components/Common/CopyToClipboard/CopyText.js +26 -0
- package/build/components/Common/CopyToClipboard/CopyText.js.map +1 -0
- package/build/components/Common/CustomQRCode/QRCode.js +60 -0
- package/build/components/Common/CustomQRCode/QRCode.js.map +1 -0
- package/build/components/Common/CustomQRCode/index.js +22 -0
- package/build/components/Common/CustomQRCode/index.js.map +1 -0
- package/build/components/Common/CustomQRCode/styles.js +155 -0
- package/build/components/Common/CustomQRCode/styles.js.map +1 -0
- package/build/components/Common/FitText/index.js +28 -0
- package/build/components/Common/FitText/index.js.map +1 -0
- package/build/components/Common/Input/index.js +17 -0
- package/build/components/Common/Input/index.js.map +1 -0
- package/build/components/Common/Input/styles.js +53 -0
- package/build/components/Common/Input/styles.js.map +1 -0
- package/build/components/Common/LargeButton/index.js +10 -0
- package/build/components/Common/LargeButton/index.js.map +1 -0
- package/build/components/Common/LargeButton/styles.js +69 -0
- package/build/components/Common/LargeButton/styles.js.map +1 -0
- package/build/components/Common/Loading/index.js +96 -0
- package/build/components/Common/Loading/index.js.map +1 -0
- package/build/components/Common/Modal/index.js +272 -0
- package/build/components/Common/Modal/index.js.map +1 -0
- package/build/components/Common/Modal/styles.d.ts +0 -1
- package/build/components/Common/Modal/styles.js +657 -0
- package/build/components/Common/Modal/styles.js.map +1 -0
- package/build/components/Common/OTPInput/index.js +108 -0
- package/build/components/Common/OTPInput/index.js.map +1 -0
- package/build/components/Common/OTPInput/styles.js +153 -0
- package/build/components/Common/OTPInput/styles.js.map +1 -0
- package/build/components/Common/Portal/index.js +31 -0
- package/build/components/Common/Portal/index.js.map +1 -0
- package/build/components/Common/PoweredByFooter/index.js +103 -0
- package/build/components/Common/PoweredByFooter/index.js.map +1 -0
- package/build/components/Common/Providers/ProviderHeader.d.ts +2 -2
- package/build/components/Common/Providers/ProviderHeader.js +55 -0
- package/build/components/Common/Providers/ProviderHeader.js.map +1 -0
- package/build/components/Common/Providers/ProviderIcon.d.ts +2 -2
- package/build/components/Common/Providers/ProviderIcon.js +41 -0
- package/build/components/Common/Providers/ProviderIcon.js.map +1 -0
- package/build/components/Common/Providers/getProviderName.d.ts +1 -1
- package/build/components/Common/Providers/getProviderName.js +15 -0
- package/build/components/Common/Providers/getProviderName.js.map +1 -0
- package/build/components/Common/ScrollArea/index.js +58 -0
- package/build/components/Common/ScrollArea/index.js.map +1 -0
- package/build/components/Common/ScrollArea/styles.js +168 -0
- package/build/components/Common/ScrollArea/styles.js.map +1 -0
- package/build/components/Common/Spinner/index.js +24 -0
- package/build/components/Common/Spinner/index.js.map +1 -0
- package/build/components/Common/Spinner/styles.js +22 -0
- package/build/components/Common/Spinner/styles.js.map +1 -0
- package/build/components/Common/SquircleSpinner/index.js +15 -0
- package/build/components/Common/SquircleSpinner/index.js.map +1 -0
- package/build/components/Common/SquircleSpinner/styles.js +66 -0
- package/build/components/Common/SquircleSpinner/styles.js.map +1 -0
- package/build/components/Common/ThemedButton/index.js +25 -0
- package/build/components/Common/ThemedButton/index.js.map +1 -0
- package/build/components/Common/ThemedButton/styles.js +152 -0
- package/build/components/Common/ThemedButton/styles.js.map +1 -0
- package/build/components/Common/TickList/index.js +11 -0
- package/build/components/Common/TickList/index.js.map +1 -0
- package/build/components/Common/TickList/styles.js +28 -0
- package/build/components/Common/TickList/styles.js.map +1 -0
- package/build/components/Common/Tooltip/index.js +91 -0
- package/build/components/Common/Tooltip/index.js.map +1 -0
- package/build/components/Common/Tooltip/styles.js +81 -0
- package/build/components/Common/Tooltip/styles.js.map +1 -0
- package/build/components/Common/WalletRecoveryIcon/index.d.ts +4 -0
- package/build/components/Common/WalletRecoveryIcon/index.js +19 -0
- package/build/components/Common/WalletRecoveryIcon/index.js.map +1 -0
- package/build/components/ConnectButton/index.d.ts +12 -4
- package/build/components/ConnectButton/index.js +266 -0
- package/build/components/ConnectButton/index.js.map +1 -0
- package/build/components/ConnectButton/styles.js +50 -0
- package/build/components/ConnectButton/styles.js.map +1 -0
- package/build/components/ConnectKitThemeProvider/ConnectKitThemeProvider.js +20 -0
- package/build/components/ConnectKitThemeProvider/ConnectKitThemeProvider.js.map +1 -0
- package/build/components/ConnectModal/ConnectUsing.d.ts +1 -1
- package/build/components/ConnectModal/ConnectUsing.js +68 -0
- package/build/components/ConnectModal/ConnectUsing.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.js +17 -0
- package/build/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithInjector/CircleSpinner/styles.js +118 -0
- package/build/components/ConnectModal/ConnectWithInjector/CircleSpinner/styles.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithInjector/index.d.ts +0 -2
- package/build/components/ConnectModal/ConnectWithInjector/index.js +295 -0
- package/build/components/ConnectModal/ConnectWithInjector/index.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithInjector/styles.js +133 -0
- package/build/components/ConnectModal/ConnectWithInjector/styles.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithMobile.js +99 -0
- package/build/components/ConnectModal/ConnectWithMobile.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithOAuth.js +128 -0
- package/build/components/ConnectModal/ConnectWithOAuth.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithQRCode.js +78 -0
- package/build/components/ConnectModal/ConnectWithQRCode.js.map +1 -0
- package/build/components/ConnectModal/index.js +230 -0
- package/build/components/ConnectModal/index.js.map +1 -0
- package/build/components/FloatingGraphic/index.js +13 -0
- package/build/components/FloatingGraphic/index.js.map +1 -0
- package/build/components/FloatingGraphic/styles.js +175 -0
- package/build/components/FloatingGraphic/styles.js.map +1 -0
- package/build/components/Openfort/OpenfortProvider.d.ts +10 -25
- package/build/components/Openfort/OpenfortProvider.js +351 -0
- package/build/components/Openfort/OpenfortProvider.js.map +1 -0
- package/build/components/Openfort/context.d.ts +48 -5
- package/build/components/Openfort/context.js +7 -0
- package/build/components/Openfort/context.js.map +1 -0
- package/build/components/Openfort/routeHelpers.d.ts +5 -0
- package/build/components/Openfort/routeHelpers.js +20 -0
- package/build/components/Openfort/routeHelpers.js.map +1 -0
- package/build/components/Openfort/types.d.ts +57 -23
- package/build/components/Openfort/types.js +119 -0
- package/build/components/Openfort/types.js.map +1 -0
- package/build/components/Openfort/useOpenfort.d.ts +2 -0
- package/build/components/Openfort/useOpenfort.js +12 -0
- package/build/components/Openfort/useOpenfort.js.map +1 -0
- package/build/components/PageContent/index.js +55 -0
- package/build/components/PageContent/index.js.map +1 -0
- package/build/components/PageContent/styles.js +11 -0
- package/build/components/PageContent/styles.js.map +1 -0
- package/build/components/Pages/About/graphics.js +193 -0
- package/build/components/Pages/About/graphics.js.map +1 -0
- package/build/components/Pages/About/index.js +142 -0
- package/build/components/Pages/About/index.js.map +1 -0
- package/build/components/Pages/About/styles.js +142 -0
- package/build/components/Pages/About/styles.js.map +1 -0
- package/build/components/Pages/AssetInventory/index.js +66 -0
- package/build/components/Pages/AssetInventory/index.js.map +1 -0
- package/build/components/Pages/Buy/coinbaseApi.js +106 -0
- package/build/components/Pages/Buy/coinbaseApi.js.map +1 -0
- package/build/components/Pages/Buy/index.js +88 -0
- package/build/components/Pages/Buy/index.js.map +1 -0
- package/build/components/Pages/Buy/onrampApi.js +57 -0
- package/build/components/Pages/Buy/onrampApi.js.map +1 -0
- package/build/components/Pages/Buy/providers.js +39 -0
- package/build/components/Pages/Buy/providers.js.map +1 -0
- package/build/components/Pages/Buy/stripeApi.js +74 -0
- package/build/components/Pages/Buy/stripeApi.js.map +1 -0
- package/build/components/Pages/Buy/styles.js +230 -0
- package/build/components/Pages/Buy/styles.js.map +1 -0
- package/build/components/Pages/Buy/utils.js +71 -0
- package/build/components/Pages/Buy/utils.js.map +1 -0
- package/build/components/Pages/BuyComplete/index.js +47 -0
- package/build/components/Pages/BuyComplete/index.js.map +1 -0
- package/build/components/Pages/BuyProcessing/index.js +231 -0
- package/build/components/Pages/BuyProcessing/index.js.map +1 -0
- package/build/components/Pages/BuyProviderSelect/index.js +55 -0
- package/build/components/Pages/BuyProviderSelect/index.js.map +1 -0
- package/build/components/Pages/BuyProviderSelect/styles.js +103 -0
- package/build/components/Pages/BuyProviderSelect/styles.js.map +1 -0
- package/build/components/Pages/BuySelectProvider/index.js +245 -0
- package/build/components/Pages/BuySelectProvider/index.js.map +1 -0
- package/build/components/Pages/Connected/ConnectedPageLayout.d.ts +22 -0
- package/build/components/Pages/Connected/ConnectedPageLayout.js +11 -0
- package/build/components/Pages/Connected/ConnectedPageLayout.js.map +1 -0
- package/build/components/Pages/Connected/EthereumConnected.d.ts +3 -0
- package/build/components/Pages/Connected/EthereumConnected.js +133 -0
- package/build/components/Pages/Connected/EthereumConnected.js.map +1 -0
- package/build/components/Pages/Connected/SolanaConnected.d.ts +3 -0
- package/build/components/Pages/Connected/SolanaConnected.js +96 -0
- package/build/components/Pages/Connected/SolanaConnected.js.map +1 -0
- package/build/components/Pages/Connected/index.d.ts +2 -2
- package/build/components/Pages/Connected/index.js +18 -0
- package/build/components/Pages/Connected/index.js.map +1 -0
- package/build/components/Pages/Connected/styles.js +122 -0
- package/build/components/Pages/Connected/styles.js.map +1 -0
- package/build/components/Pages/ConnectedSuccess/index.js +19 -0
- package/build/components/Pages/ConnectedSuccess/index.js.map +1 -0
- package/build/components/Pages/Connectors/index.js +73 -0
- package/build/components/Pages/Connectors/index.js.map +1 -0
- package/build/components/Pages/CreateGuestUserPage/index.js +28 -0
- package/build/components/Pages/CreateGuestUserPage/index.js.map +1 -0
- package/build/components/Pages/CreateWallet/SolanaCreateWallet.d.ts +6 -0
- package/build/components/Pages/CreateWallet/SolanaCreateWallet.js +241 -0
- package/build/components/Pages/CreateWallet/SolanaCreateWallet.js.map +1 -0
- package/build/components/Pages/CreateWallet/index.js +303 -0
- package/build/components/Pages/CreateWallet/index.js.map +1 -0
- package/build/components/Pages/CreateWallet/styles.js +17 -0
- package/build/components/Pages/CreateWallet/styles.js.map +1 -0
- package/build/components/Pages/DownloadApp/index.js +32 -0
- package/build/components/Pages/DownloadApp/index.js.map +1 -0
- package/build/components/Pages/EmailLogin/index.js +118 -0
- package/build/components/Pages/EmailLogin/index.js.map +1 -0
- package/build/components/Pages/EmailLogin/styles.js +24 -0
- package/build/components/Pages/EmailLogin/styles.js.map +1 -0
- package/build/components/Pages/EmailOTP/index.js +116 -0
- package/build/components/Pages/EmailOTP/index.js.map +1 -0
- package/build/components/Pages/EmailOTP/styles.js +38 -0
- package/build/components/Pages/EmailOTP/styles.js.map +1 -0
- package/build/components/Pages/EmailVerification/index.js +86 -0
- package/build/components/Pages/EmailVerification/index.js.map +1 -0
- package/build/components/Pages/ExportKey/index.js +44 -0
- package/build/components/Pages/ExportKey/index.js.map +1 -0
- package/build/components/Pages/ForgotPassword/index.js +129 -0
- package/build/components/Pages/ForgotPassword/index.js.map +1 -0
- package/build/components/Pages/LinkEmail/index.js +63 -0
- package/build/components/Pages/LinkEmail/index.js.map +1 -0
- package/build/components/Pages/LinkedProvider/index.d.ts +3 -0
- package/build/components/Pages/LinkedProvider/index.js +90 -0
- package/build/components/Pages/LinkedProvider/index.js.map +1 -0
- package/build/components/Pages/LinkedProviders/index.js +45 -0
- package/build/components/Pages/LinkedProviders/index.js.map +1 -0
- package/build/components/Pages/LinkedProviders/styles.js +51 -0
- package/build/components/Pages/LinkedProviders/styles.js.map +1 -0
- package/build/components/Pages/LoadWallets/index.js +91 -0
- package/build/components/Pages/LoadWallets/index.js.map +1 -0
- package/build/components/Pages/Loading/index.js +61 -0
- package/build/components/Pages/Loading/index.js.map +1 -0
- package/build/components/Pages/MobileConnectors/index.js +71 -0
- package/build/components/Pages/MobileConnectors/index.js.map +1 -0
- package/build/components/Pages/MobileConnectors/styles.js +65 -0
- package/build/components/Pages/MobileConnectors/styles.js.map +1 -0
- package/build/components/Pages/NoAssetsAvailable/index.js +45 -0
- package/build/components/Pages/NoAssetsAvailable/index.js.map +1 -0
- package/build/components/Pages/NoAssetsAvailable/styles.js +10 -0
- package/build/components/Pages/NoAssetsAvailable/styles.js.map +1 -0
- package/build/components/Pages/Onboarding/index.js +20 -0
- package/build/components/Pages/Onboarding/index.js.map +1 -0
- package/build/components/Pages/PhoneOTP/index.js +128 -0
- package/build/components/Pages/PhoneOTP/index.js.map +1 -0
- package/build/components/Pages/PhoneOTP/styles.js +38 -0
- package/build/components/Pages/PhoneOTP/styles.js.map +1 -0
- package/build/components/Pages/Profile/index.js +35 -0
- package/build/components/Pages/Profile/index.js.map +1 -0
- package/build/components/Pages/Providers/index.js +157 -0
- package/build/components/Pages/Providers/index.js.map +1 -0
- package/build/components/Pages/Providers/styles.js +156 -0
- package/build/components/Pages/Providers/styles.js.map +1 -0
- package/build/components/Pages/Receive/index.js +61 -0
- package/build/components/Pages/Receive/index.js.map +1 -0
- package/build/components/Pages/Receive/styles.d.ts +1 -0
- package/build/components/Pages/Receive/styles.js +52 -0
- package/build/components/Pages/Receive/styles.js.map +1 -0
- package/build/components/Pages/Recover/index.js +252 -0
- package/build/components/Pages/Recover/index.js.map +1 -0
- package/build/components/Pages/Recover/recoveryRegistry.d.ts +32 -0
- package/build/components/Pages/Recover/recoveryRegistry.js +61 -0
- package/build/components/Pages/Recover/recoveryRegistry.js.map +1 -0
- package/build/components/Pages/RemoveLinkedProvider/index.js +104 -0
- package/build/components/Pages/RemoveLinkedProvider/index.js.map +1 -0
- package/build/components/Pages/SelectToken/index.js +102 -0
- package/build/components/Pages/SelectToken/index.js.map +1 -0
- package/build/components/Pages/SelectToken/styles.js +78 -0
- package/build/components/Pages/SelectToken/styles.js.map +1 -0
- package/build/components/Pages/SelectWalletToRecover/index.d.ts +1 -2
- package/build/components/Pages/SelectWalletToRecover/index.js +70 -0
- package/build/components/Pages/SelectWalletToRecover/index.js.map +1 -0
- package/build/components/Pages/Send/EthereumSend.d.ts +1 -0
- package/build/components/Pages/Send/EthereumSend.js +88 -0
- package/build/components/Pages/Send/EthereumSend.js.map +1 -0
- package/build/components/Pages/Send/SolanaSend.d.ts +1 -0
- package/build/components/Pages/Send/SolanaSend.js +93 -0
- package/build/components/Pages/Send/SolanaSend.js.map +1 -0
- package/build/components/Pages/Send/index.d.ts +7 -1
- package/build/components/Pages/Send/index.js +18 -0
- package/build/components/Pages/Send/index.js.map +1 -0
- package/build/components/Pages/Send/styles.js +112 -0
- package/build/components/Pages/Send/styles.js.map +1 -0
- package/build/components/Pages/Send/utils.d.ts +1 -1
- package/build/components/Pages/Send/utils.js +63 -0
- package/build/components/Pages/Send/utils.js.map +1 -0
- package/build/components/Pages/SendConfirmation/EstimatedFees.js +66 -0
- package/build/components/Pages/SendConfirmation/EstimatedFees.js.map +1 -0
- package/build/components/Pages/SendConfirmation/index.js +331 -0
- package/build/components/Pages/SendConfirmation/index.js.map +1 -0
- package/build/components/Pages/SendConfirmation/styles.js +129 -0
- package/build/components/Pages/SendConfirmation/styles.js.map +1 -0
- package/build/components/Pages/SocialProviders/index.js +15 -0
- package/build/components/Pages/SocialProviders/index.js.map +1 -0
- package/build/components/Pages/SolanaSendConfirmation/index.d.ts +1 -0
- package/build/components/Pages/SolanaSendConfirmation/index.js +152 -0
- package/build/components/Pages/SolanaSendConfirmation/index.js.map +1 -0
- package/build/components/Pages/SolanaWallets/index.d.ts +1 -0
- package/build/components/Pages/SolanaWallets/index.js +36 -0
- package/build/components/Pages/SolanaWallets/index.js.map +1 -0
- package/build/components/PasswordStrength/PasswordStrengthIndicator.js +62 -0
- package/build/components/PasswordStrength/PasswordStrengthIndicator.js.map +1 -0
- package/build/components/PasswordStrength/password-utility.js +128 -0
- package/build/components/PasswordStrength/password-utility.js.map +1 -0
- package/build/constants/chainConfigs.js +316 -0
- package/build/constants/chainConfigs.js.map +1 -0
- package/build/constants/defaultTheme.js +6 -0
- package/build/constants/defaultTheme.js.map +1 -0
- package/build/constants/openfort.d.ts +4 -0
- package/build/constants/openfort.js +8 -0
- package/build/constants/openfort.js.map +1 -0
- package/build/core/ConnectionStrategy.d.ts +31 -0
- package/build/core/ConnectionStrategy.js +9 -0
- package/build/core/ConnectionStrategy.js.map +1 -0
- package/build/core/ConnectionStrategyContext.d.ts +16 -0
- package/build/core/ConnectionStrategyContext.js +22 -0
- package/build/core/ConnectionStrategyContext.js.map +1 -0
- package/build/core/errors.d.ts +1 -0
- package/build/core/strategies/EthereumBridgeStrategy.d.ts +11 -0
- package/build/core/strategies/EthereumBridgeStrategy.js +83 -0
- package/build/core/strategies/EthereumBridgeStrategy.js.map +1 -0
- package/build/core/strategies/EthereumEmbeddedStrategy.d.ts +8 -0
- package/build/core/strategies/EthereumEmbeddedStrategy.js +85 -0
- package/build/core/strategies/EthereumEmbeddedStrategy.js.map +1 -0
- package/build/core/strategies/SolanaEmbeddedStrategy.d.ts +9 -0
- package/build/core/strategies/SolanaEmbeddedStrategy.js +53 -0
- package/build/core/strategies/SolanaEmbeddedStrategy.js.map +1 -0
- package/build/core/strategyUtils.d.ts +6 -0
- package/build/core/strategyUtils.js +31 -0
- package/build/core/strategyUtils.js.map +1 -0
- package/build/ethereum/OpenfortEthereumBridgeContext.d.ts +87 -0
- package/build/ethereum/OpenfortEthereumBridgeContext.js +18 -0
- package/build/ethereum/OpenfortEthereumBridgeContext.js.map +1 -0
- package/build/ethereum/hooks/getEmbeddedWalletClient.d.ts +14 -0
- package/build/ethereum/hooks/getEmbeddedWalletClient.js +24 -0
- package/build/ethereum/hooks/getEmbeddedWalletClient.js.map +1 -0
- package/build/ethereum/hooks/useEthereumEmbeddedWallet.d.ts +17 -0
- package/build/ethereum/hooks/useEthereumEmbeddedWallet.js +425 -0
- package/build/ethereum/hooks/useEthereumEmbeddedWallet.js.map +1 -0
- package/build/ethereum/hooks/useEthereumWalletAssets.d.ts +29 -0
- package/build/ethereum/hooks/useEthereumWalletAssets.js +204 -0
- package/build/ethereum/hooks/useEthereumWalletAssets.js.map +1 -0
- package/build/ethereum/index.d.ts +11 -0
- package/build/ethereum/index.js +3 -0
- package/build/ethereum/index.js.map +1 -0
- package/build/ethereum/types.d.ts +140 -0
- package/build/hooks/openfort/auth/requestEmailVerification.js +21 -0
- package/build/hooks/openfort/auth/requestEmailVerification.js.map +1 -0
- package/build/hooks/openfort/auth/status.js +11 -0
- package/build/hooks/openfort/auth/status.js.map +1 -0
- package/build/hooks/openfort/auth/useAuthCallback.d.ts +2 -1
- package/build/hooks/openfort/auth/useAuthCallback.js +197 -0
- package/build/hooks/openfort/auth/useAuthCallback.js.map +1 -0
- package/build/hooks/openfort/auth/useConnectToWalletPostAuth.d.ts +2 -2
- package/build/hooks/openfort/auth/useConnectToWalletPostAuth.js +161 -0
- package/build/hooks/openfort/auth/useConnectToWalletPostAuth.js.map +1 -0
- package/build/hooks/openfort/auth/useEmailAuth.d.ts +4 -3
- package/build/hooks/openfort/auth/useEmailAuth.js +496 -0
- package/build/hooks/openfort/auth/useEmailAuth.js.map +1 -0
- package/build/hooks/openfort/auth/useEmailOtpAuth.d.ts +4 -3
- package/build/hooks/openfort/auth/useEmailOtpAuth.js +151 -0
- package/build/hooks/openfort/auth/useEmailOtpAuth.js.map +1 -0
- package/build/hooks/openfort/auth/useGuestAuth.d.ts +4 -3
- package/build/hooks/openfort/auth/useGuestAuth.js +142 -0
- package/build/hooks/openfort/auth/useGuestAuth.js.map +1 -0
- package/build/hooks/openfort/auth/useOAuth.d.ts +4 -3
- package/build/hooks/openfort/auth/useOAuth.js +217 -0
- package/build/hooks/openfort/auth/useOAuth.js.map +1 -0
- package/build/hooks/openfort/auth/usePhoneOtpAuth.d.ts +4 -3
- package/build/hooks/openfort/auth/usePhoneOtpAuth.js +174 -0
- package/build/hooks/openfort/auth/usePhoneOtpAuth.js.map +1 -0
- package/build/hooks/openfort/auth/useSignOut.d.ts +2 -1
- package/build/hooks/openfort/auth/useSignOut.js +104 -0
- package/build/hooks/openfort/auth/useSignOut.js.map +1 -0
- package/build/hooks/openfort/hookConsistency.js +17 -0
- package/build/hooks/openfort/hookConsistency.js.map +1 -0
- package/build/hooks/openfort/use7702Authorization.js +73 -0
- package/build/hooks/openfort/use7702Authorization.js.map +1 -0
- package/build/hooks/openfort/useGrantPermissions.d.ts +7 -76
- package/build/hooks/openfort/useGrantPermissions.js +221 -0
- package/build/hooks/openfort/useGrantPermissions.js.map +1 -0
- package/build/hooks/openfort/useProviders.js +75 -0
- package/build/hooks/openfort/useProviders.js.map +1 -0
- package/build/hooks/openfort/useRevokePermissions.d.ts +2 -1
- package/build/hooks/openfort/useRevokePermissions.js +126 -0
- package/build/hooks/openfort/useRevokePermissions.js.map +1 -0
- package/build/hooks/openfort/useUI.d.ts +4 -45
- package/build/hooks/openfort/useUI.js +122 -0
- package/build/hooks/openfort/useUI.js.map +1 -0
- package/build/hooks/openfort/useUser.d.ts +12 -35
- package/build/hooks/openfort/useUser.js +61 -0
- package/build/hooks/openfort/useUser.js.map +1 -0
- package/build/hooks/openfort/walletTypes.d.ts +32 -0
- package/build/hooks/openfort/walletTypes.js +53 -0
- package/build/hooks/openfort/walletTypes.js.map +1 -0
- package/build/hooks/useBalance.d.ts +50 -0
- package/build/hooks/useBalance.js +80 -0
- package/build/hooks/useBalance.js.map +1 -0
- package/build/hooks/useConnectLifecycle.d.ts +7 -0
- package/build/hooks/useConnectLifecycle.js +43 -0
- package/build/hooks/useConnectLifecycle.js.map +1 -0
- package/build/hooks/useConnectors.d.ts +3 -5
- package/build/hooks/useConnectors.js +26 -0
- package/build/hooks/useConnectors.js.map +1 -0
- package/build/hooks/useCopyToClipboard.js +29 -0
- package/build/hooks/useCopyToClipboard.js.map +1 -0
- package/build/hooks/useFitText.js +125 -0
- package/build/hooks/useFitText.js.map +1 -0
- package/build/hooks/useFocusTrap.d.ts +4 -1
- package/build/hooks/useFocusTrap.js +60 -0
- package/build/hooks/useFocusTrap.js.map +1 -0
- package/build/hooks/useGoogleFont.js +43 -0
- package/build/hooks/useGoogleFont.js.map +1 -0
- package/build/hooks/useIsMobile.js +17 -0
- package/build/hooks/useIsMobile.js.map +1 -0
- package/build/hooks/useIsMounted.js +10 -0
- package/build/hooks/useIsMounted.js.map +1 -0
- package/build/hooks/useLastConnector.js +39 -0
- package/build/hooks/useLastConnector.js.map +1 -0
- package/build/hooks/useLocales.d.ts +1 -1
- package/build/hooks/useLocales.js +68 -0
- package/build/hooks/useLocales.js.map +1 -0
- package/build/hooks/useLockBodyScroll.js +53 -0
- package/build/hooks/useLockBodyScroll.js.map +1 -0
- package/build/hooks/usePrevious.js +14 -0
- package/build/hooks/usePrevious.js.map +1 -0
- package/build/hooks/useResolvedIdentity.d.ts +70 -0
- package/build/hooks/useResolvedIdentity.js +90 -0
- package/build/hooks/useResolvedIdentity.js.map +1 -0
- package/build/hooks/useRouteProps.d.ts +10 -5
- package/build/hooks/useRouteProps.js +27 -0
- package/build/hooks/useRouteProps.js.map +1 -0
- package/build/hooks/useWalletConnectModal.js +59 -0
- package/build/hooks/useWalletConnectModal.js.map +1 -0
- package/build/hooks/useWindowSize.js +23 -0
- package/build/hooks/useWindowSize.js.map +1 -0
- package/build/index.d.ts +61 -16
- package/build/index.js +31 -0
- package/build/index.js.map +1 -0
- package/build/localizations/index.js +57 -0
- package/build/localizations/index.js.map +1 -0
- package/build/localizations/locales/ar-AE.js +100 -0
- package/build/localizations/locales/ar-AE.js.map +1 -0
- package/build/localizations/locales/ca-AD.js +98 -0
- package/build/localizations/locales/ca-AD.js.map +1 -0
- package/build/localizations/locales/ee-EE.js +98 -0
- package/build/localizations/locales/ee-EE.js.map +1 -0
- package/build/localizations/locales/en-US.js +115 -0
- package/build/localizations/locales/en-US.js.map +1 -0
- package/build/localizations/locales/es-ES.js +98 -0
- package/build/localizations/locales/es-ES.js.map +1 -0
- package/build/localizations/locales/fa-IR.js +98 -0
- package/build/localizations/locales/fa-IR.js.map +1 -0
- package/build/localizations/locales/fr-FR.js +98 -0
- package/build/localizations/locales/fr-FR.js.map +1 -0
- package/build/localizations/locales/ja-JP.js +98 -0
- package/build/localizations/locales/ja-JP.js.map +1 -0
- package/build/localizations/locales/pt-BR.js +98 -0
- package/build/localizations/locales/pt-BR.js.map +1 -0
- package/build/localizations/locales/ru-RU.js +98 -0
- package/build/localizations/locales/ru-RU.js.map +1 -0
- package/build/localizations/locales/tr-TR.js +98 -0
- package/build/localizations/locales/tr-TR.js.map +1 -0
- package/build/localizations/locales/vi-VN.js +98 -0
- package/build/localizations/locales/vi-VN.js.map +1 -0
- package/build/localizations/locales/zh-CN.js +98 -0
- package/build/localizations/locales/zh-CN.js.map +1 -0
- package/build/openfort/CoreOpenfortProvider.d.ts +9 -22
- package/build/openfort/CoreOpenfortProvider.js +389 -0
- package/build/openfort/CoreOpenfortProvider.js.map +1 -0
- package/build/{hooks/useConnectCallback.d.ts → openfort/connectCallbackTypes.d.ts} +2 -2
- package/build/openfort/context.d.ts +3 -2
- package/build/openfort/context.js +6 -0
- package/build/openfort/context.js.map +1 -0
- package/build/openfort/core/client.d.ts +2 -1
- package/build/openfort/core/client.js +23 -0
- package/build/openfort/core/client.js.map +1 -0
- package/build/openfort/hooks/useActiveAddressSync.d.ts +20 -0
- package/build/openfort/hooks/useActiveAddressSync.js +76 -0
- package/build/openfort/hooks/useActiveAddressSync.js.map +1 -0
- package/build/openfort/hooks/useAutoRecovery.d.ts +26 -0
- package/build/openfort/hooks/useAutoRecovery.js +102 -0
- package/build/openfort/hooks/useAutoRecovery.js.map +1 -0
- package/build/openfort/hooks/useEmbeddedStateMachine.d.ts +31 -0
- package/build/openfort/hooks/useEmbeddedStateMachine.js +77 -0
- package/build/openfort/hooks/useEmbeddedStateMachine.js.map +1 -0
- package/build/openfort/selectors.d.ts +9 -0
- package/build/openfort/selectors.js +15 -0
- package/build/openfort/selectors.js.map +1 -0
- package/build/openfort/store.d.ts +46 -0
- package/build/openfort/store.js +116 -0
- package/build/openfort/store.js.map +1 -0
- package/build/openfort/useOpenfort.d.ts +9 -3
- package/build/openfort/useOpenfort.js +15 -0
- package/build/openfort/useOpenfort.js.map +1 -0
- package/build/openfort/useOpenfortStore.d.ts +2 -0
- package/build/openfort/useOpenfortStore.js +13 -0
- package/build/openfort/useOpenfortStore.js.map +1 -0
- package/build/query/index.d.ts +2 -0
- package/build/query/queryKeys.d.ts +12 -0
- package/build/query/queryKeys.js +15 -0
- package/build/query/queryKeys.js.map +1 -0
- package/build/query/queryOptions.d.ts +23 -0
- package/build/query/queryOptions.js +31 -0
- package/build/query/queryOptions.js.map +1 -0
- package/build/shared/hooks/useAsyncData.d.ts +19 -0
- package/build/shared/hooks/useAsyncData.js +69 -0
- package/build/shared/hooks/useAsyncData.js.map +1 -0
- package/build/shared/hooks/useRecoveryOTP.d.ts +11 -0
- package/build/shared/hooks/useRecoveryOTP.js +64 -0
- package/build/shared/hooks/useRecoveryOTP.js.map +1 -0
- package/build/shared/types.d.ts +65 -0
- package/build/shared/utils/embeddedWalletStatusMapper.d.ts +15 -0
- package/build/shared/utils/embeddedWalletStatusMapper.js +22 -0
- package/build/shared/utils/embeddedWalletStatusMapper.js.map +1 -0
- package/build/shared/utils/explorer.d.ts +24 -0
- package/build/shared/utils/explorer.js +71 -0
- package/build/shared/utils/explorer.js.map +1 -0
- package/build/shared/utils/otpError.d.ts +8 -0
- package/build/shared/utils/otpError.js +17 -0
- package/build/shared/utils/otpError.js.map +1 -0
- package/build/shared/utils/recovery.d.ts +15 -0
- package/build/shared/utils/recovery.js +96 -0
- package/build/shared/utils/recovery.js.map +1 -0
- package/build/shared/utils/validation.d.ts +15 -0
- package/build/shared/utils/validation.js +27 -0
- package/build/shared/utils/validation.js.map +1 -0
- package/build/shared/utils/walletStatusProps.d.ts +18 -0
- package/build/shared/utils/walletStatusProps.js +45 -0
- package/build/shared/utils/walletStatusProps.js.map +1 -0
- package/build/siwe/create-siwe-message.d.ts +15 -1
- package/build/siwe/create-siwe-message.js +32 -0
- package/build/siwe/create-siwe-message.js.map +1 -0
- package/build/solana/SolanaContext.d.ts +43 -0
- package/build/solana/SolanaContext.js +87 -0
- package/build/solana/SolanaContext.js.map +1 -0
- package/build/solana/constants.d.ts +21 -0
- package/build/solana/constants.js +24 -0
- package/build/solana/constants.js.map +1 -0
- package/build/solana/hooks/recoveryResolver.d.ts +16 -0
- package/build/solana/hooks/recoveryResolver.js +39 -0
- package/build/solana/hooks/recoveryResolver.js.map +1 -0
- package/build/solana/hooks/useSolanaEmbeddedWallet.d.ts +17 -0
- package/build/solana/hooks/useSolanaEmbeddedWallet.js +389 -0
- package/build/solana/hooks/useSolanaEmbeddedWallet.js.map +1 -0
- package/build/solana/hooks/utils.d.ts +2 -0
- package/build/solana/hooks/utils.js +18 -0
- package/build/solana/hooks/utils.js.map +1 -0
- package/build/solana/index.d.ts +12 -0
- package/build/solana/index.js +2 -0
- package/build/solana/index.js.map +1 -0
- package/build/solana/operations.d.ts +22 -0
- package/build/solana/operations.js +40 -0
- package/build/solana/operations.js.map +1 -0
- package/build/solana/provider.d.ts +131 -0
- package/build/solana/provider.js +126 -0
- package/build/solana/provider.js.map +1 -0
- package/build/solana/types.d.ts +253 -0
- package/build/solana/utils/transfer.d.ts +9 -0
- package/build/solana/utils/transfer.js +20 -0
- package/build/solana/utils/transfer.js.map +1 -0
- package/build/styles/index.js +334 -0
- package/build/styles/index.js.map +1 -0
- package/build/styles/styled/index.js +14 -0
- package/build/styles/styled/index.js.map +1 -0
- package/build/styles/themes/base.js +147 -0
- package/build/styles/themes/base.js.map +1 -0
- package/build/styles/themes/index.js +13 -0
- package/build/styles/themes/index.js.map +1 -0
- package/build/styles/themes/midnight.js +78 -0
- package/build/styles/themes/midnight.js.map +1 -0
- package/build/styles/themes/minimal.js +100 -0
- package/build/styles/themes/minimal.js.map +1 -0
- package/build/styles/themes/nouns.js +83 -0
- package/build/styles/themes/nouns.js.map +1 -0
- package/build/styles/themes/retro.js +110 -0
- package/build/styles/themes/retro.js.map +1 -0
- package/build/styles/themes/rounded.js +110 -0
- package/build/styles/themes/rounded.js.map +1 -0
- package/build/styles/themes/soft.js +73 -0
- package/build/styles/themes/soft.js.map +1 -0
- package/build/styles/themes/web95.js +136 -0
- package/build/styles/themes/web95.js.map +1 -0
- package/build/types.d.ts +5 -6
- package/build/types.js +33 -0
- package/build/types.js.map +1 -0
- package/build/utils/banner.d.ts +1 -0
- package/build/utils/banner.js +14 -0
- package/build/utils/banner.js.map +1 -0
- package/build/utils/errorHandling.js +331 -0
- package/build/utils/errorHandling.js.map +1 -0
- package/build/utils/format.d.ts +18 -0
- package/build/utils/format.js +59 -0
- package/build/utils/format.js.map +1 -0
- package/build/utils/index.d.ts +2 -3
- package/build/utils/index.js +67 -0
- package/build/utils/index.js.map +1 -0
- package/build/utils/logger.js +13 -0
- package/build/utils/logger.js.map +1 -0
- package/build/utils/oauthErrorHandler.d.ts +1 -1
- package/build/utils/oauthErrorHandler.js +42 -0
- package/build/utils/oauthErrorHandler.js.map +1 -0
- package/build/utils/p3.js +14 -0
- package/build/utils/p3.js.map +1 -0
- package/build/utils/rpc.d.ts +34 -0
- package/build/utils/rpc.js +93 -0
- package/build/utils/rpc.js.map +1 -0
- package/build/utils/useOnUserReturn.js +25 -0
- package/build/utils/useOnUserReturn.js.map +1 -0
- package/build/utils/validation.js +7 -0
- package/build/utils/validation.js.map +1 -0
- package/build/utils/wallets.d.ts +6 -0
- package/build/utils/wallets.js +14 -0
- package/build/utils/wallets.js.map +1 -0
- package/build/version.d.ts +1 -1
- package/build/version.js +4 -0
- package/build/version.js.map +1 -0
- package/build/wagmi/OpenfortWagmiBridge.d.ts +3 -0
- package/build/wagmi/OpenfortWagmiBridge.js +166 -0
- package/build/wagmi/OpenfortWagmiBridge.js.map +1 -0
- package/build/wagmi/components/ChainSelect/index.js +140 -0
- package/build/wagmi/components/ChainSelect/index.js.map +1 -0
- package/build/wagmi/components/ChainSelectDropdown/index.js +144 -0
- package/build/wagmi/components/ChainSelectDropdown/index.js.map +1 -0
- package/build/wagmi/components/ChainSelectDropdown/styles.js +47 -0
- package/build/wagmi/components/ChainSelectDropdown/styles.js.map +1 -0
- package/build/wagmi/components/ChainSelectList/index.js +109 -0
- package/build/wagmi/components/ChainSelectList/index.js.map +1 -0
- package/build/wagmi/components/ChainSelectList/styles.js +225 -0
- package/build/wagmi/components/ChainSelectList/styles.js.map +1 -0
- package/build/wagmi/components/SwitchNetworks/index.js +22 -0
- package/build/wagmi/components/SwitchNetworks/index.js.map +1 -0
- package/build/wagmi/connectorFilter.d.ts +6 -0
- package/build/wagmi/connectorFilter.js +16 -0
- package/build/wagmi/connectorFilter.js.map +1 -0
- package/build/{defaultConfig.d.ts → wagmi/defaultConfig.d.ts} +1 -2
- package/build/wagmi/defaultConfig.js +27 -0
- package/build/wagmi/defaultConfig.js.map +1 -0
- package/build/wagmi/defaultConnectors.js +36 -0
- package/build/wagmi/defaultConnectors.js.map +1 -0
- package/build/wagmi/embeddedConnector.d.ts +4 -0
- package/build/wagmi/embeddedConnector.js +80 -0
- package/build/wagmi/embeddedConnector.js.map +1 -0
- package/build/wagmi/index.d.ts +10 -0
- package/build/wagmi/index.js +10 -0
- package/build/wagmi/index.js.map +1 -0
- package/build/wagmi/useChainIsSupported.d.ts +20 -0
- package/build/wagmi/useChainIsSupported.js +30 -0
- package/build/wagmi/useChainIsSupported.js.map +1 -0
- package/build/wagmi/useChains.d.ts +29 -0
- package/build/wagmi/useChains.js +38 -0
- package/build/wagmi/useChains.js.map +1 -0
- package/build/wagmi/useConnectWithSiwe.d.ts +22 -0
- package/build/wagmi/useConnectWithSiwe.js +115 -0
- package/build/wagmi/useConnectWithSiwe.js.map +1 -0
- package/build/wagmi/useEmbeddedWalletWagmiSync.d.ts +2 -0
- package/build/wagmi/useEmbeddedWalletWagmiSync.js +55 -0
- package/build/wagmi/useEmbeddedWalletWagmiSync.js.map +1 -0
- package/build/wagmi/useWalletAuth.d.ts +24 -0
- package/build/wagmi/useWalletAuth.js +180 -0
- package/build/wagmi/useWalletAuth.js.map +1 -0
- package/build/wallets/useExternalConnectors.d.ts +17 -0
- package/build/wallets/useExternalConnectors.js +98 -0
- package/build/wallets/useExternalConnectors.js.map +1 -0
- package/build/wallets/walletConfigs.js +344 -0
- package/build/wallets/walletConfigs.js.map +1 -0
- package/package.json +62 -11
- package/build/components/PageLayout/index.d.ts +0 -6
- package/build/components/contexts/web3/index.d.ts +0 -13
- package/build/constants/erc20.d.ts +0 -42
- package/build/hooks/openfort/auth/useWalletAuth.d.ts +0 -20
- package/build/hooks/openfort/useConnectWithSiwe.d.ts +0 -8
- package/build/hooks/openfort/useWalletAssets.d.ts +0 -16
- package/build/hooks/openfort/useWallets.d.ts +0 -134
- package/build/hooks/useChainIsSupported.d.ts +0 -24
- package/build/hooks/useChains.d.ts +0 -41
- package/build/hooks/useConnect.d.ts +0 -24
- package/build/hooks/useEnsFallbackConfig.d.ts +0 -1
- package/build/index.es.js +0 -19627
- package/build/index.es.js.map +0 -1
- package/build/openfortCustomTypes.d.ts +0 -10
- package/build/wallets/index.d.ts +0 -7
- package/build/wallets/useWagmiWallets.d.ts +0 -9
- /package/build/components/Pages/{SoicalProviders → SocialProviders}/index.d.ts +0 -0
- /package/build/{components/Common → wagmi/components}/ChainSelect/index.d.ts +0 -0
- /package/build/{components/Common → wagmi/components}/ChainSelectDropdown/index.d.ts +0 -0
- /package/build/{components/Common → wagmi/components}/ChainSelectDropdown/styles.d.ts +0 -0
- /package/build/{components/Common → wagmi/components}/ChainSelectList/index.d.ts +0 -0
- /package/build/{components/Common → wagmi/components}/ChainSelectList/styles.d.ts +0 -0
- /package/build/{components/Pages → wagmi/components}/SwitchNetworks/index.d.ts +0 -0
- /package/build/{defaultConnectors.d.ts → wagmi/defaultConnectors.d.ts} +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useRef, useEffect } from 'react';
|
|
3
|
+
import { TickIcon } from '../../../assets/icons.js';
|
|
4
|
+
import { OtpContainer, OTPGroup, OTPSlotWrapper, OTPHiddenInput, OTPNumberValue, SuccessTickWrapper, FakeCaretWrapper, CaretBar } from './styles.js';
|
|
5
|
+
|
|
6
|
+
function FakeCaret() {
|
|
7
|
+
return (jsx(FakeCaretWrapper, { children: jsx(CaretBar, {}) }));
|
|
8
|
+
}
|
|
9
|
+
function OtpInputStandalone({ length = 6, onChange, onComplete, isLoading, isError, isSuccess, scale, }) {
|
|
10
|
+
const [values, setValues] = useState(Array(length).fill(''));
|
|
11
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
12
|
+
const canEdit = !isLoading && !isError && !isSuccess;
|
|
13
|
+
const inputsRef = useRef([]);
|
|
14
|
+
const handleInput = (index, char) => {
|
|
15
|
+
var _a;
|
|
16
|
+
if (!char.match(/^[0-9]$/))
|
|
17
|
+
return;
|
|
18
|
+
if (!canEdit)
|
|
19
|
+
return;
|
|
20
|
+
const newValues = [...values];
|
|
21
|
+
newValues[index] = char;
|
|
22
|
+
setValues(newValues);
|
|
23
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValues.join(''));
|
|
24
|
+
// Move cursor to next box
|
|
25
|
+
if (index < length - 1) {
|
|
26
|
+
setActiveIndex(index + 1);
|
|
27
|
+
(_a = inputsRef.current[index + 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (values.every((v) => v !== '')) {
|
|
32
|
+
onComplete === null || onComplete === void 0 ? void 0 : onComplete(values.join(''));
|
|
33
|
+
}
|
|
34
|
+
}, [values]);
|
|
35
|
+
const handleBackspace = (index) => {
|
|
36
|
+
var _a;
|
|
37
|
+
const newValues = [...values];
|
|
38
|
+
if (newValues[index] === '') {
|
|
39
|
+
if (index > 0) {
|
|
40
|
+
// Move back
|
|
41
|
+
setActiveIndex(index - 1);
|
|
42
|
+
(_a = inputsRef.current[index - 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
43
|
+
}
|
|
44
|
+
newValues[index - 1] = '';
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
newValues[index] = '';
|
|
48
|
+
}
|
|
49
|
+
setValues(newValues);
|
|
50
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValues.join(''));
|
|
51
|
+
};
|
|
52
|
+
const handlePaste = (e) => {
|
|
53
|
+
var _a;
|
|
54
|
+
const pasted = e.clipboardData.getData('text').replace(/\D/g, '');
|
|
55
|
+
if (!pasted)
|
|
56
|
+
return;
|
|
57
|
+
const arr = pasted.substring(0, length).split('');
|
|
58
|
+
const newValues = [...values];
|
|
59
|
+
arr.forEach((char, i) => {
|
|
60
|
+
newValues[i] = char;
|
|
61
|
+
});
|
|
62
|
+
setValues(newValues);
|
|
63
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValues.join(''));
|
|
64
|
+
const finalIndex = Math.min(arr.length - 1, length - 1);
|
|
65
|
+
setActiveIndex(finalIndex);
|
|
66
|
+
(_a = inputsRef.current[finalIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
67
|
+
};
|
|
68
|
+
const handleFocus = (i) => {
|
|
69
|
+
var _a, _b;
|
|
70
|
+
if (activeIndex !== -1) {
|
|
71
|
+
setActiveIndex(i);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const firstEmptyIndex = values.indexOf('');
|
|
75
|
+
if (firstEmptyIndex !== -1) {
|
|
76
|
+
setActiveIndex(firstEmptyIndex);
|
|
77
|
+
(_a = inputsRef.current[firstEmptyIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
setActiveIndex(length - 1);
|
|
81
|
+
(_b = inputsRef.current[length - 1]) === null || _b === void 0 ? void 0 : _b.focus();
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
var _a;
|
|
86
|
+
if (!isError) {
|
|
87
|
+
setValues(Array(length).fill(''));
|
|
88
|
+
setActiveIndex(0);
|
|
89
|
+
(_a = inputsRef.current[0]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
90
|
+
}
|
|
91
|
+
}, [isError]);
|
|
92
|
+
return (jsx(OtpContainer, { showBorder: !isSuccess, scale: scale, children: jsxs(OTPGroup, { isError: isError, isSuccess: isSuccess, isLoading: isLoading, children: [values.slice(0, length).map((value, idx) => {
|
|
93
|
+
const index = idx;
|
|
94
|
+
return (jsxs(OTPSlotWrapper, { isActive: canEdit && activeIndex === index, children: [jsx(OTPHiddenInput, { ref: (el) => {
|
|
95
|
+
inputsRef.current[index] = el;
|
|
96
|
+
}, value: "", inputMode: "numeric", onBlur: () => setActiveIndex(-1), autoComplete: "one-time-code", autoFocus: index === 0, onFocus: () => handleFocus(index), onPaste: handlePaste, onKeyDown: (e) => {
|
|
97
|
+
if (!canEdit)
|
|
98
|
+
return;
|
|
99
|
+
if (e.key === 'Backspace') {
|
|
100
|
+
e.preventDefault();
|
|
101
|
+
handleBackspace(index);
|
|
102
|
+
}
|
|
103
|
+
}, onChange: (e) => handleInput(index, e.target.value) }), value && jsx(OTPNumberValue, { "$hide": isSuccess, children: value }), !value && activeIndex === index && jsx(FakeCaret, {})] }, index));
|
|
104
|
+
}), isSuccess && (jsx(SuccessTickWrapper, { children: jsx(TickIcon, { width: '100%', height: '100%' }) }))] }) }));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { OtpInputStandalone };
|
|
108
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { keyframes, css } from 'styled-components';
|
|
2
|
+
import styled from '../../../styles/styled/index.js';
|
|
3
|
+
|
|
4
|
+
const caretBlink = keyframes `
|
|
5
|
+
0%, 70%, 100% { opacity: 1; }
|
|
6
|
+
20%, 50% { opacity: 0; }
|
|
7
|
+
`;
|
|
8
|
+
const OtpContainer = styled.div `
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
scale: ${({ scale }) => scale || '1'};
|
|
13
|
+
|
|
14
|
+
--border: ${({ showBorder }) => (showBorder ? 'var(--ck-body-color-muted)' : 'transparent')};
|
|
15
|
+
`;
|
|
16
|
+
const pulse = keyframes `
|
|
17
|
+
0% {
|
|
18
|
+
opacity: 100%;
|
|
19
|
+
}
|
|
20
|
+
50% {
|
|
21
|
+
opacity: 40%;
|
|
22
|
+
}
|
|
23
|
+
100% {
|
|
24
|
+
opacity: 100%;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
const dist = 2;
|
|
28
|
+
const shakeKeyframes = keyframes `
|
|
29
|
+
0%{ transform:none; }
|
|
30
|
+
25%{ transform:translateX(${dist}px); }
|
|
31
|
+
50%{ transform:translateX(-${dist}px); }
|
|
32
|
+
75%{ transform:translateX(${dist}px); }
|
|
33
|
+
100%{ transform:none; }
|
|
34
|
+
`;
|
|
35
|
+
const keyframeSuccess = keyframes `
|
|
36
|
+
0% { transform: scale(1); }
|
|
37
|
+
50% { transform: scale(1.1); }
|
|
38
|
+
100% { transform: scale(1); }
|
|
39
|
+
`;
|
|
40
|
+
const OTPGroup = styled.div `
|
|
41
|
+
display: flex;
|
|
42
|
+
|
|
43
|
+
outline-width: 3px;
|
|
44
|
+
outline-style: solid;
|
|
45
|
+
border-radius: 0.375rem;
|
|
46
|
+
transition: outline-color 0.3s, border-radius .5s;
|
|
47
|
+
|
|
48
|
+
outline-color: ${({ isError, isSuccess }) => {
|
|
49
|
+
if (isError)
|
|
50
|
+
return 'var(--ck-body-color-danger)';
|
|
51
|
+
if (isSuccess)
|
|
52
|
+
return 'var(--ck-body-color-valid)';
|
|
53
|
+
return 'transparent';
|
|
54
|
+
}};
|
|
55
|
+
|
|
56
|
+
${({ isLoading }) => isLoading &&
|
|
57
|
+
css `
|
|
58
|
+
animation: ${pulse} 1s ease-in-out infinite;
|
|
59
|
+
`}
|
|
60
|
+
|
|
61
|
+
${({ isError }) => isError &&
|
|
62
|
+
css `
|
|
63
|
+
animation: ${shakeKeyframes} 220ms ease-out both;
|
|
64
|
+
`}
|
|
65
|
+
|
|
66
|
+
${({ isSuccess }) => isSuccess &&
|
|
67
|
+
css `
|
|
68
|
+
border-radius: 3rem;
|
|
69
|
+
min-width: 3.5rem;
|
|
70
|
+
${OTPSlotWrapper} {
|
|
71
|
+
width: 0;
|
|
72
|
+
border: 0;
|
|
73
|
+
transition: width .5s, border .5s;
|
|
74
|
+
}
|
|
75
|
+
animation: ${keyframeSuccess} 220ms ease-out both;
|
|
76
|
+
animation-delay: 250ms;
|
|
77
|
+
`}
|
|
78
|
+
`;
|
|
79
|
+
const OTPSlotWrapper = styled.div `
|
|
80
|
+
position: relative;
|
|
81
|
+
width: 2.5rem;
|
|
82
|
+
height: 3.5rem;
|
|
83
|
+
font-size: 2rem;
|
|
84
|
+
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
|
|
89
|
+
transition: all 0.3s;
|
|
90
|
+
|
|
91
|
+
border-top: 1px solid var(--border);
|
|
92
|
+
border-bottom: 1px solid var(--border);
|
|
93
|
+
border-right: 0.5px solid var(--border);
|
|
94
|
+
border-left: 0.5px solid var(--border);
|
|
95
|
+
|
|
96
|
+
&:first-child {
|
|
97
|
+
border-left: 1px solid var(--border);
|
|
98
|
+
border-radius: 0.375rem 0 0 0.375rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&:last-child {
|
|
102
|
+
border-radius: 0 0.375rem 0.375rem 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
outline: ${({ isActive }) => (isActive ? '2px solid var(--ck-connectbutton-color)' : '0')};
|
|
106
|
+
z-index: ${({ isActive }) => (isActive ? 1 : 0)};
|
|
107
|
+
outline-offset: 0;
|
|
108
|
+
|
|
109
|
+
cursor: text;
|
|
110
|
+
color: var(--ck-body-color);
|
|
111
|
+
`;
|
|
112
|
+
const OTPNumberValue = styled.div `
|
|
113
|
+
opacity: ${({ $hide }) => ($hide ? 0 : 1)};
|
|
114
|
+
transition: opacity 0.3s;
|
|
115
|
+
`;
|
|
116
|
+
const OTPHiddenInput = styled.input `
|
|
117
|
+
position: absolute;
|
|
118
|
+
inset: 0;
|
|
119
|
+
opacity: 0;
|
|
120
|
+
cursor: text;
|
|
121
|
+
caret-color: transparent; /* Hide native caret */
|
|
122
|
+
`;
|
|
123
|
+
const FakeCaretWrapper = styled.div `
|
|
124
|
+
position: absolute;
|
|
125
|
+
inset: 0;
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
|
|
132
|
+
animation: ${caretBlink} 1.2s ease-out infinite;
|
|
133
|
+
`;
|
|
134
|
+
const CaretBar = styled.div `
|
|
135
|
+
width: 1px;
|
|
136
|
+
height: 2rem;
|
|
137
|
+
background: var(--ck-body-color);
|
|
138
|
+
`;
|
|
139
|
+
const keyframeWrapper = keyframes `
|
|
140
|
+
0% { transform: scale(0); }
|
|
141
|
+
100% { transform: scale(1); }
|
|
142
|
+
`;
|
|
143
|
+
const SuccessTickWrapper = styled.div `
|
|
144
|
+
position: absolute;
|
|
145
|
+
inset: 5px;
|
|
146
|
+
display: flex;
|
|
147
|
+
animation: ${keyframeWrapper} 200ms ease-out both;
|
|
148
|
+
animation-delay: 200ms;
|
|
149
|
+
color: var(--ck-body-color-valid);
|
|
150
|
+
`;
|
|
151
|
+
|
|
152
|
+
export { CaretBar, FakeCaretWrapper, OTPGroup, OTPHiddenInput, OTPNumberValue, OTPSlotWrapper, OtpContainer, SuccessTickWrapper };
|
|
153
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useRef, useState, useEffect } from 'react';
|
|
2
|
+
import { createPortal } from 'react-dom';
|
|
3
|
+
import { OPENFORT_VERSION } from '../../../version.js';
|
|
4
|
+
|
|
5
|
+
const Portal = (props) => {
|
|
6
|
+
props = {
|
|
7
|
+
selector: '__OPENFORT__',
|
|
8
|
+
...props,
|
|
9
|
+
};
|
|
10
|
+
const { selector, children } = props;
|
|
11
|
+
const ref = useRef(null);
|
|
12
|
+
const [mounted, setMounted] = useState(false);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const selectorPrefixed = `#${selector.replace(/^#/, '')}`;
|
|
15
|
+
ref.current = document.querySelector(selectorPrefixed);
|
|
16
|
+
if (!ref.current) {
|
|
17
|
+
const div = document.createElement('div');
|
|
18
|
+
div.setAttribute('id', selector);
|
|
19
|
+
div.setAttribute('data-openfort-react', `${OPENFORT_VERSION}`);
|
|
20
|
+
document.body.appendChild(div);
|
|
21
|
+
ref.current = div;
|
|
22
|
+
}
|
|
23
|
+
setMounted(true);
|
|
24
|
+
}, [selector]);
|
|
25
|
+
if (!ref.current)
|
|
26
|
+
return null;
|
|
27
|
+
return mounted ? createPortal(children, ref.current) : null;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { Portal as default };
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { motion } from 'framer-motion';
|
|
3
|
+
import Logos from '../../../assets/logos.js';
|
|
4
|
+
import styled from '../../../styles/styled/index.js';
|
|
5
|
+
import { useOpenfort } from '../../Openfort/useOpenfort.js';
|
|
6
|
+
|
|
7
|
+
const PoweredByFooter = ({ showDisclaimer }) => {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
const { uiConfig: options } = useOpenfort();
|
|
10
|
+
return (jsxs(Container, { children: [showDisclaimer && (jsx(Disclaimer, { children: (options === null || options === void 0 ? void 0 : options.disclaimer) ? (options.disclaimer) : (jsxs("div", { children: ["By logging in, you agree to our", ' ', jsx("a", { href: (_a = options === null || options === void 0 ? void 0 : options.termsOfServiceUrl) !== null && _a !== void 0 ? _a : 'https://www.openfort.io/terms', target: "_blank", rel: "noopener noreferrer", children: "Terms of Service" }), ' ', "&", ' ', jsx("a", { href: (_b = options === null || options === void 0 ? void 0 : options.privacyPolicyUrl) !== null && _b !== void 0 ? _b : 'https://www.openfort.io/privacy', target: "_blank", rel: "noopener noreferrer", children: "Privacy Policy" }), "."] })) })), jsxs(TextButton, { onClick: () => {
|
|
11
|
+
window.open('https://www.openfort.io/', '_blank');
|
|
12
|
+
}, children: [jsx("span", { children: "Powered by" }), jsx(IconContainer, { children: jsx(Logos.Openfort, {}) }), jsx("span", { children: "Openfort" })] })] }));
|
|
13
|
+
};
|
|
14
|
+
const Disclaimer = styled(motion.div) `
|
|
15
|
+
padding: 8px 50px 0px 50px;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
font-size: var(--ck-body-disclaimer-font-size, 10px);
|
|
20
|
+
font-weight: var(--ck-body-disclaimer-font-weight, 400);
|
|
21
|
+
text-align: center;
|
|
22
|
+
line-height: 1rem;
|
|
23
|
+
color: var(--ck-body-disclaimer-color, var(--ck-body-color-muted, inherit));
|
|
24
|
+
|
|
25
|
+
& a {
|
|
26
|
+
color: var(--ck-body-disclaimer-link-color, inherit);
|
|
27
|
+
font-weight: var(--ck-body-disclaimer-font-weight, 400);
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
transition: color 200ms ease;
|
|
30
|
+
&:hover {
|
|
31
|
+
color: var(--ck-body-disclaimer-link-hover-color, inherit);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
const IconContainer = styled.div `
|
|
36
|
+
width: 20px;
|
|
37
|
+
height: 20px;
|
|
38
|
+
margin-left: 5px;
|
|
39
|
+
svg,
|
|
40
|
+
img {
|
|
41
|
+
display: block;
|
|
42
|
+
position: relative;
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&[data-shape='squircle'] {
|
|
50
|
+
border-radius: 22.5%;
|
|
51
|
+
}
|
|
52
|
+
&[data-shape='circle'] {
|
|
53
|
+
border-radius: 100%;
|
|
54
|
+
}
|
|
55
|
+
&[data-shape='square'] {
|
|
56
|
+
border-radius: 0;
|
|
57
|
+
}
|
|
58
|
+
`;
|
|
59
|
+
const Container = styled(motion.div) `
|
|
60
|
+
text-align: center;
|
|
61
|
+
margin-top: 4px;
|
|
62
|
+
margin-bottom: -16px;
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
align-items: center;
|
|
66
|
+
`;
|
|
67
|
+
const TextButton = styled(motion.button) `
|
|
68
|
+
appearance: none;
|
|
69
|
+
user-select: none;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
display: inline-flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
gap: 5px;
|
|
75
|
+
height: 42px;
|
|
76
|
+
padding: 0 16px;
|
|
77
|
+
border-radius: 6px;
|
|
78
|
+
background: none;
|
|
79
|
+
color: var(--ck-body-color-muted);
|
|
80
|
+
text-decoration-color: var(--ck-body-color-muted);
|
|
81
|
+
font-size: 15px;
|
|
82
|
+
line-height: 18px;
|
|
83
|
+
font-weight: 500;
|
|
84
|
+
|
|
85
|
+
transition:
|
|
86
|
+
color 200ms ease,
|
|
87
|
+
transform 100ms ease;
|
|
88
|
+
&:hover {
|
|
89
|
+
color: var(--ck-body-color-muted-hover);
|
|
90
|
+
text-decoration-color: var(--ck-body-color-muted-hover);
|
|
91
|
+
}
|
|
92
|
+
&:active {
|
|
93
|
+
transform: scale(0.96);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
span {
|
|
97
|
+
opacity: 1;
|
|
98
|
+
transition: opacity 300ms ease;
|
|
99
|
+
}
|
|
100
|
+
`;
|
|
101
|
+
|
|
102
|
+
export { PoweredByFooter as default };
|
|
103
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LinkedAccount } from '../../Openfort/types';
|
|
2
2
|
export declare const WalletDisplay: ({ walletAddress }: {
|
|
3
3
|
walletAddress: string;
|
|
4
4
|
}) => string;
|
|
5
5
|
export declare const ProviderHeader: React.FC<{
|
|
6
|
-
|
|
6
|
+
account: LinkedAccount;
|
|
7
7
|
}>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import { useConnectionStrategy } from '../../../core/ConnectionStrategyContext.js';
|
|
4
|
+
import { useEthereumBridge } from '../../../ethereum/OpenfortEthereumBridgeContext.js';
|
|
5
|
+
import { useUser } from '../../../hooks/openfort/useUser.js';
|
|
6
|
+
import 'detect-browser';
|
|
7
|
+
import { truncateEthAddress } from '../../../utils/format.js';
|
|
8
|
+
import { logger } from '../../../utils/logger.js';
|
|
9
|
+
import { useThemeContext } from '../../ConnectKitThemeProvider/ConnectKitThemeProvider.js';
|
|
10
|
+
import { useOpenfort } from '../../Openfort/useOpenfort.js';
|
|
11
|
+
import { LinkedProviderText } from '../../Pages/LinkedProviders/styles.js';
|
|
12
|
+
|
|
13
|
+
const WalletDisplay = ({ walletAddress }) => {
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
const strategy = useConnectionStrategy();
|
|
16
|
+
const bridge = useEthereumBridge();
|
|
17
|
+
const [ensName, setEnsName] = useState(undefined);
|
|
18
|
+
const context = useOpenfort();
|
|
19
|
+
const themeContext = useThemeContext();
|
|
20
|
+
// Only resolve ENS on mainnet (1); testnets throw "network does not support ENS"
|
|
21
|
+
const useEns = (strategy === null || strategy === void 0 ? void 0 : strategy.kind) === 'bridge' && !!(bridge === null || bridge === void 0 ? void 0 : bridge.getEnsName) && ((_a = bridge.chainId) !== null && _a !== void 0 ? _a : 0) === 1;
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (!useEns || !walletAddress || !(bridge === null || bridge === void 0 ? void 0 : bridge.getEnsName))
|
|
24
|
+
return;
|
|
25
|
+
bridge
|
|
26
|
+
.getEnsName({ address: walletAddress })
|
|
27
|
+
.then(setEnsName)
|
|
28
|
+
.catch((_err) => {
|
|
29
|
+
// ENS resolution can fail on testnets; non-fatal
|
|
30
|
+
if (process.env.NODE_ENV === 'development') {
|
|
31
|
+
logger.warn('[Openfort] ENS resolution failed');
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}, [useEns, bridge, walletAddress]);
|
|
35
|
+
const separator = ['web95', 'rounded', 'minimal'].includes((_c = (_b = themeContext.theme) !== null && _b !== void 0 ? _b : context.uiConfig.theme) !== null && _c !== void 0 ? _c : '')
|
|
36
|
+
? '....'
|
|
37
|
+
: undefined;
|
|
38
|
+
return ensName !== null && ensName !== void 0 ? ensName : truncateEthAddress(walletAddress, separator);
|
|
39
|
+
};
|
|
40
|
+
const ProviderHeader = ({ account }) => {
|
|
41
|
+
var _a;
|
|
42
|
+
const { user } = useUser();
|
|
43
|
+
switch (account.provider) {
|
|
44
|
+
case 'wallet':
|
|
45
|
+
case 'siwe':
|
|
46
|
+
return (jsx(LinkedProviderText, { children: jsx(WalletDisplay, { walletAddress: account.accountId }) }));
|
|
47
|
+
case 'phone':
|
|
48
|
+
return jsx(LinkedProviderText, { children: account.accountId });
|
|
49
|
+
default:
|
|
50
|
+
return (jsx(LinkedProviderText, { style: { textTransform: (user === null || user === void 0 ? void 0 : user.email) ? 'none' : 'capitalize' }, children: (_a = user === null || user === void 0 ? void 0 : user.email) !== null && _a !== void 0 ? _a : account.provider }));
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { ProviderHeader, WalletDisplay };
|
|
55
|
+
//# sourceMappingURL=ProviderHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProviderHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { PhoneIcon, EmailIcon, WalletIcon } from '../../../assets/icons.js';
|
|
4
|
+
import Logos, { providersLogos } from '../../../assets/logos.js';
|
|
5
|
+
import { useExternalConnectors } from '../../../wallets/useExternalConnectors.js';
|
|
6
|
+
import FitText from '../FitText/index.js';
|
|
7
|
+
|
|
8
|
+
const WalletIconWrapper = ({ account }) => {
|
|
9
|
+
var _a;
|
|
10
|
+
const wallets = useExternalConnectors();
|
|
11
|
+
const wallet = useMemo(() => {
|
|
12
|
+
return wallets.find((w) => { var _a; return ((_a = w.id) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === account.walletClientType; });
|
|
13
|
+
}, [account]);
|
|
14
|
+
if (account.walletClientType === 'walletconnect')
|
|
15
|
+
return jsx(Logos.WalletConnect, {});
|
|
16
|
+
if (wallet)
|
|
17
|
+
return jsx(Fragment, { children: (_a = wallet.iconConnector) !== null && _a !== void 0 ? _a : wallet.icon });
|
|
18
|
+
return jsx(WalletIcon, {});
|
|
19
|
+
};
|
|
20
|
+
const ProviderIcon = ({ account }) => {
|
|
21
|
+
switch (account.provider) {
|
|
22
|
+
case 'email':
|
|
23
|
+
case 'credential':
|
|
24
|
+
return jsx(EmailIcon, {});
|
|
25
|
+
// OTP_TODO: Wallet icon
|
|
26
|
+
case 'wallet':
|
|
27
|
+
case 'siwe':
|
|
28
|
+
return jsx(WalletIconWrapper, { account: account });
|
|
29
|
+
case 'phone':
|
|
30
|
+
return jsx(PhoneIcon, {});
|
|
31
|
+
case 'google':
|
|
32
|
+
case 'twitter':
|
|
33
|
+
case 'facebook':
|
|
34
|
+
return providersLogos[account.provider];
|
|
35
|
+
default:
|
|
36
|
+
return jsx(FitText, { children: account.provider.substring(0, 4).toUpperCase() });
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { ProviderIcon };
|
|
41
|
+
//# sourceMappingURL=ProviderIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProviderIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { UserAccount } from '
|
|
1
|
+
import type { UserAccount } from '@openfort/openfort-js';
|
|
2
2
|
export declare const getProviderName: (provider: UserAccount["provider"]) => string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const getProviderName = (provider) => {
|
|
2
|
+
switch (provider) {
|
|
3
|
+
case 'wallet':
|
|
4
|
+
case 'siwe':
|
|
5
|
+
return 'Wallet';
|
|
6
|
+
case 'email':
|
|
7
|
+
case 'credential':
|
|
8
|
+
return 'Email';
|
|
9
|
+
default:
|
|
10
|
+
return provider.charAt(0).toUpperCase() + provider.slice(1);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { getProviderName };
|
|
15
|
+
//# sourceMappingURL=getProviderName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProviderName.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useEffect } from 'react';
|
|
3
|
+
import useIsMobile from '../../../hooks/useIsMobile.js';
|
|
4
|
+
import { ScrollContainer, ScrollAreaContainer, MoreIndicator } from './styles.js';
|
|
5
|
+
|
|
6
|
+
const ArrowDown = () => (jsxs("svg", { width: "11", height: "12", viewBox: "0 0 11 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("title", { children: "Scroll down arrow" }), jsx("path", { d: "M5.49438 1L5.49438 11M5.49438 11L9.5 7M5.49438 11L1.5 7", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
7
|
+
const ScrollArea = ({ children, height, backgroundColor, mobileDirection, }) => {
|
|
8
|
+
const ref = useRef(null);
|
|
9
|
+
const moreRef = useRef(null);
|
|
10
|
+
const isMobile = useIsMobile();
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const el = ref.current;
|
|
13
|
+
if (!el)
|
|
14
|
+
return;
|
|
15
|
+
// if ref is not scrollable, hide the more indicator
|
|
16
|
+
if (el.scrollHeight > el.clientHeight) {
|
|
17
|
+
if (moreRef.current) {
|
|
18
|
+
moreRef.current.classList.remove('hide');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const handleScroll = (e) => {
|
|
22
|
+
const { scrollTop, scrollHeight, clientHeight, scrollLeft, scrollWidth, clientWidth } = e.target;
|
|
23
|
+
if (moreRef.current) {
|
|
24
|
+
if (scrollTop > 0) {
|
|
25
|
+
moreRef.current.classList.add('hide');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (scrollTop === 0 && scrollLeft === 0) {
|
|
29
|
+
el.classList.add('scroll-start');
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
el.classList.remove('scroll-start');
|
|
33
|
+
}
|
|
34
|
+
if (scrollHeight - scrollTop === clientHeight && scrollWidth - scrollLeft === clientWidth) {
|
|
35
|
+
el.classList.add('scroll-end');
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
el.classList.remove('scroll-end');
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
el.addEventListener('scroll', handleScroll);
|
|
42
|
+
handleScroll({ target: el });
|
|
43
|
+
return () => {
|
|
44
|
+
el.removeEventListener('scroll', handleScroll);
|
|
45
|
+
};
|
|
46
|
+
}, [ref.current]);
|
|
47
|
+
return (jsxs(ScrollContainer, { children: [jsx(ScrollAreaContainer, { ref: ref, "$mobile": isMobile, "$height": height, "$backgroundColor": backgroundColor, "$mobileDirection": mobileDirection, children: children }), jsx(MoreIndicator, { ref: moreRef, className: "hide", onClick: () => {
|
|
48
|
+
if (ref.current) {
|
|
49
|
+
ref.current.scrollTo({
|
|
50
|
+
top: ref.current.scrollHeight,
|
|
51
|
+
behavior: 'smooth',
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}, children: jsxs("span", { children: [jsx(ArrowDown, {}), " More Available"] }) })] }));
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export { ScrollArea };
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|