diff --git a/apps/explorer/src/assets/address_icon.svg b/apps/explorer/src/assets/address_icon.svg deleted file mode 100644 index 30b8e40f5ea..00000000000 --- a/apps/explorer/src/assets/address_icon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/apps/explorer/src/assets/content_copy_black_18dp.svg b/apps/explorer/src/assets/content_copy_black_18dp.svg deleted file mode 100644 index d1b350d0694..00000000000 --- a/apps/explorer/src/assets/content_copy_black_18dp.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/apps/explorer/src/assets/down.svg b/apps/explorer/src/assets/down.svg deleted file mode 100644 index 420055bedbc..00000000000 --- a/apps/explorer/src/assets/down.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/apps/explorer/src/assets/iota_logo.svg b/apps/explorer/src/assets/iota_logo.svg deleted file mode 100644 index af9233fa4b4..00000000000 --- a/apps/explorer/src/assets/iota_logo.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/apps/explorer/src/assets/iota_symbol.svg b/apps/explorer/src/assets/iota_symbol.svg deleted file mode 100644 index 0a127c14089..00000000000 --- a/apps/explorer/src/assets/iota_symbol.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/explorer/src/assets/iota_word_mark.svg b/apps/explorer/src/assets/iota_word_mark.svg deleted file mode 100644 index 0337be9b108..00000000000 --- a/apps/explorer/src/assets/iota_word_mark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/explorer/src/assets/search.svg b/apps/explorer/src/assets/search.svg deleted file mode 100644 index f1d632e8799..00000000000 --- a/apps/explorer/src/assets/search.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/apps/explorer/src/ui/Badge.tsx b/apps/explorer/src/ui/Badge.tsx deleted file mode 100644 index 1387bebf8a5..00000000000 --- a/apps/explorer/src/ui/Badge.tsx +++ /dev/null @@ -1,41 +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'; - -import { ReactComponent as CheckIcon } from './icons/check_12x12.svg'; -import { ReactComponent as XIcon } from './icons/x.svg'; - -const badgeStyles = cva( - ['inline-flex justify-center items-center gap-1 py-1 px-3 rounded-xl text-body font-medium'], - { - variants: { - variant: { - current: 'bg-gray-40 text-steel-darker', - success: 'bg-success-light text-success-dark', - failure: 'bg-issue-light text-issue-dark', - }, - }, - defaultVariants: { - variant: 'current', - }, - }, -); - -export interface BadgeProps extends VariantProps { - children?: ReactNode; -} - -export function Badge({ variant, children }: BadgeProps): JSX.Element { - return ( -
- {variant === 'current' &&
} - {variant === 'failure' && } - {variant === 'success' && } - - {children} -
- ); -} diff --git a/apps/explorer/src/ui/CoinBalance.tsx b/apps/explorer/src/ui/CoinBalance.tsx deleted file mode 100644 index 5cc8e788064..00000000000 --- a/apps/explorer/src/ui/CoinBalance.tsx +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import { useFormatCoin, CoinFormat } from '@iota/core'; - -import { Amount, type AmountProps } from '~/ui/Amount'; - -export interface CoinBalanceProps extends Omit { - coinType?: string | null; -} - -export function CoinBalance({ amount, coinType, format, ...props }: CoinBalanceProps): JSX.Element { - const [formattedAmount, symbol] = useFormatCoin(amount, coinType, format || CoinFormat.FULL); - - // format balance if no symbol is provided - // this handles instances where getCoinDenominationInfo is not available - const formattedBalance = coinType ? formattedAmount : amount; - - return ; -} diff --git a/apps/explorer/src/ui/StatAmount.tsx b/apps/explorer/src/ui/StatAmount.tsx deleted file mode 100644 index b508be9a363..00000000000 --- a/apps/explorer/src/ui/StatAmount.tsx +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import { Heading, Text } from '@iota/ui'; - -import { Amount, type AmountProps } from '~/ui/Amount'; -import { DateCard } from '~/ui/DateCard'; - -export interface StatAmountProps extends Omit { - dollarAmount?: number; - date?: Date | number | null; -} - -export function StatAmount({ dollarAmount, date, ...props }: StatAmountProps): JSX.Element { - return ( -
-
- {date ? : null} -
- - Amount - - - -
-
- {dollarAmount && ( - - {new Intl.NumberFormat(undefined, { - style: 'currency', - currency: 'USD', - }).format(dollarAmount)} - - )} -
- ); -} diff --git a/apps/explorer/src/ui/stories/Badge.stories.tsx b/apps/explorer/src/ui/stories/Badge.stories.tsx deleted file mode 100644 index 93e166fe7a9..00000000000 --- a/apps/explorer/src/ui/stories/Badge.stories.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 { type Meta, type StoryObj } from '@storybook/react'; - -import { Badge, type BadgeProps } from '../Badge'; - -export default { - component: Badge, -} as Meta; - -export const Current: StoryObj = { - render: (props) => Badge, -}; - -export const Success: StoryObj = { - ...Current, - args: { variant: 'success' }, -}; - -export const Failure: StoryObj = { - ...Current, - args: { variant: 'failure' }, -}; diff --git a/apps/explorer/src/ui/stories/CoinBalance.stories.tsx b/apps/explorer/src/ui/stories/CoinBalance.stories.tsx deleted file mode 100644 index 6f1877a60ec..00000000000 --- a/apps/explorer/src/ui/stories/CoinBalance.stories.tsx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import { IotaClientProvider } from '@iota/dapp-kit'; -import { type Meta, type StoryObj } from '@storybook/react'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; - -import { CoinBalance, type CoinBalanceProps } from '../CoinBalance'; -import { Network, SupportedNetworks, createIotaClient } from '~/utils/api/defaultRpcClient'; - -export default { - component: CoinBalance, - decorators: [ - (Story) => ( - - - - - - ), - ], -} as Meta; - -export const Default: StoryObj = { - args: { - amount: 1000, - coinType: '0x2::iota::IOTA', - }, -}; - -export const WithoutSymbol: StoryObj = { - args: { - amount: 10000, - }, -}; diff --git a/apps/explorer/src/ui/stories/StatAmount.stories.tsx b/apps/explorer/src/ui/stories/StatAmount.stories.tsx deleted file mode 100644 index bc3b25c80da..00000000000 --- a/apps/explorer/src/ui/stories/StatAmount.stories.tsx +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import { type Meta, type StoryObj } from '@storybook/react'; - -import { StatAmount, type StatAmountProps } from '../StatAmount'; - -export default { - component: StatAmount, -} as Meta; - -export const defaultAmount: StoryObj = { - args: { - amount: 9740991, - symbol: 'IOTA', - dollarAmount: 123.56, - date: 1667942429177, - }, -};