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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/views/railsui/themes/corgie/components/pagination/_simple.html.erb +36 -79
- data/app/views/railsui/themes/corgie/forms/_form_builder.html.erb +81 -30
- data/app/views/railsui/themes/hound/forms/_form_builder.html.erb +81 -30
- data/app/views/railsui/themes/shepherd/forms/_form_builder.html.erb +81 -30
- data/lib/railsui/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65c8f8fddc779bebbaf3f7b9a5dc11ace2c285964c8306d18c6c60e7696fb400
|
4
|
+
data.tar.gz: f98fb4101382bf441cab02f2755802aca10b03809d4ec69ebb1710188285d256
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bbcb99405b65d34131567531fc8e6508fa91a11c5c2cd6f987fc7e9c3cab3d9e732d9a4cefceb6dd18734617a029d3cd34210f1c000a7240704066f2e3c8a19
|
7
|
+
data.tar.gz: cbfb85ad4795f7b4666c1113524f3def71fac6ec4c173f693da681cf863d8a6a12de99428a838fd33f2c284586c2f3a1b02a32cc56cdaf74f3d9a4141eac1694
|
data/Gemfile.lock
CHANGED
@@ -23,88 +23,45 @@
|
|
23
23
|
|
24
24
|
<% content_for :example, flush: true do %>
|
25
25
|
<% content_for :html, flush: true do %>
|
26
|
-
<
|
27
|
-
<
|
28
|
-
<
|
29
|
-
<
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
</
|
34
|
-
<
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
<
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
</li>
|
44
|
-
<li>
|
45
|
-
<span href="#" class="py-2 px-4 block border-t-2 border-transparent rounded pointer-events-none select-none">…</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
|
-
<
|
70
|
-
<
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
</
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
<span href="#" class="py-2 px-4 block border-t-2 border-transparent rounded pointer-events-none select-none">…</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
|
-
|
33
|
-
<%%= f.
|
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
|
-
|
116
|
-
<%%= f.
|
117
|
-
|
118
|
-
|
119
|
-
|
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.
|
123
|
-
|
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.
|
127
|
-
|
128
|
-
|
129
|
-
|
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.
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
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
|
-
|
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
|
-
|
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.
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
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.
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
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
|
-
|
33
|
-
<%%= f.
|
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
|
-
|
116
|
-
<%%= f.
|
117
|
-
|
118
|
-
|
119
|
-
|
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.
|
123
|
-
|
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.
|
127
|
-
|
128
|
-
|
129
|
-
|
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.
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
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
|
-
|
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
|
-
|
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.
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
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.
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
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
|
-
|
33
|
-
<%%= f.
|
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
|
-
|
116
|
-
<%%= f.
|
117
|
-
|
118
|
-
|
119
|
-
|
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.
|
123
|
-
|
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.
|
127
|
-
|
128
|
-
|
129
|
-
|
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.
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
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
|
-
|
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
|
-
|
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.
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
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.
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
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 %>
|
data/lib/railsui/version.rb
CHANGED
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.
|
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-
|
10
|
+
date: 2025-08-23 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rails
|