Skip to content

Commit

Permalink
Update alert, alert dialog, dialog and sheet components (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephannv authored Nov 25, 2024
1 parent 3205764 commit e66b96a
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app/components/ruby_ui/alert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/ruby_ui/alert_dialog/alert_dialog_footer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/components/ruby_ui/alert_dialog/alert_dialog_header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/components/ruby_ui/dialog/dialog_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion app/components/ruby_ui/dialog/dialog_footer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/components/ruby_ui/dialog/dialog_header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/components/ruby_ui/sheet/sheet_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e66b96a

Please sign in to comment.