dxw_govuk_frontend_rails 3.5.0 → 3.6.0

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: ae09a9588462372293e8a6feaa9815bd7317909f8fe984fedfc1fa4eb39d112c
4
- data.tar.gz: de694312ec22a3117847497310c0d21f078172fe49ef1ff65442f41b87ed8e48
3
+ metadata.gz: de482bfdfa09a6ce5fa71d92b1e3aeba8067157a06e3da22bc86b34713b7c9b8
4
+ data.tar.gz: f3e866b3cb02ec7ef83d934beddb3ee3a84d17cf191228051301a5301d551f10
5
5
  SHA512:
6
- metadata.gz: 4663f2f1786ab540e0d329a96265946b66f45cad0fc220623db398975cebecd7cfc9c1a092d320a53c2c8fe2cc6e7969a1820e64826bda545d50eecc34c89458
7
- data.tar.gz: d3024c1c0d1615e8c8f5f18d18eabeec53eec3b2ee0fc877bcde5403609f0b733a8dee3d067beeb9ee62638688b52116bc480d645d492b443eb9b17cf37b6a52
6
+ metadata.gz: 9e1a93086b6f6ed875cb2d63452496cd20ba10c82d6b3f344ea3aa8bc82abf82ce07c5b76e473a864065066cf3cdd852425973c6105f47ec2991e71bc85f5e4e
7
+ data.tar.gz: b45b9b5aa0bcc6f675d07438cfb9092dec30f836fe95f2ac594b74034c0ec85ff277dcf0478fb2f133398ccf30a0fc47670769e75ed997737984bdcb899a43a9
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dxw_govuk_frontend_rails (3.5.0)
4
+ dxw_govuk_frontend_rails (3.6.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module DxwGovukFrontendRails
2
- VERSION = "3.5.0"
2
+ VERSION = "3.6.0"
3
3
  end
@@ -5,9 +5,9 @@
5
5
  "requires": true,
6
6
  "dependencies": {
7
7
  "govuk-frontend": {
8
- "version": "3.5.0",
9
- "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.5.0.tgz",
10
- "integrity": "sha512-4tNKgcChO1bMNsrTz2UsK4fDMmU9R87UDxy/KhKIMbnhsuJLVuArDveYLkZuUsZ6B3eaCbl5gmI8i/Q/Mi680A=="
8
+ "version": "3.6.0",
9
+ "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.6.0.tgz",
10
+ "integrity": "sha512-wTxufdY8vFvKJ2EmmQKmarrQ7n30kzg+vvqgGib2dawl7c5Wst8dffkEJQpy9Zs99TE/yEEFgj0VUO4GRUO22A=="
11
11
  }
12
12
  }
13
13
  }
@@ -21,6 +21,6 @@
21
21
  },
22
22
  "homepage": "https://github.com/mec/dxw_govuk_frontend_rails#readme",
23
23
  "dependencies": {
24
- "govuk-frontend": "3.5.0"
24
+ "govuk-frontend": "3.6.0"
25
25
  }
26
26
  }
@@ -1748,7 +1748,7 @@ Checkboxes.prototype.handleClick = function (event) {
1748
1748
 
1749
1749
  if (detect) return
1750
1750
 
1751
- // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/polyfill.js
1751
+ // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/polyfill.js
1752
1752
  Element.prototype.closest = function closest(selector) {
1753
1753
  var node = this;
1754
1754
 
@@ -2026,51 +2026,41 @@ Radios.prototype.handleClick = function (event) {
2026
2026
 
2027
2027
  (function(undefined) {
2028
2028
 
2029
- // Detection from https://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-b09a5d2acf3314b46a6c8f8d0c31b85c
2029
+ // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/nextElementSibling/detect.js
2030
2030
  var detect = (
2031
- 'Element' in this && "nextElementSibling" in document.documentElement
2031
+ 'document' in this && "nextElementSibling" in document.documentElement
2032
2032
  );
2033
2033
 
2034
2034
  if (detect) return
2035
2035
 
2036
-
2037
- (function (global) {
2038
-
2039
- // There is no polyfill in polyfill-library (https://github.com/Financial-Times/polyfill-library/issues/338)
2040
- // So we source this from https://github.com/Alhadis/Snippets/blob/e09b4dfb7ffc9e250bc28319051e39ead3e5f70a/js/polyfills/IE8-child-elements.js#L28-L33
2041
- Object.defineProperty(Element.prototype, "nextElementSibling", {
2042
- get: function(){
2043
- var el = this.nextSibling;
2044
- while (el && el.nodeType !== 1) { el = el.nextSibling; }
2045
- return el;
2046
- }
2047
- });
2048
-
2049
- }(this));
2036
+ // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/nextElementSibling/polyfill.js
2037
+ Object.defineProperty(Element.prototype, "nextElementSibling", {
2038
+ get: function(){
2039
+ var el = this.nextSibling;
2040
+ while (el && el.nodeType !== 1) { el = el.nextSibling; }
2041
+ return el;
2042
+ }
2043
+ });
2050
2044
 
2051
2045
  }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
2052
2046
 
2053
2047
  (function(undefined) {
2054
2048
 
2055
- // Detection from https://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-a162235fbc9c0dd40d4032265f44942e
2049
+ // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/previousElementSibling/detect.js
2056
2050
  var detect = (
2057
- 'Element' in this && 'previousElementSibling' in document.documentElement
2051
+ 'document' in this && "previousElementSibling" in document.documentElement
2058
2052
  );
2059
2053
 
2060
2054
  if (detect) return
2061
2055
 
2062
- (function (global) {
2063
- // There is no polyfill in polyfill-library (https://github.com/Financial-Times/polyfill-library/issues/338)
2064
- // So we source this from https://github.com/Alhadis/Snippets/blob/e09b4dfb7ffc9e250bc28319051e39ead3e5f70a/js/polyfills/IE8-child-elements.js#L35-L40
2065
- Object.defineProperty(Element.prototype, 'previousElementSibling', {
2066
- get: function(){
2067
- var el = this.previousSibling;
2068
- while (el && el.nodeType !== 1) { el = el.previousSibling; }
2069
- return el;
2070
- }
2071
- });
2072
-
2073
- }(this));
2056
+ // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/previousElementSibling/polyfill.js
2057
+ Object.defineProperty(Element.prototype, 'previousElementSibling', {
2058
+ get: function(){
2059
+ var el = this.previousSibling;
2060
+ while (el && el.nodeType !== 1) { el = el.previousSibling; }
2061
+ return el;
2062
+ }
2063
+ });
2074
2064
 
2075
2065
  }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
2076
2066
 
@@ -38,7 +38,54 @@
38
38
  }
39
39
  }
40
40
 
41
+ // Deprecated. We'll remove this class in a future release. Use `.govuk-tag--grey` instead.
41
42
  .govuk-tag--inactive {
42
43
  background-color: govuk-colour("dark-grey", $legacy: "grey-1");
43
44
  }
45
+
46
+ .govuk-tag--grey {
47
+ color: govuk-shade(govuk-colour("dark-grey", $legacy: "grey-1"), 30);
48
+ background: govuk-tint(govuk-colour("dark-grey", $legacy: "grey-1"), 90);
49
+ }
50
+
51
+ .govuk-tag--purple {
52
+ color: govuk-shade(govuk-colour("purple"), 20);
53
+ background: govuk-tint(govuk-colour("purple"), 80);
54
+ }
55
+
56
+ .govuk-tag--turquoise {
57
+ color: govuk-shade(govuk-colour("turquoise"), 60);
58
+ background: govuk-tint(govuk-colour("turquoise"), 70);
59
+ }
60
+
61
+ .govuk-tag--blue {
62
+ color: govuk-shade(govuk-colour("blue"), 30);
63
+ background: govuk-tint(govuk-colour("blue"), 80);
64
+ }
65
+
66
+ .govuk-tag--yellow {
67
+ color: govuk-shade(govuk-colour("yellow"), 65);
68
+ background: govuk-tint(govuk-colour("yellow"), 75);
69
+ }
70
+
71
+ .govuk-tag--orange {
72
+ color: govuk-shade(govuk-colour("orange"), 55);
73
+ background: govuk-tint(govuk-colour("orange"), 70);
74
+ }
75
+
76
+ .govuk-tag--red {
77
+ color: govuk-shade(govuk-colour("red"), 30);
78
+ background: govuk-tint(govuk-colour("red"), 80);
79
+ }
80
+
81
+ .govuk-tag--pink {
82
+ color: govuk-shade(govuk-colour("pink"), 40);
83
+ background: govuk-tint(govuk-colour("pink"), 80);
84
+ }
85
+
86
+ .govuk-tag--green {
87
+ color: govuk-shade(govuk-colour("green"), 20);
88
+ background: govuk-tint(govuk-colour("green"), 80);
89
+ }
90
+
44
91
  }
@@ -82,16 +82,16 @@
82
82
  @if $breakpoint == null {
83
83
 
84
84
  @if $direction == all {
85
- #{$property}: $breakpoint-value iff($important, !important);
85
+ #{$property}: $breakpoint-value if($important, !important, null);
86
86
  } @else {
87
- #{$property}-#{$direction}: $breakpoint-value iff($important, !important);
87
+ #{$property}-#{$direction}: $breakpoint-value if($important, !important, null);
88
88
  }
89
89
  } @else {
90
90
  @include govuk-media-query($from: $breakpoint) {
91
91
  @if $direction == all {
92
- #{$property}: $breakpoint-value iff($important, !important);
92
+ #{$property}: $breakpoint-value if($important, !important, null);
93
93
  } @else {
94
- #{$property}-#{$direction}: $breakpoint-value iff($important, !important);
94
+ #{$property}-#{$direction}: $breakpoint-value if($important, !important, null);
95
95
  }
96
96
  }
97
97
  }
@@ -53,7 +53,7 @@
53
53
  /// @access public
54
54
 
55
55
  @mixin govuk-typography-weight-regular($important: false) {
56
- font-weight: $govuk-font-weight-regular iff($important, !important);
56
+ font-weight: $govuk-font-weight-regular if($important, !important, null);
57
57
  }
58
58
 
59
59
  /// Bold font weight helper
@@ -63,7 +63,7 @@
63
63
  /// @access public
64
64
 
65
65
  @mixin govuk-typography-weight-bold($important: false) {
66
- font-weight: $govuk-font-weight-bold iff($important, !important);
66
+ font-weight: $govuk-font-weight-bold if($important, !important, null);
67
67
  }
68
68
 
69
69
  /// Convert line-heights specified in pixels into a relative value, unless
@@ -137,9 +137,9 @@
137
137
  // Mark rules as !important if $important is true - this will result in
138
138
  // these variables becoming strings, so this needs to happen *after* they
139
139
  // are used in calculations
140
- $font-size: $font-size iff($important, !important);
141
- $font-size-rem: $font-size-rem iff($important, !important);
142
- $line-height: $line-height iff($important, !important);
140
+ $font-size: $font-size if($important, !important, null);
141
+ $font-size-rem: $font-size-rem if($important, !important, null);
142
+ $line-height: $line-height if($important, !important, null);
143
143
 
144
144
  @if $breakpoint == null {
145
145
  font-size: $font-size; // sass-lint:disable no-duplicate-properties
@@ -14,26 +14,26 @@
14
14
  /// @access public
15
15
 
16
16
  @mixin govuk-visually-hidden($important: true) {
17
- position: absolute iff($important, !important);
17
+ position: absolute if($important, !important, null);
18
18
 
19
- width: 1px iff($important, !important);
20
- height: 1px iff($important, !important);
19
+ width: 1px if($important, !important, null);
20
+ height: 1px if($important, !important, null);
21
21
  // If margin is set to a negative value it can cause text to be announced in
22
22
  // the wrong order in VoiceOver for OSX
23
- margin: 0 iff($important, !important);
24
- padding: 0 iff($important, !important);
23
+ margin: 0 if($important, !important, null);
24
+ padding: 0 if($important, !important, null);
25
25
 
26
- overflow: hidden iff($important, !important);
27
- clip: rect(0 0 0 0) iff($important, !important);
28
- -webkit-clip-path: inset(50%) iff($important, !important);
29
- clip-path: inset(50%) iff($important, !important);
26
+ overflow: hidden if($important, !important, null);
27
+ clip: rect(0 0 0 0) if($important, !important, null);
28
+ -webkit-clip-path: inset(50%) if($important, !important, null);
29
+ clip-path: inset(50%) if($important, !important, null);
30
30
 
31
- border: 0 iff($important, !important);
31
+ border: 0 if($important, !important, null);
32
32
 
33
33
  // For long content, line feeds are not interpreted as spaces and small width
34
34
  // causes content to wrap 1 word per line:
35
35
  // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
36
- white-space: nowrap iff($important, !important);
36
+ white-space: nowrap if($important, !important, null);
37
37
  }
38
38
 
39
39
  /// Hide an element visually, but have it available for screen readers whilst
@@ -48,37 +48,37 @@
48
48
  /// @access public
49
49
 
50
50
  @mixin govuk-visually-hidden-focusable($important: true) {
51
- position: absolute iff($important, !important);
51
+ position: absolute if($important, !important, null);
52
52
 
53
- width: 1px iff($important, !important);
54
- height: 1px iff($important, !important);
53
+ width: 1px if($important, !important, null);
54
+ height: 1px if($important, !important, null);
55
55
  // If margin is set to a negative value it can cause text to be announced in
56
56
  // the wrong order in VoiceOver for OSX
57
- margin: 0 iff($important, !important);
57
+ margin: 0 if($important, !important, null);
58
58
 
59
- overflow: hidden iff($important, !important);
60
- clip: rect(0 0 0 0) iff($important, !important);
61
- -webkit-clip-path: inset(50%) iff($important, !important);
62
- clip-path: inset(50%) iff($important, !important);
59
+ overflow: hidden if($important, !important, null);
60
+ clip: rect(0 0 0 0) if($important, !important, null);
61
+ -webkit-clip-path: inset(50%) if($important, !important, null);
62
+ clip-path: inset(50%) if($important, !important, null);
63
63
 
64
64
  // For long content, line feeds are not interpreted as spaces and small width
65
65
  // causes content to wrap 1 word per line:
66
66
  // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
67
- white-space: nowrap iff($important, !important);
67
+ white-space: nowrap if($important, !important, null);
68
68
 
69
69
  &:active,
70
70
  &:focus {
71
- position: static iff($important, !important);
71
+ position: static if($important, !important, null);
72
72
 
73
- width: auto iff($important, !important);
74
- height: auto iff($important, !important);
75
- margin: inherit iff($important, !important);
73
+ width: auto if($important, !important, null);
74
+ height: auto if($important, !important, null);
75
+ margin: inherit if($important, !important, null);
76
76
 
77
- overflow: visible iff($important, !important);
78
- clip: auto iff($important, !important);
79
- -webkit-clip-path: none iff($important, !important);
80
- clip-path: none iff($important, !important);
77
+ overflow: visible if($important, !important, null);
78
+ clip: auto if($important, !important, null);
79
+ -webkit-clip-path: none if($important, !important, null);
80
+ clip-path: none if($important, !important, null);
81
81
 
82
- white-space: inherit iff($important, !important);
82
+ white-space: inherit if($important, !important, null);
83
83
  }
84
84
  }
@@ -19,4 +19,10 @@
19
19
  .govuk-\!-display-none {
20
20
  display: none !important;
21
21
  }
22
+
23
+ @include govuk-media-query($media-type: print) {
24
+ .govuk-\!-display-none-print {
25
+ display: none !important;
26
+ }
27
+ }
22
28
  }
@@ -8,8 +8,10 @@
8
8
  /// @param {Boolean} $condition - Whether to return the value of `$if-true`
9
9
  /// @param {Mixed} $if-true - Value to return if `$condition` is truthy
10
10
  /// @return {Mixed} Value of `$if-true` if `$condition` is truthy, else null
11
- /// @access public
11
+ /// @access private
12
+ /// @deprecated We will be removing this function in a future release, use `if($condition, $if-true, null);` instead.
12
13
 
13
14
  @function iff($condition, $if-true) {
15
+ @warn "The `iff` function will be removed in a future release, use `if($condition, $if-true, null);` instead.";
14
16
  @return if($condition, $if-true, null);
15
17
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dxw_govuk_frontend_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mec