hof 22.8.4 → 22.9.0-beta
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/CHANGELOG.md +16 -0
- package/README.md +30 -0
- package/config/hof-defaults.js +6 -1
- package/frontend/govuk-template/govuk_template_generated.html +102 -0
- package/frontend/template-partials/views/layout.html +2 -8
- package/frontend/themes/gov-uk/styles/_cookie-banner.scss +0 -3
- package/hof-22.9.0.tgz +0 -0
- package/lib/settings.js +1 -0
- package/package/.eslintignore +1 -0
- package/package/CHANGELOG.md +232 -0
- package/package/LICENSE +21 -0
- package/package/README.md +1887 -0
- package/package/bin/hof-build +10 -0
- package/package/bin/hof-transpiler +12 -0
- package/package/build/helpers/importer.js +29 -0
- package/package/build/helpers/local.js +35 -0
- package/package/build/helpers/resolver/import.js +32 -0
- package/package/build/helpers/resolver/nearest-package-root.js +33 -0
- package/package/build/helpers/resolver/package.js +29 -0
- package/package/build/helpers/resolver.js +16 -0
- package/package/build/index.js +49 -0
- package/package/build/lib/env.js +36 -0
- package/package/build/lib/mkdir.js +9 -0
- package/package/build/lib/run.js +17 -0
- package/package/build/lib/spawn.js +18 -0
- package/package/build/tasks/browserify/compress.js +15 -0
- package/package/build/tasks/browserify/index.js +48 -0
- package/package/build/tasks/build/index.js +6 -0
- package/package/build/tasks/images/index.js +27 -0
- package/package/build/tasks/index.js +8 -0
- package/package/build/tasks/sass/index.js +67 -0
- package/package/build/tasks/translate/index.js +20 -0
- package/package/build/tasks/watch/index.js +161 -0
- package/package/components/address-lookup/default-model.js +76 -0
- package/package/components/address-lookup/defaults.js +25 -0
- package/package/components/address-lookup/index.js +251 -0
- package/package/components/address-lookup/templates/address-lookup.html +14 -0
- package/package/components/address-lookup/templates/address.html +22 -0
- package/package/components/address-lookup/templates/postcode.html +9 -0
- package/package/components/clear-session/Readme.md +46 -0
- package/package/components/clear-session/index.js +26 -0
- package/package/components/combine-and-loop-fields/Readme.md +42 -0
- package/package/components/combine-and-loop-fields/index.js +156 -0
- package/package/components/date/fields.js +16 -0
- package/package/components/date/index.js +172 -0
- package/package/components/date/templates/date.html +20 -0
- 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 +51 -0
- package/package/components/emailer/emailer.js +53 -0
- package/package/components/emailer/index.js +74 -0
- package/package/components/emailer/transports/debug.js +74 -0
- package/package/components/emailer/transports/index.js +8 -0
- package/package/components/emailer/transports/ses.js +36 -0
- package/package/components/emailer/transports/smtp.js +26 -0
- package/package/components/emailer/transports/stub.js +5 -0
- package/package/components/emailer/views/layout.html +63 -0
- package/package/components/homeoffice-countries/index.js +22 -0
- package/package/components/index.js +13 -0
- package/package/components/notify/index.js +62 -0
- package/package/components/notify/notify.js +51 -0
- package/package/components/session-timeout-warning/index.js +67 -0
- package/package/components/summary/index.js +237 -0
- package/package/config/builder-defaults.js +45 -0
- package/package/config/component-defaults.js +13 -0
- package/package/config/hof-defaults.js +65 -0
- package/package/config/rate-limits.js +20 -0
- package/package/config/sanitisation-rules.js +32 -0
- package/package/controller/base-controller.js +296 -0
- package/package/controller/behaviour-hooks.js +51 -0
- package/package/controller/behaviour-session.js +64 -0
- package/package/controller/controller.js +258 -0
- package/package/controller/deprecate-error.js +10 -0
- package/package/controller/formatting/formatters.js +70 -0
- package/package/controller/formatting/index.js +32 -0
- package/package/controller/index.js +17 -0
- package/package/controller/validation/email.js +30 -0
- package/package/controller/validation/index.js +101 -0
- package/package/controller/validation/validators.js +181 -0
- package/package/controller/validation-error.js +14 -0
- package/package/frontend/govuk-template/build/config.js +24 -0
- package/package/frontend/govuk-template/build/govuk_template.html +102 -0
- package/package/frontend/govuk-template/build/index.js +23 -0
- package/package/frontend/govuk-template/govuk_template_generated.html +102 -0
- package/package/frontend/govuk-template/index.js +29 -0
- package/package/frontend/index.js +9 -0
- package/package/frontend/template-mixins/mixins/helpers.js +103 -0
- package/package/frontend/template-mixins/mixins/index.js +37 -0
- package/package/frontend/template-mixins/mixins/render.js +12 -0
- package/package/frontend/template-mixins/mixins/template-mixins.js +520 -0
- package/package/frontend/template-mixins/partials/forms/checkbox-group.html +47 -0
- package/package/frontend/template-mixins/partials/forms/checkbox.html +16 -0
- package/package/frontend/template-mixins/partials/forms/input-submit.html +1 -0
- package/package/frontend/template-mixins/partials/forms/input-text-date.html +37 -0
- package/package/frontend/template-mixins/partials/forms/input-text-group.html +45 -0
- package/package/frontend/template-mixins/partials/forms/option-group.html +43 -0
- package/package/frontend/template-mixins/partials/forms/select.html +17 -0
- package/package/frontend/template-mixins/partials/forms/textarea-group.html +37 -0
- package/package/frontend/template-mixins/partials/mixins/panel.html +4 -0
- package/package/frontend/template-partials/index.js +9 -0
- package/package/frontend/template-partials/translations/index.js +26 -0
- package/package/frontend/template-partials/translations/src/cy/base.json +4 -0
- package/package/frontend/template-partials/translations/src/cy/buttons.json +6 -0
- package/package/frontend/template-partials/translations/src/cy/cookies.json +104 -0
- package/package/frontend/template-partials/translations/src/cy/errorlist.json +6 -0
- package/package/frontend/template-partials/translations/src/cy/errors.json +18 -0
- package/package/frontend/template-partials/translations/src/cy/terms.json +28 -0
- package/package/frontend/template-partials/translations/src/en/accessibility.json +43 -0
- package/package/frontend/template-partials/translations/src/en/base.json +5 -0
- package/package/frontend/template-partials/translations/src/en/buttons.json +10 -0
- package/package/frontend/template-partials/translations/src/en/cookies.json +116 -0
- package/package/frontend/template-partials/translations/src/en/errorlist.json +7 -0
- package/package/frontend/template-partials/translations/src/en/errors.json +35 -0
- package/package/frontend/template-partials/translations/src/en/exit.json +5 -0
- package/package/frontend/template-partials/translations/src/en/fields.json +5 -0
- package/package/frontend/template-partials/translations/src/en/journey.json +6 -0
- package/package/frontend/template-partials/translations/src/en/save-and-exit.json +4 -0
- package/package/frontend/template-partials/translations/src/en/terms.json +28 -0
- package/package/frontend/template-partials/views/404.html +9 -0
- package/package/frontend/template-partials/views/accessibility.html +55 -0
- package/package/frontend/template-partials/views/confirm.html +8 -0
- package/package/frontend/template-partials/views/confirmation.html +19 -0
- package/package/frontend/template-partials/views/content/en/what-happens-next.md +0 -0
- package/package/frontend/template-partials/views/cookie-error.html +1 -0
- package/package/frontend/template-partials/views/cookies.html +84 -0
- package/package/frontend/template-partials/views/email/data-row.html +4 -0
- package/package/frontend/template-partials/views/email/formatted.html +12 -0
- package/package/frontend/template-partials/views/email/layout.html +63 -0
- package/package/frontend/template-partials/views/email/raw.html +11 -0
- package/package/frontend/template-partials/views/email/section-row.html +3 -0
- package/package/frontend/template-partials/views/error.html +20 -0
- package/package/frontend/template-partials/views/exit.html +9 -0
- package/package/frontend/template-partials/views/feedback-submitted.html +11 -0
- package/package/frontend/template-partials/views/layout.html +55 -0
- package/package/frontend/template-partials/views/partials/analytics-table.html +25 -0
- package/package/frontend/template-partials/views/partials/back.html +5 -0
- package/package/frontend/template-partials/views/partials/bullet-list.html +7 -0
- package/package/frontend/template-partials/views/partials/confirmation-alert.html +6 -0
- package/package/frontend/template-partials/views/partials/continue.html +5 -0
- package/package/frontend/template-partials/views/partials/cookie-banner.html +29 -0
- package/package/frontend/template-partials/views/partials/cookie-notification.html +4 -0
- package/package/frontend/template-partials/views/partials/cookie-settings-button.html +1 -0
- package/package/frontend/template-partials/views/partials/cookie-settings-radio.html +8 -0
- package/package/frontend/template-partials/views/partials/details-summary.html +8 -0
- package/package/frontend/template-partials/views/partials/external-link.html +1 -0
- package/package/frontend/template-partials/views/partials/form.html +10 -0
- package/package/frontend/template-partials/views/partials/gatag.html +60 -0
- package/package/frontend/template-partials/views/partials/head.html +31 -0
- package/package/frontend/template-partials/views/partials/heading.html +11 -0
- package/package/frontend/template-partials/views/partials/items-table.html +32 -0
- package/package/frontend/template-partials/views/partials/maincontent-left.html +10 -0
- package/package/frontend/template-partials/views/partials/navigation.html +8 -0
- package/package/frontend/template-partials/views/partials/page.html +23 -0
- package/package/frontend/template-partials/views/partials/panel-indent.html +3 -0
- package/package/frontend/template-partials/views/partials/session-cookies-table.html +28 -0
- package/package/frontend/template-partials/views/partials/session-timeout-warning.html +38 -0
- package/package/frontend/template-partials/views/partials/summary-table-row.html +14 -0
- package/package/frontend/template-partials/views/partials/summary-table.html +8 -0
- package/package/frontend/template-partials/views/partials/table.html +18 -0
- package/package/frontend/template-partials/views/partials/validation-list.html +3 -0
- package/package/frontend/template-partials/views/partials/validation-summary.html +25 -0
- package/package/frontend/template-partials/views/partials/warn.html +7 -0
- package/package/frontend/template-partials/views/rate-limit-error.html +10 -0
- package/package/frontend/template-partials/views/save-and-exit.html +17 -0
- package/package/frontend/template-partials/views/service-unavailable.html +13 -0
- package/package/frontend/template-partials/views/session-timeout.html +7 -0
- package/package/frontend/template-partials/views/step.html +14 -0
- package/package/frontend/template-partials/views/terms.html +26 -0
- package/package/frontend/themes/gov-uk/client-js/cookieSettings.js +145 -0
- package/package/frontend/themes/gov-uk/client-js/govuk-cookies.js +121 -0
- package/package/frontend/themes/gov-uk/client-js/index.js +27 -0
- package/package/frontend/themes/gov-uk/client-js/session-timeout-dialog.js +348 -0
- package/package/frontend/themes/gov-uk/client-js/skip-to-main.js +19 -0
- package/package/frontend/themes/gov-uk/index.js +9 -0
- package/package/frontend/themes/gov-uk/styles/_base.scss +17 -0
- package/package/frontend/themes/gov-uk/styles/_check_your_answers.scss +155 -0
- package/package/frontend/themes/gov-uk/styles/_cookie-banner.scss +111 -0
- package/package/frontend/themes/gov-uk/styles/_cookie-settings.scss +33 -0
- package/package/frontend/themes/gov-uk/styles/_govuk_frontend_toolkit.scss +23 -0
- package/package/frontend/themes/gov-uk/styles/_helpers.scss +5 -0
- package/package/frontend/themes/gov-uk/styles/_layout.scss +125 -0
- package/package/frontend/themes/gov-uk/styles/_panel-indent.scss +27 -0
- package/package/frontend/themes/gov-uk/styles/_pdf.scss +42 -0
- package/package/frontend/themes/gov-uk/styles/_session-timeout-dialog.scss +121 -0
- package/package/frontend/themes/gov-uk/styles/_typography.scss +27 -0
- package/package/frontend/themes/gov-uk/styles/_variables.scss +11 -0
- package/package/frontend/themes/gov-uk/styles/govuk.scss +43 -0
- package/package/frontend/themes/gov-uk/styles/mixins.scss +16 -0
- package/package/frontend/themes/gov-uk/styles/modules/_alerts.scss +73 -0
- package/package/frontend/themes/gov-uk/styles/modules/_buttons.scss +5 -0
- package/package/frontend/themes/gov-uk/styles/modules/_character-count.scss +8 -0
- package/package/frontend/themes/gov-uk/styles/modules/_confirm-page.scss +20 -0
- package/package/frontend/themes/gov-uk/styles/modules/_lists.scss +5 -0
- package/package/frontend/themes/gov-uk/styles/modules/_progressive-reveal.scss +17 -0
- package/package/frontend/themes/gov-uk/styles/modules/_validation.scss +51 -0
- package/package/frontend/themes/index.js +5 -0
- 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 +99 -0
- package/package/frontend/toolkit/assets/javascript/form-focus.js +101 -0
- package/package/frontend/toolkit/assets/javascript/helpers.js +177 -0
- package/package/frontend/toolkit/assets/javascript/progressive-reveal.js +72 -0
- package/package/frontend/toolkit/assets/javascript/validation.js +71 -0
- package/package/frontend/toolkit/assets/javascript/vendor/details.polyfill.js +189 -0
- package/package/frontend/toolkit/assets/javascript/vendor/indexof.polyfill.js +39 -0
- package/package/frontend/toolkit/assets/javascript/vendor/safari-cachebuster.js +6 -0
- package/package/frontend/toolkit/assets/stylesheets/_base.scss +17 -0
- package/package/frontend/toolkit/assets/stylesheets/_helpers.scss +5 -0
- package/package/frontend/toolkit/assets/stylesheets/_layout.scss +118 -0
- package/package/frontend/toolkit/assets/stylesheets/_typography.scss +27 -0
- package/package/frontend/toolkit/assets/stylesheets/_variables.scss +11 -0
- package/package/frontend/toolkit/assets/stylesheets/app.scss +30 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_buttons.scss +47 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_details.scss +38 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_elements-typography.scss +175 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_forms.scss +167 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_helpers.scss +39 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_layout.scss +67 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_lists.scss +40 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_panels.scss +29 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_reset.scss +33 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_tables.scss +33 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-block-labels.scss +63 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-date.scss +39 -0
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-validation.scss +63 -0
- package/package/frontend/toolkit/assets/stylesheets/mixins.scss +16 -0
- package/package/frontend/toolkit/assets/stylesheets/modules/_alerts.scss +73 -0
- package/package/frontend/toolkit/assets/stylesheets/modules/_buttons.scss +5 -0
- package/package/frontend/toolkit/assets/stylesheets/modules/_confirm-page.scss +20 -0
- package/package/frontend/toolkit/assets/stylesheets/modules/_lists.scss +5 -0
- package/package/frontend/toolkit/assets/stylesheets/modules/_progressive-reveal.scss +17 -0
- package/package/frontend/toolkit/assets/stylesheets/modules/_validation.scss +51 -0
- package/package/frontend/toolkit/index.js +10 -0
- package/package/index.js +351 -0
- package/package/lib/deindex.js +18 -0
- package/package/lib/encryption.js +23 -0
- package/package/lib/ga-tag.js +89 -0
- package/package/lib/health.js +26 -0
- package/package/lib/helpers.js +66 -0
- package/package/lib/logger.js +65 -0
- package/package/lib/markdown.js +46 -0
- package/package/lib/router.js +111 -0
- package/package/lib/serve-static.js +12 -0
- package/package/lib/sessions.js +82 -0
- package/package/lib/settings.js +74 -0
- package/package/lib/which.js +28 -0
- package/package/middleware/cookies.js +43 -0
- package/package/middleware/deep-translate.js +32 -0
- package/package/middleware/errors.js +119 -0
- package/package/middleware/index.js +10 -0
- package/package/middleware/not-found.js +38 -0
- package/package/middleware/rate-limiter.js +98 -0
- package/package/middleware/service-unavailable.js +64 -0
- package/package/model/apis/axios-settings.js +21 -0
- package/package/model/apis/html-to-pdf-converter.js +35 -0
- package/package/model/apis/index.js +5 -0
- package/package/model/index.js +348 -0
- package/package/package.json +147 -0
- package/package/sandbox/README.md +66 -0
- package/package/sandbox/apps/sandbox/behaviours/clear-session.js +8 -0
- package/package/sandbox/apps/sandbox/behaviours/country-select.js +10 -0
- package/package/sandbox/apps/sandbox/behaviours/international-number.js +22 -0
- package/package/sandbox/apps/sandbox/fields.js +128 -0
- package/package/sandbox/apps/sandbox/index.js +99 -0
- package/package/sandbox/apps/sandbox/lib/staticAppealStages.js +189 -0
- package/package/sandbox/apps/sandbox/sections/summary-data-sections.js +43 -0
- package/package/sandbox/apps/sandbox/translations/src/en/errors.json +5 -0
- package/package/sandbox/apps/sandbox/translations/src/en/exit.json +4 -0
- package/package/sandbox/apps/sandbox/translations/src/en/fields.json +101 -0
- package/package/sandbox/apps/sandbox/translations/src/en/journey.json +7 -0
- package/package/sandbox/apps/sandbox/translations/src/en/pages.json +72 -0
- package/package/sandbox/apps/sandbox/translations/src/en/validation.json +54 -0
- package/package/sandbox/apps/sandbox/views/form-guidance-link.html +8 -0
- package/package/sandbox/apps/sandbox/views/save-and-exit.html +19 -0
- 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 +70 -0
- package/package/sandbox/assets/scss/app.scss +27 -0
- package/package/sandbox/codecept.conf.js +15 -0
- package/package/sandbox/config.js +17 -0
- package/package/sandbox/package.json +26 -0
- package/package/sandbox/server.js +23 -0
- package/package/sandbox/yarn.lock +262 -0
- package/package/transpiler/index.js +2 -0
- package/package/transpiler/lib/aggregate.js +32 -0
- package/package/transpiler/lib/build.js +15 -0
- package/package/transpiler/lib/compile.js +12 -0
- package/package/transpiler/lib/expand-dirs.js +14 -0
- package/package/transpiler/lib/write-files.js +24 -0
- package/package/utilities/autofill/index.js +189 -0
- package/package/utilities/autofill/inputs.js +60 -0
- package/package/utilities/countries.js +12 -0
- package/package/utilities/helpers/index.js +189 -0
- package/package/utilities/index.js +9 -0
- package/package/utilities/reqres/index.js +18 -0
- package/package/utilities/test-data/data/domain.json +7 -0
- package/package/utilities/test-data/data/firstname.json +16 -0
- package/package/utilities/test-data/data/lastname.json +10 -0
- package/package/utilities/test-data/data/postcode.json +12 -0
- package/package/utilities/test-data/data/streetname.json +8 -0
- package/package/utilities/test-data/data/streetsuffix.json +7 -0
- package/package/utilities/test-data/data/town.json +9 -0
- package/package/utilities/test-data/index.js +67 -0
- package/package/wizard/behaviours/complete.js +20 -0
- package/package/wizard/behaviours/index.js +5 -0
- package/package/wizard/index.js +124 -0
- package/package/wizard/middleware/back-links.js +68 -0
- package/package/wizard/middleware/check-complete.js +13 -0
- package/package/wizard/middleware/check-progress.js +139 -0
- package/package/wizard/middleware/check-session.js +17 -0
- package/package/wizard/middleware/csrf.js +47 -0
- package/package/wizard/middleware/session-model.js +11 -0
- package/package/wizard/middleware/session.js +9 -0
- package/package/wizard/model.js +29 -0
- package/package/wizard/util/constants.js +5 -0
- package/package/wizard/util/helpers.js +19 -0
- package/package.json +5 -6
- package/.editorconfig +0 -10
- package/.github/workflows/automate-publish.yml +0 -38
- package/.github/workflows/automate-tag.yml +0 -78
- package/.istanbul.yml +0 -20
- package/codeReviewChecklist.md +0 -22
- package/pull_request_template.md +0 -16
@@ -0,0 +1,167 @@
|
|
1
|
+
// Forms
|
2
|
+
// ==========================================================================
|
3
|
+
|
4
|
+
// Fieldset is used to group more than one .form-group
|
5
|
+
fieldset {
|
6
|
+
width: 100%;
|
7
|
+
@extend %contain-floats;
|
8
|
+
}
|
9
|
+
|
10
|
+
// Form group is used to wrap label and input pairs
|
11
|
+
.form-group {
|
12
|
+
float: left;
|
13
|
+
width: 100%;
|
14
|
+
@extend %contain-floats;
|
15
|
+
margin-bottom: $gutter-half;
|
16
|
+
@include media(tablet) {
|
17
|
+
margin-bottom: $gutter;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
.form-group-related {
|
22
|
+
margin-bottom: 10px;
|
23
|
+
@include media(tablet) {
|
24
|
+
margin-bottom: 20px;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
.form-group-compound {
|
29
|
+
margin-bottom: 10px;
|
30
|
+
}
|
31
|
+
|
32
|
+
|
33
|
+
// Form title
|
34
|
+
.form-title {
|
35
|
+
margin-bottom: $gutter;
|
36
|
+
@include media(tablet) {
|
37
|
+
margin-bottom: ($gutter*1.5);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
|
42
|
+
// Labels
|
43
|
+
|
44
|
+
// Form labels, or for legends styled to look like labels
|
45
|
+
.form-label,
|
46
|
+
.form-label-bold {
|
47
|
+
display: block;
|
48
|
+
color: $text-colour;
|
49
|
+
}
|
50
|
+
|
51
|
+
.form-label {
|
52
|
+
@include core-19;
|
53
|
+
margin-bottom: 5px;
|
54
|
+
}
|
55
|
+
|
56
|
+
.form-label-bold {
|
57
|
+
@include bold-24;
|
58
|
+
margin-bottom: 0;
|
59
|
+
.form-hint {
|
60
|
+
@include core-19;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
// Used for paragraphs in-between form elements
|
65
|
+
.form-block {
|
66
|
+
float: left;
|
67
|
+
width: 100%;
|
68
|
+
@extend %contain-floats;
|
69
|
+
}
|
70
|
+
|
71
|
+
|
72
|
+
// Hints
|
73
|
+
|
74
|
+
// Form hints & examples are light grey and sit above a form control
|
75
|
+
.form-hint {
|
76
|
+
display: block;
|
77
|
+
color: $secondary-text-colour;
|
78
|
+
margin-bottom: 5px;
|
79
|
+
@include media (tablet) {
|
80
|
+
margin-top: 8px;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
|
85
|
+
// Form controls
|
86
|
+
|
87
|
+
// By default, form controls are 50% width for desktop,
|
88
|
+
// and 100% width for mobile
|
89
|
+
.form-control {
|
90
|
+
@include core-19;
|
91
|
+
|
92
|
+
width: 100%;
|
93
|
+
@include box-sizing(border-box);
|
94
|
+
padding: 4px;
|
95
|
+
background-color: $white;
|
96
|
+
border: 1px solid $border-colour;
|
97
|
+
|
98
|
+
// Disable webkit appearance and remove rounded corners
|
99
|
+
-webkit-appearance: none;
|
100
|
+
border-radius: 0;
|
101
|
+
|
102
|
+
@include media(tablet) {
|
103
|
+
width: 50%;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
|
108
|
+
// Form control widths
|
109
|
+
.form-control-3-4 {
|
110
|
+
width: 100%;
|
111
|
+
@include media(tablet) {
|
112
|
+
width: 75%;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
.form-control-1-2 {
|
117
|
+
width: 100%;
|
118
|
+
@include media(tablet) {
|
119
|
+
width: 50%;
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
.form-control-1-4 {
|
124
|
+
width: 25%;
|
125
|
+
}
|
126
|
+
|
127
|
+
.form-control-1-8 {
|
128
|
+
width: 12.5%;
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
// Radio buttons
|
133
|
+
.form-radio {
|
134
|
+
display: block;
|
135
|
+
margin: 10px 0;
|
136
|
+
}
|
137
|
+
.form-radio input {
|
138
|
+
vertical-align: middle;
|
139
|
+
margin: -4px 5px 0 0;
|
140
|
+
}
|
141
|
+
|
142
|
+
|
143
|
+
// Checkboxes
|
144
|
+
.form-checkbox {
|
145
|
+
display: block;
|
146
|
+
margin: $gutter-half 0;
|
147
|
+
}
|
148
|
+
.form-checkbox input {
|
149
|
+
vertical-align: middle;
|
150
|
+
margin: -2px 5px 0 0;
|
151
|
+
}
|
152
|
+
|
153
|
+
// Buttons
|
154
|
+
.form .button {
|
155
|
+
@include media(mobile) {
|
156
|
+
width: 100%;
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
|
161
|
+
// Form validation
|
162
|
+
@import "forms/form-validation";
|
163
|
+
|
164
|
+
|
165
|
+
// Form patterns
|
166
|
+
@import "forms/form-date";
|
167
|
+
@import "forms/form-block-labels";
|
@@ -0,0 +1,39 @@
|
|
1
|
+
// Helpers
|
2
|
+
|
3
|
+
// Return ems from a pixel value
|
4
|
+
// This assumes a base of 19px
|
5
|
+
@function em($px, $base: 19) {
|
6
|
+
@return ($px / $base) + em;
|
7
|
+
}
|
8
|
+
|
9
|
+
// Want to see how the grid works?
|
10
|
+
// add this class to the body to see how grid padding is set
|
11
|
+
.example-highlight-grid {
|
12
|
+
.grid-row {
|
13
|
+
background: $grey-2;
|
14
|
+
}
|
15
|
+
.column-highlight {
|
16
|
+
background: $grey-3;
|
17
|
+
width: 100%;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
// Used to space the "back" link on example pages
|
22
|
+
.example-back-link {
|
23
|
+
@include inline-block;
|
24
|
+
margin-top: $gutter;
|
25
|
+
}
|
26
|
+
|
27
|
+
// Hide, but not for screenreaders
|
28
|
+
.visuallyhidden {
|
29
|
+
position: absolute;
|
30
|
+
overflow: hidden;
|
31
|
+
clip: rect(0 0 0 0);
|
32
|
+
height: 1px; width: 1px;
|
33
|
+
margin: -1px; padding: 0; border: 0;
|
34
|
+
}
|
35
|
+
|
36
|
+
// Hide, only when JavaScript is enabled
|
37
|
+
.js-enabled .js-hidden {
|
38
|
+
display: none;
|
39
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
// Layout
|
2
|
+
// ==========================================================================
|
3
|
+
|
4
|
+
// GOV.UK front end toolkit dependencies
|
5
|
+
@import "measurements";
|
6
|
+
@import "conditionals";
|
7
|
+
@import "grid_layout";
|
8
|
+
@import "helpers";
|
9
|
+
@import "design-patterns/alpha-beta";
|
10
|
+
|
11
|
+
|
12
|
+
// Content
|
13
|
+
// ==========================================================================
|
14
|
+
|
15
|
+
// Content wraps the entire site content block
|
16
|
+
#content {
|
17
|
+
@extend %site-width-container;
|
18
|
+
@extend %contain-floats;
|
19
|
+
padding-bottom: $gutter;
|
20
|
+
@include media(desktop) {
|
21
|
+
padding-bottom: $gutter*3;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
|
26
|
+
// Phase banner
|
27
|
+
// ==========================================================================
|
28
|
+
|
29
|
+
.phase-banner {
|
30
|
+
@include phase-banner(alpha);
|
31
|
+
}
|
32
|
+
|
33
|
+
|
34
|
+
// Grid layout
|
35
|
+
// ==========================================================================
|
36
|
+
|
37
|
+
// Usage:
|
38
|
+
// For two equal columns
|
39
|
+
|
40
|
+
// <div class="grid-row">
|
41
|
+
// <div class="column-half">
|
42
|
+
//
|
43
|
+
// </div>
|
44
|
+
// <div class="column-half">
|
45
|
+
//
|
46
|
+
// </div>
|
47
|
+
// </div>
|
48
|
+
|
49
|
+
// Use .grid-row to define a row for grid columns to sit in
|
50
|
+
.grid-row {
|
51
|
+
@extend %grid-row;
|
52
|
+
}
|
53
|
+
|
54
|
+
// Use .grid-column to create a grid column with 15px gutter
|
55
|
+
// By default grid columns break to become full width at tablet size
|
56
|
+
.column-quarter {
|
57
|
+
@include grid-column( 1/4 );
|
58
|
+
}
|
59
|
+
.column-half {
|
60
|
+
@include grid-column( 1/2 );
|
61
|
+
}
|
62
|
+
.column-third {
|
63
|
+
@include grid-column( 1/3 );
|
64
|
+
}
|
65
|
+
.column-two-thirds {
|
66
|
+
@include grid-column( 2/3 );
|
67
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
// Lists
|
2
|
+
// ==========================================================================
|
3
|
+
|
4
|
+
ul,
|
5
|
+
ol {
|
6
|
+
padding: 0;
|
7
|
+
}
|
8
|
+
|
9
|
+
// Bulleted lists
|
10
|
+
.list-bullet {
|
11
|
+
list-style-type: disc;
|
12
|
+
padding-left: 20px;
|
13
|
+
}
|
14
|
+
|
15
|
+
// Numbered lists
|
16
|
+
.list-number {
|
17
|
+
list-style-type: decimal;
|
18
|
+
padding-left: 20px;
|
19
|
+
@include ie-lte(7) {
|
20
|
+
padding-left: 28px;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
.list-bullet,
|
25
|
+
.list-number {
|
26
|
+
margin-top: 5px;
|
27
|
+
margin-bottom: 20px;
|
28
|
+
}
|
29
|
+
|
30
|
+
.list-bullet li,
|
31
|
+
.list-number li {
|
32
|
+
margin-bottom: 5px;
|
33
|
+
}
|
34
|
+
|
35
|
+
ul {
|
36
|
+
@extend .list-bullet;
|
37
|
+
}
|
38
|
+
ol {
|
39
|
+
@extend .list-number;
|
40
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
// Panels
|
2
|
+
// ==========================================================================
|
3
|
+
// GOV.UK front end toolkit dependencies
|
4
|
+
@import "helpers";
|
5
|
+
|
6
|
+
|
7
|
+
// Indented panels with a grey left hand border
|
8
|
+
.panel-indent {
|
9
|
+
@extend %contain-floats;
|
10
|
+
clear: both;
|
11
|
+
border-left: 4px solid $border-colour;
|
12
|
+
|
13
|
+
padding: 10px 0 10px $gutter-half;
|
14
|
+
margin: ($gutter $gutter-half $gutter*1.5 0);
|
15
|
+
}
|
16
|
+
|
17
|
+
.panel-indent legend {
|
18
|
+
margin-top: 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
// Remove bottom margin on last paragraph
|
22
|
+
.panel-indent p:only-child,
|
23
|
+
.panel-indent p:last-child {
|
24
|
+
margin-bottom: 0;
|
25
|
+
}
|
26
|
+
|
27
|
+
.panel-indent .form-group:last-child {
|
28
|
+
margin-bottom: 0;
|
29
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
// Reset
|
2
|
+
// ==========================================================================
|
3
|
+
// flatten all browser defaults and styles inherited from gov.uk template
|
4
|
+
|
5
|
+
/* Borrowed from http://meyerweb.com/eric/tools/css/reset/ */
|
6
|
+
div, span,
|
7
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
8
|
+
a, abbr, acronym, address, big, cite, code,
|
9
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
10
|
+
small, strike, strong, sub, sup, tt, var,
|
11
|
+
b, u, i, center,
|
12
|
+
dl, dt, dd, ol, ul, li,
|
13
|
+
fieldset, form, label, legend,
|
14
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
15
|
+
article, aside, canvas, details, embed,
|
16
|
+
figure, figcaption, footer, header, hgroup,
|
17
|
+
menu, nav, output, ruby, section, summary,
|
18
|
+
time, mark {
|
19
|
+
border: none;
|
20
|
+
margin: 0;
|
21
|
+
padding: 0;
|
22
|
+
}
|
23
|
+
|
24
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
25
|
+
small, strike, strong, sub, sup, tt, var,
|
26
|
+
b, u, i, center,
|
27
|
+
input, textarea,
|
28
|
+
table, caption, tbody, tfoot, thead, tr, th, td {
|
29
|
+
font-size: inherit;
|
30
|
+
font-family: inherit;
|
31
|
+
line-height: inherit;
|
32
|
+
font-weight: normal;
|
33
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
// Tables
|
2
|
+
// ==========================================================================
|
3
|
+
|
4
|
+
table {
|
5
|
+
border-collapse: collapse;
|
6
|
+
border-spacing: 0;
|
7
|
+
width: 100%;
|
8
|
+
}
|
9
|
+
|
10
|
+
table th,
|
11
|
+
table td {
|
12
|
+
@include core-16;
|
13
|
+
padding: em(12, 16) em(20, 16) em(9, 16) 0;
|
14
|
+
|
15
|
+
text-align: left;
|
16
|
+
color: #0b0c0c;
|
17
|
+
border-bottom: 1px solid $border-colour;
|
18
|
+
}
|
19
|
+
|
20
|
+
table th {
|
21
|
+
font-weight: 700;
|
22
|
+
}
|
23
|
+
|
24
|
+
// Right align headings for numeric content
|
25
|
+
table th.numeric {
|
26
|
+
text-align: right;
|
27
|
+
}
|
28
|
+
|
29
|
+
// Use tabular numbers for numeric table cells
|
30
|
+
table td.numeric {
|
31
|
+
@include core-16($tabular-numbers: true);
|
32
|
+
text-align: right;
|
33
|
+
}
|
package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-block-labels.scss
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
// Large hit area
|
2
|
+
// Radio buttons & checkboxes
|
3
|
+
|
4
|
+
// By default, block labels stack vertically
|
5
|
+
.block-label {
|
6
|
+
|
7
|
+
display: block;
|
8
|
+
float: none;
|
9
|
+
clear: left;
|
10
|
+
position: relative;
|
11
|
+
|
12
|
+
background: $panel-colour;
|
13
|
+
border: 1px solid $panel-colour;
|
14
|
+
padding: (18px $gutter $gutter-half $gutter*1.5);
|
15
|
+
margin-top: 10px;
|
16
|
+
margin-bottom: 10px;
|
17
|
+
|
18
|
+
cursor: pointer; // Encourage clicking on block labels
|
19
|
+
|
20
|
+
@include media(tablet) {
|
21
|
+
float: left;
|
22
|
+
margin-top: 5px;
|
23
|
+
margin-bottom: 5px;
|
24
|
+
// width: 25%; - Test : check that text within labels will wrap
|
25
|
+
}
|
26
|
+
|
27
|
+
// Absolutely position inputs within label, to allow text to wrap
|
28
|
+
input {
|
29
|
+
position: absolute;
|
30
|
+
top: 18px;
|
31
|
+
left: $gutter-half;
|
32
|
+
cursor: pointer;
|
33
|
+
}
|
34
|
+
|
35
|
+
// Change border on hover
|
36
|
+
&:hover {
|
37
|
+
border-color: $black;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
// To stack horizontally, use .inline on parent, to sit block labels next to each other
|
42
|
+
.inline .block-label {
|
43
|
+
clear: none;
|
44
|
+
margin-right: 10px;
|
45
|
+
}
|
46
|
+
|
47
|
+
// Selected and focused states
|
48
|
+
|
49
|
+
// Add selected state
|
50
|
+
.js-enabled label.selected {
|
51
|
+
background: $white;
|
52
|
+
border-color: $black;
|
53
|
+
}
|
54
|
+
|
55
|
+
// Add focus to block labels
|
56
|
+
.js-enabled label.focused {
|
57
|
+
outline: 3px solid $yellow;
|
58
|
+
}
|
59
|
+
|
60
|
+
// Remove focus from radio/checkboxes
|
61
|
+
.js-enabled .focused input:focus {
|
62
|
+
outline: none;
|
63
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
// Date pattern
|
2
|
+
|
3
|
+
// Hide the 'spinner' for webkit
|
4
|
+
// and also for Firefox
|
5
|
+
input::-webkit-outer-spin-button,
|
6
|
+
input::-webkit-inner-spin-button {
|
7
|
+
-webkit-appearance: none;
|
8
|
+
margin: 0
|
9
|
+
}
|
10
|
+
input[type=number] {
|
11
|
+
-moz-appearance: textfield
|
12
|
+
}
|
13
|
+
|
14
|
+
.form-date {
|
15
|
+
|
16
|
+
.form-group {
|
17
|
+
float: left;
|
18
|
+
width: 50px;
|
19
|
+
|
20
|
+
margin-right: 20px;
|
21
|
+
margin-bottom: 0;
|
22
|
+
clear: none;
|
23
|
+
|
24
|
+
label {
|
25
|
+
display: block;
|
26
|
+
margin-bottom: 5px;
|
27
|
+
}
|
28
|
+
|
29
|
+
input {
|
30
|
+
width: 100%;
|
31
|
+
}
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
.form-group-year {
|
36
|
+
width: 70px;
|
37
|
+
}
|
38
|
+
|
39
|
+
}
|
package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-validation.scss
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
// Validation summary box
|
2
|
+
|
3
|
+
.validation-summary {
|
4
|
+
border: 3px solid $error-colour;
|
5
|
+
padding: $gutter-half $gutter;
|
6
|
+
margin-bottom: $gutter;
|
7
|
+
|
8
|
+
@include ie-lte(6){
|
9
|
+
zoom: 1;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
.validation-summary ul {
|
14
|
+
margin-top: 10px;
|
15
|
+
}
|
16
|
+
|
17
|
+
.validation-summary li,
|
18
|
+
.validation-summary p {
|
19
|
+
@include core-16;
|
20
|
+
}
|
21
|
+
|
22
|
+
.validation-summary p {
|
23
|
+
margin-top: $gutter-half;
|
24
|
+
margin-bottom: 5px;
|
25
|
+
}
|
26
|
+
|
27
|
+
.validation-summary a {
|
28
|
+
color: $error-colour;
|
29
|
+
@include ie-lte(6) {
|
30
|
+
color: $error-colour !important;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
.validation-summary .heading-small {
|
35
|
+
margin-top: $gutter-half;
|
36
|
+
}
|
37
|
+
|
38
|
+
|
39
|
+
// Validation error message box
|
40
|
+
// .validation-error {
|
41
|
+
// clear: both;
|
42
|
+
// @extend %contain-floats;
|
43
|
+
// border-left: 3px solid $error-colour;
|
44
|
+
// padding: $gutter- $gutter;
|
45
|
+
// margin-bottom: $gutter-half;
|
46
|
+
// margin-left: -($gutter);
|
47
|
+
// }
|
48
|
+
|
49
|
+
// .validation-error .form-group {
|
50
|
+
// margin-bottom: 20px;
|
51
|
+
// }
|
52
|
+
|
53
|
+
// .validation-error p {
|
54
|
+
// margin-bottom: 10px;
|
55
|
+
// }
|
56
|
+
|
57
|
+
|
58
|
+
// Validation message
|
59
|
+
.validation-message {
|
60
|
+
display: block;
|
61
|
+
@include core-16;
|
62
|
+
color: $error-colour;
|
63
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// App styles
|
2
|
+
|
3
|
+
// govuk_frontend_toolkit
|
4
|
+
@import "govuk_frontend_toolkit/stylesheets/colours";
|
5
|
+
@import "govuk_frontend_toolkit/stylesheets/measurements";
|
6
|
+
@import "govuk_frontend_toolkit/stylesheets/conditionals";
|
7
|
+
@import "govuk_frontend_toolkit/stylesheets/shims";
|
8
|
+
@import "govuk_frontend_toolkit/stylesheets/typography";
|
9
|
+
@import "govuk_frontend_toolkit/stylesheets/css3";
|
10
|
+
@import "govuk_frontend_toolkit/stylesheets/design-patterns/alpha-beta";
|
11
|
+
@import "govuk_frontend_toolkit/stylesheets/design-patterns/buttons";
|
12
|
+
@import "govuk_frontend_toolkit/stylesheets/grid_layout";
|
13
|
+
|
14
|
+
// Custom
|
15
|
+
@import "variables";
|
16
|
+
@import "helpers";
|
@@ -0,0 +1,73 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Alerts
|
3
|
+
// ==========================================================================
|
4
|
+
|
5
|
+
|
6
|
+
%alert {
|
7
|
+
border-left: 4px solid $error-colour;
|
8
|
+
clear: both;
|
9
|
+
margin: 0 0 1.05263em;
|
10
|
+
padding: 1.05263em;
|
11
|
+
}
|
12
|
+
|
13
|
+
|
14
|
+
.alert-success {
|
15
|
+
@extend %alert;
|
16
|
+
border-color: $turquoise;
|
17
|
+
}
|
18
|
+
|
19
|
+
|
20
|
+
.alert-info {
|
21
|
+
@extend %alert;
|
22
|
+
border-color: $grey-2;
|
23
|
+
}
|
24
|
+
|
25
|
+
|
26
|
+
.alert-error {
|
27
|
+
@extend %alert;
|
28
|
+
border-color: $error-colour;
|
29
|
+
}
|
30
|
+
|
31
|
+
|
32
|
+
.alert-complete {
|
33
|
+
@extend %alert;
|
34
|
+
background-color: $turquoise;
|
35
|
+
border-color: $turquoise;
|
36
|
+
color: $white;
|
37
|
+
text-align: center;
|
38
|
+
padding: 4.5em 1em;
|
39
|
+
}
|
40
|
+
|
41
|
+
|
42
|
+
.alert-header {
|
43
|
+
@extend .bold-medium;
|
44
|
+
clear: both;
|
45
|
+
margin-bottom: .5em;
|
46
|
+
overflow: hidden;
|
47
|
+
vertical-align: middle;
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
.alert-number {
|
52
|
+
@extend .bold-xlarge;
|
53
|
+
float: left;
|
54
|
+
margin-right: .41666667em; /* 20px ÷ 48px font size */
|
55
|
+
}
|
56
|
+
|
57
|
+
|
58
|
+
.alert-message {
|
59
|
+
display: block;
|
60
|
+
overflow: hidden;
|
61
|
+
|
62
|
+
h1 {
|
63
|
+
margin-top: em(25);
|
64
|
+
margin-bottom: 0;
|
65
|
+
|
66
|
+
&:first-child {
|
67
|
+
margin-top: 0;
|
68
|
+
}
|
69
|
+
|
70
|
+
}
|
71
|
+
|
72
|
+
}
|
73
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
.table-details {
|
2
|
+
width: 100%;
|
3
|
+
margin-bottom: 3em;
|
4
|
+
|
5
|
+
tbody {
|
6
|
+
td:nth-child(1) {
|
7
|
+
width: 40%;
|
8
|
+
}
|
9
|
+
td:nth-child(2) {
|
10
|
+
width: 60%;
|
11
|
+
}
|
12
|
+
td:nth-child(3) {
|
13
|
+
text-align: right;
|
14
|
+
padding-right: 0;
|
15
|
+
}
|
16
|
+
td:not(.no-white-space) {
|
17
|
+
white-space: pre-wrap;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|