hof 22.9.0-beta → 22.9.0-beta.v2
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.
- package/package.json +1 -1
- package/hof-22.9.0.tgz +0 -0
- package/package/.eslintignore +0 -1
- package/package/CHANGELOG.md +0 -232
- package/package/LICENSE +0 -21
- package/package/README.md +0 -1887
- package/package/bin/hof-build +0 -10
- package/package/bin/hof-transpiler +0 -12
- package/package/build/helpers/importer.js +0 -29
- package/package/build/helpers/local.js +0 -35
- package/package/build/helpers/resolver/import.js +0 -32
- package/package/build/helpers/resolver/nearest-package-root.js +0 -33
- package/package/build/helpers/resolver/package.js +0 -29
- package/package/build/helpers/resolver.js +0 -16
- package/package/build/index.js +0 -49
- package/package/build/lib/env.js +0 -36
- package/package/build/lib/mkdir.js +0 -9
- package/package/build/lib/run.js +0 -17
- package/package/build/lib/spawn.js +0 -18
- package/package/build/tasks/browserify/compress.js +0 -15
- package/package/build/tasks/browserify/index.js +0 -48
- package/package/build/tasks/build/index.js +0 -6
- package/package/build/tasks/images/index.js +0 -27
- package/package/build/tasks/index.js +0 -8
- package/package/build/tasks/sass/index.js +0 -67
- package/package/build/tasks/translate/index.js +0 -20
- package/package/build/tasks/watch/index.js +0 -161
- package/package/components/address-lookup/default-model.js +0 -76
- package/package/components/address-lookup/defaults.js +0 -25
- package/package/components/address-lookup/index.js +0 -251
- package/package/components/address-lookup/templates/address-lookup.html +0 -14
- package/package/components/address-lookup/templates/address.html +0 -22
- package/package/components/address-lookup/templates/postcode.html +0 -9
- package/package/components/clear-session/Readme.md +0 -46
- package/package/components/clear-session/index.js +0 -26
- package/package/components/combine-and-loop-fields/Readme.md +0 -42
- package/package/components/combine-and-loop-fields/index.js +0 -156
- package/package/components/date/fields.js +0 -16
- package/package/components/date/index.js +0 -172
- package/package/components/date/templates/date.html +0 -20
- package/package/components/emailer/assets/images/govuk_logotype_email.png +0 -0
- package/package/components/emailer/assets/images/ho_crest_27px.png +0 -0
- package/package/components/emailer/assets/images/spacer.gif +0 -0
- package/package/components/emailer/email-service.js +0 -51
- package/package/components/emailer/emailer.js +0 -53
- package/package/components/emailer/index.js +0 -74
- package/package/components/emailer/transports/debug.js +0 -74
- package/package/components/emailer/transports/index.js +0 -8
- package/package/components/emailer/transports/ses.js +0 -36
- package/package/components/emailer/transports/smtp.js +0 -26
- package/package/components/emailer/transports/stub.js +0 -5
- package/package/components/emailer/views/layout.html +0 -63
- package/package/components/homeoffice-countries/index.js +0 -22
- package/package/components/index.js +0 -13
- package/package/components/notify/index.js +0 -62
- package/package/components/notify/notify.js +0 -51
- package/package/components/session-timeout-warning/index.js +0 -67
- package/package/components/summary/index.js +0 -237
- package/package/config/builder-defaults.js +0 -45
- package/package/config/component-defaults.js +0 -13
- package/package/config/hof-defaults.js +0 -65
- package/package/config/rate-limits.js +0 -20
- package/package/config/sanitisation-rules.js +0 -32
- package/package/controller/base-controller.js +0 -296
- package/package/controller/behaviour-hooks.js +0 -51
- package/package/controller/behaviour-session.js +0 -64
- package/package/controller/controller.js +0 -258
- package/package/controller/deprecate-error.js +0 -10
- package/package/controller/formatting/formatters.js +0 -70
- package/package/controller/formatting/index.js +0 -32
- package/package/controller/index.js +0 -17
- package/package/controller/validation/email.js +0 -30
- package/package/controller/validation/index.js +0 -101
- package/package/controller/validation/validators.js +0 -181
- package/package/controller/validation-error.js +0 -14
- package/package/frontend/govuk-template/build/config.js +0 -24
- package/package/frontend/govuk-template/build/govuk_template.html +0 -102
- package/package/frontend/govuk-template/build/index.js +0 -23
- package/package/frontend/govuk-template/govuk_template_generated.html +0 -102
- package/package/frontend/govuk-template/index.js +0 -29
- package/package/frontend/index.js +0 -9
- package/package/frontend/template-mixins/mixins/helpers.js +0 -103
- package/package/frontend/template-mixins/mixins/index.js +0 -37
- package/package/frontend/template-mixins/mixins/render.js +0 -12
- package/package/frontend/template-mixins/mixins/template-mixins.js +0 -520
- package/package/frontend/template-mixins/partials/forms/checkbox-group.html +0 -47
- package/package/frontend/template-mixins/partials/forms/checkbox.html +0 -16
- package/package/frontend/template-mixins/partials/forms/input-submit.html +0 -1
- package/package/frontend/template-mixins/partials/forms/input-text-date.html +0 -37
- package/package/frontend/template-mixins/partials/forms/input-text-group.html +0 -45
- package/package/frontend/template-mixins/partials/forms/option-group.html +0 -43
- package/package/frontend/template-mixins/partials/forms/select.html +0 -17
- package/package/frontend/template-mixins/partials/forms/textarea-group.html +0 -37
- package/package/frontend/template-mixins/partials/mixins/panel.html +0 -4
- package/package/frontend/template-partials/index.js +0 -9
- package/package/frontend/template-partials/translations/index.js +0 -26
- package/package/frontend/template-partials/translations/src/cy/base.json +0 -4
- package/package/frontend/template-partials/translations/src/cy/buttons.json +0 -6
- package/package/frontend/template-partials/translations/src/cy/cookies.json +0 -104
- package/package/frontend/template-partials/translations/src/cy/errorlist.json +0 -6
- package/package/frontend/template-partials/translations/src/cy/errors.json +0 -18
- package/package/frontend/template-partials/translations/src/cy/terms.json +0 -28
- package/package/frontend/template-partials/translations/src/en/accessibility.json +0 -43
- package/package/frontend/template-partials/translations/src/en/base.json +0 -5
- package/package/frontend/template-partials/translations/src/en/buttons.json +0 -10
- package/package/frontend/template-partials/translations/src/en/cookies.json +0 -116
- package/package/frontend/template-partials/translations/src/en/errorlist.json +0 -7
- package/package/frontend/template-partials/translations/src/en/errors.json +0 -35
- package/package/frontend/template-partials/translations/src/en/exit.json +0 -5
- package/package/frontend/template-partials/translations/src/en/fields.json +0 -5
- package/package/frontend/template-partials/translations/src/en/journey.json +0 -6
- package/package/frontend/template-partials/translations/src/en/save-and-exit.json +0 -4
- package/package/frontend/template-partials/translations/src/en/terms.json +0 -28
- package/package/frontend/template-partials/views/404.html +0 -9
- package/package/frontend/template-partials/views/accessibility.html +0 -55
- package/package/frontend/template-partials/views/confirm.html +0 -8
- package/package/frontend/template-partials/views/confirmation.html +0 -19
- package/package/frontend/template-partials/views/content/en/what-happens-next.md +0 -0
- package/package/frontend/template-partials/views/cookie-error.html +0 -1
- package/package/frontend/template-partials/views/cookies.html +0 -84
- package/package/frontend/template-partials/views/email/data-row.html +0 -4
- package/package/frontend/template-partials/views/email/formatted.html +0 -12
- package/package/frontend/template-partials/views/email/layout.html +0 -63
- package/package/frontend/template-partials/views/email/raw.html +0 -11
- package/package/frontend/template-partials/views/email/section-row.html +0 -3
- package/package/frontend/template-partials/views/error.html +0 -20
- package/package/frontend/template-partials/views/exit.html +0 -9
- package/package/frontend/template-partials/views/feedback-submitted.html +0 -11
- package/package/frontend/template-partials/views/layout.html +0 -55
- package/package/frontend/template-partials/views/partials/analytics-table.html +0 -25
- package/package/frontend/template-partials/views/partials/back.html +0 -5
- package/package/frontend/template-partials/views/partials/bullet-list.html +0 -7
- package/package/frontend/template-partials/views/partials/confirmation-alert.html +0 -6
- package/package/frontend/template-partials/views/partials/continue.html +0 -5
- package/package/frontend/template-partials/views/partials/cookie-banner.html +0 -29
- package/package/frontend/template-partials/views/partials/cookie-notification.html +0 -4
- package/package/frontend/template-partials/views/partials/cookie-settings-button.html +0 -1
- package/package/frontend/template-partials/views/partials/cookie-settings-radio.html +0 -8
- package/package/frontend/template-partials/views/partials/details-summary.html +0 -8
- package/package/frontend/template-partials/views/partials/external-link.html +0 -1
- package/package/frontend/template-partials/views/partials/form.html +0 -10
- package/package/frontend/template-partials/views/partials/gatag.html +0 -60
- package/package/frontend/template-partials/views/partials/head.html +0 -31
- package/package/frontend/template-partials/views/partials/heading.html +0 -11
- package/package/frontend/template-partials/views/partials/items-table.html +0 -32
- package/package/frontend/template-partials/views/partials/maincontent-left.html +0 -10
- package/package/frontend/template-partials/views/partials/navigation.html +0 -8
- package/package/frontend/template-partials/views/partials/page.html +0 -23
- package/package/frontend/template-partials/views/partials/panel-indent.html +0 -3
- package/package/frontend/template-partials/views/partials/session-cookies-table.html +0 -28
- package/package/frontend/template-partials/views/partials/session-timeout-warning.html +0 -38
- package/package/frontend/template-partials/views/partials/summary-table-row.html +0 -14
- package/package/frontend/template-partials/views/partials/summary-table.html +0 -8
- package/package/frontend/template-partials/views/partials/table.html +0 -18
- package/package/frontend/template-partials/views/partials/validation-list.html +0 -3
- package/package/frontend/template-partials/views/partials/validation-summary.html +0 -25
- package/package/frontend/template-partials/views/partials/warn.html +0 -7
- package/package/frontend/template-partials/views/rate-limit-error.html +0 -10
- package/package/frontend/template-partials/views/save-and-exit.html +0 -17
- package/package/frontend/template-partials/views/service-unavailable.html +0 -13
- package/package/frontend/template-partials/views/session-timeout.html +0 -7
- package/package/frontend/template-partials/views/step.html +0 -14
- package/package/frontend/template-partials/views/terms.html +0 -26
- package/package/frontend/themes/gov-uk/client-js/cookieSettings.js +0 -145
- package/package/frontend/themes/gov-uk/client-js/govuk-cookies.js +0 -121
- package/package/frontend/themes/gov-uk/client-js/index.js +0 -27
- package/package/frontend/themes/gov-uk/client-js/session-timeout-dialog.js +0 -348
- package/package/frontend/themes/gov-uk/client-js/skip-to-main.js +0 -19
- package/package/frontend/themes/gov-uk/index.js +0 -9
- package/package/frontend/themes/gov-uk/styles/_base.scss +0 -17
- package/package/frontend/themes/gov-uk/styles/_check_your_answers.scss +0 -155
- package/package/frontend/themes/gov-uk/styles/_cookie-banner.scss +0 -111
- package/package/frontend/themes/gov-uk/styles/_cookie-settings.scss +0 -33
- package/package/frontend/themes/gov-uk/styles/_govuk_frontend_toolkit.scss +0 -23
- package/package/frontend/themes/gov-uk/styles/_helpers.scss +0 -5
- package/package/frontend/themes/gov-uk/styles/_layout.scss +0 -125
- package/package/frontend/themes/gov-uk/styles/_panel-indent.scss +0 -27
- package/package/frontend/themes/gov-uk/styles/_pdf.scss +0 -42
- package/package/frontend/themes/gov-uk/styles/_session-timeout-dialog.scss +0 -121
- package/package/frontend/themes/gov-uk/styles/_typography.scss +0 -27
- package/package/frontend/themes/gov-uk/styles/_variables.scss +0 -11
- package/package/frontend/themes/gov-uk/styles/govuk.scss +0 -43
- package/package/frontend/themes/gov-uk/styles/mixins.scss +0 -16
- package/package/frontend/themes/gov-uk/styles/modules/_alerts.scss +0 -73
- package/package/frontend/themes/gov-uk/styles/modules/_buttons.scss +0 -5
- package/package/frontend/themes/gov-uk/styles/modules/_character-count.scss +0 -8
- package/package/frontend/themes/gov-uk/styles/modules/_confirm-page.scss +0 -20
- package/package/frontend/themes/gov-uk/styles/modules/_lists.scss +0 -5
- package/package/frontend/themes/gov-uk/styles/modules/_progressive-reveal.scss +0 -17
- package/package/frontend/themes/gov-uk/styles/modules/_validation.scss +0 -51
- package/package/frontend/themes/index.js +0 -5
- package/package/frontend/toolkit/assets/images/passports/new-window-link-blue.png +0 -0
- package/package/frontend/toolkit/assets/images/passports/new-window-link.png +0 -0
- package/package/frontend/toolkit/assets/images/spinner.gif +0 -0
- package/package/frontend/toolkit/assets/javascript/character-count.js +0 -99
- package/package/frontend/toolkit/assets/javascript/form-focus.js +0 -101
- package/package/frontend/toolkit/assets/javascript/helpers.js +0 -177
- package/package/frontend/toolkit/assets/javascript/progressive-reveal.js +0 -72
- package/package/frontend/toolkit/assets/javascript/validation.js +0 -71
- package/package/frontend/toolkit/assets/javascript/vendor/details.polyfill.js +0 -189
- package/package/frontend/toolkit/assets/javascript/vendor/indexof.polyfill.js +0 -39
- package/package/frontend/toolkit/assets/javascript/vendor/safari-cachebuster.js +0 -6
- package/package/frontend/toolkit/assets/stylesheets/_base.scss +0 -17
- package/package/frontend/toolkit/assets/stylesheets/_helpers.scss +0 -5
- package/package/frontend/toolkit/assets/stylesheets/_layout.scss +0 -118
- package/package/frontend/toolkit/assets/stylesheets/_typography.scss +0 -27
- package/package/frontend/toolkit/assets/stylesheets/_variables.scss +0 -11
- package/package/frontend/toolkit/assets/stylesheets/app.scss +0 -30
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_buttons.scss +0 -47
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_details.scss +0 -38
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_elements-typography.scss +0 -175
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_forms.scss +0 -167
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_helpers.scss +0 -39
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_layout.scss +0 -67
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_lists.scss +0 -40
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_panels.scss +0 -29
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_reset.scss +0 -33
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_tables.scss +0 -33
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-block-labels.scss +0 -63
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-date.scss +0 -39
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-validation.scss +0 -63
- package/package/frontend/toolkit/assets/stylesheets/mixins.scss +0 -16
- package/package/frontend/toolkit/assets/stylesheets/modules/_alerts.scss +0 -73
- package/package/frontend/toolkit/assets/stylesheets/modules/_buttons.scss +0 -5
- package/package/frontend/toolkit/assets/stylesheets/modules/_confirm-page.scss +0 -20
- package/package/frontend/toolkit/assets/stylesheets/modules/_lists.scss +0 -5
- package/package/frontend/toolkit/assets/stylesheets/modules/_progressive-reveal.scss +0 -17
- package/package/frontend/toolkit/assets/stylesheets/modules/_validation.scss +0 -51
- package/package/frontend/toolkit/index.js +0 -10
- package/package/index.js +0 -351
- package/package/lib/deindex.js +0 -18
- package/package/lib/encryption.js +0 -23
- package/package/lib/ga-tag.js +0 -89
- package/package/lib/health.js +0 -26
- package/package/lib/helpers.js +0 -66
- package/package/lib/logger.js +0 -65
- package/package/lib/markdown.js +0 -46
- package/package/lib/router.js +0 -111
- package/package/lib/serve-static.js +0 -12
- package/package/lib/sessions.js +0 -82
- package/package/lib/settings.js +0 -74
- package/package/lib/which.js +0 -28
- package/package/middleware/cookies.js +0 -43
- package/package/middleware/deep-translate.js +0 -32
- package/package/middleware/errors.js +0 -119
- package/package/middleware/index.js +0 -10
- package/package/middleware/not-found.js +0 -38
- package/package/middleware/rate-limiter.js +0 -98
- package/package/middleware/service-unavailable.js +0 -64
- package/package/model/apis/axios-settings.js +0 -21
- package/package/model/apis/html-to-pdf-converter.js +0 -35
- package/package/model/apis/index.js +0 -5
- package/package/model/index.js +0 -348
- package/package/package.json +0 -147
- package/package/sandbox/README.md +0 -66
- package/package/sandbox/apps/sandbox/behaviours/clear-session.js +0 -8
- package/package/sandbox/apps/sandbox/behaviours/country-select.js +0 -10
- package/package/sandbox/apps/sandbox/behaviours/international-number.js +0 -22
- package/package/sandbox/apps/sandbox/fields.js +0 -128
- package/package/sandbox/apps/sandbox/index.js +0 -99
- package/package/sandbox/apps/sandbox/lib/staticAppealStages.js +0 -189
- package/package/sandbox/apps/sandbox/sections/summary-data-sections.js +0 -43
- package/package/sandbox/apps/sandbox/translations/src/en/errors.json +0 -5
- package/package/sandbox/apps/sandbox/translations/src/en/exit.json +0 -4
- package/package/sandbox/apps/sandbox/translations/src/en/fields.json +0 -101
- package/package/sandbox/apps/sandbox/translations/src/en/journey.json +0 -7
- package/package/sandbox/apps/sandbox/translations/src/en/pages.json +0 -72
- package/package/sandbox/apps/sandbox/translations/src/en/validation.json +0 -54
- package/package/sandbox/apps/sandbox/views/form-guidance-link.html +0 -8
- package/package/sandbox/apps/sandbox/views/save-and-exit.html +0 -19
- package/package/sandbox/assets/images/icons/icon-caret-left.png +0 -0
- package/package/sandbox/assets/images/icons/icon-complete.png +0 -0
- package/package/sandbox/assets/images/icons/icon-cross-remove-sign.png +0 -0
- package/package/sandbox/assets/js/index.js +0 -70
- package/package/sandbox/assets/scss/app.scss +0 -27
- package/package/sandbox/codecept.conf.js +0 -15
- package/package/sandbox/config.js +0 -17
- package/package/sandbox/package.json +0 -26
- package/package/sandbox/server.js +0 -23
- package/package/sandbox/yarn.lock +0 -262
- package/package/transpiler/index.js +0 -2
- package/package/transpiler/lib/aggregate.js +0 -32
- package/package/transpiler/lib/build.js +0 -15
- package/package/transpiler/lib/compile.js +0 -12
- package/package/transpiler/lib/expand-dirs.js +0 -14
- package/package/transpiler/lib/write-files.js +0 -24
- package/package/utilities/autofill/index.js +0 -189
- package/package/utilities/autofill/inputs.js +0 -60
- package/package/utilities/countries.js +0 -12
- package/package/utilities/helpers/index.js +0 -189
- package/package/utilities/index.js +0 -9
- package/package/utilities/reqres/index.js +0 -18
- package/package/utilities/test-data/data/domain.json +0 -7
- package/package/utilities/test-data/data/firstname.json +0 -16
- package/package/utilities/test-data/data/lastname.json +0 -10
- package/package/utilities/test-data/data/postcode.json +0 -12
- package/package/utilities/test-data/data/streetname.json +0 -8
- package/package/utilities/test-data/data/streetsuffix.json +0 -7
- package/package/utilities/test-data/data/town.json +0 -9
- package/package/utilities/test-data/index.js +0 -67
- package/package/wizard/behaviours/complete.js +0 -20
- package/package/wizard/behaviours/index.js +0 -5
- package/package/wizard/index.js +0 -124
- package/package/wizard/middleware/back-links.js +0 -68
- package/package/wizard/middleware/check-complete.js +0 -13
- package/package/wizard/middleware/check-progress.js +0 -139
- package/package/wizard/middleware/check-session.js +0 -17
- package/package/wizard/middleware/csrf.js +0 -47
- package/package/wizard/middleware/session-model.js +0 -11
- package/package/wizard/middleware/session.js +0 -9
- package/package/wizard/model.js +0 -29
- package/package/wizard/util/constants.js +0 -5
- package/package/wizard/util/helpers.js +0 -19
@@ -1,189 +0,0 @@
|
|
1
|
-
/* eslint-disable max-len, no-var, no-cond-assign, no-param-reassign, vars-on-top */
|
2
|
-
// <details> polyfill
|
3
|
-
// http://caniuse.com/#feat=details
|
4
|
-
|
5
|
-
// FF Support for HTML5's <details> and <summary>
|
6
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=591737
|
7
|
-
|
8
|
-
// http://www.sitepoint.com/fixing-the-details-element/
|
9
|
-
|
10
|
-
(function () {
|
11
|
-
'use strict';
|
12
|
-
|
13
|
-
var NATIVE_DETAILS = typeof document.createElement('details').open === 'boolean';
|
14
|
-
|
15
|
-
// Add event varruct for modern browsers or IE
|
16
|
-
// which fires the callback with a pre-converted target reference
|
17
|
-
function addEvent(node, type, callback) {
|
18
|
-
if (node.addEventListener) {
|
19
|
-
node.addEventListener(type, function (e) {
|
20
|
-
callback(e, e.target);
|
21
|
-
}, false);
|
22
|
-
} else if (node.attachEvent) {
|
23
|
-
node.attachEvent('on' + type, function (e) {
|
24
|
-
callback(e, e.srcElement);
|
25
|
-
});
|
26
|
-
}
|
27
|
-
}
|
28
|
-
|
29
|
-
// Handle cross-modal click events
|
30
|
-
function addClickEvent(node, callback) {
|
31
|
-
// Prevent space(32) from scrolling the page
|
32
|
-
addEvent(node, 'keypress', function (e, target) {
|
33
|
-
if (target.nodeName === 'SUMMARY') {
|
34
|
-
if (e.keyCode === 32) {
|
35
|
-
if (e.preventDefault) {
|
36
|
-
e.preventDefault();
|
37
|
-
} else {
|
38
|
-
e.returnValue = false;
|
39
|
-
}
|
40
|
-
}
|
41
|
-
}
|
42
|
-
});
|
43
|
-
// When the key comes up - check if it is enter(13) or space(32)
|
44
|
-
addEvent(node, 'keyup', function (e, target) {
|
45
|
-
if (e.keyCode === 13 || e.keyCode === 32) { callback(e, target); }
|
46
|
-
});
|
47
|
-
addEvent(node, 'mouseup', function (e, target) {
|
48
|
-
callback(e, target);
|
49
|
-
});
|
50
|
-
}
|
51
|
-
|
52
|
-
// Get the nearest ancestor element of a node that matches a given tag name
|
53
|
-
function getAncestor(node, match) {
|
54
|
-
do {
|
55
|
-
if (!node || node.nodeName.toLowerCase() === match) {
|
56
|
-
break;
|
57
|
-
}
|
58
|
-
} while (node = node.parentNode);
|
59
|
-
|
60
|
-
return node;
|
61
|
-
}
|
62
|
-
|
63
|
-
// Create a started flag so we can prevent the initialisation
|
64
|
-
// function firing from both DOMContentLoaded and window.onload
|
65
|
-
var started = false;
|
66
|
-
|
67
|
-
// Initialisation function
|
68
|
-
function addDetailsPolyfill(list) {
|
69
|
-
// If this has already happened, just return
|
70
|
-
// else set the flag so it doesn't happen again
|
71
|
-
if (started) {
|
72
|
-
return;
|
73
|
-
}
|
74
|
-
started = true;
|
75
|
-
|
76
|
-
// Get the collection of details elements, but if that's empty
|
77
|
-
// then we don't need to bother with the rest of the scripting
|
78
|
-
if ((list = document.getElementsByTagName('details')).length === 0) {
|
79
|
-
return;
|
80
|
-
}
|
81
|
-
|
82
|
-
// else iterate through them to apply their initial state
|
83
|
-
var n = list.length; var i = 0;
|
84
|
-
for (i; i < n; i++) {
|
85
|
-
var details = list[i];
|
86
|
-
|
87
|
-
// Save shortcuts to the inner summary and content elements
|
88
|
-
details.__summary = details.getElementsByTagName('summary').item(0);
|
89
|
-
details.__content = details.getElementsByTagName('div').item(0);
|
90
|
-
|
91
|
-
// If the content doesn't have an ID, assign it one now
|
92
|
-
// which we'll need for the summary's aria-controls assignment
|
93
|
-
if (!details.__content.id) {
|
94
|
-
details.__content.id = 'details-content-' + i;
|
95
|
-
}
|
96
|
-
|
97
|
-
// Add ARIA role="group" to details
|
98
|
-
details.setAttribute('role', 'group');
|
99
|
-
|
100
|
-
// Add role=button to summary
|
101
|
-
details.__summary.setAttribute('role', 'button');
|
102
|
-
|
103
|
-
// Add aria-controls
|
104
|
-
details.__summary.setAttribute('aria-controls', details.__content.id);
|
105
|
-
|
106
|
-
// Set tabIndex so the summary is keyboard accessible for non-native elements
|
107
|
-
// http://www.saliences.com/browserBugs/tabIndex.html
|
108
|
-
if (!NATIVE_DETAILS) {
|
109
|
-
details.__summary.tabIndex = 0;
|
110
|
-
}
|
111
|
-
|
112
|
-
// Detect initial open state
|
113
|
-
var openAttr = details.getAttribute('open') !== null;
|
114
|
-
if (openAttr === true) {
|
115
|
-
details.__summary.setAttribute('aria-expanded', 'true');
|
116
|
-
details.__content.setAttribute('aria-hidden', 'false');
|
117
|
-
} else {
|
118
|
-
details.__summary.setAttribute('aria-expanded', 'false');
|
119
|
-
details.__content.setAttribute('aria-hidden', 'true');
|
120
|
-
if (!NATIVE_DETAILS) {
|
121
|
-
details.__content.style.display = 'none';
|
122
|
-
}
|
123
|
-
}
|
124
|
-
|
125
|
-
// Create a circular reference from the summary back to its
|
126
|
-
// parent details element, for convenience in the click handler
|
127
|
-
details.__summary.__details = details;
|
128
|
-
|
129
|
-
// If this is not a native implementation, create an arrow
|
130
|
-
// inside the summary
|
131
|
-
if (!NATIVE_DETAILS) {
|
132
|
-
var twisty = document.createElement('i');
|
133
|
-
|
134
|
-
if (openAttr === true) {
|
135
|
-
twisty.className = 'arrow arrow-open';
|
136
|
-
twisty.appendChild(document.createTextNode('\u25bc'));
|
137
|
-
} else {
|
138
|
-
twisty.className = 'arrow arrow-closed';
|
139
|
-
twisty.appendChild(document.createTextNode('\u25ba'));
|
140
|
-
}
|
141
|
-
|
142
|
-
details.__summary.__twisty = details.__summary.insertBefore(twisty, details.__summary.firstChild);
|
143
|
-
details.__summary.__twisty.setAttribute('aria-hidden', 'true');
|
144
|
-
}
|
145
|
-
}
|
146
|
-
|
147
|
-
// Define a statechange function that updates aria-expanded and style.display
|
148
|
-
// Also update the arrow position
|
149
|
-
function statechange(summary) {
|
150
|
-
var expanded = summary.__details.__summary.getAttribute('aria-expanded') === 'true';
|
151
|
-
var hidden = summary.__details.__content.getAttribute('aria-hidden') === 'true';
|
152
|
-
|
153
|
-
summary.__details.__summary.setAttribute('aria-expanded', (expanded ? 'false' : 'true'));
|
154
|
-
summary.__details.__content.setAttribute('aria-hidden', (hidden ? 'false' : 'true'));
|
155
|
-
|
156
|
-
if (!NATIVE_DETAILS) {
|
157
|
-
summary.__details.__content.style.display = (expanded ? 'none' : '');
|
158
|
-
|
159
|
-
var hasOpenAttr = summary.__details.getAttribute('open') !== null;
|
160
|
-
if (!hasOpenAttr) {
|
161
|
-
summary.__details.setAttribute('open', 'open');
|
162
|
-
} else {
|
163
|
-
summary.__details.removeAttribute('open');
|
164
|
-
}
|
165
|
-
}
|
166
|
-
|
167
|
-
if (summary.__twisty) {
|
168
|
-
summary.__twisty.firstChild.nodeValue = (expanded ? '\u25ba' : '\u25bc');
|
169
|
-
summary.__twisty.setAttribute('class', (expanded ? 'arrow arrow-closed' : 'arrow arrow-open'));
|
170
|
-
}
|
171
|
-
|
172
|
-
return true;
|
173
|
-
}
|
174
|
-
|
175
|
-
// Bind a click event to handle summary elements
|
176
|
-
addClickEvent(document, function (e, summary) {
|
177
|
-
if (!(summary = getAncestor(summary, 'summary'))) {
|
178
|
-
return true;
|
179
|
-
}
|
180
|
-
return statechange(summary);
|
181
|
-
});
|
182
|
-
}
|
183
|
-
|
184
|
-
// Bind two load events for modern and older browsers
|
185
|
-
// If the first one fires it will set a flag to block the second one
|
186
|
-
// but if it's not supported then the second one will fire
|
187
|
-
addEvent(document, 'DOMContentLoaded', addDetailsPolyfill);
|
188
|
-
addEvent(window, 'load', addDetailsPolyfill);
|
189
|
-
})();
|
@@ -1,39 +0,0 @@
|
|
1
|
-
/* eslint-disable max-len, no-var, no-cond-assign, no-param-reassign, vars-on-top, no-extend-native */
|
2
|
-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
|
3
|
-
if (!Array.prototype.indexOf) {
|
4
|
-
Array.prototype.indexOf = function (searchElement, fromIndex) {
|
5
|
-
var k;
|
6
|
-
|
7
|
-
if (this === null) {
|
8
|
-
throw new TypeError('"this" is null or not defined');
|
9
|
-
}
|
10
|
-
|
11
|
-
var O = Object(this);
|
12
|
-
|
13
|
-
var len = O.length >>> 0;
|
14
|
-
|
15
|
-
if (len === 0) {
|
16
|
-
return -1;
|
17
|
-
}
|
18
|
-
|
19
|
-
var n = +fromIndex || 0;
|
20
|
-
|
21
|
-
if (Math.abs(n) === Infinity) {
|
22
|
-
n = 0;
|
23
|
-
}
|
24
|
-
|
25
|
-
if (n >= len) {
|
26
|
-
return -1;
|
27
|
-
}
|
28
|
-
|
29
|
-
k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
|
30
|
-
|
31
|
-
while (k < len) {
|
32
|
-
if (k in O && O[k] === searchElement) {
|
33
|
-
return k;
|
34
|
-
}
|
35
|
-
k++;
|
36
|
-
}
|
37
|
-
return -1;
|
38
|
-
};
|
39
|
-
}
|
@@ -1,118 +0,0 @@
|
|
1
|
-
#global-header-bar {
|
2
|
-
@extend %site-width-container;
|
3
|
-
.inner-block {
|
4
|
-
padding: 0;
|
5
|
-
}
|
6
|
-
}
|
7
|
-
|
8
|
-
.main {
|
9
|
-
@extend %site-width-container;
|
10
|
-
padding-bottom: $gutter;
|
11
|
-
@include media(desktop) {
|
12
|
-
padding-bottom: $gutter*3;
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
.grid-row {
|
17
|
-
@extend %grid-row;
|
18
|
-
position: relative;
|
19
|
-
}
|
20
|
-
|
21
|
-
.column-full {
|
22
|
-
@include grid-column(1);
|
23
|
-
}
|
24
|
-
|
25
|
-
.column-one-third {
|
26
|
-
@include grid-column(1/3, $full-width: desktop);
|
27
|
-
}
|
28
|
-
|
29
|
-
.column-half {
|
30
|
-
@include grid-column(1/2, $full-width: desktop);
|
31
|
-
}
|
32
|
-
|
33
|
-
.column-two-thirds {
|
34
|
-
@include grid-column(2/3, $full-width: desktop);
|
35
|
-
}
|
36
|
-
|
37
|
-
.column-right {
|
38
|
-
@include media(desktop) {
|
39
|
-
float: right;
|
40
|
-
}
|
41
|
-
}
|
42
|
-
|
43
|
-
header {
|
44
|
-
@extend %contain-floats;
|
45
|
-
}
|
46
|
-
|
47
|
-
.sidebar {
|
48
|
-
border-top: 10px solid $mainstream-brand;
|
49
|
-
}
|
50
|
-
|
51
|
-
// layout for ie < 9
|
52
|
-
$ie8-column-one-third: ( $site-width + $gutter ) / 3;
|
53
|
-
$ie8-column-half: ( $site-width + $gutter ) / 2;
|
54
|
-
$ie8-column-two-thirds: $ie8-column-one-third * 2;
|
55
|
-
|
56
|
-
@mixin ie8-grid-column {
|
57
|
-
float: left;
|
58
|
-
padding: 0 $gutter-half;
|
59
|
-
box-sizing: content-box;
|
60
|
-
}
|
61
|
-
@mixin ie8-column-two-thirds {
|
62
|
-
@include ie8-grid-column;
|
63
|
-
width: $ie8-column-two-thirds - $gutter;
|
64
|
-
}
|
65
|
-
@mixin ie8-column-half {
|
66
|
-
@include ie8-grid-column;
|
67
|
-
width: $ie8-column-half - $gutter;
|
68
|
-
}
|
69
|
-
@mixin ie8-column-one-third {
|
70
|
-
@include ie8-grid-column;
|
71
|
-
width: $ie8-column-one-third - $gutter;
|
72
|
-
}
|
73
|
-
|
74
|
-
.lte-ie8 {
|
75
|
-
#global-header-bar, #global-breadcrumb {
|
76
|
-
width: $site-width;
|
77
|
-
max-width: inherit;
|
78
|
-
margin: 0 auto;
|
79
|
-
.inner-block {
|
80
|
-
margin: 0;
|
81
|
-
padding: 0;
|
82
|
-
}
|
83
|
-
}
|
84
|
-
#content {
|
85
|
-
width: $site-width;
|
86
|
-
max-width: inherit;
|
87
|
-
margin: 0 auto;
|
88
|
-
padding-bottom: 3*$gutter;
|
89
|
-
}
|
90
|
-
.grid-row {
|
91
|
-
width: $site-width + $gutter;
|
92
|
-
}
|
93
|
-
.column-two-thirds {
|
94
|
-
@include ie8-column-two-thirds;
|
95
|
-
.grid-row {
|
96
|
-
width: $ie8-column-two-thirds;
|
97
|
-
}
|
98
|
-
.column-two-thirds {
|
99
|
-
width: $ie8-column-two-thirds / 3 * 2 - $gutter;
|
100
|
-
}
|
101
|
-
.column-one-third {
|
102
|
-
width: $ie8-column-two-thirds / 3 - $gutter;
|
103
|
-
}
|
104
|
-
}
|
105
|
-
.column-half {
|
106
|
-
@include ie8-column-half;
|
107
|
-
}
|
108
|
-
.column-one-third {
|
109
|
-
@include ie8-column-one-third;
|
110
|
-
}
|
111
|
-
.column-right {
|
112
|
-
float: right;
|
113
|
-
}
|
114
|
-
.phase-banner, #back {
|
115
|
-
width: $site-width;
|
116
|
-
margin: 0 auto;
|
117
|
-
}
|
118
|
-
}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
.bold {
|
2
|
-
font-weight: bold;
|
3
|
-
}
|
4
|
-
.uppercase {
|
5
|
-
text-transform: uppercase;
|
6
|
-
}
|
7
|
-
|
8
|
-
h1 {
|
9
|
-
@extend .heading-large;
|
10
|
-
}
|
11
|
-
h2 {
|
12
|
-
@extend .heading-medium;
|
13
|
-
}
|
14
|
-
h3 {
|
15
|
-
@extend .heading-small;
|
16
|
-
}
|
17
|
-
strong {
|
18
|
-
font-weight: bold;
|
19
|
-
}
|
20
|
-
|
21
|
-
.new-window {
|
22
|
-
padding-right: 17px;
|
23
|
-
background: file-url("passports/new-window-link.png") right center no-repeat;
|
24
|
-
&:hover {
|
25
|
-
background-image: file-url("passports/new-window-link-blue.png");
|
26
|
-
}
|
27
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
// layout
|
2
|
-
$header-border-width: 10px;
|
3
|
-
$header-border: $header-border-width solid $govuk-blue;
|
4
|
-
|
5
|
-
// forms
|
6
|
-
$focus-border-width: 3px;
|
7
|
-
$focus-outline: $focus-border-width solid $yellow;
|
8
|
-
|
9
|
-
// validation
|
10
|
-
$validation-bdr-size: 3px;
|
11
|
-
$validation-bdr-size-lg: $validation-bdr-size + 1;
|
@@ -1,30 +0,0 @@
|
|
1
|
-
// App styles
|
2
|
-
|
3
|
-
// govuk_frontend_toolkit
|
4
|
-
@import "mixins";
|
5
|
-
|
6
|
-
// govuk-elements
|
7
|
-
@import "govuk-elements/helpers";
|
8
|
-
@import "govuk-elements/reset";
|
9
|
-
@import "govuk-elements/elements-typography";
|
10
|
-
@import "govuk-elements/forms";
|
11
|
-
@import "govuk-elements/buttons";
|
12
|
-
@import "govuk-elements/details";
|
13
|
-
@import "govuk-elements/lists";
|
14
|
-
@import "govuk-elements/panels";
|
15
|
-
@import "govuk-elements/tables";
|
16
|
-
|
17
|
-
// Custom
|
18
|
-
@import "base";
|
19
|
-
@import "layout";
|
20
|
-
@import "typography";
|
21
|
-
|
22
|
-
// Modules
|
23
|
-
@import "modules/validation";
|
24
|
-
@import "modules/progressive-reveal";
|
25
|
-
@import "modules/buttons";
|
26
|
-
@import "modules/lists";
|
27
|
-
@import "modules/alerts";
|
28
|
-
|
29
|
-
// Pages
|
30
|
-
@import "modules/confirm-page";
|
@@ -1,47 +0,0 @@
|
|
1
|
-
// Buttons
|
2
|
-
// ==========================================================================
|
3
|
-
// GOV.UK front end toolkit dependencies
|
4
|
-
|
5
|
-
.button {
|
6
|
-
@include button ($button-colour);
|
7
|
-
margin: 0 $gutter-half $gutter-half 0;
|
8
|
-
padding: em(10) em(15) em(5) em(15);
|
9
|
-
vertical-align: top;
|
10
|
-
}
|
11
|
-
|
12
|
-
// Fix unwanted button padding in Firefox
|
13
|
-
.button::-moz-focus-inner {
|
14
|
-
border: 0;
|
15
|
-
padding: 0;
|
16
|
-
}
|
17
|
-
|
18
|
-
.button:focus {
|
19
|
-
outline: 3px solid $yellow;
|
20
|
-
}
|
21
|
-
|
22
|
-
// Disabled buttons
|
23
|
-
.button[disabled="disabled"] {
|
24
|
-
background: $button-colour;
|
25
|
-
}
|
26
|
-
|
27
|
-
.button[disabled="disabled"]:focus {
|
28
|
-
outline: none;
|
29
|
-
}
|
30
|
-
|
31
|
-
// Start now buttons
|
32
|
-
.button-get-started {
|
33
|
-
@include bold-24;
|
34
|
-
background-image: file-url("icons/icon-pointer.png");
|
35
|
-
background-repeat: no-repeat;
|
36
|
-
background-position: 100% 50%;
|
37
|
-
padding: em(7) em(41) em(4) em(16);
|
38
|
-
|
39
|
-
@include device-pixel-ratio {
|
40
|
-
background-image: file-url("icons/icon-pointer-2x.png");
|
41
|
-
background-size: 30px 19px;
|
42
|
-
}
|
43
|
-
|
44
|
-
@include ie(6) {
|
45
|
-
background-image: file-url("icons/icon-pointer-2x.png");
|
46
|
-
}
|
47
|
-
}
|
@@ -1,38 +0,0 @@
|
|
1
|
-
// Details
|
2
|
-
// ==========================================================================
|
3
|
-
|
4
|
-
details {
|
5
|
-
display: block;
|
6
|
-
}
|
7
|
-
|
8
|
-
details summary {
|
9
|
-
display: inline-block;
|
10
|
-
color: $govuk-blue;
|
11
|
-
cursor: pointer;
|
12
|
-
position: relative;
|
13
|
-
margin-bottom: em(5);
|
14
|
-
}
|
15
|
-
|
16
|
-
details summary:hover {
|
17
|
-
color: $link-hover-colour;
|
18
|
-
}
|
19
|
-
|
20
|
-
details summary:focus {
|
21
|
-
outline: 3px solid $yellow;
|
22
|
-
}
|
23
|
-
|
24
|
-
// Underline only summary text (not the arrow)
|
25
|
-
details .summary {
|
26
|
-
text-decoration: underline;
|
27
|
-
}
|
28
|
-
|
29
|
-
// Match fallback arrow spacing with -webkit default
|
30
|
-
details .arrow {
|
31
|
-
margin-right: 0.35em;
|
32
|
-
font-style: normal;
|
33
|
-
}
|
34
|
-
|
35
|
-
// Remove top margin from bordered panel
|
36
|
-
details .panel-indent {
|
37
|
-
margin-top: 0;
|
38
|
-
}
|
package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_elements-typography.scss
DELETED
@@ -1,175 +0,0 @@
|
|
1
|
-
// Typography
|
2
|
-
// ==========================================================================
|
3
|
-
|
4
|
-
// Increase the base font size to 19px for the main content area
|
5
|
-
// Using the core-19 mixin from the govuk_toolkit _typography.scss file
|
6
|
-
|
7
|
-
main {
|
8
|
-
@include core-19;
|
9
|
-
-webkit-font-smoothing: antialiased;
|
10
|
-
}
|
11
|
-
|
12
|
-
// Core font sizes
|
13
|
-
.font-xxlarge {
|
14
|
-
@include core-80;
|
15
|
-
}
|
16
|
-
.font-xlarge {
|
17
|
-
@include core-48;
|
18
|
-
}
|
19
|
-
.font-large {
|
20
|
-
@include core-36;
|
21
|
-
}
|
22
|
-
.font-medium {
|
23
|
-
@include core-24;
|
24
|
-
}
|
25
|
-
.font-small {
|
26
|
-
@include core-19;
|
27
|
-
}
|
28
|
-
.font-xsmall {
|
29
|
-
@include core-16;
|
30
|
-
}
|
31
|
-
|
32
|
-
// Bold font sizes
|
33
|
-
.bold-xxlarge {
|
34
|
-
@include bold-80();
|
35
|
-
}
|
36
|
-
.bold-xlarge {
|
37
|
-
@include bold-48();
|
38
|
-
}
|
39
|
-
.bold-large {
|
40
|
-
@include bold-36();
|
41
|
-
}
|
42
|
-
.bold-medium {
|
43
|
-
@include bold-24();
|
44
|
-
}
|
45
|
-
.bold-small {
|
46
|
-
@include bold-19();
|
47
|
-
}
|
48
|
-
.bold-xsmall {
|
49
|
-
@include bold-16();
|
50
|
-
}
|
51
|
-
|
52
|
-
// Common heading sizes
|
53
|
-
// Using the bold-xx mixins from the govuk_toolkit _typography.scss file
|
54
|
-
// Spacing is set in em, using the px to em function in the elements _helpers.scss file
|
55
|
-
|
56
|
-
// Headings
|
57
|
-
.heading-xlarge {
|
58
|
-
@include bold-48();
|
59
|
-
|
60
|
-
margin-top: em(15, 32);
|
61
|
-
margin-bottom: em(30, 32);
|
62
|
-
|
63
|
-
@include media(tablet) {
|
64
|
-
margin-top: em(30, 48);
|
65
|
-
margin-bottom: em(60, 48);
|
66
|
-
}
|
67
|
-
|
68
|
-
.heading-secondary {
|
69
|
-
@include heading-27();
|
70
|
-
|
71
|
-
display: block;
|
72
|
-
color: $secondary-text-colour;
|
73
|
-
}
|
74
|
-
|
75
|
-
}
|
76
|
-
|
77
|
-
.heading-large {
|
78
|
-
@include bold-36();
|
79
|
-
|
80
|
-
margin-top: em(25, 24);
|
81
|
-
margin-bottom: em(10, 24);
|
82
|
-
|
83
|
-
@include media(tablet) {
|
84
|
-
margin-top: em(45, 36 );
|
85
|
-
margin-bottom: em(20, 36);
|
86
|
-
}
|
87
|
-
|
88
|
-
.heading-secondary {
|
89
|
-
@include heading-24();
|
90
|
-
|
91
|
-
display: block;
|
92
|
-
color: $secondary-text-colour;
|
93
|
-
}
|
94
|
-
|
95
|
-
}
|
96
|
-
|
97
|
-
.heading-medium {
|
98
|
-
@include bold-24();
|
99
|
-
|
100
|
-
margin-top: em(25, 20);
|
101
|
-
margin-bottom: em(10, 20);
|
102
|
-
|
103
|
-
@include media(tablet) {
|
104
|
-
margin-top: em(45, 24);
|
105
|
-
margin-bottom: em(20, 24);
|
106
|
-
}
|
107
|
-
|
108
|
-
}
|
109
|
-
|
110
|
-
.heading-small {
|
111
|
-
@include bold-19();
|
112
|
-
|
113
|
-
margin-top: em(10, 16);
|
114
|
-
margin-bottom: em(5, 16);
|
115
|
-
|
116
|
-
@include media(tablet) {
|
117
|
-
margin-top: em(20, 19);
|
118
|
-
}
|
119
|
-
|
120
|
-
}
|
121
|
-
|
122
|
-
// Text
|
123
|
-
p {
|
124
|
-
margin-top: em(5, 16 );
|
125
|
-
margin-bottom: em(20, 16);
|
126
|
-
|
127
|
-
@include media(tablet) {
|
128
|
-
margin-top: em(5);
|
129
|
-
margin-bottom: em(20);
|
130
|
-
}
|
131
|
-
|
132
|
-
}
|
133
|
-
|
134
|
-
// Lede, or intro text
|
135
|
-
.lede {
|
136
|
-
@include core-24;
|
137
|
-
}
|
138
|
-
|
139
|
-
// Set a max-width for text blocks
|
140
|
-
// Less than 75 characters per line of text
|
141
|
-
.text {
|
142
|
-
max-width: 30em;
|
143
|
-
}
|
144
|
-
|
145
|
-
.text-secondary {
|
146
|
-
color: $secondary-text-colour;
|
147
|
-
}
|
148
|
-
|
149
|
-
// Link styles
|
150
|
-
.link {
|
151
|
-
color: $link-colour;
|
152
|
-
text-decoration: underline;
|
153
|
-
}
|
154
|
-
.link:visited {
|
155
|
-
color: $link-visited-colour;
|
156
|
-
}
|
157
|
-
.link:hover {
|
158
|
-
color: $link-hover-colour;
|
159
|
-
}
|
160
|
-
.link:active {
|
161
|
-
color: $link-colour;
|
162
|
-
}
|
163
|
-
|
164
|
-
// Code styles
|
165
|
-
pre,
|
166
|
-
code {
|
167
|
-
font-size: 13px;
|
168
|
-
line-height: 19px;
|
169
|
-
color: $black;
|
170
|
-
background-color: $highlight-colour;
|
171
|
-
border: 1px solid $border-colour;
|
172
|
-
padding: 3px 7px;
|
173
|
-
}
|
174
|
-
|
175
|
-
|