@ministryofjustice/frontend 3.7.0 → 4.0.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 (87) hide show
  1. package/govuk-prototype-kit.config.json +44 -32
  2. package/moj/_base.scss +8 -0
  3. package/moj/all.jquery.min.js +1 -1
  4. package/moj/all.jquery.min.js.map +1 -1
  5. package/moj/all.js +7 -7
  6. package/moj/all.js.map +1 -1
  7. package/moj/all.scss +4 -9
  8. package/moj/components/_all.scss +33 -33
  9. package/moj/components/action-bar/_action-bar.scss +2 -0
  10. package/moj/components/add-another/_add-another.scss +2 -0
  11. package/moj/components/alert/_alert.scss +18 -15
  12. package/moj/components/alert/template.njk +1 -1
  13. package/moj/components/badge/README.md +1 -1
  14. package/moj/components/badge/_badge.scss +3 -1
  15. package/moj/components/badge/macro.njk +1 -1
  16. package/moj/components/banner/README.md +3 -0
  17. package/moj/components/banner/_banner.scss +3 -1
  18. package/moj/components/button-menu/README.md +2 -2
  19. package/moj/components/button-menu/_button-menu.scss +15 -18
  20. package/moj/components/button-menu/template.njk +7 -9
  21. package/moj/components/cookie-banner/_cookie-banner.scss +3 -2
  22. package/moj/components/currency-input/README.md +4 -4
  23. package/moj/components/currency-input/_currency-input.scss +3 -1
  24. package/moj/components/date-picker/README.md +1 -1
  25. package/moj/components/date-picker/_date-picker.scss +11 -12
  26. package/moj/components/filter/_filter.scss +7 -4
  27. package/moj/components/form-validator/README.md +2 -4
  28. package/moj/components/header/README.md +1 -1
  29. package/moj/components/header/_header.scss +9 -6
  30. package/moj/components/header/template.njk +2 -2
  31. package/moj/components/identity-bar/_identity-bar.scss +5 -2
  32. package/moj/components/interruption-card/_interruption-card.scss +3 -1
  33. package/moj/components/messages/README.md +15 -10
  34. package/moj/components/messages/_messages.scss +4 -2
  35. package/moj/components/multi-file-upload/_multi-file-upload.scss +2 -0
  36. package/moj/components/multi-file-upload/multi-file-upload.js +6 -6
  37. package/moj/components/multi-file-upload/multi-file-upload.js.map +1 -1
  38. package/moj/components/multi-file-upload/multi-file-upload.mjs +6 -6
  39. package/moj/components/multi-file-upload/multi-file-upload.mjs.map +1 -1
  40. package/moj/components/notification-badge/_notification-badge.scss +3 -2
  41. package/moj/components/organisation-switcher/_organisation-switcher.scss +3 -1
  42. package/moj/components/page-header-actions/_page-header-actions.scss +2 -0
  43. package/moj/components/pagination/_pagination.scss +13 -5
  44. package/moj/components/password-reveal/README.md +2 -2
  45. package/moj/components/password-reveal/_password-reveal.scss +2 -0
  46. package/moj/components/primary-navigation/README.md +1 -1
  47. package/moj/components/primary-navigation/_primary-navigation.scss +14 -5
  48. package/moj/components/progress-bar/_progress-bar.scss +5 -2
  49. package/moj/components/rich-text-editor/README.md +4 -4
  50. package/moj/components/rich-text-editor/_rich-text-editor.scss +3 -0
  51. package/moj/components/search/_search.scss +2 -0
  52. package/moj/components/search-toggle/search-toggle.scss +3 -1
  53. package/moj/components/side-navigation/README.md +1 -1
  54. package/moj/components/side-navigation/_side-navigation.scss +3 -1
  55. package/moj/components/sortable-table/_sortable-table.scss +2 -0
  56. package/moj/components/sub-navigation/README.md +1 -1
  57. package/moj/components/sub-navigation/_sub-navigation.scss +12 -4
  58. package/moj/components/tag/README.md +2 -2
  59. package/moj/components/tag/_tag.scss +2 -0
  60. package/moj/components/task-list/README.md +3 -3
  61. package/moj/components/task-list/_task-list.scss +4 -2
  62. package/moj/components/ticket-panel/README.md +1 -1
  63. package/moj/components/ticket-panel/_ticket-panel.scss +2 -0
  64. package/moj/components/timeline/README.md +15 -10
  65. package/moj/components/timeline/_timeline.scss +7 -4
  66. package/moj/helpers/_all.scss +2 -2
  67. package/moj/helpers/_links.scss +4 -2
  68. package/moj/moj-frontend.min.css +1 -2
  69. package/moj/moj-frontend.min.css.map +1 -1
  70. package/moj/moj-frontend.min.js +1 -1
  71. package/moj/moj-frontend.min.js.map +1 -1
  72. package/moj/objects/_all.scss +4 -4
  73. package/moj/objects/_button-group.scss +94 -13
  74. package/moj/objects/_filter-layout.scss +2 -0
  75. package/moj/objects/_scrollable-pane.scss +2 -0
  76. package/moj/objects/_width-container.scss +3 -0
  77. package/moj/settings/_all.scss +4 -3
  78. package/moj/settings/_assets.scss +5 -2
  79. package/moj/settings/_colours.scss +5 -0
  80. package/moj/settings/_measurements.scss +3 -1
  81. package/moj/settings/_typography.scss +13 -0
  82. package/moj/utilities/_all.scss +2 -2
  83. package/moj/utilities/_hidden.scss +2 -0
  84. package/moj/utilities/_width-container.scss +2 -0
  85. package/moj/vendor/govuk-frontend/_base.scss +5 -0
  86. package/moj/vendor/govuk-frontend/_index.scss +21 -0
  87. package/package.json +3 -1
package/moj/all.scss CHANGED
@@ -1,9 +1,4 @@
1
- $govuk-suppressed-warnings: ("govuk-typography-scale-14");
2
-
3
- @import "node_modules/govuk-frontend/dist/govuk/base";
4
-
5
- @import "settings/all";
6
- @import "helpers/all";
7
- @import "objects/all";
8
- @import "components/all";
9
- @import "utilities/all";
1
+ @forward "base";
2
+ @forward "objects/all";
3
+ @forward "components/all";
4
+ @forward "utilities/all";
@@ -1,33 +1,33 @@
1
- @import "action-bar/action-bar";
2
- @import "add-another/add-another";
3
- @import "alert/alert";
4
- @import "badge/badge";
5
- @import "banner/banner";
6
- @import "button-menu/button-menu";
7
- @import "cookie-banner/cookie-banner";
8
- @import "currency-input/currency-input";
9
- @import "date-picker/date-picker";
10
- @import "filter/filter";
11
- @import "header/header";
12
- @import "identity-bar/identity-bar";
13
- @import "interruption-card/interruption-card";
14
- @import "messages/messages";
15
- @import "multi-file-upload/multi-file-upload";
16
- @import "multi-select/multi-select";
17
- @import "notification-badge/notification-badge";
18
- @import "organisation-switcher/organisation-switcher";
19
- @import "page-header-actions/page-header-actions";
20
- @import "pagination/pagination";
21
- @import "password-reveal/password-reveal";
22
- @import "primary-navigation/primary-navigation";
23
- @import "progress-bar/progress-bar";
24
- @import "rich-text-editor/rich-text-editor";
25
- @import "search-toggle/search-toggle";
26
- @import "search/search";
27
- @import "side-navigation/side-navigation";
28
- @import "sortable-table/sortable-table";
29
- @import "sub-navigation/sub-navigation";
30
- @import "tag/tag";
31
- @import "task-list/task-list";
32
- @import "timeline/timeline";
33
- @import "ticket-panel/ticket-panel";
1
+ @forward "action-bar/action-bar";
2
+ @forward "add-another/add-another";
3
+ @forward "alert/alert";
4
+ @forward "badge/badge";
5
+ @forward "banner/banner";
6
+ @forward "button-menu/button-menu";
7
+ @forward "cookie-banner/cookie-banner";
8
+ @forward "currency-input/currency-input";
9
+ @forward "date-picker/date-picker";
10
+ @forward "filter/filter";
11
+ @forward "header/header";
12
+ @forward "identity-bar/identity-bar";
13
+ @forward "interruption-card/interruption-card";
14
+ @forward "messages/messages";
15
+ @forward "multi-file-upload/multi-file-upload";
16
+ @forward "multi-select/multi-select";
17
+ @forward "notification-badge/notification-badge";
18
+ @forward "organisation-switcher/organisation-switcher";
19
+ @forward "page-header-actions/page-header-actions";
20
+ @forward "pagination/pagination";
21
+ @forward "password-reveal/password-reveal";
22
+ @forward "primary-navigation/primary-navigation";
23
+ @forward "progress-bar/progress-bar";
24
+ @forward "rich-text-editor/rich-text-editor";
25
+ @forward "search-toggle/search-toggle";
26
+ @forward "search/search";
27
+ @forward "side-navigation/side-navigation";
28
+ @forward "sortable-table/sortable-table";
29
+ @forward "sub-navigation/sub-navigation";
30
+ @forward "tag/tag";
31
+ @forward "task-list/task-list";
32
+ @forward "timeline/timeline";
33
+ @forward "ticket-panel/ticket-panel";
@@ -1,3 +1,5 @@
1
+ @use "../../vendor/govuk-frontend" as *;
2
+
1
3
  .moj-action-bar {
2
4
  font-size: 0; // Removes white space
3
5
  }
@@ -1,3 +1,5 @@
1
+ @use "../../vendor/govuk-frontend" as *;
2
+
1
3
  /* ==========================================================================
2
4
  #ADD ANOTHER
3
5
  ========================================================================== */
@@ -1,5 +1,9 @@
1
+ @use "../../helpers/links" as *;
2
+ @use "../../objects/width-container" as *;
3
+ @use "../../settings/colours" as *;
4
+ @use "../../vendor/govuk-frontend" as *;
5
+
1
6
  .moj-alert {
2
- @include govuk-font($size: false);
3
7
  display: -ms-grid;
4
8
  display: grid;
5
9
  margin-bottom: govuk-spacing(6);
@@ -8,8 +12,8 @@
8
12
  background: govuk-colour("white");
9
13
  -ms-grid-columns: min-content fit-content(960px);
10
14
  grid-template-columns: min-content fit-content(960px);
11
-
12
15
  gap: govuk-spacing(2);
16
+ @include govuk-font($size: false);
13
17
 
14
18
  &:focus {
15
19
  outline: $govuk-focus-width solid $govuk-focus-colour;
@@ -30,12 +34,12 @@
30
34
  }
31
35
 
32
36
  .moj-alert__content {
33
- @include govuk-font-size($size: 19);
34
37
  display: block;
35
38
  // Padding to align text with icon
36
39
  padding-top: govuk-px-to-rem(5px);
37
40
  overflow: hidden;
38
41
  color: govuk-colour("black");
42
+ @include govuk-font-size($size: 19);
39
43
 
40
44
  @include govuk-media-query($from: tablet) {
41
45
  padding-top: govuk-px-to-rem(2px);
@@ -68,23 +72,22 @@
68
72
  @include govuk-link-print-friendly;
69
73
  }
70
74
 
71
- .moj-alert__content h2,
72
- .moj-alert__content h3,
73
- .moj-alert__content h4 {
74
- margin-bottom: 2px;
75
- line-height: 30px;
76
- }
77
-
78
- .moj-alert--with-heading .moj-alert__content {
79
- // No padding needed when there is a heading
80
- padding-top: 0;
75
+ .moj-alert__heading {
76
+ display: block;
77
+ margin-top: 0;
78
+ margin-bottom: govuk-px-to-rem(5px);
79
+ @include govuk-text-colour;
80
+ @include govuk-font-size($size: 24);
81
+ @include govuk-typography-weight-bold;
81
82
 
82
83
  @include govuk-media-query($from: tablet) {
83
- padding-top: 0;
84
+ margin-bottom: govuk-px-to-rem(3px);
84
85
  }
85
86
  }
86
87
 
87
- .moj-alert__content *:last-child {
88
+ .moj-alert__content p:last-child,
89
+ .moj-alert__content a:last-child,
90
+ .moj-alert__content ul:last-child {
88
91
  margin-bottom: 0;
89
92
  }
90
93
 
@@ -65,7 +65,7 @@
65
65
  </div>
66
66
  <div class="moj-alert__content">
67
67
  {%- if params.showTitleAsHeading and content %}
68
- <{{-headingTag }} class="govuk-heading-m">
68
+ <{{-headingTag }} class="moj-alert__heading">
69
69
  {{- params.title }}
70
70
  </{{-headingTag}}>
71
71
  {%- endif %}
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Example
6
6
 
7
- ```
7
+ ```njk
8
8
  {{ mojBadge({
9
9
  text: "Status text",
10
10
  classes: "moj-badge--blue"
@@ -1,9 +1,10 @@
1
+ @use "../../vendor/govuk-frontend" as *;
2
+
1
3
  /* ==========================================================================
2
4
  #BADGE
3
5
  ========================================================================== */
4
6
 
5
7
  .moj-badge {
6
- @include govuk-font($size: 14, $weight: "bold");
7
8
  display: inline-block;
8
9
  padding: 0 govuk-spacing(1);
9
10
  border: 2px solid $govuk-brand-colour;
@@ -12,6 +13,7 @@
12
13
  color: $govuk-brand-colour;
13
14
  text-transform: uppercase;
14
15
  vertical-align: middle;
16
+ @include govuk-font($size: 14, $weight: "bold");
15
17
 
16
18
  &--purple {
17
19
  border-color: govuk-colour("purple");
@@ -1,3 +1,3 @@
1
1
  {% macro mojBadge(params) %}
2
2
  {%- include "./template.njk" -%}
3
- {% endmacro %}
3
+ {% endmacro %}
@@ -0,0 +1,3 @@
1
+ # Banner (Archived)
2
+
3
+ - [Guidance](https://design-patterns.service.justice.gov.uk/archive/banner)
@@ -1,3 +1,5 @@
1
+ @use "../../vendor/govuk-frontend" as *;
2
+
1
3
  /* ==========================================================================
2
4
  #BANNER
3
5
  ========================================================================== */
@@ -17,10 +19,10 @@
17
19
  }
18
20
 
19
21
  .moj-banner__message {
20
- @include govuk-font($size: 19);
21
22
  display: block;
22
23
  overflow: hidden;
23
24
  color: govuk-colour("black");
25
+ @include govuk-font($size: 19);
24
26
  }
25
27
 
26
28
  .moj-banner__message h2 {
@@ -8,7 +8,7 @@
8
8
 
9
9
  The macro
10
10
 
11
- ```
11
+ ```njk
12
12
  {{ mojButtonGroup({
13
13
  items: [{
14
14
  text: 'Archive',
@@ -28,7 +28,7 @@ The macro
28
28
 
29
29
  The JavaScript
30
30
 
31
- ```
31
+ ```js
32
32
  new MOJFrontend.ButtonGroup({
33
33
  container: $('.moj-button-group'),
34
34
  mq: '(min-width: 45em)',
@@ -1,19 +1,14 @@
1
- $moj-button-hover-colour: #767676;
2
- $moj-datepicker-mid-grey: #949494;
1
+ @use "../../settings/colours" as *;
2
+ @use "../../vendor/govuk-frontend" as *;
3
3
 
4
4
  .moj-button-menu {
5
5
  display: inline-block;
6
6
  position: relative;
7
-
8
- > .govuk-button {
9
- // required for no-js alignment within moj-button-group
10
- margin-bottom: 0;
11
- vertical-align: baseline;
12
- }
13
7
  }
14
8
 
15
9
  .moj-button-menu__toggle-button {
16
- display: inline;
10
+ margin-bottom: 0;
11
+ vertical-align: baseline;
17
12
  }
18
13
 
19
14
  .moj-button-menu__toggle-button span {
@@ -32,14 +27,17 @@ $moj-datepicker-mid-grey: #949494;
32
27
  }
33
28
 
34
29
  .moj-button-menu__wrapper {
35
- position: absolute;
36
30
  z-index: 10;
37
- top: 43px; // 38px button height, 2px shadow, 3px gap
38
- width: 200px;
39
- margin: 0;
31
+ margin: 5px 0 0; // 2px shadow, 3px gap
40
32
  padding: 0;
41
33
  list-style: none;
42
34
 
35
+ &,
36
+ .moj-button-group--inline {
37
+ position: absolute;
38
+ width: 200px;
39
+ }
40
+
43
41
  &--right {
44
42
  right: 0;
45
43
  }
@@ -51,6 +49,7 @@ $moj-datepicker-mid-grey: #949494;
51
49
  width: auto; // Override GDS’s 100% width
52
50
  margin-right: govuk-spacing(2);
53
51
  margin-bottom: govuk-spacing(2);
52
+ vertical-align: baseline;
54
53
 
55
54
  &:last-child {
56
55
  margin-right: 0;
@@ -59,9 +58,6 @@ $moj-datepicker-mid-grey: #949494;
59
58
 
60
59
  /* Menu items with JS */
61
60
  .moj-button-menu li > .moj-button-menu__item {
62
- $button-shadow-size: 0;
63
- @include govuk-font($size: 19, $line-height: 19px);
64
-
65
61
  box-sizing: border-box;
66
62
  display: inline-block;
67
63
  position: relative;
@@ -72,7 +68,7 @@ $moj-datepicker-mid-grey: #949494;
72
68
  margin-left: 0;
73
69
  padding: govuk-spacing(2);
74
70
  border: $govuk-border-width-form-element solid transparent;
75
- border-bottom: 1px solid $moj-datepicker-mid-grey;
71
+ border-bottom: 1px solid $moj-button-menu-color;
76
72
  border-radius: 0;
77
73
  color: $govuk-text-colour;
78
74
  background-color: govuk-colour("light-grey");
@@ -81,6 +77,7 @@ $moj-datepicker-mid-grey: #949494;
81
77
  cursor: pointer;
82
78
  -webkit-appearance: none;
83
79
  appearance: none;
80
+ @include govuk-font($size: 19, $line-height: 19px);
84
81
 
85
82
  &:link,
86
83
  &:visited,
@@ -102,7 +99,7 @@ $moj-datepicker-mid-grey: #949494;
102
99
  }
103
100
 
104
101
  &:hover {
105
- background-color: $moj-button-hover-colour;
102
+ background-color: $moj-button-menu-hover-color;
106
103
  }
107
104
 
108
105
  &:focus {
@@ -3,7 +3,7 @@
3
3
 
4
4
  {#- Set classes for this component #}
5
5
  {%- set classNames = "moj-button-menu" -%}
6
- {%- set itemClassNames = "moj-button-menu__item govuk-button--secondary" %}
6
+ {%- set defaultItemClassNames = "moj-button-menu__item govuk-button--secondary" %}
7
7
 
8
8
  {%- if params.classes %}
9
9
  {% set classNames = classNames + " " + params.classes %}
@@ -11,12 +11,12 @@
11
11
 
12
12
  {%- set buttonAttributes = {
13
13
  "data-button-text": {
14
- value: params.button.text,
14
+ value: params.button.text,
15
15
  optional: true
16
16
  },
17
17
  "data-button-classes": {
18
18
  value: params.button.classes,
19
- optional: true
19
+ optional: true
20
20
  },
21
21
  "data-align-menu": {
22
22
  value: params.alignMenu,
@@ -27,12 +27,10 @@
27
27
 
28
28
  <div class="{{- classNames -}}" data-module="moj-button-menu" {{- govukAttributes(params.attributes) -}} {{- govukAttributes(buttonAttributes) -}}>
29
29
  {%- for item in params.items %}
30
- {%- if item.classes %}
31
- {% set itemClassNames = itemClassNames + " " + item.classes %}
32
- {% endif %}
33
- {{ govukButton({
30
+ {% set currentItemClassNames = " " + item.classes if item.classes else "" %}
31
+ {{ govukButton({
34
32
  element: item.element,
35
- classes: itemClassNames,
33
+ classes: defaultItemClassNames + currentItemClassNames,
36
34
  text: item.text,
37
35
  html: item.html,
38
36
  name: item.name,
@@ -42,7 +40,7 @@
42
40
  disabled: item.disabled,
43
41
  attributes: item.attributes,
44
42
  preventDoubleClick: items.preventDoubleClick
45
- }) }}
43
+ }) }}
46
44
  {% endfor -%}
47
45
  </div>
48
46
 
@@ -1,4 +1,5 @@
1
- @import "node_modules/govuk-frontend/dist/govuk/objects/width-container";
1
+ @use "../../objects/width-container" as *;
2
+ @use "../../vendor/govuk-frontend" as *;
2
3
 
3
4
  .moj-cookie-banner {
4
5
  box-sizing: border-box;
@@ -18,7 +19,7 @@
18
19
 
19
20
  &__message {
20
21
  margin: 0;
21
- @include govuk-width-container;
22
+ @include moj-width-container;
22
23
  }
23
24
 
24
25
  &__buttons {
@@ -1,6 +1,6 @@
1
- # Currency input
1
+ # Currency input (Archived)
2
2
 
3
- - [Guidance](https://design-patterns.service.justice.gov.uk/components/currency-input)
3
+ - [Guidance](https://design-patterns.service.justice.gov.uk/archive/currency-input)
4
4
 
5
5
  ## Dependencies
6
6
 
@@ -12,7 +12,7 @@ The currency input component is dependent on the following components from the [
12
12
 
13
13
  ## Examples
14
14
 
15
- ```
15
+ ```njk
16
16
  {{ mojCurrencyInput({
17
17
  id: "amount",
18
18
  classes: "govuk-input--width-10",
@@ -29,7 +29,7 @@ The currency input component is dependent on the following components from the [
29
29
 
30
30
  ### With currency specified
31
31
 
32
- ```
32
+ ```njk
33
33
  {{ mojCurrencyInput({
34
34
  id: "amount",
35
35
  classes: "govuk-input--width-10",
@@ -1,15 +1,17 @@
1
+ @use "../../vendor/govuk-frontend" as *;
2
+
1
3
  /* ==========================================================================
2
4
  #DENOTE
3
5
  ========================================================================== */
4
6
 
5
7
  .moj-label__currency {
6
- @include govuk-font(19);
7
8
  position: absolute;
8
9
  // stylelint-disable-next-line declaration-no-important
9
10
  margin: 2px 0 0 2px !important;
10
11
  padding: 5.5px 12px;
11
12
  border-right: 2px solid govuk-colour("black");
12
13
  background-color: govuk-colour("light-grey");
14
+ @include govuk-font(19);
13
15
 
14
16
  &--error {
15
17
  border-right: 2px solid $govuk-error-colour;
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Example
6
6
 
7
- ```
7
+ ```njk
8
8
  {{ mojDatePicker({
9
9
  id: "appointment-date",
10
10
  name: "appointment-date"
@@ -1,6 +1,5 @@
1
- // Custom colour required for passing WCAG 2.2 AA contrast text/background and
2
- // background/surrounding
3
- $moj-datepicker-mid-grey: #949494;
1
+ @use "../../settings/colours" as *;
2
+ @use "../../vendor/govuk-frontend" as *;
4
3
 
5
4
  .moj-datepicker {
6
5
  position: relative;
@@ -35,10 +34,10 @@ $moj-datepicker-mid-grey: #949494;
35
34
  }
36
35
 
37
36
  .moj-datepicker__dialog-title {
38
- @include govuk-font(16);
39
37
  margin-top: 0;
40
38
  margin-bottom: 0;
41
39
  font-weight: bold;
40
+ @include govuk-font(16);
42
41
  }
43
42
 
44
43
  .moj-datepicker__dialog-navbuttons {
@@ -62,9 +61,9 @@ $moj-datepicker-mid-grey: #949494;
62
61
  }
63
62
 
64
63
  th {
65
- @include govuk-font(16);
66
64
  color: $govuk-text-colour;
67
65
  font-weight: bold;
66
+ @include govuk-font(16);
68
67
  }
69
68
  }
70
69
 
@@ -77,7 +76,6 @@ $moj-datepicker-mid-grey: #949494;
77
76
  }
78
77
 
79
78
  .moj-datepicker__button {
80
- @include govuk-font(16);
81
79
  position: relative;
82
80
  width: 44px;
83
81
  height: 40px;
@@ -88,6 +86,7 @@ $moj-datepicker-mid-grey: #949494;
88
86
  outline-offset: -2px;
89
87
  color: $govuk-text-colour;
90
88
  background-color: transparent;
89
+ @include govuk-font(16);
91
90
 
92
91
  @media (forced-colors: active) {
93
92
  // Don't show the bottom bar in forced-color modes as it blocks the outline
@@ -116,7 +115,7 @@ $moj-datepicker-mid-grey: #949494;
116
115
 
117
116
  &:hover {
118
117
  color: $govuk-text-colour;
119
- background-color: $moj-datepicker-mid-grey;
118
+ background-color: $moj-button-menu-color;
120
119
  text-decoration: none;
121
120
  -webkit-box-decoration-break: clone;
122
121
  box-decoration-break: clone;
@@ -137,7 +136,7 @@ $moj-datepicker-mid-grey: #949494;
137
136
 
138
137
  &:focus:hover {
139
138
  outline-color: $govuk-focus-colour;
140
- background-color: $moj-datepicker-mid-grey;
139
+ background-color: $moj-button-menu-color;
141
140
 
142
141
  &::after {
143
142
  background-color: transparent;
@@ -179,7 +178,7 @@ $moj-datepicker-mid-grey: #949494;
179
178
  &:hover {
180
179
  outline-color: $govuk-link-colour;
181
180
  color: $govuk-text-colour;
182
- background-color: $moj-datepicker-mid-grey;
181
+ background-color: $moj-button-menu-color;
183
182
 
184
183
  &::after {
185
184
  background-color: transparent;
@@ -296,14 +295,14 @@ $moj-datepicker-mid-grey: #949494;
296
295
  }
297
296
 
298
297
  &:hover {
299
- border-bottom: 4px solid $moj-datepicker-mid-grey;
298
+ border-bottom: 4px solid $moj-button-menu-color;
300
299
  color: $govuk-text-colour;
301
- background-color: $moj-datepicker-mid-grey;
300
+ background-color: $moj-button-menu-color;
302
301
  }
303
302
 
304
303
  &:focus:hover {
305
304
  border-bottom: 4px solid $govuk-text-colour;
306
305
  color: $govuk-text-colour;
307
- background-color: $moj-datepicker-mid-grey;
306
+ background-color: $moj-button-menu-color;
308
307
  }
309
308
  }
@@ -1,3 +1,6 @@
1
+ @use "../../settings/assets" as *;
2
+ @use "../../vendor/govuk-frontend" as *;
3
+
1
4
  /* ==========================================================================
2
5
  #FILTER
3
6
  ========================================================================== */
@@ -36,7 +39,6 @@
36
39
  overflow: visible; // Override govuk to allow for focus style to be seen
37
40
 
38
41
  button {
39
- @include govuk-font($size: 24, $weight: bold);
40
42
  appearance: none;
41
43
  box-sizing: border-box;
42
44
  display: block;
@@ -50,6 +52,7 @@
50
52
  text-align: left;
51
53
  cursor: pointer; // Adam would not approve
52
54
  -webkit-appearance: none;
55
+ @include govuk-font($size: 24, $weight: bold);
53
56
 
54
57
  // Fix unwanted button padding in Firefox
55
58
  &::-moz-focus-inner {
@@ -84,7 +87,6 @@
84
87
  }
85
88
 
86
89
  .moj-filter__close {
87
- @include govuk-font(19);
88
90
  margin: 0;
89
91
  padding: 0;
90
92
  border: none;
@@ -95,6 +97,7 @@
95
97
  cursor: pointer; // I know Adam won’t like this
96
98
  -webkit-appearance: none;
97
99
  appearance: none;
100
+ @include govuk-font(19);
98
101
 
99
102
  &:focus {
100
103
  outline: none;
@@ -147,10 +150,10 @@
147
150
 
148
151
  .moj-filter__heading-title,
149
152
  .moj-filter__heading-action {
150
- @include govuk-font(16);
151
153
  display: inline-block;
152
154
  text-align: left;
153
155
  vertical-align: middle;
156
+ @include govuk-font(16);
154
157
  }
155
158
 
156
159
  .moj-filter-tags {
@@ -165,7 +168,6 @@
165
168
  }
166
169
 
167
170
  .moj-filter__tag {
168
- @include govuk-font(16);
169
171
  display: inline-block;
170
172
  margin-top: govuk-spacing(1);
171
173
  padding: govuk-spacing(1);
@@ -173,6 +175,7 @@
173
175
  color: govuk-colour("black");
174
176
  background-color: govuk-colour("white");
175
177
  text-decoration: none;
178
+ @include govuk-font(16);
176
179
 
177
180
  &:link,
178
181
  &:visited {
@@ -1,5 +1,3 @@
1
- # Form validator
1
+ # Form validator (Archived)
2
2
 
3
- - [Guidance](https://design-patterns.service.justice.gov.uk/components/form-validator)
4
-
5
- ## Arguments
3
+ - [Guidance](https://design-patterns.service.justice.gov.uk/archive/form-validator)
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Examples
6
6
 
7
- ```
7
+ ```njk
8
8
  {{ mojHeader({
9
9
  organisationLabel: {
10
10
  text: 'Organisation name',