dxw_govuk_frontend_rails 3.5.0 → 3.6.0
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/dxw_govuk_frontend_rails/version.rb +1 -1
- data/package-lock.json +3 -3
- data/package.json +1 -1
- data/vendor/assets/javascripts/govuk_frontend_rails.js +21 -31
- data/vendor/assets/stylesheets/components/tag/_tag.scss +47 -0
- data/vendor/assets/stylesheets/helpers/_spacing.scss +4 -4
- data/vendor/assets/stylesheets/helpers/_typography.scss +5 -5
- data/vendor/assets/stylesheets/helpers/_visually-hidden.scss +29 -29
- data/vendor/assets/stylesheets/overrides/_display.scss +6 -0
- data/vendor/assets/stylesheets/tools/_iff.scss +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de482bfdfa09a6ce5fa71d92b1e3aeba8067157a06e3da22bc86b34713b7c9b8
|
4
|
+
data.tar.gz: f3e866b3cb02ec7ef83d934beddb3ee3a84d17cf191228051301a5301d551f10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e1a93086b6f6ed875cb2d63452496cd20ba10c82d6b3f344ea3aa8bc82abf82ce07c5b76e473a864065066cf3cdd852425973c6105f47ec2991e71bc85f5e4e
|
7
|
+
data.tar.gz: b45b9b5aa0bcc6f675d07438cfb9092dec30f836fe95f2ac594b74034c0ec85ff277dcf0478fb2f133398ccf30a0fc47670769e75ed997737984bdcb899a43a9
|
data/Gemfile.lock
CHANGED
data/package-lock.json
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
"requires": true,
|
6
6
|
"dependencies": {
|
7
7
|
"govuk-frontend": {
|
8
|
-
"version": "3.
|
9
|
-
"resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.
|
10
|
-
"integrity": "sha512-
|
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
|
}
|
data/package.json
CHANGED
@@ -1748,7 +1748,7 @@ Checkboxes.prototype.handleClick = function (event) {
|
|
1748
1748
|
|
1749
1749
|
if (detect) return
|
1750
1750
|
|
1751
|
-
|
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://
|
2029
|
+
// Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/nextElementSibling/detect.js
|
2030
2030
|
var detect = (
|
2031
|
-
'
|
2031
|
+
'document' in this && "nextElementSibling" in document.documentElement
|
2032
2032
|
);
|
2033
2033
|
|
2034
2034
|
if (detect) return
|
2035
2035
|
|
2036
|
-
|
2037
|
-
(
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
2043
|
-
|
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://
|
2049
|
+
// Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/previousElementSibling/detect.js
|
2056
2050
|
var detect = (
|
2057
|
-
'
|
2051
|
+
'document' in this && "previousElementSibling" in document.documentElement
|
2058
2052
|
);
|
2059
2053
|
|
2060
2054
|
if (detect) return
|
2061
2055
|
|
2062
|
-
|
2063
|
-
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
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
|
85
|
+
#{$property}: $breakpoint-value if($important, !important, null);
|
86
86
|
} @else {
|
87
|
-
#{$property}-#{$direction}: $breakpoint-value
|
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
|
92
|
+
#{$property}: $breakpoint-value if($important, !important, null);
|
93
93
|
} @else {
|
94
|
-
#{$property}-#{$direction}: $breakpoint-value
|
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
|
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
|
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
|
141
|
-
$font-size-rem: $font-size-rem
|
142
|
-
$line-height: $line-height
|
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
|
17
|
+
position: absolute if($important, !important, null);
|
18
18
|
|
19
|
-
width: 1px
|
20
|
-
height: 1px
|
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
|
24
|
-
padding: 0
|
23
|
+
margin: 0 if($important, !important, null);
|
24
|
+
padding: 0 if($important, !important, null);
|
25
25
|
|
26
|
-
overflow: hidden
|
27
|
-
clip: rect(0 0 0 0)
|
28
|
-
-webkit-clip-path: inset(50%)
|
29
|
-
clip-path: inset(50%)
|
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
|
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
|
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
|
51
|
+
position: absolute if($important, !important, null);
|
52
52
|
|
53
|
-
width: 1px
|
54
|
-
height: 1px
|
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
|
57
|
+
margin: 0 if($important, !important, null);
|
58
58
|
|
59
|
-
overflow: hidden
|
60
|
-
clip: rect(0 0 0 0)
|
61
|
-
-webkit-clip-path: inset(50%)
|
62
|
-
clip-path: inset(50%)
|
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
|
67
|
+
white-space: nowrap if($important, !important, null);
|
68
68
|
|
69
69
|
&:active,
|
70
70
|
&:focus {
|
71
|
-
position: static
|
71
|
+
position: static if($important, !important, null);
|
72
72
|
|
73
|
-
width: auto
|
74
|
-
height: auto
|
75
|
-
margin: inherit
|
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
|
78
|
-
clip: auto
|
79
|
-
-webkit-clip-path: none
|
80
|
-
clip-path: none
|
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
|
82
|
+
white-space: inherit if($important, !important, null);
|
83
83
|
}
|
84
84
|
}
|
@@ -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
|
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
|
}
|