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 +4 -4
- data/lib/nfg_ui/components/elements/step_indicator.rb +13 -7
- data/lib/nfg_ui/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: 3271b9d0fba964c0c2695952ce47c5952c632fbe66fdba7a888b8126991514e3
|
|
4
|
+
data.tar.gz: 03b9664fc8762119841b4c7e5914a5fb3c7396f38fde691dafc3478002ff3215
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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(
|
|
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
|
|
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
|
data/lib/nfg_ui/version.rb
CHANGED
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.
|
|
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-
|
|
12
|
+
date: 2019-07-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bootstrap
|