nfg_ui 0.12.2 → 0.12.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b45c3d32a180df2da86ae37f687850785b8a5c22833c4b70b0e0371f48e1b3cc
|
4
|
+
data.tar.gz: ab34a149c78bf3b596ddc5ea990ab3bd27372fd340166908b47aefe5df519d85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44f3894e5054710f58a2198ca37c0a5ffbdb6e1a96c6c90d7d71363afbbd70ebee58b6d855b55ef0fcf90c03c5af04df8f2ecd5fe2dd401cf6223b168183d25f
|
7
|
+
data.tar.gz: b3dc49d58c96fe8ee3020d561c27d93950513c862b15174f92b1a45ec197af8d803691bf48eab1b948e06aec10ebe62b7247874feefbddbe9a9b3b11ade5cc8f
|
@@ -17,13 +17,13 @@ module NfgUi
|
|
17
17
|
def render
|
18
18
|
super do
|
19
19
|
if collapsible && title
|
20
|
-
concat(NfgUi::Components::Elements::Button.new({ traits: [:link, :block], collapse: collapse, class: 'no-link-color p-0 m-0' }, view_context).render {
|
20
|
+
concat(NfgUi::Components::Elements::Button.new({ traits: [:link, :block], collapse: collapse, class: 'no-link-color p-0 m-0', data: { collapse_icon: collapse_icon, collapsed_icon: collapsed_icon } }, view_context).render {
|
21
21
|
content_tag(:div, class: 'row align-items-center') do
|
22
22
|
concat(content_tag(:div, class: 'col-10 text-left') {
|
23
23
|
NfgUi::Components::Foundations::Typeface.new({ heading: title, icon: icon, class: 'h4' }, view_context).render
|
24
24
|
})
|
25
25
|
concat(content_tag(:div, class: 'col-2 text-right') {
|
26
|
-
NfgUi::Components::Foundations::Icon.new({ traits: [
|
26
|
+
NfgUi::Components::Foundations::Icon.new({ traits: ["#{contextual_collapsible_icon} fw"], tooltip: 'Show / hide additional information' }, view_context).render
|
27
27
|
})
|
28
28
|
end
|
29
29
|
})
|
@@ -34,6 +34,21 @@ module NfgUi
|
|
34
34
|
concat((block_given? ? yield : body))
|
35
35
|
end
|
36
36
|
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def contextual_collapsible_icon
|
41
|
+
return '' unless collapsible
|
42
|
+
collapsed ? collapsed_icon : collapse_icon
|
43
|
+
end
|
44
|
+
|
45
|
+
def collapse_icon
|
46
|
+
'caret-up'
|
47
|
+
end
|
48
|
+
|
49
|
+
def collapsed_icon
|
50
|
+
'caret-down'
|
51
|
+
end
|
37
52
|
end
|
38
53
|
end
|
39
54
|
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.12.
|
4
|
+
version: 0.12.3
|
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: 2021-
|
12
|
+
date: 2021-07-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bootstrap
|