@ministryofjustice/frontend 3.6.2 → 3.6.3

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/moj/all.js CHANGED
@@ -2531,7 +2531,7 @@
2531
2531
  return isNaN(valAsNumber) ? val : valAsNumber
2532
2532
  };
2533
2533
 
2534
- const version = '3.6.2';
2534
+ const version = '3.6.3';
2535
2535
 
2536
2536
  /* eslint-disable no-new */
2537
2537
 
package/moj/all.scss CHANGED
@@ -1,6 +1,6 @@
1
1
  $govuk-suppressed-warnings: ("govuk-typography-scale-14");
2
2
 
3
- @import "govuk-frontend/dist/govuk/base";
3
+ @import "node_modules/govuk-frontend/dist/govuk/base";
4
4
 
5
5
  @import "settings/all";
6
6
  @import "helpers/all";
@@ -23,14 +23,14 @@
23
23
  {%- set classNames = classNames.concat(params.classes) %}
24
24
  {%- endif %}
25
25
 
26
- {%- set classNames = classNames | join(' ') -%}
26
+ {%- set classNames = classNames | join(" ") -%}
27
27
 
28
28
  {#- Set icon for this component #}
29
- {%- if params.variant == 'success' %}
29
+ {%- if params.variant == "success" %}
30
30
  {%- set iconPath = '<path d="M11.2869 24.6726L2.00415 15.3899L4.62189 12.7722L11.2869 19.4186L25.3781 5.32739L27.9958 7.96369L11.2869 24.6726Z" fill="currentColor"/>' %}
31
- {%- elif params.variant == 'warning' %}
31
+ {%- elif params.variant == "warning" %}
32
32
  {%- set iconPath = '<path fill-rule="evenodd" clip-rule="evenodd" d="M15 2.44922L28.75 26.1992H1.25L15 2.44922ZM13.5107 9.49579H16.4697L16.2431 17.7678H13.7461L13.5107 9.49579ZM13.1299 21.82C13.1299 21.5661 13.1787 21.3285 13.2764 21.1071C13.374 20.8793 13.5075 20.6807 13.6768 20.5114C13.8525 20.3421 14.0544 20.2087 14.2822 20.111C14.5101 20.0134 14.7542 19.9645 15.0146 19.9645C15.2686 19.9645 15.5062 20.0134 15.7275 20.111C15.9554 20.2087 16.154 20.3421 16.3232 20.5114C16.4925 20.6807 16.626 20.8793 16.7236 21.1071C16.8213 21.3285 16.8701 21.5661 16.8701 21.82C16.8701 22.0804 16.8213 22.3246 16.7236 22.5524C16.626 22.7803 16.4925 22.9789 16.3232 23.1481C16.154 23.3174 15.9554 23.4509 15.7275 23.5485C15.5062 23.6462 15.2686 23.695 15.0146 23.695C14.7542 23.695 14.5101 23.6462 14.2822 23.5485C14.0544 23.4509 13.8525 23.3174 13.6768 23.1481C13.5075 22.9789 13.374 22.7803 13.2764 22.5524C13.1787 22.3246 13.1299 22.0804 13.1299 21.82Z" fill="currentColor"/>' %}
33
- {%- elif variant == 'error' %}
33
+ {%- elif variant == "error" %}
34
34
  {%- set iconPath = '<path fill-rule="evenodd" clip-rule="evenodd" d="M20.1777 2.5H9.82233L2.5 9.82233V20.1777L9.82233 27.5H20.1777L27.5 20.1777V9.82233L20.1777 2.5ZM10.9155 8.87769L15.0001 12.9623L19.0847 8.87771L21.1224 10.9154L17.0378 15L21.1224 19.0846L19.0847 21.1222L15.0001 17.0376L10.9155 21.1223L8.87782 19.0846L12.9624 15L8.87783 10.9153L10.9155 8.87769Z" fill="currentColor"/>' %}
35
35
  {%- else %}
36
36
  {%- set iconPath = '<path fill-rule="evenodd" clip-rule="evenodd" d="M10.2165 3.45151C11.733 2.82332 13.3585 2.5 15 2.5C16.6415 2.5 18.267 2.82332 19.7835 3.45151C21.3001 4.07969 22.6781 5.00043 23.8388 6.16117C24.9996 7.3219 25.9203 8.69989 26.5485 10.2165C27.1767 11.733 27.5 13.3585 27.5 15C27.5 18.3152 26.183 21.4946 23.8388 23.8388C21.4946 26.183 18.3152 27.5 15 27.5C13.3585 27.5 11.733 27.1767 10.2165 26.5485C8.69989 25.9203 7.3219 24.9996 6.16117 23.8388C3.81696 21.4946 2.5 18.3152 2.5 15C2.5 11.6848 3.81696 8.50537 6.16117 6.16117C7.3219 5.00043 8.69989 4.07969 10.2165 3.45151ZM16.3574 22.4121H13.6621V12.95H16.3574V22.4121ZM13.3789 9.20898C13.3789 8.98763 13.4212 8.7793 13.5059 8.58398C13.5905 8.38216 13.7044 8.20964 13.8477 8.06641C13.9974 7.91667 14.1699 7.79948 14.3652 7.71484C14.5605 7.63021 14.7721 7.58789 15 7.58789C15.2214 7.58789 15.4297 7.63021 15.625 7.71484C15.8268 7.79948 15.9993 7.91667 16.1426 8.06641C16.2923 8.20964 16.4095 8.38216 16.4941 8.58398C16.5788 8.7793 16.6211 8.98763 16.6211 9.20898C16.6211 9.43685 16.5788 9.64844 16.4941 9.84375C16.4095 10.0391 16.2923 10.2116 16.1426 10.3613C15.9993 10.5046 15.8268 10.6185 15.625 10.7031C15.4297 10.7878 15.2214 10.8301 15 10.8301C14.7721 10.8301 14.5605 10.7878 14.3652 10.7031C14.1699 10.6185 13.9974 10.5046 13.8477 10.3613C13.7044 10.2116 13.5905 10.0391 13.5059 9.84375C13.4212 9.64844 13.3789 9.43685 13.3789 9.20898Z" fill="currentColor"/>' %}
@@ -1,3 +1,3 @@
1
- <span class="moj-badge {{- ' ' + params.classes if params.classes }}" {%- if (params.label) %} aria-label=""{% endif -%} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
1
+ <span class="moj-badge {{- " " + params.classes if params.classes }}" {%- if (params.label) %} aria-label=""{% endif -%} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
2
2
  {{- params.html | safe if params.html else params.text -}}
3
3
  </span>
@@ -1,11 +1,11 @@
1
1
  {#- Set classes for this component #}
2
2
  {%- set classNames = ["moj-banner"] -%}
3
3
 
4
- {%- if params.type == 'success' %}
4
+ {%- if params.type == "success" %}
5
5
  {%- set classNames = classNames.concat("moj-banner--success") %}
6
- {%- elif params.type == 'warning' %}
6
+ {%- elif params.type == "warning" %}
7
7
  {%- set classNames = classNames.concat("moj-banner--warning") %}
8
- {%- elif params.type == 'information' %}
8
+ {%- elif params.type == "information" %}
9
9
  {%- set classNames = classNames.concat("moj-banner--information") %}
10
10
  {%- endif %}
11
11
 
@@ -13,22 +13,22 @@
13
13
  {%- set classNames = classNames.concat(params.classes) %}
14
14
  {%- endif %}
15
15
 
16
- {%- set classNames = classNames | join(' ') -%}
16
+ {%- set classNames = classNames | join(" ") -%}
17
17
 
18
- <div
19
- class="{{ classNames }}"
20
- {%- for attribute, value in params.attributes %}
18
+ <div
19
+ class="{{ classNames }}"
20
+ {%- for attribute, value in params.attributes %}
21
21
  {{ attribute }}="{{ value }}"
22
22
  {% endfor %}
23
23
  role="region"
24
24
  aria-label="{{ params.iconFallbackText | default(params.type) | default("banner") }}"
25
25
  >
26
26
 
27
- {% if params.type == 'success' %}
27
+ {% if params.type == "success" %}
28
28
  <svg class="moj-banner__icon" fill="currentColor" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25"><path d="M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"/></svg>
29
- {% elif params.type == 'warning' %}
29
+ {% elif params.type == "warning" %}
30
30
  <svg class="moj-banner__icon" fill="currentColor" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25"><path d="M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"/></svg>
31
- {% elif params.type == 'information' %}
31
+ {% elif params.type == "information" %}
32
32
  <svg class="moj-banner__icon" fill="currentColor" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25"><path d="M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8
33
33
  C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"/></svg>
34
34
  {% endif %}
@@ -37,4 +37,4 @@
37
37
  {{- params.html | safe if params.html else params.text -}}
38
38
  </div>
39
39
 
40
- </div>
40
+ </div>
@@ -1,4 +1,4 @@
1
- @import "govuk-frontend/dist/govuk/objects/width-container";
1
+ @import "node_modules/govuk-frontend/dist/govuk/objects/width-container";
2
2
 
3
3
  .moj-cookie-banner {
4
4
  box-sizing: border-box;
@@ -12,7 +12,7 @@
12
12
  <div class="govuk-grid-column-full govuk-grid-column-one-half-from-desktop">
13
13
  {{ govukButton({
14
14
  text: item.text,
15
- classes: 'govuk-button button--inline ' + item.class,
15
+ classes: "govuk-button button--inline " + item.class,
16
16
  type: item.type,
17
17
  element: item.element,
18
18
  href: item.href
@@ -15,8 +15,8 @@
15
15
  for: params.id
16
16
  }) | indent(2) | trim }}
17
17
  {% if params.hint %}
18
- {% set hintId = params.id + '-hint' %}
19
- {% set describedBy = describedBy + ' ' + hintId if describedBy else hintId %}
18
+ {% set hintId = params.id + "-hint" %}
19
+ {% set describedBy = describedBy + " " + hintId if describedBy else hintId %}
20
20
  {{ govukHint({
21
21
  id: hintId,
22
22
  classes: params.hint.classes,
@@ -26,8 +26,8 @@
26
26
  }) | indent(2) | trim }}
27
27
  {% endif %}
28
28
  {% if params.errorMessage %}
29
- {% set errorId = params.id + '-error' %}
30
- {% set describedBy = describedBy + ' ' + errorId if describedBy else errorId %}
29
+ {% set errorId = params.id + "-error" %}
30
+ {% set describedBy = describedBy + " " + errorId if describedBy else errorId %}
31
31
  {{ govukErrorMessage({
32
32
  id: errorId,
33
33
  classes: params.errorMessage.classes,
@@ -37,13 +37,13 @@
37
37
  visuallyHiddenText: params.errorMessage.visuallyHiddenText
38
38
  }) | indent(2) | trim }}
39
39
  {% endif %}
40
- <span class="moj-label__currency {%- if params.errorMessage %} moj-label__currency--error{% endif %} {{- ' ' + params.currencyLabel.classes if params.currencyLabel.classes}}">
41
- {{- params.currencyLabel.html if params.currencyLabel.html else params.currencyLabel.text | default('&pound;') | safe -}}
40
+ <span class="moj-label__currency {%- if params.errorMessage %} moj-label__currency--error{% endif %} {{- " " + params.currencyLabel.classes if params.currencyLabel.classes}}">
41
+ {{- params.currencyLabel.html if params.currencyLabel.html else params.currencyLabel.text | default("&pound;") | safe -}}
42
42
  </span>
43
- <input class="govuk-input moj-input__currency {{- ' ' + params.classes if params.classes}} {%- if params.errorMessage %} govuk-input--error{% endif %}" id="{{ params.id }}" name="{{ params.name }}" type="{{ params.type | default('text') }}"
43
+ <input class="govuk-input moj-input__currency {{- " " + params.classes if params.classes}} {%- if params.errorMessage %} govuk-input--error{% endif %}" id="{{ params.id }}" name="{{ params.name }}" type="{{ params.type | default("text") }}"
44
44
  {%- if params.value %} value="{{ params.value }}"{% endif %}
45
45
  {%- if describedBy %} aria-describedby="{{ describedBy }}"{% endif %}
46
- autocomplete="{{ params.autocomplete | default('off') }}"
47
- pattern="{{ params.pattern | default('[0-9]*') }}"
46
+ autocomplete="{{ params.autocomplete | default("off") }}"
47
+ pattern="{{ params.pattern | default("[0-9]*") }}"
48
48
  {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
49
- </div>
49
+ </div>
@@ -8,7 +8,7 @@
8
8
  {% endif %}
9
9
 
10
10
  {% set attributes = {
11
- "data-module": 'moj-date-picker',
11
+ "data-module": "moj-date-picker",
12
12
  "data-min-date": {
13
13
  value: params.minDate,
14
14
  optional: true
@@ -44,7 +44,7 @@
44
44
  autocomplete: "off",
45
45
  formGroup: params.formGroup,
46
46
  label: params.label,
47
- hint: params.hint,
47
+ hint: params.hint,
48
48
  errorMessage: params.errorMessage
49
49
  }) }}
50
50
  </div>
@@ -48,7 +48,7 @@
48
48
  <div class="moj-filter__options">
49
49
 
50
50
  {{ govukButton({
51
- text: params.submit.text if params.submit.text else 'Apply filters',
51
+ text: params.submit.text if params.submit.text else "Apply filters",
52
52
  attributes: params.submit.attributes
53
53
  }) }}
54
54
 
@@ -1,10 +1,10 @@
1
- <header class="moj-header {{- ' ' + params.classes if params.classes}}" role="banner" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
1
+ <header class="moj-header {{- " " + params.classes if params.classes}}" role="banner" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
2
2
 
3
3
  <div class="moj-header__container {%- if params.containerClasses %} {{ params.containerClasses }}{% endif %}">
4
4
 
5
5
  <div class="moj-header__logo">
6
6
 
7
- {%- if params.logotype == 'crown' %}
7
+ {%- if params.logotype == "crown" %}
8
8
 
9
9
  <svg aria-hidden="true" focusable="false" class="moj-header__logotype-crown" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 97" height="32" width="36">
10
10
  <path fill="#ffffff" fill-rule="evenodd" d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.4 3.6-.3 7.7-3.9 9.1zM69.7 17.7l8.9 4.7V9.3l-8.9 2.8c-.2-.3-.5-.6-.9-.9L72.4 0H59.6l3.5 11.2c-.3.3-.6.5-.9.9l-8.8-2.8v13.1l8.8-4.7c.3.3.6.7.9.9l-5 15.4v.1c-.2.8-.4 1.6-.4 2.4 0 4.1 3.1 7.5 7 8.1h.2c.3 0 .7.1 1 .1.4 0 .7 0 1-.1h.2c4-.6 7.1-4.1 7.1-8.1 0-.8-.1-1.7-.4-2.4V34l-5.1-15.4c.4-.2.7-.6 1-.9zM66 92.8c16.9 0 32.8 1.1 47.1 3.2 4-16.9 8.9-26.7 14-33.5l-9.6-3.4c1 4.9 1.1 7.2 0 10.2-1.5-1.4-3-4.3-4.2-8.7L108.6 76c2.8-2 5-3.2 7.5-3.3-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"></path>
@@ -49,24 +49,24 @@
49
49
  {% endif -%}
50
50
 
51
51
  {%- if (params.organisationLabel) %}
52
- {% set organisationLabelElement = 'span' %}
52
+ {% set organisationLabelElement = "span" %}
53
53
  {%- if (params.organisationLabel.href) %}
54
- {% set organisationLabelElement = 'a' %}
54
+ {% set organisationLabelElement = "a" %}
55
55
  {% endif -%}
56
56
 
57
- <{{organisationLabelElement}} class="moj-header__link moj-header__link--organisation-name" {% if params.organisationLabel.href %} href="{{ params.organisationLabel.href | default('/') }}" {% endif %}>
57
+ <{{organisationLabelElement}} class="moj-header__link moj-header__link--organisation-name" {% if params.organisationLabel.href %} href="{{ params.organisationLabel.href | default("/") }}" {% endif %}>
58
58
  {{- params.organisationLabel.html | safe if params.organisationLabel.html else params.organisationLabel.text -}}
59
59
  </{{organisationLabelElement}}>
60
60
  {% endif -%}
61
61
 
62
62
 
63
63
  {%- if (params.serviceLabel) %}
64
- {% set serviceLabelElement = 'span' %}
64
+ {% set serviceLabelElement = "span" %}
65
65
  {%- if (params.serviceLabel.href) %}
66
- {% set serviceLabelElement = 'a' %}
66
+ {% set serviceLabelElement = "a" %}
67
67
  {% endif -%}
68
68
 
69
- <{{serviceLabelElement}} class="moj-header__link moj-header__link--service-name" {% if params.serviceLabel.href %} href="{{ params.serviceLabel.href | default('/') }}" {% endif %}>
69
+ <{{serviceLabelElement}} class="moj-header__link moj-header__link--service-name" {% if params.serviceLabel.href %} href="{{ params.serviceLabel.href | default("/") }}" {% endif %}>
70
70
  {{- params.serviceLabel.html | safe if params.serviceLabel.html else params.serviceLabel.text -}}
71
71
  </{{serviceLabelElement}}>
72
72
  {% endif -%}
@@ -1,6 +1,6 @@
1
1
  {%- from "moj/components/button-menu/macro.njk" import mojButtonMenu %}
2
2
  {% from "govuk/macros/attributes.njk" import govukAttributes %}
3
- <div class="moj-identity-bar {{- ' ' + params.classes if params.classes}}" {{- govukAttributes(params.attributes) -}}>
3
+ <div class="moj-identity-bar {{- " " + params.classes if params.classes}}" {{- govukAttributes(params.attributes) -}}>
4
4
  <div class="moj-identity-bar__container">
5
5
  <div class="moj-identity-bar__details">
6
6
  {% if params.title %}
@@ -1,13 +1,13 @@
1
- <div id="{{ params.id | default('messages') }}" class="moj-messages-container {{- ' ' + params.classes if params.classes}}" {%- if (params.label) %} aria-label="{{ params.label }}"{% endif %} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
1
+ <div id="{{ params.id | default("messages") }}" class="moj-messages-container {{- " " + params.classes if params.classes}}" {%- if (params.label) %} aria-label="{{ params.label }}"{% endif %} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
2
2
 
3
3
  <div class="moj-message-list">
4
4
 
5
5
  {%- for item in params.items %}
6
6
 
7
- {%- if previous_timestamp != item.timestamp | mojDate('date') %}
7
+ {%- if previous_timestamp != item.timestamp | mojDate("date") %}
8
8
 
9
- <time class="moj-message-list__date" datetime="{{ item.timestamp | mojDate('date') }}">
10
- {{- item.timestamp | mojDate('date') -}}
9
+ <time class="moj-message-list__date" datetime="{{ item.timestamp | mojDate("date") }}">
10
+ {{- item.timestamp | mojDate("date") -}}
11
11
  </time>
12
12
 
13
13
  {% endif -%}
@@ -17,11 +17,11 @@
17
17
  {{- item.html | safe if item.html else item.text -}}
18
18
  </div>
19
19
  <div class="moj-message-item__meta">
20
- <span class="moj-message-item__meta--sender">{{ item.sender }}</span> at <time class="moj-message-item__meta--timestamp" datetime="{{ item.timestamp | mojDate('time') }}">{{ item.timestamp | mojDate('time') }}</time>
20
+ <span class="moj-message-item__meta--sender">{{ item.sender }}</span> at <time class="moj-message-item__meta--timestamp" datetime="{{ item.timestamp | mojDate("time") }}">{{ item.timestamp | mojDate("time") }}</time>
21
21
  </div>
22
22
  </div>
23
23
 
24
- {%- set previous_timestamp = item.timestamp | mojDate('date') -%}
24
+ {%- set previous_timestamp = item.timestamp | mojDate("date") -%}
25
25
 
26
26
  {% endfor -%}
27
27
 
@@ -1,4 +1,4 @@
1
- <div class="moj-multi-file-upload {{- ' ' + params.classes if params.classes}}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
1
+ <div class="moj-multi-file-upload {{- " " + params.classes if params.classes}}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
2
2
  <div class="moj-multi-file__uploaded-files {% if params.uploadedFiles.items.length == 0 %}moj-hidden{% endif%}">
3
3
  <h2 class="govuk-heading-m">{{ params.uploadedFiles.heading.html | safe if params.uploadedFiles.heading.html else params.uploadedFiles.heading.text }}</h2>
4
4
  <div class="govuk-summary-list moj-multi-file-upload__list">
@@ -1,5 +1,5 @@
1
1
  {%- if params.text.length %}
2
- <span id="{{ params.id | default('notifications') }}" class="moj-notification-badge {{- ' ' + params.classes if params.classes}}" {%- if (params.label) %} aria-label="{{ params.label }}"{% endif %} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
2
+ <span id="{{ params.id | default("notifications") }}" class="moj-notification-badge {{- " " + params.classes if params.classes}}" {%- if (params.label) %} aria-label="{{ params.label }}"{% endif %} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
3
3
  {{- params.text | safe -}}
4
4
  </span>
5
5
  {% endif -%}
@@ -1,11 +1,11 @@
1
- <div {%- if params.id %} id="{{ params.id }}"{% endif %} class="moj-organisation-nav {{- ' ' + params.classes if params.classes }}" aria-label="{{ params.label | default('Organisation switcher') }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
1
+ <div {%- if params.id %} id="{{ params.id }}"{% endif %} class="moj-organisation-nav {{- " " + params.classes if params.classes }}" aria-label="{{ params.label | default("Organisation switcher") }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
2
2
  <div class="moj-organisation-nav__title">
3
3
  {{- params.html | safe if params.html else params.text -}}
4
4
  </div>
5
5
 
6
6
  {% if params.link %}
7
- {%- set linkText = params.link.text | default('Change organisation') -%}
8
- <a {%- if params.link.id %} id="{{ params.link.id }}"{% endif %} href="{{ params.link.href }}" class="moj-organisation-nav__link {{- ' ' + params.link.classes if params.link.classes }}" {%- for attribute, value in params.link.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
7
+ {%- set linkText = params.link.text | default("Change organisation") -%}
8
+ <a {%- if params.link.id %} id="{{ params.link.id }}"{% endif %} href="{{ params.link.href }}" class="moj-organisation-nav__link {{- " " + params.link.classes if params.link.classes }}" {%- for attribute, value in params.link.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
9
9
  {{- linkText -}}
10
10
  </a>
11
11
  {% endif %}
@@ -2,7 +2,7 @@
2
2
  {% from "govuk/macros/attributes.njk" import govukAttributes %}
3
3
  {%- from "govuk/components/button/macro.njk" import govukButton %}
4
4
 
5
- <div class="moj-page-header-actions {{- ' ' + params.classes if params.classes}}" {{- govukAttributes(params.attributes) -}}>
5
+ <div class="moj-page-header-actions {{- " " + params.classes if params.classes}}" {{- govukAttributes(params.attributes) -}}>
6
6
  <div class="moj-page-header-actions__title">
7
7
  <h{{ params.heading.level | default(1) }} class="{{ params.heading.classes | default("govuk-heading-xl") }}">
8
8
  {{- params.heading.html | safe if params.heading.html else params.heading.text -}}
@@ -1,4 +1,4 @@
1
- <nav class="moj-pagination {{- ' ' + params.classes if params.classes}}" aria-label="Pagination navigation">
1
+ <nav class="moj-pagination {{- " " + params.classes if params.classes}}" aria-label="Pagination navigation">
2
2
 
3
3
  <ul class="moj-pagination__list">
4
4
  {%- if params.previous %}
@@ -8,7 +8,7 @@
8
8
  {% endif -%}
9
9
 
10
10
  {%- for item in params.items %}
11
- {%- if item.type == 'dots' %}
11
+ {%- if item.type == "dots" %}
12
12
  <li class="moj-pagination__item moj-pagination__item--dots">…</li>
13
13
  {% else %}
14
14
  {%- if item.selected %}
@@ -1,10 +1,10 @@
1
- <div class="moj-primary-navigation {{- ' ' + params.containerClasses if params.containerClasses}}">
1
+ <div class="moj-primary-navigation {{- " " + params.containerClasses if params.containerClasses}}">
2
2
 
3
3
  <div class="moj-primary-navigation__container">
4
4
 
5
5
  <div class="moj-primary-navigation__nav">
6
6
 
7
- <nav class="moj-primary-navigation {{- ' ' + params.classes if params.classes}}" {%- if (params.label) %} aria-label="{{ params.label }}"{% endif %} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
7
+ <nav class="moj-primary-navigation {{- " " + params.classes if params.classes}}" {%- if (params.label) %} aria-label="{{ params.label }}"{% endif %} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
8
8
 
9
9
  <ul class="moj-primary-navigation__list">
10
10
 
@@ -1,9 +1,9 @@
1
- <div id="{{ params.id | default('progress') }}" class="moj-progress-bar {{- ' ' + params.classes if params.classes}}" {%- if (params.label) %} aria-label="{{ params.label }}"{% endif %} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
1
+ <div id="{{ params.id | default("progress") }}" class="moj-progress-bar {{- " " + params.classes if params.classes}}" {%- if (params.label) %} aria-label="{{ params.label }}"{% endif %} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
2
2
  <ol class="moj-progress-bar__list">
3
3
  {%- for item in params.items %}
4
- <li id="{{ item.id | default('progress-item-' + loop.index) }}" class="moj-progress-bar__item {{- ' ' + item.classes if item.classes }}" {{- ' aria-current="step"' | safe if item.active }} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
5
- <span class="moj-progress-bar__icon {{- ' moj-progress-bar__icon--complete' if item.complete }}"></span>
6
- <span class="moj-progress-bar__label {{- ' ' + item.label.classes if item.label.classes }}">
4
+ <li id="{{ item.id | default("progress-item-" + loop.index) }}" class="moj-progress-bar__item {{- " " + item.classes if item.classes }}" {{- ' aria-current="step"' | safe if item.active }} {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
5
+ <span class="moj-progress-bar__icon {{- " moj-progress-bar__icon--complete" if item.complete }}"></span>
6
+ <span class="moj-progress-bar__label {{- " " + item.label.classes if item.label.classes }}">
7
7
  {{- item.label.html | safe if item.label.html else item.label.text -}}
8
8
  </span>
9
9
  </li>
@@ -1,10 +1,10 @@
1
1
  {%- from "govuk/components/input/macro.njk" import govukInput %}
2
2
  {%- from "govuk/components/button/macro.njk" import govukButton %}
3
3
 
4
- <div class="moj-search {{- ' ' + params.classes if params.classes}}">
4
+ <div class="moj-search {{- " " + params.classes if params.classes}}">
5
5
 
6
6
  {%- if params.hint %}
7
- {% set hintClasses = 'moj-search__hint ' + (params.hint.classes if params.hint.classes) %}
7
+ {% set hintClasses = "moj-search__hint " + (params.hint.classes if params.hint.classes) %}
8
8
  {% set hintText = params.hint.text %}
9
9
  {% set hint = { classes: hintClasses, text: hintText } %}
10
10
  {% endif -%}
@@ -13,21 +13,21 @@
13
13
  {% set method = params.method %}
14
14
  {% endif -%}
15
15
 
16
- <form action="{{ params.action }}" method="{{ params.method | default('get') }}">
16
+ <form action="{{ params.action }}" method="{{ params.method | default("get") }}">
17
17
  {{ govukInput({
18
- classes: 'moj-search__input ' + (params.input.classes if params.input.classes),
18
+ classes: "moj-search__input " + (params.input.classes if params.input.classes),
19
19
  label: {
20
- classes: 'moj-search__label ' + (params.label.classes if params.label.classes),
20
+ classes: "moj-search__label " + (params.label.classes if params.label.classes),
21
21
  text: params.label.text
22
22
  },
23
23
  hint: hint,
24
24
  id: params.input.id,
25
25
  name: params.input.name,
26
- type: 'search'
26
+ type: "search"
27
27
  }) }}
28
28
 
29
29
  {{ govukButton({
30
- classes: 'moj-search__button ' + (params.button.classes if params.button.classes),
30
+ classes: "moj-search__button " + (params.button.classes if params.button.classes),
31
31
  text: params.button.text
32
32
  }) }}
33
33
  </form>
@@ -1,7 +1,7 @@
1
- <nav class="moj-side-navigation {{- ' ' + params.classes if params.classes }}" {%- if (params.label) %} aria-label="{{ params.label }}"{% endif %} {% for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
1
+ <nav class="moj-side-navigation {{- " " + params.classes if params.classes }}" {%- if (params.label) %} aria-label="{{ params.label }}"{% endif %} {% for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
2
2
  {%- if params.sections %}
3
3
  {%- for section in params.sections %}
4
- <h{{ section.heading.headingLevel | default(4) }} class="moj-side-navigation__title {{- ' ' + section.heading.classes if section.heading.classes }}"{% for attribute, value in section.heading.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
4
+ <h{{ section.heading.headingLevel | default(4) }} class="moj-side-navigation__title {{- " " + section.heading.classes if section.heading.classes }}"{% for attribute, value in section.heading.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
5
5
  {{- section.heading.html | safe if section.heading.html else section.heading.text -}}
6
6
  </h{{ section.heading.headingLevel | default(4) }}>
7
7
  <ul class="moj-side-navigation__list">
@@ -25,4 +25,4 @@
25
25
  {% endfor -%}
26
26
  </ul>
27
27
  {% endif -%}
28
- </nav>
28
+ </nav>
@@ -1,9 +1,9 @@
1
- <nav class="moj-sub-navigation {{- ' ' + params.classes if params.classes}}" aria-label="{{ params.label or 'Secondary navigation region' }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
1
+ <nav class="moj-sub-navigation {{- " " + params.classes if params.classes}}" aria-label="{{ params.label or "Secondary navigation region" }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
2
2
 
3
3
  <ul class="moj-sub-navigation__list">
4
4
 
5
5
  {%- for item in params.items %}
6
- <li class="moj-sub-navigation__item {{- ' ' + item.classes if item.classes}}">
6
+ <li class="moj-sub-navigation__item {{- " " + item.classes if item.classes}}">
7
7
  <a class="moj-sub-navigation__link" {{ 'aria-current="page"' | safe if item.active }} href="{{ item.href }}" {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
8
8
  {{- item.html | safe if item.html else item.text -}}
9
9
  </a>
@@ -1,8 +1,8 @@
1
1
  {%- from "govuk/components/tag/macro.njk" import govukTag -%}
2
- <ol class="moj-task-list {{- ' ' + params.classes if params.classes }}" {% for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
2
+ <ol class="moj-task-list {{- " " + params.classes if params.classes }}" {% for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
3
3
  {%- for section in params.sections %}
4
4
  <li {% for attribute, value in section.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
5
- <h{{ section.heading.headingLevel | default(2) }} class="moj-task-list__section {{- ' ' + section.heading.classes if section.heading.classes }}" {% for attribute, value in section.heading.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
5
+ <h{{ section.heading.headingLevel | default(2) }} class="moj-task-list__section {{- " " + section.heading.classes if section.heading.classes }}" {% for attribute, value in section.heading.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
6
6
  <span class="moj-task-list__section-number">{{ loop.index }}. </span> {{- section.heading.html | safe if section.heading.html else section.heading.text -}}
7
7
  </h{{ section.heading.headingLevel | default(2) }}>
8
8
  <ul class="moj-task-list__items">
@@ -14,7 +14,7 @@
14
14
  {%- if item.complete %}
15
15
  {{ govukTag({
16
16
  text: "completed",
17
- classes: 'moj-task-list__task-completed'
17
+ classes: "moj-task-list__task-completed"
18
18
  }) }}
19
19
  {% endif -%}
20
20
  </li>
@@ -22,4 +22,4 @@
22
22
  </ul>
23
23
  </li>
24
24
  {% endfor -%}
25
- </ol>
25
+ </ol>
@@ -1,11 +1,11 @@
1
1
  <article
2
- class="moj-ticket-panel {{- ' ' + params.classes if params.classes}}"
2
+ class="moj-ticket-panel {{- " " + params.classes if params.classes}}"
3
3
  {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
4
4
 
5
5
  {%- for item in params.items %}
6
6
 
7
7
  <section
8
- class="moj-ticket-panel__content {{- ' ' + item.classes if item.classes}}"
8
+ class="moj-ticket-panel__content {{- " " + item.classes if item.classes}}"
9
9
  {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
10
10
  {{- item.html | safe if item.html else item.text -}}
11
11
  </section>
@@ -1,7 +1,7 @@
1
- <div class="moj-timeline {{- ' ' + params.classes if params.classes}}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
1
+ <div class="moj-timeline {{- " " + params.classes if params.classes}}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
2
2
 
3
3
  {%- for item in params.items %}
4
- <div class="moj-timeline__item {{- ' ' + item.classes if item.classes}}" {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
4
+ <div class="moj-timeline__item {{- " " + item.classes if item.classes}}" {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
5
5
 
6
6
  <div class="moj-timeline__header">
7
7
  <h{{ params.headingLevel | default(2) }} class="moj-timeline__title">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ministryofjustice/frontend",
3
3
  "description": "The MOJ Frontend contains the code you need to start building user interfaces for UK Ministry of Justice government services.",
4
- "version": "3.6.2",
4
+ "version": "3.6.3",
5
5
  "main": "moj/all.js",
6
6
  "module": "moj/all.mjs",
7
7
  "sass": "moj/all.scss",
@@ -42,13 +42,5 @@
42
42
  "govuk-frontend": "5.x",
43
43
  "jquery": "3.x",
44
44
  "moment": "2.x"
45
- },
46
- "peerDependenciesMeta": {
47
- "jquery": {
48
- "optional": true
49
- },
50
- "moment": {
51
- "optional": true
52
- }
53
45
  }
54
46
  }