diff --git a/src/shared/styles/theme.css b/src/shared/styles/theme.css index 60c29d6..8ac264e 100644 --- a/src/shared/styles/theme.css +++ b/src/shared/styles/theme.css @@ -439,4 +439,5 @@ /* Lightbox dialog backdrop */ dialog.lightbox::backdrop { background-color: rgba(4, 28, 243, 0.25); + backdrop-filter: blur(4px); } diff --git a/src/shared/ui/Button/ui/Button.test.tsx b/src/shared/ui/Button/ui/Button.test.tsx index 388838f..78ee56b 100644 --- a/src/shared/ui/Button/ui/Button.test.tsx +++ b/src/shared/ui/Button/ui/Button.test.tsx @@ -24,11 +24,11 @@ describe('Button', () => { }); it('applies outline variant', () => { render(Go); - expect(screen.getByRole('button')).toHaveClass('bg-transparent'); + expect(screen.getByRole('button')).toHaveClass('bg-cream'); }); it('applies ghost variant', () => { render(Go); - expect(screen.getByRole('button')).toHaveClass('bg-cream'); + expect(screen.getByRole('button')).toHaveClass('bg-transparent'); }); }); describe('sizes', () => { diff --git a/src/shared/ui/Button/ui/Button.tsx b/src/shared/ui/Button/ui/Button.tsx index 2a11e58..c3a8103 100644 --- a/src/shared/ui/Button/ui/Button.tsx +++ b/src/shared/ui/Button/ui/Button.tsx @@ -46,9 +46,9 @@ const VARIANTS = { secondary: 'brutal-border bg-blue text-cream shadow-brutal hover:-translate-x-0.5 hover:-translate-y-0.5 hover:shadow-brutal-md active:translate-x-0.5 active:translate-y-0.5 active:shadow-brutal-xs', outline: - 'brutal-border bg-transparent text-blue shadow-brutal hover:-translate-x-0.5 hover:-translate-y-0.5 hover:shadow-brutal-md active:translate-x-0.5 active:translate-y-0.5 active:shadow-brutal-xs', - ghost: 'brutal-border border-blue/35 bg-cream text-blue hover:border-blue hover:bg-blue/10 active:bg-blue active:text-cream', + ghost: + 'brutal-border bg-transparent text-blue hover:-translate-x-0.5 hover:-translate-y-0.5 active:translate-x-0.5 active:translate-y-0.5', } as const satisfies Record; const SIZES = { diff --git a/src/shared/ui/ImageLightbox/ui/ImageLightbox.test.tsx b/src/shared/ui/ImageLightbox/ui/ImageLightbox.test.tsx index 3610199..9fb2261 100644 --- a/src/shared/ui/ImageLightbox/ui/ImageLightbox.test.tsx +++ b/src/shared/ui/ImageLightbox/ui/ImageLightbox.test.tsx @@ -56,7 +56,7 @@ describe('ImageLightbox', () => { it('clicking inside the dialog (not backdrop) does not close', () => { render(); const dialog = document.querySelector('dialog') as HTMLDialogElement; - const inner = dialog.querySelector('div') as HTMLDivElement; + const inner = dialog.querySelector('img') as HTMLImageElement; fireEvent.click(inner); expect(HTMLDialogElement.prototype.close).not.toHaveBeenCalled(); }); diff --git a/src/shared/ui/ImageLightbox/ui/ImageLightbox.tsx b/src/shared/ui/ImageLightbox/ui/ImageLightbox.tsx index bc92aff..73becfc 100644 --- a/src/shared/ui/ImageLightbox/ui/ImageLightbox.tsx +++ b/src/shared/ui/ImageLightbox/ui/ImageLightbox.tsx @@ -2,7 +2,7 @@ import Image from 'next/image'; import { useRef } from 'react'; -import { CloseIcon, MagnifyIcon } from '$shared/assets/icons'; +import { CloseIcon } from '$shared/assets/icons'; import { cn } from '$shared/lib'; import { Button } from '$shared/ui/Button'; @@ -66,10 +66,6 @@ export function ImageLightbox({ src, alt, className }: Props) { className={cn('relative block w-full aspect-video overflow-hidden cursor-zoom-in', className)} > - {/* Magnify hint — pointer-events-none so clicks pass through to the button */} - - - - - {/* aria-hidden: the dialog element itself carries the accessible label */} - - - + {/* Native img so the dialog sizes to the image — next/image fill requires a pre-sized container */} + {/* aria-hidden: the dialog element itself carries the accessible label */} + {/* eslint-disable-next-line @next/next/no-img-element */} + +