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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 293ecf74b9efed14557f745bbfa45ab68e85a33a863602ff3bc8139e50b25232
4
- data.tar.gz: c483ff7c84b9d6f0280857619d0ec6bd3ec39a598ba7cfa9ead65e1369dce1d9
3
+ metadata.gz: 0d017b530462e5d5dfbb5344bedc7496990431dedb528d533940811272a9f074
4
+ data.tar.gz: 3602757ad95632f48724ef5ef85f35803b9b8cde5081722cae13eb2547370c1f
5
5
  SHA512:
6
- metadata.gz: 6a2b4df00c60f177b5d6b622c3e2f4fdabc38dff1e806e5666f1dda4482ea50f737e3a0b5e93bd6361f489c246f5da3df6dc6ecef9b25b0f3f735a0df998e293
7
- data.tar.gz: 67ec74af618943134eea52dd1e3b0f0ef5e686517cdee2b79538b796dd031b0471298dca60f08b315db5594c8b028464244bb9180bab1771e8f697bbcfdfcba3
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(:div, class: 'modal-content') { @content.call(self) }
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
- 'modal-fullscreen'
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
- 'modal-xl'
214
- when 'large', 'lg'
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
@@ -1,3 +1,3 @@
1
1
  module Bootstrap5Helper
2
- VERSION = '1.2.0.pre2'.freeze
2
+ VERSION = '1.2.0.pre3'.freeze
3
3
  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.pre2
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-02 00:00:00.000000000 Z
11
+ date: 2025-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap