@ministryofjustice/frontend 1.3.1 → 1.4.1

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.
Files changed (90) hide show
  1. package/moj/all-ie8.scss +0 -0
  2. package/moj/all.js +6 -6
  3. package/moj/all.scss +0 -0
  4. package/moj/assets/images/icon-alert-information.svg +0 -0
  5. package/moj/assets/images/icon-alert-success.svg +0 -0
  6. package/moj/assets/images/icon-alert-warning.svg +0 -0
  7. package/moj/assets/images/icon-arrow-black-down.svg +0 -0
  8. package/moj/assets/images/icon-arrow-black-up.svg +0 -0
  9. package/moj/assets/images/icon-arrow-white-down.svg +0 -0
  10. package/moj/assets/images/icon-arrow-white-up.svg +0 -0
  11. package/moj/assets/images/icon-close-cross-black.svg +0 -0
  12. package/moj/assets/images/icon-document.png +0 -0
  13. package/moj/assets/images/icon-document.svg +0 -0
  14. package/moj/assets/images/icon-progress-tick.png +0 -0
  15. package/moj/assets/images/icon-progress-tick.svg +0 -0
  16. package/moj/assets/images/icon-search-white.svg +0 -0
  17. package/moj/assets/images/icon-tag-remove-cross-white.svg +0 -0
  18. package/moj/assets/images/icon-tag-remove-cross.svg +0 -0
  19. package/moj/assets/images/icon-toggle-plus-minus.svg +0 -0
  20. package/moj/assets/images/icon-wysiwyg-bold.svg +0 -0
  21. package/moj/assets/images/icon-wysiwyg-italic.svg +0 -0
  22. package/moj/assets/images/icon-wysiwyg-ordered-list.svg +0 -0
  23. package/moj/assets/images/icon-wysiwyg-underline.svg +0 -0
  24. package/moj/assets/images/icon-wysiwyg-unordered-list.svg +0 -0
  25. package/moj/assets/images/moj-apple-touch-icon-152x152.png +0 -0
  26. package/moj/assets/images/moj-apple-touch-icon-167x167.png +0 -0
  27. package/moj/assets/images/moj-apple-touch-icon-180x180.png +0 -0
  28. package/moj/assets/images/moj-apple-touch-icon.png +0 -0
  29. package/moj/assets/images/moj-logotype-crest.png +0 -0
  30. package/moj/assets/images/moj-logotype-crest.svg +0 -0
  31. package/moj/assets/images/moj-opengraph-image.png +0 -0
  32. package/moj/components/_all.scss +0 -0
  33. package/moj/components/add-another/README.md +0 -0
  34. package/moj/components/add-another/_add-another.scss +0 -0
  35. package/moj/components/add-another/add-another.js +0 -0
  36. package/moj/components/cookie-banner/README.md +0 -0
  37. package/moj/components/cookie-banner/_cookie-banner.scss +0 -0
  38. package/moj/components/form-validator/README.md +0 -0
  39. package/moj/components/form-validator/form-validator.js +0 -0
  40. package/moj/components/multi-file-upload/multi-file-upload.js +3 -3
  41. package/moj/components/pagination/README.md +0 -0
  42. package/moj/components/pagination/_pagination.scss +0 -0
  43. package/moj/components/pagination/macro.njk +0 -0
  44. package/moj/components/pagination/template.njk +6 -8
  45. package/moj/components/password-reveal/password-reveal.js +3 -3
  46. package/moj/components/progress-bar/README.md +0 -0
  47. package/moj/components/progress-bar/_progress-bar.scss +0 -0
  48. package/moj/components/progress-bar/macro.njk +0 -0
  49. package/moj/components/progress-bar/template.njk +0 -0
  50. package/moj/components/rich-text-editor/README.md +0 -0
  51. package/moj/components/rich-text-editor/_rich-text-editor.scss +0 -0
  52. package/moj/components/rich-text-editor/rich-text-editor.js +0 -0
  53. package/moj/components/search/README.md +0 -0
  54. package/moj/components/search/_search.scss +0 -0
  55. package/moj/components/search/macro.njk +0 -0
  56. package/moj/components/search/template.njk +0 -0
  57. package/moj/components/search-toggle/README.md +0 -0
  58. package/moj/components/sortable-table/README.md +0 -0
  59. package/moj/components/sortable-table/_sortable-table.scss +0 -0
  60. package/moj/components/sortable-table/sortable-table.js +0 -0
  61. package/moj/components/sub-navigation/README.md +0 -0
  62. package/moj/components/sub-navigation/_sub-navigation.scss +0 -0
  63. package/moj/components/sub-navigation/macro.njk +0 -0
  64. package/moj/components/sub-navigation/template.njk +0 -0
  65. package/moj/components/ticket-panel/README.md +0 -0
  66. package/moj/components/ticket-panel/_ticket-panel.scss +0 -0
  67. package/moj/components/ticket-panel/macro.njk +0 -0
  68. package/moj/components/ticket-panel/template.njk +0 -0
  69. package/moj/components/timeline/README.md +0 -0
  70. package/moj/components/timeline/_timeline.scss +0 -0
  71. package/moj/components/timeline/macro.njk +0 -0
  72. package/moj/components/timeline/template.njk +0 -0
  73. package/moj/helpers/_all.scss +0 -0
  74. package/moj/helpers/_hidden.scss +0 -0
  75. package/moj/helpers.js +0 -0
  76. package/moj/namespace.js +0 -0
  77. package/moj/objects/_all.scss +0 -0
  78. package/moj/objects/_filter-layout.scss +0 -0
  79. package/moj/objects/_scrollable-pane.scss +0 -0
  80. package/moj/objects/_width-container.scss +0 -0
  81. package/moj/settings/_all.scss +0 -0
  82. package/moj/settings/_assets.scss +0 -0
  83. package/moj/settings/_colours.scss +0 -0
  84. package/moj/settings/_measurements.scss +0 -0
  85. package/moj/utilities/_all.scss +0 -0
  86. package/moj/utilities/_hidden.scss +0 -0
  87. package/moj/utilities/_width-container.scss +0 -0
  88. package/moj/vendor/html5shiv.js +0 -0
  89. package/moj/vendor/jquery.js +0 -0
  90. package/package.json +1 -1
package/moj/all-ie8.scss CHANGED
File without changes
package/moj/all.js CHANGED
@@ -711,11 +711,11 @@ if(MOJFrontend.dragAndDropSupported() && MOJFrontend.formDataSupported() && MOJF
711
711
  MOJFrontend.MultiFileUpload.prototype.getFileRowHtml = function(file) {
712
712
  var html = '';
713
713
  html += '<div class="govuk-summary-list__row moj-multi-file-upload__row">';
714
- html += ' <dd class="govuk-summary-list__value moj-multi-file-upload__message">';
714
+ html += ' <div class="govuk-summary-list__value moj-multi-file-upload__message">';
715
715
  html += '<span class="moj-multi-file-upload__filename">'+file.name+'</span>';
716
716
  html += '<span class="moj-multi-file-upload__progress">0%</span>';
717
- html += ' </dd>';
718
- html += ' <dd class="govuk-summary-list__actions moj-multi-file-upload__actions"></dd>';
717
+ html += ' </div>';
718
+ html += ' <div class="govuk-summary-list__actions moj-multi-file-upload__actions"></div>';
719
719
  html += '</div>';
720
720
  return html;
721
721
  };
@@ -874,7 +874,7 @@ MOJFrontend.PasswordReveal = function(element) {
874
874
  };
875
875
 
876
876
  MOJFrontend.PasswordReveal.prototype.createButton = function() {
877
- this.button = $('<button type="button" class="govuk-button govuk-button--secondary moj-password-reveal__button">Show</button>');
877
+ this.button = $('<button type="button" class="govuk-button govuk-button--secondary moj-password-reveal__button">Show <span class="govuk-visually-hidden">password</span></button>');
878
878
  this.container.append(this.button);
879
879
  this.button.on('click', $.proxy(this, 'onButtonClick'));
880
880
  };
@@ -882,10 +882,10 @@ MOJFrontend.PasswordReveal.prototype.createButton = function() {
882
882
  MOJFrontend.PasswordReveal.prototype.onButtonClick = function() {
883
883
  if (this.el.type === 'password') {
884
884
  this.el.type = 'text';
885
- this.button.text('Hide');
885
+ this.button.html('Hide <span class="govuk-visually-hidden">password</span>');
886
886
  } else {
887
887
  this.el.type = 'password';
888
- this.button.text('Show');
888
+ this.button.html('Show <span class="govuk-visually-hidden">password</span>');
889
889
  }
890
890
  };
891
891
 
package/moj/all.scss CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -99,11 +99,11 @@ if(MOJFrontend.dragAndDropSupported() && MOJFrontend.formDataSupported() && MOJF
99
99
  MOJFrontend.MultiFileUpload.prototype.getFileRowHtml = function(file) {
100
100
  var html = '';
101
101
  html += '<div class="govuk-summary-list__row moj-multi-file-upload__row">';
102
- html += ' <dd class="govuk-summary-list__value moj-multi-file-upload__message">';
102
+ html += ' <div class="govuk-summary-list__value moj-multi-file-upload__message">';
103
103
  html += '<span class="moj-multi-file-upload__filename">'+file.name+'</span>';
104
104
  html += '<span class="moj-multi-file-upload__progress">0%</span>';
105
- html += ' </dd>';
106
- html += ' <dd class="govuk-summary-list__actions moj-multi-file-upload__actions"></dd>';
105
+ html += ' </div>';
106
+ html += ' <div class="govuk-summary-list__actions moj-multi-file-upload__actions"></div>';
107
107
  html += '</div>';
108
108
  return html;
109
109
  };
File without changes
File without changes
File without changes
@@ -1,29 +1,27 @@
1
- <nav class="moj-pagination {{- ' ' + params.classes if params.classes}}" id="pagination-label">
2
-
3
- <p class="govuk-visually-hidden" aria-labelledby="pagination-label">Pagination navigation</p>
1
+ <nav class="moj-pagination {{- ' ' + params.classes if params.classes}}" aria-label="Pagination navigation">
4
2
 
5
3
  <ul class="moj-pagination__list">
6
4
  {%- if params.previous %}
7
5
  <li class="moj-pagination__item moj-pagination__item--prev">
8
- <a class="moj-pagination__link" href="{{ params.previous.href }}">{{ params.previous.text }}<span class="govuk-visually-hidden"> set of pages</span></a>
6
+ <a class="moj-pagination__link" href="{{ params.previous.href }}">{{ params.previous.text }}<span class="govuk-visually-hidden"> page</span></a>
9
7
  </li>
10
8
  {% endif -%}
11
9
 
12
10
  {%- for item in params.items %}
13
11
  {%- if item.type == 'dots' %}
14
- <li class="moj-pagination__item moj-pagination__item--dots">...</li>
12
+ <li class="moj-pagination__item moj-pagination__item--dots">…</li>
15
13
  {% else %}
16
14
  {%- if item.selected %}
17
- <li class="moj-pagination__item moj-pagination__item--active">{{ item.text }}</li>
15
+ <li class="moj-pagination__item moj-pagination__item--active" aria-label="Page {{ item.text }} of {{ params.results.count }}" aria-current="page">{{ item.text }}</li>
18
16
  {% else %}
19
- <li class="moj-pagination__item"><a class="moj-pagination__link" href="{{ item.href }}">{{ item.text }}</a></li>
17
+ <li class="moj-pagination__item"><a class="moj-pagination__link" href="{{ item.href }}" aria-label="Page {{ item.text }} of {{ params.results.count }}">{{ item.text }}</a></li>
20
18
  {% endif -%}
21
19
  {% endif -%}
22
20
  {% endfor -%}
23
21
 
24
22
  {%- if params.next %}
25
23
  <li class="moj-pagination__item moj-pagination__item--next">
26
- <a class="moj-pagination__link" href="{{ params.next.href }}">{{ params.next.text }}<span class="govuk-visually-hidden"> set of pages</span></a>
24
+ <a class="moj-pagination__link" href="{{ params.next.href }}">{{ params.next.text }}<span class="govuk-visually-hidden"> page</span></a>
27
25
  </li>
28
26
  {% endif -%}
29
27
  </ul>
@@ -14,7 +14,7 @@ MOJFrontend.PasswordReveal = function(element) {
14
14
  };
15
15
 
16
16
  MOJFrontend.PasswordReveal.prototype.createButton = function() {
17
- this.button = $('<button type="button" class="govuk-button govuk-button--secondary moj-password-reveal__button">Show</button>');
17
+ this.button = $('<button type="button" class="govuk-button govuk-button--secondary moj-password-reveal__button">Show <span class="govuk-visually-hidden">password</span></button>');
18
18
  this.container.append(this.button);
19
19
  this.button.on('click', $.proxy(this, 'onButtonClick'));
20
20
  };
@@ -22,9 +22,9 @@ MOJFrontend.PasswordReveal.prototype.createButton = function() {
22
22
  MOJFrontend.PasswordReveal.prototype.onButtonClick = function() {
23
23
  if (this.el.type === 'password') {
24
24
  this.el.type = 'text';
25
- this.button.text('Hide');
25
+ this.button.html('Hide <span class="govuk-visually-hidden">password</span>');
26
26
  } else {
27
27
  this.el.type = 'password';
28
- this.button.text('Show');
28
+ this.button.html('Show <span class="govuk-visually-hidden">password</span>');
29
29
  }
30
30
  };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/moj/helpers.js CHANGED
File without changes
package/moj/namespace.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
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": "1.3.1",
4
+ "version": "1.4.1",
5
5
  "main": "moj/all.js",
6
6
  "sass": "moj/all.scss",
7
7
  "engines": {