rujira.ui 0.1.0 → 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/lib/cjs/assets/tokens/index.js +21 -0
- package/lib/cjs/components/AssetLabel.js +9 -0
- package/lib/cjs/components/balance/OmniBalance.js +28 -0
- package/lib/cjs/components/bridges/BuyModal.js +8 -0
- package/lib/cjs/components/bridges/DepositModal.js +131 -0
- package/lib/cjs/components/buttons/Button.js +52 -0
- package/lib/cjs/components/buttons/Popout.js +63 -0
- package/lib/cjs/components/buttons/TxButton.js +171 -0
- package/lib/cjs/components/buttons/__Popout.js +39 -0
- package/lib/cjs/components/cards/Card.js +12 -0
- package/lib/cjs/components/cards/GradientCard.js +12 -0
- package/lib/cjs/components/cards/ShareCard.js +16 -0
- package/lib/cjs/components/chart/RangeLiquidityChart.js +118 -0
- package/lib/cjs/components/footer/Footer.js +15 -0
- package/lib/cjs/components/header/Accounts.js +129 -0
- package/lib/cjs/components/header/Header.js +197 -0
- package/lib/cjs/components/header/Pending.js +47 -0
- package/lib/cjs/components/header/QuickLauncher.js +15 -0
- package/lib/cjs/components/header/ResolveLink.js +17 -0
- package/lib/cjs/components/icons/IconDenom.js +391 -0
- package/lib/cjs/components/icons/Icons.js +350 -0
- package/lib/cjs/components/icons/NetworkIcon.js +44 -0
- package/lib/cjs/components/icons/Networks.js +145 -0
- package/lib/cjs/components/icons/Wallets.js +140 -0
- package/lib/cjs/components/inputs/Checkbox.js +15 -0
- package/lib/cjs/components/inputs/DecimalInput.js +53 -0
- package/lib/cjs/components/inputs/DenomInput.js +29 -0
- package/lib/cjs/components/inputs/Input.js +29 -0
- package/lib/cjs/components/inputs/Numeric.js +24 -0
- package/lib/cjs/components/inputs/Radio.js +15 -0
- package/lib/cjs/components/inputs/Select.js +32 -0
- package/lib/cjs/components/inputs/SwapSelect.js +85 -0
- package/lib/cjs/components/inputs/Textarea.js +28 -0
- package/lib/cjs/components/inputs/Toggle.js +17 -0
- package/lib/cjs/components/loader/Loader.js +9 -0
- package/lib/cjs/components/logos/RujiraLogo.js +10 -0
- package/lib/cjs/components/notices/Warning.js +14 -0
- package/lib/cjs/components/numbers/Decimal.js +30 -0
- package/lib/cjs/components/numbers/Fiat.js +22 -0
- package/lib/cjs/components/pagination/Pagination.js +15 -0
- package/lib/cjs/components/progress/Progress.js +13 -0
- package/lib/cjs/components/slider/Slider.js +9 -0
- package/lib/cjs/components/table/SortItem.js +52 -0
- package/lib/cjs/context/GlobalModal.js +48 -0
- package/lib/cjs/helpers/index.js +167 -0
- package/lib/cjs/hooks/useClickOutside.js +22 -0
- package/lib/cjs/hooks/useEventCallback.js +14 -0
- package/lib/cjs/hooks/useEventListener.js +57 -0
- package/lib/cjs/hooks/useIsTouchDevice.js +20 -0
- package/lib/cjs/hooks/useIsomorphicLayoutEffect.js +18 -0
- package/lib/cjs/hooks/useLocalStorage.js +123 -0
- package/lib/cjs/hooks/useQueryParam.js +36 -0
- package/lib/cjs/hooks/useWindowSize.js +51 -0
- package/lib/cjs/i18n/I18nProvider.js +54 -0
- package/lib/cjs/i18n/TranslationProvider.js +10 -0
- package/lib/cjs/i18n/config.js +101 -0
- package/lib/cjs/i18n/index.js +16 -0
- package/lib/cjs/i18n/locales/de/borrow.json +50 -0
- package/lib/cjs/i18n/locales/de/common.json +107 -0
- package/lib/cjs/i18n/locales/de/ecosystem.json +56 -0
- package/lib/cjs/i18n/locales/de/header.json +86 -0
- package/lib/cjs/i18n/locales/de/index.json +57 -0
- package/lib/cjs/i18n/locales/de/leagues.json +20 -0
- package/lib/cjs/i18n/locales/de/merge.json +41 -0
- package/lib/cjs/i18n/locales/de/portfolio.json +97 -0
- package/lib/cjs/i18n/locales/de/strategies.json +159 -0
- package/lib/cjs/i18n/locales/de/swap.json +30 -0
- package/lib/cjs/i18n/locales/de/trade.json +188 -0
- package/lib/cjs/i18n/locales/en/borrow.json +50 -0
- package/lib/cjs/i18n/locales/en/common.json +107 -0
- package/lib/cjs/i18n/locales/en/ecosystem.json +56 -0
- package/lib/cjs/i18n/locales/en/header.json +86 -0
- package/lib/cjs/i18n/locales/en/index.json +57 -0
- package/lib/cjs/i18n/locales/en/leagues.json +20 -0
- package/lib/cjs/i18n/locales/en/merge.json +41 -0
- package/lib/cjs/i18n/locales/en/portfolio.json +97 -0
- package/lib/cjs/i18n/locales/en/strategies.json +159 -0
- package/lib/cjs/i18n/locales/en/swap.json +30 -0
- package/lib/cjs/i18n/locales/en/trade.json +188 -0
- package/lib/cjs/i18n/useTranslation.js +21 -0
- package/lib/cjs/index.js +70 -0
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/wallets/config/gaia.js +51 -0
- package/lib/cjs/wallets/config/index.js +9 -0
- package/lib/cjs/wallets/config/kujira.js +62 -0
- package/lib/cjs/wallets/config/noble.js +47 -0
- package/lib/cjs/wallets/config/osmo.js +51 -0
- package/lib/cjs/wallets/config/thor.js +50 -0
- package/lib/cjs/wallets/index.js +19 -0
- package/lib/cjs/wallets/providers/brave.js +4 -0
- package/lib/cjs/wallets/providers/coinbase.js +4 -0
- package/lib/cjs/wallets/providers/cosmos.js +152 -0
- package/lib/cjs/wallets/providers/ctrl.js +125 -0
- package/lib/cjs/wallets/providers/daodao.js +12 -0
- package/lib/cjs/wallets/providers/eip1193.js +155 -0
- package/lib/cjs/wallets/providers/eip6963.js +20 -0
- package/lib/cjs/wallets/providers/eip712.js +63 -0
- package/lib/cjs/wallets/providers/index.js +62 -0
- package/lib/cjs/wallets/providers/keplr.js +82 -0
- package/lib/cjs/wallets/providers/leap.js +36 -0
- package/lib/cjs/wallets/providers/ledger/Modal.js +23 -0
- package/lib/cjs/wallets/providers/ledger.js +93 -0
- package/lib/cjs/wallets/providers/metamask.js +4 -0
- package/lib/cjs/wallets/providers/okx.js +79 -0
- package/lib/cjs/wallets/providers/rabby.js +4 -0
- package/lib/cjs/wallets/providers/station.js +6 -0
- package/lib/cjs/wallets/providers/ton.js +57 -0
- package/lib/cjs/wallets/providers/tronlink.js +58 -0
- package/lib/cjs/wallets/providers/trust.js +4 -0
- package/lib/cjs/wallets/providers/utils.js +32 -0
- package/lib/cjs/wallets/providers/utxo.js +107 -0
- package/lib/cjs/wallets/providers/vulticonnect.js +157 -0
- package/lib/cjs/wallets/providers/vultisig.js +45 -0
- package/lib/cjs/wallets/providers/xaman.js +70 -0
- package/lib/cjs/wallets/storage.js +58 -0
- package/lib/esm/assets/tokens/index.d.ts +11 -0
- package/lib/esm/assets/tokens/index.d.ts.map +1 -0
- package/lib/esm/assets/tokens/index.js +10 -0
- package/lib/esm/components/AssetLabel.d.ts +12 -0
- package/lib/esm/components/AssetLabel.d.ts.map +1 -0
- package/lib/esm/components/AssetLabel.js +5 -0
- package/lib/esm/components/balance/OmniBalance.d.ts +9 -0
- package/lib/esm/components/balance/OmniBalance.d.ts.map +1 -0
- package/lib/esm/components/balance/OmniBalance.js +24 -0
- package/lib/esm/components/bridges/BuyModal.d.ts +2 -0
- package/lib/esm/components/bridges/BuyModal.d.ts.map +1 -0
- package/lib/esm/components/bridges/BuyModal.js +4 -0
- package/lib/esm/components/bridges/DepositModal.d.ts +32 -0
- package/lib/esm/components/bridges/DepositModal.d.ts.map +1 -0
- package/lib/esm/components/bridges/DepositModal.js +131 -0
- package/lib/esm/components/buttons/Button.d.ts +16 -0
- package/lib/esm/components/buttons/Button.d.ts.map +1 -0
- package/lib/esm/components/buttons/Button.js +49 -0
- package/lib/esm/components/buttons/Popout.d.ts +7 -0
- package/lib/esm/components/buttons/Popout.d.ts.map +1 -0
- package/lib/esm/components/buttons/Popout.js +59 -0
- package/lib/esm/components/buttons/TxButton.d.ts +28 -0
- package/lib/esm/components/buttons/TxButton.d.ts.map +1 -0
- package/lib/esm/components/buttons/TxButton.js +166 -0
- package/lib/esm/components/buttons/__Popout.d.ts +23 -0
- package/lib/esm/components/buttons/__Popout.d.ts.map +1 -0
- package/lib/esm/components/cards/Card.d.ts +7 -0
- package/lib/esm/components/cards/Card.d.ts.map +1 -0
- package/lib/esm/components/cards/GradientCard.d.ts +7 -0
- package/lib/esm/components/cards/GradientCard.d.ts.map +1 -0
- package/lib/esm/components/cards/ShareCard.d.ts +11 -0
- package/lib/esm/components/cards/ShareCard.d.ts.map +1 -0
- package/lib/esm/components/cards/ShareCard.js +12 -0
- package/lib/esm/components/chart/RangeLiquidityChart.d.ts +32 -0
- package/lib/esm/components/chart/RangeLiquidityChart.d.ts.map +1 -0
- package/lib/esm/components/chart/RangeLiquidityChart.js +111 -0
- package/lib/esm/components/footer/Footer.d.ts +8 -0
- package/lib/esm/components/footer/Footer.d.ts.map +1 -0
- package/lib/esm/components/footer/Footer.js +11 -0
- package/lib/esm/components/header/Accounts.d.ts +33 -0
- package/lib/esm/components/header/Accounts.d.ts.map +1 -0
- package/lib/esm/components/header/Accounts.js +124 -0
- package/lib/esm/components/header/Header.d.ts +41 -0
- package/lib/esm/components/header/Header.d.ts.map +1 -0
- package/lib/esm/components/header/Header.js +175 -0
- package/lib/esm/components/header/Pending.d.ts +10 -0
- package/lib/esm/components/header/Pending.d.ts.map +1 -0
- package/lib/esm/components/header/Pending.js +43 -0
- package/lib/esm/components/header/QuickLauncher.d.ts +5 -0
- package/lib/esm/components/header/QuickLauncher.d.ts.map +1 -0
- package/lib/esm/components/header/QuickLauncher.js +11 -0
- package/lib/esm/components/header/ResolveLink.d.ts +15 -0
- package/lib/esm/components/header/ResolveLink.d.ts.map +1 -0
- package/lib/esm/components/icons/IconDenom.d.ts +5 -0
- package/lib/esm/components/icons/IconDenom.d.ts.map +1 -0
- package/lib/esm/{src/components → components}/icons/IconDenom.js +70 -40
- package/lib/esm/components/icons/Icons.d.ts +116 -0
- package/lib/esm/components/icons/Icons.d.ts.map +1 -0
- package/lib/esm/{src/components → components}/icons/Icons.js +122 -5
- package/lib/esm/components/icons/NetworkIcon.d.ts +8 -0
- package/lib/esm/components/icons/NetworkIcon.d.ts.map +1 -0
- package/lib/esm/components/icons/NetworkIcon.js +40 -0
- package/lib/esm/components/icons/Networks.d.ts +36 -0
- package/lib/esm/components/icons/Networks.d.ts.map +1 -0
- package/lib/esm/components/icons/Networks.js +142 -0
- package/lib/esm/components/icons/Wallets.d.ts +51 -0
- package/lib/esm/components/icons/Wallets.d.ts.map +1 -0
- package/lib/esm/components/icons/Wallets.js +137 -0
- package/lib/esm/components/inputs/Checkbox.d.ts +6 -0
- package/lib/esm/components/inputs/Checkbox.d.ts.map +1 -0
- package/lib/esm/components/inputs/DecimalInput.d.ts +8 -0
- package/lib/esm/components/inputs/DecimalInput.d.ts.map +1 -0
- package/lib/esm/components/inputs/DecimalInput.js +49 -0
- package/lib/esm/components/inputs/DenomInput.d.ts +17 -0
- package/lib/esm/components/inputs/DenomInput.d.ts.map +1 -0
- package/lib/esm/components/inputs/DenomInput.js +25 -0
- package/lib/esm/components/inputs/Input.d.ts +10 -0
- package/lib/esm/components/inputs/Input.d.ts.map +1 -0
- package/lib/esm/{src/components → components}/inputs/Input.js +4 -3
- package/lib/esm/components/inputs/Numeric.d.ts +12 -0
- package/lib/esm/components/inputs/Numeric.d.ts.map +1 -0
- package/lib/esm/{src/components → components}/inputs/Numeric.js +4 -2
- package/lib/esm/components/inputs/Radio.d.ts +6 -0
- package/lib/esm/components/inputs/Radio.d.ts.map +1 -0
- package/lib/esm/components/inputs/Select.d.ts +8 -0
- package/lib/esm/components/inputs/Select.d.ts.map +1 -0
- package/lib/esm/components/inputs/SwapSelect.d.ts +37 -0
- package/lib/esm/components/inputs/SwapSelect.d.ts.map +1 -0
- package/lib/esm/components/inputs/SwapSelect.js +80 -0
- package/lib/esm/components/inputs/Textarea.d.ts +8 -0
- package/lib/esm/components/inputs/Textarea.d.ts.map +1 -0
- package/lib/esm/components/inputs/Toggle.d.ts +9 -0
- package/lib/esm/components/inputs/Toggle.d.ts.map +1 -0
- package/lib/esm/components/inputs/Toggle.js +13 -0
- package/lib/esm/components/loader/Loader.d.ts +7 -0
- package/lib/esm/components/loader/Loader.d.ts.map +1 -0
- package/lib/esm/{src/components → components}/loader/Loader.js +1 -0
- package/lib/esm/components/logos/RujiraLogo.d.ts +7 -0
- package/lib/esm/components/logos/RujiraLogo.d.ts.map +1 -0
- package/lib/esm/components/logos/RujiraLogo.js +6 -0
- package/lib/esm/components/notices/Warning.d.ts +8 -0
- package/lib/esm/components/notices/Warning.d.ts.map +1 -0
- package/lib/esm/components/notices/Warning.js +10 -0
- package/lib/esm/components/numbers/Decimal.d.ts +14 -0
- package/lib/esm/components/numbers/Decimal.d.ts.map +1 -0
- package/lib/esm/components/numbers/Decimal.js +26 -0
- package/lib/esm/components/numbers/Fiat.d.ts +11 -0
- package/lib/esm/components/numbers/Fiat.d.ts.map +1 -0
- package/lib/esm/{src/components → components}/numbers/Fiat.js +3 -4
- package/lib/esm/components/pagination/Pagination.d.ts +15 -0
- package/lib/esm/components/pagination/Pagination.d.ts.map +1 -0
- package/lib/esm/components/pagination/Pagination.js +11 -0
- package/lib/esm/components/progress/Progress.d.ts +10 -0
- package/lib/esm/components/progress/Progress.d.ts.map +1 -0
- package/lib/esm/components/slider/Slider.d.ts +3 -0
- package/lib/esm/components/slider/Slider.d.ts.map +1 -0
- package/lib/esm/components/table/SortItem.d.ts +20 -0
- package/lib/esm/components/table/SortItem.d.ts.map +1 -0
- package/lib/esm/components/table/SortItem.js +48 -0
- package/lib/esm/context/GlobalModal.d.ts +19 -0
- package/lib/esm/context/GlobalModal.d.ts.map +1 -0
- package/lib/esm/context/GlobalModal.js +43 -0
- package/lib/esm/helpers/index.d.ts +30 -0
- package/lib/esm/helpers/index.d.ts.map +1 -0
- package/lib/esm/helpers/index.js +153 -0
- package/lib/esm/helpers/number.d.ts +4 -0
- package/lib/esm/helpers/number.d.ts.map +1 -0
- package/lib/esm/helpers/number.js +8 -0
- package/lib/esm/hooks/useClickOutside.d.ts +2 -0
- package/lib/esm/hooks/useClickOutside.d.ts.map +1 -0
- package/lib/esm/hooks/useClickOutside.js +18 -0
- package/lib/esm/hooks/useEventCallback.d.ts +18 -0
- package/lib/esm/hooks/useEventCallback.d.ts.map +1 -0
- package/lib/esm/hooks/useEventCallback.js +11 -0
- package/lib/esm/hooks/useEventListener.d.ts +7 -0
- package/lib/esm/hooks/useEventListener.d.ts.map +1 -0
- package/lib/esm/hooks/useEventListener.js +55 -0
- package/lib/esm/hooks/useIsTouchDevice.d.ts +2 -0
- package/lib/esm/hooks/useIsTouchDevice.d.ts.map +1 -0
- package/lib/esm/hooks/useIsTouchDevice.js +17 -0
- package/lib/esm/hooks/useIsomorphicLayoutEffect.d.ts +16 -0
- package/lib/esm/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/lib/esm/hooks/useIsomorphicLayoutEffect.js +15 -0
- package/lib/esm/hooks/useLocalStorage.d.ts +39 -0
- package/lib/esm/hooks/useLocalStorage.d.ts.map +1 -0
- package/lib/esm/hooks/useLocalStorage.js +120 -0
- package/lib/esm/hooks/useQueryParam.d.ts +3 -0
- package/lib/esm/hooks/useQueryParam.d.ts.map +1 -0
- package/lib/esm/hooks/useWindowSize.d.ts +18 -0
- package/lib/esm/hooks/useWindowSize.d.ts.map +1 -0
- package/lib/esm/hooks/useWindowSize.js +46 -0
- package/lib/esm/i18n/I18nProvider.d.ts +12 -0
- package/lib/esm/i18n/I18nProvider.d.ts.map +1 -0
- package/lib/esm/i18n/I18nProvider.js +49 -0
- package/lib/esm/i18n/TranslationProvider.d.ts +8 -0
- package/lib/esm/i18n/TranslationProvider.d.ts.map +1 -0
- package/lib/esm/i18n/TranslationProvider.js +6 -0
- package/lib/esm/i18n/config.d.ts +8 -0
- package/lib/esm/i18n/config.d.ts.map +1 -0
- package/lib/esm/i18n/config.js +95 -0
- package/lib/esm/i18n/index.d.ts +5 -0
- package/lib/esm/i18n/index.d.ts.map +1 -0
- package/lib/esm/i18n/index.js +5 -0
- package/lib/esm/i18n/locales/de/borrow.json +50 -0
- package/lib/esm/i18n/locales/de/common.json +107 -0
- package/lib/esm/i18n/locales/de/ecosystem.json +56 -0
- package/lib/esm/i18n/locales/de/header.json +86 -0
- package/lib/esm/i18n/locales/de/index.json +57 -0
- package/lib/esm/i18n/locales/de/leagues.json +20 -0
- package/lib/esm/i18n/locales/de/merge.json +41 -0
- package/lib/esm/i18n/locales/de/portfolio.json +97 -0
- package/lib/esm/i18n/locales/de/strategies.json +159 -0
- package/lib/esm/i18n/locales/de/swap.json +30 -0
- package/lib/esm/i18n/locales/de/trade.json +188 -0
- package/lib/esm/i18n/locales/en/borrow.json +50 -0
- package/lib/esm/i18n/locales/en/common.json +107 -0
- package/lib/esm/i18n/locales/en/ecosystem.json +56 -0
- package/lib/esm/i18n/locales/en/header.json +86 -0
- package/lib/esm/i18n/locales/en/index.json +57 -0
- package/lib/esm/i18n/locales/en/leagues.json +20 -0
- package/lib/esm/i18n/locales/en/merge.json +41 -0
- package/lib/esm/i18n/locales/en/portfolio.json +97 -0
- package/lib/esm/i18n/locales/en/strategies.json +159 -0
- package/lib/esm/i18n/locales/en/swap.json +30 -0
- package/lib/esm/i18n/locales/en/trade.json +188 -0
- package/lib/esm/i18n/useTranslation.d.ts +10 -0
- package/lib/esm/i18n/useTranslation.d.ts.map +1 -0
- package/lib/esm/i18n/useTranslation.js +17 -0
- package/lib/esm/index.d.ts +51 -0
- package/lib/esm/index.d.ts.map +1 -0
- package/lib/esm/{src/index.js → index.js} +15 -3
- package/lib/esm/package.json +3 -0
- package/lib/esm/wallets/config/gaia.d.ts +76 -0
- package/lib/esm/wallets/config/gaia.d.ts.map +1 -0
- package/lib/esm/wallets/config/gaia.js +48 -0
- package/lib/esm/wallets/config/index.d.ts +51 -0
- package/lib/esm/wallets/config/index.d.ts.map +1 -0
- package/lib/esm/wallets/config/index.js +6 -0
- package/lib/esm/wallets/config/kujira.d.ts +76 -0
- package/lib/esm/wallets/config/kujira.d.ts.map +1 -0
- package/lib/esm/wallets/config/kujira.js +59 -0
- package/lib/esm/wallets/config/noble.d.ts +76 -0
- package/lib/esm/wallets/config/noble.d.ts.map +1 -0
- package/lib/esm/wallets/config/noble.js +44 -0
- package/lib/esm/wallets/config/osmo.d.ts +76 -0
- package/lib/esm/wallets/config/osmo.d.ts.map +1 -0
- package/lib/esm/wallets/config/osmo.js +48 -0
- package/lib/esm/wallets/config/thor.d.ts +76 -0
- package/lib/esm/wallets/config/thor.d.ts.map +1 -0
- package/lib/esm/wallets/config/thor.js +47 -0
- package/lib/esm/wallets/index.d.ts +4 -0
- package/lib/esm/wallets/index.d.ts.map +1 -0
- package/lib/esm/wallets/index.js +3 -0
- package/lib/esm/wallets/providers/brave.d.ts +4 -0
- package/lib/esm/wallets/providers/brave.d.ts.map +1 -0
- package/lib/esm/wallets/providers/brave.js +2 -0
- package/lib/esm/wallets/providers/coinbase.d.ts +4 -0
- package/lib/esm/wallets/providers/coinbase.d.ts.map +1 -0
- package/lib/esm/wallets/providers/coinbase.js +2 -0
- package/lib/esm/wallets/providers/cosmos.d.ts +28 -0
- package/lib/esm/wallets/providers/cosmos.d.ts.map +1 -0
- package/lib/esm/wallets/providers/cosmos.js +142 -0
- package/lib/esm/wallets/providers/ctrl.d.ts +36 -0
- package/lib/esm/wallets/providers/ctrl.d.ts.map +1 -0
- package/lib/esm/wallets/providers/ctrl.js +121 -0
- package/lib/esm/wallets/providers/daodao.d.ts +4 -0
- package/lib/esm/wallets/providers/daodao.d.ts.map +1 -0
- package/lib/esm/wallets/providers/daodao.js +10 -0
- package/lib/esm/wallets/providers/eip1193.d.ts +31 -0
- package/lib/esm/wallets/providers/eip1193.d.ts.map +1 -0
- package/lib/esm/wallets/providers/eip1193.js +151 -0
- package/lib/esm/wallets/providers/eip6963.d.ts +37 -0
- package/lib/esm/wallets/providers/eip6963.d.ts.map +1 -0
- package/lib/esm/wallets/providers/eip6963.js +16 -0
- package/lib/esm/wallets/providers/eip712.d.ts +20 -0
- package/lib/esm/wallets/providers/eip712.d.ts.map +1 -0
- package/lib/esm/wallets/providers/eip712.js +59 -0
- package/lib/esm/wallets/providers/index.d.ts +9 -0
- package/lib/esm/wallets/providers/index.d.ts.map +1 -0
- package/lib/esm/wallets/providers/index.js +59 -0
- package/lib/esm/wallets/providers/keplr.d.ts +22 -0
- package/lib/esm/wallets/providers/keplr.d.ts.map +1 -0
- package/lib/esm/wallets/providers/keplr.js +78 -0
- package/lib/esm/wallets/providers/leap.d.ts +27 -0
- package/lib/esm/wallets/providers/leap.d.ts.map +1 -0
- package/lib/esm/wallets/providers/leap.js +32 -0
- package/lib/esm/wallets/providers/ledger/Modal.d.ts +5 -0
- package/lib/esm/wallets/providers/ledger/Modal.d.ts.map +1 -0
- package/lib/esm/wallets/providers/ledger/Modal.js +19 -0
- package/lib/esm/wallets/providers/ledger.d.ts +23 -0
- package/lib/esm/wallets/providers/ledger.d.ts.map +1 -0
- package/lib/esm/wallets/providers/ledger.js +91 -0
- package/lib/esm/wallets/providers/metamask.d.ts +4 -0
- package/lib/esm/wallets/providers/metamask.d.ts.map +1 -0
- package/lib/esm/wallets/providers/metamask.js +2 -0
- package/lib/esm/wallets/providers/okx.d.ts +39 -0
- package/lib/esm/wallets/providers/okx.d.ts.map +1 -0
- package/lib/esm/wallets/providers/okx.js +75 -0
- package/lib/esm/wallets/providers/rabby.d.ts +4 -0
- package/lib/esm/wallets/providers/rabby.d.ts.map +1 -0
- package/lib/esm/wallets/providers/rabby.js +2 -0
- package/lib/esm/wallets/providers/station.d.ts +12 -0
- package/lib/esm/wallets/providers/station.d.ts.map +1 -0
- package/lib/esm/wallets/providers/station.js +4 -0
- package/lib/esm/wallets/providers/ton.d.ts +15 -0
- package/lib/esm/wallets/providers/ton.d.ts.map +1 -0
- package/lib/esm/wallets/providers/ton.js +55 -0
- package/lib/esm/wallets/providers/tronlink.d.ts +27 -0
- package/lib/esm/wallets/providers/tronlink.d.ts.map +1 -0
- package/lib/esm/wallets/providers/tronlink.js +54 -0
- package/lib/esm/wallets/providers/trust.d.ts +4 -0
- package/lib/esm/wallets/providers/trust.d.ts.map +1 -0
- package/lib/esm/wallets/providers/trust.js +2 -0
- package/lib/esm/wallets/providers/utils.d.ts +3 -0
- package/lib/esm/wallets/providers/utils.d.ts.map +1 -0
- package/lib/esm/wallets/providers/utils.js +28 -0
- package/lib/esm/wallets/providers/utxo.d.ts +35 -0
- package/lib/esm/wallets/providers/utxo.d.ts.map +1 -0
- package/lib/esm/wallets/providers/utxo.js +101 -0
- package/lib/esm/wallets/providers/vulticonnect.d.ts +47 -0
- package/lib/esm/wallets/providers/vulticonnect.d.ts.map +1 -0
- package/lib/esm/wallets/providers/vulticonnect.js +153 -0
- package/lib/esm/wallets/providers/vultisig.d.ts +21 -0
- package/lib/esm/wallets/providers/vultisig.d.ts.map +1 -0
- package/lib/esm/wallets/providers/vultisig.js +43 -0
- package/lib/esm/wallets/providers/xaman.d.ts +17 -0
- package/lib/esm/wallets/providers/xaman.d.ts.map +1 -0
- package/lib/esm/wallets/providers/xaman.js +66 -0
- package/lib/esm/wallets/storage.d.ts +20 -0
- package/lib/esm/wallets/storage.d.ts.map +1 -0
- package/lib/esm/wallets/storage.js +48 -0
- package/package.json +55 -10
- package/src/assets/images/alert.gif +0 -0
- package/src/assets/images/alert.png +0 -0
- package/src/assets/images/combined.gif +0 -0
- package/src/assets/images/combined.png +0 -0
- package/src/assets/images/connect.gif +0 -0
- package/src/assets/images/connect.png +0 -0
- package/src/assets/images/copy.gif +0 -0
- package/src/assets/images/copy.png +0 -0
- package/src/assets/images/deposit.gif +0 -0
- package/src/assets/images/deposit.png +0 -0
- package/src/assets/images/deposited.gif +0 -0
- package/src/assets/images/disconnect.gif +0 -0
- package/src/assets/images/disconnect.png +0 -0
- package/src/assets/images/download.gif +0 -0
- package/src/assets/images/download.png +0 -0
- package/src/assets/images/exclamation.gif +0 -0
- package/src/assets/images/external.gif +0 -0
- package/src/assets/images/external.png +0 -0
- package/src/assets/images/filters.gif +0 -0
- package/src/assets/images/filters.png +0 -0
- package/src/assets/images/locked.gif +0 -0
- package/src/assets/images/locked.png +0 -0
- package/src/assets/images/network.gif +0 -0
- package/src/assets/images/rujira.png +0 -0
- package/src/assets/images/settings.gif +0 -0
- package/src/assets/images/settings.png +0 -0
- package/src/assets/images/shield-check.gif +0 -0
- package/src/assets/images/shield-check.png +0 -0
- package/src/assets/images/shield-error.gif +0 -0
- package/src/assets/images/shield-error.png +0 -0
- package/src/assets/images/signing-failed.gif +0 -0
- package/src/assets/images/signing-success.gif +0 -0
- package/src/assets/images/swap-circle.gif +0 -0
- package/src/assets/images/swap.gif +0 -0
- package/src/assets/images/txfail.gif +0 -0
- package/src/assets/images/txsign.gif +0 -0
- package/src/assets/images/txsuccess.gif +0 -0
- package/src/assets/images/unlock.gif +0 -0
- package/src/assets/images/unlocked.gif +0 -0
- package/src/assets/images/unlocked.png +0 -0
- package/src/assets/images/vault.gif +0 -0
- package/src/assets/images/vault.png +0 -0
- package/src/assets/networks/doge.png +0 -0
- package/src/assets/networks/osmosis.png +0 -0
- package/src/assets/tokens/aave.png +0 -0
- package/src/assets/tokens/auto.png +0 -0
- package/src/assets/tokens/busd.png +0 -0
- package/src/assets/tokens/cbbtc.png +0 -0
- package/src/assets/tokens/cbbtc.webp +0 -0
- package/src/assets/tokens/default.png +0 -0
- package/src/assets/tokens/demo.png +0 -0
- package/src/assets/tokens/dpi.png +0 -0
- package/src/assets/tokens/flip.png +0 -0
- package/src/assets/tokens/fox.png +0 -0
- package/src/assets/tokens/gusd.png +0 -0
- package/src/assets/tokens/index.ts +11 -0
- package/src/assets/tokens/lqdy.png +0 -0
- package/src/assets/tokens/lusd.png +0 -0
- package/src/assets/tokens/nami.png +0 -0
- package/src/assets/tokens/raze.png +0 -0
- package/src/assets/tokens/rji.png +0 -0
- package/src/assets/tokens/rune.png +0 -0
- package/src/assets/tokens/snx.png +0 -0
- package/src/assets/tokens/tcy.png +0 -0
- package/src/assets/tokens/tgt.png +0 -0
- package/src/assets/tokens/thor.png +0 -0
- package/src/assets/tokens/ton.png +0 -0
- package/src/assets/tokens/trx.png +0 -0
- package/src/assets/tokens/twt.png +0 -0
- package/src/assets/tokens/usdp.png +0 -0
- package/src/assets/tokens/usdt.png +0 -0
- package/src/assets/tokens/vthor.png +0 -0
- package/src/assets/tokens/vvv.png +0 -0
- package/src/assets/tokens/xdefi.png +0 -0
- package/src/assets/tokens/xrp.png +0 -0
- package/src/assets/tokens/xrune.png +0 -0
- package/src/assets/tokens/yfi.png +0 -0
- package/src/assets/tokens/yrune.png +0 -0
- package/src/assets/tokens/ytcy.png +0 -0
- package/src/components/AssetLabel.tsx +20 -0
- package/src/components/balance/OmniBalance.tsx +58 -0
- package/src/components/bridges/BuyModal.tsx +3 -0
- package/src/components/bridges/DepositModal.tsx +611 -0
- package/src/components/buttons/Button.tsx +35 -16
- package/src/components/buttons/Popout.tsx +34 -28
- package/src/components/buttons/TxButton.tsx +292 -61
- package/src/components/cards/ShareCard.tsx +39 -0
- package/src/components/chart/RangeLiquidityChart.tsx +297 -0
- package/src/components/footer/Footer.tsx +32 -14
- package/src/components/header/Accounts.tsx +296 -854
- package/src/components/header/Header.tsx +729 -562
- package/src/components/header/Pending.tsx +148 -0
- package/src/components/header/QuickLauncher.tsx +27 -23
- package/src/components/header/ResolveLink.tsx +0 -29
- package/src/components/icons/IconDenom.tsx +71 -42
- package/src/components/icons/Icons.tsx +373 -7
- package/src/components/icons/NetworkIcon.tsx +114 -0
- package/src/components/icons/Networks.tsx +421 -496
- package/src/components/icons/Wallets.tsx +757 -199
- package/src/components/inputs/DecimalInput.tsx +45 -35
- package/src/components/inputs/DenomInput.tsx +42 -11
- package/src/components/inputs/Input.tsx +7 -0
- package/src/components/inputs/Numeric.tsx +12 -4
- package/src/components/inputs/SwapSelect.tsx +281 -0
- package/src/components/inputs/Toggle.tsx +8 -0
- package/src/components/loader/Loader.tsx +46 -0
- package/src/components/logos/RujiraLogo.tsx +74 -64
- package/src/components/notices/Warning.tsx +5 -4
- package/src/components/numbers/Decimal.tsx +34 -6
- package/src/components/numbers/Fiat.tsx +4 -3
- package/src/components/pagination/Pagination.tsx +42 -0
- package/src/components/table/SortItem.tsx +90 -0
- package/src/context/GlobalModal.tsx +74 -56
- package/src/helpers/index.ts +114 -7
- package/src/hooks/useClickOutside.ts +11 -15
- package/src/hooks/useEventCallback.ts +40 -0
- package/src/hooks/useEventListener.ts +121 -0
- package/src/hooks/useIsTouchDevice.ts +24 -0
- package/src/hooks/useIsomorphicLayoutEffect.ts +17 -0
- package/src/hooks/useLocalStorage.ts +186 -15
- package/src/hooks/useWindowSize.ts +32 -0
- package/src/i18n/I18nProvider.tsx +101 -0
- package/src/i18n/TranslationProvider.tsx +18 -0
- package/src/i18n/config.ts +105 -0
- package/src/i18n/index.ts +11 -1
- package/src/i18n/locales/de/borrow.json +50 -0
- package/src/i18n/locales/de/common.json +107 -0
- package/src/i18n/locales/de/ecosystem.json +56 -0
- package/src/i18n/locales/de/header.json +86 -0
- package/src/i18n/locales/de/index.json +57 -0
- package/src/i18n/locales/de/leagues.json +20 -0
- package/src/i18n/locales/de/merge.json +41 -0
- package/src/i18n/locales/de/portfolio.json +97 -0
- package/src/i18n/locales/de/strategies.json +171 -0
- package/src/i18n/locales/de/swap.json +30 -0
- package/src/i18n/locales/de/trade.json +188 -0
- package/src/i18n/locales/en/borrow.json +50 -0
- package/src/i18n/locales/en/common.json +107 -0
- package/src/i18n/locales/en/ecosystem.json +56 -0
- package/src/i18n/locales/en/header.json +86 -0
- package/src/i18n/locales/en/index.json +57 -0
- package/src/i18n/locales/en/leagues.json +20 -0
- package/src/i18n/locales/en/merge.json +41 -0
- package/src/i18n/locales/en/portfolio.json +97 -0
- package/src/i18n/locales/en/strategies.json +171 -0
- package/src/i18n/locales/en/swap.json +30 -0
- package/src/i18n/locales/en/trade.json +188 -0
- package/src/i18n/useTranslation.ts +31 -0
- package/src/index.ts +22 -3
- package/src/scss/base/_colors.scss +24 -1
- package/src/scss/base/_display.scss +109 -1
- package/src/scss/base/_filters.scss +22 -0
- package/src/scss/base/_flex.scss +31 -19
- package/src/scss/base/_important.scss +12 -0
- package/src/scss/base/_spacing.scss +78 -23
- package/src/scss/base/_tooltip.scss +10 -9
- package/src/scss/base/_typography.scss +55 -8
- package/src/scss/components/_button.scss +253 -116
- package/src/scss/components/_chart.scss +5 -0
- package/src/scss/components/_decimal.scss +19 -1
- package/src/scss/components/_denom-select.scss +51 -1
- package/src/scss/components/_deposit-modal.scss +31 -0
- package/src/scss/components/_fiat.scss +4 -0
- package/src/scss/components/_footer.scss +5 -1
- package/src/scss/components/_header.scss +482 -37
- package/src/scss/components/_input.scss +105 -9
- package/src/scss/components/_ledger.scss +11 -0
- package/src/scss/components/_loader.scss +8 -0
- package/src/scss/components/_modal.scss +77 -1
- package/src/scss/components/_numeric-input.scss +35 -13
- package/src/scss/components/_omni-balance.scss +52 -0
- package/src/scss/components/_pagination.scss +7 -0
- package/src/scss/components/_popout.scss +39 -26
- package/src/scss/components/_radio-checkbox.scss +1 -1
- package/src/scss/components/_select.scss +57 -15
- package/src/scss/components/_slider.scss +35 -0
- package/src/scss/components/_swap-select.scss +350 -0
- package/src/scss/components/_toggle.scss +40 -8
- package/src/scss/components/_warning.scss +59 -2
- package/src/scss/index.scss +9 -1
- package/src/scss/styledcomponents/_card.scss +169 -4
- package/src/scss/styledcomponents/_drawer.scss +58 -3
- package/src/scss/styledcomponents/_general.scss +2 -2
- package/src/scss/styledcomponents/_icon.scss +52 -0
- package/src/scss/styledcomponents/_pair.scss +11 -0
- package/src/scss/styledcomponents/_skeleton.scss +33 -0
- package/src/scss/styledcomponents/_table.scss +115 -19
- package/src/scss/styledcomponents/_tabs.scss +167 -13
- package/src/scss/styledcomponents/_tag.scss +124 -6
- package/src/vite-env.d.ts +15 -0
- package/src/wallets/config/gaia.ts +55 -0
- package/src/wallets/config/index.ts +7 -0
- package/src/wallets/config/kujira.ts +69 -0
- package/src/wallets/config/noble.ts +49 -0
- package/src/wallets/config/osmo.ts +55 -0
- package/src/wallets/config/thor.ts +55 -0
- package/src/wallets/index.ts +3 -0
- package/src/wallets/providers/brave.ts +2 -0
- package/src/wallets/providers/coinbase.ts +2 -0
- package/src/wallets/providers/cosmos.ts +206 -0
- package/src/wallets/providers/ctrl.ts +163 -0
- package/src/wallets/providers/daodao.ts +12 -0
- package/src/wallets/providers/eip1193.ts +214 -0
- package/src/wallets/providers/eip6963.ts +56 -0
- package/src/wallets/providers/eip712.ts +84 -0
- package/src/wallets/providers/index.ts +81 -0
- package/src/wallets/providers/keplr.ts +111 -0
- package/src/wallets/providers/leap.ts +60 -0
- package/src/wallets/providers/ledger/Modal.tsx +35 -0
- package/src/wallets/providers/ledger.ts +138 -0
- package/src/wallets/providers/metamask.ts +2 -0
- package/src/wallets/providers/okx.ts +108 -0
- package/src/wallets/providers/rabby.ts +2 -0
- package/src/wallets/providers/station.ts +16 -0
- package/src/wallets/providers/ton.ts +66 -0
- package/src/wallets/providers/tronlink.ts +72 -0
- package/src/wallets/providers/trust.ts +2 -0
- package/src/wallets/providers/utils.ts +22 -0
- package/src/wallets/providers/utxo.ts +146 -0
- package/src/wallets/providers/vulticonnect.ts +217 -0
- package/src/wallets/providers/vultisig.ts +51 -0
- package/src/wallets/providers/xaman.ts +73 -0
- package/src/wallets/storage.ts +62 -0
- package/.eslintrc.cjs +0 -21
- package/.tool-versions +0 -1
- package/i18n/.github/workflows/validate.yml +0 -13
- package/i18n/README.md +0 -7
- package/i18n/translations/template.json +0 -448
- package/i18n/update-template.js +0 -19
- package/i18n/validate.js +0 -10
- package/lib/esm/i18n/translations/template.json +0 -448
- package/lib/esm/src/components/buttons/Button.js +0 -37
- package/lib/esm/src/components/buttons/Popout.js +0 -56
- package/lib/esm/src/components/buttons/TxButton.js +0 -42
- package/lib/esm/src/components/footer/Footer.js +0 -11
- package/lib/esm/src/components/header/Accounts.js +0 -211
- package/lib/esm/src/components/header/Header.js +0 -69
- package/lib/esm/src/components/header/QuickLauncher.js +0 -10
- package/lib/esm/src/components/icons/Networks.js +0 -32
- package/lib/esm/src/components/icons/Wallets.js +0 -62
- package/lib/esm/src/components/inputs/DecimalInput.js +0 -35
- package/lib/esm/src/components/inputs/DenomInput.js +0 -22
- package/lib/esm/src/components/inputs/DenomSelect.js +0 -66
- package/lib/esm/src/components/inputs/Toggle.js +0 -13
- package/lib/esm/src/components/logos/RujiraLogo.js +0 -2
- package/lib/esm/src/components/notices/Warning.js +0 -10
- package/lib/esm/src/components/numbers/Decimal.js +0 -14
- package/lib/esm/src/context/Affiliate.js +0 -34
- package/lib/esm/src/context/GlobalModal.js +0 -35
- package/lib/esm/src/d.js +0 -1
- package/lib/esm/src/helpers/index.js +0 -65
- package/lib/esm/src/hooks/useClickOutside.js +0 -19
- package/lib/esm/src/hooks/useLocalStorage.js +0 -12
- package/lib/esm/src/hooks/useWindowSize.js +0 -19
- package/lib/esm/src/i18n/i18n.js +0 -90
- package/lib/esm/src/i18n/index.js +0 -1
- package/lib/esm/src/services/account.js +0 -42
- package/lib/esm/tsconfig.tsbuildinfo +0 -1
- package/src/assets/tokens/axlusdt.png +0 -0
- package/src/components/inputs/DenomSelect.tsx +0 -178
- package/src/context/Affiliate.tsx +0 -65
- package/src/d.ts +0 -4
- package/src/i18n/i18n.tsx +0 -102
- package/src/services/account.ts +0 -53
- package/tsconfig.json +0 -25
- package/tsconfig.node.json +0 -11
- package/vite.config.ts +0 -7
- package/vitest-setup.js +0 -1
- package/vitest.config.js +0 -13
- /package/lib/{esm/src → cjs}/helpers/number.js +0 -0
- /package/lib/esm/{src/components → components}/buttons/__Popout.js +0 -0
- /package/lib/esm/{src/components → components}/cards/Card.js +0 -0
- /package/lib/esm/{src/components → components}/cards/GradientCard.js +0 -0
- /package/lib/esm/{src/components → components}/header/ResolveLink.js +0 -0
- /package/lib/esm/{src/components → components}/inputs/Checkbox.js +0 -0
- /package/lib/esm/{src/components → components}/inputs/Radio.js +0 -0
- /package/lib/esm/{src/components → components}/inputs/Select.js +0 -0
- /package/lib/esm/{src/components → components}/inputs/Textarea.js +0 -0
- /package/lib/esm/{src/components → components}/progress/Progress.js +0 -0
- /package/lib/esm/{src/components → components}/slider/Slider.js +0 -0
- /package/lib/esm/{src/hooks → hooks}/useQueryParam.js +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wink = exports.rkuji = exports.nstk = exports.nami = exports.mnta = exports.lvn = exports.kuji = exports.fuzn = exports.auto = void 0;
|
|
4
|
+
const auto_png_1 = require("./auto.png");
|
|
5
|
+
exports.auto = auto_png_1.default;
|
|
6
|
+
const fuzn_png_1 = require("./fuzn.png");
|
|
7
|
+
exports.fuzn = fuzn_png_1.default;
|
|
8
|
+
const kuji_png_1 = require("./kuji.png");
|
|
9
|
+
exports.kuji = kuji_png_1.default;
|
|
10
|
+
const lvn_png_1 = require("./lvn.png");
|
|
11
|
+
exports.lvn = lvn_png_1.default;
|
|
12
|
+
const mnta_png_1 = require("./mnta.png");
|
|
13
|
+
exports.mnta = mnta_png_1.default;
|
|
14
|
+
const nami_png_1 = require("./nami.png");
|
|
15
|
+
exports.nami = nami_png_1.default;
|
|
16
|
+
const nstk_png_1 = require("./nstk.png");
|
|
17
|
+
exports.nstk = nstk_png_1.default;
|
|
18
|
+
const rkuji_png_1 = require("./rkuji.png");
|
|
19
|
+
exports.rkuji = rkuji_png_1.default;
|
|
20
|
+
const wink_png_1 = require("./wink.png");
|
|
21
|
+
exports.wink = wink_png_1.default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AssetLabel = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const AssetLabel = ({ asset, Container }) => asset ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [asset.metadata.symbol, ((asset.metadata.symbol === "USDT" && asset.chain !== "ETH") ||
|
|
6
|
+
(asset.metadata.symbol === "ETH" && asset.chain !== "ETH") ||
|
|
7
|
+
(asset.metadata.symbol === "USDC" && asset.chain !== "ETH")) &&
|
|
8
|
+
asset.type === "SECURED" && (0, jsx_runtime_1.jsxs)(Container, { children: [".", asset.chain] })] })) : null;
|
|
9
|
+
exports.AssetLabel = AssetLabel;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OmniBalance = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const rujira_js_1 = require("rujira.js");
|
|
6
|
+
const helpers_1 = require("../../helpers");
|
|
7
|
+
const NetworkIcon_1 = require("../icons/NetworkIcon");
|
|
8
|
+
const Decimal_1 = require("../numbers/Decimal");
|
|
9
|
+
const accountSorter = (a, b) => {
|
|
10
|
+
const aIsSecured = a.asset.type === "SECURED";
|
|
11
|
+
const bIsSecured = b.asset.type === "SECURED";
|
|
12
|
+
if (aIsSecured && !bIsSecured)
|
|
13
|
+
return -1;
|
|
14
|
+
if (!aIsSecured && bIsSecured)
|
|
15
|
+
return 1;
|
|
16
|
+
return Number(b.balance - a.balance);
|
|
17
|
+
};
|
|
18
|
+
const OmniBalance = ({ balance, onClick, className, }) => {
|
|
19
|
+
const sortedAccounts = balance?.accounts
|
|
20
|
+
? [...balance.accounts].sort(accountSorter)
|
|
21
|
+
: [];
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "omni-balance", children: [(0, jsx_runtime_1.jsx)(Decimal_1.Decimal, { amount: balance?.balance || 0n, className: className, onClick: () => balance && onClick?.(balance) }), sortedAccounts.length > 1 && ((0, jsx_runtime_1.jsx)("div", { className: "omni-balance__networks", children: sortedAccounts.map((x) => {
|
|
23
|
+
const n = x.asset.type === "SECURED" ? "THOR" : x.asset.chain;
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)("button", { "data-tooltip-id": "global-tip", "data-tooltip-html": `
|
|
25
|
+
<div class="condensed fs-16 fw-500">${(0, helpers_1.nFormatter)(x.balance, 6)}</div><div class="fs-14 lh-16 color-grey">on ${(0, rujira_js_1.networkLabel)(n)}</div>`, className: `omni-balance__network-button omni-balance__network-button--${n.toLowerCase()}`, onClick: () => onClick?.(x), children: (0, jsx_runtime_1.jsx)(NetworkIcon_1.NetworkIcon, { network: n }) }, n));
|
|
26
|
+
}) }))] }));
|
|
27
|
+
};
|
|
28
|
+
exports.OmniBalance = OmniBalance;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BuyModal = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const BuyModal = () => {
|
|
6
|
+
return (0, jsx_runtime_1.jsx)("h3", { className: "h3", children: "Buy Crypto" });
|
|
7
|
+
};
|
|
8
|
+
exports.BuyModal = BuyModal;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DepositModal = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const rujira_js_1 = require("rujira.js");
|
|
7
|
+
const i18n_1 = require("../../i18n");
|
|
8
|
+
const IconDenom_1 = require("../icons/IconDenom");
|
|
9
|
+
const Icons_1 = require("../icons/Icons");
|
|
10
|
+
const Input_1 = require("../inputs/Input");
|
|
11
|
+
/* import { useClickOutside } from "../../hooks/useClickOutside";
|
|
12
|
+
import { BreakPoints, useWindowSize } from "../../hooks/useWindowSize";
|
|
13
|
+
import { AnimatePresence, motion } from "motion/react"; */
|
|
14
|
+
const clsx_1 = require("clsx");
|
|
15
|
+
const date_fns_1 = require("date-fns");
|
|
16
|
+
const react_hot_toast_1 = require("react-hot-toast");
|
|
17
|
+
const __1 = require("../..");
|
|
18
|
+
const deposited_gif_1 = require("../../assets/images/deposited.gif");
|
|
19
|
+
const filters_gif_1 = require("../../assets/images/filters.gif");
|
|
20
|
+
const filters_png_1 = require("../../assets/images/filters.png");
|
|
21
|
+
const swap_gif_1 = require("../../assets/images/swap.gif");
|
|
22
|
+
const Select_1 = require("../inputs/Select");
|
|
23
|
+
const DepositModal = ({ title = "deposit", options, targets, selected, dismiss, Submit, queryClient, amount, target, label, }) => {
|
|
24
|
+
const { t } = (0, i18n_1.useTranslation)("common");
|
|
25
|
+
const [token, setToken] = (0, react_1.useState)(selected ? selected.asset.metadata.symbol : undefined);
|
|
26
|
+
const [asset, setAsset] = (0, react_1.useState)(selected?.asset);
|
|
27
|
+
const [tx, setTx] = (0, react_1.useState)();
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "deposit-modal", children: [(token || asset) && !selected && !tx && ((0, jsx_runtime_1.jsxs)("button", { className: "transparent color-white hover-primary1 flex ai-c mb-1 fs-14 fw-500 pointer", onClick: () => {
|
|
29
|
+
setAsset(undefined);
|
|
30
|
+
setToken(undefined);
|
|
31
|
+
}, children: [(0, jsx_runtime_1.jsx)(Icons_1.AngleLeft, { className: "block w-2 h-2 mr-0.5" }), t("back")] })), (0, jsx_runtime_1.jsxs)("h3", { className: "h3 flex ai-b mb-0", children: [asset && ((0, jsx_runtime_1.jsx)(IconDenom_1.IconDenom, { denom: asset.metadata.symbol, className: "as-c w-4 h-4 mr-1" })), t(title), " ", asset && asset.metadata.symbol, asset && ((0, jsx_runtime_1.jsx)("small", { className: "ml-1 color-grey fw-400", children: t("toRujira") }))] }), label, (0, jsx_runtime_1.jsxs)("div", { className: "mt-3", children: [!token && ((0, jsx_runtime_1.jsx)(TokenSelect, { options: options, onSelect: (a) => {
|
|
32
|
+
setToken(a.metadata.symbol);
|
|
33
|
+
setAsset(a);
|
|
34
|
+
} })), asset && !tx && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Confirm, { asset: asset, amount: amount, balance: selected ||
|
|
35
|
+
options.find((a) => a.asset.asset === asset.asset)?.balance, target: target, targets: targets, Submit: Submit, onSuccess: setTx, queryClient: queryClient }) })), tx && (0, jsx_runtime_1.jsx)(Success, { tx: tx, dismiss: dismiss })] })] }));
|
|
36
|
+
};
|
|
37
|
+
exports.DepositModal = DepositModal;
|
|
38
|
+
const TokenSelect = ({ options, onSelect }) => {
|
|
39
|
+
const { t } = (0, i18n_1.useTranslation)("common");
|
|
40
|
+
const [search, setSearch] = (0, react_1.useState)("");
|
|
41
|
+
const [all, setAll] = (0, react_1.useState)(!options.length);
|
|
42
|
+
const filtered = options.filter((i) => {
|
|
43
|
+
const q = i.asset.metadata.symbol
|
|
44
|
+
.toLowerCase()
|
|
45
|
+
.includes(search.toLowerCase());
|
|
46
|
+
return all ? q : q && i.balance;
|
|
47
|
+
});
|
|
48
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex", children: [(0, jsx_runtime_1.jsx)(Input_1.Input, { containerClassName: "grow", label: t("search"), value: search, onChange: (e) => setSearch(e.currentTarget.value), children: search !== "" && ((0, jsx_runtime_1.jsx)(Icons_1.MinusCircle, { className: "input-container__clear", onClick: () => setSearch("") })) }), (0, jsx_runtime_1.jsx)(__1.Toggle, { label: t("showAll"), className: "toggle--xs color-white as-c ml-1", checked: all, onChange: (e) => setAll(e.currentTarget.checked) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "deposit-modal__content row wrap pad-mini mt-1.5", children: [filtered.map((i) => ((0, jsx_runtime_1.jsx)("div", { className: "col-12 col-md-col-6", children: (0, jsx_runtime_1.jsxs)("button", { className: "card card--hover-border mt-0.5 mb-0.5 p-2 flex ai-c", onClick: () => {
|
|
49
|
+
onSelect(i.asset);
|
|
50
|
+
setSearch("");
|
|
51
|
+
}, children: [(0, jsx_runtime_1.jsx)(IconDenom_1.IconDenom, { denom: i.asset.metadata.symbol, className: "block w-4 h-4" }), (0, jsx_runtime_1.jsx)("p", { className: "ml-1 fw-600 color-white", children: i.asset.metadata.symbol }), (0, jsx_runtime_1.jsxs)("div", { className: "ml-a text-right", children: [i.balance ? ((0, jsx_runtime_1.jsx)("div", { className: "tag tag--teal tag--borderless", children: (0, jsx_runtime_1.jsx)(__1.Decimal, { amount: i.balance.balance, decimals: i.asset.metadata.decimals }) })) : null, (0, jsx_runtime_1.jsx)("br", {}), i.valueUsd ? ((0, jsx_runtime_1.jsx)("small", { className: "color-grey", children: (0, jsx_runtime_1.jsx)(__1.Fiat, { symbol: "$", className: "fs-12 mr-1", amount: i.valueUsd, decimals: i.asset.metadata.decimals }) })) : null] })] }) }, i.asset.asset))), filtered.length === 0 && ((0, jsx_runtime_1.jsx)("p", { className: "color-grey my-2 w-full text-center", children: t("noBalancesFound") }))] })] }));
|
|
52
|
+
};
|
|
53
|
+
const Confirm = ({ asset, balance, targets, target: target_, Submit, onSuccess, queryClient, amount: requestAmount, }) => {
|
|
54
|
+
const { t } = (0, i18n_1.useTranslation)("common");
|
|
55
|
+
const ref = (0, react_1.useRef)(null);
|
|
56
|
+
const [amount, setAmount] = (0, react_1.useState)(requestAmount || 0n);
|
|
57
|
+
const [target, setTarget] = (0, react_1.useState)(target_ || "");
|
|
58
|
+
const [custom, setCustom] = (0, react_1.useState)("");
|
|
59
|
+
const [direct, setDirect] = (0, react_1.useState)(false);
|
|
60
|
+
const [advanced, setAdvanced] = (0, react_1.useState)(false);
|
|
61
|
+
const [hoverAd, setHoverAd] = (0, react_1.useState)(false);
|
|
62
|
+
const [quote, setQuote] = (0, react_1.useState)();
|
|
63
|
+
const [account, setAccount] = (0, react_1.useState)(balance?.accounts[0]);
|
|
64
|
+
(0, react_1.useEffect)(() => {
|
|
65
|
+
if (ref.current && target === "custom") {
|
|
66
|
+
ref.current.focus();
|
|
67
|
+
}
|
|
68
|
+
}, [target, ref]);
|
|
69
|
+
const shouldSwap = asset.chain !== account?.asset.chain ||
|
|
70
|
+
asset.metadata.symbol !== account.asset.metadata.symbol;
|
|
71
|
+
// Determine the actual destination address
|
|
72
|
+
const destination = target === "custom" ? custom : target;
|
|
73
|
+
// Fetch swap quote when conditions are met
|
|
74
|
+
(0, react_1.useEffect)(() => {
|
|
75
|
+
setQuote(undefined);
|
|
76
|
+
if (!account)
|
|
77
|
+
return;
|
|
78
|
+
if (!shouldSwap)
|
|
79
|
+
return;
|
|
80
|
+
if (!amount)
|
|
81
|
+
return;
|
|
82
|
+
if (direct)
|
|
83
|
+
return;
|
|
84
|
+
setQuote("loading");
|
|
85
|
+
queryClient.thorchain
|
|
86
|
+
.getSwapQuote({
|
|
87
|
+
fromAsset: account.asset.asset,
|
|
88
|
+
toAsset: asset.asset,
|
|
89
|
+
amount: amount,
|
|
90
|
+
streamingInterval: 1n,
|
|
91
|
+
streamingQuantity: 0n,
|
|
92
|
+
destination,
|
|
93
|
+
})
|
|
94
|
+
.then(setQuote)
|
|
95
|
+
.catch(setQuote);
|
|
96
|
+
}, [account, amount, destination, asset, direct]);
|
|
97
|
+
const depositAmount = typeof quote === "object" && "memo" in quote
|
|
98
|
+
? quote.expectedAmountOut
|
|
99
|
+
: amount;
|
|
100
|
+
const depositFee = (typeof quote === "object" && "memo" in quote && quote.fees?.total) || 0n;
|
|
101
|
+
const price = asset.price?.current || 0n;
|
|
102
|
+
const feeValue = price ? (price * depositFee) / 10n ** 12n : 0n;
|
|
103
|
+
const receivedValue = price ? (price * depositAmount) / 10n ** 12n : 0n;
|
|
104
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [balance && balance.accounts.length > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h2", { className: "fs-14 fw-500 color-grey mb-1 ml-1", children: t("selectSourceAccount") }), (0, jsx_runtime_1.jsx)("div", { className: "br-1 p-2 bg-black mb-2 flex dir-c gap-y-1", children: balance.accounts.map((x) => ((0, jsx_runtime_1.jsxs)("div", { onClick: () => {
|
|
105
|
+
setAccount(x);
|
|
106
|
+
}, className: (0, clsx_1.default)({
|
|
107
|
+
"flex ai-c fs-14 condensed pointer": true,
|
|
108
|
+
"color-grey": account !== x,
|
|
109
|
+
"color-white": account === x,
|
|
110
|
+
}), children: [(0, jsx_runtime_1.jsx)(__1.Radio, { checked: account === x, readOnly: true }), (0, jsx_runtime_1.jsx)("div", { "data-tooltip-content": x.address, "data-tooltip-id": "modal-tip", onClick: () => {
|
|
111
|
+
react_hot_toast_1.default.success("Address copied to clipboard");
|
|
112
|
+
navigator.clipboard.writeText(x.address);
|
|
113
|
+
}, className: "inconsolata mx-1", children: x.address.substring(0, 6) + "…" + x.address.slice(-6) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex ai-c gap-0.5", children: [(0, jsx_runtime_1.jsx)(__1.NetworkIcon, { network: x.asset.chain, className: "w-2 h-2" }), (0, jsx_runtime_1.jsx)("span", { className: "", children: (0, rujira_js_1.networkLabel)(x.asset.chain) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex dir-r ai-e ml-a", children: [(0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)({
|
|
114
|
+
"tag tag--md ml-a": true,
|
|
115
|
+
"tag--teal": account === x,
|
|
116
|
+
}), children: (0, jsx_runtime_1.jsx)(__1.Decimal, { amount: x.balance, symbol: x.asset.metadata.symbol, symbolClassName: "condensed fw-500" }) }), x.valueUsd ? ((0, jsx_runtime_1.jsxs)("div", { className: "iflex ml-0.5 ml-sm-1 fs-13 color-grey", style: { marginBottom: "0.05rem" }, children: ["(", (0, jsx_runtime_1.jsx)(__1.Fiat, { amount: x.valueUsd, symbol: "$", decimals: 8, className: "fs-12 color-grey" }), ")"] })) : null] })] }, x.address + x.asset.chain))) })] })) : null, (0, jsx_runtime_1.jsx)(__1.DenomInput, { className: "mt-2.5 bg-black", symbol: asset.metadata.symbol, amount: amount, decimals: 8, onChangeAmount: setAmount, max: BigInt(account?.balance || 0), maxLabel: `${t("balance")}:`, fiat: { price, symbol: "$" } }), (0, jsx_runtime_1.jsxs)("div", { className: "row wrap mt-1.5 mt-sm-2 condensed fs-14 px-2 gap-y-1", children: [(0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-4 text-center text-xs-left color-grey fw-500", children: t("swapFee") }), (0, jsx_runtime_1.jsxs)("div", { className: "col-12 col-xs-8 text-center text-xs-right", children: [(0, jsx_runtime_1.jsx)(__1.Decimal, { amount: depositFee, symbol: direct ? account?.asset.metadata.symbol : asset.metadata.symbol, className: direct || !shouldSwap ? "color-grey" : undefined, symbolClassName: "color-grey fs-14 condensed fw-500" }), (0, jsx_runtime_1.jsxs)("div", { className: "iflex ml-1 fs-13 color-grey", children: ["(", (0, jsx_runtime_1.jsx)(__1.Fiat, { amount: feeValue ?? 0n, symbol: "$", decimals: 8, className: "numeric-input__value color-grey fs-12" }), ")"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-4 text-center text-xs-left color-grey fw-500", children: t("receivedAmount") }), (0, jsx_runtime_1.jsxs)("div", { className: "col-12 col-xs-8 text-center text-xs-right", children: [(0, jsx_runtime_1.jsx)(__1.Decimal, { amount: depositAmount, symbol: direct ? account?.asset.metadata.symbol : asset.metadata.symbol, symbolClassName: "color-grey fs-14 condensed fw-500" }), (0, jsx_runtime_1.jsxs)("div", { className: "iflex ml-1 fs-13 color-grey", children: ["(", (0, jsx_runtime_1.jsx)(__1.Fiat, { amount: receivedValue ?? 0n, symbol: "$", decimals: 8, className: "numeric-input__value color-grey fs-12" }), ")"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full jc-c ai-c gap-0.5 pointer color-grey hover-white", onMouseEnter: () => setHoverAd(true), onMouseLeave: () => setHoverAd(false), onClick: () => setAdvanced((prev) => !prev), children: [(0, jsx_runtime_1.jsx)("img", { src: hoverAd ? filters_gif_1.default : filters_png_1.default, className: (0, clsx_1.default)({
|
|
117
|
+
"w-2 h-2": true,
|
|
118
|
+
"filter-grey": !hoverAd,
|
|
119
|
+
"filter-white": hoverAd,
|
|
120
|
+
}) }), advanced ? t("hideAdvancedOptions") : t("showAdvancedOptions")] })] }), advanced && ((0, jsx_runtime_1.jsxs)("div", { className: "br-1 p-2 bg-black mt-1 row wrap condensed fs-14 px-2 gap-y-1", children: [(0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-4 text-center text-xs-left color-grey fw-500", children: t("destination") }), (0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-8 text-center text-xs-right", children: (0, jsx_runtime_1.jsxs)(Select_1.Select, { containerClassName: "fs-14", className: "select--inline text-right", value: target, onChange: (e) => setTarget(e.currentTarget.value), children: [targets.map((x) => ((0, jsx_runtime_1.jsx)("option", { value: x, className: "bg-darkGrey", children: x }, x))), (0, jsx_runtime_1.jsx)("option", { className: "bg-darkGrey", value: "custom", children: t("customAddress") })] }) }), target === "custom" && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-4 text-center text-xs-left color-grey fw-500", children: t("customDestination") }), (0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-8 text-center text-xs-right", children: (0, jsx_runtime_1.jsx)(Input_1.Input, { containerClassName: "fs-14", value: custom, onChange: (e) => setCustom(e.currentTarget.value), className: "input--inline text-right", innerRef: ref }) })] })), shouldSwap && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [asset.chain === "THOR" ? null : ((0, jsx_runtime_1.jsx)("div", { className: "col-12 text-center text-xs-right", children: (0, jsx_runtime_1.jsx)(__1.Toggle, { className: "toggle--xs", label: `Deposit ${account?.asset.chain}.${account?.asset.metadata.symbol} directly`, checked: direct, onChange: () => setDirect((prev) => !prev) }) })), direct && ((0, jsx_runtime_1.jsxs)(__1.Warning, { className: "warning--sm condensed flex ai-c mt-1", color: "orange", children: [(0, jsx_runtime_1.jsx)("img", { src: swap_gif_1.default, alt: "", className: "filter-orange block no-shrink", style: { width: "2.5rem", height: "2.5rem" } }), (0, jsx_runtime_1.jsxs)("small", { className: "text-left fs-14", children: ["You are depositing a version of", " ", (0, jsx_runtime_1.jsx)("span", { className: "color-white", children: asset.metadata.symbol }), " ", "that is not the standard on Rujira. Our products use the", " ", (0, jsx_runtime_1.jsx)("span", { className: "color-white", children: "Ethereum" }), " version of", " ", (0, jsx_runtime_1.jsx)("span", { className: "color-white", children: asset.metadata.symbol }), "."] })] }))] }))] })), (0, jsx_runtime_1.jsx)(Submit, { selected: account, amount: amount, target: target !== "custom" ? target : custom, swapMemo: "memo", onSuccess: onSuccess, disabled: false, isDangerous: false, quote: quote, shouldSwap: shouldSwap })] }));
|
|
121
|
+
};
|
|
122
|
+
const Success = ({ tx, dismiss, }) => {
|
|
123
|
+
const { t } = (0, i18n_1.useTranslation)("common");
|
|
124
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "mt-2 flex ai-c br-2 bg-teal-10 p-2", children: [(0, jsx_runtime_1.jsx)("img", { src: deposited_gif_1.default, alt: "", className: "filter-teal block w-6 h-a no-shrink" }), (0, jsx_runtime_1.jsx)("span", { className: "color-teal fs-18 fw-600 mx-1", children: t("depositStarted") })] }), (0, jsx_runtime_1.jsx)("div", { className: "table table--no-hover mt-1", children: (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsxs)("td", { className: "color-grey", children: [(0, rujira_js_1.networkLabel)(tx.network), " ", t("depositEta")] }), (0, jsx_runtime_1.jsx)("td", { children: (0, date_fns_1.formatDuration)((0, date_fns_1.intervalToDuration)({
|
|
125
|
+
start: 0,
|
|
126
|
+
end: (0, rujira_js_1.networkConfirmationTime)(tx.network),
|
|
127
|
+
}), { format: ["hours", "minutes", "seconds"], zero: false }) })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { className: "color-grey", children: t("viewTx") }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("a", { href: (0, rujira_js_1.networkTxLink)(tx), target: "_blank", className: "color-white hover-primary1 no-underline", children: [(0, rujira_js_1.networkExplorerLabel)(tx.network), (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "inline-block w-1.5 h-1.5 ml-0.5" })] }) })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { className: "color-grey", children: t("trackDeposit") }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("a", { href: (0, rujira_js_1.networkTxLink)({
|
|
128
|
+
network: "THOR",
|
|
129
|
+
txHash: tx.txHash.replace(/^0x/, "").toUpperCase(),
|
|
130
|
+
}), target: "_blank", className: "color-white hover-primary1 no-underline", children: ["THORChain.net", (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "inline-block w-1.5 h-1.5 ml-0.5" })] }) })] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "modal__footer p-3 text-right", children: (0, jsx_runtime_1.jsx)(__1.Button, { label: "Close", onClick: dismiss }) })] }));
|
|
131
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Button = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const clsx_1 = require("clsx");
|
|
6
|
+
const react_1 = require("motion/react");
|
|
7
|
+
const react_2 = require("react");
|
|
8
|
+
const fixedForwardRef = react_2.forwardRef;
|
|
9
|
+
const UnwrappedAnyComponent = (props, ref) => {
|
|
10
|
+
const { as: Comp = "button", label, children, className, ...rest } = props;
|
|
11
|
+
// Remove button--outline if button--waiting is present
|
|
12
|
+
const processedClassName = className?.includes("button--waiting")
|
|
13
|
+
? className.replace(/button--outline/g, "").trim()
|
|
14
|
+
: className;
|
|
15
|
+
const mouseX = (0, react_1.useMotionValue)(0);
|
|
16
|
+
const mouseY = (0, react_1.useMotionValue)(0);
|
|
17
|
+
function handleMouseMove({ currentTarget, clientX, clientY }) {
|
|
18
|
+
const { left, top } = currentTarget.getBoundingClientRect();
|
|
19
|
+
mouseX.set(clientX - left);
|
|
20
|
+
mouseY.set(clientY - top);
|
|
21
|
+
}
|
|
22
|
+
let gradient = "214, 21, 235, 1";
|
|
23
|
+
if (className?.includes("button--grey")) {
|
|
24
|
+
gradient = "96, 125, 139, 1";
|
|
25
|
+
}
|
|
26
|
+
else if (className?.includes("button--red")) {
|
|
27
|
+
gradient = "244, 81, 30, 1";
|
|
28
|
+
}
|
|
29
|
+
else if (className?.includes("button--blue")) {
|
|
30
|
+
gradient = "96, 251, 208, 1";
|
|
31
|
+
}
|
|
32
|
+
else if (className?.includes("button--dark")) {
|
|
33
|
+
gradient = "214, 21, 235, 0.25";
|
|
34
|
+
}
|
|
35
|
+
else if (className?.includes("button--orange")) {
|
|
36
|
+
gradient = "245, 123, 0, 0.25";
|
|
37
|
+
}
|
|
38
|
+
const buttonElement = ((0, jsx_runtime_1.jsxs)(Comp, { ...rest, ref: ref, onMouseMove: handleMouseMove, className: (0, clsx_1.default)({
|
|
39
|
+
button: !className?.includes("transparent"),
|
|
40
|
+
[`${processedClassName}`]: processedClassName,
|
|
41
|
+
}), children: [!className?.includes("transparent") && ((0, jsx_runtime_1.jsx)(react_1.motion.div, { className: "button__motion", style: {
|
|
42
|
+
background: (0, react_1.useMotionTemplate) `
|
|
43
|
+
radial-gradient(
|
|
44
|
+
150px circle at ${mouseX}px ${mouseY}px,
|
|
45
|
+
rgba(${gradient}),
|
|
46
|
+
transparent 100%
|
|
47
|
+
)
|
|
48
|
+
`,
|
|
49
|
+
} })), label && (0, jsx_runtime_1.jsx)("span", { children: label }), children] }));
|
|
50
|
+
return className?.includes("button--waiting") ? ((0, jsx_runtime_1.jsx)("div", { className: "button-container", children: buttonElement })) : (buttonElement);
|
|
51
|
+
};
|
|
52
|
+
exports.Button = fixedForwardRef(UnwrappedAnyComponent);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Popout = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const clsx_1 = require("clsx");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const Icons_1 = require("../icons/Icons");
|
|
8
|
+
const Button_1 = require("./Button");
|
|
9
|
+
const react_dom_1 = require("react-dom");
|
|
10
|
+
const Popout = ({ children, className, buttonClassName }) => {
|
|
11
|
+
const [open, setOpen] = (0, react_1.useState)(false);
|
|
12
|
+
const container = (0, react_1.useRef)(null);
|
|
13
|
+
const navElement = document.getElementById("popout");
|
|
14
|
+
(0, react_1.useEffect)(() => {
|
|
15
|
+
if (open) {
|
|
16
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
17
|
+
window.addEventListener("resize", position);
|
|
18
|
+
navElement.classList.add("open");
|
|
19
|
+
position();
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
23
|
+
}
|
|
24
|
+
return () => {
|
|
25
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
26
|
+
window.removeEventListener("resize", position);
|
|
27
|
+
navElement.classList.remove("open");
|
|
28
|
+
};
|
|
29
|
+
}, [open]);
|
|
30
|
+
const handleClickOutside = (e) => {
|
|
31
|
+
if (navElement.contains(e.target)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
setOpen(false);
|
|
35
|
+
e.stopPropagation();
|
|
36
|
+
e.stopImmediatePropagation();
|
|
37
|
+
return false;
|
|
38
|
+
};
|
|
39
|
+
const position = () => {
|
|
40
|
+
const containerElementElement = container.current;
|
|
41
|
+
if (navElement && containerElementElement) {
|
|
42
|
+
const rightPosition = window.scrollX +
|
|
43
|
+
window.innerWidth -
|
|
44
|
+
containerElementElement.getBoundingClientRect().left -
|
|
45
|
+
parseInt(getComputedStyle(containerElementElement).borderLeftWidth, 10);
|
|
46
|
+
const bottomPosition = -window.scrollY +
|
|
47
|
+
window.innerHeight -
|
|
48
|
+
containerElementElement.getBoundingClientRect().top -
|
|
49
|
+
parseInt(getComputedStyle(containerElementElement).borderTopWidth, 10) -
|
|
50
|
+
containerElementElement.offsetHeight;
|
|
51
|
+
navElement.style.right = `${rightPosition + 4}px`;
|
|
52
|
+
navElement.style.bottom = `${bottomPosition - 4}px`;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: container, className: (0, clsx_1.default)({
|
|
56
|
+
popout: true,
|
|
57
|
+
[`${className}`]: className,
|
|
58
|
+
}), children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: () => setOpen(!open), className: (0, clsx_1.default)({
|
|
59
|
+
"button--grey button--small": !buttonClassName,
|
|
60
|
+
[`${buttonClassName}`]: buttonClassName,
|
|
61
|
+
}), children: !open ? (0, jsx_runtime_1.jsx)(Icons_1.Ellipsis, {}) : (0, jsx_runtime_1.jsx)(Icons_1.AngleLeft, {}) }), open && (0, react_dom_1.createPortal)(children, navElement)] }));
|
|
62
|
+
};
|
|
63
|
+
exports.Popout = Popout;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TxButtonTip = exports.TxButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const clsx_1 = require("clsx");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const react_hot_toast_1 = require("react-hot-toast");
|
|
8
|
+
const react_tooltip_1 = require("react-tooltip");
|
|
9
|
+
const rujira_js_1 = require("rujira.js");
|
|
10
|
+
const unlock_gif_1 = require("../../assets/images/unlock.gif");
|
|
11
|
+
const i18n_1 = require("../../i18n");
|
|
12
|
+
const Warning_1 = require("../notices/Warning");
|
|
13
|
+
const Decimal_1 = require("../numbers/Decimal");
|
|
14
|
+
const Button_1 = require("./Button");
|
|
15
|
+
const txsuccess_gif_1 = require("../../assets/images/txsuccess.gif");
|
|
16
|
+
const txfail_gif_1 = require("../../assets/images/txfail.gif");
|
|
17
|
+
const txsign_gif_1 = require("../../assets/images/txsign.gif");
|
|
18
|
+
const Loader_1 = require("../loader/Loader");
|
|
19
|
+
// Helper to identify spacing/layout classes
|
|
20
|
+
const SPACING_CLASS_REGEX = /^(m|p)(l|r|t|b|x|y)?-\d+$/;
|
|
21
|
+
const isSpacingClass = (className) => SPACING_CLASS_REGEX.test(className);
|
|
22
|
+
// Separate spacing classes from styling classes
|
|
23
|
+
const separateClasses = (className) => {
|
|
24
|
+
const classes = className?.split(" ") || [];
|
|
25
|
+
return {
|
|
26
|
+
spacing: classes.filter(isSpacingClass),
|
|
27
|
+
styling: classes.filter((c) => !isSpacingClass(c)),
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
const TxButton = (props) => {
|
|
31
|
+
const { t } = (0, i18n_1.useTranslation)("common");
|
|
32
|
+
const { accountProvider, msg, onSuccess, onError, SimulationComponent = DefaultSimulationComponent, children, toastOpts = {}, className, hideSimulation, onClick, ...rest } = props;
|
|
33
|
+
const [simulation, setSimulation] = (0, react_1.useState)();
|
|
34
|
+
const [simulationError, setSimulationError] = (0, react_1.useState)();
|
|
35
|
+
const { loading, success, error } = toastOpts;
|
|
36
|
+
const [isSigning, setIsSigning] = (0, react_1.useState)(false);
|
|
37
|
+
const [isSuccess, setIsSuccess] = (0, react_1.useState)(false);
|
|
38
|
+
const [isRejected, setIsRejected] = (0, react_1.useState)(false);
|
|
39
|
+
const doSimulate = (msg) => {
|
|
40
|
+
setSimulationError(undefined);
|
|
41
|
+
setSimulation(undefined);
|
|
42
|
+
if (msg) {
|
|
43
|
+
const signer = accountProvider.signer(msg.account.address);
|
|
44
|
+
signer
|
|
45
|
+
.simulate(msg)
|
|
46
|
+
.then(setSimulation)
|
|
47
|
+
.catch((err) => {
|
|
48
|
+
console.error(err);
|
|
49
|
+
setSimulationError(err);
|
|
50
|
+
onError && onError(new rujira_js_1.TxError(msg, err, "simulation"));
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
(0, react_1.useEffect)(() => {
|
|
55
|
+
doSimulate(msg);
|
|
56
|
+
}, [msg]);
|
|
57
|
+
const handleSign = (e) => {
|
|
58
|
+
if (isSigning || isSuccess || isRejected)
|
|
59
|
+
return;
|
|
60
|
+
if (!simulation)
|
|
61
|
+
throw new Error(`Simulation required`);
|
|
62
|
+
if (!msg)
|
|
63
|
+
throw new Error(`Msg required`);
|
|
64
|
+
setIsSigning(true);
|
|
65
|
+
const signer = accountProvider.signer(msg.account.address);
|
|
66
|
+
if (onClick)
|
|
67
|
+
onClick(e);
|
|
68
|
+
const p = signer
|
|
69
|
+
.signAndBroadcast(simulation, msg)
|
|
70
|
+
.then((res) => {
|
|
71
|
+
onSuccess && onSuccess(res);
|
|
72
|
+
setIsSigning(false);
|
|
73
|
+
setIsSuccess(true);
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
setIsSuccess(false);
|
|
76
|
+
}, 3000);
|
|
77
|
+
return res;
|
|
78
|
+
})
|
|
79
|
+
.catch((err) => {
|
|
80
|
+
console.error(err);
|
|
81
|
+
onError && onError(new rujira_js_1.TxError(msg, err, "signAndBroadcast"));
|
|
82
|
+
setIsSigning(false);
|
|
83
|
+
setIsRejected(true);
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
setIsRejected(false);
|
|
86
|
+
}, 3000);
|
|
87
|
+
throw err;
|
|
88
|
+
});
|
|
89
|
+
react_hot_toast_1.default.promise(p, {
|
|
90
|
+
loading: loading || t("submittingTransaction"),
|
|
91
|
+
success: success || ((res) => successHandler(res, t)),
|
|
92
|
+
error: error ||
|
|
93
|
+
((err) => {
|
|
94
|
+
console.error(err);
|
|
95
|
+
const defaultError = t("errorSubmittingTransaction");
|
|
96
|
+
switch (typeof err) {
|
|
97
|
+
case "string":
|
|
98
|
+
return (0, rujira_js_1.translateError)(err) || defaultError;
|
|
99
|
+
case "object":
|
|
100
|
+
return "message" in err
|
|
101
|
+
? (0, rujira_js_1.translateError)(err.message) || defaultError
|
|
102
|
+
: defaultError;
|
|
103
|
+
default:
|
|
104
|
+
return defaultError;
|
|
105
|
+
}
|
|
106
|
+
}),
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
const disabled = !msg || !simulation || !!simulationError || rest.disabled;
|
|
110
|
+
// Separate spacing classes (always applied) from styling classes (conditionally applied)
|
|
111
|
+
const { spacing: spacingClasses, styling: stylingClasses } = separateClasses(className);
|
|
112
|
+
// Determine if tooltip should be shown
|
|
113
|
+
const showTooltip = simulationError && simulationError.message !== "";
|
|
114
|
+
const allowanceMsg = (0, react_1.useMemo)(() => {
|
|
115
|
+
if (!msg)
|
|
116
|
+
return null;
|
|
117
|
+
if (!simulationError)
|
|
118
|
+
return null;
|
|
119
|
+
if (!(simulationError instanceof rujira_js_1.InsufficientAllowanceError))
|
|
120
|
+
return null;
|
|
121
|
+
return new rujira_js_1.MsgErc20IncreaseAllowance(msg.account, simulationError);
|
|
122
|
+
}, [msg, simulationError]);
|
|
123
|
+
if (allowanceMsg)
|
|
124
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(exports.TxButton, { ...props, toastOpts: {
|
|
125
|
+
loading: t("increasingAllowance"),
|
|
126
|
+
success: t("allowanceIncreased"),
|
|
127
|
+
}, label: t("stepApprove"), msg: allowanceMsg, onSuccess: () => doSimulate(msg) }), (0, jsx_runtime_1.jsx)(InsufficientAllowanceWarning, {})] }));
|
|
128
|
+
const modProps = {
|
|
129
|
+
...rest,
|
|
130
|
+
...(rest.label && {
|
|
131
|
+
label: `${isSuccess
|
|
132
|
+
? t("success")
|
|
133
|
+
: isSigning
|
|
134
|
+
? t("waiting")
|
|
135
|
+
: isRejected
|
|
136
|
+
? t("rejected")
|
|
137
|
+
: rest.label}`,
|
|
138
|
+
}),
|
|
139
|
+
};
|
|
140
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Button_1.Button, { ...modProps, onClick: handleSign, className: (0, clsx_1.default)(stylingClasses.length > 0 ? stylingClasses : "button", spacingClasses, {
|
|
141
|
+
"button--grey": disabled && !stylingClasses.includes("transparent"),
|
|
142
|
+
"button--waiting": (isSigning || isRejected || isSuccess) &&
|
|
143
|
+
!className?.includes("transparent"),
|
|
144
|
+
"button--success": isSuccess,
|
|
145
|
+
"button--rejected": isRejected,
|
|
146
|
+
}), style: {
|
|
147
|
+
cursor: isSigning || isSuccess || isRejected ? "default" : undefined,
|
|
148
|
+
...rest.style,
|
|
149
|
+
}, disabled: disabled, "data-tooltip-id": "tx-button-tip", "data-tooltip-html": showTooltip
|
|
150
|
+
? `<p class="fs-12 lh-16 fw-400 w-36 mb-0.5">${(0, rujira_js_1.translateError)(simulationError.message)}</p>`
|
|
151
|
+
: undefined, children: [(isSuccess || isRejected || isSigning) &&
|
|
152
|
+
!className?.includes("transparent") && ((0, jsx_runtime_1.jsx)("img", { className: "w-4 h-4 filter-white big", src: isSigning ? txsign_gif_1.default : isSuccess ? txsuccess_gif_1.default : txfail_gif_1.default, alt: "lock" })), (isSigning || isRejected || isSuccess) &&
|
|
153
|
+
className?.includes("transparent") ? ((0, jsx_runtime_1.jsx)(Loader_1.Loader, { className: "w-full h-full" })) : (((!isSigning && !isRejected && !isSuccess) ||
|
|
154
|
+
className?.includes("transparent")) &&
|
|
155
|
+
children)] }), hideSimulation ? null : msg ? ((0, jsx_runtime_1.jsx)(SimulationComponent, { simulation: simulation, error: simulationError })) : ((0, jsx_runtime_1.jsx)("span", { children: "\u00A0" }))] }));
|
|
156
|
+
};
|
|
157
|
+
exports.TxButton = TxButton;
|
|
158
|
+
const TxButtonTip = () => ((0, jsx_runtime_1.jsx)(react_tooltip_1.Tooltip, { id: "tx-button-tip", className: "tooltip", float: true, style: { zIndex: 203 } }));
|
|
159
|
+
exports.TxButtonTip = TxButtonTip;
|
|
160
|
+
const DefaultSimulationComponent = ({ simulation, error, }) => {
|
|
161
|
+
const { t } = (0, i18n_1.useTranslation)("common");
|
|
162
|
+
if (error instanceof rujira_js_1.InsufficientAllowanceError) {
|
|
163
|
+
return (0, jsx_runtime_1.jsx)(InsufficientAllowanceWarning, {});
|
|
164
|
+
}
|
|
165
|
+
return ((0, jsx_runtime_1.jsx)("small", { className: "fs-12 text-center mt-1 color-grey block", children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [t("networkFee"), " ", simulation ? ((0, jsx_runtime_1.jsx)(Decimal_1.Decimal, { amount: simulation.amount, decimals: simulation.decimals, symbol: simulation.symbol, className: "color-white" })) : ((0, jsx_runtime_1.jsx)("span", { children: t("calculating") }))] }) }));
|
|
166
|
+
};
|
|
167
|
+
const InsufficientAllowanceWarning = () => {
|
|
168
|
+
const { t } = (0, i18n_1.useTranslation)("common");
|
|
169
|
+
return ((0, jsx_runtime_1.jsxs)(Warning_1.Warning, { className: "warning mt-2 condensed flex ai-c", color: "orange", children: [(0, jsx_runtime_1.jsx)("img", { src: unlock_gif_1.default, alt: "lock" }), (0, jsx_runtime_1.jsx)("div", { className: "text-left", children: t("insufficientAllowanceWarning") })] }));
|
|
170
|
+
};
|
|
171
|
+
const successHandler = (res, t) => res.label ? ((0, jsx_runtime_1.jsx)("p", { children: res.label })) : ((0, jsx_runtime_1.jsxs)("p", { children: [t("transactionSucceeded"), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: (0, rujira_js_1.networkTxLink)(res), target: "_blank", className: "color-white no-underline fs-12", children: res.txHash.slice(0, 8) + "..." + res.txHash.slice(-8) })] }));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePopout = exports.Popout = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const react_dom_1 = require("react-dom");
|
|
7
|
+
const Popout = ({ children, position, visible }) => {
|
|
8
|
+
const node = (0, react_1.useRef)(null);
|
|
9
|
+
if (!visible)
|
|
10
|
+
return null;
|
|
11
|
+
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)("nav", { ref: node, className: "popout condensed", style: {
|
|
12
|
+
top: position.top - (node.current?.offsetHeight || 0) + 8,
|
|
13
|
+
left: position.left - (node.current?.offsetWidth || 0),
|
|
14
|
+
}, children: children }), document.body);
|
|
15
|
+
};
|
|
16
|
+
exports.Popout = Popout;
|
|
17
|
+
const usePopout = () => {
|
|
18
|
+
const [popoutState, setPopoutState] = (0, react_1.useState)({
|
|
19
|
+
content: "",
|
|
20
|
+
position: { top: 0, left: 0 },
|
|
21
|
+
visible: false,
|
|
22
|
+
});
|
|
23
|
+
const showPopout = (content, target) => {
|
|
24
|
+
const rect = target.getBoundingClientRect();
|
|
25
|
+
setPopoutState({
|
|
26
|
+
content,
|
|
27
|
+
position: {
|
|
28
|
+
top: rect.top + window.scrollY + rect.height,
|
|
29
|
+
left: rect.left + window.scrollX,
|
|
30
|
+
},
|
|
31
|
+
visible: true,
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
const hidePopout = () => {
|
|
35
|
+
setPopoutState((prev) => ({ ...prev, visible: false }));
|
|
36
|
+
};
|
|
37
|
+
return { popoutState, showPopout, hidePopout };
|
|
38
|
+
};
|
|
39
|
+
exports.usePopout = usePopout;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Card = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const clsx_1 = require("clsx");
|
|
6
|
+
const Card = ({ className, children }) => {
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)({
|
|
8
|
+
"card p-3 color-white": true,
|
|
9
|
+
[`${className}`]: className,
|
|
10
|
+
}), children: children }));
|
|
11
|
+
};
|
|
12
|
+
exports.Card = Card;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GradientCard = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const clsx_1 = require("clsx");
|
|
6
|
+
const GradientCard = ({ className, children }) => {
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)({
|
|
8
|
+
"gradient-card bg-black p-3 color-white": true,
|
|
9
|
+
[`${className}`]: className,
|
|
10
|
+
}), children: children }));
|
|
11
|
+
};
|
|
12
|
+
exports.GradientCard = GradientCard;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShareCard = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const clsx_1 = require("clsx");
|
|
6
|
+
const ShareCard = ({ className, backgroundImage, leftComponent, rightComponent, badgeComponent, }) => {
|
|
7
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)({
|
|
8
|
+
"share-card": true,
|
|
9
|
+
[`${className}`]: className,
|
|
10
|
+
}), style: {
|
|
11
|
+
backgroundImage: backgroundImage
|
|
12
|
+
? `url(${backgroundImage})`
|
|
13
|
+
: undefined,
|
|
14
|
+
}, children: [badgeComponent && ((0, jsx_runtime_1.jsx)("div", { className: "share-card__badge", children: badgeComponent })), (0, jsx_runtime_1.jsxs)("div", { className: "share-card__content", children: [(0, jsx_runtime_1.jsx)("div", { className: "share-card__left", children: leftComponent }), (0, jsx_runtime_1.jsx)("div", { className: "share-card__right", children: rightComponent })] })] }));
|
|
15
|
+
};
|
|
16
|
+
exports.ShareCard = ShareCard;
|