perf(webui): scope interactive motion
Replace broad transitions with property-specific animation for progress bars, filters, cards, and dashboard controls. This prevents unrelated layout properties from animating while preserving the existing visual feedback. Standardize standalone press feedback at a 0.96 scale, keep disabled controls static, and honor both operating-system and in-app reduced-motion preferences.
This commit is contained in:
11 files changed
+21
-17
No files matched your search
@@ -203,7 +203,7 @@ function Segmented<T extends string | number>({
|
||||
disabled={disabled}
|
||||
onClick={() => onChange(opt.value)}
|
||||
className={cn(
|
||||
'inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm transition-all cursor-pointer outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40 disabled:cursor-not-allowed',
|
||||
'inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm transition-[background-color,color,box-shadow] duration-150 ease-out cursor-pointer outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40 disabled:cursor-not-allowed',
|
||||
active ? 'bg-card font-semibold text-foreground shadow-sm ring-1 ring-border' : 'font-medium text-muted-foreground hover:text-foreground',
|
||||
)}
|
||||
>
|
||||
@@ -393,7 +393,7 @@ function AppearancePanel() {
|
||||
aria-label={p.label}
|
||||
onClick={() => setAppearance({ palette: p.id })}
|
||||
className={cn(
|
||||
'flex w-[5.5rem] flex-col items-center gap-1.5 rounded-xl border p-1.5 transition-all cursor-pointer outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40',
|
||||
'flex w-[5.5rem] flex-col items-center gap-1.5 rounded-xl border p-1.5 transition-[border-color,box-shadow] duration-150 ease-out cursor-pointer outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40',
|
||||
active ? 'border-primary ring-2 ring-primary/30' : 'border-border hover:border-foreground/30',
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user