Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Replace the click-to-logout profile trap with a proper DropdownMenu (settings / subscription / logout), swap the hand-rolled mobile overlay for a Radix-Dialog Sheet (focus-trap, Esc, scroll-lock), and fix accessibility gaps: aria-labels on icon buttons, aria-current + labelled nav landmarks, and effect-based auth redirect instead of navigating during render. Also: reorder nav (Main → Account → Support → Admin), full i18n of labels/sections, conditional "upgrade plan" button, header page title, collapsed-mode active indicator + tooltips, contrast/touch-target tweaks, and a typed NavItem to drop the `as any` exact cast. Adds DropdownMenu, Tooltip and Sheet primitives to @sase/ui. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
import * as React from "react";
|
|
import { cn } from "./utils";
|
|
|
|
const TooltipProvider = TooltipPrimitive.Provider;
|
|
const Tooltip = TooltipPrimitive.Root;
|
|
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
|
|
const TooltipContent = React.forwardRef<
|
|
React.ComponentRef<typeof TooltipPrimitive.Content>,
|
|
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
>(({ className, sideOffset = 6, ...props }, ref) => (
|
|
<TooltipPrimitive.Portal>
|
|
<TooltipPrimitive.Content
|
|
ref={ref}
|
|
sideOffset={sideOffset}
|
|
className={cn(
|
|
"z-50 overflow-hidden rounded-md bg-foreground px-2.5 py-1.5 text-xs font-medium text-background shadow-md data-[state=delayed-open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:fade-in-0 data-[side=right]:slide-in-from-left-1",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
</TooltipPrimitive.Portal>
|
|
));
|
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
|
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|