nfg_ui 0.14.4 → 0.14.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/_variables.scss +1 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_fundraiser.scss +1 -1
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_page_header.scss +2 -2
- data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_peer_to_peer.scss +1 -1
- data/lib/nfg_ui/components/traits/button.rb +20 -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: ea4ecd2f5c73390715692bfda934607a628dfbc6af9cceb228e0659d915b6b2c
|
4
|
+
data.tar.gz: e6eeee108e4a41dc03f873f9f2853c47d383aaa5f8f863f354b2a215b7831634
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74b05a944c3d7c32df6acea74118da685413591f9d148fe5d021d45a815e6ba51efca89cf7f917ae7864e43c8aee5793f2b5209de0299a18fe23d8d6f10975fe
|
7
|
+
data.tar.gz: 7cc6d53ac7ca68768f3816c3b14332e05bb6d8a5257b3fd0eda1c39cd54e0582bcb2448585ca0b013cc0c85942fdde7407aa61aab16dc31b55612ca12324725d
|
@@ -256,6 +256,7 @@ $border-radius-sm: .2rem;
|
|
256
256
|
|
257
257
|
// $rounded-pill: 50rem !default;
|
258
258
|
|
259
|
+
$box-shadow-xs: 0 1px 6px transparentize($gray-900, 0.3);
|
259
260
|
$box-shadow-sm: 0 4px 18px transparentize($gray-900, 0.8);
|
260
261
|
$box-shadow: 0 8px 24px 3px transparentize($gray-900, 0.8);
|
261
262
|
$box-shadow-lg: 0 12px 30px 8px transparentize($gray-900, 0.75);
|
data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_page_header.scss
CHANGED
@@ -17,7 +17,7 @@ $page-header-height-public: (($spacer * 6.75) + 1); // 21.7rem (adds 1px for wid
|
|
17
17
|
}
|
18
18
|
|
19
19
|
// this renders as body.admin .page-header specifying when the view there is an admin logged in or on a donorcreatedproject (includes top admin black bar)
|
20
|
-
body.admin &, body.
|
20
|
+
body.admin &, body.public_admin & {
|
21
21
|
@include media-breakpoint-up(lg) { min-height: $page-header-height-admin; }
|
22
22
|
}
|
23
23
|
}
|
@@ -28,7 +28,7 @@ $page-header-height-public: (($spacer * 6.75) + 1); // 21.7rem (adds 1px for wid
|
|
28
28
|
+ .page-content { padding-top: $page-header-height; }
|
29
29
|
|
30
30
|
// this renders as body.admin .page-header + .page-content specifying when the view there is an admin logged in or on a donorcreatedproject (includes top admin black bar)
|
31
|
-
body.admin &, body.
|
31
|
+
body.admin &, body.public_admin & {
|
32
32
|
+ .page-content { padding-top: $page-header-height-admin; }
|
33
33
|
}
|
34
34
|
|
@@ -12,7 +12,27 @@ module NfgUi
|
|
12
12
|
remote
|
13
13
|
submit].freeze
|
14
14
|
|
15
|
+
# Link trait has some customizations because it outputs
|
16
|
+
# a button without button styles (useful for spacing)
|
17
|
+
# which makes it feel like the following SHOULD work:
|
18
|
+
# = ui.nfg :button, :link, :danger, icon: 'trash-o'
|
19
|
+
# Where it generates a link themed button that also has
|
20
|
+
# a color style.
|
15
21
|
def link_trait
|
22
|
+
colors = NfgUi::Components::Traits::Theme::COLOR_TRAITS
|
23
|
+
|
24
|
+
# Check if we've got any color themes passed through in addition to :link
|
25
|
+
if traits.collect { |t| t.in?(colors) }.any? && traits.include?(:link)
|
26
|
+
# Grab and remove the theme color from traits so it
|
27
|
+
# doesn't override the :link theme
|
28
|
+
# and so that we can apply it to the css.
|
29
|
+
theme_color = traits.delete((traits & colors).first)
|
30
|
+
|
31
|
+
# Add the text styling to the button's CSS
|
32
|
+
options[:class] += " text-#{theme_color}"
|
33
|
+
end
|
34
|
+
|
35
|
+
# And finally, set the official theme as a link
|
16
36
|
options[:theme] = :link
|
17
37
|
end
|
18
38
|
|
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.14.
|
4
|
+
version: 0.14.6
|
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: 2022-06-
|
12
|
+
date: 2022-06-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bootstrap
|