@multiversx/sdk-dapp-liquidity 0.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +186 -0
- package/all-networks-EJIVYZ_i.mjs +4 -0
- package/all-networks-NYACMyeN.js +4 -0
- package/api/confirmRate.d.ts +11 -0
- package/api/confirmRate.js +30 -0
- package/api/confirmRate.mjs +29 -0
- package/api/getChains.d.ts +6 -0
- package/api/getChains.js +12 -0
- package/api/getChains.mjs +11 -0
- package/api/getRate.d.ts +10 -0
- package/api/getRate.js +28 -0
- package/api/getRate.mjs +27 -0
- package/api/getTokens.d.ts +7 -0
- package/api/getTokens.js +14 -0
- package/api/getTokens.mjs +13 -0
- package/api/getTokensBalances.d.ts +8 -0
- package/api/getTokensBalances.js +17 -0
- package/api/getTokensBalances.mjs +16 -0
- package/api/getTransactions.d.ts +7 -0
- package/api/getTransactions.js +14 -0
- package/api/getTransactions.mjs +13 -0
- package/api/index.d.ts +7 -0
- package/api/index.js +17 -0
- package/api/index.mjs +16 -0
- package/api/sendTransactions.d.ts +11 -0
- package/api/sendTransactions.js +29 -0
- package/api/sendTransactions.mjs +28 -0
- package/api/tests/confirmRate.spec.d.ts +1 -0
- package/api/tests/confirmRate.spec.js +124 -0
- package/api/tests/confirmRate.spec.mjs +122 -0
- package/api/tests/getChains.spec.d.ts +1 -0
- package/api/tests/getChains.spec.js +37 -0
- package/api/tests/getChains.spec.mjs +35 -0
- package/api/tests/getRate.spec.d.ts +1 -0
- package/api/tests/getRate.spec.js +83 -0
- package/api/tests/getRate.spec.mjs +81 -0
- package/api/tests/getTokens.spec.d.ts +1 -0
- package/api/tests/getTokens.spec.js +60 -0
- package/api/tests/getTokens.spec.mjs +58 -0
- package/api/tests/getTransactions.spec.d.ts +1 -0
- package/api/tests/getTransactions.spec.js +89 -0
- package/api/tests/getTransactions.spec.mjs +87 -0
- package/api/tests/sendTransactions.spec.d.ts +1 -0
- package/api/tests/sendTransactions.spec.js +83 -0
- package/api/tests/sendTransactions.spec.mjs +81 -0
- package/bignumber-B8vjg9qn.js +1334 -0
- package/bignumber-CKZkoo0g.mjs +1334 -0
- package/constants/index.d.ts +1 -0
- package/constants/index.js +5 -0
- package/constants/index.mjs +4 -0
- package/default-BYtXv70Z.mjs +4 -0
- package/default-H3AbmzFV.js +4 -0
- package/dto/Chain.dto.d.ts +16 -0
- package/dto/Chain.dto.js +2 -0
- package/dto/Chain.dto.mjs +1 -0
- package/dto/ConfirmRate.dto.d.ts +11 -0
- package/dto/ConfirmRate.dto.js +2 -0
- package/dto/ConfirmRate.dto.mjs +1 -0
- package/dto/Token.dto.d.ts +14 -0
- package/dto/Token.dto.js +2 -0
- package/dto/Token.dto.mjs +1 -0
- package/dto/TokenBalance.dto.d.ts +4 -0
- package/dto/TokenBalance.dto.js +2 -0
- package/dto/TokenBalance.dto.mjs +1 -0
- package/dto/Transaction.dto.d.ts +14 -0
- package/dto/Transaction.dto.js +2 -0
- package/dto/Transaction.dto.mjs +1 -0
- package/dto/index.d.ts +5 -0
- package/dto/index.js +2 -0
- package/dto/index.mjs +1 -0
- package/helpers/base64Utils.d.ts +3 -0
- package/helpers/base64Utils.js +32 -0
- package/helpers/base64Utils.mjs +31 -0
- package/helpers/decodeLoginToken.d.ts +9 -0
- package/helpers/decodeLoginToken.js +28 -0
- package/helpers/decodeLoginToken.mjs +27 -0
- package/helpers/decodeToken.d.ts +11 -0
- package/helpers/decodeToken.js +40 -0
- package/helpers/decodeToken.mjs +39 -0
- package/helpers/getApiURL.d.ts +1 -0
- package/helpers/getApiURL.js +8 -0
- package/helpers/getApiURL.mjs +7 -0
- package/helpers/getBridgeURL.d.ts +1 -0
- package/helpers/getBridgeURL.js +8 -0
- package/helpers/getBridgeURL.mjs +7 -0
- package/helpers/getMvxApiURL.d.ts +1 -0
- package/helpers/getMvxApiURL.js +8 -0
- package/helpers/getMvxApiURL.mjs +7 -0
- package/helpers/getMvxChainId.d.ts +1 -0
- package/helpers/getMvxChainId.js +8 -0
- package/helpers/getMvxChainId.mjs +7 -0
- package/helpers/getMvxExplorerAddress.d.ts +1 -0
- package/helpers/getMvxExplorerAddress.js +8 -0
- package/helpers/getMvxExplorerAddress.mjs +7 -0
- package/helpers/index.d.ts +9 -0
- package/helpers/index.js +23 -0
- package/helpers/index.mjs +22 -0
- package/helpers/serializeTransaction.d.ts +3 -0
- package/helpers/serializeTransaction.js +9 -0
- package/helpers/serializeTransaction.mjs +8 -0
- package/helpers/tests/base64Utils.spec.d.ts +1 -0
- package/helpers/tests/base64Utils.spec.js +30 -0
- package/helpers/tests/base64Utils.spec.mjs +28 -0
- package/helpers/tests/decodeLoginToken.spec.d.ts +1 -0
- package/helpers/tests/decodeLoginToken.spec.js +35 -0
- package/helpers/tests/decodeLoginToken.spec.mjs +33 -0
- package/helpers/tests/decodeToken.spec.d.ts +1 -0
- package/helpers/tests/decodeToken.spec.js +28 -0
- package/helpers/tests/decodeToken.spec.mjs +26 -0
- package/index-B9WqxUXM.mjs +91 -0
- package/index-BXwpbIDQ.mjs +107 -0
- package/index-CnudU77V.js +329 -0
- package/index-DSnomXRI.mjs +68025 -0
- package/index-DZHiA1sX.js +107 -0
- package/index-cvy2-uZ_.js +67946 -0
- package/index.d.ts +6 -0
- package/index.js +189 -0
- package/index.mjs +185 -0
- package/package.json +107 -0
- package/react-B9sQBOh0.mjs +3040 -0
- package/react-BaXyw3AO.js +3040 -0
- package/react-CNXJSTCv.js +38 -0
- package/react-CSQpf1zk.mjs +38 -0
- package/reactjs/components/AccountAddress/AccountAddress.d.ts +6 -0
- package/reactjs/components/AccountAddress/AccountAddress.js +25 -0
- package/reactjs/components/AccountAddress/AccountAddress.mjs +24 -0
- package/reactjs/components/AccountAddress/index.d.ts +1 -0
- package/reactjs/components/AccountAddress/index.js +5 -0
- package/reactjs/components/AccountAddress/index.mjs +4 -0
- package/reactjs/components/AmountCard/AmountCard.d.ts +6 -0
- package/reactjs/components/AmountCard/AmountCard.js +33 -0
- package/reactjs/components/AmountCard/AmountCard.mjs +32 -0
- package/reactjs/components/AmountCard/index.d.ts +1 -0
- package/reactjs/components/AmountCard/index.js +5 -0
- package/reactjs/components/AmountCard/index.mjs +4 -0
- package/reactjs/components/AmountInput/AmountInput.d.ts +13 -0
- package/reactjs/components/AmountInput/AmountInput.js +61 -0
- package/reactjs/components/AmountInput/AmountInput.mjs +60 -0
- package/reactjs/components/AmountInput/index.d.ts +1 -0
- package/reactjs/components/AmountInput/index.js +5 -0
- package/reactjs/components/AmountInput/index.mjs +4 -0
- package/reactjs/components/BridgeForm/BridgeForm.d.ts +16 -0
- package/reactjs/components/BridgeForm/BridgeForm.js +680 -0
- package/reactjs/components/BridgeForm/BridgeForm.mjs +679 -0
- package/reactjs/components/BridgeForm/index.d.ts +1 -0
- package/reactjs/components/BridgeForm/index.js +5 -0
- package/reactjs/components/BridgeForm/index.mjs +4 -0
- package/reactjs/components/BridgeHistory/BridgeHistory.d.ts +4 -0
- package/reactjs/components/BridgeHistory/BridgeHistory.js +233 -0
- package/reactjs/components/BridgeHistory/BridgeHistory.mjs +232 -0
- package/reactjs/components/BridgeHistory/index.d.ts +1 -0
- package/reactjs/components/BridgeHistory/index.js +5 -0
- package/reactjs/components/BridgeHistory/index.mjs +4 -0
- package/reactjs/components/Connect/BridgeAccountDisplay.d.ts +6 -0
- package/reactjs/components/Connect/BridgeAccountDisplay.js +85 -0
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +84 -0
- package/reactjs/components/Connect/BridgeConnectButton.d.ts +7 -0
- package/reactjs/components/Connect/BridgeConnectButton.js +26 -0
- package/reactjs/components/Connect/BridgeConnectButton.mjs +25 -0
- package/reactjs/components/Connect/CustomConnectButton.d.ts +7 -0
- package/reactjs/components/Connect/CustomConnectButton.js +42 -0
- package/reactjs/components/Connect/CustomConnectButton.mjs +41 -0
- package/reactjs/components/Connect/MvxAccountDisplay.d.ts +9 -0
- package/reactjs/components/Connect/MvxAccountDisplay.js +75 -0
- package/reactjs/components/Connect/MvxAccountDisplay.mjs +74 -0
- package/reactjs/components/Connect/MvxConnectButton.d.ts +11 -0
- package/reactjs/components/Connect/MvxConnectButton.js +43 -0
- package/reactjs/components/Connect/MvxConnectButton.mjs +42 -0
- package/reactjs/components/Connect/SwitchChainButton.d.ts +7 -0
- package/reactjs/components/Connect/SwitchChainButton.js +33 -0
- package/reactjs/components/Connect/SwitchChainButton.mjs +32 -0
- package/reactjs/components/Connect/index.d.ts +6 -0
- package/reactjs/components/Connect/index.js +15 -0
- package/reactjs/components/Connect/index.mjs +14 -0
- package/reactjs/components/CopyButton/CopyButton.d.ts +6 -0
- package/reactjs/components/CopyButton/CopyButton.js +42 -0
- package/reactjs/components/CopyButton/CopyButton.mjs +41 -0
- package/reactjs/components/CopyButton/index.d.ts +1 -0
- package/reactjs/components/CopyButton/index.js +5 -0
- package/reactjs/components/CopyButton/index.mjs +4 -0
- package/reactjs/components/CopyButton/utils/copyToClipboard.d.ts +1 -0
- package/reactjs/components/CopyButton/utils/copyToClipboard.js +38 -0
- package/reactjs/components/CopyButton/utils/copyToClipboard.mjs +37 -0
- package/reactjs/components/CopyButton/utils/index.d.ts +1 -0
- package/reactjs/components/CopyButton/utils/index.js +5 -0
- package/reactjs/components/CopyButton/utils/index.mjs +4 -0
- package/reactjs/components/DisplayAmount/DisplayAmount.d.ts +21 -0
- package/reactjs/components/DisplayAmount/DisplayAmount.js +91 -0
- package/reactjs/components/DisplayAmount/DisplayAmount.mjs +90 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.d.ts +7 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +40 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.mjs +39 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/index.d.ts +0 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/index.js +2 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/index.mjs +1 -0
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.d.ts +14 -0
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.js +62 -0
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.mjs +61 -0
- package/reactjs/components/DisplayAmount/components/index.d.ts +0 -0
- package/reactjs/components/DisplayAmount/components/index.js +2 -0
- package/reactjs/components/DisplayAmount/components/index.mjs +1 -0
- package/reactjs/components/DisplayAmount/index.d.ts +1 -0
- package/reactjs/components/DisplayAmount/index.js +5 -0
- package/reactjs/components/DisplayAmount/index.mjs +4 -0
- package/reactjs/components/DisplayAmount/utils/index.d.ts +1 -0
- package/reactjs/components/DisplayAmount/utils/index.js +5 -0
- package/reactjs/components/DisplayAmount/utils/index.mjs +4 -0
- package/reactjs/components/DisplayAmount/utils/truncateAmount.d.ts +1 -0
- package/reactjs/components/DisplayAmount/utils/truncateAmount.js +22 -0
- package/reactjs/components/DisplayAmount/utils/truncateAmount.mjs +21 -0
- package/reactjs/components/SmallLoader/SmallLoader.d.ts +4 -0
- package/reactjs/components/SmallLoader/SmallLoader.js +22 -0
- package/reactjs/components/SmallLoader/SmallLoader.mjs +21 -0
- package/reactjs/components/SmallLoader/index.d.ts +1 -0
- package/reactjs/components/SmallLoader/index.js +5 -0
- package/reactjs/components/SmallLoader/index.mjs +4 -0
- package/reactjs/components/TokenSelector/TokenSelector.d.ts +16 -0
- package/reactjs/components/TokenSelector/TokenSelector.js +158 -0
- package/reactjs/components/TokenSelector/TokenSelector.mjs +157 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.d.ts +8 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +86 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +85 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.d.ts +11 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js +45 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs +44 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.d.ts +6 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.js +19 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.mjs +18 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.d.ts +3 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.js +7 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.mjs +6 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.d.ts +4 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +33 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +32 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.d.ts +10 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.js +2 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.mjs +1 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.d.ts +10 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.js +2 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.mjs +1 -0
- package/reactjs/components/TokenSelector/components/SelectContainer.d.ts +7 -0
- package/reactjs/components/TokenSelector/components/SelectContainer.js +41 -0
- package/reactjs/components/TokenSelector/components/SelectContainer.mjs +40 -0
- package/reactjs/components/TokenSelector/components/SelectContent.d.ts +10 -0
- package/reactjs/components/TokenSelector/components/SelectContent.js +93 -0
- package/reactjs/components/TokenSelector/components/SelectContent.mjs +92 -0
- package/reactjs/components/TokenSelector/components/SelectedOption.d.ts +5 -0
- package/reactjs/components/TokenSelector/components/SelectedOption.js +29 -0
- package/reactjs/components/TokenSelector/components/SelectedOption.mjs +28 -0
- package/reactjs/components/TokenSelector/components/TokenIcon.d.ts +8 -0
- package/reactjs/components/TokenSelector/components/TokenIcon.js +82 -0
- package/reactjs/components/TokenSelector/components/TokenIcon.mjs +81 -0
- package/reactjs/components/TokenSelector/components/TokenItem.d.ts +7 -0
- package/reactjs/components/TokenSelector/components/TokenItem.js +69 -0
- package/reactjs/components/TokenSelector/components/TokenItem.mjs +68 -0
- package/reactjs/components/TokenSelector/components/TokenList.d.ts +7 -0
- package/reactjs/components/TokenSelector/components/TokenList.js +21 -0
- package/reactjs/components/TokenSelector/components/TokenList.mjs +20 -0
- package/reactjs/components/TokenSelector/components/TokenSymbol.d.ts +9 -0
- package/reactjs/components/TokenSelector/components/TokenSymbol.js +26 -0
- package/reactjs/components/TokenSelector/components/TokenSymbol.mjs +25 -0
- package/reactjs/components/TokenSelector/index.d.ts +1 -0
- package/reactjs/components/TokenSelector/index.js +5 -0
- package/reactjs/components/TokenSelector/index.mjs +4 -0
- package/reactjs/components/TransactionToast/TransactionToast.d.ts +9 -0
- package/reactjs/components/TransactionToast/TransactionToast.js +54 -0
- package/reactjs/components/TransactionToast/TransactionToast.mjs +53 -0
- package/reactjs/components/TransactionToast/TransactionToastContainer.d.ts +3 -0
- package/reactjs/components/TransactionToast/TransactionToastContainer.js +21 -0
- package/reactjs/components/TransactionToast/TransactionToastContainer.mjs +20 -0
- package/reactjs/components/TransactionToast/index.d.ts +2 -0
- package/reactjs/components/TransactionToast/index.js +7 -0
- package/reactjs/components/TransactionToast/index.mjs +6 -0
- package/reactjs/components/TrimAddress/TrimAddress.d.ts +8 -0
- package/reactjs/components/TrimAddress/TrimAddress.js +26 -0
- package/reactjs/components/TrimAddress/TrimAddress.mjs +25 -0
- package/reactjs/components/TrimAddress/index.d.ts +1 -0
- package/reactjs/components/TrimAddress/index.js +5 -0
- package/reactjs/components/TrimAddress/index.mjs +4 -0
- package/reactjs/components/base/MxButton/MxButton.d.ts +13 -0
- package/reactjs/components/base/MxButton/MxButton.js +72 -0
- package/reactjs/components/base/MxButton/MxButton.mjs +71 -0
- package/reactjs/components/base/MxButton/index.d.ts +1 -0
- package/reactjs/components/base/MxButton/index.js +5 -0
- package/reactjs/components/base/MxButton/index.mjs +4 -0
- package/reactjs/components/base/MxCard/MxCard.d.ts +10 -0
- package/reactjs/components/base/MxCard/MxCard.js +55 -0
- package/reactjs/components/base/MxCard/MxCard.mjs +54 -0
- package/reactjs/components/base/MxCard/index.d.ts +1 -0
- package/reactjs/components/base/MxCard/index.js +5 -0
- package/reactjs/components/base/MxCard/index.mjs +4 -0
- package/reactjs/components/base/MxLink/MxLink.d.ts +10 -0
- package/reactjs/components/base/MxLink/MxLink.js +71 -0
- package/reactjs/components/base/MxLink/MxLink.mjs +70 -0
- package/reactjs/components/base/MxLink/index.d.ts +1 -0
- package/reactjs/components/base/MxLink/index.js +5 -0
- package/reactjs/components/base/MxLink/index.mjs +4 -0
- package/reactjs/components/base/MxSearch/MxSearch.d.ts +10 -0
- package/reactjs/components/base/MxSearch/MxSearch.js +70 -0
- package/reactjs/components/base/MxSearch/MxSearch.mjs +69 -0
- package/reactjs/components/base/MxSearch/index.d.ts +1 -0
- package/reactjs/components/base/MxSearch/index.js +5 -0
- package/reactjs/components/base/MxSearch/index.mjs +4 -0
- package/reactjs/components/base/MxSlideover/MxSlideover.d.ts +10 -0
- package/reactjs/components/base/MxSlideover/MxSlideover.js +79 -0
- package/reactjs/components/base/MxSlideover/MxSlideover.mjs +78 -0
- package/reactjs/components/base/MxSlideover/index.d.ts +1 -0
- package/reactjs/components/base/MxSlideover/index.js +5 -0
- package/reactjs/components/base/MxSlideover/index.mjs +4 -0
- package/reactjs/components/base/MxTooltip/MxTooltip.d.ts +23 -0
- package/reactjs/components/base/MxTooltip/MxTooltip.js +163 -0
- package/reactjs/components/base/MxTooltip/MxTooltip.mjs +162 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.d.ts +11 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +34 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs +33 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.d.ts +1 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.js +5 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.mjs +4 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.d.ts +13 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.js +28 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.mjs +27 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.d.ts +1 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.js +5 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.mjs +4 -0
- package/reactjs/components/base/MxTooltip/components/index.d.ts +2 -0
- package/reactjs/components/base/MxTooltip/components/index.js +7 -0
- package/reactjs/components/base/MxTooltip/components/index.mjs +6 -0
- package/reactjs/components/base/MxTooltip/index.d.ts +1 -0
- package/reactjs/components/base/MxTooltip/index.js +5 -0
- package/reactjs/components/base/MxTooltip/index.mjs +4 -0
- package/reactjs/components/base/index.d.ts +6 -0
- package/reactjs/components/base/index.js +15 -0
- package/reactjs/components/base/index.mjs +14 -0
- package/reactjs/components/index.d.ts +13 -0
- package/reactjs/components/index.js +51 -0
- package/reactjs/components/index.mjs +50 -0
- package/reactjs/constants/chains.d.ts +35 -0
- package/reactjs/constants/chains.js +38 -0
- package/reactjs/constants/chains.mjs +37 -0
- package/reactjs/constants/index.d.ts +3 -0
- package/reactjs/constants/index.js +12 -0
- package/reactjs/constants/index.mjs +11 -0
- package/reactjs/context/Web3AppProvider.d.ts +12 -0
- package/reactjs/context/Web3AppProvider.js +29 -0
- package/reactjs/context/Web3AppProvider.mjs +28 -0
- package/reactjs/context/queryClient.d.ts +3 -0
- package/reactjs/context/queryClient.js +12 -0
- package/reactjs/context/queryClient.mjs +11 -0
- package/reactjs/context/useWeb3App.d.ts +1 -0
- package/reactjs/context/useWeb3App.js +13 -0
- package/reactjs/context/useWeb3App.mjs +12 -0
- package/reactjs/hooks/index.d.ts +11 -0
- package/reactjs/hooks/index.js +32 -0
- package/reactjs/hooks/index.mjs +31 -0
- package/reactjs/hooks/useAccount.d.ts +77 -0
- package/reactjs/hooks/useAccount.js +18 -0
- package/reactjs/hooks/useAccount.mjs +17 -0
- package/reactjs/hooks/useBalances.d.ts +10 -0
- package/reactjs/hooks/useBalances.js +7 -0
- package/reactjs/hooks/useBalances.mjs +6 -0
- package/reactjs/hooks/useBridgeFormik.d.ts +98 -0
- package/reactjs/hooks/useBridgeFormik.js +182 -0
- package/reactjs/hooks/useBridgeFormik.mjs +181 -0
- package/reactjs/hooks/useDebounce.d.ts +1 -0
- package/reactjs/hooks/useDebounce.js +14 -0
- package/reactjs/hooks/useDebounce.mjs +13 -0
- package/reactjs/hooks/useFetchBridgeData.d.ts +45 -0
- package/reactjs/hooks/useFetchBridgeData.js +44 -0
- package/reactjs/hooks/useFetchBridgeData.mjs +43 -0
- package/reactjs/hooks/useFetchTokens.d.ts +42 -0
- package/reactjs/hooks/useFetchTokens.js +105 -0
- package/reactjs/hooks/useFetchTokens.mjs +104 -0
- package/reactjs/hooks/useGetChainId.d.ts +1 -0
- package/reactjs/hooks/useGetChainId.js +12 -0
- package/reactjs/hooks/useGetChainId.mjs +11 -0
- package/reactjs/hooks/useResolveTokenChain.d.ts +9 -0
- package/reactjs/hooks/useResolveTokenChain.js +21 -0
- package/reactjs/hooks/useResolveTokenChain.mjs +20 -0
- package/reactjs/hooks/useSendTransactions.d.ts +3 -0
- package/reactjs/hooks/useSendTransactions.js +19 -0
- package/reactjs/hooks/useSendTransactions.mjs +18 -0
- package/reactjs/hooks/useSignTransaction.d.ts +69 -0
- package/reactjs/hooks/useSignTransaction.js +17 -0
- package/reactjs/hooks/useSignTransaction.mjs +16 -0
- package/reactjs/hooks/validation/index.d.ts +4 -0
- package/reactjs/hooks/validation/index.js +11 -0
- package/reactjs/hooks/validation/index.mjs +10 -0
- package/reactjs/hooks/validation/useAmountSchema.d.ts +2 -0
- package/reactjs/hooks/validation/useAmountSchema.js +31 -0
- package/reactjs/hooks/validation/useAmountSchema.mjs +13 -0
- package/reactjs/hooks/validation/useSecondAmountSchema.d.ts +2 -0
- package/reactjs/hooks/validation/useSecondAmountSchema.js +27 -0
- package/reactjs/hooks/validation/useSecondAmountSchema.mjs +9 -0
- package/reactjs/hooks/validation/useTestHasEnoughFunds.d.ts +3 -0
- package/reactjs/hooks/validation/useTestHasEnoughFunds.js +38 -0
- package/reactjs/hooks/validation/useTestHasEnoughFunds.mjs +37 -0
- package/reactjs/hooks/validation/useTestIsConnected.d.ts +3 -0
- package/reactjs/hooks/validation/useTestIsConnected.js +21 -0
- package/reactjs/hooks/validation/useTestIsConnected.mjs +20 -0
- package/reactjs/index.d.ts +10 -0
- package/reactjs/index.js +153 -0
- package/reactjs/index.mjs +149 -0
- package/reactjs/init/index.d.ts +1 -0
- package/reactjs/init/index.js +5 -0
- package/reactjs/init/index.mjs +4 -0
- package/reactjs/init/init.d.ts +48 -0
- package/reactjs/init/init.js +53 -0
- package/reactjs/init/init.mjs +35 -0
- package/reactjs/init/tests/init.spec.d.ts +1 -0
- package/reactjs/init/tests/init.spec.js +108 -0
- package/reactjs/init/tests/init.spec.mjs +106 -0
- package/reactjs/queries/index.d.ts +7 -0
- package/reactjs/queries/index.js +20 -0
- package/reactjs/queries/index.mjs +19 -0
- package/reactjs/queries/useGetAllTokens.query.d.ts +3 -0
- package/reactjs/queries/useGetAllTokens.query.js +31 -0
- package/reactjs/queries/useGetAllTokens.query.mjs +30 -0
- package/reactjs/queries/useGetChains.query.d.ts +3 -0
- package/reactjs/queries/useGetChains.query.js +31 -0
- package/reactjs/queries/useGetChains.query.mjs +30 -0
- package/reactjs/queries/useGetEvmTokensBalances.query.d.ts +22 -0
- package/reactjs/queries/useGetEvmTokensBalances.query.js +78 -0
- package/reactjs/queries/useGetEvmTokensBalances.query.mjs +77 -0
- package/reactjs/queries/useGetHistory.query.d.ts +4 -0
- package/reactjs/queries/useGetHistory.query.js +47 -0
- package/reactjs/queries/useGetHistory.query.mjs +46 -0
- package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +23 -0
- package/reactjs/queries/useGetMvxTokensBalances.query.js +60 -0
- package/reactjs/queries/useGetMvxTokensBalances.query.mjs +59 -0
- package/reactjs/queries/useGetRate.mutation.d.ts +6 -0
- package/reactjs/queries/useGetRate.mutation.js +19 -0
- package/reactjs/queries/useGetRate.mutation.mjs +18 -0
- package/reactjs/queries/useGetTokens.query.d.ts +3 -0
- package/reactjs/queries/useGetTokens.query.js +34 -0
- package/reactjs/queries/useGetTokens.query.mjs +33 -0
- package/reactjs/reexports.d.ts +6 -0
- package/reactjs/reexports.js +21 -0
- package/reactjs/reexports.mjs +17 -0
- package/reactjs/utils/delay.d.ts +1 -0
- package/reactjs/utils/delay.js +7 -0
- package/reactjs/utils/delay.mjs +6 -0
- package/reactjs/utils/formatAmount.d.ts +7 -0
- package/reactjs/utils/formatAmount.js +24 -0
- package/reactjs/utils/formatAmount.mjs +23 -0
- package/reactjs/utils/getCleanStringAmount.d.ts +4 -0
- package/reactjs/utils/getCleanStringAmount.js +12 -0
- package/reactjs/utils/getCleanStringAmount.mjs +11 -0
- package/reactjs/utils/getCompletePathname.d.ts +1 -0
- package/reactjs/utils/getCompletePathname.js +6 -0
- package/reactjs/utils/getCompletePathname.mjs +5 -0
- package/reactjs/utils/getInitialTokens.d.ts +8 -0
- package/reactjs/utils/getInitialTokens.js +13 -0
- package/reactjs/utils/getInitialTokens.mjs +12 -0
- package/reactjs/utils/hasEnoughFunds.d.ts +5 -0
- package/reactjs/utils/hasEnoughFunds.js +20 -0
- package/reactjs/utils/hasEnoughFunds.mjs +19 -0
- package/reactjs/utils/index.d.ts +12 -0
- package/reactjs/utils/index.js +27 -0
- package/reactjs/utils/index.mjs +26 -0
- package/reactjs/utils/isStringFloat.d.ts +1 -0
- package/reactjs/utils/isStringFloat.js +22 -0
- package/reactjs/utils/isStringFloat.mjs +21 -0
- package/reactjs/utils/mxClsx.d.ts +3 -0
- package/reactjs/utils/mxClsx.js +21 -0
- package/reactjs/utils/mxClsx.mjs +20 -0
- package/reactjs/utils/pipe.d.ts +7 -0
- package/reactjs/utils/pipe.js +26 -0
- package/reactjs/utils/pipe.mjs +25 -0
- package/reactjs/utils/removeCommas.d.ts +1 -0
- package/reactjs/utils/removeCommas.js +7 -0
- package/reactjs/utils/removeCommas.mjs +6 -0
- package/reactjs/utils/roundAmount.d.ts +1 -0
- package/reactjs/utils/roundAmount.js +41 -0
- package/reactjs/utils/roundAmount.mjs +40 -0
- package/reactjs/utils/testNumber.d.ts +1 -0
- package/reactjs/utils/testNumber.js +5 -0
- package/reactjs/utils/testNumber.mjs +4 -0
- package/store/inMemoryStore.d.ts +12 -0
- package/store/inMemoryStore.js +40 -0
- package/store/inMemoryStore.mjs +39 -0
- package/types/batchTransactions.d.ts +6 -0
- package/types/batchTransactions.js +2 -0
- package/types/batchTransactions.mjs +1 -0
- package/types/index.d.ts +4 -0
- package/types/index.js +2 -0
- package/types/index.mjs +1 -0
- package/types/rate.d.ts +11 -0
- package/types/rate.js +2 -0
- package/types/rate.mjs +1 -0
- package/types/token.d.ts +12 -0
- package/types/token.js +2 -0
- package/types/token.mjs +1 -0
- package/types/transaction.d.ts +14 -0
- package/types/transaction.js +2 -0
- package/types/transaction.mjs +1 -0
- package/useBalances-Bxtc4GNK.js +199 -0
- package/useBalances-DA3zEruz.mjs +199 -0
- package/w3m-modal-DCcF1qEB.js +356 -0
- package/w3m-modal-DK3G5GJp.mjs +356 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { faClose } from "@fortawesome/free-solid-svg-icons/faClose";
|
|
3
|
+
import { faSearch } from "@fortawesome/free-solid-svg-icons/faSearch";
|
|
4
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
5
|
+
import { forwardRef, useState, useEffect } from "react";
|
|
6
|
+
import { useDebounce } from "../../../hooks/useDebounce.mjs";
|
|
7
|
+
import { mxClsx } from "../../../utils/mxClsx.mjs";
|
|
8
|
+
const MxSearch = forwardRef(
|
|
9
|
+
(props, ref) => {
|
|
10
|
+
const {
|
|
11
|
+
iconsClassName = "",
|
|
12
|
+
inputClassName = "",
|
|
13
|
+
containerClassName = "",
|
|
14
|
+
placeholder = "Search by name or symbol",
|
|
15
|
+
inputDefaultValue = "",
|
|
16
|
+
onChange
|
|
17
|
+
} = props;
|
|
18
|
+
const [inputValue, setInputValue] = useState(inputDefaultValue);
|
|
19
|
+
const onDebounceInputChange = useDebounce(inputValue, 200);
|
|
20
|
+
const onClear = () => setInputValue("");
|
|
21
|
+
useEffect(() => onChange(onDebounceInputChange), [onDebounceInputChange]);
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: `liq-relative liq-flex liq-flex-1 liq-items-center ${containerClassName}`,
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
FontAwesomeIcon,
|
|
29
|
+
{
|
|
30
|
+
icon: faSearch,
|
|
31
|
+
className: mxClsx(
|
|
32
|
+
"liq-pointer-events-none liq-absolute liq-inset-4 liq-top-1/3 liq-h-4 liq-w-4 liq-items-center liq-text-neutral-300",
|
|
33
|
+
iconsClassName
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
"input",
|
|
39
|
+
{
|
|
40
|
+
value: inputValue,
|
|
41
|
+
onChange: (val) => setInputValue(val.target.value),
|
|
42
|
+
placeholder,
|
|
43
|
+
className: mxClsx(
|
|
44
|
+
"focus-primary liq-text-medium placeholder:liq-font-medium liq-flex liq-w-full liq-gap-2 liq-rounded-xl liq-border liq-border-neutral-800 liq-bg-neutral-900 liq-px-11 liq-py-2 placeholder:liq-text-neutral-300",
|
|
45
|
+
inputClassName
|
|
46
|
+
),
|
|
47
|
+
tabIndex: 1,
|
|
48
|
+
ref
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
Boolean(inputValue) && /* @__PURE__ */ jsx(
|
|
52
|
+
FontAwesomeIcon,
|
|
53
|
+
{
|
|
54
|
+
icon: faClose,
|
|
55
|
+
onClick: onClear,
|
|
56
|
+
className: mxClsx(
|
|
57
|
+
"liq-absolute liq-inset-4 liq-left-auto liq-top-1/3 liq-h-4 liq-w-4 liq-cursor-pointer liq-items-center liq-text-neutral-300 liq-transition-colors liq-duration-200 hover:liq-text-neutral-400",
|
|
58
|
+
iconsClassName
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
export {
|
|
68
|
+
MxSearch
|
|
69
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MxSearch';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export type MxSlideoverSizeType = 'h-full' | 'h-60' | 'h-40' | 'h-20';
|
|
4
|
+
export declare const MxSlideover: ({ show, children, size, className, onClose }: {
|
|
5
|
+
show: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
size?: MxSlideoverSizeType;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const faClose = require("@fortawesome/free-solid-svg-icons/faClose");
|
|
6
|
+
const reactFontawesome = require("@fortawesome/react-fontawesome");
|
|
7
|
+
const react = require("@headlessui/react");
|
|
8
|
+
const require$$0 = require("react");
|
|
9
|
+
const reactjs_utils_mxClsx = require("../../../utils/mxClsx.js");
|
|
10
|
+
const reactjs_components_base_MxButton_MxButton = require("../MxButton/MxButton.js");
|
|
11
|
+
const MxSlideover = ({
|
|
12
|
+
show,
|
|
13
|
+
children,
|
|
14
|
+
size,
|
|
15
|
+
className = "",
|
|
16
|
+
onClose
|
|
17
|
+
}) => {
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Transition.Root, { show, as: require$$0.Fragment, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Dialog, { as: "div", className: "liq-relative liq-z-30", onClose, children: [
|
|
19
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20
|
+
react.Transition.Child,
|
|
21
|
+
{
|
|
22
|
+
as: require$$0.Fragment,
|
|
23
|
+
enter: "liq-ease-in-out liq-duration-150",
|
|
24
|
+
enterFrom: "liq-opacity-0",
|
|
25
|
+
enterTo: "liq-opacity-100",
|
|
26
|
+
leave: "liq-ease-in-out liq-duration-150",
|
|
27
|
+
leaveFrom: "liq-opacity-100",
|
|
28
|
+
leaveTo: "liq-opacity-0",
|
|
29
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-fixed liq-inset-0 liq-bg-neutral-400 liq-bg-opacity-25 liq-backdrop-blur-sm liq- liq-backdrop-filter liq-transition-opacity" })
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-fixed liq-inset-0 liq-overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-absolute liq-inset-0 liq-overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-pointer-events-none liq-fixed liq-inset-y-0 liq-right-0 liq-flex liq-max-w-full liq-p-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33
|
+
react.Transition.Child,
|
|
34
|
+
{
|
|
35
|
+
as: require$$0.Fragment,
|
|
36
|
+
enter: "liq-transform liq-transition liq-ease-in-out liq-duration-150",
|
|
37
|
+
leave: "liq-transform liq-transition liq-ease-in-out liq-duration-150",
|
|
38
|
+
enterFrom: "liq-translate-y-full lg:liq-translate-y-0 lg:liq-translate-x-full",
|
|
39
|
+
enterTo: "liq-translate-y-0 lg:liq-translate-x-0",
|
|
40
|
+
leaveFrom: "liq-translate-y-0 lg:liq-translate-x-0",
|
|
41
|
+
leaveTo: "liq-translate-y-full lg:liq-translate-y-0 lg:liq-translate-x-full",
|
|
42
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.Dialog.Panel, { className: "liq-pointer-events-auto liq-relative liq-flex liq-w-screen liq-lg:max-w-md", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: reactjs_utils_mxClsx.mxClsx(
|
|
46
|
+
"liq-relative liq-flex liq-flex-1 liq-flex-col liq-self-end liq-rounded-3xl liq-bg-neutral-850 liq-p-2 liq-shadow-2xl",
|
|
47
|
+
{
|
|
48
|
+
"liq-h-full md:liq-rounded-3xl": size === "h-full",
|
|
49
|
+
"liq-h-3/5": size === "h-60",
|
|
50
|
+
"liq-h-2/5": size === "h-40",
|
|
51
|
+
"liq-h-1/5": size === "h-20"
|
|
52
|
+
},
|
|
53
|
+
className
|
|
54
|
+
),
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
57
|
+
reactjs_components_base_MxButton_MxButton.MxButton,
|
|
58
|
+
{
|
|
59
|
+
variant: "transparent",
|
|
60
|
+
onClick: onClose,
|
|
61
|
+
className: "liq-absolute liq-top-12 liq-right-4 liq-z-30 liq-flex liq-h-10 liq-w-10 liq-items-center liq-justify-center liq-rounded-full liq-border-none liq-bg-neutral-850",
|
|
62
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
63
|
+
reactFontawesome.FontAwesomeIcon,
|
|
64
|
+
{
|
|
65
|
+
icon: faClose.faClose,
|
|
66
|
+
className: "liq-h-5 liq-w-5 liq-text-neutral-500"
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "scrollbar-thin liq-overflow-y-scroll", children })
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
) })
|
|
75
|
+
}
|
|
76
|
+
) }) }) })
|
|
77
|
+
] }) });
|
|
78
|
+
};
|
|
79
|
+
exports.MxSlideover = MxSlideover;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { faClose } from "@fortawesome/free-solid-svg-icons/faClose";
|
|
3
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { Transition, Dialog } from "@headlessui/react";
|
|
5
|
+
import { Fragment } from "react";
|
|
6
|
+
import { mxClsx } from "../../../utils/mxClsx.mjs";
|
|
7
|
+
import { MxButton } from "../MxButton/MxButton.mjs";
|
|
8
|
+
const MxSlideover = ({
|
|
9
|
+
show,
|
|
10
|
+
children,
|
|
11
|
+
size,
|
|
12
|
+
className = "",
|
|
13
|
+
onClose
|
|
14
|
+
}) => {
|
|
15
|
+
return /* @__PURE__ */ jsx(Transition.Root, { show, as: Fragment, children: /* @__PURE__ */ jsxs(Dialog, { as: "div", className: "liq-relative liq-z-30", onClose, children: [
|
|
16
|
+
/* @__PURE__ */ jsx(
|
|
17
|
+
Transition.Child,
|
|
18
|
+
{
|
|
19
|
+
as: Fragment,
|
|
20
|
+
enter: "liq-ease-in-out liq-duration-150",
|
|
21
|
+
enterFrom: "liq-opacity-0",
|
|
22
|
+
enterTo: "liq-opacity-100",
|
|
23
|
+
leave: "liq-ease-in-out liq-duration-150",
|
|
24
|
+
leaveFrom: "liq-opacity-100",
|
|
25
|
+
leaveTo: "liq-opacity-0",
|
|
26
|
+
children: /* @__PURE__ */ jsx("div", { className: "liq-fixed liq-inset-0 liq-bg-neutral-400 liq-bg-opacity-25 liq-backdrop-blur-sm liq- liq-backdrop-filter liq-transition-opacity" })
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ jsx("div", { className: "liq-fixed liq-inset-0 liq-overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "liq-absolute liq-inset-0 liq-overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "liq-pointer-events-none liq-fixed liq-inset-y-0 liq-right-0 liq-flex liq-max-w-full liq-p-2", children: /* @__PURE__ */ jsx(
|
|
30
|
+
Transition.Child,
|
|
31
|
+
{
|
|
32
|
+
as: Fragment,
|
|
33
|
+
enter: "liq-transform liq-transition liq-ease-in-out liq-duration-150",
|
|
34
|
+
leave: "liq-transform liq-transition liq-ease-in-out liq-duration-150",
|
|
35
|
+
enterFrom: "liq-translate-y-full lg:liq-translate-y-0 lg:liq-translate-x-full",
|
|
36
|
+
enterTo: "liq-translate-y-0 lg:liq-translate-x-0",
|
|
37
|
+
leaveFrom: "liq-translate-y-0 lg:liq-translate-x-0",
|
|
38
|
+
leaveTo: "liq-translate-y-full lg:liq-translate-y-0 lg:liq-translate-x-full",
|
|
39
|
+
children: /* @__PURE__ */ jsx(Dialog.Panel, { className: "liq-pointer-events-auto liq-relative liq-flex liq-w-screen liq-lg:max-w-md", children: /* @__PURE__ */ jsxs(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
className: mxClsx(
|
|
43
|
+
"liq-relative liq-flex liq-flex-1 liq-flex-col liq-self-end liq-rounded-3xl liq-bg-neutral-850 liq-p-2 liq-shadow-2xl",
|
|
44
|
+
{
|
|
45
|
+
"liq-h-full md:liq-rounded-3xl": size === "h-full",
|
|
46
|
+
"liq-h-3/5": size === "h-60",
|
|
47
|
+
"liq-h-2/5": size === "h-40",
|
|
48
|
+
"liq-h-1/5": size === "h-20"
|
|
49
|
+
},
|
|
50
|
+
className
|
|
51
|
+
),
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsx(
|
|
54
|
+
MxButton,
|
|
55
|
+
{
|
|
56
|
+
variant: "transparent",
|
|
57
|
+
onClick: onClose,
|
|
58
|
+
className: "liq-absolute liq-top-12 liq-right-4 liq-z-30 liq-flex liq-h-10 liq-w-10 liq-items-center liq-justify-center liq-rounded-full liq-border-none liq-bg-neutral-850",
|
|
59
|
+
children: /* @__PURE__ */ jsx(
|
|
60
|
+
FontAwesomeIcon,
|
|
61
|
+
{
|
|
62
|
+
icon: faClose,
|
|
63
|
+
className: "liq-h-5 liq-w-5 liq-text-neutral-500"
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ jsx("div", { className: "scrollbar-thin liq-overflow-y-scroll", children })
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
) })
|
|
72
|
+
}
|
|
73
|
+
) }) }) })
|
|
74
|
+
] }) });
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
MxSlideover
|
|
78
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MxSlideover';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const reactjs_components_base_MxSlideover_MxSlideover = require("./MxSlideover.js");
|
|
5
|
+
exports.MxSlideover = reactjs_components_base_MxSlideover_MxSlideover.MxSlideover;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Placement } from 'react-joyride';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export type MxTooltipVariantType = 'default' | 'underline' | 'dotted';
|
|
5
|
+
export type MxTooltipVariantColorType = 'neutral-200' | 'neutral-500' | 'primary-200' | 'primary-300' | 'primary-400';
|
|
6
|
+
interface MxTooltipProps {
|
|
7
|
+
offsetX?: number;
|
|
8
|
+
offsetY?: number;
|
|
9
|
+
hideDelayMs?: number;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
buttonText: ReactNode;
|
|
12
|
+
placement?: Placement;
|
|
13
|
+
hideTooltip?: boolean;
|
|
14
|
+
contentClassName?: string;
|
|
15
|
+
containerClassName?: string;
|
|
16
|
+
shouldStopPropagation?: boolean;
|
|
17
|
+
variant?: MxTooltipVariantType;
|
|
18
|
+
variantColor?: MxTooltipVariantColorType;
|
|
19
|
+
portalId?: string;
|
|
20
|
+
isSlideoverOnMobile?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const MxTooltip: ({ children, buttonText, hideTooltip, offsetX, offsetY, hideDelayMs, placement, variant, contentClassName, containerClassName, shouldStopPropagation, variantColor, portalId, isSlideoverOnMobile }: MxTooltipProps) => string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const require$$0 = require("react");
|
|
6
|
+
const ReactDOM = require("react-dom");
|
|
7
|
+
const reactPopper = require("react-popper");
|
|
8
|
+
const reactjs_components_base_MxTooltip_components_TooltipContent_TooltipContent = require("./components/TooltipContent/TooltipContent.js");
|
|
9
|
+
const reactjs_components_base_MxTooltip_components_TooltipContainer_TooltipContainer = require("./components/TooltipContainer/TooltipContainer.js");
|
|
10
|
+
const reactjs_utils_mxClsx = require("../../../utils/mxClsx.js");
|
|
11
|
+
const reactjs_components_base_MxSlideover_MxSlideover = require("../MxSlideover/MxSlideover.js");
|
|
12
|
+
const MxTooltip = ({
|
|
13
|
+
children,
|
|
14
|
+
buttonText,
|
|
15
|
+
hideTooltip,
|
|
16
|
+
offsetX = 0,
|
|
17
|
+
offsetY = 10,
|
|
18
|
+
hideDelayMs = 10,
|
|
19
|
+
placement = "top",
|
|
20
|
+
variant = "default",
|
|
21
|
+
contentClassName = "",
|
|
22
|
+
containerClassName = "",
|
|
23
|
+
shouldStopPropagation = true,
|
|
24
|
+
variantColor = "neutral-500",
|
|
25
|
+
portalId,
|
|
26
|
+
isSlideoverOnMobile = false
|
|
27
|
+
}) => {
|
|
28
|
+
const [isHover, setIsHover] = require$$0.useState(false);
|
|
29
|
+
const [popperEl, setPopperEl] = require$$0.useState(null);
|
|
30
|
+
const [referenceEl, setReferenceEl] = require$$0.useState(null);
|
|
31
|
+
const [showSlideOver, setShowSlideOver] = require$$0.useState(false);
|
|
32
|
+
const isMobile = window.innerWidth < 768;
|
|
33
|
+
const { styles, attributes } = reactPopper.usePopper(referenceEl, popperEl, {
|
|
34
|
+
placement,
|
|
35
|
+
modifiers: [
|
|
36
|
+
{
|
|
37
|
+
name: "preventOverflow",
|
|
38
|
+
options: {
|
|
39
|
+
boundary: "clippingParents"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
// flips the tooltip if it does not fit
|
|
43
|
+
{ name: "eventListeners", enabled: isHover },
|
|
44
|
+
// prevent popper from updating when the tooltip is not shown
|
|
45
|
+
{ name: "offset", options: { offset: [offsetX, offsetY] } }
|
|
46
|
+
]
|
|
47
|
+
});
|
|
48
|
+
const showEvents = ["mouseenter", "focus"];
|
|
49
|
+
const hideEvents = ["mouseleave", "blur"];
|
|
50
|
+
const hideTimeoutRef = require$$0.useRef();
|
|
51
|
+
const show = () => {
|
|
52
|
+
if (hideTimeoutRef.current) {
|
|
53
|
+
clearTimeout(hideTimeoutRef.current);
|
|
54
|
+
}
|
|
55
|
+
setIsHover(true);
|
|
56
|
+
};
|
|
57
|
+
const hide = () => {
|
|
58
|
+
hideTimeoutRef.current = setTimeout(() => {
|
|
59
|
+
setIsHover(false);
|
|
60
|
+
}, hideDelayMs);
|
|
61
|
+
};
|
|
62
|
+
require$$0.useEffect(() => {
|
|
63
|
+
return () => {
|
|
64
|
+
if (hideTimeoutRef.current) {
|
|
65
|
+
clearTimeout(hideTimeoutRef.current);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}, []);
|
|
69
|
+
require$$0.useEffect(() => {
|
|
70
|
+
showEvents.forEach((event) => popperEl == null ? void 0 : popperEl.addEventListener(event, show));
|
|
71
|
+
hideEvents.forEach((event) => popperEl == null ? void 0 : popperEl.addEventListener(event, hide));
|
|
72
|
+
return () => {
|
|
73
|
+
showEvents.forEach((event) => popperEl == null ? void 0 : popperEl.removeEventListener(event, show));
|
|
74
|
+
hideEvents.forEach((event) => popperEl == null ? void 0 : popperEl.removeEventListener(event, hide));
|
|
75
|
+
};
|
|
76
|
+
}, [popperEl]);
|
|
77
|
+
require$$0.useEffect(() => {
|
|
78
|
+
showEvents.forEach((event) => referenceEl == null ? void 0 : referenceEl.addEventListener(event, show));
|
|
79
|
+
hideEvents.forEach((event) => referenceEl == null ? void 0 : referenceEl.addEventListener(event, hide));
|
|
80
|
+
return () => {
|
|
81
|
+
showEvents.forEach(
|
|
82
|
+
(event) => referenceEl == null ? void 0 : referenceEl.removeEventListener(event, show)
|
|
83
|
+
);
|
|
84
|
+
hideEvents.forEach(
|
|
85
|
+
(event) => referenceEl == null ? void 0 : referenceEl.removeEventListener(event, hide)
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
}, [referenceEl]);
|
|
89
|
+
const handleOnClick = (e) => {
|
|
90
|
+
if (isSlideoverOnMobile && isMobile) {
|
|
91
|
+
setShowSlideOver(true);
|
|
92
|
+
}
|
|
93
|
+
if (!shouldStopPropagation) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
e.preventDefault();
|
|
97
|
+
e.stopPropagation();
|
|
98
|
+
};
|
|
99
|
+
const portalRoot = portalId ? document.getElementById(portalId) : null;
|
|
100
|
+
if (hideTooltip) {
|
|
101
|
+
return buttonText;
|
|
102
|
+
}
|
|
103
|
+
if (isSlideoverOnMobile && isMobile) {
|
|
104
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
105
|
+
reactjs_components_base_MxTooltip_components_TooltipContainer_TooltipContainer.TooltipContainer,
|
|
106
|
+
{
|
|
107
|
+
containerClassName,
|
|
108
|
+
variant,
|
|
109
|
+
variantColor,
|
|
110
|
+
onClick: handleOnClick,
|
|
111
|
+
ref: setReferenceEl,
|
|
112
|
+
children: [
|
|
113
|
+
buttonText,
|
|
114
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
115
|
+
reactjs_components_base_MxSlideover_MxSlideover.MxSlideover,
|
|
116
|
+
{
|
|
117
|
+
onClose: () => setShowSlideOver(false),
|
|
118
|
+
show: showSlideOver,
|
|
119
|
+
children
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
127
|
+
reactjs_components_base_MxTooltip_components_TooltipContainer_TooltipContainer.TooltipContainer,
|
|
128
|
+
{
|
|
129
|
+
containerClassName,
|
|
130
|
+
variant,
|
|
131
|
+
variantColor,
|
|
132
|
+
onClick: handleOnClick,
|
|
133
|
+
ref: setReferenceEl,
|
|
134
|
+
children: [
|
|
135
|
+
buttonText,
|
|
136
|
+
isHover && (portalId ? ReactDOM.createPortal(
|
|
137
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
138
|
+
reactjs_components_base_MxTooltip_components_TooltipContent_TooltipContent.TooltipContent,
|
|
139
|
+
{
|
|
140
|
+
children,
|
|
141
|
+
contentClassName: reactjs_utils_mxClsx.mxClsx("liq-text-center", contentClassName),
|
|
142
|
+
popperAttributes: attributes.popper,
|
|
143
|
+
popperStyles: styles.popper,
|
|
144
|
+
setPopperEl
|
|
145
|
+
}
|
|
146
|
+
),
|
|
147
|
+
portalRoot ?? document.body
|
|
148
|
+
// Fixes z-index - overflow issue on tooltips
|
|
149
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
150
|
+
reactjs_components_base_MxTooltip_components_TooltipContent_TooltipContent.TooltipContent,
|
|
151
|
+
{
|
|
152
|
+
children,
|
|
153
|
+
contentClassName,
|
|
154
|
+
popperAttributes: attributes.popper,
|
|
155
|
+
popperStyles: styles.popper,
|
|
156
|
+
setPopperEl
|
|
157
|
+
}
|
|
158
|
+
))
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
};
|
|
163
|
+
exports.MxTooltip = MxTooltip;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef, useEffect } from "react";
|
|
3
|
+
import ReactDOM from "react-dom";
|
|
4
|
+
import { usePopper } from "react-popper";
|
|
5
|
+
import { TooltipContent } from "./components/TooltipContent/TooltipContent.mjs";
|
|
6
|
+
import { TooltipContainer } from "./components/TooltipContainer/TooltipContainer.mjs";
|
|
7
|
+
import { mxClsx } from "../../../utils/mxClsx.mjs";
|
|
8
|
+
import { MxSlideover } from "../MxSlideover/MxSlideover.mjs";
|
|
9
|
+
const MxTooltip = ({
|
|
10
|
+
children,
|
|
11
|
+
buttonText,
|
|
12
|
+
hideTooltip,
|
|
13
|
+
offsetX = 0,
|
|
14
|
+
offsetY = 10,
|
|
15
|
+
hideDelayMs = 10,
|
|
16
|
+
placement = "top",
|
|
17
|
+
variant = "default",
|
|
18
|
+
contentClassName = "",
|
|
19
|
+
containerClassName = "",
|
|
20
|
+
shouldStopPropagation = true,
|
|
21
|
+
variantColor = "neutral-500",
|
|
22
|
+
portalId,
|
|
23
|
+
isSlideoverOnMobile = false
|
|
24
|
+
}) => {
|
|
25
|
+
const [isHover, setIsHover] = useState(false);
|
|
26
|
+
const [popperEl, setPopperEl] = useState(null);
|
|
27
|
+
const [referenceEl, setReferenceEl] = useState(null);
|
|
28
|
+
const [showSlideOver, setShowSlideOver] = useState(false);
|
|
29
|
+
const isMobile = window.innerWidth < 768;
|
|
30
|
+
const { styles, attributes } = usePopper(referenceEl, popperEl, {
|
|
31
|
+
placement,
|
|
32
|
+
modifiers: [
|
|
33
|
+
{
|
|
34
|
+
name: "preventOverflow",
|
|
35
|
+
options: {
|
|
36
|
+
boundary: "clippingParents"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
// flips the tooltip if it does not fit
|
|
40
|
+
{ name: "eventListeners", enabled: isHover },
|
|
41
|
+
// prevent popper from updating when the tooltip is not shown
|
|
42
|
+
{ name: "offset", options: { offset: [offsetX, offsetY] } }
|
|
43
|
+
]
|
|
44
|
+
});
|
|
45
|
+
const showEvents = ["mouseenter", "focus"];
|
|
46
|
+
const hideEvents = ["mouseleave", "blur"];
|
|
47
|
+
const hideTimeoutRef = useRef();
|
|
48
|
+
const show = () => {
|
|
49
|
+
if (hideTimeoutRef.current) {
|
|
50
|
+
clearTimeout(hideTimeoutRef.current);
|
|
51
|
+
}
|
|
52
|
+
setIsHover(true);
|
|
53
|
+
};
|
|
54
|
+
const hide = () => {
|
|
55
|
+
hideTimeoutRef.current = setTimeout(() => {
|
|
56
|
+
setIsHover(false);
|
|
57
|
+
}, hideDelayMs);
|
|
58
|
+
};
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
return () => {
|
|
61
|
+
if (hideTimeoutRef.current) {
|
|
62
|
+
clearTimeout(hideTimeoutRef.current);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}, []);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
showEvents.forEach((event) => popperEl == null ? void 0 : popperEl.addEventListener(event, show));
|
|
68
|
+
hideEvents.forEach((event) => popperEl == null ? void 0 : popperEl.addEventListener(event, hide));
|
|
69
|
+
return () => {
|
|
70
|
+
showEvents.forEach((event) => popperEl == null ? void 0 : popperEl.removeEventListener(event, show));
|
|
71
|
+
hideEvents.forEach((event) => popperEl == null ? void 0 : popperEl.removeEventListener(event, hide));
|
|
72
|
+
};
|
|
73
|
+
}, [popperEl]);
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
showEvents.forEach((event) => referenceEl == null ? void 0 : referenceEl.addEventListener(event, show));
|
|
76
|
+
hideEvents.forEach((event) => referenceEl == null ? void 0 : referenceEl.addEventListener(event, hide));
|
|
77
|
+
return () => {
|
|
78
|
+
showEvents.forEach(
|
|
79
|
+
(event) => referenceEl == null ? void 0 : referenceEl.removeEventListener(event, show)
|
|
80
|
+
);
|
|
81
|
+
hideEvents.forEach(
|
|
82
|
+
(event) => referenceEl == null ? void 0 : referenceEl.removeEventListener(event, hide)
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
}, [referenceEl]);
|
|
86
|
+
const handleOnClick = (e) => {
|
|
87
|
+
if (isSlideoverOnMobile && isMobile) {
|
|
88
|
+
setShowSlideOver(true);
|
|
89
|
+
}
|
|
90
|
+
if (!shouldStopPropagation) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
e.preventDefault();
|
|
94
|
+
e.stopPropagation();
|
|
95
|
+
};
|
|
96
|
+
const portalRoot = portalId ? document.getElementById(portalId) : null;
|
|
97
|
+
if (hideTooltip) {
|
|
98
|
+
return buttonText;
|
|
99
|
+
}
|
|
100
|
+
if (isSlideoverOnMobile && isMobile) {
|
|
101
|
+
return /* @__PURE__ */ jsxs(
|
|
102
|
+
TooltipContainer,
|
|
103
|
+
{
|
|
104
|
+
containerClassName,
|
|
105
|
+
variant,
|
|
106
|
+
variantColor,
|
|
107
|
+
onClick: handleOnClick,
|
|
108
|
+
ref: setReferenceEl,
|
|
109
|
+
children: [
|
|
110
|
+
buttonText,
|
|
111
|
+
/* @__PURE__ */ jsx(
|
|
112
|
+
MxSlideover,
|
|
113
|
+
{
|
|
114
|
+
onClose: () => setShowSlideOver(false),
|
|
115
|
+
show: showSlideOver,
|
|
116
|
+
children
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
return /* @__PURE__ */ jsxs(
|
|
124
|
+
TooltipContainer,
|
|
125
|
+
{
|
|
126
|
+
containerClassName,
|
|
127
|
+
variant,
|
|
128
|
+
variantColor,
|
|
129
|
+
onClick: handleOnClick,
|
|
130
|
+
ref: setReferenceEl,
|
|
131
|
+
children: [
|
|
132
|
+
buttonText,
|
|
133
|
+
isHover && (portalId ? ReactDOM.createPortal(
|
|
134
|
+
/* @__PURE__ */ jsx(
|
|
135
|
+
TooltipContent,
|
|
136
|
+
{
|
|
137
|
+
children,
|
|
138
|
+
contentClassName: mxClsx("liq-text-center", contentClassName),
|
|
139
|
+
popperAttributes: attributes.popper,
|
|
140
|
+
popperStyles: styles.popper,
|
|
141
|
+
setPopperEl
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
portalRoot ?? document.body
|
|
145
|
+
// Fixes z-index - overflow issue on tooltips
|
|
146
|
+
) : /* @__PURE__ */ jsx(
|
|
147
|
+
TooltipContent,
|
|
148
|
+
{
|
|
149
|
+
children,
|
|
150
|
+
contentClassName,
|
|
151
|
+
popperAttributes: attributes.popper,
|
|
152
|
+
popperStyles: styles.popper,
|
|
153
|
+
setPopperEl
|
|
154
|
+
}
|
|
155
|
+
))
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
};
|
|
160
|
+
export {
|
|
161
|
+
MxTooltip
|
|
162
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MxTooltipVariantColorType, MxTooltipVariantType } from '../../MxTooltip';
|
|
2
|
+
|
|
3
|
+
interface TooltipContainerProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
containerClassName: string;
|
|
6
|
+
variant: MxTooltipVariantType;
|
|
7
|
+
variantColor: MxTooltipVariantColorType;
|
|
8
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const TooltipContainer: import('react').ForwardRefExoticComponent<TooltipContainerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const require$$0 = require("react");
|
|
6
|
+
const reactjs_utils_mxClsx = require("../../../../../utils/mxClsx.js");
|
|
7
|
+
const TooltipContainer = require$$0.forwardRef(({ children, variant, variantColor, containerClassName, onClick }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
role: "tooltip",
|
|
12
|
+
ref,
|
|
13
|
+
onClick,
|
|
14
|
+
className: reactjs_utils_mxClsx.mxClsx(
|
|
15
|
+
"focus-primary liq-relative liq-inline-block liq-max-w-fit liq-rounded-sm",
|
|
16
|
+
{
|
|
17
|
+
"": variant === "default",
|
|
18
|
+
"liq-border-b liq-underline": variant === "underline",
|
|
19
|
+
"liq-border-b liq-border-dashed": variant === "dotted"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"liq-border-neutral-200": variantColor === "neutral-200",
|
|
23
|
+
"liq-border-neutral-500": variantColor === "neutral-500",
|
|
24
|
+
"liq-border-primary-200 liq-text-primary-200": variantColor === "primary-200",
|
|
25
|
+
"liq-border-primary-300 liq-text-primary-300": variantColor === "primary-300",
|
|
26
|
+
"liq-border-primary-400 liq-text-primary-400": variantColor === "primary-400"
|
|
27
|
+
},
|
|
28
|
+
containerClassName
|
|
29
|
+
),
|
|
30
|
+
children
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
});
|
|
34
|
+
exports.TooltipContainer = TooltipContainer;
|