Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/popular-fishes-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@heroui/button": patch
"@heroui/select": patch
"@heroui/input": patch
"@heroui/theme": patch
---

Fix bordered focus styles overridden by hover styles (#5585)
2 changes: 1 addition & 1 deletion packages/components/input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@heroui/theme": ">=2.4.19",
"@heroui/theme": ">=2.4.23",
"@heroui/system": ">=2.4.18"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/number-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@heroui/system": ">=2.4.18",
"@heroui/theme": ">=2.4.19"
"@heroui/theme": ">=2.4.23"
},
"dependencies": {
"@heroui/form": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"peerDependencies": {
"@heroui/system": ">=2.4.18",
"@heroui/theme": ">=2.4.17",
"@heroui/theme": ">=2.4.23",
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"
Expand Down
26 changes: 21 additions & 5 deletions packages/core/theme/src/components/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ const input = tv({
"border-default-200",
"data-[hover=true]:border-default-400",
"group-data-[focus=true]:border-default-foreground",
"group-data-[focus=true]:data-[hover=true]:border-default-foreground",
],
},
underlined: {
Expand Down Expand Up @@ -449,39 +450,54 @@ const input = tv({
variant: "bordered",
color: "primary",
class: {
inputWrapper: "group-data-[focus=true]:border-primary",
inputWrapper: [
"group-data-[focus=true]:border-primary",
"group-data-[focus=true]:data-[hover=true]:border-primary",
],
label: "text-primary",
},
},
{
variant: "bordered",
color: "secondary",
class: {
inputWrapper: "group-data-[focus=true]:border-secondary",
inputWrapper: [
"group-data-[focus=true]:border-secondary",
"group-data-[focus=true]:data-[hover=true]:border-secondary",
],
label: "text-secondary",
},
},
{
variant: "bordered",
color: "success",
class: {
inputWrapper: "group-data-[focus=true]:border-success",
inputWrapper: [
"group-data-[focus=true]:border-success",
"group-data-[focus=true]:data-[hover=true]:border-success",
],
label: "text-success",
},
},
{
variant: "bordered",
color: "warning",
class: {
inputWrapper: "group-data-[focus=true]:border-warning",
inputWrapper: [
"group-data-[focus=true]:border-warning",
"group-data-[focus=true]:data-[hover=true]:border-warning",
],
label: "text-warning",
},
},
{
variant: "bordered",
color: "danger",
class: {
inputWrapper: "group-data-[focus=true]:border-danger",
inputWrapper: [
"group-data-[focus=true]:border-danger",
"group-data-[focus=true]:data-[hover=true]:border-danger",
],
label: "text-danger",
},
},
Expand Down
26 changes: 21 additions & 5 deletions packages/core/theme/src/components/number-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const numberInput = tv({
"border-default-200",
"data-[hover=true]:border-default-400",
"group-data-[focus=true]:border-default-foreground",
"group-data-[focus=true]:data-[hover=true]:border-default-foreground",
],
},
underlined: {
Expand Down Expand Up @@ -467,39 +468,54 @@ const numberInput = tv({
variant: "bordered",
color: "primary",
class: {
inputWrapper: "group-data-[focus=true]:border-primary",
inputWrapper: [
"group-data-[focus=true]:border-primary",
"group-data-[focus=true]:data-[hover=true]:border-primary",
],
label: "text-primary",
},
},
{
variant: "bordered",
color: "secondary",
class: {
inputWrapper: "group-data-[focus=true]:border-secondary",
inputWrapper: [
"group-data-[focus=true]:border-secondary",
"group-data-[focus=true]:data-[hover=true]:border-secondary",
],
label: "text-secondary",
},
},
{
variant: "bordered",
color: "success",
class: {
inputWrapper: "group-data-[focus=true]:border-success",
inputWrapper: [
"group-data-[focus=true]:border-success",
"group-data-[focus=true]:data-[hover=true]:border-success",
],
label: "text-success",
},
},
{
variant: "bordered",
color: "warning",
class: {
inputWrapper: "group-data-[focus=true]:border-warning",
inputWrapper: [
"group-data-[focus=true]:border-warning",
"group-data-[focus=true]:data-[hover=true]:border-warning",
],
label: "text-warning",
},
},
{
variant: "bordered",
color: "danger",
class: {
inputWrapper: "group-data-[focus=true]:border-danger",
inputWrapper: [
"group-data-[focus=true]:border-danger",
"group-data-[focus=true]:data-[hover=true]:border-danger",
],
label: "text-danger",
},
},
Expand Down
31 changes: 26 additions & 5 deletions packages/core/theme/src/components/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const select = tv({
"data-[hover=true]:border-default-400",
"data-[open=true]:border-default-foreground",
"data-[focus=true]:border-default-foreground",
"data-[focus=true]:data-[hover=true]:border-default-foreground",
],
value: "group-data-[has-value=true]:text-default-foreground",
clearButton: "mb-4",
Expand Down Expand Up @@ -445,39 +446,59 @@ const select = tv({
variant: "bordered",
color: "primary",
class: {
trigger: ["data-[open=true]:border-primary", "data-[focus=true]:border-primary"],
trigger: [
"data-[open=true]:border-primary",
"data-[focus=true]:border-primary",
"data-[focus=true]:data-[hover=true]:border-primary",
],
label: "text-primary",
},
},
{
variant: "bordered",
color: "secondary",
class: {
trigger: ["data-[open=true]:border-secondary", "data-[focus=true]:border-secondary"],
trigger: [
"data-[open=true]:border-secondary",
"data-[focus=true]:border-secondary",
"data-[focus=true]:data-[hover=true]:border-secondary",
],
label: "text-secondary",
},
},
{
variant: "bordered",
color: "success",
class: {
trigger: ["data-[open=true]:border-success", "data-[focus=true]:border-success"],
trigger: [
"data-[open=true]:border-success",
"data-[focus=true]:border-success",
"data-[focus=true]:data-[hover=true]:border-success",
],
label: "text-success",
},
},
{
variant: "bordered",
color: "warning",
class: {
trigger: ["data-[open=true]:border-warning", "data-[focus=true]:border-warning"],
trigger: [
"data-[open=true]:border-warning",
"data-[focus=true]:border-warning",
"data-[focus=true]:data-[hover=true]:border-warning",
],
label: "text-warning",
},
},
{
variant: "bordered",
color: "danger",
class: {
trigger: ["data-[open=true]:border-danger", "data-[focus=true]:border-danger"],
trigger: [
"data-[open=true]:border-danger",
"data-[focus=true]:border-danger",
"data-[focus=true]:data-[hover=true]:border-danger",
],
label: "text-danger",
},
},
Expand Down
Loading