{({ style, tokens, getLineProps, getTokenProps }) => (
{tokens.slice(0, loadedLines).map((line, i) => (
-
+
{i + 1}
diff --git a/apps/explorer/src/components/top-packages/TopPackagesCard.tsx b/apps/explorer/src/components/top-packages/TopPackagesCard.tsx
index 9a172b38586..0ead5efec72 100644
--- a/apps/explorer/src/components/top-packages/TopPackagesCard.tsx
+++ b/apps/explorer/src/components/top-packages/TopPackagesCard.tsx
@@ -11,17 +11,17 @@ import { ErrorBoundary } from '../error-boundary/ErrorBoundary';
import { TopPackagesTable } from './TopPackagesTable';
import { Panel, Title } from '@iota/apps-ui-kit';
-type DateFilter = '3D' | '7D' | '30D';
+type DateFilter = '3d' | '1w' | '1m';
type ApiDateFilter = 'rank3Days' | 'rank7Days' | 'rank30Days';
export const FILTER_TO_API_FILTER: Record
= {
- '3D': 'rank3Days',
- '7D': 'rank7Days',
- '30D': 'rank30Days',
+ '3d': 'rank3Days',
+ '1w': 'rank7Days',
+ '1m': 'rank30Days',
};
export function TopPackagesCard(): JSX.Element {
const rpc = useEnhancedRpcClient();
- const [selectedFilter, setSelectedFilter] = useState('3D');
+ const [selectedFilter, setSelectedFilter] = useState('3d');
const { data, isPending } = useQuery({
queryKey: ['top-packages', selectedFilter],
@@ -35,9 +35,10 @@ export function TopPackagesCard(): JSX.Element {
setSelectedFilter(val)}
+ filtersAsChip
/>
-
+
+
+
diff --git a/apps/explorer/src/components/transactions/ProgTxnBlockCard.tsx b/apps/explorer/src/components/transactions/ProgTxnBlockCard.tsx
index 6d52b6e1212..a2610bf9471 100644
--- a/apps/explorer/src/components/transactions/ProgTxnBlockCard.tsx
+++ b/apps/explorer/src/components/transactions/ProgTxnBlockCard.tsx
@@ -35,7 +35,7 @@ export function ProgrammableTxnBlockCard({
const itemsToShow = defaultItemsToShow || items.length;
return (
-
+
{noExpandableList ? <>{items}> :
}
diff --git a/apps/explorer/src/components/ui/FilterList.tsx b/apps/explorer/src/components/ui/FilterList.tsx
index bb4771910b2..1f0fd48bc90 100644
--- a/apps/explorer/src/components/ui/FilterList.tsx
+++ b/apps/explorer/src/components/ui/FilterList.tsx
@@ -5,23 +5,27 @@
// TODO: This component really shouldn't use the `Tabs` component, it should just use radix,
// and should define it's own styles since the concerns here are pretty different.
-import { ButtonSegment, SegmentedButton } from '@iota/apps-ui-kit';
+import { ButtonSegment, SegmentedButton, Chip } from '@iota/apps-ui-kit';
export interface FilterListProps
{
selected: T;
options: readonly T[];
onSelected(value: T): void;
+ filtersAsChip?: boolean;
}
export function FilterList({
options,
selected,
onSelected,
+ filtersAsChip,
}: FilterListProps): JSX.Element {
+ const FilterComponent = filtersAsChip ? Chip : ButtonSegment;
+
return (
{options.map((option) => (
-
+
diff --git a/apps/explorer/src/components/ui/RingChart.tsx b/apps/explorer/src/components/ui/RingChart.tsx
index 7f320e307b6..5ead57032ec 100644
--- a/apps/explorer/src/components/ui/RingChart.tsx
+++ b/apps/explorer/src/components/ui/RingChart.tsx
@@ -50,7 +50,7 @@ export function RingChartLegend({ data }: RingChartLegendProps): JSX.Element {
style={{ background: colorDisplay }}
className="h-1.5 w-1.5 rounded-full"
/>
-
@@ -123,7 +123,9 @@ export function RingChart({
diff --git a/apps/explorer/src/components/ui/SplitPanes.tsx b/apps/explorer/src/components/ui/SplitPanes.tsx
index 9b146b6f399..be26b5d04f8 100644
--- a/apps/explorer/src/components/ui/SplitPanes.tsx
+++ b/apps/explorer/src/components/ui/SplitPanes.tsx
@@ -2,6 +2,7 @@
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
+import { Button, ButtonSize, ButtonType } from '@iota/apps-ui-kit';
import { ArrowRight, ArrowUp } from '@iota/ui-icons';
import { cva, type VariantProps } from 'class-variance-authority';
import clsx from 'clsx';
@@ -93,35 +94,26 @@ function ResizeHandle({
onDragging={setIsDragging}
>
{collapsibleButton && (
-
+
)}
diff --git a/apps/explorer/src/components/ui/collapsible/CollapsibleCard.tsx b/apps/explorer/src/components/ui/collapsible/CollapsibleCard.tsx
index 9a3c27c6be8..9c2fe974472 100644
--- a/apps/explorer/src/components/ui/collapsible/CollapsibleCard.tsx
+++ b/apps/explorer/src/components/ui/collapsible/CollapsibleCard.tsx
@@ -25,6 +25,7 @@ export interface CollapsibleCardProps {
hideBorder?: boolean;
render?: ({ isOpen }: { isOpen: boolean }) => ReactNode;
supportingTitleElement?: ReactNode;
+ isTransparentPanel?: boolean;
}
export function CollapsibleCard({
@@ -38,6 +39,7 @@ export function CollapsibleCard({
hideBorder,
render,
supportingTitleElement,
+ isTransparentPanel,
}: CollapsibleCardProps) {
const [open, setOpen] = useState(!initialClose);
return collapsible ? (
@@ -69,7 +71,7 @@ export function CollapsibleCard({
) : (
-
+
{children}
{footer && (
diff --git a/apps/explorer/src/index.css b/apps/explorer/src/index.css
index 0bb5ab54af4..ddc5cdaa069 100644
--- a/apps/explorer/src/index.css
+++ b/apps/explorer/src/index.css
@@ -24,6 +24,14 @@ body,
--steel-dark: theme('colors.steel.dark');
}
+:root {
+ @apply bg-neutral-98;
+}
+
+:root.dark {
+ @apply bg-neutral-4;
+}
+
@layer base {
body {
@apply antialiased;
diff --git a/apps/explorer/src/pages/epochs/EpochDetail.tsx b/apps/explorer/src/pages/epochs/EpochDetail.tsx
index be17ede1df1..cf6b074838d 100644
--- a/apps/explorer/src/pages/epochs/EpochDetail.tsx
+++ b/apps/explorer/src/pages/epochs/EpochDetail.tsx
@@ -13,6 +13,7 @@ import {
InfoBoxStyle,
InfoBoxType,
LoadingIndicator,
+ Panel,
SegmentedButton,
SegmentedButtonType,
} from '@iota/apps-ui-kit';
@@ -165,9 +166,8 @@ export default function EpochDetail() {
{isCurrentEpoch && }
-
+
-
+
{activeTabId === EpochTabs.Checkpoints ? (
) : null}
-
+
}
/>
diff --git a/apps/explorer/src/pages/epochs/stats/ValidatorStatus.tsx b/apps/explorer/src/pages/epochs/stats/ValidatorStatus.tsx
index 449029b3217..0fdf6b62d48 100644
--- a/apps/explorer/src/pages/epochs/stats/ValidatorStatus.tsx
+++ b/apps/explorer/src/pages/epochs/stats/ValidatorStatus.tsx
@@ -3,14 +3,14 @@
// SPDX-License-Identifier: Apache-2.0
import { DisplayStats, IOTA_PRIMITIVES_COLOR_PALETTE, Panel, Title } from '@iota/apps-ui-kit';
-import { getRefGasPrice } from '@iota/core';
+import { getRefGasPrice, useTheme, Theme } from '@iota/core';
import { useIotaClientQuery } from '@iota/dapp-kit';
import { useMemo } from 'react';
-
import { RingChart, RingChartLegend } from '~/components/ui';
export function ValidatorStatus(): JSX.Element | null {
const { data } = useIotaClientQuery('getLatestIotaSystemState');
+ const { theme } = useTheme();
const nextRefGasPrice = useMemo(
() => getRefGasPrice(data?.activeValidators),
@@ -31,8 +31,14 @@ export function ValidatorStatus(): JSX.Element | null {
gradient: {
deg: 315,
values: [
- { percent: 0, color: IOTA_PRIMITIVES_COLOR_PALETTE.primary[30] },
- { percent: 100, color: IOTA_PRIMITIVES_COLOR_PALETTE.primary[30] },
+ {
+ percent: 0,
+ color: IOTA_PRIMITIVES_COLOR_PALETTE.primary[30],
+ },
+ {
+ percent: 100,
+ color: IOTA_PRIMITIVES_COLOR_PALETTE.primary[30],
+ },
],
},
},
@@ -44,7 +50,10 @@ export function ValidatorStatus(): JSX.Element | null {
{
value: data.atRiskValidators.length,
label: 'At Risk',
- color: IOTA_PRIMITIVES_COLOR_PALETTE.neutral[90],
+ color:
+ theme === Theme.Dark
+ ? IOTA_PRIMITIVES_COLOR_PALETTE.neutral[20]
+ : IOTA_PRIMITIVES_COLOR_PALETTE.neutral[90],
},
];
diff --git a/apps/explorer/src/pages/transaction-result/programmable-transaction-view/Transaction.tsx b/apps/explorer/src/pages/transaction-result/programmable-transaction-view/Transaction.tsx
index c6525f746c9..dc2156467fd 100644
--- a/apps/explorer/src/pages/transaction-result/programmable-transaction-view/Transaction.tsx
+++ b/apps/explorer/src/pages/transaction-result/programmable-transaction-view/Transaction.tsx
@@ -43,7 +43,7 @@ function MoveCall({ data }: TransactionProps): JSX.Elem
package: , module:{' '}
,
- function: {func}
+ function: {func}
{args && (
, arguments: [{flattenIotaArguments(args!)}]
)}
diff --git a/apps/explorer/src/pages/transaction-result/transaction-summary/BalanceChanges.tsx b/apps/explorer/src/pages/transaction-result/transaction-summary/BalanceChanges.tsx
index f532c0bcecc..3aae316b78e 100644
--- a/apps/explorer/src/pages/transaction-result/transaction-summary/BalanceChanges.tsx
+++ b/apps/explorer/src/pages/transaction-result/transaction-summary/BalanceChanges.tsx
@@ -66,7 +66,7 @@ function BalanceChangeEntry({ change }: { change: BalanceChange }): JSX.Element
{recipient && (
-
+
Recipient
@@ -85,6 +85,7 @@ function BalanceChangeCard({ changes, owner }: { changes: BalanceChange[]; owner
return (
diff --git a/apps/explorer/src/pages/validators/Validators.tsx b/apps/explorer/src/pages/validators/Validators.tsx
index 7445f188f59..78e333cbf90 100644
--- a/apps/explorer/src/pages/validators/Validators.tsx
+++ b/apps/explorer/src/pages/validators/Validators.tsx
@@ -141,7 +141,9 @@ function ValidatorPageResult(): JSX.Element {
/>
) : (
-
Validators
+
+ Validators
+
{validatorStats.map((stat) => (
): React.JSX.Element {
const borderClass = hasBorder
? 'border border-shader-neutral-light-8 dark:border-shader-neutral-dark-8'
diff --git a/apps/ui-kit/src/lib/components/molecules/account/Account.tsx b/apps/ui-kit/src/lib/components/molecules/account/Account.tsx
index 614bfd214b3..e62f598ad1b 100644
--- a/apps/ui-kit/src/lib/components/molecules/account/Account.tsx
+++ b/apps/ui-kit/src/lib/components/molecules/account/Account.tsx
@@ -157,7 +157,7 @@ export function Account({
{showSelected && (
{isSelected ? (
-
+
) : (
)}
diff --git a/apps/ui-kit/src/lib/components/molecules/input/input.classes.ts b/apps/ui-kit/src/lib/components/molecules/input/input.classes.ts
index 64f5ca49743..5f398da7dc2 100644
--- a/apps/ui-kit/src/lib/components/molecules/input/input.classes.ts
+++ b/apps/ui-kit/src/lib/components/molecules/input/input.classes.ts
@@ -2,12 +2,12 @@
// SPDX-License-Identifier: Apache-2.0
export const INPUT_CLASSES =
- 'w-full bg-transparent text-body-lg caret-primary-30 focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed';
+ 'w-full bg-transparent text-body-lg caret-primary-30 dark:caret-primary-80 focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed';
export const INPUT_TEXT_CLASSES = 'text-neutral-10 dark:text-neutral-92';
export const INPUT_PLACEHOLDER_CLASSES =
' enabled:placeholder:text-neutral-40/40 dark:placeholder:text-neutral-60/40 enabled:dark:placeholder:text-neutral-60/40';
export const BORDER_CLASSES =
- 'px-md py-sm rounded-lg border border-neutral-80 group-[.enabled]:cursor-text group-[.errored]:border-error-30 hover:group-[.enabled]:border-neutral-50 dark:border-neutral-60 dark:hover:border-neutral-60 dark:group-[.errored]:border-error-80 [&:has(input:focus)]:border-primary-30';
+ 'px-md py-sm rounded-lg border border-neutral-80 group-[.enabled]:cursor-text group-[.errored]:border-error-30 hover:group-[.enabled]:border-neutral-50 dark:border-neutral-60 dark:hover:border-neutral-60 dark:group-[.errored]:border-error-80 [&:has(input:focus)]:border-primary-30 [&:has(input:focus)]:dark:border-primary-80';
export const INPUT_NUMBER_CLASSES =
'[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none disabled:cursor-not-allowed';
export const LABEL_CLASSES =
diff --git a/apps/ui-kit/src/lib/components/molecules/search/Search.tsx b/apps/ui-kit/src/lib/components/molecules/search/Search.tsx
index 467d89c6581..35565d8f6af 100644
--- a/apps/ui-kit/src/lib/components/molecules/search/Search.tsx
+++ b/apps/ui-kit/src/lib/components/molecules/search/Search.tsx
@@ -162,7 +162,7 @@ export function Search({
diff --git a/apps/ui-kit/src/lib/styles/index.css b/apps/ui-kit/src/lib/styles/index.css
index ef470db58fc..8d748913f32 100644
--- a/apps/ui-kit/src/lib/styles/index.css
+++ b/apps/ui-kit/src/lib/styles/index.css
@@ -45,6 +45,25 @@
.text-label-md {
font-variant-alternates: 'ss01';
}
+
+ input:-webkit-autofill,
+ input:-webkit-autofill:enabled,
+ input:-webkit-autofill:hover,
+ input:-webkit-autofill:focus {
+ @apply appearance-none !bg-transparent !bg-none;
+ @apply !text-neutral-92 dark:!text-neutral-10;
+ transition: background-color 5000s ease-in-out 0s;
+ -webkit-text-fill-color: theme('colors.neutral.92') !important;
+ }
+
+ :root:not(.dark) {
+ input:-webkit-autofill,
+ input:-webkit-autofill:enabled,
+ input:-webkit-autofill:hover,
+ input:-webkit-autofill:focus {
+ -webkit-text-fill-color: theme('colors.neutral.10') !important;
+ }
+ }
}
@layer utilities {