@moduk/frontend 1.0.0 → 1.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/dist/lib/nunjucks/moduk/components/accordion/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/accordion/__examples__/with-summary-lines.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/accordion/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/back-link/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/back-link/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/breadcrumbs/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/breadcrumbs/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/button/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/button/__examples__/disabled.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/button/__examples__/group-link.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/button/__examples__/grouping.njk +4 -4
- package/dist/lib/nunjucks/moduk/components/button/__examples__/prevent-double-click.njk +1 -2
- package/dist/lib/nunjucks/moduk/components/button/__examples__/secondary.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/button/__examples__/start.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/button/__examples__/warning.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/button/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/character-count/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/character-count/__examples__/not-as-page-heading.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/character-count/__examples__/with-error-message.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/character-count/__examples__/with-threshold.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/character-count/__examples__/word-count.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/character-count/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/not-as-page-heading.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/small.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/with-conditional-reveal.njk +9 -9
- package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/with-error-message.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/with-item-hint.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/with-none-option.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/checkboxes/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/cookie-banner/__examples__/accepted.njk +4 -4
- package/dist/lib/nunjucks/moduk/components/cookie-banner/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/cookie-banner/__examples__/rejected.njk +4 -5
- package/dist/lib/nunjucks/moduk/components/cookie-banner/macro.njk +3 -3
- package/dist/lib/nunjucks/moduk/components/date-input/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/date-input/__examples__/not-as-page-heading.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/date-input/__examples__/with-date-part-error.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/date-input/__examples__/with-whole-date-error.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/date-input/macro.njk +3 -3
- package/dist/lib/nunjucks/moduk/components/details/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/details/__examples__/open.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/error-message/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/error-message/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/error-summary/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/error-summary/__examples__/with-error-linked-to-checkbox.njk +4 -4
- package/dist/lib/nunjucks/moduk/components/error-summary/__examples__/with-error-linked-to-date-part.njk +3 -3
- package/dist/lib/nunjucks/moduk/components/error-summary/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/fieldset/__examples__/default.njk +8 -8
- package/dist/lib/nunjucks/moduk/components/file-upload/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/file-upload/__examples__/with-error.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/file-upload/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/footer/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/footer/__examples__/with-links.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/footer/__examples__/with-secondary-navigation-and-links.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/footer/__examples__/with-secondary-navigation.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/footer/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/header/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/header/__examples__/with-service-name-and-navigation.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/header/__examples__/with-service-name-and-no-service-url.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/header/__examples__/with-service-name.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/header/macro.njk +30 -31
- package/dist/lib/nunjucks/moduk/components/input/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/input/__examples__/not-as-page-heading.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/input/__examples__/with-error.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/input/__examples__/with-fixed-width.njk +15 -15
- package/dist/lib/nunjucks/moduk/components/input/__examples__/with-fluid-width.njk +8 -8
- package/dist/lib/nunjucks/moduk/components/input/__examples__/with-hint.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/input/__examples__/with-numeric.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/input/__examples__/with-prefix-and-suffix-error.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/input/__examples__/with-prefix-and-suffix.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/input/__examples__/with-prefix.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/input/__examples__/with-suffix.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/input/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/inset-text/__examples__/default.njk +3 -3
- package/dist/lib/nunjucks/moduk/components/inset-text/macro.njk +1 -1
- package/dist/lib/nunjucks/moduk/components/notification-banner/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/notification-banner/__examples__/success.njk +3 -3
- package/dist/lib/nunjucks/moduk/components/notification-banner/__examples__/with-html.njk +3 -3
- package/dist/lib/nunjucks/moduk/components/notification-banner/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/pagination/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/pagination/__examples__/on-the-first-page.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/pagination/__examples__/on-the-last-page.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/pagination/__examples__/with-ellipses.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/pagination/__examples__/with-link-labels.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/pagination/__examples__/with-next-and-previous-only.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/pagination/macro.njk +3 -3
- package/dist/lib/nunjucks/moduk/components/panel/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/phase-banner/__examples__/beta.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/phase-banner/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/phase-banner/__examples__/with-tag-override.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/phase-banner/__examples__/with-text.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/phase-banner/macro.njk +3 -4
- package/dist/lib/nunjucks/moduk/components/radios/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/radios/__examples__/inline.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/radios/__examples__/not-as-page-heading.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/radios/__examples__/small.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/radios/__examples__/with-conditional-reveal.njk +9 -9
- package/dist/lib/nunjucks/moduk/components/radios/__examples__/with-divider-option.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/radios/__examples__/with-error-message.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/radios/__examples__/with-item-hint.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/radios/macro.njk +3 -3
- package/dist/lib/nunjucks/moduk/components/select/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/select/__examples__/with-hint.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/select/macro.njk +3 -3
- package/dist/lib/nunjucks/moduk/components/skip-link/__examples__/default.njk +2 -3
- package/dist/lib/nunjucks/moduk/components/skip-link/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/summary-list/__examples__/cards-with-action.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/summary-list/__examples__/cards.njk +3 -3
- package/dist/lib/nunjucks/moduk/components/summary-list/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/summary-list/__examples__/with-no-actions.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/summary-list/__examples__/with-no-border.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/summary-list/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/table/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/table/__examples__/with-comparative-numbers.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/table/__examples__/with-customised-column-widths.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/table/__examples__/with-large-caption.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/table/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/tabs/__examples__/default.njk +7 -7
- package/dist/lib/nunjucks/moduk/components/tabs/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/tag/__examples__/blue.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/tag/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/tag/__examples__/green.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/tag/__examples__/grey.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/tag/__examples__/orange.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/tag/__examples__/pink.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/tag/__examples__/purple.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/tag/__examples__/red.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/tag/__examples__/turquoise.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/tag/__examples__/yellow.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/tag/macro.njk +3 -3
- package/dist/lib/nunjucks/moduk/components/textarea/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/textarea/__examples__/not-as-page-heading.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/textarea/__examples__/with-custom-height.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/textarea/__examples__/with-error.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/textarea/macro.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/warning-text/__examples__/default.njk +2 -2
- package/dist/lib/nunjucks/moduk/components/warning-text/macro.njk +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{% from "moduk/components/input/macro.njk" import modukInput
|
|
2
|
-
{% from "moduk/components/fieldset/macro.njk" import modukFieldset
|
|
1
|
+
{% from "moduk/components/input/macro.njk" import modukInput -%}
|
|
2
|
+
{% from "moduk/components/fieldset/macro.njk" import modukFieldset -%}
|
|
3
3
|
|
|
4
4
|
{% call modukFieldset({
|
|
5
5
|
legend: {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
classes: "govuk-fieldset__legend--l",
|
|
8
8
|
isPageHeading: true
|
|
9
9
|
}
|
|
10
|
-
})
|
|
10
|
+
}) -%}
|
|
11
11
|
{{ modukInput({
|
|
12
12
|
label: {
|
|
13
13
|
text: 'Address line 1'
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
id: "address-line-1",
|
|
16
16
|
name: "address-line-1",
|
|
17
17
|
autocomplete: "address-line1"
|
|
18
|
-
}) }}
|
|
18
|
+
}) -}}
|
|
19
19
|
{{ modukInput({
|
|
20
20
|
label: {
|
|
21
21
|
text: 'Address line 2 (optional)'
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
id: "address-line-2",
|
|
24
24
|
name: "address-line-2",
|
|
25
25
|
autocomplete: "address-line2"
|
|
26
|
-
}) }}
|
|
26
|
+
}) -}}
|
|
27
27
|
{{ modukInput({
|
|
28
28
|
label: {
|
|
29
29
|
text: "Town or city"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
id: "address-town",
|
|
33
33
|
name: "address-town",
|
|
34
34
|
autocomplete: "address-level2"
|
|
35
|
-
}) }}
|
|
35
|
+
}) -}}
|
|
36
36
|
{{ modukInput({
|
|
37
37
|
label: {
|
|
38
38
|
text: "Postcode"
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
id: "address-postcode",
|
|
42
42
|
name: "address-postcode",
|
|
43
43
|
autocomplete: "postal-code"
|
|
44
|
-
}) }}
|
|
45
|
-
{% endcall
|
|
44
|
+
}) -}}
|
|
45
|
+
{% endcall -%}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% from "moduk/components/file-upload/macro.njk" import modukFileUpload
|
|
1
|
+
{% from "moduk/components/file-upload/macro.njk" import modukFileUpload -%}
|
|
2
2
|
|
|
3
3
|
{{ modukFileUpload({
|
|
4
4
|
id: "file-upload-1",
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
label: {
|
|
7
7
|
text: "Upload a file"
|
|
8
8
|
}
|
|
9
|
-
}) }}
|
|
9
|
+
}) -}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% from "moduk/components/file-upload/macro.njk" import modukFileUpload
|
|
1
|
+
{% from "moduk/components/file-upload/macro.njk" import modukFileUpload -%}
|
|
2
2
|
|
|
3
3
|
{{ modukFileUpload({
|
|
4
4
|
id: "file-upload-with-error",
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
errorMessage: {
|
|
10
10
|
text: "The CSV must be smaller than 2MB"
|
|
11
11
|
}
|
|
12
|
-
}) }}
|
|
12
|
+
}) -}}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
1
|
+
{% from "moduk/components/footer/macro.njk" import modukFooter -%}
|
|
2
2
|
|
|
3
|
-
{{ modukFooter({}) }}
|
|
3
|
+
{{ modukFooter({}) -}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
1
|
+
{% from "moduk/components/footer/macro.njk" import modukFooter -%}
|
|
2
2
|
|
|
3
3
|
{{ modukFooter({
|
|
4
4
|
navigation: [
|
|
@@ -69,4 +69,4 @@
|
|
|
69
69
|
],
|
|
70
70
|
html: 'Built by <a href="#" class="govuk-footer__link">Defence Digital</a>'
|
|
71
71
|
}
|
|
72
|
-
}) }}
|
|
72
|
+
}) -}}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
1
|
+
{% from "moduk/components/header/macro.njk" import modukHeader -%}
|
|
2
2
|
|
|
3
|
-
{{ modukHeader({}) }}
|
|
3
|
+
{{ modukHeader({}) -}}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
The logo has been changed, some CSS classes have been added and there are some slight markup changes.
|
|
6
6
|
#}
|
|
7
7
|
|
|
8
|
-
{% macro modukHeader(params)
|
|
8
|
+
{% macro modukHeader(params) -%}
|
|
9
9
|
|
|
10
|
-
{% set menuButtonText = params.menuButtonText if params.menuButtonText else 'Menu'
|
|
10
|
+
{% set menuButtonText = params.menuButtonText if params.menuButtonText else 'Menu' -%}
|
|
11
11
|
|
|
12
12
|
<header class="govuk-header {{ params.classes if params.classes }}" role="banner" data-module="govuk-header"
|
|
13
13
|
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
@@ -35,43 +35,42 @@
|
|
|
35
35
|
</span>
|
|
36
36
|
</a>
|
|
37
37
|
</div>
|
|
38
|
-
{
|
|
38
|
+
{%- if params.serviceName or params.navigation %}
|
|
39
39
|
<div class="govuk-header__content">
|
|
40
|
-
{
|
|
41
|
-
{
|
|
40
|
+
{%- if params.serviceName %}
|
|
41
|
+
{%- if params.serviceUrl %}
|
|
42
42
|
<a href="{{ params.serviceUrl }}" class="govuk-header__link moduk-header__service-name govuk-header__service-name">
|
|
43
43
|
{{ params.serviceName }}
|
|
44
44
|
</a>
|
|
45
|
-
{
|
|
45
|
+
{%- else %}
|
|
46
46
|
<span class="moduk-header__service-name govuk-header__service-name">
|
|
47
47
|
{{ params.serviceName }}
|
|
48
48
|
</span>
|
|
49
|
-
{% endif
|
|
50
|
-
{
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
{
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
{%
|
|
60
|
-
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</
|
|
70
|
-
|
|
71
|
-
{% endif %}
|
|
49
|
+
{% endif -%}
|
|
50
|
+
{%- endif -%}
|
|
51
|
+
{%- if params.navigation %}
|
|
52
|
+
<nav aria-label="{{ params.navigationLabel | default(menuButtonText) }}" class="govuk-header__navigation {{ params.navigationClasses if params.navigationClasses }}">
|
|
53
|
+
<button type="button" class="govuk-header__menu-button govuk-js-header-toggle" aria-controls="navigation" aria-label="{{ params.menuButtonLabel | default('Show or hide menu') }}" hidden>{{ menuButtonText }}</button>
|
|
54
|
+
<ul id="navigation" class="govuk-header__navigation-list">
|
|
55
|
+
{%- for item in params.navigation -%}
|
|
56
|
+
{%- if item.text or item.html %}
|
|
57
|
+
<li class="govuk-header__navigation-item{{ ' govuk-header__navigation-item--active moduk-header__navigation-item--active' if item.active }}">
|
|
58
|
+
{% if item.href -%}
|
|
59
|
+
<a class="govuk-header__link" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
60
|
+
{%- endif -%}
|
|
61
|
+
{{ item.html | safe if item.html else item.text }}
|
|
62
|
+
{%- if item.href -%}
|
|
63
|
+
</a>
|
|
64
|
+
{%- endif %}
|
|
65
|
+
</li>
|
|
66
|
+
{%- endif %}
|
|
67
|
+
{%- endfor %}
|
|
68
|
+
</ul>
|
|
69
|
+
</nav>
|
|
70
|
+
{%- endif %}
|
|
72
71
|
</div>
|
|
73
|
-
{
|
|
72
|
+
{%- endif %}
|
|
74
73
|
</div>
|
|
75
74
|
</header>
|
|
76
75
|
|
|
77
|
-
{
|
|
76
|
+
{%- endmacro -%}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% from "moduk/components/input/macro.njk" import modukInput
|
|
1
|
+
{% from "moduk/components/input/macro.njk" import modukInput -%}
|
|
2
2
|
|
|
3
3
|
{{ modukInput({
|
|
4
4
|
label: {
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
},
|
|
7
7
|
id: "with-not-as-page-heading",
|
|
8
8
|
name: "event-name-with-not-as-page-heading"
|
|
9
|
-
}) }}
|
|
9
|
+
}) -}}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{% from "moduk/components/input/macro.njk" import modukInput
|
|
1
|
+
{% from "moduk/components/input/macro.njk" import modukInput -%}
|
|
2
2
|
|
|
3
3
|
<div>
|
|
4
|
-
{{ modukInput({
|
|
4
|
+
{{- modukInput({
|
|
5
5
|
label: {
|
|
6
6
|
text: "20 character width"
|
|
7
7
|
},
|
|
8
8
|
classes: "govuk-input--width-20",
|
|
9
9
|
id: "width-20",
|
|
10
10
|
name: "width-20"
|
|
11
|
-
}) }}
|
|
11
|
+
}) -}}
|
|
12
12
|
|
|
13
13
|
{{ modukInput({
|
|
14
14
|
label: {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
classes: "govuk-input--width-10",
|
|
18
18
|
id: "width-10",
|
|
19
19
|
name: "width-10"
|
|
20
|
-
}) }}
|
|
20
|
+
}) -}}
|
|
21
21
|
|
|
22
22
|
{{ modukInput({
|
|
23
23
|
label: {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
classes: "govuk-input--width-5",
|
|
27
27
|
id: "width-5",
|
|
28
28
|
name: "width-5"
|
|
29
|
-
}) }}
|
|
29
|
+
}) -}}
|
|
30
30
|
|
|
31
31
|
{{ modukInput({
|
|
32
32
|
label: {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
classes: "govuk-input--width-4",
|
|
36
36
|
id: "width-4",
|
|
37
37
|
name: "width-4"
|
|
38
|
-
}) }}
|
|
38
|
+
}) -}}
|
|
39
39
|
|
|
40
40
|
{{ modukInput({
|
|
41
41
|
label: {
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
classes: "govuk-input--width-3",
|
|
45
45
|
id: "width-3",
|
|
46
46
|
name: "width-3"
|
|
47
|
-
}) }}
|
|
47
|
+
}) -}}
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
{{ modukInput({
|
|
50
|
+
label: {
|
|
51
|
+
text: "2 character width"
|
|
52
|
+
},
|
|
53
|
+
classes: "govuk-input--width-2",
|
|
54
|
+
id: "width-2",
|
|
55
|
+
name: "width-2"
|
|
56
|
+
}) -}}
|
|
57
57
|
</div>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{% from "moduk/components/input/macro.njk" import modukInput
|
|
1
|
+
{% from "moduk/components/input/macro.njk" import modukInput -%}
|
|
2
2
|
|
|
3
3
|
<div>
|
|
4
|
-
{{ modukInput({
|
|
4
|
+
{{- modukInput({
|
|
5
5
|
label: {
|
|
6
6
|
text: "Full width"
|
|
7
7
|
},
|
|
8
8
|
classes: "govuk-!-width-full",
|
|
9
9
|
id: "full",
|
|
10
10
|
name: "full"
|
|
11
|
-
}) }}
|
|
11
|
+
}) -}}
|
|
12
12
|
|
|
13
13
|
{{ modukInput({
|
|
14
14
|
label: {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
classes: "govuk-!-width-three-quarters",
|
|
18
18
|
id: "three-quarters",
|
|
19
19
|
name: "three-quarters"
|
|
20
|
-
}) }}
|
|
20
|
+
}) -}}
|
|
21
21
|
|
|
22
22
|
{{ modukInput({
|
|
23
23
|
label: {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
classes: "govuk-!-width-two-thirds",
|
|
27
27
|
id: "two-thirds",
|
|
28
28
|
name: "two-thirds"
|
|
29
|
-
}) }}
|
|
29
|
+
}) -}}
|
|
30
30
|
|
|
31
31
|
{{ modukInput({
|
|
32
32
|
label: {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
classes: "govuk-!-width-one-half",
|
|
36
36
|
id: "one-half",
|
|
37
37
|
name: "one-half"
|
|
38
|
-
}) }}
|
|
38
|
+
}) -}}
|
|
39
39
|
|
|
40
40
|
{{ modukInput({
|
|
41
41
|
label: {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
classes: "govuk-!-width-one-third",
|
|
45
45
|
id: "one-third",
|
|
46
46
|
name: "one-third"
|
|
47
|
-
}) }}
|
|
47
|
+
}) -}}
|
|
48
48
|
|
|
49
49
|
{{ modukInput({
|
|
50
50
|
label: {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
classes: "govuk-!-width-one-quarter",
|
|
54
54
|
id: "one-quarter",
|
|
55
55
|
name: "one-quarter"
|
|
56
|
-
}) }}
|
|
56
|
+
}) -}}
|
|
57
57
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% from "moduk/components/input/macro.njk" import modukInput
|
|
1
|
+
{% from "moduk/components/input/macro.njk" import modukInput -%}
|
|
2
2
|
|
|
3
3
|
{{ modukInput({
|
|
4
4
|
label: {
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
name: "account-number-with-numeric",
|
|
15
15
|
inputmode: "numeric",
|
|
16
16
|
spellcheck: false
|
|
17
|
-
}) }}
|
|
17
|
+
}) -}}
|
package/dist/lib/nunjucks/moduk/components/input/__examples__/with-prefix-and-suffix-error.njk
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% from "moduk/components/input/macro.njk" import modukInput
|
|
1
|
+
{% from "moduk/components/input/macro.njk" import modukInput -%}
|
|
2
2
|
|
|
3
3
|
{{ modukInput({
|
|
4
4
|
id: "with-prefix-and-suffix-error",
|
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
},
|
|
20
20
|
classes: "govuk-input--width-5",
|
|
21
21
|
spellcheck: false
|
|
22
|
-
}) }}
|
|
22
|
+
}) -}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% from "moduk/components/input/macro.njk" import modukInput
|
|
1
|
+
{% from "moduk/components/input/macro.njk" import modukInput -%}
|
|
2
2
|
|
|
3
3
|
{{ modukInput({
|
|
4
4
|
id: "with-prefix-and-suffix",
|
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
},
|
|
17
17
|
classes: "govuk-input--width-5",
|
|
18
18
|
spellcheck: false
|
|
19
|
-
}) }}
|
|
19
|
+
}) -}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% from "moduk/components/input/macro.njk" import modukInput
|
|
1
|
+
{% from "moduk/components/input/macro.njk" import modukInput -%}
|
|
2
2
|
|
|
3
3
|
{{ modukInput({
|
|
4
4
|
id: "with-prefix",
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
},
|
|
14
14
|
classes: "govuk-input--width-5",
|
|
15
15
|
spellcheck: false
|
|
16
|
-
}) }}
|
|
16
|
+
}) -}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% from "moduk/components/input/macro.njk" import modukInput
|
|
1
|
+
{% from "moduk/components/input/macro.njk" import modukInput -%}
|
|
2
2
|
|
|
3
3
|
{{ modukInput({
|
|
4
4
|
id: "with-suffix",
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
},
|
|
14
14
|
classes: "govuk-input--width-5",
|
|
15
15
|
spellcheck: false
|
|
16
|
-
}) }}
|
|
16
|
+
}) -}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
1
|
+
{% from "moduk/components/inset-text/macro.njk" import modukInsetText -%}
|
|
2
2
|
|
|
3
|
-
{{ modukInsetText({
|
|
3
|
+
{{ modukInsetText({
|
|
4
4
|
text: "You’ll get confirmation that we have received your report within 5 working days."
|
|
5
|
-
}) }}
|
|
5
|
+
}) -}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{% from "moduk/components/notification-banner/macro.njk" import modukNotificationBanner
|
|
1
|
+
{% from "moduk/components/notification-banner/macro.njk" import modukNotificationBanner -%}
|
|
2
2
|
|
|
3
3
|
{{ modukNotificationBanner({
|
|
4
4
|
text: 'There may be a delay in processing your application because of the coronavirus outbreak.'
|
|
5
|
-
}) }}
|
|
5
|
+
}) -}}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{% from "moduk/components/notification-banner/macro.njk" import modukNotificationBanner
|
|
1
|
+
{% from "moduk/components/notification-banner/macro.njk" import modukNotificationBanner -%}
|
|
2
2
|
|
|
3
3
|
{% set html %}
|
|
4
4
|
<h3 class="govuk-notification-banner__heading">
|
|
5
5
|
Training outcome recorded and trainee withdrawn
|
|
6
6
|
</h3>
|
|
7
7
|
<p class="govuk-body">Contact <a class="govuk-notification-banner__link" href="#">example@department.gov.uk</a> if you think there’s a problem.</p>
|
|
8
|
-
{% endset
|
|
8
|
+
{% endset -%}
|
|
9
9
|
|
|
10
10
|
{{ modukNotificationBanner({
|
|
11
11
|
html: html,
|
|
12
12
|
type: 'success'
|
|
13
|
-
}) }}
|
|
13
|
+
}) -}}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
{% from "moduk/components/notification-banner/macro.njk" import modukNotificationBanner
|
|
1
|
+
{% from "moduk/components/notification-banner/macro.njk" import modukNotificationBanner -%}
|
|
2
2
|
|
|
3
3
|
{% set html %}
|
|
4
4
|
<p class="govuk-notification-banner__heading">
|
|
5
5
|
You have 7 days left to send your application.
|
|
6
6
|
<a class="govuk-notification-banner__link" href="#">View application</a>.
|
|
7
7
|
</p>
|
|
8
|
-
{% endset
|
|
8
|
+
{% endset -%}
|
|
9
9
|
|
|
10
10
|
{{ modukNotificationBanner({
|
|
11
11
|
html: html
|
|
12
|
-
}) }}
|
|
12
|
+
}) -}}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
{% macro modukNotificationBanner(params) -%}
|
|
4
4
|
{% if caller -%}
|
|
5
5
|
{% call govukNotificationBanner(params) -%}
|
|
6
|
-
{{ caller() }}
|
|
6
|
+
{{- caller() -}}
|
|
7
7
|
{%- endcall %}
|
|
8
8
|
{%- else -%}
|
|
9
|
-
{{ govukNotificationBanner(params) }}
|
|
9
|
+
{{- govukNotificationBanner(params) -}}
|
|
10
10
|
{%- endif %}
|
|
11
11
|
{%- endmacro %}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{% from "moduk/components/pagination/macro.njk" import modukPagination -%}
|
|
2
2
|
|
|
3
|
-
{{
|
|
3
|
+
{{ modukPagination({
|
|
4
4
|
previous: {
|
|
5
5
|
labelText: "Understanding military personnel",
|
|
6
6
|
href: "#"
|