nfg_ui 0.9.22 → 0.9.23
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/foundations/icon.rb +13 -0
- data/lib/nfg_ui/components/traits/icon.rb +5 -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: 040ebc8aba557a02d99f3e608b542cf5df490f94b6124417da6ddd9b01f8957b
|
4
|
+
data.tar.gz: '0943ceecff8e1c95a6080eb3dde4c862184563da3f7158d880187bd53cb17b1b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23532de2392e293538dabdeaecbe0caa287fac6aa208198a6bb4ea9e845d4e70888afd0e2fd80c54a7fe508f5b7dd92ae2b2156265bcddaf7d270848f68c95c9
|
7
|
+
data.tar.gz: af061b7ea374efb9e4d814b569290fa5249378496f9c60e15ea24d8411a2ce2e1ae2e28c82edb956ad58d700982c8548423ea5cb492e7609cfc3094e68672b32
|
@@ -62,12 +62,14 @@ module NfgUi
|
|
62
62
|
# Adds the left css spacer class when :right is false
|
63
63
|
# and when text is present
|
64
64
|
def add_left_icon_css_spacer_class?
|
65
|
+
return false if reject_spacer_css_class?
|
65
66
|
!right && text.present?
|
66
67
|
end
|
67
68
|
|
68
69
|
# Adds the left css spacer class when :right is true
|
69
70
|
# and when text is present
|
70
71
|
def add_right_icon_css_spacer_class?
|
72
|
+
return false if reject_spacer_css_class?
|
71
73
|
right && text.present?
|
72
74
|
end
|
73
75
|
|
@@ -109,6 +111,17 @@ module NfgUi
|
|
109
111
|
def outlineable?
|
110
112
|
false
|
111
113
|
end
|
114
|
+
|
115
|
+
# List of unique conditions that will result in
|
116
|
+
# full rejection of left/right spacer classes
|
117
|
+
#
|
118
|
+
# This is needed for specific traits / design system approaches
|
119
|
+
# Where icons get unique css classes based on
|
120
|
+
# their context, such as a :tip icon which is
|
121
|
+
# placed in the sentence flow and doesn't need left/right css spacers.
|
122
|
+
def reject_spacer_css_class?
|
123
|
+
traits.include?(:tip)
|
124
|
+
end
|
112
125
|
end
|
113
126
|
end
|
114
127
|
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.23
|
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-
|
12
|
+
date: 2019-11-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bootstrap
|