railsui 3.2.2 → 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: 5f3e094905bb291bf03f380ff57736d2db5128988144d84898d04402800e61f3
4
- data.tar.gz: e849f49ed552a5407c90e968c3399949762c3bc7939754bf9068577b5cd78b39
3
+ metadata.gz: fef7e5e793d92ba7a9f865ef962b1451fdc0a2238f154ef1d1c69b1ca01938ce
4
+ data.tar.gz: 98d0aaeaddb1201575fa08e68b02035e89b79dbef036773e953a89cd97e96e40
5
5
  SHA512:
6
- metadata.gz: cdb3eb138741121b21af7aa048c9b9ecbe54e98f4aa15ebc9d740e1ed82292229804c099af880104c2550c5ef58c565cee3234209483016e8d1ed4e2e3e71b5c
7
- data.tar.gz: b0a8afafe8266ffcb42fbb592a91cd266aa66724f400a40cb66b04c7daa066a3aa76c20a713d489434370f9143d7437d06cc24d23d78db1bf3f0d1bd49825d12
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.2)
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'
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Railsui
2
- VERSION = "3.2.2"
2
+ VERSION = "3.2.4"
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.2
4
+ version: 3.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Leverenz
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-08-20 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