govuk_publishing_components 43.0.1 → 43.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +39 -17
  3. data/app/assets/stylesheets/component_guide/application.scss +1 -1
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_cross-service-header.scss +3 -1
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +1 -1
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +3 -1
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +32 -3
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +1 -3
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -1
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +1 -1
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_phase-banner.scss +1 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +1 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +1 -1
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +1 -1
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +1 -1
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss +1 -1
  17. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -1
  18. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_highlight-answer.scss +2 -4
  19. data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +4 -0
  20. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +1 -1
  21. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +6 -3
  22. data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +7 -2
  23. data/lib/govuk_publishing_components/version.rb +1 -1
  24. data/node_modules/sortablejs/README.md +3 -2
  25. data/node_modules/sortablejs/Sortable.js +5 -4
  26. data/node_modules/sortablejs/Sortable.min.js +2 -2
  27. data/node_modules/sortablejs/modular/sortable.complete.esm.js +5 -4
  28. data/node_modules/sortablejs/modular/sortable.core.esm.js +5 -4
  29. data/node_modules/sortablejs/modular/sortable.esm.js +5 -4
  30. data/node_modules/sortablejs/package.json +3 -2
  31. data/node_modules/sortablejs/src/Animation.js +175 -0
  32. data/node_modules/sortablejs/src/BrowserInfo.js +12 -0
  33. data/node_modules/sortablejs/src/EventDispatcher.js +57 -0
  34. data/node_modules/sortablejs/src/PluginManager.js +94 -0
  35. data/node_modules/sortablejs/src/Sortable.js +2011 -0
  36. data/node_modules/sortablejs/src/utils.js +595 -0
  37. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ee692ce9fb25200d425b34aa5f0637ca4d0632fdbcf46d3b3ae3483662d1d29
4
- data.tar.gz: 517faafdb589e9cc379af61414487579107050a3e3d01545956c0913202da2b8
3
+ metadata.gz: 807aea002b544e9db46864e26c47fe8c43b073ac466ce0c318526df6d30cad86
4
+ data.tar.gz: a38681875e7616755c30d4a0fe311157d58504fe90235207bdb0965e1376d401
5
5
  SHA512:
6
- metadata.gz: 621e5b66172186ca65e58aedfb29f6271f65ea7f888b7b2aa85f20e3c385b6528bec15168df542d40cd260d8d2453651ad7d595b8e9974baaac69e2c5ecaeffd
7
- data.tar.gz: 267b3aa8d271d5a84c6b529c476f61122c43e9161c89245086ef7e170a9c0fd50805af45305639d7b8360e38765cdf63454468e6f465cce2a99dbf4869053698
6
+ metadata.gz: 89784fa1851bee65bf7df62a94de10b874e1fd87ba6fc97246a82c7874a6e05d64164bc7e66762e3431fccc930e1688b7fec26a85c53d0b94c5bc94651b8cc58
7
+ data.tar.gz: 45b90baa9e36e7c25737f71a3780fc216557f1dcbb7f8e574cc9d2dcefb1cc8e67dc43670a25c3804f8f98f93d679c36a61f56437ddac264de4ea89bc28048ca
@@ -60,6 +60,21 @@
60
60
  }
61
61
  return "";
62
62
  }
63
+ /**
64
+ * Returns the delivery type for the current document. To differentiate between the valid empty
65
+ * string value and browsers that don't support PerformanceResourceTiming.deliveryType, we convert
66
+ * the empty string value to "(empty string)". Browsers that don't support deliveryType will return
67
+ * null. Despite straying from the spec, this allows us to differentiate between the two cases.
68
+ *
69
+ * @see https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-deliverytype
70
+ */
71
+ function deliveryType() {
72
+ var navEntry = getNavigationEntry();
73
+ if ("deliveryType" in navEntry) {
74
+ return navEntry.deliveryType || "(empty string)";
75
+ }
76
+ return undefined;
77
+ }
63
78
  function getNavigationEntry() {
64
79
  var navEntries = getEntriesByType("navigation");
65
80
  if (navEntries.length) {
@@ -321,7 +336,7 @@
321
336
  return str;
322
337
  }
323
338
 
324
- var VERSION = "4.0.25";
339
+ var VERSION = "4.0.26";
325
340
  /**
326
341
  * Returns the version of the script as a float to be stored in legacy systems that do not support
327
342
  * string versions.
@@ -666,25 +681,25 @@
666
681
  startTime: processTimeMetric(entry.startTime),
667
682
  elementSelector: getNodeSelector(source.node),
668
683
  elementType: source.node.nodeName,
669
- }); })
684
+ }); })
670
685
  : [];
671
686
  if (sessionEntries.length &&
672
687
  (entry.startTime - latestEntry.startTime >= 1000 ||
673
688
  entry.startTime - firstEntry.startTime >= 5000)) {
674
- sessionValue = entry.value;
675
- sessionEntries = [entry];
676
- sessionAttributions = sources;
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) {
677
699
  largestEntry = entry;
678
700
  }
679
- else {
680
- sessionValue += entry.value;
681
- sessionEntries.push(entry);
682
- sessionAttributions = sessionAttributions.concat(sources);
683
- if (!largestEntry || entry.value > largestEntry.value) {
684
- largestEntry = entry;
685
- }
686
- }
687
- maximumSessionValue = max(maximumSessionValue, sessionValue);
701
+ }
702
+ maximumSessionValue = max(maximumSessionValue, sessionValue);
688
703
  }
689
704
  }
690
705
  function reset$2() {
@@ -1946,7 +1961,7 @@
1946
1961
  ].join("");
1947
1962
  }
1948
1963
  function getCustomerId() {
1949
- return LUX.customerid || "";
1964
+ return String(_thisCustomerId) || "";
1950
1965
  }
1951
1966
  function avgDomDepth() {
1952
1967
  var aElems = document.getElementsByTagName("*");
@@ -2184,6 +2199,12 @@
2184
2199
  var baseUrl = _getBeaconUrl(getAllCustomData());
2185
2200
  var is = inlineTagSize("script");
2186
2201
  var ic = inlineTagSize("style");
2202
+ var ds = docSize();
2203
+ var ct = connectionType();
2204
+ var dt = deliveryType();
2205
+ // Note some page stat values (the `PS` query string) are non-numeric. To make extracting these
2206
+ // values easier, we append an underscore "_" to the value. Values this is used for include
2207
+ // connection type (ct) and delivery type (dt).
2187
2208
  var metricsQueryString =
2188
2209
  // only send Nav Timing and lux.js metrics on initial pageload (not for SPA page views)
2189
2210
  (gbNavSent ? "" : "&NT=" + getNavTiming()) +
@@ -2216,8 +2237,9 @@
2216
2237
  docHeight(document) +
2217
2238
  "dw" +
2218
2239
  docWidth(document) +
2219
- (docSize() ? "ds" + docSize() : "") + // document HTTP transfer size (bytes)
2220
- (connectionType() ? "ct" + connectionType() + "_" : "") + // delimit with "_" since values can be non-numeric so need a way to extract with regex in VCL
2240
+ (ds ? "ds" + ds : "") + // document HTTP transfer size (bytes)
2241
+ (ct ? "ct" + ct + "_" : "") + // connection type
2242
+ (typeof dt !== "undefined" ? "dt" + dt + "_" : "") + // delivery type
2221
2243
  "er" +
2222
2244
  nErrors +
2223
2245
  "nt" +
@@ -139,7 +139,7 @@ $gem-guide-border-width: 1px;
139
139
 
140
140
  @include govuk-media-query($media-type: print) {
141
141
  &[class*="-background"] {
142
- background-color: unset;
142
+ background: none;
143
143
  }
144
144
  }
145
145
  }
@@ -443,7 +443,7 @@ $govuk-header-link-underline-thickness: 3px;
443
443
  }
444
444
 
445
445
  .gem-c-one-login-header {
446
- background-color: initial;
446
+ background: none;
447
447
  border-bottom: 2pt solid $govuk-print-text-colour;
448
448
 
449
449
  * {
@@ -456,6 +456,8 @@ $govuk-header-link-underline-thickness: 3px;
456
456
  }
457
457
 
458
458
  .gem-c-service-header {
459
+ background: none;
460
+
459
461
  .govuk-width-container {
460
462
  margin: 0;
461
463
  }
@@ -26,7 +26,7 @@
26
26
  @include govuk-media-query($media-type: print) {
27
27
  .gem-c-intervention {
28
28
  break-inside: avoid;
29
- background-color: transparent;
29
+ background: none;
30
30
  border-color: $govuk-print-text-colour;
31
31
 
32
32
  .govuk-body {
@@ -30,7 +30,9 @@
30
30
 
31
31
  @include govuk-media-query($media-type: print) {
32
32
  .gem-c-inverse-header {
33
- background-color: unset;
33
+ background: none;
34
+ padding-left: 0;
35
+ padding-right: 0;
34
36
  border-bottom: 2pt solid $govuk-print-text-colour;
35
37
 
36
38
  &,
@@ -21,10 +21,39 @@
21
21
  margin-bottom: 20px;
22
22
  }
23
23
 
24
- // stylelint-disable declaration-no-important
25
24
  @include govuk-media-query($media-type: print) {
25
+ .govuk-footer {
26
+ background: none;
27
+ margin: 25mm 0 0;
28
+ padding: 5mm 0 0;
29
+ border-top: 2pt solid $govuk-print-text-colour;
30
+
31
+ .govuk-width-container {
32
+ margin: 0;
33
+ }
34
+ }
35
+
36
+ .govuk-footer__meta,
37
+ .govuk-footer__meta-item {
38
+ border: 0;
39
+ padding: 0;
40
+ margin: 0;
41
+ }
42
+
43
+ .govuk-footer__licence-description {
44
+ padding-right: 10mm;
45
+ }
46
+
47
+ .govuk-footer__copyright-logo {
48
+ min-width: auto;
49
+ padding-top: 13mm;
50
+ background-size: 15mm;
51
+ background-position: center top;
52
+ print-color-adjust: exact;
53
+ -webkit-print-color-adjust: exact;
54
+ }
55
+
26
56
  .gem-c-layout-footer {
27
- font-size: 12pt !important;
57
+ font-size: 10pt !important; // stylelint-disable-line declaration-no-important
28
58
  }
29
59
  }
30
- // stylelint-enable declaration-no-important
@@ -148,8 +148,6 @@
148
148
  }
149
149
 
150
150
  .gem-c-layout-header__search-form {
151
- display: none;
152
-
153
151
  &.js-visible {
154
152
  display: block;
155
153
  }
@@ -185,7 +183,7 @@
185
183
  .gem-c-header__product-name,
186
184
  .gem-c-environment-tag {
187
185
  color: $govuk-print-text-colour;
188
- background-color: unset;
186
+ background: none;
189
187
  }
190
188
  }
191
189
  }
@@ -989,7 +989,7 @@ $after-button-padding-left: govuk-spacing(4);
989
989
  border-top: 0;
990
990
  border-bottom: 2pt solid $govuk-print-text-colour;
991
991
  margin: 0 0 5mm;
992
- background-color: transparent;
992
+ background: none;
993
993
 
994
994
  &:has(.gem-c-layout-super-navigation-header__header-logo .govuk-visually-hidden) {
995
995
  border: 0;
@@ -100,7 +100,7 @@
100
100
  .gem-c-metadata {
101
101
  break-inside: avoid;
102
102
  color: $govuk-print-text-colour !important;
103
- background-color: unset;
103
+ background: none;
104
104
  margin-bottom: 5mm;
105
105
 
106
106
  a,
@@ -32,7 +32,7 @@
32
32
  .gem-c-phase-banner {
33
33
  &,
34
34
  & * {
35
- background-color: unset !important;
35
+ background: none !important;
36
36
  color: $govuk-print-text-colour !important;
37
37
  }
38
38
 
@@ -22,7 +22,7 @@
22
22
  @include govuk-media-query($media-type: print) {
23
23
  .gem-c-step-nav-header {
24
24
  padding: 0 0 govuk-spacing(4) 0;
25
- background: unset;
25
+ background: none;
26
26
  border-color: $govuk-print-text-colour;
27
27
  }
28
28
 
@@ -48,7 +48,7 @@
48
48
  // stylelint-disable declaration-no-important
49
49
  @include govuk-media-query($media-type: print) {
50
50
  .gem-c-step-nav-related {
51
- background: unset;
51
+ background: none;
52
52
  border-color: $govuk-print-text-colour;
53
53
  }
54
54
 
@@ -9,7 +9,7 @@
9
9
  @include govuk-media-query($media-type: print) {
10
10
  .gem-c-success-alert {
11
11
  break-inside: avoid;
12
- background-color: initial;
12
+ background: none;
13
13
  border-color: $govuk-print-text-colour;
14
14
 
15
15
  * {
@@ -133,7 +133,7 @@ $table-row-even-background-colour: govuk-colour("light-grey");
133
133
 
134
134
  * {
135
135
  color: $govuk-print-text-colour !important;
136
- background-color: initial !important;
136
+ background: none !important;
137
137
  }
138
138
 
139
139
  .govuk-table__header,
@@ -28,7 +28,7 @@
28
28
  }
29
29
 
30
30
  .govuk-warning-text__icon {
31
- background-color: transparent;
31
+ background: none;
32
32
  color: $govuk-print-text-colour;
33
33
  }
34
34
  }
@@ -32,7 +32,7 @@
32
32
 
33
33
  &,
34
34
  & * {
35
- background-color: unset;
35
+ background: none;
36
36
  color: $govuk-print-text-colour !important; // stylelint-disable-line declaration-no-important
37
37
  }
38
38
 
@@ -44,15 +44,13 @@ $highlight-answer-color: govuk-colour("white");
44
44
  }
45
45
  }
46
46
 
47
- // stylelint-disable declaration-no-important
48
47
  @include govuk-media-query($media-type: print) {
49
- background-color: unset;
48
+ background: none;
50
49
 
51
50
  &,
52
51
  & * {
53
- color: $govuk-print-text-colour !important;
52
+ color: $govuk-print-text-colour !important; // stylelint-disable-line declaration-no-important
54
53
  }
55
54
  }
56
- // stylelint-enable declaration-no-important
57
55
  }
58
56
  }
@@ -8,6 +8,10 @@
8
8
  @import "components/mixins/govuk-template-link-focus-override";
9
9
  @import "components/mixins/css3";
10
10
 
11
+ $govuk-suppressed-warnings: (
12
+ organisation-colours
13
+ );
14
+
11
15
  $gem-secondary-button-colour: #00823b;
12
16
  $gem-secondary-button-hover-colour: darken($gem-secondary-button-colour, 5%);
13
17
  $gem-secondary-button-background-colour: govuk-colour("white");
@@ -63,7 +63,7 @@
63
63
  <% end %>
64
64
  </div>
65
65
 
66
- <hr class="govuk-footer__section-break">
66
+ <hr class="govuk-footer__section-break govuk-!-display-none-print">
67
67
  <% end %>
68
68
  <div class="govuk-footer__meta">
69
69
  <div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
@@ -1,9 +1,12 @@
1
- <% navigation_aria_label ||= "Top level" %>
1
+ <%
2
+ navigation_aria_label ||= "Top level"
3
+ navigation_id = "navigation-#{SecureRandom.hex(4)}"
4
+ %>
2
5
 
3
6
  <% if navigation_items.any? %>
4
7
  <%= tag.nav class: "gem-c-header__nav govuk-header__navigation govuk-header__navigation--end", aria: { label: navigation_aria_label } do %>
5
8
  <button
6
- aria-controls="navigation"
9
+ aria-controls="<%= navigation_id %>"
7
10
  aria-label="Show or hide Top Level Navigation"
8
11
  class="govuk-header__menu-button govuk-js-header-toggle gem-c-header__menu-button govuk-!-display-none-print"
9
12
  type="button"
@@ -12,7 +15,7 @@
12
15
  >
13
16
  <%= t("components.layout_header.menu") %>
14
17
  </button>
15
- <ul id="navigation" class="govuk-header__navigation-list govuk-!-display-none-print">
18
+ <ul id="<%= navigation_id %>" class="govuk-header__navigation-list govuk-!-display-none-print">
16
19
  <% navigation_items.each_with_index do |item, index| %>
17
20
  <%
18
21
  li_classes = %w(govuk-header__navigation-item)
@@ -1,16 +1,21 @@
1
+ <%
2
+ search_form_id = "search-#{SecureRandom.hex(4)}"
3
+ %>
4
+
1
5
  <button
2
- class="search-toggle js-header-toggle"
6
+ class="search-toggle govuk-js-header-toggle"
3
7
  data-search-toggle-for="search"
4
8
  data-button-name="search"
5
9
  data-show-text="<%= t("components.layout_header.show_button") %>"
6
10
  data-hide-text="<%= t("components.layout_header.hide_button") %>"
11
+ aria-controls="<%= search_form_id %>"
7
12
  >
8
13
  <%= t("components.layout_header.show_button") %>
9
14
  </button>
10
15
  <form
11
16
  action="/search"
12
17
  class="gem-c-layout-header__search-form govuk-clearfix govuk-!-display-none-print"
13
- id="search"
18
+ id="<%= search_form_id %>"
14
19
  method="get"
15
20
  role="search"
16
21
  >
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "43.0.1".freeze
2
+ VERSION = "43.0.2".freeze
3
3
  end
@@ -739,8 +739,9 @@ Mounts a plugin to Sortable.
739
739
  * clone(el`:HTMLElement`)`:HTMLElement` — create a deep copy of the set of matched elements
740
740
  * toggleClass(el`:HTMLElement`, name`:String`, state`:Boolean`) — add or remove one classes from each element
741
741
  * detectDirection(el`:HTMLElement`)`:String` — automatically detect the [direction](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#direction) of the element as either `'vertical'` or `'horizontal'`
742
-
743
-
742
+ * index(el`:HTMLElement`, selector`:String`)`:Number` — index of the element within its parent for a selected set of elements
743
+ * getChild(el`:HTMLElement`, childNum`:Number`, options`:Object`, includeDragEl`:Boolean`):`HTMLElement` — get the draggable element at a given index of draggable elements within a Sortable instance
744
+ * expando`:String` — expando property name for internal use, sortableListElement[expando] returns the Sortable instance of that elemenet
744
745
  ---
745
746
 
746
747
 
@@ -1,5 +1,5 @@
1
1
  /**!
2
- * Sortable 1.15.2
2
+ * Sortable 1.15.3
3
3
  * @author RubaXa <trash@rubaxa.org>
4
4
  * @author owenm <owen23355@gmail.com>
5
5
  * @license MIT
@@ -134,7 +134,7 @@
134
134
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
135
135
  }
136
136
 
137
- var version = "1.15.2";
137
+ var version = "1.15.3";
138
138
 
139
139
  function userAgent(pattern) {
140
140
  if (typeof window !== 'undefined' && window.navigator) {
@@ -1467,7 +1467,7 @@
1467
1467
  }
1468
1468
  target = parent; // store last element
1469
1469
  }
1470
- /* jshint boss:true */ while (parent = parent.parentNode);
1470
+ /* jshint boss:true */ while (parent = getParentOrHost(parent));
1471
1471
  }
1472
1472
  _unhideGhostForTarget();
1473
1473
  }
@@ -2373,7 +2373,8 @@
2373
2373
  nextTick: _nextTick,
2374
2374
  cancelNextTick: _cancelNextTick,
2375
2375
  detectDirection: _detectDirection,
2376
- getChild: getChild
2376
+ getChild: getChild,
2377
+ expando: expando
2377
2378
  };
2378
2379
 
2379
2380
  /**