From 47658e3d6414c8c285f711ec313839047ffc6457 Mon Sep 17 00:00:00 2001 From: Iulia Cimpeanu <72752718+iuliacimpeanu@users.noreply.github.com> Date: Tue, 25 Nov 2025 17:42:25 +0200 Subject: [PATCH 01/10] Refactored sign transactions panel internal components (#267) * Update styles * Refactored sign transactions footer * Refactored copy button * Refactored button component * Refactored tooltip component * Refactored spinner icon component * Refactored arrow right component * Updated copy button * Updated styles * Refactored sign transactions overview * Refactored sign-transactions-advanced and sign-transactions-header * Updated styles * Fixed test * Updated changelog * Updated files * Fixes after review --- CHANGELOG.md | 2 + src/common/Button/Button.tsx | 38 +++ src/common/Button/button.styles.ts | 11 + .../button => common/Button}/button.types.ts | 0 src/common/CopyButton/CopyButton.tsx | 38 +++ src/common/CopyButton/getCopyClickAction.ts | 26 ++ src/common/Icon/Icon.tsx | 8 + .../ArrowRightIcon/ArrowRightIcon.tsx | 13 + .../Icon/components/ArrowRightIcon/index.ts | 1 + .../components/SpinnerIcon/SpinnerIcon.tsx | 16 ++ .../Icon/components/SpinnerIcon/index.ts | 1 + src/common/Icon/icon.types.ts | 4 +- src/common/Tooltip/Tooltip.tsx | 87 +++++++ src/common/Trim/Trim.tsx | 16 -- src/components.d.ts | 138 +---------- .../button/button.scss} | 2 +- .../button/button.stories.tsx | 2 +- .../{visual => common}/button/button.tsx | 21 +- .../copy-button/copy-button.stories.tsx | 0 .../common/copy-button/copy-button.tsx | 30 +++ .../copy-button/tests/copy-button.spec.ts | 20 +- src/components/common/tooltip/tooltip.scss | 1 + src/components/common/tooltip/tooltip.tsx | 38 +++ .../SignTransactionsAdvanced.tsx | 62 +++++ .../SignTransactionsAdvancedData.tsx | 147 ++++++++++++ .../SignTransactionsAdvancedDataDecode.tsx | 44 ++++ .../helpers/getProcessedHighlightedData.ts | 2 +- .../signTransactionsAdvancedData.styles.ts | 15 ++ .../signTransactionsAdvanced.styles.ts | 18 ++ .../SignTransactionsFooter.tsx | 160 +++++++++++++ .../signTransactionsFooter.styles.ts | 21 ++ .../SignTransactionsHeader.tsx | 104 ++++++++ .../sign-transactions-header.styles.ts | 4 +- .../SignTransactionsOverview.tsx | 115 +++++++++ .../signTransactionsOverview.styles.ts | 33 +++ ...ign-transactions-advanced-data-decode.scss | 20 -- ...sign-transactions-advanced-data-decode.tsx | 44 ---- .../sign-transactions-advanced-data.scss | 103 -------- .../sign-transactions-advanced-data.tsx | 139 ----------- .../sign-transactions-advanced.scss | 127 ---------- .../sign-transactions-advanced.tsx | 61 ----- .../sign-transactions-footer.scss | 67 ------ .../sign-transactions-footer.tsx | 179 -------------- .../sign-transactions-header.tsx | 106 --------- .../sign-transactions-overview.scss | 224 ------------------ .../sign-transactions-overview.tsx | 115 --------- .../handleAmountResize/handleAmountResize.ts | 2 +- .../sign-transactions-panel.scss | 119 ++-------- .../sign-transactions-panel.styles.ts | 18 ++ .../sign-transactions-panel.tsx | 73 ++++-- src/components/visual/button/button.scss | 69 ------ .../visual/copy-button/copy-button.tsx | 68 ------ .../tests/data-with-explorer-link.spec.ts | 4 +- src/components/visual/tooltip/tooltip.scss | 40 ---- src/components/visual/tooltip/tooltip.tsx | 87 ------- src/global/tailwind.css | 24 ++ 56 files changed, 1186 insertions(+), 1741 deletions(-) create mode 100644 src/common/Button/Button.tsx create mode 100644 src/common/Button/button.styles.ts rename src/{components/visual/button => common/Button}/button.types.ts (100%) create mode 100644 src/common/CopyButton/CopyButton.tsx create mode 100644 src/common/CopyButton/getCopyClickAction.ts create mode 100644 src/common/Icon/components/ArrowRightIcon/ArrowRightIcon.tsx create mode 100644 src/common/Icon/components/ArrowRightIcon/index.ts create mode 100644 src/common/Icon/components/SpinnerIcon/SpinnerIcon.tsx create mode 100644 src/common/Icon/components/SpinnerIcon/index.ts create mode 100644 src/common/Tooltip/Tooltip.tsx rename src/components/{functional/sign-transactions-panel/components/sign-transactions-header/sign-transactions-header.scss => common/button/button.scss} (71%) rename src/components/{visual => common}/button/button.stories.tsx (95%) rename src/components/{visual => common}/button/button.tsx (57%) rename src/components/{visual => common}/copy-button/copy-button.stories.tsx (100%) create mode 100644 src/components/common/copy-button/copy-button.tsx rename src/components/{visual => common}/copy-button/tests/copy-button.spec.ts (92%) create mode 100644 src/components/common/tooltip/tooltip.scss create mode 100644 src/components/common/tooltip/tooltip.tsx create mode 100644 src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/SignTransactionsAdvanced.tsx create mode 100644 src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/SignTransactionsAdvancedData.tsx create mode 100644 src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/components/SignTransactionsAdvancedDataDecode/SignTransactionsAdvancedDataDecode.tsx rename src/components/functional/sign-transactions-panel/components/{sign-transactions-advanced/components/sign-transactions-advanced-data => SignTransactionsAdvanced/components/SignTransactionsAdvancedData}/helpers/getProcessedHighlightedData.ts (88%) create mode 100644 src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/signTransactionsAdvancedData.styles.ts create mode 100644 src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/signTransactionsAdvanced.styles.ts create mode 100644 src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/SignTransactionsFooter.tsx create mode 100644 src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/signTransactionsFooter.styles.ts create mode 100644 src/components/functional/sign-transactions-panel/components/SignTransactionsHeader/SignTransactionsHeader.tsx rename src/components/functional/sign-transactions-panel/components/{sign-transactions-header => SignTransactionsHeader}/sign-transactions-header.styles.ts (93%) create mode 100644 src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/SignTransactionsOverview.tsx create mode 100644 src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/signTransactionsOverview.styles.ts delete mode 100644 src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/components/sign-transactions-advanced-data-decode/sign-transactions-advanced-data-decode.scss delete mode 100644 src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/components/sign-transactions-advanced-data-decode/sign-transactions-advanced-data-decode.tsx delete mode 100644 src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/sign-transactions-advanced-data.scss delete mode 100644 src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/sign-transactions-advanced-data.tsx delete mode 100644 src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/sign-transactions-advanced.scss delete mode 100644 src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/sign-transactions-advanced.tsx delete mode 100644 src/components/functional/sign-transactions-panel/components/sign-transactions-footer/sign-transactions-footer.scss delete mode 100644 src/components/functional/sign-transactions-panel/components/sign-transactions-footer/sign-transactions-footer.tsx delete mode 100644 src/components/functional/sign-transactions-panel/components/sign-transactions-header/sign-transactions-header.tsx delete mode 100644 src/components/functional/sign-transactions-panel/components/sign-transactions-overview/sign-transactions-overview.scss delete mode 100644 src/components/functional/sign-transactions-panel/components/sign-transactions-overview/sign-transactions-overview.tsx create mode 100644 src/components/functional/sign-transactions-panel/sign-transactions-panel.styles.ts delete mode 100644 src/components/visual/button/button.scss delete mode 100644 src/components/visual/copy-button/copy-button.tsx delete mode 100644 src/components/visual/tooltip/tooltip.scss delete mode 100644 src/components/visual/tooltip/tooltip.tsx diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aa76504..91f21554 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- [Refactored sign transactions panel internal components](https://github.com/multiversx/mx-sdk-dapp-ui/pull/267) + ## [[0.1.4](https://github.com/multiversx/mx-sdk-dapp-ui/pull/269)] - 2025-11-21 - [Added Vue.js component outputs](https://github.com/multiversx/mx-sdk-dapp-ui/pull/268) diff --git a/src/common/Button/Button.tsx b/src/common/Button/Button.tsx new file mode 100644 index 00000000..374f797d --- /dev/null +++ b/src/common/Button/Button.tsx @@ -0,0 +1,38 @@ +import { h } from '@stencil/core'; +import { ButtonSizeEnum, ButtonVariantEnum } from './button.types'; +import styles from './button.styles'; + +interface ButtonPropsType { + class?: string; + dataTestId?: string; + disabled?: boolean; + size?: `${ButtonSizeEnum}`; + variant?: `${ButtonVariantEnum}`; + onClick?: (event: MouseEvent) => void; +} + +export function Button({ class: className = '', dataTestId = '', disabled = false, size = 'large', variant = 'primary', onClick }: ButtonPropsType, children?: any) { + return ( + + ); + +} diff --git a/src/common/Button/button.styles.ts b/src/common/Button/button.styles.ts new file mode 100644 index 00000000..d073a7ae --- /dev/null +++ b/src/common/Button/button.styles.ts @@ -0,0 +1,11 @@ +// prettier-ignore +export default { + button: 'button mvx:flex mvx:items-center mvx:justify-center mvx:font-bold mvx:leading-none mvx:px-4 mvx:max-h-full mvx:rounded-xl mvx:cursor-pointer mvx:transition-all mvx:duration-200 mvx:ease-in-out mvx:gap-2', + buttonLarge: 'button-large mvx:h-12 mvx:text-base mvx:px-6', + buttonSmall: 'button-small mvx:h-10 mvx:text-xs mvx:rounded-xl', + buttonPrimary: 'button-primary mvx:text-button-primary mvx:bg-button-bg-primary mvx:border mvx:border-button-bg-primary', + buttonSecondary: 'button-secondary mvx:relative mvx:text-button-secondary mvx:border mvx:border-transparent mvx:after:absolute mvx:after:inset-0 mvx:after:rounded-lg mvx:after:opacity-40 mvx:after:transition-all mvx:after:duration-200 mvx:after:ease-in-out mvx:after:bg-button-bg-secondary mvx:after:content-[""] mvx:after:-z-1 mvx:hover:opacity-100 mvx:hover:text-button-primary mvx:hover:after:opacity-100 mvx:hover:after:bg-button-bg-primary', + buttonSecondarySmall: 'button-secondary-small mvx:after:rounded-xl', + buttonNeutral: 'button-neutral mvx:text-neutral-925 mvx:bg-white mvx:hover:opacity-75', + buttonDisabled: 'button-disabled mvx:pointer-events-none mvx:bg-transparent mvx:cursor-default mvx:border mvx:border-secondary-text mvx:!text-secondary-text mvx:hover:opacity-100' +} satisfies Record; \ No newline at end of file diff --git a/src/components/visual/button/button.types.ts b/src/common/Button/button.types.ts similarity index 100% rename from src/components/visual/button/button.types.ts rename to src/common/Button/button.types.ts diff --git a/src/common/CopyButton/CopyButton.tsx b/src/common/CopyButton/CopyButton.tsx new file mode 100644 index 00000000..9880c6ee --- /dev/null +++ b/src/common/CopyButton/CopyButton.tsx @@ -0,0 +1,38 @@ +import { h } from '@stencil/core'; +import { Icon } from 'common/Icon'; + +// prettier-ignore +const styles = { + copyButton: 'copy-button mvx:flex', + copyButtonIcon: 'copy-button-icon mvx:flex mvx:cursor-pointer mvx:justify-center mvx:transition-opacity mvx:duration-200 mvx:ease-in-out mvx:hover:opacity-80', + copyButtonIconCheck: 'copy-button-icon-check mvx:hover:opacity-100! mvx:cursor-default!', +} satisfies Record; + +interface CopyButtonPropsType { + iconClass?: string; + class?: string; + text: string; + isSuccessOnCopy?: boolean; + handleCopyButtonClick?: (event: MouseEvent) => void; +} + +export function CopyButton({ iconClass, class: className, isSuccessOnCopy, handleCopyButtonClick }: CopyButtonPropsType) { + return ( +
handleCopyButtonClick?.(event)} + class={{ + [styles.copyButton]: true, + [className]: Boolean(className), + }} + > + +
+ ); +} diff --git a/src/common/CopyButton/getCopyClickAction.ts b/src/common/CopyButton/getCopyClickAction.ts new file mode 100644 index 00000000..322cea44 --- /dev/null +++ b/src/common/CopyButton/getCopyClickAction.ts @@ -0,0 +1,26 @@ +import { copyToClipboard } from 'utils/copyToClipboard'; + +interface CopyHandlerOptions { + onSuccessChange?: (isSuccess: boolean) => void; +} + +export function getCopyClickAction({ onSuccessChange }: CopyHandlerOptions) { + let timeoutId: number | null = null; + + return async (event: MouseEvent, text?: string) => { + const trimmedText = text ? text.trim() : text; + const success = await copyToClipboard(trimmedText); + + event.preventDefault(); + event.stopPropagation(); + + if (onSuccessChange) { + onSuccessChange(success); + + window.clearTimeout(timeoutId); + if (success) { + timeoutId = window.setTimeout(() => onSuccessChange(false), 2000); + } + } + }; +} \ No newline at end of file diff --git a/src/common/Icon/Icon.tsx b/src/common/Icon/Icon.tsx index 2a431186..84ffa060 100644 --- a/src/common/Icon/Icon.tsx +++ b/src/common/Icon/Icon.tsx @@ -24,7 +24,9 @@ import { LayersIcon } from './components/LayersIcon'; import { LockIcon } from './components/LockIcon'; import { PencilIcon } from './components/PencilIcon'; import { TriangularWarningIcon } from './components/TriangularWarningIcon'; +import { SpinnerIcon } from './components/SpinnerIcon'; import type { IconPropsType } from './icon.types'; +import { ArrowRightIcon } from './components/ArrowRightIcon'; export const Icon = ({ name, ...properties }: IconPropsType) => { if (!name) { @@ -104,6 +106,12 @@ export const Icon = ({ name, ...properties }: IconPropsType) => { case 'arrows-rotate': return ; + case 'spinner': + return + + case 'arrow-right': + return + default: console.error(`No data for the ${name} icon.`); return null; diff --git a/src/common/Icon/components/ArrowRightIcon/ArrowRightIcon.tsx b/src/common/Icon/components/ArrowRightIcon/ArrowRightIcon.tsx new file mode 100644 index 00000000..c6a358be --- /dev/null +++ b/src/common/Icon/components/ArrowRightIcon/ArrowRightIcon.tsx @@ -0,0 +1,13 @@ +import { h } from '@stencil/core'; + +const styles = { + arrowRightIcon: 'arrow-right-icon mvx:w-4 mvx:h-4 mvx:text-inherit' +} satisfies Record; + +export const ArrowRightIcon = ({ class: className }: { class?: string }) => ( + + + +); + + diff --git a/src/common/Icon/components/ArrowRightIcon/index.ts b/src/common/Icon/components/ArrowRightIcon/index.ts new file mode 100644 index 00000000..190655e7 --- /dev/null +++ b/src/common/Icon/components/ArrowRightIcon/index.ts @@ -0,0 +1 @@ +export * from './ArrowRightIcon'; \ No newline at end of file diff --git a/src/common/Icon/components/SpinnerIcon/SpinnerIcon.tsx b/src/common/Icon/components/SpinnerIcon/SpinnerIcon.tsx new file mode 100644 index 00000000..0c6ee5ac --- /dev/null +++ b/src/common/Icon/components/SpinnerIcon/SpinnerIcon.tsx @@ -0,0 +1,16 @@ +import { h } from '@stencil/core'; + +const styles = { + spinnerIcon: 'spinner-icon mvx:w-4 mvx:h-4 mvx:fill-secondary-text mvx:animate-spinner' +} satisfies Record; + +export const SpinnerIcon = ({ class: className }: { class?: string }) => ( + + + +); + + diff --git a/src/common/Icon/components/SpinnerIcon/index.ts b/src/common/Icon/components/SpinnerIcon/index.ts new file mode 100644 index 00000000..2a092c9d --- /dev/null +++ b/src/common/Icon/components/SpinnerIcon/index.ts @@ -0,0 +1 @@ +export * from './SpinnerIcon'; \ No newline at end of file diff --git a/src/common/Icon/icon.types.ts b/src/common/Icon/icon.types.ts index 34c5f645..c699f9a0 100644 --- a/src/common/Icon/icon.types.ts +++ b/src/common/Icon/icon.types.ts @@ -24,7 +24,9 @@ export enum IconNamesEnum { circleCheck = 'circle-check', circleInfo = 'circle-info', coins = 'coins', - arrowsRotate = 'arrows-rotate' + arrowsRotate = 'arrows-rotate', + spinner = 'spinner', + arrowRight = 'arrow-right' } export type IconPropsType = JSXBase.IntrinsicElements['svg'] & { diff --git a/src/common/Tooltip/Tooltip.tsx b/src/common/Tooltip/Tooltip.tsx new file mode 100644 index 00000000..e8624165 --- /dev/null +++ b/src/common/Tooltip/Tooltip.tsx @@ -0,0 +1,87 @@ +import { h } from '@stencil/core'; + +// prettier-ignore +const styles = { + tooltip: 'tooltip mvx:flex mvx:relative', + tooltipContentWrapper: 'tooltip-content-wrapper mvx:left-1/2 mvx:absolute mvx:z-1 mvx:transform mvx:-translate-x-1/2', + tooltipContent: 'tooltip-content mvx:flex-row mvx:cursor-default mvx:p-2 mvx:whitespace-nowrap mvx:text-xs mvx:rounded-xl mvx:leading-none mvx:!bg-surface mvx:border-outline-variant mvx:border mvx:text-primary mvx:after:left-1/2 mvx:after:origin-center mvx:after:w-2 mvx:after:h-2 mvx:after:absolute mvx:after:border mvx:after:border-outline-variant mvx:after:!bg-surface mvx:after:translate-x-[calc(50%-8px)] mvx:after:-rotate-[45deg] mvx:after:content-[""]', + tooltipContentTop: 'tooltip-content-top mvx:after:border-t-0 mvx:after:border-r-0 mvx:after:-bottom-1', + tooltipContentBottom: 'tooltip-content-bottom mvx:after:border-b-0 mvx:after:border-l-0 mvx:after:-top-1' +} satisfies Record; + +interface TooltipPropsType { + position?: 'top' | 'bottom'; + triggerOnClick?: boolean; + trigger: HTMLElement; + class?: string; + isTooltipVisible?: boolean; + onVisibilityChange?: (isTooltipVisible: boolean) => void; +} + +export function Tooltip({ position = 'top', triggerOnClick = false, trigger, class: className, onVisibilityChange, isTooltipVisible = false }: TooltipPropsType, children?: any) { + const setTooltipVisible = (isTooltipVisible: boolean) => { + onVisibilityChange?.(isTooltipVisible); + } + + const handleEllipsisClick = (event: MouseEvent) => { + if (!triggerOnClick) { + return; + } + + event.preventDefault(); + setTooltipVisible(!isTooltipVisible); + } + + const handleFocusOut = (event: FocusEvent) => { + const relatedTarget = event.relatedTarget as Node; + const currentTarget = event.currentTarget as HTMLElement; + + if (!currentTarget.contains(relatedTarget)) { + setTooltipVisible(false); + } + } + + const handleMouseEvent = (isTooltipVisible: boolean) => { + if (triggerOnClick) { + return; + } + + return (event: MouseEvent) => { + event.preventDefault(); + setTooltipVisible(isTooltipVisible); + }; + } + + return ( +
+ {isTooltipVisible && ( +
+
event.stopPropagation()} + > + {children} +
+
+ )} + + {trigger} +
+ ); +} \ No newline at end of file diff --git a/src/common/Trim/Trim.tsx b/src/common/Trim/Trim.tsx index 8a671942..ae2dd63b 100644 --- a/src/common/Trim/Trim.tsx +++ b/src/common/Trim/Trim.tsx @@ -86,27 +86,11 @@ export function Trim({ const trimFullVisibleClasses = styles.trimFullVisible.split(/\s+/); const trimWrapperVisibleClasses = styles.trimWrapperVisible.split(/\s+/); - const hasFullVisible = trimFullElement.classList.contains(getIdentifierClass(styles.trimFullVisible)); - const hasWrapperVisible = trimWrapperElement.classList.contains(getIdentifierClass(styles.trimWrapperVisible)); - - if (hasFullVisible) { - trimFullElement.classList.remove(...trimFullVisibleClasses); - } - if (hasWrapperVisible) { - trimWrapperElement.classList.remove(...trimWrapperVisibleClasses); - } - const hiddenFullWidthElementWidth = fullWidthUntrimmedElementReference.scrollWidth; const trimmedElementWidth = trimElementReference.clientWidth; const isTrimElementOverflowing = hiddenFullWidthElementWidth > trimmedElementWidth; if (isCurrentlyOverflowing === isTrimElementOverflowing) { - if (hasFullVisible) { - trimFullElement.classList.add(...trimFullVisibleClasses); - } - if (hasWrapperVisible) { - trimWrapperElement.classList.add(...trimWrapperVisibleClasses); - } isCheckingOverflow = false; diff --git a/src/components.d.ts b/src/components.d.ts index 3d50c26c..a9d86ead 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -6,11 +6,10 @@ */ import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; import { IAddressTableData } from "./types/address-table.types"; -import { ButtonSizeEnum, ButtonVariantEnum } from "./components/visual/button/button.types"; +import { ButtonSizeEnum, ButtonVariantEnum } from "./common/Button/button.types"; import { CustomToastType, IComponentToast, ISimpleToast } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; import { IConfirmScreenData, IConnectScreenData, ILedgerConnectPanelData } from "./components/functional/ledger-connect/ledger-connect.types"; import { IEventBus } from "./utils/EventBus"; -import { DecodeMethodEnum } from "./components/functional/sign-transactions-panel/sign-transactions-panel.types"; import { ITransactionListItem } from "./components/visual/transaction-list-item/transaction-list-item.types"; import { LocalJSX as JSX } from "@stencil/core"; import { ITransactionListItem as ITransactionListItem1 } from "./components/visual/transaction-list-item/transaction-list-item.types"; @@ -20,11 +19,10 @@ import { TransactionRowType } from "./components/controlled/transactions-table/t import { IProviderBase } from "./types/provider.types"; import { IEventBus as IEventBus1, unknown as IWalletConnectPanelData } from "./components.d"; export { IAddressTableData } from "./types/address-table.types"; -export { ButtonSizeEnum, ButtonVariantEnum } from "./components/visual/button/button.types"; +export { ButtonSizeEnum, ButtonVariantEnum } from "./common/Button/button.types"; export { CustomToastType, IComponentToast, ISimpleToast } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; export { IConfirmScreenData, IConnectScreenData, ILedgerConnectPanelData } from "./components/functional/ledger-connect/ledger-connect.types"; export { IEventBus } from "./utils/EventBus"; -export { DecodeMethodEnum } from "./components/functional/sign-transactions-panel/sign-transactions-panel.types"; export { ITransactionListItem } from "./components/visual/transaction-list-item/transaction-list-item.types"; export { LocalJSX as JSX } from "@stencil/core"; export { ITransactionListItem as ITransactionListItem1 } from "./components/visual/transaction-list-item/transaction-list-item.types"; @@ -257,45 +255,6 @@ export namespace Components { */ "sidePanelIdentifier": string; } - interface MvxSignTransactionsAdvanced { - "data": string; - "highlight"?: string; - } - interface MvxSignTransactionsAdvancedData { - "data": string; - "highlight"?: string; - } - interface MvxSignTransactionsAdvancedDataDecode { - /** - * @default DecodeMethodEnum.decimal - */ - "currentDecodeMethod": DecodeMethodEnum; - /** - * @default false - */ - "isToggled": boolean; - } - interface MvxSignTransactionsFooter { - } - interface MvxSignTransactionsHeader { - } - interface MvxSignTransactionsOverview { - "action": string; - "amount": string; - "identifier": string; - "interactor": string; - "interactorIconUrl": string; - /** - * @default false - */ - "isApp": boolean; - /** - * @default '~$0.00078' - */ - "networkFee": string; - "tokenIconUrl": string; - "usdValue": string; - } interface MvxSignTransactionsPanel { "closeWithAnimation": () => Promise; "getEventBus": () => Promise; @@ -836,42 +795,6 @@ declare global { prototype: HTMLMvxSidePanelSwiperElement; new (): HTMLMvxSidePanelSwiperElement; }; - interface HTMLMvxSignTransactionsAdvancedElement extends Components.MvxSignTransactionsAdvanced, HTMLStencilElement { - } - var HTMLMvxSignTransactionsAdvancedElement: { - prototype: HTMLMvxSignTransactionsAdvancedElement; - new (): HTMLMvxSignTransactionsAdvancedElement; - }; - interface HTMLMvxSignTransactionsAdvancedDataElement extends Components.MvxSignTransactionsAdvancedData, HTMLStencilElement { - } - var HTMLMvxSignTransactionsAdvancedDataElement: { - prototype: HTMLMvxSignTransactionsAdvancedDataElement; - new (): HTMLMvxSignTransactionsAdvancedDataElement; - }; - interface HTMLMvxSignTransactionsAdvancedDataDecodeElement extends Components.MvxSignTransactionsAdvancedDataDecode, HTMLStencilElement { - } - var HTMLMvxSignTransactionsAdvancedDataDecodeElement: { - prototype: HTMLMvxSignTransactionsAdvancedDataDecodeElement; - new (): HTMLMvxSignTransactionsAdvancedDataDecodeElement; - }; - interface HTMLMvxSignTransactionsFooterElement extends Components.MvxSignTransactionsFooter, HTMLStencilElement { - } - var HTMLMvxSignTransactionsFooterElement: { - prototype: HTMLMvxSignTransactionsFooterElement; - new (): HTMLMvxSignTransactionsFooterElement; - }; - interface HTMLMvxSignTransactionsHeaderElement extends Components.MvxSignTransactionsHeader, HTMLStencilElement { - } - var HTMLMvxSignTransactionsHeaderElement: { - prototype: HTMLMvxSignTransactionsHeaderElement; - new (): HTMLMvxSignTransactionsHeaderElement; - }; - interface HTMLMvxSignTransactionsOverviewElement extends Components.MvxSignTransactionsOverview, HTMLStencilElement { - } - var HTMLMvxSignTransactionsOverviewElement: { - prototype: HTMLMvxSignTransactionsOverviewElement; - new (): HTMLMvxSignTransactionsOverviewElement; - }; interface HTMLMvxSignTransactionsPanelElement extends Components.MvxSignTransactionsPanel, HTMLStencilElement { } var HTMLMvxSignTransactionsPanelElement: { @@ -1108,12 +1031,6 @@ declare global { "mvx-side-panel": HTMLMvxSidePanelElement; "mvx-side-panel-header": HTMLMvxSidePanelHeaderElement; "mvx-side-panel-swiper": HTMLMvxSidePanelSwiperElement; - "mvx-sign-transactions-advanced": HTMLMvxSignTransactionsAdvancedElement; - "mvx-sign-transactions-advanced-data": HTMLMvxSignTransactionsAdvancedDataElement; - "mvx-sign-transactions-advanced-data-decode": HTMLMvxSignTransactionsAdvancedDataDecodeElement; - "mvx-sign-transactions-footer": HTMLMvxSignTransactionsFooterElement; - "mvx-sign-transactions-header": HTMLMvxSignTransactionsHeaderElement; - "mvx-sign-transactions-overview": HTMLMvxSignTransactionsOverviewElement; "mvx-sign-transactions-panel": HTMLMvxSignTransactionsPanelElement; "mvx-simple-toast": HTMLMvxSimpleToastElement; "mvx-spinner-icon": HTMLMvxSpinnerIconElement; @@ -1372,45 +1289,6 @@ declare namespace LocalJSX { */ "sidePanelIdentifier"?: string; } - interface MvxSignTransactionsAdvanced { - "data"?: string; - "highlight"?: string; - } - interface MvxSignTransactionsAdvancedData { - "data"?: string; - "highlight"?: string; - } - interface MvxSignTransactionsAdvancedDataDecode { - /** - * @default DecodeMethodEnum.decimal - */ - "currentDecodeMethod"?: DecodeMethodEnum; - /** - * @default false - */ - "isToggled"?: boolean; - } - interface MvxSignTransactionsFooter { - } - interface MvxSignTransactionsHeader { - } - interface MvxSignTransactionsOverview { - "action"?: string; - "amount"?: string; - "identifier"?: string; - "interactor"?: string; - "interactorIconUrl"?: string; - /** - * @default false - */ - "isApp"?: boolean; - /** - * @default '~$0.00078' - */ - "networkFee"?: string; - "tokenIconUrl"?: string; - "usdValue"?: string; - } interface MvxSignTransactionsPanel { } interface MvxSimpleToast { @@ -1594,12 +1472,6 @@ declare namespace LocalJSX { "mvx-side-panel": MvxSidePanel; "mvx-side-panel-header": MvxSidePanelHeader; "mvx-side-panel-swiper": MvxSidePanelSwiper; - "mvx-sign-transactions-advanced": MvxSignTransactionsAdvanced; - "mvx-sign-transactions-advanced-data": MvxSignTransactionsAdvancedData; - "mvx-sign-transactions-advanced-data-decode": MvxSignTransactionsAdvancedDataDecode; - "mvx-sign-transactions-footer": MvxSignTransactionsFooter; - "mvx-sign-transactions-header": MvxSignTransactionsHeader; - "mvx-sign-transactions-overview": MvxSignTransactionsOverview; "mvx-sign-transactions-panel": MvxSignTransactionsPanel; "mvx-simple-toast": MvxSimpleToast; "mvx-spinner-icon": MvxSpinnerIcon; @@ -1666,12 +1538,6 @@ declare module "@stencil/core" { "mvx-side-panel": LocalJSX.MvxSidePanel & JSXBase.HTMLAttributes; "mvx-side-panel-header": LocalJSX.MvxSidePanelHeader & JSXBase.HTMLAttributes; "mvx-side-panel-swiper": LocalJSX.MvxSidePanelSwiper & JSXBase.HTMLAttributes; - "mvx-sign-transactions-advanced": LocalJSX.MvxSignTransactionsAdvanced & JSXBase.HTMLAttributes; - "mvx-sign-transactions-advanced-data": LocalJSX.MvxSignTransactionsAdvancedData & JSXBase.HTMLAttributes; - "mvx-sign-transactions-advanced-data-decode": LocalJSX.MvxSignTransactionsAdvancedDataDecode & JSXBase.HTMLAttributes; - "mvx-sign-transactions-footer": LocalJSX.MvxSignTransactionsFooter & JSXBase.HTMLAttributes; - "mvx-sign-transactions-header": LocalJSX.MvxSignTransactionsHeader & JSXBase.HTMLAttributes; - "mvx-sign-transactions-overview": LocalJSX.MvxSignTransactionsOverview & JSXBase.HTMLAttributes; "mvx-sign-transactions-panel": LocalJSX.MvxSignTransactionsPanel & JSXBase.HTMLAttributes; "mvx-simple-toast": LocalJSX.MvxSimpleToast & JSXBase.HTMLAttributes; "mvx-spinner-icon": LocalJSX.MvxSpinnerIcon & JSXBase.HTMLAttributes; diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-header/sign-transactions-header.scss b/src/components/common/button/button.scss similarity index 71% rename from src/components/functional/sign-transactions-panel/components/sign-transactions-header/sign-transactions-header.scss rename to src/components/common/button/button.scss index 21b0cbc1..ff1190ee 100644 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-header/sign-transactions-header.scss +++ b/src/components/common/button/button.scss @@ -1 +1 @@ -// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. +// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. \ No newline at end of file diff --git a/src/components/visual/button/button.stories.tsx b/src/components/common/button/button.stories.tsx similarity index 95% rename from src/components/visual/button/button.stories.tsx rename to src/components/common/button/button.stories.tsx index 23a1b35a..6232d65c 100644 --- a/src/components/visual/button/button.stories.tsx +++ b/src/components/common/button/button.stories.tsx @@ -5,7 +5,7 @@ import type { Meta, StoryObj } from '@stencil/storybook-plugin'; import capitalize from 'lodash.capitalize'; import type { Button } from './button'; -import { ButtonSizeEnum, ButtonVariantEnum } from './button.types'; +import { ButtonSizeEnum, ButtonVariantEnum } from '../../../common/Button/button.types'; // prettier-ignore const styles = { diff --git a/src/components/visual/button/button.tsx b/src/components/common/button/button.tsx similarity index 57% rename from src/components/visual/button/button.tsx rename to src/components/common/button/button.tsx index 40967113..ebcc07aa 100644 --- a/src/components/visual/button/button.tsx +++ b/src/components/common/button/button.tsx @@ -1,7 +1,9 @@ import type { EventEmitter } from '@stencil/core'; import { Component, Event, h, Prop } from '@stencil/core'; -import type { ButtonSizeEnum, ButtonVariantEnum } from './button.types'; +import type { ButtonSizeEnum, ButtonVariantEnum } from '../../../common/Button/button.types'; + +import { Button as ButtonComponent } from 'common/Button/Button'; @Component({ tag: 'mvx-button', @@ -19,20 +21,15 @@ export class Button { render() { return ( - + ); } } diff --git a/src/components/visual/copy-button/copy-button.stories.tsx b/src/components/common/copy-button/copy-button.stories.tsx similarity index 100% rename from src/components/visual/copy-button/copy-button.stories.tsx rename to src/components/common/copy-button/copy-button.stories.tsx diff --git a/src/components/common/copy-button/copy-button.tsx b/src/components/common/copy-button/copy-button.tsx new file mode 100644 index 00000000..c9c03909 --- /dev/null +++ b/src/components/common/copy-button/copy-button.tsx @@ -0,0 +1,30 @@ +import { Component, Prop, State, h } from '@stencil/core'; +import { CopyButton as CopyButtonComponent } from 'common/CopyButton/CopyButton'; +import { getCopyClickAction } from 'common/CopyButton/getCopyClickAction'; + +@Component({ + tag: 'mvx-copy-button', + shadow: false, +}) +export class CopyButton { + @State() isSuccess: boolean = false; + @Prop() iconClass?: string; + @Prop() class?: string; + @Prop() text: string; + + private handleClick = getCopyClickAction({ + onSuccessChange: (isSuccess) => (this.isSuccess = isSuccess), + }); + + render() { + return ( + + ); + } +} diff --git a/src/components/visual/copy-button/tests/copy-button.spec.ts b/src/components/common/copy-button/tests/copy-button.spec.ts similarity index 92% rename from src/components/visual/copy-button/tests/copy-button.spec.ts rename to src/components/common/copy-button/tests/copy-button.spec.ts index d10b193b..67d8eecf 100644 --- a/src/components/visual/copy-button/tests/copy-button.spec.ts +++ b/src/components/common/copy-button/tests/copy-button.spec.ts @@ -48,7 +48,13 @@ describe('CopyButton', () => { const copyButton = page.root; const component = page.rootInstance as CopyButton; - await component.handleClick(new MouseEvent('click') as any); + + const mockEvent = { + preventDefault: jest.fn(), + stopPropagation: jest.fn(), + } as unknown as MouseEvent; + + await component['handleClick'](mockEvent, component.text); await page.waitForChanges(); expect(copyButton).toEqualHtml(` @@ -71,8 +77,8 @@ describe('CopyButton', () => { }); const copyButton = page.root; - const component = page.rootInstance as CopyButton; - await component.handleClick(new MouseEvent('click') as any); + const element = copyButton.querySelector('div'); + element.click(); await page.waitForChanges(); expect(copyButton).toEqualHtml(` @@ -92,13 +98,15 @@ describe('CopyButton', () => { html: '', }); + const component = page.rootInstance as CopyButton; const mockEvent = { preventDefault: jest.fn(), stopPropagation: jest.fn(), - }; + } as unknown as MouseEvent; - const component = page.rootInstance as CopyButton; - await component.handleClick(mockEvent as any); + + await component['handleClick'](mockEvent, component.text); + await page.waitForChanges(); expect(mockEvent.preventDefault).toHaveBeenCalledTimes(1); expect(mockEvent.stopPropagation).toHaveBeenCalledTimes(1); diff --git a/src/components/common/tooltip/tooltip.scss b/src/components/common/tooltip/tooltip.scss new file mode 100644 index 00000000..ff1190ee --- /dev/null +++ b/src/components/common/tooltip/tooltip.scss @@ -0,0 +1 @@ +// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. \ No newline at end of file diff --git a/src/components/common/tooltip/tooltip.tsx b/src/components/common/tooltip/tooltip.tsx new file mode 100644 index 00000000..09b19046 --- /dev/null +++ b/src/components/common/tooltip/tooltip.tsx @@ -0,0 +1,38 @@ +import { Component, Event, EventEmitter, h, Prop, State } from '@stencil/core'; +import { Tooltip as TooltipComponent } from 'common/Tooltip/Tooltip'; + +@Component({ + tag: 'mvx-tooltip', + styleUrl: 'tooltip.scss', + shadow: true, +}) +export class Tooltip { + @Prop() position: 'top' | 'bottom' = 'top'; + @Prop() triggerOnClick?: boolean = false; + @Prop() trigger: HTMLElement; + @Prop() class?: string; + + @Event() triggerRender: EventEmitter; + @State() private isVisible: boolean = false; + + private handleVisibilityChange = (isVisible: boolean) => { + this.triggerRender.emit(isVisible); + this.isVisible = isVisible; + }; + + + render() { + return ( + + + + ); + } +} diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/SignTransactionsAdvanced.tsx b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/SignTransactionsAdvanced.tsx new file mode 100644 index 00000000..af57efb4 --- /dev/null +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/SignTransactionsAdvanced.tsx @@ -0,0 +1,62 @@ +import { h } from '@stencil/core'; +import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; + +import state from '../../signTransactionsPanelStore'; + +import styles from './signTransactionsAdvanced.styles'; +import { SignTransactionsAdvancedData } from './components/SignTransactionsAdvancedData/SignTransactionsAdvancedData'; +import { DecodeMethodEnum } from '../../sign-transactions-panel.types'; +import classNames from 'classnames'; + +interface SignTransactionsAdvancedPropsType { + decodeMethod?: DecodeMethodEnum; + onDecodeMethodChange?: (method: DecodeMethodEnum) => void; + decodeTooltipVisible?: boolean; + onDecodeTooltipVisibilityChange?: (isVisible: boolean) => void; +} + +export function SignTransactionsAdvanced(props: SignTransactionsAdvancedPropsType) { + const { decodeMethod, onDecodeMethodChange, decodeTooltipVisible, onDecodeTooltipVisibilityChange } = props; + const { needsSigning, gasPriceOptions, gasLimit, gasPrice, egldLabel, gasPriceOption } = state.commonData; + + return ( +
+
+
+
+ Gas Price + + {gasPrice} {egldLabel} + +
+
+ {gasPriceOptions?.map(({ label, value }) => { + const isActive = gasPriceOption?.toString() === value.toString(); + + return ( + + ); + })} +
+
+ Gas Limit + {gasLimit} +
+
+
+ + +
+ ); +} + diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/SignTransactionsAdvancedData.tsx b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/SignTransactionsAdvancedData.tsx new file mode 100644 index 00000000..1e08ba37 --- /dev/null +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/SignTransactionsAdvancedData.tsx @@ -0,0 +1,147 @@ +import { Fragment, h } from '@stencil/core'; +import { DecodeMethodEnum } from 'components/functional/sign-transactions-panel/sign-transactions-panel.types'; +import state from 'components/functional/sign-transactions-panel/signTransactionsPanelStore'; +import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; + +import styles from './signTransactionsAdvancedData.styles' + +import { getProcessedHighlightedData } from './helpers/getProcessedHighlightedData'; +import { SignTransactionsAdvancedDataDecode } from './components/SignTransactionsAdvancedDataDecode/SignTransactionsAdvancedDataDecode'; +import classNames from 'classnames'; +import { Tooltip } from 'common/Tooltip/Tooltip'; + +export interface IDataHightlight { + beforeHighlight?: string; + highlight: string; + afterHighlight?: string; +} + +interface SignTransactionsAdvancedDataPropsType { + decodeMethod?: DecodeMethodEnum; + onDecodeMethodChange?: (method: DecodeMethodEnum) => void; + decodeTooltipVisible?: boolean; + onDecodeTooltipVisibilityChange?: (isVisible: boolean) => void; +} + +export function SignTransactionsAdvancedData({ decodeMethod = DecodeMethodEnum.raw, onDecodeMethodChange, decodeTooltipVisible, onDecodeTooltipVisibilityChange }: SignTransactionsAdvancedDataPropsType) { + const { data, highlight } = state.commonData; + let highlightElement: HTMLElement; + + const setDecodeMethod = (method: DecodeMethodEnum) => { + if (onDecodeMethodChange) { + onDecodeMethodChange(method); + } + }; + + const getComputedDisplayData = (): IDataHightlight => { + if (decodeMethod === DecodeMethodEnum.raw) { + return !highlight || !data?.includes(highlight) + ? { highlight: data || '' } + : getProcessedHighlightedData({ data, highlightedData: highlight }); + } + + const { displayValue = '', highlight: decodedHighlight = '' } = state.commonData.decodedData + ? state.commonData.decodedData[decodeMethod] ?? {} + : {}; + + return !decodedHighlight || !displayValue.includes(decodedHighlight) + ? { highlight: displayValue } + : getProcessedHighlightedData({ data: displayValue, highlightedData: decodedHighlight }); + } + + const computedDisplayData = getComputedDisplayData(); + const { beforeHighlight, afterHighlight, highlight: highlightText } = computedDisplayData; + + if ((beforeHighlight || afterHighlight) && highlightElement) { + + const timeoutId = setTimeout(() => { + highlightElement?.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'nearest' }); + }); + + clearTimeout(timeoutId); + } + + return ( +
+
+
Data
+ + { + if (onDecodeTooltipVisibilityChange) { + onDecodeTooltipVisibilityChange(isVisible); + } + }} + isTooltipVisible={decodeTooltipVisible} + trigger={ + + } + > +
event.stopPropagation()} + > + {Object.values(DecodeMethodEnum).map((method: DecodeMethodEnum) => ( +
setDecodeMethod(method)} + data-testid={DataTestIdsEnum.signTransactionsAdvancedDataDecodeOption} + class={{ + [styles.signTransactionsAdvancedDataDecodeOption]: true, + [styles.signTransactionsAdvancedDataDecodeOptionActive]: method === decodeMethod, + }} + > + {method} +
+ ))} +
+
+
+ +
+
+ {beforeHighlight || afterHighlight ? ( + + {beforeHighlight && ( +
+ {beforeHighlight} +
+ )} + +
(highlightElement = el)} + > + {highlightText} +
+ + {afterHighlight && ( +
+ {afterHighlight} +
+ )} +
+ ) : ( +
+ {highlightText} +
+ )} +
+
+
+ ); +} + diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/components/SignTransactionsAdvancedDataDecode/SignTransactionsAdvancedDataDecode.tsx b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/components/SignTransactionsAdvancedDataDecode/SignTransactionsAdvancedDataDecode.tsx new file mode 100644 index 00000000..38447659 --- /dev/null +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/components/SignTransactionsAdvancedDataDecode/SignTransactionsAdvancedDataDecode.tsx @@ -0,0 +1,44 @@ +import { h } from '@stencil/core'; +import classNames from 'classnames'; +import { Icon } from 'common/Icon'; +import { DecodeMethodEnum } from 'components/functional/sign-transactions-panel/sign-transactions-panel.types'; +import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; + +// prettier-ignore +const styles = { + signTransactionsAdvancedDataDecode: 'sign-transactions-advanced-data-decode mvx:relative mvx:flex mvx:justify-center mvx:items-end mvx:gap-1 mvx:px-3 mvx:pt-4 mvx:-mt-4 mvx:mb-2 mvx:w-22 mvx:cursor-pointer mvx:capitalize mvx:leading-none mvx:before:absolute mvx:before:left-0 mvx:before:right-0 mvx:before:top-2.5 mvx:before:h-6 mvx:before:opacity-90 mvx:before:rounded-3xl mvx:before:bg-select mvx:before:content-[""]', + signTransactionsAdvancedDataDecodeLabel: 'sign-transactions-advanced-data-decode-label mvx:relative mvx:text-xs mvx:capitalize mvx:m-auto mvx:z-1 mvx:text-select-tx', + signTransactionsAdvancedDataDecodeIcon: 'sign-transactions-advanced-data-decode-icon mvx:ml-auto mvx:flex mvx:w-4 mvx:h-2.5 mvx:text-secondary-text', + icon: 'mvx:transition-all mvx:duration-200 mvx:ease-in-out mvx:relative mvx:h-3! mvx:w-auto!', + iconRotated: 'mvx:rotate-90', +} satisfies Record; + +interface SignTransactionsAdvancedDataDecodePropsType { + isToggled: boolean; + currentDecodeMethod: DecodeMethodEnum; +} + +export function SignTransactionsAdvancedDataDecode({ isToggled = false, currentDecodeMethod = DecodeMethodEnum.decimal }: SignTransactionsAdvancedDataDecodePropsType) { + return ( +
+
+ {currentDecodeMethod} +
+ + +
+ ); +} + diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/helpers/getProcessedHighlightedData.ts b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/helpers/getProcessedHighlightedData.ts similarity index 88% rename from src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/helpers/getProcessedHighlightedData.ts rename to src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/helpers/getProcessedHighlightedData.ts index 334d95c6..9489b448 100644 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/helpers/getProcessedHighlightedData.ts +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/helpers/getProcessedHighlightedData.ts @@ -1,4 +1,4 @@ -import type { IDataHightlight } from '../sign-transactions-advanced-data'; +import type { IDataHightlight } from '../SignTransactionsAdvancedData'; interface IGetProcessedHighlightedData { data: string; diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/signTransactionsAdvancedData.styles.ts b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/signTransactionsAdvancedData.styles.ts new file mode 100644 index 00000000..730b5d1a --- /dev/null +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/signTransactionsAdvancedData.styles.ts @@ -0,0 +1,15 @@ +// prettier-ignore +export default { + signTransactionsAdvancedDataContainer: 'sign-transactions-advanced-data-container mvx:flex mvx:flex-col mvx:w-full', + signTransactionsAdvancedData: 'sign-transactions-advanced-data mvx:flex mvx:flex-col mvx:gap-2 mvx:w-full mvx:p-3', + signTransactionsAdvancedDataTop: 'sign-transactions-advanced-data-top mvx:flex mvx:justify-between mvx:items-center mvx:px-2', + signTransactionsAdvancedDataLabel: 'sign-transactions-advanced-data-label mvx:text-base mvx:leading-none mvx:text-right mvx:text-secondary-text', + signTransactionsAdvancedDataDecodeOptions: 'sign-transactions-advanced-data-decode-options mvx:text-base mvx:-m-1 mvx:gap-1 mvx:flex mvx:flex-col', + signTransactionsAdvancedDataDecodeOption: 'sign-transactions-advanced-data-decode-option mvx:capitalize mvx:text-center mvx:leading-none mvx:cursor-pointer mvx:transition-all mvx:duration-200 mvx:ease-in-out mvx:px-3 mvx:py-2 mvx:text-xs mvx:rounded-lg mvx:hover:bg-select-option mvx:hover:text-accent mvx:focus:bg-select-option mvx:focus:text-accent mvx:active:bg-select-option mvx:active:text-accent mvx:hover:md:bg-select-option-mobile mvx:hover:md:text-select-option-text mvx:focus:md:bg-select-option-mobile mvx:focus:md:text-select-option-text mvx:active:md:bg-select-option-mobile mvx:active:md:text-select-option-text', + signTransactionsAdvancedDataDecodeOptionActive: 'sign-transactions-advanced-data-decode-option-active mvx:bg-select-option mvx:text-accent mvx:md:bg-select-option-mobile mvx:md:text-select-option-text', + signTransactionsAdvancedDataBottom: 'sign-transactions-advanced-data-bottom mvx:flex-1 mvx:relative', + signTransactionsAdvancedDataWrapper: 'sign-transactions-advanced-data-wrapper mvx:h-30 mvx:p-2 mvx:rounded-lg mvx:overflow-auto mvx:flex mvx:flex-col mvx:break-words mvx:text-base mvx:border mvx:border-neutral-800 mvx:before:left-px mvx:before:top-px mvx:before:bottom-px mvx:before:border-7 mvx:before:border-transparent mvx:before:border-b-10 mvx:before:border-t-10 mvx:before:content-[""] mvx:before:absolute mvx:before:pointer-events-none mvx:before:right-4 mvx:before:border-l-0 mvx:before:rounded-lg mvx:before:border-r-0 mvx:scrollbar-horizontal', + signTransactionsAdvancedDataText: 'sign-transactions-advanced-data-text mvx:text-secondary-text', + signTransactionsAdvancedDataHighlight: 'sign-transactions-advanced-data-highlight mvx:text-primary', + signTransactionsAdvancedDataHighlightBolded: 'sign-transactions-advanced-data-highlight-bolded mvx:font-medium' +} satisfies Record; \ No newline at end of file diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/signTransactionsAdvanced.styles.ts b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/signTransactionsAdvanced.styles.ts new file mode 100644 index 00000000..248ce792 --- /dev/null +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/signTransactionsAdvanced.styles.ts @@ -0,0 +1,18 @@ +// prettier-ignore +export default { + signTransactionsAdvancedDetails: 'sign-transactions-advanced-details mvx:flex mvx:flex-col mvx:items-start mvx:w-full mvx:bg-accent-variant mvx:rounded-2xl mvx:pb-3', + signTransactionsAdvancedContent: 'sign-transactions-advanced-content mvx:flex mvx:flex-col mvx:items-start mvx:self-stretch mvx:flex-nowrap mvx:shrink-0 mvx:gap-1 mvx:relative', + signTransactionsGasSettings: 'sign-transactions-gas-settings mvx:w-full mvx:p-1', + signTransactionsGasWrapper: 'sign-transactions-gas-wrapper mvx:flex mvx:flex-col mvx:gap-4 mvx:py-7.5 mvx:px-5 mvx:rounded-xl mvx:relative mvx:before:absolute mvx:before:opacity-60 mvx:before:top-0 mvx:before:bottom-0 mvx:before:left-0 mvx:before:right-0 mvx:before:transition-all mvx:before:duration-200 mvx:before:rounded-xl mvx:before:pointer-events-none mvx:before:ease-in-out mvx:before:content-[""] mvx:before:bg-tertiary', + signTransactionsGasHeader: 'sign-transactions-gas-header mvx:flex mvx:items-center mvx:justify-between mvx:w-full', + signTransactionsGasPrice: 'sign-transactions-gas-price mvx:text-secondary-text mvx:text-sm mvx:font-normal mvx:leading-5 mvx:relative mvx:z-1', + signTransactionsGasPriceValue: 'sign-transactions-gas-price-value mvx:text-secondary-text mvx:text-sm mvx:font-medium mvx:leading-5 mvx:relative mvx:z-1', + signTransactionsGasSpeedSelector: 'sign-transactions-gas-speed-selector mvx:flex mvx:items-center mvx:gap-1 mvx:p-0.5 mvx:bg-accent-variant mvx:rounded-3xl mvx:relative mvx:z-1', + signTransactionsSpeedOption: 'sign-transactions-speed-option mvx:flex mvx:items-center mvx:justify-center mvx:flex-1 mvx:py-1 mvx:px-3 mvx:rounded-2xl mvx:cursor-pointer', + signTransactionsSpeedOptionActive: 'sign-transactions-speed-option-active mvx:bg-button-bg-primary', + signTransactionsSpeedText: 'sign-transactions-speed-text mvx:text-sm mvx:font-normal mvx:leading-5 mvx:text-secondary-text', + signTransactionsSpeedOptionActiveSpeedText: 'sign-transactions-speed-option-active-speed-text mvx:!text-button-primary', + signTransactionsGasLimitRow: 'sign-transactions-gas-limit-row mvx:flex mvx:items-center mvx:justify-between mvx:w-full', + signTransactionsGasLimit: 'sign-transactions-gas-limit mvx:text-secondary-text mvx:text-sm mvx:font-normal mvx:leading-5 mvx:relative mvx:z-1', + signTransactionsGasLimitValue: 'sign-transactions-gas-limit-value mvx:text-secondary-text mvx:text-sm mvx:font-medium mvx:leading-5 mvx:relative mvx:z-1' +} satisfies Record; \ No newline at end of file diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/SignTransactionsFooter.tsx b/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/SignTransactionsFooter.tsx new file mode 100644 index 00000000..7b1f40e0 --- /dev/null +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/SignTransactionsFooter.tsx @@ -0,0 +1,160 @@ +import { Fragment, h } from '@stencil/core'; +import classNames from 'classnames'; +import { Icon } from 'common/Icon'; +import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; + +import state from '../../signTransactionsPanelStore'; +import styles from './signTransactionsFooter.styles'; +import { CopyButton } from 'common/CopyButton/CopyButton'; +import { Tooltip } from 'common/Tooltip/Tooltip'; +import { Button } from 'common/Button/Button'; +import { ExplorerLink } from 'common/ExplorerLink/ExplorerLink'; +import { Trim } from 'common/Trim/Trim'; + +let isWaitingForSignature: boolean = false; +let lastCommonData = { ...state.commonData }; + +interface SignTransactionsFooterPropsType { + tooltipVisible?: boolean; + onTooltipVisibilityChange?: (visible: boolean) => void; + isSuccessOnCopy?: boolean; + handleCopyButtonClick?: (event: MouseEvent, text?: string) => void; +} + +export function SignTransactionsFooter({ tooltipVisible, onTooltipVisibilityChange, isSuccessOnCopy, handleCopyButtonClick }: SignTransactionsFooterPropsType) { + const currentCommonData = { ...state.commonData }; + const hasChanged = JSON.stringify(currentCommonData) !== JSON.stringify(lastCommonData); + + if (hasChanged && isWaitingForSignature) { + // Reset the waiting state when data changes + isWaitingForSignature = false; + } + + lastCommonData = currentCommonData; + + const handleSignClick = () => { + if (state.onConfirm) { + isWaitingForSignature = true; + state.onConfirm(); + } + }; + + const { onCancel, onBack, onNext } = state; + const { currentIndex, currentIndexToSign, needsSigning, username, address, explorerLink, providerName } = + state.commonData; + + const isFirstTransaction = currentIndex === 0; + const currentIndexNeedsSigning = currentIndex === currentIndexToSign; + const currentIndexCannotBeSignedYet = currentIndex > currentIndexToSign; + const showForwardAction = currentIndexNeedsSigning || currentIndexCannotBeSignedYet; + const checkButtonText = providerName ? `Check ${providerName}` : 'Check your device'; + + return ( +
+
+
+
+ +
+ +
+ {currentIndexCannotBeSignedYet && ( +
event.stopPropagation()} + > + + } + > + {needsSigning ? ( + + You cannot sign this transaction yet,
please go back and sign consecutively. +
+ ) : ( + + You cannot confirm this transaction yet,
+ please go back and confirm consecutively. +
+ )} +
+
+ )} + + +
+
+ +
+
Sign with
+ + {username && ( +
+ @ + {username} +
+ )} + + {!username && address && ( + + )} + + handleCopyButtonClick?.(event, username ?? address)} /> + +
+
+
+ ); +} diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/signTransactionsFooter.styles.ts b/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/signTransactionsFooter.styles.ts new file mode 100644 index 00000000..6451208a --- /dev/null +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/signTransactionsFooter.styles.ts @@ -0,0 +1,21 @@ +export default { + signTransactionsFooterContainer: 'sign-transactions-footer-container mvx:flex mvx:flex-col mvx:flex-1 mvx:h-full', + signTransactionsFooter: 'sign-transactions-footer mvx:mt-auto mvx:flex mvx:flex-col mvx:items-center mvx:pt-5 mvx:gap-5 mvx:text-center', + signTransactionsFooterButtons: 'sign-transactions-footer-buttons mvx:flex mvx:items-center mvx:w-full mvx:gap-3', + signTransactionsFooterButtonWrapper: 'sign-transactions-footer-button-wrapper mvx:relative mvx:flex mvx:flex-col mvx:flex-1', + signTransactionsFooterButtonWrapperCancel: 'sign-transactions-footer-button-wrapper-cancel mvx:w-32 mvx:max-w-32', + signTransactionsFooterButtonTooltipWrapper: 'sign-transactions-footer-button-tooltip-wrapper mvx:absolute mvx:inset-0', + signTransactionsFooterButton: 'sign-transactions-footer-button mvx:flex', + signTransactionsFooterButtonIcon: 'sign-transactions-footer-button-icon mvx:flex mvx:transition-all mvx:duration-200 mvx:ease-in-out', + signTransactionsFooterButtonIconLighter: 'sign-transactions-footer-button-icon-lighter mvx:fill-secondary-text', + signTransactionsFooterIdentity: 'sign-transactions-footer-identity mvx:max-w-64 mvx:flex mvx:items-center mvx:text-base mvx:gap-2 mvx:overflow-hidden', + signTransactionsFooterIdentityLabel: 'sign-transactions-footer-identity-label mvx:whitespace-nowrap mvx:text-secondary-text', + signTransactionsFooterIdentityAddress: 'sign-transactions-footer-identity-address mvx:text-primary', + signTransactionsTrimWrapper: 'sign-transactions-trim-wrapper mvx:items-end mvx:leading-none', + signTransactionsFooterIdentityUsername: 'sign-transactions-footer-identity-username mvx:flex mvx:items-center mvx:text-base mvx:text-primary', + signTransactionsFooterIdentityUsernamePrefix: 'sign-transactions-footer-identity-username-prefix mvx:text-accent', + signTransactionsFooterIdentityCopy: 'sign-transactions-footer-identity-copy mvx:text-primary', + signTransactionsButtonTooltip: 'sign-transactions-button-tooltip mvx:absolute mvx:top-0 mvx:h-12 mvx:left-0 mvx:right-0', + signTransactionsActionButton: 'sign-transactions-action-button mvx:text-base! mvx:w-full', + signTransactionsExplorerLinkIcon: 'sign-transactions-explorer-link-icon mvx:text-primary', +} satisfies Record; \ No newline at end of file diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsHeader/SignTransactionsHeader.tsx b/src/components/functional/sign-transactions-panel/components/SignTransactionsHeader/SignTransactionsHeader.tsx new file mode 100644 index 00000000..de889fa3 --- /dev/null +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsHeader/SignTransactionsHeader.tsx @@ -0,0 +1,104 @@ +import { h } from '@stencil/core'; +import { Icon } from 'common/Icon'; +import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; +import styles from './sign-transactions-header.styles'; + +interface SignTransactionsHeaderPropsType { + onBack: () => void; + onNext: () => void; + currentIndex: number; + transactionsCount: number; + origin: string; + showFavicon: boolean; +} + +const NUMBER_OF_TRANSACTIONS = 10; + +export function SignTransactionsHeader({ onBack, onNext, currentIndex, transactionsCount, origin, showFavicon }: SignTransactionsHeaderPropsType) { + return ( +
+ {transactionsCount > 1 && ( +
event.stopPropagation()} + > + + +
+
Transaction
+
= NUMBER_OF_TRANSACTIONS, + }} + > + {currentIndex + 1} +
+ +
of
+
= NUMBER_OF_TRANSACTIONS, + }} + > + {transactionsCount} +
+
+ + +
+ )} + +
+
Request from
+ + {showFavicon && ( +
+ favicon { + showFavicon = false; + }} + /> +
+ )} + + + {origin} + +
+
+ ); +} + diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-header/sign-transactions-header.styles.ts b/src/components/functional/sign-transactions-panel/components/SignTransactionsHeader/sign-transactions-header.styles.ts similarity index 93% rename from src/components/functional/sign-transactions-panel/components/sign-transactions-header/sign-transactions-header.styles.ts rename to src/components/functional/sign-transactions-panel/components/SignTransactionsHeader/sign-transactions-header.styles.ts index 20fb2f59..b2cbb595 100644 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-header/sign-transactions-header.styles.ts +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsHeader/sign-transactions-header.styles.ts @@ -1,6 +1,6 @@ // prettier-ignore export default { - signTransactionsHeader: 'sign-transactions-header mvx:flex mvx:flex-1 mvx:flex-col mvx:gap-5 mvx:py-5', + signTransactionsHeader: 'sign-transactions-header mvx:flex mvx:flex-col mvx:gap-5 mvx:py-5', signTransactionsHeaderPager: 'sign-transactions-header-pager mvx:flex mvx:relative mvx:rounded-2xl mvx:h-9 mvx:items-center mvx:px-5 mvx:justify-center mvx:mx-auto mvx:gap-5 mvx:bg-secondary', signTransactionsHeaderPagerIcon: 'sign-transactions-header-pager-icon mvx:w-auto mvx:ease-in-out mvx:duration-200 mvx:w-5 mvx:relative mvx:z-1 mvx:cursor-pointer mvx:flex mvx:items-center mvx:justify-center mvx:transition-all mvx:h-5 mvx:text-secondary-text mvx:hover:text-primary', signTransactionsHeaderPagerIconDisabled: 'sign-transactions-header-pager-icon-disabled mvx:pointer-events-none mvx:opacity-50', @@ -12,5 +12,5 @@ export default { signTransactionsHeaderOriginCentered: 'sign-transactions-header-origin-centered mvx:m-auto', signTransactionsHeaderOriginLabel: 'sign-transactions-header-origin-label mvx:text-secondary-text', signTransactionsHeaderOriginImage: 'sign-transactions-header-origin-image mvx:flex mvx:items-center mvx:rounded-3xl mvx:justify-center mvx:w-18 mvx:h-18 mvx:bg-neutral-950 mvx:border mvx:border-neutral-900', - signTransactionsHeaderOriginName:'sign-transactions-header-origin-name mvx:text-primary' + signTransactionsHeaderOriginName: 'sign-transactions-header-origin-name mvx:text-primary' } satisfies Record; diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/SignTransactionsOverview.tsx b/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/SignTransactionsOverview.tsx new file mode 100644 index 00000000..2cc83207 --- /dev/null +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/SignTransactionsOverview.tsx @@ -0,0 +1,115 @@ +import { h } from '@stencil/core'; +import { Icon } from 'common/Icon'; +import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; + +import { handleAmountResize } from '../../helpers'; +import classNames from 'classnames'; + +import styles from './signTransactionsOverview.styles'; +import { Trim } from 'common/Trim/Trim'; + +interface SignTransactionsOverviewPropsType { + identifier: string; + usdValue: string; + amount: string; + tokenIconUrl: string; + interactor: string; + interactorIconUrl: string; + action: string; + networkFee: string; + isApp: boolean; +} + +export function SignTransactionsOverview({ identifier, usdValue, amount, tokenIconUrl, interactor, interactorIconUrl, action, networkFee = '~$0.00078', isApp = false }: SignTransactionsOverviewPropsType) { + const setAmountValueRef = (el?: HTMLElement) => { + if (!el) { + return; + } + + requestAnimationFrame(() => handleAmountResize(el)); + }; + + return ( +
+
+
+
{isApp ? 'Amount' : 'Send'}
+
+
+
+ + {amount} {identifier} + +
+ {identifier !== 'USD' && ( +
+ {usdValue} +
+ )} +
+ {tokenIconUrl && ( +
+ {identifier} +
+ )} +
+
+ +
+
+ + + + +
+
+ +
+
{isApp ? 'App' : 'To'}
+
+ {interactorIconUrl && ( +
+ {interactor} +
+ )} + {interactor && ( + + )} +
+
+ {isApp && ( +
+
Action
+
+ {action} +
+
+ )} +
+ +
+
+
+ Network Fee +
+
+
+ {networkFee} +
+
+
+
+ ); +} + diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/signTransactionsOverview.styles.ts b/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/signTransactionsOverview.styles.ts new file mode 100644 index 00000000..65db8e5d --- /dev/null +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/signTransactionsOverview.styles.ts @@ -0,0 +1,33 @@ +// prettier-ignore +export default { + signTransactionsOverviewContainer: 'sign-transactions-overview-container mvx:flex mvx:flex-col mvx:w-full mvx:bg-accent-variant mvx:rounded-2xl mvx:overflow-hidden', + signTransactionsOverviewContent: 'sig-transactions-overview-content mvx:flex mvx:flex-col mvx:gap-1 mvx:p-1 mvx:relative', + signTransactionsDetailRow: 'sign-transactions-detail-row mvx:flex mvx:items-center mvx:py-4 mvx:px-5 mvx:bg-secondary mvx:relative mvx:overflow-hidden mvx:min-h-20', + signTransactionsAmountRow: 'sign-transactions-amount-row mvx:rounded-xl', + signTransactionsInteractorRow: 'sign-transactions-interactor-row mvx:rounded-xl mvx:relative mvx:z-5', + signTransactionsActionRow: 'sign-transactions-action-row mvx:pt-7 mvx:px-5 mvx:pb-2 mvx:rounded-bl-xl mvx:min-h-14 mvx:-mt-6 mvx:relative mvx:before:absolute mvx:before:opacity-60 mvx:before:top-0 mvx:before:bottom-0 mvx:before:left-0 mvx:before:right-0 mvx:before:transition-all mvx:before:duration-200 mvx:before:rounded-b-xl mvx:before:pointer-events-none mvx:before:ease-in-out mvx:before:content-[""] mvx:before:bg-tertiary', + signTransactionsDetailLabel: 'sign-transactions-detail-label mvx:text-secondary-text mvx:text-sm mvx:font-normal mvx:leading-5 mvx:relative mvx:z-1', + signTransactionsAmountDisplay: 'sign-transactions-amount-display mvx:flex mvx:items-center mvx:ml-auto mvx:gap-3 mvx:z-1', + signTransactionsAmountValueContainer: 'sign-transactions-amount-value-container mvx:flex mvx:flex-col mvx:items-end mvx:gap-1', + signTransactionsAmountValue: 'sign-transactions-amount-value mvx:text-xl mvx:font-medium mvx:text-primary mvx:-tracking-[0.24px] mvx:leading-6 mvx:text-right mvx:whitespace-nowrap', + signTransactionsIdentifier: 'sign-transactions-identifier mvx:text-sm mvx:text-primary', + signTransactionsUsdValue: 'sign-transactions-usd-value mvx:text-sm mvx:text-secondary-text', + signTransactionsTokenIcon: 'sign-transactions-token-icon mvx:w-10 mvx:h-10 mvx:rounded-xs mvx:overflow-hidden mvx:border mvx:border-neutral-700', + signTransactionsTokenIconImg: 'sign-transactions-token-icon-img mvx:w-full mvx:h-full mvx:object-cover', + signTransactionsInteractorInfo: 'sign-transactions-interactor-info mvx:flex mvx:items-center mvx:ml-auto mvx:gap-3 mvx:z-1', + signTransactionsInteractorIcon: 'sign-transactions-interactor-icon mvx:w-6 mvx:h-6 mvx:rounded-full mvx:overflow-hidden', + signTransactionsInteractorIconImg: 'sign-transactions-interactor-icon-img mvx:w-full mvx:h-full mvx:object-cover', + signTransactionsInteractorName: 'sign-transactions-interactor-name mvx:text-base mvx:font-normal mvx:text-primary mvx:-tracking-[0.16px] mvx:leading-5 mvx:!max-w-65', + signTransactionsDirection: 'sign-transactions-direction mvx:absolute mvx:flex mvx:flex-col mvx:items-center mvx:justify-center mvx:w-6 mvx:h-6 mvx:rounded-full mvx:left-5 mvx:z-10 mvx:bg-accent-variant', + signTransactionsDirectionIcon: 'sign-transactions-direction-icon mvx:flex mvx:flex-col mvx:items-center mvx:gap-px', + signTransactionsDirectionIconArrow: 'sign-transactions-direction-icon-arrow mvx:flex mvx:items-center mvx:justify-center mvx:relative mvx:shrink-0 mvx:w-3 mvx:basis-auto mvx:-mt-1 mvx:-mb-0.5 mvx:text-secondary-text', + signTransactionsDirectionIconArrowDown: 'sign-transactions-direction-icon-arrow-down mvx:-mt-0.5 mvx:-mb-1 mvx:order-1', + signTransactionsDirectionIconDot: 'sign-transactions-direction-icon-dot mvx:relative mvx:rounded-full mvx:w-0.5 mvx:h-0.5 mvx:bg-secondary-text', + signTransactionsActionValue: 'sign-transactions-action-value mvx:ml-auto mvx:text-sm mvx:font-medium mvx:text-secondary-text mvx:relative mvx:z-1', + signTransactionsFeeContainer: 'sign-transactions-fee-container mvx:py-2 mvx:px-6', + signTransactionsFeeRow: 'sign-transactions-fee-row mvx:flex mvx:items-center mvx:justify-between mvx:py-3 mvx:px-0', + signTransactionsFeeLabelContainer: 'sign-transactions-fee-label-container mvx:flex mvx:items-center mvx:gap-1', + signTransactionsFeeLabel: 'sign-transactions-fee-label mvx:text-secondary-text mvx:text-sm mvx:font-normal mvx:leading-5', + signTransactionsInfoIcon: 'sign-transactions-info-icon mvx:w-3.5 mvx:h-3.5 mvx:relative mvx:before:content-["ⓘ"] mvx:before:text-sm mvx:before:text-secondary-text mvx:before:absolute mvx:before:-top-0.5 mvx:before:left-0', + signTransactionsFeeValue: 'sign-transactions-fee-value mvx:text-primary mvx:text-sm mvx:font-normal mvx:leading-5' +} satisfies Record; \ No newline at end of file diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/components/sign-transactions-advanced-data-decode/sign-transactions-advanced-data-decode.scss b/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/components/sign-transactions-advanced-data-decode/sign-transactions-advanced-data-decode.scss deleted file mode 100644 index c8f50677..00000000 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/components/sign-transactions-advanced-data-decode/sign-transactions-advanced-data-decode.scss +++ /dev/null @@ -1,20 +0,0 @@ -.sign-transactions-advanced-data-decode { - @apply mvx:relative mvx:flex mvx:justify-center mvx:items-end mvx:gap-1 mvx:px-3 mvx:pt-4 mvx:-mt-4 mvx:mb-2; - @apply mvx:w-22 mvx:cursor-pointer mvx:capitalize mvx:leading-none; - - &:before { - @apply mvx:absolute mvx:left-0 mvx:right-0 mvx:top-2.5 mvx:h-6 mvx:opacity-90 mvx:rounded-3xl; - background-color: var(--mvx-select-bg); - content: ''; - } - - .sign-transactions-advanced-data-decode-label { - @apply mvx:relative mvx:text-xs mvx:capitalize mvx:m-auto mvx:z-1; - color: var(--mvx-select-color); - } - - .sign-transactions-advanced-data-decode-icon { - @apply mvx:ml-auto mvx:flex mvx:w-4 mvx:h-2.5; - color: var(--mvx-text-color-secondary); - } -} diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/components/sign-transactions-advanced-data-decode/sign-transactions-advanced-data-decode.tsx b/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/components/sign-transactions-advanced-data-decode/sign-transactions-advanced-data-decode.tsx deleted file mode 100644 index d50d85b8..00000000 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/components/sign-transactions-advanced-data-decode/sign-transactions-advanced-data-decode.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { Component, h, Prop } from '@stencil/core'; -import classNames from 'classnames'; -import { Icon } from 'common/Icon'; -import { DecodeMethodEnum } from 'components/functional/sign-transactions-panel/sign-transactions-panel.types'; -import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; - -const signTransactionsAdvancedDataDecodeClasses: Record = { - icon: 'mvx:transition-all mvx:duration-200 mvx:ease-in-out mvx:relative mvx:h-3! mvx:w-auto!', - iconRotated: 'mvx:rotate-90', -}; - -@Component({ - tag: 'mvx-sign-transactions-advanced-data-decode', - styleUrl: 'sign-transactions-advanced-data-decode.scss', - shadow: true, -}) -export class SignTransactionsAdvancedDataDecode { - @Prop() isToggled: boolean = false; - @Prop() currentDecodeMethod: DecodeMethodEnum = DecodeMethodEnum.decimal; - - render() { - return ( -
-
- {this.currentDecodeMethod} -
- - -
- ); - } -} diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/sign-transactions-advanced-data.scss b/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/sign-transactions-advanced-data.scss deleted file mode 100644 index f7bee7f2..00000000 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/sign-transactions-advanced-data.scss +++ /dev/null @@ -1,103 +0,0 @@ -:host { - @apply mvx:flex mvx:flex-col mvx:w-full; - - .sign-transactions-advanced-data { - @apply mvx:flex mvx:flex-col mvx:gap-2 mvx:w-full mvx:p-3; - - .sign-transactions-advanced-data-top { - @apply mvx:flex mvx:justify-between mvx:items-center mvx:px-2; - - .sign-transactions-advanced-data-label { - @apply mvx:text-base mvx:leading-none mvx:text-right; - color: var(--mvx-text-color-secondary); - } - - .sign-transactions-advanced-data-decode-options { - @apply mvx:text-base mvx:-m-1 mvx:gap-1 mvx:flex mvx:flex-col; - - .sign-transactions-advanced-data-decode-option { - @apply mvx:capitalize mvx:text-center mvx:leading-none mvx:cursor-pointer mvx:transition-all mvx:duration-200; - @apply mvx:ease-in-out mvx:px-3 mvx:py-2 mvx:text-xs mvx:rounded-lg; - - &:hover, - &:focus, - &.active { - background-color: var(--mvx-select-option-bg); - color: var(--mvx-text-accent-color); - - @media (min-width: 768px) { - background-color: var(--mvx-select-option-bg-mobile); - color: var(--mvx-select-option-color); - } - } - } - } - } - - .sign-transactions-advanced-data-bottom { - @apply mvx:flex-1 mvx:relative; - - .sign-transactions-advanced-data-wrapper { - @apply mvx:h-30 mvx:p-2 mvx:rounded-lg mvx:overflow-auto mvx:flex mvx:flex-col mvx:break-words mvx:text-base; - border: 1px solid var(--mvx-neutral-800); - - &::-webkit-scrollbar, - &::-webkit-scrollbar-track, - &::-webkit-scrollbar-track:hover, - &::-webkit-scrollbar-corner { - @apply mvx:bg-transparent; - } - - &::-webkit-scrollbar { - @apply mvx:w-4; - } - - &::-webkit-scrollbar-track, - &::-webkit-scrollbar-track:hover { - @apply mvx:bg-transparent mvx:bg-clip-padding; - border: 4px solid transparent; - border-radius: 9999px; - } - - &::-webkit-scrollbar-thumb, - &::-webkit-scrollbar-thumb:hover { - @apply mvx:bg-clip-padding; - border: 4px solid transparent; - background-color: var(--mvx-neutral-700); - border-radius: 9999px; - } - - &::-webkit-scrollbar-button { - @apply mvx:hidden; - } - - &::-webkit-resizer { - @apply mvx:bg-transparent; - } - - &:before { - @apply mvx:absolute mvx:pointer-events-none mvx:right-4 mvx:border-l-0 mvx:rounded-lg mvx:border-r-0; - left: 1px; - top: 1px; - bottom: 1px; - border: calc((24px + 4px) / 4) solid transparent; - border-bottom-width: calc(20px / 2); - border-top-width: calc(20px / 2); - content: ''; - } - - .sign-transactions-advanced-data-text { - color: var(--mvx-text-color-secondary); - } - - .sign-transactions-advanced-data-highlight { - color: var(--mvx-text-color-primary); - - &.bolded { - @apply mvx:font-medium; - } - } - } - } - } -} diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/sign-transactions-advanced-data.tsx b/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/sign-transactions-advanced-data.tsx deleted file mode 100644 index d5141cd9..00000000 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/components/sign-transactions-advanced-data/sign-transactions-advanced-data.tsx +++ /dev/null @@ -1,139 +0,0 @@ -import { Component, Fragment, h, Prop, State } from '@stencil/core'; -import { DecodeMethodEnum } from 'components/functional/sign-transactions-panel/sign-transactions-panel.types'; -import state from 'components/functional/sign-transactions-panel/signTransactionsPanelStore'; -import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; - -import { getProcessedHighlightedData } from './helpers/getProcessedHighlightedData'; - -export interface IDataHightlight { - beforeHighlight?: string; - highlight: string; - afterHighlight?: string; -} - -@Component({ - tag: 'mvx-sign-transactions-advanced-data', - styleUrl: 'sign-transactions-advanced-data.scss', - shadow: true, -}) -export class SignTransactionsAdvancedData { - private highlightElement: HTMLElement; - - @State() decodeMethod: DecodeMethodEnum = DecodeMethodEnum.raw; - @State() isDecodeTooltipOpen: boolean = false; - - @Prop() highlight?: string; - @Prop() data: string; - - setDecodeMethod(method: DecodeMethodEnum) { - this.decodeMethod = method; - } - - get computedDisplayData(): IDataHightlight { - if (this.decodeMethod === DecodeMethodEnum.raw) { - return !this.highlight || !this.data.includes(this.highlight) - ? { highlight: this.data } - : getProcessedHighlightedData({ data: this.data, highlightedData: this.highlight }); - } - - const { displayValue = '', highlight = '' } = state.commonData.decodedData - ? state.commonData.decodedData[this.decodeMethod] ?? {} - : {}; - - return !highlight || !displayValue.includes(highlight) - ? { highlight: displayValue } - : getProcessedHighlightedData({ data: displayValue, highlightedData: highlight }); - } - - componentDidRender() { - const { beforeHighlight, afterHighlight } = this.computedDisplayData; - - if ((beforeHighlight || afterHighlight) && this.highlightElement) { - this.highlightElement.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'nearest' }); - } - } - - render() { - const { beforeHighlight, afterHighlight, highlight } = this.computedDisplayData; - - return ( -
-
-
Data
- - { - this.isDecodeTooltipOpen = event.detail; - }} - trigger={ - - } - > -
event.stopPropagation()} - > - {Object.values(DecodeMethodEnum).map((decodeMethod: DecodeMethodEnum) => ( -
this.setDecodeMethod(decodeMethod)} - data-testid={DataTestIdsEnum.signTransactionsAdvancedDataDecodeOption} - class={{ - 'sign-transactions-advanced-data-decode-option': true, - 'active': decodeMethod === this.decodeMethod, - }} - > - {decodeMethod} -
- ))} -
-
-
- -
-
- {beforeHighlight || afterHighlight ? ( - - {beforeHighlight && ( -
- {beforeHighlight} -
- )} - -
(this.highlightElement = el)} - > - {highlight} -
- - {afterHighlight && ( -
- {afterHighlight} -
- )} -
- ) : ( -
- {highlight} -
- )} -
-
-
- ); - } -} diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/sign-transactions-advanced.scss b/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/sign-transactions-advanced.scss deleted file mode 100644 index 74742dd6..00000000 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/sign-transactions-advanced.scss +++ /dev/null @@ -1,127 +0,0 @@ -.advanced-details { - display: flex; - flex-direction: column; - align-items: flex-start; - width: 100%; - background: var(--mvx-bg-accent-variant-color); - border-radius: 16px; - padding-bottom: 12px; -} - -.advanced-content { - display: flex; - flex-direction: column; - align-items: flex-start; - align-self: stretch; - flex-wrap: nowrap; - flex-shrink: 0; - gap: 4px; - position: relative; -} - -.gas-settings { - width: 100%; - padding: 4px; -} - -.gas-wrapper { - display: flex; - flex-direction: column; - gap: 16px; - padding: 30px 20px; - border-radius: 12px; - position: relative; - - &:before { - @apply mvx:absolute mvx:opacity-60 mvx:top-0 mvx:bottom-0 mvx:left-0 mvx:right-0 mvx:transition-all mvx:duration-200 mvx:rounded-xl; - @apply mvx:pointer-events-none mvx:ease-in-out; - content: ''; - background: var(--mvx-bg-color-tertiary); - } -} - -.gas-header { - display: flex; - align-items: center; - justify-content: space-between; - width: 100%; -} - -.gas-price { - color: var(--mvx-text-color-secondary); - font-size: 14px; - font-weight: 400; - line-height: 20px; - position: relative; - z-index: 1; -} - -.gas-price-value { - color: var(--mvx-text-color-secondary); - font-size: 14px; - font-weight: 500; - line-height: 20px; - position: relative; - z-index: 1; -} - -.gas-speed-selector { - display: flex; - align-items: center; - gap: 4px; - padding: 2px; - background: var(--mvx-bg-accent-variant-color); - border-radius: 20px; - position: relative; - z-index: 1; -} - -.speed-option { - display: flex; - align-items: center; - justify-content: center; - flex: 1; - padding: 4px 12px; - border-radius: 18px; - cursor: pointer; -} - -.speed-option.active { - background: var(--mvx-button-bg-primary); -} - -.speed-text { - font-size: 14px; - font-weight: 400; - line-height: 20px; - color: var(--mvx-text-color-secondary); -} - -.speed-option.active .speed-text { - color: var(--mvx-button-text-primary); -} - -.gas-limit-row { - display: flex; - align-items: center; - justify-content: space-between; - width: 100%; -} - -.gas-limit { - color: var(--mvx-text-color-secondary); - font-size: 14px; - font-weight: 400; - line-height: 20px; - position: relative; - z-index: 1; -} - -.gas-limit-value { - color: var(--mvx-text-color-secondary); - font-size: 14px; - font-weight: 500; - line-height: 20px; - position: relative; - z-index: 1; -} diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/sign-transactions-advanced.tsx b/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/sign-transactions-advanced.tsx deleted file mode 100644 index 9939f68c..00000000 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-advanced/sign-transactions-advanced.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { Component, h, Prop, State } from '@stencil/core'; -import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; - -import { DecodeMethodEnum } from '../../sign-transactions-panel.types'; -import state from '../../signTransactionsPanelStore'; - -@Component({ - tag: 'mvx-sign-transactions-advanced', - styleUrl: 'sign-transactions-advanced.scss', - shadow: true, -}) -export class SignTransactionsAdvanced { - @Prop() data: string; - @Prop() highlight?: string; - - @State() decodeMethod: DecodeMethodEnum = DecodeMethodEnum.raw; - - setDecodeMethod(method: DecodeMethodEnum) { - this.decodeMethod = method; - } - - render() { - const { - commonData: { needsSigning, gasPriceOptions, gasLimit, gasPrice, egldLabel, gasPriceOption }, - } = state; - - return ( -
-
-
-
- Gas Price - - {gasPrice} {egldLabel} - -
-
- {gasPriceOptions.map(({ label, value }) => ( - - ))} -
-
- Gas Limit - {gasLimit} -
-
-
- - -
- ); - } -} diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-footer/sign-transactions-footer.scss b/src/components/functional/sign-transactions-panel/components/sign-transactions-footer/sign-transactions-footer.scss deleted file mode 100644 index 6b3ce95f..00000000 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-footer/sign-transactions-footer.scss +++ /dev/null @@ -1,67 +0,0 @@ -:host { - @apply mvx:flex mvx:flex-col mvx:flex-1; - - .sign-transactions-footer { - @apply mvx:mt-auto mvx:flex mvx:flex-col mvx:items-center mvx:pt-5 mvx:gap-5 mvx:text-center; - - .sign-transactions-footer-buttons { - @apply mvx:flex mvx:items-center mvx:w-full mvx:gap-3; - - .sign-transactions-footer-button-wrapper { - @apply mvx:relative mvx:flex mvx:flex-col mvx:flex-1; - - &.cancel { - @apply mvx:w-32 mvx:max-w-32; - } - - .sign-transactions-footer-button-tooltip-wrapper { - @apply mvx:absolute mvx:inset-0; - } - - .sign-transactions-footer-button { - @apply mvx:flex; - - .sign-transactions-footer-button-icon { - @apply mvx:flex mvx:transition-all mvx:duration-200 mvx:ease-in-out; - - &.lighter { - fill: var(--mvx-text-color-secondary); - } - } - } - } - } - - .sign-transactions-footer-identity { - @apply mvx:max-w-64 mvx:flex mvx:items-center mvx:text-base mvx:gap-2; - - .sign-transactions-footer-identity-label { - @apply mvx:whitespace-nowrap; - color: var(--mvx-text-color-secondary); - } - - .sign-transactions-footer-identity-address { - @apply mvx:relative mvx:min-w-0 mvx:max-w-none; - top: 0.25px; - color: var(--mvx-text-color-primary); - - .trim-wrapper { - @apply mvx:items-end mvx:leading-none; - } - } - - .sign-transactions-footer-identity-username { - @apply mvx:flex mvx:items-center mvx:text-base; - color: var(--mvx-text-color-primary); - - .sign-transactions-footer-identity-username-prefix { - color: var(--mvx-text-accent-color); - } - } - - .sign-transactions-footer-identity-copy { - color: var(--mvx-text-color-primary); - } - } - } -} diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-footer/sign-transactions-footer.tsx b/src/components/functional/sign-transactions-panel/components/sign-transactions-footer/sign-transactions-footer.tsx deleted file mode 100644 index 2bc8a967..00000000 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-footer/sign-transactions-footer.tsx +++ /dev/null @@ -1,179 +0,0 @@ -import { Component, Fragment, h, State } from '@stencil/core'; -import classNames from 'classnames'; -import { Icon } from 'common/Icon'; -import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; - -import state from '../../signTransactionsPanelStore'; - -const signTransactionsFooterClasses: Record = { - buttonTooltip: 'mvx:absolute mvx:top-0 mvx:h-12 mvx:left-0 mvx:right-0', - actionButton: 'mvx:text-base! mvx:w-full', - explorerLinkIcon: 'mvx:fill-link!', -}; - -@Component({ - tag: 'mvx-sign-transactions-footer', - styleUrl: 'sign-transactions-footer.scss', - shadow: true, -}) -export class SignTransactionsFooter { - @State() awaitsExternalConfirmation: boolean = false; - @State() isWaitingForSignature: boolean = false; - @State() lastCommonData = { ...state.commonData }; - - componentWillLoad() { - this.lastCommonData = { ...state.commonData }; - } - - componentWillRender() { - const currentCommonData = { ...state.commonData }; - const hasChanged = JSON.stringify(currentCommonData) !== JSON.stringify(this.lastCommonData); - - if (hasChanged && this.isWaitingForSignature) { - // Reset the waiting state when data changes - this.isWaitingForSignature = false; - } - - this.lastCommonData = currentCommonData; - } - - private handleSignClick = () => { - if (state.onConfirm) { - this.isWaitingForSignature = true; - state.onConfirm(); - } - }; - - render() { - const { onCancel, onBack, onNext } = state; - const { currentIndex, currentIndexToSign, needsSigning, username, address, explorerLink, providerName } = - state.commonData; - - const isFirstTransaction = currentIndex === 0; - const currentIndexNeedsSigning = currentIndex === currentIndexToSign; - const currentIndexCannotBeSignedYet = currentIndex > currentIndexToSign; - const showForwardAction = currentIndexNeedsSigning || currentIndexCannotBeSignedYet; - const checkButtonText = providerName ? `Check ${providerName}` : 'Check your device'; - - return ( - - ); - } -} diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-header/sign-transactions-header.tsx b/src/components/functional/sign-transactions-panel/components/sign-transactions-header/sign-transactions-header.tsx deleted file mode 100644 index 2140df0d..00000000 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-header/sign-transactions-header.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import { Component, h, State } from '@stencil/core'; -import { Icon } from 'common/Icon'; -import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; - -import state from '../../signTransactionsPanelStore'; -import styles from './sign-transactions-header.styles'; - -@Component({ - tag: 'mvx-sign-transactions-header', - styleUrl: 'sign-transactions-header.scss', - shadow: true, -}) -export class SignTransactionsHeader { - @State() showFavicon: boolean = true; - - render() { - const { onBack, onNext } = state; - const { currentIndex, transactionsCount, origin } = state.commonData; - - return ( -
- {transactionsCount > 1 && ( -
event.stopPropagation()} - > - - -
-
Transaction
-
= 10, - }} - > - {currentIndex + 1} -
- -
of
-
= 10, - }} - > - {transactionsCount} -
-
- - -
- )} - -
-
Request from
- - {this.showFavicon && ( -
- favicon { - this.showFavicon = false; - }} - /> -
- )} - - - {origin} - -
-
- ); - } -} diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-overview/sign-transactions-overview.scss b/src/components/functional/sign-transactions-panel/components/sign-transactions-overview/sign-transactions-overview.scss deleted file mode 100644 index 06987750..00000000 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-overview/sign-transactions-overview.scss +++ /dev/null @@ -1,224 +0,0 @@ -/* Transaction Overview container */ -.overview-container { - display: flex; - flex-direction: column; - width: 100%; - background: var(--mvx-bg-accent-variant-color); - border-radius: 16px; - overflow: hidden; -} - -.overview-content { - display: flex; - flex-direction: column; - gap: 4px; - padding: 4px; - position: relative; -} - -/* Common row styles */ -.detail-row { - display: flex; - align-items: center; - padding: 16px 20px; - background: var(--mvx-bg-color-secondary); - position: relative; - overflow: hidden; - min-height: 80px; -} - -.amount-row { - border-radius: 12px; -} - -.interactor-row { - border-radius: 12px; - position: relative; - z-index: 5; -} - -.action-row { - padding: 28px 20px 8px 20px; - border-radius: 0 0 12px 12px; - min-height: 56px; - margin-top: -24px; - position: relative; - - &:before { - @apply mvx:absolute mvx:opacity-60 mvx:top-0 mvx:bottom-0 mvx:left-0 mvx:right-0 mvx:transition-all mvx:duration-200; - @apply mvx:rounded-b-xl mvx:pointer-events-none mvx:ease-in-out; - content: ''; - background: var(--mvx-bg-color-tertiary); - } -} - -.detail-label { - color: var(--mvx-text-color-secondary); - font-size: 14px; - font-weight: 400; - line-height: 20px; - position: relative; - z-index: 1; -} - -/* Amount section */ -.amount-display { - display: flex; - align-items: center; - margin-left: auto; - gap: 12px; - z-index: 1; -} - -.amount-value-container { - display: flex; - flex-direction: column; - align-items: flex-end; - gap: 4px; -} - -.amount-value { - font-size: 24px; - font-weight: 500; - color: var(--mvx-text-color-primary); - letter-spacing: -0.24px; - line-height: 24px; - text-align: right; - white-space: nowrap; -} - -.identifier { - font-size: 14px; - color: var(--mvx-text-color-primary); -} - -.usd-value { - font-size: 14px; - color: var(--mvx-text-color-secondary); -} - -.token-icon { - width: 40px; - height: 40px; - border-radius: 2px; - overflow: hidden; - border: 1px solid var(--mvx-neutral-700); -} - -.token-icon img { - width: 100%; - height: 100%; - object-fit: cover; -} - -/* Interactor section */ -.interactor-info { - display: flex; - align-items: center; - margin-left: auto; - gap: 12px; - z-index: 1; -} - -.interactor-icon { - width: 24px; - height: 24px; - border-radius: 50%; - overflow: hidden; -} - -.interactor-icon img { - width: 100%; - height: 100%; - object-fit: cover; -} - -.interactor-name { - font-size: 16px; - font-weight: 400; - color: var(--mvx-text-color-primary); - letter-spacing: -0.16px; - line-height: 22px; - max-width: 300px; -} - -.sign-transactions-direction { - @apply mvx:absolute mvx:flex mvx:flex-col mvx:items-center mvx:justify-center mvx:w-6 mvx:h-6 mvx:rounded-full mvx:left-5 mvx:z-10; - background: var(--mvx-bg-accent-variant-color); - top: calc(50% - 12px); - - .sign-transactions-direction-icon { - @apply mvx:flex mvx:flex-col mvx:items-center mvx:gap-px; - - .sign-transactions-direction-icon-arrow { - @apply mvx:flex mvx:items-center mvx:justify-center mvx:relative mvx:shrink-0 mvx:w-3 mvx:basis-auto mvx:-mt-1 mvx:-mb-0.5; - color: var(--mvx-text-color-secondary); - - &.down { - @apply mvx:-mt-0.5 mvx:-mb-1 mvx:order-1; - } - } - - .sign-transactions-direction-icon-dot { - @apply mvx:relative mvx:rounded-full mvx:w-0.5 mvx:h-0.5; - background-color: var(--mvx-text-color-secondary); - } - } -} - -/* Action section */ -.action-value { - margin-left: auto; - font-size: 14px; - font-weight: 500; - color: var(--mvx-text-color-secondary); - position: relative; - z-index: 1; -} - -/* Fee section */ -.fee-container { - padding: 8px 24px; -} - -.fee-row { - display: flex; - align-items: center; - justify-content: space-between; - padding: 12px 0; -} - -.fee-label-container { - display: flex; - align-items: center; - gap: 4px; -} - -.fee-label { - color: var(--mvx-text-color-secondary); - font-size: 14px; - font-weight: 400; - line-height: 19.6px; -} - -.info-icon { - width: 14px; - height: 14px; - position: relative; -} - -.info-icon::before { - content: 'ⓘ'; - font-size: 14px; - color: var(--mvx-text-color-secondary); - position: absolute; - top: -2px; - left: 0; -} - -.fee-value { - color: var(--mvx-text-color-primary); - font-size: 14px; - font-weight: 400; - line-height: 20px; -} diff --git a/src/components/functional/sign-transactions-panel/components/sign-transactions-overview/sign-transactions-overview.tsx b/src/components/functional/sign-transactions-panel/components/sign-transactions-overview/sign-transactions-overview.tsx deleted file mode 100644 index 0c9289ac..00000000 --- a/src/components/functional/sign-transactions-panel/components/sign-transactions-overview/sign-transactions-overview.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import { Component, h, Prop } from '@stencil/core'; -import { Icon } from 'common/Icon'; -import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; - -import { handleAmountResize } from '../../helpers'; - -@Component({ - tag: 'mvx-sign-transactions-overview', - styleUrl: 'sign-transactions-overview.scss', - shadow: true, -}) -export class SignTransactionsOverview { - @Prop() identifier: string; - @Prop() usdValue: string; - @Prop() amount: string; - @Prop() tokenIconUrl: string; - @Prop() interactor: string; - @Prop() interactorIconUrl: string; - @Prop() action: string; - @Prop() networkFee: string = '~$0.00078'; - @Prop() isApp: boolean = false; - - private amountValueRef: HTMLElement; - - componentDidRender() { - if (this.amountValueRef) { - requestAnimationFrame(() => handleAmountResize(this.amountValueRef)); - } - } - - render() { - return ( -
-
-
-
{this.isApp ? 'Amount' : 'Send'}
-
-
-
(this.amountValueRef = el)} - > - - {this.amount} {this.identifier} - -
- {this.identifier !== 'USD' && ( -
- {this.usdValue} -
- )} -
- {this.tokenIconUrl && ( -
- {this.identifier} -
- )} -
-
- -
-
- - - - -
-
- -
-
{this.isApp ? 'App' : 'To'}
-
- {this.interactorIconUrl && ( -
- {this.interactor} -
- )} - {this.interactor && ( - - )} -
-
- {this.isApp && ( -
-
Action
-
- {this.action} -
-
- )} -
- -
-
-
- Network Fee -
-
-
- {this.networkFee} -
-
-
-
- ); - } -} diff --git a/src/components/functional/sign-transactions-panel/helpers/handleAmountResize/handleAmountResize.ts b/src/components/functional/sign-transactions-panel/helpers/handleAmountResize/handleAmountResize.ts index 56d20f92..4ff63e98 100644 --- a/src/components/functional/sign-transactions-panel/helpers/handleAmountResize/handleAmountResize.ts +++ b/src/components/functional/sign-transactions-panel/helpers/handleAmountResize/handleAmountResize.ts @@ -7,7 +7,7 @@ export const handleAmountResize = (element: HTMLElement | null) => { const getFontSize = (element: HTMLElement) => parseInt(getComputedStyle(element).getPropertyValue('font-size')); const firstChild = element.firstChild as HTMLElement; - const maxWidth = 270; + const maxWidth = 250; const sizes = { parent: Math.min(element.offsetWidth, maxWidth), firstChild: getFontSize(firstChild), diff --git a/src/components/functional/sign-transactions-panel/sign-transactions-panel.scss b/src/components/functional/sign-transactions-panel/sign-transactions-panel.scss index ff99cd5c..1075ba99 100644 --- a/src/components/functional/sign-transactions-panel/sign-transactions-panel.scss +++ b/src/components/functional/sign-transactions-panel/sign-transactions-panel.scss @@ -1,115 +1,36 @@ -.header { - display: flex; - align-items: flex-start; - justify-content: space-between; - align-self: stretch; - flex-wrap: nowrap; - flex-shrink: 0; - position: relative; - min-width: 0; - padding: 24px 24px 12px 24px; +.trim { + @apply mvx:flex mvx:relative mvx:max-w-full mvx:overflow-hidden mvx:whitespace-nowrap; } -.frame { - display: flex; - align-items: center; - justify-content: flex-end; - flex-wrap: nowrap; - flex-shrink: 0; - position: relative; - width: 30px; - height: 30px; - padding: 0 0 0 0; +.trim-full { + @apply mvx:text-transparent mvx:absolute mvx:leading-5; } -.frame-1 { - display: flex; - flex-direction: column; - align-items: center; - flex-wrap: nowrap; - flex-grow: 1; - flex-shrink: 0; - flex-basis: 0; - gap: 4px; - position: relative; +.trim-full-visible { + @apply mvx:text-inherit mvx:relative mvx:leading-5; } -.frame-2 { - display: flex; - align-items: center; - justify-content: flex-end; - flex-wrap: nowrap; - flex-shrink: 0; - position: relative; - width: 30px; +.trim-wrapper { + @apply mvx:hidden; } -.mx-icon { - display: flex; - align-items: center; - justify-content: center; - flex-wrap: nowrap; - flex-shrink: 0; - position: relative; - width: 30px; - height: 30px; +.trim-wrapper-visible { + @apply mvx:overflow-hidden mvx:max-w-full mvx:flex; } -.transaction-navigation { - display: flex; - align-items: flex-start; - justify-content: center; - align-self: stretch; - flex-wrap: nowrap; - flex-shrink: 0; - gap: 10px; - position: relative; - min-width: 0; - padding: 0 24px 0 24px; +.trim-left-wrapper { + @apply mvx:flex-shrink mvx:text-ellipsis mvx:overflow-hidden mvx:text-left mvx:text-[1px]; } -.navigation-icon { - display: flex; - align-items: center; - justify-content: center; - flex-wrap: nowrap; - flex-shrink: 0; - position: relative; - width: 25px; - height: 25px; +.trim-left { + @apply mvx:select-none mvx:pointer-events-none mvx:inline mvx:text-base mvx:leading-5; } -.sign-transaction-content { - @apply mvx:flex mvx:flex-col mvx:items-center mvx:gap-2 mvx:relative mvx:min-w-0 mvx:self-stretch mvx:flex-nowrap mvx:shrink-0; - - .sign-transactions-tabs { - @apply mvx:px-4 mvx:gap-2 mvx:flex mvx:mr-auto; - - .sign-transactions-tab { - @apply mvx:px-4 mvx:h-8 mvx:flex mvx:items-center mvx:leading-none mvx:justify-center mvx:transition-all mvx:duration-200; - @apply mvx:ease-in-out mvx:cursor-pointer mvx:relative mvx:rounded-3xl; - color: var(--mvx-text-color-secondary); - - &:hover, - &.active { - color: var(--mvx-text-accent-color); - background-color: var(--mvx-bg-color-secondary); - } - - .sign-transactions-tab-text { - @apply mvx:text-base mvx:z-1 mvx:relative mvx:capitalize; - } - } - } +.trim-right-wrapper { + @apply mvx:flex-shrink mvx:text-ellipsis mvx:overflow-hidden mvx:whitespace-nowrap mvx:text-right mvx:text-[1px]; + direction: rtl; } -@media (max-width: 480px) { - .main-container { - width: 100%; - margin: 0; - } -} - -.sign-transactions-panel { - @apply mvx:flex mvx:flex-col mvx:flex-1 mvx:pb-6; -} +.trim-right { + @apply mvx:select-none mvx:pointer-events-none mvx:inline mvx:text-base mvx:leading-5 mvx:text-clip; +} \ No newline at end of file diff --git a/src/components/functional/sign-transactions-panel/sign-transactions-panel.styles.ts b/src/components/functional/sign-transactions-panel/sign-transactions-panel.styles.ts new file mode 100644 index 00000000..e568781a --- /dev/null +++ b/src/components/functional/sign-transactions-panel/sign-transactions-panel.styles.ts @@ -0,0 +1,18 @@ +// prettier-ignore +export default { + signTransactionContent: 'sign-transaction-content mvx:flex mvx:flex-col mvx:items-center mvx:gap-2 mvx:relative mvx:min-w-0 mvx:self-stretch mvx:flex-nowrap mvx:shrink-0', + signTransactionsTabs: 'sign-transactions-tabs mvx:px-4 mvx:gap-2 mvx:flex mvx:mr-auto', + signTransactionsTab: 'sign-transactions-tab mvx:px-4 mvx:h-8 mvx:flex mvx:items-center mvx:leading-none mvx:justify-center mvx:transition-all mvx:duration-200 mvx:ease-in-out mvx:cursor-pointer mvx:relative mvx:rounded-3xl mvx:text-secondary-text mvx:hover:text-accent mvx:hover:bg-secondary mvx:active:text-accent mvx:active:bg-secondary', + signTransactionsTabActive: 'sign-transactions-tab-active mvx:!text-accent mvx:!bg-secondary', + signTransactionsTabText: 'sign-transactions-tab-text mvx:text-base mvx:z-1 mvx:relative mvx:capitalize', + signTransactionsPanel: 'sign-transactions-panel mvx:flex mvx:flex-col mvx:flex-1 mvx:pb-6', + button: 'button mvx:flex mvx:items-center mvx:justify-center mvx:font-bold mvx:leading-none mvx:px-4 mvx:max-h-full mvx:rounded-xl mvx:cursor-pointer mvx:transition-all mvx:duration-200 mvx:ease-in-out mvx:gap-2', + buttonLarge: 'button-large mvx:h-12 mvx:text-base mvx:px-6', + buttonSmall: 'button-small mvx:h-10 mvx:text-xs mvx:rounded-xl', + buttonPrimary: 'button-primary mvx:text-button-primary mvx:bg-button-bg-primary mvx:border mvx:border-button-bg-primary', + buttonSecondary: 'button-secondary mvx:relative mvx:text-button-secondary mvx:border mvx:border-transparent mvx:after:absolute mvx:after:inset-0 mvx:after:rounded-lg mvx:after:opacity-40 mvx:after:transition-all mvx:after:duration-200 mvx:after:ease-in-out mvx:after:bg-button-bg-secondary mvx:after:content-[""] mvx:after:-z-1 mvx:hover:opacity-100 mvx:hover:text-button-primary mvx:hover:after:opacity-100 mvx:hover:after:bg-button-bg-primary', + buttonSecondarySmall: 'button-secondary-small mvx:after:rounded-xl', + buttonNeutral: 'button-neutral mvx:text-neutral-925 mvx:bg-white mvx:hover:opacity-75', + buttonDisabled: 'button-disabled mvx:pointer-events-none mvx:bg-transparent mvx:cursor-default mvx:border mvx:border-secondary-text mvx:!text-secondary-text mvx:hover:opacity-100', + tooltipContent: 'tooltip-content mvx:flex-row mvx:cursor-default mvx:p-2 mvx:whitespace-nowrap mvx:text-xs mvx:rounded-xl mvx:leading-none mvx:!bg-surface mvx:border-outline-variant mvx:border mvx:text-primary mvx:after:left-1/2 mvx:after:origin-center mvx:after:w-2 mvx:after:h-2 mvx:after:absolute mvx:after:border mvx:after:border-outline-variant mvx:after:!bg-surface mvx:after:translate-x-[calc(50%-8px)] mvx:after:-rotate-[45deg] mvx:after:content-[""]', +} satisfies Record; \ No newline at end of file diff --git a/src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx b/src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx index ee57ac8c..3c2ea7db 100644 --- a/src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx +++ b/src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx @@ -6,8 +6,15 @@ import type { IEventBus } from 'utils/EventBus'; import { EventBus } from 'utils/EventBus'; import type { IOverviewProps, ISignTransactionsPanelData } from './sign-transactions-panel.types'; -import { SignEventsEnum, TransactionTabsEnum } from './sign-transactions-panel.types'; +import { DecodeMethodEnum, SignEventsEnum, TransactionTabsEnum } from './sign-transactions-panel.types'; import state, { resetState } from './signTransactionsPanelStore'; +import { SignTransactionsFooter } from './components/SignTransactionsFooter/SignTransactionsFooter'; +import { getCopyClickAction } from 'common/CopyButton/getCopyClickAction'; +import { SignTransactionsOverview } from './components/SignTransactionsOverview/SignTransactionsOverview'; +import { SignTransactionsAdvanced } from './components/SignTransactionsAdvanced/SignTransactionsAdvanced'; +import { SignTransactionsHeader } from './components/SignTransactionsHeader/SignTransactionsHeader'; + +import styles from './sign-transactions-panel.styles'; @Component({ tag: 'mvx-sign-transactions-panel', @@ -27,6 +34,11 @@ export class SignTransactionsPanel { @State() isOpen: boolean = false; @State() activeTab: TransactionTabsEnum = TransactionTabsEnum.overview; + @State() isFooterTooltipVisible: boolean = false; + @State() isSuccessOnCopy: boolean = false; + @State() showFavicon: boolean = true; + @State() decodeMethod: DecodeMethodEnum = DecodeMethodEnum.raw; + @State() decodeTooltipVisible: boolean = false; @Method() async getEventBus() { await this.connectionMonitor.waitForConnection(); @@ -114,11 +126,27 @@ export class SignTransactionsPanel { }; } + private handleIsFooterTooltipVisible = (isTooltipVisible: boolean) => { + this.isFooterTooltipVisible = isTooltipVisible; + }; + + private handleCopyButtonClick = getCopyClickAction({ + onSuccessChange: (isSuccess) => (this.isSuccessOnCopy = isSuccess), + }); + + private setDecodeMethod = (method: DecodeMethodEnum) => { + this.decodeMethod = method; + }; + + private setDecodeTooltipVisible = (isVisible: boolean) => { + this.decodeTooltipVisible = isVisible; + }; + render() { const transactionTabs = Object.values(TransactionTabsEnum); - const { commonData } = state; - const { data, highlight } = commonData; + const { commonData, onBack, onNext } = state; + const { currentIndex, transactionsCount, origin } = commonData; return ( -
- - -
-
+
+ + +
+
{transactionTabs.map(transactionTab => (
this.setActiveTab(transactionTab)} > -
+
{transactionTab}
@@ -146,15 +181,25 @@ export class SignTransactionsPanel {
{this.activeTab === TransactionTabsEnum.overview ? ( - + ) : ( - + )}
- +
- + ); } } diff --git a/src/components/visual/button/button.scss b/src/components/visual/button/button.scss deleted file mode 100644 index 0085031b..00000000 --- a/src/components/visual/button/button.scss +++ /dev/null @@ -1,69 +0,0 @@ -:host { - @apply mvx:flex; - - .button { - @apply mvx:flex mvx:items-center mvx:justify-center mvx:font-bold mvx:leading-none mvx:px-4 mvx:max-h-full; - @apply mvx:rounded-xl mvx:cursor-pointer mvx:transition-all mvx:duration-200 mvx:ease-in-out mvx:gap-2; - - &.large { - @apply mvx:h-12 mvx:text-base mvx:px-6; - } - - &.small { - @apply mvx:h-10 mvx:text-xs mvx:rounded-xl; - } - - &.primary { - color: var(--mvx-button-text-primary); - background-color: var(--mvx-button-bg-primary); - border: 1px solid var(--mvx-button-bg-primary); - } - - &.secondary { - @apply mvx:relative; - color: var(--mvx-button-text-secondary); - border: 1px solid transparent; - - &.small:after { - @apply mvx:rounded-xl; - } - - &:after { - @apply mvx:absolute mvx:inset-0 mvx:rounded-lg mvx:opacity-40 mvx:transition-all mvx:duration-200 mvx:ease-in-out; - background-color: var(--mvx-button-bg-secondary); - content: ''; - z-index: -1; - } - - &:hover { - @apply mvx:opacity-100; - color: var(--mvx-button-text-primary); - - &:after { - @apply mvx:opacity-100; - background-color: var(--mvx-button-bg-primary); - } - } - } - - &.neutral { - color: var(--mvx-neutral-925); - background: var(--mvx-white); - } - - &:hover { - @apply mvx:opacity-75; - } - - &.disabled, - &:disabled { - @apply mvx:pointer-events-none mvx:bg-transparent mvx:cursor-default; - border: 1px solid var(--mvx-text-color-secondary); - color: var(--mvx-text-color-secondary); - - &:hover { - @apply mvx:opacity-100; - } - } - } -} diff --git a/src/components/visual/copy-button/copy-button.tsx b/src/components/visual/copy-button/copy-button.tsx deleted file mode 100644 index 693b696b..00000000 --- a/src/components/visual/copy-button/copy-button.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import { Component, h, Prop, State } from '@stencil/core'; -import { Icon } from 'common/Icon'; -import { copyToClipboard } from 'utils/copyToClipboard'; - -// prettier-ignore -const styles = { - copyButton: 'copy-button mvx:flex', - copyButtonIcon: 'copy-button-icon mvx:flex mvx:cursor-pointer mvx:justify-center mvx:transition-opacity mvx:duration-200 mvx:ease-in-out mvx:hover:opacity-80', - copyButtonIconCheck: 'copy-button-icon-check mvx:hover:opacity-100! mvx:cursor-default!', -} satisfies Record; - -@Component({ - tag: 'mvx-copy-button', - shadow: false, -}) -export class CopyButton { - private timeoutId: number | null = null; - - @State() isSuccess: boolean = false; - @Prop() iconClass?: string; - @Prop() class?: string; - @Prop() text: string; - - async handleClick(event: MouseEvent) { - const trimmedText = this.text ? this.text.trim() : this.text; - const success = await copyToClipboard(trimmedText); - - const setSuccessStateTo = (newSuccessState: boolean) => { - this.isSuccess = newSuccessState; - }; - - event.preventDefault(); - event.stopPropagation(); - setSuccessStateTo(success); - - if (success) { - this.timeoutId = window.setTimeout(() => setSuccessStateTo(false), 2000); - } - } - - disconnectedCallback() { - if (this.timeoutId) { - clearTimeout(this.timeoutId); - this.timeoutId = null; - } - } - - render() { - return ( -
- -
- ); - } -} diff --git a/src/components/visual/data-with-explorer-link/tests/data-with-explorer-link.spec.ts b/src/components/visual/data-with-explorer-link/tests/data-with-explorer-link.spec.ts index 9c6ecec1..f8ba557c 100644 --- a/src/components/visual/data-with-explorer-link/tests/data-with-explorer-link.spec.ts +++ b/src/components/visual/data-with-explorer-link/tests/data-with-explorer-link.spec.ts @@ -2,8 +2,8 @@ import { newSpecPage } from '@stencil/core/testing'; import { Trim } from 'common/Trim/Trim'; import { ExplorerLink } from '../../../common/explorer-link/explorer-link'; -import { CopyButton } from '../../copy-button/copy-button'; -import { Tooltip } from '../../tooltip/tooltip'; +import { CopyButton } from '../../../common/copy-button/copy-button'; +import { Tooltip } from '../../../common/tooltip/tooltip'; import { DataWithExplorerLink } from '../data-with-explorer-link'; describe('DataWithExplorerLink', () => { diff --git a/src/components/visual/tooltip/tooltip.scss b/src/components/visual/tooltip/tooltip.scss deleted file mode 100644 index 4ecce9e3..00000000 --- a/src/components/visual/tooltip/tooltip.scss +++ /dev/null @@ -1,40 +0,0 @@ -.tooltip { - @apply mvx:flex mvx:relative; - - .tooltip-content-wrapper { - @apply mvx:left-1/2 mvx:absolute mvx:z-1 mvx:transform mvx:-translate-x-1/2; - - &.top { - bottom: calc(100% + 16px); - } - - &.bottom { - top: calc(100% + 16px); - } - - .tooltip-content { - @apply mvx:flex-row mvx:cursor-default mvx:p-2 mvx:whitespace-nowrap mvx:text-xs mvx:rounded-xl mvx:leading-none; - background: var(--mvx-bg-color-primary); - border: 1px solid var(--mvx-border-color-secondary); - color: var(--mvx-text-color-primary); - - &:after { - @apply mvx:left-1/2 mvx:origin-center mvx:w-2 mvx:h-2 mvx:absolute; - border: 1px solid var(--mvx-border-color-secondary); - background-color: var(--mvx-bg-color-primary); - content: ''; - transform: translateX(calc(50% - 8px)) rotateZ(calc(45deg * -1)); - } - - &.top:after { - @apply mvx:border-t-0 mvx:border-r-0; - bottom: calc(4px * -1); - } - - &.bottom:after { - @apply mvx:border-b-0 mvx:border-l-0; - top: calc(4px * -1); - } - } - } -} diff --git a/src/components/visual/tooltip/tooltip.tsx b/src/components/visual/tooltip/tooltip.tsx deleted file mode 100644 index dd2d3376..00000000 --- a/src/components/visual/tooltip/tooltip.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import type { EventEmitter } from '@stencil/core'; -import { Component, Event, h, Prop, State } from '@stencil/core'; - -// prettier-ignore -const styles = { - tooltip: 'tooltip mvx:flex mvx:relative', -} satisfies Record; - -@Component({ - tag: 'mvx-tooltip', - styleUrl: 'tooltip.scss', - shadow: true, -}) -export class Tooltip { - @Event() triggerRender: EventEmitter; - @State() isTooltipVisible: boolean = false; - - @Prop() position: 'top' | 'bottom' = 'top'; - @Prop() triggerOnClick?: boolean = false; - @Prop() trigger: HTMLElement; - @Prop() class?: string; - - constructor() { - this.handleEllipsisClick = this.handleEllipsisClick.bind(this); - this.handleFocusOut = this.handleFocusOut.bind(this); - } - - private setTooltipVisible(isTooltipVisible: boolean) { - this.isTooltipVisible = isTooltipVisible; - this.triggerRender.emit(this.isTooltipVisible); - } - - private handleEllipsisClick(event: MouseEvent) { - if (!this.triggerOnClick) { - return; - } - - event.preventDefault(); - this.setTooltipVisible(!this.isTooltipVisible); - } - - private handleFocusOut(event: FocusEvent) { - const relatedTarget = event.relatedTarget as Node; - const currentTarget = event.currentTarget as HTMLElement; - - if (!currentTarget.contains(relatedTarget)) { - this.setTooltipVisible(false); - } - } - - private handleMouseEvent(isTooltipVisible: boolean) { - if (this.triggerOnClick) { - return; - } - - return (event: MouseEvent) => { - event.preventDefault(); - this.setTooltipVisible(isTooltipVisible); - }; - } - - render() { - return ( -
- {this.isTooltipVisible && ( -
-
event.stopPropagation()} - > - -
-
- )} - - {this.trigger} -
- ); - } -} diff --git a/src/global/tailwind.css b/src/global/tailwind.css index 35760edb..4c645dd3 100644 --- a/src/global/tailwind.css +++ b/src/global/tailwind.css @@ -13,6 +13,7 @@ --color-preloader: var(--mvx-preloader-item-bg); --color-pending: var(--mvx-pending-color); --color-secondary: var(--mvx-bg-color-secondary); + --color-tertiary: var(--mvx-bg-color-tertiary); --color-error: var(--mvx-error-color); --color-primary: var(--mvx-text-color-primary); --color-secondary-text: var(--mvx-text-color-secondary); @@ -21,6 +22,8 @@ --color-hover: var(--mvx-hover-color-primary); --color-pagination-item: var(--mvx-pagination-item-bg); --color-pagination-item-hover: var(--mvx-pagination-item-bg-hover); + --color-neutral-700: var(--mvx-neutral-700); + --color-neutral-800: var(--mvx-neutral-800); --color-neutral-950: var(--mvx-neutral-950); --color-neutral-900: var(--mvx-neutral-900); --color-ledger-warning: var(--mvx-ledger-warning-bg); @@ -29,9 +32,20 @@ --color-transaction-method: var(--mvx-transaction-method); --color-slate-550: var(--mvx-slate-550); --color-gray-200: var(--mvx-gray-200); + --color-neutral-925: var(--mvx-neutral-925); --color-thumb: var(--mvx-scrollbar-thumb); --color-outline-variant: var(--mvx-border-color-secondary); --color-emphasize: var(--mvx-bg-accent-color); + --color-accent-variant: var(--mvx-bg-accent-variant-color); + --color-button-primary: var(--mvx-button-text-primary); + --color-button-secondary: var(--mvx-button-text-secondary); + --color-button-bg-primary: var(--mvx-button-bg-primary); + --color-button-bg-secondary: var(--mvx-button-bg-secondary); + --color-select: var(--mvx-select-bg); + --color-select-tx: var(--mvx-select-color); + --color-select-option: var(--mvx-select-option-bg); + --color-select-option-mobile: var(--mvx-select-option-bg-mobile); + --color-select-option-text: var(--mvx-select-option-color); } @layer utilities { @@ -83,4 +97,14 @@ letter-spacing: -0.001em; } } + + @keyframes SpinnerAnimation { + to { + transform: rotate(360deg); + } + } + + .mvx\:animate-spinner { + animation: SpinnerAnimation 3000ms linear infinite; + } } \ No newline at end of file From 88ba5d745271e22bcc52fbbe4c9f0a55c8bb8aa6 Mon Sep 17 00:00:00 2001 From: Iulia Cimpeanu <72752718+iuliacimpeanu@users.noreply.github.com> Date: Wed, 26 Nov 2025 11:45:09 +0200 Subject: [PATCH 02/10] Eslint and prettierrc fixes (#270) * Eslint fixes * Prettierrc fixes * Updated changelog --- CHANGELOG.md | 1 + .../arrow-right-icon/arrow-right-icon.tsx | 5 +- .../ledger-provider-icon.tsx | 6 +- .../magnifying-glass-icon.tsx | 6 +- .../metamask-provider-icon.tsx | 6 +- .../multiversx-logo-icon.tsx | 6 +- .../multiversx-symbol-icon.scss | 2 +- .../wallet-connect-app-gallery-icon.scss | 8 +- .../wallet-connect-app-store-icon.scss | 8 +- .../wallet-connect-google-play-icon.scss | 8 +- .../wallet-provider-icon.tsx | 80 +- src/common/Button/Button.tsx | 72 +- src/common/Button/button.styles.ts | 2 +- src/common/CopyButton/CopyButton.tsx | 59 +- src/common/CopyButton/getCopyClickAction.ts | 32 +- src/common/ExplorerLink/ExplorerLink.tsx | 56 +- src/common/FormatAmount/FormatAmount.tsx | 47 +- .../components/InvalidFormatAmount.tsx | 20 +- .../components/ValidFormatAmount.tsx | 84 +- src/common/FormatAmount/components/index.ts | 2 +- src/common/Icon/Icon.tsx | 8 +- .../ArrowRightIcon/ArrowRightIcon.tsx | 19 +- .../Icon/components/ArrowRightIcon/index.ts | 2 +- .../ArrowsRotateIcon/ArrowsRotateIcon.tsx | 12 +- .../Icon/components/ArrowsRotateIcon/index.ts | 2 +- .../Icon/components/BanIcon/BanIcon.tsx | 12 +- src/common/Icon/components/BanIcon/index.ts | 2 +- .../CircleCheckIcon/CircleCheckIcon.tsx | 12 +- .../Icon/components/CircleCheckIcon/index.ts | 2 +- .../CircleInfoIcon/CircleInfoIcon.tsx | 12 +- .../Icon/components/CircleInfoIcon/index.ts | 2 +- .../Icon/components/CoinsIcon/CoinsIcon.tsx | 12 +- src/common/Icon/components/CoinsIcon/index.ts | 2 +- .../HourglassIcon/HourglassIcon.tsx | 12 +- .../Icon/components/HourglassIcon/index.ts | 2 +- .../components/SpinnerIcon/SpinnerIcon.tsx | 22 +- .../Icon/components/SpinnerIcon/index.ts | 2 +- src/common/Icon/icon.types.ts | 2 +- src/common/Tooltip/Tooltip.tsx | 145 +- src/common/Trim/Trim.tsx | 294 +- src/common/Trim/trim.styles.ts | 2 +- src/common/UnlockButton/UnlockButton.tsx | 1 + .../UnlockButton/unlockButton.styles.ts | 2 +- src/components.d.ts | 3619 ++++++++++------- src/components/common/button/button.scss | 2 +- .../common/button/button.stories.tsx | 2 +- src/components/common/button/button.tsx | 3 +- .../common/copy-button/copy-button.tsx | 4 +- .../copy-button/tests/copy-button.spec.ts | 1 - .../common/format-amount/format-amount.tsx | 24 +- src/components/common/tooltip/tooltip.scss | 2 +- src/components/common/tooltip/tooltip.tsx | 4 +- src/components/common/trim/tests/trim.e2e.tsx | 6 +- src/components/common/trim/trim.tsx | 8 +- .../TransactionAccountName/index.ts | 2 +- .../TransactionAccount/components/index.ts | 2 +- .../components/TransactionAccount/index.ts | 2 +- .../TransactionAge/TransactionAge.tsx | 40 +- .../components/TransactionAge/index.ts | 2 +- .../tests/transaction-age.spec.tsx | 7 +- .../components/TransactionHash/index.ts | 2 +- .../TransactionIcon/TransactionIcon.tsx | 31 +- .../TransactionIcon/getValidIcon.ts | 14 +- .../components/TransactionIcon/index.ts | 2 +- .../TransactionMethod/TransactionMethod.tsx | 32 +- .../components/TransactionMethod/index.ts | 2 +- .../tests/transaction-method.spec.tsx | 12 +- .../components/TransactionShards/index.ts | 2 +- .../components/TransactionValue/index.ts | 2 +- .../transactions-table/components/index.ts | 2 +- .../transactions-table.scss | 2 +- .../transactions-table.styles.ts | 2 +- .../transactions-table/transactions-table.tsx | 11 +- .../transactions-table.type.ts | 2 +- .../notifications-feed/notifications-feed.tsx | 4 +- .../SignTransactionsAdvanced.tsx | 35 +- .../SignTransactionsAdvancedData.tsx | 34 +- .../SignTransactionsAdvancedDataDecode.tsx | 6 +- .../signTransactionsAdvancedData.styles.ts | 2 +- .../signTransactionsAdvanced.styles.ts | 2 +- .../SignTransactionsFooter.tsx | 33 +- .../signTransactionsFooter.styles.ts | 41 +- .../SignTransactionsHeader.tsx | 11 +- .../SignTransactionsOverview.tsx | 50 +- .../signTransactionsOverview.styles.ts | 2 +- .../sign-transactions-panel.scss | 22 +- .../sign-transactions-panel.styles.ts | 2 +- .../sign-transactions-panel.tsx | 22 +- .../custom-create-toast/custom-toast.scss | 2 +- .../custom-create-toast/custom-toast.tsx | 8 +- .../components/simple-toast/simple-toast.scss | 2 +- .../components/simple-toast/simple-toast.tsx | 8 +- .../components/custom-toast/generic-toast.tsx | 20 +- .../transaction-toast-content.scss | 2 +- .../transaction-toast-content.tsx | 2 +- .../tests/transaction-toast-details.e2e.ts | 6 +- .../transaction-toast/transaction-toast.scss | 4 +- .../UnlockPanelFooter/UnlockPanelFooter.tsx | 5 +- .../components/UnlockPanelFooter/index.ts | 2 +- .../unlockPanelFooter.styles.ts | 2 +- .../UnlockPanelGroup/UnlockPanelGroup.tsx | 7 +- .../components/UnlockPanelGroup/index.ts | 2 +- .../unlockPanelGroup.styles.ts | 2 +- .../UnlockProviderButton.tsx | 4 +- .../components/UnlockProviderButton/index.ts | 2 +- .../unlock-panel/components/index.ts | 2 +- .../functional/unlock-panel/unlock-panel.scss | 2 +- .../unlock-panel/unlock-panel.styles.ts | 2 +- .../functional/unlock-panel/unlock-panel.tsx | 12 +- .../wallet-connect-download.scss | 2 +- .../tests/data-with-explorer-link.spec.ts | 4 +- src/components/visual/index.ts | 1 - .../helpers/getPagination/getPagination.ts | 13 +- .../transaction-list-item.scss | 4 +- .../transaction-list-item.tsx | 2 +- src/constants/transactionStatus.enum.ts | 16 +- src/global/tailwind.css | 2 +- src/setupTests.ts | 10 +- src/utils/getTransactionStatus.ts | 6 +- 119 files changed, 3076 insertions(+), 2289 deletions(-) delete mode 100644 src/components/visual/index.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 91f21554..acb5b117 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- [Eslint and prettierrc fixes](https://github.com/multiversx/mx-sdk-dapp-ui/pull/270) - [Refactored sign transactions panel internal components](https://github.com/multiversx/mx-sdk-dapp-ui/pull/267) ## [[0.1.4](https://github.com/multiversx/mx-sdk-dapp-ui/pull/269)] - 2025-11-21 diff --git a/src/assets/icons/arrow-right-icon/arrow-right-icon.tsx b/src/assets/icons/arrow-right-icon/arrow-right-icon.tsx index 292f9595..98f25494 100644 --- a/src/assets/icons/arrow-right-icon/arrow-right-icon.tsx +++ b/src/assets/icons/arrow-right-icon/arrow-right-icon.tsx @@ -15,7 +15,10 @@ export class ArrowRightIcon { viewBox="0 0 448 512" class={{ 'arrow-right-icon': true, [this.class]: Boolean(this.class) }} > - + ); } diff --git a/src/assets/icons/ledger-provider-icon/ledger-provider-icon.tsx b/src/assets/icons/ledger-provider-icon/ledger-provider-icon.tsx index 118f1404..f939aa65 100644 --- a/src/assets/icons/ledger-provider-icon/ledger-provider-icon.tsx +++ b/src/assets/icons/ledger-provider-icon/ledger-provider-icon.tsx @@ -10,7 +10,11 @@ export class LedgerProviderIcon { render() { return ( - + + ); diff --git a/src/assets/icons/metamask-provider-icon/metamask-provider-icon.tsx b/src/assets/icons/metamask-provider-icon/metamask-provider-icon.tsx index 173db6a9..ed66d905 100644 --- a/src/assets/icons/metamask-provider-icon/metamask-provider-icon.tsx +++ b/src/assets/icons/metamask-provider-icon/metamask-provider-icon.tsx @@ -10,7 +10,11 @@ export class MetaMaskProviderIcon { render() { return ( - + + + - + - + - + - + - + @@ -83,19 +115,47 @@ export class WalletProviderIcon { - + - + - + - + diff --git a/src/common/Button/Button.tsx b/src/common/Button/Button.tsx index 374f797d..33e4236c 100644 --- a/src/common/Button/Button.tsx +++ b/src/common/Button/Button.tsx @@ -1,38 +1,48 @@ import { h } from '@stencil/core'; -import { ButtonSizeEnum, ButtonVariantEnum } from './button.types'; + import styles from './button.styles'; +import { ButtonSizeEnum, ButtonVariantEnum } from './button.types'; interface ButtonPropsType { - class?: string; - dataTestId?: string; - disabled?: boolean; - size?: `${ButtonSizeEnum}`; - variant?: `${ButtonVariantEnum}`; - onClick?: (event: MouseEvent) => void; + class?: string; + dataTestId?: string; + disabled?: boolean; + size?: `${ButtonSizeEnum}`; + variant?: `${ButtonVariantEnum}`; + onClick?: (event: MouseEvent) => void; } -export function Button({ class: className = '', dataTestId = '', disabled = false, size = 'large', variant = 'primary', onClick }: ButtonPropsType, children?: any) { - return ( - - ); - +export function Button( + { + class: className = '', + dataTestId = '', + disabled = false, + size = 'large', + variant = 'primary', + onClick, + }: ButtonPropsType, + children?: any, +) { + return ( + + ); } diff --git a/src/common/Button/button.styles.ts b/src/common/Button/button.styles.ts index d073a7ae..4b59fba3 100644 --- a/src/common/Button/button.styles.ts +++ b/src/common/Button/button.styles.ts @@ -8,4 +8,4 @@ export default { buttonSecondarySmall: 'button-secondary-small mvx:after:rounded-xl', buttonNeutral: 'button-neutral mvx:text-neutral-925 mvx:bg-white mvx:hover:opacity-75', buttonDisabled: 'button-disabled mvx:pointer-events-none mvx:bg-transparent mvx:cursor-default mvx:border mvx:border-secondary-text mvx:!text-secondary-text mvx:hover:opacity-100' -} satisfies Record; \ No newline at end of file +} satisfies Record; diff --git a/src/common/CopyButton/CopyButton.tsx b/src/common/CopyButton/CopyButton.tsx index 9880c6ee..73807f81 100644 --- a/src/common/CopyButton/CopyButton.tsx +++ b/src/common/CopyButton/CopyButton.tsx @@ -3,36 +3,41 @@ import { Icon } from 'common/Icon'; // prettier-ignore const styles = { - copyButton: 'copy-button mvx:flex', - copyButtonIcon: 'copy-button-icon mvx:flex mvx:cursor-pointer mvx:justify-center mvx:transition-opacity mvx:duration-200 mvx:ease-in-out mvx:hover:opacity-80', - copyButtonIconCheck: 'copy-button-icon-check mvx:hover:opacity-100! mvx:cursor-default!', + copyButton: 'copy-button mvx:flex', + copyButtonIcon: 'copy-button-icon mvx:flex mvx:cursor-pointer mvx:justify-center mvx:transition-opacity mvx:duration-200 mvx:ease-in-out mvx:hover:opacity-80', + copyButtonIconCheck: 'copy-button-icon-check mvx:hover:opacity-100! mvx:cursor-default!', } satisfies Record; interface CopyButtonPropsType { - iconClass?: string; - class?: string; - text: string; - isSuccessOnCopy?: boolean; - handleCopyButtonClick?: (event: MouseEvent) => void; + iconClass?: string; + class?: string; + text: string; + isSuccessOnCopy?: boolean; + handleCopyButtonClick?: (event: MouseEvent) => void; } -export function CopyButton({ iconClass, class: className, isSuccessOnCopy, handleCopyButtonClick }: CopyButtonPropsType) { - return ( -
handleCopyButtonClick?.(event)} - class={{ - [styles.copyButton]: true, - [className]: Boolean(className), - }} - > - -
- ); +export function CopyButton({ + iconClass, + class: className, + isSuccessOnCopy, + handleCopyButtonClick, +}: CopyButtonPropsType) { + return ( +
handleCopyButtonClick?.(event)} + class={{ + [styles.copyButton]: true, + [className]: Boolean(className), + }} + > + +
+ ); } diff --git a/src/common/CopyButton/getCopyClickAction.ts b/src/common/CopyButton/getCopyClickAction.ts index 322cea44..e37b3df9 100644 --- a/src/common/CopyButton/getCopyClickAction.ts +++ b/src/common/CopyButton/getCopyClickAction.ts @@ -1,26 +1,26 @@ import { copyToClipboard } from 'utils/copyToClipboard'; interface CopyHandlerOptions { - onSuccessChange?: (isSuccess: boolean) => void; + onSuccessChange?: (isSuccess: boolean) => void; } export function getCopyClickAction({ onSuccessChange }: CopyHandlerOptions) { - let timeoutId: number | null = null; + let timeoutId: number | null = null; - return async (event: MouseEvent, text?: string) => { - const trimmedText = text ? text.trim() : text; - const success = await copyToClipboard(trimmedText); + return async (event: MouseEvent, text?: string) => { + const trimmedText = text ? text.trim() : text; + const success = await copyToClipboard(trimmedText); - event.preventDefault(); - event.stopPropagation(); + event.preventDefault(); + event.stopPropagation(); - if (onSuccessChange) { - onSuccessChange(success); + if (onSuccessChange) { + onSuccessChange(success); - window.clearTimeout(timeoutId); - if (success) { - timeoutId = window.setTimeout(() => onSuccessChange(false), 2000); - } - } - }; -} \ No newline at end of file + window.clearTimeout(timeoutId); + if (success) { + timeoutId = window.setTimeout(() => onSuccessChange(false), 2000); + } + } + }; +} diff --git a/src/common/ExplorerLink/ExplorerLink.tsx b/src/common/ExplorerLink/ExplorerLink.tsx index 8e781bd6..443ff9cc 100644 --- a/src/common/ExplorerLink/ExplorerLink.tsx +++ b/src/common/ExplorerLink/ExplorerLink.tsx @@ -8,33 +8,37 @@ const styles = { } satisfies Record; interface ExplorerLinkPropsType { - class?: string; - iconClass?: string; - dataTestId?: string; - link: string; - hasIcon?: boolean; + class?: string; + iconClass?: string; + dataTestId?: string; + link: string; + hasIcon?: boolean; } -export function ExplorerLink({ class: className, iconClass, dataTestId, link, hasIcon }: ExplorerLinkPropsType, children?: JSX.Element) { - if (!link) { - return null; - } - - return ( - - {hasIcon ? - () - : children} - - ); +export function ExplorerLink( + { class: className, iconClass, dataTestId, link, hasIcon }: ExplorerLinkPropsType, + children?: JSX.Element, +) { + if (!link) { + return null; + } + return ( + + {hasIcon ? ( + + ) : ( + children + )} + + ); } diff --git a/src/common/FormatAmount/FormatAmount.tsx b/src/common/FormatAmount/FormatAmount.tsx index f6e082b0..f0b2bb7d 100644 --- a/src/common/FormatAmount/FormatAmount.tsx +++ b/src/common/FormatAmount/FormatAmount.tsx @@ -1,19 +1,38 @@ -import { InvalidFormatAmount, ValidFormatAmount } from "./components"; +import { InvalidFormatAmount, ValidFormatAmount } from './components'; interface FormatAmountPropsType { - class?: string; - dataTestId?: string; - isValid: boolean; - label?: string; - labelClass?: string; - showLabel?: boolean; - valueDecimal: string; - valueInteger: string; - decimalClass?: string; + class?: string; + dataTestId?: string; + isValid: boolean; + label?: string; + labelClass?: string; + showLabel?: boolean; + valueDecimal: string; + valueInteger: string; + decimalClass?: string; } -export function FormatAmount({ class: className, dataTestId, isValid, label, labelClass, showLabel = true, valueDecimal, valueInteger, decimalClass }: FormatAmountPropsType) { - return isValid ? - ValidFormatAmount({ dataTestId, class: className, valueInteger, valueDecimal, decimalClass, showLabel, label, labelClass }) - : InvalidFormatAmount({ dataTestId, class: className }); +export function FormatAmount({ + class: className, + dataTestId, + isValid, + label, + labelClass, + showLabel = true, + valueDecimal, + valueInteger, + decimalClass, +}: FormatAmountPropsType) { + return isValid + ? ValidFormatAmount({ + dataTestId, + class: className, + valueInteger, + valueDecimal, + decimalClass, + showLabel, + label, + labelClass, + }) + : InvalidFormatAmount({ dataTestId, class: className }); } diff --git a/src/common/FormatAmount/components/InvalidFormatAmount.tsx b/src/common/FormatAmount/components/InvalidFormatAmount.tsx index 3630d3e9..6bd1ec7f 100644 --- a/src/common/FormatAmount/components/InvalidFormatAmount.tsx +++ b/src/common/FormatAmount/components/InvalidFormatAmount.tsx @@ -7,16 +7,16 @@ const styles = { } satisfies Record; interface InvalidFormatAmountPropsType { - class?: string; - dataTestId?: string; + class?: string; + dataTestId?: string; } export function InvalidFormatAmount({ dataTestId, class: className }: InvalidFormatAmountPropsType) { - return ( - - - ... - - - ); -} \ No newline at end of file + return ( + + + ... + + + ); +} diff --git a/src/common/FormatAmount/components/ValidFormatAmount.tsx b/src/common/FormatAmount/components/ValidFormatAmount.tsx index 4e9d02f4..02d24353 100644 --- a/src/common/FormatAmount/components/ValidFormatAmount.tsx +++ b/src/common/FormatAmount/components/ValidFormatAmount.tsx @@ -11,50 +11,50 @@ const styles = { } satisfies Record; interface ValidFormatAmountPropsType { - class?: string; - dataTestId?: string; - label?: string; - labelClass?: string; - showLabel?: boolean; - valueDecimal: string; - valueInteger: string; - decimalClass?: string; + class?: string; + dataTestId?: string; + label?: string; + labelClass?: string; + showLabel?: boolean; + valueDecimal: string; + valueInteger: string; + decimalClass?: string; } export function ValidFormatAmount({ - dataTestId, - class: className, - valueInteger, - valueDecimal, - decimalClass, - showLabel, - label, - labelClass + dataTestId, + class: className, + valueInteger, + valueDecimal, + decimalClass, + showLabel, + label, + labelClass, }: ValidFormatAmountPropsType) { - return ( - - - {valueInteger} - - {valueDecimal && ( - - {valueDecimal} - - )} - {showLabel && label && ( - - {label} - - )} + return ( + + + {valueInteger} + + {valueDecimal && ( + + {valueDecimal} - ); -} \ No newline at end of file + )} + {showLabel && label && ( + + {label} + + )} + + ); +} diff --git a/src/common/FormatAmount/components/index.ts b/src/common/FormatAmount/components/index.ts index ac8fc2ca..23f4c4a0 100644 --- a/src/common/FormatAmount/components/index.ts +++ b/src/common/FormatAmount/components/index.ts @@ -1,2 +1,2 @@ export * from './InvalidFormatAmount'; -export * from './ValidFormatAmount' \ No newline at end of file +export * from './ValidFormatAmount'; diff --git a/src/common/Icon/Icon.tsx b/src/common/Icon/Icon.tsx index 84ffa060..8ad6fc62 100644 --- a/src/common/Icon/Icon.tsx +++ b/src/common/Icon/Icon.tsx @@ -6,6 +6,7 @@ import { AngleRightIcon } from './components/AngleRightIcon'; import { AnglesLeftIcon } from './components/AnglesLeftIcon'; import { AnglesRightIcon } from './components/AnglesRightIcon'; import { AngleUpIcon } from './components/AngleUpIcon'; +import { ArrowRightIcon } from './components/ArrowRightIcon'; import { ArrowsRotateIcon } from './components/ArrowsRotateIcon'; import { ArrowUpRightFromSquareIcon } from './components/ArrowUpRightFromSquare'; import { ArrowUpRightIcon } from './components/ArrowUpRightIcon'; @@ -23,10 +24,9 @@ import { HourglassIcon } from './components/HourglassIcon'; import { LayersIcon } from './components/LayersIcon'; import { LockIcon } from './components/LockIcon'; import { PencilIcon } from './components/PencilIcon'; -import { TriangularWarningIcon } from './components/TriangularWarningIcon'; import { SpinnerIcon } from './components/SpinnerIcon'; +import { TriangularWarningIcon } from './components/TriangularWarningIcon'; import type { IconPropsType } from './icon.types'; -import { ArrowRightIcon } from './components/ArrowRightIcon'; export const Icon = ({ name, ...properties }: IconPropsType) => { if (!name) { @@ -107,10 +107,10 @@ export const Icon = ({ name, ...properties }: IconPropsType) => { return ; case 'spinner': - return + return ; case 'arrow-right': - return + return ; default: console.error(`No data for the ${name} icon.`); diff --git a/src/common/Icon/components/ArrowRightIcon/ArrowRightIcon.tsx b/src/common/Icon/components/ArrowRightIcon/ArrowRightIcon.tsx index c6a358be..2a0873ab 100644 --- a/src/common/Icon/components/ArrowRightIcon/ArrowRightIcon.tsx +++ b/src/common/Icon/components/ArrowRightIcon/ArrowRightIcon.tsx @@ -1,13 +1,20 @@ import { h } from '@stencil/core'; const styles = { - arrowRightIcon: 'arrow-right-icon mvx:w-4 mvx:h-4 mvx:text-inherit' + arrowRightIcon: 'arrow-right-icon mvx:w-4 mvx:h-4 mvx:text-inherit', } satisfies Record; export const ArrowRightIcon = ({ class: className }: { class?: string }) => ( - - - + + + ); - - diff --git a/src/common/Icon/components/ArrowRightIcon/index.ts b/src/common/Icon/components/ArrowRightIcon/index.ts index 190655e7..6442ab97 100644 --- a/src/common/Icon/components/ArrowRightIcon/index.ts +++ b/src/common/Icon/components/ArrowRightIcon/index.ts @@ -1 +1 @@ -export * from './ArrowRightIcon'; \ No newline at end of file +export * from './ArrowRightIcon'; diff --git a/src/common/Icon/components/ArrowsRotateIcon/ArrowsRotateIcon.tsx b/src/common/Icon/components/ArrowsRotateIcon/ArrowsRotateIcon.tsx index be0c0456..dc1313bc 100644 --- a/src/common/Icon/components/ArrowsRotateIcon/ArrowsRotateIcon.tsx +++ b/src/common/Icon/components/ArrowsRotateIcon/ArrowsRotateIcon.tsx @@ -2,10 +2,10 @@ import { h } from '@stencil/core'; import type { JSXBase } from '@stencil/core/internal'; export const ArrowsRotateIcon = (properties: JSXBase.IntrinsicElements['svg']) => ( - - - + + + ); diff --git a/src/common/Icon/components/ArrowsRotateIcon/index.ts b/src/common/Icon/components/ArrowsRotateIcon/index.ts index 4ad08973..afa025e2 100644 --- a/src/common/Icon/components/ArrowsRotateIcon/index.ts +++ b/src/common/Icon/components/ArrowsRotateIcon/index.ts @@ -1 +1 @@ -export * from './ArrowsRotateIcon' \ No newline at end of file +export * from './ArrowsRotateIcon'; diff --git a/src/common/Icon/components/BanIcon/BanIcon.tsx b/src/common/Icon/components/BanIcon/BanIcon.tsx index bbe6f706..9dfdbce7 100644 --- a/src/common/Icon/components/BanIcon/BanIcon.tsx +++ b/src/common/Icon/components/BanIcon/BanIcon.tsx @@ -2,10 +2,10 @@ import { h } from '@stencil/core'; import type { JSXBase } from '@stencil/core/internal'; export const BanIcon = (properties: JSXBase.IntrinsicElements['svg']) => ( - - - + + + ); diff --git a/src/common/Icon/components/BanIcon/index.ts b/src/common/Icon/components/BanIcon/index.ts index dc05cb85..8a1b461e 100644 --- a/src/common/Icon/components/BanIcon/index.ts +++ b/src/common/Icon/components/BanIcon/index.ts @@ -1 +1 @@ -export * from './BanIcon' \ No newline at end of file +export * from './BanIcon'; diff --git a/src/common/Icon/components/CircleCheckIcon/CircleCheckIcon.tsx b/src/common/Icon/components/CircleCheckIcon/CircleCheckIcon.tsx index a02f00fe..d822f04d 100644 --- a/src/common/Icon/components/CircleCheckIcon/CircleCheckIcon.tsx +++ b/src/common/Icon/components/CircleCheckIcon/CircleCheckIcon.tsx @@ -2,10 +2,10 @@ import { h } from '@stencil/core'; import type { JSXBase } from '@stencil/core/internal'; export const CircleCheckIcon = (properties: JSXBase.IntrinsicElements['svg']) => ( - - - + + + ); diff --git a/src/common/Icon/components/CircleCheckIcon/index.ts b/src/common/Icon/components/CircleCheckIcon/index.ts index ad952553..8b2b1126 100644 --- a/src/common/Icon/components/CircleCheckIcon/index.ts +++ b/src/common/Icon/components/CircleCheckIcon/index.ts @@ -1 +1 @@ -export * from './CircleCheckIcon' \ No newline at end of file +export * from './CircleCheckIcon'; diff --git a/src/common/Icon/components/CircleInfoIcon/CircleInfoIcon.tsx b/src/common/Icon/components/CircleInfoIcon/CircleInfoIcon.tsx index 3b10e04a..59b7d7f7 100644 --- a/src/common/Icon/components/CircleInfoIcon/CircleInfoIcon.tsx +++ b/src/common/Icon/components/CircleInfoIcon/CircleInfoIcon.tsx @@ -2,10 +2,10 @@ import { h } from '@stencil/core'; import type { JSXBase } from '@stencil/core/internal'; export const CircleInfoIcon = (properties: JSXBase.IntrinsicElements['svg']) => ( - - - + + + ); diff --git a/src/common/Icon/components/CircleInfoIcon/index.ts b/src/common/Icon/components/CircleInfoIcon/index.ts index 4e816048..0a21046f 100644 --- a/src/common/Icon/components/CircleInfoIcon/index.ts +++ b/src/common/Icon/components/CircleInfoIcon/index.ts @@ -1 +1 @@ -export * from './CircleInfoIcon' \ No newline at end of file +export * from './CircleInfoIcon'; diff --git a/src/common/Icon/components/CoinsIcon/CoinsIcon.tsx b/src/common/Icon/components/CoinsIcon/CoinsIcon.tsx index c27ce00e..61d14b4a 100644 --- a/src/common/Icon/components/CoinsIcon/CoinsIcon.tsx +++ b/src/common/Icon/components/CoinsIcon/CoinsIcon.tsx @@ -2,10 +2,10 @@ import { h } from '@stencil/core'; import type { JSXBase } from '@stencil/core/internal'; export const CoinsIcon = (properties: JSXBase.IntrinsicElements['svg']) => ( - - - + + + ); diff --git a/src/common/Icon/components/CoinsIcon/index.ts b/src/common/Icon/components/CoinsIcon/index.ts index 9f35eb0a..2c25bbbc 100644 --- a/src/common/Icon/components/CoinsIcon/index.ts +++ b/src/common/Icon/components/CoinsIcon/index.ts @@ -1 +1 @@ -export * from './CoinsIcon' \ No newline at end of file +export * from './CoinsIcon'; diff --git a/src/common/Icon/components/HourglassIcon/HourglassIcon.tsx b/src/common/Icon/components/HourglassIcon/HourglassIcon.tsx index 18b68ced..c2ab4b22 100644 --- a/src/common/Icon/components/HourglassIcon/HourglassIcon.tsx +++ b/src/common/Icon/components/HourglassIcon/HourglassIcon.tsx @@ -2,10 +2,10 @@ import { h } from '@stencil/core'; import type { JSXBase } from '@stencil/core/internal'; export const HourglassIcon = (properties: JSXBase.IntrinsicElements['svg']) => ( - - - + + + ); diff --git a/src/common/Icon/components/HourglassIcon/index.ts b/src/common/Icon/components/HourglassIcon/index.ts index 40fb5498..864b7c2c 100644 --- a/src/common/Icon/components/HourglassIcon/index.ts +++ b/src/common/Icon/components/HourglassIcon/index.ts @@ -1 +1 @@ -export * from './HourglassIcon' \ No newline at end of file +export * from './HourglassIcon'; diff --git a/src/common/Icon/components/SpinnerIcon/SpinnerIcon.tsx b/src/common/Icon/components/SpinnerIcon/SpinnerIcon.tsx index 0c6ee5ac..ee728595 100644 --- a/src/common/Icon/components/SpinnerIcon/SpinnerIcon.tsx +++ b/src/common/Icon/components/SpinnerIcon/SpinnerIcon.tsx @@ -1,16 +1,20 @@ import { h } from '@stencil/core'; const styles = { - spinnerIcon: 'spinner-icon mvx:w-4 mvx:h-4 mvx:fill-secondary-text mvx:animate-spinner' + spinnerIcon: 'spinner-icon mvx:w-4 mvx:h-4 mvx:fill-secondary-text mvx:animate-spinner', } satisfies Record; export const SpinnerIcon = ({ class: className }: { class?: string }) => ( - - - + + + ); - - diff --git a/src/common/Icon/components/SpinnerIcon/index.ts b/src/common/Icon/components/SpinnerIcon/index.ts index 2a092c9d..f271e5f2 100644 --- a/src/common/Icon/components/SpinnerIcon/index.ts +++ b/src/common/Icon/components/SpinnerIcon/index.ts @@ -1 +1 @@ -export * from './SpinnerIcon'; \ No newline at end of file +export * from './SpinnerIcon'; diff --git a/src/common/Icon/icon.types.ts b/src/common/Icon/icon.types.ts index c699f9a0..cdd2c90d 100644 --- a/src/common/Icon/icon.types.ts +++ b/src/common/Icon/icon.types.ts @@ -26,7 +26,7 @@ export enum IconNamesEnum { coins = 'coins', arrowsRotate = 'arrows-rotate', spinner = 'spinner', - arrowRight = 'arrow-right' + arrowRight = 'arrow-right', } export type IconPropsType = JSXBase.IntrinsicElements['svg'] & { diff --git a/src/common/Tooltip/Tooltip.tsx b/src/common/Tooltip/Tooltip.tsx index e8624165..a82813a4 100644 --- a/src/common/Tooltip/Tooltip.tsx +++ b/src/common/Tooltip/Tooltip.tsx @@ -2,86 +2,97 @@ import { h } from '@stencil/core'; // prettier-ignore const styles = { - tooltip: 'tooltip mvx:flex mvx:relative', - tooltipContentWrapper: 'tooltip-content-wrapper mvx:left-1/2 mvx:absolute mvx:z-1 mvx:transform mvx:-translate-x-1/2', - tooltipContent: 'tooltip-content mvx:flex-row mvx:cursor-default mvx:p-2 mvx:whitespace-nowrap mvx:text-xs mvx:rounded-xl mvx:leading-none mvx:!bg-surface mvx:border-outline-variant mvx:border mvx:text-primary mvx:after:left-1/2 mvx:after:origin-center mvx:after:w-2 mvx:after:h-2 mvx:after:absolute mvx:after:border mvx:after:border-outline-variant mvx:after:!bg-surface mvx:after:translate-x-[calc(50%-8px)] mvx:after:-rotate-[45deg] mvx:after:content-[""]', - tooltipContentTop: 'tooltip-content-top mvx:after:border-t-0 mvx:after:border-r-0 mvx:after:-bottom-1', - tooltipContentBottom: 'tooltip-content-bottom mvx:after:border-b-0 mvx:after:border-l-0 mvx:after:-top-1' + tooltip: 'tooltip mvx:flex mvx:relative', + tooltipContentWrapper: 'tooltip-content-wrapper mvx:left-1/2 mvx:absolute mvx:z-1 mvx:transform mvx:-translate-x-1/2', + tooltipContent: 'tooltip-content mvx:flex-row mvx:cursor-default mvx:p-2 mvx:whitespace-nowrap mvx:text-xs mvx:rounded-xl mvx:leading-none mvx:!bg-surface mvx:border-outline-variant mvx:border mvx:text-primary mvx:after:left-1/2 mvx:after:origin-center mvx:after:w-2 mvx:after:h-2 mvx:after:absolute mvx:after:border mvx:after:border-outline-variant mvx:after:!bg-surface mvx:after:translate-x-[calc(50%-8px)] mvx:after:-rotate-[45deg] mvx:after:content-[""]', + tooltipContentTop: 'tooltip-content-top mvx:after:border-t-0 mvx:after:border-r-0 mvx:after:-bottom-1', + tooltipContentBottom: 'tooltip-content-bottom mvx:after:border-b-0 mvx:after:border-l-0 mvx:after:-top-1' } satisfies Record; interface TooltipPropsType { - position?: 'top' | 'bottom'; - triggerOnClick?: boolean; - trigger: HTMLElement; - class?: string; - isTooltipVisible?: boolean; - onVisibilityChange?: (isTooltipVisible: boolean) => void; + position?: 'top' | 'bottom'; + triggerOnClick?: boolean; + trigger: HTMLElement; + class?: string; + isTooltipVisible?: boolean; + onVisibilityChange?: (isTooltipVisible: boolean) => void; } -export function Tooltip({ position = 'top', triggerOnClick = false, trigger, class: className, onVisibilityChange, isTooltipVisible = false }: TooltipPropsType, children?: any) { - const setTooltipVisible = (isTooltipVisible: boolean) => { - onVisibilityChange?.(isTooltipVisible); - } - - const handleEllipsisClick = (event: MouseEvent) => { - if (!triggerOnClick) { - return; - } +export function Tooltip( + { + position = 'top', + triggerOnClick = false, + trigger, + class: className, + onVisibilityChange, + isTooltipVisible = false, + }: TooltipPropsType, + children?: any, +) { + const setTooltipVisible = (isTooltipVisible: boolean) => { + onVisibilityChange?.(isTooltipVisible); + }; - event.preventDefault(); - setTooltipVisible(!isTooltipVisible); + const handleEllipsisClick = (event: MouseEvent) => { + if (!triggerOnClick) { + return; } - const handleFocusOut = (event: FocusEvent) => { - const relatedTarget = event.relatedTarget as Node; - const currentTarget = event.currentTarget as HTMLElement; + event.preventDefault(); + setTooltipVisible(!isTooltipVisible); + }; - if (!currentTarget.contains(relatedTarget)) { - setTooltipVisible(false); - } - } + const handleFocusOut = (event: FocusEvent) => { + const relatedTarget = event.relatedTarget as Node; + const currentTarget = event.currentTarget as HTMLElement; - const handleMouseEvent = (isTooltipVisible: boolean) => { - if (triggerOnClick) { - return; - } + if (!currentTarget.contains(relatedTarget)) { + setTooltipVisible(false); + } + }; - return (event: MouseEvent) => { - event.preventDefault(); - setTooltipVisible(isTooltipVisible); - }; + const handleMouseEvent = (isTooltipVisible: boolean) => { + if (triggerOnClick) { + return; } - return ( + return (event: MouseEvent) => { + event.preventDefault(); + setTooltipVisible(isTooltipVisible); + }; + }; + + return ( +
+ {isTooltipVisible && (
- {isTooltipVisible && ( -
-
event.stopPropagation()} - > - {children} -
-
- )} - - {trigger} +
event.stopPropagation()} + > + {children} +
- ); -} \ No newline at end of file + )} + + {trigger} +
+ ); +} diff --git a/src/common/Trim/Trim.tsx b/src/common/Trim/Trim.tsx index ae2dd63b..0010a1f9 100644 --- a/src/common/Trim/Trim.tsx +++ b/src/common/Trim/Trim.tsx @@ -3,181 +3,175 @@ import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; import { ELLIPSIS } from 'constants/htmlStrings'; import { safeWindow } from 'constants/window.constants'; -import styles from './trim.styles' +import styles from './trim.styles'; interface TrimPropsType { - dataTestId?: string; - class?: string; - text: string; + dataTestId?: string; + class?: string; + text: string; } -export function Trim({ - dataTestId = DataTestIdsEnum.trim, - class: className, - text -}: TrimPropsType) { - let fullWidthUntrimmedElementReference: HTMLDivElement; - let trimElementReference: HTMLDivElement; - let resizeObserver: ResizeObserver; - let currentTrimFontSize = '1rem'; - let trimFullElement: HTMLDivElement; - let trimWrapperElement: HTMLDivElement; - let isCurrentlyOverflowing: boolean | null = null; - let isCheckingOverflow = false; - - const handleTrimElementReference = (element: HTMLDivElement) => { - if (element) { - trimElementReference = element; - setupResizeObserver(); - requestAnimationFrame(checkOverflow); - } +export function Trim({ dataTestId = DataTestIdsEnum.trim, class: className, text }: TrimPropsType) { + let fullWidthUntrimmedElementReference: HTMLDivElement; + let trimElementReference: HTMLDivElement; + let resizeObserver: ResizeObserver; + let currentTrimFontSize = '1rem'; + let trimFullElement: HTMLDivElement; + let trimWrapperElement: HTMLDivElement; + let isCurrentlyOverflowing: boolean | null = null; + let isCheckingOverflow = false; + + const handleTrimElementReference = (element: HTMLDivElement) => { + if (element) { + trimElementReference = element; + setupResizeObserver(); + requestAnimationFrame(checkOverflow); } + }; - const handleFullWidthTrimElementReference = (element: HTMLDivElement) => { - if (element) { - fullWidthUntrimmedElementReference = element; - } + const handleFullWidthTrimElementReference = (element: HTMLDivElement) => { + if (element) { + fullWidthUntrimmedElementReference = element; } + }; - const handleTrimFullRef = (element: HTMLDivElement) => { - if (element) { - trimFullElement = element; - } - }; + const handleTrimFullRef = (element: HTMLDivElement) => { + if (element) { + trimFullElement = element; + } + }; - const handleTrimWrapperRef = (element: HTMLDivElement) => { - if (element) { - trimWrapperElement = element; - } - }; + const handleTrimWrapperRef = (element: HTMLDivElement) => { + if (element) { + trimWrapperElement = element; + } + }; - const setupResizeObserver = () => { - if (resizeObserver) { - resizeObserver.disconnect(); - } + const setupResizeObserver = () => { + if (resizeObserver) { + resizeObserver.disconnect(); + } - resizeObserver = new ResizeObserver(() => { - checkOverflow(); - }); + resizeObserver = new ResizeObserver(() => { + checkOverflow(); + }); - if (trimElementReference) { - resizeObserver.observe(trimElementReference); - } + if (trimElementReference) { + resizeObserver.observe(trimElementReference); } + }; - const checkOverflow = () => { - if (isCheckingOverflow) { - return; - } + const checkOverflow = () => { + if (isCheckingOverflow) { + return; + } - if (!fullWidthUntrimmedElementReference || !trimElementReference || !trimFullElement || !trimWrapperElement) { - return; - } + if (!fullWidthUntrimmedElementReference || !trimElementReference || !trimFullElement || !trimWrapperElement) { + return; + } - isCheckingOverflow = true; + isCheckingOverflow = true; - if (resizeObserver) { - resizeObserver.disconnect(); + if (resizeObserver) { + resizeObserver.disconnect(); + } + + const getIdentifierClass = (classes: string) => classes.split(' ')[0]; + + const trimFullVisibleClasses = styles.trimFullVisible.split(/\s+/); + const trimWrapperVisibleClasses = styles.trimWrapperVisible.split(/\s+/); + + const hiddenFullWidthElementWidth = fullWidthUntrimmedElementReference.scrollWidth; + const trimmedElementWidth = trimElementReference.clientWidth; + const isTrimElementOverflowing = hiddenFullWidthElementWidth > trimmedElementWidth; + + if (isCurrentlyOverflowing === isTrimElementOverflowing) { + isCheckingOverflow = false; + + setTimeout(() => { + if (resizeObserver && trimElementReference) { + resizeObserver.observe(trimElementReference); } + }); + return; + } + + isCurrentlyOverflowing = isTrimElementOverflowing; + requestAnimationFrame(() => { + if (safeWindow) { + currentTrimFontSize = safeWindow.getComputedStyle(trimElementReference).fontSize; + } - const getIdentifierClass = (classes: string) => classes.split(' ')[0]; + const trimLeftSelector = `.${getIdentifierClass(styles.trimLeft)}`; + const trimRightSelector = `.${getIdentifierClass(styles.trimRight)}`; - const trimFullVisibleClasses = styles.trimFullVisible.split(/\s+/); - const trimWrapperVisibleClasses = styles.trimWrapperVisible.split(/\s+/); + const trimLeftElement = trimElementReference.querySelector(trimLeftSelector) as HTMLElement; + const trimRightElement = trimElementReference.querySelector(trimRightSelector) as HTMLElement; + if (trimLeftElement) { + trimLeftElement.style.fontSize = currentTrimFontSize; + } - const hiddenFullWidthElementWidth = fullWidthUntrimmedElementReference.scrollWidth; - const trimmedElementWidth = trimElementReference.clientWidth; - const isTrimElementOverflowing = hiddenFullWidthElementWidth > trimmedElementWidth; + if (trimRightElement) { + trimRightElement.style.fontSize = currentTrimFontSize; + } - if (isCurrentlyOverflowing === isTrimElementOverflowing) { + if (isTrimElementOverflowing) { + trimFullElement.classList.remove(...trimFullVisibleClasses); + trimWrapperElement.classList.add(...trimWrapperVisibleClasses); + } else { + trimFullElement.classList.add(...trimFullVisibleClasses); + trimWrapperElement.classList.remove(...trimWrapperVisibleClasses); + } - isCheckingOverflow = false; + isCheckingOverflow = false; - setTimeout(() => { - if (resizeObserver && trimElementReference) { - resizeObserver.observe(trimElementReference); - } - }); - return; + requestAnimationFrame(() => { + if (resizeObserver && trimElementReference) { + resizeObserver.observe(trimElementReference); } + }); + }); + }; + + const middleTextIndex = Math.floor(text.length / 2); + const leftHandText = text.slice(0, middleTextIndex); + const rightHandText = text.slice(middleTextIndex); + + return ( +
+
{ + handleFullWidthTrimElementReference(el); + handleTrimFullRef(el); + }} + class={styles.trimFull} + > + {text} +
+ +
+
+
+ {leftHandText} +
+
- isCurrentlyOverflowing = isTrimElementOverflowing; - - requestAnimationFrame(() => { - if (safeWindow) { - currentTrimFontSize = safeWindow.getComputedStyle(trimElementReference).fontSize; - } - - const trimLeftSelector = `.${getIdentifierClass(styles.trimLeft)}`; - const trimRightSelector = `.${getIdentifierClass(styles.trimRight)}`; - - const trimLeftElement = trimElementReference.querySelector(trimLeftSelector) as HTMLElement; - const trimRightElement = trimElementReference.querySelector(trimRightSelector) as HTMLElement; - if (trimLeftElement) { - trimLeftElement.style.fontSize = currentTrimFontSize; - } - - if (trimRightElement) { - trimRightElement.style.fontSize = currentTrimFontSize; - } - - if (isTrimElementOverflowing) { - trimFullElement.classList.remove(...trimFullVisibleClasses); - trimWrapperElement.classList.add(...trimWrapperVisibleClasses); - } else { - trimFullElement.classList.add(...trimFullVisibleClasses); - trimWrapperElement.classList.remove(...trimWrapperVisibleClasses); - } - - isCheckingOverflow = false; - - requestAnimationFrame(() => { - if (resizeObserver && trimElementReference) { - resizeObserver.observe(trimElementReference); - } - }); - }); - }; - - const middleTextIndex = Math.floor(text.length / 2); - const leftHandText = text.slice(0, middleTextIndex); - const rightHandText = text.slice(middleTextIndex); - - return ( -
-
{ - handleFullWidthTrimElementReference(el); - handleTrimFullRef(el); - }} - class={styles.trimFull} - > - {text} -
- -
-
-
- {leftHandText} -
-
- -
-
{ELLIPSIS}
-
- -
-
- {rightHandText} -
-
-
+
+
{ELLIPSIS}
- ); -} \ No newline at end of file + +
+
+ {rightHandText} +
+
+
+
+ ); +} diff --git a/src/common/Trim/trim.styles.ts b/src/common/Trim/trim.styles.ts index 6b3eb196..bd8b8b76 100644 --- a/src/common/Trim/trim.styles.ts +++ b/src/common/Trim/trim.styles.ts @@ -12,4 +12,4 @@ export default { trimRightWrapper: 'trim-right-wrapper mvx:flex-shrink mvx:text-ellipsis mvx:overflow-hidden mvx:whitespace-nowrap mvx:text-right mvx:text-[1px]', trimRight: 'trim-right mvx:select-none mvx:pointer-events-none mvx:inline mvx:text-base mvx:leading-5 mvx:text-clip mvx:-webkit-letter-spacing', trimStoriesWrapper: 'trim-stories-wrapper mvx:text-primary' -} satisfies Record; \ No newline at end of file +} satisfies Record; diff --git a/src/common/UnlockButton/UnlockButton.tsx b/src/common/UnlockButton/UnlockButton.tsx index 480e6979..8867e101 100644 --- a/src/common/UnlockButton/UnlockButton.tsx +++ b/src/common/UnlockButton/UnlockButton.tsx @@ -13,6 +13,7 @@ import { safeWindow } from 'constants/window.constants'; import type { IProviderBase } from 'types/provider.types'; import { ProviderTypeEnum } from 'types/provider.types'; import { getDetectedBrowser } from 'utils/getDetectedBrowser'; + import styles from './unlockButton.styles'; interface UnlockButtonPropsType { diff --git a/src/common/UnlockButton/unlockButton.styles.ts b/src/common/UnlockButton/unlockButton.styles.ts index 87dd6af7..8ed46141 100644 --- a/src/common/UnlockButton/unlockButton.styles.ts +++ b/src/common/UnlockButton/unlockButton.styles.ts @@ -7,4 +7,4 @@ export default { unlockButtonStatus: 'unlock-button-status mvx:ml-auto mvx:relative mvx:rounded-3xl mvx:z-1 mvx:leading-none mvx:flex mvx:items-center mvx:py-1 mvx:px-2 mvx:font-medium mvx:gap-1 mvx:text-xs mvx:bg-surface mvx:border mvx:border-solid mvx:border-outline', unlockButtonStatusText: 'unlock-button-status-text mvx:text-accent', unlockButtonStatusIcon: 'unlock-button-status-icon mvx:flex mvx:items-center mvx:text-accent mvx:w-2.5 mvx:h-2.5', -} satisfies Record; \ No newline at end of file +} satisfies Record; diff --git a/src/components.d.ts b/src/components.d.ts index a9d86ead..0ee1b82e 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -4,1564 +4,2137 @@ * This is an autogenerated file created by the Stencil compiler. * It contains typing information for all components that exist in this project. */ -import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; -import { IAddressTableData } from "./types/address-table.types"; -import { ButtonSizeEnum, ButtonVariantEnum } from "./common/Button/button.types"; -import { CustomToastType, IComponentToast, ISimpleToast } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; -import { IConfirmScreenData, IConnectScreenData, ILedgerConnectPanelData } from "./components/functional/ledger-connect/ledger-connect.types"; -import { IEventBus } from "./utils/EventBus"; -import { ITransactionListItem } from "./components/visual/transaction-list-item/transaction-list-item.types"; -import { LocalJSX as JSX } from "@stencil/core"; -import { ITransactionListItem as ITransactionListItem1 } from "./components/visual/transaction-list-item/transaction-list-item.types"; -import { IToastDataState, ITransactionProgressState } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; -import { TransactionStatusEnum } from "./constants/transactionStatus.enum"; -import { TransactionRowType } from "./components/controlled/transactions-table/transactions-table.type"; -import { IProviderBase } from "./types/provider.types"; -import { IEventBus as IEventBus1, unknown as IWalletConnectPanelData } from "./components.d"; -export { IAddressTableData } from "./types/address-table.types"; -export { ButtonSizeEnum, ButtonVariantEnum } from "./common/Button/button.types"; -export { CustomToastType, IComponentToast, ISimpleToast } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; -export { IConfirmScreenData, IConnectScreenData, ILedgerConnectPanelData } from "./components/functional/ledger-connect/ledger-connect.types"; -export { IEventBus } from "./utils/EventBus"; -export { ITransactionListItem } from "./components/visual/transaction-list-item/transaction-list-item.types"; -export { LocalJSX as JSX } from "@stencil/core"; -export { ITransactionListItem as ITransactionListItem1 } from "./components/visual/transaction-list-item/transaction-list-item.types"; -export { IToastDataState, ITransactionProgressState } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; -export { TransactionStatusEnum } from "./constants/transactionStatus.enum"; -export { TransactionRowType } from "./components/controlled/transactions-table/transactions-table.type"; -export { IProviderBase } from "./types/provider.types"; -export { IEventBus as IEventBus1, unknown as IWalletConnectPanelData } from "./components.d"; +import { HTMLStencilElement, JSXBase } from '@stencil/core/internal'; +import { IAddressTableData } from './types/address-table.types'; +import { ButtonSizeEnum, ButtonVariantEnum } from './common/Button/button.types'; +import { + CustomToastType, + IComponentToast, + ISimpleToast, +} from './components/functional/toasts-list/components/transaction-toast/transaction-toast.type'; +import { + IConfirmScreenData, + IConnectScreenData, + ILedgerConnectPanelData, +} from './components/functional/ledger-connect/ledger-connect.types'; +import { IEventBus } from './utils/EventBus'; +import { ITransactionListItem } from './components/visual/transaction-list-item/transaction-list-item.types'; +import { LocalJSX as JSX } from '@stencil/core'; +import { ITransactionListItem as ITransactionListItem1 } from './components/visual/transaction-list-item/transaction-list-item.types'; +import { + IToastDataState, + ITransactionProgressState, +} from './components/functional/toasts-list/components/transaction-toast/transaction-toast.type'; +import { TransactionStatusEnum } from './constants/transactionStatus.enum'; +import { TransactionRowType } from './components/controlled/transactions-table/transactions-table.type'; +import { IProviderBase } from './types/provider.types'; +import { IEventBus as IEventBus1, unknown as IWalletConnectPanelData } from './components.d'; +export { IAddressTableData } from './types/address-table.types'; +export { ButtonSizeEnum, ButtonVariantEnum } from './common/Button/button.types'; +export { + CustomToastType, + IComponentToast, + ISimpleToast, +} from './components/functional/toasts-list/components/transaction-toast/transaction-toast.type'; +export { + IConfirmScreenData, + IConnectScreenData, + ILedgerConnectPanelData, +} from './components/functional/ledger-connect/ledger-connect.types'; +export { IEventBus } from './utils/EventBus'; +export { ITransactionListItem } from './components/visual/transaction-list-item/transaction-list-item.types'; +export { LocalJSX as JSX } from '@stencil/core'; +export { ITransactionListItem as ITransactionListItem1 } from './components/visual/transaction-list-item/transaction-list-item.types'; +export { + IToastDataState, + ITransactionProgressState, +} from './components/functional/toasts-list/components/transaction-toast/transaction-toast.type'; +export { TransactionStatusEnum } from './constants/transactionStatus.enum'; +export { TransactionRowType } from './components/controlled/transactions-table/transactions-table.type'; +export { IProviderBase } from './types/provider.types'; +export { IEventBus as IEventBus1, unknown as IWalletConnectPanelData } from './components.d'; export namespace Components { - interface MvxAddressTable { - "accountScreenData": IAddressTableData; - "selectedIndex": number; - } - interface MvxArcExtensionProviderIcon { - "class"?: string; - "height"?: number; - "width"?: number; - } - interface MvxArrowRightIcon { - "class"?: string; - } - interface MvxBraveExtensionProviderIcon { - "class"?: string; - "height"?: number; - "width"?: number; - } - interface MvxButton { - /** - * @default '' - */ - "class"?: string; - /** - * @default '' - */ - "dataTestId"?: string; - /** - * @default false - */ - "disabled"?: boolean; - /** - * @default 'large' - */ - "size"?: `${ButtonSizeEnum}`; - /** - * @default 'primary' - */ - "variant"?: `${ButtonVariantEnum}`; - } - interface MvxCircleInfoIcon { - "class"?: string; - } - interface MvxCopyButton { - "class"?: string; - "iconClass"?: string; - "text": string; - } - interface MvxCustomToast { - "toast": IComponentToast; - } - interface MvxDataWithExplorerLink { - "class"?: string; - "data": string; - "dataTestId"?: string; - "explorerLink": string; - /** - * @default true - */ - "showCopyButton"?: boolean; - /** - * @default true - */ - "showExplorerButton"?: boolean; - /** - * @default false - */ - "withTooltip"?: boolean; - } - interface MvxDefaultTransactionIconLarge { - "class"?: string; - } - interface MvxDefaultTransactionIconSmall { - "class"?: string; - } - interface MvxEdgeExtensionProviderIcon { - "class"?: string; - "height"?: number; - "width"?: number; - } - interface MvxExplorerLink { - "class"?: string; - "dataTestId"?: string; - "iconClass"?: string; - "link": string; - } - interface MvxExtensionProviderIcon { - "class"?: string; - "height"?: number; - "width"?: number; - } - interface MvxFirefoxExtensionProviderIcon { - "class"?: string; - "height"?: number; - "width"?: number; - } - interface MvxFormatAmount { - "class"?: string; - "dataTestId"?: string; - "decimalClass"?: string; - "isValid": boolean; - "label"?: string; - "labelClass"?: string; - /** - * @default true - */ - "showLabel"?: boolean; - "valueDecimal": string; - "valueInteger": string; - } - interface MvxGenericToast { - "toast": CustomToastType; - } - interface MvxLedgerConfirm { - "confirmScreenData": IConfirmScreenData; - } - interface MvxLedgerConnect { - /** - * @default { accountScreenData: null, confirmScreenData: null, connectScreenData: {}, } - */ - "data": ILedgerConnectPanelData; - "getEventBus": () => Promise; - } - interface MvxLedgerIcon { - "class"?: string; - } - interface MvxLedgerIntro { - "connectScreenData"?: IConnectScreenData; - /** - * @default false - */ - "isAwaiting"?: boolean; - } - interface MvxLedgerProviderIcon { - "class"?: string; - } - interface MvxMagnifyingGlassIcon { - "class"?: string; - } - interface MvxMetamaskProviderIcon { - "class"?: string; - } - interface MvxMultiversxLogoIcon { - "class"?: string; - } - interface MvxMultiversxSymbolIcon { - "class"?: string; - } - interface MvxNotificationsFeed { - "closeWithAnimation": () => Promise; - "getEventBus": () => Promise; - } - interface MvxPagination { - "class"?: string; - /** - * @default 1 - */ - "currentPage": number; - /** - * @default false - */ - "isDisabled"?: boolean; - "totalPages": number; - } - interface MvxPaginationEllipsis { - /** - * @default false - */ - "isActive": boolean; - } - interface MvxPaginationEllipsisForm { - /** - * @default false - */ - "isVisible": boolean; - "maxPageToSearchFor": number; - } - interface MvxPasskeyProviderIcon { - "class"?: string; - } - interface MvxPendingTransactionsPanel { - "closeWithAnimation": () => Promise; - "getEventBus": () => Promise; - } - interface MvxPreloader { - "class"?: string; - } - interface MvxSidePanel { - "hasBackButton"?: boolean; - /** - * @default false - */ - "isOpen": boolean; - "panelClassName"?: string; - "panelTitle": string; - /** - * @default true - */ - "showHeader"?: boolean; - } - interface MvxSidePanelHeader { - /** - * @default true - */ - "hasLeftButton"?: boolean; - /** - * @default true - */ - "hasRightButton"?: boolean; - "panelClassName"?: string; - "panelTitle": string; - } - interface MvxSidePanelSwiper { - "close": () => Promise; - /** - * @default false - */ - "open": boolean; - "openToSnapPoint": (snapIndex?: number) => Promise; - /** - * @default '' - */ - "sidePanelIdentifier": string; - } - interface MvxSignTransactionsPanel { - "closeWithAnimation": () => Promise; - "getEventBus": () => Promise; - } - interface MvxSimpleToast { - "toast": ISimpleToast; - } - interface MvxSpinnerIcon { - "class"?: string; - } - interface MvxToastList { - "getEventBus": () => Promise; - } - interface MvxTooltip { - "class"?: string; - /** - * @default 'top' - */ - "position": 'top' | 'bottom'; - "trigger": HTMLElement; - /** - * @default false - */ - "triggerOnClick"?: boolean; - } - interface MvxTransactionListItem { - "transaction": ITransactionListItem; - } - interface MvxTransactionToast { - "fullWidth"?: boolean; - /** - * @default '' - */ - "processedTransactionsStatus": string | JSX.Element; - "toastDataState": IToastDataState; - /** - * @default '' - */ - "toastId": string; - "transactionProgressState"?: ITransactionProgressState; - /** - * @default [] - */ - "transactions": ITransactionListItem[]; - "wrapperClass": string; - } - interface MvxTransactionToastContent { - "fullWidth"?: boolean; - "processedTransactionsStatus"?: string | JSX.Element; - "toastDataState": IToastDataState; - "transactions": ITransactionListItem[]; - } - interface MvxTransactionToastDetails { - /** - * @default 5 - */ - "maxShownTransactions": number; - "processedTransactionsStatus"?: string | JSX.Element; - "transactionClass": string; - "transactions"?: ITransactionListItem[]; - } - interface MvxTransactionToastDetailsBody { - "hash": string; - "index": string; - "link": string; - "status"?: `${TransactionStatusEnum}`; - /** - * @default 'transaction-details-list-item' - */ - "transactionClass"?: string; - } - interface MvxTransactionToastProgress { - "endTime"?: number; - "isStatusPending"?: boolean; - "startTime"?: number; - "toastId"?: string; - } - interface MvxTransactionsTable { - "class"?: string; - "transactions": TransactionRowType[]; - } - interface MvxTrim { - "class"?: string; - /** - * @default DataTestIdsEnum.trim - */ - "dataTestId"?: string; - "text": string; - } - interface MvxUnlockButton { - "class"?: string; - "dataTestId"?: string; - "icon"?: HTMLElement; - "iconUrl": string; - "label": string; - "type"?: IProviderBase['type']; - } - interface MvxUnlockPanel { - "closeWithAnimation": () => Promise; - "getEventBus": () => Promise; - } - interface MvxWalletConnect { - /** - * @default { wcURI: '' } - */ - "data": IWalletConnectPanelData; - "getEventBus": () => Promise; - /** - * @default '' - */ - "qrCodeSvg": string; - } - interface MvxWalletConnectAppGalleryIcon { - "class"?: string; - } - interface MvxWalletConnectAppStoreIcon { - "class"?: string; - } - interface MvxWalletConnectDownload { - "class"?: string; - } - interface MvxWalletConnectGooglePlayIcon { - "class"?: string; - } - interface MvxWalletConnectScan { - "class"?: string; - /** - * @default '' - */ - "qrCodeSvg": string; - /** - * @default '' - */ - "walletConnectDeepLink"?: string; - } - interface MvxWalletProviderIcon { - "class"?: string; - } - interface MvxXportalDownloadQrIcon { - /** - * @default '' - */ - "class"?: string; - } - interface MvxXportalQrCodePreloader { - "class"?: string; - } + interface MvxAddressTable { + accountScreenData: IAddressTableData; + selectedIndex: number; + } + interface MvxArcExtensionProviderIcon { + class?: string; + height?: number; + width?: number; + } + interface MvxArrowRightIcon { + class?: string; + } + interface MvxBraveExtensionProviderIcon { + class?: string; + height?: number; + width?: number; + } + interface MvxButton { + /** + * @default '' + */ + class?: string; + /** + * @default '' + */ + dataTestId?: string; + /** + * @default false + */ + disabled?: boolean; + /** + * @default 'large' + */ + size?: `${ButtonSizeEnum}`; + /** + * @default 'primary' + */ + variant?: `${ButtonVariantEnum}`; + } + interface MvxCircleInfoIcon { + class?: string; + } + interface MvxCopyButton { + class?: string; + iconClass?: string; + text: string; + } + interface MvxCustomToast { + toast: IComponentToast; + } + interface MvxDataWithExplorerLink { + class?: string; + data: string; + dataTestId?: string; + explorerLink: string; + /** + * @default true + */ + showCopyButton?: boolean; + /** + * @default true + */ + showExplorerButton?: boolean; + /** + * @default false + */ + withTooltip?: boolean; + } + interface MvxDefaultTransactionIconLarge { + class?: string; + } + interface MvxDefaultTransactionIconSmall { + class?: string; + } + interface MvxEdgeExtensionProviderIcon { + class?: string; + height?: number; + width?: number; + } + interface MvxExplorerLink { + class?: string; + dataTestId?: string; + iconClass?: string; + link: string; + } + interface MvxExtensionProviderIcon { + class?: string; + height?: number; + width?: number; + } + interface MvxFirefoxExtensionProviderIcon { + class?: string; + height?: number; + width?: number; + } + interface MvxFormatAmount { + class?: string; + dataTestId?: string; + decimalClass?: string; + isValid: boolean; + label?: string; + labelClass?: string; + /** + * @default true + */ + showLabel?: boolean; + valueDecimal: string; + valueInteger: string; + } + interface MvxGenericToast { + toast: CustomToastType; + } + interface MvxLedgerConfirm { + confirmScreenData: IConfirmScreenData; + } + interface MvxLedgerConnect { + /** + * @default { accountScreenData: null, confirmScreenData: null, connectScreenData: {}, } + */ + data: ILedgerConnectPanelData; + getEventBus: () => Promise; + } + interface MvxLedgerIcon { + class?: string; + } + interface MvxLedgerIntro { + connectScreenData?: IConnectScreenData; + /** + * @default false + */ + isAwaiting?: boolean; + } + interface MvxLedgerProviderIcon { + class?: string; + } + interface MvxMagnifyingGlassIcon { + class?: string; + } + interface MvxMetamaskProviderIcon { + class?: string; + } + interface MvxMultiversxLogoIcon { + class?: string; + } + interface MvxMultiversxSymbolIcon { + class?: string; + } + interface MvxNotificationsFeed { + closeWithAnimation: () => Promise; + getEventBus: () => Promise; + } + interface MvxPagination { + class?: string; + /** + * @default 1 + */ + currentPage: number; + /** + * @default false + */ + isDisabled?: boolean; + totalPages: number; + } + interface MvxPaginationEllipsis { + /** + * @default false + */ + isActive: boolean; + } + interface MvxPaginationEllipsisForm { + /** + * @default false + */ + isVisible: boolean; + maxPageToSearchFor: number; + } + interface MvxPasskeyProviderIcon { + class?: string; + } + interface MvxPendingTransactionsPanel { + closeWithAnimation: () => Promise; + getEventBus: () => Promise; + } + interface MvxPreloader { + class?: string; + } + interface MvxSidePanel { + hasBackButton?: boolean; + /** + * @default false + */ + isOpen: boolean; + panelClassName?: string; + panelTitle: string; + /** + * @default true + */ + showHeader?: boolean; + } + interface MvxSidePanelHeader { + /** + * @default true + */ + hasLeftButton?: boolean; + /** + * @default true + */ + hasRightButton?: boolean; + panelClassName?: string; + panelTitle: string; + } + interface MvxSidePanelSwiper { + close: () => Promise; + /** + * @default false + */ + open: boolean; + openToSnapPoint: (snapIndex?: number) => Promise; + /** + * @default '' + */ + sidePanelIdentifier: string; + } + interface MvxSignTransactionsPanel { + closeWithAnimation: () => Promise; + getEventBus: () => Promise; + } + interface MvxSimpleToast { + toast: ISimpleToast; + } + interface MvxSpinnerIcon { + class?: string; + } + interface MvxToastList { + getEventBus: () => Promise; + } + interface MvxTooltip { + class?: string; + /** + * @default 'top' + */ + position: 'top' | 'bottom'; + trigger: HTMLElement; + /** + * @default false + */ + triggerOnClick?: boolean; + } + interface MvxTransactionListItem { + transaction: ITransactionListItem; + } + interface MvxTransactionToast { + fullWidth?: boolean; + /** + * @default '' + */ + processedTransactionsStatus: string | JSX.Element; + toastDataState: IToastDataState; + /** + * @default '' + */ + toastId: string; + transactionProgressState?: ITransactionProgressState; + /** + * @default [] + */ + transactions: ITransactionListItem[]; + wrapperClass: string; + } + interface MvxTransactionToastContent { + fullWidth?: boolean; + processedTransactionsStatus?: string | JSX.Element; + toastDataState: IToastDataState; + transactions: ITransactionListItem[]; + } + interface MvxTransactionToastDetails { + /** + * @default 5 + */ + maxShownTransactions: number; + processedTransactionsStatus?: string | JSX.Element; + transactionClass: string; + transactions?: ITransactionListItem[]; + } + interface MvxTransactionToastDetailsBody { + hash: string; + index: string; + link: string; + status?: `${TransactionStatusEnum}`; + /** + * @default 'transaction-details-list-item' + */ + transactionClass?: string; + } + interface MvxTransactionToastProgress { + endTime?: number; + isStatusPending?: boolean; + startTime?: number; + toastId?: string; + } + interface MvxTransactionsTable { + class?: string; + transactions: TransactionRowType[]; + } + interface MvxTrim { + class?: string; + /** + * @default DataTestIdsEnum.trim + */ + dataTestId?: string; + text: string; + } + interface MvxUnlockButton { + class?: string; + dataTestId?: string; + icon?: HTMLElement; + iconUrl: string; + label: string; + type?: IProviderBase['type']; + } + interface MvxUnlockPanel { + closeWithAnimation: () => Promise; + getEventBus: () => Promise; + } + interface MvxWalletConnect { + /** + * @default { wcURI: '' } + */ + data: IWalletConnectPanelData; + getEventBus: () => Promise; + /** + * @default '' + */ + qrCodeSvg: string; + } + interface MvxWalletConnectAppGalleryIcon { + class?: string; + } + interface MvxWalletConnectAppStoreIcon { + class?: string; + } + interface MvxWalletConnectDownload { + class?: string; + } + interface MvxWalletConnectGooglePlayIcon { + class?: string; + } + interface MvxWalletConnectScan { + class?: string; + /** + * @default '' + */ + qrCodeSvg: string; + /** + * @default '' + */ + walletConnectDeepLink?: string; + } + interface MvxWalletProviderIcon { + class?: string; + } + interface MvxXportalDownloadQrIcon { + /** + * @default '' + */ + class?: string; + } + interface MvxXportalQrCodePreloader { + class?: string; + } } export interface MvxAddressTableCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxAddressTableElement; + detail: T; + target: HTMLMvxAddressTableElement; } export interface MvxButtonCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxButtonElement; + detail: T; + target: HTMLMvxButtonElement; } export interface MvxCustomToastCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxCustomToastElement; + detail: T; + target: HTMLMvxCustomToastElement; } export interface MvxGenericToastCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxGenericToastElement; + detail: T; + target: HTMLMvxGenericToastElement; } export interface MvxLedgerIntroCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxLedgerIntroElement; + detail: T; + target: HTMLMvxLedgerIntroElement; } export interface MvxPaginationCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxPaginationElement; + detail: T; + target: HTMLMvxPaginationElement; } export interface MvxPaginationEllipsisFormCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxPaginationEllipsisFormElement; + detail: T; + target: HTMLMvxPaginationEllipsisFormElement; } export interface MvxSidePanelCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxSidePanelElement; + detail: T; + target: HTMLMvxSidePanelElement; } export interface MvxSidePanelHeaderCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxSidePanelHeaderElement; + detail: T; + target: HTMLMvxSidePanelHeaderElement; } export interface MvxSidePanelSwiperCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxSidePanelSwiperElement; + detail: T; + target: HTMLMvxSidePanelSwiperElement; } export interface MvxSimpleToastCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxSimpleToastElement; + detail: T; + target: HTMLMvxSimpleToastElement; } export interface MvxTooltipCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxTooltipElement; + detail: T; + target: HTMLMvxTooltipElement; } export interface MvxTransactionToastCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxTransactionToastElement; + detail: T; + target: HTMLMvxTransactionToastElement; } export interface MvxTransactionToastContentCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxTransactionToastContentElement; + detail: T; + target: HTMLMvxTransactionToastContentElement; } export interface MvxWalletConnectScanCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxWalletConnectScanElement; + detail: T; + target: HTMLMvxWalletConnectScanElement; } declare global { - interface HTMLMvxAddressTableElementEventMap { - "accessWallet": any; - "selectAccount": any; - "pageChange": number; - } - interface HTMLMvxAddressTableElement extends Components.MvxAddressTable, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxAddressTableElement, ev: MvxAddressTableCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxAddressTableElement, ev: MvxAddressTableCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxAddressTableElement: { - prototype: HTMLMvxAddressTableElement; - new (): HTMLMvxAddressTableElement; - }; - interface HTMLMvxArcExtensionProviderIconElement extends Components.MvxArcExtensionProviderIcon, HTMLStencilElement { - } - var HTMLMvxArcExtensionProviderIconElement: { - prototype: HTMLMvxArcExtensionProviderIconElement; - new (): HTMLMvxArcExtensionProviderIconElement; - }; - interface HTMLMvxArrowRightIconElement extends Components.MvxArrowRightIcon, HTMLStencilElement { - } - var HTMLMvxArrowRightIconElement: { - prototype: HTMLMvxArrowRightIconElement; - new (): HTMLMvxArrowRightIconElement; - }; - interface HTMLMvxBraveExtensionProviderIconElement extends Components.MvxBraveExtensionProviderIcon, HTMLStencilElement { - } - var HTMLMvxBraveExtensionProviderIconElement: { - prototype: HTMLMvxBraveExtensionProviderIconElement; - new (): HTMLMvxBraveExtensionProviderIconElement; - }; - interface HTMLMvxButtonElementEventMap { - "buttonClick": MouseEvent; - } - interface HTMLMvxButtonElement extends Components.MvxButton, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxButtonElement, ev: MvxButtonCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxButtonElement, ev: MvxButtonCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxButtonElement: { - prototype: HTMLMvxButtonElement; - new (): HTMLMvxButtonElement; - }; - interface HTMLMvxCircleInfoIconElement extends Components.MvxCircleInfoIcon, HTMLStencilElement { - } - var HTMLMvxCircleInfoIconElement: { - prototype: HTMLMvxCircleInfoIconElement; - new (): HTMLMvxCircleInfoIconElement; - }; - interface HTMLMvxCopyButtonElement extends Components.MvxCopyButton, HTMLStencilElement { - } - var HTMLMvxCopyButtonElement: { - prototype: HTMLMvxCopyButtonElement; - new (): HTMLMvxCopyButtonElement; - }; - interface HTMLMvxCustomToastElementEventMap { - "deleteToast": string; - } - interface HTMLMvxCustomToastElement extends Components.MvxCustomToast, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxCustomToastElement, ev: MvxCustomToastCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxCustomToastElement, ev: MvxCustomToastCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxCustomToastElement: { - prototype: HTMLMvxCustomToastElement; - new (): HTMLMvxCustomToastElement; - }; - interface HTMLMvxDataWithExplorerLinkElement extends Components.MvxDataWithExplorerLink, HTMLStencilElement { - } - var HTMLMvxDataWithExplorerLinkElement: { - prototype: HTMLMvxDataWithExplorerLinkElement; - new (): HTMLMvxDataWithExplorerLinkElement; - }; - interface HTMLMvxDefaultTransactionIconLargeElement extends Components.MvxDefaultTransactionIconLarge, HTMLStencilElement { - } - var HTMLMvxDefaultTransactionIconLargeElement: { - prototype: HTMLMvxDefaultTransactionIconLargeElement; - new (): HTMLMvxDefaultTransactionIconLargeElement; - }; - interface HTMLMvxDefaultTransactionIconSmallElement extends Components.MvxDefaultTransactionIconSmall, HTMLStencilElement { - } - var HTMLMvxDefaultTransactionIconSmallElement: { - prototype: HTMLMvxDefaultTransactionIconSmallElement; - new (): HTMLMvxDefaultTransactionIconSmallElement; - }; - interface HTMLMvxEdgeExtensionProviderIconElement extends Components.MvxEdgeExtensionProviderIcon, HTMLStencilElement { - } - var HTMLMvxEdgeExtensionProviderIconElement: { - prototype: HTMLMvxEdgeExtensionProviderIconElement; - new (): HTMLMvxEdgeExtensionProviderIconElement; - }; - interface HTMLMvxExplorerLinkElement extends Components.MvxExplorerLink, HTMLStencilElement { - } - var HTMLMvxExplorerLinkElement: { - prototype: HTMLMvxExplorerLinkElement; - new (): HTMLMvxExplorerLinkElement; - }; - interface HTMLMvxExtensionProviderIconElement extends Components.MvxExtensionProviderIcon, HTMLStencilElement { - } - var HTMLMvxExtensionProviderIconElement: { - prototype: HTMLMvxExtensionProviderIconElement; - new (): HTMLMvxExtensionProviderIconElement; - }; - interface HTMLMvxFirefoxExtensionProviderIconElement extends Components.MvxFirefoxExtensionProviderIcon, HTMLStencilElement { - } - var HTMLMvxFirefoxExtensionProviderIconElement: { - prototype: HTMLMvxFirefoxExtensionProviderIconElement; - new (): HTMLMvxFirefoxExtensionProviderIconElement; - }; - interface HTMLMvxFormatAmountElement extends Components.MvxFormatAmount, HTMLStencilElement { - } - var HTMLMvxFormatAmountElement: { - prototype: HTMLMvxFormatAmountElement; - new (): HTMLMvxFormatAmountElement; - }; - interface HTMLMvxGenericToastElementEventMap { - "deleteToast": string; - } - interface HTMLMvxGenericToastElement extends Components.MvxGenericToast, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxGenericToastElement, ev: MvxGenericToastCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxGenericToastElement, ev: MvxGenericToastCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxGenericToastElement: { - prototype: HTMLMvxGenericToastElement; - new (): HTMLMvxGenericToastElement; - }; - interface HTMLMvxLedgerConfirmElement extends Components.MvxLedgerConfirm, HTMLStencilElement { - } - var HTMLMvxLedgerConfirmElement: { - prototype: HTMLMvxLedgerConfirmElement; - new (): HTMLMvxLedgerConfirmElement; - }; - interface HTMLMvxLedgerConnectElement extends Components.MvxLedgerConnect, HTMLStencilElement { - } - var HTMLMvxLedgerConnectElement: { - prototype: HTMLMvxLedgerConnectElement; - new (): HTMLMvxLedgerConnectElement; - }; - interface HTMLMvxLedgerIconElement extends Components.MvxLedgerIcon, HTMLStencilElement { - } - var HTMLMvxLedgerIconElement: { - prototype: HTMLMvxLedgerIconElement; - new (): HTMLMvxLedgerIconElement; - }; - interface HTMLMvxLedgerIntroElementEventMap { - "connect": any; - } - interface HTMLMvxLedgerIntroElement extends Components.MvxLedgerIntro, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxLedgerIntroElement, ev: MvxLedgerIntroCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxLedgerIntroElement, ev: MvxLedgerIntroCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxLedgerIntroElement: { - prototype: HTMLMvxLedgerIntroElement; - new (): HTMLMvxLedgerIntroElement; - }; - interface HTMLMvxLedgerProviderIconElement extends Components.MvxLedgerProviderIcon, HTMLStencilElement { - } - var HTMLMvxLedgerProviderIconElement: { - prototype: HTMLMvxLedgerProviderIconElement; - new (): HTMLMvxLedgerProviderIconElement; - }; - interface HTMLMvxMagnifyingGlassIconElement extends Components.MvxMagnifyingGlassIcon, HTMLStencilElement { - } - var HTMLMvxMagnifyingGlassIconElement: { - prototype: HTMLMvxMagnifyingGlassIconElement; - new (): HTMLMvxMagnifyingGlassIconElement; - }; - interface HTMLMvxMetamaskProviderIconElement extends Components.MvxMetamaskProviderIcon, HTMLStencilElement { - } - var HTMLMvxMetamaskProviderIconElement: { - prototype: HTMLMvxMetamaskProviderIconElement; - new (): HTMLMvxMetamaskProviderIconElement; - }; - interface HTMLMvxMultiversxLogoIconElement extends Components.MvxMultiversxLogoIcon, HTMLStencilElement { - } - var HTMLMvxMultiversxLogoIconElement: { - prototype: HTMLMvxMultiversxLogoIconElement; - new (): HTMLMvxMultiversxLogoIconElement; - }; - interface HTMLMvxMultiversxSymbolIconElement extends Components.MvxMultiversxSymbolIcon, HTMLStencilElement { - } - var HTMLMvxMultiversxSymbolIconElement: { - prototype: HTMLMvxMultiversxSymbolIconElement; - new (): HTMLMvxMultiversxSymbolIconElement; - }; - interface HTMLMvxNotificationsFeedElement extends Components.MvxNotificationsFeed, HTMLStencilElement { - } - var HTMLMvxNotificationsFeedElement: { - prototype: HTMLMvxNotificationsFeedElement; - new (): HTMLMvxNotificationsFeedElement; - }; - interface HTMLMvxPaginationElementEventMap { - "pageChange": number; - } - interface HTMLMvxPaginationElement extends Components.MvxPagination, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxPaginationElement, ev: MvxPaginationCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxPaginationElement, ev: MvxPaginationCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxPaginationElement: { - prototype: HTMLMvxPaginationElement; - new (): HTMLMvxPaginationElement; - }; - interface HTMLMvxPaginationEllipsisElement extends Components.MvxPaginationEllipsis, HTMLStencilElement { - } - var HTMLMvxPaginationEllipsisElement: { - prototype: HTMLMvxPaginationEllipsisElement; - new (): HTMLMvxPaginationEllipsisElement; - }; - interface HTMLMvxPaginationEllipsisFormElementEventMap { - "search": number; - } - interface HTMLMvxPaginationEllipsisFormElement extends Components.MvxPaginationEllipsisForm, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxPaginationEllipsisFormElement, ev: MvxPaginationEllipsisFormCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxPaginationEllipsisFormElement, ev: MvxPaginationEllipsisFormCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxPaginationEllipsisFormElement: { - prototype: HTMLMvxPaginationEllipsisFormElement; - new (): HTMLMvxPaginationEllipsisFormElement; - }; - interface HTMLMvxPasskeyProviderIconElement extends Components.MvxPasskeyProviderIcon, HTMLStencilElement { - } - var HTMLMvxPasskeyProviderIconElement: { - prototype: HTMLMvxPasskeyProviderIconElement; - new (): HTMLMvxPasskeyProviderIconElement; - }; - interface HTMLMvxPendingTransactionsPanelElement extends Components.MvxPendingTransactionsPanel, HTMLStencilElement { - } - var HTMLMvxPendingTransactionsPanelElement: { - prototype: HTMLMvxPendingTransactionsPanelElement; - new (): HTMLMvxPendingTransactionsPanelElement; - }; - interface HTMLMvxPreloaderElement extends Components.MvxPreloader, HTMLStencilElement { - } - var HTMLMvxPreloaderElement: { - prototype: HTMLMvxPreloaderElement; - new (): HTMLMvxPreloaderElement; - }; - interface HTMLMvxSidePanelElementEventMap { - "close": void; - "back": void; - } - interface HTMLMvxSidePanelElement extends Components.MvxSidePanel, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxSidePanelElement, ev: MvxSidePanelCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxSidePanelElement, ev: MvxSidePanelCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxSidePanelElement: { - prototype: HTMLMvxSidePanelElement; - new (): HTMLMvxSidePanelElement; - }; - interface HTMLMvxSidePanelHeaderElementEventMap { - "rightButtonClick": any; - "leftButtonClick": any; - } - interface HTMLMvxSidePanelHeaderElement extends Components.MvxSidePanelHeader, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxSidePanelHeaderElement, ev: MvxSidePanelHeaderCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxSidePanelHeaderElement, ev: MvxSidePanelHeaderCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxSidePanelHeaderElement: { - prototype: HTMLMvxSidePanelHeaderElement; - new (): HTMLMvxSidePanelHeaderElement; - }; - interface HTMLMvxSidePanelSwiperElementEventMap { - "sheetDismiss": void; - "sheetSnapChange": { index: number; snapPoint: string }; - } - interface HTMLMvxSidePanelSwiperElement extends Components.MvxSidePanelSwiper, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxSidePanelSwiperElement, ev: MvxSidePanelSwiperCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxSidePanelSwiperElement, ev: MvxSidePanelSwiperCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxSidePanelSwiperElement: { - prototype: HTMLMvxSidePanelSwiperElement; - new (): HTMLMvxSidePanelSwiperElement; - }; - interface HTMLMvxSignTransactionsPanelElement extends Components.MvxSignTransactionsPanel, HTMLStencilElement { - } - var HTMLMvxSignTransactionsPanelElement: { - prototype: HTMLMvxSignTransactionsPanelElement; - new (): HTMLMvxSignTransactionsPanelElement; - }; - interface HTMLMvxSimpleToastElementEventMap { - "deleteToast": void; - } - interface HTMLMvxSimpleToastElement extends Components.MvxSimpleToast, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxSimpleToastElement, ev: MvxSimpleToastCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxSimpleToastElement, ev: MvxSimpleToastCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxSimpleToastElement: { - prototype: HTMLMvxSimpleToastElement; - new (): HTMLMvxSimpleToastElement; - }; - interface HTMLMvxSpinnerIconElement extends Components.MvxSpinnerIcon, HTMLStencilElement { - } - var HTMLMvxSpinnerIconElement: { - prototype: HTMLMvxSpinnerIconElement; - new (): HTMLMvxSpinnerIconElement; - }; - interface HTMLMvxToastListElement extends Components.MvxToastList, HTMLStencilElement { - } - var HTMLMvxToastListElement: { - prototype: HTMLMvxToastListElement; - new (): HTMLMvxToastListElement; - }; - interface HTMLMvxTooltipElementEventMap { - "triggerRender": boolean; - } - interface HTMLMvxTooltipElement extends Components.MvxTooltip, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxTooltipElement, ev: MvxTooltipCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxTooltipElement, ev: MvxTooltipCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxTooltipElement: { - prototype: HTMLMvxTooltipElement; - new (): HTMLMvxTooltipElement; - }; - interface HTMLMvxTransactionListItemElement extends Components.MvxTransactionListItem, HTMLStencilElement { - } - var HTMLMvxTransactionListItemElement: { - prototype: HTMLMvxTransactionListItemElement; - new (): HTMLMvxTransactionListItemElement; - }; - interface HTMLMvxTransactionToastElementEventMap { - "deleteToast": void; - } - interface HTMLMvxTransactionToastElement extends Components.MvxTransactionToast, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxTransactionToastElement, ev: MvxTransactionToastCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxTransactionToastElement, ev: MvxTransactionToastCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxTransactionToastElement: { - prototype: HTMLMvxTransactionToastElement; - new (): HTMLMvxTransactionToastElement; - }; - interface HTMLMvxTransactionToastContentElementEventMap { - "deleteToast": void; - } - interface HTMLMvxTransactionToastContentElement extends Components.MvxTransactionToastContent, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxTransactionToastContentElement, ev: MvxTransactionToastContentCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxTransactionToastContentElement, ev: MvxTransactionToastContentCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxTransactionToastContentElement: { - prototype: HTMLMvxTransactionToastContentElement; - new (): HTMLMvxTransactionToastContentElement; - }; - interface HTMLMvxTransactionToastDetailsElement extends Components.MvxTransactionToastDetails, HTMLStencilElement { - } - var HTMLMvxTransactionToastDetailsElement: { - prototype: HTMLMvxTransactionToastDetailsElement; - new (): HTMLMvxTransactionToastDetailsElement; - }; - interface HTMLMvxTransactionToastDetailsBodyElement extends Components.MvxTransactionToastDetailsBody, HTMLStencilElement { - } - var HTMLMvxTransactionToastDetailsBodyElement: { - prototype: HTMLMvxTransactionToastDetailsBodyElement; - new (): HTMLMvxTransactionToastDetailsBodyElement; - }; - interface HTMLMvxTransactionToastProgressElement extends Components.MvxTransactionToastProgress, HTMLStencilElement { - } - var HTMLMvxTransactionToastProgressElement: { - prototype: HTMLMvxTransactionToastProgressElement; - new (): HTMLMvxTransactionToastProgressElement; - }; - interface HTMLMvxTransactionsTableElement extends Components.MvxTransactionsTable, HTMLStencilElement { - } - var HTMLMvxTransactionsTableElement: { - prototype: HTMLMvxTransactionsTableElement; - new (): HTMLMvxTransactionsTableElement; - }; - interface HTMLMvxTrimElement extends Components.MvxTrim, HTMLStencilElement { - } - var HTMLMvxTrimElement: { - prototype: HTMLMvxTrimElement; - new (): HTMLMvxTrimElement; - }; - interface HTMLMvxUnlockButtonElement extends Components.MvxUnlockButton, HTMLStencilElement { - } - var HTMLMvxUnlockButtonElement: { - prototype: HTMLMvxUnlockButtonElement; - new (): HTMLMvxUnlockButtonElement; - }; - interface HTMLMvxUnlockPanelElement extends Components.MvxUnlockPanel, HTMLStencilElement { - } - var HTMLMvxUnlockPanelElement: { - prototype: HTMLMvxUnlockPanelElement; - new (): HTMLMvxUnlockPanelElement; - }; - interface HTMLMvxWalletConnectElement extends Components.MvxWalletConnect, HTMLStencilElement { - } - var HTMLMvxWalletConnectElement: { - prototype: HTMLMvxWalletConnectElement; - new (): HTMLMvxWalletConnectElement; - }; - interface HTMLMvxWalletConnectAppGalleryIconElement extends Components.MvxWalletConnectAppGalleryIcon, HTMLStencilElement { - } - var HTMLMvxWalletConnectAppGalleryIconElement: { - prototype: HTMLMvxWalletConnectAppGalleryIconElement; - new (): HTMLMvxWalletConnectAppGalleryIconElement; - }; - interface HTMLMvxWalletConnectAppStoreIconElement extends Components.MvxWalletConnectAppStoreIcon, HTMLStencilElement { - } - var HTMLMvxWalletConnectAppStoreIconElement: { - prototype: HTMLMvxWalletConnectAppStoreIconElement; - new (): HTMLMvxWalletConnectAppStoreIconElement; - }; - interface HTMLMvxWalletConnectDownloadElement extends Components.MvxWalletConnectDownload, HTMLStencilElement { - } - var HTMLMvxWalletConnectDownloadElement: { - prototype: HTMLMvxWalletConnectDownloadElement; - new (): HTMLMvxWalletConnectDownloadElement; - }; - interface HTMLMvxWalletConnectGooglePlayIconElement extends Components.MvxWalletConnectGooglePlayIcon, HTMLStencilElement { - } - var HTMLMvxWalletConnectGooglePlayIconElement: { - prototype: HTMLMvxWalletConnectGooglePlayIconElement; - new (): HTMLMvxWalletConnectGooglePlayIconElement; - }; - interface HTMLMvxWalletConnectScanElementEventMap { - "downloadClick": any; - } - interface HTMLMvxWalletConnectScanElement extends Components.MvxWalletConnectScan, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxWalletConnectScanElement, ev: MvxWalletConnectScanCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxWalletConnectScanElement, ev: MvxWalletConnectScanCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxWalletConnectScanElement: { - prototype: HTMLMvxWalletConnectScanElement; - new (): HTMLMvxWalletConnectScanElement; - }; - interface HTMLMvxWalletProviderIconElement extends Components.MvxWalletProviderIcon, HTMLStencilElement { - } - var HTMLMvxWalletProviderIconElement: { - prototype: HTMLMvxWalletProviderIconElement; - new (): HTMLMvxWalletProviderIconElement; - }; - interface HTMLMvxXportalDownloadQrIconElement extends Components.MvxXportalDownloadQrIcon, HTMLStencilElement { - } - var HTMLMvxXportalDownloadQrIconElement: { - prototype: HTMLMvxXportalDownloadQrIconElement; - new (): HTMLMvxXportalDownloadQrIconElement; - }; - interface HTMLMvxXportalQrCodePreloaderElement extends Components.MvxXportalQrCodePreloader, HTMLStencilElement { - } - var HTMLMvxXportalQrCodePreloaderElement: { - prototype: HTMLMvxXportalQrCodePreloaderElement; - new (): HTMLMvxXportalQrCodePreloaderElement; - }; - interface HTMLElementTagNameMap { - "mvx-address-table": HTMLMvxAddressTableElement; - "mvx-arc-extension-provider-icon": HTMLMvxArcExtensionProviderIconElement; - "mvx-arrow-right-icon": HTMLMvxArrowRightIconElement; - "mvx-brave-extension-provider-icon": HTMLMvxBraveExtensionProviderIconElement; - "mvx-button": HTMLMvxButtonElement; - "mvx-circle-info-icon": HTMLMvxCircleInfoIconElement; - "mvx-copy-button": HTMLMvxCopyButtonElement; - "mvx-custom-toast": HTMLMvxCustomToastElement; - "mvx-data-with-explorer-link": HTMLMvxDataWithExplorerLinkElement; - "mvx-default-transaction-icon-large": HTMLMvxDefaultTransactionIconLargeElement; - "mvx-default-transaction-icon-small": HTMLMvxDefaultTransactionIconSmallElement; - "mvx-edge-extension-provider-icon": HTMLMvxEdgeExtensionProviderIconElement; - "mvx-explorer-link": HTMLMvxExplorerLinkElement; - "mvx-extension-provider-icon": HTMLMvxExtensionProviderIconElement; - "mvx-firefox-extension-provider-icon": HTMLMvxFirefoxExtensionProviderIconElement; - "mvx-format-amount": HTMLMvxFormatAmountElement; - "mvx-generic-toast": HTMLMvxGenericToastElement; - "mvx-ledger-confirm": HTMLMvxLedgerConfirmElement; - "mvx-ledger-connect": HTMLMvxLedgerConnectElement; - "mvx-ledger-icon": HTMLMvxLedgerIconElement; - "mvx-ledger-intro": HTMLMvxLedgerIntroElement; - "mvx-ledger-provider-icon": HTMLMvxLedgerProviderIconElement; - "mvx-magnifying-glass-icon": HTMLMvxMagnifyingGlassIconElement; - "mvx-metamask-provider-icon": HTMLMvxMetamaskProviderIconElement; - "mvx-multiversx-logo-icon": HTMLMvxMultiversxLogoIconElement; - "mvx-multiversx-symbol-icon": HTMLMvxMultiversxSymbolIconElement; - "mvx-notifications-feed": HTMLMvxNotificationsFeedElement; - "mvx-pagination": HTMLMvxPaginationElement; - "mvx-pagination-ellipsis": HTMLMvxPaginationEllipsisElement; - "mvx-pagination-ellipsis-form": HTMLMvxPaginationEllipsisFormElement; - "mvx-passkey-provider-icon": HTMLMvxPasskeyProviderIconElement; - "mvx-pending-transactions-panel": HTMLMvxPendingTransactionsPanelElement; - "mvx-preloader": HTMLMvxPreloaderElement; - "mvx-side-panel": HTMLMvxSidePanelElement; - "mvx-side-panel-header": HTMLMvxSidePanelHeaderElement; - "mvx-side-panel-swiper": HTMLMvxSidePanelSwiperElement; - "mvx-sign-transactions-panel": HTMLMvxSignTransactionsPanelElement; - "mvx-simple-toast": HTMLMvxSimpleToastElement; - "mvx-spinner-icon": HTMLMvxSpinnerIconElement; - "mvx-toast-list": HTMLMvxToastListElement; - "mvx-tooltip": HTMLMvxTooltipElement; - "mvx-transaction-list-item": HTMLMvxTransactionListItemElement; - "mvx-transaction-toast": HTMLMvxTransactionToastElement; - "mvx-transaction-toast-content": HTMLMvxTransactionToastContentElement; - "mvx-transaction-toast-details": HTMLMvxTransactionToastDetailsElement; - "mvx-transaction-toast-details-body": HTMLMvxTransactionToastDetailsBodyElement; - "mvx-transaction-toast-progress": HTMLMvxTransactionToastProgressElement; - "mvx-transactions-table": HTMLMvxTransactionsTableElement; - "mvx-trim": HTMLMvxTrimElement; - "mvx-unlock-button": HTMLMvxUnlockButtonElement; - "mvx-unlock-panel": HTMLMvxUnlockPanelElement; - "mvx-wallet-connect": HTMLMvxWalletConnectElement; - "mvx-wallet-connect-app-gallery-icon": HTMLMvxWalletConnectAppGalleryIconElement; - "mvx-wallet-connect-app-store-icon": HTMLMvxWalletConnectAppStoreIconElement; - "mvx-wallet-connect-download": HTMLMvxWalletConnectDownloadElement; - "mvx-wallet-connect-google-play-icon": HTMLMvxWalletConnectGooglePlayIconElement; - "mvx-wallet-connect-scan": HTMLMvxWalletConnectScanElement; - "mvx-wallet-provider-icon": HTMLMvxWalletProviderIconElement; - "mvx-xportal-download-qr-icon": HTMLMvxXportalDownloadQrIconElement; - "mvx-xportal-qr-code-preloader": HTMLMvxXportalQrCodePreloaderElement; - } + interface HTMLMvxAddressTableElementEventMap { + accessWallet: any; + selectAccount: any; + pageChange: number; + } + interface HTMLMvxAddressTableElement extends Components.MvxAddressTable, HTMLStencilElement { + addEventListener( + type: K, + listener: ( + this: HTMLMvxAddressTableElement, + ev: MvxAddressTableCustomEvent, + ) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: ( + this: HTMLMvxAddressTableElement, + ev: MvxAddressTableCustomEvent, + ) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxAddressTableElement: { + prototype: HTMLMvxAddressTableElement; + new (): HTMLMvxAddressTableElement; + }; + interface HTMLMvxArcExtensionProviderIconElement extends Components.MvxArcExtensionProviderIcon, HTMLStencilElement {} + var HTMLMvxArcExtensionProviderIconElement: { + prototype: HTMLMvxArcExtensionProviderIconElement; + new (): HTMLMvxArcExtensionProviderIconElement; + }; + interface HTMLMvxArrowRightIconElement extends Components.MvxArrowRightIcon, HTMLStencilElement {} + var HTMLMvxArrowRightIconElement: { + prototype: HTMLMvxArrowRightIconElement; + new (): HTMLMvxArrowRightIconElement; + }; + interface HTMLMvxBraveExtensionProviderIconElement + extends Components.MvxBraveExtensionProviderIcon, + HTMLStencilElement {} + var HTMLMvxBraveExtensionProviderIconElement: { + prototype: HTMLMvxBraveExtensionProviderIconElement; + new (): HTMLMvxBraveExtensionProviderIconElement; + }; + interface HTMLMvxButtonElementEventMap { + buttonClick: MouseEvent; + } + interface HTMLMvxButtonElement extends Components.MvxButton, HTMLStencilElement { + addEventListener( + type: K, + listener: (this: HTMLMvxButtonElement, ev: MvxButtonCustomEvent) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLMvxButtonElement, ev: MvxButtonCustomEvent) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxButtonElement: { + prototype: HTMLMvxButtonElement; + new (): HTMLMvxButtonElement; + }; + interface HTMLMvxCircleInfoIconElement extends Components.MvxCircleInfoIcon, HTMLStencilElement {} + var HTMLMvxCircleInfoIconElement: { + prototype: HTMLMvxCircleInfoIconElement; + new (): HTMLMvxCircleInfoIconElement; + }; + interface HTMLMvxCopyButtonElement extends Components.MvxCopyButton, HTMLStencilElement {} + var HTMLMvxCopyButtonElement: { + prototype: HTMLMvxCopyButtonElement; + new (): HTMLMvxCopyButtonElement; + }; + interface HTMLMvxCustomToastElementEventMap { + deleteToast: string; + } + interface HTMLMvxCustomToastElement extends Components.MvxCustomToast, HTMLStencilElement { + addEventListener( + type: K, + listener: ( + this: HTMLMvxCustomToastElement, + ev: MvxCustomToastCustomEvent, + ) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: ( + this: HTMLMvxCustomToastElement, + ev: MvxCustomToastCustomEvent, + ) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxCustomToastElement: { + prototype: HTMLMvxCustomToastElement; + new (): HTMLMvxCustomToastElement; + }; + interface HTMLMvxDataWithExplorerLinkElement extends Components.MvxDataWithExplorerLink, HTMLStencilElement {} + var HTMLMvxDataWithExplorerLinkElement: { + prototype: HTMLMvxDataWithExplorerLinkElement; + new (): HTMLMvxDataWithExplorerLinkElement; + }; + interface HTMLMvxDefaultTransactionIconLargeElement + extends Components.MvxDefaultTransactionIconLarge, + HTMLStencilElement {} + var HTMLMvxDefaultTransactionIconLargeElement: { + prototype: HTMLMvxDefaultTransactionIconLargeElement; + new (): HTMLMvxDefaultTransactionIconLargeElement; + }; + interface HTMLMvxDefaultTransactionIconSmallElement + extends Components.MvxDefaultTransactionIconSmall, + HTMLStencilElement {} + var HTMLMvxDefaultTransactionIconSmallElement: { + prototype: HTMLMvxDefaultTransactionIconSmallElement; + new (): HTMLMvxDefaultTransactionIconSmallElement; + }; + interface HTMLMvxEdgeExtensionProviderIconElement + extends Components.MvxEdgeExtensionProviderIcon, + HTMLStencilElement {} + var HTMLMvxEdgeExtensionProviderIconElement: { + prototype: HTMLMvxEdgeExtensionProviderIconElement; + new (): HTMLMvxEdgeExtensionProviderIconElement; + }; + interface HTMLMvxExplorerLinkElement extends Components.MvxExplorerLink, HTMLStencilElement {} + var HTMLMvxExplorerLinkElement: { + prototype: HTMLMvxExplorerLinkElement; + new (): HTMLMvxExplorerLinkElement; + }; + interface HTMLMvxExtensionProviderIconElement extends Components.MvxExtensionProviderIcon, HTMLStencilElement {} + var HTMLMvxExtensionProviderIconElement: { + prototype: HTMLMvxExtensionProviderIconElement; + new (): HTMLMvxExtensionProviderIconElement; + }; + interface HTMLMvxFirefoxExtensionProviderIconElement + extends Components.MvxFirefoxExtensionProviderIcon, + HTMLStencilElement {} + var HTMLMvxFirefoxExtensionProviderIconElement: { + prototype: HTMLMvxFirefoxExtensionProviderIconElement; + new (): HTMLMvxFirefoxExtensionProviderIconElement; + }; + interface HTMLMvxFormatAmountElement extends Components.MvxFormatAmount, HTMLStencilElement {} + var HTMLMvxFormatAmountElement: { + prototype: HTMLMvxFormatAmountElement; + new (): HTMLMvxFormatAmountElement; + }; + interface HTMLMvxGenericToastElementEventMap { + deleteToast: string; + } + interface HTMLMvxGenericToastElement extends Components.MvxGenericToast, HTMLStencilElement { + addEventListener( + type: K, + listener: ( + this: HTMLMvxGenericToastElement, + ev: MvxGenericToastCustomEvent, + ) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: ( + this: HTMLMvxGenericToastElement, + ev: MvxGenericToastCustomEvent, + ) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxGenericToastElement: { + prototype: HTMLMvxGenericToastElement; + new (): HTMLMvxGenericToastElement; + }; + interface HTMLMvxLedgerConfirmElement extends Components.MvxLedgerConfirm, HTMLStencilElement {} + var HTMLMvxLedgerConfirmElement: { + prototype: HTMLMvxLedgerConfirmElement; + new (): HTMLMvxLedgerConfirmElement; + }; + interface HTMLMvxLedgerConnectElement extends Components.MvxLedgerConnect, HTMLStencilElement {} + var HTMLMvxLedgerConnectElement: { + prototype: HTMLMvxLedgerConnectElement; + new (): HTMLMvxLedgerConnectElement; + }; + interface HTMLMvxLedgerIconElement extends Components.MvxLedgerIcon, HTMLStencilElement {} + var HTMLMvxLedgerIconElement: { + prototype: HTMLMvxLedgerIconElement; + new (): HTMLMvxLedgerIconElement; + }; + interface HTMLMvxLedgerIntroElementEventMap { + connect: any; + } + interface HTMLMvxLedgerIntroElement extends Components.MvxLedgerIntro, HTMLStencilElement { + addEventListener( + type: K, + listener: ( + this: HTMLMvxLedgerIntroElement, + ev: MvxLedgerIntroCustomEvent, + ) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: ( + this: HTMLMvxLedgerIntroElement, + ev: MvxLedgerIntroCustomEvent, + ) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxLedgerIntroElement: { + prototype: HTMLMvxLedgerIntroElement; + new (): HTMLMvxLedgerIntroElement; + }; + interface HTMLMvxLedgerProviderIconElement extends Components.MvxLedgerProviderIcon, HTMLStencilElement {} + var HTMLMvxLedgerProviderIconElement: { + prototype: HTMLMvxLedgerProviderIconElement; + new (): HTMLMvxLedgerProviderIconElement; + }; + interface HTMLMvxMagnifyingGlassIconElement extends Components.MvxMagnifyingGlassIcon, HTMLStencilElement {} + var HTMLMvxMagnifyingGlassIconElement: { + prototype: HTMLMvxMagnifyingGlassIconElement; + new (): HTMLMvxMagnifyingGlassIconElement; + }; + interface HTMLMvxMetamaskProviderIconElement extends Components.MvxMetamaskProviderIcon, HTMLStencilElement {} + var HTMLMvxMetamaskProviderIconElement: { + prototype: HTMLMvxMetamaskProviderIconElement; + new (): HTMLMvxMetamaskProviderIconElement; + }; + interface HTMLMvxMultiversxLogoIconElement extends Components.MvxMultiversxLogoIcon, HTMLStencilElement {} + var HTMLMvxMultiversxLogoIconElement: { + prototype: HTMLMvxMultiversxLogoIconElement; + new (): HTMLMvxMultiversxLogoIconElement; + }; + interface HTMLMvxMultiversxSymbolIconElement extends Components.MvxMultiversxSymbolIcon, HTMLStencilElement {} + var HTMLMvxMultiversxSymbolIconElement: { + prototype: HTMLMvxMultiversxSymbolIconElement; + new (): HTMLMvxMultiversxSymbolIconElement; + }; + interface HTMLMvxNotificationsFeedElement extends Components.MvxNotificationsFeed, HTMLStencilElement {} + var HTMLMvxNotificationsFeedElement: { + prototype: HTMLMvxNotificationsFeedElement; + new (): HTMLMvxNotificationsFeedElement; + }; + interface HTMLMvxPaginationElementEventMap { + pageChange: number; + } + interface HTMLMvxPaginationElement extends Components.MvxPagination, HTMLStencilElement { + addEventListener( + type: K, + listener: ( + this: HTMLMvxPaginationElement, + ev: MvxPaginationCustomEvent, + ) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: ( + this: HTMLMvxPaginationElement, + ev: MvxPaginationCustomEvent, + ) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxPaginationElement: { + prototype: HTMLMvxPaginationElement; + new (): HTMLMvxPaginationElement; + }; + interface HTMLMvxPaginationEllipsisElement extends Components.MvxPaginationEllipsis, HTMLStencilElement {} + var HTMLMvxPaginationEllipsisElement: { + prototype: HTMLMvxPaginationEllipsisElement; + new (): HTMLMvxPaginationEllipsisElement; + }; + interface HTMLMvxPaginationEllipsisFormElementEventMap { + search: number; + } + interface HTMLMvxPaginationEllipsisFormElement extends Components.MvxPaginationEllipsisForm, HTMLStencilElement { + addEventListener( + type: K, + listener: ( + this: HTMLMvxPaginationEllipsisFormElement, + ev: MvxPaginationEllipsisFormCustomEvent, + ) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: ( + this: HTMLMvxPaginationEllipsisFormElement, + ev: MvxPaginationEllipsisFormCustomEvent, + ) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxPaginationEllipsisFormElement: { + prototype: HTMLMvxPaginationEllipsisFormElement; + new (): HTMLMvxPaginationEllipsisFormElement; + }; + interface HTMLMvxPasskeyProviderIconElement extends Components.MvxPasskeyProviderIcon, HTMLStencilElement {} + var HTMLMvxPasskeyProviderIconElement: { + prototype: HTMLMvxPasskeyProviderIconElement; + new (): HTMLMvxPasskeyProviderIconElement; + }; + interface HTMLMvxPendingTransactionsPanelElement extends Components.MvxPendingTransactionsPanel, HTMLStencilElement {} + var HTMLMvxPendingTransactionsPanelElement: { + prototype: HTMLMvxPendingTransactionsPanelElement; + new (): HTMLMvxPendingTransactionsPanelElement; + }; + interface HTMLMvxPreloaderElement extends Components.MvxPreloader, HTMLStencilElement {} + var HTMLMvxPreloaderElement: { + prototype: HTMLMvxPreloaderElement; + new (): HTMLMvxPreloaderElement; + }; + interface HTMLMvxSidePanelElementEventMap { + close: void; + back: void; + } + interface HTMLMvxSidePanelElement extends Components.MvxSidePanel, HTMLStencilElement { + addEventListener( + type: K, + listener: (this: HTMLMvxSidePanelElement, ev: MvxSidePanelCustomEvent) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLMvxSidePanelElement, ev: MvxSidePanelCustomEvent) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxSidePanelElement: { + prototype: HTMLMvxSidePanelElement; + new (): HTMLMvxSidePanelElement; + }; + interface HTMLMvxSidePanelHeaderElementEventMap { + rightButtonClick: any; + leftButtonClick: any; + } + interface HTMLMvxSidePanelHeaderElement extends Components.MvxSidePanelHeader, HTMLStencilElement { + addEventListener( + type: K, + listener: ( + this: HTMLMvxSidePanelHeaderElement, + ev: MvxSidePanelHeaderCustomEvent, + ) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: ( + this: HTMLMvxSidePanelHeaderElement, + ev: MvxSidePanelHeaderCustomEvent, + ) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxSidePanelHeaderElement: { + prototype: HTMLMvxSidePanelHeaderElement; + new (): HTMLMvxSidePanelHeaderElement; + }; + interface HTMLMvxSidePanelSwiperElementEventMap { + sheetDismiss: void; + sheetSnapChange: { index: number; snapPoint: string }; + } + interface HTMLMvxSidePanelSwiperElement extends Components.MvxSidePanelSwiper, HTMLStencilElement { + addEventListener( + type: K, + listener: ( + this: HTMLMvxSidePanelSwiperElement, + ev: MvxSidePanelSwiperCustomEvent, + ) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: ( + this: HTMLMvxSidePanelSwiperElement, + ev: MvxSidePanelSwiperCustomEvent, + ) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxSidePanelSwiperElement: { + prototype: HTMLMvxSidePanelSwiperElement; + new (): HTMLMvxSidePanelSwiperElement; + }; + interface HTMLMvxSignTransactionsPanelElement extends Components.MvxSignTransactionsPanel, HTMLStencilElement {} + var HTMLMvxSignTransactionsPanelElement: { + prototype: HTMLMvxSignTransactionsPanelElement; + new (): HTMLMvxSignTransactionsPanelElement; + }; + interface HTMLMvxSimpleToastElementEventMap { + deleteToast: void; + } + interface HTMLMvxSimpleToastElement extends Components.MvxSimpleToast, HTMLStencilElement { + addEventListener( + type: K, + listener: ( + this: HTMLMvxSimpleToastElement, + ev: MvxSimpleToastCustomEvent, + ) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: ( + this: HTMLMvxSimpleToastElement, + ev: MvxSimpleToastCustomEvent, + ) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxSimpleToastElement: { + prototype: HTMLMvxSimpleToastElement; + new (): HTMLMvxSimpleToastElement; + }; + interface HTMLMvxSpinnerIconElement extends Components.MvxSpinnerIcon, HTMLStencilElement {} + var HTMLMvxSpinnerIconElement: { + prototype: HTMLMvxSpinnerIconElement; + new (): HTMLMvxSpinnerIconElement; + }; + interface HTMLMvxToastListElement extends Components.MvxToastList, HTMLStencilElement {} + var HTMLMvxToastListElement: { + prototype: HTMLMvxToastListElement; + new (): HTMLMvxToastListElement; + }; + interface HTMLMvxTooltipElementEventMap { + triggerRender: boolean; + } + interface HTMLMvxTooltipElement extends Components.MvxTooltip, HTMLStencilElement { + addEventListener( + type: K, + listener: (this: HTMLMvxTooltipElement, ev: MvxTooltipCustomEvent) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLMvxTooltipElement, ev: MvxTooltipCustomEvent) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxTooltipElement: { + prototype: HTMLMvxTooltipElement; + new (): HTMLMvxTooltipElement; + }; + interface HTMLMvxTransactionListItemElement extends Components.MvxTransactionListItem, HTMLStencilElement {} + var HTMLMvxTransactionListItemElement: { + prototype: HTMLMvxTransactionListItemElement; + new (): HTMLMvxTransactionListItemElement; + }; + interface HTMLMvxTransactionToastElementEventMap { + deleteToast: void; + } + interface HTMLMvxTransactionToastElement extends Components.MvxTransactionToast, HTMLStencilElement { + addEventListener( + type: K, + listener: ( + this: HTMLMvxTransactionToastElement, + ev: MvxTransactionToastCustomEvent, + ) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: ( + this: HTMLMvxTransactionToastElement, + ev: MvxTransactionToastCustomEvent, + ) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxTransactionToastElement: { + prototype: HTMLMvxTransactionToastElement; + new (): HTMLMvxTransactionToastElement; + }; + interface HTMLMvxTransactionToastContentElementEventMap { + deleteToast: void; + } + interface HTMLMvxTransactionToastContentElement extends Components.MvxTransactionToastContent, HTMLStencilElement { + addEventListener( + type: K, + listener: ( + this: HTMLMvxTransactionToastContentElement, + ev: MvxTransactionToastContentCustomEvent, + ) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: ( + this: HTMLMvxTransactionToastContentElement, + ev: MvxTransactionToastContentCustomEvent, + ) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxTransactionToastContentElement: { + prototype: HTMLMvxTransactionToastContentElement; + new (): HTMLMvxTransactionToastContentElement; + }; + interface HTMLMvxTransactionToastDetailsElement extends Components.MvxTransactionToastDetails, HTMLStencilElement {} + var HTMLMvxTransactionToastDetailsElement: { + prototype: HTMLMvxTransactionToastDetailsElement; + new (): HTMLMvxTransactionToastDetailsElement; + }; + interface HTMLMvxTransactionToastDetailsBodyElement + extends Components.MvxTransactionToastDetailsBody, + HTMLStencilElement {} + var HTMLMvxTransactionToastDetailsBodyElement: { + prototype: HTMLMvxTransactionToastDetailsBodyElement; + new (): HTMLMvxTransactionToastDetailsBodyElement; + }; + interface HTMLMvxTransactionToastProgressElement extends Components.MvxTransactionToastProgress, HTMLStencilElement {} + var HTMLMvxTransactionToastProgressElement: { + prototype: HTMLMvxTransactionToastProgressElement; + new (): HTMLMvxTransactionToastProgressElement; + }; + interface HTMLMvxTransactionsTableElement extends Components.MvxTransactionsTable, HTMLStencilElement {} + var HTMLMvxTransactionsTableElement: { + prototype: HTMLMvxTransactionsTableElement; + new (): HTMLMvxTransactionsTableElement; + }; + interface HTMLMvxTrimElement extends Components.MvxTrim, HTMLStencilElement {} + var HTMLMvxTrimElement: { + prototype: HTMLMvxTrimElement; + new (): HTMLMvxTrimElement; + }; + interface HTMLMvxUnlockButtonElement extends Components.MvxUnlockButton, HTMLStencilElement {} + var HTMLMvxUnlockButtonElement: { + prototype: HTMLMvxUnlockButtonElement; + new (): HTMLMvxUnlockButtonElement; + }; + interface HTMLMvxUnlockPanelElement extends Components.MvxUnlockPanel, HTMLStencilElement {} + var HTMLMvxUnlockPanelElement: { + prototype: HTMLMvxUnlockPanelElement; + new (): HTMLMvxUnlockPanelElement; + }; + interface HTMLMvxWalletConnectElement extends Components.MvxWalletConnect, HTMLStencilElement {} + var HTMLMvxWalletConnectElement: { + prototype: HTMLMvxWalletConnectElement; + new (): HTMLMvxWalletConnectElement; + }; + interface HTMLMvxWalletConnectAppGalleryIconElement + extends Components.MvxWalletConnectAppGalleryIcon, + HTMLStencilElement {} + var HTMLMvxWalletConnectAppGalleryIconElement: { + prototype: HTMLMvxWalletConnectAppGalleryIconElement; + new (): HTMLMvxWalletConnectAppGalleryIconElement; + }; + interface HTMLMvxWalletConnectAppStoreIconElement + extends Components.MvxWalletConnectAppStoreIcon, + HTMLStencilElement {} + var HTMLMvxWalletConnectAppStoreIconElement: { + prototype: HTMLMvxWalletConnectAppStoreIconElement; + new (): HTMLMvxWalletConnectAppStoreIconElement; + }; + interface HTMLMvxWalletConnectDownloadElement extends Components.MvxWalletConnectDownload, HTMLStencilElement {} + var HTMLMvxWalletConnectDownloadElement: { + prototype: HTMLMvxWalletConnectDownloadElement; + new (): HTMLMvxWalletConnectDownloadElement; + }; + interface HTMLMvxWalletConnectGooglePlayIconElement + extends Components.MvxWalletConnectGooglePlayIcon, + HTMLStencilElement {} + var HTMLMvxWalletConnectGooglePlayIconElement: { + prototype: HTMLMvxWalletConnectGooglePlayIconElement; + new (): HTMLMvxWalletConnectGooglePlayIconElement; + }; + interface HTMLMvxWalletConnectScanElementEventMap { + downloadClick: any; + } + interface HTMLMvxWalletConnectScanElement extends Components.MvxWalletConnectScan, HTMLStencilElement { + addEventListener( + type: K, + listener: ( + this: HTMLMvxWalletConnectScanElement, + ev: MvxWalletConnectScanCustomEvent, + ) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: ( + this: HTMLMvxWalletConnectScanElement, + ev: MvxWalletConnectScanCustomEvent, + ) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: Document, ev: DocumentEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; + } + var HTMLMvxWalletConnectScanElement: { + prototype: HTMLMvxWalletConnectScanElement; + new (): HTMLMvxWalletConnectScanElement; + }; + interface HTMLMvxWalletProviderIconElement extends Components.MvxWalletProviderIcon, HTMLStencilElement {} + var HTMLMvxWalletProviderIconElement: { + prototype: HTMLMvxWalletProviderIconElement; + new (): HTMLMvxWalletProviderIconElement; + }; + interface HTMLMvxXportalDownloadQrIconElement extends Components.MvxXportalDownloadQrIcon, HTMLStencilElement {} + var HTMLMvxXportalDownloadQrIconElement: { + prototype: HTMLMvxXportalDownloadQrIconElement; + new (): HTMLMvxXportalDownloadQrIconElement; + }; + interface HTMLMvxXportalQrCodePreloaderElement extends Components.MvxXportalQrCodePreloader, HTMLStencilElement {} + var HTMLMvxXportalQrCodePreloaderElement: { + prototype: HTMLMvxXportalQrCodePreloaderElement; + new (): HTMLMvxXportalQrCodePreloaderElement; + }; + interface HTMLElementTagNameMap { + 'mvx-address-table': HTMLMvxAddressTableElement; + 'mvx-arc-extension-provider-icon': HTMLMvxArcExtensionProviderIconElement; + 'mvx-arrow-right-icon': HTMLMvxArrowRightIconElement; + 'mvx-brave-extension-provider-icon': HTMLMvxBraveExtensionProviderIconElement; + 'mvx-button': HTMLMvxButtonElement; + 'mvx-circle-info-icon': HTMLMvxCircleInfoIconElement; + 'mvx-copy-button': HTMLMvxCopyButtonElement; + 'mvx-custom-toast': HTMLMvxCustomToastElement; + 'mvx-data-with-explorer-link': HTMLMvxDataWithExplorerLinkElement; + 'mvx-default-transaction-icon-large': HTMLMvxDefaultTransactionIconLargeElement; + 'mvx-default-transaction-icon-small': HTMLMvxDefaultTransactionIconSmallElement; + 'mvx-edge-extension-provider-icon': HTMLMvxEdgeExtensionProviderIconElement; + 'mvx-explorer-link': HTMLMvxExplorerLinkElement; + 'mvx-extension-provider-icon': HTMLMvxExtensionProviderIconElement; + 'mvx-firefox-extension-provider-icon': HTMLMvxFirefoxExtensionProviderIconElement; + 'mvx-format-amount': HTMLMvxFormatAmountElement; + 'mvx-generic-toast': HTMLMvxGenericToastElement; + 'mvx-ledger-confirm': HTMLMvxLedgerConfirmElement; + 'mvx-ledger-connect': HTMLMvxLedgerConnectElement; + 'mvx-ledger-icon': HTMLMvxLedgerIconElement; + 'mvx-ledger-intro': HTMLMvxLedgerIntroElement; + 'mvx-ledger-provider-icon': HTMLMvxLedgerProviderIconElement; + 'mvx-magnifying-glass-icon': HTMLMvxMagnifyingGlassIconElement; + 'mvx-metamask-provider-icon': HTMLMvxMetamaskProviderIconElement; + 'mvx-multiversx-logo-icon': HTMLMvxMultiversxLogoIconElement; + 'mvx-multiversx-symbol-icon': HTMLMvxMultiversxSymbolIconElement; + 'mvx-notifications-feed': HTMLMvxNotificationsFeedElement; + 'mvx-pagination': HTMLMvxPaginationElement; + 'mvx-pagination-ellipsis': HTMLMvxPaginationEllipsisElement; + 'mvx-pagination-ellipsis-form': HTMLMvxPaginationEllipsisFormElement; + 'mvx-passkey-provider-icon': HTMLMvxPasskeyProviderIconElement; + 'mvx-pending-transactions-panel': HTMLMvxPendingTransactionsPanelElement; + 'mvx-preloader': HTMLMvxPreloaderElement; + 'mvx-side-panel': HTMLMvxSidePanelElement; + 'mvx-side-panel-header': HTMLMvxSidePanelHeaderElement; + 'mvx-side-panel-swiper': HTMLMvxSidePanelSwiperElement; + 'mvx-sign-transactions-panel': HTMLMvxSignTransactionsPanelElement; + 'mvx-simple-toast': HTMLMvxSimpleToastElement; + 'mvx-spinner-icon': HTMLMvxSpinnerIconElement; + 'mvx-toast-list': HTMLMvxToastListElement; + 'mvx-tooltip': HTMLMvxTooltipElement; + 'mvx-transaction-list-item': HTMLMvxTransactionListItemElement; + 'mvx-transaction-toast': HTMLMvxTransactionToastElement; + 'mvx-transaction-toast-content': HTMLMvxTransactionToastContentElement; + 'mvx-transaction-toast-details': HTMLMvxTransactionToastDetailsElement; + 'mvx-transaction-toast-details-body': HTMLMvxTransactionToastDetailsBodyElement; + 'mvx-transaction-toast-progress': HTMLMvxTransactionToastProgressElement; + 'mvx-transactions-table': HTMLMvxTransactionsTableElement; + 'mvx-trim': HTMLMvxTrimElement; + 'mvx-unlock-button': HTMLMvxUnlockButtonElement; + 'mvx-unlock-panel': HTMLMvxUnlockPanelElement; + 'mvx-wallet-connect': HTMLMvxWalletConnectElement; + 'mvx-wallet-connect-app-gallery-icon': HTMLMvxWalletConnectAppGalleryIconElement; + 'mvx-wallet-connect-app-store-icon': HTMLMvxWalletConnectAppStoreIconElement; + 'mvx-wallet-connect-download': HTMLMvxWalletConnectDownloadElement; + 'mvx-wallet-connect-google-play-icon': HTMLMvxWalletConnectGooglePlayIconElement; + 'mvx-wallet-connect-scan': HTMLMvxWalletConnectScanElement; + 'mvx-wallet-provider-icon': HTMLMvxWalletProviderIconElement; + 'mvx-xportal-download-qr-icon': HTMLMvxXportalDownloadQrIconElement; + 'mvx-xportal-qr-code-preloader': HTMLMvxXportalQrCodePreloaderElement; + } } declare namespace LocalJSX { - interface MvxAddressTable { - "accountScreenData"?: IAddressTableData; - "onAccessWallet"?: (event: MvxAddressTableCustomEvent) => void; - "onPageChange"?: (event: MvxAddressTableCustomEvent) => void; - "onSelectAccount"?: (event: MvxAddressTableCustomEvent) => void; - "selectedIndex"?: number; - } - interface MvxArcExtensionProviderIcon { - "class"?: string; - "height"?: number; - "width"?: number; - } - interface MvxArrowRightIcon { - "class"?: string; - } - interface MvxBraveExtensionProviderIcon { - "class"?: string; - "height"?: number; - "width"?: number; - } - interface MvxButton { - /** - * @default '' - */ - "class"?: string; - /** - * @default '' - */ - "dataTestId"?: string; - /** - * @default false - */ - "disabled"?: boolean; - "onButtonClick"?: (event: MvxButtonCustomEvent) => void; - /** - * @default 'large' - */ - "size"?: `${ButtonSizeEnum}`; - /** - * @default 'primary' - */ - "variant"?: `${ButtonVariantEnum}`; - } - interface MvxCircleInfoIcon { - "class"?: string; - } - interface MvxCopyButton { - "class"?: string; - "iconClass"?: string; - "text"?: string; - } - interface MvxCustomToast { - "onDeleteToast"?: (event: MvxCustomToastCustomEvent) => void; - "toast"?: IComponentToast; - } - interface MvxDataWithExplorerLink { - "class"?: string; - "data"?: string; - "dataTestId"?: string; - "explorerLink"?: string; - /** - * @default true - */ - "showCopyButton"?: boolean; - /** - * @default true - */ - "showExplorerButton"?: boolean; - /** - * @default false - */ - "withTooltip"?: boolean; - } - interface MvxDefaultTransactionIconLarge { - "class"?: string; - } - interface MvxDefaultTransactionIconSmall { - "class"?: string; - } - interface MvxEdgeExtensionProviderIcon { - "class"?: string; - "height"?: number; - "width"?: number; - } - interface MvxExplorerLink { - "class"?: string; - "dataTestId"?: string; - "iconClass"?: string; - "link"?: string; - } - interface MvxExtensionProviderIcon { - "class"?: string; - "height"?: number; - "width"?: number; - } - interface MvxFirefoxExtensionProviderIcon { - "class"?: string; - "height"?: number; - "width"?: number; - } - interface MvxFormatAmount { - "class"?: string; - "dataTestId"?: string; - "decimalClass"?: string; - "isValid"?: boolean; - "label"?: string; - "labelClass"?: string; - /** - * @default true - */ - "showLabel"?: boolean; - "valueDecimal"?: string; - "valueInteger"?: string; - } - interface MvxGenericToast { - "onDeleteToast"?: (event: MvxGenericToastCustomEvent) => void; - "toast"?: CustomToastType; - } - interface MvxLedgerConfirm { - "confirmScreenData"?: IConfirmScreenData; - } - interface MvxLedgerConnect { - /** - * @default { accountScreenData: null, confirmScreenData: null, connectScreenData: {}, } - */ - "data"?: ILedgerConnectPanelData; - } - interface MvxLedgerIcon { - "class"?: string; - } - interface MvxLedgerIntro { - "connectScreenData"?: IConnectScreenData; - /** - * @default false - */ - "isAwaiting"?: boolean; - "onConnect"?: (event: MvxLedgerIntroCustomEvent) => void; - } - interface MvxLedgerProviderIcon { - "class"?: string; - } - interface MvxMagnifyingGlassIcon { - "class"?: string; - } - interface MvxMetamaskProviderIcon { - "class"?: string; - } - interface MvxMultiversxLogoIcon { - "class"?: string; - } - interface MvxMultiversxSymbolIcon { - "class"?: string; - } - interface MvxNotificationsFeed { - } - interface MvxPagination { - "class"?: string; - /** - * @default 1 - */ - "currentPage"?: number; - /** - * @default false - */ - "isDisabled"?: boolean; - "onPageChange"?: (event: MvxPaginationCustomEvent) => void; - "totalPages"?: number; - } - interface MvxPaginationEllipsis { - /** - * @default false - */ - "isActive"?: boolean; - } - interface MvxPaginationEllipsisForm { - /** - * @default false - */ - "isVisible"?: boolean; - "maxPageToSearchFor"?: number; - "onSearch"?: (event: MvxPaginationEllipsisFormCustomEvent) => void; - } - interface MvxPasskeyProviderIcon { - "class"?: string; - } - interface MvxPendingTransactionsPanel { - } - interface MvxPreloader { - "class"?: string; - } - interface MvxSidePanel { - "hasBackButton"?: boolean; - /** - * @default false - */ - "isOpen"?: boolean; - "onBack"?: (event: MvxSidePanelCustomEvent) => void; - "onClose"?: (event: MvxSidePanelCustomEvent) => void; - "panelClassName"?: string; - "panelTitle"?: string; - /** - * @default true - */ - "showHeader"?: boolean; - } - interface MvxSidePanelHeader { - /** - * @default true - */ - "hasLeftButton"?: boolean; - /** - * @default true - */ - "hasRightButton"?: boolean; - "onLeftButtonClick"?: (event: MvxSidePanelHeaderCustomEvent) => void; - "onRightButtonClick"?: (event: MvxSidePanelHeaderCustomEvent) => void; - "panelClassName"?: string; - "panelTitle"?: string; - } - interface MvxSidePanelSwiper { - "onSheetDismiss"?: (event: MvxSidePanelSwiperCustomEvent) => void; - "onSheetSnapChange"?: (event: MvxSidePanelSwiperCustomEvent<{ index: number; snapPoint: string }>) => void; - /** - * @default false - */ - "open"?: boolean; - /** - * @default '' - */ - "sidePanelIdentifier"?: string; - } - interface MvxSignTransactionsPanel { - } - interface MvxSimpleToast { - "onDeleteToast"?: (event: MvxSimpleToastCustomEvent) => void; - "toast"?: ISimpleToast; - } - interface MvxSpinnerIcon { - "class"?: string; - } - interface MvxToastList { - } - interface MvxTooltip { - "class"?: string; - "onTriggerRender"?: (event: MvxTooltipCustomEvent) => void; - /** - * @default 'top' - */ - "position"?: 'top' | 'bottom'; - "trigger"?: HTMLElement; - /** - * @default false - */ - "triggerOnClick"?: boolean; - } - interface MvxTransactionListItem { - "transaction"?: ITransactionListItem; - } - interface MvxTransactionToast { - "fullWidth"?: boolean; - "onDeleteToast"?: (event: MvxTransactionToastCustomEvent) => void; - /** - * @default '' - */ - "processedTransactionsStatus"?: string | JSX.Element; - "toastDataState"?: IToastDataState; - /** - * @default '' - */ - "toastId"?: string; - "transactionProgressState"?: ITransactionProgressState; - /** - * @default [] - */ - "transactions"?: ITransactionListItem[]; - "wrapperClass"?: string; - } - interface MvxTransactionToastContent { - "fullWidth"?: boolean; - "onDeleteToast"?: (event: MvxTransactionToastContentCustomEvent) => void; - "processedTransactionsStatus"?: string | JSX.Element; - "toastDataState"?: IToastDataState; - "transactions"?: ITransactionListItem[]; - } - interface MvxTransactionToastDetails { - /** - * @default 5 - */ - "maxShownTransactions"?: number; - "processedTransactionsStatus"?: string | JSX.Element; - "transactionClass"?: string; - "transactions"?: ITransactionListItem[]; - } - interface MvxTransactionToastDetailsBody { - "hash"?: string; - "index"?: string; - "link"?: string; - "status"?: `${TransactionStatusEnum}`; - /** - * @default 'transaction-details-list-item' - */ - "transactionClass"?: string; - } - interface MvxTransactionToastProgress { - "endTime"?: number; - "isStatusPending"?: boolean; - "startTime"?: number; - "toastId"?: string; - } - interface MvxTransactionsTable { - "class"?: string; - "transactions"?: TransactionRowType[]; - } - interface MvxTrim { - "class"?: string; - /** - * @default DataTestIdsEnum.trim - */ - "dataTestId"?: string; - "text"?: string; - } - interface MvxUnlockButton { - "class"?: string; - "dataTestId"?: string; - "icon"?: HTMLElement; - "iconUrl"?: string; - "label"?: string; - "type"?: IProviderBase['type']; - } - interface MvxUnlockPanel { - } - interface MvxWalletConnect { - /** - * @default { wcURI: '' } - */ - "data"?: IWalletConnectPanelData; - /** - * @default '' - */ - "qrCodeSvg"?: string; - } - interface MvxWalletConnectAppGalleryIcon { - "class"?: string; - } - interface MvxWalletConnectAppStoreIcon { - "class"?: string; - } - interface MvxWalletConnectDownload { - "class"?: string; - } - interface MvxWalletConnectGooglePlayIcon { - "class"?: string; - } - interface MvxWalletConnectScan { - "class"?: string; - "onDownloadClick"?: (event: MvxWalletConnectScanCustomEvent) => void; - /** - * @default '' - */ - "qrCodeSvg"?: string; - /** - * @default '' - */ - "walletConnectDeepLink"?: string; - } - interface MvxWalletProviderIcon { - "class"?: string; - } - interface MvxXportalDownloadQrIcon { - /** - * @default '' - */ - "class"?: string; - } - interface MvxXportalQrCodePreloader { - "class"?: string; - } - interface IntrinsicElements { - "mvx-address-table": MvxAddressTable; - "mvx-arc-extension-provider-icon": MvxArcExtensionProviderIcon; - "mvx-arrow-right-icon": MvxArrowRightIcon; - "mvx-brave-extension-provider-icon": MvxBraveExtensionProviderIcon; - "mvx-button": MvxButton; - "mvx-circle-info-icon": MvxCircleInfoIcon; - "mvx-copy-button": MvxCopyButton; - "mvx-custom-toast": MvxCustomToast; - "mvx-data-with-explorer-link": MvxDataWithExplorerLink; - "mvx-default-transaction-icon-large": MvxDefaultTransactionIconLarge; - "mvx-default-transaction-icon-small": MvxDefaultTransactionIconSmall; - "mvx-edge-extension-provider-icon": MvxEdgeExtensionProviderIcon; - "mvx-explorer-link": MvxExplorerLink; - "mvx-extension-provider-icon": MvxExtensionProviderIcon; - "mvx-firefox-extension-provider-icon": MvxFirefoxExtensionProviderIcon; - "mvx-format-amount": MvxFormatAmount; - "mvx-generic-toast": MvxGenericToast; - "mvx-ledger-confirm": MvxLedgerConfirm; - "mvx-ledger-connect": MvxLedgerConnect; - "mvx-ledger-icon": MvxLedgerIcon; - "mvx-ledger-intro": MvxLedgerIntro; - "mvx-ledger-provider-icon": MvxLedgerProviderIcon; - "mvx-magnifying-glass-icon": MvxMagnifyingGlassIcon; - "mvx-metamask-provider-icon": MvxMetamaskProviderIcon; - "mvx-multiversx-logo-icon": MvxMultiversxLogoIcon; - "mvx-multiversx-symbol-icon": MvxMultiversxSymbolIcon; - "mvx-notifications-feed": MvxNotificationsFeed; - "mvx-pagination": MvxPagination; - "mvx-pagination-ellipsis": MvxPaginationEllipsis; - "mvx-pagination-ellipsis-form": MvxPaginationEllipsisForm; - "mvx-passkey-provider-icon": MvxPasskeyProviderIcon; - "mvx-pending-transactions-panel": MvxPendingTransactionsPanel; - "mvx-preloader": MvxPreloader; - "mvx-side-panel": MvxSidePanel; - "mvx-side-panel-header": MvxSidePanelHeader; - "mvx-side-panel-swiper": MvxSidePanelSwiper; - "mvx-sign-transactions-panel": MvxSignTransactionsPanel; - "mvx-simple-toast": MvxSimpleToast; - "mvx-spinner-icon": MvxSpinnerIcon; - "mvx-toast-list": MvxToastList; - "mvx-tooltip": MvxTooltip; - "mvx-transaction-list-item": MvxTransactionListItem; - "mvx-transaction-toast": MvxTransactionToast; - "mvx-transaction-toast-content": MvxTransactionToastContent; - "mvx-transaction-toast-details": MvxTransactionToastDetails; - "mvx-transaction-toast-details-body": MvxTransactionToastDetailsBody; - "mvx-transaction-toast-progress": MvxTransactionToastProgress; - "mvx-transactions-table": MvxTransactionsTable; - "mvx-trim": MvxTrim; - "mvx-unlock-button": MvxUnlockButton; - "mvx-unlock-panel": MvxUnlockPanel; - "mvx-wallet-connect": MvxWalletConnect; - "mvx-wallet-connect-app-gallery-icon": MvxWalletConnectAppGalleryIcon; - "mvx-wallet-connect-app-store-icon": MvxWalletConnectAppStoreIcon; - "mvx-wallet-connect-download": MvxWalletConnectDownload; - "mvx-wallet-connect-google-play-icon": MvxWalletConnectGooglePlayIcon; - "mvx-wallet-connect-scan": MvxWalletConnectScan; - "mvx-wallet-provider-icon": MvxWalletProviderIcon; - "mvx-xportal-download-qr-icon": MvxXportalDownloadQrIcon; - "mvx-xportal-qr-code-preloader": MvxXportalQrCodePreloader; - } + interface MvxAddressTable { + accountScreenData?: IAddressTableData; + onAccessWallet?: (event: MvxAddressTableCustomEvent) => void; + onPageChange?: (event: MvxAddressTableCustomEvent) => void; + onSelectAccount?: (event: MvxAddressTableCustomEvent) => void; + selectedIndex?: number; + } + interface MvxArcExtensionProviderIcon { + class?: string; + height?: number; + width?: number; + } + interface MvxArrowRightIcon { + class?: string; + } + interface MvxBraveExtensionProviderIcon { + class?: string; + height?: number; + width?: number; + } + interface MvxButton { + /** + * @default '' + */ + class?: string; + /** + * @default '' + */ + dataTestId?: string; + /** + * @default false + */ + disabled?: boolean; + onButtonClick?: (event: MvxButtonCustomEvent) => void; + /** + * @default 'large' + */ + size?: `${ButtonSizeEnum}`; + /** + * @default 'primary' + */ + variant?: `${ButtonVariantEnum}`; + } + interface MvxCircleInfoIcon { + class?: string; + } + interface MvxCopyButton { + class?: string; + iconClass?: string; + text?: string; + } + interface MvxCustomToast { + onDeleteToast?: (event: MvxCustomToastCustomEvent) => void; + toast?: IComponentToast; + } + interface MvxDataWithExplorerLink { + class?: string; + data?: string; + dataTestId?: string; + explorerLink?: string; + /** + * @default true + */ + showCopyButton?: boolean; + /** + * @default true + */ + showExplorerButton?: boolean; + /** + * @default false + */ + withTooltip?: boolean; + } + interface MvxDefaultTransactionIconLarge { + class?: string; + } + interface MvxDefaultTransactionIconSmall { + class?: string; + } + interface MvxEdgeExtensionProviderIcon { + class?: string; + height?: number; + width?: number; + } + interface MvxExplorerLink { + class?: string; + dataTestId?: string; + iconClass?: string; + link?: string; + } + interface MvxExtensionProviderIcon { + class?: string; + height?: number; + width?: number; + } + interface MvxFirefoxExtensionProviderIcon { + class?: string; + height?: number; + width?: number; + } + interface MvxFormatAmount { + class?: string; + dataTestId?: string; + decimalClass?: string; + isValid?: boolean; + label?: string; + labelClass?: string; + /** + * @default true + */ + showLabel?: boolean; + valueDecimal?: string; + valueInteger?: string; + } + interface MvxGenericToast { + onDeleteToast?: (event: MvxGenericToastCustomEvent) => void; + toast?: CustomToastType; + } + interface MvxLedgerConfirm { + confirmScreenData?: IConfirmScreenData; + } + interface MvxLedgerConnect { + /** + * @default { accountScreenData: null, confirmScreenData: null, connectScreenData: {}, } + */ + data?: ILedgerConnectPanelData; + } + interface MvxLedgerIcon { + class?: string; + } + interface MvxLedgerIntro { + connectScreenData?: IConnectScreenData; + /** + * @default false + */ + isAwaiting?: boolean; + onConnect?: (event: MvxLedgerIntroCustomEvent) => void; + } + interface MvxLedgerProviderIcon { + class?: string; + } + interface MvxMagnifyingGlassIcon { + class?: string; + } + interface MvxMetamaskProviderIcon { + class?: string; + } + interface MvxMultiversxLogoIcon { + class?: string; + } + interface MvxMultiversxSymbolIcon { + class?: string; + } + interface MvxNotificationsFeed {} + interface MvxPagination { + class?: string; + /** + * @default 1 + */ + currentPage?: number; + /** + * @default false + */ + isDisabled?: boolean; + onPageChange?: (event: MvxPaginationCustomEvent) => void; + totalPages?: number; + } + interface MvxPaginationEllipsis { + /** + * @default false + */ + isActive?: boolean; + } + interface MvxPaginationEllipsisForm { + /** + * @default false + */ + isVisible?: boolean; + maxPageToSearchFor?: number; + onSearch?: (event: MvxPaginationEllipsisFormCustomEvent) => void; + } + interface MvxPasskeyProviderIcon { + class?: string; + } + interface MvxPendingTransactionsPanel {} + interface MvxPreloader { + class?: string; + } + interface MvxSidePanel { + hasBackButton?: boolean; + /** + * @default false + */ + isOpen?: boolean; + onBack?: (event: MvxSidePanelCustomEvent) => void; + onClose?: (event: MvxSidePanelCustomEvent) => void; + panelClassName?: string; + panelTitle?: string; + /** + * @default true + */ + showHeader?: boolean; + } + interface MvxSidePanelHeader { + /** + * @default true + */ + hasLeftButton?: boolean; + /** + * @default true + */ + hasRightButton?: boolean; + onLeftButtonClick?: (event: MvxSidePanelHeaderCustomEvent) => void; + onRightButtonClick?: (event: MvxSidePanelHeaderCustomEvent) => void; + panelClassName?: string; + panelTitle?: string; + } + interface MvxSidePanelSwiper { + onSheetDismiss?: (event: MvxSidePanelSwiperCustomEvent) => void; + onSheetSnapChange?: (event: MvxSidePanelSwiperCustomEvent<{ index: number; snapPoint: string }>) => void; + /** + * @default false + */ + open?: boolean; + /** + * @default '' + */ + sidePanelIdentifier?: string; + } + interface MvxSignTransactionsPanel {} + interface MvxSimpleToast { + onDeleteToast?: (event: MvxSimpleToastCustomEvent) => void; + toast?: ISimpleToast; + } + interface MvxSpinnerIcon { + class?: string; + } + interface MvxToastList {} + interface MvxTooltip { + class?: string; + onTriggerRender?: (event: MvxTooltipCustomEvent) => void; + /** + * @default 'top' + */ + position?: 'top' | 'bottom'; + trigger?: HTMLElement; + /** + * @default false + */ + triggerOnClick?: boolean; + } + interface MvxTransactionListItem { + transaction?: ITransactionListItem; + } + interface MvxTransactionToast { + fullWidth?: boolean; + onDeleteToast?: (event: MvxTransactionToastCustomEvent) => void; + /** + * @default '' + */ + processedTransactionsStatus?: string | JSX.Element; + toastDataState?: IToastDataState; + /** + * @default '' + */ + toastId?: string; + transactionProgressState?: ITransactionProgressState; + /** + * @default [] + */ + transactions?: ITransactionListItem[]; + wrapperClass?: string; + } + interface MvxTransactionToastContent { + fullWidth?: boolean; + onDeleteToast?: (event: MvxTransactionToastContentCustomEvent) => void; + processedTransactionsStatus?: string | JSX.Element; + toastDataState?: IToastDataState; + transactions?: ITransactionListItem[]; + } + interface MvxTransactionToastDetails { + /** + * @default 5 + */ + maxShownTransactions?: number; + processedTransactionsStatus?: string | JSX.Element; + transactionClass?: string; + transactions?: ITransactionListItem[]; + } + interface MvxTransactionToastDetailsBody { + hash?: string; + index?: string; + link?: string; + status?: `${TransactionStatusEnum}`; + /** + * @default 'transaction-details-list-item' + */ + transactionClass?: string; + } + interface MvxTransactionToastProgress { + endTime?: number; + isStatusPending?: boolean; + startTime?: number; + toastId?: string; + } + interface MvxTransactionsTable { + class?: string; + transactions?: TransactionRowType[]; + } + interface MvxTrim { + class?: string; + /** + * @default DataTestIdsEnum.trim + */ + dataTestId?: string; + text?: string; + } + interface MvxUnlockButton { + class?: string; + dataTestId?: string; + icon?: HTMLElement; + iconUrl?: string; + label?: string; + type?: IProviderBase['type']; + } + interface MvxUnlockPanel {} + interface MvxWalletConnect { + /** + * @default { wcURI: '' } + */ + data?: IWalletConnectPanelData; + /** + * @default '' + */ + qrCodeSvg?: string; + } + interface MvxWalletConnectAppGalleryIcon { + class?: string; + } + interface MvxWalletConnectAppStoreIcon { + class?: string; + } + interface MvxWalletConnectDownload { + class?: string; + } + interface MvxWalletConnectGooglePlayIcon { + class?: string; + } + interface MvxWalletConnectScan { + class?: string; + onDownloadClick?: (event: MvxWalletConnectScanCustomEvent) => void; + /** + * @default '' + */ + qrCodeSvg?: string; + /** + * @default '' + */ + walletConnectDeepLink?: string; + } + interface MvxWalletProviderIcon { + class?: string; + } + interface MvxXportalDownloadQrIcon { + /** + * @default '' + */ + class?: string; + } + interface MvxXportalQrCodePreloader { + class?: string; + } + interface IntrinsicElements { + 'mvx-address-table': MvxAddressTable; + 'mvx-arc-extension-provider-icon': MvxArcExtensionProviderIcon; + 'mvx-arrow-right-icon': MvxArrowRightIcon; + 'mvx-brave-extension-provider-icon': MvxBraveExtensionProviderIcon; + 'mvx-button': MvxButton; + 'mvx-circle-info-icon': MvxCircleInfoIcon; + 'mvx-copy-button': MvxCopyButton; + 'mvx-custom-toast': MvxCustomToast; + 'mvx-data-with-explorer-link': MvxDataWithExplorerLink; + 'mvx-default-transaction-icon-large': MvxDefaultTransactionIconLarge; + 'mvx-default-transaction-icon-small': MvxDefaultTransactionIconSmall; + 'mvx-edge-extension-provider-icon': MvxEdgeExtensionProviderIcon; + 'mvx-explorer-link': MvxExplorerLink; + 'mvx-extension-provider-icon': MvxExtensionProviderIcon; + 'mvx-firefox-extension-provider-icon': MvxFirefoxExtensionProviderIcon; + 'mvx-format-amount': MvxFormatAmount; + 'mvx-generic-toast': MvxGenericToast; + 'mvx-ledger-confirm': MvxLedgerConfirm; + 'mvx-ledger-connect': MvxLedgerConnect; + 'mvx-ledger-icon': MvxLedgerIcon; + 'mvx-ledger-intro': MvxLedgerIntro; + 'mvx-ledger-provider-icon': MvxLedgerProviderIcon; + 'mvx-magnifying-glass-icon': MvxMagnifyingGlassIcon; + 'mvx-metamask-provider-icon': MvxMetamaskProviderIcon; + 'mvx-multiversx-logo-icon': MvxMultiversxLogoIcon; + 'mvx-multiversx-symbol-icon': MvxMultiversxSymbolIcon; + 'mvx-notifications-feed': MvxNotificationsFeed; + 'mvx-pagination': MvxPagination; + 'mvx-pagination-ellipsis': MvxPaginationEllipsis; + 'mvx-pagination-ellipsis-form': MvxPaginationEllipsisForm; + 'mvx-passkey-provider-icon': MvxPasskeyProviderIcon; + 'mvx-pending-transactions-panel': MvxPendingTransactionsPanel; + 'mvx-preloader': MvxPreloader; + 'mvx-side-panel': MvxSidePanel; + 'mvx-side-panel-header': MvxSidePanelHeader; + 'mvx-side-panel-swiper': MvxSidePanelSwiper; + 'mvx-sign-transactions-panel': MvxSignTransactionsPanel; + 'mvx-simple-toast': MvxSimpleToast; + 'mvx-spinner-icon': MvxSpinnerIcon; + 'mvx-toast-list': MvxToastList; + 'mvx-tooltip': MvxTooltip; + 'mvx-transaction-list-item': MvxTransactionListItem; + 'mvx-transaction-toast': MvxTransactionToast; + 'mvx-transaction-toast-content': MvxTransactionToastContent; + 'mvx-transaction-toast-details': MvxTransactionToastDetails; + 'mvx-transaction-toast-details-body': MvxTransactionToastDetailsBody; + 'mvx-transaction-toast-progress': MvxTransactionToastProgress; + 'mvx-transactions-table': MvxTransactionsTable; + 'mvx-trim': MvxTrim; + 'mvx-unlock-button': MvxUnlockButton; + 'mvx-unlock-panel': MvxUnlockPanel; + 'mvx-wallet-connect': MvxWalletConnect; + 'mvx-wallet-connect-app-gallery-icon': MvxWalletConnectAppGalleryIcon; + 'mvx-wallet-connect-app-store-icon': MvxWalletConnectAppStoreIcon; + 'mvx-wallet-connect-download': MvxWalletConnectDownload; + 'mvx-wallet-connect-google-play-icon': MvxWalletConnectGooglePlayIcon; + 'mvx-wallet-connect-scan': MvxWalletConnectScan; + 'mvx-wallet-provider-icon': MvxWalletProviderIcon; + 'mvx-xportal-download-qr-icon': MvxXportalDownloadQrIcon; + 'mvx-xportal-qr-code-preloader': MvxXportalQrCodePreloader; + } } export { LocalJSX as JSX }; -declare module "@stencil/core" { - export namespace JSX { - interface IntrinsicElements { - "mvx-address-table": LocalJSX.MvxAddressTable & JSXBase.HTMLAttributes; - "mvx-arc-extension-provider-icon": LocalJSX.MvxArcExtensionProviderIcon & JSXBase.HTMLAttributes; - "mvx-arrow-right-icon": LocalJSX.MvxArrowRightIcon & JSXBase.HTMLAttributes; - "mvx-brave-extension-provider-icon": LocalJSX.MvxBraveExtensionProviderIcon & JSXBase.HTMLAttributes; - "mvx-button": LocalJSX.MvxButton & JSXBase.HTMLAttributes; - "mvx-circle-info-icon": LocalJSX.MvxCircleInfoIcon & JSXBase.HTMLAttributes; - "mvx-copy-button": LocalJSX.MvxCopyButton & JSXBase.HTMLAttributes; - "mvx-custom-toast": LocalJSX.MvxCustomToast & JSXBase.HTMLAttributes; - "mvx-data-with-explorer-link": LocalJSX.MvxDataWithExplorerLink & JSXBase.HTMLAttributes; - "mvx-default-transaction-icon-large": LocalJSX.MvxDefaultTransactionIconLarge & JSXBase.HTMLAttributes; - "mvx-default-transaction-icon-small": LocalJSX.MvxDefaultTransactionIconSmall & JSXBase.HTMLAttributes; - "mvx-edge-extension-provider-icon": LocalJSX.MvxEdgeExtensionProviderIcon & JSXBase.HTMLAttributes; - "mvx-explorer-link": LocalJSX.MvxExplorerLink & JSXBase.HTMLAttributes; - "mvx-extension-provider-icon": LocalJSX.MvxExtensionProviderIcon & JSXBase.HTMLAttributes; - "mvx-firefox-extension-provider-icon": LocalJSX.MvxFirefoxExtensionProviderIcon & JSXBase.HTMLAttributes; - "mvx-format-amount": LocalJSX.MvxFormatAmount & JSXBase.HTMLAttributes; - "mvx-generic-toast": LocalJSX.MvxGenericToast & JSXBase.HTMLAttributes; - "mvx-ledger-confirm": LocalJSX.MvxLedgerConfirm & JSXBase.HTMLAttributes; - "mvx-ledger-connect": LocalJSX.MvxLedgerConnect & JSXBase.HTMLAttributes; - "mvx-ledger-icon": LocalJSX.MvxLedgerIcon & JSXBase.HTMLAttributes; - "mvx-ledger-intro": LocalJSX.MvxLedgerIntro & JSXBase.HTMLAttributes; - "mvx-ledger-provider-icon": LocalJSX.MvxLedgerProviderIcon & JSXBase.HTMLAttributes; - "mvx-magnifying-glass-icon": LocalJSX.MvxMagnifyingGlassIcon & JSXBase.HTMLAttributes; - "mvx-metamask-provider-icon": LocalJSX.MvxMetamaskProviderIcon & JSXBase.HTMLAttributes; - "mvx-multiversx-logo-icon": LocalJSX.MvxMultiversxLogoIcon & JSXBase.HTMLAttributes; - "mvx-multiversx-symbol-icon": LocalJSX.MvxMultiversxSymbolIcon & JSXBase.HTMLAttributes; - "mvx-notifications-feed": LocalJSX.MvxNotificationsFeed & JSXBase.HTMLAttributes; - "mvx-pagination": LocalJSX.MvxPagination & JSXBase.HTMLAttributes; - "mvx-pagination-ellipsis": LocalJSX.MvxPaginationEllipsis & JSXBase.HTMLAttributes; - "mvx-pagination-ellipsis-form": LocalJSX.MvxPaginationEllipsisForm & JSXBase.HTMLAttributes; - "mvx-passkey-provider-icon": LocalJSX.MvxPasskeyProviderIcon & JSXBase.HTMLAttributes; - "mvx-pending-transactions-panel": LocalJSX.MvxPendingTransactionsPanel & JSXBase.HTMLAttributes; - "mvx-preloader": LocalJSX.MvxPreloader & JSXBase.HTMLAttributes; - "mvx-side-panel": LocalJSX.MvxSidePanel & JSXBase.HTMLAttributes; - "mvx-side-panel-header": LocalJSX.MvxSidePanelHeader & JSXBase.HTMLAttributes; - "mvx-side-panel-swiper": LocalJSX.MvxSidePanelSwiper & JSXBase.HTMLAttributes; - "mvx-sign-transactions-panel": LocalJSX.MvxSignTransactionsPanel & JSXBase.HTMLAttributes; - "mvx-simple-toast": LocalJSX.MvxSimpleToast & JSXBase.HTMLAttributes; - "mvx-spinner-icon": LocalJSX.MvxSpinnerIcon & JSXBase.HTMLAttributes; - "mvx-toast-list": LocalJSX.MvxToastList & JSXBase.HTMLAttributes; - "mvx-tooltip": LocalJSX.MvxTooltip & JSXBase.HTMLAttributes; - "mvx-transaction-list-item": LocalJSX.MvxTransactionListItem & JSXBase.HTMLAttributes; - "mvx-transaction-toast": LocalJSX.MvxTransactionToast & JSXBase.HTMLAttributes; - "mvx-transaction-toast-content": LocalJSX.MvxTransactionToastContent & JSXBase.HTMLAttributes; - "mvx-transaction-toast-details": LocalJSX.MvxTransactionToastDetails & JSXBase.HTMLAttributes; - "mvx-transaction-toast-details-body": LocalJSX.MvxTransactionToastDetailsBody & JSXBase.HTMLAttributes; - "mvx-transaction-toast-progress": LocalJSX.MvxTransactionToastProgress & JSXBase.HTMLAttributes; - "mvx-transactions-table": LocalJSX.MvxTransactionsTable & JSXBase.HTMLAttributes; - "mvx-trim": LocalJSX.MvxTrim & JSXBase.HTMLAttributes; - "mvx-unlock-button": LocalJSX.MvxUnlockButton & JSXBase.HTMLAttributes; - "mvx-unlock-panel": LocalJSX.MvxUnlockPanel & JSXBase.HTMLAttributes; - "mvx-wallet-connect": LocalJSX.MvxWalletConnect & JSXBase.HTMLAttributes; - "mvx-wallet-connect-app-gallery-icon": LocalJSX.MvxWalletConnectAppGalleryIcon & JSXBase.HTMLAttributes; - "mvx-wallet-connect-app-store-icon": LocalJSX.MvxWalletConnectAppStoreIcon & JSXBase.HTMLAttributes; - "mvx-wallet-connect-download": LocalJSX.MvxWalletConnectDownload & JSXBase.HTMLAttributes; - "mvx-wallet-connect-google-play-icon": LocalJSX.MvxWalletConnectGooglePlayIcon & JSXBase.HTMLAttributes; - "mvx-wallet-connect-scan": LocalJSX.MvxWalletConnectScan & JSXBase.HTMLAttributes; - "mvx-wallet-provider-icon": LocalJSX.MvxWalletProviderIcon & JSXBase.HTMLAttributes; - "mvx-xportal-download-qr-icon": LocalJSX.MvxXportalDownloadQrIcon & JSXBase.HTMLAttributes; - "mvx-xportal-qr-code-preloader": LocalJSX.MvxXportalQrCodePreloader & JSXBase.HTMLAttributes; - } - } +declare module '@stencil/core' { + export namespace JSX { + interface IntrinsicElements { + 'mvx-address-table': LocalJSX.MvxAddressTable & JSXBase.HTMLAttributes; + 'mvx-arc-extension-provider-icon': LocalJSX.MvxArcExtensionProviderIcon & + JSXBase.HTMLAttributes; + 'mvx-arrow-right-icon': LocalJSX.MvxArrowRightIcon & JSXBase.HTMLAttributes; + 'mvx-brave-extension-provider-icon': LocalJSX.MvxBraveExtensionProviderIcon & + JSXBase.HTMLAttributes; + 'mvx-button': LocalJSX.MvxButton & JSXBase.HTMLAttributes; + 'mvx-circle-info-icon': LocalJSX.MvxCircleInfoIcon & JSXBase.HTMLAttributes; + 'mvx-copy-button': LocalJSX.MvxCopyButton & JSXBase.HTMLAttributes; + 'mvx-custom-toast': LocalJSX.MvxCustomToast & JSXBase.HTMLAttributes; + 'mvx-data-with-explorer-link': LocalJSX.MvxDataWithExplorerLink & + JSXBase.HTMLAttributes; + 'mvx-default-transaction-icon-large': LocalJSX.MvxDefaultTransactionIconLarge & + JSXBase.HTMLAttributes; + 'mvx-default-transaction-icon-small': LocalJSX.MvxDefaultTransactionIconSmall & + JSXBase.HTMLAttributes; + 'mvx-edge-extension-provider-icon': LocalJSX.MvxEdgeExtensionProviderIcon & + JSXBase.HTMLAttributes; + 'mvx-explorer-link': LocalJSX.MvxExplorerLink & JSXBase.HTMLAttributes; + 'mvx-extension-provider-icon': LocalJSX.MvxExtensionProviderIcon & + JSXBase.HTMLAttributes; + 'mvx-firefox-extension-provider-icon': LocalJSX.MvxFirefoxExtensionProviderIcon & + JSXBase.HTMLAttributes; + 'mvx-format-amount': LocalJSX.MvxFormatAmount & JSXBase.HTMLAttributes; + 'mvx-generic-toast': LocalJSX.MvxGenericToast & JSXBase.HTMLAttributes; + 'mvx-ledger-confirm': LocalJSX.MvxLedgerConfirm & JSXBase.HTMLAttributes; + 'mvx-ledger-connect': LocalJSX.MvxLedgerConnect & JSXBase.HTMLAttributes; + 'mvx-ledger-icon': LocalJSX.MvxLedgerIcon & JSXBase.HTMLAttributes; + 'mvx-ledger-intro': LocalJSX.MvxLedgerIntro & JSXBase.HTMLAttributes; + 'mvx-ledger-provider-icon': LocalJSX.MvxLedgerProviderIcon & + JSXBase.HTMLAttributes; + 'mvx-magnifying-glass-icon': LocalJSX.MvxMagnifyingGlassIcon & + JSXBase.HTMLAttributes; + 'mvx-metamask-provider-icon': LocalJSX.MvxMetamaskProviderIcon & + JSXBase.HTMLAttributes; + 'mvx-multiversx-logo-icon': LocalJSX.MvxMultiversxLogoIcon & + JSXBase.HTMLAttributes; + 'mvx-multiversx-symbol-icon': LocalJSX.MvxMultiversxSymbolIcon & + JSXBase.HTMLAttributes; + 'mvx-notifications-feed': LocalJSX.MvxNotificationsFeed & JSXBase.HTMLAttributes; + 'mvx-pagination': LocalJSX.MvxPagination & JSXBase.HTMLAttributes; + 'mvx-pagination-ellipsis': LocalJSX.MvxPaginationEllipsis & + JSXBase.HTMLAttributes; + 'mvx-pagination-ellipsis-form': LocalJSX.MvxPaginationEllipsisForm & + JSXBase.HTMLAttributes; + 'mvx-passkey-provider-icon': LocalJSX.MvxPasskeyProviderIcon & + JSXBase.HTMLAttributes; + 'mvx-pending-transactions-panel': LocalJSX.MvxPendingTransactionsPanel & + JSXBase.HTMLAttributes; + 'mvx-preloader': LocalJSX.MvxPreloader & JSXBase.HTMLAttributes; + 'mvx-side-panel': LocalJSX.MvxSidePanel & JSXBase.HTMLAttributes; + 'mvx-side-panel-header': LocalJSX.MvxSidePanelHeader & JSXBase.HTMLAttributes; + 'mvx-side-panel-swiper': LocalJSX.MvxSidePanelSwiper & JSXBase.HTMLAttributes; + 'mvx-sign-transactions-panel': LocalJSX.MvxSignTransactionsPanel & + JSXBase.HTMLAttributes; + 'mvx-simple-toast': LocalJSX.MvxSimpleToast & JSXBase.HTMLAttributes; + 'mvx-spinner-icon': LocalJSX.MvxSpinnerIcon & JSXBase.HTMLAttributes; + 'mvx-toast-list': LocalJSX.MvxToastList & JSXBase.HTMLAttributes; + 'mvx-tooltip': LocalJSX.MvxTooltip & JSXBase.HTMLAttributes; + 'mvx-transaction-list-item': LocalJSX.MvxTransactionListItem & + JSXBase.HTMLAttributes; + 'mvx-transaction-toast': LocalJSX.MvxTransactionToast & JSXBase.HTMLAttributes; + 'mvx-transaction-toast-content': LocalJSX.MvxTransactionToastContent & + JSXBase.HTMLAttributes; + 'mvx-transaction-toast-details': LocalJSX.MvxTransactionToastDetails & + JSXBase.HTMLAttributes; + 'mvx-transaction-toast-details-body': LocalJSX.MvxTransactionToastDetailsBody & + JSXBase.HTMLAttributes; + 'mvx-transaction-toast-progress': LocalJSX.MvxTransactionToastProgress & + JSXBase.HTMLAttributes; + 'mvx-transactions-table': LocalJSX.MvxTransactionsTable & JSXBase.HTMLAttributes; + 'mvx-trim': LocalJSX.MvxTrim & JSXBase.HTMLAttributes; + 'mvx-unlock-button': LocalJSX.MvxUnlockButton & JSXBase.HTMLAttributes; + 'mvx-unlock-panel': LocalJSX.MvxUnlockPanel & JSXBase.HTMLAttributes; + 'mvx-wallet-connect': LocalJSX.MvxWalletConnect & JSXBase.HTMLAttributes; + 'mvx-wallet-connect-app-gallery-icon': LocalJSX.MvxWalletConnectAppGalleryIcon & + JSXBase.HTMLAttributes; + 'mvx-wallet-connect-app-store-icon': LocalJSX.MvxWalletConnectAppStoreIcon & + JSXBase.HTMLAttributes; + 'mvx-wallet-connect-download': LocalJSX.MvxWalletConnectDownload & + JSXBase.HTMLAttributes; + 'mvx-wallet-connect-google-play-icon': LocalJSX.MvxWalletConnectGooglePlayIcon & + JSXBase.HTMLAttributes; + 'mvx-wallet-connect-scan': LocalJSX.MvxWalletConnectScan & + JSXBase.HTMLAttributes; + 'mvx-wallet-provider-icon': LocalJSX.MvxWalletProviderIcon & + JSXBase.HTMLAttributes; + 'mvx-xportal-download-qr-icon': LocalJSX.MvxXportalDownloadQrIcon & + JSXBase.HTMLAttributes; + 'mvx-xportal-qr-code-preloader': LocalJSX.MvxXportalQrCodePreloader & + JSXBase.HTMLAttributes; + } + } } diff --git a/src/components/common/button/button.scss b/src/components/common/button/button.scss index ff1190ee..21b0cbc1 100644 --- a/src/components/common/button/button.scss +++ b/src/components/common/button/button.scss @@ -1 +1 @@ -// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. \ No newline at end of file +// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. diff --git a/src/components/common/button/button.stories.tsx b/src/components/common/button/button.stories.tsx index 6232d65c..7588c3e5 100644 --- a/src/components/common/button/button.stories.tsx +++ b/src/components/common/button/button.stories.tsx @@ -4,8 +4,8 @@ import { h } from '@stencil/core'; import type { Meta, StoryObj } from '@stencil/storybook-plugin'; import capitalize from 'lodash.capitalize'; -import type { Button } from './button'; import { ButtonSizeEnum, ButtonVariantEnum } from '../../../common/Button/button.types'; +import type { Button } from './button'; // prettier-ignore const styles = { diff --git a/src/components/common/button/button.tsx b/src/components/common/button/button.tsx index ebcc07aa..1790791e 100644 --- a/src/components/common/button/button.tsx +++ b/src/components/common/button/button.tsx @@ -1,10 +1,9 @@ import type { EventEmitter } from '@stencil/core'; import { Component, Event, h, Prop } from '@stencil/core'; +import { Button as ButtonComponent } from 'common/Button/Button'; import type { ButtonSizeEnum, ButtonVariantEnum } from '../../../common/Button/button.types'; -import { Button as ButtonComponent } from 'common/Button/Button'; - @Component({ tag: 'mvx-button', styleUrl: 'button.scss', diff --git a/src/components/common/copy-button/copy-button.tsx b/src/components/common/copy-button/copy-button.tsx index c9c03909..d3a709c6 100644 --- a/src/components/common/copy-button/copy-button.tsx +++ b/src/components/common/copy-button/copy-button.tsx @@ -1,4 +1,4 @@ -import { Component, Prop, State, h } from '@stencil/core'; +import { Component, h, Prop, State } from '@stencil/core'; import { CopyButton as CopyButtonComponent } from 'common/CopyButton/CopyButton'; import { getCopyClickAction } from 'common/CopyButton/getCopyClickAction'; @@ -13,7 +13,7 @@ export class CopyButton { @Prop() text: string; private handleClick = getCopyClickAction({ - onSuccessChange: (isSuccess) => (this.isSuccess = isSuccess), + onSuccessChange: isSuccess => (this.isSuccess = isSuccess), }); render() { diff --git a/src/components/common/copy-button/tests/copy-button.spec.ts b/src/components/common/copy-button/tests/copy-button.spec.ts index 67d8eecf..d989562b 100644 --- a/src/components/common/copy-button/tests/copy-button.spec.ts +++ b/src/components/common/copy-button/tests/copy-button.spec.ts @@ -104,7 +104,6 @@ describe('CopyButton', () => { stopPropagation: jest.fn(), } as unknown as MouseEvent; - await component['handleClick'](mockEvent, component.text); await page.waitForChanges(); diff --git a/src/components/common/format-amount/format-amount.tsx b/src/components/common/format-amount/format-amount.tsx index dfba403c..0757a28e 100644 --- a/src/components/common/format-amount/format-amount.tsx +++ b/src/components/common/format-amount/format-amount.tsx @@ -17,16 +17,18 @@ export class FormatAmount { @Prop() decimalClass?: string; render() { - return ; + return ( + + ); } } diff --git a/src/components/common/tooltip/tooltip.scss b/src/components/common/tooltip/tooltip.scss index ff1190ee..21b0cbc1 100644 --- a/src/components/common/tooltip/tooltip.scss +++ b/src/components/common/tooltip/tooltip.scss @@ -1 +1 @@ -// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. \ No newline at end of file +// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. diff --git a/src/components/common/tooltip/tooltip.tsx b/src/components/common/tooltip/tooltip.tsx index 09b19046..16192432 100644 --- a/src/components/common/tooltip/tooltip.tsx +++ b/src/components/common/tooltip/tooltip.tsx @@ -1,4 +1,5 @@ -import { Component, Event, EventEmitter, h, Prop, State } from '@stencil/core'; +import type { EventEmitter } from '@stencil/core'; +import { Component, Event, h, Prop, State } from '@stencil/core'; import { Tooltip as TooltipComponent } from 'common/Tooltip/Tooltip'; @Component({ @@ -20,7 +21,6 @@ export class Tooltip { this.isVisible = isVisible; }; - render() { return ( { diff --git a/src/components/common/trim/trim.tsx b/src/components/common/trim/trim.tsx index 084e17bb..04696270 100644 --- a/src/components/common/trim/trim.tsx +++ b/src/components/common/trim/trim.tsx @@ -13,12 +13,6 @@ export class Trim { @Prop() text: string; render() { - return ( - - ); + return ; } } diff --git a/src/components/controlled/transactions-table/components/TransactionAccount/components/TransactionAccountName/index.ts b/src/components/controlled/transactions-table/components/TransactionAccount/components/TransactionAccountName/index.ts index 0f89d2cc..22d91d8a 100644 --- a/src/components/controlled/transactions-table/components/TransactionAccount/components/TransactionAccountName/index.ts +++ b/src/components/controlled/transactions-table/components/TransactionAccount/components/TransactionAccountName/index.ts @@ -1 +1 @@ -export * from './TransactionAccountName' \ No newline at end of file +export * from './TransactionAccountName'; diff --git a/src/components/controlled/transactions-table/components/TransactionAccount/components/index.ts b/src/components/controlled/transactions-table/components/TransactionAccount/components/index.ts index 0f89d2cc..22d91d8a 100644 --- a/src/components/controlled/transactions-table/components/TransactionAccount/components/index.ts +++ b/src/components/controlled/transactions-table/components/TransactionAccount/components/index.ts @@ -1 +1 @@ -export * from './TransactionAccountName' \ No newline at end of file +export * from './TransactionAccountName'; diff --git a/src/components/controlled/transactions-table/components/TransactionAccount/index.ts b/src/components/controlled/transactions-table/components/TransactionAccount/index.ts index 4ccfa2e8..33c7f917 100644 --- a/src/components/controlled/transactions-table/components/TransactionAccount/index.ts +++ b/src/components/controlled/transactions-table/components/TransactionAccount/index.ts @@ -1 +1 @@ -export * from './TransactionAccount' \ No newline at end of file +export * from './TransactionAccount'; diff --git a/src/components/controlled/transactions-table/components/TransactionAge/TransactionAge.tsx b/src/components/controlled/transactions-table/components/TransactionAge/TransactionAge.tsx index 67befb52..fd70ece8 100644 --- a/src/components/controlled/transactions-table/components/TransactionAge/TransactionAge.tsx +++ b/src/components/controlled/transactions-table/components/TransactionAge/TransactionAge.tsx @@ -7,28 +7,28 @@ const styles = { } satisfies Record; interface TransactionAgePropsType { - age: string; - class?: string; - tooltip?: string; + age: string; + class?: string; + tooltip?: string; } export function TransactionAge({ age, tooltip, class: className }: TransactionAgePropsType) { - const component = tooltip ? ( -
- {age} -
- ) : ( -
- {age} -
- ); + const component = tooltip ? ( +
+ {age} +
+ ) : ( +
+ {age} +
+ ); - return
{component}
; + return
{component}
; } diff --git a/src/components/controlled/transactions-table/components/TransactionAge/index.ts b/src/components/controlled/transactions-table/components/TransactionAge/index.ts index fcb2deab..1fa35e9b 100644 --- a/src/components/controlled/transactions-table/components/TransactionAge/index.ts +++ b/src/components/controlled/transactions-table/components/TransactionAge/index.ts @@ -1 +1 @@ -export * from './TransactionAge'; \ No newline at end of file +export * from './TransactionAge'; diff --git a/src/components/controlled/transactions-table/components/TransactionAge/tests/transaction-age.spec.tsx b/src/components/controlled/transactions-table/components/TransactionAge/tests/transaction-age.spec.tsx index 2b0467e2..4d66902d 100644 --- a/src/components/controlled/transactions-table/components/TransactionAge/tests/transaction-age.spec.tsx +++ b/src/components/controlled/transactions-table/components/TransactionAge/tests/transaction-age.spec.tsx @@ -4,12 +4,11 @@ import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; import { TransactionAge } from '../TransactionAge'; - describe('TransactionAge tests', () => { it('renders with age prop', async () => { const page = await newSpecPage({ components: [], - template: () => + template: () => , }); const ageSpan = page.root.querySelector(`[data-testid="${DataTestIdsEnum.transactionAge}"]`); @@ -20,7 +19,7 @@ describe('TransactionAge tests', () => { it('renders without tooltip when not provided', async () => { const page = await newSpecPage({ components: [], - template: () => + template: () => , }); const ageSpan = page.root.querySelector(`[data-testid="${DataTestIdsEnum.transactionAge}"]`); @@ -31,7 +30,7 @@ describe('TransactionAge tests', () => { it('renders with tooltip when provided', async () => { const page = await newSpecPage({ components: [], - template: () => + template: () => , }); const ageSpan = page.root.querySelector(`[data-testid="${DataTestIdsEnum.transactionAge}"]`); diff --git a/src/components/controlled/transactions-table/components/TransactionHash/index.ts b/src/components/controlled/transactions-table/components/TransactionHash/index.ts index 3b8611a9..d30f8cc7 100644 --- a/src/components/controlled/transactions-table/components/TransactionHash/index.ts +++ b/src/components/controlled/transactions-table/components/TransactionHash/index.ts @@ -1 +1 @@ -export * from './TransactionHash' \ No newline at end of file +export * from './TransactionHash'; diff --git a/src/components/controlled/transactions-table/components/TransactionIcon/TransactionIcon.tsx b/src/components/controlled/transactions-table/components/TransactionIcon/TransactionIcon.tsx index e7ce00e0..479262fc 100644 --- a/src/components/controlled/transactions-table/components/TransactionIcon/TransactionIcon.tsx +++ b/src/components/controlled/transactions-table/components/TransactionIcon/TransactionIcon.tsx @@ -11,24 +11,23 @@ const styles = { } satisfies Record; interface TransactionIconPropsType { - iconInfo: TransactionIconInfoType; - class?: string; + iconInfo: TransactionIconInfoType; + class?: string; } export function TransactionIcon({ iconInfo, class: className }: TransactionIconPropsType) { - if (!iconInfo) { - return null; - } - - return ( - - ); + if (!iconInfo) { + return null; + } + return ( + + ); } diff --git a/src/components/controlled/transactions-table/components/TransactionIcon/getValidIcon.ts b/src/components/controlled/transactions-table/components/TransactionIcon/getValidIcon.ts index d775e6ca..c2bd3f93 100644 --- a/src/components/controlled/transactions-table/components/TransactionIcon/getValidIcon.ts +++ b/src/components/controlled/transactions-table/components/TransactionIcon/getValidIcon.ts @@ -1,15 +1,17 @@ -import { IconNamesEnum } from "common/Icon/icon.types"; +import { IconNamesEnum } from 'common/Icon/icon.types'; -const iconMap: Record = Object.values(IconNamesEnum).reduce((acc, icon) => { +const iconMap: Record = Object.values(IconNamesEnum).reduce( + (acc, icon) => { acc[icon] = true; return acc; -}, {} as Record); + }, + {} as Record, +); function isValidIcon(value: string): value is IconNamesEnum { - return value in iconMap; + return value in iconMap; } export function getValidIcon(icon: string): IconNamesEnum { - return isValidIcon(icon) ? icon : null; + return isValidIcon(icon) ? icon : null; } - diff --git a/src/components/controlled/transactions-table/components/TransactionIcon/index.ts b/src/components/controlled/transactions-table/components/TransactionIcon/index.ts index c6aafb2c..5ff26236 100644 --- a/src/components/controlled/transactions-table/components/TransactionIcon/index.ts +++ b/src/components/controlled/transactions-table/components/TransactionIcon/index.ts @@ -1 +1 @@ -export * from './TransactionIcon' \ No newline at end of file +export * from './TransactionIcon'; diff --git a/src/components/controlled/transactions-table/components/TransactionMethod/TransactionMethod.tsx b/src/components/controlled/transactions-table/components/TransactionMethod/TransactionMethod.tsx index 35caf702..e3a8ef14 100644 --- a/src/components/controlled/transactions-table/components/TransactionMethod/TransactionMethod.tsx +++ b/src/components/controlled/transactions-table/components/TransactionMethod/TransactionMethod.tsx @@ -10,23 +10,23 @@ const styles = { } satisfies Record; interface TransactionMethodPropsType { - class?: string; - actionDescription: string; - method: string; + class?: string; + actionDescription: string; + method: string; } export function TransactionMethod({ method, actionDescription, class: className }: TransactionMethodPropsType) { - return ( - -
{method}
-
- ); + return ( + +
{method}
+
+ ); } diff --git a/src/components/controlled/transactions-table/components/TransactionMethod/index.ts b/src/components/controlled/transactions-table/components/TransactionMethod/index.ts index 2f5606bb..9aa7987d 100644 --- a/src/components/controlled/transactions-table/components/TransactionMethod/index.ts +++ b/src/components/controlled/transactions-table/components/TransactionMethod/index.ts @@ -1 +1 @@ -export * from './TransactionMethod' \ No newline at end of file +export * from './TransactionMethod'; diff --git a/src/components/controlled/transactions-table/components/TransactionMethod/tests/transaction-method.spec.tsx b/src/components/controlled/transactions-table/components/TransactionMethod/tests/transaction-method.spec.tsx index 09ec188c..7833302e 100644 --- a/src/components/controlled/transactions-table/components/TransactionMethod/tests/transaction-method.spec.tsx +++ b/src/components/controlled/transactions-table/components/TransactionMethod/tests/transaction-method.spec.tsx @@ -3,13 +3,11 @@ import { newSpecPage } from '@stencil/core/testing'; import { TransactionMethod } from '../TransactionMethod'; - - describe('TransactionMethod tests', () => { const createPage = async (props: { method?: string; actionDescription?: string }) => { const page = await newSpecPage({ components: [], - template: () => + template: () => , }); return page; @@ -19,7 +17,7 @@ describe('TransactionMethod tests', () => { it('renders with default props', async () => { const page = await newSpecPage({ components: [], - template: () => + template: () => , }); expect(page.root).toBeTruthy(); @@ -28,7 +26,7 @@ describe('TransactionMethod tests', () => { it('has correct data-testid', async () => { const page = await newSpecPage({ components: [], - template: () => + template: () => , }); expect(page.root).toEqualHtml(` @@ -92,7 +90,7 @@ describe('TransactionMethod tests', () => { it('applies correct CSS classes to outer span', async () => { const page = await newSpecPage({ components: [], - template: () => + template: () => , }); expect(page.root).toEqualHtml(` @@ -105,7 +103,7 @@ describe('TransactionMethod tests', () => { it('applies correct CSS classes to inner div', async () => { const page = await newSpecPage({ components: [], - template: () => + template: () => , }); expect(page.root).toEqualHtml(` diff --git a/src/components/controlled/transactions-table/components/TransactionShards/index.ts b/src/components/controlled/transactions-table/components/TransactionShards/index.ts index 18ca9b68..e7267610 100644 --- a/src/components/controlled/transactions-table/components/TransactionShards/index.ts +++ b/src/components/controlled/transactions-table/components/TransactionShards/index.ts @@ -1 +1 @@ -export * from './TransactionShards' \ No newline at end of file +export * from './TransactionShards'; diff --git a/src/components/controlled/transactions-table/components/TransactionValue/index.ts b/src/components/controlled/transactions-table/components/TransactionValue/index.ts index 31fba0ce..754a8c5c 100644 --- a/src/components/controlled/transactions-table/components/TransactionValue/index.ts +++ b/src/components/controlled/transactions-table/components/TransactionValue/index.ts @@ -1 +1 @@ -export * from './TransactionValue'; \ No newline at end of file +export * from './TransactionValue'; diff --git a/src/components/controlled/transactions-table/components/index.ts b/src/components/controlled/transactions-table/components/index.ts index 1497dfab..1bfe3e1c 100644 --- a/src/components/controlled/transactions-table/components/index.ts +++ b/src/components/controlled/transactions-table/components/index.ts @@ -4,4 +4,4 @@ export * from './TransactionHash'; export * from './TransactionIcon'; export * from './TransactionMethod'; export * from './TransactionShards'; -export * from './TransactionValue'; \ No newline at end of file +export * from './TransactionValue'; diff --git a/src/components/controlled/transactions-table/transactions-table.scss b/src/components/controlled/transactions-table/transactions-table.scss index ff1190ee..21b0cbc1 100644 --- a/src/components/controlled/transactions-table/transactions-table.scss +++ b/src/components/controlled/transactions-table/transactions-table.scss @@ -1 +1 @@ -// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. \ No newline at end of file +// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. diff --git a/src/components/controlled/transactions-table/transactions-table.styles.ts b/src/components/controlled/transactions-table/transactions-table.styles.ts index 533ed366..77ed50c3 100644 --- a/src/components/controlled/transactions-table/transactions-table.styles.ts +++ b/src/components/controlled/transactions-table/transactions-table.styles.ts @@ -7,4 +7,4 @@ export default { transactionsTableBodyRow: 'transactions-table-body-row mvx:text-label mvx:border-b mvx:border-outline-variant', transactionsTableBodyCell: 'transactions-table-body-cell mvx:p-4 mvx:w-max', transactionsTableBodyCellChild: 'transactions-table-body-cell-child mvx:flex mvx:w-max' -} satisfies Record; \ No newline at end of file +} satisfies Record; diff --git a/src/components/controlled/transactions-table/transactions-table.tsx b/src/components/controlled/transactions-table/transactions-table.tsx index edec1e4b..cf87e63b 100644 --- a/src/components/controlled/transactions-table/transactions-table.tsx +++ b/src/components/controlled/transactions-table/transactions-table.tsx @@ -1,8 +1,15 @@ import { Component, h, Prop } from '@stencil/core'; import { DataTestIdsEnum } from '../../../constants/dataTestIds.enum'; -import { TransactionAccount, TransactionAge, TransactionHash, TransactionMethod, TransactionShards, TransactionValue } from './components'; -import styles from './transactions-table.styles' +import { + TransactionAccount, + TransactionAge, + TransactionHash, + TransactionMethod, + TransactionShards, + TransactionValue, +} from './components'; +import styles from './transactions-table.styles'; import type { TransactionRowType } from './transactions-table.type'; const COLUMNS = ['Txn Hash', 'Age', 'Shard', 'From', 'To', 'Method', 'Value']; diff --git a/src/components/controlled/transactions-table/transactions-table.type.ts b/src/components/controlled/transactions-table/transactions-table.type.ts index 756b5531..67ef83d2 100644 --- a/src/components/controlled/transactions-table/transactions-table.type.ts +++ b/src/components/controlled/transactions-table/transactions-table.type.ts @@ -1,4 +1,4 @@ -import type { IconNamesEnum } from "common/Icon/icon.types"; +import type { IconNamesEnum } from 'common/Icon/icon.types'; export type TransactionRowType = { age: TransactionAgeType; diff --git a/src/components/functional/notifications-feed/notifications-feed.tsx b/src/components/functional/notifications-feed/notifications-feed.tsx index f07348e5..a72a6453 100644 --- a/src/components/functional/notifications-feed/notifications-feed.tsx +++ b/src/components/functional/notifications-feed/notifications-feed.tsx @@ -106,7 +106,9 @@ export class NotificationsFeed { {hasPending && (
Processing...
- {this.pendingTransactions?.map(toast => )} + {this.pendingTransactions?.map(toast => ( + + ))}
)} diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/SignTransactionsAdvanced.tsx b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/SignTransactionsAdvanced.tsx index af57efb4..34a7ad41 100644 --- a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/SignTransactionsAdvanced.tsx +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/SignTransactionsAdvanced.tsx @@ -1,12 +1,11 @@ import { h } from '@stencil/core'; +import classNames from 'classnames'; import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; +import type { DecodeMethodEnum } from '../../sign-transactions-panel.types'; import state from '../../signTransactionsPanelStore'; - -import styles from './signTransactionsAdvanced.styles'; import { SignTransactionsAdvancedData } from './components/SignTransactionsAdvancedData/SignTransactionsAdvancedData'; -import { DecodeMethodEnum } from '../../sign-transactions-panel.types'; -import classNames from 'classnames'; +import styles from './signTransactionsAdvanced.styles'; interface SignTransactionsAdvancedPropsType { decodeMethod?: DecodeMethodEnum; @@ -29,7 +28,10 @@ export function SignTransactionsAdvanced(props: SignTransactionsAdvancedPropsTyp {gasPrice} {egldLabel}
-
+
{gasPriceOptions?.map(({ label, value }) => { const isActive = gasPriceOption?.toString() === value.toString(); @@ -37,26 +39,39 @@ export function SignTransactionsAdvanced(props: SignTransactionsAdvancedPropsTyp ); })}
-
+
Gas Limit {gasLimit}
- +
); } - diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/SignTransactionsAdvancedData.tsx b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/SignTransactionsAdvancedData.tsx index 1e08ba37..c9a93904 100644 --- a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/SignTransactionsAdvancedData.tsx +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/SignTransactionsAdvancedData.tsx @@ -1,14 +1,13 @@ import { Fragment, h } from '@stencil/core'; +import classNames from 'classnames'; +import { Tooltip } from 'common/Tooltip/Tooltip'; import { DecodeMethodEnum } from 'components/functional/sign-transactions-panel/sign-transactions-panel.types'; import state from 'components/functional/sign-transactions-panel/signTransactionsPanelStore'; import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; -import styles from './signTransactionsAdvancedData.styles' - -import { getProcessedHighlightedData } from './helpers/getProcessedHighlightedData'; import { SignTransactionsAdvancedDataDecode } from './components/SignTransactionsAdvancedDataDecode/SignTransactionsAdvancedDataDecode'; -import classNames from 'classnames'; -import { Tooltip } from 'common/Tooltip/Tooltip'; +import { getProcessedHighlightedData } from './helpers/getProcessedHighlightedData'; +import styles from './signTransactionsAdvancedData.styles'; export interface IDataHightlight { beforeHighlight?: string; @@ -23,7 +22,12 @@ interface SignTransactionsAdvancedDataPropsType { onDecodeTooltipVisibilityChange?: (isVisible: boolean) => void; } -export function SignTransactionsAdvancedData({ decodeMethod = DecodeMethodEnum.raw, onDecodeMethodChange, decodeTooltipVisible, onDecodeTooltipVisibilityChange }: SignTransactionsAdvancedDataPropsType) { +export function SignTransactionsAdvancedData({ + decodeMethod = DecodeMethodEnum.raw, + onDecodeMethodChange, + decodeTooltipVisible, + onDecodeTooltipVisibilityChange, +}: SignTransactionsAdvancedDataPropsType) { const { data, highlight } = state.commonData; let highlightElement: HTMLElement; @@ -41,19 +45,18 @@ export function SignTransactionsAdvancedData({ decodeMethod = DecodeMethodEnum.r } const { displayValue = '', highlight: decodedHighlight = '' } = state.commonData.decodedData - ? state.commonData.decodedData[decodeMethod] ?? {} + ? (state.commonData.decodedData[decodeMethod] ?? {}) : {}; return !decodedHighlight || !displayValue.includes(decodedHighlight) ? { highlight: displayValue } : getProcessedHighlightedData({ data: displayValue, highlightedData: decodedHighlight }); - } + }; const computedDisplayData = getComputedDisplayData(); const { beforeHighlight, afterHighlight, highlight: highlightText } = computedDisplayData; if ((beforeHighlight || afterHighlight) && highlightElement) { - const timeoutId = setTimeout(() => { highlightElement?.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'nearest' }); }); @@ -74,10 +77,7 @@ export function SignTransactionsAdvancedData({ decodeMethod = DecodeMethodEnum.r }} isTooltipVisible={decodeTooltipVisible} trigger={ - + } >
(highlightElement = el)} > @@ -141,7 +144,6 @@ export function SignTransactionsAdvancedData({ decodeMethod = DecodeMethodEnum.r )}
-
+
); } - diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/components/SignTransactionsAdvancedDataDecode/SignTransactionsAdvancedDataDecode.tsx b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/components/SignTransactionsAdvancedDataDecode/SignTransactionsAdvancedDataDecode.tsx index 38447659..83a5c98f 100644 --- a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/components/SignTransactionsAdvancedDataDecode/SignTransactionsAdvancedDataDecode.tsx +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/components/SignTransactionsAdvancedDataDecode/SignTransactionsAdvancedDataDecode.tsx @@ -18,7 +18,10 @@ interface SignTransactionsAdvancedDataDecodePropsType { currentDecodeMethod: DecodeMethodEnum; } -export function SignTransactionsAdvancedDataDecode({ isToggled = false, currentDecodeMethod = DecodeMethodEnum.decimal }: SignTransactionsAdvancedDataDecodePropsType) { +export function SignTransactionsAdvancedDataDecode({ + isToggled = false, + currentDecodeMethod = DecodeMethodEnum.decimal, +}: SignTransactionsAdvancedDataDecodePropsType) { return (
); } - diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/signTransactionsAdvancedData.styles.ts b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/signTransactionsAdvancedData.styles.ts index 730b5d1a..9b84014e 100644 --- a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/signTransactionsAdvancedData.styles.ts +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/components/SignTransactionsAdvancedData/signTransactionsAdvancedData.styles.ts @@ -12,4 +12,4 @@ export default { signTransactionsAdvancedDataText: 'sign-transactions-advanced-data-text mvx:text-secondary-text', signTransactionsAdvancedDataHighlight: 'sign-transactions-advanced-data-highlight mvx:text-primary', signTransactionsAdvancedDataHighlightBolded: 'sign-transactions-advanced-data-highlight-bolded mvx:font-medium' -} satisfies Record; \ No newline at end of file +} satisfies Record; diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/signTransactionsAdvanced.styles.ts b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/signTransactionsAdvanced.styles.ts index 248ce792..327370c7 100644 --- a/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/signTransactionsAdvanced.styles.ts +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsAdvanced/signTransactionsAdvanced.styles.ts @@ -15,4 +15,4 @@ export default { signTransactionsGasLimitRow: 'sign-transactions-gas-limit-row mvx:flex mvx:items-center mvx:justify-between mvx:w-full', signTransactionsGasLimit: 'sign-transactions-gas-limit mvx:text-secondary-text mvx:text-sm mvx:font-normal mvx:leading-5 mvx:relative mvx:z-1', signTransactionsGasLimitValue: 'sign-transactions-gas-limit-value mvx:text-secondary-text mvx:text-sm mvx:font-medium mvx:leading-5 mvx:relative mvx:z-1' -} satisfies Record; \ No newline at end of file +} satisfies Record; diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/SignTransactionsFooter.tsx b/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/SignTransactionsFooter.tsx index 7b1f40e0..a6d4757b 100644 --- a/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/SignTransactionsFooter.tsx +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/SignTransactionsFooter.tsx @@ -1,15 +1,15 @@ import { Fragment, h } from '@stencil/core'; import classNames from 'classnames'; +import { Button } from 'common/Button/Button'; +import { CopyButton } from 'common/CopyButton/CopyButton'; +import { ExplorerLink } from 'common/ExplorerLink/ExplorerLink'; import { Icon } from 'common/Icon'; +import { Tooltip } from 'common/Tooltip/Tooltip'; +import { Trim } from 'common/Trim/Trim'; import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; import state from '../../signTransactionsPanelStore'; import styles from './signTransactionsFooter.styles'; -import { CopyButton } from 'common/CopyButton/CopyButton'; -import { Tooltip } from 'common/Tooltip/Tooltip'; -import { Button } from 'common/Button/Button'; -import { ExplorerLink } from 'common/ExplorerLink/ExplorerLink'; -import { Trim } from 'common/Trim/Trim'; let isWaitingForSignature: boolean = false; let lastCommonData = { ...state.commonData }; @@ -21,7 +21,12 @@ interface SignTransactionsFooterPropsType { handleCopyButtonClick?: (event: MouseEvent, text?: string) => void; } -export function SignTransactionsFooter({ tooltipVisible, onTooltipVisibilityChange, isSuccessOnCopy, handleCopyButtonClick }: SignTransactionsFooterPropsType) { +export function SignTransactionsFooter({ + tooltipVisible, + onTooltipVisibilityChange, + isSuccessOnCopy, + handleCopyButtonClick, +}: SignTransactionsFooterPropsType) { const currentCommonData = { ...state.commonData }; const hasChanged = JSON.stringify(currentCommonData) !== JSON.stringify(lastCommonData); @@ -53,7 +58,12 @@ export function SignTransactionsFooter({ tooltipVisible, onTooltipVisibilityChan
-
+
@@ -151,7 +161,12 @@ export function SignTransactionsFooter({ tooltipVisible, onTooltipVisibilityChan /> )} - handleCopyButtonClick?.(event, username ?? address)} /> + handleCopyButtonClick?.(event, username ?? address)} + />
diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/signTransactionsFooter.styles.ts b/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/signTransactionsFooter.styles.ts index 6451208a..6cd45db2 100644 --- a/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/signTransactionsFooter.styles.ts +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsFooter/signTransactionsFooter.styles.ts @@ -1,21 +1,22 @@ +// prettier-ignore export default { - signTransactionsFooterContainer: 'sign-transactions-footer-container mvx:flex mvx:flex-col mvx:flex-1 mvx:h-full', - signTransactionsFooter: 'sign-transactions-footer mvx:mt-auto mvx:flex mvx:flex-col mvx:items-center mvx:pt-5 mvx:gap-5 mvx:text-center', - signTransactionsFooterButtons: 'sign-transactions-footer-buttons mvx:flex mvx:items-center mvx:w-full mvx:gap-3', - signTransactionsFooterButtonWrapper: 'sign-transactions-footer-button-wrapper mvx:relative mvx:flex mvx:flex-col mvx:flex-1', - signTransactionsFooterButtonWrapperCancel: 'sign-transactions-footer-button-wrapper-cancel mvx:w-32 mvx:max-w-32', - signTransactionsFooterButtonTooltipWrapper: 'sign-transactions-footer-button-tooltip-wrapper mvx:absolute mvx:inset-0', - signTransactionsFooterButton: 'sign-transactions-footer-button mvx:flex', - signTransactionsFooterButtonIcon: 'sign-transactions-footer-button-icon mvx:flex mvx:transition-all mvx:duration-200 mvx:ease-in-out', - signTransactionsFooterButtonIconLighter: 'sign-transactions-footer-button-icon-lighter mvx:fill-secondary-text', - signTransactionsFooterIdentity: 'sign-transactions-footer-identity mvx:max-w-64 mvx:flex mvx:items-center mvx:text-base mvx:gap-2 mvx:overflow-hidden', - signTransactionsFooterIdentityLabel: 'sign-transactions-footer-identity-label mvx:whitespace-nowrap mvx:text-secondary-text', - signTransactionsFooterIdentityAddress: 'sign-transactions-footer-identity-address mvx:text-primary', - signTransactionsTrimWrapper: 'sign-transactions-trim-wrapper mvx:items-end mvx:leading-none', - signTransactionsFooterIdentityUsername: 'sign-transactions-footer-identity-username mvx:flex mvx:items-center mvx:text-base mvx:text-primary', - signTransactionsFooterIdentityUsernamePrefix: 'sign-transactions-footer-identity-username-prefix mvx:text-accent', - signTransactionsFooterIdentityCopy: 'sign-transactions-footer-identity-copy mvx:text-primary', - signTransactionsButtonTooltip: 'sign-transactions-button-tooltip mvx:absolute mvx:top-0 mvx:h-12 mvx:left-0 mvx:right-0', - signTransactionsActionButton: 'sign-transactions-action-button mvx:text-base! mvx:w-full', - signTransactionsExplorerLinkIcon: 'sign-transactions-explorer-link-icon mvx:text-primary', -} satisfies Record; \ No newline at end of file + signTransactionsFooterContainer: 'sign-transactions-footer-container mvx:flex mvx:flex-col mvx:flex-1 mvx:h-full', + signTransactionsFooter: 'sign-transactions-footer mvx:mt-auto mvx:flex mvx:flex-col mvx:items-center mvx:pt-5 mvx:gap-5 mvx:text-center', + signTransactionsFooterButtons: 'sign-transactions-footer-buttons mvx:flex mvx:items-center mvx:w-full mvx:gap-3', + signTransactionsFooterButtonWrapper: 'sign-transactions-footer-button-wrapper mvx:relative mvx:flex mvx:flex-col mvx:flex-1', + signTransactionsFooterButtonWrapperCancel: 'sign-transactions-footer-button-wrapper-cancel mvx:w-32 mvx:max-w-32', + signTransactionsFooterButtonTooltipWrapper: 'sign-transactions-footer-button-tooltip-wrapper mvx:absolute mvx:inset-0', + signTransactionsFooterButton: 'sign-transactions-footer-button mvx:flex', + signTransactionsFooterButtonIcon: 'sign-transactions-footer-button-icon mvx:flex mvx:transition-all mvx:duration-200 mvx:ease-in-out', + signTransactionsFooterButtonIconLighter: 'sign-transactions-footer-button-icon-lighter mvx:fill-secondary-text', + signTransactionsFooterIdentity: 'sign-transactions-footer-identity mvx:max-w-64 mvx:flex mvx:items-center mvx:text-base mvx:gap-2 mvx:overflow-hidden', + signTransactionsFooterIdentityLabel: 'sign-transactions-footer-identity-label mvx:whitespace-nowrap mvx:text-secondary-text', + signTransactionsFooterIdentityAddress: 'sign-transactions-footer-identity-address mvx:text-primary', + signTransactionsTrimWrapper: 'sign-transactions-trim-wrapper mvx:items-end mvx:leading-none', + signTransactionsFooterIdentityUsername: 'sign-transactions-footer-identity-username mvx:flex mvx:items-center mvx:text-base mvx:text-primary', + signTransactionsFooterIdentityUsernamePrefix: 'sign-transactions-footer-identity-username-prefix mvx:text-accent', + signTransactionsFooterIdentityCopy: 'sign-transactions-footer-identity-copy mvx:text-primary', + signTransactionsButtonTooltip: 'sign-transactions-button-tooltip mvx:absolute mvx:top-0 mvx:h-12 mvx:left-0 mvx:right-0', + signTransactionsActionButton: 'sign-transactions-action-button mvx:text-base! mvx:w-full', + signTransactionsExplorerLinkIcon: 'sign-transactions-explorer-link-icon mvx:text-primary', +} satisfies Record; diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsHeader/SignTransactionsHeader.tsx b/src/components/functional/sign-transactions-panel/components/SignTransactionsHeader/SignTransactionsHeader.tsx index de889fa3..7b682259 100644 --- a/src/components/functional/sign-transactions-panel/components/SignTransactionsHeader/SignTransactionsHeader.tsx +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsHeader/SignTransactionsHeader.tsx @@ -1,6 +1,7 @@ import { h } from '@stencil/core'; import { Icon } from 'common/Icon'; import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; + import styles from './sign-transactions-header.styles'; interface SignTransactionsHeaderPropsType { @@ -14,7 +15,14 @@ interface SignTransactionsHeaderPropsType { const NUMBER_OF_TRANSACTIONS = 10; -export function SignTransactionsHeader({ onBack, onNext, currentIndex, transactionsCount, origin, showFavicon }: SignTransactionsHeaderPropsType) { +export function SignTransactionsHeader({ + onBack, + onNext, + currentIndex, + transactionsCount, + origin, + showFavicon, +}: SignTransactionsHeaderPropsType) { return (
{transactionsCount > 1 && ( @@ -101,4 +109,3 @@ export function SignTransactionsHeader({ onBack, onNext, currentIndex, transacti
); } - diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/SignTransactionsOverview.tsx b/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/SignTransactionsOverview.tsx index 2cc83207..950f4eb4 100644 --- a/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/SignTransactionsOverview.tsx +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/SignTransactionsOverview.tsx @@ -1,12 +1,11 @@ import { h } from '@stencil/core'; +import classNames from 'classnames'; import { Icon } from 'common/Icon'; +import { Trim } from 'common/Trim/Trim'; import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; import { handleAmountResize } from '../../helpers'; -import classNames from 'classnames'; - import styles from './signTransactionsOverview.styles'; -import { Trim } from 'common/Trim/Trim'; interface SignTransactionsOverviewPropsType { identifier: string; @@ -20,7 +19,17 @@ interface SignTransactionsOverviewPropsType { isApp: boolean; } -export function SignTransactionsOverview({ identifier, usdValue, amount, tokenIconUrl, interactor, interactorIconUrl, action, networkFee = '~$0.00078', isApp = false }: SignTransactionsOverviewPropsType) { +export function SignTransactionsOverview({ + identifier, + usdValue, + amount, + tokenIconUrl, + interactor, + interactorIconUrl, + action, + networkFee = '~$0.00078', + isApp = false, +}: SignTransactionsOverviewPropsType) { const setAmountValueRef = (el?: HTMLElement) => { if (!el) { return; @@ -32,7 +41,10 @@ export function SignTransactionsOverview({ identifier, usdValue, amount, tokenIc return (
-
+
{isApp ? 'Amount' : 'Send'}
@@ -46,7 +58,10 @@ export function SignTransactionsOverview({ identifier, usdValue, amount, tokenIc
{identifier !== 'USD' && ( -
+
{usdValue}
)} @@ -63,7 +78,10 @@ export function SignTransactionsOverview({ identifier, usdValue, amount, tokenIc
@@ -71,7 +89,10 @@ export function SignTransactionsOverview({ identifier, usdValue, amount, tokenIc
-
+
{isApp ? 'App' : 'To'}
{interactorIconUrl && ( @@ -89,9 +110,15 @@ export function SignTransactionsOverview({ identifier, usdValue, amount, tokenIc
{isApp && ( -
+
Action
-
+
{action}
@@ -109,7 +136,6 @@ export function SignTransactionsOverview({ identifier, usdValue, amount, tokenIc
-
+
); } - diff --git a/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/signTransactionsOverview.styles.ts b/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/signTransactionsOverview.styles.ts index 65db8e5d..6a24a47b 100644 --- a/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/signTransactionsOverview.styles.ts +++ b/src/components/functional/sign-transactions-panel/components/SignTransactionsOverview/signTransactionsOverview.styles.ts @@ -30,4 +30,4 @@ export default { signTransactionsFeeLabel: 'sign-transactions-fee-label mvx:text-secondary-text mvx:text-sm mvx:font-normal mvx:leading-5', signTransactionsInfoIcon: 'sign-transactions-info-icon mvx:w-3.5 mvx:h-3.5 mvx:relative mvx:before:content-["ⓘ"] mvx:before:text-sm mvx:before:text-secondary-text mvx:before:absolute mvx:before:-top-0.5 mvx:before:left-0', signTransactionsFeeValue: 'sign-transactions-fee-value mvx:text-primary mvx:text-sm mvx:font-normal mvx:leading-5' -} satisfies Record; \ No newline at end of file +} satisfies Record; diff --git a/src/components/functional/sign-transactions-panel/sign-transactions-panel.scss b/src/components/functional/sign-transactions-panel/sign-transactions-panel.scss index 1075ba99..874140ed 100644 --- a/src/components/functional/sign-transactions-panel/sign-transactions-panel.scss +++ b/src/components/functional/sign-transactions-panel/sign-transactions-panel.scss @@ -1,36 +1,36 @@ .trim { - @apply mvx:flex mvx:relative mvx:max-w-full mvx:overflow-hidden mvx:whitespace-nowrap; + @apply mvx:flex mvx:relative mvx:max-w-full mvx:overflow-hidden mvx:whitespace-nowrap; } .trim-full { - @apply mvx:text-transparent mvx:absolute mvx:leading-5; + @apply mvx:text-transparent mvx:absolute mvx:leading-5; } .trim-full-visible { - @apply mvx:text-inherit mvx:relative mvx:leading-5; + @apply mvx:text-inherit mvx:relative mvx:leading-5; } .trim-wrapper { - @apply mvx:hidden; + @apply mvx:hidden; } .trim-wrapper-visible { - @apply mvx:overflow-hidden mvx:max-w-full mvx:flex; + @apply mvx:overflow-hidden mvx:max-w-full mvx:flex; } .trim-left-wrapper { - @apply mvx:flex-shrink mvx:text-ellipsis mvx:overflow-hidden mvx:text-left mvx:text-[1px]; + @apply mvx:flex-shrink mvx:text-ellipsis mvx:overflow-hidden mvx:text-left mvx:text-[1px]; } .trim-left { - @apply mvx:select-none mvx:pointer-events-none mvx:inline mvx:text-base mvx:leading-5; + @apply mvx:select-none mvx:pointer-events-none mvx:inline mvx:text-base mvx:leading-5; } .trim-right-wrapper { - @apply mvx:flex-shrink mvx:text-ellipsis mvx:overflow-hidden mvx:whitespace-nowrap mvx:text-right mvx:text-[1px]; - direction: rtl; + @apply mvx:flex-shrink mvx:text-ellipsis mvx:overflow-hidden mvx:whitespace-nowrap mvx:text-right mvx:text-[1px]; + direction: rtl; } .trim-right { - @apply mvx:select-none mvx:pointer-events-none mvx:inline mvx:text-base mvx:leading-5 mvx:text-clip; -} \ No newline at end of file + @apply mvx:select-none mvx:pointer-events-none mvx:inline mvx:text-base mvx:leading-5 mvx:text-clip; +} diff --git a/src/components/functional/sign-transactions-panel/sign-transactions-panel.styles.ts b/src/components/functional/sign-transactions-panel/sign-transactions-panel.styles.ts index e568781a..b4a8c6b9 100644 --- a/src/components/functional/sign-transactions-panel/sign-transactions-panel.styles.ts +++ b/src/components/functional/sign-transactions-panel/sign-transactions-panel.styles.ts @@ -15,4 +15,4 @@ export default { buttonNeutral: 'button-neutral mvx:text-neutral-925 mvx:bg-white mvx:hover:opacity-75', buttonDisabled: 'button-disabled mvx:pointer-events-none mvx:bg-transparent mvx:cursor-default mvx:border mvx:border-secondary-text mvx:!text-secondary-text mvx:hover:opacity-100', tooltipContent: 'tooltip-content mvx:flex-row mvx:cursor-default mvx:p-2 mvx:whitespace-nowrap mvx:text-xs mvx:rounded-xl mvx:leading-none mvx:!bg-surface mvx:border-outline-variant mvx:border mvx:text-primary mvx:after:left-1/2 mvx:after:origin-center mvx:after:w-2 mvx:after:h-2 mvx:after:absolute mvx:after:border mvx:after:border-outline-variant mvx:after:!bg-surface mvx:after:translate-x-[calc(50%-8px)] mvx:after:-rotate-[45deg] mvx:after:content-[""]', -} satisfies Record; \ No newline at end of file +} satisfies Record; diff --git a/src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx b/src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx index 3c2ea7db..1e9a1706 100644 --- a/src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx +++ b/src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx @@ -1,20 +1,19 @@ import { Component, h, Method, State } from '@stencil/core'; +import { getCopyClickAction } from 'common/CopyButton/getCopyClickAction'; import { ANIMATION_DELAY_PROMISE } from 'components/visual/side-panel/side-panel.constants'; import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; import { ConnectionMonitor } from 'utils/ConnectionMonitor'; import type { IEventBus } from 'utils/EventBus'; import { EventBus } from 'utils/EventBus'; -import type { IOverviewProps, ISignTransactionsPanelData } from './sign-transactions-panel.types'; -import { DecodeMethodEnum, SignEventsEnum, TransactionTabsEnum } from './sign-transactions-panel.types'; -import state, { resetState } from './signTransactionsPanelStore'; -import { SignTransactionsFooter } from './components/SignTransactionsFooter/SignTransactionsFooter'; -import { getCopyClickAction } from 'common/CopyButton/getCopyClickAction'; -import { SignTransactionsOverview } from './components/SignTransactionsOverview/SignTransactionsOverview'; import { SignTransactionsAdvanced } from './components/SignTransactionsAdvanced/SignTransactionsAdvanced'; +import { SignTransactionsFooter } from './components/SignTransactionsFooter/SignTransactionsFooter'; import { SignTransactionsHeader } from './components/SignTransactionsHeader/SignTransactionsHeader'; - +import { SignTransactionsOverview } from './components/SignTransactionsOverview/SignTransactionsOverview'; import styles from './sign-transactions-panel.styles'; +import type { IOverviewProps, ISignTransactionsPanelData } from './sign-transactions-panel.types'; +import { DecodeMethodEnum, SignEventsEnum, TransactionTabsEnum } from './sign-transactions-panel.types'; +import state, { resetState } from './signTransactionsPanelStore'; @Component({ tag: 'mvx-sign-transactions-panel', @@ -131,7 +130,7 @@ export class SignTransactionsPanel { }; private handleCopyButtonClick = getCopyClickAction({ - onSuccessChange: (isSuccess) => (this.isSuccessOnCopy = isSuccess), + onSuccessChange: isSuccess => (this.isSuccessOnCopy = isSuccess), }); private setDecodeMethod = (method: DecodeMethodEnum) => { @@ -169,7 +168,10 @@ export class SignTransactionsPanel {
{transactionTabs.map(transactionTab => (
this.setActiveTab(transactionTab)} > @@ -199,7 +201,7 @@ export class SignTransactionsPanel { handleCopyButtonClick={this.handleCopyButtonClick} />
- + ); } } diff --git a/src/components/functional/toasts-list/components/custom-toast/components/custom-create-toast/custom-toast.scss b/src/components/functional/toasts-list/components/custom-toast/components/custom-create-toast/custom-toast.scss index b6f9ac6f..5e1d02a6 100644 --- a/src/components/functional/toasts-list/components/custom-toast/components/custom-create-toast/custom-toast.scss +++ b/src/components/functional/toasts-list/components/custom-toast/components/custom-create-toast/custom-toast.scss @@ -7,7 +7,7 @@ .icon-close { @apply mvx:flex mvx:w-5 mvx:h-5 mvx:flex-col mvx:justify-center mvx:shrink-0 mvx:p-0 mvx:cursor-pointer mvx:absolute mvx:right-3 mvx:top-3 mvx:bg-none mvx:border-0; color: var(--mvx-text-color-primary); - + .svg-inline--fa { @apply mvx:text-center; color: var(--mvx-text-color-primary); diff --git a/src/components/functional/toasts-list/components/custom-toast/components/custom-create-toast/custom-toast.tsx b/src/components/functional/toasts-list/components/custom-toast/components/custom-create-toast/custom-toast.tsx index b7ebc259..c2fee986 100644 --- a/src/components/functional/toasts-list/components/custom-toast/components/custom-create-toast/custom-toast.tsx +++ b/src/components/functional/toasts-list/components/custom-toast/components/custom-create-toast/custom-toast.tsx @@ -20,12 +20,8 @@ export class CustomToast { return (
{this.toast.hasCloseButton !== false && ( - )}
this.initializeToast(container)}>
diff --git a/src/components/functional/toasts-list/components/custom-toast/components/simple-toast/simple-toast.scss b/src/components/functional/toasts-list/components/custom-toast/components/simple-toast/simple-toast.scss index 1bbc9f2d..346b5232 100644 --- a/src/components/functional/toasts-list/components/custom-toast/components/simple-toast/simple-toast.scss +++ b/src/components/functional/toasts-list/components/custom-toast/components/simple-toast/simple-toast.scss @@ -68,4 +68,4 @@ &.no-margin { @apply mvx:mt-0; } -} \ No newline at end of file +} diff --git a/src/components/functional/toasts-list/components/custom-toast/components/simple-toast/simple-toast.tsx b/src/components/functional/toasts-list/components/custom-toast/components/simple-toast/simple-toast.tsx index 7747512e..db66b9b2 100644 --- a/src/components/functional/toasts-list/components/custom-toast/components/simple-toast/simple-toast.tsx +++ b/src/components/functional/toasts-list/components/custom-toast/components/simple-toast/simple-toast.tsx @@ -47,12 +47,8 @@ export class SimpleToast { )} {this.toast.hasCloseButton !== false && ( - )}
diff --git a/src/components/functional/toasts-list/components/custom-toast/generic-toast.tsx b/src/components/functional/toasts-list/components/custom-toast/generic-toast.tsx index cbbe3727..b649d9f5 100644 --- a/src/components/functional/toasts-list/components/custom-toast/generic-toast.tsx +++ b/src/components/functional/toasts-list/components/custom-toast/generic-toast.tsx @@ -1,6 +1,10 @@ import type { EventEmitter } from '@stencil/core'; import { Component, Event, h, Prop } from '@stencil/core'; -import type { CustomToastType, IComponentToast, ISimpleToast } from 'components/functional/toasts-list/components/transaction-toast/transaction-toast.type'; +import type { + CustomToastType, + IComponentToast, + ISimpleToast, +} from 'components/functional/toasts-list/components/transaction-toast/transaction-toast.type'; @Component({ tag: 'mvx-generic-toast', @@ -12,9 +16,19 @@ export class GenericToast { render() { const isComponentToast = 'instantiateToastElement' in this.toast; if (isComponentToast) { - return this.deleteToast.emit(this.toast.toastId)} />; + return ( + this.deleteToast.emit(this.toast.toastId)} + /> + ); } - return this.deleteToast.emit(this.toast.toastId)} />; + return ( + this.deleteToast.emit(this.toast.toastId)} + /> + ); } } diff --git a/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-content/transaction-toast-content.scss b/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-content/transaction-toast-content.scss index 039ea593..b7b68cd1 100644 --- a/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-content/transaction-toast-content.scss +++ b/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-content/transaction-toast-content.scss @@ -124,4 +124,4 @@ @apply mvx:text-center mvx:h-4 mvx:w-4; color: var(--mvx-text-color-primary); } -} \ No newline at end of file +} diff --git a/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-content/transaction-toast-content.tsx b/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-content/transaction-toast-content.tsx index c99e27c4..545a3df7 100644 --- a/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-content/transaction-toast-content.tsx +++ b/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-content/transaction-toast-content.tsx @@ -4,6 +4,7 @@ import classNames from 'classnames'; import { FormatAmount } from 'common/FormatAmount/FormatAmount'; import { Icon } from 'common/Icon'; import { IconSizeEnumType, TransactionAssetIcon } from 'common/TransactionAssetIcon/TransactionAssetIcon'; +import { Trim } from 'common/Trim/Trim'; import { getAmountParts } from 'components/functional/toasts-list/helpers'; import type { ITransactionListItem } from 'components/visual/transaction-list-item/transaction-list-item.types'; import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; @@ -11,7 +12,6 @@ import { TransactionStatusEnum } from 'constants/transactionStatus.enum'; import { getIsTransactionFailed } from 'utils/getTransactionStatus'; import type { IToastDataState } from '../../transaction-toast.type'; -import { Trim } from 'common/Trim/Trim'; // prettier-ignore const styles = { diff --git a/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-details/tests/transaction-toast-details.e2e.ts b/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-details/tests/transaction-toast-details.e2e.ts index 1a2fdc07..21323e08 100644 --- a/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-details/tests/transaction-toast-details.e2e.ts +++ b/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-details/tests/transaction-toast-details.e2e.ts @@ -2,7 +2,11 @@ import { newE2EPage } from '@stencil/core/testing'; import type { ITransactionListItem } from 'components/visual/transaction-list-item/transaction-list-item.types'; import { TransactionStatusEnum } from 'constants/transactionStatus.enum'; -const createMockTransaction = (params: { hash: string; status?: `${TransactionStatusEnum}`; timestamp?: number }): ITransactionListItem => ({ +const createMockTransaction = (params: { + hash: string; + status?: `${TransactionStatusEnum}`; + timestamp?: number; +}): ITransactionListItem => ({ hash: params.hash, status: params.status || TransactionStatusEnum.success, link: `https://explorer.com/${params.hash}`, diff --git a/src/components/functional/toasts-list/components/transaction-toast/transaction-toast.scss b/src/components/functional/toasts-list/components/transaction-toast/transaction-toast.scss index 3806c14a..49d30d83 100644 --- a/src/components/functional/toasts-list/components/transaction-toast/transaction-toast.scss +++ b/src/components/functional/toasts-list/components/transaction-toast/transaction-toast.scss @@ -1,3 +1,3 @@ .transaction-toast { - @apply mvx:relative; -} \ No newline at end of file + @apply mvx:relative; +} diff --git a/src/components/functional/unlock-panel/components/UnlockPanelFooter/UnlockPanelFooter.tsx b/src/components/functional/unlock-panel/components/UnlockPanelFooter/UnlockPanelFooter.tsx index 3c167cf2..2e59439f 100644 --- a/src/components/functional/unlock-panel/components/UnlockPanelFooter/UnlockPanelFooter.tsx +++ b/src/components/functional/unlock-panel/components/UnlockPanelFooter/UnlockPanelFooter.tsx @@ -1,8 +1,8 @@ import { h } from '@stencil/core'; import { Icon } from 'common/Icon'; -import styles from './unlockPanelFooter.styles' import unlockPanelWalletImg from '../../../../../assets/unlock-panel-wallet.webp'; +import styles from './unlockPanelFooter.styles'; export function UnlockPanelFooter({ walletAddress }: { walletAddress: string }) { const handleWalletClick = (event: MouseEvent) => { @@ -39,7 +39,6 @@ export function UnlockPanelFooter({ walletAddress }: { walletAddress: string })
-
+
); - } diff --git a/src/components/functional/unlock-panel/components/UnlockPanelFooter/index.ts b/src/components/functional/unlock-panel/components/UnlockPanelFooter/index.ts index 51d58d9a..e942d223 100644 --- a/src/components/functional/unlock-panel/components/UnlockPanelFooter/index.ts +++ b/src/components/functional/unlock-panel/components/UnlockPanelFooter/index.ts @@ -1 +1 @@ -export * from './UnlockPanelFooter'; \ No newline at end of file +export * from './UnlockPanelFooter'; diff --git a/src/components/functional/unlock-panel/components/UnlockPanelFooter/unlockPanelFooter.styles.ts b/src/components/functional/unlock-panel/components/UnlockPanelFooter/unlockPanelFooter.styles.ts index 9fe36958..2f41319b 100644 --- a/src/components/functional/unlock-panel/components/UnlockPanelFooter/unlockPanelFooter.styles.ts +++ b/src/components/functional/unlock-panel/components/UnlockPanelFooter/unlockPanelFooter.styles.ts @@ -9,4 +9,4 @@ export default { unlockPanelFooterSubtitleDesktop: 'unlock-panel-footer-subtitle-desktop mvx:hidden mvx:xs:flex', unlockPanelFooterSubtitleMobile: 'unlock-panel-footer-subtitle-mobile mvx:text-xs mvx:xs:hidden', unlockPanelFooterSubtitleLink: 'unlock-panel-footer-subtitle-link mvx:text-accent' -} satisfies Record; \ No newline at end of file +} satisfies Record; diff --git a/src/components/functional/unlock-panel/components/UnlockPanelGroup/UnlockPanelGroup.tsx b/src/components/functional/unlock-panel/components/UnlockPanelGroup/UnlockPanelGroup.tsx index b6b1a91e..bf9c73cc 100644 --- a/src/components/functional/unlock-panel/components/UnlockPanelGroup/UnlockPanelGroup.tsx +++ b/src/components/functional/unlock-panel/components/UnlockPanelGroup/UnlockPanelGroup.tsx @@ -1,8 +1,9 @@ import { h } from '@stencil/core'; import classNames from 'classnames'; import { type IProviderBase, ProviderTypeEnum } from 'types/provider.types'; -import styles from './unlockPanelGroup.styles'; + import { UnlockProviderButton } from '../UnlockProviderButton'; +import styles from './unlockPanelGroup.styles'; export enum UnlockPanelGroupSlotEnum { groupLabel = 'group-label', @@ -26,9 +27,7 @@ export function UnlockPanelGroup({ providers = [], class: className, onLogin, gr return (
-
- {groupLabel} -
+
{groupLabel}
{providers.map((provider, providerIndex) => ( diff --git a/src/components/functional/unlock-panel/components/UnlockPanelGroup/index.ts b/src/components/functional/unlock-panel/components/UnlockPanelGroup/index.ts index 385d1c8f..f2f580e0 100644 --- a/src/components/functional/unlock-panel/components/UnlockPanelGroup/index.ts +++ b/src/components/functional/unlock-panel/components/UnlockPanelGroup/index.ts @@ -1 +1 @@ -export * from './UnlockPanelGroup'; \ No newline at end of file +export * from './UnlockPanelGroup'; diff --git a/src/components/functional/unlock-panel/components/UnlockPanelGroup/unlockPanelGroup.styles.ts b/src/components/functional/unlock-panel/components/UnlockPanelGroup/unlockPanelGroup.styles.ts index 8b4a8c3e..04b3b499 100644 --- a/src/components/functional/unlock-panel/components/UnlockPanelGroup/unlockPanelGroup.styles.ts +++ b/src/components/functional/unlock-panel/components/UnlockPanelGroup/unlockPanelGroup.styles.ts @@ -6,4 +6,4 @@ export default { unlockPanelGroupProviders: 'unlock-panel-group-providers mvx:flex mvx:flex-col mvx:gap-0.5 mvx:rounded-tl-lg mvx:rounded-tr-lg mvx:overflow-auto mvx:pb-6 mvx:mt-3 mvx:scrollbar-hide', detectedPanelGroup: 'mvx:hidden mvx:sm:flex', lastProviderButton: 'mvx:rounded-bl-lg mvx:rounded-br-lg mvx:overflow-hidden', -} satisfies Record; \ No newline at end of file +} satisfies Record; diff --git a/src/components/functional/unlock-panel/components/UnlockProviderButton/UnlockProviderButton.tsx b/src/components/functional/unlock-panel/components/UnlockProviderButton/UnlockProviderButton.tsx index 37b0502c..f689804b 100644 --- a/src/components/functional/unlock-panel/components/UnlockProviderButton/UnlockProviderButton.tsx +++ b/src/components/functional/unlock-panel/components/UnlockProviderButton/UnlockProviderButton.tsx @@ -21,9 +21,7 @@ export function UnlockProviderButton({ provider, class: className, onClick }: Un return null; } - const icon: HTMLElement | null = !provider.iconUrl - ? getProviderButtonIcon({ providerType: provider.type }) - : null; + const icon: HTMLElement | null = !provider.iconUrl ? getProviderButtonIcon({ providerType: provider.type }) : null; return (
diff --git a/src/components/functional/unlock-panel/components/UnlockProviderButton/index.ts b/src/components/functional/unlock-panel/components/UnlockProviderButton/index.ts index 54c0f59c..85e24343 100644 --- a/src/components/functional/unlock-panel/components/UnlockProviderButton/index.ts +++ b/src/components/functional/unlock-panel/components/UnlockProviderButton/index.ts @@ -1 +1 @@ -export * from './UnlockProviderButton'; \ No newline at end of file +export * from './UnlockProviderButton'; diff --git a/src/components/functional/unlock-panel/components/index.ts b/src/components/functional/unlock-panel/components/index.ts index 92aa6a2e..3359e5a0 100644 --- a/src/components/functional/unlock-panel/components/index.ts +++ b/src/components/functional/unlock-panel/components/index.ts @@ -1,3 +1,3 @@ export * from './UnlockPanelFooter'; export * from './UnlockPanelGroup'; -export * from './UnlockProviderButton'; \ No newline at end of file +export * from './UnlockProviderButton'; diff --git a/src/components/functional/unlock-panel/unlock-panel.scss b/src/components/functional/unlock-panel/unlock-panel.scss index ff1190ee..21b0cbc1 100644 --- a/src/components/functional/unlock-panel/unlock-panel.scss +++ b/src/components/functional/unlock-panel/unlock-panel.scss @@ -1 +1 @@ -// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. \ No newline at end of file +// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. diff --git a/src/components/functional/unlock-panel/unlock-panel.styles.ts b/src/components/functional/unlock-panel/unlock-panel.styles.ts index 401b0782..3bf93c0e 100644 --- a/src/components/functional/unlock-panel/unlock-panel.styles.ts +++ b/src/components/functional/unlock-panel/unlock-panel.styles.ts @@ -9,4 +9,4 @@ export default { detectedPanelGroup: 'mvx:hidden mvx:sm:flex mvx:sm:flex-col', desktopPanelGroupTitle: 'mvx:hidden mvx:sm:flex', mobilePanelGroupTitle: 'mvx:sm:hidden', -} satisfies Record; \ No newline at end of file +} satisfies Record; diff --git a/src/components/functional/unlock-panel/unlock-panel.tsx b/src/components/functional/unlock-panel/unlock-panel.tsx index 788d755b..2e9ab875 100644 --- a/src/components/functional/unlock-panel/unlock-panel.tsx +++ b/src/components/functional/unlock-panel/unlock-panel.tsx @@ -7,11 +7,11 @@ import { ConnectionMonitor } from 'utils/ConnectionMonitor'; import type { IEventBus } from 'utils/EventBus'; import { EventBus } from 'utils/EventBus'; +import { UnlockPanelFooter, UnlockPanelGroup } from './components'; import { getIsExtensionAvailable, getIsMetaMaskAvailable } from './helpers'; +import styles from './unlock-panel.styles'; import type { IUnlockPanelManagerData } from './unlock-panel.types'; import { UnlockPanelEventsEnum } from './unlock-panel.types'; -import { UnlockPanelFooter, UnlockPanelGroup } from './components'; -import styles from './unlock-panel.styles'; @Component({ tag: 'mvx-unlock-panel', @@ -188,17 +188,15 @@ export class UnlockPanel { {hasDetectedProviders && ( this.handleLogin(provider)} + onLogin={provider => this.handleLogin(provider)} class={styles.detectedPanelGroup} - groupLabel={ -
Detected
- } + groupLabel={
Detected
} /> )} this.handleLogin(provider)} + onLogin={provider => this.handleLogin(provider)} groupLabel={
Options
diff --git a/src/components/functional/wallet-connect/components/wallet-connect-download/wallet-connect-download.scss b/src/components/functional/wallet-connect/components/wallet-connect-download/wallet-connect-download.scss index 1d6519f0..9187f3e6 100644 --- a/src/components/functional/wallet-connect/components/wallet-connect-download/wallet-connect-download.scss +++ b/src/components/functional/wallet-connect/components/wallet-connect-download/wallet-connect-download.scss @@ -21,7 +21,7 @@ .wallet-connect-download-options { @apply mvx:h-60 mvx:flex mvx:flex-col mvx:gap-4 mvx:items-center mvx:justify-end mvx:my-auto mvx:mx-0; - .wallet-connect-download-option svg{ + .wallet-connect-download-option svg { @apply mvx:cursor-pointer mvx:transition-all mvx:ease-in-out mvx:duration-200 mvx:rounded-lg mvx:p-3; } } diff --git a/src/components/visual/data-with-explorer-link/tests/data-with-explorer-link.spec.ts b/src/components/visual/data-with-explorer-link/tests/data-with-explorer-link.spec.ts index f8ba557c..f59c8fb4 100644 --- a/src/components/visual/data-with-explorer-link/tests/data-with-explorer-link.spec.ts +++ b/src/components/visual/data-with-explorer-link/tests/data-with-explorer-link.spec.ts @@ -1,8 +1,8 @@ import { newSpecPage } from '@stencil/core/testing'; import { Trim } from 'common/Trim/Trim'; -import { ExplorerLink } from '../../../common/explorer-link/explorer-link'; import { CopyButton } from '../../../common/copy-button/copy-button'; +import { ExplorerLink } from '../../../common/explorer-link/explorer-link'; import { Tooltip } from '../../../common/tooltip/tooltip'; import { DataWithExplorerLink } from '../data-with-explorer-link'; @@ -252,4 +252,4 @@ describe('DataWithExplorerLink', () => { expect(component.class).toBe('custom'); expect(component.dataTestId).toBe('test'); }); -}); \ No newline at end of file +}); diff --git a/src/components/visual/index.ts b/src/components/visual/index.ts deleted file mode 100644 index ad402ac1..00000000 --- a/src/components/visual/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './address-table/address-table'; diff --git a/src/components/visual/pagination/helpers/getPagination/getPagination.ts b/src/components/visual/pagination/helpers/getPagination/getPagination.ts index d63a6338..deda8b25 100644 --- a/src/components/visual/pagination/helpers/getPagination/getPagination.ts +++ b/src/components/visual/pagination/helpers/getPagination/getPagination.ts @@ -2,7 +2,11 @@ import { ELLIPSIS } from 'constants/htmlStrings'; import inRange from 'lodash.inrange'; import range from 'lodash.range'; -import { MAX_PAGINATION_BATCH_LENGTH, MAX_PAGINATION_SLOTS, MIN_PAGINATION_BATCH_LENGTH } from './getPagination.constants'; +import { + MAX_PAGINATION_BATCH_LENGTH, + MAX_PAGINATION_SLOTS, + MIN_PAGINATION_BATCH_LENGTH, +} from './getPagination.constants'; interface GetPaginationType { currentPage: number; @@ -10,7 +14,8 @@ interface GetPaginationType { } export const getPagination = ({ currentPage, totalPages }: GetPaginationType): string[] => { - const trimBatch = (batch: number[], comparableBatch: number[]) => (batch.includes(currentPage) ? batch : batch.slice(0, MAX_PAGINATION_SLOTS - comparableBatch.length - 1)); + const trimBatch = (batch: number[], comparableBatch: number[]) => + batch.includes(currentPage) ? batch : batch.slice(0, MAX_PAGINATION_SLOTS - comparableBatch.length - 1); const previousPage = currentPage - 1; const nextPage = currentPage + 1; @@ -22,7 +27,9 @@ export const getPagination = ({ currentPage, totalPages }: GetPaginationType): s const isLeftBatchInRange = inRange(nextPage - 1, MIN_PAGINATION_BATCH_LENGTH, MAX_PAGINATION_BATCH_LENGTH); const isRightBatchInRange = inRange(previousPage + 1, totalPages - MIN_PAGINATION_BATCH_LENGTH, totalPages - 1); const leftBatch = isLeftBatchInRange ? range(1, nextPage + 1) : range(1, MAX_PAGINATION_BATCH_LENGTH - 1); - const rightBatch = isRightBatchInRange ? range(previousPage, totalPages + 1) : range(totalPages - MIN_PAGINATION_BATCH_LENGTH + 1, totalPages + 1); + const rightBatch = isRightBatchInRange + ? range(previousPage, totalPages + 1) + : range(totalPages - MIN_PAGINATION_BATCH_LENGTH + 1, totalPages + 1); const trimmedLeftBatch = trimBatch(leftBatch, rightBatch); const trimmedRightBatch = trimBatch(rightBatch.reverse(), leftBatch); diff --git a/src/components/visual/transaction-list-item/transaction-list-item.scss b/src/components/visual/transaction-list-item/transaction-list-item.scss index 47066553..afde8f5a 100644 --- a/src/components/visual/transaction-list-item/transaction-list-item.scss +++ b/src/components/visual/transaction-list-item/transaction-list-item.scss @@ -1,6 +1,6 @@ .transaction-item { @apply mvx:flex mvx:items-center mvx:py-5 mvx:px-3 mvx:gap-3 mvx:rounded-lg; - @apply mvx:transition-all mvx:duration-200 mvx:ease-in-out ; + @apply mvx:transition-all mvx:duration-200 mvx:ease-in-out; background-color: var(--mvx-bg-color-secondary); &:hover { @@ -53,7 +53,7 @@ color: var(--mvx-text-color-tertiary); &.truncate { - @apply mvx:truncate mvx:max-w-30 mvx:shrink-0; + @apply mvx:truncate mvx:max-w-30 mvx:shrink-0; } @media (min-width: 375px) { diff --git a/src/components/visual/transaction-list-item/transaction-list-item.tsx b/src/components/visual/transaction-list-item/transaction-list-item.tsx index c59443e8..5a61ba89 100644 --- a/src/components/visual/transaction-list-item/transaction-list-item.tsx +++ b/src/components/visual/transaction-list-item/transaction-list-item.tsx @@ -2,11 +2,11 @@ import { Component, h, Prop } from '@stencil/core'; import classNames from 'classnames'; import { FormatAmount } from 'common/FormatAmount/FormatAmount'; import { IconSizeEnumType, TransactionAssetIcon } from 'common/TransactionAssetIcon/TransactionAssetIcon'; +import { Trim } from 'common/Trim/Trim'; import { getAmountParts } from 'components/functional/toasts-list/helpers'; import { getIsTransactionFailed } from 'utils/getTransactionStatus'; import type { ITransactionListItem } from './transaction-list-item.types'; -import { Trim } from 'common/Trim/Trim'; @Component({ tag: 'mvx-transaction-list-item', diff --git a/src/constants/transactionStatus.enum.ts b/src/constants/transactionStatus.enum.ts index 6928f07c..bd3da331 100644 --- a/src/constants/transactionStatus.enum.ts +++ b/src/constants/transactionStatus.enum.ts @@ -1,9 +1,9 @@ export enum TransactionStatusEnum { - success = 'success', - pending = 'pending', - fail = 'fail', - invalid = 'invalid', - executed = 'executed', - notExecuted = 'not executed', - rewardReverted = 'reward-reverted' -} \ No newline at end of file + success = 'success', + pending = 'pending', + fail = 'fail', + invalid = 'invalid', + executed = 'executed', + notExecuted = 'not executed', + rewardReverted = 'reward-reverted', +} diff --git a/src/global/tailwind.css b/src/global/tailwind.css index 4c645dd3..32f57f8f 100644 --- a/src/global/tailwind.css +++ b/src/global/tailwind.css @@ -107,4 +107,4 @@ .mvx\:animate-spinner { animation: SpinnerAnimation 3000ms linear infinite; } -} \ No newline at end of file +} diff --git a/src/setupTests.ts b/src/setupTests.ts index c38a55a6..b3ad4fab 100644 --- a/src/setupTests.ts +++ b/src/setupTests.ts @@ -1,7 +1,7 @@ Object.assign(global, { - ResizeObserver: class ResizeObserver { - observe() { } - disconnect() { } - unobserve() { } - } + ResizeObserver: class ResizeObserver { + observe() {} + disconnect() {} + unobserve() {} + }, }); diff --git a/src/utils/getTransactionStatus.ts b/src/utils/getTransactionStatus.ts index 3a2a3186..a7107ab6 100644 --- a/src/utils/getTransactionStatus.ts +++ b/src/utils/getTransactionStatus.ts @@ -1,7 +1,5 @@ import { TransactionStatusEnum } from 'constants/transactionStatus.enum'; export function getIsTransactionFailed(status: `${TransactionStatusEnum}`) { - return ( - status === TransactionStatusEnum.fail || status === TransactionStatusEnum.invalid - ); -} \ No newline at end of file + return status === TransactionStatusEnum.fail || status === TransactionStatusEnum.invalid; +} From d8cd247b62f0c80eed4754f6b51babc27a2aa1e1 Mon Sep 17 00:00:00 2001 From: Gavrila Andrei Date: Thu, 27 Nov 2025 15:46:25 +0200 Subject: [PATCH 03/10] Added minimize/maximize toasts (#272) * Added min/max toasts * Update changelog * Replace icon --- CHANGELOG.md | 1 + src/common/Icon/Icon.tsx | 8 + .../components/MaximizeIcon/MaximizeIcon.tsx | 18 + .../Icon/components/MaximizeIcon/index.ts | 1 + .../components/MinimizeIcon/MinimizeIcon.tsx | 27 + .../Icon/components/MinimizeIcon/index.ts | 1 + src/common/Icon/icon.types.ts | 2 + src/components.d.ts | 3619 +++++++---------- .../functional/toasts-list/toast-list.scss | 5 +- .../functional/toasts-list/toast-list.tsx | 38 +- 10 files changed, 1615 insertions(+), 2105 deletions(-) create mode 100644 src/common/Icon/components/MaximizeIcon/MaximizeIcon.tsx create mode 100644 src/common/Icon/components/MaximizeIcon/index.ts create mode 100644 src/common/Icon/components/MinimizeIcon/MinimizeIcon.tsx create mode 100644 src/common/Icon/components/MinimizeIcon/index.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index acb5b117..1aabfb4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- [Added minimize/maximize action for toasts](https://github.com/multiversx/mx-sdk-dapp-ui/pull/272) - [Eslint and prettierrc fixes](https://github.com/multiversx/mx-sdk-dapp-ui/pull/270) - [Refactored sign transactions panel internal components](https://github.com/multiversx/mx-sdk-dapp-ui/pull/267) diff --git a/src/common/Icon/Icon.tsx b/src/common/Icon/Icon.tsx index 8ad6fc62..7d595203 100644 --- a/src/common/Icon/Icon.tsx +++ b/src/common/Icon/Icon.tsx @@ -23,6 +23,8 @@ import { CopyIcon } from './components/CopyIcon'; import { HourglassIcon } from './components/HourglassIcon'; import { LayersIcon } from './components/LayersIcon'; import { LockIcon } from './components/LockIcon'; +import { MaximizeIcon } from './components/MaximizeIcon'; +import { MinimizeIcon } from './components/MinimizeIcon'; import { PencilIcon } from './components/PencilIcon'; import { SpinnerIcon } from './components/SpinnerIcon'; import { TriangularWarningIcon } from './components/TriangularWarningIcon'; @@ -112,6 +114,12 @@ export const Icon = ({ name, ...properties }: IconPropsType) => { case 'arrow-right': return ; + case 'minimize': + return ; + + case 'maximize': + return ; + default: console.error(`No data for the ${name} icon.`); return null; diff --git a/src/common/Icon/components/MaximizeIcon/MaximizeIcon.tsx b/src/common/Icon/components/MaximizeIcon/MaximizeIcon.tsx new file mode 100644 index 00000000..380aa03c --- /dev/null +++ b/src/common/Icon/components/MaximizeIcon/MaximizeIcon.tsx @@ -0,0 +1,18 @@ +import { h } from '@stencil/core'; + +const styles = { + maximizeIcon: 'mvx:text-inherit', +} satisfies Record; + +export const MaximizeIcon = ({ class: className }: { class?: string }) => ( + + + +); diff --git a/src/common/Icon/components/MaximizeIcon/index.ts b/src/common/Icon/components/MaximizeIcon/index.ts new file mode 100644 index 00000000..e030766d --- /dev/null +++ b/src/common/Icon/components/MaximizeIcon/index.ts @@ -0,0 +1 @@ +export * from './MaximizeIcon'; diff --git a/src/common/Icon/components/MinimizeIcon/MinimizeIcon.tsx b/src/common/Icon/components/MinimizeIcon/MinimizeIcon.tsx new file mode 100644 index 00000000..4ecb9fdf --- /dev/null +++ b/src/common/Icon/components/MinimizeIcon/MinimizeIcon.tsx @@ -0,0 +1,27 @@ +import { h } from '@stencil/core'; + +const styles = { + minimizeIcon: 'mvx:text-inherit', +} satisfies Record; + +export const MinimizeIcon = ({ class: className }: { class?: string }) => ( + + + +); diff --git a/src/common/Icon/components/MinimizeIcon/index.ts b/src/common/Icon/components/MinimizeIcon/index.ts new file mode 100644 index 00000000..96e70913 --- /dev/null +++ b/src/common/Icon/components/MinimizeIcon/index.ts @@ -0,0 +1 @@ +export * from './MinimizeIcon'; diff --git a/src/common/Icon/icon.types.ts b/src/common/Icon/icon.types.ts index cdd2c90d..9fad0756 100644 --- a/src/common/Icon/icon.types.ts +++ b/src/common/Icon/icon.types.ts @@ -27,6 +27,8 @@ export enum IconNamesEnum { arrowsRotate = 'arrows-rotate', spinner = 'spinner', arrowRight = 'arrow-right', + minimize = 'minimize', + maximize = 'maximize', } export type IconPropsType = JSXBase.IntrinsicElements['svg'] & { diff --git a/src/components.d.ts b/src/components.d.ts index 0ee1b82e..a9d86ead 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -4,2137 +4,1564 @@ * This is an autogenerated file created by the Stencil compiler. * It contains typing information for all components that exist in this project. */ -import { HTMLStencilElement, JSXBase } from '@stencil/core/internal'; -import { IAddressTableData } from './types/address-table.types'; -import { ButtonSizeEnum, ButtonVariantEnum } from './common/Button/button.types'; -import { - CustomToastType, - IComponentToast, - ISimpleToast, -} from './components/functional/toasts-list/components/transaction-toast/transaction-toast.type'; -import { - IConfirmScreenData, - IConnectScreenData, - ILedgerConnectPanelData, -} from './components/functional/ledger-connect/ledger-connect.types'; -import { IEventBus } from './utils/EventBus'; -import { ITransactionListItem } from './components/visual/transaction-list-item/transaction-list-item.types'; -import { LocalJSX as JSX } from '@stencil/core'; -import { ITransactionListItem as ITransactionListItem1 } from './components/visual/transaction-list-item/transaction-list-item.types'; -import { - IToastDataState, - ITransactionProgressState, -} from './components/functional/toasts-list/components/transaction-toast/transaction-toast.type'; -import { TransactionStatusEnum } from './constants/transactionStatus.enum'; -import { TransactionRowType } from './components/controlled/transactions-table/transactions-table.type'; -import { IProviderBase } from './types/provider.types'; -import { IEventBus as IEventBus1, unknown as IWalletConnectPanelData } from './components.d'; -export { IAddressTableData } from './types/address-table.types'; -export { ButtonSizeEnum, ButtonVariantEnum } from './common/Button/button.types'; -export { - CustomToastType, - IComponentToast, - ISimpleToast, -} from './components/functional/toasts-list/components/transaction-toast/transaction-toast.type'; -export { - IConfirmScreenData, - IConnectScreenData, - ILedgerConnectPanelData, -} from './components/functional/ledger-connect/ledger-connect.types'; -export { IEventBus } from './utils/EventBus'; -export { ITransactionListItem } from './components/visual/transaction-list-item/transaction-list-item.types'; -export { LocalJSX as JSX } from '@stencil/core'; -export { ITransactionListItem as ITransactionListItem1 } from './components/visual/transaction-list-item/transaction-list-item.types'; -export { - IToastDataState, - ITransactionProgressState, -} from './components/functional/toasts-list/components/transaction-toast/transaction-toast.type'; -export { TransactionStatusEnum } from './constants/transactionStatus.enum'; -export { TransactionRowType } from './components/controlled/transactions-table/transactions-table.type'; -export { IProviderBase } from './types/provider.types'; -export { IEventBus as IEventBus1, unknown as IWalletConnectPanelData } from './components.d'; +import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; +import { IAddressTableData } from "./types/address-table.types"; +import { ButtonSizeEnum, ButtonVariantEnum } from "./common/Button/button.types"; +import { CustomToastType, IComponentToast, ISimpleToast } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; +import { IConfirmScreenData, IConnectScreenData, ILedgerConnectPanelData } from "./components/functional/ledger-connect/ledger-connect.types"; +import { IEventBus } from "./utils/EventBus"; +import { ITransactionListItem } from "./components/visual/transaction-list-item/transaction-list-item.types"; +import { LocalJSX as JSX } from "@stencil/core"; +import { ITransactionListItem as ITransactionListItem1 } from "./components/visual/transaction-list-item/transaction-list-item.types"; +import { IToastDataState, ITransactionProgressState } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; +import { TransactionStatusEnum } from "./constants/transactionStatus.enum"; +import { TransactionRowType } from "./components/controlled/transactions-table/transactions-table.type"; +import { IProviderBase } from "./types/provider.types"; +import { IEventBus as IEventBus1, unknown as IWalletConnectPanelData } from "./components.d"; +export { IAddressTableData } from "./types/address-table.types"; +export { ButtonSizeEnum, ButtonVariantEnum } from "./common/Button/button.types"; +export { CustomToastType, IComponentToast, ISimpleToast } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; +export { IConfirmScreenData, IConnectScreenData, ILedgerConnectPanelData } from "./components/functional/ledger-connect/ledger-connect.types"; +export { IEventBus } from "./utils/EventBus"; +export { ITransactionListItem } from "./components/visual/transaction-list-item/transaction-list-item.types"; +export { LocalJSX as JSX } from "@stencil/core"; +export { ITransactionListItem as ITransactionListItem1 } from "./components/visual/transaction-list-item/transaction-list-item.types"; +export { IToastDataState, ITransactionProgressState } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; +export { TransactionStatusEnum } from "./constants/transactionStatus.enum"; +export { TransactionRowType } from "./components/controlled/transactions-table/transactions-table.type"; +export { IProviderBase } from "./types/provider.types"; +export { IEventBus as IEventBus1, unknown as IWalletConnectPanelData } from "./components.d"; export namespace Components { - interface MvxAddressTable { - accountScreenData: IAddressTableData; - selectedIndex: number; - } - interface MvxArcExtensionProviderIcon { - class?: string; - height?: number; - width?: number; - } - interface MvxArrowRightIcon { - class?: string; - } - interface MvxBraveExtensionProviderIcon { - class?: string; - height?: number; - width?: number; - } - interface MvxButton { - /** - * @default '' - */ - class?: string; - /** - * @default '' - */ - dataTestId?: string; - /** - * @default false - */ - disabled?: boolean; - /** - * @default 'large' - */ - size?: `${ButtonSizeEnum}`; - /** - * @default 'primary' - */ - variant?: `${ButtonVariantEnum}`; - } - interface MvxCircleInfoIcon { - class?: string; - } - interface MvxCopyButton { - class?: string; - iconClass?: string; - text: string; - } - interface MvxCustomToast { - toast: IComponentToast; - } - interface MvxDataWithExplorerLink { - class?: string; - data: string; - dataTestId?: string; - explorerLink: string; - /** - * @default true - */ - showCopyButton?: boolean; - /** - * @default true - */ - showExplorerButton?: boolean; - /** - * @default false - */ - withTooltip?: boolean; - } - interface MvxDefaultTransactionIconLarge { - class?: string; - } - interface MvxDefaultTransactionIconSmall { - class?: string; - } - interface MvxEdgeExtensionProviderIcon { - class?: string; - height?: number; - width?: number; - } - interface MvxExplorerLink { - class?: string; - dataTestId?: string; - iconClass?: string; - link: string; - } - interface MvxExtensionProviderIcon { - class?: string; - height?: number; - width?: number; - } - interface MvxFirefoxExtensionProviderIcon { - class?: string; - height?: number; - width?: number; - } - interface MvxFormatAmount { - class?: string; - dataTestId?: string; - decimalClass?: string; - isValid: boolean; - label?: string; - labelClass?: string; - /** - * @default true - */ - showLabel?: boolean; - valueDecimal: string; - valueInteger: string; - } - interface MvxGenericToast { - toast: CustomToastType; - } - interface MvxLedgerConfirm { - confirmScreenData: IConfirmScreenData; - } - interface MvxLedgerConnect { - /** - * @default { accountScreenData: null, confirmScreenData: null, connectScreenData: {}, } - */ - data: ILedgerConnectPanelData; - getEventBus: () => Promise; - } - interface MvxLedgerIcon { - class?: string; - } - interface MvxLedgerIntro { - connectScreenData?: IConnectScreenData; - /** - * @default false - */ - isAwaiting?: boolean; - } - interface MvxLedgerProviderIcon { - class?: string; - } - interface MvxMagnifyingGlassIcon { - class?: string; - } - interface MvxMetamaskProviderIcon { - class?: string; - } - interface MvxMultiversxLogoIcon { - class?: string; - } - interface MvxMultiversxSymbolIcon { - class?: string; - } - interface MvxNotificationsFeed { - closeWithAnimation: () => Promise; - getEventBus: () => Promise; - } - interface MvxPagination { - class?: string; - /** - * @default 1 - */ - currentPage: number; - /** - * @default false - */ - isDisabled?: boolean; - totalPages: number; - } - interface MvxPaginationEllipsis { - /** - * @default false - */ - isActive: boolean; - } - interface MvxPaginationEllipsisForm { - /** - * @default false - */ - isVisible: boolean; - maxPageToSearchFor: number; - } - interface MvxPasskeyProviderIcon { - class?: string; - } - interface MvxPendingTransactionsPanel { - closeWithAnimation: () => Promise; - getEventBus: () => Promise; - } - interface MvxPreloader { - class?: string; - } - interface MvxSidePanel { - hasBackButton?: boolean; - /** - * @default false - */ - isOpen: boolean; - panelClassName?: string; - panelTitle: string; - /** - * @default true - */ - showHeader?: boolean; - } - interface MvxSidePanelHeader { - /** - * @default true - */ - hasLeftButton?: boolean; - /** - * @default true - */ - hasRightButton?: boolean; - panelClassName?: string; - panelTitle: string; - } - interface MvxSidePanelSwiper { - close: () => Promise; - /** - * @default false - */ - open: boolean; - openToSnapPoint: (snapIndex?: number) => Promise; - /** - * @default '' - */ - sidePanelIdentifier: string; - } - interface MvxSignTransactionsPanel { - closeWithAnimation: () => Promise; - getEventBus: () => Promise; - } - interface MvxSimpleToast { - toast: ISimpleToast; - } - interface MvxSpinnerIcon { - class?: string; - } - interface MvxToastList { - getEventBus: () => Promise; - } - interface MvxTooltip { - class?: string; - /** - * @default 'top' - */ - position: 'top' | 'bottom'; - trigger: HTMLElement; - /** - * @default false - */ - triggerOnClick?: boolean; - } - interface MvxTransactionListItem { - transaction: ITransactionListItem; - } - interface MvxTransactionToast { - fullWidth?: boolean; - /** - * @default '' - */ - processedTransactionsStatus: string | JSX.Element; - toastDataState: IToastDataState; - /** - * @default '' - */ - toastId: string; - transactionProgressState?: ITransactionProgressState; - /** - * @default [] - */ - transactions: ITransactionListItem[]; - wrapperClass: string; - } - interface MvxTransactionToastContent { - fullWidth?: boolean; - processedTransactionsStatus?: string | JSX.Element; - toastDataState: IToastDataState; - transactions: ITransactionListItem[]; - } - interface MvxTransactionToastDetails { - /** - * @default 5 - */ - maxShownTransactions: number; - processedTransactionsStatus?: string | JSX.Element; - transactionClass: string; - transactions?: ITransactionListItem[]; - } - interface MvxTransactionToastDetailsBody { - hash: string; - index: string; - link: string; - status?: `${TransactionStatusEnum}`; - /** - * @default 'transaction-details-list-item' - */ - transactionClass?: string; - } - interface MvxTransactionToastProgress { - endTime?: number; - isStatusPending?: boolean; - startTime?: number; - toastId?: string; - } - interface MvxTransactionsTable { - class?: string; - transactions: TransactionRowType[]; - } - interface MvxTrim { - class?: string; - /** - * @default DataTestIdsEnum.trim - */ - dataTestId?: string; - text: string; - } - interface MvxUnlockButton { - class?: string; - dataTestId?: string; - icon?: HTMLElement; - iconUrl: string; - label: string; - type?: IProviderBase['type']; - } - interface MvxUnlockPanel { - closeWithAnimation: () => Promise; - getEventBus: () => Promise; - } - interface MvxWalletConnect { - /** - * @default { wcURI: '' } - */ - data: IWalletConnectPanelData; - getEventBus: () => Promise; - /** - * @default '' - */ - qrCodeSvg: string; - } - interface MvxWalletConnectAppGalleryIcon { - class?: string; - } - interface MvxWalletConnectAppStoreIcon { - class?: string; - } - interface MvxWalletConnectDownload { - class?: string; - } - interface MvxWalletConnectGooglePlayIcon { - class?: string; - } - interface MvxWalletConnectScan { - class?: string; - /** - * @default '' - */ - qrCodeSvg: string; - /** - * @default '' - */ - walletConnectDeepLink?: string; - } - interface MvxWalletProviderIcon { - class?: string; - } - interface MvxXportalDownloadQrIcon { - /** - * @default '' - */ - class?: string; - } - interface MvxXportalQrCodePreloader { - class?: string; - } + interface MvxAddressTable { + "accountScreenData": IAddressTableData; + "selectedIndex": number; + } + interface MvxArcExtensionProviderIcon { + "class"?: string; + "height"?: number; + "width"?: number; + } + interface MvxArrowRightIcon { + "class"?: string; + } + interface MvxBraveExtensionProviderIcon { + "class"?: string; + "height"?: number; + "width"?: number; + } + interface MvxButton { + /** + * @default '' + */ + "class"?: string; + /** + * @default '' + */ + "dataTestId"?: string; + /** + * @default false + */ + "disabled"?: boolean; + /** + * @default 'large' + */ + "size"?: `${ButtonSizeEnum}`; + /** + * @default 'primary' + */ + "variant"?: `${ButtonVariantEnum}`; + } + interface MvxCircleInfoIcon { + "class"?: string; + } + interface MvxCopyButton { + "class"?: string; + "iconClass"?: string; + "text": string; + } + interface MvxCustomToast { + "toast": IComponentToast; + } + interface MvxDataWithExplorerLink { + "class"?: string; + "data": string; + "dataTestId"?: string; + "explorerLink": string; + /** + * @default true + */ + "showCopyButton"?: boolean; + /** + * @default true + */ + "showExplorerButton"?: boolean; + /** + * @default false + */ + "withTooltip"?: boolean; + } + interface MvxDefaultTransactionIconLarge { + "class"?: string; + } + interface MvxDefaultTransactionIconSmall { + "class"?: string; + } + interface MvxEdgeExtensionProviderIcon { + "class"?: string; + "height"?: number; + "width"?: number; + } + interface MvxExplorerLink { + "class"?: string; + "dataTestId"?: string; + "iconClass"?: string; + "link": string; + } + interface MvxExtensionProviderIcon { + "class"?: string; + "height"?: number; + "width"?: number; + } + interface MvxFirefoxExtensionProviderIcon { + "class"?: string; + "height"?: number; + "width"?: number; + } + interface MvxFormatAmount { + "class"?: string; + "dataTestId"?: string; + "decimalClass"?: string; + "isValid": boolean; + "label"?: string; + "labelClass"?: string; + /** + * @default true + */ + "showLabel"?: boolean; + "valueDecimal": string; + "valueInteger": string; + } + interface MvxGenericToast { + "toast": CustomToastType; + } + interface MvxLedgerConfirm { + "confirmScreenData": IConfirmScreenData; + } + interface MvxLedgerConnect { + /** + * @default { accountScreenData: null, confirmScreenData: null, connectScreenData: {}, } + */ + "data": ILedgerConnectPanelData; + "getEventBus": () => Promise; + } + interface MvxLedgerIcon { + "class"?: string; + } + interface MvxLedgerIntro { + "connectScreenData"?: IConnectScreenData; + /** + * @default false + */ + "isAwaiting"?: boolean; + } + interface MvxLedgerProviderIcon { + "class"?: string; + } + interface MvxMagnifyingGlassIcon { + "class"?: string; + } + interface MvxMetamaskProviderIcon { + "class"?: string; + } + interface MvxMultiversxLogoIcon { + "class"?: string; + } + interface MvxMultiversxSymbolIcon { + "class"?: string; + } + interface MvxNotificationsFeed { + "closeWithAnimation": () => Promise; + "getEventBus": () => Promise; + } + interface MvxPagination { + "class"?: string; + /** + * @default 1 + */ + "currentPage": number; + /** + * @default false + */ + "isDisabled"?: boolean; + "totalPages": number; + } + interface MvxPaginationEllipsis { + /** + * @default false + */ + "isActive": boolean; + } + interface MvxPaginationEllipsisForm { + /** + * @default false + */ + "isVisible": boolean; + "maxPageToSearchFor": number; + } + interface MvxPasskeyProviderIcon { + "class"?: string; + } + interface MvxPendingTransactionsPanel { + "closeWithAnimation": () => Promise; + "getEventBus": () => Promise; + } + interface MvxPreloader { + "class"?: string; + } + interface MvxSidePanel { + "hasBackButton"?: boolean; + /** + * @default false + */ + "isOpen": boolean; + "panelClassName"?: string; + "panelTitle": string; + /** + * @default true + */ + "showHeader"?: boolean; + } + interface MvxSidePanelHeader { + /** + * @default true + */ + "hasLeftButton"?: boolean; + /** + * @default true + */ + "hasRightButton"?: boolean; + "panelClassName"?: string; + "panelTitle": string; + } + interface MvxSidePanelSwiper { + "close": () => Promise; + /** + * @default false + */ + "open": boolean; + "openToSnapPoint": (snapIndex?: number) => Promise; + /** + * @default '' + */ + "sidePanelIdentifier": string; + } + interface MvxSignTransactionsPanel { + "closeWithAnimation": () => Promise; + "getEventBus": () => Promise; + } + interface MvxSimpleToast { + "toast": ISimpleToast; + } + interface MvxSpinnerIcon { + "class"?: string; + } + interface MvxToastList { + "getEventBus": () => Promise; + } + interface MvxTooltip { + "class"?: string; + /** + * @default 'top' + */ + "position": 'top' | 'bottom'; + "trigger": HTMLElement; + /** + * @default false + */ + "triggerOnClick"?: boolean; + } + interface MvxTransactionListItem { + "transaction": ITransactionListItem; + } + interface MvxTransactionToast { + "fullWidth"?: boolean; + /** + * @default '' + */ + "processedTransactionsStatus": string | JSX.Element; + "toastDataState": IToastDataState; + /** + * @default '' + */ + "toastId": string; + "transactionProgressState"?: ITransactionProgressState; + /** + * @default [] + */ + "transactions": ITransactionListItem[]; + "wrapperClass": string; + } + interface MvxTransactionToastContent { + "fullWidth"?: boolean; + "processedTransactionsStatus"?: string | JSX.Element; + "toastDataState": IToastDataState; + "transactions": ITransactionListItem[]; + } + interface MvxTransactionToastDetails { + /** + * @default 5 + */ + "maxShownTransactions": number; + "processedTransactionsStatus"?: string | JSX.Element; + "transactionClass": string; + "transactions"?: ITransactionListItem[]; + } + interface MvxTransactionToastDetailsBody { + "hash": string; + "index": string; + "link": string; + "status"?: `${TransactionStatusEnum}`; + /** + * @default 'transaction-details-list-item' + */ + "transactionClass"?: string; + } + interface MvxTransactionToastProgress { + "endTime"?: number; + "isStatusPending"?: boolean; + "startTime"?: number; + "toastId"?: string; + } + interface MvxTransactionsTable { + "class"?: string; + "transactions": TransactionRowType[]; + } + interface MvxTrim { + "class"?: string; + /** + * @default DataTestIdsEnum.trim + */ + "dataTestId"?: string; + "text": string; + } + interface MvxUnlockButton { + "class"?: string; + "dataTestId"?: string; + "icon"?: HTMLElement; + "iconUrl": string; + "label": string; + "type"?: IProviderBase['type']; + } + interface MvxUnlockPanel { + "closeWithAnimation": () => Promise; + "getEventBus": () => Promise; + } + interface MvxWalletConnect { + /** + * @default { wcURI: '' } + */ + "data": IWalletConnectPanelData; + "getEventBus": () => Promise; + /** + * @default '' + */ + "qrCodeSvg": string; + } + interface MvxWalletConnectAppGalleryIcon { + "class"?: string; + } + interface MvxWalletConnectAppStoreIcon { + "class"?: string; + } + interface MvxWalletConnectDownload { + "class"?: string; + } + interface MvxWalletConnectGooglePlayIcon { + "class"?: string; + } + interface MvxWalletConnectScan { + "class"?: string; + /** + * @default '' + */ + "qrCodeSvg": string; + /** + * @default '' + */ + "walletConnectDeepLink"?: string; + } + interface MvxWalletProviderIcon { + "class"?: string; + } + interface MvxXportalDownloadQrIcon { + /** + * @default '' + */ + "class"?: string; + } + interface MvxXportalQrCodePreloader { + "class"?: string; + } } export interface MvxAddressTableCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxAddressTableElement; + detail: T; + target: HTMLMvxAddressTableElement; } export interface MvxButtonCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxButtonElement; + detail: T; + target: HTMLMvxButtonElement; } export interface MvxCustomToastCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxCustomToastElement; + detail: T; + target: HTMLMvxCustomToastElement; } export interface MvxGenericToastCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxGenericToastElement; + detail: T; + target: HTMLMvxGenericToastElement; } export interface MvxLedgerIntroCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxLedgerIntroElement; + detail: T; + target: HTMLMvxLedgerIntroElement; } export interface MvxPaginationCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxPaginationElement; + detail: T; + target: HTMLMvxPaginationElement; } export interface MvxPaginationEllipsisFormCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxPaginationEllipsisFormElement; + detail: T; + target: HTMLMvxPaginationEllipsisFormElement; } export interface MvxSidePanelCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxSidePanelElement; + detail: T; + target: HTMLMvxSidePanelElement; } export interface MvxSidePanelHeaderCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxSidePanelHeaderElement; + detail: T; + target: HTMLMvxSidePanelHeaderElement; } export interface MvxSidePanelSwiperCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxSidePanelSwiperElement; + detail: T; + target: HTMLMvxSidePanelSwiperElement; } export interface MvxSimpleToastCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxSimpleToastElement; + detail: T; + target: HTMLMvxSimpleToastElement; } export interface MvxTooltipCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxTooltipElement; + detail: T; + target: HTMLMvxTooltipElement; } export interface MvxTransactionToastCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxTransactionToastElement; + detail: T; + target: HTMLMvxTransactionToastElement; } export interface MvxTransactionToastContentCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxTransactionToastContentElement; + detail: T; + target: HTMLMvxTransactionToastContentElement; } export interface MvxWalletConnectScanCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxWalletConnectScanElement; + detail: T; + target: HTMLMvxWalletConnectScanElement; } declare global { - interface HTMLMvxAddressTableElementEventMap { - accessWallet: any; - selectAccount: any; - pageChange: number; - } - interface HTMLMvxAddressTableElement extends Components.MvxAddressTable, HTMLStencilElement { - addEventListener( - type: K, - listener: ( - this: HTMLMvxAddressTableElement, - ev: MvxAddressTableCustomEvent, - ) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: ( - this: HTMLMvxAddressTableElement, - ev: MvxAddressTableCustomEvent, - ) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxAddressTableElement: { - prototype: HTMLMvxAddressTableElement; - new (): HTMLMvxAddressTableElement; - }; - interface HTMLMvxArcExtensionProviderIconElement extends Components.MvxArcExtensionProviderIcon, HTMLStencilElement {} - var HTMLMvxArcExtensionProviderIconElement: { - prototype: HTMLMvxArcExtensionProviderIconElement; - new (): HTMLMvxArcExtensionProviderIconElement; - }; - interface HTMLMvxArrowRightIconElement extends Components.MvxArrowRightIcon, HTMLStencilElement {} - var HTMLMvxArrowRightIconElement: { - prototype: HTMLMvxArrowRightIconElement; - new (): HTMLMvxArrowRightIconElement; - }; - interface HTMLMvxBraveExtensionProviderIconElement - extends Components.MvxBraveExtensionProviderIcon, - HTMLStencilElement {} - var HTMLMvxBraveExtensionProviderIconElement: { - prototype: HTMLMvxBraveExtensionProviderIconElement; - new (): HTMLMvxBraveExtensionProviderIconElement; - }; - interface HTMLMvxButtonElementEventMap { - buttonClick: MouseEvent; - } - interface HTMLMvxButtonElement extends Components.MvxButton, HTMLStencilElement { - addEventListener( - type: K, - listener: (this: HTMLMvxButtonElement, ev: MvxButtonCustomEvent) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLMvxButtonElement, ev: MvxButtonCustomEvent) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxButtonElement: { - prototype: HTMLMvxButtonElement; - new (): HTMLMvxButtonElement; - }; - interface HTMLMvxCircleInfoIconElement extends Components.MvxCircleInfoIcon, HTMLStencilElement {} - var HTMLMvxCircleInfoIconElement: { - prototype: HTMLMvxCircleInfoIconElement; - new (): HTMLMvxCircleInfoIconElement; - }; - interface HTMLMvxCopyButtonElement extends Components.MvxCopyButton, HTMLStencilElement {} - var HTMLMvxCopyButtonElement: { - prototype: HTMLMvxCopyButtonElement; - new (): HTMLMvxCopyButtonElement; - }; - interface HTMLMvxCustomToastElementEventMap { - deleteToast: string; - } - interface HTMLMvxCustomToastElement extends Components.MvxCustomToast, HTMLStencilElement { - addEventListener( - type: K, - listener: ( - this: HTMLMvxCustomToastElement, - ev: MvxCustomToastCustomEvent, - ) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: ( - this: HTMLMvxCustomToastElement, - ev: MvxCustomToastCustomEvent, - ) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxCustomToastElement: { - prototype: HTMLMvxCustomToastElement; - new (): HTMLMvxCustomToastElement; - }; - interface HTMLMvxDataWithExplorerLinkElement extends Components.MvxDataWithExplorerLink, HTMLStencilElement {} - var HTMLMvxDataWithExplorerLinkElement: { - prototype: HTMLMvxDataWithExplorerLinkElement; - new (): HTMLMvxDataWithExplorerLinkElement; - }; - interface HTMLMvxDefaultTransactionIconLargeElement - extends Components.MvxDefaultTransactionIconLarge, - HTMLStencilElement {} - var HTMLMvxDefaultTransactionIconLargeElement: { - prototype: HTMLMvxDefaultTransactionIconLargeElement; - new (): HTMLMvxDefaultTransactionIconLargeElement; - }; - interface HTMLMvxDefaultTransactionIconSmallElement - extends Components.MvxDefaultTransactionIconSmall, - HTMLStencilElement {} - var HTMLMvxDefaultTransactionIconSmallElement: { - prototype: HTMLMvxDefaultTransactionIconSmallElement; - new (): HTMLMvxDefaultTransactionIconSmallElement; - }; - interface HTMLMvxEdgeExtensionProviderIconElement - extends Components.MvxEdgeExtensionProviderIcon, - HTMLStencilElement {} - var HTMLMvxEdgeExtensionProviderIconElement: { - prototype: HTMLMvxEdgeExtensionProviderIconElement; - new (): HTMLMvxEdgeExtensionProviderIconElement; - }; - interface HTMLMvxExplorerLinkElement extends Components.MvxExplorerLink, HTMLStencilElement {} - var HTMLMvxExplorerLinkElement: { - prototype: HTMLMvxExplorerLinkElement; - new (): HTMLMvxExplorerLinkElement; - }; - interface HTMLMvxExtensionProviderIconElement extends Components.MvxExtensionProviderIcon, HTMLStencilElement {} - var HTMLMvxExtensionProviderIconElement: { - prototype: HTMLMvxExtensionProviderIconElement; - new (): HTMLMvxExtensionProviderIconElement; - }; - interface HTMLMvxFirefoxExtensionProviderIconElement - extends Components.MvxFirefoxExtensionProviderIcon, - HTMLStencilElement {} - var HTMLMvxFirefoxExtensionProviderIconElement: { - prototype: HTMLMvxFirefoxExtensionProviderIconElement; - new (): HTMLMvxFirefoxExtensionProviderIconElement; - }; - interface HTMLMvxFormatAmountElement extends Components.MvxFormatAmount, HTMLStencilElement {} - var HTMLMvxFormatAmountElement: { - prototype: HTMLMvxFormatAmountElement; - new (): HTMLMvxFormatAmountElement; - }; - interface HTMLMvxGenericToastElementEventMap { - deleteToast: string; - } - interface HTMLMvxGenericToastElement extends Components.MvxGenericToast, HTMLStencilElement { - addEventListener( - type: K, - listener: ( - this: HTMLMvxGenericToastElement, - ev: MvxGenericToastCustomEvent, - ) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: ( - this: HTMLMvxGenericToastElement, - ev: MvxGenericToastCustomEvent, - ) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxGenericToastElement: { - prototype: HTMLMvxGenericToastElement; - new (): HTMLMvxGenericToastElement; - }; - interface HTMLMvxLedgerConfirmElement extends Components.MvxLedgerConfirm, HTMLStencilElement {} - var HTMLMvxLedgerConfirmElement: { - prototype: HTMLMvxLedgerConfirmElement; - new (): HTMLMvxLedgerConfirmElement; - }; - interface HTMLMvxLedgerConnectElement extends Components.MvxLedgerConnect, HTMLStencilElement {} - var HTMLMvxLedgerConnectElement: { - prototype: HTMLMvxLedgerConnectElement; - new (): HTMLMvxLedgerConnectElement; - }; - interface HTMLMvxLedgerIconElement extends Components.MvxLedgerIcon, HTMLStencilElement {} - var HTMLMvxLedgerIconElement: { - prototype: HTMLMvxLedgerIconElement; - new (): HTMLMvxLedgerIconElement; - }; - interface HTMLMvxLedgerIntroElementEventMap { - connect: any; - } - interface HTMLMvxLedgerIntroElement extends Components.MvxLedgerIntro, HTMLStencilElement { - addEventListener( - type: K, - listener: ( - this: HTMLMvxLedgerIntroElement, - ev: MvxLedgerIntroCustomEvent, - ) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: ( - this: HTMLMvxLedgerIntroElement, - ev: MvxLedgerIntroCustomEvent, - ) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxLedgerIntroElement: { - prototype: HTMLMvxLedgerIntroElement; - new (): HTMLMvxLedgerIntroElement; - }; - interface HTMLMvxLedgerProviderIconElement extends Components.MvxLedgerProviderIcon, HTMLStencilElement {} - var HTMLMvxLedgerProviderIconElement: { - prototype: HTMLMvxLedgerProviderIconElement; - new (): HTMLMvxLedgerProviderIconElement; - }; - interface HTMLMvxMagnifyingGlassIconElement extends Components.MvxMagnifyingGlassIcon, HTMLStencilElement {} - var HTMLMvxMagnifyingGlassIconElement: { - prototype: HTMLMvxMagnifyingGlassIconElement; - new (): HTMLMvxMagnifyingGlassIconElement; - }; - interface HTMLMvxMetamaskProviderIconElement extends Components.MvxMetamaskProviderIcon, HTMLStencilElement {} - var HTMLMvxMetamaskProviderIconElement: { - prototype: HTMLMvxMetamaskProviderIconElement; - new (): HTMLMvxMetamaskProviderIconElement; - }; - interface HTMLMvxMultiversxLogoIconElement extends Components.MvxMultiversxLogoIcon, HTMLStencilElement {} - var HTMLMvxMultiversxLogoIconElement: { - prototype: HTMLMvxMultiversxLogoIconElement; - new (): HTMLMvxMultiversxLogoIconElement; - }; - interface HTMLMvxMultiversxSymbolIconElement extends Components.MvxMultiversxSymbolIcon, HTMLStencilElement {} - var HTMLMvxMultiversxSymbolIconElement: { - prototype: HTMLMvxMultiversxSymbolIconElement; - new (): HTMLMvxMultiversxSymbolIconElement; - }; - interface HTMLMvxNotificationsFeedElement extends Components.MvxNotificationsFeed, HTMLStencilElement {} - var HTMLMvxNotificationsFeedElement: { - prototype: HTMLMvxNotificationsFeedElement; - new (): HTMLMvxNotificationsFeedElement; - }; - interface HTMLMvxPaginationElementEventMap { - pageChange: number; - } - interface HTMLMvxPaginationElement extends Components.MvxPagination, HTMLStencilElement { - addEventListener( - type: K, - listener: ( - this: HTMLMvxPaginationElement, - ev: MvxPaginationCustomEvent, - ) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: ( - this: HTMLMvxPaginationElement, - ev: MvxPaginationCustomEvent, - ) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxPaginationElement: { - prototype: HTMLMvxPaginationElement; - new (): HTMLMvxPaginationElement; - }; - interface HTMLMvxPaginationEllipsisElement extends Components.MvxPaginationEllipsis, HTMLStencilElement {} - var HTMLMvxPaginationEllipsisElement: { - prototype: HTMLMvxPaginationEllipsisElement; - new (): HTMLMvxPaginationEllipsisElement; - }; - interface HTMLMvxPaginationEllipsisFormElementEventMap { - search: number; - } - interface HTMLMvxPaginationEllipsisFormElement extends Components.MvxPaginationEllipsisForm, HTMLStencilElement { - addEventListener( - type: K, - listener: ( - this: HTMLMvxPaginationEllipsisFormElement, - ev: MvxPaginationEllipsisFormCustomEvent, - ) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: ( - this: HTMLMvxPaginationEllipsisFormElement, - ev: MvxPaginationEllipsisFormCustomEvent, - ) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxPaginationEllipsisFormElement: { - prototype: HTMLMvxPaginationEllipsisFormElement; - new (): HTMLMvxPaginationEllipsisFormElement; - }; - interface HTMLMvxPasskeyProviderIconElement extends Components.MvxPasskeyProviderIcon, HTMLStencilElement {} - var HTMLMvxPasskeyProviderIconElement: { - prototype: HTMLMvxPasskeyProviderIconElement; - new (): HTMLMvxPasskeyProviderIconElement; - }; - interface HTMLMvxPendingTransactionsPanelElement extends Components.MvxPendingTransactionsPanel, HTMLStencilElement {} - var HTMLMvxPendingTransactionsPanelElement: { - prototype: HTMLMvxPendingTransactionsPanelElement; - new (): HTMLMvxPendingTransactionsPanelElement; - }; - interface HTMLMvxPreloaderElement extends Components.MvxPreloader, HTMLStencilElement {} - var HTMLMvxPreloaderElement: { - prototype: HTMLMvxPreloaderElement; - new (): HTMLMvxPreloaderElement; - }; - interface HTMLMvxSidePanelElementEventMap { - close: void; - back: void; - } - interface HTMLMvxSidePanelElement extends Components.MvxSidePanel, HTMLStencilElement { - addEventListener( - type: K, - listener: (this: HTMLMvxSidePanelElement, ev: MvxSidePanelCustomEvent) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLMvxSidePanelElement, ev: MvxSidePanelCustomEvent) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxSidePanelElement: { - prototype: HTMLMvxSidePanelElement; - new (): HTMLMvxSidePanelElement; - }; - interface HTMLMvxSidePanelHeaderElementEventMap { - rightButtonClick: any; - leftButtonClick: any; - } - interface HTMLMvxSidePanelHeaderElement extends Components.MvxSidePanelHeader, HTMLStencilElement { - addEventListener( - type: K, - listener: ( - this: HTMLMvxSidePanelHeaderElement, - ev: MvxSidePanelHeaderCustomEvent, - ) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: ( - this: HTMLMvxSidePanelHeaderElement, - ev: MvxSidePanelHeaderCustomEvent, - ) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxSidePanelHeaderElement: { - prototype: HTMLMvxSidePanelHeaderElement; - new (): HTMLMvxSidePanelHeaderElement; - }; - interface HTMLMvxSidePanelSwiperElementEventMap { - sheetDismiss: void; - sheetSnapChange: { index: number; snapPoint: string }; - } - interface HTMLMvxSidePanelSwiperElement extends Components.MvxSidePanelSwiper, HTMLStencilElement { - addEventListener( - type: K, - listener: ( - this: HTMLMvxSidePanelSwiperElement, - ev: MvxSidePanelSwiperCustomEvent, - ) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: ( - this: HTMLMvxSidePanelSwiperElement, - ev: MvxSidePanelSwiperCustomEvent, - ) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxSidePanelSwiperElement: { - prototype: HTMLMvxSidePanelSwiperElement; - new (): HTMLMvxSidePanelSwiperElement; - }; - interface HTMLMvxSignTransactionsPanelElement extends Components.MvxSignTransactionsPanel, HTMLStencilElement {} - var HTMLMvxSignTransactionsPanelElement: { - prototype: HTMLMvxSignTransactionsPanelElement; - new (): HTMLMvxSignTransactionsPanelElement; - }; - interface HTMLMvxSimpleToastElementEventMap { - deleteToast: void; - } - interface HTMLMvxSimpleToastElement extends Components.MvxSimpleToast, HTMLStencilElement { - addEventListener( - type: K, - listener: ( - this: HTMLMvxSimpleToastElement, - ev: MvxSimpleToastCustomEvent, - ) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: ( - this: HTMLMvxSimpleToastElement, - ev: MvxSimpleToastCustomEvent, - ) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxSimpleToastElement: { - prototype: HTMLMvxSimpleToastElement; - new (): HTMLMvxSimpleToastElement; - }; - interface HTMLMvxSpinnerIconElement extends Components.MvxSpinnerIcon, HTMLStencilElement {} - var HTMLMvxSpinnerIconElement: { - prototype: HTMLMvxSpinnerIconElement; - new (): HTMLMvxSpinnerIconElement; - }; - interface HTMLMvxToastListElement extends Components.MvxToastList, HTMLStencilElement {} - var HTMLMvxToastListElement: { - prototype: HTMLMvxToastListElement; - new (): HTMLMvxToastListElement; - }; - interface HTMLMvxTooltipElementEventMap { - triggerRender: boolean; - } - interface HTMLMvxTooltipElement extends Components.MvxTooltip, HTMLStencilElement { - addEventListener( - type: K, - listener: (this: HTMLMvxTooltipElement, ev: MvxTooltipCustomEvent) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLMvxTooltipElement, ev: MvxTooltipCustomEvent) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxTooltipElement: { - prototype: HTMLMvxTooltipElement; - new (): HTMLMvxTooltipElement; - }; - interface HTMLMvxTransactionListItemElement extends Components.MvxTransactionListItem, HTMLStencilElement {} - var HTMLMvxTransactionListItemElement: { - prototype: HTMLMvxTransactionListItemElement; - new (): HTMLMvxTransactionListItemElement; - }; - interface HTMLMvxTransactionToastElementEventMap { - deleteToast: void; - } - interface HTMLMvxTransactionToastElement extends Components.MvxTransactionToast, HTMLStencilElement { - addEventListener( - type: K, - listener: ( - this: HTMLMvxTransactionToastElement, - ev: MvxTransactionToastCustomEvent, - ) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: ( - this: HTMLMvxTransactionToastElement, - ev: MvxTransactionToastCustomEvent, - ) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxTransactionToastElement: { - prototype: HTMLMvxTransactionToastElement; - new (): HTMLMvxTransactionToastElement; - }; - interface HTMLMvxTransactionToastContentElementEventMap { - deleteToast: void; - } - interface HTMLMvxTransactionToastContentElement extends Components.MvxTransactionToastContent, HTMLStencilElement { - addEventListener( - type: K, - listener: ( - this: HTMLMvxTransactionToastContentElement, - ev: MvxTransactionToastContentCustomEvent, - ) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: ( - this: HTMLMvxTransactionToastContentElement, - ev: MvxTransactionToastContentCustomEvent, - ) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxTransactionToastContentElement: { - prototype: HTMLMvxTransactionToastContentElement; - new (): HTMLMvxTransactionToastContentElement; - }; - interface HTMLMvxTransactionToastDetailsElement extends Components.MvxTransactionToastDetails, HTMLStencilElement {} - var HTMLMvxTransactionToastDetailsElement: { - prototype: HTMLMvxTransactionToastDetailsElement; - new (): HTMLMvxTransactionToastDetailsElement; - }; - interface HTMLMvxTransactionToastDetailsBodyElement - extends Components.MvxTransactionToastDetailsBody, - HTMLStencilElement {} - var HTMLMvxTransactionToastDetailsBodyElement: { - prototype: HTMLMvxTransactionToastDetailsBodyElement; - new (): HTMLMvxTransactionToastDetailsBodyElement; - }; - interface HTMLMvxTransactionToastProgressElement extends Components.MvxTransactionToastProgress, HTMLStencilElement {} - var HTMLMvxTransactionToastProgressElement: { - prototype: HTMLMvxTransactionToastProgressElement; - new (): HTMLMvxTransactionToastProgressElement; - }; - interface HTMLMvxTransactionsTableElement extends Components.MvxTransactionsTable, HTMLStencilElement {} - var HTMLMvxTransactionsTableElement: { - prototype: HTMLMvxTransactionsTableElement; - new (): HTMLMvxTransactionsTableElement; - }; - interface HTMLMvxTrimElement extends Components.MvxTrim, HTMLStencilElement {} - var HTMLMvxTrimElement: { - prototype: HTMLMvxTrimElement; - new (): HTMLMvxTrimElement; - }; - interface HTMLMvxUnlockButtonElement extends Components.MvxUnlockButton, HTMLStencilElement {} - var HTMLMvxUnlockButtonElement: { - prototype: HTMLMvxUnlockButtonElement; - new (): HTMLMvxUnlockButtonElement; - }; - interface HTMLMvxUnlockPanelElement extends Components.MvxUnlockPanel, HTMLStencilElement {} - var HTMLMvxUnlockPanelElement: { - prototype: HTMLMvxUnlockPanelElement; - new (): HTMLMvxUnlockPanelElement; - }; - interface HTMLMvxWalletConnectElement extends Components.MvxWalletConnect, HTMLStencilElement {} - var HTMLMvxWalletConnectElement: { - prototype: HTMLMvxWalletConnectElement; - new (): HTMLMvxWalletConnectElement; - }; - interface HTMLMvxWalletConnectAppGalleryIconElement - extends Components.MvxWalletConnectAppGalleryIcon, - HTMLStencilElement {} - var HTMLMvxWalletConnectAppGalleryIconElement: { - prototype: HTMLMvxWalletConnectAppGalleryIconElement; - new (): HTMLMvxWalletConnectAppGalleryIconElement; - }; - interface HTMLMvxWalletConnectAppStoreIconElement - extends Components.MvxWalletConnectAppStoreIcon, - HTMLStencilElement {} - var HTMLMvxWalletConnectAppStoreIconElement: { - prototype: HTMLMvxWalletConnectAppStoreIconElement; - new (): HTMLMvxWalletConnectAppStoreIconElement; - }; - interface HTMLMvxWalletConnectDownloadElement extends Components.MvxWalletConnectDownload, HTMLStencilElement {} - var HTMLMvxWalletConnectDownloadElement: { - prototype: HTMLMvxWalletConnectDownloadElement; - new (): HTMLMvxWalletConnectDownloadElement; - }; - interface HTMLMvxWalletConnectGooglePlayIconElement - extends Components.MvxWalletConnectGooglePlayIcon, - HTMLStencilElement {} - var HTMLMvxWalletConnectGooglePlayIconElement: { - prototype: HTMLMvxWalletConnectGooglePlayIconElement; - new (): HTMLMvxWalletConnectGooglePlayIconElement; - }; - interface HTMLMvxWalletConnectScanElementEventMap { - downloadClick: any; - } - interface HTMLMvxWalletConnectScanElement extends Components.MvxWalletConnectScan, HTMLStencilElement { - addEventListener( - type: K, - listener: ( - this: HTMLMvxWalletConnectScanElement, - ev: MvxWalletConnectScanCustomEvent, - ) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | AddEventListenerOptions, - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: ( - this: HTMLMvxWalletConnectScanElement, - ev: MvxWalletConnectScanCustomEvent, - ) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: Document, ev: DocumentEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: K, - listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, - options?: boolean | EventListenerOptions, - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions, - ): void; - } - var HTMLMvxWalletConnectScanElement: { - prototype: HTMLMvxWalletConnectScanElement; - new (): HTMLMvxWalletConnectScanElement; - }; - interface HTMLMvxWalletProviderIconElement extends Components.MvxWalletProviderIcon, HTMLStencilElement {} - var HTMLMvxWalletProviderIconElement: { - prototype: HTMLMvxWalletProviderIconElement; - new (): HTMLMvxWalletProviderIconElement; - }; - interface HTMLMvxXportalDownloadQrIconElement extends Components.MvxXportalDownloadQrIcon, HTMLStencilElement {} - var HTMLMvxXportalDownloadQrIconElement: { - prototype: HTMLMvxXportalDownloadQrIconElement; - new (): HTMLMvxXportalDownloadQrIconElement; - }; - interface HTMLMvxXportalQrCodePreloaderElement extends Components.MvxXportalQrCodePreloader, HTMLStencilElement {} - var HTMLMvxXportalQrCodePreloaderElement: { - prototype: HTMLMvxXportalQrCodePreloaderElement; - new (): HTMLMvxXportalQrCodePreloaderElement; - }; - interface HTMLElementTagNameMap { - 'mvx-address-table': HTMLMvxAddressTableElement; - 'mvx-arc-extension-provider-icon': HTMLMvxArcExtensionProviderIconElement; - 'mvx-arrow-right-icon': HTMLMvxArrowRightIconElement; - 'mvx-brave-extension-provider-icon': HTMLMvxBraveExtensionProviderIconElement; - 'mvx-button': HTMLMvxButtonElement; - 'mvx-circle-info-icon': HTMLMvxCircleInfoIconElement; - 'mvx-copy-button': HTMLMvxCopyButtonElement; - 'mvx-custom-toast': HTMLMvxCustomToastElement; - 'mvx-data-with-explorer-link': HTMLMvxDataWithExplorerLinkElement; - 'mvx-default-transaction-icon-large': HTMLMvxDefaultTransactionIconLargeElement; - 'mvx-default-transaction-icon-small': HTMLMvxDefaultTransactionIconSmallElement; - 'mvx-edge-extension-provider-icon': HTMLMvxEdgeExtensionProviderIconElement; - 'mvx-explorer-link': HTMLMvxExplorerLinkElement; - 'mvx-extension-provider-icon': HTMLMvxExtensionProviderIconElement; - 'mvx-firefox-extension-provider-icon': HTMLMvxFirefoxExtensionProviderIconElement; - 'mvx-format-amount': HTMLMvxFormatAmountElement; - 'mvx-generic-toast': HTMLMvxGenericToastElement; - 'mvx-ledger-confirm': HTMLMvxLedgerConfirmElement; - 'mvx-ledger-connect': HTMLMvxLedgerConnectElement; - 'mvx-ledger-icon': HTMLMvxLedgerIconElement; - 'mvx-ledger-intro': HTMLMvxLedgerIntroElement; - 'mvx-ledger-provider-icon': HTMLMvxLedgerProviderIconElement; - 'mvx-magnifying-glass-icon': HTMLMvxMagnifyingGlassIconElement; - 'mvx-metamask-provider-icon': HTMLMvxMetamaskProviderIconElement; - 'mvx-multiversx-logo-icon': HTMLMvxMultiversxLogoIconElement; - 'mvx-multiversx-symbol-icon': HTMLMvxMultiversxSymbolIconElement; - 'mvx-notifications-feed': HTMLMvxNotificationsFeedElement; - 'mvx-pagination': HTMLMvxPaginationElement; - 'mvx-pagination-ellipsis': HTMLMvxPaginationEllipsisElement; - 'mvx-pagination-ellipsis-form': HTMLMvxPaginationEllipsisFormElement; - 'mvx-passkey-provider-icon': HTMLMvxPasskeyProviderIconElement; - 'mvx-pending-transactions-panel': HTMLMvxPendingTransactionsPanelElement; - 'mvx-preloader': HTMLMvxPreloaderElement; - 'mvx-side-panel': HTMLMvxSidePanelElement; - 'mvx-side-panel-header': HTMLMvxSidePanelHeaderElement; - 'mvx-side-panel-swiper': HTMLMvxSidePanelSwiperElement; - 'mvx-sign-transactions-panel': HTMLMvxSignTransactionsPanelElement; - 'mvx-simple-toast': HTMLMvxSimpleToastElement; - 'mvx-spinner-icon': HTMLMvxSpinnerIconElement; - 'mvx-toast-list': HTMLMvxToastListElement; - 'mvx-tooltip': HTMLMvxTooltipElement; - 'mvx-transaction-list-item': HTMLMvxTransactionListItemElement; - 'mvx-transaction-toast': HTMLMvxTransactionToastElement; - 'mvx-transaction-toast-content': HTMLMvxTransactionToastContentElement; - 'mvx-transaction-toast-details': HTMLMvxTransactionToastDetailsElement; - 'mvx-transaction-toast-details-body': HTMLMvxTransactionToastDetailsBodyElement; - 'mvx-transaction-toast-progress': HTMLMvxTransactionToastProgressElement; - 'mvx-transactions-table': HTMLMvxTransactionsTableElement; - 'mvx-trim': HTMLMvxTrimElement; - 'mvx-unlock-button': HTMLMvxUnlockButtonElement; - 'mvx-unlock-panel': HTMLMvxUnlockPanelElement; - 'mvx-wallet-connect': HTMLMvxWalletConnectElement; - 'mvx-wallet-connect-app-gallery-icon': HTMLMvxWalletConnectAppGalleryIconElement; - 'mvx-wallet-connect-app-store-icon': HTMLMvxWalletConnectAppStoreIconElement; - 'mvx-wallet-connect-download': HTMLMvxWalletConnectDownloadElement; - 'mvx-wallet-connect-google-play-icon': HTMLMvxWalletConnectGooglePlayIconElement; - 'mvx-wallet-connect-scan': HTMLMvxWalletConnectScanElement; - 'mvx-wallet-provider-icon': HTMLMvxWalletProviderIconElement; - 'mvx-xportal-download-qr-icon': HTMLMvxXportalDownloadQrIconElement; - 'mvx-xportal-qr-code-preloader': HTMLMvxXportalQrCodePreloaderElement; - } + interface HTMLMvxAddressTableElementEventMap { + "accessWallet": any; + "selectAccount": any; + "pageChange": number; + } + interface HTMLMvxAddressTableElement extends Components.MvxAddressTable, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxAddressTableElement, ev: MvxAddressTableCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxAddressTableElement, ev: MvxAddressTableCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxAddressTableElement: { + prototype: HTMLMvxAddressTableElement; + new (): HTMLMvxAddressTableElement; + }; + interface HTMLMvxArcExtensionProviderIconElement extends Components.MvxArcExtensionProviderIcon, HTMLStencilElement { + } + var HTMLMvxArcExtensionProviderIconElement: { + prototype: HTMLMvxArcExtensionProviderIconElement; + new (): HTMLMvxArcExtensionProviderIconElement; + }; + interface HTMLMvxArrowRightIconElement extends Components.MvxArrowRightIcon, HTMLStencilElement { + } + var HTMLMvxArrowRightIconElement: { + prototype: HTMLMvxArrowRightIconElement; + new (): HTMLMvxArrowRightIconElement; + }; + interface HTMLMvxBraveExtensionProviderIconElement extends Components.MvxBraveExtensionProviderIcon, HTMLStencilElement { + } + var HTMLMvxBraveExtensionProviderIconElement: { + prototype: HTMLMvxBraveExtensionProviderIconElement; + new (): HTMLMvxBraveExtensionProviderIconElement; + }; + interface HTMLMvxButtonElementEventMap { + "buttonClick": MouseEvent; + } + interface HTMLMvxButtonElement extends Components.MvxButton, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxButtonElement, ev: MvxButtonCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxButtonElement, ev: MvxButtonCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxButtonElement: { + prototype: HTMLMvxButtonElement; + new (): HTMLMvxButtonElement; + }; + interface HTMLMvxCircleInfoIconElement extends Components.MvxCircleInfoIcon, HTMLStencilElement { + } + var HTMLMvxCircleInfoIconElement: { + prototype: HTMLMvxCircleInfoIconElement; + new (): HTMLMvxCircleInfoIconElement; + }; + interface HTMLMvxCopyButtonElement extends Components.MvxCopyButton, HTMLStencilElement { + } + var HTMLMvxCopyButtonElement: { + prototype: HTMLMvxCopyButtonElement; + new (): HTMLMvxCopyButtonElement; + }; + interface HTMLMvxCustomToastElementEventMap { + "deleteToast": string; + } + interface HTMLMvxCustomToastElement extends Components.MvxCustomToast, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxCustomToastElement, ev: MvxCustomToastCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxCustomToastElement, ev: MvxCustomToastCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxCustomToastElement: { + prototype: HTMLMvxCustomToastElement; + new (): HTMLMvxCustomToastElement; + }; + interface HTMLMvxDataWithExplorerLinkElement extends Components.MvxDataWithExplorerLink, HTMLStencilElement { + } + var HTMLMvxDataWithExplorerLinkElement: { + prototype: HTMLMvxDataWithExplorerLinkElement; + new (): HTMLMvxDataWithExplorerLinkElement; + }; + interface HTMLMvxDefaultTransactionIconLargeElement extends Components.MvxDefaultTransactionIconLarge, HTMLStencilElement { + } + var HTMLMvxDefaultTransactionIconLargeElement: { + prototype: HTMLMvxDefaultTransactionIconLargeElement; + new (): HTMLMvxDefaultTransactionIconLargeElement; + }; + interface HTMLMvxDefaultTransactionIconSmallElement extends Components.MvxDefaultTransactionIconSmall, HTMLStencilElement { + } + var HTMLMvxDefaultTransactionIconSmallElement: { + prototype: HTMLMvxDefaultTransactionIconSmallElement; + new (): HTMLMvxDefaultTransactionIconSmallElement; + }; + interface HTMLMvxEdgeExtensionProviderIconElement extends Components.MvxEdgeExtensionProviderIcon, HTMLStencilElement { + } + var HTMLMvxEdgeExtensionProviderIconElement: { + prototype: HTMLMvxEdgeExtensionProviderIconElement; + new (): HTMLMvxEdgeExtensionProviderIconElement; + }; + interface HTMLMvxExplorerLinkElement extends Components.MvxExplorerLink, HTMLStencilElement { + } + var HTMLMvxExplorerLinkElement: { + prototype: HTMLMvxExplorerLinkElement; + new (): HTMLMvxExplorerLinkElement; + }; + interface HTMLMvxExtensionProviderIconElement extends Components.MvxExtensionProviderIcon, HTMLStencilElement { + } + var HTMLMvxExtensionProviderIconElement: { + prototype: HTMLMvxExtensionProviderIconElement; + new (): HTMLMvxExtensionProviderIconElement; + }; + interface HTMLMvxFirefoxExtensionProviderIconElement extends Components.MvxFirefoxExtensionProviderIcon, HTMLStencilElement { + } + var HTMLMvxFirefoxExtensionProviderIconElement: { + prototype: HTMLMvxFirefoxExtensionProviderIconElement; + new (): HTMLMvxFirefoxExtensionProviderIconElement; + }; + interface HTMLMvxFormatAmountElement extends Components.MvxFormatAmount, HTMLStencilElement { + } + var HTMLMvxFormatAmountElement: { + prototype: HTMLMvxFormatAmountElement; + new (): HTMLMvxFormatAmountElement; + }; + interface HTMLMvxGenericToastElementEventMap { + "deleteToast": string; + } + interface HTMLMvxGenericToastElement extends Components.MvxGenericToast, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxGenericToastElement, ev: MvxGenericToastCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxGenericToastElement, ev: MvxGenericToastCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxGenericToastElement: { + prototype: HTMLMvxGenericToastElement; + new (): HTMLMvxGenericToastElement; + }; + interface HTMLMvxLedgerConfirmElement extends Components.MvxLedgerConfirm, HTMLStencilElement { + } + var HTMLMvxLedgerConfirmElement: { + prototype: HTMLMvxLedgerConfirmElement; + new (): HTMLMvxLedgerConfirmElement; + }; + interface HTMLMvxLedgerConnectElement extends Components.MvxLedgerConnect, HTMLStencilElement { + } + var HTMLMvxLedgerConnectElement: { + prototype: HTMLMvxLedgerConnectElement; + new (): HTMLMvxLedgerConnectElement; + }; + interface HTMLMvxLedgerIconElement extends Components.MvxLedgerIcon, HTMLStencilElement { + } + var HTMLMvxLedgerIconElement: { + prototype: HTMLMvxLedgerIconElement; + new (): HTMLMvxLedgerIconElement; + }; + interface HTMLMvxLedgerIntroElementEventMap { + "connect": any; + } + interface HTMLMvxLedgerIntroElement extends Components.MvxLedgerIntro, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxLedgerIntroElement, ev: MvxLedgerIntroCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxLedgerIntroElement, ev: MvxLedgerIntroCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxLedgerIntroElement: { + prototype: HTMLMvxLedgerIntroElement; + new (): HTMLMvxLedgerIntroElement; + }; + interface HTMLMvxLedgerProviderIconElement extends Components.MvxLedgerProviderIcon, HTMLStencilElement { + } + var HTMLMvxLedgerProviderIconElement: { + prototype: HTMLMvxLedgerProviderIconElement; + new (): HTMLMvxLedgerProviderIconElement; + }; + interface HTMLMvxMagnifyingGlassIconElement extends Components.MvxMagnifyingGlassIcon, HTMLStencilElement { + } + var HTMLMvxMagnifyingGlassIconElement: { + prototype: HTMLMvxMagnifyingGlassIconElement; + new (): HTMLMvxMagnifyingGlassIconElement; + }; + interface HTMLMvxMetamaskProviderIconElement extends Components.MvxMetamaskProviderIcon, HTMLStencilElement { + } + var HTMLMvxMetamaskProviderIconElement: { + prototype: HTMLMvxMetamaskProviderIconElement; + new (): HTMLMvxMetamaskProviderIconElement; + }; + interface HTMLMvxMultiversxLogoIconElement extends Components.MvxMultiversxLogoIcon, HTMLStencilElement { + } + var HTMLMvxMultiversxLogoIconElement: { + prototype: HTMLMvxMultiversxLogoIconElement; + new (): HTMLMvxMultiversxLogoIconElement; + }; + interface HTMLMvxMultiversxSymbolIconElement extends Components.MvxMultiversxSymbolIcon, HTMLStencilElement { + } + var HTMLMvxMultiversxSymbolIconElement: { + prototype: HTMLMvxMultiversxSymbolIconElement; + new (): HTMLMvxMultiversxSymbolIconElement; + }; + interface HTMLMvxNotificationsFeedElement extends Components.MvxNotificationsFeed, HTMLStencilElement { + } + var HTMLMvxNotificationsFeedElement: { + prototype: HTMLMvxNotificationsFeedElement; + new (): HTMLMvxNotificationsFeedElement; + }; + interface HTMLMvxPaginationElementEventMap { + "pageChange": number; + } + interface HTMLMvxPaginationElement extends Components.MvxPagination, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxPaginationElement, ev: MvxPaginationCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxPaginationElement, ev: MvxPaginationCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxPaginationElement: { + prototype: HTMLMvxPaginationElement; + new (): HTMLMvxPaginationElement; + }; + interface HTMLMvxPaginationEllipsisElement extends Components.MvxPaginationEllipsis, HTMLStencilElement { + } + var HTMLMvxPaginationEllipsisElement: { + prototype: HTMLMvxPaginationEllipsisElement; + new (): HTMLMvxPaginationEllipsisElement; + }; + interface HTMLMvxPaginationEllipsisFormElementEventMap { + "search": number; + } + interface HTMLMvxPaginationEllipsisFormElement extends Components.MvxPaginationEllipsisForm, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxPaginationEllipsisFormElement, ev: MvxPaginationEllipsisFormCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxPaginationEllipsisFormElement, ev: MvxPaginationEllipsisFormCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxPaginationEllipsisFormElement: { + prototype: HTMLMvxPaginationEllipsisFormElement; + new (): HTMLMvxPaginationEllipsisFormElement; + }; + interface HTMLMvxPasskeyProviderIconElement extends Components.MvxPasskeyProviderIcon, HTMLStencilElement { + } + var HTMLMvxPasskeyProviderIconElement: { + prototype: HTMLMvxPasskeyProviderIconElement; + new (): HTMLMvxPasskeyProviderIconElement; + }; + interface HTMLMvxPendingTransactionsPanelElement extends Components.MvxPendingTransactionsPanel, HTMLStencilElement { + } + var HTMLMvxPendingTransactionsPanelElement: { + prototype: HTMLMvxPendingTransactionsPanelElement; + new (): HTMLMvxPendingTransactionsPanelElement; + }; + interface HTMLMvxPreloaderElement extends Components.MvxPreloader, HTMLStencilElement { + } + var HTMLMvxPreloaderElement: { + prototype: HTMLMvxPreloaderElement; + new (): HTMLMvxPreloaderElement; + }; + interface HTMLMvxSidePanelElementEventMap { + "close": void; + "back": void; + } + interface HTMLMvxSidePanelElement extends Components.MvxSidePanel, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxSidePanelElement, ev: MvxSidePanelCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxSidePanelElement, ev: MvxSidePanelCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxSidePanelElement: { + prototype: HTMLMvxSidePanelElement; + new (): HTMLMvxSidePanelElement; + }; + interface HTMLMvxSidePanelHeaderElementEventMap { + "rightButtonClick": any; + "leftButtonClick": any; + } + interface HTMLMvxSidePanelHeaderElement extends Components.MvxSidePanelHeader, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxSidePanelHeaderElement, ev: MvxSidePanelHeaderCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxSidePanelHeaderElement, ev: MvxSidePanelHeaderCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxSidePanelHeaderElement: { + prototype: HTMLMvxSidePanelHeaderElement; + new (): HTMLMvxSidePanelHeaderElement; + }; + interface HTMLMvxSidePanelSwiperElementEventMap { + "sheetDismiss": void; + "sheetSnapChange": { index: number; snapPoint: string }; + } + interface HTMLMvxSidePanelSwiperElement extends Components.MvxSidePanelSwiper, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxSidePanelSwiperElement, ev: MvxSidePanelSwiperCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxSidePanelSwiperElement, ev: MvxSidePanelSwiperCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxSidePanelSwiperElement: { + prototype: HTMLMvxSidePanelSwiperElement; + new (): HTMLMvxSidePanelSwiperElement; + }; + interface HTMLMvxSignTransactionsPanelElement extends Components.MvxSignTransactionsPanel, HTMLStencilElement { + } + var HTMLMvxSignTransactionsPanelElement: { + prototype: HTMLMvxSignTransactionsPanelElement; + new (): HTMLMvxSignTransactionsPanelElement; + }; + interface HTMLMvxSimpleToastElementEventMap { + "deleteToast": void; + } + interface HTMLMvxSimpleToastElement extends Components.MvxSimpleToast, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxSimpleToastElement, ev: MvxSimpleToastCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxSimpleToastElement, ev: MvxSimpleToastCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxSimpleToastElement: { + prototype: HTMLMvxSimpleToastElement; + new (): HTMLMvxSimpleToastElement; + }; + interface HTMLMvxSpinnerIconElement extends Components.MvxSpinnerIcon, HTMLStencilElement { + } + var HTMLMvxSpinnerIconElement: { + prototype: HTMLMvxSpinnerIconElement; + new (): HTMLMvxSpinnerIconElement; + }; + interface HTMLMvxToastListElement extends Components.MvxToastList, HTMLStencilElement { + } + var HTMLMvxToastListElement: { + prototype: HTMLMvxToastListElement; + new (): HTMLMvxToastListElement; + }; + interface HTMLMvxTooltipElementEventMap { + "triggerRender": boolean; + } + interface HTMLMvxTooltipElement extends Components.MvxTooltip, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxTooltipElement, ev: MvxTooltipCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxTooltipElement, ev: MvxTooltipCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxTooltipElement: { + prototype: HTMLMvxTooltipElement; + new (): HTMLMvxTooltipElement; + }; + interface HTMLMvxTransactionListItemElement extends Components.MvxTransactionListItem, HTMLStencilElement { + } + var HTMLMvxTransactionListItemElement: { + prototype: HTMLMvxTransactionListItemElement; + new (): HTMLMvxTransactionListItemElement; + }; + interface HTMLMvxTransactionToastElementEventMap { + "deleteToast": void; + } + interface HTMLMvxTransactionToastElement extends Components.MvxTransactionToast, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxTransactionToastElement, ev: MvxTransactionToastCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxTransactionToastElement, ev: MvxTransactionToastCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxTransactionToastElement: { + prototype: HTMLMvxTransactionToastElement; + new (): HTMLMvxTransactionToastElement; + }; + interface HTMLMvxTransactionToastContentElementEventMap { + "deleteToast": void; + } + interface HTMLMvxTransactionToastContentElement extends Components.MvxTransactionToastContent, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxTransactionToastContentElement, ev: MvxTransactionToastContentCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxTransactionToastContentElement, ev: MvxTransactionToastContentCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxTransactionToastContentElement: { + prototype: HTMLMvxTransactionToastContentElement; + new (): HTMLMvxTransactionToastContentElement; + }; + interface HTMLMvxTransactionToastDetailsElement extends Components.MvxTransactionToastDetails, HTMLStencilElement { + } + var HTMLMvxTransactionToastDetailsElement: { + prototype: HTMLMvxTransactionToastDetailsElement; + new (): HTMLMvxTransactionToastDetailsElement; + }; + interface HTMLMvxTransactionToastDetailsBodyElement extends Components.MvxTransactionToastDetailsBody, HTMLStencilElement { + } + var HTMLMvxTransactionToastDetailsBodyElement: { + prototype: HTMLMvxTransactionToastDetailsBodyElement; + new (): HTMLMvxTransactionToastDetailsBodyElement; + }; + interface HTMLMvxTransactionToastProgressElement extends Components.MvxTransactionToastProgress, HTMLStencilElement { + } + var HTMLMvxTransactionToastProgressElement: { + prototype: HTMLMvxTransactionToastProgressElement; + new (): HTMLMvxTransactionToastProgressElement; + }; + interface HTMLMvxTransactionsTableElement extends Components.MvxTransactionsTable, HTMLStencilElement { + } + var HTMLMvxTransactionsTableElement: { + prototype: HTMLMvxTransactionsTableElement; + new (): HTMLMvxTransactionsTableElement; + }; + interface HTMLMvxTrimElement extends Components.MvxTrim, HTMLStencilElement { + } + var HTMLMvxTrimElement: { + prototype: HTMLMvxTrimElement; + new (): HTMLMvxTrimElement; + }; + interface HTMLMvxUnlockButtonElement extends Components.MvxUnlockButton, HTMLStencilElement { + } + var HTMLMvxUnlockButtonElement: { + prototype: HTMLMvxUnlockButtonElement; + new (): HTMLMvxUnlockButtonElement; + }; + interface HTMLMvxUnlockPanelElement extends Components.MvxUnlockPanel, HTMLStencilElement { + } + var HTMLMvxUnlockPanelElement: { + prototype: HTMLMvxUnlockPanelElement; + new (): HTMLMvxUnlockPanelElement; + }; + interface HTMLMvxWalletConnectElement extends Components.MvxWalletConnect, HTMLStencilElement { + } + var HTMLMvxWalletConnectElement: { + prototype: HTMLMvxWalletConnectElement; + new (): HTMLMvxWalletConnectElement; + }; + interface HTMLMvxWalletConnectAppGalleryIconElement extends Components.MvxWalletConnectAppGalleryIcon, HTMLStencilElement { + } + var HTMLMvxWalletConnectAppGalleryIconElement: { + prototype: HTMLMvxWalletConnectAppGalleryIconElement; + new (): HTMLMvxWalletConnectAppGalleryIconElement; + }; + interface HTMLMvxWalletConnectAppStoreIconElement extends Components.MvxWalletConnectAppStoreIcon, HTMLStencilElement { + } + var HTMLMvxWalletConnectAppStoreIconElement: { + prototype: HTMLMvxWalletConnectAppStoreIconElement; + new (): HTMLMvxWalletConnectAppStoreIconElement; + }; + interface HTMLMvxWalletConnectDownloadElement extends Components.MvxWalletConnectDownload, HTMLStencilElement { + } + var HTMLMvxWalletConnectDownloadElement: { + prototype: HTMLMvxWalletConnectDownloadElement; + new (): HTMLMvxWalletConnectDownloadElement; + }; + interface HTMLMvxWalletConnectGooglePlayIconElement extends Components.MvxWalletConnectGooglePlayIcon, HTMLStencilElement { + } + var HTMLMvxWalletConnectGooglePlayIconElement: { + prototype: HTMLMvxWalletConnectGooglePlayIconElement; + new (): HTMLMvxWalletConnectGooglePlayIconElement; + }; + interface HTMLMvxWalletConnectScanElementEventMap { + "downloadClick": any; + } + interface HTMLMvxWalletConnectScanElement extends Components.MvxWalletConnectScan, HTMLStencilElement { + addEventListener(type: K, listener: (this: HTMLMvxWalletConnectScanElement, ev: MvxWalletConnectScanCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLMvxWalletConnectScanElement, ev: MvxWalletConnectScanCustomEvent) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + } + var HTMLMvxWalletConnectScanElement: { + prototype: HTMLMvxWalletConnectScanElement; + new (): HTMLMvxWalletConnectScanElement; + }; + interface HTMLMvxWalletProviderIconElement extends Components.MvxWalletProviderIcon, HTMLStencilElement { + } + var HTMLMvxWalletProviderIconElement: { + prototype: HTMLMvxWalletProviderIconElement; + new (): HTMLMvxWalletProviderIconElement; + }; + interface HTMLMvxXportalDownloadQrIconElement extends Components.MvxXportalDownloadQrIcon, HTMLStencilElement { + } + var HTMLMvxXportalDownloadQrIconElement: { + prototype: HTMLMvxXportalDownloadQrIconElement; + new (): HTMLMvxXportalDownloadQrIconElement; + }; + interface HTMLMvxXportalQrCodePreloaderElement extends Components.MvxXportalQrCodePreloader, HTMLStencilElement { + } + var HTMLMvxXportalQrCodePreloaderElement: { + prototype: HTMLMvxXportalQrCodePreloaderElement; + new (): HTMLMvxXportalQrCodePreloaderElement; + }; + interface HTMLElementTagNameMap { + "mvx-address-table": HTMLMvxAddressTableElement; + "mvx-arc-extension-provider-icon": HTMLMvxArcExtensionProviderIconElement; + "mvx-arrow-right-icon": HTMLMvxArrowRightIconElement; + "mvx-brave-extension-provider-icon": HTMLMvxBraveExtensionProviderIconElement; + "mvx-button": HTMLMvxButtonElement; + "mvx-circle-info-icon": HTMLMvxCircleInfoIconElement; + "mvx-copy-button": HTMLMvxCopyButtonElement; + "mvx-custom-toast": HTMLMvxCustomToastElement; + "mvx-data-with-explorer-link": HTMLMvxDataWithExplorerLinkElement; + "mvx-default-transaction-icon-large": HTMLMvxDefaultTransactionIconLargeElement; + "mvx-default-transaction-icon-small": HTMLMvxDefaultTransactionIconSmallElement; + "mvx-edge-extension-provider-icon": HTMLMvxEdgeExtensionProviderIconElement; + "mvx-explorer-link": HTMLMvxExplorerLinkElement; + "mvx-extension-provider-icon": HTMLMvxExtensionProviderIconElement; + "mvx-firefox-extension-provider-icon": HTMLMvxFirefoxExtensionProviderIconElement; + "mvx-format-amount": HTMLMvxFormatAmountElement; + "mvx-generic-toast": HTMLMvxGenericToastElement; + "mvx-ledger-confirm": HTMLMvxLedgerConfirmElement; + "mvx-ledger-connect": HTMLMvxLedgerConnectElement; + "mvx-ledger-icon": HTMLMvxLedgerIconElement; + "mvx-ledger-intro": HTMLMvxLedgerIntroElement; + "mvx-ledger-provider-icon": HTMLMvxLedgerProviderIconElement; + "mvx-magnifying-glass-icon": HTMLMvxMagnifyingGlassIconElement; + "mvx-metamask-provider-icon": HTMLMvxMetamaskProviderIconElement; + "mvx-multiversx-logo-icon": HTMLMvxMultiversxLogoIconElement; + "mvx-multiversx-symbol-icon": HTMLMvxMultiversxSymbolIconElement; + "mvx-notifications-feed": HTMLMvxNotificationsFeedElement; + "mvx-pagination": HTMLMvxPaginationElement; + "mvx-pagination-ellipsis": HTMLMvxPaginationEllipsisElement; + "mvx-pagination-ellipsis-form": HTMLMvxPaginationEllipsisFormElement; + "mvx-passkey-provider-icon": HTMLMvxPasskeyProviderIconElement; + "mvx-pending-transactions-panel": HTMLMvxPendingTransactionsPanelElement; + "mvx-preloader": HTMLMvxPreloaderElement; + "mvx-side-panel": HTMLMvxSidePanelElement; + "mvx-side-panel-header": HTMLMvxSidePanelHeaderElement; + "mvx-side-panel-swiper": HTMLMvxSidePanelSwiperElement; + "mvx-sign-transactions-panel": HTMLMvxSignTransactionsPanelElement; + "mvx-simple-toast": HTMLMvxSimpleToastElement; + "mvx-spinner-icon": HTMLMvxSpinnerIconElement; + "mvx-toast-list": HTMLMvxToastListElement; + "mvx-tooltip": HTMLMvxTooltipElement; + "mvx-transaction-list-item": HTMLMvxTransactionListItemElement; + "mvx-transaction-toast": HTMLMvxTransactionToastElement; + "mvx-transaction-toast-content": HTMLMvxTransactionToastContentElement; + "mvx-transaction-toast-details": HTMLMvxTransactionToastDetailsElement; + "mvx-transaction-toast-details-body": HTMLMvxTransactionToastDetailsBodyElement; + "mvx-transaction-toast-progress": HTMLMvxTransactionToastProgressElement; + "mvx-transactions-table": HTMLMvxTransactionsTableElement; + "mvx-trim": HTMLMvxTrimElement; + "mvx-unlock-button": HTMLMvxUnlockButtonElement; + "mvx-unlock-panel": HTMLMvxUnlockPanelElement; + "mvx-wallet-connect": HTMLMvxWalletConnectElement; + "mvx-wallet-connect-app-gallery-icon": HTMLMvxWalletConnectAppGalleryIconElement; + "mvx-wallet-connect-app-store-icon": HTMLMvxWalletConnectAppStoreIconElement; + "mvx-wallet-connect-download": HTMLMvxWalletConnectDownloadElement; + "mvx-wallet-connect-google-play-icon": HTMLMvxWalletConnectGooglePlayIconElement; + "mvx-wallet-connect-scan": HTMLMvxWalletConnectScanElement; + "mvx-wallet-provider-icon": HTMLMvxWalletProviderIconElement; + "mvx-xportal-download-qr-icon": HTMLMvxXportalDownloadQrIconElement; + "mvx-xportal-qr-code-preloader": HTMLMvxXportalQrCodePreloaderElement; + } } declare namespace LocalJSX { - interface MvxAddressTable { - accountScreenData?: IAddressTableData; - onAccessWallet?: (event: MvxAddressTableCustomEvent) => void; - onPageChange?: (event: MvxAddressTableCustomEvent) => void; - onSelectAccount?: (event: MvxAddressTableCustomEvent) => void; - selectedIndex?: number; - } - interface MvxArcExtensionProviderIcon { - class?: string; - height?: number; - width?: number; - } - interface MvxArrowRightIcon { - class?: string; - } - interface MvxBraveExtensionProviderIcon { - class?: string; - height?: number; - width?: number; - } - interface MvxButton { - /** - * @default '' - */ - class?: string; - /** - * @default '' - */ - dataTestId?: string; - /** - * @default false - */ - disabled?: boolean; - onButtonClick?: (event: MvxButtonCustomEvent) => void; - /** - * @default 'large' - */ - size?: `${ButtonSizeEnum}`; - /** - * @default 'primary' - */ - variant?: `${ButtonVariantEnum}`; - } - interface MvxCircleInfoIcon { - class?: string; - } - interface MvxCopyButton { - class?: string; - iconClass?: string; - text?: string; - } - interface MvxCustomToast { - onDeleteToast?: (event: MvxCustomToastCustomEvent) => void; - toast?: IComponentToast; - } - interface MvxDataWithExplorerLink { - class?: string; - data?: string; - dataTestId?: string; - explorerLink?: string; - /** - * @default true - */ - showCopyButton?: boolean; - /** - * @default true - */ - showExplorerButton?: boolean; - /** - * @default false - */ - withTooltip?: boolean; - } - interface MvxDefaultTransactionIconLarge { - class?: string; - } - interface MvxDefaultTransactionIconSmall { - class?: string; - } - interface MvxEdgeExtensionProviderIcon { - class?: string; - height?: number; - width?: number; - } - interface MvxExplorerLink { - class?: string; - dataTestId?: string; - iconClass?: string; - link?: string; - } - interface MvxExtensionProviderIcon { - class?: string; - height?: number; - width?: number; - } - interface MvxFirefoxExtensionProviderIcon { - class?: string; - height?: number; - width?: number; - } - interface MvxFormatAmount { - class?: string; - dataTestId?: string; - decimalClass?: string; - isValid?: boolean; - label?: string; - labelClass?: string; - /** - * @default true - */ - showLabel?: boolean; - valueDecimal?: string; - valueInteger?: string; - } - interface MvxGenericToast { - onDeleteToast?: (event: MvxGenericToastCustomEvent) => void; - toast?: CustomToastType; - } - interface MvxLedgerConfirm { - confirmScreenData?: IConfirmScreenData; - } - interface MvxLedgerConnect { - /** - * @default { accountScreenData: null, confirmScreenData: null, connectScreenData: {}, } - */ - data?: ILedgerConnectPanelData; - } - interface MvxLedgerIcon { - class?: string; - } - interface MvxLedgerIntro { - connectScreenData?: IConnectScreenData; - /** - * @default false - */ - isAwaiting?: boolean; - onConnect?: (event: MvxLedgerIntroCustomEvent) => void; - } - interface MvxLedgerProviderIcon { - class?: string; - } - interface MvxMagnifyingGlassIcon { - class?: string; - } - interface MvxMetamaskProviderIcon { - class?: string; - } - interface MvxMultiversxLogoIcon { - class?: string; - } - interface MvxMultiversxSymbolIcon { - class?: string; - } - interface MvxNotificationsFeed {} - interface MvxPagination { - class?: string; - /** - * @default 1 - */ - currentPage?: number; - /** - * @default false - */ - isDisabled?: boolean; - onPageChange?: (event: MvxPaginationCustomEvent) => void; - totalPages?: number; - } - interface MvxPaginationEllipsis { - /** - * @default false - */ - isActive?: boolean; - } - interface MvxPaginationEllipsisForm { - /** - * @default false - */ - isVisible?: boolean; - maxPageToSearchFor?: number; - onSearch?: (event: MvxPaginationEllipsisFormCustomEvent) => void; - } - interface MvxPasskeyProviderIcon { - class?: string; - } - interface MvxPendingTransactionsPanel {} - interface MvxPreloader { - class?: string; - } - interface MvxSidePanel { - hasBackButton?: boolean; - /** - * @default false - */ - isOpen?: boolean; - onBack?: (event: MvxSidePanelCustomEvent) => void; - onClose?: (event: MvxSidePanelCustomEvent) => void; - panelClassName?: string; - panelTitle?: string; - /** - * @default true - */ - showHeader?: boolean; - } - interface MvxSidePanelHeader { - /** - * @default true - */ - hasLeftButton?: boolean; - /** - * @default true - */ - hasRightButton?: boolean; - onLeftButtonClick?: (event: MvxSidePanelHeaderCustomEvent) => void; - onRightButtonClick?: (event: MvxSidePanelHeaderCustomEvent) => void; - panelClassName?: string; - panelTitle?: string; - } - interface MvxSidePanelSwiper { - onSheetDismiss?: (event: MvxSidePanelSwiperCustomEvent) => void; - onSheetSnapChange?: (event: MvxSidePanelSwiperCustomEvent<{ index: number; snapPoint: string }>) => void; - /** - * @default false - */ - open?: boolean; - /** - * @default '' - */ - sidePanelIdentifier?: string; - } - interface MvxSignTransactionsPanel {} - interface MvxSimpleToast { - onDeleteToast?: (event: MvxSimpleToastCustomEvent) => void; - toast?: ISimpleToast; - } - interface MvxSpinnerIcon { - class?: string; - } - interface MvxToastList {} - interface MvxTooltip { - class?: string; - onTriggerRender?: (event: MvxTooltipCustomEvent) => void; - /** - * @default 'top' - */ - position?: 'top' | 'bottom'; - trigger?: HTMLElement; - /** - * @default false - */ - triggerOnClick?: boolean; - } - interface MvxTransactionListItem { - transaction?: ITransactionListItem; - } - interface MvxTransactionToast { - fullWidth?: boolean; - onDeleteToast?: (event: MvxTransactionToastCustomEvent) => void; - /** - * @default '' - */ - processedTransactionsStatus?: string | JSX.Element; - toastDataState?: IToastDataState; - /** - * @default '' - */ - toastId?: string; - transactionProgressState?: ITransactionProgressState; - /** - * @default [] - */ - transactions?: ITransactionListItem[]; - wrapperClass?: string; - } - interface MvxTransactionToastContent { - fullWidth?: boolean; - onDeleteToast?: (event: MvxTransactionToastContentCustomEvent) => void; - processedTransactionsStatus?: string | JSX.Element; - toastDataState?: IToastDataState; - transactions?: ITransactionListItem[]; - } - interface MvxTransactionToastDetails { - /** - * @default 5 - */ - maxShownTransactions?: number; - processedTransactionsStatus?: string | JSX.Element; - transactionClass?: string; - transactions?: ITransactionListItem[]; - } - interface MvxTransactionToastDetailsBody { - hash?: string; - index?: string; - link?: string; - status?: `${TransactionStatusEnum}`; - /** - * @default 'transaction-details-list-item' - */ - transactionClass?: string; - } - interface MvxTransactionToastProgress { - endTime?: number; - isStatusPending?: boolean; - startTime?: number; - toastId?: string; - } - interface MvxTransactionsTable { - class?: string; - transactions?: TransactionRowType[]; - } - interface MvxTrim { - class?: string; - /** - * @default DataTestIdsEnum.trim - */ - dataTestId?: string; - text?: string; - } - interface MvxUnlockButton { - class?: string; - dataTestId?: string; - icon?: HTMLElement; - iconUrl?: string; - label?: string; - type?: IProviderBase['type']; - } - interface MvxUnlockPanel {} - interface MvxWalletConnect { - /** - * @default { wcURI: '' } - */ - data?: IWalletConnectPanelData; - /** - * @default '' - */ - qrCodeSvg?: string; - } - interface MvxWalletConnectAppGalleryIcon { - class?: string; - } - interface MvxWalletConnectAppStoreIcon { - class?: string; - } - interface MvxWalletConnectDownload { - class?: string; - } - interface MvxWalletConnectGooglePlayIcon { - class?: string; - } - interface MvxWalletConnectScan { - class?: string; - onDownloadClick?: (event: MvxWalletConnectScanCustomEvent) => void; - /** - * @default '' - */ - qrCodeSvg?: string; - /** - * @default '' - */ - walletConnectDeepLink?: string; - } - interface MvxWalletProviderIcon { - class?: string; - } - interface MvxXportalDownloadQrIcon { - /** - * @default '' - */ - class?: string; - } - interface MvxXportalQrCodePreloader { - class?: string; - } - interface IntrinsicElements { - 'mvx-address-table': MvxAddressTable; - 'mvx-arc-extension-provider-icon': MvxArcExtensionProviderIcon; - 'mvx-arrow-right-icon': MvxArrowRightIcon; - 'mvx-brave-extension-provider-icon': MvxBraveExtensionProviderIcon; - 'mvx-button': MvxButton; - 'mvx-circle-info-icon': MvxCircleInfoIcon; - 'mvx-copy-button': MvxCopyButton; - 'mvx-custom-toast': MvxCustomToast; - 'mvx-data-with-explorer-link': MvxDataWithExplorerLink; - 'mvx-default-transaction-icon-large': MvxDefaultTransactionIconLarge; - 'mvx-default-transaction-icon-small': MvxDefaultTransactionIconSmall; - 'mvx-edge-extension-provider-icon': MvxEdgeExtensionProviderIcon; - 'mvx-explorer-link': MvxExplorerLink; - 'mvx-extension-provider-icon': MvxExtensionProviderIcon; - 'mvx-firefox-extension-provider-icon': MvxFirefoxExtensionProviderIcon; - 'mvx-format-amount': MvxFormatAmount; - 'mvx-generic-toast': MvxGenericToast; - 'mvx-ledger-confirm': MvxLedgerConfirm; - 'mvx-ledger-connect': MvxLedgerConnect; - 'mvx-ledger-icon': MvxLedgerIcon; - 'mvx-ledger-intro': MvxLedgerIntro; - 'mvx-ledger-provider-icon': MvxLedgerProviderIcon; - 'mvx-magnifying-glass-icon': MvxMagnifyingGlassIcon; - 'mvx-metamask-provider-icon': MvxMetamaskProviderIcon; - 'mvx-multiversx-logo-icon': MvxMultiversxLogoIcon; - 'mvx-multiversx-symbol-icon': MvxMultiversxSymbolIcon; - 'mvx-notifications-feed': MvxNotificationsFeed; - 'mvx-pagination': MvxPagination; - 'mvx-pagination-ellipsis': MvxPaginationEllipsis; - 'mvx-pagination-ellipsis-form': MvxPaginationEllipsisForm; - 'mvx-passkey-provider-icon': MvxPasskeyProviderIcon; - 'mvx-pending-transactions-panel': MvxPendingTransactionsPanel; - 'mvx-preloader': MvxPreloader; - 'mvx-side-panel': MvxSidePanel; - 'mvx-side-panel-header': MvxSidePanelHeader; - 'mvx-side-panel-swiper': MvxSidePanelSwiper; - 'mvx-sign-transactions-panel': MvxSignTransactionsPanel; - 'mvx-simple-toast': MvxSimpleToast; - 'mvx-spinner-icon': MvxSpinnerIcon; - 'mvx-toast-list': MvxToastList; - 'mvx-tooltip': MvxTooltip; - 'mvx-transaction-list-item': MvxTransactionListItem; - 'mvx-transaction-toast': MvxTransactionToast; - 'mvx-transaction-toast-content': MvxTransactionToastContent; - 'mvx-transaction-toast-details': MvxTransactionToastDetails; - 'mvx-transaction-toast-details-body': MvxTransactionToastDetailsBody; - 'mvx-transaction-toast-progress': MvxTransactionToastProgress; - 'mvx-transactions-table': MvxTransactionsTable; - 'mvx-trim': MvxTrim; - 'mvx-unlock-button': MvxUnlockButton; - 'mvx-unlock-panel': MvxUnlockPanel; - 'mvx-wallet-connect': MvxWalletConnect; - 'mvx-wallet-connect-app-gallery-icon': MvxWalletConnectAppGalleryIcon; - 'mvx-wallet-connect-app-store-icon': MvxWalletConnectAppStoreIcon; - 'mvx-wallet-connect-download': MvxWalletConnectDownload; - 'mvx-wallet-connect-google-play-icon': MvxWalletConnectGooglePlayIcon; - 'mvx-wallet-connect-scan': MvxWalletConnectScan; - 'mvx-wallet-provider-icon': MvxWalletProviderIcon; - 'mvx-xportal-download-qr-icon': MvxXportalDownloadQrIcon; - 'mvx-xportal-qr-code-preloader': MvxXportalQrCodePreloader; - } + interface MvxAddressTable { + "accountScreenData"?: IAddressTableData; + "onAccessWallet"?: (event: MvxAddressTableCustomEvent) => void; + "onPageChange"?: (event: MvxAddressTableCustomEvent) => void; + "onSelectAccount"?: (event: MvxAddressTableCustomEvent) => void; + "selectedIndex"?: number; + } + interface MvxArcExtensionProviderIcon { + "class"?: string; + "height"?: number; + "width"?: number; + } + interface MvxArrowRightIcon { + "class"?: string; + } + interface MvxBraveExtensionProviderIcon { + "class"?: string; + "height"?: number; + "width"?: number; + } + interface MvxButton { + /** + * @default '' + */ + "class"?: string; + /** + * @default '' + */ + "dataTestId"?: string; + /** + * @default false + */ + "disabled"?: boolean; + "onButtonClick"?: (event: MvxButtonCustomEvent) => void; + /** + * @default 'large' + */ + "size"?: `${ButtonSizeEnum}`; + /** + * @default 'primary' + */ + "variant"?: `${ButtonVariantEnum}`; + } + interface MvxCircleInfoIcon { + "class"?: string; + } + interface MvxCopyButton { + "class"?: string; + "iconClass"?: string; + "text"?: string; + } + interface MvxCustomToast { + "onDeleteToast"?: (event: MvxCustomToastCustomEvent) => void; + "toast"?: IComponentToast; + } + interface MvxDataWithExplorerLink { + "class"?: string; + "data"?: string; + "dataTestId"?: string; + "explorerLink"?: string; + /** + * @default true + */ + "showCopyButton"?: boolean; + /** + * @default true + */ + "showExplorerButton"?: boolean; + /** + * @default false + */ + "withTooltip"?: boolean; + } + interface MvxDefaultTransactionIconLarge { + "class"?: string; + } + interface MvxDefaultTransactionIconSmall { + "class"?: string; + } + interface MvxEdgeExtensionProviderIcon { + "class"?: string; + "height"?: number; + "width"?: number; + } + interface MvxExplorerLink { + "class"?: string; + "dataTestId"?: string; + "iconClass"?: string; + "link"?: string; + } + interface MvxExtensionProviderIcon { + "class"?: string; + "height"?: number; + "width"?: number; + } + interface MvxFirefoxExtensionProviderIcon { + "class"?: string; + "height"?: number; + "width"?: number; + } + interface MvxFormatAmount { + "class"?: string; + "dataTestId"?: string; + "decimalClass"?: string; + "isValid"?: boolean; + "label"?: string; + "labelClass"?: string; + /** + * @default true + */ + "showLabel"?: boolean; + "valueDecimal"?: string; + "valueInteger"?: string; + } + interface MvxGenericToast { + "onDeleteToast"?: (event: MvxGenericToastCustomEvent) => void; + "toast"?: CustomToastType; + } + interface MvxLedgerConfirm { + "confirmScreenData"?: IConfirmScreenData; + } + interface MvxLedgerConnect { + /** + * @default { accountScreenData: null, confirmScreenData: null, connectScreenData: {}, } + */ + "data"?: ILedgerConnectPanelData; + } + interface MvxLedgerIcon { + "class"?: string; + } + interface MvxLedgerIntro { + "connectScreenData"?: IConnectScreenData; + /** + * @default false + */ + "isAwaiting"?: boolean; + "onConnect"?: (event: MvxLedgerIntroCustomEvent) => void; + } + interface MvxLedgerProviderIcon { + "class"?: string; + } + interface MvxMagnifyingGlassIcon { + "class"?: string; + } + interface MvxMetamaskProviderIcon { + "class"?: string; + } + interface MvxMultiversxLogoIcon { + "class"?: string; + } + interface MvxMultiversxSymbolIcon { + "class"?: string; + } + interface MvxNotificationsFeed { + } + interface MvxPagination { + "class"?: string; + /** + * @default 1 + */ + "currentPage"?: number; + /** + * @default false + */ + "isDisabled"?: boolean; + "onPageChange"?: (event: MvxPaginationCustomEvent) => void; + "totalPages"?: number; + } + interface MvxPaginationEllipsis { + /** + * @default false + */ + "isActive"?: boolean; + } + interface MvxPaginationEllipsisForm { + /** + * @default false + */ + "isVisible"?: boolean; + "maxPageToSearchFor"?: number; + "onSearch"?: (event: MvxPaginationEllipsisFormCustomEvent) => void; + } + interface MvxPasskeyProviderIcon { + "class"?: string; + } + interface MvxPendingTransactionsPanel { + } + interface MvxPreloader { + "class"?: string; + } + interface MvxSidePanel { + "hasBackButton"?: boolean; + /** + * @default false + */ + "isOpen"?: boolean; + "onBack"?: (event: MvxSidePanelCustomEvent) => void; + "onClose"?: (event: MvxSidePanelCustomEvent) => void; + "panelClassName"?: string; + "panelTitle"?: string; + /** + * @default true + */ + "showHeader"?: boolean; + } + interface MvxSidePanelHeader { + /** + * @default true + */ + "hasLeftButton"?: boolean; + /** + * @default true + */ + "hasRightButton"?: boolean; + "onLeftButtonClick"?: (event: MvxSidePanelHeaderCustomEvent) => void; + "onRightButtonClick"?: (event: MvxSidePanelHeaderCustomEvent) => void; + "panelClassName"?: string; + "panelTitle"?: string; + } + interface MvxSidePanelSwiper { + "onSheetDismiss"?: (event: MvxSidePanelSwiperCustomEvent) => void; + "onSheetSnapChange"?: (event: MvxSidePanelSwiperCustomEvent<{ index: number; snapPoint: string }>) => void; + /** + * @default false + */ + "open"?: boolean; + /** + * @default '' + */ + "sidePanelIdentifier"?: string; + } + interface MvxSignTransactionsPanel { + } + interface MvxSimpleToast { + "onDeleteToast"?: (event: MvxSimpleToastCustomEvent) => void; + "toast"?: ISimpleToast; + } + interface MvxSpinnerIcon { + "class"?: string; + } + interface MvxToastList { + } + interface MvxTooltip { + "class"?: string; + "onTriggerRender"?: (event: MvxTooltipCustomEvent) => void; + /** + * @default 'top' + */ + "position"?: 'top' | 'bottom'; + "trigger"?: HTMLElement; + /** + * @default false + */ + "triggerOnClick"?: boolean; + } + interface MvxTransactionListItem { + "transaction"?: ITransactionListItem; + } + interface MvxTransactionToast { + "fullWidth"?: boolean; + "onDeleteToast"?: (event: MvxTransactionToastCustomEvent) => void; + /** + * @default '' + */ + "processedTransactionsStatus"?: string | JSX.Element; + "toastDataState"?: IToastDataState; + /** + * @default '' + */ + "toastId"?: string; + "transactionProgressState"?: ITransactionProgressState; + /** + * @default [] + */ + "transactions"?: ITransactionListItem[]; + "wrapperClass"?: string; + } + interface MvxTransactionToastContent { + "fullWidth"?: boolean; + "onDeleteToast"?: (event: MvxTransactionToastContentCustomEvent) => void; + "processedTransactionsStatus"?: string | JSX.Element; + "toastDataState"?: IToastDataState; + "transactions"?: ITransactionListItem[]; + } + interface MvxTransactionToastDetails { + /** + * @default 5 + */ + "maxShownTransactions"?: number; + "processedTransactionsStatus"?: string | JSX.Element; + "transactionClass"?: string; + "transactions"?: ITransactionListItem[]; + } + interface MvxTransactionToastDetailsBody { + "hash"?: string; + "index"?: string; + "link"?: string; + "status"?: `${TransactionStatusEnum}`; + /** + * @default 'transaction-details-list-item' + */ + "transactionClass"?: string; + } + interface MvxTransactionToastProgress { + "endTime"?: number; + "isStatusPending"?: boolean; + "startTime"?: number; + "toastId"?: string; + } + interface MvxTransactionsTable { + "class"?: string; + "transactions"?: TransactionRowType[]; + } + interface MvxTrim { + "class"?: string; + /** + * @default DataTestIdsEnum.trim + */ + "dataTestId"?: string; + "text"?: string; + } + interface MvxUnlockButton { + "class"?: string; + "dataTestId"?: string; + "icon"?: HTMLElement; + "iconUrl"?: string; + "label"?: string; + "type"?: IProviderBase['type']; + } + interface MvxUnlockPanel { + } + interface MvxWalletConnect { + /** + * @default { wcURI: '' } + */ + "data"?: IWalletConnectPanelData; + /** + * @default '' + */ + "qrCodeSvg"?: string; + } + interface MvxWalletConnectAppGalleryIcon { + "class"?: string; + } + interface MvxWalletConnectAppStoreIcon { + "class"?: string; + } + interface MvxWalletConnectDownload { + "class"?: string; + } + interface MvxWalletConnectGooglePlayIcon { + "class"?: string; + } + interface MvxWalletConnectScan { + "class"?: string; + "onDownloadClick"?: (event: MvxWalletConnectScanCustomEvent) => void; + /** + * @default '' + */ + "qrCodeSvg"?: string; + /** + * @default '' + */ + "walletConnectDeepLink"?: string; + } + interface MvxWalletProviderIcon { + "class"?: string; + } + interface MvxXportalDownloadQrIcon { + /** + * @default '' + */ + "class"?: string; + } + interface MvxXportalQrCodePreloader { + "class"?: string; + } + interface IntrinsicElements { + "mvx-address-table": MvxAddressTable; + "mvx-arc-extension-provider-icon": MvxArcExtensionProviderIcon; + "mvx-arrow-right-icon": MvxArrowRightIcon; + "mvx-brave-extension-provider-icon": MvxBraveExtensionProviderIcon; + "mvx-button": MvxButton; + "mvx-circle-info-icon": MvxCircleInfoIcon; + "mvx-copy-button": MvxCopyButton; + "mvx-custom-toast": MvxCustomToast; + "mvx-data-with-explorer-link": MvxDataWithExplorerLink; + "mvx-default-transaction-icon-large": MvxDefaultTransactionIconLarge; + "mvx-default-transaction-icon-small": MvxDefaultTransactionIconSmall; + "mvx-edge-extension-provider-icon": MvxEdgeExtensionProviderIcon; + "mvx-explorer-link": MvxExplorerLink; + "mvx-extension-provider-icon": MvxExtensionProviderIcon; + "mvx-firefox-extension-provider-icon": MvxFirefoxExtensionProviderIcon; + "mvx-format-amount": MvxFormatAmount; + "mvx-generic-toast": MvxGenericToast; + "mvx-ledger-confirm": MvxLedgerConfirm; + "mvx-ledger-connect": MvxLedgerConnect; + "mvx-ledger-icon": MvxLedgerIcon; + "mvx-ledger-intro": MvxLedgerIntro; + "mvx-ledger-provider-icon": MvxLedgerProviderIcon; + "mvx-magnifying-glass-icon": MvxMagnifyingGlassIcon; + "mvx-metamask-provider-icon": MvxMetamaskProviderIcon; + "mvx-multiversx-logo-icon": MvxMultiversxLogoIcon; + "mvx-multiversx-symbol-icon": MvxMultiversxSymbolIcon; + "mvx-notifications-feed": MvxNotificationsFeed; + "mvx-pagination": MvxPagination; + "mvx-pagination-ellipsis": MvxPaginationEllipsis; + "mvx-pagination-ellipsis-form": MvxPaginationEllipsisForm; + "mvx-passkey-provider-icon": MvxPasskeyProviderIcon; + "mvx-pending-transactions-panel": MvxPendingTransactionsPanel; + "mvx-preloader": MvxPreloader; + "mvx-side-panel": MvxSidePanel; + "mvx-side-panel-header": MvxSidePanelHeader; + "mvx-side-panel-swiper": MvxSidePanelSwiper; + "mvx-sign-transactions-panel": MvxSignTransactionsPanel; + "mvx-simple-toast": MvxSimpleToast; + "mvx-spinner-icon": MvxSpinnerIcon; + "mvx-toast-list": MvxToastList; + "mvx-tooltip": MvxTooltip; + "mvx-transaction-list-item": MvxTransactionListItem; + "mvx-transaction-toast": MvxTransactionToast; + "mvx-transaction-toast-content": MvxTransactionToastContent; + "mvx-transaction-toast-details": MvxTransactionToastDetails; + "mvx-transaction-toast-details-body": MvxTransactionToastDetailsBody; + "mvx-transaction-toast-progress": MvxTransactionToastProgress; + "mvx-transactions-table": MvxTransactionsTable; + "mvx-trim": MvxTrim; + "mvx-unlock-button": MvxUnlockButton; + "mvx-unlock-panel": MvxUnlockPanel; + "mvx-wallet-connect": MvxWalletConnect; + "mvx-wallet-connect-app-gallery-icon": MvxWalletConnectAppGalleryIcon; + "mvx-wallet-connect-app-store-icon": MvxWalletConnectAppStoreIcon; + "mvx-wallet-connect-download": MvxWalletConnectDownload; + "mvx-wallet-connect-google-play-icon": MvxWalletConnectGooglePlayIcon; + "mvx-wallet-connect-scan": MvxWalletConnectScan; + "mvx-wallet-provider-icon": MvxWalletProviderIcon; + "mvx-xportal-download-qr-icon": MvxXportalDownloadQrIcon; + "mvx-xportal-qr-code-preloader": MvxXportalQrCodePreloader; + } } export { LocalJSX as JSX }; -declare module '@stencil/core' { - export namespace JSX { - interface IntrinsicElements { - 'mvx-address-table': LocalJSX.MvxAddressTable & JSXBase.HTMLAttributes; - 'mvx-arc-extension-provider-icon': LocalJSX.MvxArcExtensionProviderIcon & - JSXBase.HTMLAttributes; - 'mvx-arrow-right-icon': LocalJSX.MvxArrowRightIcon & JSXBase.HTMLAttributes; - 'mvx-brave-extension-provider-icon': LocalJSX.MvxBraveExtensionProviderIcon & - JSXBase.HTMLAttributes; - 'mvx-button': LocalJSX.MvxButton & JSXBase.HTMLAttributes; - 'mvx-circle-info-icon': LocalJSX.MvxCircleInfoIcon & JSXBase.HTMLAttributes; - 'mvx-copy-button': LocalJSX.MvxCopyButton & JSXBase.HTMLAttributes; - 'mvx-custom-toast': LocalJSX.MvxCustomToast & JSXBase.HTMLAttributes; - 'mvx-data-with-explorer-link': LocalJSX.MvxDataWithExplorerLink & - JSXBase.HTMLAttributes; - 'mvx-default-transaction-icon-large': LocalJSX.MvxDefaultTransactionIconLarge & - JSXBase.HTMLAttributes; - 'mvx-default-transaction-icon-small': LocalJSX.MvxDefaultTransactionIconSmall & - JSXBase.HTMLAttributes; - 'mvx-edge-extension-provider-icon': LocalJSX.MvxEdgeExtensionProviderIcon & - JSXBase.HTMLAttributes; - 'mvx-explorer-link': LocalJSX.MvxExplorerLink & JSXBase.HTMLAttributes; - 'mvx-extension-provider-icon': LocalJSX.MvxExtensionProviderIcon & - JSXBase.HTMLAttributes; - 'mvx-firefox-extension-provider-icon': LocalJSX.MvxFirefoxExtensionProviderIcon & - JSXBase.HTMLAttributes; - 'mvx-format-amount': LocalJSX.MvxFormatAmount & JSXBase.HTMLAttributes; - 'mvx-generic-toast': LocalJSX.MvxGenericToast & JSXBase.HTMLAttributes; - 'mvx-ledger-confirm': LocalJSX.MvxLedgerConfirm & JSXBase.HTMLAttributes; - 'mvx-ledger-connect': LocalJSX.MvxLedgerConnect & JSXBase.HTMLAttributes; - 'mvx-ledger-icon': LocalJSX.MvxLedgerIcon & JSXBase.HTMLAttributes; - 'mvx-ledger-intro': LocalJSX.MvxLedgerIntro & JSXBase.HTMLAttributes; - 'mvx-ledger-provider-icon': LocalJSX.MvxLedgerProviderIcon & - JSXBase.HTMLAttributes; - 'mvx-magnifying-glass-icon': LocalJSX.MvxMagnifyingGlassIcon & - JSXBase.HTMLAttributes; - 'mvx-metamask-provider-icon': LocalJSX.MvxMetamaskProviderIcon & - JSXBase.HTMLAttributes; - 'mvx-multiversx-logo-icon': LocalJSX.MvxMultiversxLogoIcon & - JSXBase.HTMLAttributes; - 'mvx-multiversx-symbol-icon': LocalJSX.MvxMultiversxSymbolIcon & - JSXBase.HTMLAttributes; - 'mvx-notifications-feed': LocalJSX.MvxNotificationsFeed & JSXBase.HTMLAttributes; - 'mvx-pagination': LocalJSX.MvxPagination & JSXBase.HTMLAttributes; - 'mvx-pagination-ellipsis': LocalJSX.MvxPaginationEllipsis & - JSXBase.HTMLAttributes; - 'mvx-pagination-ellipsis-form': LocalJSX.MvxPaginationEllipsisForm & - JSXBase.HTMLAttributes; - 'mvx-passkey-provider-icon': LocalJSX.MvxPasskeyProviderIcon & - JSXBase.HTMLAttributes; - 'mvx-pending-transactions-panel': LocalJSX.MvxPendingTransactionsPanel & - JSXBase.HTMLAttributes; - 'mvx-preloader': LocalJSX.MvxPreloader & JSXBase.HTMLAttributes; - 'mvx-side-panel': LocalJSX.MvxSidePanel & JSXBase.HTMLAttributes; - 'mvx-side-panel-header': LocalJSX.MvxSidePanelHeader & JSXBase.HTMLAttributes; - 'mvx-side-panel-swiper': LocalJSX.MvxSidePanelSwiper & JSXBase.HTMLAttributes; - 'mvx-sign-transactions-panel': LocalJSX.MvxSignTransactionsPanel & - JSXBase.HTMLAttributes; - 'mvx-simple-toast': LocalJSX.MvxSimpleToast & JSXBase.HTMLAttributes; - 'mvx-spinner-icon': LocalJSX.MvxSpinnerIcon & JSXBase.HTMLAttributes; - 'mvx-toast-list': LocalJSX.MvxToastList & JSXBase.HTMLAttributes; - 'mvx-tooltip': LocalJSX.MvxTooltip & JSXBase.HTMLAttributes; - 'mvx-transaction-list-item': LocalJSX.MvxTransactionListItem & - JSXBase.HTMLAttributes; - 'mvx-transaction-toast': LocalJSX.MvxTransactionToast & JSXBase.HTMLAttributes; - 'mvx-transaction-toast-content': LocalJSX.MvxTransactionToastContent & - JSXBase.HTMLAttributes; - 'mvx-transaction-toast-details': LocalJSX.MvxTransactionToastDetails & - JSXBase.HTMLAttributes; - 'mvx-transaction-toast-details-body': LocalJSX.MvxTransactionToastDetailsBody & - JSXBase.HTMLAttributes; - 'mvx-transaction-toast-progress': LocalJSX.MvxTransactionToastProgress & - JSXBase.HTMLAttributes; - 'mvx-transactions-table': LocalJSX.MvxTransactionsTable & JSXBase.HTMLAttributes; - 'mvx-trim': LocalJSX.MvxTrim & JSXBase.HTMLAttributes; - 'mvx-unlock-button': LocalJSX.MvxUnlockButton & JSXBase.HTMLAttributes; - 'mvx-unlock-panel': LocalJSX.MvxUnlockPanel & JSXBase.HTMLAttributes; - 'mvx-wallet-connect': LocalJSX.MvxWalletConnect & JSXBase.HTMLAttributes; - 'mvx-wallet-connect-app-gallery-icon': LocalJSX.MvxWalletConnectAppGalleryIcon & - JSXBase.HTMLAttributes; - 'mvx-wallet-connect-app-store-icon': LocalJSX.MvxWalletConnectAppStoreIcon & - JSXBase.HTMLAttributes; - 'mvx-wallet-connect-download': LocalJSX.MvxWalletConnectDownload & - JSXBase.HTMLAttributes; - 'mvx-wallet-connect-google-play-icon': LocalJSX.MvxWalletConnectGooglePlayIcon & - JSXBase.HTMLAttributes; - 'mvx-wallet-connect-scan': LocalJSX.MvxWalletConnectScan & - JSXBase.HTMLAttributes; - 'mvx-wallet-provider-icon': LocalJSX.MvxWalletProviderIcon & - JSXBase.HTMLAttributes; - 'mvx-xportal-download-qr-icon': LocalJSX.MvxXportalDownloadQrIcon & - JSXBase.HTMLAttributes; - 'mvx-xportal-qr-code-preloader': LocalJSX.MvxXportalQrCodePreloader & - JSXBase.HTMLAttributes; - } - } +declare module "@stencil/core" { + export namespace JSX { + interface IntrinsicElements { + "mvx-address-table": LocalJSX.MvxAddressTable & JSXBase.HTMLAttributes; + "mvx-arc-extension-provider-icon": LocalJSX.MvxArcExtensionProviderIcon & JSXBase.HTMLAttributes; + "mvx-arrow-right-icon": LocalJSX.MvxArrowRightIcon & JSXBase.HTMLAttributes; + "mvx-brave-extension-provider-icon": LocalJSX.MvxBraveExtensionProviderIcon & JSXBase.HTMLAttributes; + "mvx-button": LocalJSX.MvxButton & JSXBase.HTMLAttributes; + "mvx-circle-info-icon": LocalJSX.MvxCircleInfoIcon & JSXBase.HTMLAttributes; + "mvx-copy-button": LocalJSX.MvxCopyButton & JSXBase.HTMLAttributes; + "mvx-custom-toast": LocalJSX.MvxCustomToast & JSXBase.HTMLAttributes; + "mvx-data-with-explorer-link": LocalJSX.MvxDataWithExplorerLink & JSXBase.HTMLAttributes; + "mvx-default-transaction-icon-large": LocalJSX.MvxDefaultTransactionIconLarge & JSXBase.HTMLAttributes; + "mvx-default-transaction-icon-small": LocalJSX.MvxDefaultTransactionIconSmall & JSXBase.HTMLAttributes; + "mvx-edge-extension-provider-icon": LocalJSX.MvxEdgeExtensionProviderIcon & JSXBase.HTMLAttributes; + "mvx-explorer-link": LocalJSX.MvxExplorerLink & JSXBase.HTMLAttributes; + "mvx-extension-provider-icon": LocalJSX.MvxExtensionProviderIcon & JSXBase.HTMLAttributes; + "mvx-firefox-extension-provider-icon": LocalJSX.MvxFirefoxExtensionProviderIcon & JSXBase.HTMLAttributes; + "mvx-format-amount": LocalJSX.MvxFormatAmount & JSXBase.HTMLAttributes; + "mvx-generic-toast": LocalJSX.MvxGenericToast & JSXBase.HTMLAttributes; + "mvx-ledger-confirm": LocalJSX.MvxLedgerConfirm & JSXBase.HTMLAttributes; + "mvx-ledger-connect": LocalJSX.MvxLedgerConnect & JSXBase.HTMLAttributes; + "mvx-ledger-icon": LocalJSX.MvxLedgerIcon & JSXBase.HTMLAttributes; + "mvx-ledger-intro": LocalJSX.MvxLedgerIntro & JSXBase.HTMLAttributes; + "mvx-ledger-provider-icon": LocalJSX.MvxLedgerProviderIcon & JSXBase.HTMLAttributes; + "mvx-magnifying-glass-icon": LocalJSX.MvxMagnifyingGlassIcon & JSXBase.HTMLAttributes; + "mvx-metamask-provider-icon": LocalJSX.MvxMetamaskProviderIcon & JSXBase.HTMLAttributes; + "mvx-multiversx-logo-icon": LocalJSX.MvxMultiversxLogoIcon & JSXBase.HTMLAttributes; + "mvx-multiversx-symbol-icon": LocalJSX.MvxMultiversxSymbolIcon & JSXBase.HTMLAttributes; + "mvx-notifications-feed": LocalJSX.MvxNotificationsFeed & JSXBase.HTMLAttributes; + "mvx-pagination": LocalJSX.MvxPagination & JSXBase.HTMLAttributes; + "mvx-pagination-ellipsis": LocalJSX.MvxPaginationEllipsis & JSXBase.HTMLAttributes; + "mvx-pagination-ellipsis-form": LocalJSX.MvxPaginationEllipsisForm & JSXBase.HTMLAttributes; + "mvx-passkey-provider-icon": LocalJSX.MvxPasskeyProviderIcon & JSXBase.HTMLAttributes; + "mvx-pending-transactions-panel": LocalJSX.MvxPendingTransactionsPanel & JSXBase.HTMLAttributes; + "mvx-preloader": LocalJSX.MvxPreloader & JSXBase.HTMLAttributes; + "mvx-side-panel": LocalJSX.MvxSidePanel & JSXBase.HTMLAttributes; + "mvx-side-panel-header": LocalJSX.MvxSidePanelHeader & JSXBase.HTMLAttributes; + "mvx-side-panel-swiper": LocalJSX.MvxSidePanelSwiper & JSXBase.HTMLAttributes; + "mvx-sign-transactions-panel": LocalJSX.MvxSignTransactionsPanel & JSXBase.HTMLAttributes; + "mvx-simple-toast": LocalJSX.MvxSimpleToast & JSXBase.HTMLAttributes; + "mvx-spinner-icon": LocalJSX.MvxSpinnerIcon & JSXBase.HTMLAttributes; + "mvx-toast-list": LocalJSX.MvxToastList & JSXBase.HTMLAttributes; + "mvx-tooltip": LocalJSX.MvxTooltip & JSXBase.HTMLAttributes; + "mvx-transaction-list-item": LocalJSX.MvxTransactionListItem & JSXBase.HTMLAttributes; + "mvx-transaction-toast": LocalJSX.MvxTransactionToast & JSXBase.HTMLAttributes; + "mvx-transaction-toast-content": LocalJSX.MvxTransactionToastContent & JSXBase.HTMLAttributes; + "mvx-transaction-toast-details": LocalJSX.MvxTransactionToastDetails & JSXBase.HTMLAttributes; + "mvx-transaction-toast-details-body": LocalJSX.MvxTransactionToastDetailsBody & JSXBase.HTMLAttributes; + "mvx-transaction-toast-progress": LocalJSX.MvxTransactionToastProgress & JSXBase.HTMLAttributes; + "mvx-transactions-table": LocalJSX.MvxTransactionsTable & JSXBase.HTMLAttributes; + "mvx-trim": LocalJSX.MvxTrim & JSXBase.HTMLAttributes; + "mvx-unlock-button": LocalJSX.MvxUnlockButton & JSXBase.HTMLAttributes; + "mvx-unlock-panel": LocalJSX.MvxUnlockPanel & JSXBase.HTMLAttributes; + "mvx-wallet-connect": LocalJSX.MvxWalletConnect & JSXBase.HTMLAttributes; + "mvx-wallet-connect-app-gallery-icon": LocalJSX.MvxWalletConnectAppGalleryIcon & JSXBase.HTMLAttributes; + "mvx-wallet-connect-app-store-icon": LocalJSX.MvxWalletConnectAppStoreIcon & JSXBase.HTMLAttributes; + "mvx-wallet-connect-download": LocalJSX.MvxWalletConnectDownload & JSXBase.HTMLAttributes; + "mvx-wallet-connect-google-play-icon": LocalJSX.MvxWalletConnectGooglePlayIcon & JSXBase.HTMLAttributes; + "mvx-wallet-connect-scan": LocalJSX.MvxWalletConnectScan & JSXBase.HTMLAttributes; + "mvx-wallet-provider-icon": LocalJSX.MvxWalletProviderIcon & JSXBase.HTMLAttributes; + "mvx-xportal-download-qr-icon": LocalJSX.MvxXportalDownloadQrIcon & JSXBase.HTMLAttributes; + "mvx-xportal-qr-code-preloader": LocalJSX.MvxXportalQrCodePreloader & JSXBase.HTMLAttributes; + } + } } diff --git a/src/components/functional/toasts-list/toast-list.scss b/src/components/functional/toasts-list/toast-list.scss index 303d524c..4af30d00 100644 --- a/src/components/functional/toasts-list/toast-list.scss +++ b/src/components/functional/toasts-list/toast-list.scss @@ -18,9 +18,11 @@ } .view-all-button-container { - @apply mvx:absolute mvx:-bottom-12 mvx:right-0 mvx:z-1; + @apply mvx:absolute mvx:-bottom-12 mvx:right-0 mvx:z-1 mvx:flex; } +.minimize-button, +.maximize-button, .view-all-button { @apply mvx:backdrop-blur-2xl mvx:py-2 mvx:px-4 mvx:text-base mvx:font-normal mvx:leading-6 mvx:cursor-pointer; @apply mvx:ease-in-out mvx:transition-opacity mvx:duration-200; @@ -28,6 +30,7 @@ border: 2px solid var(--mvx-border-color-secondary); background: var(--mvx-bg-color-primary); color: var(--mvx-text-color-primary); + min-height: 44px; &:hover { @apply mvx:opacity-80; diff --git a/src/components/functional/toasts-list/toast-list.tsx b/src/components/functional/toasts-list/toast-list.tsx index 0e786b0a..21079beb 100644 --- a/src/components/functional/toasts-list/toast-list.tsx +++ b/src/components/functional/toasts-list/toast-list.tsx @@ -1,4 +1,6 @@ import { Component, h, Method, State } from '@stencil/core'; +import { Icon } from 'common/Icon'; +import { IconNamesEnum } from 'common/Icon/icon.types'; import { ConnectionMonitor } from 'utils/ConnectionMonitor'; import type { IEventBus } from 'utils/EventBus'; import { EventBus } from 'utils/EventBus'; @@ -18,6 +20,7 @@ export class ToastList { @State() transactionToasts: ITransactionToast[] = []; @State() customToasts: CustomToastType[] = []; @State() isVisible: boolean = true; + @State() isMinimized: boolean = false; @Method() async getEventBus() { @@ -80,24 +83,40 @@ export class ToastList { this.customToasts = [...payload]; }; + private readonly toggleMinimize = () => { + this.isMinimized = !this.isMinimized; + }; + private resetState() { this.transactionToasts = []; this.customToasts = []; this.isVisible = true; + this.isMinimized = false; } render() { const hasTransactionToasts = this.transactionToasts?.length > 0; + const toastListClasses = { + 'toast-list': true, + 'toast-list-bottom': hasTransactionToasts, + 'hidden': !this.isVisible, + }; + + if (this.isMinimized && hasTransactionToasts) { + return ( +
+
+ +
+
+ ); + } + return ( -
+
{this.customToasts?.map(toast => ( this.handleCustomToastDelete(toast.toastId)} /> ))} @@ -108,6 +127,9 @@ export class ToastList { {hasTransactionToasts && (
+ From 0db2a31a80b46a48d056b2ff7b0ad2a16977ae6a Mon Sep 17 00:00:00 2001 From: Iulia Cimpeanu <72752718+iuliacimpeanu@users.noreply.github.com> Date: Thu, 27 Nov 2025 15:52:55 +0200 Subject: [PATCH 04/10] Fixed trimmed address not showing in address-table (#273) * Fixed addresses not showing * Fix issue with trimWrapperVisible * Fixed unlockPanelFooter styles * Updated Trim * Updated Trim * Updated changelog --------- Co-authored-by: Gavrila Andrei --- CHANGELOG.md | 1 + src/common/Trim/trim.styles.ts | 2 +- src/components/common/button/button.tsx | 5 +++++ .../components/UnlockPanelFooter/unlockPanelFooter.styles.ts | 2 +- src/components/functional/unlock-panel/unlock-panel.types.ts | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1aabfb4b..829cefe5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- [Fixed trimmed address not showing in address-table](https://github.com/multiversx/mx-sdk-dapp-ui/pull/273) - [Added minimize/maximize action for toasts](https://github.com/multiversx/mx-sdk-dapp-ui/pull/272) - [Eslint and prettierrc fixes](https://github.com/multiversx/mx-sdk-dapp-ui/pull/270) - [Refactored sign transactions panel internal components](https://github.com/multiversx/mx-sdk-dapp-ui/pull/267) diff --git a/src/common/Trim/trim.styles.ts b/src/common/Trim/trim.styles.ts index bd8b8b76..3965d338 100644 --- a/src/common/Trim/trim.styles.ts +++ b/src/common/Trim/trim.styles.ts @@ -4,7 +4,7 @@ export default { trimFull: 'trim-full mvx:text-transparent mvx:absolute mvx:leading-5', trimFullVisible: 'trim-full-visible mvx:!text-inherit mvx:relative mvx:leading-5', trimWrapper: 'trim-wrapper mvx:hidden', - trimWrapperVisible: 'trim-wrapper-visible mvx:overflow-hidden mvx:max-w-full mvx:flex', + trimWrapperVisible: 'trim-wrapper-visible mvx:overflow-hidden mvx:max-w-full mvx:!flex', trimEllipsisWrapper: 'trim-ellipsis-wrapper mvx:block mvx:flex-shrink-0 mvx:pointer-events-none mvx:select-none', trimEllipsis: 'trim-ellipsis mvx:block mvx:leading-5', trimLeftWrapper: 'trim-left-wrapper mvx:flex-shrink mvx:text-ellipsis mvx:overflow-hidden mvx:text-left mvx:text-[1px]', diff --git a/src/components/common/button/button.tsx b/src/components/common/button/button.tsx index 1790791e..20faf20c 100644 --- a/src/components/common/button/button.tsx +++ b/src/components/common/button/button.tsx @@ -18,6 +18,10 @@ export class Button { @Prop() size?: `${ButtonSizeEnum}` = 'large'; @Prop() variant?: `${ButtonVariantEnum}` = 'primary'; + private handleClick = (event: MouseEvent) => { + this.buttonClick.emit(event); + }; + render() { return ( diff --git a/src/components/functional/unlock-panel/components/UnlockPanelFooter/unlockPanelFooter.styles.ts b/src/components/functional/unlock-panel/components/UnlockPanelFooter/unlockPanelFooter.styles.ts index 2f41319b..b6e55d01 100644 --- a/src/components/functional/unlock-panel/components/UnlockPanelFooter/unlockPanelFooter.styles.ts +++ b/src/components/functional/unlock-panel/components/UnlockPanelFooter/unlockPanelFooter.styles.ts @@ -1,7 +1,7 @@ // prettier-ignore export default { unlockButton: 'unlock-panel-footer-icon mvx:text-primary mvx:w-4 mvx:h-auto mvx:hidden mvx:xs:flex mvx:ml-auto mvx:mt-auto', - unlockPanelFooter: 'unlock-panel-footer mvx:mt-auto mvx:flex mvx:cursor-pointer mvx:relative mvx:p-6 mvx:z-1 mvx:rounded-2xl mvx:overflow-hidden mvx:border mvx:border-outline mvx:bg-emphasize mvx:shadow-[0px_-8px_12px_12px_surface] group', + unlockPanelFooter: 'unlock-panel-footer mvx:mt-auto mvx:flex mvx:cursor-pointer mvx:relative mvx:p-6 mvx:z-1 mvx:rounded-2xl mvx:border mvx:border-outline mvx:bg-emphasize mvx:shadow-[0px_-8px_12px_12px_surface] group', unlockPanelFooterImage: 'unlock-panel-footer-image mvx:pointer-events-none mvx:-mt-8 mvx:mr-12 mvx:-mb-8 mvx:-ml-20 mvx:hidden mvx:max-h-48 mvx:xs:flex', unlockPanelFooterWrapper: 'unlock-panel-footer-wrapper mvx:flex mvx:flex-col mvx:transition-all mvx:duration-200 mvx:gap-2 mvx:flex-1 mvx:ease-in-out mvx:xs:gap-4 group-hover:mvx:opacity-75', unlockPanelFooterTitle: 'unlock-panel-footer-title mvx:font-medium mvx:leading-none mvx:text-base mvx:text-primary mvx:xs:pt-4 mvx:xs:text-xl', diff --git a/src/components/functional/unlock-panel/unlock-panel.types.ts b/src/components/functional/unlock-panel/unlock-panel.types.ts index 86882693..99a97fb1 100644 --- a/src/components/functional/unlock-panel/unlock-panel.types.ts +++ b/src/components/functional/unlock-panel/unlock-panel.types.ts @@ -1,4 +1,4 @@ -import type { IProviderBase } from 'components'; +import { IProviderBase } from "types/provider.types"; // Extend the Window interface globally to include custom properties export interface ExtendedWindow extends Window { From c4d0de3f7286d6d9d195d7d459d772c223c4d3c6 Mon Sep 17 00:00:00 2001 From: Iulia Cimpeanu <72752718+iuliacimpeanu@users.noreply.github.com> Date: Fri, 5 Dec 2025 15:25:55 +0200 Subject: [PATCH 05/10] Refactored side panel components (#271) * Update styles * Refactored sign transactions footer * Refactored copy button * Refactored button component * Refactored tooltip component * Refactored spinner icon component * Refactored arrow right component * Updated copy button * Updated styles * Refactored sign transactions overview * Refactored sign-transactions-advanced and sign-transactions-header * Updated styles * Updated styles * Fixed test * Updated changelog * Updated changelog * Updated files * Fixes after review * Fixes after review * Updates files location * Refactored side-panel-header comp * Refactored side-panel comp * Refactored side-panel-swipper styles * Refactored side panel swiper component. * Updated components * Updated styles * Updated changelog * Fixed test * Fixes after review --- CHANGELOG.md | 1 + .../ProviderIdleScreen/ProviderIdleScreen.tsx | 5 +- src/components.d.ts | 180 ------------ .../common/unlock-button/unlock-button.tsx | 28 -- .../format-amount/format-amount.scss | 0 .../format-amount/format-amount.tsx | 0 .../format-amount/tests/format-amount.spec.ts | 0 .../ledger-connect/ledger-connect.tsx | 7 +- .../notifications-feed.scss | 4 +- .../notifications-feed/notifications-feed.tsx | 8 +- .../pending-transactions-panel.scss | 2 +- .../pending-transactions-panel.tsx | 11 +- .../tests/pending-transactions-panel.e2e.ts | 7 +- .../sign-transactions-panel.scss | 2 +- .../sign-transactions-panel.tsx | 7 +- .../functional/unlock-panel/unlock-panel.scss | 2 +- .../functional/unlock-panel/unlock-panel.tsx | 7 +- .../wallet-connect/wallet-connect.tsx | 11 +- src/components/visual/SidePanel/SidePanel.tsx | 87 ++++++ .../SidePanelHeader/SidePanelHeader.tsx | 59 ++++ .../SidePanelSwiper/SidePanelSwiper.tsx | 257 ++++++++++++++++++ .../SidePanelSwiper/sidePanelSwiper.styles.ts | 13 + .../helpers/handleSidePanelOpenChange.ts | 10 + .../sidePanel.constants.ts} | 0 .../visual/SidePanel/sidePanel.styles.ts | 8 + .../visual/SidePanel/sidePanelStore.ts | 23 ++ .../{common => visual}/button/button.scss | 0 .../button/button.stories.tsx | 0 .../{common => visual}/button/button.tsx | 0 .../copy-button/copy-button.stories.tsx | 0 .../copy-button/copy-button.tsx | 0 .../copy-button/tests/copy-button.spec.ts | 0 .../tests/data-with-explorer-link.spec.ts | 6 +- .../explorer-link/explorer-link.scss | 0 .../explorer-link/explorer-link.stories.tsx | 0 .../explorer-link/explorer-link.tsx | 0 .../explorer-link/tests/explorer-link.spec.ts | 0 .../side-panel-header/side-panel-header.scss | 39 --- .../side-panel-header/side-panel-header.tsx | 61 ----- .../side-panel-swiper/side-panel-swiper.scss | 93 ------- .../side-panel-swiper/side-panel-swiper.tsx | 248 ----------------- .../visual/side-panel/side-panel.scss | 70 ----- .../visual/side-panel/side-panel.tsx | 105 ------- .../{common => visual}/tooltip/tooltip.scss | 0 .../{common => visual}/tooltip/tooltip.tsx | 0 .../trim/tests/trim.e2e.tsx | 0 .../{common => visual}/trim/trim.scss | 0 .../{common => visual}/trim/trim.stories.tsx | 0 .../{common => visual}/trim/trim.tsx | 0 49 files changed, 503 insertions(+), 858 deletions(-) delete mode 100644 src/components/common/unlock-button/unlock-button.tsx rename src/components/{common => controlled}/format-amount/format-amount.scss (100%) rename src/components/{common => controlled}/format-amount/format-amount.tsx (100%) rename src/components/{common => controlled}/format-amount/tests/format-amount.spec.ts (100%) create mode 100644 src/components/visual/SidePanel/SidePanel.tsx create mode 100644 src/components/visual/SidePanel/components/SidePanelHeader/SidePanelHeader.tsx create mode 100644 src/components/visual/SidePanel/components/SidePanelSwiper/SidePanelSwiper.tsx create mode 100644 src/components/visual/SidePanel/components/SidePanelSwiper/sidePanelSwiper.styles.ts create mode 100644 src/components/visual/SidePanel/helpers/handleSidePanelOpenChange.ts rename src/components/visual/{side-panel/side-panel.constants.ts => SidePanel/sidePanel.constants.ts} (100%) create mode 100644 src/components/visual/SidePanel/sidePanel.styles.ts create mode 100644 src/components/visual/SidePanel/sidePanelStore.ts rename src/components/{common => visual}/button/button.scss (100%) rename src/components/{common => visual}/button/button.stories.tsx (100%) rename src/components/{common => visual}/button/button.tsx (100%) rename src/components/{common => visual}/copy-button/copy-button.stories.tsx (100%) rename src/components/{common => visual}/copy-button/copy-button.tsx (100%) rename src/components/{common => visual}/copy-button/tests/copy-button.spec.ts (100%) rename src/components/{common => visual}/explorer-link/explorer-link.scss (100%) rename src/components/{common => visual}/explorer-link/explorer-link.stories.tsx (100%) rename src/components/{common => visual}/explorer-link/explorer-link.tsx (100%) rename src/components/{common => visual}/explorer-link/tests/explorer-link.spec.ts (100%) delete mode 100644 src/components/visual/side-panel/components/side-panel-header/side-panel-header.scss delete mode 100644 src/components/visual/side-panel/components/side-panel-header/side-panel-header.tsx delete mode 100644 src/components/visual/side-panel/components/side-panel-swiper/side-panel-swiper.scss delete mode 100644 src/components/visual/side-panel/components/side-panel-swiper/side-panel-swiper.tsx delete mode 100644 src/components/visual/side-panel/side-panel.scss delete mode 100644 src/components/visual/side-panel/side-panel.tsx rename src/components/{common => visual}/tooltip/tooltip.scss (100%) rename src/components/{common => visual}/tooltip/tooltip.tsx (100%) rename src/components/{common => visual}/trim/tests/trim.e2e.tsx (100%) rename src/components/{common => visual}/trim/trim.scss (100%) rename src/components/{common => visual}/trim/trim.stories.tsx (100%) rename src/components/{common => visual}/trim/trim.tsx (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 829cefe5..917f1784 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- [Refactored side panel components](https://github.com/multiversx/mx-sdk-dapp-ui/pull/271) - [Fixed trimmed address not showing in address-table](https://github.com/multiversx/mx-sdk-dapp-ui/pull/273) - [Added minimize/maximize action for toasts](https://github.com/multiversx/mx-sdk-dapp-ui/pull/272) - [Eslint and prettierrc fixes](https://github.com/multiversx/mx-sdk-dapp-ui/pull/270) diff --git a/src/common/ProviderIdleScreen/ProviderIdleScreen.tsx b/src/common/ProviderIdleScreen/ProviderIdleScreen.tsx index 8c266ab1..93cbab78 100644 --- a/src/common/ProviderIdleScreen/ProviderIdleScreen.tsx +++ b/src/common/ProviderIdleScreen/ProviderIdleScreen.tsx @@ -4,6 +4,7 @@ import type { IProviderBase } from 'types/provider.types'; import { ProviderTypeEnum } from 'types/provider.types'; import { getProviderIntroText } from './helpers/getProviderIntroText'; +import { SidePanelHeader } from 'components/visual/SidePanel/components/SidePanelHeader/SidePanelHeader'; const styles = { container: 'mvx:flex mvx:flex-col mvx:flex-1 mvx:overflow-hidden', @@ -50,7 +51,7 @@ export function ProviderIdleScreen({ if (provider.type === ProviderTypeEnum.ledger) { return ( - + @@ -59,7 +60,7 @@ export function ProviderIdleScreen({ return (
- +
{providerIntroIcon}
diff --git a/src/components.d.ts b/src/components.d.ts index a9d86ead..390aed8c 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -16,7 +16,6 @@ import { ITransactionListItem as ITransactionListItem1 } from "./components/visu import { IToastDataState, ITransactionProgressState } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; import { TransactionStatusEnum } from "./constants/transactionStatus.enum"; import { TransactionRowType } from "./components/controlled/transactions-table/transactions-table.type"; -import { IProviderBase } from "./types/provider.types"; import { IEventBus as IEventBus1, unknown as IWalletConnectPanelData } from "./components.d"; export { IAddressTableData } from "./types/address-table.types"; export { ButtonSizeEnum, ButtonVariantEnum } from "./common/Button/button.types"; @@ -29,7 +28,6 @@ export { ITransactionListItem as ITransactionListItem1 } from "./components/visu export { IToastDataState, ITransactionProgressState } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; export { TransactionStatusEnum } from "./constants/transactionStatus.enum"; export { TransactionRowType } from "./components/controlled/transactions-table/transactions-table.type"; -export { IProviderBase } from "./types/provider.types"; export { IEventBus as IEventBus1, unknown as IWalletConnectPanelData } from "./components.d"; export namespace Components { interface MvxAddressTable { @@ -218,43 +216,6 @@ export namespace Components { interface MvxPreloader { "class"?: string; } - interface MvxSidePanel { - "hasBackButton"?: boolean; - /** - * @default false - */ - "isOpen": boolean; - "panelClassName"?: string; - "panelTitle": string; - /** - * @default true - */ - "showHeader"?: boolean; - } - interface MvxSidePanelHeader { - /** - * @default true - */ - "hasLeftButton"?: boolean; - /** - * @default true - */ - "hasRightButton"?: boolean; - "panelClassName"?: string; - "panelTitle": string; - } - interface MvxSidePanelSwiper { - "close": () => Promise; - /** - * @default false - */ - "open": boolean; - "openToSnapPoint": (snapIndex?: number) => Promise; - /** - * @default '' - */ - "sidePanelIdentifier": string; - } interface MvxSignTransactionsPanel { "closeWithAnimation": () => Promise; "getEventBus": () => Promise; @@ -344,14 +305,6 @@ export namespace Components { "dataTestId"?: string; "text": string; } - interface MvxUnlockButton { - "class"?: string; - "dataTestId"?: string; - "icon"?: HTMLElement; - "iconUrl": string; - "label": string; - "type"?: IProviderBase['type']; - } interface MvxUnlockPanel { "closeWithAnimation": () => Promise; "getEventBus": () => Promise; @@ -431,18 +384,6 @@ export interface MvxPaginationEllipsisFormCustomEvent extends CustomEvent detail: T; target: HTMLMvxPaginationEllipsisFormElement; } -export interface MvxSidePanelCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxSidePanelElement; -} -export interface MvxSidePanelHeaderCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxSidePanelHeaderElement; -} -export interface MvxSidePanelSwiperCustomEvent extends CustomEvent { - detail: T; - target: HTMLMvxSidePanelSwiperElement; -} export interface MvxSimpleToastCustomEvent extends CustomEvent { detail: T; target: HTMLMvxSimpleToastElement; @@ -741,60 +682,6 @@ declare global { prototype: HTMLMvxPreloaderElement; new (): HTMLMvxPreloaderElement; }; - interface HTMLMvxSidePanelElementEventMap { - "close": void; - "back": void; - } - interface HTMLMvxSidePanelElement extends Components.MvxSidePanel, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxSidePanelElement, ev: MvxSidePanelCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxSidePanelElement, ev: MvxSidePanelCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxSidePanelElement: { - prototype: HTMLMvxSidePanelElement; - new (): HTMLMvxSidePanelElement; - }; - interface HTMLMvxSidePanelHeaderElementEventMap { - "rightButtonClick": any; - "leftButtonClick": any; - } - interface HTMLMvxSidePanelHeaderElement extends Components.MvxSidePanelHeader, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxSidePanelHeaderElement, ev: MvxSidePanelHeaderCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxSidePanelHeaderElement, ev: MvxSidePanelHeaderCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxSidePanelHeaderElement: { - prototype: HTMLMvxSidePanelHeaderElement; - new (): HTMLMvxSidePanelHeaderElement; - }; - interface HTMLMvxSidePanelSwiperElementEventMap { - "sheetDismiss": void; - "sheetSnapChange": { index: number; snapPoint: string }; - } - interface HTMLMvxSidePanelSwiperElement extends Components.MvxSidePanelSwiper, HTMLStencilElement { - addEventListener(type: K, listener: (this: HTMLMvxSidePanelSwiperElement, ev: MvxSidePanelSwiperCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLMvxSidePanelSwiperElement, ev: MvxSidePanelSwiperCustomEvent) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; - } - var HTMLMvxSidePanelSwiperElement: { - prototype: HTMLMvxSidePanelSwiperElement; - new (): HTMLMvxSidePanelSwiperElement; - }; interface HTMLMvxSignTransactionsPanelElement extends Components.MvxSignTransactionsPanel, HTMLStencilElement { } var HTMLMvxSignTransactionsPanelElement: { @@ -917,12 +804,6 @@ declare global { prototype: HTMLMvxTrimElement; new (): HTMLMvxTrimElement; }; - interface HTMLMvxUnlockButtonElement extends Components.MvxUnlockButton, HTMLStencilElement { - } - var HTMLMvxUnlockButtonElement: { - prototype: HTMLMvxUnlockButtonElement; - new (): HTMLMvxUnlockButtonElement; - }; interface HTMLMvxUnlockPanelElement extends Components.MvxUnlockPanel, HTMLStencilElement { } var HTMLMvxUnlockPanelElement: { @@ -1028,9 +909,6 @@ declare global { "mvx-passkey-provider-icon": HTMLMvxPasskeyProviderIconElement; "mvx-pending-transactions-panel": HTMLMvxPendingTransactionsPanelElement; "mvx-preloader": HTMLMvxPreloaderElement; - "mvx-side-panel": HTMLMvxSidePanelElement; - "mvx-side-panel-header": HTMLMvxSidePanelHeaderElement; - "mvx-side-panel-swiper": HTMLMvxSidePanelSwiperElement; "mvx-sign-transactions-panel": HTMLMvxSignTransactionsPanelElement; "mvx-simple-toast": HTMLMvxSimpleToastElement; "mvx-spinner-icon": HTMLMvxSpinnerIconElement; @@ -1044,7 +922,6 @@ declare global { "mvx-transaction-toast-progress": HTMLMvxTransactionToastProgressElement; "mvx-transactions-table": HTMLMvxTransactionsTableElement; "mvx-trim": HTMLMvxTrimElement; - "mvx-unlock-button": HTMLMvxUnlockButtonElement; "mvx-unlock-panel": HTMLMvxUnlockPanelElement; "mvx-wallet-connect": HTMLMvxWalletConnectElement; "mvx-wallet-connect-app-gallery-icon": HTMLMvxWalletConnectAppGalleryIconElement; @@ -1248,47 +1125,6 @@ declare namespace LocalJSX { interface MvxPreloader { "class"?: string; } - interface MvxSidePanel { - "hasBackButton"?: boolean; - /** - * @default false - */ - "isOpen"?: boolean; - "onBack"?: (event: MvxSidePanelCustomEvent) => void; - "onClose"?: (event: MvxSidePanelCustomEvent) => void; - "panelClassName"?: string; - "panelTitle"?: string; - /** - * @default true - */ - "showHeader"?: boolean; - } - interface MvxSidePanelHeader { - /** - * @default true - */ - "hasLeftButton"?: boolean; - /** - * @default true - */ - "hasRightButton"?: boolean; - "onLeftButtonClick"?: (event: MvxSidePanelHeaderCustomEvent) => void; - "onRightButtonClick"?: (event: MvxSidePanelHeaderCustomEvent) => void; - "panelClassName"?: string; - "panelTitle"?: string; - } - interface MvxSidePanelSwiper { - "onSheetDismiss"?: (event: MvxSidePanelSwiperCustomEvent) => void; - "onSheetSnapChange"?: (event: MvxSidePanelSwiperCustomEvent<{ index: number; snapPoint: string }>) => void; - /** - * @default false - */ - "open"?: boolean; - /** - * @default '' - */ - "sidePanelIdentifier"?: string; - } interface MvxSignTransactionsPanel { } interface MvxSimpleToast { @@ -1379,14 +1215,6 @@ declare namespace LocalJSX { "dataTestId"?: string; "text"?: string; } - interface MvxUnlockButton { - "class"?: string; - "dataTestId"?: string; - "icon"?: HTMLElement; - "iconUrl"?: string; - "label"?: string; - "type"?: IProviderBase['type']; - } interface MvxUnlockPanel { } interface MvxWalletConnect { @@ -1469,9 +1297,6 @@ declare namespace LocalJSX { "mvx-passkey-provider-icon": MvxPasskeyProviderIcon; "mvx-pending-transactions-panel": MvxPendingTransactionsPanel; "mvx-preloader": MvxPreloader; - "mvx-side-panel": MvxSidePanel; - "mvx-side-panel-header": MvxSidePanelHeader; - "mvx-side-panel-swiper": MvxSidePanelSwiper; "mvx-sign-transactions-panel": MvxSignTransactionsPanel; "mvx-simple-toast": MvxSimpleToast; "mvx-spinner-icon": MvxSpinnerIcon; @@ -1485,7 +1310,6 @@ declare namespace LocalJSX { "mvx-transaction-toast-progress": MvxTransactionToastProgress; "mvx-transactions-table": MvxTransactionsTable; "mvx-trim": MvxTrim; - "mvx-unlock-button": MvxUnlockButton; "mvx-unlock-panel": MvxUnlockPanel; "mvx-wallet-connect": MvxWalletConnect; "mvx-wallet-connect-app-gallery-icon": MvxWalletConnectAppGalleryIcon; @@ -1535,9 +1359,6 @@ declare module "@stencil/core" { "mvx-passkey-provider-icon": LocalJSX.MvxPasskeyProviderIcon & JSXBase.HTMLAttributes; "mvx-pending-transactions-panel": LocalJSX.MvxPendingTransactionsPanel & JSXBase.HTMLAttributes; "mvx-preloader": LocalJSX.MvxPreloader & JSXBase.HTMLAttributes; - "mvx-side-panel": LocalJSX.MvxSidePanel & JSXBase.HTMLAttributes; - "mvx-side-panel-header": LocalJSX.MvxSidePanelHeader & JSXBase.HTMLAttributes; - "mvx-side-panel-swiper": LocalJSX.MvxSidePanelSwiper & JSXBase.HTMLAttributes; "mvx-sign-transactions-panel": LocalJSX.MvxSignTransactionsPanel & JSXBase.HTMLAttributes; "mvx-simple-toast": LocalJSX.MvxSimpleToast & JSXBase.HTMLAttributes; "mvx-spinner-icon": LocalJSX.MvxSpinnerIcon & JSXBase.HTMLAttributes; @@ -1551,7 +1372,6 @@ declare module "@stencil/core" { "mvx-transaction-toast-progress": LocalJSX.MvxTransactionToastProgress & JSXBase.HTMLAttributes; "mvx-transactions-table": LocalJSX.MvxTransactionsTable & JSXBase.HTMLAttributes; "mvx-trim": LocalJSX.MvxTrim & JSXBase.HTMLAttributes; - "mvx-unlock-button": LocalJSX.MvxUnlockButton & JSXBase.HTMLAttributes; "mvx-unlock-panel": LocalJSX.MvxUnlockPanel & JSXBase.HTMLAttributes; "mvx-wallet-connect": LocalJSX.MvxWalletConnect & JSXBase.HTMLAttributes; "mvx-wallet-connect-app-gallery-icon": LocalJSX.MvxWalletConnectAppGalleryIcon & JSXBase.HTMLAttributes; diff --git a/src/components/common/unlock-button/unlock-button.tsx b/src/components/common/unlock-button/unlock-button.tsx deleted file mode 100644 index 8fb85306..00000000 --- a/src/components/common/unlock-button/unlock-button.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { Component, h, Prop } from '@stencil/core'; -import { UnlockButton as UnlockButtonComponent } from 'common/UnlockButton/UnlockButton'; -import type { IProviderBase } from 'types/provider.types'; - -@Component({ - tag: 'mvx-unlock-button', -}) -export class UnlockButton { - @Prop() label: string; - @Prop() iconUrl: string; - @Prop() icon?: HTMLElement; - @Prop() dataTestId?: string; - @Prop() type?: IProviderBase['type']; - @Prop() class?: string; - - render() { - return ( - - ); - } -} diff --git a/src/components/common/format-amount/format-amount.scss b/src/components/controlled/format-amount/format-amount.scss similarity index 100% rename from src/components/common/format-amount/format-amount.scss rename to src/components/controlled/format-amount/format-amount.scss diff --git a/src/components/common/format-amount/format-amount.tsx b/src/components/controlled/format-amount/format-amount.tsx similarity index 100% rename from src/components/common/format-amount/format-amount.tsx rename to src/components/controlled/format-amount/format-amount.tsx diff --git a/src/components/common/format-amount/tests/format-amount.spec.ts b/src/components/controlled/format-amount/tests/format-amount.spec.ts similarity index 100% rename from src/components/common/format-amount/tests/format-amount.spec.ts rename to src/components/controlled/format-amount/tests/format-amount.spec.ts diff --git a/src/components/functional/ledger-connect/ledger-connect.tsx b/src/components/functional/ledger-connect/ledger-connect.tsx index bb7e44f4..a35c67fd 100644 --- a/src/components/functional/ledger-connect/ledger-connect.tsx +++ b/src/components/functional/ledger-connect/ledger-connect.tsx @@ -6,6 +6,7 @@ import { EventBus, type IEventBus } from 'utils/EventBus'; import { getLedgerAddressByIndex } from './helpers/getLedgerAddressByIndex'; import type { ILedgerConnectPanelData } from './ledger-connect.types'; import { LedgerConnectEventsEnum } from './ledger-connect.types'; +import { SidePanelHeader } from 'components/visual/SidePanel/components/SidePanelHeader/SidePanelHeader'; // prettier-ignore const styles = { @@ -89,7 +90,7 @@ export class LedgerConnect { if (this.ledgerDataState.accountScreenData) { return ( - - - * { + >* { @apply mvx:w-full mvx:max-w-full mvx:box-border; } -} +} \ No newline at end of file diff --git a/src/components/functional/notifications-feed/notifications-feed.tsx b/src/components/functional/notifications-feed/notifications-feed.tsx index a72a6453..064900b6 100644 --- a/src/components/functional/notifications-feed/notifications-feed.tsx +++ b/src/components/functional/notifications-feed/notifications-feed.tsx @@ -1,5 +1,6 @@ import { Component, h, Method, State } from '@stencil/core'; import { Icon } from 'common/Icon'; +import { SidePanel } from 'components/visual/SidePanel/SidePanel'; import { ConnectionMonitor } from 'utils/ConnectionMonitor'; import type { IEventBus } from 'utils/EventBus'; import { EventBus } from 'utils/EventBus'; @@ -7,6 +8,7 @@ import { EventBus } from 'utils/EventBus'; import type { ITransactionListItem } from '../../visual/transaction-list-item/transaction-list-item.types'; import type { ITransactionToast } from '../toasts-list/components/transaction-toast/transaction-toast.type'; import { NotificationsFeedEventsEnum } from './notifications-feed.types'; +import { ANIMATION_DELAY_PROMISE } from 'components/visual/SidePanel/sidePanel.constants'; @Component({ tag: 'mvx-notifications-feed', @@ -26,7 +28,7 @@ export class NotificationsFeed { @Method() async closeWithAnimation() { this.isOpen = false; - const animationDelay = await new Promise(resolve => setTimeout(resolve, 300)); + const animationDelay = await ANIMATION_DELAY_PROMISE; return animationDelay; } @@ -91,7 +93,7 @@ export class NotificationsFeed { const hasPending = this.pendingTransactions?.length > 0; return ( -
- + ); } } diff --git a/src/components/functional/pending-transactions-panel/pending-transactions-panel.scss b/src/components/functional/pending-transactions-panel/pending-transactions-panel.scss index 207cefb9..ff1343ee 100644 --- a/src/components/functional/pending-transactions-panel/pending-transactions-panel.scss +++ b/src/components/functional/pending-transactions-panel/pending-transactions-panel.scss @@ -28,4 +28,4 @@ align-items: center; flex: 1; padding: 16px; -} +} \ No newline at end of file diff --git a/src/components/functional/pending-transactions-panel/pending-transactions-panel.tsx b/src/components/functional/pending-transactions-panel/pending-transactions-panel.tsx index d438e3b9..5b34d5ce 100644 --- a/src/components/functional/pending-transactions-panel/pending-transactions-panel.tsx +++ b/src/components/functional/pending-transactions-panel/pending-transactions-panel.tsx @@ -1,6 +1,7 @@ import { Component, h, Method, State } from '@stencil/core'; import { ProviderIdleScreen } from 'common/ProviderIdleScreen/ProviderIdleScreen'; -import { ANIMATION_DELAY_PROMISE } from 'components/visual/side-panel/side-panel.constants'; +import { ANIMATION_DELAY_PROMISE } from 'components/visual/SidePanel/sidePanel.constants'; +import { SidePanel } from 'components/visual/SidePanel/SidePanel'; import type { IProviderBase } from 'types/provider.types'; import { ProviderTypeEnum } from 'types/provider.types'; import { ConnectionMonitor } from 'utils/ConnectionMonitor'; @@ -76,7 +77,11 @@ export class PendingTransactionsPanel { render() { return ( - + - + ); } } diff --git a/src/components/functional/pending-transactions-panel/tests/pending-transactions-panel.e2e.ts b/src/components/functional/pending-transactions-panel/tests/pending-transactions-panel.e2e.ts index c1bbafed..181ff800 100644 --- a/src/components/functional/pending-transactions-panel/tests/pending-transactions-panel.e2e.ts +++ b/src/components/functional/pending-transactions-panel/tests/pending-transactions-panel.e2e.ts @@ -21,12 +21,13 @@ describe('pending-transactions-panel', () => { }); page.rootInstance.provider = { name: title }; + page.rootInstance.isOpen = true; await page.waitForChanges(); - const panel = page.root.shadowRoot.querySelector('mvx-side-panel'); + const panel = page.root.shadowRoot.querySelector('#side-panel'); expect(panel).toBeTruthy(); - const panelTitle = panel.getAttribute('panelTitle'); - expect(panelTitle).toBe(title); + expect(page.rootInstance.provider?.name).toBe(title); + expect(page.rootInstance.isOpen).toBe(true); }); }); diff --git a/src/components/functional/sign-transactions-panel/sign-transactions-panel.scss b/src/components/functional/sign-transactions-panel/sign-transactions-panel.scss index 874140ed..265ab534 100644 --- a/src/components/functional/sign-transactions-panel/sign-transactions-panel.scss +++ b/src/components/functional/sign-transactions-panel/sign-transactions-panel.scss @@ -33,4 +33,4 @@ .trim-right { @apply mvx:select-none mvx:pointer-events-none mvx:inline mvx:text-base mvx:leading-5 mvx:text-clip; -} +} \ No newline at end of file diff --git a/src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx b/src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx index 1e9a1706..9730aa45 100644 --- a/src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx +++ b/src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx @@ -1,6 +1,7 @@ import { Component, h, Method, State } from '@stencil/core'; import { getCopyClickAction } from 'common/CopyButton/getCopyClickAction'; -import { ANIMATION_DELAY_PROMISE } from 'components/visual/side-panel/side-panel.constants'; +import { ANIMATION_DELAY_PROMISE } from 'components/visual/SidePanel/sidePanel.constants'; +import { SidePanel } from 'components/visual/SidePanel/SidePanel'; import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; import { ConnectionMonitor } from 'utils/ConnectionMonitor'; import type { IEventBus } from 'utils/EventBus'; @@ -148,7 +149,7 @@ export class SignTransactionsPanel { const { currentIndex, transactionsCount, origin } = commonData; return ( -
- + ); } } diff --git a/src/components/functional/unlock-panel/unlock-panel.scss b/src/components/functional/unlock-panel/unlock-panel.scss index 21b0cbc1..ff1190ee 100644 --- a/src/components/functional/unlock-panel/unlock-panel.scss +++ b/src/components/functional/unlock-panel/unlock-panel.scss @@ -1 +1 @@ -// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. +// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes. \ No newline at end of file diff --git a/src/components/functional/unlock-panel/unlock-panel.tsx b/src/components/functional/unlock-panel/unlock-panel.tsx index 2e9ab875..e3402fd2 100644 --- a/src/components/functional/unlock-panel/unlock-panel.tsx +++ b/src/components/functional/unlock-panel/unlock-panel.tsx @@ -1,6 +1,7 @@ import { Component, Element, h, Method, State } from '@stencil/core'; import { ProviderIdleScreen } from 'common/ProviderIdleScreen/ProviderIdleScreen'; -import { ANIMATION_DELAY_PROMISE } from 'components/visual/side-panel/side-panel.constants'; +import { ANIMATION_DELAY_PROMISE } from 'components/visual/SidePanel/sidePanel.constants'; +import { SidePanel } from 'components/visual/SidePanel/SidePanel'; import type { IProviderBase } from 'types/provider.types'; import { ProviderTypeEnum } from 'types/provider.types'; import { ConnectionMonitor } from 'utils/ConnectionMonitor'; @@ -159,7 +160,7 @@ export class UnlockPanel { const isCustomProviderActive = this.selectedMethod && this.isCustomProvider(this.selectedMethod.type); return ( -
)} - + ); } } diff --git a/src/components/functional/wallet-connect/wallet-connect.tsx b/src/components/functional/wallet-connect/wallet-connect.tsx index 8095cde9..ca715258 100644 --- a/src/components/functional/wallet-connect/wallet-connect.tsx +++ b/src/components/functional/wallet-connect/wallet-connect.tsx @@ -1,13 +1,13 @@ import { Component, Element, h, Host, Method, Prop, State, Watch } from '@stencil/core'; import { Icon } from 'common/Icon'; import type { IEventBus, IWalletConnectPanelData } from 'components'; -import { SidePanelHeaderSlotEnum } from 'components/visual/side-panel/components/side-panel-header/side-panel-header'; import { providerLabels } from 'constants/providerFactory.constants'; import QRCode from 'qrcode'; import { ConnectionMonitor } from 'utils/ConnectionMonitor'; import { EventBus } from 'utils/EventBus'; import { WalletConnectEventsEnum } from './wallet-connect.types'; +import { SidePanelHeader } from 'components/visual/SidePanel/components/SidePanelHeader/SidePanelHeader'; // prettier-ignore const styles = { @@ -86,16 +86,15 @@ export class WalletConnect { render() { return ( - this.eventBus.publish(WalletConnectEventsEnum.CLOSE)} - > - {!this.showScanPage && } - - + leftIcon={!this.showScanPage ? : undefined} + rightIcon={} + />
{this.showScanPage ? ( diff --git a/src/components/visual/SidePanel/SidePanel.tsx b/src/components/visual/SidePanel/SidePanel.tsx new file mode 100644 index 00000000..f3ee8acd --- /dev/null +++ b/src/components/visual/SidePanel/SidePanel.tsx @@ -0,0 +1,87 @@ +import { h } from '@stencil/core'; +import classNames from 'classnames'; +import { SidePanelHeader } from './components/SidePanelHeader/SidePanelHeader'; +import { SidePanelSwiper } from './components/SidePanelSwiper/SidePanelSwiper'; +import { handleSidePanelOpenChange } from './helpers/handleSidePanelOpenChange'; +import { state } from './sidePanelStore'; + +import styles from './sidePanel.styles'; + +interface SidePanelPropsType { + isOpen?: boolean; + panelClassName?: string; + panelTitle: string; + hasBackButton?: boolean; + showHeader?: boolean; + onClose?: () => void; + onBack?: () => void; +} + +export function SidePanel({ + isOpen = false, + panelClassName, + panelTitle, + hasBackButton, + showHeader = true, + onClose, + onBack +}: SidePanelPropsType, children: JSX.Element) { + if (isOpen !== undefined) { + handleSidePanelOpenChange(isOpen, (shouldAnimate) => { + state.shouldAnimate = shouldAnimate; + }); + } + + const sidePanelIdentifier = 'side-panel'; + const shouldAnimate = state.shouldAnimate; + + const handleOverlayClick = (event: MouseEvent) => { + if (event.target === event.currentTarget) { + onClose?.(); + } + }; + + const handleCloseClick = (event: MouseEvent) => { + event.preventDefault(); + onClose?.(); + }; + + const handleBackClick = (event: MouseEvent) => { + event.preventDefault(); + onBack?.(); + }; + + return ( +
+ +
+ {showHeader && ( + + )} + +
+ {children} +
+
+
+
+ ); +} + diff --git a/src/components/visual/SidePanel/components/SidePanelHeader/SidePanelHeader.tsx b/src/components/visual/SidePanel/components/SidePanelHeader/SidePanelHeader.tsx new file mode 100644 index 00000000..02d55ce4 --- /dev/null +++ b/src/components/visual/SidePanel/components/SidePanelHeader/SidePanelHeader.tsx @@ -0,0 +1,59 @@ +import { h } from '@stencil/core'; +import classNames from 'classnames'; +import { Icon } from 'common/Icon'; + +// prettier-ignore +const styles = { + sidePanelHeading: 'side-panel-heading mvx:flex mvx:items-center mvx:leading-none mvx:gap-3 mvx:z-1 mvx:relative mvx:px-0 mvx:py-2 mvx:text-2xl mvx:shadow-lg mvx:shadow-surface', + sidePanelHeadingLeft: 'side-panel-heading-left mvx:mr-auto mvx:hidden mvx:pointer-events-none mvx:cursor-pointer mvx:opacity-0 mvx:text-secondary-text mvx:xs:flex mvx:hover:opacity-75', + sidePanelHeadingRight: 'side-panel-heading-right mvx:ml-auto mvx:hidden mvx:pointer-events-none mvx:cursor-pointer mvx:opacity-0 mvx:text-secondary-text mvx:xs:flex mvx:hover:opacity-75', + sidePanelHeadingLeftVisible: 'side-panel-heading-left-visible mvx:transition-all mvx:opacity-100 mvx:duration-200 mvx:ease-in-out mvx:!pointer-events-auto mvx:flex mvx:hover:opacity-75', + sidePanelHeadingRightVisible: 'side-panel-heading-right-visible mvx:transition-all mvx:opacity-100 mvx:duration-200 mvx:ease-in-out mvx:!pointer-events-auto mvx:!flex mvx:hover:opacity-75', + sidePanelHeadingTitle: 'side-panel-heading-title mvx:font-medium mvx:text-primary' +} satisfies Record; + +interface SidePanelHeaderPropsType { + panelClassName?: string; + panelTitle: string; + hasLeftButton?: boolean; + hasRightButton?: boolean; + onRightButtonClick?: (event: MouseEvent) => void; + onLeftButtonClick?: (event: MouseEvent) => void; + leftIcon?: any; + rightIcon?: any; +} + +export function SidePanelHeader({ panelClassName, panelTitle, hasLeftButton = true, hasRightButton = true, onRightButtonClick, onLeftButtonClick, leftIcon, rightIcon }: SidePanelHeaderPropsType) { + const handleRightIconClick = (event: MouseEvent) => { + event.preventDefault(); + onRightButtonClick?.(event); + } + + const handleLeftIconClick = (event: MouseEvent) => { + event.preventDefault(); + onLeftButtonClick?.(event); + } + + return ( +
+
+ {hasLeftButton && ( + leftIcon || + )} +
+ +
{panelTitle}
+ +
+ {rightIcon || } +
+
+ ); +} + diff --git a/src/components/visual/SidePanel/components/SidePanelSwiper/SidePanelSwiper.tsx b/src/components/visual/SidePanel/components/SidePanelSwiper/SidePanelSwiper.tsx new file mode 100644 index 00000000..6589e8a0 --- /dev/null +++ b/src/components/visual/SidePanel/components/SidePanelSwiper/SidePanelSwiper.tsx @@ -0,0 +1,257 @@ +import { h } from '@stencil/core'; +import { state } from '../../sidePanelStore'; +import styles from './sidePanelSwiper.styles'; + +interface SidePanelSwiperPropsType { + open: boolean; + onSheetDismiss?: () => void; + onSheetSnapChange?: (index: number, snapPoint: string) => void; +} + +let hasInitialized = false; +let previousOpen: boolean | null = null; + +const snapPointsArray: string[] = ['100%']; +const SNAP_PERCENT_DEFAULT = '50'; +const OPEN_TIMEOUT_VALUE = 50; +const CLOSE_TTMEOUT_VALUE = 300; +const TRANSLATE_Y_VALUE = 100; +let sheetElement: HTMLElement | null = null; + +let dragState = { + startY: 0, + currentY: 0, + startTransform: 100, + isAnimating: false, +}; + +let isDragging = false; + +export function SidePanelSwiper({ open = false, onSheetDismiss, onSheetSnapChange }: SidePanelSwiperPropsType, children: JSX.Element) { + const handleSheetDismiss = () => { + onSheetDismiss?.(); + } + + const animateToPosition = (snapIndex: number, emitEvent: boolean = true) => { + if (!sheetElement || dragState.isAnimating) { + return; + } + + const snapPercent = parseFloat(snapPointsArray[snapIndex] || SNAP_PERCENT_DEFAULT); + const targetY = 100 - snapPercent; + + dragState.isAnimating = true; + dragState.startTransform = targetY; + + sheetElement.style.transition = 'transform 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94)'; + sheetElement.style.transform = `translateY(${targetY}%)`; + + setTimeout(() => { + dragState.isAnimating = false; + if (emitEvent && state.isVisible) { + onSheetSnapChange?.(snapIndex, snapPointsArray[snapIndex]); + } + if (sheetElement) { + sheetElement.style.transition = ''; + } + }, 350); + } + + const openToSnapPoint = (snapIndex: number = 1) => { + if (dragState.isAnimating) { + return; + } + + state.currentSnapIndex = Math.max(0, Math.min(snapIndex, snapPointsArray.length - 1)); + state.isVisible = true; + + setTimeout(() => { + if (sheetElement && state.isVisible) { + animateToPosition(state.currentSnapIndex, false); + } + }, OPEN_TIMEOUT_VALUE); + } + + const animateToClose = () => { + if (!sheetElement || dragState.isAnimating) { + return; + } + + dragState.isAnimating = true; + sheetElement.style.transition = 'transform 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94)'; + sheetElement.style.transform = 'translateY(100%)'; + + setTimeout(() => { + dragState.isAnimating = false; + state.isVisible = false; + handleSheetDismiss(); + if (sheetElement) { + sheetElement.style.transition = ''; + } + }, CLOSE_TTMEOUT_VALUE); + } + + const closeSwiper = () => { + if (dragState.isAnimating || !state.isVisible) { + return; + } + + animateToClose(); + } + + if (previousOpen !== null && previousOpen !== open) { + if (open && !state.isVisible) { + openToSnapPoint(state.currentSnapIndex); + } else if (!open && state.isVisible) { + closeSwiper(); + } + } + + previousOpen = open; + + const setSheetRef = (el: HTMLElement | null) => { + sheetElement = el; + + if (el && !hasInitialized) { + hasInitialized = true; + state.isVisible = open; + + if (window.innerWidth <= 480) { + el.style.transform = 'translateY(100%)'; + } + + if (open) { + openToSnapPoint(state.currentSnapIndex); + } + } + } + + + const handleDragStart = (e: MouseEvent | TouchEvent) => { + if (dragState.isAnimating) { + return; + } + + e.preventDefault(); + e.stopPropagation(); + + isDragging = true; + const clientY = 'touches' in e ? e.touches[0].clientY : e.clientY; + dragState.startY = clientY; + dragState.currentY = clientY; + + // Get current transform + const transform = getCurrentTransform(); + dragState.startTransform = transform; + + // Add global event listeners + document.addEventListener('mousemove', handleDragMove, { + passive: false, + }); + document.addEventListener('touchmove', handleDragMove, { + passive: false, + }); + document.addEventListener('mouseup', handleDragEnd); + document.addEventListener('touchend', handleDragEnd); + }; + + const handleDragMove = (e: MouseEvent | TouchEvent) => { + if (!isDragging || !sheetElement || dragState.isAnimating) { + return; + } + + e.preventDefault(); + e.stopPropagation(); + + const clientY = 'touches' in e ? e.touches[0].clientY : e.clientY; + dragState.currentY = clientY; + + const deltaY = dragState.currentY - dragState.startY; + const viewportHeight = window.innerHeight; + const deltaPercent = (deltaY / viewportHeight) * 100; + + const newTransform = Math.min(100, Math.max(0, dragState.startTransform + deltaPercent)); + + sheetElement.style.transform = `translateY(${newTransform}%)`; + }; + + const handleDragEnd = () => { + if (!isDragging || dragState.isAnimating) { + return; + } + + isDragging = false; + + // Remove global event listeners + document.removeEventListener('mousemove', handleDragMove); + document.removeEventListener('touchmove', handleDragMove); + document.removeEventListener('mouseup', handleDragEnd); + document.removeEventListener('touchend', handleDragEnd); + + const currentTransform = getCurrentTransform(); + const velocity = dragState.currentY - dragState.startY; + + // Close if dragged down significantly or fast downward velocity + if (currentTransform > 70 || velocity > 150) { + closeSwiper(); + return; + } + + // Find closest snap point + const snapPercentages = snapPointsArray.map(point => parseFloat(point)); + let closestIndex = 0; + let closestDistance = Math.abs(100 - currentTransform - snapPercentages[0]); + + for (let i = 1; i < snapPercentages.length; i++) { + const distance = Math.abs(100 - currentTransform - snapPercentages[i]); + if (distance < closestDistance) { + closestDistance = distance; + closestIndex = i; + } + } + + state.currentSnapIndex = closestIndex; + animateToPosition(closestIndex, true); + }; + + const getCurrentTransform = (): number => { + if (!sheetElement) { + return TRANSLATE_Y_VALUE; + } + + const transform = sheetElement.style.transform; + if (transform && transform.includes('translateY')) { + const match = transform.match(/translateY\(([^)]+)%?\)/); + if (match) { + return parseFloat(match[1].replace('%', '')); + } + } + return TRANSLATE_Y_VALUE; + } + return ( +
+
+
event.stopPropagation()} + > +
+
+
+
+
+ +
+ {children} +
+
+
+
+ ); +} + diff --git a/src/components/visual/SidePanel/components/SidePanelSwiper/sidePanelSwiper.styles.ts b/src/components/visual/SidePanel/components/SidePanelSwiper/sidePanelSwiper.styles.ts new file mode 100644 index 00000000..4affe250 --- /dev/null +++ b/src/components/visual/SidePanel/components/SidePanelSwiper/sidePanelSwiper.styles.ts @@ -0,0 +1,13 @@ +// prettier-ignore +export default { + sidePanelSwiperContainer: 'side-panel-swipper-container mvx:flex mvx:xs:flex-col mvx:xs:h-full', + sidePanelSwiperWrapper: 'side-panel-swipper-wrapper mvx:fixed mvx:left-0 mvx:top-0 mvx:bottom-0 mvx:right-0 mvx:z-50 mvx:xs:static mvx:xs:h-full mvx:before:opacity-90 mvx:before:left-0 mvx:before:top-0 mvx:before:right-0 mvx:before:bottom-0 mvx:before:transition-all mvx:before:duration-200 mvx:before:pointer-events-none mvx:before:absolute mvx:before:ease-in-out mvx:before:bg-neutral-900 mvx:before:content-[""] mvx:before:supports-[backdrop-filter]:opacity-50 mvx:before:supports-[backdrop-filter]:backdrop-blur-sm mvx:before:supports-[backdrop-filter]:bg-neutral-900 mvx:xs:before:content-none', + sidePanelSwiperWrapperVisible: 'side-panel-swiper-visible mvx:!flex', + sidePanelSwiperWrapperHidden: 'side-panel-swiper-wrapper-hidden mvx:hidden mvx:xs:block', + sidePanelSwiperHidden: 'side-panel-swiper-hidden mvx:translate-y-full', + sidePanelSwiper: 'side-panel-swiper mvx:bottom-0 mvx:absolute mvx:left-0 mvx:right-0 mvx:flex mvx:flex-col mvx:justify-end mvx:touch-pan-y mvx:h-auto mvx:min-h-dvh mvx:rounded-t-3xl mvx:transition-none mvx:backface-hidden mvx:will-change-transform mvx:xs:h-full mvx:xs:static mvx:xs:rounded-none mvx:xs:transform-none mvx:xs:[justify-content:unset] mvx:xs:min-h-auto', + sidePanelSwiperHandleWrapper: 'side-panel-swiper-handle-wrapper mvx:top-8 mvx:relative mvx:h-8 mvx:w-full mvx:z-12 mvx:xs:hidden', + sidePanelSwiperHandleContainer: 'side-panel-swiper-handle-container mvx:flex mvx:top-0 mvx:bottom-0 mvx:absolute mvx:right-0 mvx:left-0 mvx:justify-center mvx:touch-none mvx:select-none mvx:cursor-grab mvx:active:cursor-grabbing', + sidePanelSwiperHandle: 'side-panel-swiper-handle mvx:w-32 mvx:mt-3 mvx:h-1 mvx:rounded mvx:bg-primary', + sidePanelSwiperContent: 'side-panel-swiper-content mvx:overflow-y-auto mvx:max-h-[calc(100dvh-4rem)] mvx:xs:max-h-none mvx:xs:h-full' +} satisfies Record; \ No newline at end of file diff --git a/src/components/visual/SidePanel/helpers/handleSidePanelOpenChange.ts b/src/components/visual/SidePanel/helpers/handleSidePanelOpenChange.ts new file mode 100644 index 00000000..4945590b --- /dev/null +++ b/src/components/visual/SidePanel/helpers/handleSidePanelOpenChange.ts @@ -0,0 +1,10 @@ +export function handleSidePanelOpenChange( + isOpen: boolean, + setShouldAnimate: (value: boolean) => void +) { + if (isOpen) { + requestAnimationFrame(() => setShouldAnimate(true)); + } else { + setShouldAnimate(false); + } +} \ No newline at end of file diff --git a/src/components/visual/side-panel/side-panel.constants.ts b/src/components/visual/SidePanel/sidePanel.constants.ts similarity index 100% rename from src/components/visual/side-panel/side-panel.constants.ts rename to src/components/visual/SidePanel/sidePanel.constants.ts diff --git a/src/components/visual/SidePanel/sidePanel.styles.ts b/src/components/visual/SidePanel/sidePanel.styles.ts new file mode 100644 index 00000000..05b9e8c9 --- /dev/null +++ b/src/components/visual/SidePanel/sidePanel.styles.ts @@ -0,0 +1,8 @@ +// prettier-ignore +export default { + sidePanelWrapper: 'side-panel-wrapper mvx:flex mvx:justify-end mvx:items-start mvx:z-50 mvx:pointer-events-none mvx:invisible mvx:xs:fixed mvx:xs:top-0 mvx:xs:left-0 mvx:xs:right-0 mvx:xs:bottom-0 mvx:xs:p-4 mvx:xs:pr-0 mvx:xs:items-center mvx:before:opacity-0 mvx:before:left-0 mvx:before:top-0 mvx:before:right-0 mvx:before:bottom-0 mvx:before:transition-all mvx:before:absolute mvx:before:duration-200 mvx:before:pointer-events-none mvx:before:ease-in-out mvx:before:bg-neutral-900 mvx:before:content-[""] mvx:before:supports-[backdrop-filter]:opacity-50 mvx:before:supports-[backdrop-filter]:backdrop-blur-sm mvx:before:supports-[backdrop-filter]:bg-neutral-900', + sidePanelWrapperVisible: 'side-panel-wrapper-visible mvx:!pointer-events-auto mvx:!visible mvx:before:!opacity-90 mvx:before:supports-[backdrop-filter]:!opacity-50', + sidePanel: 'side-panel mvx:p-6 mvx:w-full mvx:flex mvx:overflow-hidden mvx:flex-col mvx:transition-all mvx:ease-in-out mvx:duration-200 mvx:rounded-tl-3xl mvx:rounded-tr-3xl mvx:backdrop-blur mvx:pb-0 mvx:border mvx:border-outline mvx:bg-surface mvx:xs:w-110 mvx:xs:h-full mvx:xs:mr-4 mvx:xs:rounded-[20px] mvx:xs:translate-x-[calc(100%+48px)] mvx:after:left-0 mvx:after:right-0 mvx:after:h-0 mvx:after:absolute mvx:after:shadow-lg mvx:after:shadow-surface mvx:after:-bottom-1 mvx:after:content-[""]', + sidePanelVisible: 'side-panel-visible mvx:!transform mvx:!translate-y-0 mvx:xs:!translate-x-0', + sidePanelContent: 'side-panel-content mvx:flex-1 mvx:flex mvx:flex-col mvx:overflow-auto mvx:scrollbar-hide' +} satisfies Record; \ No newline at end of file diff --git a/src/components/visual/SidePanel/sidePanelStore.ts b/src/components/visual/SidePanel/sidePanelStore.ts new file mode 100644 index 00000000..8c03d4f3 --- /dev/null +++ b/src/components/visual/SidePanel/sidePanelStore.ts @@ -0,0 +1,23 @@ +import { createStore } from '@stencil/store'; + +interface ISidePanelState { + isVisible: boolean; + currentSnapIndex: number; + shouldAnimate: boolean; +} + +const initialState: ISidePanelState = { + isVisible: false, + currentSnapIndex: 1, + shouldAnimate: false +} + +const store = createStore({ + ...initialState, +}); + +export const state = store.state; + +export const resetState = () => { + Object.assign(state, initialState); +}; diff --git a/src/components/common/button/button.scss b/src/components/visual/button/button.scss similarity index 100% rename from src/components/common/button/button.scss rename to src/components/visual/button/button.scss diff --git a/src/components/common/button/button.stories.tsx b/src/components/visual/button/button.stories.tsx similarity index 100% rename from src/components/common/button/button.stories.tsx rename to src/components/visual/button/button.stories.tsx diff --git a/src/components/common/button/button.tsx b/src/components/visual/button/button.tsx similarity index 100% rename from src/components/common/button/button.tsx rename to src/components/visual/button/button.tsx diff --git a/src/components/common/copy-button/copy-button.stories.tsx b/src/components/visual/copy-button/copy-button.stories.tsx similarity index 100% rename from src/components/common/copy-button/copy-button.stories.tsx rename to src/components/visual/copy-button/copy-button.stories.tsx diff --git a/src/components/common/copy-button/copy-button.tsx b/src/components/visual/copy-button/copy-button.tsx similarity index 100% rename from src/components/common/copy-button/copy-button.tsx rename to src/components/visual/copy-button/copy-button.tsx diff --git a/src/components/common/copy-button/tests/copy-button.spec.ts b/src/components/visual/copy-button/tests/copy-button.spec.ts similarity index 100% rename from src/components/common/copy-button/tests/copy-button.spec.ts rename to src/components/visual/copy-button/tests/copy-button.spec.ts diff --git a/src/components/visual/data-with-explorer-link/tests/data-with-explorer-link.spec.ts b/src/components/visual/data-with-explorer-link/tests/data-with-explorer-link.spec.ts index f59c8fb4..2c794d05 100644 --- a/src/components/visual/data-with-explorer-link/tests/data-with-explorer-link.spec.ts +++ b/src/components/visual/data-with-explorer-link/tests/data-with-explorer-link.spec.ts @@ -1,9 +1,9 @@ import { newSpecPage } from '@stencil/core/testing'; import { Trim } from 'common/Trim/Trim'; -import { CopyButton } from '../../../common/copy-button/copy-button'; -import { ExplorerLink } from '../../../common/explorer-link/explorer-link'; -import { Tooltip } from '../../../common/tooltip/tooltip'; +import { ExplorerLink } from '../../explorer-link/explorer-link'; +import { CopyButton } from '../../copy-button/copy-button'; +import { Tooltip } from '../../tooltip/tooltip'; import { DataWithExplorerLink } from '../data-with-explorer-link'; describe('DataWithExplorerLink', () => { diff --git a/src/components/common/explorer-link/explorer-link.scss b/src/components/visual/explorer-link/explorer-link.scss similarity index 100% rename from src/components/common/explorer-link/explorer-link.scss rename to src/components/visual/explorer-link/explorer-link.scss diff --git a/src/components/common/explorer-link/explorer-link.stories.tsx b/src/components/visual/explorer-link/explorer-link.stories.tsx similarity index 100% rename from src/components/common/explorer-link/explorer-link.stories.tsx rename to src/components/visual/explorer-link/explorer-link.stories.tsx diff --git a/src/components/common/explorer-link/explorer-link.tsx b/src/components/visual/explorer-link/explorer-link.tsx similarity index 100% rename from src/components/common/explorer-link/explorer-link.tsx rename to src/components/visual/explorer-link/explorer-link.tsx diff --git a/src/components/common/explorer-link/tests/explorer-link.spec.ts b/src/components/visual/explorer-link/tests/explorer-link.spec.ts similarity index 100% rename from src/components/common/explorer-link/tests/explorer-link.spec.ts rename to src/components/visual/explorer-link/tests/explorer-link.spec.ts diff --git a/src/components/visual/side-panel/components/side-panel-header/side-panel-header.scss b/src/components/visual/side-panel/components/side-panel-header/side-panel-header.scss deleted file mode 100644 index 2650a4f1..00000000 --- a/src/components/visual/side-panel/components/side-panel-header/side-panel-header.scss +++ /dev/null @@ -1,39 +0,0 @@ -.side-panel-heading { - @apply mvx:flex mvx:items-center mvx:leading-none mvx:gap-3 mvx:z-1 mvx:relative mvx:px-0 mvx:py-2 mvx:text-2xl; - box-shadow: 0px 8px 12px 12px var(--mvx-bg-color-primary); - - .side-panel-heading-left { - @apply mvx:mr-auto; - } - - .side-panel-heading-right { - @apply mvx:ml-auto; - } - - .side-panel-heading-left, - .side-panel-heading-right { - @apply mvx:hidden mvx:pointer-events-none mvx:cursor-pointer mvx:opacity-0; - color: var(--mvx-text-color-secondary); - - @media (min-width: 480px) { - @apply mvx:flex; - } - - &:hover { - @apply mvx:opacity-75; - } - - &.visible { - @apply mvx:transition-all mvx:opacity-100 mvx:duration-200 mvx:ease-in-out mvx:pointer-events-auto mvx:flex; - - &:hover { - @apply mvx:opacity-75; - } - } - } - - .side-panel-heading-title { - @apply mvx:font-medium; - color: var(--mvx-text-color-primary); - } -} diff --git a/src/components/visual/side-panel/components/side-panel-header/side-panel-header.tsx b/src/components/visual/side-panel/components/side-panel-header/side-panel-header.tsx deleted file mode 100644 index d82059e2..00000000 --- a/src/components/visual/side-panel/components/side-panel-header/side-panel-header.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import type { EventEmitter } from '@stencil/core'; -import { Component, Event, h, Prop } from '@stencil/core'; -import { Icon } from 'common/Icon'; - -export enum SidePanelHeaderSlotEnum { - leftIcon = 'left-icon', - rightIcon = 'right-icon', -} - -@Component({ - tag: 'mvx-side-panel-header', - styleUrl: 'side-panel-header.scss', - shadow: true, -}) -export class SidePanelHeader { - @Prop() panelClassName?: string; - @Prop() panelTitle: string; - @Prop() hasLeftButton?: boolean = true; - @Prop() hasRightButton?: boolean = true; - - @Event({ composed: false, bubbles: false }) rightButtonClick: EventEmitter; - @Event({ composed: false, bubbles: false }) leftButtonClick: EventEmitter; - - handleRightIconClick(event: MouseEvent) { - event.preventDefault(); - this.rightButtonClick.emit(); - } - - handleLeftIconClick(event: MouseEvent) { - event.preventDefault(); - this.leftButtonClick.emit(); - } - - render() { - return ( -
-
- {this.hasLeftButton && ( - - - - )} -
- -
{this.panelTitle}
- -
- - - -
-
- ); - } -} diff --git a/src/components/visual/side-panel/components/side-panel-swiper/side-panel-swiper.scss b/src/components/visual/side-panel/components/side-panel-swiper/side-panel-swiper.scss deleted file mode 100644 index 46b31a27..00000000 --- a/src/components/visual/side-panel/components/side-panel-swiper/side-panel-swiper.scss +++ /dev/null @@ -1,93 +0,0 @@ -:host { - @apply mvx:flex; - - @media (min-width: 480px) { - @apply mvx:flex-col mvx:h-full; - } - - .side-panel-swiper-wrapper { - @apply mvx:fixed mvx:left-0 mvx:top-0 mvx:bottom-0 mvx:right-0 mvx:z-50; - - @media (min-width: 480px) { - @apply mvx:static mvx:h-full; - } - - &:before { - @apply mvx:opacity-90 mvx:left-0 mvx:top-0 mvx:right-0 mvx:bottom-0 mvx:transition-all mvx:duration-200; - @apply mvx:pointer-events-none mvx:absolute mvx:ease-in-out; - background: var(--mvx-neutral-900); - content: ''; - - @supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) { - @apply mvx:opacity-50; - background: var(--mvx-neutral-900); - -webkit-backdrop-filter: blur(0.375rem); - backdrop-filter: blur(0.375rem); - } - - @media (min-width: 480px) { - content: none; - } - } - - &.visible { - @apply mvx:block; - } - - &.hidden { - @apply mvx:hidden; - - @media (min-width: 480px) { - @apply mvx:block; - } - - .side-panel-swiper { - @apply mvx:translate-y-full; - } - } - - .side-panel-swiper { - @apply mvx:bottom-0 mvx:absolute mvx:left-0 mvx:right-0 mvx:flex mvx:flex-col mvx:justify-end mvx:touch-pan-y; - @apply mvx:h-auto mvx:min-h-dvh mvx:rounded-t-3xl mvx:transition-none; - backface-visibility: hidden; - will-change: transform; - - @media (min-width: 480px) { - @apply mvx:h-full mvx:static mvx:rounded-none mvx:transform-none; - justify-content: unset; - min-height: auto; - } - - .side-panel-swiper-handle-wrapper { - @apply mvx:top-8 mvx:relative mvx:h-8 mvx:w-full mvx:z-12; - - @media (min-width: 480px) { - @apply mvx:hidden; - } - - .side-panel-swiper-handle-container { - @apply mvx:flex mvx:top-0 mvx:bottom-0 mvx:absolute mvx:right-0 mvx:left-0 mvx:justify-center; - @apply mvx:touch-none mvx:select-none mvx:cursor-grab; - - &:active { - @apply mvx:cursor-grabbing; - } - - .side-panel-swiper-handle { - @apply mvx:w-32 mvx:mt-3 mvx:h-1 mvx:rounded; - background-color: var(--mvx-text-color-primary); - } - } - } - - .side-panel-swiper-content { - @apply mvx:overflow-y-auto; - max-height: calc(100dvh - 4rem); - - @media (min-width: 480px) { - @apply mvx:max-h-none mvx:h-full; - } - } - } - } -} diff --git a/src/components/visual/side-panel/components/side-panel-swiper/side-panel-swiper.tsx b/src/components/visual/side-panel/components/side-panel-swiper/side-panel-swiper.tsx deleted file mode 100644 index 26a2810e..00000000 --- a/src/components/visual/side-panel/components/side-panel-swiper/side-panel-swiper.tsx +++ /dev/null @@ -1,248 +0,0 @@ -import type { EventEmitter } from '@stencil/core'; -import { Component, Element, Event, h, Method, Prop, State, Watch } from '@stencil/core'; - -@Component({ - tag: 'mvx-side-panel-swiper', - styleUrl: 'side-panel-swiper.scss', - shadow: true, -}) -export class SidePanelSwiper { - @Element() sidePanelSwipeElement!: HTMLElement; - - @Prop() open: boolean = false; - @Prop() sidePanelIdentifier: string = ''; - - @Event() sheetDismiss!: EventEmitter; - @Event() sheetSnapChange!: EventEmitter<{ index: number; snapPoint: string }>; - - @State() isVisible: boolean = false; - @State() isDragging: boolean = false; - @State() currentSnapIndex: number = 1; - - private snapPointsArray: string[] = ['100%']; - private sheetElement!: HTMLElement; - - private dragState = { - startY: 0, - currentY: 0, - startTransform: 100, - isAnimating: false, - }; - - componentDidLoad() { - this.isVisible = this.open; - - if (this.sheetElement && window.innerWidth <= 480) { - this.sheetElement.style.transform = 'translateY(100%)'; - } - - if (this.open) { - this.openToSnapPoint(this.currentSnapIndex); - } - } - - @Watch('open') - openChanged(newValue: boolean) { - if (newValue && !this.isVisible) { - this.openToSnapPoint(this.currentSnapIndex); - } else if (!newValue && this.isVisible) { - this.close(); - } - } - - @Method() - async openToSnapPoint(snapIndex: number = 1) { - if (this.dragState.isAnimating) { - return; - } - - this.currentSnapIndex = Math.max(0, Math.min(snapIndex, this.snapPointsArray.length - 1)); - this.isVisible = true; - - await new Promise(resolve => setTimeout(resolve, 50)); - - if (this.sheetElement && this.isVisible) { - this.animateToPosition(this.currentSnapIndex, false); - } - } - - @Method() - async close() { - if (this.dragState.isAnimating || !this.isVisible) { - return; - } - - this.animateToClose(); - } - - private animateToPosition(snapIndex: number, emitEvent: boolean = true) { - if (!this.sheetElement || this.dragState.isAnimating) { - return; - } - - const snapPercent = parseFloat(this.snapPointsArray[snapIndex] || '50'); - const targetY = 100 - snapPercent; - - this.dragState.isAnimating = true; - this.dragState.startTransform = targetY; - - this.sheetElement.style.transition = 'transform 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94)'; - this.sheetElement.style.transform = `translateY(${targetY}%)`; - - setTimeout(() => { - this.dragState.isAnimating = false; - if (emitEvent && this.isVisible) { - this.sheetSnapChange.emit({ - index: snapIndex, - snapPoint: this.snapPointsArray[snapIndex], - }); - } - this.sheetElement.style.transition = ''; - }, 350); - } - - private animateToClose() { - if (!this.sheetElement || this.dragState.isAnimating) { - return; - } - - this.dragState.isAnimating = true; - this.sheetElement.style.transition = 'transform 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94)'; - this.sheetElement.style.transform = 'translateY(100%)'; - - setTimeout(() => { - this.dragState.isAnimating = false; - this.isVisible = false; - this.sheetDismiss.emit(); - this.sheetElement.style.transition = ''; - }, 300); - } - - private handleDragStart = (e: MouseEvent | TouchEvent) => { - if (this.dragState.isAnimating) { - return; - } - - e.preventDefault(); - e.stopPropagation(); - - this.isDragging = true; - const clientY = 'touches' in e ? e.touches[0].clientY : e.clientY; - this.dragState.startY = clientY; - this.dragState.currentY = clientY; - - // Get current transform - const transform = this.getCurrentTransform(); - this.dragState.startTransform = transform; - - // Add global event listeners - document.addEventListener('mousemove', this.handleDragMove, { - passive: false, - }); - document.addEventListener('touchmove', this.handleDragMove, { - passive: false, - }); - document.addEventListener('mouseup', this.handleDragEnd); - document.addEventListener('touchend', this.handleDragEnd); - }; - - private handleDragMove = (e: MouseEvent | TouchEvent) => { - if (!this.isDragging || !this.sheetElement || this.dragState.isAnimating) { - return; - } - - e.preventDefault(); - e.stopPropagation(); - - const clientY = 'touches' in e ? e.touches[0].clientY : e.clientY; - this.dragState.currentY = clientY; - - const deltaY = this.dragState.currentY - this.dragState.startY; - const viewportHeight = window.innerHeight; - const deltaPercent = (deltaY / viewportHeight) * 100; - - const newTransform = Math.min(100, Math.max(0, this.dragState.startTransform + deltaPercent)); - - this.sheetElement.style.transform = `translateY(${newTransform}%)`; - }; - - private handleDragEnd = () => { - if (!this.isDragging || this.dragState.isAnimating) { - return; - } - - this.isDragging = false; - - // Remove global event listeners - document.removeEventListener('mousemove', this.handleDragMove); - document.removeEventListener('touchmove', this.handleDragMove); - document.removeEventListener('mouseup', this.handleDragEnd); - document.removeEventListener('touchend', this.handleDragEnd); - - const currentTransform = this.getCurrentTransform(); - const velocity = this.dragState.currentY - this.dragState.startY; - - // Close if dragged down significantly or fast downward velocity - if (currentTransform > 70 || velocity > 150) { - this.close(); - return; - } - - // Find closest snap point - const snapPercentages = this.snapPointsArray.map(point => parseFloat(point)); - let closestIndex = 0; - let closestDistance = Math.abs(100 - currentTransform - snapPercentages[0]); - - for (let i = 1; i < snapPercentages.length; i++) { - const distance = Math.abs(100 - currentTransform - snapPercentages[i]); - if (distance < closestDistance) { - closestDistance = distance; - closestIndex = i; - } - } - - this.currentSnapIndex = closestIndex; - this.animateToPosition(closestIndex, true); - }; - - private getCurrentTransform(): number { - if (!this.sheetElement) { - return 100; - } - - const transform = this.sheetElement.style.transform; - if (transform && transform.includes('translateY')) { - const match = transform.match(/translateY\(([^)]+)%?\)/); - if (match) { - return parseFloat(match[1].replace('%', '')); - } - } - return 100; - } - - render() { - return ( -
-
(this.sheetElement = el!)} - onClick={(event: MouseEvent) => event.stopPropagation()} - > -
-
-
-
-
- -
- -
-
-
- ); - } -} diff --git a/src/components/visual/side-panel/side-panel.scss b/src/components/visual/side-panel/side-panel.scss deleted file mode 100644 index dc995c7f..00000000 --- a/src/components/visual/side-panel/side-panel.scss +++ /dev/null @@ -1,70 +0,0 @@ -.side-panel-wrapper { - @apply mvx:flex mvx:justify-end mvx:items-start mvx:z-50; - @apply mvx:pointer-events-none mvx:invisible; - - @media (min-width: 480px) { - @apply mvx:fixed mvx:top-0 mvx:left-0 mvx:right-0 mvx:bottom-0 mvx:p-4 mvx:pr-0 mvx:items-center; - } - - &:before { - @apply mvx:opacity-0 mvx:left-0 mvx:top-0 mvx:right-0 mvx:bottom-0 mvx:transition-all mvx:absolute mvx:duration-200; - @apply mvx:pointer-events-none mvx:ease-in-out; - background: var(--mvx-neutral-900); - content: ''; - - @supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) { - @apply mvx:opacity-50; - background: var(--mvx-neutral-900); - -webkit-backdrop-filter: blur(0.375rem); - backdrop-filter: blur(0.375rem); - } - } - - &.visible { - @apply mvx:pointer-events-auto mvx:visible; - - &:before { - @apply mvx:opacity-90; - - @supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) { - @apply mvx:opacity-50; - } - } - } - - .side-panel { - @apply mvx:p-6 mvx:w-full mvx:flex mvx:overflow-hidden mvx:flex-col mvx:transition-all mvx:ease-in-out mvx:duration-200; - @apply mvx:rounded-tl-3xl mvx:rounded-tr-3xl mvx:backdrop-blur mvx:pb-0; - border: 1px solid var(--mvx-border-color-primary); - background-color: var(--mvx-bg-color-primary); - - @media (min-width: 480px) { - @apply mvx:w-110 mvx:h-full mvx:mr-4; - transform: translateX(calc(100% + 48px)); - border-radius: 20px; - } - - &:after { - @apply mvx:left-0 mvx:right-0 mvx:h-0 mvx:absolute; - box-shadow: 0px -8px 12px 16px var(--mvx-bg-color-primary); - bottom: calc(4px * -1); - content: ''; - } - - &.visible { - @apply mvx:transform mvx:translate-y-0; - - @media (min-width: 480px) { - @apply mvx:translate-x-0; - } - } - } - - .side-panel-content { - @apply mvx:flex-1 mvx:flex mvx:flex-col mvx:overflow-auto; - - &::-webkit-scrollbar { - @apply mvx:hidden; - } - } -} diff --git a/src/components/visual/side-panel/side-panel.tsx b/src/components/visual/side-panel/side-panel.tsx deleted file mode 100644 index 55eee387..00000000 --- a/src/components/visual/side-panel/side-panel.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import type { EventEmitter } from '@stencil/core'; -import { Component, Element, Event, h, Prop, State, Watch } from '@stencil/core'; -import classNames from 'classnames'; - -@Component({ - tag: 'mvx-side-panel', - styleUrl: 'side-panel.scss', - shadow: true, -}) -export class SidePanel { - @Element() el: HTMLElement; - - @Prop() isOpen: boolean = false; - @Prop() panelClassName?: string; - @Prop() panelTitle: string; - @Prop() hasBackButton?: boolean; - @Prop() showHeader?: boolean = true; - - @Event() close: EventEmitter; - @Event() back: EventEmitter; - - @State() isVisible: boolean = false; - @State() shouldAnimate: boolean = false; - - private closeTimeout: NodeJS.Timeout | null = null; - private readonly ANIMATION_DURATION_MS = 300; - private sidePanelIdentifier = 'side-panel'; - - @Watch('isOpen') - handleOpenChange(newValue: boolean) { - if (newValue) { - clearTimeout(this.closeTimeout); - this.isVisible = true; - requestAnimationFrame(() => { - this.shouldAnimate = true; - }); - - return; - } - - this.shouldAnimate = false; - this.closeTimeout = setTimeout(() => { - this.isVisible = false; - }, this.ANIMATION_DURATION_MS); - } - - disconnectedCallback() { - clearTimeout(this.closeTimeout); - this.isVisible = false; - this.shouldAnimate = false; - this.closeTimeout = null; - } - - handleOverlayClick(event: MouseEvent) { - if (event.target === event.currentTarget) { - this.close.emit(); - } - } - - handleCloseClick(event: MouseEvent) { - event.preventDefault(); - this.close.emit(); - } - - handleBackClick(event: MouseEvent) { - event.preventDefault(); - this.back.emit(); - } - - render() { - return ( -
- this.close.emit()} - sidePanelIdentifier={this.sidePanelIdentifier} - > -
- {this.showHeader && ( - - )} - -
- -
-
-
-
- ); - } -} diff --git a/src/components/common/tooltip/tooltip.scss b/src/components/visual/tooltip/tooltip.scss similarity index 100% rename from src/components/common/tooltip/tooltip.scss rename to src/components/visual/tooltip/tooltip.scss diff --git a/src/components/common/tooltip/tooltip.tsx b/src/components/visual/tooltip/tooltip.tsx similarity index 100% rename from src/components/common/tooltip/tooltip.tsx rename to src/components/visual/tooltip/tooltip.tsx diff --git a/src/components/common/trim/tests/trim.e2e.tsx b/src/components/visual/trim/tests/trim.e2e.tsx similarity index 100% rename from src/components/common/trim/tests/trim.e2e.tsx rename to src/components/visual/trim/tests/trim.e2e.tsx diff --git a/src/components/common/trim/trim.scss b/src/components/visual/trim/trim.scss similarity index 100% rename from src/components/common/trim/trim.scss rename to src/components/visual/trim/trim.scss diff --git a/src/components/common/trim/trim.stories.tsx b/src/components/visual/trim/trim.stories.tsx similarity index 100% rename from src/components/common/trim/trim.stories.tsx rename to src/components/visual/trim/trim.stories.tsx diff --git a/src/components/common/trim/trim.tsx b/src/components/visual/trim/trim.tsx similarity index 100% rename from src/components/common/trim/trim.tsx rename to src/components/visual/trim/trim.tsx From 82d1b7ce3052309439a4ce4161c67236baca452a Mon Sep 17 00:00:00 2001 From: Iulia Cimpeanu <72752718+iuliacimpeanu@users.noreply.github.com> Date: Mon, 8 Dec 2025 11:54:47 +0200 Subject: [PATCH 06/10] Refactored transaction list item (#274) * Refactored styles * Refactored transaction-list-item component * Updated changelog * Fixed tests * Fixes after review --- CHANGELOG.md | 1 + src/common/Icon/Icon.tsx | 4 + .../DefaultTransactionIconSmall.tsx | 17 +++ .../DefaultTransactionIconSmall/index.ts | 1 + src/common/Icon/icon.types.ts | 1 + .../TransactionAssetIcon.tsx | 14 +- src/components.d.ts | 21 +-- .../notifications-feed/notifications-feed.tsx | 5 +- .../tests/notifications-feed.spec.tsx | 9 +- .../transaction-toast-content.tsx | 2 +- .../tests/transaction-toast-details.e2e.ts | 2 +- .../transaction-toast-details.tsx | 2 +- .../transaction-toast/transaction-toast.tsx | 2 +- .../transaction-toast.type.ts | 2 +- .../TransactionListItem.tsx | 92 ++++++++++++ .../tests/transaction-list-item.spec.tsx | 32 ++-- .../transactionListItem.styles.ts | 24 +++ .../transactionListItem.types.ts} | 0 .../transaction-list-item.scss | 141 ------------------ .../transaction-list-item.tsx | 86 ----------- src/global/tailwind.css | 4 +- 21 files changed, 184 insertions(+), 278 deletions(-) create mode 100644 src/common/Icon/components/DefaultTransactionIconSmall/DefaultTransactionIconSmall.tsx create mode 100644 src/common/Icon/components/DefaultTransactionIconSmall/index.ts create mode 100644 src/components/visual/TransactionListItem/TransactionListItem.tsx rename src/components/visual/{transaction-list-item => TransactionListItem}/tests/transaction-list-item.spec.tsx (84%) create mode 100644 src/components/visual/TransactionListItem/transactionListItem.styles.ts rename src/components/visual/{transaction-list-item/transaction-list-item.types.ts => TransactionListItem/transactionListItem.types.ts} (100%) delete mode 100644 src/components/visual/transaction-list-item/transaction-list-item.scss delete mode 100644 src/components/visual/transaction-list-item/transaction-list-item.tsx diff --git a/CHANGELOG.md b/CHANGELOG.md index 917f1784..f0b7f10a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- [Refactored transaction list item](https://github.com/multiversx/mx-sdk-dapp-ui/pull/274) - [Refactored side panel components](https://github.com/multiversx/mx-sdk-dapp-ui/pull/271) - [Fixed trimmed address not showing in address-table](https://github.com/multiversx/mx-sdk-dapp-ui/pull/273) - [Added minimize/maximize action for toasts](https://github.com/multiversx/mx-sdk-dapp-ui/pull/272) diff --git a/src/common/Icon/Icon.tsx b/src/common/Icon/Icon.tsx index 7d595203..d1c4e551 100644 --- a/src/common/Icon/Icon.tsx +++ b/src/common/Icon/Icon.tsx @@ -28,6 +28,7 @@ import { MinimizeIcon } from './components/MinimizeIcon'; import { PencilIcon } from './components/PencilIcon'; import { SpinnerIcon } from './components/SpinnerIcon'; import { TriangularWarningIcon } from './components/TriangularWarningIcon'; +import { DefaultTransactionIconSmall } from './components/DefaultTransactionIconSmall'; import type { IconPropsType } from './icon.types'; export const Icon = ({ name, ...properties }: IconPropsType) => { @@ -120,6 +121,9 @@ export const Icon = ({ name, ...properties }: IconPropsType) => { case 'maximize': return ; + case 'default-transaction-icon-small': + return + default: console.error(`No data for the ${name} icon.`); return null; diff --git a/src/common/Icon/components/DefaultTransactionIconSmall/DefaultTransactionIconSmall.tsx b/src/common/Icon/components/DefaultTransactionIconSmall/DefaultTransactionIconSmall.tsx new file mode 100644 index 00000000..83f04cbc --- /dev/null +++ b/src/common/Icon/components/DefaultTransactionIconSmall/DefaultTransactionIconSmall.tsx @@ -0,0 +1,17 @@ +import { h } from '@stencil/core'; +import type { JSXBase } from '@stencil/core/internal'; + +export const DefaultTransactionIconSmall = ({ class: className, ...properties }: JSXBase.IntrinsicElements['svg'] & { class?: string }) => ( + + + + + + + + + + + +); + diff --git a/src/common/Icon/components/DefaultTransactionIconSmall/index.ts b/src/common/Icon/components/DefaultTransactionIconSmall/index.ts new file mode 100644 index 00000000..3bb713ef --- /dev/null +++ b/src/common/Icon/components/DefaultTransactionIconSmall/index.ts @@ -0,0 +1 @@ +export * from './DefaultTransactionIconSmall'; \ No newline at end of file diff --git a/src/common/Icon/icon.types.ts b/src/common/Icon/icon.types.ts index 9fad0756..4f45b3f6 100644 --- a/src/common/Icon/icon.types.ts +++ b/src/common/Icon/icon.types.ts @@ -29,6 +29,7 @@ export enum IconNamesEnum { arrowRight = 'arrow-right', minimize = 'minimize', maximize = 'maximize', + defaultTransactionIconSmall = 'default-transaction-icon-small' } export type IconPropsType = JSXBase.IntrinsicElements['svg'] & { diff --git a/src/common/TransactionAssetIcon/TransactionAssetIcon.tsx b/src/common/TransactionAssetIcon/TransactionAssetIcon.tsx index 27d801da..7ca25685 100644 --- a/src/common/TransactionAssetIcon/TransactionAssetIcon.tsx +++ b/src/common/TransactionAssetIcon/TransactionAssetIcon.tsx @@ -1,6 +1,7 @@ import { h } from '@stencil/core'; +import classNames from 'classnames'; import { Icon } from 'common/Icon'; -import type { ITransactionListItem } from 'components/visual/transaction-list-item/transaction-list-item.types'; +import type { ITransactionListItem } from 'components/visual/TransactionListItem/transactionListItem.types'; export enum IconSizeEnumType { small = 'small', @@ -10,9 +11,12 @@ export enum IconSizeEnumType { interface ITransactionAssetIconProps { transaction: ITransactionListItem; iconSize: IconSizeEnumType; + iconClass?: string; + imgClass?: string; + textClass?: string; } -export function TransactionAssetIcon({ transaction, iconSize }: ITransactionAssetIconProps) { +export function TransactionAssetIcon({ transaction, iconSize, iconClass, imgClass, textClass }: ITransactionAssetIconProps) { if (transaction?.asset === null) { return iconSize === IconSizeEnumType.small ? ( @@ -27,17 +31,17 @@ export function TransactionAssetIcon({ transaction, iconSize }: ITransactionAsse src={transaction.asset.imageUrl} alt="Transaction icon" loading="lazy" - class="mvx:max-w-full mvx:max-h-full" + class={classNames("mvx:max-w-full mvx:max-h-full", imgClass)} /> ); } if (transaction.asset.icon) { - return ; + return ; } if (transaction.asset.text) { - return {transaction.asset.text}; + return {transaction.asset.text}; } return iconSize === IconSizeEnumType.small ? ( diff --git a/src/components.d.ts b/src/components.d.ts index 390aed8c..4482b8fd 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -10,9 +10,8 @@ import { ButtonSizeEnum, ButtonVariantEnum } from "./common/Button/button.types" import { CustomToastType, IComponentToast, ISimpleToast } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; import { IConfirmScreenData, IConnectScreenData, ILedgerConnectPanelData } from "./components/functional/ledger-connect/ledger-connect.types"; import { IEventBus } from "./utils/EventBus"; -import { ITransactionListItem } from "./components/visual/transaction-list-item/transaction-list-item.types"; import { LocalJSX as JSX } from "@stencil/core"; -import { ITransactionListItem as ITransactionListItem1 } from "./components/visual/transaction-list-item/transaction-list-item.types"; +import { ITransactionListItem } from "./components/visual/TransactionListItem/transactionListItem.types"; import { IToastDataState, ITransactionProgressState } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; import { TransactionStatusEnum } from "./constants/transactionStatus.enum"; import { TransactionRowType } from "./components/controlled/transactions-table/transactions-table.type"; @@ -22,9 +21,8 @@ export { ButtonSizeEnum, ButtonVariantEnum } from "./common/Button/button.types" export { CustomToastType, IComponentToast, ISimpleToast } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; export { IConfirmScreenData, IConnectScreenData, ILedgerConnectPanelData } from "./components/functional/ledger-connect/ledger-connect.types"; export { IEventBus } from "./utils/EventBus"; -export { ITransactionListItem } from "./components/visual/transaction-list-item/transaction-list-item.types"; export { LocalJSX as JSX } from "@stencil/core"; -export { ITransactionListItem as ITransactionListItem1 } from "./components/visual/transaction-list-item/transaction-list-item.types"; +export { ITransactionListItem } from "./components/visual/TransactionListItem/transactionListItem.types"; export { IToastDataState, ITransactionProgressState } from "./components/functional/toasts-list/components/transaction-toast/transaction-toast.type"; export { TransactionStatusEnum } from "./constants/transactionStatus.enum"; export { TransactionRowType } from "./components/controlled/transactions-table/transactions-table.type"; @@ -241,9 +239,6 @@ export namespace Components { */ "triggerOnClick"?: boolean; } - interface MvxTransactionListItem { - "transaction": ITransactionListItem; - } interface MvxTransactionToast { "fullWidth"?: boolean; /** @@ -734,12 +729,6 @@ declare global { prototype: HTMLMvxTooltipElement; new (): HTMLMvxTooltipElement; }; - interface HTMLMvxTransactionListItemElement extends Components.MvxTransactionListItem, HTMLStencilElement { - } - var HTMLMvxTransactionListItemElement: { - prototype: HTMLMvxTransactionListItemElement; - new (): HTMLMvxTransactionListItemElement; - }; interface HTMLMvxTransactionToastElementEventMap { "deleteToast": void; } @@ -914,7 +903,6 @@ declare global { "mvx-spinner-icon": HTMLMvxSpinnerIconElement; "mvx-toast-list": HTMLMvxToastListElement; "mvx-tooltip": HTMLMvxTooltipElement; - "mvx-transaction-list-item": HTMLMvxTransactionListItemElement; "mvx-transaction-toast": HTMLMvxTransactionToastElement; "mvx-transaction-toast-content": HTMLMvxTransactionToastContentElement; "mvx-transaction-toast-details": HTMLMvxTransactionToastDetailsElement; @@ -1149,9 +1137,6 @@ declare namespace LocalJSX { */ "triggerOnClick"?: boolean; } - interface MvxTransactionListItem { - "transaction"?: ITransactionListItem; - } interface MvxTransactionToast { "fullWidth"?: boolean; "onDeleteToast"?: (event: MvxTransactionToastCustomEvent) => void; @@ -1302,7 +1287,6 @@ declare namespace LocalJSX { "mvx-spinner-icon": MvxSpinnerIcon; "mvx-toast-list": MvxToastList; "mvx-tooltip": MvxTooltip; - "mvx-transaction-list-item": MvxTransactionListItem; "mvx-transaction-toast": MvxTransactionToast; "mvx-transaction-toast-content": MvxTransactionToastContent; "mvx-transaction-toast-details": MvxTransactionToastDetails; @@ -1364,7 +1348,6 @@ declare module "@stencil/core" { "mvx-spinner-icon": LocalJSX.MvxSpinnerIcon & JSXBase.HTMLAttributes; "mvx-toast-list": LocalJSX.MvxToastList & JSXBase.HTMLAttributes; "mvx-tooltip": LocalJSX.MvxTooltip & JSXBase.HTMLAttributes; - "mvx-transaction-list-item": LocalJSX.MvxTransactionListItem & JSXBase.HTMLAttributes; "mvx-transaction-toast": LocalJSX.MvxTransactionToast & JSXBase.HTMLAttributes; "mvx-transaction-toast-content": LocalJSX.MvxTransactionToastContent & JSXBase.HTMLAttributes; "mvx-transaction-toast-details": LocalJSX.MvxTransactionToastDetails & JSXBase.HTMLAttributes; diff --git a/src/components/functional/notifications-feed/notifications-feed.tsx b/src/components/functional/notifications-feed/notifications-feed.tsx index 064900b6..ce4a8cc0 100644 --- a/src/components/functional/notifications-feed/notifications-feed.tsx +++ b/src/components/functional/notifications-feed/notifications-feed.tsx @@ -5,10 +5,11 @@ import { ConnectionMonitor } from 'utils/ConnectionMonitor'; import type { IEventBus } from 'utils/EventBus'; import { EventBus } from 'utils/EventBus'; -import type { ITransactionListItem } from '../../visual/transaction-list-item/transaction-list-item.types'; +import { ITransactionListItem } from 'components/visual/TransactionListItem/transactionListItem.types'; import type { ITransactionToast } from '../toasts-list/components/transaction-toast/transaction-toast.type'; import { NotificationsFeedEventsEnum } from './notifications-feed.types'; import { ANIMATION_DELAY_PROMISE } from 'components/visual/SidePanel/sidePanel.constants'; +import { TransactionListItem } from 'components/visual/TransactionListItem/TransactionListItem'; @Component({ tag: 'mvx-notifications-feed', @@ -126,7 +127,7 @@ export class NotificationsFeed {
{hasActivity ? ( - this.transactionsHistory.map(transaction => ) + this.transactionsHistory.map(transaction => ) ) : (
No activity to show
)} diff --git a/src/components/functional/notifications-feed/tests/notifications-feed.spec.tsx b/src/components/functional/notifications-feed/tests/notifications-feed.spec.tsx index 769b2356..0e346314 100644 --- a/src/components/functional/notifications-feed/tests/notifications-feed.spec.tsx +++ b/src/components/functional/notifications-feed/tests/notifications-feed.spec.tsx @@ -2,6 +2,7 @@ import { newSpecPage } from '@stencil/core/testing'; import { NotificationsFeed } from '../notifications-feed'; import { NotificationsFeedEventsEnum } from '../notifications-feed.types'; +import type { ITransactionListItem } from 'components/visual/TransactionListItem/transactionListItem.types'; describe('notifications-feed', () => { const mockPendingTransactions = [ @@ -16,13 +17,17 @@ describe('notifications-feed', () => { }, ]; - const mockTransactionsHistory = [ + const mockTransactionsHistory: ITransactionListItem[] = [ { hash: 'hash1', status: 'success', link: 'link1', - title: 'Transaction 1', timestamp: Date.now(), + asset: null, + action: { + name: 'Transaction 1', + }, + interactor: 'erd1test...', }, ]; diff --git a/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-content/transaction-toast-content.tsx b/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-content/transaction-toast-content.tsx index 545a3df7..02c0f186 100644 --- a/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-content/transaction-toast-content.tsx +++ b/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-content/transaction-toast-content.tsx @@ -6,7 +6,7 @@ import { Icon } from 'common/Icon'; import { IconSizeEnumType, TransactionAssetIcon } from 'common/TransactionAssetIcon/TransactionAssetIcon'; import { Trim } from 'common/Trim/Trim'; import { getAmountParts } from 'components/functional/toasts-list/helpers'; -import type { ITransactionListItem } from 'components/visual/transaction-list-item/transaction-list-item.types'; +import type { ITransactionListItem } from 'components/visual/TransactionListItem/transactionListItem.types'; import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; import { TransactionStatusEnum } from 'constants/transactionStatus.enum'; import { getIsTransactionFailed } from 'utils/getTransactionStatus'; diff --git a/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-details/tests/transaction-toast-details.e2e.ts b/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-details/tests/transaction-toast-details.e2e.ts index 21323e08..38a3a7d3 100644 --- a/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-details/tests/transaction-toast-details.e2e.ts +++ b/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-details/tests/transaction-toast-details.e2e.ts @@ -1,5 +1,5 @@ import { newE2EPage } from '@stencil/core/testing'; -import type { ITransactionListItem } from 'components/visual/transaction-list-item/transaction-list-item.types'; +import type { ITransactionListItem } from 'components/visual/TransactionListItem/transactionListItem.types'; import { TransactionStatusEnum } from 'constants/transactionStatus.enum'; const createMockTransaction = (params: { diff --git a/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-details/transaction-toast-details.tsx b/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-details/transaction-toast-details.tsx index f49e544e..33ac6260 100644 --- a/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-details/transaction-toast-details.tsx +++ b/src/components/functional/toasts-list/components/transaction-toast/components/transaction-toast-details/transaction-toast-details.tsx @@ -2,7 +2,7 @@ import type { JSX } from '@stencil/core'; import { Component, h, Prop, State } from '@stencil/core'; import classNames from 'classnames'; import { Icon } from 'common/Icon'; -import type { ITransactionListItem } from 'components/visual/transaction-list-item/transaction-list-item.types'; +import type { ITransactionListItem } from 'components/visual/TransactionListItem/transactionListItem.types'; import { DataTestIdsEnum } from 'constants/dataTestIds.enum'; @Component({ diff --git a/src/components/functional/toasts-list/components/transaction-toast/transaction-toast.tsx b/src/components/functional/toasts-list/components/transaction-toast/transaction-toast.tsx index 8e5443f6..5692a740 100644 --- a/src/components/functional/toasts-list/components/transaction-toast/transaction-toast.tsx +++ b/src/components/functional/toasts-list/components/transaction-toast/transaction-toast.tsx @@ -1,6 +1,6 @@ import type { EventEmitter, JSX } from '@stencil/core'; import { Component, Event, h, Prop } from '@stencil/core'; -import type { ITransactionListItem } from 'components/visual/transaction-list-item/transaction-list-item.types'; +import type { ITransactionListItem } from 'components/visual/TransactionListItem/transactionListItem.types'; import { TransactionStatusEnum } from 'constants/transactionStatus.enum'; import type { IToastDataState, ITransactionProgressState } from './transaction-toast.type'; diff --git a/src/components/functional/toasts-list/components/transaction-toast/transaction-toast.type.ts b/src/components/functional/toasts-list/components/transaction-toast/transaction-toast.type.ts index 022b861b..4685e2d7 100644 --- a/src/components/functional/toasts-list/components/transaction-toast/transaction-toast.type.ts +++ b/src/components/functional/toasts-list/components/transaction-toast/transaction-toast.type.ts @@ -1,7 +1,7 @@ // match these interfaces with src/path-to-file.type.ts from sdk-dapp import type { JSX } from '@stencil/core'; import type { IconNamesEnum } from 'common/Icon/icon.types'; -import type { ITransactionListItem } from 'components/visual/transaction-list-item/transaction-list-item.types'; +import type { ITransactionListItem } from 'components/visual/TransactionListItem/transactionListItem.types'; export interface ITransactionProgressState { progressClass?: string; startTime: number; diff --git a/src/components/visual/TransactionListItem/TransactionListItem.tsx b/src/components/visual/TransactionListItem/TransactionListItem.tsx new file mode 100644 index 00000000..7d72281e --- /dev/null +++ b/src/components/visual/TransactionListItem/TransactionListItem.tsx @@ -0,0 +1,92 @@ +import { h } from '@stencil/core'; +import classNames from 'classnames'; +import { FormatAmount } from 'common/FormatAmount/FormatAmount'; +import { IconSizeEnumType, TransactionAssetIcon } from 'common/TransactionAssetIcon/TransactionAssetIcon'; +import { Trim } from 'common/Trim/Trim'; +import { getAmountParts } from 'components/functional/toasts-list/helpers'; +import { getIsTransactionFailed } from 'utils/getTransactionStatus'; +import styles from './transactionListItem.styles' + +import type { ITransactionListItem } from './transactionListItem.types'; +import { Tooltip } from 'common/Tooltip/Tooltip'; +import { Icon } from 'common/Icon'; + +interface TransactionListItemPropsType { + transaction: ITransactionListItem; +} + +export function TransactionListItem({ transaction }: TransactionListItemPropsType) { + if (!transaction) { + return null; + } + const amount = getAmountParts(transaction?.amount ?? ''); + const showTooltip = transaction.amount && amount.label.length > 12; + + return ( + +
+
+ +
+ +
+
+
+

+ {transaction.action.name} +

+ + {showTooltip && ( + }> + {amount.label} + + )} +
+ + {transaction.amount && ( + + )} +
+
+ {transaction.directionLabel && ( + {transaction.directionLabel} + )} + +
+ {transaction.interactorAsset ? ( + Service icon + ) : ( + + )} +
+ + +
+
+
+
+ ); +} + diff --git a/src/components/visual/transaction-list-item/tests/transaction-list-item.spec.tsx b/src/components/visual/TransactionListItem/tests/transaction-list-item.spec.tsx similarity index 84% rename from src/components/visual/transaction-list-item/tests/transaction-list-item.spec.tsx rename to src/components/visual/TransactionListItem/tests/transaction-list-item.spec.tsx index ef1ead8a..6b9d4f38 100644 --- a/src/components/visual/transaction-list-item/tests/transaction-list-item.spec.tsx +++ b/src/components/visual/TransactionListItem/tests/transaction-list-item.spec.tsx @@ -1,19 +1,17 @@ +import { h } from '@stencil/core'; import { newSpecPage } from '@stencil/core/testing'; -import { FormatAmount } from 'common/FormatAmount/FormatAmount'; import { IconNamesEnum } from 'common/Icon/icon.types'; -import { TransactionAssetIcon } from 'common/TransactionAssetIcon/TransactionAssetIcon'; -import { TransactionListItem } from '../transaction-list-item'; -import type { ITransactionListItem } from '../transaction-list-item.types'; +import { TransactionListItem } from '../TransactionListItem'; +import type { ITransactionListItem } from '../transactionListItem.types'; describe('transaction-list-item', () => { const createPage = async (transaction: ITransactionListItem) => { const page = await newSpecPage({ - components: [TransactionListItem, TransactionAssetIcon, FormatAmount], - html: '', + components: [], + template: () => , }); - page.root.transaction = transaction; await page.waitForChanges(); return page; }; @@ -40,10 +38,10 @@ describe('transaction-list-item', () => { describe('empty state', () => { it('renders empty when no transaction is provided', async () => { const page = await newSpecPage({ - components: [TransactionListItem], - html: '', + components: [], + template: () => , }); - expect(page.root.querySelector('.transaction-item')).toBeFalsy(); + expect(page.root).toBeFalsy(); }); }); @@ -68,7 +66,7 @@ describe('transaction-list-item', () => { it('renders with asset text', async () => { const transaction = { ...baseTransaction, asset: { text: 'TX' } }; const page = await createPage(transaction); - const iconText = page.root.querySelector('span'); + const iconText = page.root.querySelector('.transaction-icon-text'); expect(iconText).not.toBeNull(); expect(iconText.textContent).toBe('TX'); }); @@ -85,7 +83,7 @@ describe('transaction-list-item', () => { const transaction = { ...baseTransaction, asset: null }; const page = await createPage(transaction); - const regularIcon = page.root.querySelector('.icon-text'); + const regularIcon = page.root.querySelector('.transaction-icon-text'); expect(regularIcon).toBeFalsy(); const defaultIcon = page.root.querySelector('mvx-default-transaction-icon-large'); @@ -143,8 +141,8 @@ describe('transaction-list-item', () => { const page = await createPage(baseTransaction); const amount = page.root.querySelector('.transaction-amount'); - expect(amount).toHaveClass('amount-positive'); - expect(amount).not.toHaveClass('amount-negative'); + expect(amount).toHaveClass('transaction-amount-positive'); + expect(amount).not.toHaveClass('transaction-amount-negative'); expect(amount.textContent.trim()).toBe(baseTransaction.amount.replace(' ', '')); }); @@ -153,9 +151,9 @@ describe('transaction-list-item', () => { const page = await createPage(transaction); const amount = page.root.querySelector('.transaction-amount'); - expect(amount).toHaveClass('amount-negative'); - expect(amount).not.toHaveClass('amount-positive'); + expect(amount).toHaveClass('transaction-amount-negative'); + expect(amount).not.toHaveClass('transaction-amount-positive'); expect(amount.textContent.trim()).toBe(transaction.amount.replace(' ', '')); }); }); -}); +}); \ No newline at end of file diff --git a/src/components/visual/TransactionListItem/transactionListItem.styles.ts b/src/components/visual/TransactionListItem/transactionListItem.styles.ts new file mode 100644 index 00000000..5d91568f --- /dev/null +++ b/src/components/visual/TransactionListItem/transactionListItem.styles.ts @@ -0,0 +1,24 @@ +// prettier-ignore +export default { + transactionItem: 'transaction-item mvx:flex mvx:items-center mvx:py-5 mvx:px-3 mvx:gap-3 mvx:rounded-lg mvx:transition-all mvx:duration-200 mvx:ease-in-out mvx:bg-secondary mvx:hover:bg-hover mvx:xxs:gap-4 mvx:xxs:px-4', + transactionIcon: 'transaction-icon mvx:w-8 mvx:h-8 mvx:rounded-full mvx:text-primary', + transactionIconFailed: 'transaction-icon-failed mvx:text-error', + transactionIconImg: 'transaction-icon-img mvx:w-full mvx:h-full mvx:object-cover', + transactionIconText: 'transaction-icon-text mvx:text-xl mvx:w-10 mvx:h-10 mvx:text-primary', + transactionIconSvg: 'transaction-icon-svg mvx:w-8 mvx:h-8 mvx:text-primary', + transactionDetails: 'transaction-details mvx:flex-1 mvx:min-w-0', + transactionDetailsHeader: 'transaction-details-header mvx:flex mvx:items-center mvx:justify-between', + transactionHeaderLeft: 'transaction-header-left mvx:flex mvx:gap-1 mvx:items-center mvx:justify-center mvx:fill-link', + transactionTitle: 'transaction-title mvx:text-xs mvx:font-medium mvx:leading-6 mvx:tracking-tight mvx:m-0 mvx:text-tertiary-text mvx:xxs:text-sm mvx:xs:text-base', + transactionTitleTruncate: 'transaction-title-truncate mvx:truncate mvx:max-w-30 mvx:shrink-0', + transactionDetailsInfo: 'transaction-details-info mvx:flex mvx:items-center mvx:gap-1 mvx:self-stretch mvx:text-sm mvx:font-medium mvx:leading-4 mvx:tracking-tight mvx:text-label', + transactionDetailsInfoText: 'transaction-details-info-text mvx:text-sm mvx:font-medium mvx:leading-4 mvx:tracking-tight mvx:max-w-64 mvx:text-label', + transactionDetailsInfoIcon: 'transaction-details-info-icon mvx:rounded-full mvx:w-4 mvx:h-4', + transactionDetailsInfoIconImg: 'transaction-details-info-icon-img mvx:rounded-full mvx:w-full mvx:h-full', + transactionAmount: 'transaction-amount mvx:flex mvx:text-xs mvx:font-medium mvx:leading-6 mvx:tracking-tight mvx:text-tertiary-text mvx:xxs:text-sm mvx:xs:text-base', + transactionAmountPositive: 'transaction-amount-positive mvx:text-success', + transactionAmountNegative: 'transaction-amount-negative', + transactionFailed: 'transaction-failed mvx:text-error', + transactionAmountDecimal: 'transaction-amount-decimal mvx:opacity-70', + transactionAmountLabel: 'transaction-amount-label mvx:opacity-70 mvx:tracking-tight mvx:truncate mvx:max-w-30 mvx:shrink-0' +} satisfies Record; \ No newline at end of file diff --git a/src/components/visual/transaction-list-item/transaction-list-item.types.ts b/src/components/visual/TransactionListItem/transactionListItem.types.ts similarity index 100% rename from src/components/visual/transaction-list-item/transaction-list-item.types.ts rename to src/components/visual/TransactionListItem/transactionListItem.types.ts diff --git a/src/components/visual/transaction-list-item/transaction-list-item.scss b/src/components/visual/transaction-list-item/transaction-list-item.scss deleted file mode 100644 index afde8f5a..00000000 --- a/src/components/visual/transaction-list-item/transaction-list-item.scss +++ /dev/null @@ -1,141 +0,0 @@ -.transaction-item { - @apply mvx:flex mvx:items-center mvx:py-5 mvx:px-3 mvx:gap-3 mvx:rounded-lg; - @apply mvx:transition-all mvx:duration-200 mvx:ease-in-out; - background-color: var(--mvx-bg-color-secondary); - - &:hover { - background-color: var(--mvx-hover-color-primary); - } - - @media (min-width: 375px) { - @apply mvx:gap-4 mvx:px-4; - } -} - -.transaction-icon { - @apply mvx:w-8 mvx:h-8 mvx:rounded-full; - color: var(--mvx-text-color-primary); - - &.transaction-icon-failed { - color: var(--mvx-error-color); - } - - img { - @apply mvx:w-full mvx:h-full mvx:object-cover; - } - - span, - i { - @apply mvx:text-xl mvx:w-10 mvx:h-10; - color: var(--mvx-text-color-primary); - } - - .svg-inline--fa { - @apply mvx:w-8 mvx:h-8; - color: var(--mvx-text-color-primary); - } -} - -.transaction-details { - @apply mvx:flex-1 mvx:min-w-0; -} - -.transaction-details-header { - @apply mvx:flex mvx:items-center mvx:justify-between; -} - -.transaction-header-left { - @apply mvx:flex mvx:gap-1 mvx:items-center mvx:justify-center mvx:fill-link; -} - -.transaction-title { - @apply mvx:text-xs mvx:font-medium mvx:leading-6 mvx:tracking-tight mvx:m-0; - color: var(--mvx-text-color-tertiary); - - &.truncate { - @apply mvx:truncate mvx:max-w-30 mvx:shrink-0; - } - - @media (min-width: 375px) { - @apply mvx:text-sm; - } - - @media (min-width: 440px) { - @apply mvx:text-base; - } -} - -.transaction-details-info { - @apply mvx:flex mvx:items-center mvx:gap-1 mvx:self-stretch mvx:text-sm mvx:font-medium mvx:leading-4 mvx:tracking-tight; - color: var(--mvx-label-color); -} - -.transaction-details-info-text { - @apply mvx:text-sm mvx:font-medium mvx:leading-4 mvx:tracking-tight mvx:max-w-64; - color: var(--mvx-label-color); - - span { - @apply mvx:text-sm mvx:font-medium mvx:leading-4 mvx:tracking-tight; - color: var(--mvx-label-color); - } - - .trim-wrapper { - @apply mvx:flex mvx:items-start mvx:gap-1; - } - - .left, - .right { - @apply mvx:mt-1 mvx:font-normal mvx:leading-4 mvx:tracking-tight; - color: var(--mvx-label-color); - } - - .ellipsis { - @apply mvx:text-base mvx:font-normal mvx:leading-4 mvx:tracking-tight; - color: var(--mvx-label-color); - } -} - -.transaction-details-info-icon { - @apply mvx:rounded-full mvx:w-4 mvx:h-4; - - img { - @apply mvx:rounded-full mvx:w-4 mvx:h-4; - } -} - -.transaction-right { - @apply mvx:flex mvx:items-start mvx:ml-auto; -} - -.transaction-amount { - @apply mvx:flex mvx:text-xs mvx:font-medium mvx:leading-6 mvx:tracking-tight; - color: var(--mvx-text-color-tertiary); - - @media (min-width: 375px) { - @apply mvx:text-sm; - } - - @media (min-width: 440) { - @apply mvx:text-base; - } - - &.amount-positive { - color: var(--mvx-success-color); - } - - &.transaction-failed { - color: var(--mvx-error-color); - } - - .transaction-amount-decimal { - @apply mvx:opacity-70; - } - - .transaction-amount-label { - @apply mvx:opacity-70 mvx:tracking-tight mvx:truncate mvx:max-w-30 mvx:shrink-0; - } -} - -.asset-container { - @apply mvx:flex mvx:items-center; -} diff --git a/src/components/visual/transaction-list-item/transaction-list-item.tsx b/src/components/visual/transaction-list-item/transaction-list-item.tsx deleted file mode 100644 index 5a61ba89..00000000 --- a/src/components/visual/transaction-list-item/transaction-list-item.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import { Component, h, Prop } from '@stencil/core'; -import classNames from 'classnames'; -import { FormatAmount } from 'common/FormatAmount/FormatAmount'; -import { IconSizeEnumType, TransactionAssetIcon } from 'common/TransactionAssetIcon/TransactionAssetIcon'; -import { Trim } from 'common/Trim/Trim'; -import { getAmountParts } from 'components/functional/toasts-list/helpers'; -import { getIsTransactionFailed } from 'utils/getTransactionStatus'; - -import type { ITransactionListItem } from './transaction-list-item.types'; - -@Component({ - tag: 'mvx-transaction-list-item', - styleUrl: 'transaction-list-item.scss', -}) -export class TransactionListItem { - @Prop() transaction: ITransactionListItem; - - render() { - if (!this.transaction) { - return null; - } - const amount = getAmountParts(this.transaction?.amount ?? ''); - const showTooltip = this.transaction.amount && amount.label.length > 12; - - return ( - -
-
- -
- -
-
-
-

- {this.transaction.action.name} -

- - {showTooltip && ( - }> - {amount.label} - - )} -
- - {this.transaction.amount && ( - - )} -
-
- {this.transaction.directionLabel && ( - {this.transaction.directionLabel} - )} - -
- {this.transaction.interactorAsset ? ( - Service icon - ) : ( - - )} -
- - -
-
-
-
- ); - } -} diff --git a/src/global/tailwind.css b/src/global/tailwind.css index 32f57f8f..a78f6c6d 100644 --- a/src/global/tailwind.css +++ b/src/global/tailwind.css @@ -15,8 +15,10 @@ --color-secondary: var(--mvx-bg-color-secondary); --color-tertiary: var(--mvx-bg-color-tertiary); --color-error: var(--mvx-error-color); + --color-success: var(--mvx-success-color); --color-primary: var(--mvx-text-color-primary); --color-secondary-text: var(--mvx-text-color-secondary); + --color-tertiary-text: var(--mvx-text-color-tertiary); --color-surface: var(--mvx-bg-color-primary); --color-outline: var(--mvx-border-color-primary); --color-hover: var(--mvx-hover-color-primary); @@ -107,4 +109,4 @@ .mvx\:animate-spinner { animation: SpinnerAnimation 3000ms linear infinite; } -} +} \ No newline at end of file From 81f06397ab0d200d8a88026ca5f786f29ded25ac Mon Sep 17 00:00:00 2001 From: Iulia Cimpeanu Date: Mon, 8 Dec 2025 11:57:48 +0200 Subject: [PATCH 07/10] Upgraded version --- CHANGELOG.md | 2 ++ package.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0b7f10a..ec99516f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [[0.1.5](https://github.com/multiversx/mx-sdk-dapp-ui/pull/275)] - 2025-12-08 + - [Refactored transaction list item](https://github.com/multiversx/mx-sdk-dapp-ui/pull/274) - [Refactored side panel components](https://github.com/multiversx/mx-sdk-dapp-ui/pull/271) - [Fixed trimmed address not showing in address-table](https://github.com/multiversx/mx-sdk-dapp-ui/pull/273) diff --git a/package.json b/package.json index 2a5ad2b2..43780004 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-dapp-ui", - "version": "0.1.4", + "version": "0.1.5", "description": "A library to hold UI components for a dApp on the MultiversX blockchain", "author": "MultiversX", "license": "MIT", @@ -146,4 +146,4 @@ "typescript": "^5.7.3", "vite": "^7.0.6" } -} +} \ No newline at end of file From 02ebe4a2025681585470cf790171a4f164f28d33 Mon Sep 17 00:00:00 2001 From: Iulia Cimpeanu <72752718+iuliacimpeanu@users.noreply.github.com> Date: Tue, 9 Dec 2025 17:41:35 +0200 Subject: [PATCH 08/10] Fixed copy button (#276) * Fixed copy button * Upgraded version --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/common/CopyButton/CopyButton.tsx | 5 +++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec99516f..5a31e9ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [[0.1.6](https://github.com/multiversx/mx-sdk-dapp-ui/pull/276)] - 2025-12-09 + +- [Fixed copy button](https://github.com/multiversx/mx-sdk-dapp-ui/pull/276) + ## [[0.1.5](https://github.com/multiversx/mx-sdk-dapp-ui/pull/275)] - 2025-12-08 - [Refactored transaction list item](https://github.com/multiversx/mx-sdk-dapp-ui/pull/274) diff --git a/package.json b/package.json index 43780004..c67cbf99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-dapp-ui", - "version": "0.1.5", + "version": "0.1.6", "description": "A library to hold UI components for a dApp on the MultiversX blockchain", "author": "MultiversX", "license": "MIT", diff --git a/src/common/CopyButton/CopyButton.tsx b/src/common/CopyButton/CopyButton.tsx index 73807f81..cf71b13a 100644 --- a/src/common/CopyButton/CopyButton.tsx +++ b/src/common/CopyButton/CopyButton.tsx @@ -13,7 +13,7 @@ interface CopyButtonPropsType { class?: string; text: string; isSuccessOnCopy?: boolean; - handleCopyButtonClick?: (event: MouseEvent) => void; + handleCopyButtonClick?: (event: MouseEvent, text?: string) => void; } export function CopyButton({ @@ -21,10 +21,11 @@ export function CopyButton({ class: className, isSuccessOnCopy, handleCopyButtonClick, + text }: CopyButtonPropsType) { return (
handleCopyButtonClick?.(event)} + onClick={event => handleCopyButtonClick?.(event, text)} class={{ [styles.copyButton]: true, [className]: Boolean(className), From a3f2b6d6f93f323ae829330d7c527fb5c08930c7 Mon Sep 17 00:00:00 2001 From: Iulia Cimpeanu <72752718+iuliacimpeanu@users.noreply.github.com> Date: Tue, 9 Dec 2025 18:08:24 +0200 Subject: [PATCH 09/10] Sync development with main (#278) * 0.1.5 (#275) * Refactored sign transactions panel internal components (#267) * Update styles * Refactored sign transactions footer * Refactored copy button * Refactored button component * Refactored tooltip component * Refactored spinner icon component * Refactored arrow right component * Updated copy button * Updated styles * Refactored sign transactions overview * Refactored sign-transactions-advanced and sign-transactions-header * Updated styles * Fixed test * Updated changelog * Updated files * Fixes after review * Eslint and prettierrc fixes (#270) * Eslint fixes * Prettierrc fixes * Updated changelog * Added minimize/maximize toasts (#272) * Added min/max toasts * Update changelog * Replace icon * Fixed trimmed address not showing in address-table (#273) * Fixed addresses not showing * Fix issue with trimWrapperVisible * Fixed unlockPanelFooter styles * Updated Trim * Updated Trim * Updated changelog --------- Co-authored-by: Gavrila Andrei * Refactored side panel components (#271) * Update styles * Refactored sign transactions footer * Refactored copy button * Refactored button component * Refactored tooltip component * Refactored spinner icon component * Refactored arrow right component * Updated copy button * Updated styles * Refactored sign transactions overview * Refactored sign-transactions-advanced and sign-transactions-header * Updated styles * Updated styles * Fixed test * Updated changelog * Updated changelog * Updated files * Fixes after review * Fixes after review * Updates files location * Refactored side-panel-header comp * Refactored side-panel comp * Refactored side-panel-swipper styles * Refactored side panel swiper component. * Updated components * Updated styles * Updated changelog * Fixed test * Fixes after review * Refactored transaction list item (#274) * Refactored styles * Refactored transaction-list-item component * Updated changelog * Fixed tests * Fixes after review * Upgraded version --------- Co-authored-by: Gavrila Andrei * Updated changelog --------- Co-authored-by: Gavrila Andrei --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a31e9ad..eea91ab1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [[0.1.6](https://github.com/multiversx/mx-sdk-dapp-ui/pull/276)] - 2025-12-09 +## [[0.1.6](https://github.com/multiversx/mx-sdk-dapp-ui/pull/277)] - 2025-12-09 +- [Sync development with main](https://github.com/multiversx/mx-sdk-dapp-ui/pull/278) - [Fixed copy button](https://github.com/multiversx/mx-sdk-dapp-ui/pull/276) ## [[0.1.5](https://github.com/multiversx/mx-sdk-dapp-ui/pull/275)] - 2025-12-08 From ce67d4b8fae308dff32901aff718685618ce5310 Mon Sep 17 00:00:00 2001 From: Iulia Cimpeanu <72752718+iuliacimpeanu@users.noreply.github.com> Date: Thu, 11 Dec 2025 16:02:00 +0200 Subject: [PATCH 10/10] Fixed compatibility issue on stencil/core (#279) * Updated package version * Updated changelog * Updated lockfile --- CHANGELOG.md | 1 + package.json | 4 ++-- pnpm-lock.yaml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eea91ab1..402dc673 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [[0.1.6](https://github.com/multiversx/mx-sdk-dapp-ui/pull/277)] - 2025-12-09 +- [Fixed compatibility issue on stencil/core](https://github.com/multiversx/mx-sdk-dapp-ui/pull/279) - [Sync development with main](https://github.com/multiversx/mx-sdk-dapp-ui/pull/278) - [Fixed copy button](https://github.com/multiversx/mx-sdk-dapp-ui/pull/276) diff --git a/package.json b/package.json index 8d396ffc..af9ca128 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "storybook-build": "yarn run build && yarn run storybook-build-tailwind && storybook build" }, "dependencies": { - "@stencil/core": "^4.36.2", + "@stencil/core": "4.38.1", "@stencil/react-output-target": "1.2.0", "@stencil/vue-output-target": "0.11.8", "classnames": ">=2.5.1", @@ -146,4 +146,4 @@ "typescript": "^5.7.3", "vite": "^7.0.6" } -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 848c9093..ecd23495 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,7 +9,7 @@ importers: .: dependencies: '@stencil/core': - specifier: ^4.36.2 + specifier: 4.38.1 version: 4.38.1 '@stencil/react-output-target': specifier: 1.2.0