govuk_publishing_components 28.2.0 → 28.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics/auto-scroll-tracker.js +2 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics/auto-track-event.js +22 -22
- data/app/assets/javascripts/govuk_publishing_components/analytics/pii.js +9 -5
- data/app/assets/javascripts/govuk_publishing_components/analytics/track-click.js +4 -3
- data/app/assets/javascripts/govuk_publishing_components/analytics/track-select-change.js +4 -3
- data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +21 -291
- data/app/assets/javascripts/govuk_publishing_components/components/button.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/character-count.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +1 -2
- data/app/assets/javascripts/govuk_publishing_components/components/details.js +3 -4
- data/app/assets/javascripts/govuk_publishing_components/components/error-summary.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/layout-header.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/radio.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/skip-link.js +5 -0
- data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +40 -37
- data/app/assets/javascripts/govuk_publishing_components/components/tabs.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/barchart-enhancement.js +4 -3
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +8 -10
- data/app/assets/javascripts/govuk_publishing_components/lib/initial-focus.js +4 -3
- data/app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js +4 -3
- data/app/assets/javascripts/govuk_publishing_components/lib/toggle.js +4 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -329
- data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +5 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +0 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +67 -21
- data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +95 -56
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_accordion.scss +6 -17
- data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +0 -9
- data/app/views/govuk_publishing_components/components/_accordion.html.erb +30 -15
- data/app/views/govuk_publishing_components/components/_action_link.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_big_number.html.erb +12 -8
- data/app/views/govuk_publishing_components/components/_button.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_character_count.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +0 -4
- data/app/views/govuk_publishing_components/components/_details.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_error_message.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_error_summary.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_heading.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_hint.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_inset_text.html.erb +12 -1
- data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +22 -18
- data/app/views/govuk_publishing_components/components/_list.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_modal_dialogue.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_notice.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_print_link.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_search.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_select.html.erb +19 -1
- data/app/views/govuk_publishing_components/components/_share_links.html.erb +25 -22
- data/app/views/govuk_publishing_components/components/_skip_link.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_textarea.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_title.html.erb +3 -3
- data/app/views/govuk_publishing_components/components/docs/accordion.yml +2 -97
- data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +0 -47
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/inset_text.yml +6 -0
- data/app/views/govuk_publishing_components/components/docs/select.yml +12 -0
- data/app/views/govuk_publishing_components/components/docs/share_links.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +13 -13
- data/app/views/govuk_publishing_components/components/docs/tabs.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -1
- data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +26 -0
- data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +14 -8
- data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +11 -11
- data/config/locales/ar.yml +2 -0
- data/config/locales/az.yml +2 -1
- data/config/locales/be.yml +2 -0
- data/config/locales/bg.yml +2 -0
- data/config/locales/bn.yml +2 -0
- data/config/locales/cs.yml +2 -0
- data/config/locales/cy.yml +2 -0
- data/config/locales/da.yml +2 -0
- data/config/locales/de.yml +2 -0
- data/config/locales/dr.yml +2 -0
- data/config/locales/el.yml +2 -0
- data/config/locales/en.yml +0 -4
- data/config/locales/es-419.yml +2 -0
- data/config/locales/es.yml +2 -0
- data/config/locales/et.yml +2 -0
- data/config/locales/fa.yml +2 -1
- data/config/locales/fi.yml +2 -0
- data/config/locales/fr.yml +2 -0
- data/config/locales/gd.yml +2 -0
- data/config/locales/gu.yml +2 -0
- data/config/locales/he.yml +2 -0
- data/config/locales/hi.yml +2 -0
- data/config/locales/hr.yml +2 -0
- data/config/locales/hu.yml +2 -0
- data/config/locales/hy.yml +2 -0
- data/config/locales/id.yml +2 -1
- data/config/locales/is.yml +2 -0
- data/config/locales/it.yml +2 -0
- data/config/locales/ja.yml +2 -1
- data/config/locales/ka.yml +2 -0
- data/config/locales/kk.yml +2 -0
- data/config/locales/ko.yml +2 -1
- data/config/locales/lt.yml +2 -0
- data/config/locales/lv.yml +2 -0
- data/config/locales/ms.yml +2 -1
- data/config/locales/mt.yml +2 -0
- data/config/locales/nl.yml +2 -0
- data/config/locales/no.yml +2 -0
- data/config/locales/pa-pk.yml +2 -0
- data/config/locales/pa.yml +2 -0
- data/config/locales/pl.yml +2 -0
- data/config/locales/ps.yml +2 -0
- data/config/locales/pt.yml +2 -0
- data/config/locales/ro.yml +2 -0
- data/config/locales/ru.yml +2 -0
- data/config/locales/si.yml +2 -0
- data/config/locales/sk.yml +2 -0
- data/config/locales/sl.yml +2 -0
- data/config/locales/so.yml +2 -0
- data/config/locales/sq.yml +2 -0
- data/config/locales/sr.yml +2 -1
- data/config/locales/sv.yml +2 -0
- data/config/locales/sw.yml +2 -0
- data/config/locales/ta.yml +2 -0
- data/config/locales/th.yml +2 -1
- data/config/locales/tk.yml +2 -0
- data/config/locales/tr.yml +2 -0
- data/config/locales/uk.yml +2 -0
- data/config/locales/ur.yml +2 -0
- data/config/locales/uz.yml +2 -0
- data/config/locales/vi.yml +2 -1
- data/config/locales/zh-hk.yml +2 -1
- data/config/locales/zh-tw.yml +2 -1
- data/config/locales/zh.yml +2 -1
- data/lib/govuk_publishing_components/presenters/big_number_helper.rb +30 -0
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +0 -38
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +1 -0
- data/node_modules/govuk-frontend/govuk/all.js +294 -76
- data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +274 -99
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +169 -65
- data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +37 -5
- data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +4 -4
- data/node_modules/govuk-frontend/govuk/components/button/button.js +2 -2
- data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +3 -3
- data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +15 -2
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +8 -10
- data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +52 -15
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +31 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +25 -25
- data/node_modules/govuk-frontend/govuk/components/details/details.js +2 -2
- data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +1 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +8 -8
- data/node_modules/govuk-frontend/govuk/components/error-message/template.njk +2 -2
- data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +24 -3
- data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +25 -16
- data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +6 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/template.njk +2 -1
- data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +4 -4
- data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +3 -37
- data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +119 -15
- data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +6 -0
- data/node_modules/govuk-frontend/govuk/components/footer/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +10 -4
- data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +11 -11
- data/node_modules/govuk-frontend/govuk/components/header/header.js +4 -4
- data/node_modules/govuk-frontend/govuk/components/header/template.njk +4 -3
- data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +1 -3
- data/node_modules/govuk-frontend/govuk/components/input/_index.scss +1 -1
- data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +40 -40
- data/node_modules/govuk-frontend/govuk/components/input/template.njk +4 -3
- data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +499 -2
- data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +2 -2
- data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +0 -8
- data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +44 -45
- data/node_modules/govuk-frontend/govuk/components/radios/radios.js +4 -4
- data/node_modules/govuk-frontend/govuk/components/radios/template.njk +2 -9
- data/node_modules/govuk-frontend/govuk/components/select/_index.scss +6 -1
- data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +3 -3
- data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +13 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +9 -9
- data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +1108 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +20 -23
- data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +86 -1
- data/node_modules/govuk-frontend/govuk/components/summary-list/template.njk +1 -4
- data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +2 -2
- data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +2 -2
- data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -5
- data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +2 -2
- data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +1 -1
- data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +4 -4
- data/node_modules/govuk-frontend/govuk/core/_all.scss +0 -1
- data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +0 -6
- data/node_modules/govuk-frontend/govuk/core/_links.scss +0 -6
- data/node_modules/govuk-frontend/govuk/core/_lists.scss +0 -6
- data/node_modules/govuk-frontend/govuk/core/_section-break.scss +0 -6
- data/node_modules/govuk-frontend/govuk/core/_typography.scss +0 -6
- data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
- data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +15 -30
- data/node_modules/govuk-frontend/govuk/{core → objects}/_template.scss +1 -5
- data/node_modules/govuk-frontend/govuk/overrides/_display.scss +0 -6
- data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +0 -6
- data/node_modules/govuk-frontend/govuk/overrides/_text-align.scss +0 -6
- data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +0 -6
- data/node_modules/govuk-frontend/govuk/overrides/_width.scss +0 -6
- data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
- data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +0 -10
- data/node_modules/govuk-frontend/govuk/tools/_all.scss +0 -1
- data/node_modules/govuk-frontend/package.json +1 -1
- metadata +11 -16
- data/app/views/govuk_publishing_components/components/contextual_sidebar/_covid_cta.html.erb +0 -27
- data/node_modules/govuk-frontend/govuk/tools/_iff.scss +0 -17
@@ -6,6 +6,7 @@ $chevron-indent-spacing: 7px;
|
|
6
6
|
$black-bar-height: 50px;
|
7
7
|
$search-width-or-height: $black-bar-height;
|
8
8
|
$pseudo-underline-height: 3px;
|
9
|
+
$button-pipe-colour: darken(govuk-colour("mid-grey"), 20%);
|
9
10
|
|
10
11
|
@mixin chevron($colour, $update: false) {
|
11
12
|
@if ($update == true) {
|
@@ -18,7 +19,7 @@ $pseudo-underline-height: 3px;
|
|
18
19
|
content: "";
|
19
20
|
display: inline-block;
|
20
21
|
height: 8px;
|
21
|
-
margin: 0
|
22
|
+
margin: 0 10px 0 2px;
|
22
23
|
vertical-align: middle;
|
23
24
|
width: 8px;
|
24
25
|
}
|
@@ -172,6 +173,15 @@ $pseudo-underline-height: 3px;
|
|
172
173
|
@include govuk-media-query($from: "desktop") {
|
173
174
|
border-bottom: 0;
|
174
175
|
padding: 0;
|
176
|
+
|
177
|
+
&:first-of-type {
|
178
|
+
margin-right: -1px;
|
179
|
+
|
180
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
|
181
|
+
border-left: 1px solid $button-pipe-colour;
|
182
|
+
border-right: 1px solid $button-pipe-colour;
|
183
|
+
}
|
184
|
+
}
|
175
185
|
}
|
176
186
|
}
|
177
187
|
|
@@ -313,22 +323,28 @@ $pseudo-underline-height: 3px;
|
|
313
323
|
padding: 0;
|
314
324
|
|
315
325
|
@include focus-not-focus-visible {
|
316
|
-
|
317
|
-
|
326
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
|
327
|
+
&:before {
|
328
|
+
@include chevron($govuk-link-colour);
|
329
|
+
}
|
318
330
|
}
|
319
331
|
}
|
320
332
|
|
321
333
|
@include focus-not-focus-visible {
|
322
334
|
&:hover {
|
323
|
-
|
324
|
-
|
335
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
|
336
|
+
&:before {
|
337
|
+
@include chevron($govuk-link-hover-colour, true);
|
338
|
+
}
|
325
339
|
}
|
326
340
|
}
|
327
341
|
}
|
328
342
|
|
329
343
|
&:focus {
|
330
|
-
|
331
|
-
|
344
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
|
345
|
+
&:before {
|
346
|
+
@include chevron($govuk-focus-text-colour, true);
|
347
|
+
}
|
332
348
|
}
|
333
349
|
}
|
334
350
|
|
@@ -345,12 +361,15 @@ $pseudo-underline-height: 3px;
|
|
345
361
|
font-size: govuk-px-to-rem(16px);
|
346
362
|
}
|
347
363
|
height: $black-bar-height;
|
348
|
-
padding: govuk-spacing(3) govuk-spacing(6) govuk-spacing(3) govuk-spacing(5);
|
349
364
|
position: relative;
|
350
365
|
text-decoration: none;
|
351
366
|
|
352
|
-
|
353
|
-
|
367
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
|
368
|
+
border-color: $button-pipe-colour;
|
369
|
+
|
370
|
+
&:before {
|
371
|
+
@include chevron(govuk-colour("white"), true);
|
372
|
+
}
|
354
373
|
}
|
355
374
|
}
|
356
375
|
@include focus-not-focus-visible {
|
@@ -362,8 +381,12 @@ $pseudo-underline-height: 3px;
|
|
362
381
|
background: govuk-colour("mid-grey");
|
363
382
|
}
|
364
383
|
|
365
|
-
|
366
|
-
|
384
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
|
385
|
+
border-color: $button-pipe-colour;
|
386
|
+
|
387
|
+
&:before {
|
388
|
+
@include chevron($button-pipe-colour, true);
|
389
|
+
}
|
367
390
|
}
|
368
391
|
}
|
369
392
|
}
|
@@ -375,16 +398,22 @@ $pseudo-underline-height: 3px;
|
|
375
398
|
background: $govuk-focus-text-colour;
|
376
399
|
}
|
377
400
|
|
378
|
-
|
379
|
-
|
401
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
|
402
|
+
border-color: $govuk-focus-colour;
|
403
|
+
|
404
|
+
&:before {
|
405
|
+
@include chevron($govuk-focus-text-colour, true);
|
406
|
+
}
|
380
407
|
}
|
381
408
|
}
|
382
409
|
}
|
383
410
|
|
384
411
|
&.gem-c-layout-super-navigation-header__open-button {
|
385
412
|
@include focus-not-focus-visible {
|
386
|
-
|
387
|
-
|
413
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
|
414
|
+
&:before {
|
415
|
+
@include prefixed-transform($rotate: 225deg, $translateY: 1px);
|
416
|
+
}
|
388
417
|
}
|
389
418
|
}
|
390
419
|
|
@@ -393,8 +422,13 @@ $pseudo-underline-height: 3px;
|
|
393
422
|
background: govuk-colour("light-grey");
|
394
423
|
color: $govuk-link-colour;
|
395
424
|
|
396
|
-
|
397
|
-
|
425
|
+
// stylelint-disable max-nesting-depth
|
426
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
|
427
|
+
border-color: govuk-colour("light-grey");
|
428
|
+
|
429
|
+
&:before {
|
430
|
+
@include chevron($govuk-link-colour, true);
|
431
|
+
}
|
398
432
|
}
|
399
433
|
|
400
434
|
&:after {
|
@@ -406,8 +440,12 @@ $pseudo-underline-height: 3px;
|
|
406
440
|
background-color: $govuk-focus-colour;
|
407
441
|
color: $govuk-focus-text-colour;
|
408
442
|
|
409
|
-
|
410
|
-
|
443
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
|
444
|
+
border-color: $govuk-focus-colour;
|
445
|
+
|
446
|
+
&:before {
|
447
|
+
@include chevron($govuk-focus-text-colour, true);
|
448
|
+
}
|
411
449
|
}
|
412
450
|
|
413
451
|
&:after {
|
@@ -416,12 +454,20 @@ $pseudo-underline-height: 3px;
|
|
416
454
|
}
|
417
455
|
}
|
418
456
|
}
|
457
|
+
// stylelint-enable max-nesting-depth
|
419
458
|
|
420
459
|
.js-module-initialised & {
|
421
460
|
@include govuk-link-style-no-underline;
|
422
461
|
}
|
423
462
|
}
|
424
463
|
|
464
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
|
465
|
+
@include govuk-media-query($from: "desktop") {
|
466
|
+
display: inline-block;
|
467
|
+
padding: govuk-spacing(2) govuk-spacing(6) govuk-spacing(2) govuk-spacing(5);
|
468
|
+
}
|
469
|
+
}
|
470
|
+
|
425
471
|
// Search link and dropdown.
|
426
472
|
.gem-c-layout-super-navigation-header__search-item-link {
|
427
473
|
&:link,
|
@@ -550,7 +596,7 @@ $pseudo-underline-height: 3px;
|
|
550
596
|
box-shadow: none;
|
551
597
|
|
552
598
|
.gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
|
553
|
-
border-color:
|
599
|
+
border-color: $button-pipe-colour;
|
554
600
|
color: govuk-colour("white");
|
555
601
|
|
556
602
|
@include govuk-media-query($from: 360px) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
$share-button-width:
|
2
|
-
$share-button-height:
|
1
|
+
$share-button-width: 30px;
|
2
|
+
$share-button-height: 30px;
|
3
3
|
|
4
4
|
.gem-c-share-links__list {
|
5
5
|
list-style: none;
|
@@ -12,11 +12,11 @@ $share-button-height: 32px;
|
|
12
12
|
position: relative;
|
13
13
|
display: inline-block;
|
14
14
|
min-height: $share-button-height;
|
15
|
+
padding-top: govuk-spacing(1);
|
15
16
|
padding-left: ($share-button-width + govuk-spacing(2));
|
16
17
|
padding-right: govuk-spacing(2);
|
17
18
|
margin-bottom: govuk-spacing(2);
|
18
19
|
font-size: $share-button-height / 2;
|
19
|
-
line-height: $share-button-height;
|
20
20
|
}
|
21
21
|
|
22
22
|
.gem-c-share-links__link {
|
@@ -63,6 +63,54 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
|
|
63
63
|
padding: 3px 3px 0 0;
|
64
64
|
}
|
65
65
|
|
66
|
+
.gem-c-step-nav____title-text-focus {
|
67
|
+
margin-bottom: 13px;
|
68
|
+
display: inline-block;
|
69
|
+
}
|
70
|
+
|
71
|
+
// Create Chevron icon aligned with text
|
72
|
+
.gem-c-step-nav__chevron {
|
73
|
+
box-sizing: border-box;
|
74
|
+
display: inline-block;
|
75
|
+
position: relative;
|
76
|
+
// Set size using rems to make the icon scale with text if user resizes text in their browser
|
77
|
+
width: govuk-px-to-rem(20px);
|
78
|
+
height: govuk-px-to-rem(20px);
|
79
|
+
border: govuk-px-to-rem(1px) solid;
|
80
|
+
border-radius: 50%;
|
81
|
+
|
82
|
+
vertical-align: text-top;
|
83
|
+
|
84
|
+
// Reduce size, alter alignment
|
85
|
+
.gem-c-step-nav--large & {
|
86
|
+
vertical-align: top;
|
87
|
+
}
|
88
|
+
|
89
|
+
// Create inner chevron arrow
|
90
|
+
&:after {
|
91
|
+
content: "";
|
92
|
+
box-sizing: border-box;
|
93
|
+
display: block;
|
94
|
+
position: absolute;
|
95
|
+
bottom: govuk-px-to-rem(5px);
|
96
|
+
left: govuk-px-to-rem(6px);
|
97
|
+
width: govuk-px-to-rem(6px);
|
98
|
+
height: govuk-px-to-rem(6px);
|
99
|
+
-webkit-transform: rotate(-45deg); /* Ch <36, Saf 5.1+, iOS < 9.2, An =<4.4.4 */
|
100
|
+
-ms-transform: rotate(-45deg); /* IE 9 */
|
101
|
+
transform: rotate(-45deg);
|
102
|
+
border-top: govuk-px-to-rem(2px) solid;
|
103
|
+
border-right: govuk-px-to-rem(2px) solid;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
// Rotate icon to create "Down" version
|
108
|
+
.gem-c-step-nav__chevron--down {
|
109
|
+
-webkit-transform: rotate(180deg); /* Ch <36, Saf 5.1+, iOS < 9.2, An =<4.4.4 */
|
110
|
+
-ms-transform: rotate(180deg); /* IE 9 */
|
111
|
+
transform: rotate(180deg);
|
112
|
+
}
|
113
|
+
|
66
114
|
.gem-c-step-nav__button {
|
67
115
|
color: $govuk-link-colour;
|
68
116
|
cursor: pointer;
|
@@ -70,8 +118,43 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
|
|
70
118
|
border: 0;
|
71
119
|
margin: 0;
|
72
120
|
|
121
|
+
&:hover {
|
122
|
+
background: govuk-colour("light-grey");
|
123
|
+
// Chevron icon interaction states
|
124
|
+
.gem-c-step-nav__chevron {
|
125
|
+
color: govuk-colour("black");
|
126
|
+
background: govuk-colour("black");
|
127
|
+
}
|
128
|
+
|
129
|
+
.gem-c-step-nav__chevron:after {
|
130
|
+
color: govuk-colour("light-grey");
|
131
|
+
}
|
132
|
+
|
133
|
+
.gem-c-step-nav__button-text {
|
134
|
+
color: $govuk-text-colour;
|
135
|
+
}
|
136
|
+
}
|
137
|
+
|
73
138
|
&:focus {
|
74
|
-
|
139
|
+
outline: 0;
|
140
|
+
// Chevron icon interaction states
|
141
|
+
.gem-c-step-nav__chevron {
|
142
|
+
color: govuk-colour("black");
|
143
|
+
background: govuk-colour("black");
|
144
|
+
}
|
145
|
+
|
146
|
+
.gem-c-step-nav__chevron:after {
|
147
|
+
color: $govuk-focus-colour;
|
148
|
+
}
|
149
|
+
|
150
|
+
.gem-c-step-nav____title-text-focus,
|
151
|
+
.gem-c-step-nav__toggle-link-focus {
|
152
|
+
@include govuk-focused-text;
|
153
|
+
}
|
154
|
+
|
155
|
+
.gem-c-step-nav__toggle-link-focus {
|
156
|
+
padding-bottom: 2px;
|
157
|
+
}
|
75
158
|
}
|
76
159
|
}
|
77
160
|
|
@@ -90,42 +173,27 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
|
|
90
173
|
width: 100%;
|
91
174
|
|
92
175
|
.gem-c-step-nav--large & {
|
93
|
-
@include step-nav-font(19, $tablet-size: 24, $weight: bold
|
176
|
+
@include step-nav-font(19, $tablet-size: 24, $weight: bold);
|
94
177
|
|
95
178
|
@include govuk-media_query($from: tablet) {
|
96
179
|
padding-top: govuk-spacing(2);
|
97
180
|
}
|
98
181
|
}
|
99
|
-
|
100
|
-
&:focus {
|
101
|
-
box-shadow: 0 -4px govuk-colour("black");
|
102
|
-
|
103
|
-
.gem-c-step-nav__toggle-link {
|
104
|
-
color: govuk-colour("black");
|
105
|
-
}
|
106
|
-
|
107
|
-
@include step-nav-chevron-focus-state;
|
108
|
-
}
|
109
182
|
}
|
110
183
|
|
111
184
|
.gem-c-step-nav__button--controls {
|
112
|
-
@include step-nav-font(
|
185
|
+
@include step-nav-font(15);
|
113
186
|
position: relative;
|
114
187
|
z-index: 1; // this and relative position stops focus outline underlap with border of accordion
|
115
|
-
margin: .5em 0
|
116
|
-
padding:
|
117
|
-
|
118
|
-
&:hover .gem-c-step-nav__button-text {
|
119
|
-
@include govuk-link-decoration;
|
120
|
-
@include govuk-link-hover-decoration;
|
121
|
-
}
|
188
|
+
margin: .5em 0 14px;
|
189
|
+
padding: govuk-spacing(1) 0 govuk-spacing(1);
|
122
190
|
|
123
191
|
.gem-c-step-nav--large & {
|
124
|
-
@include step-nav-font(
|
192
|
+
@include step-nav-font(15, $tablet-size: 19);
|
125
193
|
}
|
126
194
|
|
127
195
|
&:focus {
|
128
|
-
@include
|
196
|
+
@include govuk-focused-text;
|
129
197
|
|
130
198
|
.gem-c-step-nav__button-text {
|
131
199
|
text-decoration: none;
|
@@ -133,32 +201,15 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
|
|
133
201
|
}
|
134
202
|
}
|
135
203
|
|
136
|
-
.gem-c-step-nav__title-text {
|
137
|
-
display: block;
|
138
|
-
margin-bottom: govuk-spacing(1);
|
139
|
-
}
|
140
|
-
|
141
|
-
.gem-c-step-nav__chevron {
|
142
|
-
display: inline-block;
|
143
|
-
vertical-align: middle;
|
144
|
-
margin-left: govuk-em(5, 14);
|
145
|
-
|
146
|
-
.gem-c-step-nav--large & {
|
147
|
-
margin-left: govuk-em(5, 16);
|
148
|
-
}
|
149
|
-
|
150
|
-
svg {
|
151
|
-
pointer-events: none;
|
152
|
-
}
|
153
|
-
}
|
154
|
-
|
155
204
|
.gem-c-step-nav__button-text {
|
156
205
|
display: inline-block;
|
157
206
|
text-align: left;
|
158
207
|
min-width: govuk-em(35, 14);
|
208
|
+
margin-left: govuk-spacing(1);
|
159
209
|
|
160
210
|
.gem-c-step-nav--large & {
|
161
211
|
min-width: govuk-em(40, 16);
|
212
|
+
margin-left: govuk-spacing(1);
|
162
213
|
}
|
163
214
|
}
|
164
215
|
|
@@ -272,7 +323,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
|
|
272
323
|
border: solid $stroke-width govuk-colour("mid-grey", $legacy: "grey-2");
|
273
324
|
|
274
325
|
.gem-c-step-nav--large & {
|
275
|
-
@include step-nav-font(16, $tablet-size: 19, $weight: bold, $line-height:
|
326
|
+
@include step-nav-font(16, $tablet-size: 19, $weight: bold, $line-height: 29px, $tablet-line-height: 34px);
|
276
327
|
}
|
277
328
|
|
278
329
|
.gem-c-step-nav__step--active & {
|
@@ -335,18 +386,6 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
|
|
335
386
|
.gem-c-step-nav--active & {
|
336
387
|
cursor: pointer;
|
337
388
|
}
|
338
|
-
|
339
|
-
&:hover {
|
340
|
-
.gem-c-step-nav__button:not(:focus),
|
341
|
-
.gem-c-step-nav__circle {
|
342
|
-
color: $govuk-link-colour;
|
343
|
-
}
|
344
|
-
|
345
|
-
.gem-c-step-nav__button-text {
|
346
|
-
@include govuk-link-decoration;
|
347
|
-
@include govuk-link-hover-decoration;
|
348
|
-
}
|
349
|
-
}
|
350
389
|
}
|
351
390
|
|
352
391
|
.gem-c-step-nav__title {
|
@@ -360,14 +399,14 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
|
|
360
399
|
}
|
361
400
|
|
362
401
|
.gem-c-step-nav__toggle-link {
|
363
|
-
@include step-nav-font(
|
402
|
+
@include step-nav-font(15, $line-height: 1.2);
|
364
403
|
display: block;
|
365
404
|
color: $govuk-link-colour;
|
366
405
|
text-transform: capitalize;
|
367
406
|
padding-bottom: govuk-spacing(6);
|
368
407
|
|
369
408
|
.gem-c-step-nav--large & {
|
370
|
-
@include step-nav-font(
|
409
|
+
@include step-nav-font(15, $tablet-size: 19, $line-height: 1.2);
|
371
410
|
}
|
372
411
|
}
|
373
412
|
|
@@ -6,34 +6,23 @@
|
|
6
6
|
@import "../accordion";
|
7
7
|
|
8
8
|
// Open all of the accordion sections.
|
9
|
-
.
|
9
|
+
.govuk-accordion__section-content {
|
10
10
|
display: block !important; // stylelint-disable-line declaration-no-important
|
11
11
|
}
|
12
12
|
|
13
13
|
// Change the colour from the blue link colour to black.
|
14
|
-
.
|
14
|
+
.govuk-accordion__section-button {
|
15
15
|
color: govuk-colour("black") !important; // stylelint-disable-line declaration-no-important
|
16
16
|
}
|
17
17
|
|
18
|
-
// Removing spacing
|
19
|
-
.gem-c-accordion__section-header {
|
20
|
-
padding-bottom: govuk-spacing(1);
|
21
|
-
}
|
22
|
-
|
23
18
|
// Change the summary subheading size.
|
24
|
-
.
|
19
|
+
.govuk-accordion__section-summary {
|
25
20
|
@include govuk-typography-common;
|
26
21
|
@include govuk-typography-responsive($size: 16, $important: true);
|
27
22
|
}
|
28
23
|
|
29
|
-
// Hide the unusable "
|
30
|
-
.
|
31
|
-
.
|
32
|
-
.gem-c-accordion__toggle-link {
|
33
|
-
display: none !important; // stylelint-disable-line declaration-no-important
|
34
|
-
}
|
35
|
-
|
36
|
-
// Hide all hidden content
|
37
|
-
.gem-c-accordion .govuk-visually-hidden {
|
24
|
+
// Hide the unusable "Open all" button and the "+" icons.
|
25
|
+
.govuk-accordion__open-all,
|
26
|
+
.govuk-accordion__icon {
|
38
27
|
display: none !important; // stylelint-disable-line declaration-no-important
|
39
28
|
}
|
@@ -17,12 +17,3 @@ $gem-quiet-button-colour: govuk-colour("dark-grey", $legacy: "grey-1");
|
|
17
17
|
$gem-quiet-button-hover-colour: darken($gem-quiet-button-colour, 5%);
|
18
18
|
|
19
19
|
$gem-hover-dark-background: #dddcdb;
|
20
|
-
|
21
|
-
$govuk-colours-organisations: map-merge(
|
22
|
-
$govuk-colours-organisations,
|
23
|
-
(
|
24
|
-
"department-for-levelling-up-housing-and-communities": (
|
25
|
-
colour: #012169,
|
26
|
-
),
|
27
|
-
)
|
28
|
-
);
|
@@ -4,11 +4,9 @@
|
|
4
4
|
|
5
5
|
id ||= "default-id-#{SecureRandom.hex(4)}"
|
6
6
|
items ||= []
|
7
|
-
condensed ||= false
|
8
7
|
anchor_navigation ||= false
|
9
8
|
|
10
|
-
accordion_classes = %w(gem-c-accordion)
|
11
|
-
accordion_classes << 'gem-c-accordion--condensed' if condensed
|
9
|
+
accordion_classes = %w(gem-c-accordion govuk-accordion)
|
12
10
|
accordion_classes << (shared_helper.get_margin_bottom)
|
13
11
|
|
14
12
|
translations = {
|
@@ -22,7 +20,7 @@
|
|
22
20
|
locales = {}
|
23
21
|
|
24
22
|
data_attributes ||= {}
|
25
|
-
data_attributes[:module] = 'gem-accordion'
|
23
|
+
data_attributes[:module] = 'govuk-accordion gem-accordion'
|
26
24
|
data_attributes[:anchor_navigation] = anchor_navigation
|
27
25
|
|
28
26
|
translations.each do |key, translation|
|
@@ -39,27 +37,44 @@
|
|
39
37
|
data_attributes[:locale] = unique_locales[0]
|
40
38
|
end
|
41
39
|
end
|
40
|
+
|
42
41
|
%>
|
43
42
|
<% if items.any? %>
|
44
43
|
<%= tag.div(class: accordion_classes, id: id, data: data_attributes) do %>
|
45
44
|
<% items.each_with_index do |item, i| %>
|
46
45
|
<%
|
46
|
+
# The GOVUK Frontend JavaScript for this component
|
47
|
+
# uses a loop starting at 1 for accessing heading ID values,
|
48
|
+
# hence the increment below
|
47
49
|
index = i + 1
|
48
50
|
|
49
|
-
|
50
|
-
section_classes << 'gem-c-accordion__section--expanded' if item[:expanded]
|
51
|
+
item[:data_attributes] ||= nil
|
51
52
|
|
52
|
-
|
53
|
-
|
53
|
+
section_classes = %w(govuk-accordion__section)
|
54
|
+
section_classes << 'govuk-accordion__section--expanded' if item[:expanded]
|
54
55
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
summary_classes = %w(govuk-accordion__section-summary govuk-body)
|
57
|
+
%>
|
58
|
+
<%= tag.div(class: section_classes) do %>
|
59
|
+
<%= tag.div(class: "govuk-accordion__section-header") do %>
|
60
|
+
<%=
|
61
|
+
content_tag(
|
62
|
+
shared_helper.get_heading_level,
|
63
|
+
content_tag(
|
64
|
+
'span',
|
65
|
+
item[:heading][:text],
|
66
|
+
class: "govuk-accordion__section-button",
|
67
|
+
id: "#{id}-heading-#{index}"
|
68
|
+
|
69
|
+
),
|
70
|
+
class: "govuk-accordion__section-heading",
|
71
|
+
id: item[:heading][:id],
|
72
|
+
data: item[:data_attributes]
|
73
|
+
)
|
74
|
+
%>
|
60
75
|
<%= tag.div(item[:summary][:text], id: "#{id}-summary-#{index}", class: summary_classes) if item[:summary].present? %>
|
61
|
-
|
62
|
-
<%= tag.div(item[:content][:html], id: "#{id}-content-#{index}", class: "
|
76
|
+
<% end %>
|
77
|
+
<%= tag.div(item[:content][:html], id: "#{id}-content-#{index}", class: "govuk-accordion__section-content", 'aria-labelledby': "#{id}-heading-#{index}") %>
|
63
78
|
<% end %>
|
64
79
|
<% end %>
|
65
80
|
<% end %>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
css_classes << "gem-c-action-link--simple-light" if simple_light
|
34
34
|
css_classes << "gem-c-action-link--with-subtext" if subtext
|
35
35
|
css_classes << "gem-c-action-link--mobile-subtext" if mobile_subtext
|
36
|
-
css_classes <<
|
36
|
+
css_classes << shared_helper.get_margin_bottom
|
37
37
|
|
38
38
|
link_classes = %w(govuk-link gem-c-action-link__link)
|
39
39
|
link_classes << shared_helper.classes if classes
|
@@ -1,7 +1,8 @@
|
|
1
1
|
<%
|
2
2
|
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
3
|
+
big_number_helper = GovukPublishingComponents::Presenters::BigNumberHelper.new(local_assigns)
|
3
4
|
|
4
|
-
number ||=
|
5
|
+
number ||= false
|
5
6
|
label ||= nil
|
6
7
|
href ||= nil
|
7
8
|
data_attributes ||= nil
|
@@ -9,17 +10,20 @@
|
|
9
10
|
classes = ["gem-c-big-number"]
|
10
11
|
classes << shared_helper.get_margin_bottom
|
11
12
|
|
12
|
-
value_classes =
|
13
|
-
|
14
|
-
if label.nil? && href
|
15
|
-
value_classes << "gem-c-big-number__value--decorated"
|
16
|
-
end
|
17
|
-
|
13
|
+
value_classes = big_number_helper.value_classes
|
18
14
|
%>
|
19
15
|
<% if number %>
|
20
16
|
<% big_number_value = capture do %>
|
21
17
|
<%= tag.span class: value_classes, data: href ? nil : data_attributes do %>
|
22
|
-
|
18
|
+
<%
|
19
|
+
# The below check is to account for small symbols awkwardly sitting above the baseline in our typeface and adjust them to sit at the baseline for the purpose of visual harmony
|
20
|
+
# Currently the only small symbol used with big numbers are pluses so they are specifically applied in the below code
|
21
|
+
%>
|
22
|
+
<% if big_number_helper.number_has_plus_suffix? %>
|
23
|
+
<%= number[0...-1] %><%= tag.span "+", class: "gem-c-big-number__suffix" %>
|
24
|
+
<% else %>
|
25
|
+
<%= number %>
|
26
|
+
<% end %>
|
23
27
|
<% end %>
|
24
28
|
|
25
29
|
<% unless label.nil? %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<% start_button_text = capture do %>
|
9
9
|
<%= button.text %>
|
10
|
-
<svg class="govuk-button__start-icon govuk-!-display-none-print" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40"
|
10
|
+
<svg class="govuk-button__start-icon govuk-!-display-none-print" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" focusable="false" aria-hidden="true">
|
11
11
|
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z" />
|
12
12
|
</svg>
|
13
13
|
<% end %>
|
@@ -17,8 +17,8 @@
|
|
17
17
|
|
18
18
|
<%= render "govuk_publishing_components/components/textarea", { id: id, character_count: true }.merge(textarea.symbolize_keys) %>
|
19
19
|
|
20
|
-
<
|
20
|
+
<div id="<%= id %>-info" class="govuk-hint govuk-character-count__message" aria-live="polite">
|
21
21
|
<%= t("components.character_count.body", number: maxlength || maxwords, type: maxwords ? t("components.character_count.type.words") : t("components.character_count.type.characters")) %>
|
22
|
-
</
|
22
|
+
</div>
|
23
23
|
<% end %>
|
24
24
|
<% end %>
|
@@ -15,11 +15,11 @@
|
|
15
15
|
<% end %>
|
16
16
|
|
17
17
|
<% if cb_helper.hint_text %>
|
18
|
-
<%= tag.
|
18
|
+
<%= tag.div cb_helper.hint_text, id: "#{id}-hint", class: "govuk-hint" %>
|
19
19
|
<% end %>
|
20
20
|
|
21
21
|
<% if cb_helper.error %>
|
22
|
-
<%= tag.
|
22
|
+
<%= tag.p error, id: "#{id}-error", class: "govuk-error-message" %>
|
23
23
|
<% end %>
|
24
24
|
|
25
25
|
<%= tag.ul class: cb_helper.list_classes, data: {
|
@@ -27,8 +27,4 @@
|
|
27
27
|
<% if navigation.show_brexit_cta? %>
|
28
28
|
<%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta', content_item: content_item %>
|
29
29
|
<% end %>
|
30
|
-
|
31
|
-
<% if navigation.show_covid_booster_cta? %>
|
32
|
-
<%= render 'govuk_publishing_components/components/contextual_sidebar/covid_cta', content_item: content_item %>
|
33
|
-
<% end %>
|
34
30
|
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
open ||= nil
|
5
5
|
margin_bottom ||= 3
|
6
6
|
css_classes = %w(gem-c-details govuk-details)
|
7
|
-
css_classes <<
|
7
|
+
css_classes << shared_helper.get_margin_bottom
|
8
8
|
|
9
9
|
details_data_attributes = {}
|
10
10
|
details_data_attributes[:module] = 'govuk-details gem-details'
|