govuk_publishing_components 43.5.0 → 44.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/govuk_publishing_components_manifest.js +0 -1
  3. data/app/assets/images/govuk_publishing_components/crests/dbt_crest_18px_x2.png +0 -0
  4. data/app/assets/images/govuk_publishing_components/crests/ho_crest_18px_x2.png +0 -0
  5. data/app/assets/images/govuk_publishing_components/crests/mod_crest_18px_x2.png +0 -0
  6. data/app/assets/images/govuk_publishing_components/crests/org_crest_18px_x2.png +0 -0
  7. data/app/assets/images/govuk_publishing_components/crests/portcullis_18px_x2.png +0 -0
  8. data/app/assets/images/govuk_publishing_components/crests/so_crest_18px_x2.png +0 -0
  9. data/app/assets/images/govuk_publishing_components/crests/wales_crest_18px_x2.png +0 -0
  10. data/app/assets/javascripts/govuk_publishing_components/components/option-select.js +1 -1
  11. data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +20 -19
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +1 -8
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +0 -12
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +0 -6
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_devolved-nations.scss +1 -9
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +12 -10
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +0 -5
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +0 -17
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +0 -17
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss +12 -7
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +0 -12
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +0 -17
  23. data/app/assets/stylesheets/govuk_publishing_components/lib/_print_support.scss +45 -0
  24. data/app/models/govuk_publishing_components/component_wrapper_helper_options.rb +1 -0
  25. data/app/views/govuk_publishing_components/components/_action_link.html.erb +4 -4
  26. data/app/views/govuk_publishing_components/components/_cards.html.erb +1 -1
  27. data/app/views/govuk_publishing_components/components/_contents_list.html.erb +1 -1
  28. data/app/views/govuk_publishing_components/components/_contextual_guidance.html.erb +7 -3
  29. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +12 -4
  30. data/app/views/govuk_publishing_components/components/_devolved_nations.html.erb +16 -12
  31. data/app/views/govuk_publishing_components/components/_document_list.html.erb +3 -2
  32. data/app/views/govuk_publishing_components/components/_image_card.html.erb +2 -0
  33. data/app/views/govuk_publishing_components/components/_inset_text.html.erb +1 -1
  34. data/app/views/govuk_publishing_components/components/_intervention.html.erb +1 -1
  35. data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +0 -1
  36. data/app/views/govuk_publishing_components/components/_option_select.html.erb +5 -3
  37. data/app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb +1 -1
  38. data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +2 -2
  39. data/app/views/govuk_publishing_components/components/docs/action_link.yml +5 -5
  40. data/app/views/govuk_publishing_components/components/docs/attachment_link.yml +6 -0
  41. data/app/views/govuk_publishing_components/components/docs/big_number.yml +17 -2
  42. data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +3 -1
  43. data/app/views/govuk_publishing_components/components/docs/contextual_guidance.yml +1 -0
  44. data/app/views/govuk_publishing_components/components/docs/devolved_nations.yml +2 -1
  45. data/app/views/govuk_publishing_components/components/docs/document_list.yml +22 -0
  46. data/app/views/govuk_publishing_components/components/docs/search.yml +1 -3
  47. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +2 -0
  48. data/app/views/govuk_publishing_components/components/docs/tabs.yml +1 -1
  49. data/app/views/govuk_publishing_components/components/layout_for_public/_account-layout.html.erb +0 -1
  50. data/app/views/layouts/govuk_publishing_components/application.html.erb +0 -2
  51. data/lib/govuk_publishing_components/presenters/component_wrapper_helper.rb +16 -0
  52. data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +3 -3
  53. data/lib/govuk_publishing_components/version.rb +1 -1
  54. metadata +3 -4
  55. 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: 54db17f78b90649fa6445fc0676b54043c55bd4880545e1131d8c842c040059a
4
- data.tar.gz: ac68880c1587230ac9d7640f146ed6ee3f2b52d4e9a8462d47204b13518b5aac
3
+ metadata.gz: e948b7b190c971bcfdac26e8e03df797255aa881c2f0681e2adaf38ade5d8de9
4
+ data.tar.gz: 185b1f9d6eb32ecf15616bd32436b9d0db7a16603e4c6946aa014750529d73c9
5
5
  SHA512:
6
- metadata.gz: 5fdc971290b9037889e7e2f303609171d117892533b3390374ebe60c5f2409eccdd8a55af265be76a23f3b747633392ab269ff100d9de3c8611784b1005ea769
7
- data.tar.gz: ff848b675dbc62c6b454fe9b2142df504db3fbefdb14381afea3432e44f91b1706b28b530a026684e62ac54eb9dba5d3aaad0799895fc19d2220e40610c64b14
6
+ metadata.gz: d9905abd0ae7b678d4b9ddf70d7b16a7ae2e24a38f99a4b992c40ad163c08a1615c619eb33fe27dbdc4c4f97db6954e979d32415b64ec0ec6410393d328d44b9
7
+ data.tar.gz: ab911fe25b4297e081794f595b337ccada839ad319bd788a67322b9f2131e2e05c0309f3c38ef3c7ba76aeda5a27796abf5793dd79010b7f416ccc37663c746e
@@ -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-button').insertAdjacentElement('afterend', element)
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.26";
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
- if (customDataValues[name] !== value) {
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 (typeV === "undefined" || value === null) {
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
- if (sessionEntries.length &&
687
- (entry.startTime - latestEntry.startTime >= 1000 ||
685
+ }); })
686
+ : [];
687
+ if (sessionEntries.length &&
688
+ (entry.startTime - latestEntry.startTime >= 1000 ||
688
689
  entry.startTime - firstEntry.startTime >= 5000)) {
689
- sessionValue = entry.value;
690
- sessionEntries = [entry];
691
- sessionAttributions = sources;
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
- maximumSessionValue = max(maximumSessionValue, sessionValue);
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--light-text {
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
@@ -88,10 +88,4 @@
88
88
  .gem-c-contents-list__list-item--parent {
89
89
  list-style-type: none;
90
90
  }
91
-
92
- .gem-c-contents-list__link {
93
- &.govuk-link {
94
- color: $govuk-print-text-colour;
95
- }
96
- }
97
91
  }
@@ -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
- .gem-c-document-list__item-title {
172
- .govuk-link {
173
- color: $govuk-print-text-colour !important;
176
+ * {
177
+ color: $govuk-print-text-colour;
174
178
  }
179
+ }
175
180
 
176
- .govuk-link::after {
177
- display: block;
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
@@ -355,13 +355,8 @@
355
355
  }
356
356
 
357
357
  .gem-c-image-card__title-link {
358
- color: $govuk-print-text-colour !important;
359
-
360
358
  &::after {
361
- display: block;
362
359
  position: static;
363
- margin-top: 2mm;
364
- font-size: 12pt !important;
365
360
  }
366
361
  }
367
362
  }
@@ -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
- position: absolute;
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
- padding: 10px 8px 5px 43px;
130
- margin: 0;
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
- margin-top: 3px;
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 {
@@ -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
  }
@@ -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
- light_text ||= false
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--light-text" if light_text
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 light_text
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 class: "gem-c-contextual-guidance", id: id, data: data_attributes do %>
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
- css_classes = %w(gem-c-cookie-banner govuk-clearfix govuk-cookie-banner js-banner-wrapper)
27
- css_classes << "gem-c-cookie-banner--services" if services_cookies
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
- <div id="<%= id %>" class="<%= css_classes.join(' ') %>" data-module="cookie-banner" data-nosnippet role="region" aria-label="<%= title %>" hidden>
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
- </div>
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
- data_attributes = {}
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
- data_attributes[:ga4_devolved_nations_banner] = devolved_nations_helper.ga4_applicable_nations_title_text(true)
14
- data_attributes[:module] = "ga4-link-tracker"
15
- data_attributes[:ga4_track_links_only] = ""
16
- data_attributes[:ga4_set_indexes] = ""
17
- data_attributes[:ga4_link] = {
18
- event_name: "navigation",
19
- type: "devolved nations banner",
20
- section: t("components.devolved_nations.applies_to", locale: :en) + " " + devolved_nations_helper.ga4_applicable_nations_title_text,
21
- }.to_json
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 class: "gem-c-devolved-nations", data: data_attributes do %>
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
  %>
@@ -38,7 +38,7 @@
38
38
  data_attributes[:ga4_intervention_banner] = "" unless disable_ga4 # Added to the parent element for the GA4 pageview object to use
39
39
 
40
40
  suggestion_tag_options = {
41
- class: "govuk-link",
41
+ class: "govuk-link gem-print-link",
42
42
  href: suggestion_link_url,
43
43
  data: suggestion_data_attributes,
44
44
  }
@@ -18,7 +18,6 @@
18
18
  <%= csrf_meta_tags %>
19
19
  <%= favicon_link_tag "govuk_publishing_components/favicon-#{environment}.png" %>
20
20
  <%= stylesheet_link_tag css_filename, media: "all" %>
21
- <%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
22
21
  <% if GovukPublishingComponents::Config.use_es6_components %>
23
22
  <%= javascript_include_tag js_module_filename, type: "module" %>
24
23
  <% end %>
@@ -45,9 +45,11 @@
45
45
 
46
46
  <%= tag.div(**helper.all_attributes) do %>
47
47
  <h3 class="gem-c-option-select__heading js-container-heading">
48
- <span class="gem-c-option-select__title js-container-button" id="<%= title_id %>"><%= title %></span>
49
- <svg version="1.1" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="0" height="0" class="gem-c-option-select__icon gem-c-option-select__icon--up" aria-hidden="true" focusable="false"><path d="m798.16 609.84l-256-256c-16.683-16.683-43.691-16.683-60.331 0l-256 256c-16.683 16.683-16.683 43.691 0 60.331s43.691 16.683 60.331 0l225.84-225.84 225.84 225.84c16.683 16.683 43.691 16.683 60.331 0s16.683-43.691 0-60.331z"/></svg>
50
- <svg version="1.1" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="0" height="0" class="gem-c-option-select__icon gem-c-option-select__icon--down" aria-hidden="true" focusable="false"><path d="m225.84 414.16l256 256c16.683 16.683 43.691 16.683 60.331 0l256-256c16.683-16.683 16.683-43.691 0-60.331s-43.691-16.683-60.331 0l-225.84 225.84-225.84-225.84c-16.683-16.683-43.691-16.683-60.331 0s-16.683 43.691 0 60.331z"/></svg>
48
+ <div class="gem-c-option-select__toggle js-container-toggle">
49
+ <span class="gem-c-option-select__title js-container-button" id="<%= title_id %>"><%= title %></span>
50
+ <svg version="1.1" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="0" height="0" class="gem-c-option-select__icon gem-c-option-select__icon--up" aria-hidden="true" focusable="false"><path d="m798.16 609.84l-256-256c-16.683-16.683-43.691-16.683-60.331 0l-256 256c-16.683 16.683-16.683 43.691 0 60.331s43.691 16.683 60.331 0l225.84-225.84 225.84 225.84c16.683 16.683 43.691 16.683 60.331 0s16.683-43.691 0-60.331z"/></svg>
51
+ <svg version="1.1" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="0" height="0" class="gem-c-option-select__icon gem-c-option-select__icon--down" aria-hidden="true" focusable="false"><path d="m225.84 414.16l256 256c16.683 16.683 43.691 16.683 60.331 0l256-256c16.683-16.683 16.683-43.691 0-60.331s-43.691-16.683-60.331 0l-225.84 225.84-225.84-225.84c-16.683-16.683-43.691-16.683-60.331 0s-16.683 43.691 0 60.331z"/></svg>
52
+ </div>
51
53
  </h3>
52
54
 
53
55
  <%= content_tag(:div, class: options_container_classes, id: options_container_id, tabindex: "-1") do %>
@@ -35,7 +35,7 @@
35
35
  <strong class="gem-c-step-nav-header__part-of">Part of</strong>
36
36
  <% if path %>
37
37
  <a href="<%= path %>"
38
- class="gem-c-step-nav-header__title govuk-link"
38
+ class="gem-c-step-nav-header__title govuk-link gem-print-link"
39
39
  <% unless disable_ga4 %>
40
40
  data-ga4-link='<%= ga4_data %>'
41
41
  <% end %>
@@ -15,7 +15,7 @@
15
15
  <span class="gem-c-step-nav-related__pretitle"><%= pretitle %></span>
16
16
  <% if links.length == 1 && !always_display_as_list %>
17
17
  <a href="<%= links[0][:href] %>"
18
- class="govuk-link"
18
+ class="govuk-link gem-print-link"
19
19
  <% unless disable_ga4
20
20
  ga4_attributes = {
21
21
  event_name: "navigation",
@@ -37,7 +37,7 @@
37
37
  <% links.each_with_index do |link, index| %>
38
38
  <li class="gem-c-step-nav-related__link-item">
39
39
  <a href="<%= link[:href] %>"
40
- class="govuk-link"
40
+ class="govuk-link gem-print-link"
41
41
  <% unless disable_ga4
42
42
  ga4_attributes = {
43
43
  event_name: "navigation",
@@ -18,11 +18,11 @@ examples:
18
18
  text: "Coronavirus (COVID-19):"
19
19
  nowrap_text: what you need to do
20
20
  href: "/page"
21
- with_light_text:
21
+ inverse:
22
22
  data:
23
23
  text: "Coronavirus (COVID-19)"
24
24
  href: "/page"
25
- light_text: true
25
+ inverse: true
26
26
  context:
27
27
  dark_background: true
28
28
  with_subtext:
@@ -35,7 +35,7 @@ examples:
35
35
  text: Emergency something
36
36
  href: "/page"
37
37
  subtext: This is about the emergency that is happening right now unfortunately so pay attention
38
- light_text: true
38
+ inverse: true
39
39
  context:
40
40
  dark_background: true
41
41
  mobile_subtext:
@@ -56,7 +56,7 @@ examples:
56
56
  text: Remain calm
57
57
  subtext: Better things are ahead
58
58
  subtext_href: "/page"
59
- light_text: true
59
+ inverse: true
60
60
  context:
61
61
  dark_background: true
62
62
  simple_arrow:
@@ -68,7 +68,7 @@ examples:
68
68
  data:
69
69
  text: Getting financial help and keeping your business safe
70
70
  href: "/financial-help"
71
- light_text: true
71
+ inverse: true
72
72
  simple_light: true
73
73
  context:
74
74
  dark_background: true
@@ -6,6 +6,12 @@ body: |
6
6
 
7
7
  It is expected to be embedded inside an element that provides text styles
8
8
  (such as `.govuk-body`) so does not provide its own text styling.
9
+ accessibility_criteria: |
10
+ All touch targets (e.g the attachment link) must be 24px large, or leave sufficient space (target-size). See [Understanding Success Criterion 2.5.8: Target Size (Minimum))](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html).
11
+
12
+ To achieve this, you can embed the attachment link within another element that maintains sufficient space above and below the target. For instance, you can place individual links inside a paragraph element styled with a `.govuk-body` class, or as list items in the [list component](https://components.publishing.service.gov.uk/component-guide/list).
13
+
14
+ Attachment links within paragraphs of text do not need to meet the 24 by 24 CSS pixels requirements.
9
15
  shared_accessibility_criteria:
10
16
  - link
11
17
  examples:
@@ -18,11 +18,26 @@ examples:
18
18
  data:
19
19
  number: 119
20
20
  label: Open consultations
21
- passing_extra_symbols:
22
- description: "In some cases, we want to communicate more than just the flat numeric value eg: `400+`, `90%`, `-20`, `1M` etc. This is why we allow values to be passed as flat strings."
21
+ with_plus_symbol:
22
+ description: "In some cases, we want to communicate more than just the flat numeric value eg: `400+`. This is why we allow values to be passed as flat strings."
23
23
  data:
24
24
  number: "400+"
25
25
  label: Other agencies and public bodies
26
+ with_percentage_symbol:
27
+ description: "In some cases, we want to communicate more than just the flat numeric value eg: `90%`. This is why we allow values to be passed as flat strings."
28
+ data:
29
+ number: "90%"
30
+ label: is a large percentage of something
31
+ with_negative_symbol:
32
+ description: "In some cases, we want to communicate more than just the flat numeric value eg: `-20`. This is why we allow values to be passed as flat strings."
33
+ data:
34
+ number: "-20"
35
+ label: is a negative number
36
+ with_unit_symbol:
37
+ description: "In some cases, we want to communicate more than just the flat numeric value eg: `1M`. This is why we allow values to be passed as flat strings."
38
+ data:
39
+ number: "1M"
40
+ label: is a shorter way of saying one million
26
41
  with_link:
27
42
  data:
28
43
  number: 23
@@ -6,9 +6,11 @@ body: |
6
6
  We recommend that if using the breadcrumbs for navigation purposes, you set `collapse_on_mobile` to `true` to make things more readable for mobile users. However, you can specify `collapse_on_mobile:``false` or remove the flag completely to stop this behaviour.
7
7
  shared_accessibility_criteria:
8
8
  - link
9
- accessibility_criteria:
9
+ accessibility_criteria: |
10
10
  The breadcrumb links must have a text contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA
11
11
  (this especially applies when [using the inverse flag](/component-guide/breadcrumbs/inverse)).
12
+
13
+ Always place breadcrumbs at the top of a page, before the `<main>` element. Placing them here means that the "Skip to main content" link allows the user to skip all navigation links, including breadcrumbs.
12
14
  accessibility_excluded_rules:
13
15
  - skip-link # This component is creating a reference to #content which is part of the layout
14
16
  display_html: true
@@ -11,6 +11,7 @@ accessibility_criteria: |
11
11
  * be hidden by default
12
12
  * be visible when the associated input field if focused
13
13
  * stay visible until another input field with guidance is being focused
14
+ uses_component_wrapper_helper: true
14
15
  shared_accessibility_criteria:
15
16
  - link
16
17
  examples:
@@ -7,6 +7,7 @@ body: |
7
7
 
8
8
  * nations that the alternative content relates to
9
9
  * a list of alternative URLs where applicable
10
+ uses_component_wrapper: true
10
11
  shared_accessibility_criteria:
11
12
  - link
12
13
  accessibility_criteria: |
@@ -104,4 +105,4 @@ examples:
104
105
  applicable: false
105
106
  alternative_url: /
106
107
  type: detailed_guide
107
- ga4_tracking: true
108
+ disable_ga4: true
@@ -244,6 +244,28 @@ examples:
244
244
  metadata:
245
245
  public_updated_at: 2017-07-19 15:01:48
246
246
  document_type: 'Statistical data set'
247
+ with_equal_item_spacing:
248
+ description: |
249
+ The new search UI has consistently equal spacing between items in the document list, instead
250
+ of the original larger bottom padding.
251
+ data:
252
+ equal_item_spacing: true
253
+ items:
254
+ - link:
255
+ text: 'Become an apprentice'
256
+ path: '/become-an-apprentice'
257
+ description: 'Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship.'
258
+ full_size_description: true
259
+ - link:
260
+ text: 'Become a journeyman'
261
+ path: '/become-a-journeyman'
262
+ description: 'Becoming a journeyman - what to expect, what to take, pay and training, making an application, complaining about being a journeyman.'
263
+ full_size_description: true
264
+ - link:
265
+ text: 'Become enlightened'
266
+ path: '/become-enlightened'
267
+ description: 'Becoming enlightened - what to expect, what to take, pay and training, making an application, complaining about being enlightened.'
268
+ full_size_description: true
247
269
  highlighted_result:
248
270
  description: Highlight one or more of the items in the list. This is used on finders to provide a 'top result' for a search. The `highlight_text` parameter is optional.
249
271
  data:
@@ -16,10 +16,8 @@ accessibility_criteria: |
16
16
  examples:
17
17
  default:
18
18
  data: {}
19
- apply_custom_styling_to_the_label_and_set_search_value:
19
+ set_search_value:
20
20
  data:
21
- inline_label: false
22
- label_text: "<h1>Search GOV.UK</h1>"
23
21
  value: "driving licence"
24
22
  stop_the_label_appearing_inline:
25
23
  data:
@@ -8,6 +8,8 @@ accessibility_criteria: |
8
8
  An earlier version of the component did not use a heading element &ndash; this failed WCAG 2.1 Success Criterion 1.3.1 ("Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text.")
9
9
 
10
10
  An early version of the component contained a hidden skip link for keyboard and screen reader users, that jumped to the step by step navigation component in the sidebar (similar to the 'skip to content' link at the top of all GOV.UK pages). User testing suggested that rather than helping users it confused them, so this has been removed.
11
+
12
+ Always place the step by step navigation header at the top of a page, before the `<main>` element. Placing the component here means that the "Skip to main content" link allows the user to skip all navigation links, including the step by step navigation header.
11
13
  shared_accessibility_criteria:
12
14
  - link
13
15
  examples:
@@ -114,7 +114,7 @@ examples:
114
114
  description: Disables GA4 tracking on tabs as links. Tracking is enabled by default.
115
115
  data:
116
116
  as_links: true
117
- ga4_tracking: true
117
+ disable_ga4: true
118
118
  tabs:
119
119
  - href: "/page1"
120
120
  label: "Link 1"
@@ -1,7 +1,6 @@
1
1
  <div class="govuk-width-container">
2
2
  <%= render "govuk_publishing_components/components/phase_banner", {
3
3
  phase: "beta",
4
- ga4_tracking: true,
5
4
  message: sanitize(t("components.layout_for_public.account_layout.feedback.banners.phase_banner_html"))
6
5
  } unless omit_account_phase_banner %>
7
6
 
@@ -41,8 +41,6 @@
41
41
  <%= stylesheet_link_tag "component_guide/application", media: "all" %>
42
42
  <%= yield :application_stylesheet %>
43
43
  <%= render_component_stylesheets %>
44
-
45
- <%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
46
44
  <%= yield :extra_headers %>
47
45
  </head>
48
46
  <body class="gem-c-layout-for-admin govuk-template__body <%= 'hide-header-and-footer' if @preview %>">
@@ -11,6 +11,7 @@ module GovukPublishingComponents
11
11
  check_role_is_valid(@options[:role]) if @options.include?(:role)
12
12
  check_lang_is_valid(@options[:lang]) if @options.include?(:lang)
13
13
  check_open_is_valid(@options[:open]) if @options.include?(:open)
14
+ check_hidden_is_valid(@options[:hidden]) if @options.include?(:hidden)
14
15
  end
15
16
 
16
17
  def all_attributes
@@ -23,6 +24,7 @@ module GovukPublishingComponents
23
24
  attributes[:role] = @options[:role] unless @options[:role].blank?
24
25
  attributes[:lang] = @options[:lang] unless @options[:lang].blank?
25
26
  attributes[:open] = @options[:open] unless @options[:open].blank?
27
+ attributes[:hidden] = @options[:hidden] unless @options[:hidden].nil?
26
28
 
27
29
  attributes
28
30
  end
@@ -62,6 +64,11 @@ module GovukPublishingComponents
62
64
  @options[:open] = open_attribute
63
65
  end
64
66
 
67
+ def set_hidden(hidden_attribute)
68
+ check_hidden_is_valid(hidden_attribute)
69
+ @options[:hidden] = hidden_attribute
70
+ end
71
+
65
72
  private
66
73
 
67
74
  def check_id_is_valid(id)
@@ -130,6 +137,15 @@ module GovukPublishingComponents
130
137
  end
131
138
  end
132
139
 
140
+ def check_hidden_is_valid(hidden_attribute)
141
+ return if hidden_attribute.nil?
142
+
143
+ options = ["", "hidden", "until-found"]
144
+ unless options.include? hidden_attribute
145
+ raise(ArgumentError, "hidden attribute (#{hidden_attribute}) is not recognised")
146
+ end
147
+ end
148
+
133
149
  def extend_string(option, string)
134
150
  ((@options[option] ||= "") << " #{string}").strip!
135
151
  end
@@ -77,18 +77,18 @@ module GovukPublishingComponents
77
77
  if show_sidebar?
78
78
  @sidebar ||= current_step_nav.content.tap do |sb|
79
79
  configure_for_sidebar(sb)
80
- sb.merge!(small: true, heading_level: 3, tracking_id: current_step_nav.content_id, ga4_tracking: @query_parameters[:ga4_tracking])
80
+ sb.merge!(small: true, heading_level: 3, tracking_id: current_step_nav.content_id, disable_ga4: @query_parameters[:disable_ga4])
81
81
  end
82
82
  end
83
83
  end
84
84
 
85
- def header(ga4_tracking)
85
+ def header(disable_ga4)
86
86
  if show_header?
87
87
  {
88
88
  title: current_step_nav.title,
89
89
  path: current_step_nav.base_path,
90
90
  tracking_id: current_step_nav.content_id,
91
- ga4_tracking:,
91
+ disable_ga4:,
92
92
  }
93
93
  else
94
94
  {}
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "43.5.0".freeze
2
+ VERSION = "44.1.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 43.5.0
4
+ version: 44.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-24 00:00:00.000000000 Z
11
+ date: 2024-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -494,7 +494,6 @@ files:
494
494
  - app/assets/javascripts/govuk_publishing_components/single-consent-functions.js
495
495
  - app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-measurer.js
496
496
  - app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js
497
- - app/assets/javascripts/govuk_publishing_components/vendor/modernizr.js
498
497
  - app/assets/stylesheets/component_guide/application.scss
499
498
  - app/assets/stylesheets/govuk_publishing_components/_all_components.scss
500
499
  - app/assets/stylesheets/govuk_publishing_components/_individual_component_support.scss
@@ -1952,7 +1951,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1952
1951
  - !ruby/object:Gem::Version
1953
1952
  version: '0'
1954
1953
  requirements: []
1955
- rubygems_version: 3.5.19
1954
+ rubygems_version: 3.5.21
1956
1955
  signing_key:
1957
1956
  specification_version: 4
1958
1957
  summary: A gem to document components in GOV.UK frontend applications
@@ -1,3 +0,0 @@
1
- /*! modernizr 3.6.0 (Custom Build) | MIT *
2
- * https://modernizr.com/download/?-flexbox-flexboxtweener-history-printshiv-setclasses !*/
3
- !function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,a,s;for(var l in E)if(E.hasOwnProperty(l)){if(e=[],t=E[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(o=r(t.fn,"function")?t.fn():t.fn,i=0;i<e.length;i++)a=e[i],s=a.split("."),1===s.length?Modernizr[s[0]]=o:(!Modernizr[s[0]]||Modernizr[s[0]]instanceof Boolean||(Modernizr[s[0]]=new Boolean(Modernizr[s[0]])),Modernizr[s[0]][s[1]]=o),x.push((o?"":"no-")+s.join("-"))}}function i(e){var t=C.className,n=Modernizr._config.classPrefix||"";if(b&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),b?C.className.baseVal=t:C.className=t)}function a(e,t){return!!~(""+e).indexOf(t)}function s(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):b?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function l(){var e=t.body;return e||(e=s(b?"svg":"body"),e.fake=!0),e}function u(e,n,r,o){var i,a,u,f,c="modernizr",d=s("div"),p=l();if(parseInt(r,10))for(;r--;)u=s("div"),u.id=o?o[r]:c+(r+1),d.appendChild(u);return i=s("style"),i.type="text/css",i.id="s"+c,(p.fake?p:d).appendChild(i),p.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(t.createTextNode(e)),d.id=c,p.fake&&(p.style.background="",p.style.overflow="hidden",f=C.style.overflow,C.style.overflow="hidden",C.appendChild(p)),a=n(d,e),p.fake?(p.parentNode.removeChild(p),C.style.overflow=f,C.offsetHeight):d.parentNode.removeChild(d),!!a}function f(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function c(t,n,r){var o;if("getComputedStyle"in e){o=getComputedStyle.call(e,t,n);var i=e.console;if(null!==o)r&&(o=o.getPropertyValue(r));else if(i){var a=i.error?"error":"log";i[a].call(i,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else o=!n&&t.currentStyle&&t.currentStyle[r];return o}function d(t,r){var o=t.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(f(t[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];o--;)i.push("("+f(t[o])+":"+r+")");return i=i.join(" or "),u("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"==c(e,null,"position")})}return n}function p(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function m(e,t,o,i){function l(){f&&(delete _.style,delete _.modElem)}if(i=r(i,"undefined")?!1:i,!r(o,"undefined")){var u=d(e,o);if(!r(u,"undefined"))return u}for(var f,c,m,h,v,g=["modernizr","tspan","samp"];!_.style&&g.length;)f=!0,_.modElem=s(g.shift()),_.style=_.modElem.style;for(m=e.length,c=0;m>c;c++)if(h=e[c],v=_.style[h],a(h,"-")&&(h=p(h)),_.style[h]!==n){if(i||r(o,"undefined"))return l(),"pfx"==t?h:!0;try{_.style[h]=o}catch(y){}if(_.style[h]!=v)return l(),"pfx"==t?h:!0}return l(),!1}function h(e,t){return function(){return e.apply(t,arguments)}}function v(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?h(o,n||t):o);return!1}function g(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+N.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?m(s,t,o,i):(s=(e+" "+j.join(a+" ")+a).split(" "),v(s,t,n))}function y(e,t,r){return g(e,n,n,t,r)}var E=[],S={_version:"3.6.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){E.push({name:e,fn:t,options:n})},addAsyncTest:function(e){E.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=S,Modernizr=new Modernizr;var x=[],C=t.documentElement,b="svg"===C.nodeName.toLowerCase();b||!function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=w.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=w.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),w.elements=n+" "+e,u(t)}function i(e){var t=b[e[x]];return t||(t={},C++,e[x]=C,b[C]=t),t}function a(e,n,r){if(n||(n=t),v)return n.createElement(e);r||(r=i(n));var o;return o=r.cache[e]?r.cache[e].cloneNode():S.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||E.test(e)||o.tagUrn?o:r.frag.appendChild(o)}function s(e,n){if(e||(e=t),v)return e.createDocumentFragment();n=n||i(e);for(var o=n.frag.cloneNode(),a=0,s=r(),l=s.length;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return w.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(w,t.frag)}function u(e){e||(e=t);var r=i(e);return!w.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),v||l(e,r),e}function f(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),a=[];o--;)t=n[o],i.test(t.nodeName)&&a.push(t.applyElement(c(t)));return a}function c(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(T+":"+e.nodeName);r--;)t=n[r],t.specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function d(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+r().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),a="$1"+T+"\\:$2";o--;)t=n[o]=n[o].split("}"),t[t.length-1]=t[t.length-1].replace(i,a),n[o]=t.join("}");return n.join("{")}function p(e){for(var t=e.length;t--;)e[t].removeNode()}function m(e){function t(){clearTimeout(a._removeSheetTimer),r&&r.removeNode(!0),r=null}var r,o,a=i(e),s=e.namespaces,l=e.parentWindow;return!_||e.printShived?e:("undefined"==typeof s[T]&&s.add(T),l.attachEvent("onbeforeprint",function(){t();for(var i,a,s,l=e.styleSheets,u=[],c=l.length,p=Array(c);c--;)p[c]=l[c];for(;s=p.pop();)if(!s.disabled&&N.test(s.media)){try{i=s.imports,a=i.length}catch(m){a=0}for(c=0;a>c;c++)p.push(i[c]);try{u.push(s.cssText)}catch(m){}}u=d(u.reverse().join("")),o=f(e),r=n(e,u)}),l.attachEvent("onafterprint",function(){p(o),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,v,g="3.7.3",y=e.html5||{},E=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,S=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,x="_html5shiv",C=0,b={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",h="hidden"in e,v=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){h=!0,v=!0}}();var w={elements:y.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:g,shivCSS:y.shivCSS!==!1,supportsUnknownElements:v,shivMethods:y.shivMethods!==!1,type:"default",shivDocument:u,createElement:a,createDocumentFragment:s,addElements:o};e.html5=w,u(t);var N=/^$|\b(?:all|print)\b/,T="html5shiv",_=!v&&function(){var n=t.documentElement;return!("undefined"==typeof t.namespaces||"undefined"==typeof t.parentWindow||"undefined"==typeof n.applyElement||"undefined"==typeof n.removeNode||"undefined"==typeof e.attachEvent)}();w.type+=" print",w.shivPrint=m,m(t),"object"==typeof module&&module.exports&&(module.exports=w)}("undefined"!=typeof e?e:this,t),Modernizr.addTest("history",function(){var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")||"file:"===location.protocol?e.history&&"pushState"in e.history:!1});var w="Moz O ms Webkit",N=S._config.usePrefixes?w.split(" "):[];S._cssomPrefixes=N;var T={elem:s("modernizr")};Modernizr._q.push(function(){delete T.elem});var _={style:T.elem.style};Modernizr._q.unshift(function(){delete _.style});var j=S._config.usePrefixes?w.toLowerCase().split(" "):[];S._domPrefixes=j,S.testAllProps=g,S.testAllProps=y,Modernizr.addTest("flexbox",y("flexBasis","1px",!0)),Modernizr.addTest("flexboxtweener",y("flexAlign","end",!0)),o(),i(x),delete S.addTest,delete S.addAsyncTest;for(var P=0;P<Modernizr._q.length;P++)Modernizr._q[P]();e.Modernizr=Modernizr}(window,document);