From 4db0da5da40bf27387b580b5d86b5d3509c22d51 Mon Sep 17 00:00:00 2001 From: Hichem Fantar Date: Sun, 12 Nov 2023 18:45:44 +0100 Subject: [PATCH] feat: smooth transitions to interactive elements (#11983) Co-authored-by: Peer Richelsen --- apps/web/pages/event-types/index.tsx | 2 +- packages/features/kbar/Kbar.tsx | 2 +- .../features/schedules/components/ScheduleListItem.tsx | 2 +- packages/features/shell/Shell.tsx | 8 ++++---- packages/ui/components/apps/Slider.tsx | 2 +- packages/ui/components/button/Button.tsx | 4 ++-- packages/ui/components/form/dropdown/Dropdown.tsx | 2 +- packages/ui/components/form/inputs/Input.tsx | 2 +- packages/ui/components/form/inputs/TextField.tsx | 2 +- .../ui/components/navigation/tabs/HorizontalTabItem.tsx | 2 +- .../ui/components/navigation/tabs/VerticalTabItem.tsx | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/web/pages/event-types/index.tsx b/apps/web/pages/event-types/index.tsx index 4d68795e92..468e1fde5d 100644 --- a/apps/web/pages/event-types/index.tsx +++ b/apps/web/pages/event-types/index.tsx @@ -386,7 +386,7 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL type.metadata?.managedEventConfig !== undefined && type.schedulingType !== SchedulingType.MANAGED; return (
  • -
    +
    {!(firstItem && firstItem.id === type.id) && ( moveEventType(index, -1)} arrowDirection="up" /> diff --git a/packages/features/kbar/Kbar.tsx b/packages/features/kbar/Kbar.tsx index ad13715865..0477141a3c 100644 --- a/packages/features/kbar/Kbar.tsx +++ b/packages/features/kbar/Kbar.tsx @@ -273,7 +273,7 @@ export const KBarTrigger = () => { diff --git a/packages/features/schedules/components/ScheduleListItem.tsx b/packages/features/schedules/components/ScheduleListItem.tsx index 5844d57333..2af0c12d44 100644 --- a/packages/features/schedules/components/ScheduleListItem.tsx +++ b/packages/features/schedules/components/ScheduleListItem.tsx @@ -41,7 +41,7 @@ export function ScheduleListItem({ return (
  • -
    +
    setMenuOpen((menuOpen) => !menuOpen)}> ); diff --git a/packages/ui/components/button/Button.tsx b/packages/ui/components/button/Button.tsx index 95a8cbc1bb..17f0d41642 100644 --- a/packages/ui/components/button/Button.tsx +++ b/packages/ui/components/button/Button.tsx @@ -38,13 +38,13 @@ export type ButtonProps = ButtonBaseProps & ); export const buttonClasses = cva( - "whitespace-nowrap inline-flex items-center text-sm font-medium relative rounded-md transition-colors disabled:cursor-not-allowed", + "whitespace-nowrap inline-flex items-center text-sm font-medium relative rounded-md transition disabled:cursor-not-allowed", { variants: { variant: { button: "", icon: "flex justify-center", - fab: "rounded-full justify-center md:rounded-md radix-state-open:rotate-45 md:radix-state-open:rotate-0 transition-transform radix-state-open:shadown-none radix-state-open:ring-0 !shadow-none", + fab: "rounded-full justify-center md:rounded-md radix-state-open:rotate-45 md:radix-state-open:rotate-0 radix-state-open:shadown-none radix-state-open:ring-0 !shadow-none", }, color: { primary: diff --git a/packages/ui/components/form/dropdown/Dropdown.tsx b/packages/ui/components/form/dropdown/Dropdown.tsx index 50edacf4bb..fcc0e55971 100644 --- a/packages/ui/components/form/dropdown/Dropdown.tsx +++ b/packages/ui/components/form/dropdown/Dropdown.tsx @@ -137,7 +137,7 @@ export const DropdownItem = (props: DropdownItemProps) => { (function ref={ref} {...props} className={classNames( - "hover:border-emphasis border-default bg-default placeholder:text-muted text-emphasis disabled:hover:border-default disabled:bg-subtle focus:ring-brand-default mb-2 block w-full rounded-md border px-3 py-2 text-sm focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:cursor-not-allowed", + "hover:border-emphasis border-default bg-default placeholder:text-muted text-emphasis disabled:hover:border-default disabled:bg-subtle focus:ring-brand-default mb-2 block w-full rounded-md border px-3 py-2 text-sm transition focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:cursor-not-allowed", props.className )} /> diff --git a/packages/ui/components/form/inputs/TextField.tsx b/packages/ui/components/form/inputs/TextField.tsx index 93a4d6d2a0..1fc0b36f1f 100644 --- a/packages/ui/components/form/inputs/TextField.tsx +++ b/packages/ui/components/form/inputs/TextField.tsx @@ -18,7 +18,7 @@ export const Input = forwardRef(function Input( {...props} ref={ref} className={classNames( - "hover:border-emphasis dark:focus:border-emphasis border-default bg-default placeholder:text-muted text-emphasis disabled:hover:border-default disabled:bg-subtle focus:ring-brand-default mb-2 block h-9 rounded-md border px-3 py-2 text-sm leading-4 focus:border-neutral-300 focus:outline-none focus:ring-2 disabled:cursor-not-allowed", + "hover:border-emphasis dark:focus:border-emphasis border-default bg-default placeholder:text-muted text-emphasis disabled:hover:border-default disabled:bg-subtle focus:ring-brand-default mb-2 block h-9 rounded-md border px-3 py-2 text-sm leading-4 transition focus:border-neutral-300 focus:outline-none focus:ring-2 disabled:cursor-not-allowed", isFullWidth && "w-full", props.className )} diff --git a/packages/ui/components/navigation/tabs/HorizontalTabItem.tsx b/packages/ui/components/navigation/tabs/HorizontalTabItem.tsx index e044d73953..18f8754c21 100644 --- a/packages/ui/components/navigation/tabs/HorizontalTabItem.tsx +++ b/packages/ui/components/navigation/tabs/HorizontalTabItem.tsx @@ -39,7 +39,7 @@ const HorizontalTabItem = function ({ scroll={linkScroll} className={classNames( isCurrent ? "bg-emphasis text-emphasis" : "hover:bg-subtle hover:text-emphasis text-default", - "inline-flex items-center justify-center whitespace-nowrap rounded-[6px] p-2 text-sm font-medium leading-4 md:mb-0", + "inline-flex items-center justify-center whitespace-nowrap rounded-[6px] p-2 text-sm font-medium leading-4 transition md:mb-0", props.disabled && "pointer-events-none !opacity-30", props.className )} diff --git a/packages/ui/components/navigation/tabs/VerticalTabItem.tsx b/packages/ui/components/navigation/tabs/VerticalTabItem.tsx index b83eca9f36..121cf08bf4 100644 --- a/packages/ui/components/navigation/tabs/VerticalTabItem.tsx +++ b/packages/ui/components/navigation/tabs/VerticalTabItem.tsx @@ -53,7 +53,7 @@ const VerticalTabItem = ({ target={props.isExternalLink ? "_blank" : "_self"} className={classNames( props.textClassNames || "text-default text-sm font-medium leading-none", - "min-h-8 hover:bg-subtle [&[aria-current='page']]:bg-emphasis [&[aria-current='page']]:text-emphasis group-hover:text-default group flex w-64 flex-row items-center rounded-md px-3 py-[10px]", + "min-h-8 hover:bg-subtle [&[aria-current='page']]:bg-emphasis [&[aria-current='page']]:text-emphasis group-hover:text-default group flex w-64 flex-row items-center rounded-md px-3 py-[10px] transition", props.disabled && "pointer-events-none !opacity-30", (isChild || !props.icon) && "ml-7 w-auto ltr:mr-5 rtl:ml-5", !info ? "h-6" : "h-14",