hmrc-frontend 4.9.1 → 5.0.2
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.
- package/hmrc/VERSION.txt +1 -1
- package/hmrc/components/list-with-actions/_list-with-actions.scss +19 -6
- package/hmrc/components/list-with-actions/template.njk +44 -27
- package/hmrc/{hmrc-frontend-4.9.1.min.css → hmrc-frontend-5.0.2.min.css} +2 -2
- package/hmrc/{hmrc-frontend-4.9.1.min.js → hmrc-frontend-5.0.2.min.js} +1 -1
- package/hmrc/{hmrc-frontend-ie8-4.9.1.min.css → hmrc-frontend-ie8-5.0.2.min.css} +2 -2
- package/hmrc/maps/hmrc-frontend-5.0.2.min.css.map +1 -0
- package/hmrc/maps/{hmrc-frontend-4.9.1.min.js.map → hmrc-frontend-5.0.2.min.js.map} +1 -1
- package/hmrc/maps/hmrc-frontend-ie8-5.0.2.min.css.map +1 -0
- package/package.json +1 -1
- package/hmrc/maps/hmrc-frontend-4.9.1.min.css.map +0 -1
- package/hmrc/maps/hmrc-frontend-ie8-4.9.1.min.css.map +0 -1
package/hmrc/VERSION.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
5.0.2
|
|
@@ -4,22 +4,35 @@
|
|
|
4
4
|
|
|
5
5
|
.hmrc-list-with-actions {
|
|
6
6
|
@include govuk-font($size: 19);
|
|
7
|
-
}
|
|
8
7
|
|
|
9
|
-
// Kept for backward compatibility with add-to-a-list
|
|
10
|
-
.hmrc-list-with-actions--short {
|
|
11
8
|
@include govuk-media-query($from: desktop) {
|
|
9
|
+
.hmrc-summary-list__key {
|
|
10
|
+
width: 50%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.hmrc-summary-list__actions {
|
|
14
|
+
width: 50%;
|
|
15
|
+
}
|
|
16
|
+
|
|
12
17
|
.hmrc-list-with-actions__name {
|
|
13
|
-
width:
|
|
18
|
+
width: 50%;
|
|
14
19
|
}
|
|
15
20
|
}
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
// Kept for backward compatibility with add-to-a-list
|
|
19
|
-
.hmrc-list-with-actions--
|
|
24
|
+
.hmrc-list-with-actions--short {
|
|
20
25
|
@include govuk-media-query($from: desktop) {
|
|
26
|
+
.hmrc-summary-list__key {
|
|
27
|
+
width: 30%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.hmrc-summary-list__actions {
|
|
31
|
+
width: 70%;
|
|
32
|
+
}
|
|
33
|
+
|
|
21
34
|
.hmrc-list-with-actions__name {
|
|
22
|
-
width:
|
|
35
|
+
width: 30%;
|
|
23
36
|
}
|
|
24
37
|
}
|
|
25
38
|
}
|
|
@@ -1,33 +1,50 @@
|
|
|
1
1
|
{%- macro _actionLink(action) %}
|
|
2
2
|
<a class="govuk-link {%- if action.classes %} {{ action.classes }}{% endif %}" href="{{ action.href }}" {%- for attribute, value in action.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
{%- if action.html -%}
|
|
4
|
+
{{ action.html | safe }}
|
|
5
|
+
{%- else -%}
|
|
6
|
+
{%- if action.visuallyHiddenText -%}
|
|
7
|
+
<span aria-hidden="true">{{ action.text }}</span>{#- strip spaces -#}
|
|
8
|
+
<span class="govuk-visually-hidden">{{ action.visuallyHiddenText }}</span>
|
|
9
|
+
{%- else -%}
|
|
10
|
+
{{ action.text }}
|
|
11
|
+
{%- endif -%}
|
|
12
|
+
{%- endif -%}
|
|
13
13
|
</a>
|
|
14
14
|
{% endmacro -%}
|
|
15
15
|
|
|
16
|
-
{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
16
|
+
{# Determine if we need 2 or 3 columns #}
|
|
17
|
+
{% set anyRowHasActions = false %}
|
|
18
|
+
{% for row in params.items %}
|
|
19
|
+
{% set anyRowHasActions = true if row.actions.length else anyRowHasActions %}
|
|
20
|
+
{% endfor -%}
|
|
21
|
+
|
|
22
|
+
{% if params.items.length %}
|
|
23
|
+
<dl class="govuk-summary-list hmrc-list-with-actions {%- if params.classes %} {{ params.classes }}{% endif %}"{% for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
24
|
+
{% for row in params.items %}
|
|
25
|
+
{% if row %}
|
|
26
|
+
<div class="govuk-summary-list__row {%- if anyRowHasActions and not (row.actions | length) %} govuk-summary-list__row--no-actions{% endif %} {%- if row.classes %} {{ row.classes }}{% endif %}">
|
|
27
|
+
<dt class="govuk-summary-list__key govuk-!-font-weight-regular hmrc-summary-list__key">
|
|
28
|
+
{{ row.name.html | safe if row.name.html else row.name.text }}
|
|
29
|
+
</dt>
|
|
30
|
+
{% if row.actions.length %}
|
|
31
|
+
<dd class="govuk-summary-list__actions hmrc-summary-list__actions">
|
|
32
|
+
{% if row.actions.length == 1 %}
|
|
33
|
+
{{ _actionLink(row.actions[0]) | indent(12) | trim }}
|
|
34
|
+
{% else %}
|
|
35
|
+
<ul class="govuk-summary-list__actions-list">
|
|
36
|
+
{% for action in row.actions %}
|
|
37
|
+
<li class="govuk-summary-list__actions-list-item">
|
|
38
|
+
{{ _actionLink(action) | indent(18) | trim }}
|
|
39
|
+
</li>
|
|
40
|
+
{% endfor %}
|
|
41
|
+
</ul>
|
|
42
|
+
{% endif %}
|
|
43
|
+
</dd>
|
|
44
|
+
{% endif %}
|
|
45
|
+
</div>
|
|
46
|
+
{% endif %}
|
|
31
47
|
{% endfor %}
|
|
32
|
-
</dl>
|
|
33
|
-
{% endif
|
|
48
|
+
</dl>
|
|
49
|
+
{% endif %}
|
|
50
|
+
|