fix: Missing focus outlines (#1252)
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
This commit is contained in:
parent
fd446d14be
commit
93939ee1f2
4 changed files with 11 additions and 11 deletions
|
|
@ -114,6 +114,7 @@ export const Context = ({ className, usage, ...props }: ContextProps) => {
|
||||||
className={cn(
|
className={cn(
|
||||||
"inline-flex select-none items-center gap-1 rounded-md text-sm",
|
"inline-flex select-none items-center gap-1 rounded-md text-sm",
|
||||||
"cursor-pointer bg-background text-foreground",
|
"cursor-pointer bg-background text-foreground",
|
||||||
|
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 outline-none ring-offset-background",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ export function PureMessageActions({
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
{setMode && (
|
{setMode && (
|
||||||
<Action
|
<Action
|
||||||
className="-left-10 absolute top-0 opacity-0 transition-opacity group-hover/message:opacity-100"
|
className="-left-10 absolute top-0 opacity-0 transition-opacity focus-visible:opacity-100 group-hover/message:opacity-100"
|
||||||
data-testid="message-edit-button"
|
data-testid="message-edit-button"
|
||||||
onClick={() => setMode("edit")}
|
onClick={() => setMode("edit")}
|
||||||
tooltip="Edit"
|
tooltip="Edit"
|
||||||
|
|
|
||||||
|
|
@ -427,15 +427,14 @@ function PureModelSelectorCompact({
|
||||||
}}
|
}}
|
||||||
value={selectedModel?.name}
|
value={selectedModel?.name}
|
||||||
>
|
>
|
||||||
<Trigger
|
<Trigger asChild>
|
||||||
className="flex h-8 items-center gap-2 rounded-lg border-0 bg-background px-2 text-foreground shadow-none transition-colors hover:bg-accent focus:outline-none focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0"
|
<Button variant="ghost" className="h-8 px-2">
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<CpuIcon size={16} />
|
<CpuIcon size={16} />
|
||||||
<span className="hidden font-medium text-xs sm:block">
|
<span className="hidden font-medium text-xs sm:block">
|
||||||
{selectedModel?.name}
|
{selectedModel?.name}
|
||||||
</span>
|
</span>
|
||||||
<ChevronDownIcon size={16} />
|
<ChevronDownIcon size={16} />
|
||||||
|
</Button>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<PromptInputModelSelectContent className="min-w-[260px] p-0">
|
<PromptInputModelSelectContent className="min-w-[260px] p-0">
|
||||||
<div className="flex flex-col gap-px">
|
<div className="flex flex-col gap-px">
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ export function VisibilitySelector({
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
className="hidden h-8 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 md:flex md:h-fit md:px-2"
|
className="hidden h-8 md:flex md:h-fit md:px-2"
|
||||||
data-testid="visibility-selector"
|
data-testid="visibility-selector"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue