bootstrap5_helper 1.2.0.pre2 → 1.2.0.pre3
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/lib/bootstrap5_helper/modal.rb +15 -11
- data/lib/bootstrap5_helper/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: 0d017b530462e5d5dfbb5344bedc7496990431dedb528d533940811272a9f074
|
4
|
+
data.tar.gz: 3602757ad95632f48724ef5ef85f35803b9b8cde5081722cae13eb2547370c1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f06b5c4a4dea910830074273ee01fb01798bc21286056ff0f15dc9c3503b5f65c5bb0dc37fbd596be0552909443a7ea8a92c5753909b0a465ee7afc71400ded5
|
7
|
+
data.tar.gz: 3f040da98e4b6c2ec59ae6bec1f32513673bce8dfea85536a33c5bbacbcd428c13d3c08e77c71404bc910d42bbaf6f8998c5b9c481295a5753461a8e4c1ef1bd
|
@@ -12,6 +12,7 @@ module Bootstrap5Helper
|
|
12
12
|
# @option opts [String] :id
|
13
13
|
# @option opts [String] :class
|
14
14
|
# @option opts [Hash] :data
|
15
|
+
# @option opts [Hash] :wrapper
|
15
16
|
# @option opts [Boolean] :scrollable
|
16
17
|
# @option opts [Boolean] :vcentered
|
17
18
|
# @option opts [Boolean] :static
|
@@ -24,6 +25,7 @@ module Bootstrap5Helper
|
|
24
25
|
@id = opts.fetch(:id, uuid)
|
25
26
|
@class = opts.fetch(:class, '')
|
26
27
|
@data = opts.fetch(:data, {})
|
28
|
+
@wrapper = opts.fetch(:wrapper, {})
|
27
29
|
@scrollable = opts.fetch(:scrollable, false)
|
28
30
|
@vcentered = opts.fetch(:vcentered, false)
|
29
31
|
@static = opts.fetch(:static, false)
|
@@ -122,7 +124,14 @@ module Bootstrap5Helper
|
|
122
124
|
class: "modal-dialog #{size} #{scrollable} #{vcentered} #{fullscreen}",
|
123
125
|
role: 'document'
|
124
126
|
) do
|
125
|
-
content_tag(
|
127
|
+
content_tag(
|
128
|
+
:div,
|
129
|
+
id: @wrapper.fetch(:id, nil),
|
130
|
+
class: "modal-content #{@wrapper.fetch(:class, '')}",
|
131
|
+
data: @wrapper.fetch(:data, {})
|
132
|
+
) do
|
133
|
+
@content.call(self)
|
134
|
+
end
|
126
135
|
end
|
127
136
|
end
|
128
137
|
end
|
@@ -194,10 +203,8 @@ module Bootstrap5Helper
|
|
194
203
|
#
|
195
204
|
def fullscreen
|
196
205
|
case @fullscreen
|
197
|
-
when TrueClass
|
198
|
-
|
199
|
-
when String, Symbol
|
200
|
-
"modal-fullscreen-#{@fullscreen}-down "
|
206
|
+
when TrueClass then 'modal-fullscreen'
|
207
|
+
when String, Symbol then "modal-fullscreen-#{@fullscreen}-down "
|
201
208
|
else
|
202
209
|
''
|
203
210
|
end
|
@@ -209,12 +216,9 @@ module Bootstrap5Helper
|
|
209
216
|
#
|
210
217
|
def size
|
211
218
|
case @size.to_s
|
212
|
-
when 'xlarge', 'xl'
|
213
|
-
|
214
|
-
when '
|
215
|
-
'modal-lg'
|
216
|
-
when 'small', 'sm'
|
217
|
-
'modal-sm'
|
219
|
+
when 'xlarge', 'xl' then 'modal-xl'
|
220
|
+
when 'large', 'lg' then 'modal-lg'
|
221
|
+
when 'small', 'sm' then 'modal-sm'
|
218
222
|
else
|
219
223
|
''
|
220
224
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap5_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.0.
|
4
|
+
version: 1.2.0.pre3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert David
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap
|