From 43f4d02c0d6261820d6c2e5c6c14d76744cdad0b Mon Sep 17 00:00:00 2001 From: Daniel Sil Date: Wed, 6 Nov 2024 13:07:08 +0100 Subject: [PATCH 1/2] fix(Checkbox): hover styles were not correct --- packages/orbit-components/src/Checkbox/index.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/orbit-components/src/Checkbox/index.tsx b/packages/orbit-components/src/Checkbox/index.tsx index f22fe4910b..1db614d114 100644 --- a/packages/orbit-components/src/Checkbox/index.tsx +++ b/packages/orbit-components/src/Checkbox/index.tsx @@ -34,7 +34,6 @@ const Checkbox = React.forwardRef((props, ref) => { "flex flex-row", "relative w-full", "[&_.orbit-checkbox-icon-container]:hover:shadow-none", - "[&_.orbit-checkbox-icon-container]:has-[:checked]:bg-blue-normal [&_.orbit-checkbox-icon-container]:has-[:checked]:hover:bg-blue-dark", "[&_.orbit-checkbox-icon-container]:has-[:focus]:outline-blue-normal [&_.orbit-checkbox-icon-container]:has-[:focus]:outline [&_.orbit-checkbox-icon-container]:has-[:focus]:outline-2", "[&_.orbit-checkbox-icon-container>svg]:has-[:checked]:visible", disabled @@ -46,7 +45,7 @@ const Checkbox = React.forwardRef((props, ref) => { ] : [ "cursor-pointer", - "[&_.orbit-checkbox-icon-container]:has-[:checked]:border-blue-normal [&_.orbit-checkbox-icon-container]:has-[:checked]:hover:border-blue-dark", + "[&_.orbit-checkbox-icon-container]:has-[:checked]:border-blue-normal [&_.orbit-checkbox-icon-container]:has-[:checked]:bg-blue-normal [&_.orbit-checkbox-icon-container]:has-[:checked]:hover:border-blue-dark [&_.orbit-checkbox-icon-container]:has-[:checked]:hover:bg-blue-dark", checked && !hasError && "[&_.orbit-checkbox-icon-container]:bg-blue-normal [&_.orbit-checkbox-icon-container]:border-blue-normal [&_.orbit-checkbox-icon-container]:hover:bg-blue-dark [&_.orbit-checkbox-icon-container]:hover:border-blue-dark", @@ -87,9 +86,8 @@ const Checkbox = React.forwardRef((props, ref) => { "duration-fast transition-all ease-in-out", "[&>svg]:size-icon-small", "[&>svg]:flex [&>svg]:items-center [&>svg]:justify-center", - "active:scale-95", checked ? "[&>svg]:visible" : "[&>svg]:invisible", - disabled && ["border-cloud-dark"], + disabled ? ["border-cloud-dark"] : "active:scale-95", )} > From 8b70c8177db33918e1ebae8c1424fe99b93ed301 Mon Sep 17 00:00:00 2001 From: Daniel Sil Date: Wed, 6 Nov 2024 13:09:06 +0100 Subject: [PATCH 2/2] fix(Radio): disabled style was incorrect --- packages/orbit-components/src/Radio/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/orbit-components/src/Radio/index.tsx b/packages/orbit-components/src/Radio/index.tsx index f887e95ee4..5d64cb8825 100644 --- a/packages/orbit-components/src/Radio/index.tsx +++ b/packages/orbit-components/src/Radio/index.tsx @@ -78,7 +78,7 @@ const Radio = React.forwardRef((props, ref) => { "duration-fast scale-100 transition-all ease-in-out", "border-solid", checked ? "border-2" : "border", - "active:scale-95", + !disabled && "active:scale-95", )} >