Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.

Commit 270608f

Browse files
committed
Regenerate ruby_ui components after gem bump
Run `rails g ruby_ui:component:all --force true` to sync generated components with the updated ruby_ui gem (f882429 → 755b288).
1 parent 0417b35 commit 270608f

17 files changed

Lines changed: 297 additions & 8 deletions

app/components/ruby_ui/combobox/combobox_toggle_all_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: "toggleAll",
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# frozen_string_literal: true
2+
3+
module Views
4+
class Base < Phlex::HTML
5+
def Heading(level:, &)
6+
tag = :"h#{level}"
7+
send(tag, &)
8+
end
9+
10+
def component_files(component_name)
11+
[]
12+
end
13+
14+
# Text helper for wrapping paragraphs
15+
def Text(&)
16+
p(&)
17+
end
18+
19+
# InlineLink helper for documentation links
20+
def InlineLink(href:, target: nil, class: nil, &)
21+
a(href: href, target: target, class: binding.local_variable_get(:class), &)
22+
end
23+
24+
# Alert component helpers
25+
def Alert(&)
26+
div(&)
27+
end
28+
29+
def AlertTitle(&)
30+
h4(&)
31+
end
32+
33+
def AlertDescription(&)
34+
p(&)
35+
end
36+
37+
# Route helper stubs - return "#" as placeholder
38+
def docs_sheet_path
39+
"#"
40+
end
41+
42+
def docs_separator_path
43+
"#"
44+
end
45+
46+
def docs_accordion_path
47+
"#"
48+
end
49+
50+
def docs_alert_path
51+
"#"
52+
end
53+
54+
def docs_alert_dialog_path
55+
"#"
56+
end
57+
58+
def docs_aspect_ratio_path
59+
"#"
60+
end
61+
62+
def docs_avatar_path
63+
"#"
64+
end
65+
66+
def docs_badge_path
67+
"#"
68+
end
69+
70+
def docs_installation_path
71+
"#"
72+
end
73+
74+
# InlineCode helper for typography examples
75+
def InlineCode(&)
76+
code(&)
77+
end
78+
end
79+
end
80+
81+
# Module-level components stub
82+
module Components
83+
def self.Heading(level:, &block)
84+
# Stub for module-level Heading calls
85+
end
86+
87+
def self.TypographyList(items:, numbered: false)
88+
# Stub for TypographyList component
89+
end
90+
end
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
3+
module Components
4+
module ComponentSetup
5+
class Tabs < Phlex::HTML
6+
def initialize(component_name:)
7+
@component_name = component_name
8+
end
9+
10+
def view_template
11+
# Minimal stub - empty by default
12+
end
13+
end
14+
end
15+
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# frozen_string_literal: true
2+
3+
module Docs
4+
class ComponentsTable < Phlex::HTML
5+
def initialize(files)
6+
@files = files
7+
end
8+
9+
def view_template
10+
# Minimal stub - empty by default
11+
end
12+
end
13+
end
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# frozen_string_literal: true
2+
3+
module Docs
4+
class Header < Phlex::HTML
5+
def initialize(title:, description: nil)
6+
@title = title
7+
@description = description
8+
end
9+
10+
def view_template
11+
div do
12+
h1 { @title }
13+
p { @description } if @description
14+
end
15+
end
16+
end
17+
end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# frozen_string_literal: true
2+
3+
# Stub constants for sidebar documentation examples
4+
# These are replaced with actual implementations in the web app
5+
6+
module Views
7+
module Docs
8+
class Sidebar < Views::Base
9+
class Example
10+
CODE = <<~RUBY
11+
# Sidebar example code placeholder
12+
RUBY
13+
end
14+
15+
class InsetExample
16+
CODE = <<~RUBY
17+
# Sidebar inset example code placeholder
18+
RUBY
19+
end
20+
end
21+
end
22+
end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# frozen_string_literal: true
2+
3+
module Docs
4+
class VisualCodeExample < Phlex::HTML
5+
def initialize(title:, context:, description: nil, src: nil)
6+
@title = title
7+
@context = context
8+
@description = description
9+
@src = src
10+
end
11+
12+
def view_template(&block)
13+
code = block.call
14+
div do
15+
h3 { @title }
16+
p { @description } if @description
17+
pre { code }
18+
@context.instance_eval(code)
19+
end
20+
end
21+
end
22+
end

app/components/ruby_ui/form/form_field.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def default_attrs
1313
data: {
1414
controller: "ruby-ui--form-field"
1515
},
16-
class: "space-y-2"
16+
class: "flex flex-col gap-2"
1717
}
1818
end
1919
end

app/components/ruby_ui/form/form_field_error.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def default_attrs
1313
data: {
1414
ruby_ui__form_field_target: "error"
1515
},
16-
class: "text-xs font-medium text-destructive"
16+
class: "empty:hidden text-sm font-medium text-destructive"
1717
}
1818
end
1919
end

app/components/ruby_ui/form/form_field_hint.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def view_template(&)
99
private
1010

1111
def default_attrs
12-
{class: "text-sm text-muted-foreground"}
12+
{class: "empty:hidden text-sm text-muted-foreground"}
1313
end
1414
end
1515
end

0 commit comments

Comments
 (0)