diff --git a/Gemfile.lock b/Gemfile.lock index b64db734..53c7e27c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -14,7 +14,7 @@ GIT GIT remote: https://github.com/ruby-ui/ruby_ui.git - revision: 398415a462e170a1c9d7af06b588fa5f2b879465 + revision: aa983e83f1ece8a3f62c4e816c07d2a2f17b6b90 branch: main specs: ruby_ui (1.0.0.beta1) diff --git a/app/components/ruby_ui/alert.rb b/app/components/ruby_ui/alert.rb index 0c7881eb..c83352d0 100644 --- a/app/components/ruby_ui/alert.rb +++ b/app/components/ruby_ui/alert.rb @@ -27,7 +27,7 @@ def colors end def default_attrs - base_classes = "backdrop-blur relative w-full ring-1 ring-inset rounded-lg px-4 py-4 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg~*]:pl-8" + base_classes = "backdrop-blur relative w-full ring-1 ring-inset rounded-lg px-4 py-4 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:start-4 [&>svg]:top-4 [&>svg~*]:ps-8" { class: [base_classes, colors] } diff --git a/app/components/ruby_ui/alert_dialog/alert_dialog_footer.rb b/app/components/ruby_ui/alert_dialog/alert_dialog_footer.rb index 07c0e6e1..f5481062 100644 --- a/app/components/ruby_ui/alert_dialog/alert_dialog_footer.rb +++ b/app/components/ruby_ui/alert_dialog/alert_dialog_footer.rb @@ -10,7 +10,7 @@ def view_template(&) def default_attrs { - class: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2" + class: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 rtl:space-x-reverse" } end end diff --git a/app/components/ruby_ui/alert_dialog/alert_dialog_header.rb b/app/components/ruby_ui/alert_dialog/alert_dialog_header.rb index 1331fa1f..0494988a 100644 --- a/app/components/ruby_ui/alert_dialog/alert_dialog_header.rb +++ b/app/components/ruby_ui/alert_dialog/alert_dialog_header.rb @@ -10,7 +10,7 @@ def view_template(&) def default_attrs { - class: "flex flex-col space-y-2 text-center sm:text-left" + class: "flex flex-col space-y-2 text-center sm:text-left rtl:sm:text-right" } end end diff --git a/app/components/ruby_ui/dialog/dialog_content.rb b/app/components/ruby_ui/dialog/dialog_content.rb index 3c9df6db..41b01d61 100644 --- a/app/components/ruby_ui/dialog/dialog_content.rb +++ b/app/components/ruby_ui/dialog/dialog_content.rb @@ -43,7 +43,7 @@ def default_attrs def close_button button( type: "button", - class: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", + class: "absolute end-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", data_action: "click->ruby-ui--dialog#dismiss" ) do svg( diff --git a/app/components/ruby_ui/dialog/dialog_footer.rb b/app/components/ruby_ui/dialog/dialog_footer.rb index 88277df0..bf2b35a2 100644 --- a/app/components/ruby_ui/dialog/dialog_footer.rb +++ b/app/components/ruby_ui/dialog/dialog_footer.rb @@ -10,7 +10,7 @@ def view_template(&) def default_attrs { - class: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 gap-y-2 sm:gap-y-0" + class: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 gap-y-2 sm:gap-y-0 rtl:space-x-reverse" } end end diff --git a/app/components/ruby_ui/dialog/dialog_header.rb b/app/components/ruby_ui/dialog/dialog_header.rb index cb7d9b5c..c6a12aa7 100644 --- a/app/components/ruby_ui/dialog/dialog_header.rb +++ b/app/components/ruby_ui/dialog/dialog_header.rb @@ -10,7 +10,7 @@ def view_template(&) def default_attrs { - class: "flex flex-col space-y-1.5 text-center sm:text-left" + class: "flex flex-col space-y-1.5 text-center sm:text-left rtl:sm:text-right" } end end diff --git a/app/components/ruby_ui/sheet/sheet_content.rb b/app/components/ruby_ui/sheet/sheet_content.rb index 60f733da..bf3a3115 100644 --- a/app/components/ruby_ui/sheet/sheet_content.rb +++ b/app/components/ruby_ui/sheet/sheet_content.rb @@ -42,7 +42,7 @@ def default_attrs def close_button button( type: "button", - class: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", + class: "absolute end-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", data_action: "click->ruby-ui--sheet-content#close" ) do svg(