fix(input): revise styles in color type (#5098)

* chore(input): include data-type

* fix(input): input with type=color style
This commit is contained in:
աӄա 2025-03-28 01:43:07 +08:00 committed by GitHub
parent 1a7f3da5fd
commit de2e47c11a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,6 @@
---
"@heroui/input": patch
"@heroui/theme": patch
---
fix input with type=color style (#5083)

View File

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

View File

@ -375,6 +375,7 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
"data-filled-within": dataAttr(isFilledWithin),
"data-has-start-content": dataAttr(hasStartContent),
"data-has-end-content": dataAttr(!!endContent),
"data-type": type,
className: slots.input({
class: clsx(
classNames?.input,

View File

@ -45,6 +45,7 @@ const input = tv({
"w-full font-normal bg-transparent !outline-none placeholder:text-foreground-500 focus-visible:outline-none",
"data-[has-start-content=true]:ps-1.5",
"data-[has-end-content=true]:pe-1.5",
"data-[type=color]:rounded-none",
"file:cursor-pointer file:bg-transparent file:border-0",
"autofill:bg-transparent bg-clip-text",
],