govuk_publishing_components 16.29.0 → 17.0.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/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +46 -23
- data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +8 -2
- data/app/assets/javascripts/govuk_publishing_components/lib/cookie-functions.js +101 -21
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +9 -2
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +4 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +36 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_heading.scss +14 -14
- data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +23 -23
- data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +8 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_lead-paragraph.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +8 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +10 -10
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +11 -14
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +14 -14
- data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +8 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +7 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +20 -16
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +5 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-list.scss +5 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +8 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav-header.scss +1 -1
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +33 -25
- data/app/views/govuk_publishing_components/components/_error_summary.html.erb +4 -2
- data/app/views/govuk_publishing_components/components/_notice.html.erb +4 -1
- data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/error_summary.yml +6 -0
- data/app/views/govuk_publishing_components/components/docs/notice.yml +6 -0
- data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
- data/lib/govuk_publishing_components/presenters/cookie_banner_helper.rb +0 -4
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js +1 -1
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map +1 -1
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js +1 -1
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map +1 -1
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js +1 -1
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map +1 -1
- data/node_modules/accessible-autocomplete/package.json +3 -3
- data/node_modules/accessible-autocomplete/src/autocomplete.js +4 -2
- data/node_modules/accessible-autocomplete/src/wrapper.js +5 -1
- data/node_modules/d/CHANGELOG.md +9 -0
- data/node_modules/d/CHANGES +4 -0
- data/node_modules/d/LICENSE +12 -16
- data/node_modules/d/README.md +49 -19
- data/node_modules/d/auto-bind.js +11 -10
- data/node_modules/d/index.js +23 -24
- data/node_modules/d/lazy.js +21 -23
- data/node_modules/d/package.json +63 -16
- data/node_modules/d/test/auto-bind.js +6 -7
- data/node_modules/d/test/index.js +78 -51
- data/node_modules/d/test/lazy.js +65 -50
- data/node_modules/es6-weak-map/CHANGELOG.md +5 -0
- data/node_modules/es6-weak-map/LICENSE +12 -16
- data/node_modules/es6-weak-map/README.md +34 -19
- data/node_modules/es6-weak-map/implement.js +9 -5
- data/node_modules/es6-weak-map/index.js +2 -2
- data/node_modules/es6-weak-map/is-implemented.js +10 -9
- data/node_modules/es6-weak-map/is-native-implemented.js +3 -3
- data/node_modules/es6-weak-map/is-weak-map.js +8 -8
- data/node_modules/es6-weak-map/package.json +30 -19
- data/node_modules/es6-weak-map/polyfill.js +31 -32
- data/node_modules/es6-weak-map/test/implement.js +4 -2
- data/node_modules/es6-weak-map/test/index.js +4 -3
- data/node_modules/es6-weak-map/test/is-implemented.js +9 -8
- data/node_modules/es6-weak-map/test/is-native-implemented.js +4 -2
- data/node_modules/es6-weak-map/test/is-weak-map.js +4 -4
- data/node_modules/es6-weak-map/test/polyfill.js +13 -13
- data/node_modules/es6-weak-map/test/valid-weak-map.js +22 -9
- data/node_modules/es6-weak-map/valid-weak-map.js +5 -5
- data/node_modules/resolve/lib/async.js +1 -1
- data/node_modules/resolve/lib/node-modules-paths.js +1 -1
- data/node_modules/resolve/lib/sync.js +0 -2
- data/node_modules/resolve/package.json +13 -13
- data/node_modules/resolve/test/node-modules-paths.js +0 -22
- data/node_modules/resolve/test/resolver.js +11 -0
- data/node_modules/resolve/test/resolver_sync.js +11 -0
- data/node_modules/standard/node_modules/ms/index.js +2 -2
- data/node_modules/standard/node_modules/ms/package.json +205 -16
- data/node_modules/standard/node_modules/ms/readme.md +1 -1
- data/node_modules/type/CHANGELOG.md +62 -0
- data/node_modules/type/README.md +743 -0
- data/node_modules/type/array-length/coerce.js +10 -0
- data/node_modules/type/array-length/ensure.js +10 -0
- data/node_modules/type/array-like/ensure.js +9 -0
- data/node_modules/type/array-like/is.js +21 -0
- data/node_modules/type/array/ensure.js +9 -0
- data/node_modules/type/array/is.js +27 -0
- data/node_modules/type/date/ensure.js +9 -0
- data/node_modules/type/date/is.js +26 -0
- data/node_modules/type/error/ensure.js +9 -0
- data/node_modules/type/error/is.js +24 -0
- data/node_modules/type/finite/coerce.js +8 -0
- data/node_modules/type/finite/ensure.js +10 -0
- data/node_modules/type/function/ensure.js +9 -0
- data/node_modules/type/function/is.js +19 -0
- data/node_modules/type/integer/coerce.js +11 -0
- data/node_modules/type/integer/ensure.js +10 -0
- data/node_modules/type/iterable/ensure.js +9 -0
- data/node_modules/type/iterable/is.js +20 -0
- data/node_modules/type/lib/is-to-string-tag-supported.js +3 -0
- data/node_modules/type/lib/resolve-exception.js +21 -0
- data/node_modules/type/lib/safe-to-string.js +10 -0
- data/node_modules/type/lib/to-short-string.js +29 -0
- data/node_modules/type/natural-number/coerce.js +10 -0
- data/node_modules/type/natural-number/ensure.js +10 -0
- data/node_modules/type/number/coerce.js +14 -0
- data/node_modules/type/number/ensure.js +10 -0
- data/node_modules/type/object/ensure.js +9 -0
- data/node_modules/type/object/is.js +11 -0
- data/node_modules/type/package.json +159 -0
- data/node_modules/type/plain-function/ensure.js +9 -0
- data/node_modules/type/plain-function/is.js +11 -0
- data/node_modules/type/plain-object/ensure.js +9 -0
- data/node_modules/type/plain-object/is.js +28 -0
- data/node_modules/type/promise/ensure.js +9 -0
- data/node_modules/type/promise/is.js +27 -0
- data/node_modules/type/prototype/is.js +13 -0
- data/node_modules/type/reg-exp/ensure.js +9 -0
- data/node_modules/type/reg-exp/is.js +37 -0
- data/node_modules/type/safe-integer/coerce.js +13 -0
- data/node_modules/type/safe-integer/ensure.js +10 -0
- data/node_modules/type/string/coerce.js +23 -0
- data/node_modules/type/string/ensure.js +10 -0
- data/node_modules/type/test/_lib/arrow-function-if-supported.js +4 -0
- data/node_modules/type/test/_lib/class-if-supported.js +4 -0
- data/node_modules/type/test/array-length/coerce.js +47 -0
- data/node_modules/type/test/array-length/ensure.js +19 -0
- data/node_modules/type/test/array-like/ensure.js +24 -0
- data/node_modules/type/test/array-like/is.js +47 -0
- data/node_modules/type/test/array/ensure.js +20 -0
- data/node_modules/type/test/array/is.js +41 -0
- data/node_modules/type/test/date/ensure.js +20 -0
- data/node_modules/type/test/date/is.js +46 -0
- data/node_modules/type/test/error/ensure.js +20 -0
- data/node_modules/type/test/error/is.js +42 -0
- data/node_modules/type/test/finite/coerce.js +40 -0
- data/node_modules/type/test/finite/ensure.js +17 -0
- data/node_modules/type/test/function/ensure.js +20 -0
- data/node_modules/type/test/function/is.js +46 -0
- data/node_modules/type/test/integer/coerce.js +49 -0
- data/node_modules/type/test/integer/ensure.js +17 -0
- data/node_modules/type/test/iterable/ensure.js +24 -0
- data/node_modules/type/test/iterable/is.js +50 -0
- data/node_modules/type/test/lib/is-to-string-tag-supported.js +10 -0
- data/node_modules/type/test/lib/resolve-exception.js +39 -0
- data/node_modules/type/test/lib/safe-to-string.js +32 -0
- data/node_modules/type/test/lib/to-short-string.js +41 -0
- data/node_modules/type/test/natural-number/coerce.js +47 -0
- data/node_modules/type/test/natural-number/ensure.js +19 -0
- data/node_modules/type/test/number/coerce.js +40 -0
- data/node_modules/type/test/number/ensure.js +17 -0
- data/node_modules/type/test/object/ensure.js +20 -0
- data/node_modules/type/test/object/is.js +30 -0
- data/node_modules/type/test/plain-function/ensure.js +20 -0
- data/node_modules/type/test/plain-function/is.js +56 -0
- data/node_modules/type/test/plain-object/ensure.js +20 -0
- data/node_modules/type/test/plain-object/is.js +47 -0
- data/node_modules/type/test/promise/ensure.js +20 -0
- data/node_modules/type/test/promise/is.js +39 -0
- data/node_modules/type/test/prototype/is.js +39 -0
- data/node_modules/type/test/reg-exp/ensure.js +20 -0
- data/node_modules/type/test/reg-exp/is.js +47 -0
- data/node_modules/type/test/safe-integer/coerce.js +49 -0
- data/node_modules/type/test/safe-integer/ensure.js +19 -0
- data/node_modules/type/test/string/coerce.js +36 -0
- data/node_modules/type/test/string/ensure.js +17 -0
- data/node_modules/type/test/thenable/ensure.js +20 -0
- data/node_modules/type/test/thenable/is.js +44 -0
- data/node_modules/type/test/time-value/coerce.js +47 -0
- data/node_modules/type/test/time-value/ensure.js +17 -0
- data/node_modules/type/test/value/ensure.js +20 -0
- data/node_modules/type/test/value/is.js +29 -0
- data/node_modules/type/thenable/ensure.js +9 -0
- data/node_modules/type/thenable/is.js +9 -0
- data/node_modules/type/time-value/coerce.js +12 -0
- data/node_modules/type/time-value/ensure.js +10 -0
- data/node_modules/type/value/ensure.js +9 -0
- data/node_modules/type/value/is.js +6 -0
- metadata +118 -21
- data/app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-navigation.scss +0 -94
- data/node_modules/resolve/reaf +0 -0
- data/node_modules/resolve/test/shadowed_core.js +0 -38
- data/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
@include govuk-text-colour;
|
|
3
3
|
position: relative;
|
|
4
4
|
padding: 10px;
|
|
5
|
-
background:
|
|
6
|
-
border-top: solid 1px
|
|
7
|
-
border-bottom: solid 1px
|
|
5
|
+
background: govuk-colour("grey-4");
|
|
6
|
+
border-top: solid 1px govuk-colour("grey-2");
|
|
7
|
+
border-bottom: solid 1px govuk-colour("grey-2");
|
|
8
8
|
|
|
9
|
-
@include media(tablet) {
|
|
10
|
-
padding:
|
|
9
|
+
@include govuk-media-query($from: tablet) {
|
|
10
|
+
padding: govuk-spacing(3);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// scss-lint:disable SelectorFormat
|
|
15
15
|
|
|
16
16
|
.gem-c-step-nav-header__part-of {
|
|
17
|
-
@include
|
|
17
|
+
@include govuk-font(16, $weight: bold);
|
|
18
18
|
|
|
19
19
|
display: block;
|
|
20
20
|
padding-bottom: .2em;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
.gem-c-step-nav-header__title {
|
|
24
24
|
@extend %govuk-link;
|
|
25
|
-
@include
|
|
25
|
+
@include govuk-font(24, $weight: bold);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// scss-lint:enable SelectorFormat
|
data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss
CHANGED
|
@@ -1,40 +1,44 @@
|
|
|
1
1
|
.gem-c-step-nav-related {
|
|
2
2
|
@include govuk-text-colour;
|
|
3
|
-
border-top: 2px solid
|
|
4
|
-
margin-bottom:
|
|
3
|
+
border-top: 2px solid govuk-colour("blue");
|
|
4
|
+
margin-bottom: govuk-spacing(6);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.gem-c-step-nav-related__heading {
|
|
8
|
-
margin-top:
|
|
9
|
-
margin-bottom:
|
|
10
|
-
@include
|
|
8
|
+
margin-top: govuk-spacing(3);
|
|
9
|
+
margin-bottom: govuk-spacing(2);
|
|
10
|
+
@include govuk-font(19, $weight: bold);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.gem-c-step-nav-related__links {
|
|
14
|
-
@include
|
|
14
|
+
@include govuk-font(16, $weight: bold);
|
|
15
15
|
margin: 0;
|
|
16
16
|
padding: 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.gem-c-step-nav-related--singular {
|
|
20
|
-
margin-bottom:
|
|
20
|
+
margin-bottom: govuk-spacing(2) + 3;
|
|
21
21
|
|
|
22
22
|
.gem-c-step-nav-related__heading {
|
|
23
|
-
@include
|
|
24
|
-
margin-top:
|
|
23
|
+
@include govuk-font(19, $weight: bold, $line-height: 1.4);
|
|
24
|
+
margin-top: govuk-spacing(4);
|
|
25
|
+
|
|
26
|
+
@include govuk-media-query($until: tablet) {
|
|
27
|
+
font-size: 19px;
|
|
28
|
+
}
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
.gem-c-step-nav-related__pretitle {
|
|
28
|
-
margin-bottom:
|
|
32
|
+
margin-bottom: govuk-spacing(6) / 4;
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
.gem-c-step-nav-related__pretitle {
|
|
33
37
|
display: block;
|
|
34
|
-
margin-bottom:
|
|
38
|
+
margin-bottom: govuk-spacing(3);
|
|
35
39
|
|
|
36
|
-
@include media(tablet) {
|
|
37
|
-
margin-bottom:
|
|
40
|
+
@include govuk-media-query($from: tablet) {
|
|
41
|
+
margin-bottom: govuk-spacing(1);
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
|
|
@@ -43,10 +47,10 @@
|
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
.gem-c-step-nav-related__link-item {
|
|
46
|
-
margin-top:
|
|
50
|
+
margin-top: govuk-spacing(3);
|
|
47
51
|
|
|
48
|
-
@include media(tablet) {
|
|
49
|
-
margin-top:
|
|
52
|
+
@include govuk-media-query($from: tablet) {
|
|
53
|
+
margin-top: govuk-spacing(1);
|
|
50
54
|
}
|
|
51
55
|
}
|
|
52
56
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
.gem-c-subscription-links__list {
|
|
10
10
|
list-style: none;
|
|
11
|
-
margin: 0 (-govuk-spacing(3) / 2);
|
|
11
|
+
margin: 0 (- govuk-spacing(3) / 2);
|
|
12
12
|
padding: 0;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
background-repeat: no-repeat;
|
|
45
45
|
background-position: 0 20%;
|
|
46
46
|
|
|
47
|
-
@include media(tablet) {
|
|
47
|
+
@include govuk-media-query($from: tablet) {
|
|
48
48
|
background-position: 0 35%;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
background-image: image-url("govuk_publishing_components/mail-icon.png");
|
|
68
68
|
padding-left: govuk-spacing(5);
|
|
69
69
|
|
|
70
|
-
@include device-pixel-ratio {
|
|
70
|
+
@include govuk-device-pixel-ratio {
|
|
71
71
|
background-image: image-url("govuk_publishing_components/mail-icon-x2.png");
|
|
72
72
|
background-size: govuk-spacing(4) govuk-spacing(3);
|
|
73
73
|
}
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
.gem-c-subscription-links__feed-box {
|
|
77
77
|
padding: govuk-spacing(3);
|
|
78
78
|
margin-bottom: govuk-spacing(3);
|
|
79
|
-
background:
|
|
79
|
+
background: govuk-colour("grey-3");
|
|
80
80
|
|
|
81
81
|
.js-enabled &.js-hidden {
|
|
82
82
|
display: none;
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
border: $gem-border-width-mobile solid $gem-success-colour;
|
|
5
5
|
@include govuk-responsive-margin(8, "bottom");
|
|
6
6
|
|
|
7
|
-
@include media(tablet) {
|
|
7
|
+
@include govuk-media-query($from: tablet) {
|
|
8
8
|
padding: $gem-spacing-scale-4;
|
|
9
9
|
border-width: $gem-border-width-tablet;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.gem-c-success-alert__message {
|
|
14
|
-
@include
|
|
14
|
+
@include govuk-font(19, $weight: bold);
|
|
15
15
|
margin: 0;
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
margin-top: 0;
|
|
20
20
|
margin-bottom: $gem-spacing-scale-3;
|
|
21
21
|
|
|
22
|
-
@include media(tablet) {
|
|
22
|
+
@include govuk-media-query($from: tablet) {
|
|
23
23
|
margin-bottom: $gem-spacing-scale-4;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
@include
|
|
26
|
+
@include govuk-font(24, $weight: bold);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.gem-c-success-summary__body {
|
|
30
|
-
@include
|
|
30
|
+
@include govuk-font(19);
|
|
31
31
|
margin: 0;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
.gem-c-taxonomy-list {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-wrap: wrap;
|
|
4
|
-
margin:
|
|
4
|
+
margin: govuk-spacing(3) 0 0 0;
|
|
5
5
|
padding: 0;
|
|
6
6
|
|
|
7
|
-
@include media(tablet) {
|
|
7
|
+
@include govuk-media-query($from: tablet) {
|
|
8
8
|
margin-right: -25px;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
.gem-c-taxonomy-list__item {
|
|
13
13
|
list-style: none;
|
|
14
14
|
|
|
15
|
-
@include media(tablet) {
|
|
16
|
-
|
|
15
|
+
@include govuk-media-query($from: tablet) {
|
|
16
|
+
box-sizing: border-box;
|
|
17
17
|
width: 33%;
|
|
18
|
-
padding-right:
|
|
18
|
+
padding-right: govuk-spacing(2);
|
|
19
19
|
vertical-align: top;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
// but we don't have one yet, so this is in anticipation of that
|
|
7
7
|
// suggested scale is as follows, not fully implemented
|
|
8
8
|
// no margin = 0
|
|
9
|
-
//
|
|
9
|
+
// govuk-spacing(6)= 4
|
|
10
10
|
// responsive-bottom-margin = 5
|
|
11
11
|
.gem-c-title--margin-bottom-4 {
|
|
12
|
-
margin-bottom:
|
|
12
|
+
margin-bottom: govuk-spacing(6);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.gem-c-title--margin-bottom-5 {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.gem-c-title--inverse {
|
|
20
|
-
color:
|
|
20
|
+
color: govuk-colour("white");
|
|
21
21
|
|
|
22
22
|
.gem-c-title__text,
|
|
23
23
|
.gem-c-title__context {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.gem-c-title__context {
|
|
29
|
-
@include
|
|
30
|
-
color: $secondary-text-colour;
|
|
29
|
+
@include govuk-font(24);
|
|
30
|
+
color: $govuk-secondary-text-colour;
|
|
31
31
|
margin: 0;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
color: inherit;
|
|
40
40
|
|
|
41
41
|
&:focus {
|
|
42
|
-
color: $
|
|
42
|
+
color: $govuk-text-colour;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
|
|
52
52
|
.gem-c-title__text {
|
|
53
53
|
@include govuk-text-colour;
|
|
54
|
-
@include
|
|
54
|
+
@include govuk-font(48, $weight: bold);
|
|
55
55
|
margin: 0;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.gem-c-title__text--long {
|
|
59
|
-
@include
|
|
59
|
+
@include govuk-font(36, $weight: bold);
|
|
60
60
|
}
|
|
@@ -7,43 +7,51 @@
|
|
|
7
7
|
cookie_banner_helper = GovukPublishingComponents::Presenters::CookieBannerHelper.new(local_assigns)
|
|
8
8
|
|
|
9
9
|
message = cookie_banner_helper.message
|
|
10
|
-
confirmation_message = cookie_banner_helper.confirmation_message
|
|
11
10
|
%>
|
|
12
11
|
|
|
13
|
-
<div id="<%= id %>" class="<%= cookie_banner_class %>" data-module="cookie-banner">
|
|
12
|
+
<div id="<%= id %>" class="<%= cookie_banner_class %>" data-module="cookie-banner" aria-live="polite">
|
|
14
13
|
<div class="gem-c-cookie-banner__wrapper govuk-width-container">
|
|
15
14
|
<p class="gem-c-cookie-banner__message"><%= message %></p>
|
|
16
15
|
<% if new_cookie_banner %>
|
|
17
16
|
<div class="gem-c-cookie-banner__buttons">
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
<div class="gem-c-cookie-banner__button gem-c-cookie-banner__button-accept">
|
|
18
|
+
<%= render "govuk_publishing_components/components/button", {
|
|
19
|
+
text: "Accept cookies",
|
|
20
|
+
secondary: true,
|
|
21
|
+
inline_layout: true,
|
|
22
|
+
data_attributes: {
|
|
23
|
+
module: "track-click",
|
|
24
|
+
"accept-cookies": "true",
|
|
25
|
+
"track-category": "cookieBanner",
|
|
26
|
+
"track-action": "Cookie banner accepted"
|
|
27
|
+
}
|
|
28
|
+
} %>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="gem-c-cookie-banner__button gem-c-cookie-banner__button-settings">
|
|
31
|
+
<%= render "govuk_publishing_components/components/button", {
|
|
32
|
+
text: "Cookie settings",
|
|
33
|
+
href: "/help/cookies",
|
|
34
|
+
secondary: true,
|
|
35
|
+
inline_layout: true,
|
|
36
|
+
data_attributes: {
|
|
37
|
+
module: "track-click",
|
|
38
|
+
"track-category": "cookieBanner",
|
|
39
|
+
"track-action": "Cookie banner settings clicked"
|
|
40
|
+
}
|
|
41
|
+
} %>
|
|
42
|
+
</div>
|
|
40
43
|
</div>
|
|
41
44
|
<% end %>
|
|
42
45
|
</div>
|
|
43
46
|
|
|
44
47
|
<% if new_cookie_banner %>
|
|
45
48
|
<div class="gem-c-cookie-banner__confirmation govuk-width-container">
|
|
46
|
-
<p class="gem-c-cookie-banner__confirmation-message"
|
|
49
|
+
<p class="gem-c-cookie-banner__confirmation-message">
|
|
50
|
+
You’ve accepted all cookies. You can
|
|
51
|
+
<a class="govuk-link" href="/help/cookies" data-module="track-click" data-track-category="cookieBanner" data-track-action="Cookie banner settings clicked from confirmation">
|
|
52
|
+
change your cookie settings
|
|
53
|
+
</a> at any time.
|
|
54
|
+
</p>
|
|
47
55
|
<button class="gem-c-cookie-banner__hide-button" data-hide-cookie-banner="true">Hide</button>
|
|
48
56
|
</div>
|
|
49
57
|
<% end %>
|
|
@@ -31,9 +31,11 @@
|
|
|
31
31
|
<% items.each_with_index do |item, index| %>
|
|
32
32
|
<li class="gem-c-error-summary__list-item">
|
|
33
33
|
<% if item[:href] %>
|
|
34
|
-
<%= link_to item[:text], item[:href], target: item[:target] %>
|
|
34
|
+
<%= link_to item[:text], item[:href], target: item[:target], data: item[:data_attributes] %>
|
|
35
35
|
<% else %>
|
|
36
|
-
<%= item[:
|
|
36
|
+
<%= tag.span data: item[:data_attributes] do %>
|
|
37
|
+
<%= item[:text] %>
|
|
38
|
+
<% end %>
|
|
37
39
|
<% end %>
|
|
38
40
|
</li>
|
|
39
41
|
<% end %>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
description_text ||= false
|
|
4
4
|
description_govspeak ||= false
|
|
5
5
|
description ||= yield || false
|
|
6
|
+
aria_live ||= false
|
|
6
7
|
local_assigns[:margin_bottom] ||= 8
|
|
7
8
|
local_assigns[:margin_bottom] = 8 if local_assigns[:margin_bottom] > 9
|
|
8
9
|
|
|
@@ -11,10 +12,12 @@
|
|
|
11
12
|
css_classes = %w(gem-c-notice)
|
|
12
13
|
css_classes << (shared_helper.get_margin_bottom)
|
|
13
14
|
|
|
15
|
+
aria_attributes = aria_live ? {label: 'Notice', live: 'polite'} : {label: 'Notice'}
|
|
16
|
+
|
|
14
17
|
description_present = description.present? || description_text.present? || description_govspeak.present?
|
|
15
18
|
%>
|
|
16
19
|
<% if title || description_present %>
|
|
17
|
-
<%= tag.section class: css_classes, aria:
|
|
20
|
+
<%= tag.section class: css_classes, aria: aria_attributes, role: "region" do %>
|
|
18
21
|
<% if title %>
|
|
19
22
|
<% if description_present %>
|
|
20
23
|
<%= tag.h2 title, class: "gem-c-notice__title" %>
|
|
@@ -2,6 +2,8 @@ name: Cookie banner
|
|
|
2
2
|
description: Help users manage their personal data by telling them when you store cookies on their device.
|
|
3
3
|
body: |
|
|
4
4
|
Setting `data-hide-cookie-banner="true"` on any link inside the banner will overwrite the default action and when clicked will dismiss the cookie banner for a period of 365 days (approx. 1 year).
|
|
5
|
+
|
|
6
|
+
If the examples below are not showing the banner, make sure the `seen_cookie_message` cookie is not present or is set to false.
|
|
5
7
|
accessibility_criteria: |
|
|
6
8
|
Text in the cookie banner must be clear and unambiguous and should provide a way to dismiss the message.
|
|
7
9
|
|
|
@@ -21,9 +21,15 @@ examples:
|
|
|
21
21
|
items:
|
|
22
22
|
- text: Descriptive link to the question with an error 1
|
|
23
23
|
href: '#example-error-1'
|
|
24
|
+
data_attributes:
|
|
25
|
+
tracking: GTM-123AA
|
|
24
26
|
- text: Descriptive link to the question with an error 2
|
|
25
27
|
href: '#example-error-2'
|
|
28
|
+
data_attributes:
|
|
29
|
+
tracking: GTM-123AB
|
|
26
30
|
- text: Description of error without link
|
|
31
|
+
data_attributes:
|
|
32
|
+
tracking: GTM-123AC
|
|
27
33
|
with_data_attributes:
|
|
28
34
|
data:
|
|
29
35
|
title: Message to alert the user to a problem goes here
|
|
@@ -36,3 +36,9 @@ examples:
|
|
|
36
36
|
without_title:
|
|
37
37
|
data:
|
|
38
38
|
description_govspeak: '<p>Scheduled to publish at 8am on 25 April 2019<br/><a href="change-date">Change date</a><br/><a href="stop-scheduled-publishing">Stop scheduled publishing</a></p>'
|
|
39
|
+
with_aria_live:
|
|
40
|
+
description: Passing the aria live flag to the notice component will read the notice out to users if the notice changes, e.g on form submission the notice may go from hidden to visible.
|
|
41
|
+
data:
|
|
42
|
+
title: 'Your settings have been saved'
|
|
43
|
+
description_govspeak: <p>This is a confirmation message to tell you your settings have been saved</p>
|
|
44
|
+
aria_live: true
|
|
@@ -9,10 +9,6 @@ module GovukPublishingComponents
|
|
|
9
9
|
@local_assigns = local_assigns
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
def confirmation_message
|
|
13
|
-
'You\'ve accepted all cookies. You can <a class="govuk-link" href="/help/cookies" data-module="track-click" data-track-category="cookieBanner" data-track-action="Cookie banner settings clicked from confirmation">change your cookie settings</a> at any time.'.html_safe
|
|
14
|
-
end
|
|
15
|
-
|
|
16
12
|
def message
|
|
17
13
|
return @message if @message.present?
|
|
18
14
|
|