effective_bootstrap 1.16.3 → 1.16.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: 7a43d4059d694f254fb05f0cb43f12dc5f3b5fbeb5df8dc7aa7aa21fc8a3bad9
4
- data.tar.gz: 8967aad36784c29bd334837b2bf9d4683258e7afafd61d509821dd31a860688c
3
+ metadata.gz: a3ae83f617d9b5fe35307b2b685480ba6ca0e8973cf66ffc0f6b401929ca3cdc
4
+ data.tar.gz: 6bd06b8c2580d0421fe91ac55182396bb1cf52fd0e4c9b6089d0954a395e90dd
5
5
  SHA512:
6
- metadata.gz: 8dc33e68ff3d7383d22d60971c577490c4fbc9d93f606ec66b7ac45a38cb1fca4ef2ef514525b0b1a0fa974b65d36599791ae14d2f134bd8a5ad0b1ac3ca0670
7
- data.tar.gz: 383b522a6c0839f578f545f7535aac54682a9640f1c88c3d61d48879a445683047f0a95d373b0b3b74777bed218be622fa5f1a387979d4841f06263fe5630928
6
+ metadata.gz: a0b275deee025c6631bd2a9419cb33ddf7b4bbd5789d35940836ed39107f749442826d66b615ba46713c623fa6c0fdc99e9af201a1d26bebf5b069f8de4b6ef7
7
+ data.tar.gz: 5755a4b4080a05265cb35ea3c3a740c2e80dccc81e56f4051921d65adf41454e7a0dcf91c9836206cac20d645574d21fdc18db7ef6c03b64e273ff85caca25a6
@@ -129,8 +129,9 @@ module EffectiveBootstrapHelper
129
129
  id = "collapse-#{effective_bootstrap_unique_id}"
130
130
  show = (opts.delete(:show) == true)
131
131
 
132
- # Figure out all the button / link options
133
- link_opts = { 'data-toggle': 'collapse', role: 'button', href: "##{id}", 'aria-controls': "##{id}", 'aria-expanded': show }
132
+ # The div and the card now
133
+ div_class = opts.delete(:div_class)
134
+ card_class = opts.delete(:card_class) || 'card card-body my-2'
134
135
 
135
136
  # Two link labels
136
137
  label_expand = opts.delete(:expand) || label.to_s.tap do |label|
@@ -142,13 +143,19 @@ module EffectiveBootstrapHelper
142
143
  end + icon('chevron-up')
143
144
 
144
145
  # The link html classes
145
- link_opts[:class] = opts.delete(:link_class) || 'btn btn-link'
146
- link_opts[:class] += ' effective-collapse-actions hidden-print'
147
- link_opts[:class] += ' collapsed' unless show
146
+ link_class = opts.delete(:link_class) || 'btn btn-link'
147
+ link_class += ' effective-collapse-actions hidden-print'
148
+ link_class += ' collapsed' unless show
148
149
 
149
- # The div and the card now
150
- div_class = opts.delete(:div_class)
151
- card_class = opts.delete(:card_class) || 'card card-body my-2'
150
+ # Figure out all the button / link options
151
+ link_opts = {
152
+ 'data-toggle': 'collapse',
153
+ role: 'button',
154
+ href: "##{id}",
155
+ 'aria-controls': "##{id}",
156
+ 'aria-expanded': show,
157
+ class: link_class
158
+ }.merge(opts)
152
159
 
153
160
  # Normal collapse
154
161
  link_tag = content_tag(:a, link_opts) do
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '1.16.3'.freeze
2
+ VERSION = '1.16.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.3
4
+ version: 1.16.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-24 00:00:00.000000000 Z
11
+ date: 2023-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails