ultimate_turbo_modal 1.6.0 → 1.6.1
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/.tool-versions +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +3 -3
- data/lib/ultimate_turbo_modal/base.rb +7 -3
- data/lib/ultimate_turbo_modal/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5258352e110cc8d743f60743d8c2842daa3e925ec3b9671713c5b28cd25e59a
|
4
|
+
data.tar.gz: 9488206059b94dc6f3613b0725a59a1fba3cfadc8a2414e6ee3cd21f4b978f71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdeb4c4f19c6875ea1d401427d76ac5c46b30ffc96faad82ca683dce05588b0dc720d701cdd49968d9580889a477bdd06de261b1cc25631041221c483192e947
|
7
|
+
data.tar.gz: 02633313f6ba5a54b023ccea29bb73162d067268e0730ea832d54d9a59e519a95c0062dc7603c233ead3f5a4c702d632c0ef3f61d0d4ca5dbe53b2cc8ccf8014
|
data/.tool-versions
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
ruby 3.
|
1
|
+
ruby 3.3.0
|
2
2
|
nodejs 18.9.0
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ultimate_turbo_modal (1.6.
|
4
|
+
ultimate_turbo_modal (1.6.1)
|
5
5
|
phlex-rails (>= 1.0, < 2.0)
|
6
6
|
rails (>= 7)
|
7
7
|
stimulus-rails
|
@@ -130,7 +130,7 @@ GEM
|
|
130
130
|
net-smtp (0.4.0)
|
131
131
|
net-protocol
|
132
132
|
nio4r (2.5.9)
|
133
|
-
nokogiri (1.
|
133
|
+
nokogiri (1.16.0-arm64-darwin)
|
134
134
|
racc (~> 1.4)
|
135
135
|
parallel (1.23.0)
|
136
136
|
parser (3.2.2.4)
|
@@ -146,7 +146,7 @@ GEM
|
|
146
146
|
zeitwerk (~> 2.6)
|
147
147
|
psych (5.1.1.1)
|
148
148
|
stringio
|
149
|
-
racc (1.7.
|
149
|
+
racc (1.7.3)
|
150
150
|
rack (3.0.8)
|
151
151
|
rack-session (2.0.0)
|
152
152
|
rack (>= 3.0.0)
|
@@ -11,6 +11,7 @@ class UltimateTurboModal::Base < Phlex::HTML
|
|
11
11
|
# @param header_divider [Boolean] Whether to show a divider between the header and the main content
|
12
12
|
# @param padding [Boolean] Whether to add padding around the modal content
|
13
13
|
# @param request [ActionDispatch::Request] The current Rails request object
|
14
|
+
# @param content_div_data [Hash] `data` attribute for the div where the modal content will be rendered
|
14
15
|
# @param title [String] The title of the modal
|
15
16
|
def initialize(
|
16
17
|
advance: UltimateTurboModal.configuration.advance,
|
@@ -22,6 +23,7 @@ class UltimateTurboModal::Base < Phlex::HTML
|
|
22
23
|
header: UltimateTurboModal.configuration.header,
|
23
24
|
header_divider: UltimateTurboModal.configuration.header_divider,
|
24
25
|
padding: UltimateTurboModal.configuration.padding,
|
26
|
+
content_div_data: nil,
|
25
27
|
request: nil, title: nil
|
26
28
|
)
|
27
29
|
@advance = !!advance
|
@@ -34,6 +36,7 @@ class UltimateTurboModal::Base < Phlex::HTML
|
|
34
36
|
@header = header
|
35
37
|
@header_divider = header_divider
|
36
38
|
@padding = padding
|
39
|
+
@content_div_data = content_div_data
|
37
40
|
@request = request
|
38
41
|
@title = title
|
39
42
|
|
@@ -70,7 +73,7 @@ class UltimateTurboModal::Base < Phlex::HTML
|
|
70
73
|
|
71
74
|
private
|
72
75
|
|
73
|
-
attr_accessor :request, :allowed_click_outside_selector
|
76
|
+
attr_accessor :request, :allowed_click_outside_selector, :content_div_data
|
74
77
|
|
75
78
|
def padding? = !!@padding
|
76
79
|
|
@@ -164,11 +167,12 @@ class UltimateTurboModal::Base < Phlex::HTML
|
|
164
167
|
end
|
165
168
|
|
166
169
|
def div_inner(&block)
|
167
|
-
div(id: "modal-inner", class: self.class::DIV_INNER_CLASSES, &block)
|
170
|
+
div(id: "modal-inner", class: self.class::DIV_INNER_CLASSES, data: content_div_data, &block)
|
168
171
|
end
|
169
172
|
|
170
173
|
def div_content(&block)
|
171
|
-
|
174
|
+
data = (content_div_data || {}).merge({modal_target: "content"})
|
175
|
+
div(id: "modal-content", class: self.class::DIV_CONTENT_CLASSES, data:, &block)
|
172
176
|
end
|
173
177
|
|
174
178
|
def div_main(&block)
|
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.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carl Mercier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: phlex-rails
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
|
-
rubygems_version: 3.4
|
127
|
+
rubygems_version: 3.5.4
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: UTMR aims to be the be-all and end-all of Turbo Modals.
|