nfg_ui 0.9.11 → 0.9.12

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: 37b2e7b7b4c8b2e62f45ec3a6cc614ead5e1e1d5185f0fef6aac4a5460e4f51b
4
- data.tar.gz: 9d30ccac7ea061ca5a94aa8d9152eb876ba805f15012b6bca7780d646aba0d6f
3
+ metadata.gz: 3271b9d0fba964c0c2695952ce47c5952c632fbe66fdba7a888b8126991514e3
4
+ data.tar.gz: 03b9664fc8762119841b4c7e5914a5fb3c7396f38fde691dafc3478002ff3215
5
5
  SHA512:
6
- metadata.gz: 375c586299953774ce05089df29da43eb026330b5da4cfb16737280dcdb035d891c5eb8872620fe15458492496f09c8fcde34127b9a8536242321ee9e83891f5
7
- data.tar.gz: 925061f2c371184898bcba22591d68284de2fd844c915dd7a443550d94a691c198bb38297aa30c6c9fd51aabf2714ace8bad437f304b092abd801f2f996fc4ce
6
+ metadata.gz: a4aeb4853558195a9fcc2ae4b2790e282ed54f75bc76d2c944b69675652c9867f303452faccf96624fc1b70cd015fb5607a1435d334737ed0d75f67c4a40869e
7
+ data.tar.gz: c22750f6a38a50af17493852ded78dfe3b06afe787b576822c1ac2e6b92c08e4323061866dc954b4d80e574a40ea176dbd6a6d72372dfa2d5aa22332bc076dd8
@@ -5,33 +5,39 @@ module NfgUi
5
5
  module Elements
6
6
  # Step doc coming soon
7
7
  class StepIndicator < NfgUi::Components::Elements::NavLink
8
+ include Bootstrap::Utilities::Wrappable
9
+
8
10
  def component_family
9
11
  :steps
10
12
  end
11
13
 
12
- def href
13
- options.fetch(:href, '#')
14
- end
15
-
16
14
  def step
17
15
  options.fetch(:step, nil)
18
16
  end
19
17
 
20
18
  def render
21
- content_tag(:a, html_options) do
19
+ content_tag(as, html_options) do
22
20
  concat(content_tag(:div, class: 'step-indicator') {
23
21
  if icon
24
- NfgUi::Components::Foundations::Icon.new({ traits: [icon,] }, view_context).render
22
+ NfgUi::Components::Foundations::Icon.new({ traits: [icon] }, view_context).render
25
23
  else
26
24
  step
27
25
  end
28
26
  })
29
- concat(NfgUi::Components::Foundations::Typeface.new({ traits: [:muted], caption: (block_given? ? yield : body), class: 'mt-1 mb-0 step-text' }, view_context).render)
27
+ concat(NfgUi::Components::Foundations::Typeface.new({ traits: [:muted], caption: (block_given? ? yield : body), class: 'mt-1 mb-0 step-text' }, view_context).render) if (block_given? || body.present?)
30
28
  end
31
29
  end
32
30
 
33
31
  private
34
32
 
33
+ # Become a :span if :href is not present in options.
34
+ #
35
+ # While span is the defined default_html_wrapper_element in Bootstrap::Utilities::Wrappable,
36
+ # We set :span explicitly here because to ensure that regardless of what the default wrapper becomes, :span is preserved.
37
+ def default_html_wrapper_element
38
+ :span
39
+ end
40
+
35
41
  def non_html_attribute_options
36
42
  super.push(:step)
37
43
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NfgUi
4
- VERSION = '0.9.11'
4
+ VERSION = '0.9.12'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nfg_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.11
4
+ version: 0.9.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Roehm
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-07-01 00:00:00.000000000 Z
12
+ date: 2019-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap