ultimate_turbo_modal 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3b7775a51eebbcb891533ad98c37aa6399017092a1ee4218c74e8d2e552880b
4
- data.tar.gz: 8eb9ede61100f91d1e0f716e0cba3a477d224431b84d70bc36fb6e1d62132bfb
3
+ metadata.gz: 19886fb7dd818b59f8aad64fa2c917783e690d63797761b63dd2ef4422ef119a
4
+ data.tar.gz: a1c5449b028638a5b7d39b2ea7707accf037d402fc1361ffc8d075b28181bde4
5
5
  SHA512:
6
- metadata.gz: ebba9d4ae554dbceed25f2064b58ccb44ccfe5a98f826d57d0c15ae7d491d4b81348b9de8b4191f7eb807358b48b62a376297096c1fece1c9ab56e3331e00a11
7
- data.tar.gz: b1d72d8ceba435dc770e219536a2dfbdd1613809fb4a65f10c25c1fa22829f88ef38b6b7f10442d07f8162dd4fa59aa534d095d21d9a1564f9098609bc71d490
6
+ metadata.gz: 8395f4d9a00f83fffcdb0293a967867b52a00e74ad3716bab49b5923f8c541e9a953246f3196abc434ddccc0daa3c8868caf78c6d915154b978ead3900628bc2
7
+ data.tar.gz: 17f6c1e20e67e8447fc41f3cbe708d4a2899acf9fcdfbd8ea753960c8daeb2789c572acbc9ee107b6524472ac2e78c1cb77d4b3b18cafa7911028c9336b801e4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [1.6.0] - 2023-12-25
2
+
3
+ - Support for Ruby 3.3
4
+
1
5
  ## [1.5.0] - 2023-11-28
2
6
 
3
7
  - Allow whitelisting out-of-modal CSS selectors to not dismiss modal when clicked
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ultimate_turbo_modal (1.5.0)
4
+ ultimate_turbo_modal (1.6.0)
5
5
  phlex-rails (>= 1.0, < 2.0)
6
6
  rails (>= 7)
7
7
  stimulus-rails
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Phlex
4
4
  module DeferredRenderWithMainContent
5
- def template(&)
6
- output = capture(&)
5
+ def template(&block)
6
+ output = capture(&block)
7
7
  super { unsafe_raw(output) }
8
8
  end
9
9
  end
@@ -107,26 +107,26 @@ class UltimateTurboModal::Base < Phlex::HTML
107
107
 
108
108
  ## HTML components
109
109
 
110
- def modal(&)
110
+ def modal(&block)
111
111
  outer_divs do
112
112
  div_content do
113
113
  div_header
114
- div_main(&)
114
+ div_main(&block)
115
115
  div_footer if footer?
116
116
  end
117
117
  end
118
118
  end
119
119
 
120
- def outer_divs(&)
120
+ def outer_divs(&block)
121
121
  div_dialog do
122
122
  div_overlay
123
123
  div_outer do
124
- div_inner(&)
124
+ div_inner(&block)
125
125
  end
126
126
  end
127
127
  end
128
128
 
129
- def div_dialog(&)
129
+ def div_dialog(&block)
130
130
  div(id: "modal-container",
131
131
  class: self.class::DIV_DIALOG_CLASSES,
132
132
  role: "dialog",
@@ -152,30 +152,30 @@ class UltimateTurboModal::Base < Phlex::HTML
152
152
  close_button: close_button?.to_s,
153
153
  header_divider: header_divider?.to_s,
154
154
  footer_divider: footer_divider?.to_s
155
- }, &)
155
+ }, &block)
156
156
  end
157
157
 
158
158
  def div_overlay
159
159
  div(id: "modal-overlay", class: self.class::DIV_OVERLAY_CLASSES)
160
160
  end
161
161
 
162
- def div_outer(&)
163
- div(id: "modal-outer", class: self.class::DIV_OUTER_CLASSES, &)
162
+ def div_outer(&block)
163
+ div(id: "modal-outer", class: self.class::DIV_OUTER_CLASSES, &block)
164
164
  end
165
165
 
166
- def div_inner(&)
167
- div(id: "modal-inner", class: self.class::DIV_INNER_CLASSES, &)
166
+ def div_inner(&block)
167
+ div(id: "modal-inner", class: self.class::DIV_INNER_CLASSES, &block)
168
168
  end
169
169
 
170
- def div_content(&)
171
- div(id: "modal-content", class: self.class::DIV_CONTENT_CLASSES, data: {modal_target: "content"}, &)
170
+ def div_content(&block)
171
+ div(id: "modal-content", class: self.class::DIV_CONTENT_CLASSES, data: {modal_target: "content"}, &block)
172
172
  end
173
173
 
174
- def div_main(&)
175
- div(id: "modal-main", class: self.class::DIV_MAIN_CLASSES, &)
174
+ def div_main(&block)
175
+ div(id: "modal-main", class: self.class::DIV_MAIN_CLASSES, &block)
176
176
  end
177
177
 
178
- def div_header(&)
178
+ def div_header(&block)
179
179
  div(id: "modal-header", class: self.class::DIV_HEADER_CLASSES) do
180
180
  div_title
181
181
  button_close
@@ -207,13 +207,13 @@ class UltimateTurboModal::Base < Phlex::HTML
207
207
  end
208
208
  end
209
209
 
210
- def close_button_tag(&)
210
+ def close_button_tag(&block)
211
211
  button(type: "button",
212
212
  aria: {label: "close"},
213
213
  class: self.class::CLOSE_BUTTON_TAG_CLASSES,
214
214
  data: {
215
215
  action: @close_button_data_action
216
- }, &)
216
+ }, &block)
217
217
  end
218
218
 
219
219
  def icon_close
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UltimateTurboModal
4
- VERSION = "1.5.0"
4
+ VERSION = "1.6.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultimate_turbo_modal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Mercier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-28 00:00:00.000000000 Z
11
+ date: 2023-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phlex-rails