govuk_publishing_components 44.1.0 → 44.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +336 -225
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +334 -226
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.mjs +3 -0
- data/node_modules/govuk-frontend/dist/govuk/all.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest.svg +1 -0
- data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/index.mjs +21 -1
- data/node_modules/govuk-frontend/dist/govuk/common/index.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +92 -26
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +92 -26
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +12 -21
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +86 -20
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +86 -20
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs +6 -16
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +89 -23
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +89 -23
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +10 -19
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +113 -47
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +113 -47
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs +7 -16
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +7 -2
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +86 -20
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +86 -20
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs +6 -16
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +87 -21
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +87 -21
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs +7 -16
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +8 -10
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/fixtures.json +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +87 -21
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +87 -21
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs +7 -16
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-full-width-border.html +24 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +86 -20
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +86 -20
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs +6 -16
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +89 -23
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +89 -23
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs +9 -18
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +113 -47
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +113 -47
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs +7 -16
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +168 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/fixtures.json +464 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro-options.json +138 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +249 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +241 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs +85 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-default.html +57 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-html-navigation-items.html +49 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-large-navigation.html +153 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-long-service-name.html +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-a-current-item.html +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-an-active-item.html +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-non-link-navigation-items.html +49 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-link.html +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-name-and-navigation.html +63 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-name.html +18 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template.njk +102 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +93 -26
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +93 -26
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs +13 -21
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +93 -27
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +93 -27
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs +13 -22
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +4 -3
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs +16 -3
- data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend-component.mjs +49 -5
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend-component.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +2 -2
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/init.mjs +72 -10
- data/node_modules/govuk-frontend/dist/govuk/init.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss.map +1 -1
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +5 -1
- data/node_modules/govuk-frontend/package.json +8 -8
- metadata +29 -4
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest-2x.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest.png +0 -0
@@ -9,6 +9,7 @@ import { Header } from './components/header/header.mjs';
|
|
9
9
|
import { NotificationBanner } from './components/notification-banner/notification-banner.mjs';
|
10
10
|
import { PasswordInput } from './components/password-input/password-input.mjs';
|
11
11
|
import { Radios } from './components/radios/radios.mjs';
|
12
|
+
import { ServiceNavigation } from './components/service-navigation/service-navigation.mjs';
|
12
13
|
import { SkipLink } from './components/skip-link/skip-link.mjs';
|
13
14
|
import { Tabs } from './components/tabs/tabs.mjs';
|
14
15
|
import { SupportError } from './errors/index.mjs';
|
@@ -19,19 +20,28 @@ import { SupportError } from './errors/index.mjs';
|
|
19
20
|
* Use the `data-module` attributes to find, instantiate and init all of the
|
20
21
|
* components provided as part of GOV.UK Frontend.
|
21
22
|
*
|
22
|
-
* @param {Config & { scope?: Element }} [config] - Config for all components (with optional scope)
|
23
|
+
* @param {Config & { scope?: Element, onError?: OnErrorCallback<CompatibleClass> }} [config] - Config for all components (with optional scope)
|
23
24
|
*/
|
24
25
|
function initAll(config) {
|
25
26
|
var _config$scope;
|
26
27
|
config = typeof config !== 'undefined' ? config : {};
|
27
28
|
if (!isSupported()) {
|
28
|
-
|
29
|
+
if (config.onError) {
|
30
|
+
config.onError(new SupportError(), {
|
31
|
+
config
|
32
|
+
});
|
33
|
+
} else {
|
34
|
+
console.log(new SupportError());
|
35
|
+
}
|
29
36
|
return;
|
30
37
|
}
|
31
|
-
const components = [[Accordion, config.accordion], [Button, config.button], [CharacterCount, config.characterCount], [Checkboxes], [ErrorSummary, config.errorSummary], [ExitThisPage, config.exitThisPage], [Header], [NotificationBanner, config.notificationBanner], [PasswordInput, config.passwordInput], [Radios], [SkipLink], [Tabs]];
|
32
|
-
const
|
38
|
+
const components = [[Accordion, config.accordion], [Button, config.button], [CharacterCount, config.characterCount], [Checkboxes], [ErrorSummary, config.errorSummary], [ExitThisPage, config.exitThisPage], [Header], [NotificationBanner, config.notificationBanner], [PasswordInput, config.passwordInput], [Radios], [ServiceNavigation], [SkipLink], [Tabs]];
|
39
|
+
const options = {
|
40
|
+
scope: (_config$scope = config.scope) != null ? _config$scope : document,
|
41
|
+
onError: config.onError
|
42
|
+
};
|
33
43
|
components.forEach(([Component, config]) => {
|
34
|
-
createAll(Component, config,
|
44
|
+
createAll(Component, config, options);
|
35
45
|
});
|
36
46
|
}
|
37
47
|
|
@@ -46,17 +56,50 @@ function initAll(config) {
|
|
46
56
|
*
|
47
57
|
* @template {CompatibleClass} T
|
48
58
|
* @param {T} Component - class of the component to create
|
49
|
-
* @param {T["defaults"]} [config] -
|
50
|
-
* @param {Element|Document} [
|
59
|
+
* @param {T["defaults"]} [config] - Config supplied to component
|
60
|
+
* @param {OnErrorCallback<T> | Element | Document | CreateAllOptions<T> } [createAllOptions] - options for createAll including scope of the document to search within and callback function if error throw by component on init
|
51
61
|
* @returns {Array<InstanceType<T>>} - array of instantiated components
|
52
62
|
*/
|
53
|
-
function createAll(Component, config,
|
63
|
+
function createAll(Component, config, createAllOptions) {
|
64
|
+
let $scope = document;
|
65
|
+
let onError;
|
66
|
+
if (typeof createAllOptions === 'object') {
|
67
|
+
var _createAllOptions$sco;
|
68
|
+
createAllOptions = createAllOptions;
|
69
|
+
$scope = (_createAllOptions$sco = createAllOptions.scope) != null ? _createAllOptions$sco : $scope;
|
70
|
+
onError = createAllOptions.onError;
|
71
|
+
}
|
72
|
+
if (typeof createAllOptions === 'function') {
|
73
|
+
onError = createAllOptions;
|
74
|
+
}
|
75
|
+
if (createAllOptions instanceof HTMLElement) {
|
76
|
+
$scope = createAllOptions;
|
77
|
+
}
|
54
78
|
const $elements = $scope.querySelectorAll(`[data-module="${Component.moduleName}"]`);
|
79
|
+
if (!isSupported()) {
|
80
|
+
if (onError) {
|
81
|
+
onError(new SupportError(), {
|
82
|
+
component: Component,
|
83
|
+
config
|
84
|
+
});
|
85
|
+
} else {
|
86
|
+
console.log(new SupportError());
|
87
|
+
}
|
88
|
+
return [];
|
89
|
+
}
|
55
90
|
return Array.from($elements).map($element => {
|
56
91
|
try {
|
57
|
-
return
|
92
|
+
return typeof config !== 'undefined' ? new Component($element, config) : new Component($element);
|
58
93
|
} catch (error) {
|
59
|
-
|
94
|
+
if (onError) {
|
95
|
+
onError(error, {
|
96
|
+
element: $element,
|
97
|
+
component: Component,
|
98
|
+
config
|
99
|
+
});
|
100
|
+
} else {
|
101
|
+
console.log(error);
|
102
|
+
}
|
60
103
|
return null;
|
61
104
|
}
|
62
105
|
}).filter(Boolean);
|
@@ -95,6 +138,25 @@ function createAll(Component, config, $scope = document) {
|
|
95
138
|
*
|
96
139
|
* @typedef {keyof Config} ConfigKey
|
97
140
|
*/
|
141
|
+
/**
|
142
|
+
* @template {CompatibleClass} T
|
143
|
+
* @typedef {object} ErrorContext
|
144
|
+
* @property {Element} [element] - Element used for component module initialisation
|
145
|
+
* @property {T} [component] - Class of component
|
146
|
+
* @property {T["defaults"]} config - Config supplied to component
|
147
|
+
*/
|
148
|
+
/**
|
149
|
+
* @template {CompatibleClass} T
|
150
|
+
* @callback OnErrorCallback
|
151
|
+
* @param {unknown} error - Thrown error
|
152
|
+
* @param {ErrorContext<T>} context - Object containing the element, component class and configuration
|
153
|
+
*/
|
154
|
+
/**
|
155
|
+
* @template {CompatibleClass} T
|
156
|
+
* @typedef {object} CreateAllOptions
|
157
|
+
* @property {Element | Document} [scope] - scope of the document to search within
|
158
|
+
* @property {OnErrorCallback<T>} [onError] - callback function if error throw by component on init
|
159
|
+
*/
|
98
160
|
|
99
161
|
export { createAll, initAll };
|
100
162
|
//# sourceMappingURL=init.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"init.mjs","sources":["../../src/govuk/init.mjs"],"sourcesContent":["import { isSupported } from './common/index.mjs'\nimport { Accordion } from './components/accordion/accordion.mjs'\nimport { Button } from './components/button/button.mjs'\nimport { CharacterCount } from './components/character-count/character-count.mjs'\nimport { Checkboxes } from './components/checkboxes/checkboxes.mjs'\nimport { ErrorSummary } from './components/error-summary/error-summary.mjs'\nimport { ExitThisPage } from './components/exit-this-page/exit-this-page.mjs'\nimport { Header } from './components/header/header.mjs'\nimport { NotificationBanner } from './components/notification-banner/notification-banner.mjs'\nimport { PasswordInput } from './components/password-input/password-input.mjs'\nimport { Radios } from './components/radios/radios.mjs'\nimport { SkipLink } from './components/skip-link/skip-link.mjs'\nimport { Tabs } from './components/tabs/tabs.mjs'\nimport { SupportError } from './errors/index.mjs'\n\n/**\n * Initialise all components\n *\n * Use the `data-module` attributes to find, instantiate and init all of the\n * components provided as part of GOV.UK Frontend.\n *\n * @param {Config & { scope?: Element }} [config] - Config for all components (with optional scope)\n */\nfunction initAll(config) {\n config = typeof config !== 'undefined' ? config : {}\n\n // Skip initialisation when GOV.UK Frontend is not supported\n if (!isSupported()) {\n console.log(new SupportError())\n return\n }\n\n const components = /** @type {const} */ ([\n [Accordion, config.accordion],\n [Button, config.button],\n [CharacterCount, config.characterCount],\n [Checkboxes],\n [ErrorSummary, config.errorSummary],\n [ExitThisPage, config.exitThisPage],\n [Header],\n [NotificationBanner, config.notificationBanner],\n [PasswordInput, config.passwordInput],\n [Radios],\n [SkipLink],\n [Tabs]\n ])\n\n // Allow the user to initialise GOV.UK Frontend in only certain sections of the page\n // Defaults to the entire document if nothing is set.\n const $scope = config.scope ?? document\n\n components.forEach(([Component, config]) => {\n createAll(Component, config, $scope)\n })\n}\n\n/**\n * Create all instances of a specific component on the page\n *\n * Uses the `data-module` attribute to find all elements matching the specified\n * component on the page, creating instances of the component object for each\n * of them.\n *\n * Any component errors will be caught and logged to the console.\n *\n * @template {CompatibleClass} T\n * @param {T} Component - class of the component to create\n * @param {T[\"defaults\"]} [config] - config for the component\n * @param {Element|Document} [$scope] - scope of the document to search within\n * @returns {Array<InstanceType<T>>} - array of instantiated components\n */\nfunction createAll(Component, config, $scope = document) {\n const $elements = $scope.querySelectorAll(\n `[data-module=\"${Component.moduleName}\"]`\n )\n\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-return --\n * We can't define CompatibleClass as `{new(): CompatibleClass, moduleName: string}`,\n * as when doing `typeof Accordion` (or any component), TypeScript doesn't seem\n * to acknowledge the static `moduleName` that's set in our component classes.\n * This means we have to set the constructor of `CompatibleClass` as `{new(): any}`,\n * leading to ESLint frowning that we're returning `any[]`.\n */\n return Array.from($elements)\n .map(($element) => {\n try {\n // Only pass config to components that accept it\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return 'defaults' in Component && typeof config !== 'undefined'\n ? new Component($element, config)\n : new Component($element)\n } catch (error) {\n console.log(error)\n return null\n }\n })\n .filter(Boolean) // Exclude components that errored\n}\n\nexport { initAll, createAll }\n\n/* eslint-disable jsdoc/valid-types --\n * `{new(...args: any[] ): object}` is not recognised as valid\n * https://github.com/gajus/eslint-plugin-jsdoc/issues/145#issuecomment-1308722878\n * https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/131\n **/\n\n/**\n * @typedef {{new (...args: any[]): any, defaults?: object, moduleName: string}} CompatibleClass\n */\n\n/* eslint-enable jsdoc/valid-types */\n\n/**\n * Config for all components via `initAll()`\n *\n * @typedef {object} Config\n * @property {AccordionConfig} [accordion] - Accordion config\n * @property {ButtonConfig} [button] - Button config\n * @property {CharacterCountConfig} [characterCount] - Character Count config\n * @property {ErrorSummaryConfig} [errorSummary] - Error Summary config\n * @property {ExitThisPageConfig} [exitThisPage] - Exit This Page config\n * @property {NotificationBannerConfig} [notificationBanner] - Notification Banner config\n * @property {PasswordInputConfig} [passwordInput] - Password input config\n */\n\n/**\n * Config for individual components\n *\n * @typedef {import('./components/accordion/accordion.mjs').AccordionConfig} AccordionConfig\n * @typedef {import('./components/accordion/accordion.mjs').AccordionTranslations} AccordionTranslations\n * @typedef {import('./components/button/button.mjs').ButtonConfig} ButtonConfig\n * @typedef {import('./components/character-count/character-count.mjs').CharacterCountConfig} CharacterCountConfig\n * @typedef {import('./components/character-count/character-count.mjs').CharacterCountTranslations} CharacterCountTranslations\n * @typedef {import('./components/error-summary/error-summary.mjs').ErrorSummaryConfig} ErrorSummaryConfig\n * @typedef {import('./components/exit-this-page/exit-this-page.mjs').ExitThisPageConfig} ExitThisPageConfig\n * @typedef {import('./components/exit-this-page/exit-this-page.mjs').ExitThisPageTranslations} ExitThisPageTranslations\n * @typedef {import('./components/notification-banner/notification-banner.mjs').NotificationBannerConfig} NotificationBannerConfig\n * @typedef {import('./components/password-input/password-input.mjs').PasswordInputConfig} PasswordInputConfig\n */\n\n/**\n * Component config keys, e.g. `accordion` and `characterCount`\n *\n * @typedef {keyof Config} ConfigKey\n */\n"],"names":["initAll","config","_config$scope","isSupported","console","log","SupportError","components","Accordion","accordion","Button","button","CharacterCount","characterCount","Checkboxes","ErrorSummary","errorSummary","ExitThisPage","exitThisPage","Header","NotificationBanner","notificationBanner","PasswordInput","passwordInput","Radios","SkipLink","Tabs","$scope","scope","document","forEach","Component","createAll","$elements","querySelectorAll","moduleName","Array","from","map","$element","error","filter","Boolean"],"mappings":";;;;;;;;;;;;;;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,OAAOA,CAACC,MAAM,EAAE;AAAA,EAAA,IAAAC,aAAA,CAAA;EACvBD,MAAM,GAAG,OAAOA,MAAM,KAAK,WAAW,GAAGA,MAAM,GAAG,EAAE,CAAA;AAGpD,EAAA,IAAI,CAACE,WAAW,EAAE,EAAE;AAClBC,IAAAA,OAAO,CAACC,GAAG,CAAC,IAAIC,YAAY,EAAE,CAAC,CAAA;AAC/B,IAAA,OAAA;AACF,GAAA;AAEA,EAAA,MAAMC,UAAU,GAAyB,CACvC,CAACC,SAAS,EAAEP,MAAM,CAACQ,SAAS,CAAC,EAC7B,CAACC,MAAM,EAAET,MAAM,CAACU,MAAM,CAAC,EACvB,CAACC,cAAc,EAAEX,MAAM,CAACY,cAAc,CAAC,EACvC,CAACC,UAAU,CAAC,EACZ,CAACC,YAAY,EAAEd,MAAM,CAACe,YAAY,CAAC,EACnC,CAACC,YAAY,EAAEhB,MAAM,CAACiB,YAAY,CAAC,EACnC,CAACC,MAAM,CAAC,EACR,CAACC,kBAAkB,EAAEnB,MAAM,CAACoB,kBAAkB,CAAC,EAC/C,CAACC,aAAa,EAAErB,MAAM,CAACsB,aAAa,CAAC,EACrC,CAACC,MAAM,CAAC,EACR,CAACC,QAAQ,CAAC,EACV,CAACC,IAAI,CAAC,CACN,CAAA;EAIF,MAAMC,MAAM,GAAAzB,CAAAA,aAAA,GAAGD,MAAM,CAAC2B,KAAK,KAAA,IAAA,GAAA1B,aAAA,GAAI2B,QAAQ,CAAA;EAEvCtB,UAAU,CAACuB,OAAO,CAAC,CAAC,CAACC,SAAS,EAAE9B,MAAM,CAAC,KAAK;AAC1C+B,IAAAA,SAAS,CAACD,SAAS,EAAE9B,MAAM,EAAE0B,MAAM,CAAC,CAAA;AACtC,GAAC,CAAC,CAAA;AACJ,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,SAASA,CAACD,SAAS,EAAE9B,MAAM,EAAE0B,MAAM,GAAGE,QAAQ,EAAE;EACvD,MAAMI,SAAS,GAAGN,MAAM,CAACO,gBAAgB,CACvC,CAAA,cAAA,EAAiBH,SAAS,CAACI,UAAU,CAAA,EAAA,CACvC,CAAC,CAAA;EASD,OAAOC,KAAK,CAACC,IAAI,CAACJ,SAAS,CAAC,CACzBK,GAAG,CAAEC,QAAQ,IAAK;IACjB,IAAI;MAGF,OAAO,UAAU,IAAIR,SAAS,IAAI,OAAO9B,MAAM,KAAK,WAAW,GAC3D,IAAI8B,SAAS,CAACQ,QAAQ,EAAEtC,MAAM,CAAC,GAC/B,IAAI8B,SAAS,CAACQ,QAAQ,CAAC,CAAA;KAC5B,CAAC,OAAOC,KAAK,EAAE;AACdpC,MAAAA,OAAO,CAACC,GAAG,CAACmC,KAAK,CAAC,CAAA;AAClB,MAAA,OAAO,IAAI,CAAA;AACb,KAAA;AACF,GAAC,CAAC,CACDC,MAAM,CAACC,OAAO,CAAC,CAAA;AACpB,CAAA;AAUA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;"}
|
1
|
+
{"version":3,"file":"init.mjs","sources":["../../src/govuk/init.mjs"],"sourcesContent":["import { isSupported } from './common/index.mjs'\nimport { Accordion } from './components/accordion/accordion.mjs'\nimport { Button } from './components/button/button.mjs'\nimport { CharacterCount } from './components/character-count/character-count.mjs'\nimport { Checkboxes } from './components/checkboxes/checkboxes.mjs'\nimport { ErrorSummary } from './components/error-summary/error-summary.mjs'\nimport { ExitThisPage } from './components/exit-this-page/exit-this-page.mjs'\nimport { Header } from './components/header/header.mjs'\nimport { NotificationBanner } from './components/notification-banner/notification-banner.mjs'\nimport { PasswordInput } from './components/password-input/password-input.mjs'\nimport { Radios } from './components/radios/radios.mjs'\nimport { ServiceNavigation } from './components/service-navigation/service-navigation.mjs'\nimport { SkipLink } from './components/skip-link/skip-link.mjs'\nimport { Tabs } from './components/tabs/tabs.mjs'\nimport { SupportError } from './errors/index.mjs'\n\n/**\n * Initialise all components\n *\n * Use the `data-module` attributes to find, instantiate and init all of the\n * components provided as part of GOV.UK Frontend.\n *\n * @param {Config & { scope?: Element, onError?: OnErrorCallback<CompatibleClass> }} [config] - Config for all components (with optional scope)\n */\nfunction initAll(config) {\n config = typeof config !== 'undefined' ? config : {}\n\n // Skip initialisation when GOV.UK Frontend is not supported\n if (!isSupported()) {\n if (config.onError) {\n config.onError(new SupportError(), {\n config\n })\n } else {\n console.log(new SupportError())\n }\n return\n }\n\n const components = /** @type {const} */ ([\n [Accordion, config.accordion],\n [Button, config.button],\n [CharacterCount, config.characterCount],\n [Checkboxes],\n [ErrorSummary, config.errorSummary],\n [ExitThisPage, config.exitThisPage],\n [Header],\n [NotificationBanner, config.notificationBanner],\n [PasswordInput, config.passwordInput],\n [Radios],\n [ServiceNavigation],\n [SkipLink],\n [Tabs]\n ])\n\n // Allow the user to initialise GOV.UK Frontend in only certain sections of the page\n // Defaults to the entire document if nothing is set.\n // const $scope = config.scope ?? document\n\n const options = {\n scope: config.scope ?? document,\n onError: config.onError\n }\n\n components.forEach(([Component, config]) => {\n createAll(Component, config, options)\n })\n}\n\n/**\n * Create all instances of a specific component on the page\n *\n * Uses the `data-module` attribute to find all elements matching the specified\n * component on the page, creating instances of the component object for each\n * of them.\n *\n * Any component errors will be caught and logged to the console.\n *\n * @template {CompatibleClass} T\n * @param {T} Component - class of the component to create\n * @param {T[\"defaults\"]} [config] - Config supplied to component\n * @param {OnErrorCallback<T> | Element | Document | CreateAllOptions<T> } [createAllOptions] - options for createAll including scope of the document to search within and callback function if error throw by component on init\n * @returns {Array<InstanceType<T>>} - array of instantiated components\n */\nfunction createAll(Component, config, createAllOptions) {\n let /** @type {Element | Document} */ $scope = document\n let /** @type {OnErrorCallback<Component> | undefined} */ onError\n\n if (typeof createAllOptions === 'object') {\n createAllOptions = /** @type {CreateAllOptions<Component>} */ (\n // eslint-disable-next-line no-self-assign\n createAllOptions\n )\n\n $scope = createAllOptions.scope ?? $scope\n onError = createAllOptions.onError\n }\n\n if (typeof createAllOptions === 'function') {\n onError = createAllOptions\n }\n\n if (createAllOptions instanceof HTMLElement) {\n $scope = createAllOptions\n }\n\n const $elements = $scope.querySelectorAll(\n `[data-module=\"${Component.moduleName}\"]`\n )\n\n // Skip initialisation when GOV.UK Frontend is not supported\n if (!isSupported()) {\n if (onError) {\n onError(new SupportError(), {\n component: Component,\n config\n })\n } else {\n console.log(new SupportError())\n }\n return []\n }\n\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-return --\n * We can't define CompatibleClass as `{new(): CompatibleClass, moduleName: string}`,\n * as when doing `typeof Accordion` (or any component), TypeScript doesn't seem\n * to acknowledge the static `moduleName` that's set in our component classes.\n * This means we have to set the constructor of `CompatibleClass` as `{new(): any}`,\n * leading to ESLint frowning that we're returning `any[]`.\n */\n return Array.from($elements)\n .map(($element) => {\n try {\n // Only pass config to components that accept it\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return typeof config !== 'undefined'\n ? new Component($element, config)\n : new Component($element)\n } catch (error) {\n if (onError) {\n onError(error, {\n element: $element,\n component: Component,\n config\n })\n } else {\n console.log(error)\n }\n\n return null\n }\n })\n .filter(Boolean) // Exclude components that errored\n}\n\nexport { initAll, createAll }\n\n/* eslint-disable jsdoc/valid-types --\n * `{new(...args: any[] ): object}` is not recognised as valid\n * https://github.com/gajus/eslint-plugin-jsdoc/issues/145#issuecomment-1308722878\n * https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/131\n **/\n\n/**\n * @typedef {{new (...args: any[]): any, defaults?: object, moduleName: string}} CompatibleClass\n */\n\n/* eslint-enable jsdoc/valid-types */\n\n/**\n * Config for all components via `initAll()`\n *\n * @typedef {object} Config\n * @property {AccordionConfig} [accordion] - Accordion config\n * @property {ButtonConfig} [button] - Button config\n * @property {CharacterCountConfig} [characterCount] - Character Count config\n * @property {ErrorSummaryConfig} [errorSummary] - Error Summary config\n * @property {ExitThisPageConfig} [exitThisPage] - Exit This Page config\n * @property {NotificationBannerConfig} [notificationBanner] - Notification Banner config\n * @property {PasswordInputConfig} [passwordInput] - Password input config\n */\n\n/**\n * Config for individual components\n *\n * @typedef {import('./components/accordion/accordion.mjs').AccordionConfig} AccordionConfig\n * @typedef {import('./components/accordion/accordion.mjs').AccordionTranslations} AccordionTranslations\n * @typedef {import('./components/button/button.mjs').ButtonConfig} ButtonConfig\n * @typedef {import('./components/character-count/character-count.mjs').CharacterCountConfig} CharacterCountConfig\n * @typedef {import('./components/character-count/character-count.mjs').CharacterCountTranslations} CharacterCountTranslations\n * @typedef {import('./components/error-summary/error-summary.mjs').ErrorSummaryConfig} ErrorSummaryConfig\n * @typedef {import('./components/exit-this-page/exit-this-page.mjs').ExitThisPageConfig} ExitThisPageConfig\n * @typedef {import('./components/exit-this-page/exit-this-page.mjs').ExitThisPageTranslations} ExitThisPageTranslations\n * @typedef {import('./components/notification-banner/notification-banner.mjs').NotificationBannerConfig} NotificationBannerConfig\n * @typedef {import('./components/password-input/password-input.mjs').PasswordInputConfig} PasswordInputConfig\n */\n\n/**\n * Component config keys, e.g. `accordion` and `characterCount`\n *\n * @typedef {keyof Config} ConfigKey\n */\n\n/**\n * @template {CompatibleClass} T\n * @typedef {object} ErrorContext\n * @property {Element} [element] - Element used for component module initialisation\n * @property {T} [component] - Class of component\n * @property {T[\"defaults\"]} config - Config supplied to component\n */\n\n/**\n * @template {CompatibleClass} T\n * @callback OnErrorCallback\n * @param {unknown} error - Thrown error\n * @param {ErrorContext<T>} context - Object containing the element, component class and configuration\n */\n\n/**\n * @template {CompatibleClass} T\n * @typedef {object} CreateAllOptions\n * @property {Element | Document} [scope] - scope of the document to search within\n * @property {OnErrorCallback<T>} [onError] - callback function if error throw by component on init\n */\n"],"names":["initAll","config","_config$scope","isSupported","onError","SupportError","console","log","components","Accordion","accordion","Button","button","CharacterCount","characterCount","Checkboxes","ErrorSummary","errorSummary","ExitThisPage","exitThisPage","Header","NotificationBanner","notificationBanner","PasswordInput","passwordInput","Radios","ServiceNavigation","SkipLink","Tabs","options","scope","document","forEach","Component","createAll","createAllOptions","$scope","_createAllOptions$sco","HTMLElement","$elements","querySelectorAll","moduleName","component","Array","from","map","$element","error","element","filter","Boolean"],"mappings":"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"}
|
@@ -180,6 +180,9 @@ $_govuk-organisation-colours: (
|
|
180
180
|
colour: #002663,
|
181
181
|
deprecation-message: "`scotland-office` became `office-of-the-secretary-of-state-for-scotland` in 2018."
|
182
182
|
),
|
183
|
+
"serious-fraud-office": (
|
184
|
+
colour: #82368c
|
185
|
+
),
|
183
186
|
"uk-export-finance": (
|
184
187
|
colour: #cf102d
|
185
188
|
),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/settings/_colours-organisations.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,0BAA0B;AAC1B,GAAG;;AAEH,yDAAyD;AACzD,EAAE;AACF,kEAAkE;AAClE,0CAA0C;AAC1C,EAAE;AACF,4BAA4B;AAC5B,EAAE;AACF,gBAAgB;AAChB,iBAAiB;;AAEjB,+CAA+C;;AAE/C,+BAA+B;AAC/B,EAAE;AACF,YAAY;AACZ,EAAE;AACF,oEAAoE;AACpE,2EAA2E;AAC3E,uEAAuE;AACvE,6EAA6E;AAC7E,2BAA2B;AAC3B,uEAAuE;AACvE,sEAAsE;AACtE,+DAA+D;AAC/D,EAAE;AACF,kBAAkB;;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmKC;;AAED,8BAA8B;AAC9B,EAAE;AACF,4EAA4E;AAC5E,iDAAiD;AACjD,EAAE;AACF,YAAY;AACZ,EAAE;AACF,oEAAoE;AACpE,yEAAyE;AACzE,2EAA2E;AAC3E,sDAAsD;AACtD,EAAE;AACF,kBAAkB;;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiIC;;AAED,mEAAmE;AACnE,qEAAqE;AACrE,EAAE;AACF,YAAY;AACZ,iBAAiB;;AAEjB;;;;UAIU;;AAEV,8BAA8B;AAC9B,EAAE;AACF,0EAA0E;AAC1E,+CAA+C;AAC/C,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,kEAAkE;AAClE,mCAAmC;AACnC,EAAE;AACF,YAAY;AACZ,EAAE;AACF,kBAAkB;;AAElB;;;;CAIC","file":"_colours-organisations.scss","sourcesContent":["////\n/// @group settings/colours\n////\n\n/// Feature flag for updated organisation list and colours\n///\n/// When set to true, $govuk-colours-organisations will use the new\n/// organisation list and colour selection.\n///\n/// Should be removed in 6.0.\n///\n/// @type Boolean\n/// @access public\n\n$govuk-new-organisation-colours: false !default;\n\n/// Current organisation colours\n///\n/// @type Map\n///\n/// @prop $organisation.colour - Colour for the given `$organisation`\n/// @prop $organisation.contrast-safe - 'Contrast safe' colour for the given\n/// `$organisation`. This colour has at least a 4.5:1 contrast against\n/// white, to be used for copy and meet the AAA (large text) and AA (smaller\n/// copy) WCAG guidelines.\n/// @prop $organisation.deprecation-message - Marks this organisation as\n/// deprecated (usually because it has ceased to exist). Value is the\n/// deprecation message output to the terminal when compiling.\n///\n/// @access private\n\n$_govuk-organisation-colours: (\n \"attorney-generals-office\": (\n colour: #a91c8e\n ),\n \"cabinet-office\": (\n colour: #0056b8\n ),\n \"civil-service\": (\n colour: #b2292e\n ),\n \"department-for-business-trade\": (\n colour: #e52d13,\n contrast-safe: #e02c13\n ),\n \"department-for-business-energy-industrial-strategy\": (\n colour: #003479,\n deprecation-message:\n \"`department-for-business-energy-industrial-strategy` was dissolved in 2023. It was replaced by `department-for-business-trade`, `department-for-energy-security-net-zero` and `department-science-innovation-technology`.\"\n ),\n \"department-for-business-innovation-skills\": (\n colour: #003479,\n deprecation-message:\n \"`department-for-business-innovation-skills` became `department-for-business-energy-industrial-strategy` in 2016. As of 2023, it is equivalent to `department-for-business-trade` or `department-science-innovation-technology`.\"\n ),\n \"department-for-communities-local-government\": (\n colour: #009999,\n contrast-safe: #008080,\n deprecation-message:\n \"`department-for-communities-local-government` became `ministry-of-housing-communities-local-government` in 2018.\"\n ),\n \"department-for-culture-media-sport\": (\n colour: #d6006e\n ),\n \"department-for-digital-culture-media-sport\": (\n colour: #d40072,\n deprecation-message:\n \"`department-for-digital-culture-media-sport` became `department-for-culture-media-sport` in 2023.\"\n ),\n \"department-for-education\": (\n colour: #003764\n ),\n \"department-for-energy-security-net-zero\": (\n colour: #00a33b,\n contrast-safe: #00852f\n ),\n \"department-for-environment-food-rural-affairs\": (\n colour: #00af43,\n contrast-safe: #008733\n ),\n \"department-for-exiting-the-european-union\": (\n colour: #009fe3,\n contrast-safe: #007db6,\n deprecation-message: \"`department-for-exiting-the-european-union` was dissolved in 2020.\"\n ),\n \"department-for-international-development\": (\n colour: #002878,\n deprecation-message:\n \"`department-for-international-development` was merged into `foreign-commonwealth-development-office` in 2020.\"\n ),\n \"department-for-international-trade\": (\n colour: #cf102d,\n deprecation-message: \"`department-for-international-trade` was merged into `department-for-business-trade` in 2023.\"\n ),\n \"department-for-levelling-up-housing-communities\": (\n colour: #012169,\n deprecation-message:\n \"`department-for-levelling-up-housing-communities` was renamed to `ministry-of-housing-communities-local-government` in 2024.\"\n ),\n \"department-for-science-innovation-technology\": (\n colour: #00f9f8,\n contrast-safe: #008180\n ),\n \"department-for-transport\": (\n colour: #006853\n ),\n \"department-for-work-pensions\": (\n colour: #00bcb5,\n contrast-safe: #00857e\n ),\n \"department-of-energy-climate-change\": (\n colour: #009ddb,\n contrast-safe: #007db3,\n deprecation-message:\n \"`department-of-energy-climate-change` was merged into `department-for-business-energy-industrial-strategy` in 2016. As of 2023, it is equivalent to `department-for-energy-security-net-zero`.\"\n ),\n \"department-of-health\": (\n colour: #00ad93,\n contrast-safe: #008573,\n deprecation-message: \"`department-of-health` became `department-of-health-social-care` in 2018.\"\n ),\n \"department-of-health-social-care\": (\n colour: #00a990,\n contrast-safe: #008674\n ),\n \"foreign-commonwealth-office\": (\n colour: #003e74,\n deprecation-message: \"`foreign-commonwealth-office` became `foreign-commonwealth-development-office` in 2018.\"\n ),\n \"foreign-commonwealth-development-office\": (\n colour: #002269\n ),\n \"government-equalities-office\": (\n colour: #0056b8,\n deprecation-message: \"`government-equalities-office` is deprecated. Use `cabinet-office` instead.\"\n ),\n \"hm-government\": (\n colour: #266ebc\n ),\n \"hm-revenue-customs\": (\n colour: #008476\n ),\n \"hm-treasury\": (\n colour: #b2292e\n ),\n \"home-office\": (\n colour: #732282\n ),\n \"ministry-of-defence\": (\n colour: #532a45\n ),\n \"ministry-of-housing-communities-local-government\": (\n colour: #00625e\n ),\n \"ministry-of-justice\": (\n colour: #000000\n ),\n \"northern-ireland-office\": (\n colour: #00205c\n ),\n \"office-of-the-advocate-general-for-scotland\": (\n colour: #00205c\n ),\n \"office-of-the-leader-of-the-house-of-commons\": (\n colour: #497629\n ),\n \"office-of-the-leader-of-the-house-of-lords\": (\n colour: #9c182f\n ),\n \"office-of-the-secretary-of-state-for-scotland\": (\n colour: #00205c\n ),\n \"office-of-the-secretary-of-state-for-wales\": (\n colour: #a8353a\n ),\n \"prime-ministers-office-10-downing-street\": (\n colour: #0b0c0c\n ),\n \"scotland-office\": (\n colour: #002663,\n deprecation-message: \"`scotland-office` became `office-of-the-secretary-of-state-for-scotland` in 2018.\"\n ),\n \"uk-export-finance\": (\n colour: #cf102d\n ),\n \"uk-trade-investment\": (\n colour: #c80651,\n deprecation-message:\n \"`uk-trade-investment` became `department-for-international-trade` in 2016. As of 2023, it is equivalent to `department-for-business-trade`.\"\n ),\n \"wales-office\": (\n colour: #a33038,\n deprecation-message: \"`wales-office` became `office-of-the-secretary-of-state-for-wales` in 2018.\"\n )\n);\n\n/// Legacy organisation colours\n///\n/// These are the colours included with Frontend prior to 5.3.0. They will be\n/// removed in a future major version of Frontend.\n///\n/// @type Map\n///\n/// @prop $organisation.colour - Colour for the given `$organisation`\n/// @prop $organisation.colour-websafe - Optional alternative shade of the\n/// organisation colour. Despite the name, is not guaranteed to be websafe\n/// nor provide better contrast than the base colour.\n///\n/// @access private\n\n$_govuk-legacy-organisation-colours: (\n \"attorney-generals-office\": (\n colour: #9f1888,\n colour-websafe: #a03a88\n ),\n \"cabinet-office\": (\n colour: #005abb,\n colour-websafe: #347da4\n ),\n \"civil-service\": (\n colour: #af292e\n ),\n \"department-for-business-innovation-skills\": (\n colour: #003479,\n colour-websafe: #347da4\n ),\n \"department-for-communities-local-government\": (\n colour: #009999,\n colour-websafe: #37836e\n ),\n \"department-for-culture-media-sport\": (\n colour: #d40072,\n colour-websafe: #a03155\n ),\n \"department-for-education\": (\n colour: #003a69,\n colour-websafe: #347ca9\n ),\n \"department-for-environment-food-rural-affairs\": (\n colour: #00a33b,\n colour-websafe: #008938\n ),\n \"department-for-international-development\": (\n colour: #002878,\n colour-websafe: #405e9a\n ),\n \"department-for-international-trade\": (\n colour: #cf102d,\n colour-websafe: #005ea5\n ),\n \"department-for-business-trade\": (\n colour: #cf102d,\n colour-websafe: #005ea5\n ),\n \"department-for-levelling-up-housing-communities\": (\n colour: #012169\n ),\n \"department-for-transport\": (\n colour: #006c56,\n colour-websafe: #398373\n ),\n \"department-for-work-pensions\": (\n colour: #00beb7,\n colour-websafe: #37807b\n ),\n \"department-of-energy-climate-change\": (\n colour: #009ddb,\n colour-websafe: #2b7cac\n ),\n \"department-of-health\": (\n colour: #00ad93,\n colour-websafe: #39836e\n ),\n \"foreign-commonwealth-development-office\": (\n colour: #012169\n ),\n \"foreign-commonwealth-office\": (\n colour: #003e74,\n colour-websafe: #406e97\n ),\n \"government-equalities-office\": (\n colour: #9325b2\n ),\n \"hm-government\": (\n colour: #0076c0,\n colour-websafe: #347da4\n ),\n \"hm-revenue-customs\": (\n colour: #009390,\n colour-websafe: #008670\n ),\n \"hm-treasury\": (\n colour: #af292e,\n colour-websafe: #832322\n ),\n \"home-office\": (\n colour: #9325b2,\n colour-websafe: #9440b2\n ),\n \"ministry-of-defence\": (\n colour: #4d2942,\n colour-websafe: #5a5c92\n ),\n \"ministry-of-justice\": (\n colour: #231f20,\n colour-websafe: #5a5c92\n ),\n \"northern-ireland-office\": (\n colour: #002663,\n colour-websafe: #3e598c\n ),\n \"office-of-the-advocate-general-for-scotland\": (\n colour: #002663,\n colour-websafe: #005ea5\n ),\n \"office-of-the-leader-of-the-house-of-commons\": (\n colour: #317023,\n colour-websafe: #005f8f\n ),\n \"office-of-the-leader-of-the-house-of-lords\": (\n colour: #9c132e,\n colour-websafe: #c2395d\n ),\n \"scotland-office\": (\n colour: #002663,\n colour-websafe: #405c8a\n ),\n \"uk-export-finance\": (\n colour: #005747,\n colour-websafe: #005ea5\n ),\n \"uk-trade-investment\": (\n colour: #c80651,\n colour-websafe: #005ea5\n ),\n \"wales-office\": (\n colour: #a33038,\n colour-websafe: #7a242a\n )\n);\n\n/// Set public organisation colours variable to one of the two maps.\n/// Users can also pass their own map to this to override it entirely.\n///\n/// @type Map\n/// @access public\n\n$govuk-colours-organisations: if(\n $govuk-new-organisation-colours,\n $_govuk-organisation-colours,\n $_govuk-legacy-organisation-colours\n) !default;\n\n/// Organisation colour aliases\n///\n/// Some organisations have been renamed within our code over time. Here we\n/// map the prior key to the new equivalent key.\n///\n/// Note: This is for internal renames only. If a department has changed name\n/// or brand colour in a machinery of government change, it should be added to\n/// $govuk-colours-organisations as a new entry with any superseded\n/// organisations marked deprecated.\n///\n/// @type Map\n///\n/// @access private\n\n$_govuk-colours-organisations-aliases: (\n \"department-for-business-and-trade\": \"department-for-business-trade\",\n \"department-for-communities-and-local-government\": \"department-for-communities-local-government\",\n \"department-for-levelling-up-housing-and-communities\": \"department-for-levelling-up-housing-communities\"\n);\n"]}
|
1
|
+
{"version":3,"sources":["../../../src/govuk/settings/_colours-organisations.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,0BAA0B;AAC1B,GAAG;;AAEH,yDAAyD;AACzD,EAAE;AACF,kEAAkE;AAClE,0CAA0C;AAC1C,EAAE;AACF,4BAA4B;AAC5B,EAAE;AACF,gBAAgB;AAChB,iBAAiB;;AAEjB,+CAA+C;;AAE/C,+BAA+B;AAC/B,EAAE;AACF,YAAY;AACZ,EAAE;AACF,oEAAoE;AACpE,2EAA2E;AAC3E,uEAAuE;AACvE,6EAA6E;AAC7E,2BAA2B;AAC3B,uEAAuE;AACvE,sEAAsE;AACtE,+DAA+D;AAC/D,EAAE;AACF,kBAAkB;;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsKC;;AAED,8BAA8B;AAC9B,EAAE;AACF,4EAA4E;AAC5E,iDAAiD;AACjD,EAAE;AACF,YAAY;AACZ,EAAE;AACF,oEAAoE;AACpE,yEAAyE;AACzE,2EAA2E;AAC3E,sDAAsD;AACtD,EAAE;AACF,kBAAkB;;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiIC;;AAED,mEAAmE;AACnE,qEAAqE;AACrE,EAAE;AACF,YAAY;AACZ,iBAAiB;;AAEjB;;;;UAIU;;AAEV,8BAA8B;AAC9B,EAAE;AACF,0EAA0E;AAC1E,+CAA+C;AAC/C,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,kEAAkE;AAClE,mCAAmC;AACnC,EAAE;AACF,YAAY;AACZ,EAAE;AACF,kBAAkB;;AAElB;;;;CAIC","file":"_colours-organisations.scss","sourcesContent":["////\n/// @group settings/colours\n////\n\n/// Feature flag for updated organisation list and colours\n///\n/// When set to true, $govuk-colours-organisations will use the new\n/// organisation list and colour selection.\n///\n/// Should be removed in 6.0.\n///\n/// @type Boolean\n/// @access public\n\n$govuk-new-organisation-colours: false !default;\n\n/// Current organisation colours\n///\n/// @type Map\n///\n/// @prop $organisation.colour - Colour for the given `$organisation`\n/// @prop $organisation.contrast-safe - 'Contrast safe' colour for the given\n/// `$organisation`. This colour has at least a 4.5:1 contrast against\n/// white, to be used for copy and meet the AAA (large text) and AA (smaller\n/// copy) WCAG guidelines.\n/// @prop $organisation.deprecation-message - Marks this organisation as\n/// deprecated (usually because it has ceased to exist). Value is the\n/// deprecation message output to the terminal when compiling.\n///\n/// @access private\n\n$_govuk-organisation-colours: (\n \"attorney-generals-office\": (\n colour: #a91c8e\n ),\n \"cabinet-office\": (\n colour: #0056b8\n ),\n \"civil-service\": (\n colour: #b2292e\n ),\n \"department-for-business-trade\": (\n colour: #e52d13,\n contrast-safe: #e02c13\n ),\n \"department-for-business-energy-industrial-strategy\": (\n colour: #003479,\n deprecation-message:\n \"`department-for-business-energy-industrial-strategy` was dissolved in 2023. It was replaced by `department-for-business-trade`, `department-for-energy-security-net-zero` and `department-science-innovation-technology`.\"\n ),\n \"department-for-business-innovation-skills\": (\n colour: #003479,\n deprecation-message:\n \"`department-for-business-innovation-skills` became `department-for-business-energy-industrial-strategy` in 2016. As of 2023, it is equivalent to `department-for-business-trade` or `department-science-innovation-technology`.\"\n ),\n \"department-for-communities-local-government\": (\n colour: #009999,\n contrast-safe: #008080,\n deprecation-message:\n \"`department-for-communities-local-government` became `ministry-of-housing-communities-local-government` in 2018.\"\n ),\n \"department-for-culture-media-sport\": (\n colour: #d6006e\n ),\n \"department-for-digital-culture-media-sport\": (\n colour: #d40072,\n deprecation-message:\n \"`department-for-digital-culture-media-sport` became `department-for-culture-media-sport` in 2023.\"\n ),\n \"department-for-education\": (\n colour: #003764\n ),\n \"department-for-energy-security-net-zero\": (\n colour: #00a33b,\n contrast-safe: #00852f\n ),\n \"department-for-environment-food-rural-affairs\": (\n colour: #00af43,\n contrast-safe: #008733\n ),\n \"department-for-exiting-the-european-union\": (\n colour: #009fe3,\n contrast-safe: #007db6,\n deprecation-message: \"`department-for-exiting-the-european-union` was dissolved in 2020.\"\n ),\n \"department-for-international-development\": (\n colour: #002878,\n deprecation-message:\n \"`department-for-international-development` was merged into `foreign-commonwealth-development-office` in 2020.\"\n ),\n \"department-for-international-trade\": (\n colour: #cf102d,\n deprecation-message: \"`department-for-international-trade` was merged into `department-for-business-trade` in 2023.\"\n ),\n \"department-for-levelling-up-housing-communities\": (\n colour: #012169,\n deprecation-message:\n \"`department-for-levelling-up-housing-communities` was renamed to `ministry-of-housing-communities-local-government` in 2024.\"\n ),\n \"department-for-science-innovation-technology\": (\n colour: #00f9f8,\n contrast-safe: #008180\n ),\n \"department-for-transport\": (\n colour: #006853\n ),\n \"department-for-work-pensions\": (\n colour: #00bcb5,\n contrast-safe: #00857e\n ),\n \"department-of-energy-climate-change\": (\n colour: #009ddb,\n contrast-safe: #007db3,\n deprecation-message:\n \"`department-of-energy-climate-change` was merged into `department-for-business-energy-industrial-strategy` in 2016. As of 2023, it is equivalent to `department-for-energy-security-net-zero`.\"\n ),\n \"department-of-health\": (\n colour: #00ad93,\n contrast-safe: #008573,\n deprecation-message: \"`department-of-health` became `department-of-health-social-care` in 2018.\"\n ),\n \"department-of-health-social-care\": (\n colour: #00a990,\n contrast-safe: #008674\n ),\n \"foreign-commonwealth-office\": (\n colour: #003e74,\n deprecation-message: \"`foreign-commonwealth-office` became `foreign-commonwealth-development-office` in 2018.\"\n ),\n \"foreign-commonwealth-development-office\": (\n colour: #002269\n ),\n \"government-equalities-office\": (\n colour: #0056b8,\n deprecation-message: \"`government-equalities-office` is deprecated. Use `cabinet-office` instead.\"\n ),\n \"hm-government\": (\n colour: #266ebc\n ),\n \"hm-revenue-customs\": (\n colour: #008476\n ),\n \"hm-treasury\": (\n colour: #b2292e\n ),\n \"home-office\": (\n colour: #732282\n ),\n \"ministry-of-defence\": (\n colour: #532a45\n ),\n \"ministry-of-housing-communities-local-government\": (\n colour: #00625e\n ),\n \"ministry-of-justice\": (\n colour: #000000\n ),\n \"northern-ireland-office\": (\n colour: #00205c\n ),\n \"office-of-the-advocate-general-for-scotland\": (\n colour: #00205c\n ),\n \"office-of-the-leader-of-the-house-of-commons\": (\n colour: #497629\n ),\n \"office-of-the-leader-of-the-house-of-lords\": (\n colour: #9c182f\n ),\n \"office-of-the-secretary-of-state-for-scotland\": (\n colour: #00205c\n ),\n \"office-of-the-secretary-of-state-for-wales\": (\n colour: #a8353a\n ),\n \"prime-ministers-office-10-downing-street\": (\n colour: #0b0c0c\n ),\n \"scotland-office\": (\n colour: #002663,\n deprecation-message: \"`scotland-office` became `office-of-the-secretary-of-state-for-scotland` in 2018.\"\n ),\n \"serious-fraud-office\": (\n colour: #82368c\n ),\n \"uk-export-finance\": (\n colour: #cf102d\n ),\n \"uk-trade-investment\": (\n colour: #c80651,\n deprecation-message:\n \"`uk-trade-investment` became `department-for-international-trade` in 2016. As of 2023, it is equivalent to `department-for-business-trade`.\"\n ),\n \"wales-office\": (\n colour: #a33038,\n deprecation-message: \"`wales-office` became `office-of-the-secretary-of-state-for-wales` in 2018.\"\n )\n);\n\n/// Legacy organisation colours\n///\n/// These are the colours included with Frontend prior to 5.3.0. They will be\n/// removed in a future major version of Frontend.\n///\n/// @type Map\n///\n/// @prop $organisation.colour - Colour for the given `$organisation`\n/// @prop $organisation.colour-websafe - Optional alternative shade of the\n/// organisation colour. Despite the name, is not guaranteed to be websafe\n/// nor provide better contrast than the base colour.\n///\n/// @access private\n\n$_govuk-legacy-organisation-colours: (\n \"attorney-generals-office\": (\n colour: #9f1888,\n colour-websafe: #a03a88\n ),\n \"cabinet-office\": (\n colour: #005abb,\n colour-websafe: #347da4\n ),\n \"civil-service\": (\n colour: #af292e\n ),\n \"department-for-business-innovation-skills\": (\n colour: #003479,\n colour-websafe: #347da4\n ),\n \"department-for-communities-local-government\": (\n colour: #009999,\n colour-websafe: #37836e\n ),\n \"department-for-culture-media-sport\": (\n colour: #d40072,\n colour-websafe: #a03155\n ),\n \"department-for-education\": (\n colour: #003a69,\n colour-websafe: #347ca9\n ),\n \"department-for-environment-food-rural-affairs\": (\n colour: #00a33b,\n colour-websafe: #008938\n ),\n \"department-for-international-development\": (\n colour: #002878,\n colour-websafe: #405e9a\n ),\n \"department-for-international-trade\": (\n colour: #cf102d,\n colour-websafe: #005ea5\n ),\n \"department-for-business-trade\": (\n colour: #cf102d,\n colour-websafe: #005ea5\n ),\n \"department-for-levelling-up-housing-communities\": (\n colour: #012169\n ),\n \"department-for-transport\": (\n colour: #006c56,\n colour-websafe: #398373\n ),\n \"department-for-work-pensions\": (\n colour: #00beb7,\n colour-websafe: #37807b\n ),\n \"department-of-energy-climate-change\": (\n colour: #009ddb,\n colour-websafe: #2b7cac\n ),\n \"department-of-health\": (\n colour: #00ad93,\n colour-websafe: #39836e\n ),\n \"foreign-commonwealth-development-office\": (\n colour: #012169\n ),\n \"foreign-commonwealth-office\": (\n colour: #003e74,\n colour-websafe: #406e97\n ),\n \"government-equalities-office\": (\n colour: #9325b2\n ),\n \"hm-government\": (\n colour: #0076c0,\n colour-websafe: #347da4\n ),\n \"hm-revenue-customs\": (\n colour: #009390,\n colour-websafe: #008670\n ),\n \"hm-treasury\": (\n colour: #af292e,\n colour-websafe: #832322\n ),\n \"home-office\": (\n colour: #9325b2,\n colour-websafe: #9440b2\n ),\n \"ministry-of-defence\": (\n colour: #4d2942,\n colour-websafe: #5a5c92\n ),\n \"ministry-of-justice\": (\n colour: #231f20,\n colour-websafe: #5a5c92\n ),\n \"northern-ireland-office\": (\n colour: #002663,\n colour-websafe: #3e598c\n ),\n \"office-of-the-advocate-general-for-scotland\": (\n colour: #002663,\n colour-websafe: #005ea5\n ),\n \"office-of-the-leader-of-the-house-of-commons\": (\n colour: #317023,\n colour-websafe: #005f8f\n ),\n \"office-of-the-leader-of-the-house-of-lords\": (\n colour: #9c132e,\n colour-websafe: #c2395d\n ),\n \"scotland-office\": (\n colour: #002663,\n colour-websafe: #405c8a\n ),\n \"uk-export-finance\": (\n colour: #005747,\n colour-websafe: #005ea5\n ),\n \"uk-trade-investment\": (\n colour: #c80651,\n colour-websafe: #005ea5\n ),\n \"wales-office\": (\n colour: #a33038,\n colour-websafe: #7a242a\n )\n);\n\n/// Set public organisation colours variable to one of the two maps.\n/// Users can also pass their own map to this to override it entirely.\n///\n/// @type Map\n/// @access public\n\n$govuk-colours-organisations: if(\n $govuk-new-organisation-colours,\n $_govuk-organisation-colours,\n $_govuk-legacy-organisation-colours\n) !default;\n\n/// Organisation colour aliases\n///\n/// Some organisations have been renamed within our code over time. Here we\n/// map the prior key to the new equivalent key.\n///\n/// Note: This is for internal renames only. If a department has changed name\n/// or brand colour in a machinery of government change, it should be added to\n/// $govuk-colours-organisations as a new entry with any superseded\n/// organisations marked deprecated.\n///\n/// @type Map\n///\n/// @access private\n\n$_govuk-colours-organisations-aliases: (\n \"department-for-business-and-trade\": \"department-for-business-trade\",\n \"department-for-communities-and-local-government\": \"department-for-communities-local-government\",\n \"department-for-levelling-up-housing-and-communities\": \"department-for-levelling-up-housing-communities\"\n);\n"]}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"description": "GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.",
|
4
4
|
"urls": {
|
5
5
|
"documentation": "https://design-system.service.gov.uk/",
|
6
|
-
"releaseNotes": "https://github.com/alphagov/govuk-frontend/releases/tag/v5.
|
6
|
+
"releaseNotes": "https://github.com/alphagov/govuk-frontend/releases/tag/v5.7.0",
|
7
7
|
"versionHistory": "https://github.com/alphagov/govuk-frontend/releases"
|
8
8
|
}
|
9
9
|
},
|
@@ -133,6 +133,10 @@
|
|
133
133
|
"importFrom": "govuk/components/select/macro.njk",
|
134
134
|
"macroName": "govukSelect"
|
135
135
|
},
|
136
|
+
{
|
137
|
+
"importFrom": "govuk/components/service-navigation/macro.njk",
|
138
|
+
"macroName": "govukServiceNavigation"
|
139
|
+
},
|
136
140
|
{
|
137
141
|
"importFrom": "govuk/components/skip-link/macro.njk",
|
138
142
|
"macroName": "govukSkipLink"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "govuk-frontend",
|
3
3
|
"description": "GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.",
|
4
|
-
"version": "5.
|
4
|
+
"version": "5.7.0",
|
5
5
|
"main": "dist/govuk/all.bundle.js",
|
6
6
|
"module": "dist/govuk/all.mjs",
|
7
7
|
"sass": "dist/govuk/all.scss",
|
@@ -62,8 +62,8 @@
|
|
62
62
|
"version": "echo $npm_package_version"
|
63
63
|
},
|
64
64
|
"devDependencies": {
|
65
|
-
"@babel/core": "^7.25.
|
66
|
-
"@babel/preset-env": "^7.25.
|
65
|
+
"@babel/core": "^7.25.7",
|
66
|
+
"@babel/preset-env": "^7.25.7",
|
67
67
|
"@govuk-frontend/config": "*",
|
68
68
|
"@govuk-frontend/helpers": "*",
|
69
69
|
"@govuk-frontend/lib": "*",
|
@@ -72,20 +72,20 @@
|
|
72
72
|
"@rollup/plugin-replace": "^5.0.7",
|
73
73
|
"@rollup/plugin-terser": "^0.4.4",
|
74
74
|
"autoprefixer": "^10.4.20",
|
75
|
-
"cssnano": "^7.0.
|
75
|
+
"cssnano": "^7.0.6",
|
76
76
|
"cssnano-preset-default": "^7.0.1",
|
77
77
|
"govuk-prototype-kit": "^13.16.2",
|
78
78
|
"gulp": "^5.0.0",
|
79
79
|
"gulp-cli": "^3.0.0",
|
80
|
-
"html-validate": "8.
|
80
|
+
"html-validate": "8.24.0",
|
81
81
|
"nunjucks": "^3.2.4",
|
82
82
|
"outdent": "^0.8.0",
|
83
|
-
"postcss": "^8.4.
|
83
|
+
"postcss": "^8.4.47",
|
84
84
|
"postcss-scss": "^4.0.9",
|
85
|
-
"puppeteer": "^
|
85
|
+
"puppeteer": "^23.5.0",
|
86
86
|
"rollup": "^4.19.1",
|
87
87
|
"sass-color-helpers": "^2.1.1",
|
88
|
-
"sass-embedded": "^1.
|
88
|
+
"sass-embedded": "^1.79.4",
|
89
89
|
"sassdoc": "^2.7.4",
|
90
90
|
"slash": "^5.1.0"
|
91
91
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 44.
|
4
|
+
version: 44.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -1048,8 +1048,7 @@ files:
|
|
1048
1048
|
- node_modules/govuk-frontend/dist/govuk/assets/fonts/light-f591b13f7d-v2.woff
|
1049
1049
|
- node_modules/govuk-frontend/dist/govuk/assets/images/favicon.ico
|
1050
1050
|
- node_modules/govuk-frontend/dist/govuk/assets/images/favicon.svg
|
1051
|
-
- node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest
|
1052
|
-
- node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest.png
|
1051
|
+
- node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest.svg
|
1053
1052
|
- node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-180.png
|
1054
1053
|
- node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-192.png
|
1055
1054
|
- node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-512.png
|
@@ -1397,6 +1396,7 @@ files:
|
|
1397
1396
|
- node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-menu-button-label.html
|
1398
1397
|
- node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-menu-button-text.html
|
1399
1398
|
- node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-navigation-label.html
|
1399
|
+
- node_modules/govuk-frontend/dist/govuk/components/header/template-with-full-width-border.html
|
1400
1400
|
- node_modules/govuk-frontend/dist/govuk/components/header/template-with-large-navigation.html
|
1401
1401
|
- node_modules/govuk-frontend/dist/govuk/components/header/template-with-navigation.html
|
1402
1402
|
- node_modules/govuk-frontend/dist/govuk/components/header/template-with-product-name.html
|
@@ -1631,6 +1631,31 @@ files:
|
|
1631
1631
|
- node_modules/govuk-frontend/dist/govuk/components/select/template-with-optional-form-group-classes.html
|
1632
1632
|
- node_modules/govuk-frontend/dist/govuk/components/select/template-with-selected-value.html
|
1633
1633
|
- node_modules/govuk-frontend/dist/govuk/components/select/template.njk
|
1634
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/README.md
|
1635
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss
|
1636
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss.map
|
1637
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss
|
1638
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss.map
|
1639
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/fixtures.json
|
1640
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro-options.json
|
1641
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro.njk
|
1642
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js
|
1643
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map
|
1644
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs
|
1645
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map
|
1646
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs
|
1647
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs.map
|
1648
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-default.html
|
1649
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-html-navigation-items.html
|
1650
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-large-navigation.html
|
1651
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-long-service-name.html
|
1652
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-a-current-item.html
|
1653
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-an-active-item.html
|
1654
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-non-link-navigation-items.html
|
1655
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-link.html
|
1656
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-name-and-navigation.html
|
1657
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-name.html
|
1658
|
+
- node_modules/govuk-frontend/dist/govuk/components/service-navigation/template.njk
|
1634
1659
|
- node_modules/govuk-frontend/dist/govuk/components/skip-link/README.md
|
1635
1660
|
- node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss
|
1636
1661
|
- node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss.map
|
Binary file
|
Binary file
|