govuk_publishing_components 28.4.0 → 28.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/app/assets/javascripts/govuk_publishing_components/analytics/track-select-change.js +4 -3
  4. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +21 -291
  5. data/app/assets/javascripts/govuk_publishing_components/components/button.js +1 -1
  6. data/app/assets/javascripts/govuk_publishing_components/components/character-count.js +1 -1
  7. data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +1 -1
  8. data/app/assets/javascripts/govuk_publishing_components/components/details.js +1 -1
  9. data/app/assets/javascripts/govuk_publishing_components/components/error-summary.js +1 -1
  10. data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +7 -6
  11. data/app/assets/javascripts/govuk_publishing_components/components/layout-header.js +1 -1
  12. data/app/assets/javascripts/govuk_publishing_components/components/radio.js +1 -1
  13. data/app/assets/javascripts/govuk_publishing_components/components/skip-link.js +5 -0
  14. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +40 -37
  15. data/app/assets/javascripts/govuk_publishing_components/components/tabs.js +1 -1
  16. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/barchart-enhancement.js +2 -1
  17. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +8 -10
  18. data/app/assets/javascripts/govuk_publishing_components/lib/initial-focus.js +4 -3
  19. data/app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js +4 -3
  20. data/app/assets/javascripts/govuk_publishing_components/lib/toggle.js +4 -3
  21. data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +1796 -911
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -329
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +1 -1
  24. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +95 -56
  25. data/app/assets/stylesheets/govuk_publishing_components/components/print/_accordion.scss +6 -17
  26. data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +0 -9
  27. data/app/models/govuk_publishing_components/component_docs.rb +1 -1
  28. data/app/views/govuk_publishing_components/components/_accordion.html.erb +30 -15
  29. data/app/views/govuk_publishing_components/components/_action_link.html.erb +1 -1
  30. data/app/views/govuk_publishing_components/components/_button.html.erb +4 -4
  31. data/app/views/govuk_publishing_components/components/_character_count.html.erb +2 -2
  32. data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +2 -2
  33. data/app/views/govuk_publishing_components/components/_details.html.erb +1 -1
  34. data/app/views/govuk_publishing_components/components/_error_message.html.erb +1 -1
  35. data/app/views/govuk_publishing_components/components/_error_summary.html.erb +0 -1
  36. data/app/views/govuk_publishing_components/components/_heading.html.erb +1 -1
  37. data/app/views/govuk_publishing_components/components/_hint.html.erb +1 -1
  38. data/app/views/govuk_publishing_components/components/_input.html.erb +3 -3
  39. data/app/views/govuk_publishing_components/components/_inset_text.html.erb +12 -1
  40. data/app/views/govuk_publishing_components/components/_intervention.html.erb +2 -2
  41. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +1 -1
  42. data/app/views/govuk_publishing_components/components/_list.html.erb +1 -1
  43. data/app/views/govuk_publishing_components/components/_modal_dialogue.html.erb +1 -1
  44. data/app/views/govuk_publishing_components/components/_notice.html.erb +1 -1
  45. data/app/views/govuk_publishing_components/components/_print_link.html.erb +2 -2
  46. data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -1
  47. data/app/views/govuk_publishing_components/components/_search.html.erb +4 -6
  48. data/app/views/govuk_publishing_components/components/_select.html.erb +20 -30
  49. data/app/views/govuk_publishing_components/components/_skip_link.html.erb +1 -1
  50. data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +8 -9
  51. data/app/views/govuk_publishing_components/components/_textarea.html.erb +1 -1
  52. data/app/views/govuk_publishing_components/components/_title.html.erb +3 -3
  53. data/app/views/govuk_publishing_components/components/docs/accordion.yml +2 -97
  54. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +1 -1
  55. data/app/views/govuk_publishing_components/components/docs/inset_text.yml +6 -0
  56. data/app/views/govuk_publishing_components/components/docs/select.yml +12 -0
  57. data/app/views/govuk_publishing_components/components/docs/share_links.yml +1 -1
  58. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +13 -13
  59. data/app/views/govuk_publishing_components/components/docs/tabs.yml +1 -1
  60. data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -1
  61. data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +3 -3
  62. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +11 -11
  63. data/config/initializers/assets.rb +1 -0
  64. data/config/locales/ar.yml +2 -0
  65. data/config/locales/az.yml +2 -1
  66. data/config/locales/be.yml +2 -0
  67. data/config/locales/bg.yml +2 -0
  68. data/config/locales/bn.yml +2 -0
  69. data/config/locales/cs.yml +2 -0
  70. data/config/locales/cy.yml +2 -0
  71. data/config/locales/da.yml +2 -0
  72. data/config/locales/de.yml +2 -0
  73. data/config/locales/dr.yml +2 -0
  74. data/config/locales/el.yml +2 -0
  75. data/config/locales/es-419.yml +2 -0
  76. data/config/locales/es.yml +2 -0
  77. data/config/locales/et.yml +2 -0
  78. data/config/locales/fa.yml +2 -1
  79. data/config/locales/fi.yml +2 -0
  80. data/config/locales/fr.yml +2 -0
  81. data/config/locales/gd.yml +2 -0
  82. data/config/locales/gu.yml +2 -0
  83. data/config/locales/he.yml +2 -0
  84. data/config/locales/hi.yml +2 -0
  85. data/config/locales/hr.yml +2 -0
  86. data/config/locales/hu.yml +2 -0
  87. data/config/locales/hy.yml +2 -0
  88. data/config/locales/id.yml +2 -1
  89. data/config/locales/is.yml +2 -0
  90. data/config/locales/it.yml +2 -0
  91. data/config/locales/ja.yml +2 -1
  92. data/config/locales/ka.yml +2 -0
  93. data/config/locales/kk.yml +2 -0
  94. data/config/locales/ko.yml +2 -1
  95. data/config/locales/lt.yml +2 -0
  96. data/config/locales/lv.yml +2 -0
  97. data/config/locales/ms.yml +2 -1
  98. data/config/locales/mt.yml +2 -0
  99. data/config/locales/nl.yml +2 -0
  100. data/config/locales/no.yml +2 -0
  101. data/config/locales/pa-pk.yml +2 -0
  102. data/config/locales/pa.yml +2 -0
  103. data/config/locales/pl.yml +2 -0
  104. data/config/locales/ps.yml +2 -0
  105. data/config/locales/pt.yml +2 -0
  106. data/config/locales/ro.yml +2 -0
  107. data/config/locales/ru.yml +2 -0
  108. data/config/locales/si.yml +2 -0
  109. data/config/locales/sk.yml +2 -0
  110. data/config/locales/sl.yml +2 -0
  111. data/config/locales/so.yml +2 -0
  112. data/config/locales/sq.yml +2 -0
  113. data/config/locales/sr.yml +2 -1
  114. data/config/locales/sv.yml +2 -0
  115. data/config/locales/sw.yml +2 -0
  116. data/config/locales/ta.yml +2 -0
  117. data/config/locales/th.yml +2 -1
  118. data/config/locales/tk.yml +2 -0
  119. data/config/locales/tr.yml +2 -0
  120. data/config/locales/uk.yml +2 -0
  121. data/config/locales/ur.yml +2 -0
  122. data/config/locales/uz.yml +2 -0
  123. data/config/locales/vi.yml +2 -1
  124. data/config/locales/zh-hk.yml +2 -1
  125. data/config/locales/zh-tw.yml +2 -1
  126. data/config/locales/zh.yml +2 -1
  127. data/lib/govuk_publishing_components/presenters/select_helper.rb +85 -0
  128. data/lib/govuk_publishing_components/version.rb +1 -1
  129. data/lib/govuk_publishing_components.rb +1 -1
  130. data/node_modules/govuk-frontend/govuk/all.js +294 -76
  131. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +274 -99
  132. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +169 -65
  133. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +37 -5
  134. data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +4 -4
  135. data/node_modules/govuk-frontend/govuk/components/button/button.js +2 -2
  136. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +3 -3
  137. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +15 -2
  138. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +8 -10
  139. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +52 -15
  140. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +0 -2
  141. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +31 -0
  142. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +25 -25
  143. data/node_modules/govuk-frontend/govuk/components/details/details.js +2 -2
  144. data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +1 -0
  145. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +8 -8
  146. data/node_modules/govuk-frontend/govuk/components/error-message/template.njk +2 -2
  147. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +24 -3
  148. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +25 -16
  149. data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +6 -0
  150. data/node_modules/govuk-frontend/govuk/components/error-summary/template.njk +2 -1
  151. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +4 -4
  152. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +3 -37
  153. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +119 -15
  154. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +6 -0
  155. data/node_modules/govuk-frontend/govuk/components/footer/template.njk +1 -1
  156. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +10 -4
  157. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +11 -11
  158. data/node_modules/govuk-frontend/govuk/components/header/header.js +4 -4
  159. data/node_modules/govuk-frontend/govuk/components/header/template.njk +4 -3
  160. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +1 -3
  161. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +1 -1
  162. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +40 -40
  163. data/node_modules/govuk-frontend/govuk/components/input/template.njk +4 -3
  164. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +499 -2
  165. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +2 -2
  166. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +0 -8
  167. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +44 -45
  168. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +4 -4
  169. data/node_modules/govuk-frontend/govuk/components/radios/template.njk +2 -9
  170. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +6 -1
  171. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +3 -3
  172. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +13 -0
  173. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +9 -9
  174. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +1108 -0
  175. data/node_modules/govuk-frontend/govuk/components/skip-link/template.njk +1 -1
  176. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +20 -23
  177. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +86 -1
  178. data/node_modules/govuk-frontend/govuk/components/summary-list/template.njk +1 -4
  179. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +2 -2
  180. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +2 -2
  181. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -5
  182. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +2 -2
  183. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +1 -1
  184. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +4 -4
  185. data/node_modules/govuk-frontend/govuk/core/_all.scss +0 -1
  186. data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +0 -6
  187. data/node_modules/govuk-frontend/govuk/core/_links.scss +0 -6
  188. data/node_modules/govuk-frontend/govuk/core/_lists.scss +0 -6
  189. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +0 -6
  190. data/node_modules/govuk-frontend/govuk/core/_typography.scss +0 -6
  191. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  192. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +15 -30
  193. data/node_modules/govuk-frontend/govuk/{core → objects}/_template.scss +1 -5
  194. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +0 -6
  195. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +0 -6
  196. data/node_modules/govuk-frontend/govuk/overrides/_text-align.scss +0 -6
  197. data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +0 -6
  198. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +0 -6
  199. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
  200. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +0 -10
  201. data/node_modules/govuk-frontend/govuk/tools/_all.scss +0 -1
  202. data/node_modules/govuk-frontend/package.json +1 -1
  203. metadata +24 -45
  204. data/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js +0 -100
  205. data/lib/govuk_publishing_components/presenters/select.rb +0 -43
  206. data/lib/tasks/govuk_publishing_components_tasks.rake +0 -49
  207. data/node_modules/govuk-frontend/govuk/tools/_iff.scss +0 -17
@@ -1,330 +1,2 @@
1
1
  @import "mixins/prefixed-transform";
2
-
3
- $gem-c-accordion-border-width: 3px;
4
- $gem-c-accordion-bottom-border-width: 1px;
5
-
6
- // Buttons within the sections don’t need default styling
7
- .gem-c-accordion__section-button {
8
- display: inline-block;
9
- margin-bottom: 0;
10
- padding-top: govuk-spacing(3);
11
- font-weight: bold;
12
- @include govuk-font($size: 24, $weight: bold);
13
- }
14
-
15
- .gem-c-accordion__section-header {
16
- padding-top: govuk-spacing(2) 0;
17
- }
18
-
19
- .gem-c-accordion__section-heading {
20
- margin: govuk-spacing(1) 0;
21
- }
22
-
23
- .js-enabled {
24
- .gem-c-accordion {
25
- border-bottom: $gem-c-accordion-bottom-border-width solid $govuk-border-colour;
26
- }
27
-
28
- .gem-c-accordion__controls {
29
- text-align: left;
30
- }
31
-
32
- .gem-c-accordion__open-all {
33
- position: relative;
34
- z-index: 1;
35
- border-width: 0;
36
- color: $govuk-link-colour;
37
- background: none;
38
- -webkit-appearance: none;
39
- cursor: pointer;
40
- margin-bottom: govuk-spacing(4);
41
- padding: 0 govuk-spacing(1) govuk-spacing(1) 0;
42
- @include govuk-font($size: 16);
43
- @include govuk-link-common;
44
- @include govuk-link-style-default;
45
-
46
- // Remove default button focus outline in Firefox
47
- &::-moz-focus-inner {
48
- padding: 0;
49
- border: 0;
50
- }
51
- }
52
-
53
- // Create Chervon icon align with text
54
- .gem-c-accordion-nav__chevron {
55
- vertical-align: text-top;
56
- display: inline-block;
57
- box-sizing: border-box;
58
- position: relative;
59
- width: govuk-em(20, 14);
60
- height: govuk-em(20, 14);
61
- margin-left: govuk-em(5, 14);
62
- border: govuk-em(1, 14) solid;
63
- border-radius: govuk-em(100, 14);
64
-
65
- // Main icon size across views, yet keep responsive for zoom
66
- @include govuk-media-query($from: tablet) {
67
- width: govuk-em(20, 16);
68
- height: govuk-em(20, 16);
69
- margin-left: govuk-em(5, 16);
70
- border: govuk-em(1, 16) solid;
71
- }
72
-
73
- &:after {
74
- @include prefixed-transform($rotate: -45deg);
75
- content: "";
76
- display: block;
77
- box-sizing: border-box;
78
- position: absolute;
79
- overflow: visible;
80
- width: govuk-em(6, 14);
81
- height: govuk-em(6, 14);
82
- border-top: govuk-em(2, 14) solid;
83
- border-right: govuk-em(2, 14) solid;
84
- left: govuk-em(6, 14);
85
- bottom: govuk-em(5, 14);
86
-
87
- @include govuk-media-query($from: tablet) {
88
- width: govuk-em(6, 16);
89
- height: govuk-em(6, 16);
90
- border-top: govuk-em(2, 16) solid;
91
- border-right: govuk-em(2, 16) solid;
92
- left: govuk-em(6, 16);
93
- bottom: govuk-em(5, 16);
94
- }
95
- }
96
- }
97
-
98
- .gem-c-accordion__open-all:hover,
99
- .gem-c-accordion__section-button:hover {
100
- .gem-c-accordion-nav__chevron {
101
- color: $govuk-link-hover-colour;
102
- text-decoration: none;
103
- }
104
- }
105
-
106
- // Focus state, also to change chervon icon to black
107
- .gem-c-accordion__open-all:focus {
108
- .gem-c-accordion-nav__chevron {
109
- color: $govuk-focus-text-colour;
110
- text-decoration: none;
111
- }
112
- }
113
-
114
- // Rotate icon to create "Down" version
115
- .gem-c-accordion-nav__chevron--down {
116
- @include prefixed-transform($rotate: 180deg);
117
- }
118
-
119
- .gem-c-accordion__section-heading {
120
- // Override browser defaults to ensure consistent element height
121
- margin-top: 0; // Override browser default
122
- margin-bottom: 0; // Override browser default
123
- @include govuk-font(24);
124
- }
125
-
126
- // Section headers have a pointer cursor as an additional affordance
127
- .gem-c-accordion__section-header {
128
- position: relative;
129
- }
130
-
131
- // For devices that can't hover such as touch devices,
132
- // remove hover state as it can be stuck in that state (iOS).
133
- @media (hover: none) {
134
- .gem-c-accordion__section-header:hover {
135
- border-top-color: $govuk-link-colour;
136
- box-shadow: inset 0 $gem-c-accordion-border-width 0 0 $govuk-link-colour;
137
-
138
- .gem-c-accordion__section-button {
139
- border-top-color: $govuk-link-colour;
140
- }
141
- }
142
- }
143
-
144
- // Buttons within the headers don’t need default styling
145
- .gem-c-accordion__section-button {
146
- padding: govuk-spacing(2) 0 govuk-spacing(5);
147
- position: relative;
148
- margin: 0;
149
- border-width: $gem-c-accordion-bottom-border-width 0 0 0;
150
- border-top: $gem-c-accordion-bottom-border-width solid $govuk-border-colour;
151
- color: $govuk-text-colour;
152
- background: none;
153
- text-align: left;
154
- cursor: pointer;
155
- -webkit-appearance: none;
156
- @include govuk-typography-common;
157
- width: 100%;
158
-
159
- &:hover {
160
- color: $govuk-link-hover-colour;
161
- }
162
-
163
- &:active {
164
- z-index: 1;
165
- color: $govuk-link-active-colour;
166
- background: none;
167
- }
168
-
169
- // Remove default button focus outline in Firefox
170
- &::-moz-focus-inner {
171
- padding: 0;
172
- border: 0;
173
- }
174
- }
175
-
176
- .gem-c-accordion__section-button:focus {
177
- @include govuk-focused-text;
178
- // Overwrite focus border to top
179
- box-shadow: 0 0, 0 -4px;
180
- border-top: 1px solid transparent;
181
-
182
- // Focus state to change chervon icon colour within individual sections
183
- .gem-c-accordion-nav__chevron {
184
- color: $govuk-text-colour;
185
- }
186
- }
187
-
188
- // Extend the touch area of the button to span the section header
189
- .gem-c-accordion__section-button:after {
190
- content: "";
191
- position: absolute;
192
- top: 0;
193
- right: 0;
194
- bottom: 0;
195
- left: 0;
196
- }
197
-
198
- .gem-c-accordion__section-button:hover:not(:focus) {
199
- text-decoration: none;
200
- }
201
-
202
- // For devices that can't hover such as touch devices,
203
- // remove hover state as it can be stuck in that state (iOS).
204
- @media (hover: none) {
205
- .gem-c-accordion__section-button:hover {
206
- text-decoration: none;
207
- }
208
- }
209
-
210
- // Add toggle link with Chevron icon on right.
211
- .gem-c-accordion__toggle-link {
212
- display: block;
213
- color: $govuk-link-colour;
214
- text-transform: capitalize;
215
- margin-top: govuk-spacing(1);
216
- margin-bottom: govuk-spacing(1);
217
- @include govuk-font($size: 16, $line-height: 1);
218
-
219
- &:active {
220
- background: $govuk-link-active-colour;
221
- }
222
- }
223
-
224
- .gem-c-accordion__toggle-text {
225
- display: inline-block;
226
- // Setting width of the text so the icon doesn't shift left or right when
227
- // toggled:
228
- min-width: govuk-em(40, 16);
229
- }
230
-
231
- // On hover add underline to toggle link only:
232
- .gem-c-accordion__section-button:hover .gem-c-accordion__toggle-text {
233
- color: $govuk-link-hover-colour;
234
- @include govuk-link-decoration;
235
- @include govuk-link-hover-decoration;
236
- }
237
-
238
- // Ensure the correct focus sstate text colour and no underline:
239
- .gem-c-accordion__section-button:focus .gem-c-accordion__toggle-text {
240
- color: $govuk-focus-text-colour;
241
- text-decoration: none;
242
- }
243
-
244
- .gem-c-accordion__open-all-text {
245
- min-width: govuk-em(120, 16);
246
- display: inline-block;
247
- text-align: left;
248
- }
249
-
250
- .gem-c-accordion__open-all:hover {
251
- .gem-c-accordion__open-all-text {
252
- @include govuk-link-decoration;
253
- @include govuk-link-hover-decoration;
254
- }
255
- }
256
-
257
- .gem-c-accordion__open-all:focus .gem-c-accordion__open-all-text {
258
- text-decoration: none;
259
- }
260
-
261
- // Change the summary subheading size.
262
- .gem-c-accordion__section-summary {
263
- @include govuk-responsive-margin(1, "top");
264
- @include govuk-responsive-margin(2, "bottom");
265
- @include govuk-typography-common;
266
- @include govuk-typography-responsive($size: 19);
267
- }
268
-
269
- // Hide body of expanded sections
270
- .gem-c-accordion__section-content {
271
- display: none;
272
- @include govuk-responsive-padding(0, "top");
273
- @include govuk-responsive-padding(8, "bottom");
274
- }
275
-
276
- // Show the body of expanded sections
277
- .gem-c-accordion__section--expanded .gem-c-accordion__section-content {
278
- display: block;
279
- }
280
-
281
- // Remove the bottom margin from the last item inside the content
282
- .gem-c-accordion__section-content > :last-child {
283
- margin-bottom: 0;
284
- }
285
-
286
- // Condensed layout
287
- .gem-c-accordion--condensed {
288
- .gem-c-accordion__open-all {
289
- margin-bottom: govuk-spacing(5);
290
- @include govuk-font($size: 14, $line-height: 1);
291
- }
292
-
293
- .gem-c-accordion__section-button {
294
- @include govuk-typography-responsive($size: 19, $important: true);
295
- padding-top: govuk-spacing(1);
296
- padding-bottom: govuk-spacing(5);
297
- }
298
-
299
- // Reduce Chevron size
300
- .gem-c-accordion-nav__chevron {
301
- @include prefixed-transform($scale: .875);
302
- width: govuk-em(20, 14);
303
- height: govuk-em(20, 14);
304
- margin-left: govuk-em(5, 14);
305
- border: govuk-em(1, 14) solid;
306
- border-radius: govuk-em(100, 14);
307
-
308
- &:after {
309
- width: govuk-em(6, 14);
310
- height: govuk-em(6, 14);
311
- border-top: govuk-em(2, 14) solid;
312
- border-right: govuk-em(2, 14) solid;
313
- left: govuk-em(6, 14);
314
- bottom: govuk-em(5, 14);
315
- }
316
- }
317
-
318
- .gem-c-accordion-nav__chevron--down {
319
- @include prefixed-transform($rotate: 180deg, $scale: .875);
320
- }
321
-
322
- .gem-c-accordion__section-summary {
323
- @include govuk-typography-responsive($size: 16, $important: true);
324
- }
325
-
326
- .gem-c-accordion__toggle-link {
327
- @include govuk-font($size: 14, $line-height: 1);
328
- }
329
- }
330
- }
2
+ @import "govuk/components/accordion/accordion";
@@ -12,11 +12,11 @@ $share-button-height: 30px;
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
- @include govuk-focused-text;
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, $line-height: 1.4);
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(14, $line-height: 1);
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 1.5em;
116
- padding: 0 0 govuk-spacing(1);
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(14, $tablet-size: 16, $line-height: 1);
192
+ @include step-nav-font(15, $tablet-size: 19);
125
193
  }
126
194
 
127
195
  &:focus {
128
- @include step-nav-chevron-focus-state;
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: 25px, $tablet-line-height: 34px);
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(14, $line-height: 1.2);
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(14, $tablet-size: 16, $line-height: 1.2);
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
- .gem-c-accordion__section-content {
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
- .gem-c-accordion__section-button {
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
- .gem-c-accordion__section-summary {
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 "Show all sections" button and the "Chevron" icons.
30
- .gem-c-accordion__open-all,
31
- .gem-c-accordion__icon,
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
- );
@@ -45,7 +45,7 @@ module GovukPublishingComponents
45
45
  end
46
46
 
47
47
  def parse_documentation(file)
48
- { id: File.basename(file, ".yml") }.merge(YAML.load_file(file)).with_indifferent_access
48
+ { id: File.basename(file, ".yml") }.merge(YAML.unsafe_load_file(file)).with_indifferent_access
49
49
  end
50
50
 
51
51
  def app_documentation_directory