nfg_ui 0.12.2 → 0.12.3

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: b0ea8825884109af59da5cbe436bfb4fc5142fce0c012bf96d5fd13d20758054
4
- data.tar.gz: 04bb29011a602d090d4eba4392f0213b70b05005ed73125c48b4dacee8e930d3
3
+ metadata.gz: b45c3d32a180df2da86ae37f687850785b8a5c22833c4b70b0e0371f48e1b3cc
4
+ data.tar.gz: ab34a149c78bf3b596ddc5ea990ab3bd27372fd340166908b47aefe5df519d85
5
5
  SHA512:
6
- metadata.gz: d02bf2c10fb4fce63425f694b0faf4367d3d735efacfa225bfdc31f6e02a05496b109a1635cef6598a953cfa1fc2862b0f3274d0a470c1827c821f718df57eab
7
- data.tar.gz: b879e58d088973854bd19fc8794f3763f8f1b7f72a2c029ba1c4aedaf8dd071102871bc01d02a99915bcb639a778b1e1ba29a7c7f7c892692d7c6e756b153bd6
6
+ metadata.gz: 44f3894e5054710f58a2198ca37c0a5ffbdb6e1a96c6c90d7d71363afbbd70ebee58b6d855b55ef0fcf90c03c5af04df8f2ecd5fe2dd401cf6223b168183d25f
7
+ data.tar.gz: b3dc49d58c96fe8ee3020d561c27d93950513c862b15174f92b1a45ec197af8d803691bf48eab1b948e06aec10ebe62b7247874feefbddbe9a9b3b11ade5cc8f
@@ -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()
@@ -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; }
@@ -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.3'
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.3
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-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap