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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/lib/assets/stylesheets/_govuk_tech_docs.scss +13 -0
- data/lib/govuk_tech_docs/version.rb +1 -1
- data/lib/source/favicon.ico +0 -0
- data/lib/source/layouts/_header.erb +13 -15
- data/node_modules/govuk-frontend/govuk/all-ie8.scss +8 -0
- data/node_modules/govuk-frontend/govuk/all.js +4918 -3796
- data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +54 -49
- data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js +17 -0
- data/node_modules/govuk-frontend/govuk/common/index.js +172 -152
- data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +334 -321
- data/node_modules/govuk-frontend/govuk/common.js +171 -151
- data/node_modules/govuk-frontend/govuk/components/_all.scss +3 -2
- data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +26 -7
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +2203 -1650
- data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +24 -16
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +34 -11
- data/node_modules/govuk-frontend/govuk/components/button/_index.scss +49 -9
- data/node_modules/govuk-frontend/govuk/components/button/button.js +961 -916
- data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +2142 -2038
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +6 -6
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +1204 -1145
- data/node_modules/govuk-frontend/govuk/components/details/details.js +826 -799
- data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +1097 -1044
- data/node_modules/govuk-frontend/govuk/components/exit-this-page/_exit-this-page.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/exit-this-page/_index.scss +97 -0
- data/node_modules/govuk-frontend/govuk/components/exit-this-page/exit-this-page.js +2120 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +6 -1
- data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -7
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +6 -0
- data/node_modules/govuk-frontend/govuk/components/header/header.js +683 -1003
- data/node_modules/govuk-frontend/govuk/components/input/_index.scss +15 -3
- data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +786 -751
- data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +5 -5
- data/node_modules/govuk-frontend/govuk/components/radios/radios.js +1151 -1105
- data/node_modules/govuk-frontend/govuk/components/select/_index.scss +7 -1
- data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +1045 -1014
- data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +107 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +1514 -1268
- data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +18 -18
- data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +8 -1
- data/node_modules/govuk-frontend/govuk/core/_all.scss +1 -0
- data/node_modules/govuk-frontend/govuk/core/_govuk-frontend-version.scss +5 -0
- data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +5 -2
- data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
- data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +1 -1
- data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +12 -0
- data/node_modules/govuk-frontend/govuk/i18n.js +371 -364
- data/node_modules/govuk-frontend/govuk/objects/_template.scss +20 -0
- data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +1 -1
- data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +4 -0
- data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +16 -0
- data/node_modules/govuk-frontend/govuk/settings/_links.scss +5 -1
- data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +5 -5
- data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +38 -2
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +243 -241
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +14 -12
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +18 -16
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +553 -545
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +40 -36
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +257 -250
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +22 -20
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +204 -197
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +204 -197
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +109 -105
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +407 -399
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +242 -238
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +73 -71
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +15 -13
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +18 -16
- data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +1 -0
- data/package-lock.json +7 -7
- data/package.json +1 -1
- metadata +8 -3
@@ -4,144 +4,148 @@
|
|
4
4
|
(factory());
|
5
5
|
}(this, (function () { 'use strict';
|
6
6
|
|
7
|
-
|
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
|
-
|
18
|
+
if (this.HTMLDocument) { // IE8
|
18
19
|
|
19
|
-
|
20
|
-
|
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
|
-
|
23
|
+
} else {
|
23
24
|
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
-
|
35
|
+
// @ts-nocheck
|
35
36
|
|
36
|
-
|
37
|
-
var detect = ('Element' in this && 'HTMLElement' in this);
|
37
|
+
(function(undefined) {
|
38
38
|
|
39
|
-
|
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
|
-
|
42
|
-
(function () {
|
42
|
+
if (detect) return
|
43
43
|
|
44
|
-
//
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|
-
|
51
|
-
|
56
|
+
// generate sandboxed iframe
|
57
|
+
var vbody = document.appendChild(document.createElement('body'));
|
58
|
+
var frame = vbody.appendChild(document.createElement('iframe'));
|
52
59
|
|
53
|
-
|
54
|
-
|
55
|
-
|
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
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
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
|
-
|
63
|
-
|
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
|
-
|
70
|
-
|
75
|
+
for (key in cache) {
|
76
|
+
value = cache[key];
|
77
|
+
element[key] = value;
|
78
|
+
}
|
79
|
+
}
|
71
80
|
|
72
|
-
|
73
|
-
|
74
|
-
element[key] = value;
|
81
|
+
while (childNode = deep && childNodes[++index]) {
|
82
|
+
shiv(childNode, deep);
|
75
83
|
}
|
76
|
-
}
|
77
84
|
|
78
|
-
|
79
|
-
|
80
|
-
}
|
85
|
+
return element;
|
86
|
+
};
|
81
87
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
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
|
-
|
108
|
-
|
110
|
+
cache[propertyName] = newValue;
|
111
|
+
});
|
109
112
|
|
110
|
-
|
113
|
+
prototype.constructor = Element;
|
111
114
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
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
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
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
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
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
|
-
|
141
|
-
|
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
|