defra_ruby_template 3.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +20 -0
- data/README.md +71 -0
- data/Rakefile +50 -0
- data/app/views/layouts/defra_ruby_template.html.erb +83 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/defra_ruby_template.gemspec +24 -0
- data/lib/defra_ruby_template.rb +23 -0
- data/lib/defra_ruby_template/version.rb +3 -0
- data/node_modules/govuk-frontend/README.md +91 -0
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +14 -0
- data/node_modules/govuk-frontend/govuk/_base.scss +3 -0
- data/node_modules/govuk-frontend/govuk/all-ie8.scss +6 -0
- data/node_modules/govuk-frontend/govuk/all.js +2616 -0
- data/node_modules/govuk-frontend/govuk/all.scss +9 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/bold-affa96571d-v2.woff +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-crest-2x.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-crest.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-logotype-crown.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-mask-icon.svg +7 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/govuk/common.js +39 -0
- data/node_modules/govuk-frontend/govuk/components/_all.scss +33 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +197 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +1011 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +250 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +76 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/template.njk +27 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +62 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/template.njk +2 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +138 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +193 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +52 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/template.njk +24 -0
- data/node_modules/govuk-frontend/govuk/components/button/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/button/_button.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/button/_index.scss +288 -0
- data/node_modules/govuk-frontend/govuk/components/button/button.js +724 -0
- data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +318 -0
- data/node_modules/govuk-frontend/govuk/components/button/macro-options.json +74 -0
- data/node_modules/govuk-frontend/govuk/components/button/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/button/template.njk +60 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +25 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1194 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +240 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +111 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/template.njk +37 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +320 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +1192 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +1189 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +161 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/template.njk +119 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +443 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +132 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk +73 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +549 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +117 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +97 -0
- data/node_modules/govuk-frontend/govuk/components/details/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/details/_details.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/details/_index.scss +87 -0
- data/node_modules/govuk-frontend/govuk/components/details/details.js +828 -0
- data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +103 -0
- data/node_modules/govuk-frontend/govuk/components/details/implementation.md +43 -0
- data/node_modules/govuk-frontend/govuk/components/details/macro-options.json +50 -0
- data/node_modules/govuk-frontend/govuk/components/details/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/details/template.njk +10 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +11 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +77 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +38 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/template.njk +6 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +853 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +242 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +70 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/template.njk +25 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +103 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +70 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/template.njk +22 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +49 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +198 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +73 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/template.njk +44 -0
- data/node_modules/govuk-frontend/govuk/components/footer/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +241 -0
- data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +501 -0
- data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +118 -0
- data/node_modules/govuk-frontend/govuk/components/footer/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/footer/template.njk +87 -0
- data/node_modules/govuk-frontend/govuk/components/header/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/header/_header.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +331 -0
- data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +378 -0
- data/node_modules/govuk-frontend/govuk/components/header/header.js +1066 -0
- data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +106 -0
- data/node_modules/govuk-frontend/govuk/components/header/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/header/template.njk +79 -0
- data/node_modules/govuk-frontend/govuk/components/hint/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/hint/_hint.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +44 -0
- data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +59 -0
- data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/hint/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/hint/template.njk +4 -0
- data/node_modules/govuk-frontend/govuk/components/input/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/input/_index.scss +191 -0
- data/node_modules/govuk-frontend/govuk/components/input/_input.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +628 -0
- data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +167 -0
- data/node_modules/govuk-frontend/govuk/components/input/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/input/template.njk +65 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +58 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/template.njk +4 -0
- data/node_modules/govuk-frontend/govuk/components/label/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/label/_index.scss +41 -0
- data/node_modules/govuk-frontend/govuk/components/label/_label.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +84 -0
- data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +38 -0
- data/node_modules/govuk-frontend/govuk/components/label/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/label/template.njk +15 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +212 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/macro-options.json +68 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/template.njk +47 -0
- data/node_modules/govuk-frontend/govuk/components/panel/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +44 -0
- data/node_modules/govuk-frontend/govuk/components/panel/_panel.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +91 -0
- data/node_modules/govuk-frontend/govuk/components/panel/macro-options.json +44 -0
- data/node_modules/govuk-frontend/govuk/components/panel/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/panel/template.njk +13 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +76 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/macro-options.json +33 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/template.njk +15 -0
- data/node_modules/govuk-frontend/govuk/components/radios/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +342 -0
- data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +1183 -0
- data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +143 -0
- data/node_modules/govuk-frontend/govuk/components/radios/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/radios/radios.js +1148 -0
- data/node_modules/govuk-frontend/govuk/components/radios/template.njk +116 -0
- data/node_modules/govuk-frontend/govuk/components/select/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/select/_index.scss +49 -0
- data/node_modules/govuk-frontend/govuk/components/select/_select.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +327 -0
- data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +105 -0
- data/node_modules/govuk-frontend/govuk/components/select/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/select/template.njk +51 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +36 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +84 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/template.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +145 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +1084 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +113 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/template.njk +47 -0
- data/node_modules/govuk-frontend/govuk/components/table/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/table/_index.scss +71 -0
- data/node_modules/govuk-frontend/govuk/components/table/_table.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +538 -0
- data/node_modules/govuk-frontend/govuk/components/table/macro-options.json +132 -0
- data/node_modules/govuk-frontend/govuk/components/table/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/table/template.njk +45 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +286 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +84 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +1347 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/template.njk +32 -0
- data/node_modules/govuk-frontend/govuk/components/tag/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +86 -0
- data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +131 -0
- data/node_modules/govuk-frontend/govuk/components/tag/macro-options.json +26 -0
- data/node_modules/govuk-frontend/govuk/components/tag/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/tag/template.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +250 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +91 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/template.njk +45 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +73 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/template.njk +9 -0
- data/node_modules/govuk-frontend/govuk/core/_all.scss +6 -0
- data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +25 -0
- data/node_modules/govuk-frontend/govuk/core/_links.scss +41 -0
- data/node_modules/govuk-frontend/govuk/core/_lists.scss +72 -0
- data/node_modules/govuk-frontend/govuk/core/_section-break.scss +62 -0
- data/node_modules/govuk-frontend/govuk/core/_template.scss +36 -0
- data/node_modules/govuk-frontend/govuk/core/_typography.scss +192 -0
- data/node_modules/govuk-frontend/govuk/helpers/_all.scss +12 -0
- data/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss +15 -0
- data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +95 -0
- data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +37 -0
- data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +28 -0
- data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
- data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +61 -0
- data/node_modules/govuk-frontend/govuk/helpers/_links.scss +427 -0
- data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +91 -0
- data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +80 -0
- data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +153 -0
- data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +207 -0
- data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +84 -0
- data/node_modules/govuk-frontend/govuk/objects/_all.scss +5 -0
- data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +101 -0
- data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +23 -0
- data/node_modules/govuk-frontend/govuk/objects/_grid.scss +24 -0
- data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +68 -0
- data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +88 -0
- data/node_modules/govuk-frontend/govuk/overrides/_all.scss +4 -0
- data/node_modules/govuk-frontend/govuk/overrides/_display.scss +30 -0
- data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +64 -0
- data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +27 -0
- data/node_modules/govuk-frontend/govuk/overrides/_width.scss +52 -0
- data/node_modules/govuk-frontend/govuk/settings/_all.scss +23 -0
- data/node_modules/govuk-frontend/govuk/settings/_assets.scss +82 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +155 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +139 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +108 -0
- data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +74 -0
- data/node_modules/govuk-frontend/govuk/settings/_global-styles.scss +13 -0
- data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +18 -0
- data/node_modules/govuk-frontend/govuk/settings/_links.scss +62 -0
- data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +105 -0
- data/node_modules/govuk-frontend/govuk/settings/_media-queries.scss +23 -0
- data/node_modules/govuk-frontend/govuk/settings/_spacing.scss +80 -0
- data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +32 -0
- data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +89 -0
- data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +183 -0
- data/node_modules/govuk-frontend/govuk/template.njk +60 -0
- data/node_modules/govuk-frontend/govuk/tools/_all.scss +8 -0
- data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +36 -0
- data/node_modules/govuk-frontend/govuk/tools/_exports.scss +33 -0
- data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +25 -0
- data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +51 -0
- data/node_modules/govuk-frontend/govuk/tools/_iff.scss +17 -0
- data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +25 -0
- data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +20 -0
- data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +20 -0
- data/node_modules/govuk-frontend/govuk/utilities/_all.scss +2 -0
- data/node_modules/govuk-frontend/govuk/utilities/_clearfix.scss +5 -0
- data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +9 -0
- data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +347 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +272 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +34 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +147 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +589 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +54 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +31 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +254 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +254 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +504 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +252 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +94 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +28 -0
- data/node_modules/govuk-frontend/package.json +56 -0
- data/package-lock.json +13 -0
- data/package.json +29 -0
- data/vendor/assets/fonts/bold-affa96571d-v2.woff +0 -0
- data/vendor/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- data/vendor/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- data/vendor/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- data/vendor/assets/images/favicon.ico +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon.png +0 -0
- data/vendor/assets/images/govuk-crest-2x.png +0 -0
- data/vendor/assets/images/govuk-crest.png +0 -0
- data/vendor/assets/images/govuk-logotype-crown.png +0 -0
- data/vendor/assets/images/govuk-mask-icon.svg +7 -0
- data/vendor/assets/images/govuk-opengraph-image.png +0 -0
- data/vendor/assets/javascripts/defra_ruby_template.js +2616 -0
- data/vendor/assets/stylesheets/_base.scss +3 -0
- data/vendor/assets/stylesheets/all-ie8.scss +6 -0
- data/vendor/assets/stylesheets/all.scss +9 -0
- data/vendor/assets/stylesheets/components/_all.scss +33 -0
- data/vendor/assets/stylesheets/components/accordion/_accordion.scss +2 -0
- data/vendor/assets/stylesheets/components/accordion/_index.scss +197 -0
- data/vendor/assets/stylesheets/components/back-link/_back-link.scss +2 -0
- data/vendor/assets/stylesheets/components/back-link/_index.scss +99 -0
- data/vendor/assets/stylesheets/components/breadcrumbs/_breadcrumbs.scss +2 -0
- data/vendor/assets/stylesheets/components/breadcrumbs/_index.scss +138 -0
- data/vendor/assets/stylesheets/components/button/_button.scss +2 -0
- data/vendor/assets/stylesheets/components/button/_index.scss +288 -0
- data/vendor/assets/stylesheets/components/character-count/_character-count.scss +2 -0
- data/vendor/assets/stylesheets/components/character-count/_index.scss +25 -0
- data/vendor/assets/stylesheets/components/checkboxes/_checkboxes.scss +2 -0
- data/vendor/assets/stylesheets/components/checkboxes/_index.scss +320 -0
- data/vendor/assets/stylesheets/components/cookie-banner/_cookie-banner.scss +2 -0
- data/vendor/assets/stylesheets/components/cookie-banner/_index.scss +51 -0
- data/vendor/assets/stylesheets/components/date-input/_date-input.scss +2 -0
- data/vendor/assets/stylesheets/components/date-input/_index.scss +26 -0
- data/vendor/assets/stylesheets/components/details/_details.scss +2 -0
- data/vendor/assets/stylesheets/components/details/_index.scss +87 -0
- data/vendor/assets/stylesheets/components/error-message/_error-message.scss +2 -0
- data/vendor/assets/stylesheets/components/error-message/_index.scss +11 -0
- data/vendor/assets/stylesheets/components/error-summary/_error-summary.scss +2 -0
- data/vendor/assets/stylesheets/components/error-summary/_index.scss +43 -0
- data/vendor/assets/stylesheets/components/fieldset/_fieldset.scss +2 -0
- data/vendor/assets/stylesheets/components/fieldset/_index.scss +64 -0
- data/vendor/assets/stylesheets/components/file-upload/_file-upload.scss +2 -0
- data/vendor/assets/stylesheets/components/file-upload/_index.scss +49 -0
- data/vendor/assets/stylesheets/components/footer/_footer.scss +2 -0
- data/vendor/assets/stylesheets/components/footer/_index.scss +241 -0
- data/vendor/assets/stylesheets/components/header/_header.scss +2 -0
- data/vendor/assets/stylesheets/components/header/_index.scss +331 -0
- data/vendor/assets/stylesheets/components/hint/_hint.scss +2 -0
- data/vendor/assets/stylesheets/components/hint/_index.scss +44 -0
- data/vendor/assets/stylesheets/components/input/_index.scss +191 -0
- data/vendor/assets/stylesheets/components/input/_input.scss +2 -0
- data/vendor/assets/stylesheets/components/inset-text/_index.scss +24 -0
- data/vendor/assets/stylesheets/components/inset-text/_inset-text.scss +2 -0
- data/vendor/assets/stylesheets/components/label/_index.scss +41 -0
- data/vendor/assets/stylesheets/components/label/_label.scss +2 -0
- data/vendor/assets/stylesheets/components/notification-banner/_index.scss +89 -0
- data/vendor/assets/stylesheets/components/notification-banner/_notification-banner.scss +2 -0
- data/vendor/assets/stylesheets/components/panel/_index.scss +44 -0
- data/vendor/assets/stylesheets/components/panel/_panel.scss +2 -0
- data/vendor/assets/stylesheets/components/phase-banner/_index.scss +27 -0
- data/vendor/assets/stylesheets/components/phase-banner/_phase-banner.scss +2 -0
- data/vendor/assets/stylesheets/components/radios/_index.scss +342 -0
- data/vendor/assets/stylesheets/components/radios/_radios.scss +2 -0
- data/vendor/assets/stylesheets/components/select/_index.scss +49 -0
- data/vendor/assets/stylesheets/components/select/_select.scss +2 -0
- data/vendor/assets/stylesheets/components/skip-link/_index.scss +36 -0
- data/vendor/assets/stylesheets/components/skip-link/_skip-link.scss +2 -0
- data/vendor/assets/stylesheets/components/summary-list/_index.scss +145 -0
- data/vendor/assets/stylesheets/components/summary-list/_summary-list.scss +2 -0
- data/vendor/assets/stylesheets/components/table/_index.scss +71 -0
- data/vendor/assets/stylesheets/components/table/_table.scss +2 -0
- data/vendor/assets/stylesheets/components/tabs/_index.scss +130 -0
- data/vendor/assets/stylesheets/components/tabs/_tabs.scss +2 -0
- data/vendor/assets/stylesheets/components/tag/_index.scss +86 -0
- data/vendor/assets/stylesheets/components/tag/_tag.scss +2 -0
- data/vendor/assets/stylesheets/components/textarea/_index.scss +47 -0
- data/vendor/assets/stylesheets/components/textarea/_textarea.scss +2 -0
- data/vendor/assets/stylesheets/components/warning-text/_index.scss +66 -0
- data/vendor/assets/stylesheets/components/warning-text/_warning-text.scss +2 -0
- data/vendor/assets/stylesheets/core/_all.scss +6 -0
- data/vendor/assets/stylesheets/core/_global-styles.scss +25 -0
- data/vendor/assets/stylesheets/core/_links.scss +41 -0
- data/vendor/assets/stylesheets/core/_lists.scss +72 -0
- data/vendor/assets/stylesheets/core/_section-break.scss +62 -0
- data/vendor/assets/stylesheets/core/_template.scss +36 -0
- data/vendor/assets/stylesheets/core/_typography.scss +192 -0
- data/vendor/assets/stylesheets/defra_ruby_template.scss +16 -0
- data/vendor/assets/stylesheets/helpers/_all.scss +12 -0
- data/vendor/assets/stylesheets/helpers/_clearfix.scss +15 -0
- data/vendor/assets/stylesheets/helpers/_colour.scss +95 -0
- data/vendor/assets/stylesheets/helpers/_device-pixels.scss +37 -0
- data/vendor/assets/stylesheets/helpers/_focused.scss +28 -0
- data/vendor/assets/stylesheets/helpers/_font-faces.scss +41 -0
- data/vendor/assets/stylesheets/helpers/_grid.scss +61 -0
- data/vendor/assets/stylesheets/helpers/_links.scss +427 -0
- data/vendor/assets/stylesheets/helpers/_media-queries.scss +91 -0
- data/vendor/assets/stylesheets/helpers/_shape-arrow.scss +80 -0
- data/vendor/assets/stylesheets/helpers/_spacing.scss +153 -0
- data/vendor/assets/stylesheets/helpers/_typography.scss +207 -0
- data/vendor/assets/stylesheets/helpers/_visually-hidden.scss +84 -0
- data/vendor/assets/stylesheets/objects/_all.scss +5 -0
- data/vendor/assets/stylesheets/objects/_button-group.scss +101 -0
- data/vendor/assets/stylesheets/objects/_form-group.scss +23 -0
- data/vendor/assets/stylesheets/objects/_grid.scss +24 -0
- data/vendor/assets/stylesheets/objects/_main-wrapper.scss +68 -0
- data/vendor/assets/stylesheets/objects/_width-container.scss +88 -0
- data/vendor/assets/stylesheets/overrides/_all.scss +4 -0
- data/vendor/assets/stylesheets/overrides/_display.scss +30 -0
- data/vendor/assets/stylesheets/overrides/_spacing.scss +64 -0
- data/vendor/assets/stylesheets/overrides/_typography.scss +27 -0
- data/vendor/assets/stylesheets/overrides/_width.scss +52 -0
- data/vendor/assets/stylesheets/settings/_all.scss +23 -0
- data/vendor/assets/stylesheets/settings/_assets.scss +82 -0
- data/vendor/assets/stylesheets/settings/_colours-applied.scss +155 -0
- data/vendor/assets/stylesheets/settings/_colours-organisations.scss +139 -0
- data/vendor/assets/stylesheets/settings/_colours-palette.scss +108 -0
- data/vendor/assets/stylesheets/settings/_compatibility.scss +74 -0
- data/vendor/assets/stylesheets/settings/_global-styles.scss +13 -0
- data/vendor/assets/stylesheets/settings/_ie8.scss +18 -0
- data/vendor/assets/stylesheets/settings/_links.scss +62 -0
- data/vendor/assets/stylesheets/settings/_measurements.scss +105 -0
- data/vendor/assets/stylesheets/settings/_media-queries.scss +23 -0
- data/vendor/assets/stylesheets/settings/_spacing.scss +80 -0
- data/vendor/assets/stylesheets/settings/_typography-font-families.scss +32 -0
- data/vendor/assets/stylesheets/settings/_typography-font.scss +89 -0
- data/vendor/assets/stylesheets/settings/_typography-responsive.scss +183 -0
- data/vendor/assets/stylesheets/tools/_all.scss +8 -0
- data/vendor/assets/stylesheets/tools/_compatibility.scss +36 -0
- data/vendor/assets/stylesheets/tools/_exports.scss +33 -0
- data/vendor/assets/stylesheets/tools/_font-url.scss +25 -0
- data/vendor/assets/stylesheets/tools/_ie8.scss +51 -0
- data/vendor/assets/stylesheets/tools/_iff.scss +17 -0
- data/vendor/assets/stylesheets/tools/_image-url.scss +25 -0
- data/vendor/assets/stylesheets/tools/_px-to-em.scss +20 -0
- data/vendor/assets/stylesheets/tools/_px-to-rem.scss +20 -0
- data/vendor/assets/stylesheets/utilities/_all.scss +2 -0
- data/vendor/assets/stylesheets/utilities/_clearfix.scss +5 -0
- data/vendor/assets/stylesheets/utilities/_visually-hidden.scss +9 -0
- data/vendor/assets/stylesheets/vendor/_sass-mq.scss +347 -0
- metadata +520 -0
@@ -0,0 +1,318 @@
|
|
1
|
+
{
|
2
|
+
"component": "button",
|
3
|
+
"fixtures": [
|
4
|
+
{
|
5
|
+
"name": "default",
|
6
|
+
"options": {
|
7
|
+
"text": "Save and continue"
|
8
|
+
},
|
9
|
+
"html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n Save and continue\n</button>",
|
10
|
+
"hidden": false
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"name": "disabled",
|
14
|
+
"options": {
|
15
|
+
"text": "Disabled button",
|
16
|
+
"disabled": true
|
17
|
+
},
|
18
|
+
"html": "<button disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--disabled\" data-module=\"govuk-button\">\n Disabled button\n</button>",
|
19
|
+
"hidden": false
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"name": "link",
|
23
|
+
"options": {
|
24
|
+
"text": "Link button",
|
25
|
+
"href": "/"
|
26
|
+
},
|
27
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Link button\n</a>",
|
28
|
+
"hidden": false
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"name": "link disabled",
|
32
|
+
"options": {
|
33
|
+
"text": "Disabled link button",
|
34
|
+
"href": "/",
|
35
|
+
"disabled": true
|
36
|
+
},
|
37
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--disabled\" data-module=\"govuk-button\">\n Disabled link button\n</a>",
|
38
|
+
"hidden": false
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"name": "start link",
|
42
|
+
"options": {
|
43
|
+
"text": "Start now link button",
|
44
|
+
"href": "/",
|
45
|
+
"isStartButton": true
|
46
|
+
},
|
47
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--start\" data-module=\"govuk-button\">\n Start now link button\n <svg class=\"govuk-button__start-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"17.5\" height=\"19\" viewBox=\"0 0 33 40\" aria-hidden=\"true\" focusable=\"false\">\n <path fill=\"currentColor\" d=\"M0 0h13l20 20-20 20H0l20-20z\"/>\n </svg></a>",
|
48
|
+
"hidden": false
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"name": "input",
|
52
|
+
"options": {
|
53
|
+
"element": "input",
|
54
|
+
"name": "start-now",
|
55
|
+
"text": "Start now"
|
56
|
+
},
|
57
|
+
"html": "<input value=\"Start now\" type=\"submit\" name=\"start-now\" class=\"govuk-button\" data-module=\"govuk-button\">",
|
58
|
+
"hidden": false
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"name": "input disabled",
|
62
|
+
"options": {
|
63
|
+
"element": "input",
|
64
|
+
"text": "Explicit input button disabled",
|
65
|
+
"disabled": true
|
66
|
+
},
|
67
|
+
"html": "<input value=\"Explicit input button disabled\" type=\"submit\" disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--disabled\" data-module=\"govuk-button\">",
|
68
|
+
"hidden": false
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"name": "prevent double click",
|
72
|
+
"options": {
|
73
|
+
"text": "Submit",
|
74
|
+
"preventDoubleClick": true
|
75
|
+
},
|
76
|
+
"html": "<button data-prevent-double-click=\"true\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>",
|
77
|
+
"hidden": false
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"name": "with active state",
|
81
|
+
"options": {
|
82
|
+
"name": "active",
|
83
|
+
"text": "Active",
|
84
|
+
"classes": ":active"
|
85
|
+
},
|
86
|
+
"html": "<button name=\"active\" class=\"govuk-button :active\" data-module=\"govuk-button\">\n Active\n</button>",
|
87
|
+
"hidden": false
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"name": "with hover state",
|
91
|
+
"options": {
|
92
|
+
"name": "hover",
|
93
|
+
"text": "Hovered",
|
94
|
+
"classes": ":hover"
|
95
|
+
},
|
96
|
+
"html": "<button name=\"hover\" class=\"govuk-button :hover\" data-module=\"govuk-button\">\n Hovered\n</button>",
|
97
|
+
"hidden": false
|
98
|
+
},
|
99
|
+
{
|
100
|
+
"name": "with focus state",
|
101
|
+
"options": {
|
102
|
+
"name": "focus",
|
103
|
+
"text": "Focussed",
|
104
|
+
"classes": ":focus"
|
105
|
+
},
|
106
|
+
"html": "<button name=\"focus\" class=\"govuk-button :focus\" data-module=\"govuk-button\">\n Focussed\n</button>",
|
107
|
+
"hidden": false
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"name": "Secondary",
|
111
|
+
"options": {
|
112
|
+
"name": "secondary",
|
113
|
+
"text": "Secondary button",
|
114
|
+
"classes": "govuk-button--secondary"
|
115
|
+
},
|
116
|
+
"html": "<button name=\"secondary\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n Secondary button\n</button>",
|
117
|
+
"hidden": false
|
118
|
+
},
|
119
|
+
{
|
120
|
+
"name": "Secondary disabled",
|
121
|
+
"options": {
|
122
|
+
"name": "secondary",
|
123
|
+
"text": "Secondary button disabled",
|
124
|
+
"classes": "govuk-button--secondary",
|
125
|
+
"disabled": true
|
126
|
+
},
|
127
|
+
"html": "<button name=\"secondary\" disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--secondary govuk-button--disabled\" data-module=\"govuk-button\">\n Secondary button disabled\n</button>",
|
128
|
+
"hidden": false
|
129
|
+
},
|
130
|
+
{
|
131
|
+
"name": "Secondary link",
|
132
|
+
"options": {
|
133
|
+
"name": "secondary",
|
134
|
+
"text": "Secondary button",
|
135
|
+
"href": "/",
|
136
|
+
"classes": "govuk-button--secondary"
|
137
|
+
},
|
138
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n Secondary button\n</a>",
|
139
|
+
"hidden": false
|
140
|
+
},
|
141
|
+
{
|
142
|
+
"name": "Warning",
|
143
|
+
"options": {
|
144
|
+
"name": "Warning",
|
145
|
+
"text": "Warning button",
|
146
|
+
"classes": "govuk-button--warning"
|
147
|
+
},
|
148
|
+
"html": "<button name=\"Warning\" class=\"govuk-button govuk-button--warning\" data-module=\"govuk-button\">\n Warning button\n</button>",
|
149
|
+
"hidden": false
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"name": "Warning disabled",
|
153
|
+
"options": {
|
154
|
+
"name": "warning",
|
155
|
+
"text": "Warning button disabled",
|
156
|
+
"classes": "govuk-button--warning",
|
157
|
+
"disabled": true
|
158
|
+
},
|
159
|
+
"html": "<button name=\"warning\" disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--warning govuk-button--disabled\" data-module=\"govuk-button\">\n Warning button disabled\n</button>",
|
160
|
+
"hidden": false
|
161
|
+
},
|
162
|
+
{
|
163
|
+
"name": "Warning link",
|
164
|
+
"options": {
|
165
|
+
"name": "Warning",
|
166
|
+
"text": "Warning button",
|
167
|
+
"href": "/",
|
168
|
+
"classes": "govuk-button--warning"
|
169
|
+
},
|
170
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--warning\" data-module=\"govuk-button\">\n Warning button\n</a>",
|
171
|
+
"hidden": false
|
172
|
+
},
|
173
|
+
{
|
174
|
+
"name": "attributes",
|
175
|
+
"options": {
|
176
|
+
"element": "button",
|
177
|
+
"text": "Submit",
|
178
|
+
"attributes": {
|
179
|
+
"aria-controls": "example-id",
|
180
|
+
"data-tracking-dimension": 123
|
181
|
+
}
|
182
|
+
},
|
183
|
+
"html": "<button class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"example-id\" data-tracking-dimension=\"123\">\n Submit\n</button>",
|
184
|
+
"hidden": true
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"name": "link attributes",
|
188
|
+
"options": {
|
189
|
+
"element": "a",
|
190
|
+
"text": "Submit",
|
191
|
+
"attributes": {
|
192
|
+
"aria-controls": "example-id",
|
193
|
+
"data-tracking-dimension": 123
|
194
|
+
}
|
195
|
+
},
|
196
|
+
"html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"example-id\" data-tracking-dimension=\"123\">\n Submit\n</a>",
|
197
|
+
"hidden": true
|
198
|
+
},
|
199
|
+
{
|
200
|
+
"name": "input attributes",
|
201
|
+
"options": {
|
202
|
+
"element": "input",
|
203
|
+
"text": "Submit",
|
204
|
+
"attributes": {
|
205
|
+
"aria-controls": "example-id",
|
206
|
+
"data-tracking-dimension": 123
|
207
|
+
}
|
208
|
+
},
|
209
|
+
"html": "<input value=\"Submit\" type=\"submit\" class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"example-id\" data-tracking-dimension=\"123\">",
|
210
|
+
"hidden": true
|
211
|
+
},
|
212
|
+
{
|
213
|
+
"name": "classes",
|
214
|
+
"options": {
|
215
|
+
"text": "Submit",
|
216
|
+
"element": "button",
|
217
|
+
"classes": "app-button--custom-modifier"
|
218
|
+
},
|
219
|
+
"html": "<button class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">\n Submit\n</button>",
|
220
|
+
"hidden": true
|
221
|
+
},
|
222
|
+
{
|
223
|
+
"name": "link classes",
|
224
|
+
"options": {
|
225
|
+
"text": "Submit",
|
226
|
+
"element": "a",
|
227
|
+
"classes": "app-button--custom-modifier"
|
228
|
+
},
|
229
|
+
"html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">\n Submit\n</a>",
|
230
|
+
"hidden": true
|
231
|
+
},
|
232
|
+
{
|
233
|
+
"name": "input classes",
|
234
|
+
"options": {
|
235
|
+
"text": "Submit",
|
236
|
+
"element": "input",
|
237
|
+
"classes": "app-button--custom-modifier"
|
238
|
+
},
|
239
|
+
"html": "<input value=\"Submit\" type=\"submit\" class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">",
|
240
|
+
"hidden": true
|
241
|
+
},
|
242
|
+
{
|
243
|
+
"name": "name",
|
244
|
+
"options": {
|
245
|
+
"text": "Submit",
|
246
|
+
"element": "button",
|
247
|
+
"name": "start-now"
|
248
|
+
},
|
249
|
+
"html": "<button name=\"start-now\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>",
|
250
|
+
"hidden": true
|
251
|
+
},
|
252
|
+
{
|
253
|
+
"name": "type",
|
254
|
+
"options": {
|
255
|
+
"text": "Submit",
|
256
|
+
"element": "button",
|
257
|
+
"type": "button"
|
258
|
+
},
|
259
|
+
"html": "<button type=\"button\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>",
|
260
|
+
"hidden": true
|
261
|
+
},
|
262
|
+
{
|
263
|
+
"name": "input type",
|
264
|
+
"options": {
|
265
|
+
"text": "Submit",
|
266
|
+
"element": "input",
|
267
|
+
"type": "button"
|
268
|
+
},
|
269
|
+
"html": "<input value=\"Submit\" type=\"button\" class=\"govuk-button\" data-module=\"govuk-button\">",
|
270
|
+
"hidden": true
|
271
|
+
},
|
272
|
+
{
|
273
|
+
"name": "explicit link",
|
274
|
+
"options": {
|
275
|
+
"element": "a",
|
276
|
+
"href": "/",
|
277
|
+
"text": "Continue"
|
278
|
+
},
|
279
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Continue\n</a>",
|
280
|
+
"hidden": true
|
281
|
+
},
|
282
|
+
{
|
283
|
+
"name": "no href",
|
284
|
+
"options": {
|
285
|
+
"text": "Submit",
|
286
|
+
"element": "a"
|
287
|
+
},
|
288
|
+
"html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</a>",
|
289
|
+
"hidden": true
|
290
|
+
},
|
291
|
+
{
|
292
|
+
"name": "value",
|
293
|
+
"options": {
|
294
|
+
"text": "Submit",
|
295
|
+
"element": "button",
|
296
|
+
"value": "start"
|
297
|
+
},
|
298
|
+
"html": "<button value=\"start\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>",
|
299
|
+
"hidden": true
|
300
|
+
},
|
301
|
+
{
|
302
|
+
"name": "html",
|
303
|
+
"options": {
|
304
|
+
"text": "Submit",
|
305
|
+
"element": "button",
|
306
|
+
"html": "Start <em>now</em>"
|
307
|
+
},
|
308
|
+
"html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n Start <em>now</em>\n</button>",
|
309
|
+
"hidden": true
|
310
|
+
},
|
311
|
+
{
|
312
|
+
"name": "no data",
|
313
|
+
"options": {},
|
314
|
+
"html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n \n</button>",
|
315
|
+
"hidden": true
|
316
|
+
}
|
317
|
+
]
|
318
|
+
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"name": "element",
|
4
|
+
"type": "string",
|
5
|
+
"required": false,
|
6
|
+
"description": "Whether to use an `input`, `button` or `a` element to create the button. In most cases you will not need to set this as it will be configured automatically if you use `href` or `html`."
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"name": "text",
|
10
|
+
"type": "string",
|
11
|
+
"required": true,
|
12
|
+
"description": "If `html` is set, this is not required. Text for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`."
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "html",
|
16
|
+
"type": "string",
|
17
|
+
"required": true,
|
18
|
+
"description": "If `text` is set, this is not required. HTML for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`."
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"name": "name",
|
22
|
+
"type": "string",
|
23
|
+
"required": false,
|
24
|
+
"description": "Name for the `input` or `button`. This has no effect on `a` elements."
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"name": "type",
|
28
|
+
"type": "string",
|
29
|
+
"required": false,
|
30
|
+
"description": "Type of `input` or `button` – `button`, `submit` or `reset`. Defaults to `submit`. This has no effect on `a` elements."
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"name": "value",
|
34
|
+
"type": "string",
|
35
|
+
"required": false,
|
36
|
+
"description": "Value for the `button` tag. This has no effect on `a` or `input` elements."
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"name": "disabled",
|
40
|
+
"type": "boolean",
|
41
|
+
"required": false,
|
42
|
+
"description": "Whether the button should be disabled. For button and input elements, `disabled` and `aria-disabled` attributes will be set automatically."
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"name": "href",
|
46
|
+
"type": "string",
|
47
|
+
"required": false,
|
48
|
+
"description": "The URL that the button should link to. If this is set, `element` will be automatically set to `a` if it has not already been defined."
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"name": "classes",
|
52
|
+
"type": "string",
|
53
|
+
"required": false,
|
54
|
+
"description": "Classes to add to the button component."
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"name": "attributes",
|
58
|
+
"type": "object",
|
59
|
+
"required": false,
|
60
|
+
"description": "HTML attributes (for example data attributes) to add to the button component."
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"name": "preventDoubleClick",
|
64
|
+
"type": "boolean",
|
65
|
+
"required": false,
|
66
|
+
"description": "Prevent accidental double clicks on submit buttons from submitting forms multiple times"
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"name": "isStartButton",
|
70
|
+
"type": "boolean",
|
71
|
+
"required": false,
|
72
|
+
"description": "Use for the main call to action on your service's start page."
|
73
|
+
}
|
74
|
+
]
|
@@ -0,0 +1,60 @@
|
|
1
|
+
{# Set classes for this component #}
|
2
|
+
{%- set classNames = "govuk-button" -%}
|
3
|
+
|
4
|
+
{%- if params.classes %}
|
5
|
+
{% set classNames = classNames + " " + params.classes %}
|
6
|
+
{% endif %}
|
7
|
+
{% if params.disabled %}
|
8
|
+
{% set classNames = classNames + " govuk-button--disabled" %}
|
9
|
+
{% endif -%}
|
10
|
+
|
11
|
+
{# Determine type of element to use, if not explicitly set #}
|
12
|
+
{%- if params.element %}
|
13
|
+
{% set element = params.element | lower %}
|
14
|
+
{% else %}
|
15
|
+
{% if params.href %}
|
16
|
+
{% set element = 'a' %}
|
17
|
+
{% else %}
|
18
|
+
{% set element = 'button' %}
|
19
|
+
{% endif %}
|
20
|
+
{% endif -%}
|
21
|
+
|
22
|
+
{% if params.isStartButton %}
|
23
|
+
{% set iconHtml %}
|
24
|
+
{#- The SVG needs `focusable="false"` so that Internet Explorer does not
|
25
|
+
treat it as an interactive element - without this it will be
|
26
|
+
'focusable' when using the keyboard to navigate. #}
|
27
|
+
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" aria-hidden="true" focusable="false">
|
28
|
+
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z"/>
|
29
|
+
</svg>
|
30
|
+
{% endset %}
|
31
|
+
{% set classNames = classNames + " govuk-button--start" %}
|
32
|
+
{% endif %}
|
33
|
+
|
34
|
+
{#- Define common attributes that we can use across all element types #}
|
35
|
+
|
36
|
+
{%- set commonAttributes %} class="{{ classNames }}" data-module="govuk-button"{% for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}{% endset %}
|
37
|
+
|
38
|
+
{#- Define common attributes we can use for both button and input types #}
|
39
|
+
|
40
|
+
{%- set buttonAttributes %}{% if params.name %} name="{{ params.name }}"{% endif %}{% if params.disabled %} disabled="disabled" aria-disabled="true"{% endif %}{% if params.preventDoubleClick %} data-prevent-double-click="true"{% endif %}{% endset %}
|
41
|
+
|
42
|
+
{#- Actually create a button... or a link! #}
|
43
|
+
|
44
|
+
{%- if element == 'a' %}
|
45
|
+
<a href="{{ params.href if params.href else '#' }}" role="button" draggable="false" {{- commonAttributes | safe }}>
|
46
|
+
{{ params.html | safe if params.html else params.text }}
|
47
|
+
{# Indentation is intentional to output HTML nicely #}
|
48
|
+
{{- iconHtml | safe | trim | indent(2, true) if iconHtml -}}
|
49
|
+
</a>
|
50
|
+
|
51
|
+
{%- elseif element == 'button' %}
|
52
|
+
<button {%- if params.value %} value="{{ params.value }}"{% endif %}{%- if params.type %} type="{{ params.type }}"{% endif %} {{- buttonAttributes | safe }} {{- commonAttributes | safe }}>
|
53
|
+
{{ params.html | safe if params.html else params.text }}
|
54
|
+
{# Indentation is intentional to output HTML nicely #}
|
55
|
+
{{- iconHtml | safe | trim | indent(2, true) if iconHtml -}}
|
56
|
+
</button>
|
57
|
+
|
58
|
+
{%- elseif element == 'input' %}
|
59
|
+
<input value="{{ params.text }}" type="{{ params.type if params.type else 'submit' }}" {{- buttonAttributes | safe }} {{- commonAttributes | safe }}>
|
60
|
+
{%- endif %}
|