Skip to content

Commit 720490a

Browse files
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]>
1 parent a36af06 commit 720490a

8 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎apps/web/src/components/GitActionsControl.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
636636
return (
637637
<div
638638
key={option.value}
639-
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]"
639+
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]"
640640
>
641641
<option.Icon className="size-5 shrink-0 text-muted-foreground" aria-hidden />
642642
<span className="min-w-0 flex-1 truncate text-sm font-medium text-foreground">

‎apps/web/src/components/ThreadTerminalDrawer.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ export default function ThreadTerminalDrawer({
14471447
<TerminalActionButton
14481448
className={`p-1 text-foreground/90 transition-colors ${
14491449
hasReachedSplitLimit
1450-
? "cursor-not-allowed opacity-45 hover:bg-transparent"
1450+
? "cursor-not-allowed opacity-64 hover:bg-transparent"
14511451
: "hover:bg-accent"
14521452
}`}
14531453
onClick={onSplitTerminalAction}
@@ -1459,7 +1459,7 @@ export default function ThreadTerminalDrawer({
14591459
<TerminalActionButton
14601460
className={`p-1 text-foreground/90 transition-colors ${
14611461
hasReachedSplitLimit
1462-
? "cursor-not-allowed opacity-45 hover:bg-transparent"
1462+
? "cursor-not-allowed opacity-64 hover:bg-transparent"
14631463
: "hover:bg-accent"
14641464
}`}
14651465
onClick={onSplitTerminalVerticalAction}
@@ -1592,7 +1592,7 @@ export default function ThreadTerminalDrawer({
15921592
<TerminalActionButton
15931593
className={`inline-flex h-full items-center px-1 text-foreground/90 transition-colors ${
15941594
hasReachedSplitLimit
1595-
? "cursor-not-allowed opacity-45 hover:bg-transparent"
1595+
? "cursor-not-allowed opacity-64 hover:bg-transparent"
15961596
: "hover:bg-accent/70"
15971597
}`}
15981598
onClick={onSplitTerminalAction}
@@ -1603,7 +1603,7 @@ export default function ThreadTerminalDrawer({
16031603
<TerminalActionButton
16041604
className={`inline-flex h-full items-center border-l border-border/70 px-1 text-foreground/90 transition-colors ${
16051605
hasReachedSplitLimit
1606-
? "cursor-not-allowed opacity-45 hover:bg-transparent"
1606+
? "cursor-not-allowed opacity-64 hover:bg-transparent"
16071607
: "hover:bg-accent/70"
16081608
}`}
16091609
onClick={onSplitTerminalVerticalAction}

‎apps/web/src/components/chat/ChatComposer.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6401,7 +6401,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
64016401
<button
64026402
type="button"
64036403
data-chat-composer-transition-actions="true"
6404-
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"
6404+
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"
64056405
disabled={collapsedComposerPrimaryActionDisabled}
64066406
aria-label={collapsedComposerPrimaryActionLabel}
64076407
onPointerDown={(event) => event.preventDefault()}

‎apps/web/src/components/chat/ComposerPrimaryActions.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({
215215
<button
216216
type="submit"
217217
className={cn(
218-
"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",
218+
"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",
219219
stageBackdropVariant
220220
? "bg-transparent text-white enabled:shadow-black/24 enabled:hover:brightness-110"
221221
: "bg-message-action text-message-action-foreground enabled:shadow-message-action/24 hover:bg-message-action-hover",

‎apps/web/src/components/settings/AddProviderInstanceDialog.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export function AddProviderInstanceDialog({
287287
value={option.value}
288288
disabled
289289
className={cn(
290-
"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",
290+
"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",
291291
)}
292292
>
293293
<IconComponent className="size-4 shrink-0 text-muted-foreground" aria-hidden />

‎apps/web/src/components/settings/settingsLayout.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ export function SettingsRow({
427427
tabIndex={rowProps.id ? -1 : rowProps.tabIndex}
428428
data-slot="settings-row"
429429
className={cn(
430-
"@container/settings-row rounded-xl px-3 sm:px-4 aria-disabled:opacity-50 aria-disabled:[&_*]:text-muted-foreground",
430+
"@container/settings-row rounded-xl px-3 sm:px-4 aria-disabled:opacity-64 aria-disabled:[&_*]:text-muted-foreground",
431431
children ? "pt-3 pb-1" : "py-3",
432432
className,
433433
)}

‎apps/web/src/components/ui/discovery-list.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function DiscoveryListRow({
2424
<button
2525
type="button"
2626
{...props}
27-
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"
27+
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"
2828
>
2929
{icon}
3030
<div className="flex min-w-0 flex-1 flex-col">

‎apps/web/src/components/ui/sidebar.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">) {
654654
}
655655

656656
const sidebarMenuButtonVariants = cva(
657-
"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",
657+
"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",
658658
{
659659
defaultVariants: {
660660
size: "default",
@@ -767,7 +767,7 @@ function SidebarMenuSubButton({
767767
}) {
768768
const defaultProps = {
769769
className: cn(
770-
"-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",
770+
"-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",
771771
"data-[active=true]:bg-sidebar-row-selected data-[active=true]:text-sidebar-foreground",
772772
size === "sm" && "text-xs",
773773
size === "md" && "text-sm",

0 commit comments

Comments
 (0)