diff --git a/.changeset/two-radios-attend.md b/.changeset/two-radios-attend.md new file mode 100644 index 0000000000..5d3c631874 --- /dev/null +++ b/.changeset/two-radios-attend.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/theme": patch +--- + +Improved RTL support for the pagination component diff --git a/packages/core/theme/src/components/pagination.ts b/packages/core/theme/src/components/pagination.ts index 50fb6c0653..3d05fbe2cb 100644 --- a/packages/core/theme/src/components/pagination.ts +++ b/packages/core/theme/src/components/pagination.ts @@ -48,8 +48,12 @@ const pagination = tv({ "pointer-events-none", "z-20", ], - forwardIcon: - "hidden group-hover:block group-data-[focus-visible=true]:block data-[before=true]:rotate-180", + forwardIcon: [ + "hidden", + "group-hover:block", + "group-data-[focus-visible=true]:block", + "data-[before=true]:rotate-180", + ], ellipsis: "group-hover:hidden group-data-[focus-visible=true]:hidden", chevronNext: "rotate-180", }, @@ -108,12 +112,12 @@ const pagination = tv({ wrapper: "gap-0 shadow-sm", item: [ "shadow-none", - "first-of-type:rounded-r-none", - "last-of-type:rounded-l-none", + "first-of-type:rounded-e-none", + "last-of-type:rounded-s-none", "[&:not(:first-of-type):not(:last-of-type)]:rounded-none", ], - prev: "!rounded-r-none", - next: "!rounded-l-none", + prev: "!rounded-e-none", + next: "!rounded-s-none", }, }, isDisabled: { @@ -205,7 +209,7 @@ const pagination = tv({ isCompact: true, variant: "bordered", class: { - item: "[&:not(:first-of-type)]:ml-[calc(theme(borderWidth.2)*-1)]", + item: "[&:not(:first-of-type)]:ms-[calc(theme(borderWidth.2)*-1)]", }, }, /**