govuk_publishing_components 41.1.2 → 42.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +0 -1
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js +0 -1
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +0 -1
  5. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js +0 -1
  6. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-specialist-link-tracker.js +0 -1
  7. data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +0 -2
  8. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +0 -4
  9. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +0 -1
  10. data/app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js +0 -1
  11. data/app/assets/javascripts/govuk_publishing_components/lib.js +0 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-guidance.scss +1 -1
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-public.scss +1 -1
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +2 -2
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss +1 -1
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +1 -1
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +2 -2
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_reorderable-list.scss +1 -1
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +6 -6
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_single-page-notification-button.scss +1 -1
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +5 -5
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +3 -3
  24. data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +2 -2
  25. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_grid-helper.scss +1 -1
  26. data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +6 -1
  27. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +2 -5
  28. data/app/views/govuk_publishing_components/components/docs/layout_for_admin.yml +9 -0
  29. data/config/initializers/assets.rb +1 -8
  30. data/lib/govuk_publishing_components/version.rb +1 -1
  31. metadata +2 -29
  32. data/app/assets/config/govuk_publishing_components_sassc-rails_manifest.js +0 -90
  33. data/app/assets/javascripts/govuk_publishing_components/ie.js +0 -2
  34. data/app/assets/javascripts/govuk_publishing_components/vendor/html5shiv-printshiv.js +0 -4
  35. data/app/assets/javascripts/govuk_publishing_components/vendor/json2.js +0 -487
  36. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills/all.js +0 -1
  37. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills/closest.js +0 -23
  38. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills/common.js +0 -8
  39. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills/indexOf.js +0 -9
  40. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/DOMTokenList.js +0 -273
  41. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Date/now.js +0 -21
  42. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Document.js +0 -34
  43. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element/prototype/classList.js +0 -592
  44. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element/prototype/closest.js +0 -57
  45. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element/prototype/dataset.js +0 -303
  46. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element/prototype/matches.js +0 -32
  47. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element/prototype/nextElementSibling.js +0 -257
  48. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element/prototype/previousElementSibling.js +0 -257
  49. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Element.js +0 -148
  50. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Event.js +0 -506
  51. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Function/prototype/bind.js +0 -253
  52. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Object/defineProperty.js +0 -94
  53. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/String/prototype/trim.js +0 -22
  54. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills-govuk-frontend-v4/Window.js +0 -28
@@ -1,253 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3
- typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) :
4
- (factory());
5
- }(this, (function () { 'use strict';
6
-
7
- // @ts-nocheck
8
- (function (undefined) {
9
-
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
- );
24
-
25
- if (detect) return
26
-
27
- (function (nativeDefineProperty) {
28
-
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';
32
-
33
- Object.defineProperty = function defineProperty(object, property, descriptor) {
34
-
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
- }
39
-
40
- if (object === null || !(object instanceof Object || typeof object === 'object')) {
41
- throw new TypeError('Object.defineProperty called on non-object');
42
- }
43
-
44
- if (!(descriptor instanceof Object)) {
45
- throw new TypeError('Property description must be an object');
46
- }
47
-
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;
52
-
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);
60
- }
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
- // 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);
76
- }
77
- if (hasValueOrWritable) {
78
- throw new TypeError(ERR_VALUE_ACCESSORS);
79
- }
80
- Object.__defineSetter__.call(object, propertyString, descriptor.set);
81
- }
82
-
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
- }
87
-
88
- return object;
89
- };
90
- }(Object.defineProperty));
91
- })
92
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
93
-
94
- // @ts-nocheck
95
-
96
- (function(undefined) {
97
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js
98
- var detect = 'bind' in Function.prototype;
99
-
100
- if (detect) return
101
-
102
- Object.defineProperty(Function.prototype, 'bind', {
103
- value: function bind(that) { // .length is 1
104
- // add necessary es5-shim utilities
105
- var $Array = Array;
106
- var $Object = Object;
107
- var ObjectPrototype = $Object.prototype;
108
- var ArrayPrototype = $Array.prototype;
109
- var Empty = function Empty() {};
110
- var to_string = ObjectPrototype.toString;
111
- var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
112
- var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, tryFunctionObject = function tryFunctionObject(value) { try { fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]'; isCallable = function isCallable(value) { if (typeof value !== 'function') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; };
113
- var array_slice = ArrayPrototype.slice;
114
- var array_concat = ArrayPrototype.concat;
115
- var array_push = ArrayPrototype.push;
116
- var max = Math.max;
117
- // /add necessary es5-shim utilities
118
-
119
- // 1. Let Target be the this value.
120
- var target = this;
121
- // 2. If IsCallable(Target) is false, throw a TypeError exception.
122
- if (!isCallable(target)) {
123
- throw new TypeError('Function.prototype.bind called on incompatible ' + target);
124
- }
125
- // 3. Let A be a new (possibly empty) internal list of all of the
126
- // argument values provided after thisArg (arg1, arg2 etc), in order.
127
- // XXX slicedArgs will stand in for "A" if used
128
- var args = array_slice.call(arguments, 1); // for normal call
129
- // 4. Let F be a new native ECMAScript object.
130
- // 11. Set the [[Prototype]] internal property of F to the standard
131
- // built-in Function prototype object as specified in 15.3.3.1.
132
- // 12. Set the [[Call]] internal property of F as described in
133
- // 15.3.4.5.1.
134
- // 13. Set the [[Construct]] internal property of F as described in
135
- // 15.3.4.5.2.
136
- // 14. Set the [[HasInstance]] internal property of F as described in
137
- // 15.3.4.5.3.
138
- var bound;
139
- var binder = function () {
140
-
141
- if (this instanceof bound) {
142
- // 15.3.4.5.2 [[Construct]]
143
- // When the [[Construct]] internal method of a function object,
144
- // F that was created using the bind function is called with a
145
- // list of arguments ExtraArgs, the following steps are taken:
146
- // 1. Let target be the value of F's [[TargetFunction]]
147
- // internal property.
148
- // 2. If target has no [[Construct]] internal method, a
149
- // TypeError exception is thrown.
150
- // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
151
- // property.
152
- // 4. Let args be a new list containing the same values as the
153
- // list boundArgs in the same order followed by the same
154
- // values as the list ExtraArgs in the same order.
155
- // 5. Return the result of calling the [[Construct]] internal
156
- // method of target providing args as the arguments.
157
-
158
- var result = target.apply(
159
- this,
160
- array_concat.call(args, array_slice.call(arguments))
161
- );
162
- if ($Object(result) === result) {
163
- return result;
164
- }
165
- return this;
166
-
167
- } else {
168
- // 15.3.4.5.1 [[Call]]
169
- // When the [[Call]] internal method of a function object, F,
170
- // which was created using the bind function is called with a
171
- // this value and a list of arguments ExtraArgs, the following
172
- // steps are taken:
173
- // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
174
- // property.
175
- // 2. Let boundThis be the value of F's [[BoundThis]] internal
176
- // property.
177
- // 3. Let target be the value of F's [[TargetFunction]] internal
178
- // property.
179
- // 4. Let args be a new list containing the same values as the
180
- // list boundArgs in the same order followed by the same
181
- // values as the list ExtraArgs in the same order.
182
- // 5. Return the result of calling the [[Call]] internal method
183
- // of target providing boundThis as the this value and
184
- // providing args as the arguments.
185
-
186
- // equiv: target.call(this, ...boundArgs, ...args)
187
- return target.apply(
188
- that,
189
- array_concat.call(args, array_slice.call(arguments))
190
- );
191
-
192
- }
193
-
194
- };
195
-
196
- // 15. If the [[Class]] internal property of Target is "Function", then
197
- // a. Let L be the length property of Target minus the length of A.
198
- // b. Set the length own property of F to either 0 or L, whichever is
199
- // larger.
200
- // 16. Else set the length own property of F to 0.
201
-
202
- var boundLength = max(0, target.length - args.length);
203
-
204
- // 17. Set the attributes of the length own property of F to the values
205
- // specified in 15.3.5.1.
206
- var boundArgs = [];
207
- for (var i = 0; i < boundLength; i++) {
208
- array_push.call(boundArgs, '$' + i);
209
- }
210
-
211
- // XXX Build a dynamic function with desired amount of arguments is the only
212
- // way to set the length property of a function.
213
- // In environments where Content Security Policies enabled (Chrome extensions,
214
- // for ex.) all use of eval or Function costructor throws an exception.
215
- // However in all of these environments Function.prototype.bind exists
216
- // and so this code will never be executed.
217
- bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);
218
-
219
- if (target.prototype) {
220
- Empty.prototype = target.prototype;
221
- bound.prototype = new Empty();
222
- // Clean up dangling references.
223
- Empty.prototype = null;
224
- }
225
-
226
- // TODO
227
- // 18. Set the [[Extensible]] internal property of F to true.
228
-
229
- // TODO
230
- // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
231
- // 20. Call the [[DefineOwnProperty]] internal method of F with
232
- // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
233
- // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
234
- // false.
235
- // 21. Call the [[DefineOwnProperty]] internal method of F with
236
- // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
237
- // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
238
- // and false.
239
-
240
- // TODO
241
- // NOTE Function objects created using Function.prototype.bind do not
242
- // have a prototype property or the [[Code]], [[FormalParameters]], and
243
- // [[Scope]] internal properties.
244
- // XXX can't delete prototype in pure-js.
245
-
246
- // 22. Return F.
247
- return bound;
248
- }
249
- });
250
- })
251
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
252
-
253
- })));
@@ -1,94 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3
- typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) :
4
- (factory());
5
- }(this, (function () { 'use strict';
6
-
7
- // @ts-nocheck
8
- (function (undefined) {
9
-
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
- );
24
-
25
- if (detect) return
26
-
27
- (function (nativeDefineProperty) {
28
-
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';
32
-
33
- Object.defineProperty = function defineProperty(object, property, descriptor) {
34
-
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
- }
39
-
40
- if (object === null || !(object instanceof Object || typeof object === 'object')) {
41
- throw new TypeError('Object.defineProperty called on non-object');
42
- }
43
-
44
- if (!(descriptor instanceof Object)) {
45
- throw new TypeError('Property description must be an object');
46
- }
47
-
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;
52
-
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);
60
- }
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
- // 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);
76
- }
77
- if (hasValueOrWritable) {
78
- throw new TypeError(ERR_VALUE_ACCESSORS);
79
- }
80
- Object.__defineSetter__.call(object, propertyString, descriptor.set);
81
- }
82
-
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
- }
87
-
88
- return object;
89
- };
90
- }(Object.defineProperty));
91
- })
92
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
93
-
94
- })));
@@ -1,22 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3
- typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) :
4
- (factory());
5
- }(this, (function () { 'use strict';
6
-
7
- // @ts-nocheck
8
- (function (undefined) {
9
-
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);
12
-
13
- if (detect) return
14
-
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 || {});
21
-
22
- })));
@@ -1,28 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3
- typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) :
4
- (factory());
5
- }(this, (function () { 'use strict';
6
-
7
- // @ts-nocheck
8
- (function (undefined) {
9
-
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);
12
-
13
- if (detect) return
14
-
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
- }
24
-
25
- })
26
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
27
-
28
- })));