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
5 changes: 5 additions & 0 deletions .changeset/long-kings-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@heroui/theme": patch
---

fix incorrect label position of select component when the labelPlacement is outside and data-has-helper=true (#5796)
15 changes: 12 additions & 3 deletions packages/core/theme/src/components/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,10 @@ const select = tv({
"start-2",
"text-tiny",
"group-data-[filled=true]:-translate-y-[calc(100%_+var(--heroui-font-size-tiny)/2_+_16px)]",
"group-data-[has-helper=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_26px)]",
"group-data-[has-helper=true]:-translate-y-0",
"group-data-[has-helper=true]:relative",
"group-data-[has-helper=true]:pe-2",
"group-data-[has-helper=true]:pb-1.5",
],
base: "data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_8px)]",
},
Expand All @@ -744,7 +747,10 @@ const select = tv({
"start-3",
"text-small",
"group-data-[filled=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]",
"group-data-[has-helper=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_30px)]",
"group-data-[has-helper=true]:-translate-y-0",
"group-data-[has-helper=true]:relative",
"group-data-[has-helper=true]:pe-2",
"group-data-[has-helper=true]:pb-1.5",
],
base: "data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_10px)]",
},
Expand All @@ -758,7 +764,10 @@ const select = tv({
"start-3",
"text-medium",
"group-data-[filled=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]",
"group-data-[has-helper=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_34px)]",
"group-data-[has-helper=true]:-translate-y-0",
"group-data-[has-helper=true]:relative",
"group-data-[has-helper=true]:pe-2",
"group-data-[has-helper=true]:pb-1.5",
],
base: "data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_12px)]",
},
Expand Down
Loading