railsui 3.2.3 → 3.2.4

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: 65c8f8fddc779bebbaf3f7b9a5dc11ace2c285964c8306d18c6c60e7696fb400
4
- data.tar.gz: f98fb4101382bf441cab02f2755802aca10b03809d4ec69ebb1710188285d256
3
+ metadata.gz: fef7e5e793d92ba7a9f865ef962b1451fdc0a2238f154ef1d1c69b1ca01938ce
4
+ data.tar.gz: 98d0aaeaddb1201575fa08e68b02035e89b79dbef036773e953a89cd97e96e40
5
5
  SHA512:
6
- metadata.gz: 6bbcb99405b65d34131567531fc8e6508fa91a11c5c2cd6f987fc7e9c3cab3d9e732d9a4cefceb6dd18734617a029d3cd34210f1c000a7240704066f2e3c8a19
7
- data.tar.gz: cbfb85ad4795f7b4666c1113524f3def71fac6ec4c173f693da681cf863d8a6a12de99428a838fd33f2c284586c2f3a1b02a32cc56cdaf74f3d9a4141eac1694
6
+ metadata.gz: c59fbc965c98741728b2586b0245178c58a6556be492e18a386ae1713e094fe22704de49d33d423ddb9912cf0797ac9f6087dc8ed49f985a629c4d3c61bebb12
7
+ data.tar.gz: 68aad9674397d34dc41a8a842b8be16d7f255da17246343da872cd020163cf12c9c66fe57ed1a0fcd86fb657f7ecf1f2b261b1f25ee2d36ce93621012f9ca972
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- railsui (3.2.3)
4
+ railsui (3.2.4)
5
5
  meta-tags
6
6
  psych
7
7
  rails (>= 7.0)
@@ -188,6 +188,10 @@
188
188
  </div>
189
189
  <% end %>
190
190
 
191
+ <% content_for :html, flush: true do %>
192
+
193
+ <% end %>
194
+
191
195
  <% content_for :js, flush: true do %>
192
196
  import { RailsuiModal, RailsuiTabs } from 'railsui-stimulus'
193
197
 
@@ -195,7 +199,7 @@ application.register('railsui-modal', RailsuiModal)
195
199
  application.register('railsui-tabls', RailsuiTabs)
196
200
  <% end %>
197
201
 
198
- <%= render_snippet(js_filename: "index.js") %>") %>
202
+ <%= render_snippet(js_filename: "index.js", active_tab: :erb) %>
199
203
  <% end %>
200
204
  <% end %>
201
205
  </div>
@@ -135,6 +135,52 @@ class="hidden rounded-2xl shadow-xl max-w-lg bg-white m-1 p-8 origin-bottom mx-a
135
135
  </div>
136
136
  <% end %>
137
137
 
138
+ <% content_for :erb, flush: true do %>
139
+ <div data-controller="railsui-modal">
140
+ <button type="button" data-action="click->railsui-modal#open" class="btn btn-primary" tabindex="0">
141
+ Open modal with form
142
+ </button>
143
+
144
+ <div aria-labelledby="modal-with-form" aria-modal="true" data-railsui-modal-target="container" data-action="keyup@window->railsui-modal#closeWithEsc" class="hidden fixed inset-0 z-50 overflow-y-auto" role="dialog">
145
+ <div class="h-screen w-full relative flex items-center justify-center">
146
+ <div data-railsui-modal-target="content"
147
+ data-transition-enter-active="transition ease-out duration-300"
148
+ data-transition-enter-from="transform opacity-0 scale-95"
149
+ data-transition-enter-to="transform opacity-100 scale-100"
150
+ data-transition-leave-active="transition ease-in duration-300"
151
+ data-transition-leave-from="transform opacity-100 scale-100"
152
+ data-transition-leave-to="transform opacity-0 scale-95"
153
+ class="hidden rounded-2xl shadow-xl max-w-lg bg-white m-1 p-8 origin-bottom mx-auto dark:bg-neutral-700 dark:text-neutral-200 relative">
154
+ <button type="button" class="absolute top-2 right-2 w-8 h-8 bg-transparent hover:bg-neutral-50 flex items-center justify-center rounded-full group dark:hover:bg-neutral-50/50" data-action="click->railsui-modal#close">
155
+ <%%= icon "x-mark", class: "text-neutral-400 size-6 group-hover:text-neutral-500 pointer-events-none dark:group-hover:text-neutral-800 dark:text-neutral-400" %>
156
+ </button>
157
+
158
+ <h3 id="modal-with-form" class="h3">Subscribe</h3>
159
+
160
+ <div class="prose prose-neutral dark:prose-invert mt-2 mb-6">
161
+ <p>Join our community to get early access to new features, exclusive content, and connect with other developers.</p>
162
+ </div>
163
+
164
+ <%%= form_with model: @subcriber, builder: Railsui::FormBuilder do |f| %>
165
+ <%%= f.form_group do %>
166
+ <%%= f.email_field :email, placeholder: "saasquatch@railsui.com", label: "E-mail" %>
167
+ <%% end %>
168
+
169
+ <%%= f.form_group do %>
170
+ <%%= f.text_area :reason, placeholder: "In a couple sentences let us know your reason for joining the Rails UI community", label: "Reason for joining" %>
171
+ <%% end %>
172
+
173
+ <div class="mt-8 flex justify-start items-center flex-wrap bg-neutral-50 px-8 py-4 -mx-8 -mb-8 border-t border-neutral-300 rounded-b-2xl shadow-inner space-x-4 dark:bg-neutral-700 dark:text-neutral-200 dark:border-neutral-600/70">
174
+ <%%= f.submit "Subscribe" %>
175
+ <%%= link_to "Cancel", "#", class: "btn btn-white", data: { action: "click->railsui-modal#close" } %>
176
+ </div>
177
+ <%% end %>
178
+ </div>
179
+ </div>
180
+ </div>
181
+ </div>
182
+ <% end %>
183
+
138
184
 
139
185
  <% content_for :js, flush: true do %>
140
186
  import { RailsuiModal } from 'railsui-stimulus'
@@ -1,3 +1,3 @@
1
1
  module Railsui
2
- VERSION = "3.2.3"
2
+ VERSION = "3.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railsui
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3
4
+ version: 3.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Leverenz