nfg_ui 0.14.4 → 0.14.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff14db403eefb23596235a10b8352822295235f0bb89adffcec050f52e614a9e
4
- data.tar.gz: 914ce4609e07d7790115bb87f7b2e160ecce386c1bf8d6904fd9bb514eaf0191
3
+ metadata.gz: ea4ecd2f5c73390715692bfda934607a628dfbc6af9cceb228e0659d915b6b2c
4
+ data.tar.gz: e6eeee108e4a41dc03f873f9f2853c47d383aaa5f8f863f354b2a215b7831634
5
5
  SHA512:
6
- metadata.gz: f2a2a07ec708635d4852767ff5af85bdd8b744842a826721ec59eda2df9922c11a96c611fcb850fd8ffc9b24f6ca12418af238d5656160bb86de23ab9307fa00
7
- data.tar.gz: 32efe15784c379582a05ad5687b801572784478a2041152a6e8b22db10f67326e93577af3b856b7e9bbed28779b1ebf0df1385f481f6f1d71b382a47b945f4cd
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);
@@ -7,7 +7,7 @@
7
7
  @include media-breakpoint-up(lg) {
8
8
  min-height: 500px;
9
9
  color: $white;
10
- text-shadow: $box-shadow-sm;
10
+ text-shadow: $box-shadow-xs;
11
11
  }
12
12
  }
13
13
  }
@@ -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.donorcreatedproject & {
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.donorcreatedproject & {
31
+ body.admin &, body.public_admin & {
32
32
  + .page-content { padding-top: $page-header-height-admin; }
33
33
  }
34
34
 
@@ -7,7 +7,7 @@
7
7
  @include media-breakpoint-up(lg) {
8
8
  min-height: 600px;
9
9
  color: $white;
10
- text-shadow: $box-shadow-sm;
10
+ text-shadow: $box-shadow-xs;
11
11
  }
12
12
  }
13
13
  .campaign-status {
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NfgUi
4
- VERSION = '0.14.4'
4
+ VERSION = '0.14.6'
5
5
  end
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
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-08 00:00:00.000000000 Z
12
+ date: 2022-06-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap