govuk_publishing_components 43.4.1 → 44.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/govuk_publishing_components_manifest.js +0 -1
- data/app/assets/javascripts/govuk_publishing_components/components/option-select.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +20 -19
- data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +1 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +0 -12
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +0 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_devolved-nations.scss +1 -9
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +12 -10
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +0 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +0 -17
- data/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +0 -17
- data/app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss +12 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +0 -12
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +0 -17
- data/app/assets/stylesheets/govuk_publishing_components/lib/_print_support.scss +45 -0
- data/app/models/govuk_publishing_components/component_wrapper_helper_options.rb +1 -0
- data/app/views/govuk_publishing_components/components/_action_link.html.erb +4 -4
- data/app/views/govuk_publishing_components/components/_cards.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_contents_list.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_contextual_guidance.html.erb +7 -3
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +12 -4
- data/app/views/govuk_publishing_components/components/_devolved_nations.html.erb +16 -12
- data/app/views/govuk_publishing_components/components/_document_list.html.erb +3 -2
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_inset_text.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_intervention.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_option_select.html.erb +5 -3
- data/app/views/govuk_publishing_components/components/_radio.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/docs/action_link.yml +5 -5
- data/app/views/govuk_publishing_components/components/docs/attachment_link.yml +6 -0
- data/app/views/govuk_publishing_components/components/docs/big_number.yml +17 -2
- data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +3 -1
- data/app/views/govuk_publishing_components/components/docs/contextual_guidance.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/devolved_nations.yml +2 -1
- data/app/views/govuk_publishing_components/components/docs/document_list.yml +22 -0
- data/app/views/govuk_publishing_components/components/docs/inverse_header.yml +2 -30
- data/app/views/govuk_publishing_components/components/docs/radio.yml +15 -0
- data/app/views/govuk_publishing_components/components/docs/search.yml +1 -3
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/tabs.yml +1 -1
- data/app/views/govuk_publishing_components/components/layout_for_public/_account-layout.html.erb +0 -1
- data/app/views/layouts/govuk_publishing_components/application.html.erb +0 -2
- data/lib/govuk_publishing_components/presenters/component_wrapper_helper.rb +16 -0
- data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +3 -3
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/accessible-autocomplete/CHANGELOG.md +8 -0
- data/node_modules/accessible-autocomplete/accessibility-criteria.md +2 -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/examples/ajax-source.html +300 -0
- data/node_modules/accessible-autocomplete/examples/form-single.html +4 -2
- data/node_modules/accessible-autocomplete/examples/index.html +7 -52
- data/node_modules/accessible-autocomplete/examples/suggestions.json +258 -0
- data/node_modules/accessible-autocomplete/package.json +15 -15
- data/node_modules/accessible-autocomplete/src/autocomplete.js +4 -2
- data/node_modules/accessible-autocomplete/test/functional/index.js +21 -5
- metadata +19 -4
- data/app/assets/javascripts/govuk_publishing_components/vendor/modernizr.js +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f13f23ec1562e63350f590b579c1acecdc4da57c4fe96449c727abce1cd91002
|
4
|
+
data.tar.gz: a4e52c344237096f770b2867dd4a478bcf815be3cbbbeba01554984bd4d10e7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63e41b4da0785b914d0fe04409e4aa45cca913c6cebdd41c411b59d7bf413e4c1d16970fcc397becb3d8fcb80c0b06a9c700565075630095216cef109ebd451d
|
7
|
+
data.tar.gz: 7358a4951fddd6e5dc43fc7c17aa87511024bbb518e8c57e69874a5dea1d4245f763454986029301f3d9f7c39f099277f922e3d666e7c38a77d074add9e4b93c
|
@@ -8,6 +8,5 @@
|
|
8
8
|
//= link_directory ../javascripts/govuk_publishing_components
|
9
9
|
|
10
10
|
// Pre-compile these specific files
|
11
|
-
//= link govuk_publishing_components/vendor/modernizr.js
|
12
11
|
//= link govuk_publishing_components/vendor/lux/lux-reporter.js
|
13
12
|
//= link govuk_publishing_components/vendor/lux/lux-measurer.js
|
@@ -190,7 +190,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
190
190
|
var element = document.createElement('div')
|
191
191
|
element.setAttribute('class', 'gem-c-option-select__selected-counter js-selected-counter')
|
192
192
|
element.innerHTML = checkedString
|
193
|
-
this.$optionSelect.querySelector('.js-container-
|
193
|
+
this.$optionSelect.querySelector('.js-container-toggle').insertAdjacentElement('afterend', element)
|
194
194
|
}
|
195
195
|
|
196
196
|
OptionSelect.prototype.updateCheckedCount = function updateCheckedCount () {
|
@@ -336,7 +336,7 @@
|
|
336
336
|
return str;
|
337
337
|
}
|
338
338
|
|
339
|
-
var VERSION = "4.0.
|
339
|
+
var VERSION = "4.0.27";
|
340
340
|
/**
|
341
341
|
* Returns the version of the script as a float to be stored in legacy systems that do not support
|
342
342
|
* string versions.
|
@@ -564,7 +564,8 @@
|
|
564
564
|
var updatedCustomData = {};
|
565
565
|
function addCustomDataValue(name, value) {
|
566
566
|
var typeV = typeof value;
|
567
|
-
|
567
|
+
var valueIsEmpty = typeV === "undefined" || value === null;
|
568
|
+
if (!valueIsEmpty && customDataValues[name] !== value) {
|
568
569
|
// If the value is new or different to the previous value, record it so that later we can send
|
569
570
|
// only the values that have changed.
|
570
571
|
updatedCustomData[name] = value;
|
@@ -572,7 +573,7 @@
|
|
572
573
|
if (typeV === "string" || typeV === "number" || typeV === "boolean") {
|
573
574
|
customDataValues[name] = value;
|
574
575
|
}
|
575
|
-
if (
|
576
|
+
if (valueIsEmpty) {
|
576
577
|
delete customDataValues[name];
|
577
578
|
}
|
578
579
|
}
|
@@ -681,25 +682,25 @@
|
|
681
682
|
startTime: processTimeMetric(entry.startTime),
|
682
683
|
elementSelector: getNodeSelector(source.node),
|
683
684
|
elementType: source.node.nodeName,
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
685
|
+
}); })
|
686
|
+
: [];
|
687
|
+
if (sessionEntries.length &&
|
688
|
+
(entry.startTime - latestEntry.startTime >= 1000 ||
|
688
689
|
entry.startTime - firstEntry.startTime >= 5000)) {
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
largestEntry = entry;
|
693
|
-
}
|
694
|
-
else {
|
695
|
-
sessionValue += entry.value;
|
696
|
-
sessionEntries.push(entry);
|
697
|
-
sessionAttributions = sessionAttributions.concat(sources);
|
698
|
-
if (!largestEntry || entry.value > largestEntry.value) {
|
690
|
+
sessionValue = entry.value;
|
691
|
+
sessionEntries = [entry];
|
692
|
+
sessionAttributions = sources;
|
699
693
|
largestEntry = entry;
|
700
694
|
}
|
701
|
-
|
702
|
-
|
695
|
+
else {
|
696
|
+
sessionValue += entry.value;
|
697
|
+
sessionEntries.push(entry);
|
698
|
+
sessionAttributions = sessionAttributions.concat(sources);
|
699
|
+
if (!largestEntry || entry.value > largestEntry.value) {
|
700
|
+
largestEntry = entry;
|
701
|
+
}
|
702
|
+
}
|
703
|
+
maximumSessionValue = max(maximumSessionValue, sessionValue);
|
703
704
|
}
|
704
705
|
}
|
705
706
|
function reset$2() {
|
@@ -169,7 +169,7 @@
|
|
169
169
|
}
|
170
170
|
}
|
171
171
|
|
172
|
-
.gem-c-action-link--
|
172
|
+
.gem-c-action-link--inverse {
|
173
173
|
color: govuk-colour("white");
|
174
174
|
|
175
175
|
.gem-c-action-link__subtext {
|
@@ -188,12 +188,5 @@
|
|
188
188
|
&::before {
|
189
189
|
display: none;
|
190
190
|
}
|
191
|
-
|
192
|
-
.gem-c-action-link__link {
|
193
|
-
&::after {
|
194
|
-
display: block;
|
195
|
-
font-size: 12pt;
|
196
|
-
}
|
197
|
-
}
|
198
191
|
}
|
199
192
|
}
|
@@ -155,7 +155,6 @@
|
|
155
155
|
}
|
156
156
|
}
|
157
157
|
|
158
|
-
// stylelint-disable declaration-no-important
|
159
158
|
@include govuk-media-query($media-type: print) {
|
160
159
|
.gem-c-cards__list {
|
161
160
|
display: block;
|
@@ -174,23 +173,12 @@
|
|
174
173
|
}
|
175
174
|
|
176
175
|
.gem-c-cards__link {
|
177
|
-
&,
|
178
|
-
&:link,
|
179
|
-
&:link:visited {
|
180
|
-
color: $govuk-print-text-colour !important;
|
181
|
-
}
|
182
|
-
|
183
176
|
&::before {
|
184
177
|
display: none;
|
185
178
|
}
|
186
179
|
|
187
180
|
&::after {
|
188
181
|
position: static;
|
189
|
-
display: block;
|
190
|
-
margin: 1mm auto;
|
191
|
-
font-size: 12pt !important;
|
192
|
-
color: $govuk-print-text-colour;
|
193
182
|
}
|
194
183
|
}
|
195
184
|
}
|
196
|
-
// stylelint-enable declaration-no-important
|
@@ -11,25 +11,17 @@
|
|
11
11
|
}
|
12
12
|
}
|
13
13
|
|
14
|
-
// stylelint-disable declaration-no-important
|
15
14
|
@include govuk-media-query($media-type: print) {
|
16
15
|
.gem-c-devolved-nations {
|
17
16
|
border: 2pt solid $govuk-print-text-colour;
|
18
17
|
margin: 0 0 5mm;
|
19
18
|
|
20
19
|
* {
|
21
|
-
color: $govuk-print-text-colour !important;
|
20
|
+
color: $govuk-print-text-colour !important; // stylelint-disable-line declaration-no-important
|
22
21
|
}
|
23
22
|
|
24
23
|
.govuk-list li {
|
25
24
|
margin-bottom: 2mm;
|
26
25
|
}
|
27
|
-
|
28
|
-
.govuk-link::after {
|
29
|
-
display: block;
|
30
|
-
margin: 1mm auto;
|
31
|
-
font-size: 12pt;
|
32
|
-
}
|
33
26
|
}
|
34
27
|
}
|
35
|
-
// stylelint-enable declaration-no-important
|
@@ -35,6 +35,13 @@
|
|
35
35
|
}
|
36
36
|
}
|
37
37
|
|
38
|
+
.gem-c-document-list--equal-item-spacing {
|
39
|
+
.gem-c-document-list__item {
|
40
|
+
margin-top: govuk-spacing(3);
|
41
|
+
padding-top: govuk-spacing(3);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
38
45
|
.gem-c-document-list__item-title--context {
|
39
46
|
margin-right: govuk-spacing(2);
|
40
47
|
|
@@ -162,21 +169,16 @@
|
|
162
169
|
}
|
163
170
|
}
|
164
171
|
|
165
|
-
// stylelint-disable declaration-no-important
|
166
172
|
@include govuk-media-query($media-type: print) {
|
167
173
|
.gem-c-document-list__item {
|
168
174
|
break-inside: avoid;
|
169
|
-
}
|
170
175
|
|
171
|
-
|
172
|
-
|
173
|
-
color: $govuk-print-text-colour !important;
|
176
|
+
* {
|
177
|
+
color: $govuk-print-text-colour;
|
174
178
|
}
|
179
|
+
}
|
175
180
|
|
176
|
-
|
177
|
-
|
178
|
-
margin: 1mm auto;
|
179
|
-
}
|
181
|
+
.gem-c-document-list__item-context {
|
182
|
+
display: block;
|
180
183
|
}
|
181
184
|
}
|
182
|
-
// stylelint-enable declaration-no-important
|
@@ -1,25 +1,8 @@
|
|
1
1
|
@import "govuk_publishing_components/individual_component_support";
|
2
2
|
@import "govuk/components/inset-text/inset-text";
|
3
3
|
|
4
|
-
// stylelint-disable declaration-no-important
|
5
4
|
@include govuk-media-query($media-type: print) {
|
6
5
|
.gem-c-inset-text {
|
7
6
|
break-inside: avoid;
|
8
7
|
}
|
9
|
-
|
10
|
-
.gem-c-inset-text .govuk-link {
|
11
|
-
&,
|
12
|
-
&:link,
|
13
|
-
&:link:visited {
|
14
|
-
color: $govuk-print-text-colour !important;
|
15
|
-
}
|
16
|
-
|
17
|
-
&::after {
|
18
|
-
display: block;
|
19
|
-
margin: 1mm auto;
|
20
|
-
font-size: 12pt !important;
|
21
|
-
color: $govuk-print-text-colour;
|
22
|
-
}
|
23
|
-
}
|
24
8
|
}
|
25
|
-
// stylelint-enable declaration-no-important
|
@@ -22,7 +22,6 @@
|
|
22
22
|
margin-bottom: -2px;
|
23
23
|
}
|
24
24
|
|
25
|
-
// stylelint-disable declaration-no-important
|
26
25
|
@include govuk-media-query($media-type: print) {
|
27
26
|
.gem-c-intervention {
|
28
27
|
break-inside: avoid;
|
@@ -33,20 +32,4 @@
|
|
33
32
|
margin: 0;
|
34
33
|
}
|
35
34
|
}
|
36
|
-
|
37
|
-
.gem-c-intervention .govuk-link {
|
38
|
-
&,
|
39
|
-
&:link,
|
40
|
-
&:link:visited {
|
41
|
-
color: $govuk-print-text-colour !important;
|
42
|
-
}
|
43
|
-
|
44
|
-
&::after {
|
45
|
-
display: block;
|
46
|
-
margin: 1mm auto;
|
47
|
-
font-size: 12pt !important;
|
48
|
-
color: $govuk-print-text-colour;
|
49
|
-
}
|
50
|
-
}
|
51
35
|
}
|
52
|
-
// stylelint-enable declaration-no-important
|
@@ -76,11 +76,10 @@
|
|
76
76
|
|
77
77
|
.gem-c-option-select__icon {
|
78
78
|
display: none;
|
79
|
-
|
80
|
-
top: 0;
|
81
|
-
left: 9px;
|
79
|
+
flex-shrink: 0;
|
82
80
|
width: 30px;
|
83
81
|
height: 40px;
|
82
|
+
margin-inline: 10px 4px;
|
84
83
|
fill: govuk-colour("black");
|
85
84
|
}
|
86
85
|
|
@@ -126,8 +125,14 @@
|
|
126
125
|
.govuk-frontend-supported {
|
127
126
|
.gem-c-option-select__heading {
|
128
127
|
position: relative;
|
129
|
-
|
130
|
-
|
128
|
+
margin: 0 0 govuk-spacing(1);
|
129
|
+
}
|
130
|
+
|
131
|
+
.gem-c-option-select__toggle {
|
132
|
+
display: flex;
|
133
|
+
flex-direction: row-reverse;
|
134
|
+
justify-content: start;
|
135
|
+
align-items: center;
|
131
136
|
}
|
132
137
|
|
133
138
|
[aria-expanded="true"] ~ .gem-c-option-select__icon--up {
|
@@ -152,9 +157,9 @@
|
|
152
157
|
}
|
153
158
|
|
154
159
|
.gem-c-option-select__selected-counter {
|
160
|
+
margin-left: 44px;
|
155
161
|
color: $govuk-text-colour;
|
156
|
-
|
157
|
-
@include govuk-font($size: 16);
|
162
|
+
@include govuk-font($size: 16, $line-height: 1);
|
158
163
|
}
|
159
164
|
|
160
165
|
.gem-c-option-select.js-closed {
|
data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss
CHANGED
@@ -32,17 +32,5 @@
|
|
32
32
|
|
33
33
|
.gem-c-step-nav-header__title {
|
34
34
|
@include govuk-font(24, $weight: bold);
|
35
|
-
|
36
|
-
&,
|
37
|
-
&:link,
|
38
|
-
&:link:visited {
|
39
|
-
color: $govuk-print-text-colour;
|
40
|
-
}
|
41
|
-
|
42
|
-
&::after {
|
43
|
-
display: block;
|
44
|
-
margin: 1mm auto;
|
45
|
-
font-size: 12pt !important; // stylelint-disable-line declaration-no-important
|
46
|
-
}
|
47
35
|
}
|
48
36
|
}
|
data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss
CHANGED
@@ -45,26 +45,9 @@
|
|
45
45
|
margin-top: govuk-spacing(3);
|
46
46
|
}
|
47
47
|
|
48
|
-
// stylelint-disable declaration-no-important
|
49
48
|
@include govuk-media-query($media-type: print) {
|
50
49
|
.gem-c-step-nav-related {
|
51
50
|
background: none;
|
52
51
|
border-color: $govuk-print-text-colour;
|
53
52
|
}
|
54
|
-
|
55
|
-
.gem-c-step-nav-related__heading,
|
56
|
-
.gem-c-step-nav-related__link-item {
|
57
|
-
.govuk-link,
|
58
|
-
.govuk-link:link,
|
59
|
-
.govuk-link:link:visited {
|
60
|
-
color: $govuk-print-text-colour !important;
|
61
|
-
|
62
|
-
&::after {
|
63
|
-
display: block;
|
64
|
-
margin: 1mm auto;
|
65
|
-
font-size: 12pt !important;
|
66
|
-
}
|
67
|
-
}
|
68
|
-
}
|
69
53
|
}
|
70
|
-
// stylelint-enable declaration-no-important
|
@@ -25,3 +25,48 @@
|
|
25
25
|
}
|
26
26
|
}
|
27
27
|
}
|
28
|
+
|
29
|
+
// Two helper classes to ensure that all printed links
|
30
|
+
// receive consistent formatting. Most links inherit
|
31
|
+
// styles from govuk-frontend, including the printing
|
32
|
+
// of the href that a link contains. This makes printed
|
33
|
+
// links more useful, but they can take up a lot of space
|
34
|
+
// on the page in the default font size and will print
|
35
|
+
// in blue by default. These helpers set the printed colour
|
36
|
+
// to black, reduce the font size, and improve the layout
|
37
|
+
// of the printed href.
|
38
|
+
//
|
39
|
+
// .gem-print-link
|
40
|
+
// ----------------------------------------------------------
|
41
|
+
// Typically this class will be applied to existing
|
42
|
+
// elements that have the `govuk-link` class but it can
|
43
|
+
// also be used on other link elements.
|
44
|
+
//
|
45
|
+
// .gem-print-links-within
|
46
|
+
// ----------------------------------------------------------
|
47
|
+
// A variation of the previous print style, to be used on
|
48
|
+
// parent elements that contain links with the `govuk-link`
|
49
|
+
// class. This is typically only required for views where
|
50
|
+
// the `govuk-link` element is not exposed in the markup
|
51
|
+
// of the view as it's coming from a self-contained helper.
|
52
|
+
|
53
|
+
// stylelint-disable declaration-no-important
|
54
|
+
@include govuk-media-query($media-type: print) {
|
55
|
+
.gem-print-link,
|
56
|
+
.gem-print-links-within .govuk-link {
|
57
|
+
&,
|
58
|
+
&:link,
|
59
|
+
&:visited {
|
60
|
+
color: $govuk-print-text-colour !important;
|
61
|
+
}
|
62
|
+
|
63
|
+
&::after {
|
64
|
+
display: block;
|
65
|
+
margin: 1mm auto;
|
66
|
+
font-size: 12pt;
|
67
|
+
font-weight: normal;
|
68
|
+
color: $govuk-print-text-colour !important;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
// stylelint-enable declaration-no-important
|
@@ -11,6 +11,7 @@ This component uses the component wrapper helper. It accepts the following optio
|
|
11
11
|
- `role` - accepts a space separated string of roles
|
12
12
|
- `lang` - accepts a language attribute value
|
13
13
|
- `open` - accepts an open attribute value (true or false)
|
14
|
+
- `hidden` - accepts an empty string, 'hidden', or 'until-found'
|
14
15
|
"
|
15
16
|
end
|
16
17
|
end
|
@@ -10,7 +10,7 @@
|
|
10
10
|
subtext ||= false
|
11
11
|
subtext_href ||= false
|
12
12
|
mobile_subtext ||= false
|
13
|
-
|
13
|
+
inverse ||= false
|
14
14
|
simple ||= false
|
15
15
|
simple_light ||= false
|
16
16
|
dark_icon ||= false
|
@@ -18,7 +18,7 @@
|
|
18
18
|
light_icon ||= false
|
19
19
|
|
20
20
|
css_classes = %w(gem-c-action-link)
|
21
|
-
css_classes << "gem-c-action-link--
|
21
|
+
css_classes << "gem-c-action-link--inverse" if inverse
|
22
22
|
css_classes << "gem-c-action-link--dark-icon" if dark_icon
|
23
23
|
css_classes << "gem-c-action-link--dark-large-icon" if dark_large_icon
|
24
24
|
css_classes << "gem-c-action-link--light-icon" if light_icon
|
@@ -28,8 +28,8 @@
|
|
28
28
|
css_classes << "gem-c-action-link--mobile-subtext" if mobile_subtext
|
29
29
|
css_classes << shared_helper.get_margin_bottom
|
30
30
|
|
31
|
-
link_classes = %w(govuk-link gem-c-action-link__link)
|
32
|
-
link_classes << "govuk-link--inverse" if
|
31
|
+
link_classes = %w(govuk-link gem-c-action-link__link gem-print-link)
|
32
|
+
link_classes << "govuk-link--inverse" if inverse
|
33
33
|
|
34
34
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
35
35
|
component_helper.add_class(css_classes.join(" "))
|
@@ -38,7 +38,7 @@
|
|
38
38
|
<%= content_tag("h#{sub_heading_level}", class: "gem-c-cards__sub-heading govuk-heading-s") do %>
|
39
39
|
<%=
|
40
40
|
link_to link[:text], link[:path],
|
41
|
-
class: "govuk-link gem-c-cards__link",
|
41
|
+
class: "govuk-link gem-c-cards__link gem-print-link",
|
42
42
|
data: link[:data_attributes]
|
43
43
|
%>
|
44
44
|
<% end %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
|
9
9
|
title_fallback = t("components.contents_list.contents", locale: I18n.locale, fallback: false, default: "en")
|
10
10
|
classes = %w[gem-c-contents-list]
|
11
|
-
link_classes = %w[gem-c-contents-list__link govuk-link]
|
11
|
+
link_classes = %w[gem-c-contents-list__link govuk-link gem-print-link]
|
12
12
|
link_classes << brand_helper.color_class
|
13
13
|
link_classes << "govuk-link--no-underline" unless underline_links
|
14
14
|
|
@@ -4,12 +4,16 @@
|
|
4
4
|
id ||= nil
|
5
5
|
title ||= nil
|
6
6
|
content ||= nil
|
7
|
-
data_attributes ||= {}
|
8
|
-
data_attributes[:module] = "contextual-guidance"
|
9
7
|
guidance_id ||= nil
|
8
|
+
|
9
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
10
|
+
component_helper.set_id(id)
|
11
|
+
component_helper.add_class("gem-c-contextual-guidance")
|
12
|
+
component_helper.add_data_attribute({ module: "contextual-guidance" })
|
13
|
+
|
10
14
|
%>
|
11
15
|
|
12
|
-
<%= tag.div
|
16
|
+
<%= tag.div(**component_helper.all_attributes) do %>
|
13
17
|
<%= tag.div class: "govuk-grid-row" do %>
|
14
18
|
<%= tag.div class: "govuk-grid-column-two-thirds" do %>
|
15
19
|
<%= tag.div class: "gem-c-contextual-guidance__input-field" do %>
|
@@ -23,13 +23,21 @@
|
|
23
23
|
class: "govuk-link",
|
24
24
|
)))
|
25
25
|
services_cookies ||= nil
|
26
|
-
|
27
|
-
|
26
|
+
|
27
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
28
|
+
component_helper.set_id(id)
|
29
|
+
component_helper.add_class("gem-c-cookie-banner govuk-clearfix govuk-cookie-banner js-banner-wrapper")
|
30
|
+
component_helper.add_class("gem-c-cookie-banner--services") if services_cookies
|
31
|
+
|
32
|
+
component_helper.add_data_attribute({ module: "cookie-banner", nosnippet: "" })
|
33
|
+
component_helper.add_role("region")
|
34
|
+
component_helper.add_aria_attribute(label: title)
|
35
|
+
component_helper.set_hidden("hidden")
|
28
36
|
|
29
37
|
disable_ga4 ||= false
|
30
38
|
%>
|
31
39
|
|
32
|
-
|
40
|
+
<%= tag.div(**component_helper.all_attributes) do %>
|
33
41
|
<div class="govuk-cookie-banner__message govuk-width-container">
|
34
42
|
<div class="govuk-grid-row">
|
35
43
|
<div class="govuk-grid-column-two-thirds">
|
@@ -100,4 +108,4 @@
|
|
100
108
|
</button>
|
101
109
|
</div>
|
102
110
|
</div>
|
103
|
-
|
111
|
+
<% end %>
|
@@ -7,23 +7,27 @@
|
|
7
7
|
applies_to ||= t("components.devolved_nations.applies_to")
|
8
8
|
heading_level ||= 2
|
9
9
|
disable_ga4 ||= false
|
10
|
-
|
10
|
+
|
11
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
12
|
+
component_helper.add_class("gem-c-devolved-nations")
|
11
13
|
|
12
14
|
unless disable_ga4
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
component_helper.add_data_attribute({
|
16
|
+
ga4_devolved_nations_banner: devolved_nations_helper.ga4_applicable_nations_title_text(true),
|
17
|
+
module: "ga4-link-tracker",
|
18
|
+
ga4_track_links_only: "",
|
19
|
+
ga4_set_indexes: "",
|
20
|
+
ga4_link: {
|
21
|
+
event_name: "navigation",
|
22
|
+
type: "devolved nations banner",
|
23
|
+
section: t("components.devolved_nations.applies_to", locale: :en) + " " + devolved_nations_helper.ga4_applicable_nations_title_text,
|
24
|
+
}.to_json
|
25
|
+
})
|
22
26
|
end
|
23
27
|
%>
|
24
28
|
|
25
29
|
<% if national_applicability.any? { |k,v| v[:applicable] == true } %>
|
26
|
-
<%= tag.section
|
30
|
+
<%= tag.section(**component_helper.all_attributes) do %>
|
27
31
|
<%= content_tag(shared_helper.get_heading_level, class: "govuk-heading-s govuk-!-margin-bottom-0") do %>
|
28
32
|
<%= applies_to %> <%= devolved_nations_helper.applicable_nations_title_text %>
|
29
33
|
<% end %>
|
@@ -31,7 +35,7 @@
|
|
31
35
|
<% if devolved_nations_helper.nations_with_urls.any? %>
|
32
36
|
<%= content_tag :ul, class: "govuk-list govuk-!-margin-top-1 govuk-!-margin-bottom-0" do -%>
|
33
37
|
<% devolved_nations_helper.nations_with_urls.each do |k, v| %>
|
34
|
-
<%= content_tag(:li, link_to(devolved_nations_helper.alternative_content_text(k), v[:alternative_url], class: "govuk-link")) %>
|
38
|
+
<%= content_tag(:li, link_to(devolved_nations_helper.alternative_content_text(k), v[:alternative_url], class: "govuk-link gem-print-link")) %>
|
35
39
|
<% end %>
|
36
40
|
<% end %>
|
37
41
|
<% end %>
|
@@ -9,6 +9,7 @@
|
|
9
9
|
component_helper.add_class("gem-c-document-list")
|
10
10
|
component_helper.add_class("gem-c-document-list--no-top-border") if local_assigns[:remove_top_border]
|
11
11
|
component_helper.add_class("gem-c-document-list--no-top-border-first-child") if local_assigns[:remove_top_border_from_first_child]
|
12
|
+
component_helper.add_class("gem-c-document-list--equal-item-spacing") if local_assigns[:equal_item_spacing]
|
12
13
|
component_helper.add_class(shared_helper.get_margin_bottom)
|
13
14
|
|
14
15
|
extra_link_classes = "govuk-link--no-underline" if local_assigns[:remove_underline]
|
@@ -56,7 +57,7 @@
|
|
56
57
|
item[:link][:text],
|
57
58
|
item[:link][:path],
|
58
59
|
data: item[:link][:data_attributes],
|
59
|
-
class: "#{item_classes} govuk-link #{extra_link_classes}",
|
60
|
+
class: "#{item_classes} govuk-link gem-print-link #{extra_link_classes}",
|
60
61
|
lang: item[:link][:locale].presence,
|
61
62
|
rel: rel,
|
62
63
|
)
|
@@ -117,7 +118,7 @@
|
|
117
118
|
part[:link][:text],
|
118
119
|
part[:link][:path],
|
119
120
|
data: part[:link][:data_attributes],
|
120
|
-
class: "gem-c-document-list-child__heading gem-c-document-list-child__link #{brand_helper.color_class} govuk-link #{extra_link_classes}",
|
121
|
+
class: "gem-c-document-list-child__heading gem-c-document-list-child__link #{brand_helper.color_class} govuk-link gem-print-link #{extra_link_classes}",
|
121
122
|
)
|
122
123
|
else
|
123
124
|
content_tag(
|
@@ -25,12 +25,14 @@
|
|
25
25
|
heading_link_classes = %w[
|
26
26
|
gem-c-image-card__title-link
|
27
27
|
govuk-link
|
28
|
+
gem-print-link
|
28
29
|
]
|
29
30
|
heading_link_classes << brand_helper.color_class
|
30
31
|
heading_link_classes << "gem-c-image-card__title-link--large-font-size-mobile" if card_helper.large_mobile_font_size?
|
31
32
|
extra_link_classes = %w[
|
32
33
|
gem-c-image-card__list-item-link
|
33
34
|
govuk-link
|
35
|
+
gem-print-link
|
34
36
|
]
|
35
37
|
extra_link_classes << brand_helper.color_class
|
36
38
|
|
@@ -10,7 +10,7 @@
|
|
10
10
|
margin_bottom: margin_bottom
|
11
11
|
})
|
12
12
|
|
13
|
-
classes = %w[gem-c-inset-text govuk-inset-text]
|
13
|
+
classes = %w[gem-c-inset-text govuk-inset-text gem-print-links-within]
|
14
14
|
classes << shared_helper.get_margin_top
|
15
15
|
classes << shared_helper.get_margin_bottom
|
16
16
|
%>
|