Skip to content

Commit e66b96a

Browse files
authored
Update alert, alert dialog, dialog and sheet components (#145)
1 parent 3205764 commit e66b96a

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ GIT
1414

1515
GIT
1616
remote: https://github.com/ruby-ui/ruby_ui.git
17-
revision: 398415a462e170a1c9d7af06b588fa5f2b879465
17+
revision: aa983e83f1ece8a3f62c4e816c07d2a2f17b6b90
1818
branch: main
1919
specs:
2020
ruby_ui (1.0.0.beta1)

app/components/ruby_ui/alert.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def colors
2727
end
2828

2929
def default_attrs
30-
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"
30+
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"
3131
{
3232
class: [base_classes, colors]
3333
}

app/components/ruby_ui/alert_dialog/alert_dialog_footer.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def view_template(&)
1010

1111
def default_attrs
1212
{
13-
class: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2"
13+
class: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 rtl:space-x-reverse"
1414
}
1515
end
1616
end

app/components/ruby_ui/alert_dialog/alert_dialog_header.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def view_template(&)
1010

1111
def default_attrs
1212
{
13-
class: "flex flex-col space-y-2 text-center sm:text-left"
13+
class: "flex flex-col space-y-2 text-center sm:text-left rtl:sm:text-right"
1414
}
1515
end
1616
end

app/components/ruby_ui/dialog/dialog_content.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def default_attrs
4343
def close_button
4444
button(
4545
type: "button",
46-
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",
46+
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",
4747
data_action: "click->ruby-ui--dialog#dismiss"
4848
) do
4949
svg(

app/components/ruby_ui/dialog/dialog_footer.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def view_template(&)
1010

1111
def default_attrs
1212
{
13-
class: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 gap-y-2 sm:gap-y-0"
13+
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"
1414
}
1515
end
1616
end

app/components/ruby_ui/dialog/dialog_header.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def view_template(&)
1010

1111
def default_attrs
1212
{
13-
class: "flex flex-col space-y-1.5 text-center sm:text-left"
13+
class: "flex flex-col space-y-1.5 text-center sm:text-left rtl:sm:text-right"
1414
}
1515
end
1616
end

app/components/ruby_ui/sheet/sheet_content.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def default_attrs
4242
def close_button
4343
button(
4444
type: "button",
45-
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",
45+
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",
4646
data_action: "click->ruby-ui--sheet-content#close"
4747
) do
4848
svg(

0 commit comments

Comments
 (0)