| ... | ... | @@ -64,7 +64,7 @@ export const ChangedFilesCard = memo(function ChangedFilesCard(props: { |
| 64 | 64 | <div |
| 65 | 65 | data-changed-files-header="" |
| 66 | 66 | className={cn( |
| 67 | | "flex items-center justify-between gap-2 rounded-xl px-1", |
| 67 | "flex items-center justify-between gap-2 rounded-xl", |
| 68 | 68 | expanded && |
| 69 | 69 | "sticky top-2 z-10 mb-2 bg-secondary dark:bg-[color-mix(in_srgb,var(--foreground)_2.5%,var(--background))]", |
| 70 | 70 | )} |
| ... | ... | @@ -73,34 +73,36 @@ export const ChangedFilesCard = memo(function ChangedFilesCard(props: { |
| 73 | 73 | type="button" |
| 74 | 74 | aria-expanded={expanded} |
| 75 | 75 | data-scroll-anchor-ignore |
| 76 | | className="group flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden rounded-lg px-1 py-1.5 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" |
| 76 | className="group flex min-w-0 flex-1 items-center rounded-xl px-2 py-1.5 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" |
| 77 | 77 | onClick={() => onExpandedChange(!expanded)} |
| 78 | 78 | > |
| 79 | | <ChevronRightIcon |
| 80 | | aria-hidden="true" |
| 81 | | className={cn( |
| 82 | | "size-3.5 shrink-0 text-muted-foreground transition-transform", |
| 83 | | expanded && "rotate-90", |
| 84 | | )} |
| 85 | | /> |
| 86 | | <span className="flex shrink-0 items-center gap-1 whitespace-nowrap font-medium text-foreground text-xs leading-4"> |
| 87 | | <span> |
| 88 | | {files.length} changed file{files.length === 1 ? "" : "s"} |
| 79 | <span className="flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden"> |
| 80 | <ChevronRightIcon |
| 81 | aria-hidden="true" |
| 82 | className={cn( |
| 83 | "size-3.5 shrink-0 text-muted-foreground transition-transform", |
| 84 | expanded && "rotate-90", |
| 85 | )} |
| 86 | /> |
| 87 | <span className="flex shrink-0 items-center gap-1 whitespace-nowrap font-medium text-foreground text-xs leading-4"> |
| 88 | <span> |
| 89 | {files.length} changed file{files.length === 1 ? "" : "s"} |
| 90 | </span> |
| 91 | {hasNonZeroStat(summaryStat) && ( |
| 92 | <DiffStatLabel |
| 93 | additions={summaryStat.additions} |
| 94 | className="text-xs leading-4" |
| 95 | deletions={summaryStat.deletions} |
| 96 | layout="inline" |
| 97 | /> |
| 98 | )} |
| 99 | </span> |
| 100 | <span className="ml-1 hidden min-w-0 flex-1 truncate text-[11px] text-muted-foreground group-hover:text-foreground/80 @[24rem]/changed-files:inline"> |
| 101 | {expanded ? "Hide files" : "Show files"} |
| 89 | 102 | </span> |
| 90 | | {hasNonZeroStat(summaryStat) && ( |
| 91 | | <DiffStatLabel |
| 92 | | additions={summaryStat.additions} |
| 93 | | className="text-xs leading-4" |
| 94 | | deletions={summaryStat.deletions} |
| 95 | | layout="inline" |
| 96 | | /> |
| 97 | | )} |
| 98 | | </span> |
| 99 | | <span className="ml-1 hidden min-w-0 flex-1 truncate text-[11px] text-muted-foreground group-hover:text-foreground/80 @[24rem]/changed-files:inline"> |
| 100 | | {expanded ? "Hide files" : "Show files"} |
| 101 | 103 | </span> |
| 102 | 104 | </button> |
| 103 | | <div className="flex shrink-0 items-center gap-1.5"> |
| 105 | <div className="flex shrink-0 items-center gap-1.5 pr-1"> |
| 104 | 106 | {expanded ? ( |
| 105 | 107 | <Tooltip> |
| 106 | 108 | <TooltipTrigger |