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/six-donuts-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/input": patch
---

Add RTL support to the input component
1 change: 1 addition & 0 deletions beano
Submodule beano added at 977840
11 changes: 9 additions & 2 deletions packages/core/theme/src/components/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const input = tv({
"z-10",
"pointer-events-none",
"origin-top-left",
"rtl:origin-top-right",
"subpixel-antialiased",
"block",
"text-small",
Expand All @@ -50,6 +51,8 @@ const input = tv({
"hidden",
"absolute",
"right-3",
"rtl:right-auto",
"rtl:left-3",
"appearance-none",
"outline-none",
"select-none",
Expand Down Expand Up @@ -169,7 +172,7 @@ const input = tv({
base: "flex-row items-center flex-nowrap data-[has-helper=true]:items-start",
inputWrapper: "flex-1",
mainWrapper: "flex flex-col",
label: "relative text-foreground pr-2",
label: "relative text-foreground pr-2 rtl:pr-0 rtl:pl-2",
},
inside: {
label: "text-tiny cursor-text",
Expand All @@ -184,7 +187,7 @@ const input = tv({
},
isClearable: {
true: {
input: "peer pr-6",
input: "peer pr-6 rtl:pr-0 rtl:pl-6",
clearButton: "peer-data-[filled=true]:opacity-70 peer-data-[filled=true]:block",
},
},
Expand Down Expand Up @@ -772,6 +775,8 @@ const input = tv({
class: {
label: [
"left-3",
"rtl:left-auto",
"rtl:right-3",
"text-small",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_theme(fontSize.small)/2_+_20px)]",
],
Expand All @@ -785,6 +790,8 @@ const input = tv({
class: {
label: [
"left-3",
"rtl:left-auto",
"rtl:right-3",
"text-medium",
"group-data-[filled-within=true]:-translate-y-[calc(100%_+_theme(fontSize.small)/2_+_24px)]",
],
Expand Down