@rabbitio/ui-kit 1.0.0-beta.9 → 1.0.0-beta.91
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/.gitlab-ci.yml +29 -0
- package/.husky/commit-msg +19 -0
- package/.husky/pre-push +1 -0
- package/CHANGELOG.md +0 -0
- package/README.md +27 -18
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/clover.xml +16765 -0
- package/coverage/coverage-final.json +116 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +1001 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/rabbit-ui-kit/index.html +116 -0
- package/coverage/rabbit-ui-kit/index.js.html +88 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/analyticsAdapters/googleAnalyticsAdapter.js.html +148 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/analyticsAdapters/index.html +146 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/analyticsAdapters/metrikaAdapter.js.html +169 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/analyticsAdapters/mixpanelAdapter.js.html +199 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/axiosAdapter.js.html +190 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/index.html +131 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/qrUtils.js.html +139 -0
- package/coverage/rabbit-ui-kit/src/common-apis/external-apis/apiGroups.js.html +250 -0
- package/coverage/rabbit-ui-kit/src/common-apis/external-apis/emailAPI.js.html +133 -0
- package/coverage/rabbit-ui-kit/src/common-apis/external-apis/index.html +146 -0
- package/coverage/rabbit-ui-kit/src/common-apis/external-apis/ipAddressProviders.js.html +352 -0
- package/coverage/rabbit-ui-kit/src/common-apis/globalConstants.jsx.html +94 -0
- package/coverage/rabbit-ui-kit/src/common-apis/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/common-apis/models/blockchain.js.html +115 -0
- package/coverage/rabbit-ui-kit/src/common-apis/models/coin.js.html +829 -0
- package/coverage/rabbit-ui-kit/src/common-apis/models/index.html +146 -0
- package/coverage/rabbit-ui-kit/src/common-apis/models/protocol.js.html +100 -0
- package/coverage/rabbit-ui-kit/src/common-apis/services/fiatCurrenciesService.js.html +544 -0
- package/coverage/rabbit-ui-kit/src/common-apis/services/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/amountUtils.js.html +1162 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/cache.js.html +811 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/errorUtils.js.html +211 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/index.html +191 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/logging/index.html +131 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/logging/logger.js.html +208 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/logging/logsStorage.js.html +268 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/postponeExecution.js.html +118 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/rabbitTicker.js.html +157 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/safeStringify.js.html +235 -0
- package/coverage/rabbit-ui-kit/src/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/index.js.html +376 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/cacheAndConcurrentRequestsResolver.js.html +1570 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/cachedRobustExternalApiCallerService.js.html +526 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/cancelProcessing.js.html +172 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/concurrentCalculationsMetadataHolder.js.html +310 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/externalApiProvider.js.html +553 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/externalServicesStatsCollector.js.html +319 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/index.html +206 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/robustExternalAPICallerService.js.html +997 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/external-apis/exolixSwapProvider.js.html +1825 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/external-apis/index.html +161 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/external-apis/letsExchangeSwapProvider.js.html +1618 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/external-apis/swapProvider.js.html +1819 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +1861 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/baseSwapCreationInfo.js.html +319 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/existingSwap.js.html +514 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/existingSwapWithFiatData.js.html +529 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/index.html +176 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/partner.js.html +166 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/swapProviderCoinInfo.js.html +331 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/services/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/services/publicSwapService.js.html +1555 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/utils/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/utils/swapUtils.js.html +670 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/arrowIcon.jsx.html +124 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/arrowTosca.jsx.html +127 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/arrowWhite.jsx.html +127 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/darkRectangle.jsx.html +106 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/determinedError.jsx.html +439 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/failedValidationIcon.jsx.html +202 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/index.html +281 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/infoIcon.jsx.html +133 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/messageIcon.jsx.html +346 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/noticeQuestionIcon.jsx.html +247 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/successfulValidationIcon.jsx.html +163 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/supportDialogImage.jsx.html +268 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/walletIcon.jsx.html +151 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/AssetIcon/AssetIcon.jsx.html +256 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/AssetIcon/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/AssetSelection/AssetSelection.jsx.html +289 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/AssetSelection/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +187 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/BackgroundTitle/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/InformationMessage/InformationMessage.jsx.html +238 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/InformationMessage/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Input/Input.jsx.html +634 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Input/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/LoadingDots/LoadingDots.jsx.html +196 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/LoadingDots/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/NoticeIcon/NoticeIcon.jsx.html +277 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/NoticeIcon/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/QrCode/QrCode.jsx.html +217 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/QrCode/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/RateSelector/RateSelector.jsx.html +175 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/RateSelector/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/SupportChat/SupportChat.jsx.html +217 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/SupportChat/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Textarea/Textarea.jsx.html +529 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Textarea/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/TitleBox/TitleBox.jsx.html +508 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/TitleBox/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Tooltip/Tooltip.jsx.html +316 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Tooltip/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +313 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/TwoLinesOfText/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Validation/Validation.jsx.html +202 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Validation/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/Button/Button.jsx.html +712 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/Button/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/Close/Close.jsx.html +259 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/Close/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/LinkButton/LinkButton.jsx.html +421 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/LinkButton/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +415 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/RadioButtonWithText/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/AmountInput/AmountInput.jsx.html +1429 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/AmountInput/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/CoinPicker/CoinPicker.jsx.html +1474 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/CoinPicker/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/ColoredNotice/ColoredNotice.jsx.html +211 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/ColoredNotice/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +190 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/LineWithIconLink/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/LogoCarousel/LogoCarousel.jsx.html +307 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/LogoCarousel/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/SearchableCoinsList/SearchableCoinsList.jsx.html +496 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/SearchableCoinsList/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +181 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/TitledLineWithIconLink/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +283 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/CoinPickerDialogStep/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/Dialog/Dialog.jsx.html +1567 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +481 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/Dialog/DialogButtons/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +1747 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/Dialog/DialogStep/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/Dialog/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx.html +4207 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/SwapForm/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/WaitlistSubscription/WaitlistSubscription.jsx.html +559 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/WaitlistSubscription/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +316 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/templates/DeterminedErrorDialogStep/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/hooks/index.html +146 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/hooks/useCallHandlingErrors.js.html +151 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/hooks/useIsHydrated.js.html +121 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/hooks/useReferredState.js.html +157 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/utils/index.html +161 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/utils/inputValueProviders.js.html +235 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/utils/textUtils.js.html +139 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/utils/uiUtils.js.html +121 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/utils/urlQueryUtils.js.html +271 -0
- package/coverage/rabbit-ui-kit/stories/atoms/BackgroundTitle.stories.jsx.html +202 -0
- package/coverage/rabbit-ui-kit/stories/atoms/LinesOfText.stories.jsx.html +283 -0
- package/coverage/rabbit-ui-kit/stories/atoms/LoadingDots.stories.jsx.html +226 -0
- package/coverage/rabbit-ui-kit/stories/atoms/QrCode.stories.jsx.html +175 -0
- package/coverage/rabbit-ui-kit/stories/atoms/RateSelector.stories.jsx.html +136 -0
- package/coverage/rabbit-ui-kit/stories/atoms/Validation.stories.jsx.html +178 -0
- package/coverage/rabbit-ui-kit/stories/atoms/buttons/Button.stories.jsx.html +883 -0
- package/coverage/rabbit-ui-kit/stories/atoms/buttons/Close.stories.jsx.html +211 -0
- package/coverage/rabbit-ui-kit/stories/atoms/buttons/LinkButton.stories.jsx.html +301 -0
- package/coverage/rabbit-ui-kit/stories/atoms/buttons/index.html +146 -0
- package/coverage/rabbit-ui-kit/stories/atoms/index.html +191 -0
- package/coverage/rabbit-ui-kit/stories/molecules/AmountInput.stories.jsx.html +289 -0
- package/coverage/rabbit-ui-kit/stories/molecules/CoinPicker.stories.jsx.html +322 -0
- package/coverage/rabbit-ui-kit/stories/molecules/ColoredNotice.stories.jsx.html +178 -0
- package/coverage/rabbit-ui-kit/stories/molecules/LineWithIconLink.stories.jsx.html +154 -0
- package/coverage/rabbit-ui-kit/stories/molecules/LogoCarousel.stories.jsx.html +235 -0
- package/coverage/rabbit-ui-kit/stories/molecules/TitledLineWithIconLink.stories.jsx.html +160 -0
- package/coverage/rabbit-ui-kit/stories/molecules/index.html +191 -0
- package/coverage/rabbit-ui-kit/stories/organisms/Dialog/Dialog.stories.jsx.html +523 -0
- package/coverage/rabbit-ui-kit/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +328 -0
- package/coverage/rabbit-ui-kit/stories/organisms/Dialog/DialogButtons/index.html +116 -0
- package/coverage/rabbit-ui-kit/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx.html +337 -0
- package/coverage/rabbit-ui-kit/stories/organisms/Dialog/DialogStep/index.html +116 -0
- package/coverage/rabbit-ui-kit/stories/organisms/Dialog/index.html +116 -0
- package/coverage/rabbit-ui-kit/stories/organisms/WaitlistSubscription.stories.jsx.html +151 -0
- package/coverage/rabbit-ui-kit/stories/organisms/index.html +116 -0
- package/coverage/rabbit-ui-kit/stories/stubs/coins.jsx.html +6880 -0
- package/coverage/rabbit-ui-kit/stories/stubs/exampleContent.jsx.html +145 -0
- package/coverage/rabbit-ui-kit/stories/stubs/index.html +131 -0
- package/coverage/rabbit-ui-kit/stories/templates/DeterminedErrorDialogStep.stories.jsx.html +190 -0
- package/coverage/rabbit-ui-kit/stories/templates/index.html +116 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/dist/global.css +197 -0
- package/dist/global.css.map +1 -0
- package/dist/index.cjs +12451 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +2339 -8491
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +9597 -26
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +12357 -27
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +12442 -29
- package/dist/index.umd.js.map +1 -1
- package/package.json +35 -9
- package/raw +1000 -0
- package/src/common-apis/adapters/analyticsAdapters/googleAnalyticsAdapter.js +21 -0
- package/src/common-apis/adapters/analyticsAdapters/metrikaAdapter.js +28 -0
- package/src/common-apis/adapters/analyticsAdapters/mixpanelAdapter.js +38 -0
- package/src/common-apis/adapters/axiosAdapter.js +35 -0
- package/src/common-apis/adapters/qrUtils.js +18 -0
- package/src/common-apis/external-apis/apiGroups.js +55 -0
- package/src/common-apis/external-apis/emailAPI.js +16 -0
- package/src/common-apis/external-apis/ipAddressProviders.js +89 -0
- package/src/common-apis/globalConstants.jsx +3 -0
- package/src/common-apis/models/blockchain.js +10 -0
- package/src/common-apis/models/coin.js +248 -0
- package/src/common-apis/models/protocol.js +5 -0
- package/src/{common → common-apis/services}/fiatCurrenciesService.js +4 -12
- package/src/common-apis/tests/integration/external-apis/ipAddressProviders/getClientIpAddress.test.js +12 -0
- package/src/common-apis/tests/units/utils/amountUtils/composeRateText.test.js +152 -0
- package/src/{common → common-apis/utils}/amountUtils.js +72 -136
- package/src/common-apis/utils/cache.js +242 -0
- package/src/{common → common-apis/utils}/errorUtils.js +15 -0
- package/src/common-apis/utils/logging/logger.js +41 -0
- package/src/common-apis/utils/logging/logsStorage.js +61 -0
- package/src/common-apis/utils/postponeExecution.js +11 -0
- package/src/common-apis/utils/rabbitTicker.js +24 -0
- package/src/common-apis/utils/safeStringify.js +50 -0
- package/src/index.js +96 -9
- package/src/robust-api-caller/cacheAndConcurrentRequestsResolver.js +495 -0
- package/src/robust-api-caller/cachedRobustExternalApiCallerService.js +147 -0
- package/src/robust-api-caller/cancelProcessing.js +29 -0
- package/src/robust-api-caller/concurrentCalculationsMetadataHolder.js +75 -0
- package/src/robust-api-caller/externalApiProvider.js +156 -0
- package/src/robust-api-caller/externalServicesStatsCollector.js +78 -0
- package/src/robust-api-caller/robustExternalAPICallerService.js +304 -0
- package/src/robust-api-caller/tests/robustExternalAPICallerService/robustExternalAPICallerService/callExternalAPI/_performCallAttempt.test.js +533 -0
- package/src/robust-api-caller/tests/robustExternalAPICallerService/robustExternalAPICallerService/callExternalAPI/callExternalAPI.test.js +532 -0
- package/src/robust-api-caller/tests/robustExternalAPICallerService/robustExternalAPICallerService/constructor.test.js +19 -0
- package/src/swaps-lib/external-apis/exolixSwapProvider.js +580 -0
- package/src/swaps-lib/external-apis/letsExchangeSwapProvider.js +511 -0
- package/src/swaps-lib/external-apis/swapProvider.js +578 -0
- package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +592 -0
- package/src/swaps-lib/models/baseSwapCreationInfo.js +78 -0
- package/src/swaps-lib/models/existingSwap.js +143 -0
- package/src/swaps-lib/models/existingSwapWithFiatData.js +148 -0
- package/src/swaps-lib/models/partner.js +27 -0
- package/src/swaps-lib/models/swapProviderCoinInfo.js +82 -0
- package/src/swaps-lib/services/publicSwapService.js +490 -0
- package/src/swaps-lib/test/external-apis/exolixSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +34 -0
- package/src/swaps-lib/test/external-apis/exolixSwapProvider/createSwap.test.js +1043 -0
- package/src/swaps-lib/test/external-apis/exolixSwapProvider/getSwapInfo.test.js +611 -0
- package/src/swaps-lib/test/external-apis/swapProvider/getAllSupportedCurrencies.test.js +63 -0
- package/src/swaps-lib/test/external-apis/swapProvider/getDepositCurrencies.test.js +73 -0
- package/src/swaps-lib/test/external-apis/swapProvider/getWithdrawalCurrencies.test.js +102 -0
- package/src/swaps-lib/test/external-apis/swapProvider/removeProtocolNameFromCoinName.test.js +152 -0
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +536 -0
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/createSwap.test.js +1214 -0
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getSwapInfo.test.js +1707 -0
- package/src/swaps-lib/test/utils/swapUtils/safeHandleRequestsLimitExceeding.test.js +80 -0
- package/src/swaps-lib/utils/swapUtils.js +195 -0
- package/{styles → src/ui-kit/assets/styles}/_functions.scss +5 -0
- package/{styles → src/ui-kit/assets/styles}/_mixins.scss +2 -2
- package/{styles → src/ui-kit/assets/styles}/_placeholder.scss +3 -3
- package/{styles → src/ui-kit/assets/styles}/_variables.scss +17 -15
- package/src/ui-kit/assets/styles/fonts/NunitoSans-Bold.ttf +0 -0
- package/src/ui-kit/assets/styles/fonts/NunitoSans-ExtraBold.ttf +0 -0
- package/src/ui-kit/assets/styles/fonts/NunitoSans-Light.ttf +0 -0
- package/src/ui-kit/assets/styles/fonts/NunitoSans-Regular.ttf +0 -0
- package/src/ui-kit/assets/styles/fonts/NunitoSans-SemiBold.ttf +0 -0
- package/src/ui-kit/assets/styles/global.scss +171 -0
- package/src/ui-kit/assets/styles/index.scss +10 -0
- package/src/ui-kit/assets/wrappedImages/arrowIcon.jsx +13 -0
- package/src/ui-kit/assets/wrappedImages/arrowTosca.jsx +14 -0
- package/src/ui-kit/assets/wrappedImages/arrowWhite.jsx +14 -0
- package/src/ui-kit/assets/wrappedImages/darkRectangle.jsx +7 -0
- package/src/ui-kit/assets/wrappedImages/determinedError.jsx +118 -0
- package/src/ui-kit/assets/wrappedImages/failedValidationIcon.jsx +39 -0
- package/src/ui-kit/assets/wrappedImages/infoIcon.jsx +16 -0
- package/src/ui-kit/assets/wrappedImages/messageIcon.jsx +87 -0
- package/src/ui-kit/assets/wrappedImages/noticeQuestionIcon.jsx +54 -0
- package/src/ui-kit/assets/wrappedImages/successfulValidationIcon.jsx +26 -0
- package/src/ui-kit/assets/wrappedImages/supportDialogImage.jsx +61 -0
- package/src/ui-kit/assets/wrappedImages/walletIcon.jsx +22 -0
- package/src/ui-kit/components/atoms/AssetIcon/AssetIcon.jsx +57 -0
- package/src/{components → ui-kit/components}/atoms/AssetIcon/asset-icon.module.scss +1 -1
- package/src/ui-kit/components/atoms/AssetSelection/AssetSelection.jsx +68 -0
- package/src/ui-kit/components/atoms/AssetSelection/asset-selection.module.scss +56 -0
- package/src/ui-kit/components/atoms/BackgroundTitle/BackgroundTitle.jsx +34 -0
- package/src/ui-kit/components/atoms/BackgroundTitle/background-title.module.scss +52 -0
- package/src/ui-kit/components/atoms/InformationMessage/InformationMessage.jsx +51 -0
- package/src/ui-kit/components/atoms/InformationMessage/information-message.module.scss +38 -0
- package/src/ui-kit/components/atoms/Input/Input.jsx +183 -0
- package/src/ui-kit/components/atoms/Input/input.module.scss +107 -0
- package/src/{components → ui-kit/components}/atoms/LoadingDots/LoadingDots.jsx +8 -28
- package/src/{components → ui-kit/components}/atoms/LoadingDots/LoadingDots.module.scss +3 -2
- package/src/ui-kit/components/atoms/NoticeIcon/NoticeIcon.jsx +64 -0
- package/src/ui-kit/components/atoms/NoticeIcon/notice-icon.module.scss +14 -0
- package/src/ui-kit/components/atoms/QrCode/QrCode.jsx +44 -0
- package/src/ui-kit/components/atoms/QrCode/qr-code.module.scss +15 -0
- package/src/ui-kit/components/atoms/RateSelector/RateSelector.jsx +30 -0
- package/src/ui-kit/components/atoms/RateSelector/rate-selector.module.scss +47 -0
- package/src/{components → ui-kit/components}/atoms/SupportChat/SupportChat.jsx +5 -1
- package/src/ui-kit/components/atoms/Textarea/Textarea.jsx +148 -0
- package/src/ui-kit/components/atoms/Textarea/textarea.module.scss +71 -0
- package/src/ui-kit/components/atoms/TitleBox/TitleBox.jsx +141 -0
- package/src/ui-kit/components/atoms/TitleBox/title-box.module.scss +32 -0
- package/src/ui-kit/components/atoms/Tooltip/Tooltip.jsx +77 -0
- package/src/ui-kit/components/atoms/Tooltip/tooltip.module.scss +237 -0
- package/src/ui-kit/components/atoms/TwoLinesOfText/LinesOfText.jsx +76 -0
- package/src/ui-kit/components/atoms/TwoLinesOfText/lines-of-text.module.scss +65 -0
- package/src/ui-kit/components/atoms/Validation/Validation.jsx +39 -0
- package/src/ui-kit/components/atoms/Validation/validation.module.scss +19 -0
- package/src/{components → ui-kit/components}/atoms/buttons/Button/Button.jsx +24 -50
- package/src/{components → ui-kit/components}/atoms/buttons/Button/Button.module.scss +1 -1
- package/src/ui-kit/components/atoms/buttons/Close/Close.jsx +58 -0
- package/src/ui-kit/components/atoms/buttons/Close/close.module.scss +75 -0
- package/src/ui-kit/components/atoms/buttons/LinkButton/LinkButton.jsx +112 -0
- package/src/ui-kit/components/atoms/buttons/LinkButton/link-button.module.scss +49 -0
- package/src/ui-kit/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx +110 -0
- package/src/ui-kit/components/atoms/buttons/RadioButtonWithText/radio-button-with-text.module.scss +86 -0
- package/src/ui-kit/components/molecules/AmountInput/AmountInput.jsx +448 -0
- package/src/ui-kit/components/molecules/AmountInput/amount-input.module.scss +233 -0
- package/src/ui-kit/components/molecules/CoinPicker/CoinPicker.jsx +463 -0
- package/src/ui-kit/components/molecules/CoinPicker/coin-picker.module.scss +207 -0
- package/src/ui-kit/components/molecules/ColoredNotice/ColoredNotice.jsx +42 -0
- package/src/ui-kit/components/molecules/ColoredNotice/colored-notice.module.scss +20 -0
- package/src/ui-kit/components/molecules/LineWithIconLink/LineWithIconLink.jsx +35 -0
- package/src/ui-kit/components/molecules/LineWithIconLink/line-with-icon-link.module.scss +25 -0
- package/src/ui-kit/components/molecules/LogoCarousel/LogoCarousel.jsx +74 -0
- package/src/ui-kit/components/molecules/LogoCarousel/logo-carousel.module.scss +106 -0
- package/src/ui-kit/components/molecules/SearchableCoinsList/SearchableCoinsList.jsx +137 -0
- package/src/ui-kit/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx +32 -0
- package/src/ui-kit/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx +66 -0
- package/src/ui-kit/components/organisms/Dialog/Dialog.jsx +494 -0
- package/src/ui-kit/components/organisms/Dialog/DialogButtons/DialogButtons.jsx +132 -0
- package/src/ui-kit/components/organisms/Dialog/DialogButtons/dialog-buttons.module.scss +25 -0
- package/src/ui-kit/components/organisms/Dialog/DialogStep/DialogStep.jsx +554 -0
- package/src/ui-kit/components/organisms/Dialog/DialogStep/dialog-step.module.scss +381 -0
- package/src/ui-kit/components/organisms/Dialog/dialog.module.scss +226 -0
- package/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx +1374 -0
- package/src/ui-kit/components/organisms/SwapForm/swap-form.module.scss +134 -0
- package/src/ui-kit/components/organisms/WaitlistSubscription/WaitlistSubscription.jsx +158 -0
- package/src/ui-kit/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx +77 -0
- package/src/ui-kit/hooks/useCallHandlingErrors.js +22 -0
- package/src/ui-kit/hooks/useIsHydrated.js +12 -0
- package/src/ui-kit/hooks/useReferredState.js +24 -0
- package/src/ui-kit/tests/utils/inputValueProviders/provideFormatOfFloatValueByInputString.test.js +146 -0
- package/src/ui-kit/tests/utils/urlQueryUtils/getQueryParameterValues.test.js +65 -0
- package/src/ui-kit/tests/utils/urlQueryUtils/saveQueryParameterAndValues.test.js +104 -0
- package/src/ui-kit/utils/inputValueProviders.js +50 -0
- package/src/ui-kit/utils/textUtils.js +18 -0
- package/src/ui-kit/utils/uiUtils.js +12 -0
- package/src/ui-kit/utils/urlQueryUtils.js +62 -0
- package/stories/font.scss +40 -0
- package/stories/stubs/coins.jsx +2266 -0
- package/stories/stubs/exampleContent.jsx +20 -0
- package/src/components/atoms/AssetIcon/AssetIcon.jsx +0 -55
- package/styles/_global-classes.scss +0 -433
- package/styles/fonts/NunitoSans-Bold.ttf +0 -0
- package/styles/fonts/NunitoSans-ExtraBold.ttf +0 -0
- package/styles/fonts/NunitoSans-Light.ttf +0 -0
- package/styles/fonts/NunitoSans-Regular.ttf +0 -0
- package/styles/fonts/NunitoSans-SemiBold.ttf +0 -0
- package/styles/global-styles-index.scss +0 -74
- package/styles/index.scss +0 -33
- /package/{styles → src/ui-kit/assets/styles}/colors/_light-colors.scss +0 -0
- /package/{styles → src/ui-kit/assets/styles}/colors/_solid-colors.scss +0 -0
- /package/{styles → src/ui-kit/assets/styles}/size/_margin-size.scss +0 -0
- /package/{styles → src/ui-kit/assets/styles}/size/_padding-size.scss +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
// Originally: determined-error.svg
|
|
4
|
+
export default () => (
|
|
5
|
+
<svg
|
|
6
|
+
id="Group_5"
|
|
7
|
+
data-name="Group 5"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
width="173"
|
|
10
|
+
height="173"
|
|
11
|
+
viewBox="0 0 173 173"
|
|
12
|
+
>
|
|
13
|
+
<defs>
|
|
14
|
+
<clipPath id="clip-path">
|
|
15
|
+
<circle id="Oval" cx="86.5" cy="86.5" r="86.5" fill="#ffa799" />
|
|
16
|
+
</clipPath>
|
|
17
|
+
</defs>
|
|
18
|
+
<g id="Group_2" data-name="Group 2">
|
|
19
|
+
<circle id="Oval-2" data-name="Oval" cx="86.5" cy="86.5" r="86.5" fill="#ffa799" />
|
|
20
|
+
<g id="Group_2-2" data-name="Group 2" clip-path="url(#clip-path)">
|
|
21
|
+
<g id="Group_232" data-name="Group 232" transform="translate(-5 -4)">
|
|
22
|
+
<rect
|
|
23
|
+
id="Rectangle"
|
|
24
|
+
width="30"
|
|
25
|
+
height="172"
|
|
26
|
+
transform="translate(122.205 0.582) rotate(45)"
|
|
27
|
+
fill="#fff"
|
|
28
|
+
opacity="0.3"
|
|
29
|
+
/>
|
|
30
|
+
<rect
|
|
31
|
+
id="Rectangle-2"
|
|
32
|
+
data-name="Rectangle"
|
|
33
|
+
width="30"
|
|
34
|
+
height="172"
|
|
35
|
+
transform="translate(161.205 36.582) rotate(45)"
|
|
36
|
+
fill="#fff"
|
|
37
|
+
opacity="0.3"
|
|
38
|
+
/>
|
|
39
|
+
<path
|
|
40
|
+
id="Rectangle-3"
|
|
41
|
+
data-name="Rectangle"
|
|
42
|
+
d="M12,0H146a0,0,0,0,1,0,0V128a0,0,0,0,1,0,0H0a0,0,0,0,1,0,0V12A12,12,0,0,1,12,0Z"
|
|
43
|
+
transform="translate(34 53)"
|
|
44
|
+
fill="#f18573"
|
|
45
|
+
/>
|
|
46
|
+
<path
|
|
47
|
+
id="Rectangle-4"
|
|
48
|
+
data-name="Rectangle"
|
|
49
|
+
d="M4,0H97a4,4,0,0,1,4,4V92a0,0,0,0,1,0,0H0a0,0,0,0,1,0,0V4A4,4,0,0,1,4,0Z"
|
|
50
|
+
transform="translate(43 91)"
|
|
51
|
+
fill="#e95d44"
|
|
52
|
+
opacity="0.5"
|
|
53
|
+
/>
|
|
54
|
+
<path
|
|
55
|
+
id="Rectangle-5"
|
|
56
|
+
data-name="Rectangle"
|
|
57
|
+
d="M12,0H146a0,0,0,0,1,0,0V28a0,0,0,0,1,0,0H0a0,0,0,0,1,0,0V12A12,12,0,0,1,12,0Z"
|
|
58
|
+
transform="translate(34 53)"
|
|
59
|
+
fill="#eb5e49"
|
|
60
|
+
/>
|
|
61
|
+
<circle
|
|
62
|
+
id="Oval-3"
|
|
63
|
+
data-name="Oval"
|
|
64
|
+
cx="4"
|
|
65
|
+
cy="4"
|
|
66
|
+
r="4"
|
|
67
|
+
transform="translate(44 63)"
|
|
68
|
+
fill="#ffa191"
|
|
69
|
+
/>
|
|
70
|
+
<circle
|
|
71
|
+
id="Oval-4"
|
|
72
|
+
data-name="Oval"
|
|
73
|
+
cx="4"
|
|
74
|
+
cy="4"
|
|
75
|
+
r="4"
|
|
76
|
+
transform="translate(57 63)"
|
|
77
|
+
fill="#ffa191"
|
|
78
|
+
/>
|
|
79
|
+
<circle
|
|
80
|
+
id="Oval-5"
|
|
81
|
+
data-name="Oval"
|
|
82
|
+
cx="4"
|
|
83
|
+
cy="4"
|
|
84
|
+
r="4"
|
|
85
|
+
transform="translate(70 63)"
|
|
86
|
+
fill="#ffa191"
|
|
87
|
+
/>
|
|
88
|
+
</g>
|
|
89
|
+
</g>
|
|
90
|
+
</g>
|
|
91
|
+
<g id="Group_3" data-name="Group 3" transform="translate(63 105)">
|
|
92
|
+
<g id="Group_4" data-name="Group 4">
|
|
93
|
+
<path
|
|
94
|
+
id="Path"
|
|
95
|
+
d="M24.75,0A24.745,24.745,0,1,0,39.078,4.567"
|
|
96
|
+
fill="none"
|
|
97
|
+
stroke="#fff"
|
|
98
|
+
stroke-linecap="round"
|
|
99
|
+
stroke-miterlimit="10"
|
|
100
|
+
stroke-width="3.6"
|
|
101
|
+
/>
|
|
102
|
+
<text
|
|
103
|
+
id="_"
|
|
104
|
+
data-name="!"
|
|
105
|
+
transform="translate(25.2 38.8)"
|
|
106
|
+
fill="#fff"
|
|
107
|
+
font-size="34.2"
|
|
108
|
+
font-family="SegoeUI, Segoe UI"
|
|
109
|
+
letter-spacing="0.023em"
|
|
110
|
+
>
|
|
111
|
+
<tspan x="-4.859" y="0">
|
|
112
|
+
!
|
|
113
|
+
</tspan>
|
|
114
|
+
</text>
|
|
115
|
+
</g>
|
|
116
|
+
</g>
|
|
117
|
+
</svg>
|
|
118
|
+
);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export default () => (
|
|
4
|
+
<svg width="27" height="27" viewBox="0 0 27 27" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<rect opacity="0.8" x="1.5" y="1.5" width="24" height="24" rx="12" fill="#DAF1FE" />
|
|
6
|
+
<path
|
|
7
|
+
d="M12.3259 10.5855C12.2575 9.8896 12.8063 9.28745 13.5055 9.29121C14.2008 9.29495 14.7418 9.8964 14.6722 10.5881L14.1937 15.3431C14.1575 15.7026 13.855 15.9762 13.4937 15.9762C13.1319 15.9762 12.829 15.7017 12.7936 15.3415L12.3259 10.5855Z"
|
|
8
|
+
fill="url(#paint0_linear)"
|
|
9
|
+
/>
|
|
10
|
+
<path
|
|
11
|
+
d="M13.514 17.1182C14.1325 17.1182 14.634 17.6196 14.634 18.2382C14.634 18.8567 14.1325 19.3582 13.514 19.3582H13.486C12.8674 19.3582 12.366 18.8567 12.366 18.2382C12.366 17.6196 12.8674 17.1182 13.486 17.1182H13.514Z"
|
|
12
|
+
fill="url(#paint1_linear)"
|
|
13
|
+
/>
|
|
14
|
+
<defs>
|
|
15
|
+
<linearGradient
|
|
16
|
+
id="paint0_linear"
|
|
17
|
+
x1="17.3456"
|
|
18
|
+
y1="14.0483"
|
|
19
|
+
x2="11.6522"
|
|
20
|
+
y2="12.8896"
|
|
21
|
+
gradientUnits="userSpaceOnUse"
|
|
22
|
+
>
|
|
23
|
+
<stop stop-color="#55E7D9" />
|
|
24
|
+
<stop offset="1" stop-color="#54B4FF" />
|
|
25
|
+
</linearGradient>
|
|
26
|
+
<linearGradient
|
|
27
|
+
id="paint1_linear"
|
|
28
|
+
x1="17.3456"
|
|
29
|
+
y1="14.2383"
|
|
30
|
+
x2="11.6522"
|
|
31
|
+
y2="13.0796"
|
|
32
|
+
gradientUnits="userSpaceOnUse"
|
|
33
|
+
>
|
|
34
|
+
<stop stop-color="#55E7D9" />
|
|
35
|
+
<stop offset="1" stop-color="#54B4FF" />
|
|
36
|
+
</linearGradient>
|
|
37
|
+
</defs>
|
|
38
|
+
</svg>
|
|
39
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export default () => (
|
|
4
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<path
|
|
6
|
+
fill-rule="evenodd"
|
|
7
|
+
clip-rule="evenodd"
|
|
8
|
+
d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z"
|
|
9
|
+
fill="#8C9CBF"
|
|
10
|
+
/>
|
|
11
|
+
<path
|
|
12
|
+
d="M11.6001 9.65598H13.6001V17.48H11.6001V9.65598ZM13.6961 6.02398V7.99198H11.4881V6.02398H13.6961Z"
|
|
13
|
+
fill="white"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
16
|
+
);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export default () => (
|
|
4
|
+
<svg width="130" height="130" viewBox="0 0 130 130" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<path
|
|
6
|
+
fill-rule="evenodd"
|
|
7
|
+
clip-rule="evenodd"
|
|
8
|
+
d="M65 130C100.899 130 130 100.899 130 65C130 29.1015 100.899 0 65 0C29.1015 0 0 29.1015 0 65C0 100.899 29.1015 130 65 130Z"
|
|
9
|
+
fill="#2294F0"
|
|
10
|
+
/>
|
|
11
|
+
<mask id="mask0" style={{ maskType: "alpha" }} maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="130">
|
|
12
|
+
<path
|
|
13
|
+
fill-rule="evenodd"
|
|
14
|
+
clip-rule="evenodd"
|
|
15
|
+
d="M65 130C100.899 130 130 100.899 130 65C130 29.1015 100.899 0 65 0C29.1015 0 0 29.1015 0 65C0 100.899 29.1015 130 65 130Z"
|
|
16
|
+
fill="white"
|
|
17
|
+
/>
|
|
18
|
+
</mask>
|
|
19
|
+
<g mask="url(#mask0)">
|
|
20
|
+
<rect
|
|
21
|
+
opacity="0.3"
|
|
22
|
+
x="3.25"
|
|
23
|
+
y="150.776"
|
|
24
|
+
width="227.136"
|
|
25
|
+
height="25.2373"
|
|
26
|
+
transform="rotate(-45 3.25 150.776)"
|
|
27
|
+
fill="white"
|
|
28
|
+
/>
|
|
29
|
+
<rect
|
|
30
|
+
opacity="0.3"
|
|
31
|
+
x="-48.4546"
|
|
32
|
+
y="126.52"
|
|
33
|
+
width="227.136"
|
|
34
|
+
height="25.2373"
|
|
35
|
+
transform="rotate(-45 -48.4546 126.52)"
|
|
36
|
+
fill="white"
|
|
37
|
+
/>
|
|
38
|
+
<rect x="27.75" y="29.5" width="74.5" height="81.5" rx="12" fill="white" />
|
|
39
|
+
<path
|
|
40
|
+
d="M27.75 41.5C27.75 34.8726 33.1226 29.5 39.75 29.5H90.25C96.8774 29.5 102.25 34.8726 102.25 41.5V118C102.25 124.627 96.8774 130 90.25 130H39.75C33.1226 130 27.75 124.627 27.75 118V41.5Z"
|
|
41
|
+
fill="white"
|
|
42
|
+
/>
|
|
43
|
+
<path
|
|
44
|
+
fill-rule="evenodd"
|
|
45
|
+
clip-rule="evenodd"
|
|
46
|
+
d="M51.5 63.5C58.1274 63.5 63.5 58.1274 63.5 51.5C63.5 44.8726 58.1274 39.5 51.5 39.5C44.8726 39.5 39.5 44.8726 39.5 51.5C39.5 58.1274 44.8726 63.5 51.5 63.5Z"
|
|
47
|
+
fill="#2294F0"
|
|
48
|
+
/>
|
|
49
|
+
<path
|
|
50
|
+
d="M50.072 49.088H52.03V54.5H50.072V49.088ZM52.074 46.382V48.153H50.028V46.382H52.074Z"
|
|
51
|
+
fill="white"
|
|
52
|
+
/>
|
|
53
|
+
<path
|
|
54
|
+
opacity="0.2"
|
|
55
|
+
d="M41 74.5H63"
|
|
56
|
+
stroke="#2294F0"
|
|
57
|
+
stroke-width="4"
|
|
58
|
+
stroke-linecap="round"
|
|
59
|
+
stroke-linejoin="round"
|
|
60
|
+
/>
|
|
61
|
+
<path
|
|
62
|
+
opacity="0.2"
|
|
63
|
+
d="M41 84.6157H84.1426"
|
|
64
|
+
stroke="#2294F0"
|
|
65
|
+
stroke-width="4"
|
|
66
|
+
stroke-linecap="round"
|
|
67
|
+
stroke-linejoin="round"
|
|
68
|
+
/>
|
|
69
|
+
<path
|
|
70
|
+
opacity="0.2"
|
|
71
|
+
d="M41 94.7314H84.1426"
|
|
72
|
+
stroke="#2294F0"
|
|
73
|
+
stroke-width="4"
|
|
74
|
+
stroke-linecap="round"
|
|
75
|
+
stroke-linejoin="round"
|
|
76
|
+
/>
|
|
77
|
+
<path
|
|
78
|
+
opacity="0.2"
|
|
79
|
+
d="M41 104.731H84.1426"
|
|
80
|
+
stroke="#2294F0"
|
|
81
|
+
stroke-width="4"
|
|
82
|
+
stroke-linecap="round"
|
|
83
|
+
stroke-linejoin="round"
|
|
84
|
+
/>
|
|
85
|
+
</g>
|
|
86
|
+
</svg>
|
|
87
|
+
);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export default () => (
|
|
4
|
+
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<rect x="0.5" y="0.25" width="16" height="16" rx="8" fill="#DAF1FE" />
|
|
6
|
+
<path
|
|
7
|
+
fill-rule="evenodd"
|
|
8
|
+
clip-rule="evenodd"
|
|
9
|
+
d="M8.44968 9.62287C8.0213 9.62287 7.67264 9.24008 7.815 8.83604C7.84547 8.74956 7.87999 8.67275 7.91856 8.61686C8.10216 8.35084 8.37005 8.06047 8.72224 7.74574C8.99201 7.50594 9.19246 7.298 9.3236 7.1219C9.45474 6.9458 9.52031 6.74535 9.52031 6.52054C9.52031 6.20581 9.39292 5.95103 9.13814 5.7562C8.88335 5.56137 8.5424 5.46395 8.11527 5.46395C7.62404 5.46395 7.05412 5.78283 6.68203 6.03347C6.43716 6.19842 6.11362 6.21939 5.86602 6.05857C5.51562 5.83099 5.45796 5.34121 5.77515 5.06925C5.99176 4.88352 6.23474 4.69937 6.44046 4.60407C6.95003 4.36802 7.5495 4.25 8.23891 4.25C9.07819 4.25 9.74698 4.43172 10.2453 4.79516C10.7436 5.15859 10.9928 5.65878 10.9928 6.29574C10.9928 6.60297 10.9422 6.87274 10.841 7.10504C10.7399 7.33734 10.6181 7.53404 10.4757 7.69516C10.3334 7.85627 10.146 8.04173 9.91372 8.25155C9.62896 8.50633 9.41727 8.73114 9.27864 8.92597C9.25936 8.95306 9.24143 8.98609 9.22483 9.02289C9.0785 9.34733 8.8056 9.62287 8.44968 9.62287Z"
|
|
10
|
+
fill="url(#paint1_linear)"
|
|
11
|
+
/>
|
|
12
|
+
<path
|
|
13
|
+
fill-rule="evenodd"
|
|
14
|
+
clip-rule="evenodd"
|
|
15
|
+
d="M8.3626 12.3094C8.10033 12.3094 7.88489 12.2251 7.71629 12.0565C7.54768 11.8879 7.46338 11.6799 7.46338 11.4326C7.46338 11.1854 7.54768 10.9793 7.71629 10.8144C7.88489 10.6496 8.10033 10.5671 8.3626 10.5671C8.61739 10.5671 8.82908 10.6496 8.99768 10.8144C9.16629 10.9793 9.25059 11.1854 9.25059 11.4326C9.25059 11.6799 9.16629 11.8879 8.99768 12.0565C8.82908 12.2251 8.61739 12.3094 8.3626 12.3094Z"
|
|
16
|
+
fill="url(#paint2_linear)"
|
|
17
|
+
/>
|
|
18
|
+
<defs>
|
|
19
|
+
<linearGradient
|
|
20
|
+
id="paint0_linear"
|
|
21
|
+
x1="25.862"
|
|
22
|
+
y1="18.5044"
|
|
23
|
+
x2="12.7031"
|
|
24
|
+
y2="-2.23444"
|
|
25
|
+
gradientUnits="userSpaceOnUse"
|
|
26
|
+
>
|
|
27
|
+
<stop stop-color="#FCE2F0" />
|
|
28
|
+
<stop offset="1" stop-color="#F7EAFD" />
|
|
29
|
+
</linearGradient>
|
|
30
|
+
<linearGradient
|
|
31
|
+
id="paint1_linear"
|
|
32
|
+
x1="14.2067"
|
|
33
|
+
y1="10.3799"
|
|
34
|
+
x2="9.83017"
|
|
35
|
+
y2="3.3283"
|
|
36
|
+
gradientUnits="userSpaceOnUse"
|
|
37
|
+
>
|
|
38
|
+
<stop stop-color="#55E7D9" />
|
|
39
|
+
<stop offset="1" stop-color="#54B4FF" />
|
|
40
|
+
</linearGradient>
|
|
41
|
+
<linearGradient
|
|
42
|
+
id="paint2_linear"
|
|
43
|
+
x1="10.2963"
|
|
44
|
+
y1="12.5549"
|
|
45
|
+
x2="8.87929"
|
|
46
|
+
y2="10.2639"
|
|
47
|
+
gradientUnits="userSpaceOnUse"
|
|
48
|
+
>
|
|
49
|
+
<stop stop-color="#55E7D9" />
|
|
50
|
+
<stop offset="1" stop-color="#54B4FF" />
|
|
51
|
+
</linearGradient>
|
|
52
|
+
</defs>
|
|
53
|
+
</svg>
|
|
54
|
+
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export default () => (
|
|
4
|
+
<svg width="27" height="27" viewBox="0 0 27 27" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<rect opacity="0.8" x="1.5" y="1.5" width="24" height="24" rx="12" fill="#DAF1FE" />
|
|
6
|
+
<path
|
|
7
|
+
fill-rule="evenodd"
|
|
8
|
+
clip-rule="evenodd"
|
|
9
|
+
d="M11.8703 15.7837L9.64348 13.5569C9.30357 13.217 8.75246 13.217 8.41255 13.5569C8.07264 13.8968 8.07264 14.4479 8.41255 14.7878L11.2351 17.6104C11.5672 17.9425 12.103 17.9512 12.4457 17.6301L18.4492 12.0049C18.8 11.6762 18.8179 11.1254 18.4892 10.7746C18.1605 10.4238 17.6097 10.4059 17.2589 10.7346L11.8703 15.7837Z"
|
|
10
|
+
fill="url(#paint0_linear)"
|
|
11
|
+
/>
|
|
12
|
+
<defs>
|
|
13
|
+
<linearGradient
|
|
14
|
+
id="paint0_linear"
|
|
15
|
+
x1="19.8333"
|
|
16
|
+
y1="18.9098"
|
|
17
|
+
x2="15.586"
|
|
18
|
+
y2="7.2736"
|
|
19
|
+
gradientUnits="userSpaceOnUse"
|
|
20
|
+
>
|
|
21
|
+
<stop stop-color="#55E7D9" />
|
|
22
|
+
<stop offset="1" stop-color="#54B4FF" />
|
|
23
|
+
</linearGradient>
|
|
24
|
+
</defs>
|
|
25
|
+
</svg>
|
|
26
|
+
);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export default () => (
|
|
4
|
+
<svg width="130" height="130" viewBox="0 0 130 130" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<path
|
|
6
|
+
fill-rule="evenodd"
|
|
7
|
+
clip-rule="evenodd"
|
|
8
|
+
d="M65 130C100.899 130 130 100.899 130 65C130 29.1015 100.899 0 65 0C29.1015 0 0 29.1015 0 65C0 100.899 29.1015 130 65 130Z"
|
|
9
|
+
fill="#AFEBC3"
|
|
10
|
+
/>
|
|
11
|
+
<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="130">
|
|
12
|
+
<path
|
|
13
|
+
fill-rule="evenodd"
|
|
14
|
+
clip-rule="evenodd"
|
|
15
|
+
d="M65 130C100.899 130 130 100.899 130 65C130 29.1015 100.899 0 65 0C29.1015 0 0 29.1015 0 65C0 100.899 29.1015 130 65 130Z"
|
|
16
|
+
fill="white"
|
|
17
|
+
/>
|
|
18
|
+
</mask>
|
|
19
|
+
<g mask="url(#mask0)">
|
|
20
|
+
<rect
|
|
21
|
+
opacity="0.3"
|
|
22
|
+
x="3.25"
|
|
23
|
+
y="150.776"
|
|
24
|
+
width="227.136"
|
|
25
|
+
height="25.2373"
|
|
26
|
+
transform="rotate(-45 3.25 150.776)"
|
|
27
|
+
fill="white"
|
|
28
|
+
/>
|
|
29
|
+
<rect
|
|
30
|
+
opacity="0.3"
|
|
31
|
+
x="-48.4545"
|
|
32
|
+
y="126.52"
|
|
33
|
+
width="227.136"
|
|
34
|
+
height="25.2373"
|
|
35
|
+
transform="rotate(-45 -48.4545 126.52)"
|
|
36
|
+
fill="white"
|
|
37
|
+
/>
|
|
38
|
+
<path
|
|
39
|
+
d="M9.69092 69.153C9.69092 66.0864 11.2523 63.2309 13.8339 61.576L55.8257 34.6583C61.4168 31.0742 68.5832 31.0742 74.1743 34.6583L116.166 61.576C118.748 63.2309 120.309 66.0864 120.309 69.153V126.495C120.309 131.466 116.28 135.495 111.309 135.495H18.6909C13.7204 135.495 9.69092 131.466 9.69092 126.495V69.153Z"
|
|
40
|
+
fill="#14A957"
|
|
41
|
+
/>
|
|
42
|
+
<path d="M30.9045 51.8818H97.9136V117.118H30.9045V51.8818Z" fill="white" />
|
|
43
|
+
<path
|
|
44
|
+
opacity="0.1"
|
|
45
|
+
d="M63.8182 107.167C76.8722 107.167 87.4545 96.5849 87.4545 83.5308C87.4545 70.4768 76.8722 59.8945 63.8182 59.8945C50.7642 59.8945 40.1818 70.4768 40.1818 83.5308C40.1818 96.5849 50.7642 107.167 63.8182 107.167Z"
|
|
46
|
+
fill="#24BE6A"
|
|
47
|
+
/>
|
|
48
|
+
<path
|
|
49
|
+
d="M58.2093 83.4849L63.0246 88.3002L71.3036 79.047"
|
|
50
|
+
stroke="#24BE6A"
|
|
51
|
+
stroke-width="3.76358"
|
|
52
|
+
stroke-linecap="round"
|
|
53
|
+
stroke-linejoin="round"
|
|
54
|
+
/>
|
|
55
|
+
<path
|
|
56
|
+
d="M9.69092 70.2531C9.69092 68.672 11.4391 67.7161 12.7703 68.5694L65 102.05L117.23 68.5694C118.561 67.7161 120.309 68.672 120.309 70.2531V128.859C120.309 133.83 116.28 137.859 111.309 137.859H18.6909C13.7204 137.859 9.69092 133.83 9.69092 128.859V70.2531Z"
|
|
57
|
+
fill="#24BE6A"
|
|
58
|
+
/>
|
|
59
|
+
</g>
|
|
60
|
+
</svg>
|
|
61
|
+
);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export default () => (
|
|
4
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<path
|
|
6
|
+
d="M12.6265 10.4119V12.2379C12.6265 12.7338 12.193 13.1356 11.6583 13.1356H3.26825C2.73352 13.1356 2.29999 12.7338 2.29999 12.2379V3.79771C2.29999 3.30178 2.73352 2.89999 3.26825 2.89999H11.6583C12.193 2.89999 12.6265 3.30178 12.6265 3.79771V5.84996"
|
|
7
|
+
stroke="#8F95A2"
|
|
8
|
+
stroke-linecap="round"
|
|
9
|
+
stroke-linejoin="round"
|
|
10
|
+
/>
|
|
11
|
+
<path
|
|
12
|
+
fill-rule="evenodd"
|
|
13
|
+
clip-rule="evenodd"
|
|
14
|
+
d="M13.0952 10.1922H10.2664C9.0847 10.1922 8.12704 9.23439 8.12704 8.05246C8.12704 6.87052 9.0847 5.91269 10.2664 5.91269H13.0952C13.4072 5.91269 13.66 6.16552 13.66 6.47758V9.62689C13.66 9.93939 13.4072 10.1922 13.0952 10.1922Z"
|
|
15
|
+
stroke="#8F95A2"
|
|
16
|
+
stroke-linecap="round"
|
|
17
|
+
stroke-linejoin="round"
|
|
18
|
+
/>
|
|
19
|
+
<path d="M2.29999 4.73721H4.99884" stroke="#8F95A2" stroke-linecap="round" stroke-linejoin="round" />
|
|
20
|
+
<path d="M2.29999 11.3122H4.99884" stroke="#8F95A2" stroke-linecap="round" stroke-linejoin="round" />
|
|
21
|
+
</svg>
|
|
22
|
+
);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
|
|
4
|
+
import s from "./asset-icon.module.scss";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* AssetIcon component to display an icon for an asset.
|
|
8
|
+
*
|
|
9
|
+
* @component
|
|
10
|
+
* @param {Object} props - The props object.
|
|
11
|
+
* @param {string} props.assetIconSrc - The source URL for the asset icon.
|
|
12
|
+
* @param {string} [props.assetIconProtocolSrc=null] - The source URL for the asset icon that is base for this asset (e.g. ETH for USDT ERC20).
|
|
13
|
+
* @param {string} [props.fallbackSrc=null] - The fallback source URL in case the main source fails to load.
|
|
14
|
+
* @param {boolean} [props.small=false] - Whether to display a smaller version of the icon.
|
|
15
|
+
*/
|
|
16
|
+
export const AssetIcon = ({ assetIconSrc, assetIconProtocolSrc = null, fallbackSrc = null, small = false }) => {
|
|
17
|
+
const handleFailedLoad = e => {
|
|
18
|
+
e.target.onerror = null;
|
|
19
|
+
e.target.src = fallbackSrc;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div className={s["asset-icon"] + (small ? " " + s["small"] : "")}>
|
|
24
|
+
<img
|
|
25
|
+
src={assetIconSrc}
|
|
26
|
+
className={s["asset-icon-primary"] + (small ? " " + s["small"] : "")}
|
|
27
|
+
alt={" "}
|
|
28
|
+
onError={handleFailedLoad}
|
|
29
|
+
loading="lazy"
|
|
30
|
+
/>
|
|
31
|
+
{assetIconProtocolSrc ? (
|
|
32
|
+
<img
|
|
33
|
+
src={assetIconProtocolSrc}
|
|
34
|
+
className={s["asset-icon-secondary"] + (small ? " " + s["small"] : "")}
|
|
35
|
+
alt={" "}
|
|
36
|
+
onError={handleFailedLoad}
|
|
37
|
+
loading="lazy"
|
|
38
|
+
/>
|
|
39
|
+
) : (
|
|
40
|
+
""
|
|
41
|
+
)}
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
AssetIcon.propTypes = {
|
|
47
|
+
assetIconSrc: PropTypes.string.isRequired,
|
|
48
|
+
assetIconProtocolSrc: PropTypes.string,
|
|
49
|
+
fallbackSrc: PropTypes.string,
|
|
50
|
+
small: PropTypes.bool,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
AssetIcon.defaultProps = {
|
|
54
|
+
assetIconProtocolSrc: null,
|
|
55
|
+
fallbackSrc: null,
|
|
56
|
+
small: false,
|
|
57
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
|
|
4
|
+
import s from "./asset-selection.module.scss";
|
|
5
|
+
import ArrowIcon from "../../../assets/wrappedImages/arrowIcon.jsx";
|
|
6
|
+
|
|
7
|
+
import { AssetIcon } from "../AssetIcon/AssetIcon.jsx";
|
|
8
|
+
|
|
9
|
+
import { useCallHandlingErrors } from "../../../hooks/useCallHandlingErrors.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Component-button for triggering selecting an asset.
|
|
13
|
+
*
|
|
14
|
+
* @component
|
|
15
|
+
* @param {Object} props - The props object.
|
|
16
|
+
* @param {Function} props.handleClick - The function to call when the component is clicked.
|
|
17
|
+
* @param {boolean} props.disabled - If true, disables click functionality.
|
|
18
|
+
* @param {string} props.assetIconSrc - The source URL for the asset icon.
|
|
19
|
+
* @param {string} [props.protocolName] - The name of the protocol, if any.
|
|
20
|
+
* @param {string} [props.assetIconProtocolSrc] - The source URL for the asset protocol icon.
|
|
21
|
+
* @param {string} [props.fallbackSrc] - The fallback source URL if the main asset icon fails to load.
|
|
22
|
+
*/
|
|
23
|
+
export const AssetSelection = ({
|
|
24
|
+
handleClick = () => {},
|
|
25
|
+
disabled = false,
|
|
26
|
+
assetIconSrc,
|
|
27
|
+
protocolName,
|
|
28
|
+
assetIconProtocolSrc = null,
|
|
29
|
+
fallbackSrc,
|
|
30
|
+
}) => {
|
|
31
|
+
const handleError = useCallHandlingErrors();
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div
|
|
35
|
+
className={s["asset-selection"] + " " + (disabled ? s["disabled"] : "")}
|
|
36
|
+
onClick={disabled ? () => {} : e => handleError(handleClick, e)}
|
|
37
|
+
>
|
|
38
|
+
<div className={s["asset-selection-icon-wrapper"]}>
|
|
39
|
+
<AssetIcon
|
|
40
|
+
small
|
|
41
|
+
assetIconSrc={assetIconSrc}
|
|
42
|
+
assetIconProtocolSrc={assetIconProtocolSrc}
|
|
43
|
+
fallbackSrc={fallbackSrc}
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
{protocolName ? <div className={s["asset-selection-protocol-wrapper"]}>{protocolName}</div> : ""}
|
|
47
|
+
<div className={s["arrow"]}>
|
|
48
|
+
<ArrowIcon />
|
|
49
|
+
</div>
|
|
50
|
+
{/*<img src={arrowIcon} className="arrow" alt=""></img>*/}
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
AssetSelection.propTypes = {
|
|
56
|
+
handleClick: PropTypes.func,
|
|
57
|
+
disabled: PropTypes.bool,
|
|
58
|
+
assetIconSrc: PropTypes.string.isRequired,
|
|
59
|
+
protocolName: PropTypes.string,
|
|
60
|
+
assetIconProtocolSrc: PropTypes.string,
|
|
61
|
+
fallbackSrc: PropTypes.string,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
AssetSelection.defaultProps = {
|
|
65
|
+
handleClick: () => {},
|
|
66
|
+
disabled: false,
|
|
67
|
+
assetIconProtocolSrc: null,
|
|
68
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@use "../../../assets/styles/index" as *;
|
|
2
|
+
|
|
3
|
+
.asset-selection {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
background-color: $white;
|
|
7
|
+
border-radius: 100px;
|
|
8
|
+
user-select: none;
|
|
9
|
+
box-shadow: $shadowOutlineStatic;
|
|
10
|
+
transition: all 0.2s ease;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
|
|
13
|
+
@media (hover: hover) {
|
|
14
|
+
&:hover:not(.disabled) {
|
|
15
|
+
box-shadow: $shadowOutlineHover;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&.disabled {
|
|
20
|
+
opacity: 0.5;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:active:not(.disabled),
|
|
24
|
+
&.active:not(.disabled) {
|
|
25
|
+
box-shadow: $shadowOutlineActive;
|
|
26
|
+
transition: all 0.03s ease;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&-protocol-wrapper {
|
|
30
|
+
background-color: LightColor("tosca-20");
|
|
31
|
+
color: SolidColor("tosca");
|
|
32
|
+
padding: 2px 5px;
|
|
33
|
+
font-size: 8px;
|
|
34
|
+
border-radius: 50px;
|
|
35
|
+
font-weight: $bold;
|
|
36
|
+
margin-right: 3px;
|
|
37
|
+
text-wrap: nowrap;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&-icon-wrapper {
|
|
41
|
+
padding: 10px 5px 10px 10px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
h6 {
|
|
45
|
+
color: SolidColor("dark");
|
|
46
|
+
font-weight: $semi-bold;
|
|
47
|
+
|
|
48
|
+
margin: 1px 7px 0 2px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.arrow {
|
|
52
|
+
margin: 10px 10px 10px 0;
|
|
53
|
+
transform: rotate(-90deg);
|
|
54
|
+
height: 14px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
|
|
4
|
+
import s from "./background-title.module.scss";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Component for displaying a title with a fancy background text, which
|
|
8
|
+
* is semi-visible. This component is designed to work with forms that
|
|
9
|
+
* have a white background, and it allows for a configuration of margins.
|
|
10
|
+
*
|
|
11
|
+
* @param {Object} props - Component props
|
|
12
|
+
* @param {string} props.text - Text to be displayed as the title
|
|
13
|
+
* @param {boolean} [props.smallMargins=false] - Whether to use smaller margins around the title
|
|
14
|
+
*/
|
|
15
|
+
export const BackgroundTitle = ({ text, smallMargins = false }) => {
|
|
16
|
+
return (
|
|
17
|
+
<div className={s["background-title"]}>
|
|
18
|
+
<div className={s["background-title-wrapper"] + (smallMargins ? " " + s["small-margins"] : "")}>
|
|
19
|
+
<div className={s["background-title-wrapper-text"] + (smallMargins ? " " + s["small-margins"] : "")}>
|
|
20
|
+
{text}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
BackgroundTitle.propTypes = {
|
|
28
|
+
text: PropTypes.string.isRequired,
|
|
29
|
+
smallMargins: PropTypes.bool,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
BackgroundTitle.defaultProps = {
|
|
33
|
+
smallMargins: false,
|
|
34
|
+
};
|