nfg_ui 0.12.2 → 0.12.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: b0ea8825884109af59da5cbe436bfb4fc5142fce0c012bf96d5fd13d20758054
4
- data.tar.gz: 04bb29011a602d090d4eba4392f0213b70b05005ed73125c48b4dacee8e930d3
3
+ metadata.gz: 5bbafc30ea4243b1b4053b0ea9556031985f5d9f13a0800542a45d8a92c6a854
4
+ data.tar.gz: ea57532fe3f800a39722870962424ae6c11868d333c39292703c4df18266f8b0
5
5
  SHA512:
6
- metadata.gz: d02bf2c10fb4fce63425f694b0faf4367d3d735efacfa225bfdc31f6e02a05496b109a1635cef6598a953cfa1fc2862b0f3274d0a470c1827c821f718df57eab
7
- data.tar.gz: b879e58d088973854bd19fc8794f3763f8f1b7f72a2c029ba1c4aedaf8dd071102871bc01d02a99915bcb639a778b1e1ba29a7c7f7c892692d7c6e756b153bd6
6
+ metadata.gz: b9642aa6a7d9b14a2523bd3ced6b4a8cfa2cb905fd614f3484ba748447fec2e1f96c3dbdffe42f0baf4e9f042b45ce49cdd455b6bba56c32cbda13383465aefd
7
+ data.tar.gz: 65e30453eb0709ca978786c273751ad6116e823f1f5eae35439b0b832ce26f117afd010081baaf9ba8800dd0ca5d1c37e5be7736b508bad1556a854a5f17a80d
@@ -1,3 +1,6 @@
1
+ if typeof NfgUi == "undefined"
2
+ window.NfgUi = {}
3
+
1
4
  class NfgUi.CollapsibleToggle
2
5
  constructor: (@el) ->
3
6
  @target = @collapseTarget()
@@ -8,6 +8,7 @@
8
8
 
9
9
  // Plugins
10
10
  @import 'nfg_ui/network_for_good/core/plugins/intercom';
11
+ @import 'nfg_ui/network_for_good/core/plugins/multi';
11
12
  @import 'nfg_ui/network_for_good/core/plugins/turbolinks';
12
13
  @import 'nfg_ui/network_for_good/core/plugins/twitter_typeahead';
13
14
 
@@ -34,6 +34,7 @@
34
34
  //** For when the date and time pickers are side by side.
35
35
  &.timepicker-sbs {
36
36
  @include media-breakpoint-up(md) {
37
+ min-width: ($spacer * 20);
37
38
  max-width: ($spacer * 20);
38
39
  }
39
40
  .row { align-items: center; }
@@ -0,0 +1,64 @@
1
+ //** Multi plugin used in export contacts/donations modal in DM
2
+
3
+ .multi-wrapper {
4
+ border: $border-width solid $border-color;
5
+ border-radius: $border-radius;
6
+ width: 100%;
7
+ .search-input {
8
+ border: 0;
9
+ border-bottom: $border-width solid $border-color;
10
+ border-radius: 0;
11
+ display: block;
12
+ font-size: $font-size-base;
13
+ margin: 0;
14
+ outline: 0;
15
+ padding: $input-btn-padding-y $input-btn-padding-x;
16
+ width: 100%;
17
+ box-sizing: border-box;
18
+ }
19
+ .item {
20
+ cursor: pointer;
21
+ display: block;
22
+ position: relative;
23
+ padding: ($spacer * .25);
24
+ border-radius: $border-radius;
25
+ &:hover { background: $gray-200; }
26
+ }
27
+ .non-selected-wrapper, .selected-wrapper {
28
+ box-sizing: border-box;
29
+ display: inline-block;
30
+ height: ($spacer * 8);
31
+ overflow-y: scroll;
32
+ padding: ($spacer * .5);
33
+ vertical-align: top;
34
+ width: 50%;
35
+ }
36
+ .non-selected-wrapper {
37
+ background: $body-bg;
38
+ border-right: $border-width solid $border-color;
39
+ .item.selected {
40
+ padding-right: $spacer;
41
+ color: inherit;
42
+ background: $gray-200;
43
+ opacity: 0.5;
44
+ &:hover {
45
+ background: $gray-200;
46
+ cursor: inherit;
47
+ }
48
+ &:after {
49
+ position: absolute;
50
+ top: ($spacer * .25);
51
+ right: 0;
52
+ width: $spacer;
53
+ font-family: "FontAwesome";
54
+ font-size: $font-size-base;
55
+ line-height: 1.5;
56
+ color: inherit;
57
+ text-align: center;
58
+ content: '\f00c';
59
+ z-index: 5;
60
+ }
61
+ }
62
+ }
63
+ .selected-wrapper { background: $white; }
64
+ }
@@ -17,13 +17,13 @@ module NfgUi
17
17
  def render
18
18
  super do
19
19
  if collapsible && title
20
- concat(NfgUi::Components::Elements::Button.new({ traits: [:link, :block], collapse: collapse, class: 'no-link-color p-0 m-0' }, view_context).render {
20
+ concat(NfgUi::Components::Elements::Button.new({ traits: [:link, :block], collapse: collapse, class: 'no-link-color p-0 m-0', data: { collapse_icon: collapse_icon, collapsed_icon: collapsed_icon } }, view_context).render {
21
21
  content_tag(:div, class: 'row align-items-center') do
22
22
  concat(content_tag(:div, class: 'col-10 text-left') {
23
23
  NfgUi::Components::Foundations::Typeface.new({ heading: title, icon: icon, class: 'h4' }, view_context).render
24
24
  })
25
25
  concat(content_tag(:div, class: 'col-2 text-right') {
26
- NfgUi::Components::Foundations::Icon.new({ traits: ['caret-down fw'], tooltip: 'Show / hide additional information' }, view_context).render
26
+ NfgUi::Components::Foundations::Icon.new({ traits: ["#{contextual_collapsible_icon} fw"], tooltip: 'Show / hide additional information' }, view_context).render
27
27
  })
28
28
  end
29
29
  })
@@ -34,6 +34,21 @@ module NfgUi
34
34
  concat((block_given? ? yield : body))
35
35
  end
36
36
  end
37
+
38
+ private
39
+
40
+ def contextual_collapsible_icon
41
+ return '' unless collapsible
42
+ collapsed ? collapsed_icon : collapse_icon
43
+ end
44
+
45
+ def collapse_icon
46
+ 'caret-up'
47
+ end
48
+
49
+ def collapsed_icon
50
+ 'caret-down'
51
+ end
37
52
  end
38
53
  end
39
54
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NfgUi
4
- VERSION = '0.12.2'
4
+ VERSION = '0.12.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.12.2
4
+ version: 0.12.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: 2021-06-25 00:00:00.000000000 Z
12
+ date: 2021-07-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap
@@ -149,14 +149,14 @@ dependencies:
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: 1.10.4
152
+ version: 1.11.4
153
153
  type: :runtime
154
154
  prerelease: false
155
155
  version_requirements: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - ">="
158
158
  - !ruby/object:Gem::Version
159
- version: 1.10.4
159
+ version: 1.11.4
160
160
  - !ruby/object:Gem::Dependency
161
161
  name: browser
162
162
  requirement: !ruby/object:Gem::Requirement
@@ -530,6 +530,7 @@ files:
530
530
  - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_datepicker.scss
531
531
  - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_datetimepicker.scss
532
532
  - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_intercom.scss
533
+ - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_multi.scss
533
534
  - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_select2.scss
534
535
  - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_sticky_div.scss
535
536
  - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_turbolinks.scss