fix(web): normalize disabled control opacity (#11441)
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com> Co-authored-by: Utkarsh Patil <[email protected]>
This commit is contained in:
1 parent
a36af0637a
commit
720490adc9
8 files changed
+12
-12
No files matched your search
@@ -636,7 +636,7 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
|
||||
return (
|
||||
<div
|
||||
key={option.value}
|
||||
className="relative flex cursor-not-allowed items-center gap-3 rounded-lg border border-border bg-background px-3 py-3 text-left opacity-55 dark:border-transparent dark:bg-white/[0.035]"
|
||||
className="relative flex cursor-not-allowed items-center gap-3 rounded-lg border border-border bg-background px-3 py-3 text-left opacity-64 dark:border-transparent dark:bg-white/[0.035]"
|
||||
>
|
||||
<option.Icon className="size-5 shrink-0 text-muted-foreground" aria-hidden />
|
||||
<span className="min-w-0 flex-1 truncate text-sm font-medium text-foreground">
|
||||
|
||||
@@ -1447,7 +1447,7 @@ export default function ThreadTerminalDrawer({
|
||||
<TerminalActionButton
|
||||
className={`p-1 text-foreground/90 transition-colors ${
|
||||
hasReachedSplitLimit
|
||||
? "cursor-not-allowed opacity-45 hover:bg-transparent"
|
||||
? "cursor-not-allowed opacity-64 hover:bg-transparent"
|
||||
: "hover:bg-accent"
|
||||
}`}
|
||||
onClick={onSplitTerminalAction}
|
||||
@@ -1459,7 +1459,7 @@ export default function ThreadTerminalDrawer({
|
||||
<TerminalActionButton
|
||||
className={`p-1 text-foreground/90 transition-colors ${
|
||||
hasReachedSplitLimit
|
||||
? "cursor-not-allowed opacity-45 hover:bg-transparent"
|
||||
? "cursor-not-allowed opacity-64 hover:bg-transparent"
|
||||
: "hover:bg-accent"
|
||||
}`}
|
||||
onClick={onSplitTerminalVerticalAction}
|
||||
@@ -1592,7 +1592,7 @@ export default function ThreadTerminalDrawer({
|
||||
<TerminalActionButton
|
||||
className={`inline-flex h-full items-center px-1 text-foreground/90 transition-colors ${
|
||||
hasReachedSplitLimit
|
||||
? "cursor-not-allowed opacity-45 hover:bg-transparent"
|
||||
? "cursor-not-allowed opacity-64 hover:bg-transparent"
|
||||
: "hover:bg-accent/70"
|
||||
}`}
|
||||
onClick={onSplitTerminalAction}
|
||||
@@ -1603,7 +1603,7 @@ export default function ThreadTerminalDrawer({
|
||||
<TerminalActionButton
|
||||
className={`inline-flex h-full items-center border-l border-border/70 px-1 text-foreground/90 transition-colors ${
|
||||
hasReachedSplitLimit
|
||||
? "cursor-not-allowed opacity-45 hover:bg-transparent"
|
||||
? "cursor-not-allowed opacity-64 hover:bg-transparent"
|
||||
: "hover:bg-accent/70"
|
||||
}`}
|
||||
onClick={onSplitTerminalVerticalAction}
|
||||
|
||||
@@ -6401,7 +6401,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
|
||||
<button
|
||||
type="button"
|
||||
data-chat-composer-transition-actions="true"
|
||||
className="flex size-8 shrink-0 items-center justify-center rounded-full bg-message-action text-message-action-foreground hover:bg-message-action-hover disabled:opacity-30"
|
||||
className="flex size-8 shrink-0 items-center justify-center rounded-full bg-message-action text-message-action-foreground hover:bg-message-action-hover disabled:opacity-64"
|
||||
disabled={collapsedComposerPrimaryActionDisabled}
|
||||
aria-label={collapsedComposerPrimaryActionLabel}
|
||||
onPointerDown={(event) => event.preventDefault()}
|
||||
|
||||
@@ -215,7 +215,7 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({
|
||||
<button
|
||||
type="submit"
|
||||
className={cn(
|
||||
"relative isolate flex h-9 w-9 items-center justify-center overflow-hidden rounded-full shadow-xs transition-all duration-150 enabled:cursor-pointer enabled:inset-shadow-2xs enabled:inset-shadow-white/16 hover:scale-105 active:inset-shadow-black/8 active:shadow-none disabled:pointer-events-none disabled:opacity-30 disabled:shadow-none disabled:hover:scale-100 sm:h-8 sm:w-8",
|
||||
"relative isolate flex h-9 w-9 items-center justify-center overflow-hidden rounded-full shadow-xs transition-all duration-150 enabled:cursor-pointer enabled:inset-shadow-2xs enabled:inset-shadow-white/16 hover:scale-105 active:inset-shadow-black/8 active:shadow-none disabled:pointer-events-none disabled:opacity-64 disabled:shadow-none disabled:hover:scale-100 sm:h-8 sm:w-8",
|
||||
stageBackdropVariant
|
||||
? "bg-transparent text-white enabled:shadow-black/24 enabled:hover:brightness-110"
|
||||
: "bg-message-action text-message-action-foreground enabled:shadow-message-action/24 hover:bg-message-action-hover",
|
||||
|
||||
@@ -287,7 +287,7 @@ export function AddProviderInstanceDialog({
|
||||
value={option.value}
|
||||
disabled
|
||||
className={cn(
|
||||
"relative flex cursor-not-allowed items-center gap-3 rounded-lg bg-card/60 px-3 py-3 text-left opacity-55 outline-none ring-1 ring-black/5 dark:bg-white/2 dark:ring-white/5",
|
||||
"relative flex cursor-not-allowed items-center gap-3 rounded-lg bg-card/60 px-3 py-3 text-left opacity-64 outline-none ring-1 ring-black/5 dark:bg-white/2 dark:ring-white/5",
|
||||
)}
|
||||
>
|
||||
<IconComponent className="size-4 shrink-0 text-muted-foreground" aria-hidden />
|
||||
|
||||
@@ -427,7 +427,7 @@ export function SettingsRow({
|
||||
tabIndex={rowProps.id ? -1 : rowProps.tabIndex}
|
||||
data-slot="settings-row"
|
||||
className={cn(
|
||||
"@container/settings-row rounded-xl px-3 sm:px-4 aria-disabled:opacity-50 aria-disabled:[&_*]:text-muted-foreground",
|
||||
"@container/settings-row rounded-xl px-3 sm:px-4 aria-disabled:opacity-64 aria-disabled:[&_*]:text-muted-foreground",
|
||||
children ? "pt-3 pb-1" : "py-3",
|
||||
className,
|
||||
)}
|
||||
|
||||
@@ -24,7 +24,7 @@ export function DiscoveryListRow({
|
||||
<button
|
||||
type="button"
|
||||
{...props}
|
||||
className="group flex w-full items-center gap-3 px-3 py-3 text-left hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"
|
||||
className="group flex w-full items-center gap-3 px-3 py-3 text-left hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-64"
|
||||
>
|
||||
{icon}
|
||||
<div className="flex min-w-0 flex-1 flex-col">
|
||||
|
||||
@@ -654,7 +654,7 @@ function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">) {
|
||||
}
|
||||
|
||||
const sidebarMenuButtonVariants = cva(
|
||||
"peer/menu-button flex w-full cursor-pointer items-center gap-[var(--sidebar-control-gap)] overflow-hidden text-left outline-hidden ring-ring transition-[width,height,padding] hover:bg-sidebar-row-hover hover:text-sidebar-foreground focus-visible:ring-2 active:bg-sidebar-row-active active:text-sidebar-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-row-selected data-[active=true]:font-medium data-[active=true]:text-sidebar-foreground data-[state=open]:hover:bg-sidebar-row-hover data-[state=open]:hover:text-sidebar-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-[var(--sidebar-content-inset)]! [&>span:last-child]:truncate [&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-[var(--sidebar-icon-color)] hover:[&>svg]:text-sidebar-foreground active:[&>svg]:text-sidebar-foreground data-[active=true]:[&>svg]:text-sidebar-foreground",
|
||||
"peer/menu-button flex w-full cursor-pointer items-center gap-[var(--sidebar-control-gap)] overflow-hidden text-left outline-hidden ring-ring transition-[width,height,padding] hover:bg-sidebar-row-hover hover:text-sidebar-foreground focus-visible:ring-2 active:bg-sidebar-row-active active:text-sidebar-foreground disabled:pointer-events-none disabled:opacity-64 aria-disabled:pointer-events-none aria-disabled:opacity-64 data-[active=true]:bg-sidebar-row-selected data-[active=true]:font-medium data-[active=true]:text-sidebar-foreground data-[state=open]:hover:bg-sidebar-row-hover data-[state=open]:hover:text-sidebar-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-[var(--sidebar-content-inset)]! [&>span:last-child]:truncate [&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-[var(--sidebar-icon-color)] hover:[&>svg]:text-sidebar-foreground active:[&>svg]:text-sidebar-foreground data-[active=true]:[&>svg]:text-sidebar-foreground",
|
||||
{
|
||||
defaultVariants: {
|
||||
size: "default",
|
||||
@@ -767,7 +767,7 @@ function SidebarMenuSubButton({
|
||||
}) {
|
||||
const defaultProps = {
|
||||
className: cn(
|
||||
"-translate-x-px flex h-7 min-w-0 cursor-pointer items-center gap-2 overflow-hidden rounded-lg px-2 text-sidebar-foreground outline-hidden ring-ring hover:bg-sidebar-row-hover hover:text-sidebar-foreground focus-visible:ring-2 active:bg-sidebar-row-active active:text-sidebar-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-muted-foreground",
|
||||
"-translate-x-px flex h-7 min-w-0 cursor-pointer items-center gap-2 overflow-hidden rounded-lg px-2 text-sidebar-foreground outline-hidden ring-ring hover:bg-sidebar-row-hover hover:text-sidebar-foreground focus-visible:ring-2 active:bg-sidebar-row-active active:text-sidebar-foreground disabled:pointer-events-none disabled:opacity-64 aria-disabled:pointer-events-none aria-disabled:opacity-64 [&>span:last-child]:truncate [&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-muted-foreground",
|
||||
"data-[active=true]:bg-sidebar-row-selected data-[active=true]:text-sidebar-foreground",
|
||||
size === "sm" && "text-xs",
|
||||
size === "md" && "text-sm",
|
||||
|
||||
Reference in new issue
Block a user