nfg_ui 0.11.3 → 0.11.4

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: 332c555dc58cfd23c4c1620eb247a089e617bce9c4d9425eb134c8294d60b781
4
- data.tar.gz: 11f734c4d7f450be761e0566b66dd7a5921eaffe64c095f75fc28d00ddd85ea5
3
+ metadata.gz: b74d360cda26e2c2761e08f2e7518801f4ff7b6748c47c8329c8201eda8ebc71
4
+ data.tar.gz: 114168053528379c43dfadcb54c4c3fdf73355c76013fcda368aa0b13748758e
5
5
  SHA512:
6
- metadata.gz: 5e211f554ab72b7147ccf0185b945fe347d955ede629a1599b225434d5d31a9c969db0844a43afa230705937ae9c2280f47f5780d2251dee7e57fce57c8b4de8
7
- data.tar.gz: 22c1f6878558390dcccd8f9ed61f4125141ebf27a3ffe79747895821a705af1b3f008682b2a4726567a2f29b1c76a2003017049474640800ea9d6a1956affb2e
6
+ metadata.gz: 31bc70d2cc5e96ac4c8414d1d1c38cb8ff760e23b4e021c6ff4b2583b783e9f505cf39540e93a311b786629c03075286eca26af1d5846fc02ca502b60285cba7
7
+ data.tar.gz: 87c5a53d2f865c51d0af6c090d9b25166aee6c72d3215cafeb672b3d6aa605e509530dd7844c2dad1a59e12c77c13fd3271d1ef03f4ddba940fc0486c4748e41
data/Rakefile CHANGED
@@ -36,7 +36,7 @@ task :publish, %i[override_flag] do |_, override_flag: nil|
36
36
  subtask_args << ",#{override_flag}" if override_flag
37
37
 
38
38
  Dir.chdir("#{__dir__}/publisher") do
39
- Bundler.with_clean_env do
39
+ Bundler.with_unbundled_env do
40
40
  sh "RAILS_ENV=production bundle exec rake publish[#{subtask_args}]" do |ok, _|
41
41
  puts 'unable to publish assets' unless ok
42
42
  end
@@ -3,3 +3,7 @@
3
3
  .badge-primary { @include badge-variant($value); }
4
4
  }
5
5
  }
6
+
7
+ // temporary color fix for consistency on a white text on orange bg
8
+ // overrides color contrast settings
9
+ .orange .badge-primary { color: $white !important; }
@@ -8,3 +8,7 @@
8
8
  .btn-outline-secondary, .btn-link { color: $value; }
9
9
  }
10
10
  }
11
+
12
+ // temporary color fix for consistency on a white text on orange bg
13
+ // overrides color contrast settings
14
+ .orange .btn-primary { color: $white !important; }
@@ -7,6 +7,7 @@
7
7
  @import 'custom/custom_receipt_language';
8
8
  @import 'custom/email_preview';
9
9
  @import 'custom/free_trial';
10
+ @import 'custom/gallery';
10
11
  @import 'custom/icomoon';
11
12
  @import 'custom/interaction';
12
13
  @import 'custom/overlay_blocker';
@@ -4,3 +4,19 @@
4
4
  + #quick-add-modal { display: none !important; }
5
5
  ~ .modal-backdrop.show ~ .modal-backdrop.show { display: none !important; }
6
6
  }
7
+
8
+
9
+ // Full page cover modal option
10
+ .modal-cover {
11
+ margin: 0;
12
+ width: 100%;
13
+ max-width: 100%;
14
+ height: 100%;
15
+ transform: none !important; // removes default 50px transform that occurs on modal showing (.fade and .show)
16
+ .modal-content {
17
+ display: block;
18
+ height: 100%;
19
+ border: none;
20
+ border-radius: 0;
21
+ }
22
+ }
@@ -80,6 +80,7 @@ $builder-preview-padding: ($spacer * 2);
80
80
  }
81
81
  }
82
82
  .builder-preview {
83
+ background-color: $body-bg;
83
84
  padding: $builder-preview-padding ($builder-preview-padding / 2);
84
85
  @include media-breakpoint-up(lg) {
85
86
  float: left;
@@ -3,4 +3,4 @@
3
3
  height: ($spacer * 8);
4
4
  overflow: hidden;
5
5
  .card-img { min-height: 100%; }
6
- }
6
+ }
@@ -0,0 +1,46 @@
1
+ // Gallery styles
2
+ .card-gallery {
3
+
4
+ // Gallery image styles
5
+ .card-gallery-img {
6
+ height: ($spacer * 14); // sets height of gallery image preview
7
+ overflow: hidden;
8
+ z-index: 0;
9
+ .card-img {
10
+ min-height: 100%;
11
+ z-index: 0;
12
+ }
13
+ .card-img-overlay { z-index: 1; }
14
+ .card-gallery-img-overlay {
15
+ display: block;
16
+ position: absolute;
17
+ top: 0;
18
+ right: 0;
19
+ bottom: 0;
20
+ left: 0;
21
+ text-align: center;
22
+ background-color: $modal-backdrop-bg;
23
+ transition: $transition-fade;
24
+ opacity: 0;
25
+ z-index: 10;
26
+ @include hover { opacity: 1; }
27
+ > .card-gallery-img-overlay-text {
28
+ position: absolute;
29
+ top: 50%;
30
+ left: 50%;
31
+ width: 100%;
32
+ transform: translate(-50%, -50%);
33
+ }
34
+ }
35
+ }
36
+
37
+ // Gallery card body styles
38
+ .card-body { z-index: 10; }
39
+ .badge-highlight {
40
+ position: absolute;
41
+ top: -($card-spacer-y * .5);
42
+ left: $card-spacer-y;
43
+ }
44
+ }
45
+
46
+
@@ -6,11 +6,11 @@
6
6
  &:hover, &:active { text-decoration: none; }
7
7
  }
8
8
  }
9
- .alert-success a:not(.btn) { color: $success; }
10
- .alert-info a:not(.btn) { color: $info; }
11
- .alert-warning a:not(.btn) { color: $warning; }
9
+ .alert-success a:not(.btn) { color: $success !important; }
10
+ .alert-info a:not(.btn) { color: $info !important; }
11
+ .alert-warning a:not(.btn) { color: $warning !important; }
12
12
  .alert-danger, .alert-error {
13
- a:not(.btn) { color: $danger; }
13
+ a:not(.btn) { color: $danger !important; }
14
14
  }
15
15
  .alert-gray, .alert-notice,
16
16
  .alert-light, .alert-dark {
@@ -0,0 +1,3 @@
1
+ // overrides color contrast settings
2
+ .badge-secondary { color: $white !important; }
3
+ .badge-warning { color: $white !important; }
@@ -15,3 +15,6 @@
15
15
  }
16
16
  }
17
17
  .btn-link { font-weight: $btn-font-weight; }
18
+
19
+ // overrides color contrast settings
20
+ .btn-warning { color: $white !important; }
@@ -28,7 +28,11 @@ module NfgUi
28
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
- concat(NfgUi::Bootstrap::Components::ModalHeader.new({ title: title }, view_context).render)
31
+ # Optionally, leave title nil
32
+ # and the title / dismiss functionality is left out.
33
+ if title.present?
34
+ concat(NfgUi::Bootstrap::Components::ModalHeader.new({ title: title }, view_context).render)
35
+ end
32
36
  if render_in_body
33
37
  concat(NfgUi::Bootstrap::Components::ModalBody.new({ body: (block_given? ? yield : body) }, view_context).render)
34
38
  else
@@ -10,7 +10,14 @@ module NfgUi
10
10
  include NfgUi::Components::Utilities::Renderable
11
11
  include NfgUi::Components::Utilities::Titleable
12
12
 
13
+ include NfgUi::Components::Traits::Modal
13
14
  include NfgUi::Components::Traits::Size
15
+
16
+ private
17
+
18
+ def resized?
19
+ [:sm, :lg, :xl, :cover].include?(size)
20
+ end
14
21
  end
15
22
  end
16
23
  end
@@ -18,6 +18,7 @@ module NfgUi
18
18
  DropdownToggle
19
19
  Icon
20
20
  ListGroup
21
+ Modal
21
22
  Muted
22
23
  Nav
23
24
  Navbar
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NfgUi
4
+ module Components
5
+ module Traits
6
+ module Modal
7
+ TRAITS = %i[cover].freeze
8
+
9
+ def cover_trait
10
+ options[:size] = :cover
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NfgUi
4
- VERSION = '0.11.3'
4
+ VERSION = '0.11.4'
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.11.3
4
+ version: 0.11.4
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: 2020-10-15 00:00:00.000000000 Z
12
+ date: 2020-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap
@@ -427,6 +427,7 @@ files:
427
427
  - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_custom_receipt_language.scss
428
428
  - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_email_preview.scss
429
429
  - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_free_trial.scss
430
+ - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_gallery.scss
430
431
  - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_icomoon.scss
431
432
  - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_interaction.scss
432
433
  - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_overlay_blocker.scss
@@ -485,6 +486,7 @@ files:
485
486
  - app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/nfg_theme/utilities/_flex.scss
486
487
  - app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/plugins/_sticky_div.scss
487
488
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_alert.scss
489
+ - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_badge.scss
488
490
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_button-group.scss
489
491
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_buttons.scss
490
492
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_card.scss
@@ -740,6 +742,7 @@ files:
740
742
  - lib/nfg_ui/components/traits/dropdown_toggle.rb
741
743
  - lib/nfg_ui/components/traits/icon.rb
742
744
  - lib/nfg_ui/components/traits/list_group.rb
745
+ - lib/nfg_ui/components/traits/modal.rb
743
746
  - lib/nfg_ui/components/traits/muted.rb
744
747
  - lib/nfg_ui/components/traits/nav.rb
745
748
  - lib/nfg_ui/components/traits/nav_item.rb