govuk_publishing_components 23.15.0 → 24.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/scroll-tracker.js +28 -0
  3. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +330 -4
  4. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +26 -10
  5. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +23 -14
  6. data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills/common.js +8 -0
  7. data/app/assets/stylesheets/component_guide/application.scss +0 -8
  8. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -1
  9. data/app/assets/stylesheets/govuk_publishing_components/component_support.scss +0 -2
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +298 -14
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +7 -87
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_error-alert.scss +4 -4
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +21 -5
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +105 -48
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +8 -8
  16. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +0 -5
  17. data/app/assets/stylesheets/govuk_publishing_components/components/print/_accordion.scss +17 -9
  18. data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav.scss +2 -2
  19. data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +1 -11
  20. data/app/models/govuk_publishing_components/audit_applications.rb +1 -1
  21. data/app/views/govuk_publishing_components/audit/show.html.erb +211 -199
  22. data/app/views/govuk_publishing_components/components/_accordion.html.erb +15 -22
  23. data/app/views/govuk_publishing_components/components/_attachment.html.erb +3 -3
  24. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +47 -36
  25. data/app/views/govuk_publishing_components/components/_document_list.html.erb +10 -1
  26. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +1 -1
  27. data/app/views/govuk_publishing_components/components/attachment/{_thumbnail_document.svg → _thumbnail_document.html.erb} +0 -0
  28. data/app/views/govuk_publishing_components/components/attachment/{_thumbnail_generic.svg → _thumbnail_generic.html.erb} +0 -0
  29. data/app/views/govuk_publishing_components/components/attachment/{_thumbnail_spreadsheet.svg → _thumbnail_spreadsheet.html.erb} +0 -0
  30. data/app/views/govuk_publishing_components/components/docs/accordion.yml +37 -3
  31. data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +5 -0
  32. data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +9 -0
  33. data/app/views/govuk_publishing_components/components/docs/document_list.yml +18 -0
  34. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +3 -3
  35. data/app/views/govuk_publishing_components/components/layout_header/_header_logo.html.erb +1 -1
  36. data/config/initializers/assets.rb +0 -1
  37. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +61 -2
  38. data/lib/govuk_publishing_components/version.rb +1 -1
  39. data/node_modules/govuk-frontend/govuk/all.js +1 -1
  40. data/node_modules/govuk-frontend/govuk/components/_all.scss +1 -0
  41. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +10 -10
  42. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/template.njk +2 -2
  43. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +2 -0
  44. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +1 -0
  45. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1 -1
  46. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +13 -0
  47. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  48. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
  49. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +425 -0
  50. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +132 -0
  51. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro.njk +3 -0
  52. data/node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk +63 -0
  53. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +2 -2
  54. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +18 -18
  55. data/node_modules/govuk-frontend/govuk/components/header/template.njk +4 -4
  56. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +21 -0
  57. data/node_modules/govuk-frontend/govuk/components/table/macro-options.json +2 -2
  58. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  59. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +94 -0
  60. data/node_modules/govuk-frontend/package.json +1 -1
  61. metadata +13 -20
  62. data/app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small-focus.svg +0 -4
  63. data/app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small.svg +0 -4
  64. data/app/assets/javascripts/govuk_publishing_components/components/header.js +0 -8
  65. data/app/assets/javascripts/govuk_publishing_components/lib/auto-track-event.js +0 -31
  66. data/app/assets/stylesheets/govuk_publishing_components/components/_chevron-banner.scss +0 -138
  67. data/app/assets/stylesheets/govuk_publishing_components/components/_list.scss +0 -1
  68. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_variables.scss +0 -27
  69. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_back-arrow.scss +0 -13
  70. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_clearfix.scss +0 -8
  71. data/app/views/govuk_publishing_components/components/_chevron_banner.html.erb +0 -19
  72. data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +0 -85
  73. data/app/views/govuk_publishing_components/components/_translation-nav.html.erb +0 -33
  74. data/app/views/govuk_publishing_components/components/docs/chevron_banner.yml +0 -33
  75. data/app/views/govuk_publishing_components/components/docs/subscription-links.yml +0 -103
  76. data/app/views/govuk_publishing_components/components/docs/translation-nav.yml +0 -139
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "govuk-frontend",
3
3
  "description": "GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.",
4
- "version": "3.10.2",
4
+ "version": "3.11.0",
5
5
  "main": "govuk/all.js",
6
6
  "sass": "govuk/all.scss",
7
7
  "engines": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 23.15.0
4
+ version: 24.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-05 00:00:00.000000000 Z
11
+ date: 2021-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -325,8 +325,6 @@ files:
325
325
  - app/assets/images/govuk_publishing_components/action-link-arrow--transparent.svg
326
326
  - app/assets/images/govuk_publishing_components/action-link-arrow.png
327
327
  - app/assets/images/govuk_publishing_components/action-link-arrow.svg
328
- - app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small-focus.svg
329
- - app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small.svg
330
328
  - app/assets/images/govuk_publishing_components/crests/bis_crest_13px.png
331
329
  - app/assets/images/govuk_publishing_components/crests/bis_crest_13px_x2-2.png
332
330
  - app/assets/images/govuk_publishing_components/crests/bis_crest_13px_x2.png
@@ -428,7 +426,6 @@ files:
428
426
  - app/assets/javascripts/govuk_publishing_components/components/error-summary.js
429
427
  - app/assets/javascripts/govuk_publishing_components/components/feedback.js
430
428
  - app/assets/javascripts/govuk_publishing_components/components/govspeak.js
431
- - app/assets/javascripts/govuk_publishing_components/components/header.js
432
429
  - app/assets/javascripts/govuk_publishing_components/components/layout-header.js
433
430
  - app/assets/javascripts/govuk_publishing_components/components/modal-dialogue.js
434
431
  - app/assets/javascripts/govuk_publishing_components/components/print-link.js
@@ -439,7 +436,6 @@ files:
439
436
  - app/assets/javascripts/govuk_publishing_components/dependencies.js
440
437
  - app/assets/javascripts/govuk_publishing_components/ie.js
441
438
  - app/assets/javascripts/govuk_publishing_components/lib.js
442
- - app/assets/javascripts/govuk_publishing_components/lib/auto-track-event.js
443
439
  - app/assets/javascripts/govuk_publishing_components/lib/cookie-functions.js
444
440
  - app/assets/javascripts/govuk_publishing_components/lib/current-location.js
445
441
  - app/assets/javascripts/govuk_publishing_components/lib/govspeak/barchart-enhancement.js
@@ -457,6 +453,7 @@ files:
457
453
  - app/assets/javascripts/govuk_publishing_components/vendor/json2.js
458
454
  - app/assets/javascripts/govuk_publishing_components/vendor/modernizr.js
459
455
  - app/assets/javascripts/govuk_publishing_components/vendor/polyfills/closest.js
456
+ - app/assets/javascripts/govuk_publishing_components/vendor/polyfills/common.js
460
457
  - app/assets/javascripts/govuk_publishing_components/vendor/polyfills/indexOf.js
461
458
  - app/assets/stylesheets/component_guide/application.scss
462
459
  - app/assets/stylesheets/component_guide/print.scss
@@ -472,7 +469,6 @@ files:
472
469
  - app/assets/stylesheets/govuk_publishing_components/components/_button.scss
473
470
  - app/assets/stylesheets/govuk_publishing_components/components/_character-count.scss
474
471
  - app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss
475
- - app/assets/stylesheets/govuk_publishing_components/components/_chevron-banner.scss
476
472
  - app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
477
473
  - app/assets/stylesheets/govuk_publishing_components/components/_contextual-guidance.scss
478
474
  - app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss
@@ -502,7 +498,6 @@ files:
502
498
  - app/assets/stylesheets/govuk_publishing_components/components/_layout-for-public.scss
503
499
  - app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss
504
500
  - app/assets/stylesheets/govuk_publishing_components/components/_lead-paragraph.scss
505
- - app/assets/stylesheets/govuk_publishing_components/components/_list.scss
506
501
  - app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss
507
502
  - app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss
508
503
  - app/assets/stylesheets/govuk_publishing_components/components/_notice.scss
@@ -559,9 +554,6 @@ files:
559
554
  - app/assets/stylesheets/govuk_publishing_components/components/helpers/_link.scss
560
555
  - app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss
561
556
  - app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
562
- - app/assets/stylesheets/govuk_publishing_components/components/helpers/_variables.scss
563
- - app/assets/stylesheets/govuk_publishing_components/components/mixins/_back-arrow.scss
564
- - app/assets/stylesheets/govuk_publishing_components/components/mixins/_clearfix.scss
565
557
  - app/assets/stylesheets/govuk_publishing_components/components/mixins/_css3.scss
566
558
  - app/assets/stylesheets/govuk_publishing_components/components/mixins/_govuk-template-link-focus-override.scss
567
559
  - app/assets/stylesheets/govuk_publishing_components/components/mixins/_margins.scss
@@ -618,7 +610,6 @@ files:
618
610
  - app/views/govuk_publishing_components/components/_button.html.erb
619
611
  - app/views/govuk_publishing_components/components/_character_count.html.erb
620
612
  - app/views/govuk_publishing_components/components/_checkboxes.html.erb
621
- - app/views/govuk_publishing_components/components/_chevron_banner.html.erb
622
613
  - app/views/govuk_publishing_components/components/_contents_list.html.erb
623
614
  - app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb
624
615
  - app/views/govuk_publishing_components/components/_contextual_footer.html.erb
@@ -673,7 +664,6 @@ files:
673
664
  - app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb
674
665
  - app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
675
666
  - app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb
676
- - app/views/govuk_publishing_components/components/_subscription-links.html.erb
677
667
  - app/views/govuk_publishing_components/components/_subscription_links.html.erb
678
668
  - app/views/govuk_publishing_components/components/_success_alert.html.erb
679
669
  - app/views/govuk_publishing_components/components/_summary_list.html.erb
@@ -682,12 +672,11 @@ files:
682
672
  - app/views/govuk_publishing_components/components/_taxonomy_list.html.erb
683
673
  - app/views/govuk_publishing_components/components/_textarea.html.erb
684
674
  - app/views/govuk_publishing_components/components/_title.html.erb
685
- - app/views/govuk_publishing_components/components/_translation-nav.html.erb
686
675
  - app/views/govuk_publishing_components/components/_translation_nav.html.erb
687
676
  - app/views/govuk_publishing_components/components/_warning_text.html.erb
688
- - app/views/govuk_publishing_components/components/attachment/_thumbnail_document.svg
689
- - app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.svg
690
- - app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.svg
677
+ - app/views/govuk_publishing_components/components/attachment/_thumbnail_document.html.erb
678
+ - app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.html.erb
679
+ - app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb
691
680
  - app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb
692
681
  - app/views/govuk_publishing_components/components/docs/accordion.yml
693
682
  - app/views/govuk_publishing_components/components/docs/action_link.yml
@@ -699,7 +688,6 @@ files:
699
688
  - app/views/govuk_publishing_components/components/docs/button.yml
700
689
  - app/views/govuk_publishing_components/components/docs/character_count.yml
701
690
  - app/views/govuk_publishing_components/components/docs/checkboxes.yml
702
- - app/views/govuk_publishing_components/components/docs/chevron_banner.yml
703
691
  - app/views/govuk_publishing_components/components/docs/contents_list.yml
704
692
  - app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml
705
693
  - app/views/govuk_publishing_components/components/docs/contextual_footer.yml
@@ -754,7 +742,6 @@ files:
754
742
  - app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml
755
743
  - app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml
756
744
  - app/views/govuk_publishing_components/components/docs/step_by_step_nav_related.yml
757
- - app/views/govuk_publishing_components/components/docs/subscription-links.yml
758
745
  - app/views/govuk_publishing_components/components/docs/subscription_links.yml
759
746
  - app/views/govuk_publishing_components/components/docs/success_alert.yml
760
747
  - app/views/govuk_publishing_components/components/docs/summary_list.yml
@@ -763,7 +750,6 @@ files:
763
750
  - app/views/govuk_publishing_components/components/docs/taxonomy_list.yml
764
751
  - app/views/govuk_publishing_components/components/docs/textarea.yml
765
752
  - app/views/govuk_publishing_components/components/docs/title.yml
766
- - app/views/govuk_publishing_components/components/docs/translation-nav.yml
767
753
  - app/views/govuk_publishing_components/components/docs/translation_nav.yml
768
754
  - app/views/govuk_publishing_components/components/docs/warning_text.yml
769
755
  - app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb
@@ -1502,6 +1488,12 @@ files:
1502
1488
  - node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json
1503
1489
  - node_modules/govuk-frontend/govuk/components/checkboxes/macro.njk
1504
1490
  - node_modules/govuk-frontend/govuk/components/checkboxes/template.njk
1491
+ - node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss
1492
+ - node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss
1493
+ - node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json
1494
+ - node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json
1495
+ - node_modules/govuk-frontend/govuk/components/cookie-banner/macro.njk
1496
+ - node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk
1505
1497
  - node_modules/govuk-frontend/govuk/components/date-input/README.md
1506
1498
  - node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss
1507
1499
  - node_modules/govuk-frontend/govuk/components/date-input/_index.scss
@@ -1698,6 +1690,7 @@ files:
1698
1690
  - node_modules/govuk-frontend/govuk/helpers/_typography.scss
1699
1691
  - node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss
1700
1692
  - node_modules/govuk-frontend/govuk/objects/_all.scss
1693
+ - node_modules/govuk-frontend/govuk/objects/_button-group.scss
1701
1694
  - node_modules/govuk-frontend/govuk/objects/_form-group.scss
1702
1695
  - node_modules/govuk-frontend/govuk/objects/_grid.scss
1703
1696
  - node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg viewBox="0 0 104 122" xmlns="http://www.w3.org/2000/svg">
3
- <path d="m0.81268 5.0662l51.363 54.069c1.0996 1.1575 1.1 2.9735 8.258e-4 4.1315l-50.942 53.668c-1.1407 1.2017-1.0912 3.1006 0.11054 4.2412 0.55745 0.52914 1.2967 0.82413 2.0653 0.82413h41.812c0.8157 0 1.5962-0.33215 2.1618-0.91994l55.613-57.799c1.1179-1.1618 1.1176-2.9994-7.29e-4 -4.1609l-56.04-58.201c-0.56552-0.58733-1.3457-0.91919-2.1611-0.91919h-41.809c-1.6569 0-3 1.3431-3 3 0 0.76901 0.29531 1.5087 0.82496 2.0662z" fill-rule="evenodd"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg viewBox="0 0 104 122" xmlns="http://www.w3.org/2000/svg">
3
- <path d="m0.81268 5.0662l51.363 54.069c1.0996 1.1575 1.1 2.9735 8.258e-4 4.1315l-50.942 53.668c-1.1407 1.2017-1.0912 3.1006 0.11054 4.2412 0.55745 0.52914 1.2967 0.82413 2.0653 0.82413h41.812c0.8157 0 1.5962-0.33215 2.1618-0.91994l55.613-57.799c1.1179-1.1618 1.1176-2.9994-7.29e-4 -4.1609l-56.04-58.201c-0.56552-0.58733-1.3457-0.91919-2.1611-0.91919h-41.809c-1.6569 0-3 1.3431-3 3 0 0.76901 0.29531 1.5087 0.82496 2.0662z" fill="#FFF" fill-rule="evenodd"/>
4
- </svg>
@@ -1,8 +0,0 @@
1
- // DO NOT MAKE CHANGES TO THIS FILE
2
- // It is a temporary copy of layout-header.js and will be deleted shortly
3
-
4
- // This component relies on JavaScript from GOV.UK Frontend
5
- // = require govuk/components/header/header.js
6
- window.GOVUK = window.GOVUK || {}
7
- window.GOVUK.Modules = window.GOVUK.Modules || {}
8
- window.GOVUK.Modules.Header = window.GOVUKFrontend
@@ -1,31 +0,0 @@
1
- // migrated from govuk_frontend_toolkit
2
- ;(function (global) {
3
- 'use strict'
4
-
5
- var GOVUK = global.GOVUK || {}
6
- GOVUK.Modules = GOVUK.Modules || {}
7
-
8
- GOVUK.Modules.AutoTrackEvent = function () {
9
- this.start = function (element) {
10
- var options = { nonInteraction: 1 } // automatic events shouldn't affect bounce rate
11
- var category = element.data('track-category')
12
- var action = element.data('track-action')
13
- var label = element.data('track-label')
14
- var value = element.data('track-value')
15
-
16
- if (typeof label === 'string') {
17
- options.label = label
18
- }
19
-
20
- if (value || value === 0) {
21
- options.value = value
22
- }
23
-
24
- if (GOVUK.analytics && GOVUK.analytics.trackEvent) {
25
- GOVUK.analytics.trackEvent(category, action, options)
26
- }
27
- }
28
- }
29
-
30
- global.GOVUK = GOVUK
31
- })(window)
@@ -1,138 +0,0 @@
1
- $red: #e61e32;
2
- $dark-red: #b31424;
3
- $yellow: #ffdd00;
4
-
5
- .gem-c-chevron-banner {
6
- position: relative;
7
- }
8
-
9
- .gem-c-chevron-banner__chevron-point,
10
- .gem-c-chevron-banner__chevron-base {
11
- stroke: $red;
12
- stroke-width: 2.4;
13
- }
14
-
15
- .gem-c-chevron-banner:hover,
16
- .gem-c-chevron-banner--hover-border:hover {
17
- .gem-c-chevron-banner__text {
18
- background-color: $dark-red;
19
- border-color: $dark-red;
20
- }
21
-
22
- .gem-c-chevron-banner__chevron-point,
23
- .gem-c-chevron-banner__chevron-base {
24
- fill: $dark-red;
25
- stroke: $dark-red;
26
- }
27
- }
28
-
29
- .gem-c-chevron-banner--hover-border:hover {
30
- .gem-c-chevron-banner__text {
31
- border-color: govuk-colour("white");
32
- }
33
-
34
- .gem-c-chevron-banner__chevron-point,
35
- .gem-c-chevron-banner__chevron-base {
36
- stroke: govuk-colour("white");
37
- }
38
- }
39
-
40
- .gem-c-chevron-banner__link:focus {
41
- background-color: transparent; // This is to override some generic link styling which sets a background colour on focus
42
- text-decoration: none;
43
- outline: 0;
44
-
45
- .gem-c-chevron-banner__text {
46
- color: govuk-colour("black");
47
- background-color: $yellow;
48
- border-color: govuk-colour("black");
49
- }
50
-
51
- .gem-c-chevron-banner__text:after {
52
- background-image: image-url("govuk_publishing_components/chevron-banner/chevron-banner-small-focus.svg");
53
- }
54
-
55
- .gem-c-chevron-banner__chevron-point,
56
- .gem-c-chevron-banner__chevron-base {
57
- fill: $yellow;
58
- stroke: govuk-colour("black");
59
- }
60
- }
61
-
62
- .gem-c-chevron-banner__chevron {
63
- display: none;
64
-
65
- @include govuk-media-query(450px) {
66
- display: inline-block;
67
- height: 100%;
68
- position: absolute;
69
- left: 70%;
70
- margin-left: (45px + govuk-spacing(4));
71
- top: 0;
72
- }
73
-
74
- @include govuk-media-query($from: 450px, $until: desktop) {
75
- margin-left: (25px + govuk-spacing(2));
76
- }
77
- }
78
-
79
- .gem-c-chevron-banner__text:after {
80
- content: "";
81
- position: absolute;
82
- right: 15px;
83
- top: 0;
84
- width: 25px;
85
- height: 100%;
86
- background-image: image-url("govuk_publishing_components/chevron-banner/chevron-banner-small.svg");
87
- background-size: 25px 25px;
88
- background-repeat: no-repeat;
89
- background-position: center right;
90
-
91
- @include govuk-media-query(450px) {
92
- display: none;
93
- }
94
- }
95
-
96
- .gem-c-chevron-banner__text {
97
- display: block;
98
- position: relative;
99
- padding: govuk-spacing(4) 45px govuk-spacing(4) govuk-spacing(4);
100
- background-color: $red;
101
- border-radius: 5px;
102
- box-sizing: border-box;
103
- width: 100%;
104
- border: 2px solid $red;
105
- z-index: 1;
106
-
107
- @include govuk-media-query($from: 450px, $until: desktop) {
108
- padding: govuk-spacing(2) 25px govuk-spacing(2) govuk-spacing(2);
109
- }
110
-
111
- @include govuk-media-query($from: 450px) {
112
- border-radius: 5px 0 0 5px;
113
- border-right: 0;
114
- width: 70%;
115
- box-sizing: content-box;
116
- }
117
- }
118
-
119
- .gem-c-chevron-banner__link:link,
120
- .gem-c-chevron-banner__link:visited,
121
- .gem-c-chevron-banner__link:hover {
122
- @include govuk-font(24, $weight: bold);
123
- color: govuk-colour("white");
124
- text-decoration: none;
125
- }
126
-
127
- // IE "hack" to stop the chevron SVG being stretched
128
- @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
129
- .gem-c-chevron-banner__chevron {
130
- max-width: 160px;
131
- }
132
- }
133
-
134
- @media screen and (min-width: 0\0) {
135
- .gem-c-chevron-banner__chevron {
136
- max-width: 160px;
137
- }
138
- }
@@ -1 +0,0 @@
1
- @import "govuk/components/list/list";
@@ -1,27 +0,0 @@
1
- // Forked from GOV.UK Frontend, namespace changed to ensure no conflicts.
2
-
3
- $gem-spacing-scale-0: 0;
4
- $gem-spacing-scale-1: 5px;
5
- $gem-spacing-scale-2: 10px;
6
- $gem-spacing-scale-3: 15px;
7
- $gem-spacing-scale-4: 20px;
8
- $gem-spacing-scale-5: 30px;
9
- $gem-spacing-scale-6: 40px;
10
- $gem-spacing-scale-7: 50px;
11
- $gem-spacing-scale-8: 60px;
12
-
13
- $gem-text-colour: $govuk-text-colour;
14
- $gem-secondary-text-colour: $govuk-secondary-text-colour;
15
-
16
- // Border widths
17
- $gem-border-width-mobile: 4px;
18
- $gem-border-width-tablet: 5px;
19
- $gem-border-width-form-element: 2px;
20
- $gem-border-width-error: 4px;
21
-
22
- // Focus
23
- $gem-focus-width: 3px;
24
- $gem-focus-colour: $govuk-focus-colour;
25
-
26
- $gem-error-colour: govuk-colour("red");
27
- $gem-success-colour: govuk-colour("green");
@@ -1,13 +0,0 @@
1
- // An arrow to represent a "back" link
2
-
3
- @mixin back-arrow {
4
- border-bottom: 5px solid transparent;
5
- border-right: 6px solid;
6
- border-top: 5px solid transparent;
7
- content: "";
8
- display: block;
9
- left: 0;
10
- margin-top: -6px;
11
- position: absolute;
12
- top: 50%;
13
- }
@@ -1,8 +0,0 @@
1
- // Mixin to clear floats
2
- @mixin gem-h-clearfix {
3
- &:after {
4
- content: "";
5
- display: block;
6
- clear: both;
7
- }
8
- }
@@ -1,19 +0,0 @@
1
- <%
2
- href ||= false
3
- text ||= false
4
- hover_border ||= false
5
-
6
- data_attributes ||= {}
7
- data_attributes[:module] = 'track-click' if data_attributes.any?
8
- %>
9
- <% if href && text %>
10
- <div class="gem-c-chevron-banner <%= "gem-c-chevron-banner--hover-border" if hover_border %>">
11
- <%= link_to href, class: "gem-c-chevron-banner__link", data: data_attributes, role: "link" do %>
12
- <span class="gem-c-chevron-banner__text"><%= text %></span>
13
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 175 109" class="gem-c-chevron-banner__chevron" preserveAspectRatio="xMidYMid meet">
14
- <path class="gem-c-chevron-banner__chevron-point" fill="#E61E32" fill-rule="nonzero" d="M91.611 51.664c1.0371 1.1432 1.0375 2.8869.000802 4.0305l-44.991 49.634c-.37092.40919-.33989 1.0416.069307 1.4125.18394.16674.42334.25909.6716.25909h36.892c.55978 0 1.0939-.2346 1.4727-.6468l46.534-50.643c1.0549-1.148 1.0546-2.9127-.000709-4.0604L85.3617.64689c-.37873-.41188-.91268-.64628-1.4722-.64628h-36.891c-.55228 0-1 .44772-1 1 0 .24841.092454.48792.25936.6719l45.352 49.992z" transform="translate(0 1)"></path>
15
- <path class="gem-c-chevron-banner__chevron-base" fill="#E61E32" fill-rule="nonzero" d="M-37.997 1l.35768 107h40.408c.55978 0 1.0939-.2346 1.4727-.6468l46.534-50.643c1.0549-1.148 1.0546-2.9127-.0007095-4.0604l-46.898-51.003c-.37873-.41188-.91268-.64628-1.4722-.64628h-40.402z" vector-effect="non-scaling-stroke"></path>
16
- </svg>
17
- <% end %>
18
- </div>
19
- <% end %>
@@ -1,85 +0,0 @@
1
- <%
2
- # DO NOT MAKE CHANGES TO THIS FILE
3
- # It is a temporary copy of _subscription_links.html.erb and will be deleted shortly
4
-
5
- brand ||= false
6
- brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
7
-
8
- sl_helper = GovukPublishingComponents::Presenters::SubscriptionLinksHelper.new(local_assigns)
9
- shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
10
-
11
- local_assigns[:margin_bottom] ||= 0
12
- local_assigns[:margin_bottom] = 0 if local_assigns[:margin_bottom] > 9
13
-
14
- css_classes = %w( gem-c-subscription-links )
15
- css_classes << (shared_helper.get_margin_bottom) unless local_assigns[:margin_bottom] == 0
16
- css_classes << brand_helper.brand_class
17
- css_classes << "gem-c-subscription-links--with-feed-box" if sl_helper.feed_link_box_value
18
-
19
- data = {"module": "gem-toggle"} if sl_helper.feed_link_box_value
20
-
21
- hide_heading ||= false
22
-
23
- email_signup_link_text_locale = local_assigns[:email_signup_link_text_locale].presence
24
- feed_link_text_locale = local_assigns[:feed_link_text_locale].presence
25
- %>
26
- <% if sl_helper.component_data_is_valid? %>
27
- <%= tag.section class: css_classes, data: data do %>
28
- <% unless hide_heading %>
29
- <h2 class="gem-c-subscription-links__hidden-header visuallyhidden"><%= t("govuk_component.subscription_links.subscriptions", default: "Subscriptions") %></h2>
30
- <% end %>
31
- <ul
32
- class="gem-c-subscription-links__list<%= ' gem-c-subscription-links__list--small' if local_assigns[:small_form] == true %>"
33
- <%= "data-module=track-click" if sl_helper.tracking_is_present? %>
34
- >
35
- <% if sl_helper.email_signup_link.present? %>
36
- <li class="gem-c-subscription-links__list-item<%= ' gem-c-subscription-links__list-item--small' if local_assigns[:small_form] == true %>" >
37
- <% email_link_text = capture do %>
38
- <svg xmlns="http://www.w3.org/2000/svg" width="21" height="15.75" class="gem-c-subscription-links__icon" focusable="false" fill="currentColor" aria-hidden="true"><path d="M19.687 0H1.312C.589 0 0 .587 0 1.313v13.124c0 .726.588 1.313 1.313 1.313h18.374c.725 0 1.313-.587 1.313-1.313V1.313C21 .587 20.412 0 19.687 0zm-2.625 2.625L10.5 7.875l-6.563-5.25h13.126zm1.313 10.5H2.625V3.937L10.5 10.5l7.875-6.563v9.188z"/></svg>
39
- <%= sl_helper.email_signup_link_text %>
40
- <% end %>
41
- <%= link_to email_link_text, sl_helper.email_signup_link, {
42
- class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
43
- data: sl_helper.email_signup_link_data_attributes,
44
- lang: email_signup_link_text_locale
45
- } %>
46
- </li>
47
- <% end %>
48
-
49
- <% if sl_helper.feed_link_box_value || sl_helper.feed_link %>
50
- <li class="gem-c-subscription-links__list-item<%= ' gem-c-subscription-links__list-item--small' if local_assigns[:small_form] == true %>">
51
- <% feed_link_text = capture do %>
52
- <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" class="gem-c-subscription-links__icon" focusable="false" fill="currentColor" aria-hidden="true"><path d="M1.996 11A2 2 0 0 0 0 12.993c0 1.101.895 1.99 1.996 1.99 1.106 0 2-.889 2-1.99a2 2 0 0 0-2-1.993zM.002 5.097V7.97c1.872 0 3.632.733 4.958 2.059A6.984 6.984 0 0 1 7.015 15h2.888c0-5.461-4.443-9.903-9.9-9.903zM.006 0v2.876c6.676 0 12.11 5.44 12.11 12.124H15C15 6.731 8.273 0 .006 0z"/></svg>
53
- <%= sl_helper.feed_link_text %>
54
- <% end %>
55
- <%= tag.button feed_link_text, {
56
- class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--button",
57
- data: sl_helper.feed_link_data_attributes,
58
- lang: feed_link_text_locale
59
- } if sl_helper.feed_link_box_value %>
60
- <%= link_to feed_link_text, sl_helper.feed_link,
61
- {
62
- class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
63
- data: sl_helper.feed_link_data_attributes,
64
- lang: feed_link_text_locale
65
- } unless sl_helper.feed_link_box_value %>
66
- </li>
67
- <% end %>
68
- </ul>
69
-
70
- <% if sl_helper.feed_link_box_value %>
71
- <div class="gem-c-subscription-links__feed-box js-hidden" id="<%= sl_helper.feed_box_id %>">
72
- <h3 class="gem-c-subscription-links__feed-hidden-description visuallyhidden govuk-!-margin-top-0"><%= sl_helper.feed_link_text %></h3>
73
- <div lang="en">
74
- <%= render "govuk_publishing_components/components/input", {
75
- label: {
76
- text: "Copy and paste this URL into your feed reader"
77
- },
78
- name: "feed-reader-box",
79
- value: feed_link_box_value
80
- } %>
81
- </div>
82
- </div>
83
- <% end %>
84
- <% end %>
85
- <% end %>