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,132 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"name": "rows",
|
4
|
+
"type": "array",
|
5
|
+
"required": true,
|
6
|
+
"description": "Array of table rows and cells.",
|
7
|
+
"params": [
|
8
|
+
{
|
9
|
+
"name": "text",
|
10
|
+
"type": "string",
|
11
|
+
"required": true,
|
12
|
+
"description": "If `html` is set, this is not required. Text for cells in table rows. If `html` is provided, the `text` argument will be ignored."
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "html",
|
16
|
+
"type": "string",
|
17
|
+
"required": true,
|
18
|
+
"description": "If `text` is set, this is not required. HTML for cells in table rows. If `html` is provided, the `text` argument will be ignored."
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"name": "format",
|
22
|
+
"type": "string",
|
23
|
+
"required": false,
|
24
|
+
"description": "Specify format of a cell. Currently we only use \"numeric\"."
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"name": "classes",
|
28
|
+
"type": "string",
|
29
|
+
"required": false,
|
30
|
+
"description": "Classes to add to the table row cell."
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"name": "colspan",
|
34
|
+
"type": "integer",
|
35
|
+
"required": false,
|
36
|
+
"description": "Specify how many columns a cell extends."
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"name": "rowspan",
|
40
|
+
"type": "integer",
|
41
|
+
"required": false,
|
42
|
+
"description": "Specify how many rows a cell extends."
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"name": "attributes",
|
46
|
+
"type": "object",
|
47
|
+
"required": false,
|
48
|
+
"description": "HTML attributes (for example data attributes) to add to the table cell."
|
49
|
+
}
|
50
|
+
]
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"name": "head",
|
54
|
+
"type": "array",
|
55
|
+
"required": false,
|
56
|
+
"description": "Array of table head cells.",
|
57
|
+
"params": [
|
58
|
+
{
|
59
|
+
"name": "text",
|
60
|
+
"type": "string",
|
61
|
+
"required": false,
|
62
|
+
"description": "If `html` is set, this is not required. Text for table head cells. If `html` is provided, the `text` argument will be ignored."
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"name": "html",
|
66
|
+
"type": "string",
|
67
|
+
"required": false,
|
68
|
+
"description": "If `text` is set, this is not required. HTML for table head cells. If `html` is provided, the `text` argument will be ignored."
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"name": "format",
|
72
|
+
"type": "string",
|
73
|
+
"required": false,
|
74
|
+
"description": "Specify format of a cell. Currently we only use \"numeric\"."
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"name": "classes",
|
78
|
+
"type": "string",
|
79
|
+
"required": false,
|
80
|
+
"description": "Classes to add to the table head cell."
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"name": "colspan",
|
84
|
+
"type": "integer",
|
85
|
+
"required": false,
|
86
|
+
"description": "Specify how many columns a cell extends."
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"name": "rowspan",
|
90
|
+
"type": "integer",
|
91
|
+
"required": false,
|
92
|
+
"description": "Specify how many rows a cell extends."
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"name": "attributes",
|
96
|
+
"type": "object",
|
97
|
+
"required": false,
|
98
|
+
"description": "HTML attributes (for example data attributes) to add to the table cell."
|
99
|
+
}
|
100
|
+
]
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"name": "caption",
|
104
|
+
"type": "string",
|
105
|
+
"required": false,
|
106
|
+
"description": "Caption text"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"name": "captionClasses",
|
110
|
+
"type": "string",
|
111
|
+
"required": false,
|
112
|
+
"description": "Classes for caption text size. Classes should correspond to the available typography heading classes."
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"name": "firstCellIsHeader",
|
116
|
+
"type": "boolean",
|
117
|
+
"required": false,
|
118
|
+
"description": "If set to true, first cell in table row will be a TH instead of a TD."
|
119
|
+
},
|
120
|
+
{
|
121
|
+
"name": "classes",
|
122
|
+
"type": "string",
|
123
|
+
"required": false,
|
124
|
+
"description": "Classes to add to the table container."
|
125
|
+
},
|
126
|
+
{
|
127
|
+
"name": "attributes",
|
128
|
+
"type": "object",
|
129
|
+
"required": false,
|
130
|
+
"description": "HTML attributes (for example data attributes) to add to the table container."
|
131
|
+
}
|
132
|
+
]
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<table class="govuk-table
|
2
|
+
{%- if params.classes %} {{ params.classes }}{% endif %}"{% for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
3
|
+
{% if params.caption %}
|
4
|
+
<caption class="govuk-table__caption
|
5
|
+
{%- if params.captionClasses %} {{ params.captionClasses }}{% endif %}">{{ params.caption }}</caption>
|
6
|
+
{% endif %}
|
7
|
+
{% if params.head %}
|
8
|
+
<thead class="govuk-table__head">
|
9
|
+
<tr class="govuk-table__row">
|
10
|
+
{% for item in params.head %}
|
11
|
+
<th scope="col" class="govuk-table__header
|
12
|
+
{%- if item.format %} govuk-table__header--{{ item.format }}{% endif %}
|
13
|
+
{%- if item.classes %} {{ item.classes }}{% endif %}"
|
14
|
+
{%- if item.colspan %} colspan="{{ item.colspan }}"{% endif %}
|
15
|
+
{%- if item.rowspan %} rowspan="{{ item.rowspan }}"{% endif %}{% for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>{{ item.html |safe if item.html else item.text }}</th>
|
16
|
+
{% endfor %}
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
{% endif %}
|
20
|
+
<tbody class="govuk-table__body">
|
21
|
+
{% for row in params.rows %}
|
22
|
+
{% if row %}
|
23
|
+
<tr class="govuk-table__row">
|
24
|
+
{% for cell in row %}
|
25
|
+
{% set commonAttributes %}
|
26
|
+
{%- if cell.colspan %} colspan="{{ cell.colspan }}"{% endif %}
|
27
|
+
{%- if cell.rowspan %} rowspan="{{ cell.rowspan }}"{% endif %}{% for attribute, value in cell.attributes %} {{ attribute }}="{{ value }}"{% endfor %}
|
28
|
+
{% endset %}
|
29
|
+
{% if loop.first and params.firstCellIsHeader %}
|
30
|
+
<th scope="row" class="govuk-table__header{%- if cell.classes %} {{ cell.classes }}{% endif %}"
|
31
|
+
{{- commonAttributes | safe -}}
|
32
|
+
>{{ cell.html | safe if cell.html else cell.text }}</th>
|
33
|
+
{% else %}
|
34
|
+
<td class="govuk-table__cell
|
35
|
+
{%- if cell.format %} govuk-table__cell--{{ cell.format }}{% endif %}
|
36
|
+
{%- if cell.classes %} {{ cell.classes }}{% endif %}"
|
37
|
+
{{- commonAttributes | safe -}}
|
38
|
+
>{{ cell.html | safe if cell.html else cell.text }}</td>
|
39
|
+
{% endif %}
|
40
|
+
{% endfor %}
|
41
|
+
</tr>
|
42
|
+
{% endif %}
|
43
|
+
{% endfor %}
|
44
|
+
</tbody>
|
45
|
+
</table>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Tabs
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
|
6
|
+
|
7
|
+
## Guidance and Examples
|
8
|
+
|
9
|
+
Find out when to use the tabs component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/tabs).
|
10
|
+
|
11
|
+
## Component options
|
12
|
+
|
13
|
+
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
|
14
|
+
|
15
|
+
See [options table](https://design-system.service.gov.uk/components/tabs/#options-tabs-example) for details.
|
@@ -0,0 +1,130 @@
|
|
1
|
+
@include govuk-exports("govuk/component/tabs") {
|
2
|
+
.govuk-tabs {
|
3
|
+
@include govuk-responsive-margin(1, "top");
|
4
|
+
@include govuk-responsive-margin(6, "bottom");
|
5
|
+
}
|
6
|
+
|
7
|
+
.govuk-tabs__title {
|
8
|
+
@include govuk-font($size: 19);
|
9
|
+
@include govuk-text-colour;
|
10
|
+
margin-bottom: govuk-spacing(2);
|
11
|
+
}
|
12
|
+
|
13
|
+
.govuk-tabs__list {
|
14
|
+
margin: 0;
|
15
|
+
padding: 0;
|
16
|
+
list-style: none;
|
17
|
+
@include govuk-responsive-margin(6, "bottom");
|
18
|
+
}
|
19
|
+
|
20
|
+
.govuk-tabs__list-item {
|
21
|
+
@include govuk-font($size: 19);
|
22
|
+
margin-left: govuk-spacing(5);
|
23
|
+
|
24
|
+
&:before {
|
25
|
+
@include govuk-text-colour;
|
26
|
+
content: "\2014 "; // "— "
|
27
|
+
margin-left: - govuk-spacing(5);
|
28
|
+
padding-right: govuk-spacing(1);
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
.govuk-tabs__tab {
|
33
|
+
@include govuk-link-common;
|
34
|
+
@include govuk-link-style-default;
|
35
|
+
|
36
|
+
display: inline-block;
|
37
|
+
margin-bottom: govuk-spacing(2);
|
38
|
+
}
|
39
|
+
|
40
|
+
.govuk-tabs__panel {
|
41
|
+
@include govuk-responsive-margin(8, "bottom");
|
42
|
+
}
|
43
|
+
|
44
|
+
// JavaScript enabled
|
45
|
+
.js-enabled {
|
46
|
+
|
47
|
+
@include govuk-media-query($from: tablet) {
|
48
|
+
.govuk-tabs__list {
|
49
|
+
@include govuk-clearfix;
|
50
|
+
margin-bottom: 0;
|
51
|
+
border-bottom: 1px solid $govuk-border-colour;
|
52
|
+
}
|
53
|
+
|
54
|
+
.govuk-tabs__title {
|
55
|
+
display: none;
|
56
|
+
}
|
57
|
+
|
58
|
+
.govuk-tabs__list-item {
|
59
|
+
position: relative;
|
60
|
+
|
61
|
+
margin-right: govuk-spacing(1);
|
62
|
+
margin-bottom: 0;
|
63
|
+
margin-left: 0;
|
64
|
+
padding: govuk-spacing(2) govuk-spacing(4);
|
65
|
+
|
66
|
+
float: left;
|
67
|
+
background-color: govuk-colour("light-grey", $legacy: "grey-4");
|
68
|
+
text-align: center;
|
69
|
+
|
70
|
+
&:before {
|
71
|
+
content: none;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
.govuk-tabs__list-item--selected {
|
76
|
+
$border-width: 1px;
|
77
|
+
|
78
|
+
position: relative;
|
79
|
+
|
80
|
+
margin-top: - govuk-spacing(1);
|
81
|
+
|
82
|
+
// Compensation for border (otherwise we get a shift)
|
83
|
+
margin-bottom: -$border-width;
|
84
|
+
padding-top: govuk-spacing(3) - $border-width;
|
85
|
+
padding-right: govuk-spacing(4) - $border-width;
|
86
|
+
padding-bottom: govuk-spacing(3) + $border-width;
|
87
|
+
padding-left: govuk-spacing(4) - $border-width;
|
88
|
+
|
89
|
+
border: $border-width solid $govuk-border-colour;
|
90
|
+
border-bottom: 0;
|
91
|
+
|
92
|
+
background-color: $govuk-body-background-colour;
|
93
|
+
|
94
|
+
.govuk-tabs__tab {
|
95
|
+
text-decoration: none;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
.govuk-tabs__tab {
|
100
|
+
@include govuk-link-style-text;
|
101
|
+
|
102
|
+
margin-bottom: 0;
|
103
|
+
|
104
|
+
&:after {
|
105
|
+
content: "";
|
106
|
+
position: absolute;
|
107
|
+
top: 0;
|
108
|
+
right: 0;
|
109
|
+
bottom: 0;
|
110
|
+
left: 0;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
.govuk-tabs__panel {
|
115
|
+
@include govuk-responsive-margin(0, "bottom");
|
116
|
+
padding: govuk-spacing(6) govuk-spacing(4);
|
117
|
+
border: 1px solid $govuk-border-colour;
|
118
|
+
border-top: 0;
|
119
|
+
|
120
|
+
& > :last-child {
|
121
|
+
margin-bottom: 0;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
.govuk-tabs__panel--hidden {
|
126
|
+
display: none;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
@@ -0,0 +1,286 @@
|
|
1
|
+
{
|
2
|
+
"component": "tabs",
|
3
|
+
"fixtures": [
|
4
|
+
{
|
5
|
+
"name": "default",
|
6
|
+
"options": {
|
7
|
+
"items": [
|
8
|
+
{
|
9
|
+
"label": "Past day",
|
10
|
+
"id": "past-day",
|
11
|
+
"panel": {
|
12
|
+
"html": "<h2 class=\"govuk-heading-l\">Past day</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">3</td>\n <td class=\"govuk-table__cell\">0</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">1</td>\n <td class=\"govuk-table__cell\">0</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">2</td>\n <td class=\"govuk-table__cell\">0</td>\n </tr>\n </tbody>\n</table>\n"
|
13
|
+
}
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"label": "Past week",
|
17
|
+
"id": "past-week",
|
18
|
+
"panel": {
|
19
|
+
"html": "<h2 class=\"govuk-heading-l\">Past week</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">24</td>\n <td class=\"govuk-table__cell\">18</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">16</td>\n <td class=\"govuk-table__cell\">20</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">24</td>\n <td class=\"govuk-table__cell\">27</td>\n </tr>\n </tbody>\n</table>\n"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"label": "Past month",
|
24
|
+
"id": "past-month",
|
25
|
+
"panel": {
|
26
|
+
"html": "<h2 class=\"govuk-heading-l\">Past month</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">98</td>\n <td class=\"govuk-table__cell\">95</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">122</td>\n <td class=\"govuk-table__cell\">131</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">126</td>\n <td class=\"govuk-table__cell\">142</td>\n </tr>\n </tbody>\n</table>\n"
|
27
|
+
}
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"label": "Past year",
|
31
|
+
"id": "past-year",
|
32
|
+
"panel": {
|
33
|
+
"html": "<h2 class=\"govuk-heading-l\">Past year</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">1380</td>\n <td class=\"govuk-table__cell\">1472</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">1129</td>\n <td class=\"govuk-table__cell\">1083</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">1539</td>\n <td class=\"govuk-table__cell\">1265</td>\n </tr>\n </tbody>\n</table>\n"
|
34
|
+
}
|
35
|
+
}
|
36
|
+
]
|
37
|
+
},
|
38
|
+
"html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#past-day\">\n Past day\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#past-week\">\n Past week\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#past-month\">\n Past month\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#past-year\">\n Past year\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"past-day\">\n <h2 class=\"govuk-heading-l\">Past day</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">3</td>\n <td class=\"govuk-table__cell\">0</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">1</td>\n <td class=\"govuk-table__cell\">0</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">2</td>\n <td class=\"govuk-table__cell\">0</td>\n </tr>\n </tbody>\n</table>\n\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"past-week\">\n <h2 class=\"govuk-heading-l\">Past week</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">24</td>\n <td class=\"govuk-table__cell\">18</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">16</td>\n <td class=\"govuk-table__cell\">20</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">24</td>\n <td class=\"govuk-table__cell\">27</td>\n </tr>\n </tbody>\n</table>\n\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"past-month\">\n <h2 class=\"govuk-heading-l\">Past month</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">98</td>\n <td class=\"govuk-table__cell\">95</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">122</td>\n <td class=\"govuk-table__cell\">131</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">126</td>\n <td class=\"govuk-table__cell\">142</td>\n </tr>\n </tbody>\n</table>\n\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"past-year\">\n <h2 class=\"govuk-heading-l\">Past year</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">1380</td>\n <td class=\"govuk-table__cell\">1472</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">1129</td>\n <td class=\"govuk-table__cell\">1083</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">1539</td>\n <td class=\"govuk-table__cell\">1265</td>\n </tr>\n </tbody>\n</table>\n\n </div>\n \n \n</div>",
|
39
|
+
"hidden": false
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"name": "tabs-with-anchor-in-panel",
|
43
|
+
"options": {
|
44
|
+
"items": [
|
45
|
+
{
|
46
|
+
"label": "Tab 1",
|
47
|
+
"id": "tab-1",
|
48
|
+
"panel": {
|
49
|
+
"html": "<h2 class=\"govuk-heading-l\">Tab 1</h2>\n<p class=\"govuk-body\">Testing that when you click the anchor it moves to the anchor point successfully</p>\n<p class=\"govuk-body\"><a class=\"govuk-link\" href=\"#anchor\">Anchor</a></p>\n<p class=\"govuk-body\"><a id=\"anchor\" tabIndex=\"0\">Anchor Point</a></p>\n"
|
50
|
+
}
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"label": "Tab 2",
|
54
|
+
"id": "tab-2",
|
55
|
+
"panel": {
|
56
|
+
"html": "<h2 class=\"govuk-heading-l\">Tab 2</h2>\n"
|
57
|
+
}
|
58
|
+
}
|
59
|
+
]
|
60
|
+
},
|
61
|
+
"html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\">\n Tab 1\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-2\">\n Tab 2\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\">\n <h2 class=\"govuk-heading-l\">Tab 1</h2>\n<p class=\"govuk-body\">Testing that when you click the anchor it moves to the anchor point successfully</p>\n<p class=\"govuk-body\"><a class=\"govuk-link\" href=\"#anchor\">Anchor</a></p>\n<p class=\"govuk-body\"><a id=\"anchor\" tabIndex=\"0\">Anchor Point</a></p>\n\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"tab-2\">\n <h2 class=\"govuk-heading-l\">Tab 2</h2>\n\n </div>\n \n \n</div>",
|
62
|
+
"hidden": false
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"name": "classes",
|
66
|
+
"options": {
|
67
|
+
"classes": "app-tabs--custom-modifier",
|
68
|
+
"items": [
|
69
|
+
{
|
70
|
+
"label": "Tab 1",
|
71
|
+
"id": "tab-1",
|
72
|
+
"panel": {
|
73
|
+
"text": "Information about tabs"
|
74
|
+
}
|
75
|
+
}
|
76
|
+
]
|
77
|
+
},
|
78
|
+
"html": "<div class=\"govuk-tabs app-tabs--custom-modifier\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\">\n Tab 1\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\">\n Information about tabs\n </div>\n \n \n</div>",
|
79
|
+
"hidden": true
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"name": "id",
|
83
|
+
"options": {
|
84
|
+
"id": "my-tabs",
|
85
|
+
"items": [
|
86
|
+
{
|
87
|
+
"label": "Tab 1",
|
88
|
+
"id": "tab-1",
|
89
|
+
"panel": {
|
90
|
+
"text": "Information about tabs"
|
91
|
+
}
|
92
|
+
}
|
93
|
+
]
|
94
|
+
},
|
95
|
+
"html": "<div id=\"my-tabs\" class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\">\n Tab 1\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\">\n Information about tabs\n </div>\n \n \n</div>",
|
96
|
+
"hidden": true
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"name": "title",
|
100
|
+
"options": {
|
101
|
+
"title": "Custom title for Contents",
|
102
|
+
"items": [
|
103
|
+
{
|
104
|
+
"label": "Tab 1",
|
105
|
+
"id": "tab-1",
|
106
|
+
"panel": {
|
107
|
+
"text": "Information about tabs"
|
108
|
+
}
|
109
|
+
}
|
110
|
+
]
|
111
|
+
},
|
112
|
+
"html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Custom title for Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\">\n Tab 1\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\">\n Information about tabs\n </div>\n \n \n</div>",
|
113
|
+
"hidden": true
|
114
|
+
},
|
115
|
+
{
|
116
|
+
"name": "attributes",
|
117
|
+
"options": {
|
118
|
+
"attributes": {
|
119
|
+
"data-attribute": "my data value"
|
120
|
+
},
|
121
|
+
"items": [
|
122
|
+
{
|
123
|
+
"label": "Tab 1",
|
124
|
+
"id": "tab-1",
|
125
|
+
"panel": {
|
126
|
+
"text": "Information about tabs"
|
127
|
+
}
|
128
|
+
}
|
129
|
+
]
|
130
|
+
},
|
131
|
+
"html": "<div class=\"govuk-tabs\" data-attribute=\"my data value\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\">\n Tab 1\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\">\n Information about tabs\n </div>\n \n \n</div>",
|
132
|
+
"hidden": true
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"name": "item with attributes",
|
136
|
+
"options": {
|
137
|
+
"items": [
|
138
|
+
{
|
139
|
+
"id": "tab-1",
|
140
|
+
"label": "Tab 1",
|
141
|
+
"panel": {
|
142
|
+
"text": "Information about tabs"
|
143
|
+
},
|
144
|
+
"attributes": {
|
145
|
+
"data-attribute": "my-attribute",
|
146
|
+
"data-attribute-2": "my-attribute-2"
|
147
|
+
}
|
148
|
+
}
|
149
|
+
]
|
150
|
+
},
|
151
|
+
"html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\" data-attribute=\"my-attribute\" data-attribute-2=\"my-attribute-2\">\n Tab 1\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\">\n Information about tabs\n </div>\n \n \n</div>",
|
152
|
+
"hidden": true
|
153
|
+
},
|
154
|
+
{
|
155
|
+
"name": "panel with attributes",
|
156
|
+
"options": {
|
157
|
+
"items": [
|
158
|
+
{
|
159
|
+
"id": "tab-1",
|
160
|
+
"label": "Tab 1",
|
161
|
+
"panel": {
|
162
|
+
"text": "Panel text",
|
163
|
+
"attributes": {
|
164
|
+
"data-attribute": "my-attribute",
|
165
|
+
"data-attribute-2": "my-attribute-2"
|
166
|
+
}
|
167
|
+
}
|
168
|
+
}
|
169
|
+
]
|
170
|
+
},
|
171
|
+
"html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\">\n Tab 1\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\" data-attribute=\"my-attribute\" data-attribute-2=\"my-attribute-2\">\n Panel text\n </div>\n \n \n</div>",
|
172
|
+
"hidden": true
|
173
|
+
},
|
174
|
+
{
|
175
|
+
"name": "no item list",
|
176
|
+
"options": {
|
177
|
+
"id": "my-tabs",
|
178
|
+
"classes": "app-tabs--custom-modifier"
|
179
|
+
},
|
180
|
+
"html": "<div id=\"my-tabs\" class=\"govuk-tabs app-tabs--custom-modifier\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n \n</div>",
|
181
|
+
"hidden": true
|
182
|
+
},
|
183
|
+
{
|
184
|
+
"name": "empty item list",
|
185
|
+
"options": {
|
186
|
+
"items": []
|
187
|
+
},
|
188
|
+
"html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n \n</div>",
|
189
|
+
"hidden": true
|
190
|
+
},
|
191
|
+
{
|
192
|
+
"name": "with falsey values",
|
193
|
+
"options": {
|
194
|
+
"items": [
|
195
|
+
{
|
196
|
+
"label": "Tab 1",
|
197
|
+
"id": "tab-1",
|
198
|
+
"panel": {
|
199
|
+
"text": "Panel 1 content"
|
200
|
+
}
|
201
|
+
},
|
202
|
+
null,
|
203
|
+
false,
|
204
|
+
"",
|
205
|
+
{
|
206
|
+
"label": "Tab 2",
|
207
|
+
"id": "tab-2",
|
208
|
+
"panel": {
|
209
|
+
"text": "Panel 2 content"
|
210
|
+
}
|
211
|
+
}
|
212
|
+
]
|
213
|
+
},
|
214
|
+
"html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\">\n Tab 1\n </a>\n </li>\n \n \n \n \n \n \n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-2\">\n Tab 2\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\">\n Panel 1 content\n </div>\n \n \n \n \n \n \n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"tab-2\">\n Panel 2 content\n </div>\n \n \n</div>",
|
215
|
+
"hidden": true
|
216
|
+
},
|
217
|
+
{
|
218
|
+
"name": "idPrefix",
|
219
|
+
"options": {
|
220
|
+
"idPrefix": "custom",
|
221
|
+
"items": [
|
222
|
+
{
|
223
|
+
"label": "Tab 1",
|
224
|
+
"panel": {
|
225
|
+
"text": "Panel 1 content"
|
226
|
+
}
|
227
|
+
},
|
228
|
+
{
|
229
|
+
"label": "Tab 2",
|
230
|
+
"panel": {
|
231
|
+
"text": "Panel 2 content"
|
232
|
+
}
|
233
|
+
}
|
234
|
+
]
|
235
|
+
},
|
236
|
+
"html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#custom-1\">\n Tab 1\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#custom-2\">\n Tab 2\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"custom-1\">\n Panel 1 content\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"custom-2\">\n Panel 2 content\n </div>\n \n \n</div>",
|
237
|
+
"hidden": true
|
238
|
+
},
|
239
|
+
{
|
240
|
+
"name": "html as text",
|
241
|
+
"options": {
|
242
|
+
"items": [
|
243
|
+
{
|
244
|
+
"label": "Tab 1",
|
245
|
+
"id": "tab-1",
|
246
|
+
"panel": {
|
247
|
+
"text": "<p>Panel 1 content</p>"
|
248
|
+
}
|
249
|
+
},
|
250
|
+
{
|
251
|
+
"label": "Tab 2",
|
252
|
+
"id": "tab-2",
|
253
|
+
"panel": {
|
254
|
+
"text": "<p>Panel 2 content</p>"
|
255
|
+
}
|
256
|
+
}
|
257
|
+
]
|
258
|
+
},
|
259
|
+
"html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\">\n Tab 1\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-2\">\n Tab 2\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\">\n <p>Panel 1 content</p>\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"tab-2\">\n <p>Panel 2 content</p>\n </div>\n \n \n</div>",
|
260
|
+
"hidden": true
|
261
|
+
},
|
262
|
+
{
|
263
|
+
"name": "html",
|
264
|
+
"options": {
|
265
|
+
"items": [
|
266
|
+
{
|
267
|
+
"label": "Tab 1",
|
268
|
+
"id": "tab-1",
|
269
|
+
"panel": {
|
270
|
+
"html": "<p>Panel 1 content</p>"
|
271
|
+
}
|
272
|
+
},
|
273
|
+
{
|
274
|
+
"label": "Tab 2",
|
275
|
+
"id": "tab-2",
|
276
|
+
"panel": {
|
277
|
+
"html": "<p>Panel 2 content</p>"
|
278
|
+
}
|
279
|
+
}
|
280
|
+
]
|
281
|
+
},
|
282
|
+
"html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\">\n Tab 1\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-2\">\n Tab 2\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\">\n <p>Panel 1 content</p>\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"tab-2\">\n <p>Panel 2 content</p>\n </div>\n \n \n</div>",
|
283
|
+
"hidden": true
|
284
|
+
}
|
285
|
+
]
|
286
|
+
}
|