@multiversx/sdk-dapp-liquidity 2.0.0 → 2.1.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/all-networks--dfVLHLJ.js +2 -0
- package/all-networks-Czd8zS1n.mjs +4 -0
- package/api/checkAccount.js +1 -21
- package/api/checkAccount.mjs +13 -13
- package/api/confirmRate.js +1 -29
- package/api/confirmRate.mjs +17 -22
- package/api/getChains.js +1 -17
- package/api/getChains.mjs +10 -10
- package/api/getRate.js +1 -27
- package/api/getRate.mjs +17 -20
- package/api/getTokens.js +1 -22
- package/api/getTokens.mjs +14 -15
- package/api/getTokensBalances.js +1 -21
- package/api/getTokensBalances.mjs +13 -13
- package/api/getTransactions.js +1 -38
- package/api/getTransactions.mjs +25 -31
- package/api/index.js +1 -18
- package/api/index.mjs +16 -16
- package/api/sendTransactions.js +1 -32
- package/api/sendTransactions.mjs +19 -19
- package/api/tests/confirmRate.spec.js +1 -130
- package/api/tests/confirmRate.spec.mjs +44 -58
- package/api/tests/getChains.spec.js +1 -43
- package/api/tests/getChains.spec.mjs +15 -18
- package/api/tests/getRate.spec.js +1 -87
- package/api/tests/getRate.spec.mjs +35 -49
- package/api/tests/getTokens.spec.js +1 -68
- package/api/tests/getTokens.spec.mjs +23 -29
- package/api/tests/getTransactions.spec.js +1 -94
- package/api/tests/getTransactions.spec.mjs +35 -51
- package/api/tests/sendTransactions.spec.js +1 -96
- package/api/tests/sendTransactions.spec.mjs +44 -52
- package/constants/index.js +1 -4
- package/constants/index.mjs +2 -2
- package/default-D0Jk5ROI.mjs +4 -0
- package/default-DbU6vPaB.js +2 -0
- package/helpers/assertRateConfirmationMatchesIntent.d.ts +8 -0
- package/helpers/assertRateConfirmationMatchesIntent.js +2 -0
- package/helpers/assertRateConfirmationMatchesIntent.mjs +20 -0
- package/helpers/base64Utils.js +1 -31
- package/helpers/base64Utils.mjs +14 -24
- package/helpers/decodeLoginToken.js +1 -27
- package/helpers/decodeLoginToken.mjs +13 -18
- package/helpers/decodeToken.js +1 -39
- package/helpers/decodeToken.mjs +20 -31
- package/helpers/getApiURL.js +1 -7
- package/helpers/getApiURL.mjs +3 -5
- package/helpers/getBridgeURL.js +1 -7
- package/helpers/getBridgeURL.mjs +3 -5
- package/helpers/getDisplayName.js +1 -11
- package/helpers/getDisplayName.mjs +3 -8
- package/helpers/getMvxApiURL.js +1 -7
- package/helpers/getMvxApiURL.mjs +3 -5
- package/helpers/getMvxChainId.js +1 -7
- package/helpers/getMvxChainId.mjs +3 -5
- package/helpers/getMvxExplorerAddress.js +1 -7
- package/helpers/getMvxExplorerAddress.mjs +3 -5
- package/helpers/index.d.ts +2 -0
- package/helpers/index.js +1 -22
- package/helpers/index.mjs +24 -20
- package/helpers/safeImageUrl.d.ts +1 -0
- package/helpers/safeImageUrl.js +2 -0
- package/helpers/safeImageUrl.mjs +13 -0
- package/helpers/serializeTransaction.js +1 -8
- package/helpers/serializeTransaction.mjs +3 -5
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.d.ts +1 -0
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.js +2 -0
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.mjs +52 -0
- package/helpers/tests/base64Utils.spec.js +1 -29
- package/helpers/tests/base64Utils.spec.mjs +11 -24
- package/helpers/tests/decodeLoginToken.spec.js +1 -34
- package/helpers/tests/decodeLoginToken.spec.mjs +13 -24
- package/helpers/tests/decodeToken.spec.js +1 -27
- package/helpers/tests/decodeToken.spec.mjs +7 -12
- package/helpers/tests/safeImageUrl.spec.d.ts +1 -0
- package/helpers/tests/safeImageUrl.spec.js +2 -0
- package/helpers/tests/safeImageUrl.spec.mjs +32 -0
- package/helpers/tests/serializeTransaction.spec.d.ts +1 -0
- package/helpers/tests/serializeTransaction.spec.js +2 -0
- package/helpers/tests/serializeTransaction.spec.mjs +24 -0
- package/index.js +1 -228
- package/index.mjs +196 -192
- package/package.json +14 -9
- package/react.esm-B0AMOHxa.js +73 -0
- package/react.esm-BxvJJ86Q.mjs +9949 -0
- package/reactjs/adapters/SuiAdapter.d.ts +14 -0
- package/reactjs/adapters/SuiAdapter.js +1 -349
- package/reactjs/adapters/SuiAdapter.mjs +171 -199
- package/reactjs/components/AccountAddress/AccountAddress.js +1 -31
- package/reactjs/components/AccountAddress/AccountAddress.mjs +16 -16
- package/reactjs/components/AccountAddress/index.js +1 -4
- package/reactjs/components/AccountAddress/index.mjs +2 -2
- package/reactjs/components/AmountCard/AmountCard.js +1 -33
- package/reactjs/components/AmountCard/AmountCard.mjs +19 -21
- package/reactjs/components/AmountCard/index.js +1 -4
- package/reactjs/components/AmountCard/index.mjs +2 -2
- package/reactjs/components/AmountInput/AmountInput.js +1 -71
- package/reactjs/components/AmountInput/AmountInput.mjs +42 -46
- package/reactjs/components/AmountInput/index.js +1 -4
- package/reactjs/components/AmountInput/index.mjs +2 -2
- package/reactjs/components/BridgeForm/BridgeForm.d.ts +9 -0
- package/reactjs/components/BridgeForm/BridgeForm.js +1 -89
- package/reactjs/components/BridgeForm/BridgeForm.mjs +72 -79
- package/reactjs/components/BridgeForm/Deposit.js +1 -673
- package/reactjs/components/BridgeForm/Deposit.mjs +381 -503
- package/reactjs/components/BridgeForm/Transfer.js +1 -559
- package/reactjs/components/BridgeForm/Transfer.mjs +316 -427
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.js +1 -78
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.mjs +47 -70
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.js +1 -58
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.mjs +36 -47
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.js +1 -266
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.mjs +163 -231
- package/reactjs/components/BridgeForm/index.js +1 -4
- package/reactjs/components/BridgeForm/index.mjs +2 -2
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.js +1 -76
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.mjs +35 -65
- package/reactjs/components/BridgeHistory/BridgeHistory.js +1 -367
- package/reactjs/components/BridgeHistory/BridgeHistory.mjs +177 -193
- package/reactjs/components/BridgeHistory/index.js +1 -4
- package/reactjs/components/BridgeHistory/index.mjs +2 -2
- package/reactjs/components/Connect/BridgeAccountDisplay.js +1 -150
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +99 -115
- package/reactjs/components/Connect/BridgeConnectButton.js +1 -34
- package/reactjs/components/Connect/BridgeConnectButton.mjs +20 -19
- package/reactjs/components/Connect/ChainSelectConnect.js +1 -144
- package/reactjs/components/Connect/ChainSelectConnect.mjs +70 -83
- package/reactjs/components/Connect/CustomConnectButton.js +1 -40
- package/reactjs/components/Connect/CustomConnectButton.mjs +24 -30
- package/reactjs/components/Connect/MvxAccountDisplay.js +1 -97
- package/reactjs/components/Connect/MvxAccountDisplay.mjs +47 -50
- package/reactjs/components/Connect/MvxConnectButton.js +1 -43
- package/reactjs/components/Connect/MvxConnectButton.mjs +35 -40
- package/reactjs/components/Connect/SwitchChainButton.js +1 -29
- package/reactjs/components/Connect/SwitchChainButton.mjs +15 -18
- package/reactjs/components/Connect/index.js +1 -16
- package/reactjs/components/Connect/index.mjs +14 -14
- package/reactjs/components/CopyButton/CopyButton.js +1 -46
- package/reactjs/components/CopyButton/CopyButton.mjs +33 -36
- package/reactjs/components/CopyButton/index.js +1 -4
- package/reactjs/components/CopyButton/index.mjs +2 -2
- package/reactjs/components/CopyButton/utils/copyToClipboard.js +1 -38
- package/reactjs/components/CopyButton/utils/copyToClipboard.mjs +20 -32
- package/reactjs/components/CopyButton/utils/index.js +1 -4
- package/reactjs/components/CopyButton/utils/index.mjs +2 -2
- package/reactjs/components/DisplayAmount/DisplayAmount.js +1 -90
- package/reactjs/components/DisplayAmount/DisplayAmount.mjs +68 -75
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +1 -39
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.mjs +26 -33
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.js +1 -61
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.mjs +38 -46
- package/reactjs/components/DisplayAmount/index.js +1 -4
- package/reactjs/components/DisplayAmount/index.mjs +2 -2
- package/reactjs/components/DisplayAmount/utils/index.js +1 -4
- package/reactjs/components/DisplayAmount/utils/index.mjs +2 -2
- package/reactjs/components/DisplayAmount/utils/truncateAmount.js +1 -21
- package/reactjs/components/DisplayAmount/utils/truncateAmount.mjs +9 -13
- package/reactjs/components/Error/Error.js +1 -66
- package/reactjs/components/Error/Error.mjs +29 -29
- package/reactjs/components/Error/index.js +1 -4
- package/reactjs/components/Error/index.mjs +2 -2
- package/reactjs/components/SmallLoader/SmallLoader.js +1 -21
- package/reactjs/components/SmallLoader/SmallLoader.mjs +13 -18
- package/reactjs/components/SmallLoader/index.js +1 -4
- package/reactjs/components/SmallLoader/index.mjs +2 -2
- package/reactjs/components/ToggleDirection/ToggleDirection.js +1 -30
- package/reactjs/components/ToggleDirection/ToggleDirection.mjs +22 -28
- package/reactjs/components/TokenSelector/TokenSelector.js +1 -172
- package/reactjs/components/TokenSelector/TokenSelector.mjs +98 -118
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +1 -94
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +48 -57
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js +1 -51
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs +45 -44
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.js +1 -18
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.mjs +9 -14
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.js +1 -6
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.mjs +2 -4
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +1 -39
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +22 -18
- package/reactjs/components/TokenSelector/components/SelectContainer.js +1 -40
- package/reactjs/components/TokenSelector/components/SelectContainer.mjs +36 -38
- package/reactjs/components/TokenSelector/components/SelectContent.js +1 -136
- package/reactjs/components/TokenSelector/components/SelectContent.mjs +79 -103
- package/reactjs/components/TokenSelector/components/SelectedOption.js +1 -28
- package/reactjs/components/TokenSelector/components/SelectedOption.mjs +22 -24
- package/reactjs/components/TokenSelector/components/TokenIcon.js +1 -81
- package/reactjs/components/TokenSelector/components/TokenIcon.mjs +52 -57
- package/reactjs/components/TokenSelector/components/TokenItem.js +1 -80
- package/reactjs/components/TokenSelector/components/TokenItem.mjs +41 -54
- package/reactjs/components/TokenSelector/components/TokenList.js +1 -23
- package/reactjs/components/TokenSelector/components/TokenList.mjs +19 -21
- package/reactjs/components/TokenSelector/components/TokenSymbol.js +1 -25
- package/reactjs/components/TokenSelector/components/TokenSymbol.mjs +14 -15
- package/reactjs/components/TokenSelector/index.js +1 -4
- package/reactjs/components/TokenSelector/index.mjs +2 -2
- package/reactjs/components/TransactionToast/TransactionToast.js +1 -53
- package/reactjs/components/TransactionToast/TransactionToast.mjs +27 -28
- package/reactjs/components/TransactionToast/TransactionToastContainer.js +1 -20
- package/reactjs/components/TransactionToast/TransactionToastContainer.mjs +16 -18
- package/reactjs/components/TransactionToast/index.js +1 -6
- package/reactjs/components/TransactionToast/index.mjs +4 -4
- package/reactjs/components/TrimAddress/TrimAddress.js +1 -27
- package/reactjs/components/TrimAddress/TrimAddress.mjs +19 -24
- package/reactjs/components/TrimAddress/index.js +1 -4
- package/reactjs/components/TrimAddress/index.mjs +2 -2
- package/reactjs/components/base/MxButton/MxButton.js +1 -71
- package/reactjs/components/base/MxButton/MxButton.mjs +46 -46
- package/reactjs/components/base/MxButton/index.js +1 -4
- package/reactjs/components/base/MxButton/index.mjs +2 -2
- package/reactjs/components/base/MxCard/MxCard.js +1 -54
- package/reactjs/components/base/MxCard/MxCard.mjs +34 -34
- package/reactjs/components/base/MxCard/index.js +1 -4
- package/reactjs/components/base/MxCard/index.mjs +2 -2
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.js +1 -28
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.mjs +24 -26
- package/reactjs/components/base/MxCircleLoader/index.js +1 -4
- package/reactjs/components/base/MxCircleLoader/index.mjs +2 -2
- package/reactjs/components/base/MxLink/MxLink.js +1 -70
- package/reactjs/components/base/MxLink/MxLink.mjs +44 -46
- package/reactjs/components/base/MxLink/index.js +1 -4
- package/reactjs/components/base/MxLink/index.mjs +2 -2
- package/reactjs/components/base/MxSearch/MxSearch.js +1 -69
- package/reactjs/components/base/MxSearch/MxSearch.mjs +37 -41
- package/reactjs/components/base/MxSearch/index.js +1 -4
- package/reactjs/components/base/MxSearch/index.mjs +2 -2
- package/reactjs/components/base/MxSlideover/MxSlideover.js +1 -78
- package/reactjs/components/base/MxSlideover/MxSlideover.mjs +72 -74
- package/reactjs/components/base/MxSlideover/index.js +1 -4
- package/reactjs/components/base/MxSlideover/index.mjs +2 -2
- package/reactjs/components/base/MxTooltip/MxTooltip.js +1 -163
- package/reactjs/components/base/MxTooltip/MxTooltip.mjs +92 -135
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +1 -33
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs +29 -31
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.js +1 -4
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.mjs +2 -2
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.js +1 -27
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.mjs +23 -25
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.js +1 -4
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.mjs +2 -2
- package/reactjs/components/base/MxTooltip/components/index.js +1 -6
- package/reactjs/components/base/MxTooltip/components/index.mjs +4 -4
- package/reactjs/components/base/MxTooltip/index.js +1 -4
- package/reactjs/components/base/MxTooltip/index.mjs +2 -2
- package/reactjs/components/base/index.js +1 -14
- package/reactjs/components/base/index.mjs +12 -12
- package/reactjs/components/index.js +1 -54
- package/reactjs/components/index.mjs +52 -52
- package/reactjs/constants/chains.js +1 -54
- package/reactjs/constants/chains.mjs +33 -52
- package/reactjs/constants/index.js +1 -13
- package/reactjs/constants/index.mjs +9 -10
- package/reactjs/context/Web3AppProvider.js +1 -40
- package/reactjs/context/Web3AppProvider.mjs +34 -34
- package/reactjs/context/queryClient.js +1 -11
- package/reactjs/context/queryClient.mjs +5 -8
- package/reactjs/context/useWeb3App.js +1 -12
- package/reactjs/context/useWeb3App.mjs +7 -8
- package/reactjs/helpers/index.js +1 -6
- package/reactjs/helpers/index.mjs +4 -4
- package/reactjs/helpers/resolveBridgeApiChainId.js +1 -40
- package/reactjs/helpers/resolveBridgeApiChainId.mjs +21 -34
- package/reactjs/hooks/index.js +1 -35
- package/reactjs/hooks/index.mjs +33 -33
- package/reactjs/hooks/tests/useGenericSignMessage.spec.d.ts +1 -0
- package/reactjs/hooks/tests/useGenericSignMessage.spec.js +2 -0
- package/reactjs/hooks/tests/useGenericSignMessage.spec.mjs +52 -0
- package/reactjs/hooks/tests/useSignTransaction.spec.d.ts +1 -0
- package/reactjs/hooks/tests/useSignTransaction.spec.js +2 -0
- package/reactjs/hooks/tests/useSignTransaction.spec.mjs +156 -0
- package/reactjs/hooks/useAccount.js +1 -13
- package/reactjs/hooks/useAccount.mjs +7 -8
- package/reactjs/hooks/useBalances.js +1 -53
- package/reactjs/hooks/useBalances.mjs +28 -40
- package/reactjs/hooks/useBridgeApiChainId.js +1 -13
- package/reactjs/hooks/useBridgeApiChainId.mjs +9 -9
- package/reactjs/hooks/useBridgeFormik.js +1 -162
- package/reactjs/hooks/useBridgeFormik.mjs +110 -150
- package/reactjs/hooks/useDebounce.js +1 -13
- package/reactjs/hooks/useDebounce.mjs +8 -10
- package/reactjs/hooks/useFetchBridgeData.js +1 -45
- package/reactjs/hooks/useFetchBridgeData.mjs +37 -38
- package/reactjs/hooks/useFetchTokens.js +1 -113
- package/reactjs/hooks/useFetchTokens.mjs +80 -106
- package/reactjs/hooks/useGenericSignMessage.js +1 -55
- package/reactjs/hooks/useGenericSignMessage.mjs +47 -47
- package/reactjs/hooks/useGetChainId.js +1 -11
- package/reactjs/hooks/useGetChainId.mjs +7 -8
- package/reactjs/hooks/useResolveTokenChain.js +1 -20
- package/reactjs/hooks/useResolveTokenChain.mjs +11 -14
- package/reactjs/hooks/useSendTransactions.js +1 -25
- package/reactjs/hooks/useSendTransactions.mjs +19 -23
- package/reactjs/hooks/useSignTransaction.js +1 -86
- package/reactjs/hooks/useSignTransaction.mjs +59 -59
- package/reactjs/hooks/useSuiConnect.js +1 -86
- package/reactjs/hooks/useSuiConnect.mjs +52 -70
- package/reactjs/hooks/validation/index.js +1 -10
- package/reactjs/hooks/validation/index.mjs +8 -8
- package/reactjs/hooks/validation/useAmountSchema.js +1 -32
- package/reactjs/hooks/validation/useAmountSchema.mjs +8 -11
- package/reactjs/hooks/validation/useSecondAmountSchema.js +1 -26
- package/reactjs/hooks/validation/useSecondAmountSchema.mjs +5 -6
- package/reactjs/hooks/validation/useTestHasEnoughFunds.js +1 -37
- package/reactjs/hooks/validation/useTestHasEnoughFunds.mjs +20 -29
- package/reactjs/hooks/validation/useTestIsConnected.js +1 -27
- package/reactjs/hooks/validation/useTestIsConnected.mjs +13 -19
- package/reactjs/index.js +1 -190
- package/reactjs/index.mjs +154 -154
- package/reactjs/init/index.js +1 -5
- package/reactjs/init/index.mjs +3 -3
- package/reactjs/init/init.d.ts +1 -0
- package/reactjs/init/init.js +1 -139
- package/reactjs/init/init.mjs +59 -72
- package/reactjs/queries/index.js +1 -17
- package/reactjs/queries/index.mjs +15 -15
- package/reactjs/queries/useCheckAccount.query.js +1 -39
- package/reactjs/queries/useCheckAccount.query.mjs +29 -33
- package/reactjs/queries/useGetAllTokens.query.js +1 -35
- package/reactjs/queries/useGetAllTokens.query.mjs +26 -30
- package/reactjs/queries/useGetChains.query.js +1 -34
- package/reactjs/queries/useGetChains.query.mjs +26 -28
- package/reactjs/queries/useGetHistory.query.d.ts +1 -1
- package/reactjs/queries/useGetHistory.query.js +1 -68
- package/reactjs/queries/useGetHistory.query.mjs +55 -58
- package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +1 -1
- package/reactjs/queries/useGetMvxTokensBalances.query.js +1 -71
- package/reactjs/queries/useGetMvxTokensBalances.query.mjs +40 -53
- package/reactjs/queries/useGetNonMvxTokensBalances.query.d.ts +1 -1
- package/reactjs/queries/useGetNonMvxTokensBalances.query.js +1 -81
- package/reactjs/queries/useGetNonMvxTokensBalances.query.mjs +51 -59
- package/reactjs/queries/useGetRate.mutation.js +1 -18
- package/reactjs/queries/useGetRate.mutation.mjs +12 -15
- package/reactjs/reexports.js +1 -48
- package/reactjs/reexports.mjs +13 -13
- package/reactjs/utils/delay.js +1 -6
- package/reactjs/utils/delay.mjs +3 -3
- package/reactjs/utils/formatAmount.js +1 -23
- package/reactjs/utils/formatAmount.mjs +16 -17
- package/reactjs/utils/getCleanStringAmount.js +1 -11
- package/reactjs/utils/getCleanStringAmount.mjs +6 -8
- package/reactjs/utils/getCompletePathname.js +1 -5
- package/reactjs/utils/getCompletePathname.mjs +3 -3
- package/reactjs/utils/getInitialTokens.js +1 -12
- package/reactjs/utils/getInitialTokens.mjs +6 -7
- package/reactjs/utils/hasEnoughFunds.js +1 -19
- package/reactjs/utils/hasEnoughFunds.mjs +11 -14
- package/reactjs/utils/index.js +1 -26
- package/reactjs/utils/index.mjs +24 -24
- package/reactjs/utils/isStringFloat.js +1 -21
- package/reactjs/utils/isStringFloat.mjs +11 -18
- package/reactjs/utils/mxClsx.js +1 -8
- package/reactjs/utils/mxClsx.mjs +4 -6
- package/reactjs/utils/pipe.js +1 -25
- package/reactjs/utils/pipe.mjs +13 -17
- package/reactjs/utils/removeCommas.js +1 -6
- package/reactjs/utils/removeCommas.mjs +2 -4
- package/reactjs/utils/roundAmount.js +1 -40
- package/reactjs/utils/roundAmount.mjs +16 -36
- package/reactjs/utils/testNumber.js +1 -4
- package/reactjs/utils/testNumber.mjs +2 -2
- package/store/inMemoryStore.js +1 -39
- package/store/inMemoryStore.mjs +17 -21
- package/style.css +1 -2274
- package/types/chainType.js +1 -11
- package/types/chainType.mjs +2 -9
- package/types/errors.d.ts +3 -0
- package/types/errors.js +2 -0
- package/types/errors.mjs +8 -0
- package/types/providerType.js +1 -9
- package/types/providerType.mjs +2 -7
- package/types/transaction.d.ts +2 -0
- package/all-networks-EJIVYZ_i.mjs +0 -4
- package/all-networks-NYACMyeN.js +0 -4
- package/default-BYtXv70Z.mjs +0 -4
- package/default-H3AbmzFV.js +0 -4
- package/reactjs/hooks/useSignTransaction.d.ts +0 -511
|
@@ -1,164 +1,2 @@
|
|
|
1
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 React = 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_constants_index = require("../../../constants/index.js");
|
|
11
|
-
const reactjs_utils_mxClsx = require("../../../utils/mxClsx.js");
|
|
12
|
-
const reactjs_components_base_MxSlideover_MxSlideover = require("../MxSlideover/MxSlideover.js");
|
|
13
|
-
const MxTooltip = ({
|
|
14
|
-
children,
|
|
15
|
-
buttonText,
|
|
16
|
-
hideTooltip,
|
|
17
|
-
offsetX = 0,
|
|
18
|
-
offsetY = 10,
|
|
19
|
-
hideDelayMs = 10,
|
|
20
|
-
placement = "top",
|
|
21
|
-
variant = "default",
|
|
22
|
-
contentClassName = "",
|
|
23
|
-
containerClassName = "",
|
|
24
|
-
shouldStopPropagation = true,
|
|
25
|
-
variantColor = "neutral-500",
|
|
26
|
-
portalId,
|
|
27
|
-
isSlideoverOnMobile = false
|
|
28
|
-
}) => {
|
|
29
|
-
const [isHover, setIsHover] = React.useState(false);
|
|
30
|
-
const [popperEl, setPopperEl] = React.useState(null);
|
|
31
|
-
const [referenceEl, setReferenceEl] = React.useState(null);
|
|
32
|
-
const [showSlideOver, setShowSlideOver] = React.useState(false);
|
|
33
|
-
const isMobile = reactjs_constants_index.safeWindow.innerWidth < 768;
|
|
34
|
-
const { styles, attributes } = reactPopper.usePopper(referenceEl, popperEl, {
|
|
35
|
-
placement,
|
|
36
|
-
modifiers: [
|
|
37
|
-
{
|
|
38
|
-
name: "preventOverflow",
|
|
39
|
-
options: {
|
|
40
|
-
boundary: "clippingParents"
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
// flips the tooltip if it does not fit
|
|
44
|
-
{ name: "eventListeners", enabled: isHover },
|
|
45
|
-
// prevent popper from updating when the tooltip is not shown
|
|
46
|
-
{ name: "offset", options: { offset: [offsetX, offsetY] } }
|
|
47
|
-
]
|
|
48
|
-
});
|
|
49
|
-
const showEvents = ["mouseenter", "focus"];
|
|
50
|
-
const hideEvents = ["mouseleave", "blur"];
|
|
51
|
-
const hideTimeoutRef = React.useRef();
|
|
52
|
-
const show = () => {
|
|
53
|
-
if (hideTimeoutRef.current) {
|
|
54
|
-
clearTimeout(hideTimeoutRef.current);
|
|
55
|
-
}
|
|
56
|
-
setIsHover(true);
|
|
57
|
-
};
|
|
58
|
-
const hide = () => {
|
|
59
|
-
hideTimeoutRef.current = setTimeout(() => {
|
|
60
|
-
setIsHover(false);
|
|
61
|
-
}, hideDelayMs);
|
|
62
|
-
};
|
|
63
|
-
React.useEffect(() => {
|
|
64
|
-
return () => {
|
|
65
|
-
if (hideTimeoutRef.current) {
|
|
66
|
-
clearTimeout(hideTimeoutRef.current);
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
}, []);
|
|
70
|
-
React.useEffect(() => {
|
|
71
|
-
showEvents.forEach((event) => popperEl == null ? void 0 : popperEl.addEventListener(event, show));
|
|
72
|
-
hideEvents.forEach((event) => popperEl == null ? void 0 : popperEl.addEventListener(event, hide));
|
|
73
|
-
return () => {
|
|
74
|
-
showEvents.forEach((event) => popperEl == null ? void 0 : popperEl.removeEventListener(event, show));
|
|
75
|
-
hideEvents.forEach((event) => popperEl == null ? void 0 : popperEl.removeEventListener(event, hide));
|
|
76
|
-
};
|
|
77
|
-
}, [popperEl]);
|
|
78
|
-
React.useEffect(() => {
|
|
79
|
-
showEvents.forEach((event) => referenceEl == null ? void 0 : referenceEl.addEventListener(event, show));
|
|
80
|
-
hideEvents.forEach((event) => referenceEl == null ? void 0 : referenceEl.addEventListener(event, hide));
|
|
81
|
-
return () => {
|
|
82
|
-
showEvents.forEach(
|
|
83
|
-
(event) => referenceEl == null ? void 0 : referenceEl.removeEventListener(event, show)
|
|
84
|
-
);
|
|
85
|
-
hideEvents.forEach(
|
|
86
|
-
(event) => referenceEl == null ? void 0 : referenceEl.removeEventListener(event, hide)
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
}, [referenceEl]);
|
|
90
|
-
const handleOnClick = (e) => {
|
|
91
|
-
if (isSlideoverOnMobile && isMobile) {
|
|
92
|
-
setShowSlideOver(true);
|
|
93
|
-
}
|
|
94
|
-
if (!shouldStopPropagation) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
e.preventDefault();
|
|
98
|
-
e.stopPropagation();
|
|
99
|
-
};
|
|
100
|
-
const portalRoot = portalId ? reactjs_constants_index.safeDocument.getElementById(portalId) : null;
|
|
101
|
-
if (hideTooltip) {
|
|
102
|
-
return buttonText;
|
|
103
|
-
}
|
|
104
|
-
if (isSlideoverOnMobile && isMobile) {
|
|
105
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
106
|
-
reactjs_components_base_MxTooltip_components_TooltipContainer_TooltipContainer.TooltipContainer,
|
|
107
|
-
{
|
|
108
|
-
containerClassName,
|
|
109
|
-
variant,
|
|
110
|
-
variantColor,
|
|
111
|
-
onClick: handleOnClick,
|
|
112
|
-
ref: setReferenceEl,
|
|
113
|
-
children: [
|
|
114
|
-
buttonText,
|
|
115
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
116
|
-
reactjs_components_base_MxSlideover_MxSlideover.MxSlideover,
|
|
117
|
-
{
|
|
118
|
-
onClose: () => setShowSlideOver(false),
|
|
119
|
-
show: showSlideOver,
|
|
120
|
-
children
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
128
|
-
reactjs_components_base_MxTooltip_components_TooltipContainer_TooltipContainer.TooltipContainer,
|
|
129
|
-
{
|
|
130
|
-
containerClassName,
|
|
131
|
-
variant,
|
|
132
|
-
variantColor,
|
|
133
|
-
onClick: handleOnClick,
|
|
134
|
-
ref: setReferenceEl,
|
|
135
|
-
children: [
|
|
136
|
-
buttonText,
|
|
137
|
-
isHover && (portalId ? ReactDOM.createPortal(
|
|
138
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
139
|
-
reactjs_components_base_MxTooltip_components_TooltipContent_TooltipContent.TooltipContent,
|
|
140
|
-
{
|
|
141
|
-
children,
|
|
142
|
-
contentClassName: reactjs_utils_mxClsx.mxClsx("liq-text-center", contentClassName),
|
|
143
|
-
popperAttributes: attributes.popper,
|
|
144
|
-
popperStyles: styles.popper,
|
|
145
|
-
setPopperEl
|
|
146
|
-
}
|
|
147
|
-
),
|
|
148
|
-
portalRoot ?? reactjs_constants_index.safeDocument.body
|
|
149
|
-
// Fixes z-index - overflow issue on tooltips
|
|
150
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
151
|
-
reactjs_components_base_MxTooltip_components_TooltipContent_TooltipContent.TooltipContent,
|
|
152
|
-
{
|
|
153
|
-
children,
|
|
154
|
-
contentClassName,
|
|
155
|
-
popperAttributes: attributes.popper,
|
|
156
|
-
popperStyles: styles.popper,
|
|
157
|
-
setPopperEl
|
|
158
|
-
}
|
|
159
|
-
))
|
|
160
|
-
]
|
|
161
|
-
}
|
|
162
|
-
);
|
|
163
|
-
};
|
|
164
|
-
exports.MxTooltip = MxTooltip;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("react"),W=require("react-dom"),B=require("react-popper"),y=require("./components/TooltipContent/TooltipContent.js"),w=require("./components/TooltipContainer/TooltipContainer.js"),d=require("../../../constants/index.js"),z=require("../../../utils/mxClsx.js"),F=require("../MxSlideover/MxSlideover.js"),G=({children:l,buttonText:f,hideTooltip:P,offsetX:R=0,offsetY:g=10,hideDelayMs:O=10,placement:D="top",variant:m="default",contentClassName:v="",containerClassName:_="",shouldStopPropagation:k=!0,variantColor:h="neutral-500",portalId:p,isSlideoverOnMobile:x=!1})=>{const[T,S]=s.useState(!1),[t,j]=s.useState(null),[o,C]=s.useState(null),[A,b]=s.useState(!1),q=d.safeWindow.innerWidth<768,{styles:E,attributes:L}=B.usePopper(o,t,{placement:D,modifiers:[{name:"preventOverflow",options:{boundary:"clippingParents"}},{name:"eventListeners",enabled:T},{name:"offset",options:{offset:[R,g]}}]}),i=["mouseenter","focus"],c=["mouseleave","blur"],n=s.useRef(),u=()=>{n.current&&clearTimeout(n.current),S(!0)},a=()=>{n.current=setTimeout(()=>{S(!1)},O)};s.useEffect(()=>()=>{n.current&&clearTimeout(n.current)},[]),s.useEffect(()=>(i.forEach(e=>t==null?void 0:t.addEventListener(e,u)),c.forEach(e=>t==null?void 0:t.addEventListener(e,a)),()=>{i.forEach(e=>t==null?void 0:t.removeEventListener(e,u)),c.forEach(e=>t==null?void 0:t.removeEventListener(e,a))}),[t]),s.useEffect(()=>(i.forEach(e=>o==null?void 0:o.addEventListener(e,u)),c.forEach(e=>o==null?void 0:o.addEventListener(e,a)),()=>{i.forEach(e=>o==null?void 0:o.removeEventListener(e,u)),c.forEach(e=>o==null?void 0:o.removeEventListener(e,a))}),[o]);const M=e=>{x&&q&&b(!0),k&&(e.preventDefault(),e.stopPropagation())},H=p?d.safeDocument.getElementById(p):null;return P?f:x&&q?r.jsxs(w.TooltipContainer,{containerClassName:_,variant:m,variantColor:h,onClick:M,ref:C,children:[f,r.jsx(F.MxSlideover,{onClose:()=>b(!1),show:A,children:l})]}):r.jsxs(w.TooltipContainer,{containerClassName:_,variant:m,variantColor:h,onClick:M,ref:C,children:[f,T&&(p?W.createPortal(r.jsx(y.TooltipContent,{children:l,contentClassName:z.mxClsx("liq-text-center",v),popperAttributes:L.popper,popperStyles:E.popper,setPopperEl:j}),H??d.safeDocument.body):r.jsx(y.TooltipContent,{children:l,contentClassName:v,popperAttributes:L.popper,popperStyles:E.popper,setPopperEl:j}))]})};exports.MxTooltip=G;
|
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useRef, useEffect } from "react";
|
|
3
|
-
import
|
|
4
|
-
import { usePopper } from "react-popper";
|
|
5
|
-
import { TooltipContent } from "./components/TooltipContent/TooltipContent.mjs";
|
|
6
|
-
import { TooltipContainer } from "./components/TooltipContainer/TooltipContainer.mjs";
|
|
7
|
-
import { safeWindow, safeDocument } from "../../../constants/index.mjs";
|
|
8
|
-
import { mxClsx } from "../../../utils/mxClsx.mjs";
|
|
9
|
-
import { MxSlideover } from "../MxSlideover/MxSlideover.mjs";
|
|
10
|
-
const
|
|
11
|
-
children,
|
|
12
|
-
buttonText,
|
|
13
|
-
hideTooltip,
|
|
14
|
-
offsetX = 0,
|
|
15
|
-
offsetY = 10,
|
|
16
|
-
hideDelayMs = 10,
|
|
17
|
-
placement = "top",
|
|
18
|
-
variant = "default",
|
|
19
|
-
contentClassName = "",
|
|
20
|
-
containerClassName = "",
|
|
21
|
-
shouldStopPropagation =
|
|
22
|
-
variantColor = "neutral-500",
|
|
23
|
-
portalId,
|
|
24
|
-
isSlideoverOnMobile =
|
|
1
|
+
import { jsxs as O, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useRef as F, useEffect as l } from "react";
|
|
3
|
+
import G from "react-dom";
|
|
4
|
+
import { usePopper as I } from "react-popper";
|
|
5
|
+
import { TooltipContent as g } from "./components/TooltipContent/TooltipContent.mjs";
|
|
6
|
+
import { TooltipContainer as k } from "./components/TooltipContainer/TooltipContainer.mjs";
|
|
7
|
+
import { safeWindow as J, safeDocument as D } from "../../../constants/index.mjs";
|
|
8
|
+
import { mxClsx as K } from "../../../utils/mxClsx.mjs";
|
|
9
|
+
import { MxSlideover as Q } from "../MxSlideover/MxSlideover.mjs";
|
|
10
|
+
const te = ({
|
|
11
|
+
children: m,
|
|
12
|
+
buttonText: a,
|
|
13
|
+
hideTooltip: M,
|
|
14
|
+
offsetX: j = 0,
|
|
15
|
+
offsetY: A = 10,
|
|
16
|
+
hideDelayMs: H = 10,
|
|
17
|
+
placement: W = "top",
|
|
18
|
+
variant: v = "default",
|
|
19
|
+
contentClassName: d = "",
|
|
20
|
+
containerClassName: h = "",
|
|
21
|
+
shouldStopPropagation: q = !0,
|
|
22
|
+
variantColor: L = "neutral-500",
|
|
23
|
+
portalId: c,
|
|
24
|
+
isSlideoverOnMobile: E = !1
|
|
25
25
|
}) => {
|
|
26
|
-
const [
|
|
27
|
-
|
|
28
|
-
const [referenceEl, setReferenceEl] = useState(null);
|
|
29
|
-
const [showSlideOver, setShowSlideOver] = useState(false);
|
|
30
|
-
const isMobile = safeWindow.innerWidth < 768;
|
|
31
|
-
const { styles, attributes } = usePopper(referenceEl, popperEl, {
|
|
32
|
-
placement,
|
|
26
|
+
const [w, x] = u(!1), [t, y] = u(null), [o, S] = u(null), [B, b] = u(!1), C = J.innerWidth < 768, { styles: P, attributes: R } = I(o, t, {
|
|
27
|
+
placement: W,
|
|
33
28
|
modifiers: [
|
|
34
29
|
{
|
|
35
30
|
name: "preventOverflow",
|
|
@@ -38,120 +33,82 @@ const MxTooltip = ({
|
|
|
38
33
|
}
|
|
39
34
|
},
|
|
40
35
|
// flips the tooltip if it does not fit
|
|
41
|
-
{ name: "eventListeners", enabled:
|
|
36
|
+
{ name: "eventListeners", enabled: w },
|
|
42
37
|
// prevent popper from updating when the tooltip is not shown
|
|
43
|
-
{ name: "offset", options: { offset: [
|
|
38
|
+
{ name: "offset", options: { offset: [j, A] } }
|
|
44
39
|
]
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
clearTimeout(hideTimeoutRef.current);
|
|
52
|
-
}
|
|
53
|
-
setIsHover(true);
|
|
54
|
-
};
|
|
55
|
-
const hide = () => {
|
|
56
|
-
hideTimeoutRef.current = setTimeout(() => {
|
|
57
|
-
setIsHover(false);
|
|
58
|
-
}, hideDelayMs);
|
|
40
|
+
}), s = ["mouseenter", "focus"], n = ["mouseleave", "blur"], r = F(), i = () => {
|
|
41
|
+
r.current && clearTimeout(r.current), x(!0);
|
|
42
|
+
}, f = () => {
|
|
43
|
+
r.current = setTimeout(() => {
|
|
44
|
+
x(!1);
|
|
45
|
+
}, H);
|
|
59
46
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
hideEvents.forEach((event) => popperEl == null ? void 0 : popperEl.addEventListener(event, hide));
|
|
70
|
-
return () => {
|
|
71
|
-
showEvents.forEach((event) => popperEl == null ? void 0 : popperEl.removeEventListener(event, show));
|
|
72
|
-
hideEvents.forEach((event) => popperEl == null ? void 0 : popperEl.removeEventListener(event, hide));
|
|
73
|
-
};
|
|
74
|
-
}, [popperEl]);
|
|
75
|
-
useEffect(() => {
|
|
76
|
-
showEvents.forEach((event) => referenceEl == null ? void 0 : referenceEl.addEventListener(event, show));
|
|
77
|
-
hideEvents.forEach((event) => referenceEl == null ? void 0 : referenceEl.addEventListener(event, hide));
|
|
78
|
-
return () => {
|
|
79
|
-
showEvents.forEach(
|
|
80
|
-
(event) => referenceEl == null ? void 0 : referenceEl.removeEventListener(event, show)
|
|
81
|
-
);
|
|
82
|
-
hideEvents.forEach(
|
|
83
|
-
(event) => referenceEl == null ? void 0 : referenceEl.removeEventListener(event, hide)
|
|
84
|
-
);
|
|
85
|
-
};
|
|
86
|
-
}, [referenceEl]);
|
|
87
|
-
const handleOnClick = (e) => {
|
|
88
|
-
if (isSlideoverOnMobile && isMobile) {
|
|
89
|
-
setShowSlideOver(true);
|
|
90
|
-
}
|
|
91
|
-
if (!shouldStopPropagation) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
e.preventDefault();
|
|
95
|
-
e.stopPropagation();
|
|
96
|
-
};
|
|
97
|
-
const portalRoot = portalId ? safeDocument.getElementById(portalId) : null;
|
|
98
|
-
if (hideTooltip) {
|
|
99
|
-
return buttonText;
|
|
100
|
-
}
|
|
101
|
-
if (isSlideoverOnMobile && isMobile) {
|
|
102
|
-
return /* @__PURE__ */ jsxs(
|
|
103
|
-
TooltipContainer,
|
|
104
|
-
{
|
|
105
|
-
containerClassName,
|
|
106
|
-
variant,
|
|
107
|
-
variantColor,
|
|
108
|
-
onClick: handleOnClick,
|
|
109
|
-
ref: setReferenceEl,
|
|
110
|
-
children: [
|
|
111
|
-
buttonText,
|
|
112
|
-
/* @__PURE__ */ jsx(
|
|
113
|
-
MxSlideover,
|
|
114
|
-
{
|
|
115
|
-
onClose: () => setShowSlideOver(false),
|
|
116
|
-
show: showSlideOver,
|
|
117
|
-
children
|
|
118
|
-
}
|
|
119
|
-
)
|
|
120
|
-
]
|
|
121
|
-
}
|
|
47
|
+
l(() => () => {
|
|
48
|
+
r.current && clearTimeout(r.current);
|
|
49
|
+
}, []), l(() => (s.forEach((e) => t == null ? void 0 : t.addEventListener(e, i)), n.forEach((e) => t == null ? void 0 : t.addEventListener(e, f)), () => {
|
|
50
|
+
s.forEach((e) => t == null ? void 0 : t.removeEventListener(e, i)), n.forEach((e) => t == null ? void 0 : t.removeEventListener(e, f));
|
|
51
|
+
}), [t]), l(() => (s.forEach((e) => o == null ? void 0 : o.addEventListener(e, i)), n.forEach((e) => o == null ? void 0 : o.addEventListener(e, f)), () => {
|
|
52
|
+
s.forEach(
|
|
53
|
+
(e) => o == null ? void 0 : o.removeEventListener(e, i)
|
|
54
|
+
), n.forEach(
|
|
55
|
+
(e) => o == null ? void 0 : o.removeEventListener(e, f)
|
|
122
56
|
);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
57
|
+
}), [o]);
|
|
58
|
+
const T = (e) => {
|
|
59
|
+
E && C && b(!0), q && (e.preventDefault(), e.stopPropagation());
|
|
60
|
+
}, z = c ? D.getElementById(c) : null;
|
|
61
|
+
return M ? a : E && C ? /* @__PURE__ */ O(
|
|
62
|
+
k,
|
|
63
|
+
{
|
|
64
|
+
containerClassName: h,
|
|
65
|
+
variant: v,
|
|
66
|
+
variantColor: L,
|
|
67
|
+
onClick: T,
|
|
68
|
+
ref: S,
|
|
69
|
+
children: [
|
|
70
|
+
a,
|
|
71
|
+
/* @__PURE__ */ p(
|
|
72
|
+
Q,
|
|
73
|
+
{
|
|
74
|
+
onClose: () => b(!1),
|
|
75
|
+
show: B,
|
|
76
|
+
children: m
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
) : /* @__PURE__ */ O(
|
|
82
|
+
k,
|
|
126
83
|
{
|
|
127
|
-
containerClassName,
|
|
128
|
-
variant,
|
|
129
|
-
variantColor,
|
|
130
|
-
onClick:
|
|
131
|
-
ref:
|
|
84
|
+
containerClassName: h,
|
|
85
|
+
variant: v,
|
|
86
|
+
variantColor: L,
|
|
87
|
+
onClick: T,
|
|
88
|
+
ref: S,
|
|
132
89
|
children: [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
|
|
90
|
+
a,
|
|
91
|
+
w && (c ? G.createPortal(
|
|
92
|
+
/* @__PURE__ */ p(
|
|
93
|
+
g,
|
|
137
94
|
{
|
|
138
|
-
children,
|
|
139
|
-
contentClassName:
|
|
140
|
-
popperAttributes:
|
|
141
|
-
popperStyles:
|
|
142
|
-
setPopperEl
|
|
95
|
+
children: m,
|
|
96
|
+
contentClassName: K("liq-text-center", d),
|
|
97
|
+
popperAttributes: R.popper,
|
|
98
|
+
popperStyles: P.popper,
|
|
99
|
+
setPopperEl: y
|
|
143
100
|
}
|
|
144
101
|
),
|
|
145
|
-
|
|
102
|
+
z ?? D.body
|
|
146
103
|
// Fixes z-index - overflow issue on tooltips
|
|
147
|
-
) : /* @__PURE__ */
|
|
148
|
-
|
|
104
|
+
) : /* @__PURE__ */ p(
|
|
105
|
+
g,
|
|
149
106
|
{
|
|
150
|
-
children,
|
|
151
|
-
contentClassName,
|
|
152
|
-
popperAttributes:
|
|
153
|
-
popperStyles:
|
|
154
|
-
setPopperEl
|
|
107
|
+
children: m,
|
|
108
|
+
contentClassName: d,
|
|
109
|
+
popperAttributes: R.popper,
|
|
110
|
+
popperStyles: P.popper,
|
|
111
|
+
setPopperEl: y
|
|
155
112
|
}
|
|
156
113
|
))
|
|
157
114
|
]
|
|
@@ -159,5 +116,5 @@ const MxTooltip = ({
|
|
|
159
116
|
);
|
|
160
117
|
};
|
|
161
118
|
export {
|
|
162
|
-
MxTooltip
|
|
119
|
+
te as MxTooltip
|
|
163
120
|
};
|
|
@@ -1,34 +1,2 @@
|
|
|
1
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 React = require("react");
|
|
6
|
-
const reactjs_utils_mxClsx = require("../../../../../utils/mxClsx.js");
|
|
7
|
-
const TooltipContainer = React.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;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),n=require("react"),q=require("../../../../../utils/mxClsx.js"),u=n.forwardRef(({children:i,variant:e,variantColor:r,containerClassName:l,onClick:t},o)=>d.jsx("div",{role:"tooltip",ref:o,onClick:t,className:q.mxClsx("focus-primary liq-relative liq-inline-block liq-max-w-fit liq-rounded-sm",{"":e==="default","liq-border-b liq-underline":e==="underline","liq-border-b liq-border-dashed":e==="dotted"},{"liq-border-neutral-200":r==="neutral-200","liq-border-neutral-500":r==="neutral-500","liq-border-primary-200 liq-text-primary-200":r==="primary-200","liq-border-primary-300 liq-text-primary-300":r==="primary-300","liq-border-primary-400 liq-text-primary-400":r==="primary-400"},l),children:i}));exports.TooltipContainer=u;
|
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { mxClsx } from "../../../../../utils/mxClsx.mjs";
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
);
|
|
30
|
-
});
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { mxClsx as p } from "../../../../../utils/mxClsx.mjs";
|
|
4
|
+
const u = t(({ children: e, variant: i, variantColor: r, containerClassName: l, onClick: m }, d) => /* @__PURE__ */ o(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
role: "tooltip",
|
|
8
|
+
ref: d,
|
|
9
|
+
onClick: m,
|
|
10
|
+
className: p(
|
|
11
|
+
"focus-primary liq-relative liq-inline-block liq-max-w-fit liq-rounded-sm",
|
|
12
|
+
{
|
|
13
|
+
"": i === "default",
|
|
14
|
+
"liq-border-b liq-underline": i === "underline",
|
|
15
|
+
"liq-border-b liq-border-dashed": i === "dotted"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"liq-border-neutral-200": r === "neutral-200",
|
|
19
|
+
"liq-border-neutral-500": r === "neutral-500",
|
|
20
|
+
"liq-border-primary-200 liq-text-primary-200": r === "primary-200",
|
|
21
|
+
"liq-border-primary-300 liq-text-primary-300": r === "primary-300",
|
|
22
|
+
"liq-border-primary-400 liq-text-primary-400": r === "primary-400"
|
|
23
|
+
},
|
|
24
|
+
l
|
|
25
|
+
),
|
|
26
|
+
children: e
|
|
27
|
+
}
|
|
28
|
+
));
|
|
31
29
|
export {
|
|
32
|
-
TooltipContainer
|
|
30
|
+
u as TooltipContainer
|
|
33
31
|
};
|
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const reactjs_components_base_MxTooltip_components_TooltipContainer_TooltipContainer = require("./TooltipContainer.js");
|
|
5
|
-
exports.TooltipContainer = reactjs_components_base_MxTooltip_components_TooltipContainer_TooltipContainer.TooltipContainer;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./TooltipContainer.js");exports.TooltipContainer=o.TooltipContainer;
|
|
@@ -1,28 +1,2 @@
|
|
|
1
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 reactjs_utils_mxClsx = require("../../../../../utils/mxClsx.js");
|
|
6
|
-
const TooltipContent = ({
|
|
7
|
-
children,
|
|
8
|
-
contentClassName,
|
|
9
|
-
popperAttributes,
|
|
10
|
-
popperStyles,
|
|
11
|
-
setPopperEl
|
|
12
|
-
}) => {
|
|
13
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14
|
-
"div",
|
|
15
|
-
{
|
|
16
|
-
role: "tooltip",
|
|
17
|
-
ref: setPopperEl,
|
|
18
|
-
style: popperStyles,
|
|
19
|
-
...popperAttributes,
|
|
20
|
-
className: reactjs_utils_mxClsx.mxClsx(
|
|
21
|
-
"liq-z-20 liq-cursor-default liq-rounded-2xl liq-border liq-border-neutral-750 liq-bg-neutral-850 liq-p-4 liq-text-base liq-text-neutral-200",
|
|
22
|
-
contentClassName
|
|
23
|
-
),
|
|
24
|
-
children
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
exports.TooltipContent = TooltipContent;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("../../../../../utils/mxClsx.js"),s=({children:e,contentClassName:t,popperAttributes:l,popperStyles:r,setPopperEl:i})=>o.jsx("div",{role:"tooltip",ref:i,style:r,...l,className:n.mxClsx("liq-z-20 liq-cursor-default liq-rounded-2xl liq-border liq-border-neutral-750 liq-bg-neutral-850 liq-p-4 liq-text-base liq-text-neutral-200",t),children:e});exports.TooltipContent=s;
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { mxClsx } from "../../../../../utils/mxClsx.mjs";
|
|
3
|
-
const
|
|
4
|
-
children,
|
|
5
|
-
contentClassName,
|
|
6
|
-
popperAttributes,
|
|
7
|
-
popperStyles,
|
|
8
|
-
setPopperEl
|
|
9
|
-
}) =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
);
|
|
24
|
-
};
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { mxClsx as q } from "../../../../../utils/mxClsx.mjs";
|
|
3
|
+
const a = ({
|
|
4
|
+
children: l,
|
|
5
|
+
contentClassName: r,
|
|
6
|
+
popperAttributes: t,
|
|
7
|
+
popperStyles: e,
|
|
8
|
+
setPopperEl: o
|
|
9
|
+
}) => /* @__PURE__ */ i(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
role: "tooltip",
|
|
13
|
+
ref: o,
|
|
14
|
+
style: e,
|
|
15
|
+
...t,
|
|
16
|
+
className: q(
|
|
17
|
+
"liq-z-20 liq-cursor-default liq-rounded-2xl liq-border liq-border-neutral-750 liq-bg-neutral-850 liq-p-4 liq-text-base liq-text-neutral-200",
|
|
18
|
+
r
|
|
19
|
+
),
|
|
20
|
+
children: l
|
|
21
|
+
}
|
|
22
|
+
);
|
|
25
23
|
export {
|
|
26
|
-
TooltipContent
|
|
24
|
+
a as TooltipContent
|
|
27
25
|
};
|
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const reactjs_components_base_MxTooltip_components_TooltipContent_TooltipContent = require("./TooltipContent.js");
|
|
5
|
-
exports.TooltipContent = reactjs_components_base_MxTooltip_components_TooltipContent_TooltipContent.TooltipContent;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./TooltipContent.js");exports.TooltipContent=o.TooltipContent;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const reactjs_components_base_MxTooltip_components_TooltipContent_TooltipContent = require("./TooltipContent/TooltipContent.js");
|
|
5
|
-
const reactjs_components_base_MxTooltip_components_TooltipContainer_TooltipContainer = require("./TooltipContainer/TooltipContainer.js");
|
|
6
|
-
exports.TooltipContent = reactjs_components_base_MxTooltip_components_TooltipContent_TooltipContent.TooltipContent;
|
|
7
|
-
exports.TooltipContainer = reactjs_components_base_MxTooltip_components_TooltipContainer_TooltipContainer.TooltipContainer;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./TooltipContent/TooltipContent.js"),t=require("./TooltipContainer/TooltipContainer.js");exports.TooltipContent=o.TooltipContent;exports.TooltipContainer=t.TooltipContainer;
|