govuk_publishing_components 28.5.0 → 28.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/track-select-change.js +4 -3
  3. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +21 -291
  4. data/app/assets/javascripts/govuk_publishing_components/components/button.js +1 -1
  5. data/app/assets/javascripts/govuk_publishing_components/components/character-count.js +1 -1
  6. data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +1 -1
  7. data/app/assets/javascripts/govuk_publishing_components/components/details.js +1 -1
  8. data/app/assets/javascripts/govuk_publishing_components/components/error-summary.js +1 -1
  9. data/app/assets/javascripts/govuk_publishing_components/components/layout-header.js +1 -1
  10. data/app/assets/javascripts/govuk_publishing_components/components/radio.js +1 -1
  11. data/app/assets/javascripts/govuk_publishing_components/components/skip-link.js +5 -0
  12. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +40 -37
  13. data/app/assets/javascripts/govuk_publishing_components/components/tabs.js +1 -1
  14. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/barchart-enhancement.js +2 -1
  15. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +8 -10
  16. data/app/assets/javascripts/govuk_publishing_components/lib/initial-focus.js +4 -3
  17. data/app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js +4 -3
  18. data/app/assets/javascripts/govuk_publishing_components/lib/toggle.js +4 -3
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -329
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +1 -1
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +95 -56
  22. data/app/assets/stylesheets/govuk_publishing_components/components/print/_accordion.scss +6 -17
  23. data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +0 -9
  24. data/app/views/govuk_publishing_components/components/_accordion.html.erb +31 -16
  25. data/app/views/govuk_publishing_components/components/_button.html.erb +1 -1
  26. data/app/views/govuk_publishing_components/components/_character_count.html.erb +2 -2
  27. data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +2 -2
  28. data/app/views/govuk_publishing_components/components/_error_message.html.erb +1 -1
  29. data/app/views/govuk_publishing_components/components/_error_summary.html.erb +0 -1
  30. data/app/views/govuk_publishing_components/components/_inset_text.html.erb +12 -1
  31. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +1 -1
  32. data/app/views/govuk_publishing_components/components/_modal_dialogue.html.erb +1 -1
  33. data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -1
  34. data/app/views/govuk_publishing_components/components/_skip_link.html.erb +1 -1
  35. data/app/views/govuk_publishing_components/components/docs/accordion.yml +2 -97
  36. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +1 -1
  37. data/app/views/govuk_publishing_components/components/docs/inset_text.yml +6 -0
  38. data/app/views/govuk_publishing_components/components/docs/share_links.yml +1 -1
  39. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +13 -13
  40. data/app/views/govuk_publishing_components/components/docs/tabs.yml +1 -1
  41. data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -1
  42. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +11 -11
  43. data/lib/govuk_publishing_components/version.rb +1 -1
  44. data/node_modules/govuk-frontend/govuk/all.js +294 -76
  45. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +274 -99
  46. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +169 -65
  47. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +37 -5
  48. data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +4 -4
  49. data/node_modules/govuk-frontend/govuk/components/button/button.js +2 -2
  50. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +3 -3
  51. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +15 -2
  52. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +8 -10
  53. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +52 -15
  54. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +0 -2
  55. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +31 -0
  56. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +25 -25
  57. data/node_modules/govuk-frontend/govuk/components/details/details.js +2 -2
  58. data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +1 -0
  59. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +8 -8
  60. data/node_modules/govuk-frontend/govuk/components/error-message/template.njk +2 -2
  61. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +24 -3
  62. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +25 -16
  63. data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +6 -0
  64. data/node_modules/govuk-frontend/govuk/components/error-summary/template.njk +2 -1
  65. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +4 -4
  66. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +3 -37
  67. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +119 -15
  68. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +6 -0
  69. data/node_modules/govuk-frontend/govuk/components/footer/template.njk +1 -1
  70. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +10 -4
  71. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +11 -11
  72. data/node_modules/govuk-frontend/govuk/components/header/header.js +4 -4
  73. data/node_modules/govuk-frontend/govuk/components/header/template.njk +4 -3
  74. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +1 -3
  75. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +1 -1
  76. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +40 -40
  77. data/node_modules/govuk-frontend/govuk/components/input/template.njk +4 -3
  78. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +499 -2
  79. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +2 -2
  80. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +0 -8
  81. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +44 -45
  82. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +4 -4
  83. data/node_modules/govuk-frontend/govuk/components/radios/template.njk +2 -9
  84. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +6 -1
  85. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +3 -3
  86. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +13 -0
  87. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +9 -9
  88. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +1108 -0
  89. data/node_modules/govuk-frontend/govuk/components/skip-link/template.njk +1 -1
  90. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +20 -23
  91. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +86 -1
  92. data/node_modules/govuk-frontend/govuk/components/summary-list/template.njk +1 -4
  93. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +2 -2
  94. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +2 -2
  95. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -5
  96. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +2 -2
  97. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +1 -1
  98. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +4 -4
  99. data/node_modules/govuk-frontend/govuk/core/_all.scss +0 -1
  100. data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +0 -6
  101. data/node_modules/govuk-frontend/govuk/core/_links.scss +0 -6
  102. data/node_modules/govuk-frontend/govuk/core/_lists.scss +0 -6
  103. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +0 -6
  104. data/node_modules/govuk-frontend/govuk/core/_typography.scss +0 -6
  105. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  106. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +15 -30
  107. data/node_modules/govuk-frontend/govuk/{core → objects}/_template.scss +1 -5
  108. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +0 -6
  109. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +0 -6
  110. data/node_modules/govuk-frontend/govuk/overrides/_text-align.scss +0 -6
  111. data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +0 -6
  112. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +0 -6
  113. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
  114. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +0 -10
  115. data/node_modules/govuk-frontend/govuk/tools/_all.scss +0 -1
  116. data/node_modules/govuk-frontend/package.json +1 -1
  117. metadata +8 -7
  118. data/node_modules/govuk-frontend/govuk/tools/_iff.scss +0 -17
@@ -1,3 +1,3 @@
1
- <a href="{{ params.href | default('#content') }}" class="govuk-skip-link{%- if params.classes %} {{ params.classes }}{% endif -%}"{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
1
+ <a href="{{ params.href | default('#content') }}" class="govuk-skip-link{%- if params.classes %} {{ params.classes }}{% endif -%}"{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %} data-module="govuk-skip-link">
2
2
  {{- params.html | safe if params.html else params.text -}}
3
3
  </a>
@@ -6,21 +6,35 @@
6
6
  display: table;
7
7
  width: 100%;
8
8
  table-layout: fixed; // Required to allow us to wrap words that overflow.
9
+ border-collapse: collapse;
9
10
  }
10
11
  margin: 0; // Reset default user agent styles
11
12
  @include govuk-responsive-margin(6, "bottom");
12
13
  }
13
14
 
14
15
  .govuk-summary-list__row {
16
+ border-bottom: 1px solid $govuk-border-colour;
17
+
15
18
  @include govuk-media-query($until: tablet) {
16
19
  margin-bottom: govuk-spacing(3);
17
- border-bottom: 1px solid $govuk-border-colour;
18
20
  }
19
21
  @include govuk-media-query($from: tablet) {
20
22
  display: table-row;
21
23
  }
22
24
  }
23
25
 
26
+ // Provide an empty 'cell' for rows that don't have actions – otherwise the
27
+ // bottom border is not drawn for that part of the row in some browsers.
28
+ .govuk-summary-list__row--no-actions {
29
+ @include govuk-media-query($from: tablet) {
30
+ &:after {
31
+ content: "";
32
+ display: table-cell;
33
+ width: 20%;
34
+ }
35
+ }
36
+ }
37
+
24
38
  .govuk-summary-list__key,
25
39
  .govuk-summary-list__value,
26
40
  .govuk-summary-list__actions {
@@ -31,7 +45,6 @@
31
45
  padding-top: govuk-spacing(2);
32
46
  padding-right: govuk-spacing(4);
33
47
  padding-bottom: govuk-spacing(2);
34
- border-bottom: 1px solid $govuk-border-colour;
35
48
  }
36
49
  }
37
50
 
@@ -63,16 +76,6 @@
63
76
  @include govuk-media-query($until: tablet) {
64
77
  margin-bottom: govuk-spacing(3);
65
78
  }
66
- @include govuk-media-query($from: tablet) {
67
- width: 50%;
68
- }
69
- }
70
-
71
- // Expand width when value is last column (no action)
72
- .govuk-summary-list__value:last-child {
73
- @include govuk-media-query($from: tablet) {
74
- width: 70%;
75
- }
76
79
  }
77
80
 
78
81
  .govuk-summary-list__value > p {
@@ -109,36 +112,30 @@
109
112
 
110
113
  // No border on entire summary list
111
114
  .govuk-summary-list--no-border {
112
- @include govuk-media-query($until: tablet) {
113
- .govuk-summary-list__row {
114
- border: 0;
115
- }
115
+ .govuk-summary-list__row {
116
+ border: 0;
116
117
  }
117
118
 
119
+ // Increase padding by 1px to compensate for 'missing' border
118
120
  @include govuk-media-query($from: tablet) {
119
121
  .govuk-summary-list__key,
120
122
  .govuk-summary-list__value,
121
123
  .govuk-summary-list__actions {
122
- // Remove 1px border, add 1px height back on
123
124
  padding-bottom: govuk-spacing(2) + 1px;
124
- border: 0;
125
125
  }
126
126
  }
127
127
  }
128
128
 
129
129
  // No border on specific rows
130
130
  .govuk-summary-list__row--no-border {
131
- @include govuk-media-query($until: tablet) {
132
- border: 0;
133
- }
131
+ border: 0;
134
132
 
133
+ // Increase padding by 1px to compensate for 'missing' border
135
134
  @include govuk-media-query($from: tablet) {
136
135
  .govuk-summary-list__key,
137
136
  .govuk-summary-list__value,
138
137
  .govuk-summary-list__actions {
139
- // Remove 1px border, add 1px height back on
140
138
  padding-bottom: govuk-spacing(2) + 1px;
141
- border: 0;
142
139
  }
143
140
  }
144
141
  }
@@ -148,7 +148,92 @@
148
148
  }
149
149
  ]
150
150
  },
151
- "html": "<dl class=\"govuk-summary-list\">\n \n \n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Name\n </dt>\n <dd class=\"govuk-summary-list__value\">\n Firstname Lastname\n </dd>\n \n <dd class=\"govuk-summary-list__actions\">\n \n <ul class=\"govuk-summary-list__actions-list\">\n \n <li class=\"govuk-summary-list__actions-list-item\">\n <a class=\"govuk-link\" href=\"#\">\n Edit<span class=\"govuk-visually-hidden\"> name</span>\n </a>\n </li>\n \n <li class=\"govuk-summary-list__actions-list-item\">\n <a class=\"govuk-link\" href=\"#\">\n Delete<span class=\"govuk-visually-hidden\"> name</span>\n </a>\n </li>\n \n </ul>\n \n </dd>\n \n </div>\n \n \n \n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Date of birth\n </dt>\n <dd class=\"govuk-summary-list__value\">\n 13/08/1980\n </dd>\n \n \n <span class=\"govuk-summary-list__actions\"></span>\n \n </div>\n \n \n \n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Contact information\n </dt>\n <dd class=\"govuk-summary-list__value\">\n <p class=\"govuk-body\">\n email@email.com\n </p>\n <p class=\"govuk-body\">\n Address line 1<br>\n Address line 2<br>\n Address line 3<br>\n Address line 4<br>\n Address line 5\n </p>\n </dd>\n \n \n <span class=\"govuk-summary-list__actions\"></span>\n \n </div>\n \n \n</dl>",
151
+ "html": "<dl class=\"govuk-summary-list\">\n \n \n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Name\n </dt>\n <dd class=\"govuk-summary-list__value\">\n Firstname Lastname\n </dd>\n \n <dd class=\"govuk-summary-list__actions\">\n \n <ul class=\"govuk-summary-list__actions-list\">\n \n <li class=\"govuk-summary-list__actions-list-item\">\n <a class=\"govuk-link\" href=\"#\">\n Edit<span class=\"govuk-visually-hidden\"> name</span>\n </a>\n </li>\n \n <li class=\"govuk-summary-list__actions-list-item\">\n <a class=\"govuk-link\" href=\"#\">\n Delete<span class=\"govuk-visually-hidden\"> name</span>\n </a>\n </li>\n \n </ul>\n \n </dd>\n \n </div>\n \n \n \n <div class=\"govuk-summary-list__row govuk-summary-list__row--no-actions\">\n <dt class=\"govuk-summary-list__key\">\n Date of birth\n </dt>\n <dd class=\"govuk-summary-list__value\">\n 13/08/1980\n </dd>\n \n </div>\n \n \n \n <div class=\"govuk-summary-list__row govuk-summary-list__row--no-actions\">\n <dt class=\"govuk-summary-list__key\">\n Contact information\n </dt>\n <dd class=\"govuk-summary-list__value\">\n <p class=\"govuk-body\">\n email@email.com\n </p>\n <p class=\"govuk-body\">\n Address line 1<br>\n Address line 2<br>\n Address line 3<br>\n Address line 4<br>\n Address line 5\n </p>\n </dd>\n \n </div>\n \n \n</dl>",
152
+ "hidden": false
153
+ },
154
+ {
155
+ "name": "with no first action",
156
+ "options": {
157
+ "rows": [
158
+ {
159
+ "key": {
160
+ "text": "Name"
161
+ },
162
+ "value": {
163
+ "text": "Sarah Philips"
164
+ }
165
+ },
166
+ {
167
+ "key": {
168
+ "text": "Date of birth"
169
+ },
170
+ "value": {
171
+ "text": "5 January 1978"
172
+ },
173
+ "actions": {
174
+ "items": [
175
+ {
176
+ "href": "#",
177
+ "text": "Change",
178
+ "visuallyHiddenText": "date of birth"
179
+ }
180
+ ]
181
+ }
182
+ },
183
+ {
184
+ "key": {
185
+ "text": "Address"
186
+ },
187
+ "value": {
188
+ "html": "72 Guild Street<br>\nLondon<br>\nSE23 6FH\n"
189
+ },
190
+ "actions": {
191
+ "items": [
192
+ {
193
+ "href": "#",
194
+ "text": "Change",
195
+ "visuallyHiddenText": "address"
196
+ }
197
+ ]
198
+ }
199
+ },
200
+ {
201
+ "key": {
202
+ "text": "Contact details"
203
+ },
204
+ "value": {
205
+ "html": "07700 900457<br>\nsarah.phillips@example.com\n"
206
+ },
207
+ "actions": {
208
+ "items": [
209
+ {
210
+ "href": "#",
211
+ "text": "Change",
212
+ "visuallyHiddenText": "contact details"
213
+ }
214
+ ]
215
+ }
216
+ },
217
+ {
218
+ "key": {
219
+ "text": "Licence period"
220
+ },
221
+ "value": {
222
+ "html": "<p class=\"govuk-body\">This is a longer paragraph of text provided by the user to provide additional information.</p>\n<p class=\"govuk-body\">This is a second paragraph of text provided by the user.</p>\n"
223
+ },
224
+ "actions": {
225
+ "items": [
226
+ {
227
+ "href": "#",
228
+ "text": "Change",
229
+ "visuallyHiddenText": "licence period"
230
+ }
231
+ ]
232
+ }
233
+ }
234
+ ]
235
+ },
236
+ "html": "<dl class=\"govuk-summary-list\">\n \n \n <div class=\"govuk-summary-list__row govuk-summary-list__row--no-actions\">\n <dt class=\"govuk-summary-list__key\">\n Name\n </dt>\n <dd class=\"govuk-summary-list__value\">\n Sarah Philips\n </dd>\n \n </div>\n \n \n \n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Date of birth\n </dt>\n <dd class=\"govuk-summary-list__value\">\n 5 January 1978\n </dd>\n \n <dd class=\"govuk-summary-list__actions\">\n \n <a class=\"govuk-link\" href=\"#\">\n Change<span class=\"govuk-visually-hidden\"> date of birth</span>\n </a>\n \n </dd>\n \n </div>\n \n \n \n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Address\n </dt>\n <dd class=\"govuk-summary-list__value\">\n 72 Guild Street<br>\n London<br>\n SE23 6FH\n </dd>\n \n <dd class=\"govuk-summary-list__actions\">\n \n <a class=\"govuk-link\" href=\"#\">\n Change<span class=\"govuk-visually-hidden\"> address</span>\n </a>\n \n </dd>\n \n </div>\n \n \n \n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Contact details\n </dt>\n <dd class=\"govuk-summary-list__value\">\n 07700 900457<br>\n sarah.phillips@example.com\n </dd>\n \n <dd class=\"govuk-summary-list__actions\">\n \n <a class=\"govuk-link\" href=\"#\">\n Change<span class=\"govuk-visually-hidden\"> contact details</span>\n </a>\n \n </dd>\n \n </div>\n \n \n \n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Licence period\n </dt>\n <dd class=\"govuk-summary-list__value\">\n <p class=\"govuk-body\">This is a longer paragraph of text provided by the user to provide additional information.</p>\n <p class=\"govuk-body\">This is a second paragraph of text provided by the user.</p>\n </dd>\n \n <dd class=\"govuk-summary-list__actions\">\n \n <a class=\"govuk-link\" href=\"#\">\n Change<span class=\"govuk-visually-hidden\"> licence period</span>\n </a>\n \n </dd>\n \n </div>\n \n \n</dl>",
152
237
  "hidden": false
153
238
  },
154
239
  {
@@ -16,7 +16,7 @@
16
16
  <dl class="govuk-summary-list {%- if params.classes %} {{ params.classes }}{% endif %}"{% for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
17
17
  {% for row in params.rows %}
18
18
  {% if row %}
19
- <div class="govuk-summary-list__row {%- if row.classes %} {{ row.classes }}{% endif %}">
19
+ <div class="govuk-summary-list__row {%- if anyRowHasActions and not row.actions.items %} govuk-summary-list__row--no-actions{% endif %} {%- if row.classes %} {{ row.classes }}{% endif %}">
20
20
  <dt class="govuk-summary-list__key {%- if row.key.classes %} {{ row.key.classes }}{% endif %}">
21
21
  {{ row.key.html | safe if row.key.html else row.key.text }}
22
22
  </dt>
@@ -37,9 +37,6 @@
37
37
  </ul>
38
38
  {% endif %}
39
39
  </dd>
40
- {% elseif anyRowHasActions %}
41
- {# Add dummy column to extend border #}
42
- <span class="govuk-summary-list__actions"></span>
43
40
  {% endif %}
44
41
  </div>
45
42
  {% endif %}
@@ -24,7 +24,7 @@
24
24
  &:before {
25
25
  @include govuk-text-colour;
26
26
  content: "\2014 "; // "— "
27
- margin-left: - govuk-spacing(5);
27
+ margin-left: govuk-spacing(-5);
28
28
  padding-right: govuk-spacing(1);
29
29
  }
30
30
  }
@@ -77,7 +77,7 @@
77
77
 
78
78
  position: relative;
79
79
 
80
- margin-top: - govuk-spacing(1);
80
+ margin-top: govuk-spacing(-1);
81
81
 
82
82
  // Compensation for border (otherwise we get a shift)
83
83
  margin-bottom: -$border-width;
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
- typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) :
4
- (global.GOVUKFrontend = factory());
3
+ typeof define === 'function' && define.amd ? define('GOVUKFrontend.Tabs', factory) :
4
+ (global.GOVUKFrontend = global.GOVUKFrontend || {}, global.GOVUKFrontend.Tabs = factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
7
  (function(undefined) {
@@ -34,11 +34,6 @@
34
34
  }
35
35
  }
36
36
 
37
- // Deprecated. We'll remove this class in a future release. Use `.govuk-tag--grey` instead.
38
- .govuk-tag--inactive {
39
- background-color: govuk-colour("dark-grey", $legacy: "grey-1");
40
- }
41
-
42
37
  .govuk-tag--grey {
43
38
  color: govuk-shade(govuk-colour("dark-grey", $legacy: "grey-1"), 30);
44
39
  background: govuk-tint(govuk-colour("dark-grey", $legacy: "grey-1"), 90);
@@ -13,9 +13,9 @@
13
13
  "name": "inactive",
14
14
  "options": {
15
15
  "text": "alpha",
16
- "classes": "govuk-tag--inactive"
16
+ "classes": "govuk-tag--grey"
17
17
  },
18
- "html": "<strong class=\"govuk-tag govuk-tag--inactive\">\n alpha\n</strong>",
18
+ "html": "<strong class=\"govuk-tag govuk-tag--grey\">\n alpha\n</strong>",
19
19
  "hidden": false
20
20
  },
21
21
  {
@@ -38,7 +38,7 @@
38
38
  }
39
39
 
40
40
  .govuk-textarea--error {
41
- border: $govuk-border-width-form-element-error solid $govuk-error-colour;
41
+ border-color: $govuk-error-colour;
42
42
 
43
43
  &:focus {
44
44
  border-color: $govuk-input-border-colour;
@@ -40,7 +40,7 @@
40
40
  "text": "You must provide an explanation"
41
41
  }
42
42
  },
43
- "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"no-ni-reason\">\n Why can’t you provide a National Insurance number?\n </label>\n\n\n \n \n <span id=\"no-ni-reason-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> You must provide an explanation\n </span>\n\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"no-ni-reason\" name=\"no-ni-reason\" rows=\"5\" aria-describedby=\"no-ni-reason-error\"></textarea>\n</div>",
43
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"no-ni-reason\">\n Why can’t you provide a National Insurance number?\n </label>\n\n\n \n \n <p id=\"no-ni-reason-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> You must provide an explanation\n </p>\n\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"no-ni-reason\" name=\"no-ni-reason\" rows=\"5\" aria-describedby=\"no-ni-reason-error\"></textarea>\n</div>",
44
44
  "hidden": false
45
45
  },
46
46
  {
@@ -206,7 +206,7 @@
206
206
  "text": "Error message"
207
207
  }
208
208
  },
209
- "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"textarea-with-error\">\n Textarea with error\n </label>\n\n\n \n \n <span id=\"textarea-with-error-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </span>\n\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"textarea-with-error\" name=\"textarea-with-error\" rows=\"5\" aria-describedby=\"some-id textarea-with-error-error\"></textarea>\n</div>",
209
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"textarea-with-error\">\n Textarea with error\n </label>\n\n\n \n \n <p id=\"textarea-with-error-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </p>\n\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"textarea-with-error\" name=\"textarea-with-error\" rows=\"5\" aria-describedby=\"some-id textarea-with-error-error\"></textarea>\n</div>",
210
210
  "hidden": true
211
211
  },
212
212
  {
@@ -224,7 +224,7 @@
224
224
  "text": "Hint"
225
225
  }
226
226
  },
227
- "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"with-hint-error\">\n With hint and error\n </label>\n\n \n \n <div id=\"with-hint-error-hint\" class=\"govuk-hint\">\n Hint\n </div>\n\n\n \n \n <span id=\"with-hint-error-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </span>\n\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"with-hint-error\" name=\"with-hint-error\" rows=\"5\" aria-describedby=\"with-hint-error-hint with-hint-error-error\"></textarea>\n</div>",
227
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"with-hint-error\">\n With hint and error\n </label>\n\n \n \n <div id=\"with-hint-error-hint\" class=\"govuk-hint\">\n Hint\n </div>\n\n\n \n \n <p id=\"with-hint-error-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </p>\n\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"with-hint-error\" name=\"with-hint-error\" rows=\"5\" aria-describedby=\"with-hint-error-hint with-hint-error-error\"></textarea>\n</div>",
228
228
  "hidden": true
229
229
  },
230
230
  {
@@ -243,7 +243,7 @@
243
243
  "text": "Hint"
244
244
  }
245
245
  },
246
- "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"with-hint-error-describedby\">\n With hint, error and describedBy\n </label>\n\n \n \n <div id=\"with-hint-error-describedby-hint\" class=\"govuk-hint\">\n Hint\n </div>\n\n\n \n \n <span id=\"with-hint-error-describedby-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </span>\n\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"with-hint-error-describedby\" name=\"with-hint-error-describedby\" rows=\"5\" aria-describedby=\"some-id with-hint-error-describedby-hint with-hint-error-describedby-error\"></textarea>\n</div>",
246
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"with-hint-error-describedby\">\n With hint, error and describedBy\n </label>\n\n \n \n <div id=\"with-hint-error-describedby-hint\" class=\"govuk-hint\">\n Hint\n </div>\n\n\n \n \n <p id=\"with-hint-error-describedby-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </p>\n\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"with-hint-error-describedby\" name=\"with-hint-error-describedby\" rows=\"5\" aria-describedby=\"some-id with-hint-error-describedby-hint with-hint-error-describedby-error\"></textarea>\n</div>",
247
247
  "hidden": true
248
248
  }
249
249
  ]
@@ -1,6 +1,5 @@
1
1
  @import "links";
2
2
  @import "lists";
3
- @import "template";
4
3
  @import "typography";
5
4
  @import "section-break";
6
5
  @import "global-styles";
@@ -1,9 +1,3 @@
1
- @if not mixin-exists("govuk-exports") {
2
- @warn "Importing items from the core layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
- }
4
-
5
- @import "../base";
6
-
7
1
  @import "links";
8
2
  @import "typography";
9
3
 
@@ -1,9 +1,3 @@
1
- @if not mixin-exists("govuk-exports") {
2
- @warn "Importing items from the core layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
- }
4
-
5
- @import "../base";
6
-
7
1
  @include govuk-exports("govuk/core/links") {
8
2
 
9
3
  %govuk-link {
@@ -1,9 +1,3 @@
1
- @if not mixin-exists("govuk-exports") {
2
- @warn "Importing items from the core layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
- }
4
-
5
- @import "../base";
6
-
7
1
  @include govuk-exports("govuk/core/lists") {
8
2
 
9
3
  %govuk-list {
@@ -1,9 +1,3 @@
1
- @if not mixin-exists("govuk-exports") {
2
- @warn "Importing items from the core layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
- }
4
-
5
- @import "../base";
6
-
7
1
  @include govuk-exports("govuk/core/section-break") {
8
2
 
9
3
  %govuk-section-break {
@@ -1,9 +1,3 @@
1
- @if not mixin-exists("govuk-exports") {
2
- @warn "Importing items from the core layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
- }
4
-
5
- @import "../base";
6
-
7
1
  @include govuk-exports("govuk/core/typography") {
8
2
 
9
3
  // Headings
@@ -2,4 +2,5 @@
2
2
  @import "form-group";
3
3
  @import "grid";
4
4
  @import "main-wrapper";
5
+ @import "template";
5
6
  @import "width-container";
@@ -21,37 +21,22 @@
21
21
  // </div>
22
22
  // </div>
23
23
 
24
- /// @deprecated Replace this mixin with more direct references to the [spacing
25
- /// mixins](https://design-system.service.gov.uk/styles/spacing/#spacing-on-custom-components).
26
- @mixin govuk-main-wrapper {
27
- // In IE11 the `main` element can be used, but is not recognized –
28
- // meaning it's not defined in IE's default style sheet,
29
- // so it uses CSS initial value, which is inline.
30
- display: block;
31
- padding-top: govuk-spacing(4);
32
- padding-bottom: govuk-spacing(4);
33
-
34
- @include govuk-media-query($from: tablet) {
35
- // This spacing is manually adjusted to replicate the margin of
36
- // govuk-heading-xl (50px) minus the spacing of back link and
37
- // breadcrumbs (10px)
38
- padding-top: govuk-spacing(7);
39
- padding-bottom: govuk-spacing(7);
40
- }
41
- }
42
-
43
- /// Use govuk-main-wrapper--l when you page does not have Breadcrumbs, phase
44
- /// banners or back links.
45
- ///
46
- /// @deprecated Replace this mixin with more direct references to the [spacing
47
- /// mixins](https://design-system.service.gov.uk/styles/spacing/#spacing-on-custom-components).
48
- @mixin govuk-main-wrapper--l {
49
- @include govuk-responsive-padding(8, "top");
50
- }
51
-
52
24
  @include govuk-exports("govuk/objects/main-wrapper") {
53
25
  .govuk-main-wrapper {
54
- @include govuk-main-wrapper;
26
+ // In IE11 the `main` element can be used, but is not recognized –
27
+ // meaning it's not defined in IE's default style sheet,
28
+ // so it uses CSS initial value, which is inline.
29
+ display: block;
30
+ padding-top: govuk-spacing(4);
31
+ padding-bottom: govuk-spacing(4);
32
+
33
+ @include govuk-media-query($from: tablet) {
34
+ // This spacing is manually adjusted to replicate the margin of
35
+ // govuk-heading-xl (50px) minus the spacing of back link and
36
+ // breadcrumbs (10px)
37
+ padding-top: govuk-spacing(7);
38
+ padding-bottom: govuk-spacing(7);
39
+ }
55
40
  }
56
41
 
57
42
  // Using the `.govuk-main-wrapper--auto-spacing` modifier should apply the
@@ -63,6 +48,6 @@
63
48
  // `govuk-main-wrapper--l` modifier instead.
64
49
  .govuk-main-wrapper--auto-spacing:first-child,
65
50
  .govuk-main-wrapper--l {
66
- @include govuk-main-wrapper--l;
51
+ @include govuk-responsive-padding(8, "top");
67
52
  }
68
53
  }
@@ -1,10 +1,6 @@
1
- @if not mixin-exists("govuk-exports") {
2
- @warn "Importing items from the core layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
- }
4
-
5
1
  @import "../base";
6
2
 
7
- @include govuk-exports("govuk/core/template") {
3
+ @include govuk-exports("govuk/objects/template") {
8
4
 
9
5
  // Applied to the <html> element
10
6
  .govuk-template {
@@ -1,9 +1,3 @@
1
- @if not mixin-exists("govuk-exports") {
2
- @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
- }
4
-
5
- @import "../base";
6
-
7
1
  // stylelint-disable declaration-no-important
8
2
  @include govuk-exports("govuk/overrides/display") {
9
3
  .govuk-\!-display-inline {
@@ -1,9 +1,3 @@
1
- @if not mixin-exists("govuk-exports") {
2
- @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
- }
4
-
5
- @import "../base";
6
-
7
1
  ////
8
2
  /// @group overrides
9
3
  ////
@@ -1,9 +1,3 @@
1
- @if not mixin-exists("govuk-exports") {
2
- @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
- }
4
-
5
- @import "../base";
6
-
7
1
  // stylelint-disable declaration-no-important
8
2
  @include govuk-exports("govuk/overrides/text-align") {
9
3
  .govuk-\!-text-align-left {
@@ -1,9 +1,3 @@
1
- @if not mixin-exists("govuk-exports") {
2
- @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
- }
4
-
5
- @import "../base";
6
-
7
1
  @include govuk-exports("govuk/overrides/typography") {
8
2
  // Font size and line height
9
3
 
@@ -1,9 +1,3 @@
1
- @if not mixin-exists("govuk-exports") {
2
- @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
- }
4
-
5
- @import "../base";
6
-
7
1
  // stylelint-disable declaration-no-important
8
2
  @include govuk-exports("govuk/overrides/width") {
9
3
  .govuk-\!-width-full {
@@ -54,6 +54,9 @@ $govuk-colours-organisations: (
54
54
  colour: #cf102d,
55
55
  colour-websafe: #005ea5
56
56
  ),
57
+ "department-for-levelling-up-housing-and-communities": (
58
+ colour: #012169,
59
+ ),
57
60
  "department-for-transport": (
58
61
  colour: #006c56,
59
62
  colour-websafe: #398373
@@ -73,16 +73,6 @@ $govuk-border-width-narrow: 4px !default;
73
73
 
74
74
  $govuk-border-width-form-element: 2px !default;
75
75
 
76
- /// Form control border width when in error state
77
- ///
78
- /// @type Number
79
- /// @access public
80
- /// @deprecated Use $govuk-border-width-form-element instead. There should be no
81
- /// difference in thickness for inputs in the error state, in order to
82
- /// maintain a distinct focus state.
83
-
84
- $govuk-border-width-form-element-error: 2px !default;
85
-
86
76
  /// Form group border width when in error state
87
77
  ///
88
78
  /// @type Number
@@ -2,7 +2,6 @@
2
2
  @import "exports";
3
3
  @import "font-url";
4
4
  @import "ie8";
5
- @import "iff";
6
5
  @import "image-url";
7
6
  @import "px-to-em";
8
7
  @import "px-to-rem";
@@ -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.14.0",
4
+ "version": "4.0.1",
5
5
  "main": "govuk/all.js",
6
6
  "sass": "govuk/all.scss",
7
7
  "engines": {