ndr_ui 5.0.0 → 5.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b932ab48f36e6593dfbcb4de77da6f3026262e4a63db157668b2888a2e59cf46
4
- data.tar.gz: 0a817d12dfffdb8053b58006dcf0359bc14be594c8cbe4a15ff8c76ee9c69a92
3
+ metadata.gz: ac1513f28fb442cd411ed3448be7429df4e1b31257f9f824582f7e7dade4a792
4
+ data.tar.gz: 94183bcd72c12668f441de2c11ad9c94ae3821a597d743888abb6b5ccec14210
5
5
  SHA512:
6
- metadata.gz: 1caf182beb7757e40762e3ba5373fd823083ce53af7f632eb94cee88d257ee615d660c72034c4f2ea857f434262054c1d77658952ed60bafd61e6a51d8e93f02
7
- data.tar.gz: baa4a91ace512e0dbe82c9468d37291c6eddd82387f7551594d678c4314b0e89ab2c99e561e9ab05d32316d5db19df8409ae25240ad00ca32eaeb201e5891a1a
6
+ metadata.gz: cb20871cec4626f5ec59384fdb698d284f041064ae4e5d49e28bacf3e1f465ff459ace458a3f28f575fde366e063b42bcdc40534e6168bf1df393f8b50a2b69a
7
+ data.tar.gz: 2b40d49fb9d537f91dcdada361515988431a0565bb44512eff1df38a49e193d3ced8026ffa13fc31e74d9f2316114f280a32e8d335303778600025166919f026
data/CHANGELOG.md CHANGED
@@ -1,6 +1,15 @@
1
1
  ## [Unreleased]
2
2
  * no unreleased changes *
3
3
 
4
+ ## 5.0.1 / 2025-02-03
5
+ ### Fixed
6
+ * fix cancel modal button
7
+ * re-introdce `btn-default` style
8
+ * fix `bootstrap_tab_nav_tag` helper method with required classes
9
+ * allow more padding at the end for `bootstrap_list_badge_and_link_to`
10
+ * fix offset class name in line with Bootstrap 5 upgrade
11
+ * fix `bootstrap_alert_tag` style with close button option
12
+
4
13
  ## 5.0.0 / 2025-01-24
5
14
  ### Changed
6
15
  * Support Bootstrap to v5.3.3
@@ -19,3 +19,9 @@ $bootstrap-icons-font-dir: ".";
19
19
  border:0;
20
20
  }
21
21
  }
22
+
23
+ // Bootstrap don't have btn-default anymore
24
+ // however, we keep btn-default in codebase/helpers and set global default setting here.
25
+ .btn-default {
26
+ @extend .btn-outline-secondary;
27
+ }
@@ -218,7 +218,7 @@ module NdrUi
218
218
  end
219
219
 
220
220
  def bootstrap_modal_button(label)
221
- button_tag(label, class: 'btn btn-default', 'data-bs-dismiss': 'modal')
221
+ button_tag(label, type: 'button', class: 'btn btn-default', 'data-bs-dismiss': 'modal')
222
222
  end
223
223
 
224
224
  private
@@ -51,8 +51,8 @@ module NdrUi
51
51
  # <%= bootstrap_alert_tag(:info) do %>
52
52
  # Check it out!!
53
53
  # <% end %>
54
- # # => <div class="alert alert-info"><button type="button" class="btn-close"
55
- # data-bs-dismiss="alert"></button>Check it out!!</div>
54
+ # # => <div class="alert alert-info">Check it out!!
55
+ # <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>
56
56
  #
57
57
  # Ids for css and/or javascript are easy to produce:
58
58
  #
@@ -79,7 +79,7 @@ module NdrUi
79
79
  options['class'] = classes.join(' ')
80
80
 
81
81
  if options.delete('dismissible')
82
- message = button_tag('', type: 'button', class: 'btn-close', 'data-bs-dismiss': 'alert') + message
82
+ message = message.html_safe + button_tag('', type: 'button', class: 'btn-close', 'data-bs-dismiss': 'alert')
83
83
  end
84
84
  content_tag(:div, message, options)
85
85
  end
@@ -203,16 +203,18 @@ module NdrUi
203
203
  # ==== Examples
204
204
  #
205
205
  # <%= bootstrap_tab_nav_tag("Fruits", "#fruits", true) %>
206
- # # => <li class="active"><a href="#fruits" data-bs-toggle="tab">Fruits</a></li>
206
+ # # => <li class="nav-item"><a class="nav-link active" href="#fruits" data-bs-toggle="tab">Fruits</a></li>
207
207
  def bootstrap_tab_nav_tag(title, linkto, active = false)
208
208
  content_tag('li',
209
- link_to(title, linkto, 'data-bs-toggle': 'tab'),
210
- active ? { class: 'active' } : {})
209
+ link_to(title, linkto, 'data-bs-toggle': 'tab', class: "nav-link#{active ? ' active' : ''}"),
210
+ class: 'nav-item')
211
211
  end
212
212
 
213
213
  # Convenience wrapper for a bootstrap_list_link_to with badge
214
214
  def bootstrap_list_badge_and_link_to(type, count, name, path)
215
- html = content_tag(:div, bootstrap_badge_tag(type, count), class: 'float-end') + name
215
+ html = content_tag(:div, bootstrap_badge_tag(type, count), class: 'float-end') +
216
+ content_tag(:div, name, class: 'pe-5')
217
+
216
218
  bootstrap_list_link_to(html, path)
217
219
  end
218
220
 
@@ -306,7 +308,7 @@ module NdrUi
306
308
  # <%= button_control_group("Apples", class: "some_class") %>
307
309
  # # =>
308
310
  # <div class="form-group">
309
- # <div class="col-sm-9 col-sm-offset-3">
311
+ # <div class="col-sm-9 offset-sm-3">
310
312
  # <div class="some_class">Apples</div>
311
313
  # </div>
312
314
  # </div>
@@ -386,7 +388,7 @@ module NdrUi
386
388
  #
387
389
  def bootstrap_horizontal_form_group(label = nil, ratio = [2, 10], &block)
388
390
  l, r = ratio[0..1].map(&:to_i)
389
- offset = label.nil? ? " col-sm-offset-#{l}" : ''
391
+ offset = label.nil? ? " offset-sm-#{l}" : ''
390
392
 
391
393
  # Main content:
392
394
  content = content_tag(:div, class: "col-sm-#{r}" + offset, &block)
@@ -2,5 +2,5 @@
2
2
 
3
3
  # This stores the current version of the NdrUi gem. Use semantic versioning http://semver.org
4
4
  module NdrUi
5
- VERSION = '5.0.0'
5
+ VERSION = '5.0.1'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ndr_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - NDR Development Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-24 00:00:00.000000000 Z
11
+ date: 2025-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap