govuk_tech_docs 6.3.0.beta → 6.3.0
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.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/documentation.yaml +29 -0
- data/.github/workflows/build-middleman-artifact.yaml +41 -0
- data/.github/workflows/deploy-to-pages.yaml +39 -0
- data/.github/workflows/publish.yaml +2 -2
- data/.github/workflows/test.yaml +9 -3
- data/.gitignore +5 -4
- data/CHANGELOG.md +9 -4
- data/README.md +9 -9
- data/Rakefile +1 -1
- data/documentation/.nvmrc +1 -0
- data/documentation/Gemfile +11 -0
- data/documentation/LICENSE +21 -0
- data/documentation/README.md +30 -0
- data/documentation/Staticfile +4 -0
- data/documentation/config/tech-docs.yml +45 -0
- data/{example → documentation}/config.rb +3 -6
- data/documentation/source/accessibility/index.html.md.erb +64 -0
- data/documentation/source/configure_project/frontmatter/index.html.md.erb +206 -0
- data/documentation/source/configure_project/global_configuration/index.html.md.erb +328 -0
- data/documentation/source/configure_project/index.html.md.erb +17 -0
- data/documentation/source/configure_project/page_expiry_and_review/index.html.md.erb +93 -0
- data/documentation/source/configure_project/structure_docs/index.html.md.erb +117 -0
- data/documentation/source/create_project/build/index.html.md.erb +20 -0
- data/documentation/source/create_project/create_new_project/index.html.md.erb +23 -0
- data/documentation/source/create_project/get_started/index.html.md.erb +58 -0
- data/documentation/source/create_project/index.html.md.erb +17 -0
- data/documentation/source/create_project/preview/index.html.md.erb +26 -0
- data/documentation/source/images/Basic multipage.svg +1 -0
- data/documentation/source/images/Basic_multipage.svg +1 -0
- data/documentation/source/images/Nested multipage.svg +1 -0
- data/documentation/source/images/Nested_multipage.svg +1 -0
- data/documentation/source/images/Single_page.svg +1 -0
- data/documentation/source/images/core-layout-without-sidebar.png +0 -0
- data/documentation/source/images/core-layout.png +0 -0
- data/documentation/source/images/daniel-the-manual-spaniel-screenshot.svg +1 -0
- data/documentation/source/images/expired-page.png +0 -0
- data/documentation/source/images/last-reviewed-only.png +0 -0
- data/documentation/source/images/last-reviewed-only.svg +1 -0
- data/documentation/source/images/layout-layout.png +0 -0
- data/documentation/source/images/multipage.svg +3 -0
- data/documentation/source/images/not-expired-page.png +0 -0
- data/documentation/source/index.html.md.erb +19 -0
- data/documentation/source/maintain_project/index.html.md.erb +18 -0
- data/documentation/source/maintain_project/redirects/index.html.md.erb +22 -0
- data/documentation/source/maintain_project/review_content/index.html.md.erb +45 -0
- data/documentation/source/maintain_project/use_latest_template/index.html.md.erb +34 -0
- data/documentation/source/partials/_links.erb +81 -0
- data/documentation/source/publish_project/deploy/index.html.md.erb +44 -0
- data/documentation/source/publish_project/index.html.md.erb +15 -0
- data/documentation/source/publish_project/version/index.html.md.erb +12 -0
- data/documentation/source/support/index.html.md.erb +46 -0
- data/documentation/source/write_docs/add_openapi_spec/index.html.md.erb +48 -0
- data/documentation/source/write_docs/content/index.html.md.erb +128 -0
- data/documentation/source/write_docs/index.html.md.erb +15 -0
- data/lib/govuk_tech_docs/version.rb +1 -1
- data/lib/source/layouts/_footer.erb +2 -2
- data/lib/source/layouts/_header.erb +2 -2
- data/lib/source/layouts/_service_navigation.erb +1 -6
- data/lib/source/layouts/core.erb +15 -7
- data/node_modules/govuk-frontend/dist/govuk/_base.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/_base.scss +4 -5
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +31 -22
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +31 -22
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-180.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-192.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-512.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/_index.import.scss +37 -0
- data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +36 -39
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +3 -373
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_mixin.scss +375 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss +3 -85
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_mixin.scss +87 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss +3 -136
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_mixin.scss +138 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/_button.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/_index.import.scss +13 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss +9 -259
- data/node_modules/govuk-frontend/dist/govuk/components/button/_mixin.scss +233 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/_settings.import.scss +32 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/_settings.scss +34 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.import.scss +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +7 -44
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_mixin.scss +41 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.import.scss +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +7 -314
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_mixin.scss +311 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.import.scss +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +4 -55
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_mixin.scss +56 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.import.scss +13 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +8 -33
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_mixin.scss +29 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/_details.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +3 -141
- data/node_modules/govuk-frontend/dist/govuk/components/details/_mixin.scss +143 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss +3 -14
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_mixin.scss +16 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +3 -57
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_mixin.scss +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.import.scss +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss +4 -91
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_mixin.scss +92 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss +3 -69
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_mixin.scss +71 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.import.scss +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +6 -211
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_mixin.scss +217 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +30 -21
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +30 -21
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +30 -21
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +3 -197
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_mixin.scss +199 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/_header.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +3 -188
- data/node_modules/govuk-frontend/dist/govuk/components/header/_mixin.scss +175 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss +3 -45
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_mixin.scss +47 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.import.scss +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +6 -162
- data/node_modules/govuk-frontend/dist/govuk/components/input/_input.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/_mixin.scss +160 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss +3 -29
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_mixin.scss +31 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/_index.scss +3 -46
- data/node_modules/govuk-frontend/dist/govuk/components/label/_label.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/_mixin.scss +48 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +3 -97
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_mixin.scss +99 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +3 -233
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_mixin.scss +235 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +3 -58
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_mixin.scss +60 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.import.scss +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +5 -56
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_mixin.scss +56 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.import.scss +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +4 -41
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_mixin.scss +42 -0
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.import.scss +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +7 -330
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_mixin.scss +330 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.import.scss +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +6 -53
- data/node_modules/govuk-frontend/dist/govuk/components/select/_mixin.scss +52 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/_select.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +3 -235
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_mixin.scss +237 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +3 -58
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_mixin.scss +60 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +3 -284
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_mixin.scss +286 -0
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss +3 -75
- data/node_modules/govuk-frontend/dist/govuk/components/table/_mixin.scss +77 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/_table.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss +3 -138
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_mixin.scss +140 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +3 -132
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_mixin.scss +135 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.import.scss +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +4 -82
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_mixin.scss +83 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.import.scss +11 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +6 -44
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_mixin.scss +43 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +3 -67
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_mixin.scss +69 -0
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.import.scss +10 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.mixin.scss +19 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.scss +5 -22
- data/node_modules/govuk-frontend/dist/govuk/core/_index.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_index.scss +6 -10
- data/node_modules/govuk-frontend/dist/govuk/core/_links.import.scss +10 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_links.mixin.scss +44 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_links.scss +3 -48
- data/node_modules/govuk-frontend/dist/govuk/core/_lists.import.scss +14 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_lists.mixin.scss +74 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss +6 -73
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.mixin.scss +54 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss +3 -55
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.mixin.scss +173 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss +3 -174
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.mixin.scss +15 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.scss +2 -15
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.mixin.scss +13 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.scss +2 -13
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.mixin.scss +21 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss +2 -20
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_index.import.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_index.scss +3 -4
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_clearfix.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_clearfix.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +35 -17
- data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.scss +2 -3
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/{_font-faces.scss → _font-faces--internal.scss} +5 -5
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_index.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_index.scss +12 -13
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +6 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss +2 -3
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing--internal.scss +80 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss +18 -79
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography--internal.scss +24 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +20 -37
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss +1 -2
- data/node_modules/govuk-frontend/dist/govuk/helpers/_width-container.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_width-container.scss +73 -0
- data/node_modules/govuk-frontend/dist/govuk/index.import.scss +10 -0
- data/node_modules/govuk-frontend/dist/govuk/index.scss +6 -7
- data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.mixin.scss +80 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.scss +3 -78
- data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.mixin.scss +26 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.scss +3 -24
- data/node_modules/govuk-frontend/dist/govuk/objects/_grid.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_grid.mixin.scss +28 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_grid.scss +3 -26
- data/node_modules/govuk-frontend/dist/govuk/objects/_index.import.scss +7 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_index.scss +6 -7
- data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.mixin.scss +55 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.scss +3 -53
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.mixin.scss +53 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss +3 -51
- data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.mixin.scss +9 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss +3 -76
- data/node_modules/govuk-frontend/dist/govuk/overrides/_display.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_display.mixin.scss +26 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss +2 -26
- data/node_modules/govuk-frontend/dist/govuk/overrides/_index.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_index.scss +5 -9
- data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.mixin.scss +89 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.scss +2 -88
- data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.mixin.scss +16 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.scss +2 -16
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.mixin.scss +43 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +2 -43
- data/node_modules/govuk-frontend/dist/govuk/overrides/_width.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_width.mixin.scss +50 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss +2 -49
- data/node_modules/govuk-frontend/dist/govuk/settings/_assets.import.scss +13 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_assets.scss +46 -35
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.import.scss +13 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss +10 -235
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-legacy-functional.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-legacy-functional.scss +188 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +1 -20
- data/node_modules/govuk-frontend/dist/govuk/settings/{_colours-palette.scss → _colours-palette--internal.scss} +2 -3
- data/node_modules/govuk-frontend/dist/govuk/settings/_custom-properties.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_custom-properties.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_global-styles.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_global-styles.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_index.import.scss +24 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_index.scss +13 -14
- data/node_modules/govuk-frontend/dist/govuk/settings/_links.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_links.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.scss +2 -3
- data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_spacing.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_spacing.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss +2 -4
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_warnings--internal.scss +69 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.scss +9 -69
- data/node_modules/govuk-frontend/dist/govuk/tools/_exports.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss +10 -5
- data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.import.scss +31 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss +9 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_if.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_if.scss +0 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.import.scss +31 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.scss +9 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss +6 -7
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss +1 -2
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss +1 -2
- data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.mixin.scss +10 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.scss +2 -8
- data/node_modules/govuk-frontend/dist/govuk/utilities/_index.import.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_index.scss +2 -4
- data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.mixin.scss +14 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.scss +2 -12
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss +2 -3
- data/package-lock.json +153 -124
- metadata +255 -73
- data/docs/configuration.md +0 -3
- data/docs/frontmatter.md +0 -3
- data/docs/page-expiry.md +0 -3
- data/example/.ruby-version +0 -1
- data/example/Gemfile +0 -3
- data/example/config/tech-docs.yml +0 -67
- data/example/source/active-pages/index.html.md.erb +0 -7
- data/example/source/active-pages/sub-section/index.html.md.erb +0 -7
- data/example/source/api-path.html.md +0 -7
- data/example/source/api-reference.html.md +0 -5
- data/example/source/child-of-expired-page.html.md +0 -8
- data/example/source/code.html.md +0 -42
- data/example/source/core-layout-without-sidebar.html.md.erb +0 -7
- data/example/source/core-layout.html.md.erb +0 -12
- data/example/source/expired-page-with-owner.html.md +0 -10
- data/example/source/expired-page.html.md +0 -9
- data/example/source/headings.html.md +0 -11
- data/example/source/hidden-page.html.md +0 -10
- data/example/source/index.html.md.erb +0 -27
- data/example/source/javascripts/govuk_frontend.js +0 -1
- data/example/source/nested-page/another-nested-nested-page/index.html.md +0 -5
- data/example/source/nested-page/another-nested-page/index.html.md +0 -5
- data/example/source/nested-page/index.html.md +0 -5
- data/example/source/not-expired-page.html.md +0 -9
- data/example/source/pets.yml +0 -113
- data/example/source/prevent-index-page.html.md +0 -10
- data/example/source/single-page-nav.html.md +0 -13
- data/example/source/templates/proxy_template.html.md +0 -8
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/input/_input.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/label/_label.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/table/_table.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss +0 -10
- /data/{example → documentation}/source/javascripts/application.js +0 -0
- /data/{example → documentation}/source/stylesheets/print.css.scss +0 -0
- /data/{example → documentation}/source/stylesheets/screen-old-ie.css.scss +0 -0
- /data/{example → documentation}/source/stylesheets/screen.css.scss +0 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
@use "../../base";
|
|
2
|
+
|
|
3
|
+
/// @access private
|
|
4
|
+
@mixin styles {
|
|
5
|
+
$file-upload-border-width: 2px;
|
|
6
|
+
$component-padding: base.govuk-spacing(1);
|
|
7
|
+
$empty-button-background-colour: base.govuk-colour("white");
|
|
8
|
+
$empty-pseudo-button-background-colour: base.govuk-colour("black", $variant: "tint-95");
|
|
9
|
+
$empty-status-background-colour: base.govuk-colour("blue", $variant: "tint-80");
|
|
10
|
+
|
|
11
|
+
.govuk-file-upload {
|
|
12
|
+
@include base.govuk-font($size: 19);
|
|
13
|
+
|
|
14
|
+
max-width: 100%;
|
|
15
|
+
margin-left: -$component-padding;
|
|
16
|
+
padding: $component-padding;
|
|
17
|
+
color: base.govuk-functional-colour(text);
|
|
18
|
+
|
|
19
|
+
// The default file upload button in Safari does not support setting a
|
|
20
|
+
// custom font-size. Set `-webkit-appearance` to `button` to drop out of the
|
|
21
|
+
// native appearance so the font-size is set to 19px
|
|
22
|
+
// https://webkit.org/b/224746
|
|
23
|
+
&::-webkit-file-upload-button {
|
|
24
|
+
color: inherit;
|
|
25
|
+
font: inherit;
|
|
26
|
+
-webkit-appearance: button;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:focus {
|
|
30
|
+
outline: base.$govuk-focus-width solid;
|
|
31
|
+
outline-color: base.govuk-functional-colour(focus);
|
|
32
|
+
// Use `box-shadow` to add border instead of changing `border-width`
|
|
33
|
+
// (which changes element size) and since `outline` is already used for
|
|
34
|
+
// the yellow focus state.
|
|
35
|
+
box-shadow: inset 0 0 0 4px base.govuk-functional-colour(input-border);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Set "focus-within" to fix https://bugzil.la/1430196 so that component
|
|
39
|
+
// receives focus in Firefox.
|
|
40
|
+
// This can't be set together with `:focus` as all versions of IE fail
|
|
41
|
+
// to recognise `focus-within` and don't set any styles from the block
|
|
42
|
+
// when it's a selector.
|
|
43
|
+
&:focus-within {
|
|
44
|
+
outline: base.$govuk-focus-width solid;
|
|
45
|
+
outline-color: base.govuk-functional-colour(focus);
|
|
46
|
+
|
|
47
|
+
box-shadow: inset 0 0 0 4px base.govuk-functional-colour(input-border);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:disabled {
|
|
51
|
+
opacity: 0.5;
|
|
52
|
+
cursor: not-allowed;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.govuk-file-upload-wrapper,
|
|
57
|
+
// @deprecated .govuk-drop-zone class is deprecated in favour of .govuk-file-upload-wrapper
|
|
58
|
+
.govuk-drop-zone {
|
|
59
|
+
display: block;
|
|
60
|
+
position: relative;
|
|
61
|
+
z-index: 0;
|
|
62
|
+
background-color: base.govuk-functional-colour(body-background);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// required because disabling pointer events
|
|
66
|
+
// on the button means that the cursor style
|
|
67
|
+
// be applied on the button itself
|
|
68
|
+
.govuk-file-upload-wrapper--disabled {
|
|
69
|
+
cursor: not-allowed;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.govuk-file-upload-button__pseudo-button {
|
|
73
|
+
flex-shrink: 0;
|
|
74
|
+
width: auto;
|
|
75
|
+
margin-right: base.govuk-spacing(2);
|
|
76
|
+
margin-bottom: base.$govuk-border-width-form-element + 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.govuk-file-upload-button__instruction {
|
|
80
|
+
margin-top: base.govuk-spacing(2) - (base.$govuk-border-width-form-element + 1);
|
|
81
|
+
margin-bottom: 0;
|
|
82
|
+
text-align: left;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.govuk-file-upload-button__status {
|
|
86
|
+
display: block;
|
|
87
|
+
margin-bottom: base.govuk-spacing(2);
|
|
88
|
+
padding: base.govuk-spacing(3) base.govuk-spacing(2);
|
|
89
|
+
color: base.govuk-colour("white");
|
|
90
|
+
background-color: base.govuk-colour("blue");
|
|
91
|
+
text-align: left;
|
|
92
|
+
@include base.govuk-text-break-word;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// bugs documented with button using flex
|
|
96
|
+
// https://github.com/philipwalton/flexbugs#flexbug-9
|
|
97
|
+
// so we need a container here
|
|
98
|
+
.govuk-file-upload-button__pseudo-button-container {
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-wrap: wrap;
|
|
101
|
+
align-items: baseline;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.govuk-file-upload-button {
|
|
105
|
+
width: 100%;
|
|
106
|
+
// align the padding to be same as notification banner and error summary accounting for the thicker borders
|
|
107
|
+
padding: (base.govuk-spacing(3) + base.$govuk-border-width - $file-upload-border-width);
|
|
108
|
+
border: $file-upload-border-width solid base.govuk-colour("black", $variant: "tint-80");
|
|
109
|
+
background-color: base.govuk-colour("white");
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
|
|
112
|
+
@media #{base.govuk-from-breakpoint(tablet)} {
|
|
113
|
+
padding: (base.govuk-spacing(4) + base.$govuk-border-width - $file-upload-border-width);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@at-root .govuk-form-group--error & {
|
|
117
|
+
border-style: solid;
|
|
118
|
+
border-color: base.govuk-functional-colour("error");
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.govuk-file-upload-button__pseudo-button {
|
|
122
|
+
background-color: base.govuk-colour("black", $variant: "tint-95");
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&:hover {
|
|
126
|
+
border-style: dashed;
|
|
127
|
+
border-color: base.govuk-colour("black", $variant: "tint-50");
|
|
128
|
+
|
|
129
|
+
.govuk-file-upload-button__pseudo-button {
|
|
130
|
+
background-color: base.govuk-colour("black", $variant: "tint-80");
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.govuk-file-upload-button__status {
|
|
134
|
+
background-color: base.govuk-colour("blue");
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&:active,
|
|
139
|
+
&:focus {
|
|
140
|
+
border: $file-upload-border-width solid base.govuk-colour("black");
|
|
141
|
+
outline: base.$govuk-focus-width solid;
|
|
142
|
+
outline-color: base.govuk-functional-colour(focus);
|
|
143
|
+
// Ensure outline appears outside of the element
|
|
144
|
+
outline-offset: 0;
|
|
145
|
+
background-color: base.govuk-colour("black", $variant: "tint-95");
|
|
146
|
+
// Double the border by adding its width again. Use `box-shadow` for this
|
|
147
|
+
// instead of changing `border-width` - this is for consistency with
|
|
148
|
+
// components such as textarea where we avoid changing `border-width` as
|
|
149
|
+
// it will change the element size. Also, `outline` cannot be utilised
|
|
150
|
+
// here as it is already used for the yellow focus state.
|
|
151
|
+
box-shadow: inset 0 0 0 base.$govuk-border-width-form-element;
|
|
152
|
+
|
|
153
|
+
.govuk-file-upload-button__pseudo-button {
|
|
154
|
+
background-color: base.govuk-functional-colour(focus);
|
|
155
|
+
box-shadow: 0 2px 0 base.govuk-colour("black");
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&:hover .govuk-file-upload-button__pseudo-button {
|
|
159
|
+
border-color: base.govuk-functional-colour(focus);
|
|
160
|
+
outline: 3px solid transparent;
|
|
161
|
+
background-color: base.govuk-colour("black", $variant: "tint-80");
|
|
162
|
+
box-shadow: inset 0 0 0 1px base.govuk-functional-colour(focus);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.govuk-file-upload-button--empty {
|
|
168
|
+
border-style: dashed;
|
|
169
|
+
background-color: $empty-button-background-colour;
|
|
170
|
+
|
|
171
|
+
.govuk-file-upload-button__pseudo-button {
|
|
172
|
+
background-color: $empty-pseudo-button-background-colour;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.govuk-file-upload-button__status {
|
|
176
|
+
color: base.govuk-colour("black");
|
|
177
|
+
background-color: $empty-status-background-colour;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&:hover,
|
|
181
|
+
&:focus,
|
|
182
|
+
&:active {
|
|
183
|
+
background-color: base.govuk-colour("black", $variant: "tint-95");
|
|
184
|
+
|
|
185
|
+
.govuk-file-upload-button__status {
|
|
186
|
+
background-color: base.govuk-colour("blue", $variant: "tint-80");
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.govuk-file-upload-button--dragging {
|
|
192
|
+
border-style: solid;
|
|
193
|
+
border-color: base.govuk-colour("black");
|
|
194
|
+
|
|
195
|
+
// extra specificity to apply when
|
|
196
|
+
// empty
|
|
197
|
+
&.govuk-file-upload-button--empty {
|
|
198
|
+
background-color: base.govuk-colour("black", $variant: "tint-95");
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.govuk-file-upload-button:disabled {
|
|
203
|
+
pointer-events: none;
|
|
204
|
+
opacity: 0.5;
|
|
205
|
+
|
|
206
|
+
background-color: $empty-button-background-colour;
|
|
207
|
+
|
|
208
|
+
.govuk-file-upload-button__pseudo-button {
|
|
209
|
+
background-color: $empty-pseudo-button-background-colour;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.govuk-file-upload-button__status {
|
|
213
|
+
background-color: $empty-status-background-colour;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
@@ -382,6 +382,7 @@
|
|
|
382
382
|
this.$input = void 0;
|
|
383
383
|
this.$button = void 0;
|
|
384
384
|
this.$status = void 0;
|
|
385
|
+
this.$label = void 0;
|
|
385
386
|
this.i18n = void 0;
|
|
386
387
|
this.id = void 0;
|
|
387
388
|
this.$announcements = void 0;
|
|
@@ -411,8 +412,30 @@
|
|
|
411
412
|
if (!$label.id) {
|
|
412
413
|
$label.id = `${this.id}-label`;
|
|
413
414
|
}
|
|
415
|
+
this.$label = $label;
|
|
414
416
|
this.$input.id = `${this.id}-input`;
|
|
415
|
-
this.$input.setAttribute('hidden', '
|
|
417
|
+
this.$input.setAttribute('hidden', 'hidden');
|
|
418
|
+
this.$status = this.createStatus();
|
|
419
|
+
this.$button = this.createButton();
|
|
420
|
+
this.$root.insertAdjacentElement('afterbegin', this.$button);
|
|
421
|
+
this.$input.addEventListener('change', this.onChange.bind(this));
|
|
422
|
+
this.updateDisabledState();
|
|
423
|
+
this.observeDisabledState();
|
|
424
|
+
this.$announcements = document.createElement('span');
|
|
425
|
+
this.$announcements.classList.add('govuk-file-upload-announcements');
|
|
426
|
+
this.$announcements.classList.add('govuk-visually-hidden');
|
|
427
|
+
this.$announcements.setAttribute('aria-live', 'assertive');
|
|
428
|
+
this.$root.insertAdjacentElement('afterend', this.$announcements);
|
|
429
|
+
this.bindDraggingEvents();
|
|
430
|
+
}
|
|
431
|
+
createStatus() {
|
|
432
|
+
const $status = document.createElement('span');
|
|
433
|
+
$status.className = 'govuk-body govuk-file-upload-button__status';
|
|
434
|
+
$status.setAttribute('aria-live', 'polite');
|
|
435
|
+
$status.innerText = this.i18n.t('noFileChosen');
|
|
436
|
+
return $status;
|
|
437
|
+
}
|
|
438
|
+
createButton() {
|
|
416
439
|
const $button = document.createElement('button');
|
|
417
440
|
$button.classList.add('govuk-file-upload-button');
|
|
418
441
|
$button.type = 'button';
|
|
@@ -422,11 +445,7 @@
|
|
|
422
445
|
if (ariaDescribedBy) {
|
|
423
446
|
$button.setAttribute('aria-describedby', ariaDescribedBy);
|
|
424
447
|
}
|
|
425
|
-
|
|
426
|
-
$status.className = 'govuk-body govuk-file-upload-button__status';
|
|
427
|
-
$status.setAttribute('aria-live', 'polite');
|
|
428
|
-
$status.innerText = this.i18n.t('noFileChosen');
|
|
429
|
-
$button.appendChild($status);
|
|
448
|
+
$button.appendChild(this.$status);
|
|
430
449
|
const commaSpan = document.createElement('span');
|
|
431
450
|
commaSpan.className = 'govuk-visually-hidden';
|
|
432
451
|
commaSpan.innerText = ', ';
|
|
@@ -444,24 +463,14 @@
|
|
|
444
463
|
instructionSpan.innerText = this.i18n.t('dropInstruction');
|
|
445
464
|
containerSpan.appendChild(instructionSpan);
|
|
446
465
|
$button.appendChild(containerSpan);
|
|
447
|
-
$button.setAttribute('aria-labelledby', `${
|
|
466
|
+
$button.setAttribute('aria-labelledby', `${this.$label.id} ${commaSpan.id} ${$button.id}`);
|
|
448
467
|
$button.addEventListener('click', this.onClick.bind(this));
|
|
449
468
|
$button.addEventListener('dragover', event => {
|
|
450
469
|
event.preventDefault();
|
|
451
470
|
});
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
this.$button = $button;
|
|
456
|
-
this.$status = $status;
|
|
457
|
-
this.$input.addEventListener('change', this.onChange.bind(this));
|
|
458
|
-
this.updateDisabledState();
|
|
459
|
-
this.observeDisabledState();
|
|
460
|
-
this.$announcements = document.createElement('span');
|
|
461
|
-
this.$announcements.classList.add('govuk-file-upload-announcements');
|
|
462
|
-
this.$announcements.classList.add('govuk-visually-hidden');
|
|
463
|
-
this.$announcements.setAttribute('aria-live', 'assertive');
|
|
464
|
-
this.$root.insertAdjacentElement('afterend', this.$announcements);
|
|
471
|
+
return $button;
|
|
472
|
+
}
|
|
473
|
+
bindDraggingEvents() {
|
|
465
474
|
this.$button.addEventListener('drop', this.onDrop.bind(this));
|
|
466
475
|
document.addEventListener('dragenter', this.updateDropzoneVisibility.bind(this));
|
|
467
476
|
document.addEventListener('dragenter', () => {
|
|
@@ -568,7 +577,7 @@
|
|
|
568
577
|
}
|
|
569
578
|
updateDisabledState() {
|
|
570
579
|
this.$button.disabled = this.$input.disabled;
|
|
571
|
-
this.$root.classList.toggle('govuk-
|
|
580
|
+
this.$root.classList.toggle('govuk-file-upload-wrapper--disabled', this.$button.disabled);
|
|
572
581
|
}
|
|
573
582
|
}
|
|
574
583
|
|
|
@@ -376,6 +376,7 @@ class FileUpload extends ConfigurableComponent {
|
|
|
376
376
|
this.$input = void 0;
|
|
377
377
|
this.$button = void 0;
|
|
378
378
|
this.$status = void 0;
|
|
379
|
+
this.$label = void 0;
|
|
379
380
|
this.i18n = void 0;
|
|
380
381
|
this.id = void 0;
|
|
381
382
|
this.$announcements = void 0;
|
|
@@ -405,8 +406,30 @@ class FileUpload extends ConfigurableComponent {
|
|
|
405
406
|
if (!$label.id) {
|
|
406
407
|
$label.id = `${this.id}-label`;
|
|
407
408
|
}
|
|
409
|
+
this.$label = $label;
|
|
408
410
|
this.$input.id = `${this.id}-input`;
|
|
409
|
-
this.$input.setAttribute('hidden', '
|
|
411
|
+
this.$input.setAttribute('hidden', 'hidden');
|
|
412
|
+
this.$status = this.createStatus();
|
|
413
|
+
this.$button = this.createButton();
|
|
414
|
+
this.$root.insertAdjacentElement('afterbegin', this.$button);
|
|
415
|
+
this.$input.addEventListener('change', this.onChange.bind(this));
|
|
416
|
+
this.updateDisabledState();
|
|
417
|
+
this.observeDisabledState();
|
|
418
|
+
this.$announcements = document.createElement('span');
|
|
419
|
+
this.$announcements.classList.add('govuk-file-upload-announcements');
|
|
420
|
+
this.$announcements.classList.add('govuk-visually-hidden');
|
|
421
|
+
this.$announcements.setAttribute('aria-live', 'assertive');
|
|
422
|
+
this.$root.insertAdjacentElement('afterend', this.$announcements);
|
|
423
|
+
this.bindDraggingEvents();
|
|
424
|
+
}
|
|
425
|
+
createStatus() {
|
|
426
|
+
const $status = document.createElement('span');
|
|
427
|
+
$status.className = 'govuk-body govuk-file-upload-button__status';
|
|
428
|
+
$status.setAttribute('aria-live', 'polite');
|
|
429
|
+
$status.innerText = this.i18n.t('noFileChosen');
|
|
430
|
+
return $status;
|
|
431
|
+
}
|
|
432
|
+
createButton() {
|
|
410
433
|
const $button = document.createElement('button');
|
|
411
434
|
$button.classList.add('govuk-file-upload-button');
|
|
412
435
|
$button.type = 'button';
|
|
@@ -416,11 +439,7 @@ class FileUpload extends ConfigurableComponent {
|
|
|
416
439
|
if (ariaDescribedBy) {
|
|
417
440
|
$button.setAttribute('aria-describedby', ariaDescribedBy);
|
|
418
441
|
}
|
|
419
|
-
|
|
420
|
-
$status.className = 'govuk-body govuk-file-upload-button__status';
|
|
421
|
-
$status.setAttribute('aria-live', 'polite');
|
|
422
|
-
$status.innerText = this.i18n.t('noFileChosen');
|
|
423
|
-
$button.appendChild($status);
|
|
442
|
+
$button.appendChild(this.$status);
|
|
424
443
|
const commaSpan = document.createElement('span');
|
|
425
444
|
commaSpan.className = 'govuk-visually-hidden';
|
|
426
445
|
commaSpan.innerText = ', ';
|
|
@@ -438,24 +457,14 @@ class FileUpload extends ConfigurableComponent {
|
|
|
438
457
|
instructionSpan.innerText = this.i18n.t('dropInstruction');
|
|
439
458
|
containerSpan.appendChild(instructionSpan);
|
|
440
459
|
$button.appendChild(containerSpan);
|
|
441
|
-
$button.setAttribute('aria-labelledby', `${
|
|
460
|
+
$button.setAttribute('aria-labelledby', `${this.$label.id} ${commaSpan.id} ${$button.id}`);
|
|
442
461
|
$button.addEventListener('click', this.onClick.bind(this));
|
|
443
462
|
$button.addEventListener('dragover', event => {
|
|
444
463
|
event.preventDefault();
|
|
445
464
|
});
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
this.$button = $button;
|
|
450
|
-
this.$status = $status;
|
|
451
|
-
this.$input.addEventListener('change', this.onChange.bind(this));
|
|
452
|
-
this.updateDisabledState();
|
|
453
|
-
this.observeDisabledState();
|
|
454
|
-
this.$announcements = document.createElement('span');
|
|
455
|
-
this.$announcements.classList.add('govuk-file-upload-announcements');
|
|
456
|
-
this.$announcements.classList.add('govuk-visually-hidden');
|
|
457
|
-
this.$announcements.setAttribute('aria-live', 'assertive');
|
|
458
|
-
this.$root.insertAdjacentElement('afterend', this.$announcements);
|
|
465
|
+
return $button;
|
|
466
|
+
}
|
|
467
|
+
bindDraggingEvents() {
|
|
459
468
|
this.$button.addEventListener('drop', this.onDrop.bind(this));
|
|
460
469
|
document.addEventListener('dragenter', this.updateDropzoneVisibility.bind(this));
|
|
461
470
|
document.addEventListener('dragenter', () => {
|
|
@@ -562,7 +571,7 @@ class FileUpload extends ConfigurableComponent {
|
|
|
562
571
|
}
|
|
563
572
|
updateDisabledState() {
|
|
564
573
|
this.$button.disabled = this.$input.disabled;
|
|
565
|
-
this.$root.classList.toggle('govuk-
|
|
574
|
+
this.$root.classList.toggle('govuk-file-upload-wrapper--disabled', this.$button.disabled);
|
|
566
575
|
}
|
|
567
576
|
}
|
|
568
577
|
|
|
@@ -20,6 +20,7 @@ class FileUpload extends ConfigurableComponent {
|
|
|
20
20
|
this.$input = void 0;
|
|
21
21
|
this.$button = void 0;
|
|
22
22
|
this.$status = void 0;
|
|
23
|
+
this.$label = void 0;
|
|
23
24
|
this.i18n = void 0;
|
|
24
25
|
this.id = void 0;
|
|
25
26
|
this.$announcements = void 0;
|
|
@@ -49,8 +50,30 @@ class FileUpload extends ConfigurableComponent {
|
|
|
49
50
|
if (!$label.id) {
|
|
50
51
|
$label.id = `${this.id}-label`;
|
|
51
52
|
}
|
|
53
|
+
this.$label = $label;
|
|
52
54
|
this.$input.id = `${this.id}-input`;
|
|
53
|
-
this.$input.setAttribute('hidden', '
|
|
55
|
+
this.$input.setAttribute('hidden', 'hidden');
|
|
56
|
+
this.$status = this.createStatus();
|
|
57
|
+
this.$button = this.createButton();
|
|
58
|
+
this.$root.insertAdjacentElement('afterbegin', this.$button);
|
|
59
|
+
this.$input.addEventListener('change', this.onChange.bind(this));
|
|
60
|
+
this.updateDisabledState();
|
|
61
|
+
this.observeDisabledState();
|
|
62
|
+
this.$announcements = document.createElement('span');
|
|
63
|
+
this.$announcements.classList.add('govuk-file-upload-announcements');
|
|
64
|
+
this.$announcements.classList.add('govuk-visually-hidden');
|
|
65
|
+
this.$announcements.setAttribute('aria-live', 'assertive');
|
|
66
|
+
this.$root.insertAdjacentElement('afterend', this.$announcements);
|
|
67
|
+
this.bindDraggingEvents();
|
|
68
|
+
}
|
|
69
|
+
createStatus() {
|
|
70
|
+
const $status = document.createElement('span');
|
|
71
|
+
$status.className = 'govuk-body govuk-file-upload-button__status';
|
|
72
|
+
$status.setAttribute('aria-live', 'polite');
|
|
73
|
+
$status.innerText = this.i18n.t('noFileChosen');
|
|
74
|
+
return $status;
|
|
75
|
+
}
|
|
76
|
+
createButton() {
|
|
54
77
|
const $button = document.createElement('button');
|
|
55
78
|
$button.classList.add('govuk-file-upload-button');
|
|
56
79
|
$button.type = 'button';
|
|
@@ -60,11 +83,7 @@ class FileUpload extends ConfigurableComponent {
|
|
|
60
83
|
if (ariaDescribedBy) {
|
|
61
84
|
$button.setAttribute('aria-describedby', ariaDescribedBy);
|
|
62
85
|
}
|
|
63
|
-
|
|
64
|
-
$status.className = 'govuk-body govuk-file-upload-button__status';
|
|
65
|
-
$status.setAttribute('aria-live', 'polite');
|
|
66
|
-
$status.innerText = this.i18n.t('noFileChosen');
|
|
67
|
-
$button.appendChild($status);
|
|
86
|
+
$button.appendChild(this.$status);
|
|
68
87
|
const commaSpan = document.createElement('span');
|
|
69
88
|
commaSpan.className = 'govuk-visually-hidden';
|
|
70
89
|
commaSpan.innerText = ', ';
|
|
@@ -82,24 +101,14 @@ class FileUpload extends ConfigurableComponent {
|
|
|
82
101
|
instructionSpan.innerText = this.i18n.t('dropInstruction');
|
|
83
102
|
containerSpan.appendChild(instructionSpan);
|
|
84
103
|
$button.appendChild(containerSpan);
|
|
85
|
-
$button.setAttribute('aria-labelledby', `${
|
|
104
|
+
$button.setAttribute('aria-labelledby', `${this.$label.id} ${commaSpan.id} ${$button.id}`);
|
|
86
105
|
$button.addEventListener('click', this.onClick.bind(this));
|
|
87
106
|
$button.addEventListener('dragover', event => {
|
|
88
107
|
event.preventDefault();
|
|
89
108
|
});
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
this.$button = $button;
|
|
94
|
-
this.$status = $status;
|
|
95
|
-
this.$input.addEventListener('change', this.onChange.bind(this));
|
|
96
|
-
this.updateDisabledState();
|
|
97
|
-
this.observeDisabledState();
|
|
98
|
-
this.$announcements = document.createElement('span');
|
|
99
|
-
this.$announcements.classList.add('govuk-file-upload-announcements');
|
|
100
|
-
this.$announcements.classList.add('govuk-visually-hidden');
|
|
101
|
-
this.$announcements.setAttribute('aria-live', 'assertive');
|
|
102
|
-
this.$root.insertAdjacentElement('afterend', this.$announcements);
|
|
109
|
+
return $button;
|
|
110
|
+
}
|
|
111
|
+
bindDraggingEvents() {
|
|
103
112
|
this.$button.addEventListener('drop', this.onDrop.bind(this));
|
|
104
113
|
document.addEventListener('dragenter', this.updateDropzoneVisibility.bind(this));
|
|
105
114
|
document.addEventListener('dragenter', () => {
|
|
@@ -206,7 +215,7 @@ class FileUpload extends ConfigurableComponent {
|
|
|
206
215
|
}
|
|
207
216
|
updateDisabledState() {
|
|
208
217
|
this.$button.disabled = this.$input.disabled;
|
|
209
|
-
this.$root.classList.toggle('govuk-
|
|
218
|
+
this.$root.classList.toggle('govuk-file-upload-wrapper--disabled', this.$button.disabled);
|
|
210
219
|
}
|
|
211
220
|
}
|
|
212
221
|
|