nfg_ui 0.11.10 → 0.11.14

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.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_modal.scss +0 -16
  3. data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_campaign_card.scss +6 -1
  4. data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_custom.scss +1 -0
  5. data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_forms.scss +0 -4
  6. data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_modal.scss +14 -0
  7. data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_progress.scss +1 -0
  8. data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_type.scss +9 -2
  9. data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_drawer.scss +87 -0
  10. data/app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_select2.scss +1 -1
  11. data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_custom.scss +3 -1
  12. data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_navbar.scss +0 -11
  13. data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_reboot.scss +2 -0
  14. data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_background_variations.scss +1 -0
  15. data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_donor_scroll.scss +6 -0
  16. data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_event.scss +1 -1
  17. data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_event_livestream.scss +57 -0
  18. data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_everyday_default.scss +2 -1
  19. data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_everyday_story.scss +4 -1
  20. data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_page_header.scss +34 -0
  21. data/lib/nfg_ui/components/elements/button.rb +9 -3
  22. data/lib/nfg_ui/version.rb +1 -1
  23. metadata +8 -3
  24. data/app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_admin_bar.scss +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e34dd1689fbc138c1f6f147056cf00a639784191b11c9589e1e29b0a17a2f404
4
- data.tar.gz: 6c926d086c1cc2e0e28f9430af109880b501fd9f3f796f23419a9a765d458126
3
+ metadata.gz: a19a2d2be8af2061aceb6bbbd42641a0b453ae9745c4254ab6390569381d9152
4
+ data.tar.gz: 57e290d78782475a9eca5b6e11c280b8b2e189facbf8da111cd20a1485e8ca34
5
5
  SHA512:
6
- metadata.gz: d88d70a213d8b19fa0638ac70fb93d286cced3bcf1215003bcd313754ba7f6053eba20fa474ccc86fc96d7db4561ec25ea89b266c94f550305df3aa4d85c5d7b
7
- data.tar.gz: d31c17da3d988e609660b3490a5950d56e511d569e755ef47c748ef5479ca8b954b96040ec27a608ebd20ae4a4148f0d0e4c41b80c328f22924e97422ed2baa1
6
+ metadata.gz: f11e73646e3b34e74a94567d8ad8b9d072a0de1e7715818c23bcc21d8e7c3195e4a0a41a8e7badcaf27c290bbd84d5584b91c3c3ccf6251e7aca39415fc1e573
7
+ data.tar.gz: '059c130c6a825eae43ad51279f211d3ae5ed3a4576e503380f91c93926e8cf3f5bfab3c29f0ff4f786aacbc3e924dd91f7514257ce838a79430f91a8de5538c9'
@@ -4,19 +4,3 @@
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
- }
@@ -2,5 +2,10 @@
2
2
  #campaign_image {
3
3
  height: ($spacer * 8);
4
4
  overflow: hidden;
5
- .card-img { min-height: 100%; }
5
+ .card-img {
6
+ display: inline-block;
7
+ width: 100%;
8
+ min-height: 100%;
9
+ object-fit: cover;
10
+ }
6
11
  }
@@ -1,6 +1,7 @@
1
1
  // Our custom styles
2
2
  @import 'custom/avatar';
3
3
  @import 'custom/device_preview';
4
+ @import 'custom/drawer';
4
5
  @import 'custom/icon';
5
6
  @import 'custom/illustration';
6
7
  @import 'custom/mobile';
@@ -1,7 +1,3 @@
1
- .form-control {
2
- &[readonly] { background-color: $input-bg; }
3
- }
4
-
5
1
  // Required styles
6
2
  label {
7
3
  font-weight: $font-weight-bold;
@@ -0,0 +1,14 @@
1
+ // Full page cover modal option
2
+ .modal-cover {
3
+ margin: 0;
4
+ width: 100%;
5
+ max-width: 100%;
6
+ height: 100%;
7
+ transform: none !important; // removes default 50px transform that occurs on modal showing (.fade and .show)
8
+ .modal-content {
9
+ display: block;
10
+ height: 100%;
11
+ border: none;
12
+ border-radius: 0;
13
+ }
14
+ }
@@ -1,4 +1,5 @@
1
1
  // Sizing options
2
+ .progress { border-radius: $progress-height; }
2
3
  .progress-sm {
3
4
  height: ($spacer * .5);
4
5
  border-radius: ($spacer * .5);
@@ -15,6 +15,13 @@ h6, .h6 { line-height: 1.5; }
15
15
  text-transform: uppercase;
16
16
  }
17
17
 
18
+ // Adjust heading sizes on smaller devices
19
+ @include media-breakpoint-down(md) {
20
+ h1, .h1, h2, .h2, h3, .h3 {
21
+ font-size: $h4-font-size;
22
+ line-height: 1;
23
+ }
24
+ }
18
25
 
19
26
  //
20
27
  // Misc
@@ -59,8 +66,8 @@ a.no-link-color {
59
66
  content: '';
60
67
  z-index: 0;
61
68
  }
62
- .text-center, .btn-center { z-index: 10; }
63
- .text-center {
69
+ [class*='text-'], .btn-center { z-index: 10; }
70
+ [class*='text-'] {
64
71
  position: relative;
65
72
  text-align: center;
66
73
  line-height: 1;
@@ -0,0 +1,87 @@
1
+ .drawer {
2
+ position: fixed;
3
+ width: 100%;
4
+ z-index: $zindex-modal;
5
+ background-color: $white;
6
+ box-shadow: $box-shadow;
7
+ transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
8
+ opacity: 1 !important;
9
+
10
+ // Positions for drawer to slide in from
11
+ &.drawer-top {
12
+ top: 0;
13
+ right: auto;
14
+ bottom: auto;
15
+ left: 0;
16
+ transform: translate(0, -100%);
17
+ }
18
+ &.drawer-right {
19
+ top: 0;
20
+ right: 0;
21
+ bottom: auto;
22
+ left: auto;
23
+ transform: translate(100%, 0);
24
+ }
25
+ &.drawer-bottom {
26
+ top: auto;
27
+ right: auto;
28
+ bottom: 0;
29
+ left: 0;
30
+ transform: translate(0, 100%);
31
+ }
32
+ &.drawer-left {
33
+ top: 0;
34
+ right: auto;
35
+ bottom: auto;
36
+ left: 0;
37
+ transform: translate(-100%, 0);
38
+ }
39
+ &.drawer-top, &.drawer-bottom {
40
+ height: 100%;
41
+ @include media-breakpoint-up(lg) { height: auto; }
42
+ }
43
+ &.drawer-right, &.drawer-left {
44
+ height: 100%;
45
+ @include media-breakpoint-up(lg) { width: 32%; }
46
+ }
47
+ &.drawer-top, &.drawer-right, &.drawer-bottom, &.drawer-left {
48
+ &.show { transform: translate(0, 0); } // uses modal's show for slide animation
49
+ }
50
+ }
51
+
52
+ // Modal overrides for drawer to use modal component
53
+ .drawer {
54
+ .modal-dialog {
55
+ margin: 0;
56
+ padding: 0;
57
+ width: 100%;
58
+ max-width: 100%;
59
+ height: 100%;
60
+ transition: none !important; // removes default fade in modal transition
61
+ transform: none !important; // removes default 50px transform that occurs on modal showing (.fade and .show)
62
+ .modal-content {
63
+ display: block;
64
+ width: 100%;
65
+ height: 100%;
66
+ border: none;
67
+ box-shadow: none;
68
+ border-radius: 0;
69
+ }
70
+ }
71
+ }
72
+
73
+ // Hides modal backdrop default and need to be siblings
74
+ .drawer ~ .modal-backdrop { display: none; }
75
+
76
+ // Main drawer container
77
+ .drawer-content {
78
+ height: 100%;
79
+ overflow-y: auto;
80
+ }
81
+ .drawer-section {
82
+ + .drawer-section { border-top: $border-width solid $border-color; }
83
+ &.drawer-section-scroll { overflow-y: scroll; }
84
+ }
85
+ .drawer-header, .drawer-body, .drawer-footer {
86
+ padding: $spacer;
87
+ }
@@ -13,7 +13,7 @@ body:not(.modal-open) {
13
13
  .select2-container--default { z-index: $zindex-dropdown; }
14
14
  }
15
15
  body.modal-open {
16
- .select2-container { z-index: $zindex-modal + 2 !important; } // makes select2 dropdown higher than redactor toolbar in modals
16
+ .modal .select2-container { z-index: $zindex-modal + 2 !important; } // makes select2 dropdown higher than redactor toolbar in modals
17
17
  }
18
18
 
19
19
 
@@ -1,8 +1,10 @@
1
1
  // Our custom styles
2
- @import 'custom/admin_bar';
3
2
  @import 'custom/background_variations';
4
3
  @import 'custom/donor_account';
4
+ @import 'custom/donor_scroll';
5
5
  @import 'custom/event';
6
+ @import 'custom/event_livestream';
6
7
  @import 'custom/everyday_default';
7
8
  @import 'custom/everyday_story';
8
9
  @import 'custom/footer_links';
10
+ @import 'custom/page_header';
@@ -20,14 +20,3 @@ $navbar-logo-height: (($spacer * 4.5) - $spacer);
20
20
  padding-left: $navbar-padding-x;
21
21
  border-left: $border-width solid $border-color;
22
22
  }
23
- .sticky-div {
24
- box-shadow: $box-shadow-sm;
25
- .btn-header-donate {
26
- opacity: 0;
27
- transition: $transition-base;
28
- }
29
- &.stuck {
30
- box-shadow: $box-shadow;
31
- .btn-header-donate { opacity: 1; }
32
- }
33
- }
@@ -0,0 +1,2 @@
1
+ // Clears out body background default from core
2
+ body { background-color: $white; }
@@ -5,6 +5,7 @@
5
5
  }
6
6
  &.card { border-color: $gray-800; }
7
7
  h1, h2, h3, h4, h5, h6, p, label { color: $white; }
8
+ .text-muted { color: $white !important; }
8
9
  .progress { background-color: $gray-600; }
9
10
 
10
11
 
@@ -0,0 +1,6 @@
1
+ // Animation for a new donation
2
+ @keyframes new-donation-success {
3
+ 0% { background-color: #ebf7e4; }
4
+ 100% { background-color: transparent; }
5
+ }
6
+ .new-donation { animation: new-donation-success 4s; }
@@ -1,4 +1,4 @@
1
- // Styles specific to the everyday default style
1
+ // Styles specific to the event styles
2
2
  .event {
3
3
  .jumbotron {
4
4
  height: auto;
@@ -0,0 +1,57 @@
1
+ // Styles specific to the event livestream styles
2
+ .event {
3
+ @include media-breakpoint-up(lg) { height: 100%; }
4
+ .page-content {
5
+ @include media-breakpoint-up(lg) { height: 100%; }
6
+ }
7
+ }
8
+
9
+ // Block containers for side by side view
10
+ .event-body {
11
+ @include media-breakpoint-up(lg) {
12
+ width: 100%;
13
+ height: 100%;
14
+ overflow: hidden;
15
+ }
16
+ }
17
+ .event-content {
18
+ padding: $spacer;
19
+ @include media-breakpoint-up(lg) {
20
+ float: left;
21
+ width: 67%;
22
+ height: 100%;
23
+ overflow-y: auto;
24
+ > :last-child { margin-bottom: ($spacer * 2); }
25
+ }
26
+ }
27
+ .event-sidebar {
28
+ @include media-breakpoint-down(md) { border-bottom: $border-width solid $border-color; }
29
+ @include media-breakpoint-up(lg) {
30
+ float: right;
31
+ display: flex;
32
+ flex-direction: column;
33
+ width: 33%;
34
+ height: 100%;
35
+ border-left: $border-width solid $border-color;
36
+ > :last-child { margin-bottom: $spacer; }
37
+ }
38
+ &.event-sidebar-scroll {
39
+ @include media-breakpoint-up(lg) { overflow-y: scroll; }
40
+ }
41
+ .event-sidebar-section {
42
+ padding: $spacer;
43
+ + .event-sidebar-section { border-top: $border-width solid $border-color; }
44
+ &.event-sidebar-section-scroll {
45
+ min-height: ($spacer * 10); // sets min-height to ensure the scrollable area has room to be seen on restricted height devices (not mobile)
46
+ overflow-y: scroll;
47
+ }
48
+ }
49
+ }
50
+
51
+ // styles specific to donor-scroll to remove default card styles when donor scroll is inside the event sidebar
52
+ .event-sidebar-section {
53
+ .card[data-describe='donor-scroll'] {
54
+ border: 0;
55
+ .card-body { padding: 0; }
56
+ }
57
+ }
@@ -16,7 +16,8 @@
16
16
  @include media-breakpoint-down(md) {
17
17
  &::before { content: none; }
18
18
  .card {
19
- box-shadow: none;
19
+ border: none !important;
20
+ box-shadow: none !important;
20
21
  border-radius: 0;
21
22
  }
22
23
  .card-body { padding: 0; }
@@ -6,7 +6,10 @@
6
6
  background-size: cover;
7
7
  @include media-breakpoint-down(md) {
8
8
  background-image: none !important;
9
- .card { box-shadow: none !important; }
9
+ .card {
10
+ border: none;
11
+ box-shadow: none !important;
12
+ }
10
13
  .card-body { padding: 0; }
11
14
  }
12
15
  @include media-breakpoint-up(lg) { min-height: 500px; }
@@ -0,0 +1,34 @@
1
+ $page-header-height: ($spacer * 4.5);
2
+ $page-header-height-admin: ($spacer * 6.5);
3
+
4
+ // Page header specific styles
5
+ .page-header {
6
+ width: 100%;
7
+ background-color: $white;
8
+ border-bottom: $border-width solid $border-color;
9
+ z-index: $zindex-fixed;
10
+ @include media-breakpoint-up(lg) {
11
+ position: fixed;
12
+ top: 0;
13
+ left: 0;
14
+ right: 0;
15
+ min-height: $page-header-height;
16
+ }
17
+ body.admin & { // this renders as body.admin .page-header specifying when the view is in admin status
18
+ @include media-breakpoint-up(lg) { min-height: $page-header-height-admin; }
19
+ }
20
+ }
21
+
22
+ // Moving .page-content container down with padding when page-header exists but ONLY on larger screens
23
+ .page-header {
24
+ + .page-content {
25
+ @include media-breakpoint-up(lg) {
26
+ padding-top: $page-header-height;
27
+ }
28
+ }
29
+ body.admin & + .page-content { // this renders as body.admin .page-header + .page-content specifying when the view is in admin status
30
+ @include media-breakpoint-up(lg) {
31
+ padding-top: $page-header-height-admin;
32
+ }
33
+ }
34
+ }
@@ -43,12 +43,14 @@ module NfgUi
43
43
  end
44
44
 
45
45
  def render
46
+ @body = yield if block_given?
47
+
46
48
  if tooltip && disabled
47
49
  content_tag(:span, disabled_component_tooltip_wrapper_html_options) do
48
50
  content_tag(as, html_options) do
49
51
  capture do
50
52
  concat(left_icon_component) if left_icon
51
- concat(block_given? ? yield : body)
53
+ concat(body)
52
54
  concat(right_icon_component) if icon
53
55
  end
54
56
  end
@@ -58,7 +60,7 @@ module NfgUi
58
60
  content_tag(as, html_options) do
59
61
  capture do
60
62
  concat(left_icon_component) if left_icon
61
- concat(block_given? ? yield : body)
63
+ concat(body)
62
64
  concat(right_icon_component) if icon
63
65
  end
64
66
  end
@@ -76,10 +78,14 @@ module NfgUi
76
78
 
77
79
  def right_icon_component
78
80
  NfgUi::Components::Foundations::Icon.new({ traits: [icon, :right],
79
- class: NfgUi::Components::Foundations::Icon::RIGHT_ICON_SPACER_CSS_CLASS },
81
+ class: right_icon_class },
80
82
  view_context).render
81
83
  end
82
84
 
85
+ def right_icon_class
86
+ NfgUi::Components::Foundations::Icon::RIGHT_ICON_SPACER_CSS_CLASS if body.present?
87
+ end
88
+
83
89
  def base_element
84
90
  as
85
91
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NfgUi
4
- VERSION = '0.11.10'
4
+ VERSION = '0.11.14'
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.10
4
+ version: 0.11.14
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: 2021-01-04 00:00:00.000000000 Z
12
+ date: 2021-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap
@@ -501,6 +501,7 @@ files:
501
501
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_custom.scss
502
502
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_dropdown.scss
503
503
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_forms.scss
504
+ - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_modal.scss
504
505
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_nav.scss
505
506
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_progress.scss
506
507
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_reboot.scss
@@ -509,6 +510,7 @@ files:
509
510
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_type.scss
510
511
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_avatar.scss
511
512
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_device_preview.scss
513
+ - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_drawer.scss
512
514
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_icon.scss
513
515
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_illustration.scss
514
516
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_mobile.scss
@@ -541,13 +543,16 @@ files:
541
543
  - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_list-group.scss
542
544
  - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_nav.scss
543
545
  - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_navbar.scss
544
- - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_admin_bar.scss
546
+ - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/_reboot.scss
545
547
  - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_background_variations.scss
546
548
  - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_donor_account.scss
549
+ - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_donor_scroll.scss
547
550
  - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_event.scss
551
+ - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_event_livestream.scss
548
552
  - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_everyday_default.scss
549
553
  - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_everyday_story.scss
550
554
  - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_footer_links.scss
555
+ - app/assets/stylesheets/nfg_ui/network_for_good/public/nfg_theme/custom/_page_header.scss
551
556
  - app/controllers/nfg_ui/application_controller.rb
552
557
  - app/helpers/nfg_ui/application_helper.rb
553
558
  - app/helpers/nfg_ui/components/browser_helper.rb
@@ -1,20 +0,0 @@
1
- // Remove styles and use bs4 structure and styles once update is final
2
-
3
- .admin-bar {
4
- position: relative;
5
- z-index: 100;
6
- font-weight: $font-weight-bold;
7
- color: $text-muted;
8
- text-transform: uppercase;
9
- background-color: $black;
10
- }
11
- .admin-bar-descriptor {
12
- display: inline-block;
13
- padding: ($spacer * .5) 0;
14
- }
15
- .admin-bar-main-links a {
16
- display: inline-block;
17
- padding: ($spacer * .5);
18
- color: $white;
19
- &:hover, &:active { color: $text-muted; }
20
- }