diff --git a/theme/components/Button/Button.pw.tsx b/theme/components/Button/Button.pw.tsx
index 7ad23f7b05..5e50dbf2c8 100644
--- a/theme/components/Button/Button.pw.tsx
+++ b/theme/components/Button/Button.pw.tsx
@@ -1,39 +1,75 @@
-import { Button } from '@chakra-ui/react';
+import { Box, Button, Flex } from '@chakra-ui/react';
import React from 'react';
import { test, expect } from 'playwright/lib';
+test.use({ viewport: { width: 150, height: 350 } });
+
[
- { variant: 'solid' },
- { variant: 'solid', colorScheme: 'gray', withDarkMode: true },
- { variant: 'outline', colorScheme: 'gray', withDarkMode: true },
- { variant: 'outline', colorScheme: 'gray-dark', withDarkMode: true },
- { variant: 'outline', colorScheme: 'blue', withDarkMode: true },
- { variant: 'simple', withDarkMode: true },
- { variant: 'ghost', withDarkMode: true },
- { variant: 'subtle' },
- { variant: 'subtle', colorScheme: 'gray', withDarkMode: true },
-].forEach(({ variant, colorScheme, withDarkMode }) => {
+ { variant: 'solid', states: [ 'default', 'disabled', 'hovered', 'active' ] },
+ { variant: 'outline', colorScheme: 'gray', withDarkMode: true, states: [ 'default', 'disabled', 'hovered', 'active', 'selected' ] },
+ { variant: 'outline', colorScheme: 'blue', withDarkMode: true, states: [ 'default', 'disabled', 'hovered', 'active', 'selected' ] },
+ { variant: 'simple', withDarkMode: true, states: [ 'default', 'hovered' ] },
+ { variant: 'ghost', withDarkMode: true, states: [ 'default', 'hovered', 'active' ] },
+ { variant: 'subtle', states: [ 'default', 'hovered' ] },
+ { variant: 'subtle', colorScheme: 'gray', states: [ 'default', 'hovered' ], withDarkMode: true },
+].forEach(({ variant, colorScheme, withDarkMode, states }) => {
test.describe(`variant ${ variant }${ colorScheme ? ` with ${ colorScheme } color scheme` : '' }${ withDarkMode ? ' +@dark-mode' : '' }`, () => {
- test('base', async({ render }) => {
- const component = await render();
- await expect(component.locator('button')).toHaveScreenshot();
- });
-
- test('disabled', async({ render }) => {
- const component = await render();
- await expect(component.locator('button')).toHaveScreenshot();
- });
-
- test('hovered', async({ render }) => {
- const component = await render();
- await component.getByText(/click/i).hover();
- await expect(component.locator('button')).toHaveScreenshot();
- });
+ test('', async({ render }) => {
+ const component = await render(
+
+ { states?.map((state) => {
+ switch (state) {
+ case 'default': {
+ return (
+
+ Default:
+
+
+ );
+ }
+ case 'disabled': {
+ return (
+
+ Disabled:
+
+
+ );
+ }
+ case 'active': {
+ return (
+
+ Active:
+
+
+ );
+ }
+ case 'hovered': {
+ return (
+
+ Hovered:
+
+
+ );
+ }
+ case 'selected': {
+ return (
+
+ Selected:
+
+
+ );
+ }
- test('active', async({ render }) => {
- const component = await render();
- await expect(component.locator('button')).toHaveScreenshot();
+ default: {
+ return null;
+ }
+ }
+ }) }
+ ,
+ );
+ await component.getByText('Hover me').hover();
+ await expect(component).toHaveScreenshot();
});
});
});
diff --git a/theme/components/Button/Button.ts b/theme/components/Button/Button.ts
index d96d2d49da..0cac051ad2 100644
--- a/theme/components/Button/Button.ts
+++ b/theme/components/Button/Button.ts
@@ -5,25 +5,10 @@ import { runIfFn } from '@chakra-ui/utils';
const variantSolid = defineStyle((props) => {
const { colorScheme: c } = props;
- if (c === 'gray') {
- const bg = mode(`gray.100`, `whiteAlpha.200`)(props);
-
- return {
- bg,
- _hover: {
- bg: mode(`gray.200`, `whiteAlpha.300`)(props),
- _disabled: {
- bg,
- },
- },
- _active: { bg: mode(`gray.300`, `whiteAlpha.400`)(props) },
- };
- }
-
const bg = `${ c }.600`;
const color = 'white';
const hoverBg = `${ c }.400`;
- const activeBg = `${ c }.700`;
+ const activeBg = hoverBg;
return {
bg,
@@ -37,6 +22,8 @@ const variantSolid = defineStyle((props) => {
_disabled: {
opacity: 0.2,
},
+ // According to design there is no "active" or "pressed" state
+ // It is simply should be the same as the "hover" state
_active: { bg: activeBg },
fontWeight: 600,
};
@@ -45,22 +32,15 @@ const variantSolid = defineStyle((props) => {
const variantOutline = defineStyle((props) => {
const { colorScheme: c } = props;
- const isGrayTheme = c === 'gray' || c === 'gray-dark';
+ const isGrayTheme = c === 'gray';
+
+ const bg = 'transparent';
+
const color = isGrayTheme ? mode('blackAlpha.800', 'whiteAlpha.800')(props) : mode(`${ c }.600`, `${ c }.300`)(props);
const borderColor = isGrayTheme ? mode('gray.200', 'gray.600')(props) : mode(`${ c }.600`, `${ c }.300`)(props);
- const activeBg = isGrayTheme ? mode('blue.50', 'gray.600')(props) : mode(`${ c }.50`, 'gray.600')(props);
- const activeColor = (() => {
- if (c === 'gray') {
- return mode('blue.600', 'gray.50')(props);
- }
- if (c === 'gray-dark') {
- return mode('blue.600', 'gray.50')(props);
- }
- if (c === 'blue') {
- return mode('blue.600', 'gray.50')(props);
- }
- return 'blue.600';
- })();
+
+ const selectedBg = isGrayTheme ? mode('blue.50', 'gray.600')(props) : mode(`${ c }.50`, 'gray.600')(props);
+ const selectedColor = mode('blue.600', 'gray.50')(props);
return {
color,
@@ -68,42 +48,47 @@ const variantOutline = defineStyle((props) => {
borderWidth: props.borderWidth || '2px',
borderStyle: 'solid',
borderColor,
- bg: 'transparent',
+ bg,
_hover: {
color: 'link_hovered',
borderColor: 'link_hovered',
- bg: 'transparent',
- _active: {
- bg: props.isActive ? activeBg : 'transparent',
- borderColor: props.isActive ? activeBg : 'link_hovered',
- color: props.isActive ? activeColor : 'link_hovered',
- p: {
- color: 'link_hovered',
- },
+ bg,
+ span: {
+ color: 'link_hovered',
},
_disabled: {
color,
borderColor,
},
- p: {
- color: 'link_hovered',
- },
},
_disabled: {
opacity: 0.2,
},
+ // According to design there is no "active" or "pressed" state
+ // It is simply should be the same as the "hover" state
_active: {
- bg: activeBg,
- borderColor: activeBg,
- color: activeColor,
- _disabled: {
- color,
- borderColor,
+ color: 'link_hovered',
+ borderColor: 'link_hovered',
+ bg,
+ span: {
+ color: 'link_hovered',
},
- p: {
- color: activeColor,
+ _disabled: {
+ color: 'link_hovered',
+ borderColor: 'link_hovered',
},
},
+ // We have a special state for this button variant that serves as a popover trigger.
+ // When any items (filters) are selected in the popover, the button should change its background and text color.
+ // The last CSS selector is for redefining styles for the TabList component.
+ [`
+ &[data-selected=true],
+ &[data-selected=true][aria-selected=true]
+ `]: {
+ bg: selectedBg,
+ color: selectedColor,
+ borderColor: selectedBg,
+ },
};
});
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-1.png
new file mode 100644
index 0000000000..a8c51a2f69
Binary files /dev/null and b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-1.png differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-active-1.png
deleted file mode 100644
index f519401d1e..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-base-1.png
deleted file mode 100644
index 336dd1b8f7..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-disabled-1.png
deleted file mode 100644
index 884ac88b55..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-hovered-1.png
deleted file mode 100644
index 5bb143cf3e..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-ghost-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-1.png
new file mode 100644
index 0000000000..ea247969a5
Binary files /dev/null and b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-1.png differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-active-1.png
deleted file mode 100644
index 62d690fbef..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-base-1.png
deleted file mode 100644
index 63c25c4ef3..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-disabled-1.png
deleted file mode 100644
index c32c9f4700..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-hovered-1.png
deleted file mode 100644
index 289408bbbd..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-blue-color-scheme-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-1.png
new file mode 100644
index 0000000000..8450e14238
Binary files /dev/null and b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-1.png differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-active-1.png
deleted file mode 100644
index 62d690fbef..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-base-1.png
deleted file mode 100644
index fbc8117dce..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-disabled-1.png
deleted file mode 100644
index 723caaac4f..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-hovered-1.png
deleted file mode 100644
index 289408bbbd..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-color-scheme-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-dark-color-scheme-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-dark-color-scheme-dark-mode-active-1.png
deleted file mode 100644
index 62d690fbef..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-dark-color-scheme-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-dark-color-scheme-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-dark-color-scheme-dark-mode-base-1.png
deleted file mode 100644
index fbc8117dce..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-dark-color-scheme-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-dark-color-scheme-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-dark-color-scheme-dark-mode-disabled-1.png
deleted file mode 100644
index 723caaac4f..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-dark-color-scheme-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-dark-color-scheme-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-dark-color-scheme-dark-mode-hovered-1.png
deleted file mode 100644
index 289408bbbd..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-outline-with-gray-dark-color-scheme-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-1.png
new file mode 100644
index 0000000000..e6bda7dbc4
Binary files /dev/null and b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-1.png differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-active-1.png
deleted file mode 100644
index 9d2e16c466..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-base-1.png
deleted file mode 100644
index 9d2e16c466..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-disabled-1.png
deleted file mode 100644
index ce5d907dd2..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-hovered-1.png
deleted file mode 100644
index 62603351af..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-simple-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-solid-with-gray-color-scheme-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-solid-with-gray-color-scheme-dark-mode-active-1.png
deleted file mode 100644
index 3ced2622bc..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-solid-with-gray-color-scheme-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-solid-with-gray-color-scheme-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-solid-with-gray-color-scheme-dark-mode-base-1.png
deleted file mode 100644
index 5dc02f7215..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-solid-with-gray-color-scheme-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-solid-with-gray-color-scheme-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-solid-with-gray-color-scheme-dark-mode-disabled-1.png
deleted file mode 100644
index 061a4a511e..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-solid-with-gray-color-scheme-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-solid-with-gray-color-scheme-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-solid-with-gray-color-scheme-dark-mode-hovered-1.png
deleted file mode 100644
index 7970651830..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-solid-with-gray-color-scheme-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-1.png
new file mode 100644
index 0000000000..a54cabfe22
Binary files /dev/null and b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-1.png differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-active-1.png
deleted file mode 100644
index 9306ab7578..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-base-1.png
deleted file mode 100644
index 9306ab7578..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-disabled-1.png
deleted file mode 100644
index 5d08e00f0f..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-hovered-1.png
deleted file mode 100644
index 0819be4cc5..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_dark-color-mode_variant-subtle-with-gray-color-scheme-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-1.png
new file mode 100644
index 0000000000..11a01abe7d
Binary files /dev/null and b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-1.png differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-active-1.png
deleted file mode 100644
index ff0444b3e3..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-base-1.png
deleted file mode 100644
index 0c80b4f99d..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-disabled-1.png
deleted file mode 100644
index be418bc9d2..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-hovered-1.png
deleted file mode 100644
index eb4b1b612f..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-ghost-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-1.png
new file mode 100644
index 0000000000..698e13cc7b
Binary files /dev/null and b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-1.png differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-active-1.png
deleted file mode 100644
index 04e7804665..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-base-1.png
deleted file mode 100644
index 6b24fb0b36..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-disabled-1.png
deleted file mode 100644
index 258b31af68..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-hovered-1.png
deleted file mode 100644
index f3692b3216..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-blue-color-scheme-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-1.png
new file mode 100644
index 0000000000..4e623efadf
Binary files /dev/null and b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-1.png differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-active-1.png
deleted file mode 100644
index 04e7804665..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-base-1.png
deleted file mode 100644
index 33d32d1e2c..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-disabled-1.png
deleted file mode 100644
index 0a1a9a27f4..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-hovered-1.png
deleted file mode 100644
index f3692b3216..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-color-scheme-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-dark-color-scheme-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-dark-color-scheme-dark-mode-active-1.png
deleted file mode 100644
index 04e7804665..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-dark-color-scheme-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-dark-color-scheme-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-dark-color-scheme-dark-mode-base-1.png
deleted file mode 100644
index 33d32d1e2c..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-dark-color-scheme-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-dark-color-scheme-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-dark-color-scheme-dark-mode-disabled-1.png
deleted file mode 100644
index 0a1a9a27f4..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-dark-color-scheme-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-dark-color-scheme-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-dark-color-scheme-dark-mode-hovered-1.png
deleted file mode 100644
index f3692b3216..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-outline-with-gray-dark-color-scheme-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-1.png
new file mode 100644
index 0000000000..94f93a73b5
Binary files /dev/null and b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-1.png differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-active-1.png
deleted file mode 100644
index 99262ae8a5..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-base-1.png
deleted file mode 100644
index 99262ae8a5..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-disabled-1.png
deleted file mode 100644
index a6e2c3094c..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-hovered-1.png
deleted file mode 100644
index a84dd4a732..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-simple-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-1.png
new file mode 100644
index 0000000000..3bc86f3500
Binary files /dev/null and b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-1.png differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-active-1.png
deleted file mode 100644
index 3b07d16161..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-base-1.png
deleted file mode 100644
index e2b1284365..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-disabled-1.png
deleted file mode 100644
index de9a716a02..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-hovered-1.png
deleted file mode 100644
index a895dc475a..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-with-gray-color-scheme-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-with-gray-color-scheme-dark-mode-active-1.png
deleted file mode 100644
index 8c0cb0427e..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-with-gray-color-scheme-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-with-gray-color-scheme-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-with-gray-color-scheme-dark-mode-base-1.png
deleted file mode 100644
index e014823eae..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-with-gray-color-scheme-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-with-gray-color-scheme-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-with-gray-color-scheme-dark-mode-disabled-1.png
deleted file mode 100644
index ee63e2c93f..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-with-gray-color-scheme-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-with-gray-color-scheme-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-with-gray-color-scheme-dark-mode-hovered-1.png
deleted file mode 100644
index ba1feb7c4d..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-solid-with-gray-color-scheme-dark-mode-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-1.png
new file mode 100644
index 0000000000..69be1fa9a7
Binary files /dev/null and b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-1.png differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-active-1.png
deleted file mode 100644
index 1e13e03bad..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-base-1.png
deleted file mode 100644
index 1e13e03bad..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-disabled-1.png
deleted file mode 100644
index fdd327ee61..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-hovered-1.png
deleted file mode 100644
index b8d4dce465..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-hovered-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-1.png
new file mode 100644
index 0000000000..95cf92e089
Binary files /dev/null and b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-1.png differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-active-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-active-1.png
deleted file mode 100644
index b43cdb9499..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-active-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-base-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-base-1.png
deleted file mode 100644
index b43cdb9499..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-base-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-disabled-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-disabled-1.png
deleted file mode 100644
index 6173c806b7..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-disabled-1.png and /dev/null differ
diff --git a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-hovered-1.png b/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-hovered-1.png
deleted file mode 100644
index 3ff3167615..0000000000
Binary files a/theme/components/Button/__screenshots__/Button.pw.tsx_default_variant-subtle-with-gray-color-scheme-dark-mode-hovered-1.png and /dev/null differ
diff --git a/ui/address/AddressAccountHistory.tsx b/ui/address/AddressAccountHistory.tsx
index 6d76d04302..c0e822e2ea 100644
--- a/ui/address/AddressAccountHistory.tsx
+++ b/ui/address/AddressAccountHistory.tsx
@@ -61,7 +61,7 @@ const AddressAccountHistory = ({ scrollRef, shouldRender = true }: Props) => {
diff --git a/ui/address/AddressAccountHistoryFilter.tsx b/ui/address/AddressAccountHistoryFilter.tsx
index d66519d635..b321051b27 100644
--- a/ui/address/AddressAccountHistoryFilter.tsx
+++ b/ui/address/AddressAccountHistoryFilter.tsx
@@ -1,54 +1,35 @@
-import {
- Menu,
- MenuButton,
- MenuList,
- MenuOptionGroup,
- MenuItemOption,
- useDisclosure,
-} from '@chakra-ui/react';
import React from 'react';
import type { NovesHistoryFilterValue } from 'types/api/noves';
import useIsInitialLoading from 'lib/hooks/useIsInitialLoading';
-import FilterButton from 'ui/shared/filters/FilterButton';
+import PopoverFilterRadio from 'ui/shared/filters/PopoverFilterRadio';
+
+const OPTIONS = [
+ { value: 'all', label: 'All' },
+ { value: 'received', label: 'Received from' },
+ { value: 'sent', label: 'Sent to' },
+];
interface Props {
- isActive: boolean;
+ hasActiveFilter: boolean;
defaultFilter: NovesHistoryFilterValue;
onFilterChange: (nextValue: string | Array) => void;
isLoading?: boolean;
}
-const AccountHistoryFilter = ({ onFilterChange, defaultFilter, isActive, isLoading }: Props) => {
- const { isOpen, onToggle } = useDisclosure();
+const AccountHistoryFilter = ({ onFilterChange, defaultFilter, hasActiveFilter, isLoading }: Props) => {
const isInitialLoading = useIsInitialLoading(isLoading);
- const onCloseMenu = React.useCallback(() => {
- if (isOpen) {
- onToggle();
- }
- }, [ isOpen, onToggle ]);
-
return (
-
+
);
};
diff --git a/ui/address/AddressInternalTxs.tsx b/ui/address/AddressInternalTxs.tsx
index ebaf11cbaf..d61613b567 100644
--- a/ui/address/AddressInternalTxs.tsx
+++ b/ui/address/AddressInternalTxs.tsx
@@ -82,7 +82,7 @@ const AddressInternalTxs = ({ scrollRef, shouldRender = true }: Props) => {
{
}
const nftTypeFilter = (
- 0 } contentProps={{ w: '200px' }} appliedFiltersNum={ tokenTypes?.length }>
+
nftOnly onChange={ handleTokenTypesChange } defaultValue={ tokenTypes }/>
);
diff --git a/ui/address/AddressTxs.tsx b/ui/address/AddressTxs.tsx
index 7e960d98d0..7765a95a76 100644
--- a/ui/address/AddressTxs.tsx
+++ b/ui/address/AddressTxs.tsx
@@ -167,7 +167,7 @@ const AddressTxs = ({ scrollRef, overloadCount = OVERLOAD_COUNT, shouldRender =
);
diff --git a/ui/address/AddressTxsFilter.tsx b/ui/address/AddressTxsFilter.tsx
index c08601123a..d3bdbd61fe 100644
--- a/ui/address/AddressTxsFilter.tsx
+++ b/ui/address/AddressTxsFilter.tsx
@@ -1,48 +1,35 @@
-import {
- Menu,
- MenuButton,
- MenuList,
- MenuOptionGroup,
- MenuItemOption,
- useDisclosure,
-} from '@chakra-ui/react';
import React from 'react';
import type { AddressFromToFilter } from 'types/api/address';
import useIsInitialLoading from 'lib/hooks/useIsInitialLoading';
-import FilterButton from 'ui/shared/filters/FilterButton';
+import PopoverFilterRadio from 'ui/shared/filters/PopoverFilterRadio';
+
+const OPTIONS = [
+ { value: 'all', label: 'All' },
+ { value: 'from', label: 'Outgoing transactions' },
+ { value: 'to', label: 'Incoming transactions' },
+];
interface Props {
- isActive: boolean;
+ hasActiveFilter: boolean;
defaultFilter: AddressFromToFilter;
onFilterChange: (nextValue: string | Array) => void;
isLoading?: boolean;
}
-const AddressTxsFilter = ({ onFilterChange, defaultFilter, isActive, isLoading }: Props) => {
- const { isOpen, onToggle } = useDisclosure();
+const AddressTxsFilter = ({ onFilterChange, defaultFilter, hasActiveFilter, isLoading }: Props) => {
const isInitialLoading = useIsInitialLoading(isLoading);
return (
-
+
);
};
diff --git a/ui/address/SolidityscanReport.tsx b/ui/address/SolidityscanReport.tsx
index f1424a9eff..0a6d11510e 100644
--- a/ui/address/SolidityscanReport.tsx
+++ b/ui/address/SolidityscanReport.tsx
@@ -44,6 +44,7 @@ const SolidityscanReport = ({ hash }: Props) => {
score={ score }
isLoading={ isPlaceholderData }
onClick={ onToggle }
+ isActive={ isOpen }
/>
diff --git a/ui/address/contract/ABI/form/ContractMethodMultiplyButton.tsx b/ui/address/contract/ABI/form/ContractMethodMultiplyButton.tsx
index 7b12ab727e..82ee23210d 100644
--- a/ui/address/contract/ABI/form/ContractMethodMultiplyButton.tsx
+++ b/ui/address/contract/ABI/form/ContractMethodMultiplyButton.tsx
@@ -76,6 +76,7 @@ const ContractMethodMultiplyButton = ({ onClick, isDisabled }: Props) => {
ml={ 1 }
p={ 0 }
onClick={ onToggle }
+ isActive={ isOpen }
isDisabled={ isDisabled }
>
{
variant="outline"
colorScheme="gray"
onClick={ onToggle }
+ isActive={ isOpen }
aria-label="Open source code in IDE"
fontWeight={ 500 }
px={ 2 }
diff --git a/ui/address/contract/ContractExternalLibraries.tsx b/ui/address/contract/ContractExternalLibraries.tsx
index 02f8abda3f..48dedb4a30 100644
--- a/ui/address/contract/ContractExternalLibraries.tsx
+++ b/ui/address/contract/ContractExternalLibraries.tsx
@@ -65,6 +65,7 @@ const ContractExternalLibraries = ({ className, data, isLoading }: Props) => {
variant="outline"
colorScheme="gray"
onClick={ onToggle }
+ isActive={ isOpen }
fontWeight={ 600 }
px={ 2 }
aria-label="View external libraries"
diff --git a/ui/address/ensDomains/AddressEnsDomains.tsx b/ui/address/ensDomains/AddressEnsDomains.tsx
index 6dcabfcbdd..f84626809d 100644
--- a/ui/address/ensDomains/AddressEnsDomains.tsx
+++ b/ui/address/ensDomains/AddressEnsDomains.tsx
@@ -111,6 +111,7 @@ const AddressEnsDomains = ({ addressHash, mainDomainName }: Props) => {
variant="outline"
colorScheme="gray"
onClick={ onToggle }
+ isActive={ isOpen }
aria-label="Address domains"
fontWeight={ 500 }
px={ 2 }
diff --git a/ui/address/tokenSelect/TokenSelectButton.tsx b/ui/address/tokenSelect/TokenSelectButton.tsx
index 773c06569c..9662b20cc9 100644
--- a/ui/address/tokenSelect/TokenSelectButton.tsx
+++ b/ui/address/tokenSelect/TokenSelectButton.tsx
@@ -1,4 +1,4 @@
-import { Box, Button, Skeleton, Text, useColorModeValue } from '@chakra-ui/react';
+import { Box, Button, Skeleton, chakra, useColorModeValue } from '@chakra-ui/react';
import React from 'react';
import type { FormattedData } from './types';
@@ -39,20 +39,21 @@ const TokenSelectButton = ({ isOpen, isLoading, onClick, data }: Props, ref: Rea
variant="outline"
colorScheme="gray"
onClick={ handleClick }
+ isActive={ isOpen }
aria-label="Token select"
>
- { prefix }{ num }
- { prefix }{ num }
+
{ space }({ prefix }${ usd.toFormat(2) })
-
+
{ isLoading && !isOpen && }
diff --git a/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_dark-color-mode_base-view-dark-mode-1.png b/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_dark-color-mode_base-view-dark-mode-1.png
index 0f13fc0097..265abccfcf 100644
Binary files a/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_dark-color-mode_base-view-dark-mode-1.png and b/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_dark-color-mode_base-view-dark-mode-1.png differ
diff --git a/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_dark-color-mode_base-view-dark-mode-2.png b/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_dark-color-mode_base-view-dark-mode-2.png
index dc1db04181..ba536e6cc8 100644
Binary files a/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_dark-color-mode_base-view-dark-mode-2.png and b/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_dark-color-mode_base-view-dark-mode-2.png differ
diff --git a/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_base-view-dark-mode-1.png b/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_base-view-dark-mode-1.png
index 90b6524154..9e934a8b9c 100644
Binary files a/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_base-view-dark-mode-1.png and b/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_base-view-dark-mode-1.png differ
diff --git a/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_base-view-dark-mode-2.png b/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_base-view-dark-mode-2.png
index df33a35e69..08f3482eef 100644
Binary files a/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_base-view-dark-mode-2.png and b/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_base-view-dark-mode-2.png differ
diff --git a/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_sort-1.png b/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_sort-1.png
index 56f4a24113..3fdef2fcca 100644
Binary files a/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_sort-1.png and b/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_sort-1.png differ
diff --git a/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_sort-2.png b/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_sort-2.png
index 0638c45f9e..ee09f5ace7 100644
Binary files a/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_sort-2.png and b/ui/address/tokenSelect/__screenshots__/TokenSelect.pw.tsx_default_sort-2.png differ
diff --git a/ui/marketplace/AppSecurityReport.tsx b/ui/marketplace/AppSecurityReport.tsx
index 55e51a492f..94970b363d 100644
--- a/ui/marketplace/AppSecurityReport.tsx
+++ b/ui/marketplace/AppSecurityReport.tsx
@@ -51,6 +51,7 @@ const AppSecurityReport = ({ id, securityReport, showContractList, isLoading, on
score={ securityScore }
isLoading={ isLoading }
onClick={ handleButtonClick }
+ isActive={ isOpen }
onlyIcon={ onlyIcon }
label="The security score is based on analysis of a DApp's smart contracts."
/>
diff --git a/ui/marketplace/ContractSecurityReport.tsx b/ui/marketplace/ContractSecurityReport.tsx
index fe52eef07c..da14a07c8c 100644
--- a/ui/marketplace/ContractSecurityReport.tsx
+++ b/ui/marketplace/ContractSecurityReport.tsx
@@ -40,6 +40,7 @@ const ContractSecurityReport = ({ securityReport }: Props) => {
diff --git a/ui/marketplace/MarketplaceAppInfo.tsx b/ui/marketplace/MarketplaceAppInfo.tsx
index 00646e3291..ce98a894e7 100644
--- a/ui/marketplace/MarketplaceAppInfo.tsx
+++ b/ui/marketplace/MarketplaceAppInfo.tsx
@@ -36,7 +36,7 @@ const MarketplaceAppInfo = ({ data }: Props) => {
return (
-
+
diff --git a/ui/marketplace/MarketplaceAppInfo/TriggerButton.tsx b/ui/marketplace/MarketplaceAppInfo/TriggerButton.tsx
index 1f3f6371da..172cb4f32a 100644
--- a/ui/marketplace/MarketplaceAppInfo/TriggerButton.tsx
+++ b/ui/marketplace/MarketplaceAppInfo/TriggerButton.tsx
@@ -6,9 +6,10 @@ import IconSvg from 'ui/shared/IconSvg';
interface Props {
onClick: () => void;
onlyIcon?: boolean;
+ isActive?: boolean;
}
-const TriggerButton = ({ onClick, onlyIcon }: Props, ref: React.ForwardedRef) => {
+const TriggerButton = ({ onClick, onlyIcon, isActive }: Props, ref: React.ForwardedRef) => {
return (