railsui 3.2.1 → 3.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fba6b07508a1cffe5dd6b1c3ffdceb32ed09fce84a4ca05e778e2ddd32149a52
4
- data.tar.gz: b698b7b97d228203c6ff2856419b677cfa81d29eb37c1e7a02f4e93251fdea27
3
+ metadata.gz: 65c8f8fddc779bebbaf3f7b9a5dc11ace2c285964c8306d18c6c60e7696fb400
4
+ data.tar.gz: f98fb4101382bf441cab02f2755802aca10b03809d4ec69ebb1710188285d256
5
5
  SHA512:
6
- metadata.gz: 89633c00f0e119d9f4d2defe51275b05a02846a1a6cc3f443c773f3b5e55ff80772a11cc313b8e6e4b110ba88b7ba9fe6a6be465fb76f2472f887bf0bbc6259a
7
- data.tar.gz: a6b2cc057d03db6d72a278e80c7a1c0d99753ddbc9ae7778f7aeb77e3d96f9fcf6a9e5103f709bc10ee9228a3fca8b241fd36dc61178e50bf802c246fbde0908
6
+ metadata.gz: 6bbcb99405b65d34131567531fc8e6508fa91a11c5c2cd6f987fc7e9c3cab3d9e732d9a4cefceb6dd18734617a029d3cd34210f1c000a7240704066f2e3c8a19
7
+ data.tar.gz: cbfb85ad4795f7b4666c1113524f3def71fac6ec4c173f693da681cf863d8a6a12de99428a838fd33f2c284586c2f3a1b02a32cc56cdaf74f3d9a4141eac1694
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- railsui (3.2.1)
4
+ railsui (3.2.3)
5
5
  meta-tags
6
6
  psych
7
7
  rails (>= 7.0)
@@ -23,88 +23,45 @@
23
23
 
24
24
  <% content_for :example, flush: true do %>
25
25
  <% content_for :html, flush: true do %>
26
- <nav aria-label="Page navgiation" class="text-neutral-500 sm:text-sm text-base font-medium dark:text-neutral-300">
27
- <ul class="flex flex-wrap items-center sm:justify-between justify-center">
28
- <li class="flex-1 flex justify-start items-center sm:w-auto w-full">
29
- <a href="#" class="flex justify-center items-center space-x-2 py-2 px-4 rounded hover:bg-neutral-50/50 group hover:text-primary-600 sm:w-auto w-full sm:bg-transparent bg-neutral-50 sm:mb-0 mb-3 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200">
30
- <%%= icon "arrow-small-left", class: "w-4 h-4 text-neutral-400 group-hover:text-primary-500 dark:group-hover:text-neutral-200" %>
31
- <span>Previous</span>
32
- </a>
33
- </li>
34
- <div class="flex items-center justify-center sm:w-auto w-full sm:text-sm text-lg">
35
- <li>
36
- <a href="#" class="py-2 px-4 block border-t-2 border-transparent rounded hover:bg-neutral-50/50 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200">1</a>
37
- </li>
38
- <li>
39
- <a href="#" class="py-2 px-4 border-t-2 block border-primary-500 hover:bg-primary-50/50 text-primary-600 dark:text-primary-400 dark:border-primary-400 dark:hover:bg-primary-500/30">2</a>
40
- </li>
41
- <li>
42
- <a href="#" class="py-2 px-4 block border-t-2 border-transparent rounded hover:bg-neutral-50/50 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200">3</a>
43
- </li>
44
- <li>
45
- <span href="#" class="py-2 px-4 block border-t-2 border-transparent rounded pointer-events-none select-none">&hellip;</span>
46
- </li>
47
- <li>
48
- <a href="#" class="py-2 px-4 block border-t-2 border-transparent rounded hover:bg-neutral-50/50 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200">8</a>
49
- </li>
50
- <li>
51
- <a href="#" class="py-2 px-4 block border-t-2 border-transparent rounded hover:bg-neutral-50/50 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200">9</a>
52
- </li>
53
- <li>
54
- <a href="#" class="py-2 px-4 block border-t-2 border-transparent rounded hover:bg-neutral-50/50 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200">10</a>
55
- </li>
56
-
57
- </div>
58
- <li class="flex-1 flex justify-end items-center">
59
- <a href="#" class="flex justify-center items-center space-x-2 py-2 px-4 rounded hover:bg-neutral-50/50 group hover:text-primary-600 sm:w-auto w-full sm:bg-transparent bg-neutral-50 sm:mt-0 mt-3 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200">
60
- <span>Next</span>
61
- <%%= icon "arrow-small-right", class: "w-4 h-4 text-neutral-400 group-hover:text-primary-500 dark:group-hover:text-neutral-200" %>
62
- </a>
63
- </li>
64
- </ul>
65
- </nav>
26
+ <div class="flex justify-center mt-16">
27
+ <nav class="flex gap-2 items-center" aria-label="Pagination">
28
+ <a href="#" class="btn btn-white size-10">
29
+ <span class="sr-only">Previous</span>
30
+ <%%= icon "chevron-left", class: "size-5" %>
31
+ </a>
32
+ <a href="#" class="btn btn-primary dark:bg-black dark:shadow-sm size-10">1</a>
33
+ <a href="#" class="btn btn-white size-10">2</a>
34
+ <a href="#" class="btn btn-white size-10">3</a>
35
+ <span class="btn btn-white size-10 pointer-events-none cursor-none">...</span>
36
+ <a href="#" class="btn btn-white size-10">8</a>
37
+ <a href="#" class="btn btn-white size-10">
38
+ <span class="sr-only">Next</span>
39
+ <%%= icon "chevron-right", class: "size-5" %>
40
+ </a>
41
+ </nav>
42
+ </div>
66
43
  <% end %>
67
44
 
68
45
  <% content_for :erb, flush: true do %>
69
- <nav aria-label="Page navgiation" class="text-neutral-500 sm:text-sm text-base font-medium dark:text-neutral-300">
70
- <ul class="flex flex-wrap items-center sm:justify-between justify-center">
71
- <li class="flex-1 flex justify-start items-center sm:w-auto w-full">
72
- <%%= link_to "#", class: "flex justify-center items-center space-x-2 py-2 px-4 rounded hover:bg-neutral-50/50 group hover:text-primary-600 sm:w-auto w-full sm:bg-transparent bg-neutral-50 sm:mb-0 mb-3 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200" %>
73
- <%%= icon "arrow-small-left", class: "w-4 h-4 text-neutral-400 group-hover:text-primary-500 dark:group-hover:text-neutral-200" %>
74
- <span>Previous</span>
75
- <%% end %>
76
- </li>
77
- <div class="flex items-center justify-center sm:w-auto w-full sm:text-sm text-lg">
78
- <li>
79
- <%%= link_to "1", "#", class:"py-2 px-4 block border-t-2 border-transparent rounded hover:bg-neutral-50/50 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200" %>
80
- </li>
81
- <li>
82
- <%%= link_to "2", "#", class:"py-2 px-4 border-t-2 block border-primary-500 hover:bg-primary-50/50 text-primary-600 dark:text-primary-400 dark:border-primary-400 dark:hover:bg-primary-500/30" %>
83
- </li>
84
- <li>
85
- <%%= link_to "3", "#", class:"py-2 px-4 block border-t-2 border-transparent rounded hover:bg-neutral-50/50 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200" %>
86
- </li>
87
- <li>
88
- <span href="#" class="py-2 px-4 block border-t-2 border-transparent rounded pointer-events-none select-none">&hellip;</span>
89
- </li>
90
- <li>
91
- <%%= link_to "8", "#", class:"py-2 px-4 block border-t-2 border-transparent rounded hover:bg-neutral-50/50 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200" %>
92
- </li>
93
- <li>
94
- <%%= link_to "9", "#", class:"py-2 px-4 block border-t-2 border-transparent rounded hover:bg-neutral-50/50 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200" %>
95
- </li>
96
- <li>
97
- <%%= link_to "10", "#", class:"py-2 px-4 block border-t-2 border-transparent rounded hover:bg-neutral-50/50 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200" %>
98
- </li>
99
- </div>
100
- <li class="flex-1 flex justify-end items-center">
101
- <%%= link_to "#", class: "flex justify-center items-center space-x-2 py-2 px-4 rounded hover:bg-neutral-50/50 group hover:text-primary-600 sm:w-auto w-full sm:bg-transparent bg-neutral-50 sm:mt-0 mt-3 dark:hover:bg-neutral-500/30 dark:hover:text-neutral-200" do %>
102
- <span>Next</span>
103
- <%%= icon "arrow-small-right", class: "w-4 h-4 text-neutral-400 group-hover:text-primary-500 dark:group-hover:text-neutral-200" %>
104
- <%% end %>
105
- </li>
106
- </ul>
107
- </nav>
46
+ <div class="flex justify-center mt-16">
47
+ <nav class="flex gap-2 items-center" aria-label="Pagination">
48
+ <%%= link_to "#", class: "btn btn-white size-10" do %>
49
+ <span class="sr-only">Previous</span>
50
+ <%%= icon "chevron-left", class: "size-5" %>
51
+ <%% end %>
52
+
53
+ <%%= link_to "1", "#", class: "btn btn-primary dark:bg-black dark:shadow-sm size-10" %>
54
+ <%%= link_to "2", "#", class: "btn btn-white size-10" %>
55
+ <%%= link_to "3", "#", class: "btn btn-white size-10" %>
56
+ <span class="btn btn-white size-10 pointer-events-none cursor-none">...</span>
57
+ <%%= link_to "8", "#", class: "btn btn-white size-10" %>
58
+
59
+ <%%= link_to "9", "#", class: "btn btn-white size-10" %>
60
+ <span class="sr-only">Next</span>
61
+ <%%= icon "chevron-right", class: "size-5" %>
62
+ <%% end %>
63
+ </nav>
64
+ </div>
108
65
  <% end %>
109
66
 
110
67
 
@@ -29,8 +29,15 @@
29
29
  <!-- Rails UI Form Builder with builder parameter -->
30
30
  <%%= form_with model: @user, builder: Railsui::FormBuilder do |f| %>
31
31
  <%%= f.text_field :name, label: "Full Name", placeholder: "John Doe" %>
32
- <%%= f.email_field :email, label: "Email Address", placeholder: "john@example.com", help: "We'll never share your email with anyone else." %>
33
- <%%= f.text_area :bio, label: "Biography", placeholder: "Tell us about yourself...", rows: 4 %>
32
+
33
+ <%%= f.form_group do %>
34
+ <%%= f.email_field :email, label: "Email Address", placeholder: "john@example.com", help: "We'll never share your email with anyone else." %>
35
+ <%% end %>
36
+
37
+ <%%= f.form_group do %>
38
+ <%%= f.text_area :bio, label: "Biography", placeholder: "Tell us about yourself...", rows: 4 %>
39
+ <%% end %>
40
+
34
41
  <%%= f.submit "Save Profile" %>
35
42
  <%% end %>
36
43
  <% end %>
@@ -112,21 +119,52 @@
112
119
  <%%= form_with model: @model, builder: Railsui::FormBuilder do |f| %>
113
120
  <!-- Text inputs -->
114
121
  <%%= f.text_field :text, label: "Text Field" %>
115
- <%%= f.email_field :email, label: "Email Field", placeholder: "john.doe@example.com" %>
116
- <%%= f.password_field :password, label: "Password Field" %>
117
- <%%= f.number_field :number, label: "Number Field", min: 0, max: 100 %>
118
- <%%= f.telephone_field :phone, label: "Phone Number" %>
119
- <%%= f.url_field :website, label: "Website URL" %>
122
+
123
+ <%%= f.form_group do %>
124
+ <%%= f.email_field :email, label: "Email Field", placeholder: "john.doe@example.com" %>
125
+ <%% end %>
126
+
127
+ <%%= f.form_group do %>
128
+ <%%= f.password_field :password, label: "Password Field" %>
129
+ <%% end %>
130
+
131
+ <%%= f.form_group do %>
132
+ <%%= f.number_field :number, label: "Number Field", min: 0, max: 100 %>
133
+ <%% end %>
134
+
135
+ <%%= f.form_group do %>
136
+ <%%= f.telephone_field :phone, label: "Phone Number" %>
137
+ <%% end %>
138
+
139
+ <%%= f.form_group do %>
140
+ <%%= f.url_field :website, label: "Website URL" %>
141
+ <%% end %>
120
142
 
121
143
  <!-- Date/Time inputs -->
122
- <%%= f.date_field :date, label: "Date" %>
123
- <%%= f.time_field :time, label: "Time" %>
144
+ <%%= f.form_group do %>
145
+ <%%= f.date_field :date, label: "Date" %>
146
+ <%% end %>
147
+
148
+ <%%= f.form_group do %>
149
+ <%%= f.time_field :time, label: "Time" %>
150
+ <%% end %>
124
151
 
125
152
  <!-- Special inputs -->
126
- <%%= f.color_field :color, label: "Color Picker" %>
127
- <%%= f.search_field :search, label: "Search", placeholder: "Search..." %>
128
- <%%= f.file_field :file, label: "File Upload" %>
129
- <%%= f.range_field :volume, label: "Volume", min: 0, max: 100, value: 25 %>
153
+ <%%= f.form_group do %>
154
+ <%%= f.color_field :color, label: "Color Picker" %>
155
+ <%% end %>
156
+
157
+ <%%= f.form_group do %>
158
+ <%%= f.search_field :search, label: "Search", placeholder: "Search..." %>
159
+ <%% end %>
160
+
161
+ <%%= f.form_group do %>
162
+ <%%= f.file_field :file, label: "File Upload" %>
163
+ <%% end %>
164
+
165
+ <%%= f.form_group do %>
166
+ <%%= f.range_field :volume, label: "Volume", min: 0, max: 100, value: 25 %>
167
+ <%% end %>
130
168
  <%% end %>
131
169
  <% end %>
132
170
  <%= render_snippet active_tab: :erb %>
@@ -167,11 +205,13 @@
167
205
  { prompt: "Choose a country" },
168
206
  { label: "Country" } %>
169
207
 
170
- <%%= f.text_area :message,
171
- label: "Message",
172
- placeholder: "Enter your message here...",
173
- rows: 5,
174
- help: "Maximum 500 characters" %>
208
+ <%%= f.form_group do %>
209
+ <%%= f.text_area :message,
210
+ label: "Message",
211
+ placeholder: "Enter your message here...",
212
+ rows: 5,
213
+ help: "Maximum 500 characters" %>
214
+ <%% end %>
175
215
  <%% end %>
176
216
  <% end %>
177
217
  <%= render_snippet active_tab: :erb %>
@@ -306,7 +346,10 @@
306
346
  <%%= form_with model: @model, builder: Railsui::FormBuilder do |f| %>
307
347
  <!-- Switch toggles -->
308
348
  <%%= f.switch_field :dark_mode, label: "Enable dark mode" %>
309
- <%%= f.switch_field :auto_save, label: "Auto-save drafts" %>
349
+
350
+ <%%= f.form_group do %>
351
+ <%%= f.switch_field :auto_save, label: "Auto-save drafts" %>
352
+ <%% end %>
310
353
  <%% end %>
311
354
  <% end %>
312
355
  <%= render_snippet active_tab: :erb %>
@@ -342,7 +385,11 @@
342
385
  <!-- The form builder automatically handles error states -->
343
386
  <%%= form_with model: @user, builder: Railsui::FormBuilder do |f| %>
344
387
  <%%= f.text_field :name, label: "Full Name" %>
345
- <%%= f.email_field :email, label: "Email Address" %>
388
+
389
+ <%%= f.form_group do %>
390
+ <%%= f.email_field :email, label: "Email Address" %>
391
+ <%% end %>
392
+
346
393
  <%%= f.submit "Submit" %>
347
394
  <%% end %>
348
395
 
@@ -448,18 +495,22 @@
448
495
  wrapper: { class: "max-w-md" } %>
449
496
 
450
497
  <!-- Skip label (i.e. don't display labels) -->
451
- <%%= f.email_field :email,
452
- label: false,
453
- placeholder: "Enter your email",
454
- help: "Skip displaying label",
455
- skip_label: true %>
498
+ <%%= f.form_group do %>
499
+ <%%= f.email_field :email,
500
+ label: false,
501
+ placeholder: "Enter your email",
502
+ help: "Skip displaying label",
503
+ skip_label: true %>
504
+ <%% end %>
456
505
 
457
506
  <!-- Custom label options and input class -->
458
- <%%= f.text_field :website,
459
- label: "Website",
460
- placeholder: "https://",
461
- label_options: { class: "form-label font-medium text-sm text-blue-600" },
462
- class: "form-input text-lg" %>
507
+ <%%= f.form_group do %>
508
+ <%%= f.text_field :website,
509
+ label: "Website",
510
+ placeholder: "https://",
511
+ label_options: { class: "form-label font-medium text-sm text-blue-600" },
512
+ class: "form-input text-lg" %>
513
+ <%% end %>
463
514
  <%% end %>
464
515
  <% end %>
465
516
  <%= render_snippet active_tab: :erb %>
@@ -29,8 +29,15 @@
29
29
  <!-- Rails UI Form Builder with builder parameter -->
30
30
  <%%= form_with model: @user, builder: Railsui::FormBuilder do |f| %>
31
31
  <%%= f.text_field :name, label: "Full Name", placeholder: "John Doe" %>
32
- <%%= f.email_field :email, label: "Email Address", placeholder: "john@example.com", help: "We'll never share your email with anyone else." %>
33
- <%%= f.text_area :bio, label: "Biography", placeholder: "Tell us about yourself...", rows: 4 %>
32
+
33
+ <%%= f.form_group do %>
34
+ <%%= f.email_field :email, label: "Email Address", placeholder: "john@example.com", help: "We'll never share your email with anyone else." %>
35
+ <%% end %>
36
+
37
+ <%%= f.form_group do %>
38
+ <%%= f.text_area :bio, label: "Biography", placeholder: "Tell us about yourself...", rows: 4 %>
39
+ <%% end %>
40
+
34
41
  <%%= f.submit "Save Profile" %>
35
42
  <%% end %>
36
43
  <% end %>
@@ -112,21 +119,52 @@
112
119
  <%%= form_with model: @model, builder: Railsui::FormBuilder do |f| %>
113
120
  <!-- Text inputs -->
114
121
  <%%= f.text_field :text, label: "Text Field" %>
115
- <%%= f.email_field :email, label: "Email Field", placeholder: "john.doe@example.com" %>
116
- <%%= f.password_field :password, label: "Password Field" %>
117
- <%%= f.number_field :number, label: "Number Field", min: 0, max: 100 %>
118
- <%%= f.telephone_field :phone, label: "Phone Number" %>
119
- <%%= f.url_field :website, label: "Website URL" %>
122
+
123
+ <%%= f.form_group do %>
124
+ <%%= f.email_field :email, label: "Email Field", placeholder: "john.doe@example.com" %>
125
+ <%% end %>
126
+
127
+ <%%= f.form_group do %>
128
+ <%%= f.password_field :password, label: "Password Field" %>
129
+ <%% end %>
130
+
131
+ <%%= f.form_group do %>
132
+ <%%= f.number_field :number, label: "Number Field", min: 0, max: 100 %>
133
+ <%% end %>
134
+
135
+ <%%= f.form_group do %>
136
+ <%%= f.telephone_field :phone, label: "Phone Number" %>
137
+ <%% end %>
138
+
139
+ <%%= f.form_group do %>
140
+ <%%= f.url_field :website, label: "Website URL" %>
141
+ <%% end %>
120
142
 
121
143
  <!-- Date/Time inputs -->
122
- <%%= f.date_field :date, label: "Date" %>
123
- <%%= f.time_field :time, label: "Time" %>
144
+ <%%= f.form_group do %>
145
+ <%%= f.date_field :date, label: "Date" %>
146
+ <%% end %>
147
+
148
+ <%%= f.form_group do %>
149
+ <%%= f.time_field :time, label: "Time" %>
150
+ <%% end %>
124
151
 
125
152
  <!-- Special inputs -->
126
- <%%= f.color_field :color, label: "Color Picker" %>
127
- <%%= f.search_field :search, label: "Search", placeholder: "Search..." %>
128
- <%%= f.file_field :file, label: "File Upload" %>
129
- <%%= f.range_field :volume, label: "Volume", min: 0, max: 100, value: 25 %>
153
+ <%%= f.form_group do %>
154
+ <%%= f.color_field :color, label: "Color Picker" %>
155
+ <%% end %>
156
+
157
+ <%%= f.form_group do %>
158
+ <%%= f.search_field :search, label: "Search", placeholder: "Search..." %>
159
+ <%% end %>
160
+
161
+ <%%= f.form_group do %>
162
+ <%%= f.file_field :file, label: "File Upload" %>
163
+ <%% end %>
164
+
165
+ <%%= f.form_group do %>
166
+ <%%= f.range_field :volume, label: "Volume", min: 0, max: 100, value: 25 %>
167
+ <%% end %>
130
168
  <%% end %>
131
169
  <% end %>
132
170
  <%= render_snippet active_tab: :erb %>
@@ -167,11 +205,13 @@
167
205
  { prompt: "Choose a country" },
168
206
  { label: "Country" } %>
169
207
 
170
- <%%= f.text_area :message,
171
- label: "Message",
172
- placeholder: "Enter your message here...",
173
- rows: 5,
174
- help: "Maximum 500 characters" %>
208
+ <%%= f.form_group do %>
209
+ <%%= f.text_area :message,
210
+ label: "Message",
211
+ placeholder: "Enter your message here...",
212
+ rows: 5,
213
+ help: "Maximum 500 characters" %>
214
+ <%% end %>
175
215
  <%% end %>
176
216
  <% end %>
177
217
  <%= render_snippet active_tab: :erb %>
@@ -306,7 +346,10 @@
306
346
  <%%= form_with model: @model, builder: Railsui::FormBuilder do |f| %>
307
347
  <!-- Switch toggles -->
308
348
  <%%= f.switch_field :dark_mode, label: "Enable dark mode" %>
309
- <%%= f.switch_field :auto_save, label: "Auto-save drafts" %>
349
+
350
+ <%%= f.form_group do %>
351
+ <%%= f.switch_field :auto_save, label: "Auto-save drafts" %>
352
+ <%% end %>
310
353
  <%% end %>
311
354
  <% end %>
312
355
  <%= render_snippet active_tab: :erb %>
@@ -342,7 +385,11 @@
342
385
  <!-- The form builder automatically handles error states -->
343
386
  <%%= form_with model: @user, builder: Railsui::FormBuilder do |f| %>
344
387
  <%%= f.text_field :name, label: "Full Name" %>
345
- <%%= f.email_field :email, label: "Email Address" %>
388
+
389
+ <%%= f.form_group do %>
390
+ <%%= f.email_field :email, label: "Email Address" %>
391
+ <%% end %>
392
+
346
393
  <%%= f.submit "Submit" %>
347
394
  <%% end %>
348
395
 
@@ -448,18 +495,22 @@
448
495
  wrapper: { class: "max-w-md" } %>
449
496
 
450
497
  <!-- Skip label (i.e. don't display labels) -->
451
- <%%= f.email_field :email,
452
- label: false,
453
- placeholder: "Enter your email",
454
- help: "Skip displaying label",
455
- skip_label: true %>
498
+ <%%= f.form_group do %>
499
+ <%%= f.email_field :email,
500
+ label: false,
501
+ placeholder: "Enter your email",
502
+ help: "Skip displaying label",
503
+ skip_label: true %>
504
+ <%% end %>
456
505
 
457
506
  <!-- Custom label options and input class -->
458
- <%%= f.text_field :website,
459
- label: "Website",
460
- placeholder: "https://",
461
- label_options: { class: "form-label font-medium text-sm text-blue-600" },
462
- class: "form-input text-lg" %>
507
+ <%%= f.form_group do %>
508
+ <%%= f.text_field :website,
509
+ label: "Website",
510
+ placeholder: "https://",
511
+ label_options: { class: "form-label font-medium text-sm text-blue-600" },
512
+ class: "form-input text-lg" %>
513
+ <%% end %>
463
514
  <%% end %>
464
515
  <% end %>
465
516
  <%= render_snippet active_tab: :erb %>
@@ -29,8 +29,15 @@
29
29
  <!-- Rails UI Form Builder with builder parameter -->
30
30
  <%%= form_with model: @user, builder: Railsui::FormBuilder do |f| %>
31
31
  <%%= f.text_field :name, label: "Full Name", placeholder: "John Doe" %>
32
- <%%= f.email_field :email, label: "Email Address", placeholder: "john@example.com", help: "We'll never share your email with anyone else." %>
33
- <%%= f.text_area :bio, label: "Biography", placeholder: "Tell us about yourself...", rows: 4 %>
32
+
33
+ <%%= f.form_group do %>
34
+ <%%= f.email_field :email, label: "Email Address", placeholder: "john@example.com", help: "We'll never share your email with anyone else." %>
35
+ <%% end %>
36
+
37
+ <%%= f.form_group do %>
38
+ <%%= f.text_area :bio, label: "Biography", placeholder: "Tell us about yourself...", rows: 4 %>
39
+ <%% end %>
40
+
34
41
  <%%= f.submit "Save Profile" %>
35
42
  <%% end %>
36
43
  <% end %>
@@ -112,21 +119,52 @@
112
119
  <%%= form_with model: @model, builder: Railsui::FormBuilder do |f| %>
113
120
  <!-- Text inputs -->
114
121
  <%%= f.text_field :text, label: "Text Field" %>
115
- <%%= f.email_field :email, label: "Email Field", placeholder: "john.doe@example.com" %>
116
- <%%= f.password_field :password, label: "Password Field" %>
117
- <%%= f.number_field :number, label: "Number Field", min: 0, max: 100 %>
118
- <%%= f.telephone_field :phone, label: "Phone Number" %>
119
- <%%= f.url_field :website, label: "Website URL" %>
122
+
123
+ <%%= f.form_group do %>
124
+ <%%= f.email_field :email, label: "Email Field", placeholder: "john.doe@example.com" %>
125
+ <%% end %>
126
+
127
+ <%%= f.form_group do %>
128
+ <%%= f.password_field :password, label: "Password Field" %>
129
+ <%% end %>
130
+
131
+ <%%= f.form_group do %>
132
+ <%%= f.number_field :number, label: "Number Field", min: 0, max: 100 %>
133
+ <%% end %>
134
+
135
+ <%%= f.form_group do %>
136
+ <%%= f.telephone_field :phone, label: "Phone Number" %>
137
+ <%% end %>
138
+
139
+ <%%= f.form_group do %>
140
+ <%%= f.url_field :website, label: "Website URL" %>
141
+ <%% end %>
120
142
 
121
143
  <!-- Date/Time inputs -->
122
- <%%= f.date_field :date, label: "Date" %>
123
- <%%= f.time_field :time, label: "Time" %>
144
+ <%%= f.form_group do %>
145
+ <%%= f.date_field :date, label: "Date" %>
146
+ <%% end %>
147
+
148
+ <%%= f.form_group do %>
149
+ <%%= f.time_field :time, label: "Time" %>
150
+ <%% end %>
124
151
 
125
152
  <!-- Special inputs -->
126
- <%%= f.color_field :color, label: "Color Picker" %>
127
- <%%= f.search_field :search, label: "Search", placeholder: "Search..." %>
128
- <%%= f.file_field :file, label: "File Upload" %>
129
- <%%= f.range_field :volume, label: "Volume", min: 0, max: 100, value: 25 %>
153
+ <%%= f.form_group do %>
154
+ <%%= f.color_field :color, label: "Color Picker" %>
155
+ <%% end %>
156
+
157
+ <%%= f.form_group do %>
158
+ <%%= f.search_field :search, label: "Search", placeholder: "Search..." %>
159
+ <%% end %>
160
+
161
+ <%%= f.form_group do %>
162
+ <%%= f.file_field :file, label: "File Upload" %>
163
+ <%% end %>
164
+
165
+ <%%= f.form_group do %>
166
+ <%%= f.range_field :volume, label: "Volume", min: 0, max: 100, value: 25 %>
167
+ <%% end %>
130
168
  <%% end %>
131
169
  <% end %>
132
170
  <%= render_snippet active_tab: :erb %>
@@ -167,11 +205,13 @@
167
205
  { prompt: "Choose a country" },
168
206
  { label: "Country" } %>
169
207
 
170
- <%%= f.text_area :message,
171
- label: "Message",
172
- placeholder: "Enter your message here...",
173
- rows: 5,
174
- help: "Maximum 500 characters" %>
208
+ <%%= f.form_group do %>
209
+ <%%= f.text_area :message,
210
+ label: "Message",
211
+ placeholder: "Enter your message here...",
212
+ rows: 5,
213
+ help: "Maximum 500 characters" %>
214
+ <%% end %>
175
215
  <%% end %>
176
216
  <% end %>
177
217
  <%= render_snippet active_tab: :erb %>
@@ -306,7 +346,10 @@
306
346
  <%%= form_with model: @model, builder: Railsui::FormBuilder do |f| %>
307
347
  <!-- Switch toggles -->
308
348
  <%%= f.switch_field :dark_mode, label: "Enable dark mode" %>
309
- <%%= f.switch_field :auto_save, label: "Auto-save drafts" %>
349
+
350
+ <%%= f.form_group do %>
351
+ <%%= f.switch_field :auto_save, label: "Auto-save drafts" %>
352
+ <%% end %>
310
353
  <%% end %>
311
354
  <% end %>
312
355
  <%= render_snippet active_tab: :erb %>
@@ -342,7 +385,11 @@
342
385
  <!-- The form builder automatically handles error states -->
343
386
  <%%= form_with model: @user, builder: Railsui::FormBuilder do |f| %>
344
387
  <%%= f.text_field :name, label: "Full Name" %>
345
- <%%= f.email_field :email, label: "Email Address" %>
388
+
389
+ <%%= f.form_group do %>
390
+ <%%= f.email_field :email, label: "Email Address" %>
391
+ <%% end %>
392
+
346
393
  <%%= f.submit "Submit" %>
347
394
  <%% end %>
348
395
 
@@ -448,18 +495,22 @@
448
495
  wrapper: { class: "max-w-md" } %>
449
496
 
450
497
  <!-- Skip label (i.e. don't display labels) -->
451
- <%%= f.email_field :email,
452
- label: false,
453
- placeholder: "Enter your email",
454
- help: "Skip displaying label",
455
- skip_label: true %>
498
+ <%%= f.form_group do %>
499
+ <%%= f.email_field :email,
500
+ label: false,
501
+ placeholder: "Enter your email",
502
+ help: "Skip displaying label",
503
+ skip_label: true %>
504
+ <%% end %>
456
505
 
457
506
  <!-- Custom label options and input class -->
458
- <%%= f.text_field :website,
459
- label: "Website",
460
- placeholder: "https://",
461
- label_options: { class: "form-label font-medium text-sm text-blue-600" },
462
- class: "form-input text-lg" %>
507
+ <%%= f.form_group do %>
508
+ <%%= f.text_field :website,
509
+ label: "Website",
510
+ placeholder: "https://",
511
+ label_options: { class: "form-label font-medium text-sm text-blue-600" },
512
+ class: "form-input text-lg" %>
513
+ <%% end %>
463
514
  <%% end %>
464
515
  <% end %>
465
516
  <%= render_snippet active_tab: :erb %>
@@ -1,3 +1,3 @@
1
1
  module Railsui
2
- VERSION = "3.2.1"
2
+ VERSION = "3.2.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railsui
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Leverenz
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-08-19 00:00:00.000000000 Z
10
+ date: 2025-08-23 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails