govuk_publishing_components 21.51.0 → 21.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/govuk_publishing_components/action-link--nhs.png +0 -0
  3. data/app/assets/images/govuk_publishing_components/action-link--nhs.svg +1 -0
  4. data/app/assets/images/govuk_publishing_components/action-link-arrow--dark.png +0 -0
  5. data/app/assets/images/govuk_publishing_components/action-link-arrow--simple.png +0 -0
  6. data/app/assets/images/govuk_publishing_components/action-link-arrow.png +0 -0
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +38 -7
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +0 -38
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +13 -4
  10. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_steps.scss +1 -1
  11. data/app/views/govuk_publishing_components/components/_action_link.html.erb +23 -3
  12. data/app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb +5 -36
  13. data/app/views/govuk_publishing_components/components/_input.html.erb +12 -1
  14. data/app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb +28 -8
  15. data/app/views/govuk_publishing_components/components/docs/action_link.yml +43 -15
  16. data/app/views/govuk_publishing_components/components/docs/input.yml +9 -0
  17. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +23 -0
  18. data/lib/govuk_publishing_components.rb +1 -0
  19. data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +107 -0
  20. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +26 -9
  21. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons.rb +1 -3
  22. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +40 -19
  23. data/lib/govuk_publishing_components/presenters/machine_readable/faq_page_schema.rb +10 -33
  24. data/lib/govuk_publishing_components/presenters/machine_readable/html_publication_schema.rb +77 -0
  25. data/lib/govuk_publishing_components/presenters/schema_org.rb +24 -16
  26. data/lib/govuk_publishing_components/version.rb +1 -1
  27. data/node_modules/axe-core/CHANGELOG.md +6 -0
  28. data/node_modules/axe-core/axe.js +19 -3
  29. data/node_modules/axe-core/axe.min.js +2 -2
  30. data/node_modules/axe-core/bower.json +1 -1
  31. data/node_modules/axe-core/lib/commons/dom/get-element-stack.js +27 -1
  32. data/node_modules/axe-core/package.json +21 -21
  33. data/node_modules/axe-core/sri-history.json +4 -0
  34. data/node_modules/govuk-frontend/README.md +6 -6
  35. data/node_modules/govuk-frontend/govuk/_base.scss +3 -0
  36. data/node_modules/govuk-frontend/govuk/all.js +1 -1
  37. data/node_modules/govuk-frontend/govuk/all.scss +1 -3
  38. data/node_modules/govuk-frontend/govuk/components/_all.scss +31 -29
  39. data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -208
  40. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +207 -0
  41. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +1 -1
  42. data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -65
  43. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +112 -0
  44. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -118
  45. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +138 -0
  46. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +6 -0
  47. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/template.njk +12 -1
  48. data/node_modules/govuk-frontend/govuk/components/button/_button.scss +2 -284
  49. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +280 -0
  50. data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -31
  51. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +28 -0
  52. data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -308
  53. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +304 -0
  54. data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -30
  55. data/node_modules/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  56. data/node_modules/govuk-frontend/govuk/components/details/_details.scss +2 -88
  57. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +84 -0
  58. data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -15
  59. data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +11 -0
  60. data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -59
  61. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +55 -0
  62. data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -68
  63. data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  64. data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -81
  65. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +77 -0
  66. data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +2 -244
  67. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +238 -0
  68. data/node_modules/govuk-frontend/govuk/components/header/_header.scss +2 -318
  69. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +312 -0
  70. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +7 -1
  71. data/node_modules/govuk-frontend/govuk/components/header/template.njk +2 -2
  72. data/node_modules/govuk-frontend/govuk/components/hint/_hint.scss +2 -50
  73. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +46 -0
  74. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +99 -0
  75. data/node_modules/govuk-frontend/govuk/components/input/_input.scss +2 -103
  76. data/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  77. data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -28
  78. data/node_modules/govuk-frontend/govuk/components/label/_index.scss +41 -0
  79. data/node_modules/govuk-frontend/govuk/components/label/_label.scss +2 -45
  80. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +40 -0
  81. data/node_modules/govuk-frontend/govuk/components/panel/_panel.scss +2 -44
  82. data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  83. data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -31
  84. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +342 -0
  85. data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +2 -346
  86. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +53 -0
  87. data/node_modules/govuk-frontend/govuk/components/select/_select.scss +2 -57
  88. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +33 -0
  89. data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -37
  90. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +153 -0
  91. data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -157
  92. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +50 -0
  93. data/node_modules/govuk-frontend/govuk/components/table/_table.scss +2 -54
  94. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +138 -0
  95. data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -142
  96. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +87 -0
  97. data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +2 -91
  98. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +51 -0
  99. data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -55
  100. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +56 -0
  101. data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -60
  102. data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +5 -3
  103. data/node_modules/govuk-frontend/govuk/core/_links.scss +5 -3
  104. data/node_modules/govuk-frontend/govuk/core/_lists.scss +17 -3
  105. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +5 -3
  106. data/node_modules/govuk-frontend/govuk/core/_template.scss +5 -3
  107. data/node_modules/govuk-frontend/govuk/core/_typography.scss +5 -3
  108. data/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss +1 -1
  109. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  110. data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +2 -1
  111. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +1 -1
  112. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +1 -1
  113. data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
  114. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +1 -1
  115. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +1 -1
  116. data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +1 -1
  117. data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +1 -3
  118. data/node_modules/govuk-frontend/govuk/objects/_grid.scss +1 -3
  119. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +5 -3
  120. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +2 -4
  121. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +5 -3
  122. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +5 -3
  123. data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +5 -3
  124. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +5 -3
  125. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +1 -1
  126. data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +1 -1
  127. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -1
  128. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +1 -1
  129. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -1
  130. data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +1 -1
  131. data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
  132. data/node_modules/govuk-frontend/package.json +21 -21
  133. metadata +50 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fedf34db2684991bab29ed8f0b4fb255955d0c224c212fac7a39ec770aea839f
4
- data.tar.gz: e951f2b97efa24c267d1d16148f8ca9ee3c68cc55d368deb88228491c7be4574
3
+ metadata.gz: 67b6a6a998771d72bbbe83523102343350d083190a7c77e2bfd158d89104be3a
4
+ data.tar.gz: f64d56023c03cc92dc84dec30e06436e5904f98f2334e14440e4468886d27f55
5
5
  SHA512:
6
- metadata.gz: fce07b54ebb9312b2ff11803363761a1aaf112514e8bc3c614e2184fe2d5d6605fd15ee59b4becf9d055acf9f7b4f7bfecf297f06a8bb4e9043b640967e7b157
7
- data.tar.gz: 0a9f8e24d9b3cf7b69b8d2d8e145b12efb14d2a0f44e6a5a07b88c6ab151ec0fede4cb4f40bacb63fdfb38488a3af942a749e3f6b08605088effae9b161ec4ab
6
+ metadata.gz: a9fb15374f204846907e809baff835885ae63698064184bbe55b0dbe0c5fbf82ed0986595de7ebfdc62b50144ee0173c73c2b30f58468c72e1701745848f50c7
7
+ data.tar.gz: 30a0a5885f0bf9343d2bcb9679630829d394148447ee1041ff737704105b07ff4e28fd7711bee68ac604d7c864c6bd103606d7204ee2e010a94a0c9ebdd9a977
@@ -0,0 +1 @@
1
+ <svg fill="none" height="227" viewBox="0 0 227 227" width="227" xmlns="http://www.w3.org/2000/svg"><path d="m55.7 226.5c-30.4 0-55.2-24.8-55.2-55.2v-115.6c0-30.4 24.8-55.2 55.2-55.2h115.6c30.4 0 55.2 24.8 55.2 55.2v115.6c0 30.4-24.8 55.2-55.2 55.2z" fill="#0ba23b"/><path d="m171.3 1c30.2 0 54.7 24.5 54.7 54.7v115.6c0 30.2-24.5 54.7-54.7 54.7h-115.6c-30.2 0-54.7-24.5-54.7-54.7v-115.6c0-30.2 24.5-54.7 54.7-54.7zm0-1h-115.6c-30.7 0-55.7 25-55.7 55.7v115.6c0 30.7 25 55.7 55.7 55.7h115.6c30.7 0 55.7-25 55.7-55.7v-115.6c0-30.7-25-55.7-55.7-55.7z" fill="#0ba23b"/><path d="m113.5 52.7-.5-.3-112 112v6.9c0 7.3 1.5 14.3 4.1 20.7l107.9-107.9.5.3 108.2 108.2c2.8-6.5 4.3-13.8 4.3-21.3v-6.1z" fill="#fcf411"/><path d="m171.3 1h-3l57.7 57.7v-3c0-30.2-24.5-54.7-54.7-54.7z" fill="#fcf411"/><path d="m57.8 1h-2.1c-30.2 0-54.7 24.5-54.7 54.7v2.1z" fill="#fcf411"/><path d="m226 94.5-93.5-93.5h-38.8l-92.7 92.7v31.7l112-112 .5.3 112.5 112.5z" fill="#fcf411"/><path d="m205.8 213.8-92.3-92.3-.5-.3-92.2002 92.2c6 5 13.1 8.7 20.9 10.8l71.3002-71.3.5.3 71.1 71.1c7.9-1.9 15.1-5.6 21.2-10.5z" fill="#fcf411"/><path d="m112.1 188.3 1 1 .8-.8z" fill="#fcf411"/><path d="m149.8 226-36.7-36.7-36.7001 36.7z" fill="#fcf411"/><path d="m166.5 213.1h-106.0001c-25.7 0-46.6-20.9-46.6-46.6v-106c0-25.7 20.9-46.6 46.6-46.6h106.0001c25.7 0 46.6 20.9 46.6 46.6v106c0 25.7-20.9 46.6-46.6 46.6z" fill="#0071b9"/><g fill="#fff"><path d="m56.2998 56.7v48.5h119.7002v-48.5zm26.9 43.7-8.2-27h-.1l-5.4 27h-9.8l8.3-39h13l8 27.1h.1l5.5-27.1h9.8002l-8.3002 39zm39.7002 0 3.5-16.7h-12.3l-3.5 16.7h-10.4l8.1-39h10.5l-3.1 14.9h12.3l3.1-14.9h10.5l-8.1 39zm46.1-30.2c-2.7-1.2-5.6-1.8-8.6-1.8-4.1 0-7.5.6-7.5 3.7 0 5.5 15.1 3.5 15.1 15.3 0 10.8-10 13.6-19.1 13.6-4.1-.1-8.2-.8-12.1-2l2.4-7.9c2.1 1.3 6.2 2.2 9.6 2.2s8.3-.6 8.3-4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1.5 0 2.5-.6 3.3-1.7.7-1.1 1.1-2.7 1.1-4.6 0-2-.3-3.6-1-4.7s-1.8-1.7-3.3-1.7c-1.6 0-2.7.6-3.4 1.7-.7 1-1.1 2.6-1.1 4.6z"/></g></svg>
@@ -7,8 +7,8 @@
7
7
  width: 50px;
8
8
  height: 45px;
9
9
  // sass-lint:disable no-duplicate-properties
10
- background-image: image-url("govuk_publishing_components/action-link-arrow.png");
11
- background-image: image-url("govuk_publishing_components/action-link-arrow.svg");
10
+ background: image-url("govuk_publishing_components/action-link-arrow.png");
11
+ background: image-url("govuk_publishing_components/action-link-arrow.svg"), linear-gradient(transparent, transparent);
12
12
  // sass-lint:enable no-duplicate-properties
13
13
  background-repeat: no-repeat;
14
14
  background-position: 0 50%;
@@ -63,6 +63,20 @@
63
63
  }
64
64
  }
65
65
 
66
+ .gem-c-action-link--mobile-subtext {
67
+ .gem-c-action-link__subtext-wrapper {
68
+ display: block;
69
+ }
70
+
71
+ .gem-c-action-link__subtext {
72
+ padding: 0;
73
+
74
+ &:before {
75
+ display: none;
76
+ }
77
+ }
78
+ }
79
+
66
80
  .gem-c-action-link__subtext {
67
81
  @include govuk-font(19);
68
82
  display: block;
@@ -90,9 +104,10 @@
90
104
  width: 30px;
91
105
  height: 30px;
92
106
  // sass-lint:disable no-duplicate-properties
93
- background-image: image-url("govuk_publishing_components/action-link-arrow--simple.png");
94
- background-image: image-url("govuk_publishing_components/action-link-arrow--simple.svg");
107
+ background: image-url("govuk_publishing_components/action-link-arrow--simple.png");
108
+ background: image-url("govuk_publishing_components/action-link-arrow--simple.svg"), linear-gradient(transparent, transparent);
95
109
  // sass-lint:enable no-duplicate-properties
110
+ background-repeat: no-repeat;
96
111
  background-size: 25px auto;
97
112
  background-position: 0 2px;
98
113
  }
@@ -113,9 +128,10 @@
113
128
  width: 30px;
114
129
  height: 30px;
115
130
  // sass-lint:disable no-duplicate-properties
116
- background-image: image-url("govuk_publishing_components/action-link-arrow--dark.png");
117
- background-image: image-url("govuk_publishing_components/action-link-arrow--dark.svg");
131
+ background: image-url("govuk_publishing_components/action-link-arrow--dark.png");
132
+ background: image-url("govuk_publishing_components/action-link-arrow--dark.svg"), linear-gradient(transparent, transparent);
118
133
  // sass-lint:enable no-duplicate-properties
134
+ background-repeat: no-repeat;
119
135
  background-size: 25px auto;
120
136
  background-position: 0 2px;
121
137
  }
@@ -125,10 +141,25 @@
125
141
  }
126
142
  }
127
143
 
144
+ .gem-c-action-link--nhs {
145
+ &:before {
146
+ width: 80px;
147
+ height: 70px;
148
+ // sass-lint:disable no-duplicate-properties
149
+ background: image-url("govuk_publishing_components/action-link--nhs.png");
150
+ background: image-url("govuk_publishing_components/action-link--nhs.svg"), linear-gradient(transparent, transparent);
151
+ // sass-lint:enable no-duplicate-properties
152
+ background-repeat: no-repeat;
153
+ background-size: 85% auto;
154
+ background-position: 0 50%;
155
+ }
156
+ }
157
+
128
158
  .gem-c-action-link--light-text {
129
159
  color: govuk-colour("white");
130
160
 
131
- .gem-c-action-link__link {
161
+ .gem-c-action-link__link,
162
+ .gem-c-action-link__subtext-link {
132
163
  text-decoration: underline;
133
164
 
134
165
  &:link,
@@ -1,39 +1 @@
1
1
  @import "govuk/components/back-link/back-link";
2
-
3
- .govuk-back-link {
4
- &[href] {
5
- text-decoration: underline;
6
- border-bottom: 1px solid transparent;
7
-
8
- &:focus {
9
- text-decoration: none;
10
- }
11
- }
12
-
13
- &:before {
14
- content: "";
15
- display: block;
16
- position: absolute;
17
- top: 0;
18
- bottom: 1px;
19
- left: 3px;
20
- width: 7px;
21
- height: 7px;
22
- -webkit-transform: rotate(225deg);
23
- -ms-transform: rotate(225deg);
24
- transform: rotate(225deg);
25
- border: solid;
26
- border-width: 1px 1px 0 0;
27
- clip-path: inherit;
28
- -webkit-clip-path: inherit;
29
- }
30
- }
31
-
32
- .govuk-back-link::after {
33
- content: "";
34
- position: absolute;
35
- top: -14px;
36
- right: 0;
37
- left: 0;
38
- bottom: -14px;
39
- }
@@ -31,22 +31,31 @@
31
31
  }
32
32
  }
33
33
 
34
+ .gem-c-input__prefix,
34
35
  .gem-c-input__suffix {
35
36
  @include govuk-font($size: 19);
36
37
 
37
38
  background-color: govuk-colour("light-grey", $legacy: "grey-3");
38
39
  border: $govuk-border-width-form-element solid $govuk-input-border-colour;
39
- border-left: 0;
40
40
  box-sizing: border-box;
41
41
  cursor: default; // emphasise non-editable status of prefixes and suffixes
42
42
  display: inline-block;
43
- flex: 0 0 0;
44
- padding: govuk-spacing(1);
45
43
  white-space: nowrap;
46
44
  width: auto;
45
+ text-align: center;
47
46
  height: 40px;
47
+ padding: govuk-spacing(1);
48
+ min-width: 40px;
48
49
  @if $govuk-typography-use-rem {
49
- height: govuk-px-to-rem(40px);
50
+ min-width: govuk-px-to-rem(40px);
50
51
  }
51
52
  margin-top: 0;
52
53
  }
54
+
55
+ .gem-c-input__prefix {
56
+ border-right: 0;
57
+ }
58
+
59
+ .gem-c-input__suffix {
60
+ border-left: 0;
61
+ }
@@ -10,7 +10,7 @@
10
10
  margin-left: 0;
11
11
  padding: .75em 0 .75em 2.5em;
12
12
 
13
- @for $i from 1 through 14 {
13
+ @for $i from 1 through 30 {
14
14
  &:nth-child(#{$i}) {
15
15
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Ccircle cx='125' cy='125' r='100' fill='black' /%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' alignment-baseline='middle' font-family='sans-serif' font-size='100px' fill='white'%3E#{$i}%3C/text%3E%3C/svg%3E");
16
16
  background-repeat: no-repeat;
@@ -6,34 +6,54 @@
6
6
  nowrap_text ||= false
7
7
  href ||= false
8
8
  subtext ||= false
9
+ subtext_href ||= false
10
+ mobile_subtext ||= false
9
11
  light_text ||= false
10
12
  simple ||= false
11
13
  dark_icon ||= false
14
+ nhs_icon ||= false
12
15
  data ||= nil
13
16
  classes ||= nil
14
17
 
15
18
  css_classes = %w(gem-c-action-link)
16
19
  css_classes << "gem-c-action-link--light-text" if light_text
17
20
  css_classes << "gem-c-action-link--dark-icon" if dark_icon
21
+ css_classes << "gem-c-action-link--nhs" if nhs_icon
18
22
  css_classes << "gem-c-action-link--simple" if simple
19
23
  css_classes << "gem-c-action-link--with-subtext" if subtext
24
+ css_classes << "gem-c-action-link--mobile-subtext" if mobile_subtext
20
25
  css_classes << (shared_helper.get_margin_bottom)
21
26
 
22
27
  link_classes = %w(govuk-link gem-c-action-link__link)
23
28
  link_classes << shared_helper.classes if classes
24
29
  %>
25
- <% if href.present? && text.present? %>
30
+ <% if text.present? %>
26
31
  <div class="<%= css_classes.join(' ') %>">
27
32
  <% contents = capture do %>
28
33
  <span class="gem-c-action-link__link-wrapper">
29
- <%= link_to href, :class => link_classes, :data => data do %>
34
+ <% main_text = capture do %>
30
35
  <%= text %>
31
36
  <%= content_tag(:span, nowrap_text, class: "gem-c-action-link__nowrap-text") if nowrap_text %>
32
37
  <% end %>
38
+
39
+ <% if href.present? %>
40
+ <%= link_to href, class: link_classes, data: data do %>
41
+ <%= main_text %>
42
+ <% end %>
43
+ <% else %>
44
+ <%= main_text %>
45
+ <% end %>
33
46
  </span>
47
+
34
48
  <% if subtext %>
35
49
  <span class="gem-c-action-link__subtext-wrapper">
36
- <%= content_tag(:span, subtext, class: "gem-c-action-link__subtext") %>
50
+ <% if subtext_href %>
51
+ <%= content_tag(:span, subtext, class: "gem-c-action-link__subtext") do %>
52
+ <%= link_to subtext, subtext_href, class: "gem-c-action-link__subtext-link govuk-link", data: data %>
53
+ <% end %>
54
+ <% else %>
55
+ <%= content_tag(:span, subtext, class: "gem-c-action-link__subtext") %>
56
+ <% end %>
37
57
  </span>
38
58
  <% end %>
39
59
  <% end %>
@@ -1,47 +1,16 @@
1
- <% navigation = GovukPublishingComponents::Presenters::ContextualNavigation.new(content_item, request) %>
2
1
  <% prioritise_taxon_breadcrumbs ||= false %>
2
+ <% breadcrumb_selector = GovukPublishingComponents::Presenters::BreadcrumbSelector.call(content_item, request, prioritise_taxon_breadcrumbs) %>
3
3
  <% inverse ||= false %>
4
4
  <% collapse_on_mobile ||= true unless local_assigns[:collapse_on_mobile].eql?(false) %>
5
5
 
6
6
  <div class='gem-c-contextual-breadcrumbs'>
7
-
8
- <% if navigation.priority_taxon %>
9
- <%= render 'govuk_publishing_components/components/step_by_step_nav_header',
10
- {
11
- title: navigation.priority_taxon['title'],
12
- path: navigation.priority_taxon['base_path']
13
- }
14
- %>
15
- <% elsif navigation.content_tagged_to_current_step_by_step? %>
16
- <%# Rendering step by step nav breadcrumbs because there's 1 step by step %>
7
+ <% if breadcrumb_selector[:step_by_step] %>
17
8
  <%= render 'govuk_publishing_components/components/step_by_step_nav_header',
18
- navigation.step_nav_helper.header %>
19
- <% elsif navigation.content_tagged_to_a_finder? %>
20
- <%# Rendering finder breadcrumbs because the page is tagged to a finder %>
21
- <%= render 'govuk_publishing_components/components/breadcrumbs', breadcrumbs: navigation.breadcrumbs, inverse: inverse, collapse_on_mobile: collapse_on_mobile %>
22
- <% elsif navigation.content_is_tagged_to_a_live_taxon? && prioritise_taxon_breadcrumbs %>
23
- <%# Rendering taxonomy breadcrumbs because the page is tagged to live taxons
24
- and we want to prioritise them over all other breadcrumbs %>
9
+ breadcrumb_selector[:breadcrumbs] %>
10
+ <% elsif breadcrumb_selector[:breadcrumbs] %>
25
11
  <%= render 'govuk_publishing_components/components/breadcrumbs',
26
- breadcrumbs: navigation.taxon_breadcrumbs[:breadcrumbs],
12
+ breadcrumbs: breadcrumb_selector[:breadcrumbs],
27
13
  inverse: inverse,
28
14
  collapse_on_mobile: collapse_on_mobile %>
29
- <% elsif navigation.content_tagged_to_mainstream_browse_pages? %>
30
- <%# Rendering parent-based breadcrumbs because the page is tagged to mainstream browse %>
31
- <%= render 'govuk_publishing_components/components/breadcrumbs', breadcrumbs: navigation.breadcrumbs, inverse: inverse, collapse_on_mobile: collapse_on_mobile %>
32
- <% elsif navigation.content_has_curated_related_items? %>
33
- <%# Rendering parent-based breadcrumbs because the page has curated related links %>
34
- <%= render 'govuk_publishing_components/components/breadcrumbs', breadcrumbs: navigation.breadcrumbs, inverse: inverse, collapse_on_mobile: collapse_on_mobile %>
35
- <% elsif navigation.content_is_tagged_to_a_live_taxon? && !navigation.content_is_a_specialist_document? %>
36
- <%# Rendering taxonomy breadcrumbs because the page is tagged to live taxons %>
37
- <%= render 'govuk_publishing_components/components/breadcrumbs',
38
- breadcrumbs: navigation.taxon_breadcrumbs[:breadcrumbs],
39
- inverse: inverse,
40
- collapse_on_mobile: collapse_on_mobile %>
41
- <% elsif navigation.breadcrumbs.any? %>
42
- <%# Rendering parent-based breadcrumbs because no browse, no related links, no live taxons %>
43
- <%= render 'govuk_publishing_components/components/breadcrumbs', breadcrumbs: navigation.breadcrumbs, inverse: inverse, collapse_on_mobile: collapse_on_mobile %>
44
- <% else %>
45
- <%# Not rendering any breadcrumbs because there aren't any %>
46
15
  <% end %>
47
16
  </div>
@@ -22,6 +22,7 @@
22
22
  error_id = "error-#{SecureRandom.hex(4)}"
23
23
  search_icon ||= nil
24
24
  heading_size = false unless ['s', 'm', 'l', 'xl'].include?(heading_size)
25
+ prefix ||= nil
25
26
  suffix ||= nil
26
27
 
27
28
  css_classes = %w(gem-c-input govuk-input)
@@ -92,7 +93,17 @@
92
93
  }
93
94
  %>
94
95
 
95
- <% if suffix %>
96
+ <% if prefix && suffix %>
97
+ <%= tag.div class: "gem-c-input__wrapper" do %>
98
+ <%= tag.span prefix, class: "gem-c-input__prefix", aria: { hidden: true } %>
99
+ <%= input_tag %>
100
+ <%= tag.span suffix, class: "gem-c-input__suffix", aria: { hidden: true } %>
101
+ <% end %>
102
+ <% elsif prefix %>
103
+ <%= tag.div class: "gem-c-input__wrapper" do %>
104
+ <%= tag.span prefix, class: "gem-c-input__prefix", aria: { hidden: true } %><%= input_tag %>
105
+ <% end %>
106
+ <% elsif suffix %>
96
107
  <%= tag.div class: "gem-c-input__wrapper" do %>
97
108
  <%= input_tag %><%= tag.span suffix, class: "gem-c-input__suffix", aria: { hidden: true } %>
98
109
  <% end %>
@@ -1,29 +1,49 @@
1
1
  <%
2
2
  title ||= false
3
3
  path ||= false
4
- tracking_id ||= false
5
4
  breadcrumbs = [
6
5
  { title: "Home", url: "/" },
7
6
  { title: title, url: path }
8
7
  ]
9
8
  breadcrumb_presenter = GovukPublishingComponents::Presenters::Breadcrumbs.new(breadcrumbs)
9
+
10
+ tracking_id ||= false
11
+ tracking_category ||= "stepNavHeaderClicked"
12
+ tracking_action ||= "top"
13
+ tracking_label ||= path
14
+ tracking_dimension_enabled = tracking_dimension_enabled != false
15
+ tracking_dimension ||= title
16
+ tracking_dimension_index ||= 29
17
+
18
+ if tracking_id
19
+ tracking_options ||= ({ dimension96: tracking_id }).to_json
20
+ end
21
+
22
+ local_assigns[:margin_bottom] ||= 0
23
+ shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
24
+ classes = "gem-c-step-nav-header #{shared_helper.get_margin_bottom}"
10
25
  %>
11
26
  <% if title %>
12
27
  <script type="application/ld+json">
13
28
  <%= raw breadcrumb_presenter.structured_data.to_json %>
14
29
  </script>
15
30
 
16
- <div class="gem-c-step-nav-header" data-module="track-click">
31
+ <div class="<%= classes %>" data-module="track-click">
17
32
  <span class="gem-c-step-nav-header__part-of">Part of</span>
18
33
  <% if path %>
19
34
  <a href="<%= path %>"
20
35
  class="gem-c-step-nav-header__title"
21
- data-track-category="stepNavHeaderClicked"
22
- data-track-action="top"
23
- data-track-label="<%= path %>"
24
- data-track-dimension="<%= title %>"
25
- data-track-dimension-index="29"
26
- data-track-options='{"dimension96" : "<%= tracking_id %>" }'>
36
+ data-track-category="<%= tracking_category %>"
37
+ data-track-action="<%= tracking_action %>"
38
+ data-track-label="<%= tracking_label %>"
39
+ <% if tracking_dimension_enabled %>
40
+ data-track-dimension="<%= tracking_dimension %>"
41
+ data-track-dimension-index="<%= tracking_dimension_index %>"
42
+ <% end %>
43
+ <% if tracking_id %>
44
+ data-track-options='<%= tracking_options %>'
45
+ <% end %>
46
+ >
27
47
  <%= title %>
28
48
  </a>
29
49
  <% else %>
@@ -6,56 +6,84 @@ examples:
6
6
  default:
7
7
  data:
8
8
  text: Go to NHS 111 online
9
- href: '/my-test-page'
9
+ href: "/page"
10
10
  with_bottom_margin:
11
11
  data:
12
12
  text: Look at this margin
13
- href: '/my-test-page'
13
+ href: "/page"
14
14
  margin_bottom: 9
15
15
  with_data_attributes:
16
16
  data:
17
17
  text: "Coronavirus (COVID-19)"
18
- href: '/my-test-page'
18
+ href: "/page"
19
19
  data:
20
20
  attr_test: "hasDataAttribute"
21
21
  with_js_classes:
22
22
  description: Use `js-` prefixed classes only as interaction hooks – to query and operate on elements via JavaScript. Classes are added to the link itself.
23
23
  data:
24
24
  text: "Coronavirus (COVID-19)"
25
- href: '/my-test-page'
25
+ href: "/page"
26
26
  classes: 'js-hook'
27
27
  with_no_wrapping_text:
28
28
  data:
29
29
  text: "Coronavirus (COVID-19):"
30
30
  nowrap_text: what you need to do
31
- href: '/my-test-page'
31
+ href: "/page"
32
32
  with_light_text:
33
33
  data:
34
34
  text: "Coronavirus (COVID-19)"
35
- href: '/my-test-page'
35
+ href: "/page"
36
36
  light_text: true
37
37
  context:
38
38
  dark_background: true
39
39
  with_subtext:
40
40
  data:
41
- text: "Emergency something"
42
- href: '/page'
43
- subtext: "This is about the emergency"
41
+ text: Emergency something
42
+ href: "/page"
43
+ subtext: This is about the emergency
44
44
  with_subtext_on_a_dark_background:
45
45
  data:
46
- text: "Emergency something"
47
- href: '/page'
48
- subtext: "This is about the emergency that is happening right now unfortunately so pay attention"
46
+ text: Emergency something
47
+ href: "/page"
48
+ subtext: This is about the emergency that is happening right now unfortunately so pay attention
49
+ light_text: true
50
+ context:
51
+ dark_background: true
52
+ mobile_subtext:
53
+ description: Lock the subtext beneath the main text, so the component with subtext always appears as it does on mobile.
54
+ data:
55
+ text: Try not to panic now
56
+ href: "/page"
57
+ subtext: "The thing that is happening is pretty scary but we'll get through it"
58
+ mobile_subtext: true
59
+ with_link_on_subtext:
60
+ description: The subtext can also be a link if required. The link on the main text is optional.
61
+ data:
62
+ text: Remain calm
63
+ subtext: Better things are ahead
64
+ subtext_href: "/page"
65
+ with_link_on_subtext_on_a_dark_background:
66
+ data:
67
+ text: Remain calm
68
+ subtext: Better things are ahead
69
+ subtext_href: "/page"
49
70
  light_text: true
50
71
  context:
51
72
  dark_background: true
52
73
  simple_arrow:
53
74
  data:
54
- text: "Getting financial help and keeping your business safe"
75
+ text: Getting financial help and keeping your business safe
55
76
  href: "/financial-help"
56
77
  simple: true
57
78
  with_dark_icon:
58
79
  data:
59
- text: "Coronavirus (COVID-19)"
60
- href: '/my-test-page'
80
+ text: Coronavirus (COVID-19)
81
+ href: "/my-test-page"
61
82
  dark_icon: true
83
+ with_nhs_icon:
84
+ data:
85
+ text: Something about the NHS
86
+ subtext: Perhaps you'd like to click here
87
+ subtext_href: "/page"
88
+ mobile_subtext: true
89
+ nhs_icon: true