diff --git a/apps/wallet/src/ui/app/components/PasswordInputDialog.tsx b/apps/wallet/src/ui/app/components/PasswordInputDialog.tsx index 6e07e0534a6..c86db2e1074 100644 --- a/apps/wallet/src/ui/app/components/PasswordInputDialog.tsx +++ b/apps/wallet/src/ui/app/components/PasswordInputDialog.tsx @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 import { useBackgroundClient } from '_src/ui/app/hooks/useBackgroundClient'; -import { Text } from '_src/ui/app/shared/text'; import classNames from 'clsx'; import { Form, Formik } from 'formik'; import { toast } from 'react-hot-toast'; @@ -75,10 +74,10 @@ export function PasswordInputDialog({ errorMessage={errors.password} />
- + This is the password you currently use to lock and unlock your IOTA wallet. - +
diff --git a/apps/wallet/src/ui/app/components/accounts/AccountBalanceItem.tsx b/apps/wallet/src/ui/app/components/accounts/AccountBalanceItem.tsx index fcae444a0ac..7c2b0603a3a 100644 --- a/apps/wallet/src/ui/app/components/accounts/AccountBalanceItem.tsx +++ b/apps/wallet/src/ui/app/components/accounts/AccountBalanceItem.tsx @@ -1,7 +1,6 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { Text } from '_src/ui/app/shared/text'; import { formatAddress } from '@iota/iota-sdk/utils'; import { useCopyToClipboard } from '../../hooks/useCopyToClipboard'; import { IconButton } from '_components'; @@ -29,9 +28,7 @@ export function AccountBalanceItem({ account }: AccountBalanceItemProps): JSX.El
- - {formatAddress(account.address)} - + {formatAddress(account.address)}
- + {formatted} {symbol} - +
); diff --git a/apps/wallet/src/ui/app/components/iota-apps/IotaApp.tsx b/apps/wallet/src/ui/app/components/iota-apps/IotaApp.tsx index 12d98b7c5cc..ee69a96a670 100644 --- a/apps/wallet/src/ui/app/components/iota-apps/IotaApp.tsx +++ b/apps/wallet/src/ui/app/components/iota-apps/IotaApp.tsx @@ -6,9 +6,8 @@ import { ImageIcon, ImageIconSize } from '_app/shared/image-icon'; import { ExternalLink } from '_components'; import { ampli } from '_src/shared/analytics/ampli'; import { getDAppUrl } from '_src/shared/utils'; -import { Text } from '_src/ui/app/shared/text'; import { useState } from 'react'; -import { Card, CardImage, CardBody, ImageShape } from '@iota/apps-ui-kit'; +import { Card, CardImage, CardBody, ImageShape, Badge, BadgeType } from '@iota/apps-ui-kit'; import DisconnectApp from './DisconnectApp'; @@ -55,26 +54,15 @@ interface ListViewProps { function ListView({ name, icon, description, tags }: ListViewProps) { return ( -
+
-
- - {name} - - - {description} - +
+ {name} + {description} {tags?.length && ( -
+
{tags?.map((tag) => ( -
- - {tag} - -
+ ))}
)} diff --git a/apps/wallet/src/ui/app/components/iota-apps/IotaAppEmpty.tsx b/apps/wallet/src/ui/app/components/iota-apps/IotaAppEmpty.tsx index 5f51bce1678..4dc7b6021d8 100644 --- a/apps/wallet/src/ui/app/components/iota-apps/IotaAppEmpty.tsx +++ b/apps/wallet/src/ui/app/components/iota-apps/IotaAppEmpty.tsx @@ -2,13 +2,14 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 +import { Placeholder } from '@iota/apps-ui-kit'; import { cva, type VariantProps } from 'class-variance-authority'; -const appEmptyStyle = cva(['flex gap-3 p-3.75 h-28'], { +const appEmptyStyle = cva(['flex gap-3 p-lg h-28'], { variants: { displayType: { full: 'w-full', - card: 'bg-white flex flex-col p-3.75 box-border w-full rounded-2xl h-32 box-border w-full rounded-2xl border border-solid border-gray-40', + card: 'bg-neutral-100 flex flex-col p-lg w-full rounded-2xl h-32 box-border w-full rounded-2xl border border-solid border-shader-primary-dark', }, }, defaultVariants: { @@ -21,18 +22,18 @@ export interface IotaAppEmptyProps extends VariantProps {} export function IotaAppEmpty({ ...styleProps }: IotaAppEmptyProps) { return (
-
+
{styleProps.displayType === 'full' ? ( <> -
-
-
+ {new Array(2).fill(0).map((_, index) => ( + + ))} ) : (
-
-
+ +
)}
diff --git a/apps/wallet/src/ui/app/components/iota-apps/index.tsx b/apps/wallet/src/ui/app/components/iota-apps/index.tsx index f27954c05ef..8633641c5ed 100644 --- a/apps/wallet/src/ui/app/components/iota-apps/index.tsx +++ b/apps/wallet/src/ui/app/components/iota-apps/index.tsx @@ -2,7 +2,6 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { Text } from '_app/shared/text'; import { useAppSelector } from '_hooks'; import { Feature } from '@iota/core'; import { prepareLinkToCompare } from '_src/shared/utils'; @@ -13,7 +12,8 @@ import { permissionsSelectors } from '../../redux/slices/permissions'; import { AppsPageBanner } from './Banner'; import { IotaApp, type DAppEntry } from './IotaApp'; import { IotaAppEmpty } from './IotaAppEmpty'; -import { Header } from '@iota/apps-ui-kit'; +import { InfoBox, InfoBoxStyle, InfoBoxType, Header } from '@iota/apps-ui-kit'; +import { Info } from '@iota/ui-icons'; export function AppsPlayGround() { const ecosystemApps = useFeature(Feature.WalletDapps).value; @@ -46,16 +46,17 @@ export function AppsPlayGround() { {filteredEcosystemApps?.length ? ( -
- - Apps below are actively curated but do not indicate any endorsement or - relationship with IOTA Wallet. Please DYOR. - -
+ } + style={InfoBoxStyle.Elevated} + supportingText="Apps below are actively curated but do not indicate any endorsement or + relationship with IOTA Wallet. Please DYOR." + /> ) : null} {filteredEcosystemApps?.length ? ( -
+
{filteredEcosystemApps.map((app) => ( toUtf8OrB64(request.tx.message), [request.tx.message]); + const { message } = useMemo(() => toUtf8OrB64(request.tx.message), [request.tx.message]); const { data: account } = useAccountByAddress(request.tx.accountAddress); const signer = useSigner(account); const dispatch = useAppDispatch(); @@ -53,14 +52,7 @@ export function SignMessageRequest({ request }: SignMessageRequestProps) {
- - {message} - + {message}
diff --git a/apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx b/apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx index 8484226eca3..001d31ab4ee 100644 --- a/apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx +++ b/apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx @@ -2,7 +2,6 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { Text } from '_app/shared/text'; import { ExplorerLinkType, Loading, UnlockAccountButton } from '_components'; import { useAppSelector, useCoinsReFetchingConfig } from '_hooks'; import { useActiveAccount } from '_src/ui/app/hooks/useActiveAccount'; @@ -200,15 +199,11 @@ function TokenDetails({ coinType }: TokenDetailsProps) { {!accountHasIota ? (
- + {isMainnet ? 'Start by buying IOTA' : 'Need to send transactions on the IOTA network? You’ll need IOTA in your wallet'} - +
{!isMainnet && }
diff --git a/apps/wallet/src/ui/app/pages/home/tokens/coin-balance/CoinBalance.module.scss b/apps/wallet/src/ui/app/pages/home/tokens/coin-balance/CoinBalance.module.scss deleted file mode 100644 index 163194b6163..00000000000 --- a/apps/wallet/src/ui/app/pages/home/tokens/coin-balance/CoinBalance.module.scss +++ /dev/null @@ -1,119 +0,0 @@ -@use '_utils'; -@use '_values/colors'; - -.container { - display: flex; - flex-flow: row nowrap; - align-items: center; - gap: 10px; - - &.row-item { - padding: 15px 0; - - & + & { - border-top: 1px solid colors.$gray-45; - } - } -} - -.coin-balance-btn { - cursor: pointer; -} - -.coin-icon { - display: flex; - align-items: center; - justify-content: center; - font-size: 12px; - width: 30px; - height: 30px; - border-radius: 50%; - color: colors.$white; - background-color: colors.$gray-75; - flex-shrink: 0; - - &.iota { - background-color: colors.$iota-blue; - } -} - -.coin-name-container { - display: flex; - flex-flow: column nowrap; - gap: 6px; - flex: 1; - overflow: hidden; -} - -.coin-name { - color: colors.$gray-90; - text-transform: capitalize; - - @include utils.typography('Primary/Body-SB'); - @include utils.overflow-ellipsis; -} - -.coin-symbol { - color: colors.$gray-65; - text-transform: uppercase; - - @include utils.typography('Primary/BodySmall-M'); - @include utils.overflow-ellipsis; -} - -.value-container { - display: flex; - flex-flow: row nowrap; - flex: 1; - overflow: hidden; - - &.row-item { - flex: 1; - justify-content: flex-end; - } - - &.standalone { - align-items: baseline; - } -} - -.value { - &.standalone { - color: colors.$gray-100; - - @include utils.typography('Primary/Heading1-B'); - } - - &.row-item { - flex-shrink: 0; - - @include utils.overflow-ellipsis; - } -} - -.symbol { - &.standalone { - margin-left: 6px; - color: colors.$gray-65; - - @include utils.typography('Primary/Heading3-M'); - } - - &.row-item { - flex-shrink: 1; - - @include utils.overflow-ellipsis; - } -} - -.value, -.symbol { - white-space: nowrap; - - &.row-item { - color: colors.$gray-90; - margin-right: 4px; - - @include utils.typography('Primary/Body-M'); - } -} diff --git a/apps/wallet/src/ui/app/pages/home/tokens/icon-link/index.tsx b/apps/wallet/src/ui/app/pages/home/tokens/icon-link/index.tsx index 788a0bdb85d..272284b6d49 100644 --- a/apps/wallet/src/ui/app/pages/home/tokens/icon-link/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/tokens/icon-link/index.tsx @@ -1,12 +1,11 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { Text } from '_app/shared/text'; + import cl from 'clsx'; import { memo } from 'react'; import type { ReactNode } from 'react'; import { Link } from 'react-router-dom'; - import st from './IconLink.module.scss'; export interface IconLinkProps { @@ -24,9 +23,9 @@ function IconLink({ to, icon, disabled = false, text }: IconLinkProps) { tabIndex={disabled ? -1 : undefined} >
{icon}
- + {text} - + ); } diff --git a/apps/wallet/src/ui/app/shared/card-layout/index.tsx b/apps/wallet/src/ui/app/shared/card-layout/index.tsx index 09b3937d8c6..55ab6622f49 100644 --- a/apps/wallet/src/ui/app/shared/card-layout/index.tsx +++ b/apps/wallet/src/ui/app/shared/card-layout/index.tsx @@ -2,7 +2,6 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { Text } from '_app/shared/text'; import type { ReactNode } from 'react'; import { CheckmarkFilled, IotaLogoMark } from '@iota/ui-icons'; import { Header } from '@iota/apps-ui-kit'; @@ -17,23 +16,17 @@ export interface CardLayoutProps { export function CardLayout({ children, title, subtitle, headerCaption, icon }: CardLayoutProps) { return ( -
+
{icon === 'success' ? ( -
-
- -
-
+ ) : null} {icon === 'iota' ? ( -
- +
+
) : null} {headerCaption ? ( - - {headerCaption} - + {headerCaption} ) : null} {title ? (
@@ -41,10 +34,8 @@ export function CardLayout({ children, title, subtitle, headerCaption, icon }: C
) : null} {subtitle ? ( -
- - {subtitle} - +
+ {subtitle}
) : null} {children} diff --git a/apps/wallet/src/ui/app/shared/coin-balance/index.tsx b/apps/wallet/src/ui/app/shared/coin-balance/index.tsx deleted file mode 100644 index fbfa8c2cfed..00000000000 --- a/apps/wallet/src/ui/app/shared/coin-balance/index.tsx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import { Text } from '_app/shared/text'; -import { useFormatCoin } from '@iota/core'; -import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils'; - -//TODO create variant for different use cases like heading4, subtitle, bodySmall and different symbols color -interface CoinBalanceProps { - amount: bigint | number | string; - coinType?: string; -} - -export function CoinBalance({ amount, coinType }: CoinBalanceProps) { - const [formatted, symbol] = useFormatCoin(amount, coinType || IOTA_TYPE_ARG); - - return Math.abs(Number(amount)) > 0 ? ( -
- - {formatted} - - - {symbol} - -
- ) : null; -} diff --git a/apps/wallet/src/ui/app/shared/field-label/index.tsx b/apps/wallet/src/ui/app/shared/field-label/index.tsx deleted file mode 100644 index f8b59316c3c..00000000000 --- a/apps/wallet/src/ui/app/shared/field-label/index.tsx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import { Text } from '_app/shared/text'; -import type { ReactNode } from 'react'; - -export interface FieldLabelProps { - txt: string; - children: ReactNode | ReactNode[]; -} - -export default function FieldLabel({ txt, children }: FieldLabelProps) { - return ( - - ); -} diff --git a/apps/wallet/src/ui/app/shared/text/index.tsx b/apps/wallet/src/ui/app/shared/text/index.tsx deleted file mode 100644 index 8bf73abc8f9..00000000000 --- a/apps/wallet/src/ui/app/shared/text/index.tsx +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import { cva, type VariantProps } from 'class-variance-authority'; -import { type ReactNode } from 'react'; - -const textStyles = cva([], { - variants: { - weight: { - normal: 'font-normal', - medium: 'font-medium', - semibold: 'font-semibold', - bold: 'font-bold', - }, - variant: { - body: 'text-body', - bodySmall: 'text-bodySmall', - subtitle: 'text-subtitle', - subtitleSmall: 'text-subtitleSmall', - subtitleSmallExtra: 'text-subtitleSmallExtra', - caption: 'uppercase text-caption', - captionSmall: 'uppercase text-captionSmall', - captionSmallExtra: 'uppercase tracking-wider text-captionSmallExtra', - pBody: 'text-pBody', - pBodySmall: 'text-pBodySmall', - pSubtitle: 'text-pSubtitle', - pSubtitleSmall: 'text-pSubtitleSmall', - }, - color: { - white: 'text-white', - 'gray-100': 'text-gray-100', - 'gray-90': 'text-gray-90', - 'gray-85': 'text-gray-85', - 'gray-80': 'text-gray-80', - 'gray-75': 'text-gray-75', - 'gray-70': 'text-gray-70', - 'gray-65': 'text-gray-65', - 'gray-60': 'text-gray-60', - 'iota-dark': 'text-iota-dark', - iota: 'text-iota', - 'iota-light': 'text-iota-light', - steel: 'text-steel', - 'steel-dark': 'text-steel-dark', - 'steel-darker': 'text-steel-darker', - hero: 'text-hero', - 'hero-dark': 'text-hero-dark', - 'hero-darkest': 'text-hero-darkest', - 'success-dark': 'text-success-dark', - 'issue-dark': 'text-issue-dark', - }, - italic: { - true: 'italic', - false: '', - }, - truncate: { - true: 'truncate', - false: '', - }, - mono: { - true: 'font-mono', - false: 'font-sans', - }, - nowrap: { - true: 'whitespace-nowrap', - }, - }, - defaultVariants: { - weight: 'medium', - variant: 'body', - }, -}); - -export interface TextProps extends VariantProps { - children: ReactNode; - title?: string; -} - -export function Text({ children, title, ...styleProps }: TextProps) { - return ( -
- {children} -
- ); -}