fix(theme): consistent faded styling for isInvalid in InputOtp and DateInput (#5349)

* fix(input-otp): remove bg and border styles from faded variant when isInvalid

* fix(date-input): remove bg styles from faded variant when isInvalid

* chore(changeset): add changeset

* chore: bump theme peerDependencies

* chore: bump theme peerDependencies

* fix: wrong version

* chore: extra line

---------

Co-authored-by: WK Wong <wingkwong.code@gmail.com>
This commit is contained in:
Anuj Kuralkar 2025-06-08 19:42:32 +05:30 committed by GitHub
parent 2aeb33f3e1
commit ff4b1b2393
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 12 deletions

View File

@ -0,0 +1,7 @@
---
"@heroui/date-input": patch
"@heroui/input-otp": patch
"@heroui/theme": patch
---
fixed inconsistent isInvalid styling between Input, InputOtp and DateInput in faded variant (#5339)

View File

@ -35,7 +35,7 @@
},
"peerDependencies": {
"@heroui/system": ">=2.4.10",
"@heroui/theme": ">=2.4.9",
"@heroui/theme": ">=2.4.16",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"
},

View File

@ -36,7 +36,7 @@
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18",
"@heroui/theme": ">=2.4.13",
"@heroui/theme": ">=2.4.16",
"@heroui/system": ">=2.4.7"
},
"dependencies": {

View File

@ -60,10 +60,6 @@ const dateInput = tv({
"border-medium",
"border-default-200",
"hover:border-default-400",
// isInvalid=true
"group-data-[invalid=true]:bg-danger-50",
"group-data-[invalid=true]:hover:bg-danger-100",
"group-data-[invalid=true]:focus-within:hover:bg-danger-50",
],
},
bordered: {

View File

@ -409,12 +409,7 @@ const inputOtp = tv({
variant: "faded",
isInvalid: true,
class: {
segment: [
"bg-danger-50",
"text-danger",
"border-danger-200",
"data-[active=true]:border-danger-400",
],
segment: ["text-danger"],
caret: ["bg-danger"],
},
},