govuk_tech_docs 3.3.1 → 3.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/publish.yaml +10 -7
  3. data/.github/workflows/test.yaml +8 -3
  4. data/.nvmrc +1 -1
  5. data/.rubocop.yml +3 -0
  6. data/CHANGELOG.md +21 -1
  7. data/Gemfile +1 -1
  8. data/govuk_tech_docs.gemspec +13 -9
  9. data/lib/assets/stylesheets/_govuk_tech_docs.scss +13 -0
  10. data/lib/govuk_tech_docs/api_reference/api_reference_extension.rb +1 -1
  11. data/lib/govuk_tech_docs/api_reference/api_reference_renderer.rb +10 -10
  12. data/lib/govuk_tech_docs/path_helpers.rb +40 -10
  13. data/lib/govuk_tech_docs/redirects.rb +2 -2
  14. data/lib/govuk_tech_docs/table_of_contents/heading.rb +2 -2
  15. data/lib/govuk_tech_docs/table_of_contents/heading_tree_renderer.rb +5 -5
  16. data/lib/govuk_tech_docs/table_of_contents/helpers.rb +3 -3
  17. data/lib/govuk_tech_docs/version.rb +1 -1
  18. data/lib/govuk_tech_docs.rb +4 -4
  19. data/lib/source/favicon.ico +0 -0
  20. data/lib/source/layouts/_footer.erb +1 -1
  21. data/lib/source/layouts/_header.erb +15 -17
  22. data/node_modules/govuk-frontend/govuk/all-ie8.scss +8 -0
  23. data/node_modules/govuk-frontend/govuk/all.js +4918 -3796
  24. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +54 -49
  25. data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js +17 -0
  26. data/node_modules/govuk-frontend/govuk/common/index.js +172 -152
  27. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +334 -321
  28. data/node_modules/govuk-frontend/govuk/common.js +171 -151
  29. data/node_modules/govuk-frontend/govuk/components/_all.scss +3 -2
  30. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +26 -7
  31. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +2203 -1650
  32. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +24 -16
  33. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +34 -11
  34. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +49 -9
  35. data/node_modules/govuk-frontend/govuk/components/button/button.js +961 -916
  36. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +2142 -2038
  37. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +6 -6
  38. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +1204 -1145
  39. data/node_modules/govuk-frontend/govuk/components/details/details.js +826 -799
  40. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +1097 -1044
  41. data/node_modules/govuk-frontend/govuk/components/exit-this-page/_exit-this-page.scss +2 -0
  42. data/node_modules/govuk-frontend/govuk/components/exit-this-page/_index.scss +97 -0
  43. data/node_modules/govuk-frontend/govuk/components/exit-this-page/exit-this-page.js +2120 -0
  44. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +6 -1
  45. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -7
  46. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +6 -0
  47. data/node_modules/govuk-frontend/govuk/components/header/header.js +683 -1003
  48. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +15 -3
  49. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +786 -751
  50. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +5 -5
  51. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +1151 -1105
  52. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +7 -1
  53. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +1045 -1014
  54. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +107 -0
  55. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +1514 -1268
  56. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +18 -18
  57. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +8 -1
  58. data/node_modules/govuk-frontend/govuk/core/_all.scss +1 -0
  59. data/node_modules/govuk-frontend/govuk/core/_govuk-frontend-version.scss +5 -0
  60. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +5 -2
  61. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  62. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +1 -1
  63. data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +12 -0
  64. data/node_modules/govuk-frontend/govuk/i18n.js +371 -364
  65. data/node_modules/govuk-frontend/govuk/objects/_template.scss +20 -0
  66. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +1 -1
  67. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +4 -0
  68. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +16 -0
  69. data/node_modules/govuk-frontend/govuk/settings/_links.scss +5 -1
  70. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +5 -5
  71. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +38 -2
  72. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +243 -241
  73. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +14 -12
  74. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +18 -16
  75. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +553 -545
  76. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +40 -36
  77. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +257 -250
  78. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +22 -20
  79. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +204 -197
  80. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +204 -197
  81. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +109 -105
  82. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +407 -399
  83. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +242 -238
  84. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +73 -71
  85. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +15 -13
  86. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +18 -16
  87. data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +1 -0
  88. data/package-lock.json +2708 -8
  89. data/package.json +1 -1
  90. metadata +25 -7
  91. data/.ruby-version +0 -1
@@ -4,91 +4,93 @@
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/Object/defineProperty/detect.js
10
- var detect = (
11
- // In IE8, defineProperty could only act on DOM elements, so full support
12
- // for the feature requires the ability to set a property on an arbitrary object
13
- 'defineProperty' in Object && (function() {
14
- try {
15
- var a = {};
16
- Object.defineProperty(a, 'test', {value:42});
17
- return true;
18
- } catch(e) {
19
- return false
20
- }
21
- }())
22
- );
10
+ // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js
11
+ var detect = (
12
+ // In IE8, defineProperty could only act on DOM elements, so full support
13
+ // for the feature requires the ability to set a property on an arbitrary object
14
+ 'defineProperty' in Object && (function() {
15
+ try {
16
+ var a = {};
17
+ Object.defineProperty(a, 'test', {value:42});
18
+ return true;
19
+ } catch(e) {
20
+ return false
21
+ }
22
+ }())
23
+ );
23
24
 
24
- if (detect) return
25
+ if (detect) return
25
26
 
26
- // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Object.defineProperty&flags=always
27
- (function (nativeDefineProperty) {
27
+ // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Object.defineProperty&flags=always
28
+ (function (nativeDefineProperty) {
28
29
 
29
- var supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__');
30
- var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';
31
- var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';
30
+ var supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__');
31
+ var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';
32
+ var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';
32
33
 
33
- Object.defineProperty = function defineProperty(object, property, descriptor) {
34
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
34
35
 
35
- // Where native support exists, assume it
36
- if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {
37
- return nativeDefineProperty(object, property, descriptor);
38
- }
36
+ // Where native support exists, assume it
37
+ if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {
38
+ return nativeDefineProperty(object, property, descriptor);
39
+ }
39
40
 
40
- if (object === null || !(object instanceof Object || typeof object === 'object')) {
41
- throw new TypeError('Object.defineProperty called on non-object');
42
- }
41
+ if (object === null || !(object instanceof Object || typeof object === 'object')) {
42
+ throw new TypeError('Object.defineProperty called on non-object');
43
+ }
43
44
 
44
- if (!(descriptor instanceof Object)) {
45
- throw new TypeError('Property description must be an object');
46
- }
45
+ if (!(descriptor instanceof Object)) {
46
+ throw new TypeError('Property description must be an object');
47
+ }
47
48
 
48
- var propertyString = String(property);
49
- var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;
50
- var getterType = 'get' in descriptor && typeof descriptor.get;
51
- var setterType = 'set' in descriptor && typeof descriptor.set;
49
+ var propertyString = String(property);
50
+ var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;
51
+ var getterType = 'get' in descriptor && typeof descriptor.get;
52
+ var setterType = 'set' in descriptor && typeof descriptor.set;
52
53
 
53
- // handle descriptor.get
54
- if (getterType) {
55
- if (getterType !== 'function') {
56
- throw new TypeError('Getter must be a function');
57
- }
58
- if (!supportsAccessors) {
59
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
54
+ // handle descriptor.get
55
+ if (getterType) {
56
+ if (getterType !== 'function') {
57
+ throw new TypeError('Getter must be a function');
58
+ }
59
+ if (!supportsAccessors) {
60
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
61
+ }
62
+ if (hasValueOrWritable) {
63
+ throw new TypeError(ERR_VALUE_ACCESSORS);
64
+ }
65
+ Object.__defineGetter__.call(object, propertyString, descriptor.get);
66
+ } else {
67
+ object[propertyString] = descriptor.value;
60
68
  }
61
- if (hasValueOrWritable) {
62
- throw new TypeError(ERR_VALUE_ACCESSORS);
63
- }
64
- Object.__defineGetter__.call(object, propertyString, descriptor.get);
65
- } else {
66
- object[propertyString] = descriptor.value;
67
- }
68
69
 
69
- // handle descriptor.set
70
- if (setterType) {
71
- if (setterType !== 'function') {
72
- throw new TypeError('Setter must be a function');
73
- }
74
- if (!supportsAccessors) {
75
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
70
+ // handle descriptor.set
71
+ if (setterType) {
72
+ if (setterType !== 'function') {
73
+ throw new TypeError('Setter must be a function');
74
+ }
75
+ if (!supportsAccessors) {
76
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
77
+ }
78
+ if (hasValueOrWritable) {
79
+ throw new TypeError(ERR_VALUE_ACCESSORS);
80
+ }
81
+ Object.__defineSetter__.call(object, propertyString, descriptor.set);
76
82
  }
77
- if (hasValueOrWritable) {
78
- throw new TypeError(ERR_VALUE_ACCESSORS);
79
- }
80
- Object.__defineSetter__.call(object, propertyString, descriptor.set);
81
- }
82
83
 
83
- // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above
84
- if ('value' in descriptor) {
85
- object[propertyString] = descriptor.value;
86
- }
84
+ // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above
85
+ if ('value' in descriptor) {
86
+ object[propertyString] = descriptor.value;
87
+ }
87
88
 
88
- return object;
89
- };
90
- }(Object.defineProperty));
91
- })
92
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
89
+ return object;
90
+ };
91
+ }(Object.defineProperty));
92
+ })
93
+ .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
93
94
 
94
95
  })));
96
+ //# sourceMappingURL=defineProperty.js.map
@@ -1,21 +1,23 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3
- typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) :
4
- (factory());
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3
+ typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) :
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/mdn/content/blob/cf607d68522cd35ee7670782d3ee3a361eaef2e4/files/en-us/web/javascript/reference/global_objects/string/trim/index.md#polyfill
10
- var detect = ('trim' in String.prototype);
11
-
12
- if (detect) return
10
+ // Detection from https://github.com/mdn/content/blob/cf607d68522cd35ee7670782d3ee3a361eaef2e4/files/en-us/web/javascript/reference/global_objects/string/trim/index.md#polyfill
11
+ var detect = ('trim' in String.prototype);
13
12
 
14
- // Polyfill from https://github.com/mdn/content/blob/cf607d68522cd35ee7670782d3ee3a361eaef2e4/files/en-us/web/javascript/reference/global_objects/string/trim/index.md#polyfill
15
- String.prototype.trim = function () {
16
- return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
17
- };
13
+ if (detect) return
18
14
 
19
- }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
15
+ // Polyfill from https://github.com/mdn/content/blob/cf607d68522cd35ee7670782d3ee3a361eaef2e4/files/en-us/web/javascript/reference/global_objects/string/trim/index.md#polyfill
16
+ String.prototype.trim = function () {
17
+ return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
18
+ };
19
+
20
+ }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
20
21
 
21
22
  })));
23
+ //# sourceMappingURL=trim.js.map
@@ -4,25 +4,27 @@
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/Window/detect.js
10
- var detect = ('Window' in this);
10
+ // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js
11
+ var detect = ('Window' 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=Window&flags=always
15
- if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) {
16
- (function (global) {
17
- if (global.constructor) {
18
- global.Window = global.constructor;
19
- } else {
20
- (global.Window = global.constructor = new Function('return function Window() {}')()).prototype = this;
21
- }
22
- }(this));
23
- }
15
+ // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Window&flags=always
16
+ if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) {
17
+ (function (global) {
18
+ if (global.constructor) {
19
+ global.Window = global.constructor;
20
+ } else {
21
+ (global.Window = global.constructor = new Function('return function Window() {}')()).prototype = this;
22
+ }
23
+ }(this));
24
+ }
24
25
 
25
- })
26
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
26
+ })
27
+ .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
27
28
 
28
29
  })));
30
+ //# sourceMappingURL=Window.js.map
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  if (window.GOVUKPrototypeKit &&
2
3
  window.GOVUKPrototypeKit.documentReady &&
3
4
  window.GOVUKPrototypeKit.majorVersion >= 13) {