govuk_tech_docs 3.4.0 → 3.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -1
  3. data/lib/assets/stylesheets/_govuk_tech_docs.scss +13 -0
  4. data/lib/govuk_tech_docs/version.rb +1 -1
  5. data/lib/source/favicon.ico +0 -0
  6. data/lib/source/layouts/_header.erb +13 -15
  7. data/node_modules/govuk-frontend/govuk/all-ie8.scss +8 -0
  8. data/node_modules/govuk-frontend/govuk/all.js +4918 -3796
  9. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +54 -49
  10. data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js +17 -0
  11. data/node_modules/govuk-frontend/govuk/common/index.js +172 -152
  12. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +334 -321
  13. data/node_modules/govuk-frontend/govuk/common.js +171 -151
  14. data/node_modules/govuk-frontend/govuk/components/_all.scss +3 -2
  15. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +26 -7
  16. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +2203 -1650
  17. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +24 -16
  18. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +34 -11
  19. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +49 -9
  20. data/node_modules/govuk-frontend/govuk/components/button/button.js +961 -916
  21. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +2142 -2038
  22. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +6 -6
  23. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +1204 -1145
  24. data/node_modules/govuk-frontend/govuk/components/details/details.js +826 -799
  25. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +1097 -1044
  26. data/node_modules/govuk-frontend/govuk/components/exit-this-page/_exit-this-page.scss +2 -0
  27. data/node_modules/govuk-frontend/govuk/components/exit-this-page/_index.scss +97 -0
  28. data/node_modules/govuk-frontend/govuk/components/exit-this-page/exit-this-page.js +2120 -0
  29. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +6 -1
  30. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -7
  31. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +6 -0
  32. data/node_modules/govuk-frontend/govuk/components/header/header.js +683 -1003
  33. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +15 -3
  34. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +786 -751
  35. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +5 -5
  36. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +1151 -1105
  37. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +7 -1
  38. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +1045 -1014
  39. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +107 -0
  40. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +1514 -1268
  41. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +18 -18
  42. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +8 -1
  43. data/node_modules/govuk-frontend/govuk/core/_all.scss +1 -0
  44. data/node_modules/govuk-frontend/govuk/core/_govuk-frontend-version.scss +5 -0
  45. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +5 -2
  46. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  47. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +1 -1
  48. data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +12 -0
  49. data/node_modules/govuk-frontend/govuk/i18n.js +371 -364
  50. data/node_modules/govuk-frontend/govuk/objects/_template.scss +20 -0
  51. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +1 -1
  52. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +4 -0
  53. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +16 -0
  54. data/node_modules/govuk-frontend/govuk/settings/_links.scss +5 -1
  55. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +5 -5
  56. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +38 -2
  57. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +243 -241
  58. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +14 -12
  59. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +18 -16
  60. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +553 -545
  61. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +40 -36
  62. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +257 -250
  63. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +22 -20
  64. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +204 -197
  65. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +204 -197
  66. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +109 -105
  67. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +407 -399
  68. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +242 -238
  69. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +73 -71
  70. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +15 -13
  71. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +18 -16
  72. data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +1 -0
  73. data/package-lock.json +7 -7
  74. data/package.json +1 -1
  75. metadata +8 -3
@@ -4,144 +4,148 @@
4
4
  (factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
- (function(undefined) {
7
+ // @ts-nocheck
8
+ (function (undefined) {
8
9
 
9
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js
10
- var detect = ("Document" in this);
10
+ // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js
11
+ var detect = ("Document" in this);
11
12
 
12
- if (detect) return
13
+ if (detect) return
13
14
 
14
- // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Document&flags=always
15
- if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) {
15
+ // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Document&flags=always
16
+ if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) {
16
17
 
17
- if (this.HTMLDocument) { // IE8
18
+ if (this.HTMLDocument) { // IE8
18
19
 
19
- // HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter.
20
- this.Document = this.HTMLDocument;
20
+ // HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter.
21
+ this.Document = this.HTMLDocument;
21
22
 
22
- } else {
23
+ } else {
23
24
 
24
- // Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made.
25
- this.Document = this.HTMLDocument = document.constructor = (new Function('return function Document() {}')());
26
- this.Document.prototype = document;
25
+ // Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made.
26
+ this.Document = this.HTMLDocument = document.constructor = (new Function('return function Document() {}')());
27
+ this.Document.prototype = document;
28
+ }
27
29
  }
28
- }
29
30
 
30
31
 
31
- })
32
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
32
+ })
33
+ .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
33
34
 
34
- (function(undefined) {
35
+ // @ts-nocheck
35
36
 
36
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js
37
- var detect = ('Element' in this && 'HTMLElement' in this);
37
+ (function(undefined) {
38
38
 
39
- if (detect) return
39
+ // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js
40
+ var detect = ('Element' in this && 'HTMLElement' in this);
40
41
 
41
- // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Element&flags=always
42
- (function () {
42
+ if (detect) return
43
43
 
44
- // IE8
45
- if (window.Element && !window.HTMLElement) {
46
- window.HTMLElement = window.Element;
47
- return;
48
- }
44
+ // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Element&flags=always
45
+ (function () {
46
+
47
+ // IE8
48
+ if (window.Element && !window.HTMLElement) {
49
+ window.HTMLElement = window.Element;
50
+ return;
51
+ }
52
+
53
+ // create Element constructor
54
+ window.Element = window.HTMLElement = new Function('return function Element() {}')();
49
55
 
50
- // create Element constructor
51
- window.Element = window.HTMLElement = new Function('return function Element() {}')();
56
+ // generate sandboxed iframe
57
+ var vbody = document.appendChild(document.createElement('body'));
58
+ var frame = vbody.appendChild(document.createElement('iframe'));
52
59
 
53
- // generate sandboxed iframe
54
- var vbody = document.appendChild(document.createElement('body'));
55
- var frame = vbody.appendChild(document.createElement('iframe'));
60
+ // use sandboxed iframe to replicate Element functionality
61
+ var frameDocument = frame.contentWindow.document;
62
+ var prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*'));
63
+ var cache = {};
56
64
 
57
- // use sandboxed iframe to replicate Element functionality
58
- var frameDocument = frame.contentWindow.document;
59
- var prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*'));
60
- var cache = {};
65
+ // polyfill Element.prototype on an element
66
+ var shiv = function (element, deep) {
67
+ var
68
+ childNodes = element.childNodes || [],
69
+ index = -1,
70
+ key, value, childNode;
61
71
 
62
- // polyfill Element.prototype on an element
63
- var shiv = function (element, deep) {
64
- var
65
- childNodes = element.childNodes || [],
66
- index = -1,
67
- key, value, childNode;
72
+ if (element.nodeType === 1 && element.constructor !== Element) {
73
+ element.constructor = Element;
68
74
 
69
- if (element.nodeType === 1 && element.constructor !== Element) {
70
- element.constructor = Element;
75
+ for (key in cache) {
76
+ value = cache[key];
77
+ element[key] = value;
78
+ }
79
+ }
71
80
 
72
- for (key in cache) {
73
- value = cache[key];
74
- element[key] = value;
81
+ while (childNode = deep && childNodes[++index]) {
82
+ shiv(childNode, deep);
75
83
  }
76
- }
77
84
 
78
- while (childNode = deep && childNodes[++index]) {
79
- shiv(childNode, deep);
80
- }
85
+ return element;
86
+ };
81
87
 
82
- return element;
83
- };
84
-
85
- var elements = document.getElementsByTagName('*');
86
- var nativeCreateElement = document.createElement;
87
- var interval;
88
- var loopLimit = 100;
89
-
90
- prototype.attachEvent('onpropertychange', function (event) {
91
- var
92
- propertyName = event.propertyName,
93
- nonValue = !cache.hasOwnProperty(propertyName),
94
- newValue = prototype[propertyName],
95
- oldValue = cache[propertyName],
96
- index = -1,
97
- element;
98
-
99
- while (element = elements[++index]) {
100
- if (element.nodeType === 1) {
101
- if (nonValue || element[propertyName] === oldValue) {
102
- element[propertyName] = newValue;
88
+ var elements = document.getElementsByTagName('*');
89
+ var nativeCreateElement = document.createElement;
90
+ var interval;
91
+ var loopLimit = 100;
92
+
93
+ prototype.attachEvent('onpropertychange', function (event) {
94
+ var
95
+ propertyName = event.propertyName,
96
+ nonValue = !cache.hasOwnProperty(propertyName),
97
+ newValue = prototype[propertyName],
98
+ oldValue = cache[propertyName],
99
+ index = -1,
100
+ element;
101
+
102
+ while (element = elements[++index]) {
103
+ if (element.nodeType === 1) {
104
+ if (nonValue || element[propertyName] === oldValue) {
105
+ element[propertyName] = newValue;
106
+ }
103
107
  }
104
108
  }
105
- }
106
109
 
107
- cache[propertyName] = newValue;
108
- });
110
+ cache[propertyName] = newValue;
111
+ });
109
112
 
110
- prototype.constructor = Element;
113
+ prototype.constructor = Element;
111
114
 
112
- if (!prototype.hasAttribute) {
113
- // <Element>.hasAttribute
114
- prototype.hasAttribute = function hasAttribute(name) {
115
- return this.getAttribute(name) !== null;
116
- };
117
- }
115
+ if (!prototype.hasAttribute) {
116
+ // <Element>.hasAttribute
117
+ prototype.hasAttribute = function hasAttribute(name) {
118
+ return this.getAttribute(name) !== null;
119
+ };
120
+ }
118
121
 
119
- // Apply Element prototype to the pre-existing DOM as soon as the body element appears.
120
- function bodyCheck() {
121
- if (!(loopLimit--)) clearTimeout(interval);
122
- if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) {
123
- shiv(document, true);
124
- if (interval && document.body.prototype) clearTimeout(interval);
125
- return (!!document.body.prototype);
122
+ // Apply Element prototype to the pre-existing DOM as soon as the body element appears.
123
+ function bodyCheck() {
124
+ if (!(loopLimit--)) clearTimeout(interval);
125
+ if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) {
126
+ shiv(document, true);
127
+ if (interval && document.body.prototype) clearTimeout(interval);
128
+ return (!!document.body.prototype);
129
+ }
130
+ return false;
131
+ }
132
+ if (!bodyCheck()) {
133
+ document.onreadystatechange = bodyCheck;
134
+ interval = setInterval(bodyCheck, 25);
126
135
  }
127
- return false;
128
- }
129
- if (!bodyCheck()) {
130
- document.onreadystatechange = bodyCheck;
131
- interval = setInterval(bodyCheck, 25);
132
- }
133
136
 
134
- // Apply to any new elements created after load
135
- document.createElement = function createElement(nodeName) {
136
- var element = nativeCreateElement(String(nodeName).toLowerCase());
137
- return shiv(element);
138
- };
137
+ // Apply to any new elements created after load
138
+ document.createElement = function createElement(nodeName) {
139
+ var element = nativeCreateElement(String(nodeName).toLowerCase());
140
+ return shiv(element);
141
+ };
139
142
 
140
- // remove sandboxed iframe
141
- document.removeChild(vbody);
142
- }());
143
+ // remove sandboxed iframe
144
+ document.removeChild(vbody);
145
+ }());
143
146
 
144
- })
145
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
147
+ })
148
+ .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
146
149
 
147
150
  })));
151
+ //# sourceMappingURL=Element.js.map