Skip to content

Commit c2e07ef

Browse files
cirdesDjalma Andrade
authored andcommitted
chore(deps): bump rubyui components to v1.0.2 (#314)
1 parent d40b4f9 commit c2e07ef

46 files changed

Lines changed: 982 additions & 41 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ GIT
1414

1515
GIT
1616
remote: https://github.com/ruby-ui/ruby_ui.git
17-
revision: 1a21bdb6fd38d2bd08e684a82b71e1637a727597
17+
revision: 0d9803f53800174481de9d1dad19fc20f371ada3
1818
branch: main
1919
specs:
20-
ruby_ui (1.0.1)
20+
ruby_ui (1.0.2)
2121

2222
GEM
2323
remote: https://rubygems.org/

app/components/ruby_ui/alert_dialog/alert_dialog_content.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ def view_template(&block)
1414
def background
1515
div(
1616
data_state: "open",
17-
class:
18-
"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
17+
class: "fixed inset-0 z-50 bg-black/80 backdrop-blur-sm data-[state=open]:animate-in",
1918
style: "pointer-events:auto",
2019
data_aria_hidden: "true",
2120
aria_hidden: "true"
@@ -26,7 +25,7 @@ def container(&)
2625
div(
2726
role: "alertdialog",
2827
data_state: "open",
29-
class: "flex flex-col fixed left-[50%] top-[50%] z-50 w-full max-w-lg max-h-screen overflow-y-auto translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
28+
class: "flex flex-col fixed left-[50%] top-[50%] z-50 w-full max-w-lg max-h-screen overflow-y-auto translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:rounded-lg md:w-full",
3029
style: "pointer-events:auto",
3130
&
3231
)

app/components/ruby_ui/checkbox/checkbox.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def default_attrs
1919
class: [
2020
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background accent-primary",
2121
"disabled:cursor-not-allowed disabled:opacity-50",
22+
"checked:bg-primary checked:text-primary-foreground",
2223
"aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none",
2324
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
2425
]

app/components/ruby_ui/combobox/combobox.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module RubyUI
44
class Combobox < Base
5-
def initialize(term: "items", **)
5+
def initialize(term: nil, **)
66
@term = term
77
super(**)
88
end
@@ -18,7 +18,8 @@ def default_attrs
1818
role: "combobox",
1919
data: {
2020
controller: "ruby-ui--combobox",
21-
ruby_ui__combobox_term_value: @term.to_s
21+
ruby_ui__combobox_term_value: @term,
22+
action: "turbo:morph@window->ruby-ui--combobox#updateTriggerContent"
2223
}
2324
}
2425
end

app/components/ruby_ui/combobox/combobox_checkbox.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ def default_attrs
1212
{
1313
class: [
1414
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background accent-primary",
15-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1615
"disabled:cursor-not-allowed disabled:opacity-50",
17-
"aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none"
16+
"checked:bg-primary checked:text-primary-foreground",
17+
"aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none",
18+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
1819
],
1920
data: {
2021
ruby_ui__combobox_target: "input",

app/components/ruby_ui/combobox/combobox_item.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ def default_attrs
1313
class: [
1414
"flex flex-row w-full text-wrap [&>span,&>div]:truncate gap-2 items-center rounded-sm px-2 py-1 text-sm outline-none cursor-pointer",
1515
"select-none has-[:checked]:bg-accent hover:bg-accent p-2",
16-
"[&>svg]:pointer-events-none [&>svg]:size-4 [&>svg]:shrink-0 aria-[current=true]:bg-accent aria-[current=true]:ring aria-[current=true]:ring-offset-2"
16+
"[&>svg]:pointer-events-none [&>svg]:size-4 [&>svg]:shrink-0 aria-[current=true]:bg-accent aria-[current=true]:ring aria-[current=true]:ring-offset-2",
17+
"has-disabled:opacity-50 has-disabled:cursor-not-allowed"
1718
],
1819
role: "option",
1920
data: {

app/components/ruby_ui/combobox/combobox_radio.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def default_attrs
1515
"focus:outline-none",
1616
"focus-visible:ring-1 focus-visible:ring-ring",
1717
"disabled:cursor-not-allowed disabled:opacity-50",
18+
"checked:bg-primary checked:text-primary-foreground",
1819
"aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none"
1920
],
2021
data: {

app/components/ruby_ui/combobox/combobox_search_input.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def default_attrs
2525
spellcheck: "false",
2626
placeholder: @placeholder,
2727
class: [
28-
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none border-none",
28+
"flex h-9 w-full rounded-md bg-transparent py-3 text-sm outline-none border-none",
2929
"focus:ring-0",
3030
"placeholder:text-muted-foreground",
3131
"disabled:cursor-not-allowed disabled:opacity-50",

app/components/ruby_ui/combobox/combobox_trigger.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def default_attrs
2222
{
2323
type: "button",
2424
class: [
25-
"flex h-full w-full items-center whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors border border-input bg-background h-10 px-4 py-2 justify-between",
25+
"flex h-full w-full items-center whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors border border-input bg-background h-9 px-4 py-2 justify-between",
2626
"hover:bg-accent hover:text-accent-foreground",
2727
"disabled:pointer-events-none disabled:opacity-50",
2828
"aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed",

app/components/ruby_ui/dialog/dialog_content.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def default_attrs
3434
{
3535
data_state: "open",
3636
class: [
37-
"fixed flex flex-col pointer-events-auto left-[50%] top-[50%] z-50 w-full max-h-screen overflow-y-auto translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
37+
"fixed flex flex-col pointer-events-auto left-[50%] top-[50%] z-50 w-full max-h-screen overflow-y-auto translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:rounded-lg md:w-full",
3838
SIZES[@size]
3939
]
4040
}
@@ -70,8 +70,7 @@ def backdrop
7070
div(
7171
data_state: "open",
7272
data_action: "click->ruby-ui--dialog#dismiss esc->ruby-ui--dialog#dismiss",
73-
class:
74-
"fixed pointer-events-auto inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
73+
class: "fixed pointer-events-auto inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=open]:fade-in-0"
7574
)
7675
end
7776
end

0 commit comments

Comments
 (0)