nfg_ui 0.9.19.1 → 0.9.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nfg_ui/bootstrap/components/modal.rb +25 -3
- data/lib/nfg_ui/components/patterns/modal.rb +2 -0
- 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: beaebf28b8def0b396c4ccbf6fc1da011c242ae431d8bc1d1c6f2c4ac1acd4bf
|
4
|
+
data.tar.gz: a3ebaef400c9a2d66e603fc3b5876f285c2f5713294979b8f73add19579a0c33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2ce5ba64240fe53419e5bd3077826fceaf9b6239ecde1c92e11a406fff9daac73802e7fc6011e9b803029c89463dd28889e89b6c4e91d7cea2fb3e557b87e3f
|
7
|
+
data.tar.gz: 7e9aa7d7b07bee151bf37bc8c55d183ee092ba74fed3e56213977794072651c4481b73d419420c353d509d33b6eb468d18a3e3362e9e4fa70c890096a32e87c5
|
@@ -25,7 +25,7 @@ module NfgUi
|
|
25
25
|
|
26
26
|
def render
|
27
27
|
super do
|
28
|
-
content_tag(:div, class:
|
28
|
+
content_tag(:div, class: modal_dialog_css_classes, role: 'document') do
|
29
29
|
content_tag(:div, class: 'modal-content') do
|
30
30
|
capture do
|
31
31
|
concat(NfgUi::Bootstrap::Components::ModalHeader.new({ title: title }, view_context).render)
|
@@ -47,14 +47,36 @@ module NfgUi
|
|
47
47
|
options.fetch(:render_in_body, true)
|
48
48
|
end
|
49
49
|
|
50
|
+
def size
|
51
|
+
options.fetch(:size, nil)
|
52
|
+
end
|
53
|
+
|
50
54
|
private
|
51
55
|
|
52
56
|
def css_classes
|
53
|
-
|
57
|
+
[
|
58
|
+
component_css_class,
|
59
|
+
'fade'
|
60
|
+
].join(' ')
|
61
|
+
end
|
62
|
+
|
63
|
+
def modal_dialog_css_classes
|
64
|
+
[
|
65
|
+
'modal-dialog',
|
66
|
+
(size_css_class if resized?)
|
67
|
+
].join(' ').squish
|
54
68
|
end
|
55
69
|
|
56
70
|
def non_html_attribute_options
|
57
|
-
super.push((:footer if footer.present?), (:title if title.present?))
|
71
|
+
super.push((:footer if footer.present?), (:title if title.present?), :size)
|
72
|
+
end
|
73
|
+
|
74
|
+
def resized?
|
75
|
+
[:sm, :lg, :xl].include?(size)
|
76
|
+
end
|
77
|
+
|
78
|
+
def size_css_class
|
79
|
+
"#{component_css_class}-#{size}"
|
58
80
|
end
|
59
81
|
|
60
82
|
def assistive_html_attributes
|
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.20
|
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-10-
|
12
|
+
date: 2019-10-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bootstrap
|