hmrc-frontend 5.20.0 → 5.22.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.
- package/hmrc/VERSION.txt +1 -1
- package/hmrc/{accessible-autocomplete-5.20.0.css → accessible-autocomplete-5.22.0.css} +1 -1
- package/hmrc/{accessible-autocomplete-5.20.0.js → accessible-autocomplete-5.22.0.js} +0 -0
- package/hmrc/all.js +0 -1287
- package/hmrc/components/_all.scss +0 -1
- package/hmrc/components/character-count/template.njk +59 -43
- package/hmrc/components/header/template.njk +2 -2
- package/hmrc/{hmrc-frontend-5.20.0.min.css → hmrc-frontend-5.22.0.min.css} +2 -2
- package/hmrc/hmrc-frontend-5.22.0.min.js +3 -0
- package/hmrc/{hmrc-frontend-ie8-5.20.0.min.css → hmrc-frontend-ie8-5.22.0.min.css} +2 -2
- package/hmrc/maps/{accessible-autocomplete-5.20.0.css.map → accessible-autocomplete-5.22.0.css.map} +1 -1
- package/hmrc/maps/hmrc-frontend-5.22.0.min.css.map +1 -0
- package/hmrc/maps/hmrc-frontend-5.22.0.min.js.map +1 -0
- package/hmrc/maps/hmrc-frontend-ie8-5.22.0.min.css.map +1 -0
- package/package.json +1 -1
- package/hmrc/components/character-count/_character-count.scss +0 -25
- package/hmrc/components/character-count/character-count.js +0 -275
- package/hmrc/hmrc-frontend-5.20.0.min.js +0 -3
- package/hmrc/maps/hmrc-frontend-5.20.0.min.css.map +0 -1
- package/hmrc/maps/hmrc-frontend-5.20.0.min.js.map +0 -1
- package/hmrc/maps/hmrc-frontend-ie8-5.20.0.min.css.map +0 -1
|
@@ -1,45 +1,61 @@
|
|
|
1
1
|
{% set language = params.language | default('en') %}
|
|
2
|
-
{% from "govuk/components/
|
|
3
|
-
{% from "govuk/components/hint/macro.njk" import govukHint %}
|
|
4
|
-
|
|
5
|
-
<div class="hmrc-character-count" data-module="hmrc-character-count" data-language="{{ language }}"
|
|
6
|
-
{%- if params.maxlength %} data-maxlength="{{ params.maxlength }}"{% endif %}
|
|
7
|
-
{%- if params.threshold %} data-threshold="{{ params.threshold }}"{% endif %}
|
|
8
|
-
{%- if params.maxwords %} data-maxwords="{{ params.maxwords }}"{% endif %}>
|
|
9
|
-
{{ govukTextarea({
|
|
10
|
-
id: params.id,
|
|
11
|
-
name: params.name,
|
|
12
|
-
describedBy: params.id + '-info',
|
|
13
|
-
rows: params.rows,
|
|
14
|
-
spellcheck: params.spellcheck,
|
|
15
|
-
value: params.value,
|
|
16
|
-
formGroup: params.formGroup,
|
|
17
|
-
classes: 'hmrc-js-character-count' + (' govuk-textarea--error' if params.errorMessage) + (' ' + params.classes if params.classes),
|
|
18
|
-
label: {
|
|
19
|
-
html: params.label.html,
|
|
20
|
-
text: params.label.text,
|
|
21
|
-
classes: params.label.classes,
|
|
22
|
-
isPageHeading: params.label.isPageHeading,
|
|
23
|
-
attributes: params.label.attributes,
|
|
24
|
-
for: params.id
|
|
25
|
-
},
|
|
26
|
-
hint: params.hint,
|
|
27
|
-
errorMessage: params.errorMessage,
|
|
28
|
-
attributes: params.attributes
|
|
29
|
-
}) }}
|
|
30
|
-
{% if language === 'cy' %}
|
|
31
|
-
{{ govukHint({
|
|
32
|
-
text: 'Gallwch nodi hyd at ' + (params.maxlength or params.maxwords) + (' o eiriau' if params.maxwords else ' o gymeriadau'),
|
|
33
|
-
id: params.id + '-info',
|
|
34
|
-
classes: 'hmrc-character-count__message' + (' ' + params.countMessage.classes if params.countMessage.classes)
|
|
35
|
-
}) }}
|
|
36
|
-
{% else %}
|
|
37
|
-
{{ govukHint({
|
|
38
|
-
text: 'You can enter up to ' + (params.maxlength or params.maxwords) + (' words' if params.maxwords else ' characters'),
|
|
39
|
-
id: params.id + '-info',
|
|
40
|
-
classes: 'hmrc-character-count__message' + (' ' + params.countMessage.classes if params.countMessage.classes)
|
|
41
|
-
}) }}
|
|
42
|
-
{% endif %}
|
|
43
|
-
</div>
|
|
44
|
-
|
|
2
|
+
{% from "govuk/components/character-count/macro.njk" import govukCharacterCount %}
|
|
45
3
|
|
|
4
|
+
{% if language === 'cy' %}
|
|
5
|
+
{{ govukCharacterCount({
|
|
6
|
+
name: params.name,
|
|
7
|
+
id: params.id,
|
|
8
|
+
rows: params.rows,
|
|
9
|
+
value: params.value,
|
|
10
|
+
maxlength: params.maxlength,
|
|
11
|
+
maxwords: params.maxwords,
|
|
12
|
+
threshold: params.threshold,
|
|
13
|
+
label: params.label,
|
|
14
|
+
hint: params.hint,
|
|
15
|
+
errorMessage: params.errorMessage,
|
|
16
|
+
formGroup: params.formGroup,
|
|
17
|
+
classes: params.classes,
|
|
18
|
+
attributes: params.attributes,
|
|
19
|
+
spellcheck: params.spellcheck,
|
|
20
|
+
countMessage: params.countMessage,
|
|
21
|
+
textareaDescriptionText: 'Gallwch nodi hyd at ' + (params.maxlength or params.maxwords) + (' o eiriau' if params.maxwords else ' o gymeriadau'),
|
|
22
|
+
charactersUnderLimitText: {
|
|
23
|
+
other: 'Mae gennych %{count} o gymeriadau yn weddill',
|
|
24
|
+
one: 'Mae gennych 1 cymeriad yn weddill'
|
|
25
|
+
},
|
|
26
|
+
charactersAtLimitText: 'Mae gennych 0 o gymeriadau yn weddill',
|
|
27
|
+
charactersOverLimitText: {
|
|
28
|
+
other: 'Mae gennych %{count} o gymeriadau yn ormod',
|
|
29
|
+
one: 'Mae gennych 1 cymeriad yn ormod'
|
|
30
|
+
},
|
|
31
|
+
wordsUnderLimitText: {
|
|
32
|
+
other: 'Mae gennych %{count} o eiriau yn weddill',
|
|
33
|
+
one: 'Mae gennych 1 gair yn weddill'
|
|
34
|
+
},
|
|
35
|
+
wordsAtLimitText: 'Mae gennych 0 o eiriau yn weddill',
|
|
36
|
+
wordsOverLimitText: {
|
|
37
|
+
other: 'Mae gennych %{count} o eiriau yn ormod',
|
|
38
|
+
one: 'Mae gennych 1 gair yn ormod'
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
}}
|
|
42
|
+
{% else %}
|
|
43
|
+
{{ govukCharacterCount({
|
|
44
|
+
name: params.name,
|
|
45
|
+
id: params.id,
|
|
46
|
+
rows: params.rows,
|
|
47
|
+
value: params.value,
|
|
48
|
+
maxlength: params.maxlength,
|
|
49
|
+
maxwords: params.maxwords,
|
|
50
|
+
threshold: params.threshold,
|
|
51
|
+
label: params.label,
|
|
52
|
+
hint: params.hint,
|
|
53
|
+
errorMessage: params.errorMessage,
|
|
54
|
+
formGroup: params.formGroup,
|
|
55
|
+
classes: params.classes,
|
|
56
|
+
attributes: params.attributes,
|
|
57
|
+
spellcheck: params.spellcheck,
|
|
58
|
+
countMessage: params.countMessage
|
|
59
|
+
})
|
|
60
|
+
}}
|
|
61
|
+
{% endif %}
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
</{{ serviceNameTag }}>
|
|
60
60
|
{% endif %}
|
|
61
61
|
{% if params.navigation | length %}
|
|
62
|
-
<nav class="govuk-header__navigation" aria-label="Top Level Navigation">
|
|
63
|
-
<button type="button" class="govuk-header__menu-button govuk-js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation" hidden>Menu</button>
|
|
62
|
+
<nav class="govuk-header__navigation" aria-label="{% if language == 'cy' %}Gwelywio Lefel Uchaf{% else %}Top Level Navigation{% endif %}">
|
|
63
|
+
<button type="button" class="govuk-header__menu-button govuk-js-header-toggle" aria-controls="navigation" aria-label="{% if language == 'cy' %}Dangos neu guddio’r Gwelywio Lefel Uchaf{% else %}Show or hide Top Level Navigation{% endif %}" hidden>{% if language == 'cy' %}Dewislen{% else %}Menu{% endif %}</button>
|
|
64
64
|
<ul id="navigation" class="govuk-header__navigation-list{{ (' ' + params.navigationClasses) if params.navigationClasses }}">
|
|
65
65
|
{% for item in params.navigation %}
|
|
66
66
|
{% if item.text or item.html %}
|