@ministryofjustice/frontend 3.3.1 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -10
- package/govuk-prototype-kit.config.json +5 -16
- package/moj/all.jquery.min.js +15 -4
- package/moj/all.js +2856 -2280
- package/moj/all.scss +2 -0
- package/moj/components/_all.scss +1 -0
- package/moj/components/action-bar/_action-bar.scss +4 -6
- package/moj/components/add-another/_add-another.scss +9 -7
- package/moj/components/add-another/add-another.js +128 -76
- package/moj/components/alert/README.md +0 -0
- package/moj/components/alert/_alert.scss +142 -0
- package/moj/components/alert/alert.js +482 -0
- package/moj/components/alert/alert.spec.helper.js +92 -0
- package/moj/components/alert/macro.njk +3 -0
- package/moj/components/alert/template.njk +83 -0
- package/moj/components/badge/_badge.scss +3 -4
- package/moj/components/banner/_banner.scss +5 -10
- package/moj/components/button-menu/_button-menu.scss +10 -9
- package/moj/components/button-menu/button-menu.js +348 -318
- package/moj/components/cookie-banner/_cookie-banner.scss +6 -5
- package/moj/components/currency-input/_currency-input.scss +4 -4
- package/moj/components/date-picker/README.md +14 -17
- package/moj/components/date-picker/_date-picker.scss +122 -106
- package/moj/components/date-picker/date-picker.js +927 -900
- package/moj/components/filter/README.md +1 -1
- package/moj/components/filter/_filter.scss +53 -75
- package/moj/components/filter-toggle-button/filter-toggle-button.js +122 -87
- package/moj/components/form-validator/form-validator.js +399 -156
- package/moj/components/header/_header.scss +17 -19
- package/moj/components/identity-bar/_identity-bar.scss +5 -5
- package/moj/components/interruption-card/_interruption-card.scss +2 -2
- package/moj/components/messages/_messages.scss +12 -19
- package/moj/components/multi-file-upload/README.md +1 -1
- package/moj/components/multi-file-upload/_multi-file-upload.scss +34 -30
- package/moj/components/multi-file-upload/multi-file-upload.js +454 -183
- package/moj/components/multi-select/_multi-select.scss +4 -3
- package/moj/components/multi-select/multi-select.js +106 -70
- package/moj/components/notification-badge/_notification-badge.scss +12 -12
- package/moj/components/organisation-switcher/_organisation-switcher.scss +1 -1
- package/moj/components/page-header-actions/_page-header-actions.scss +3 -2
- package/moj/components/pagination/_pagination.scss +26 -31
- package/moj/components/password-reveal/_password-reveal.scss +1 -2
- package/moj/components/password-reveal/password-reveal.js +63 -31
- package/moj/components/primary-navigation/_primary-navigation.scss +26 -29
- package/moj/components/progress-bar/_progress-bar.scss +21 -26
- package/moj/components/rich-text-editor/_rich-text-editor.scss +17 -16
- package/moj/components/rich-text-editor/rich-text-editor.js +186 -139
- package/moj/components/search/_search.scss +6 -4
- package/moj/components/search-toggle/search-toggle.js +83 -53
- package/moj/components/search-toggle/search-toggle.scss +21 -15
- package/moj/components/side-navigation/_side-navigation.scss +12 -21
- package/moj/components/sortable-table/_sortable-table.scss +25 -23
- package/moj/components/sortable-table/sortable-table.js +162 -119
- package/moj/components/sub-navigation/_sub-navigation.scss +24 -28
- package/moj/components/tag/_tag.scss +8 -9
- package/moj/components/task-list/_task-list.scss +8 -7
- package/moj/components/ticket-panel/_ticket-panel.scss +14 -6
- package/moj/components/timeline/_timeline.scss +18 -20
- package/moj/filters/all.js +28 -30
- package/moj/filters/prototype-kit-13-filters.js +2 -1
- package/moj/helpers/_all.scss +1 -0
- package/moj/helpers/_hidden.scss +1 -1
- package/moj/helpers/_links.scss +20 -0
- package/moj/helpers.js +218 -51
- package/moj/init.js +2 -2
- package/moj/moj-frontend.min.css +2 -2
- package/moj/moj-frontend.min.js +15 -4
- package/moj/objects/_filter-layout.scss +11 -10
- package/moj/objects/_scrollable-pane.scss +11 -14
- package/moj/settings/_colours.scss +5 -0
- package/moj/settings/_measurements.scss +0 -2
- package/moj/utilities/_hidden.scss +3 -3
- package/moj/utilities/_width-container.scss +1 -1
- package/moj/version.js +28 -1
- package/package.json +1 -1
- package/moj/all.spec.js +0 -22
- package/moj/components/button-menu/button-menu.spec.js +0 -361
- package/moj/components/date-picker/date-picker.spec.js +0 -1130
- package/moj/components/filter-toggle-button/filter-toggle-button.spec.js +0 -304
- package/moj/components/multi-select/multi-select.spec.js +0 -135
- package/moj/components/password-reveal/password-reveal.spec.js +0 -55
- package/moj/components/search-toggle/search-toggle.spec.js +0 -134
- package/moj/namespace.js +0 -1
|
@@ -1,70 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.MOJFrontend = factory());
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
|
+
|
|
7
|
+
function getDefaultExportFromCjs (x) {
|
|
8
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
var _global_window_jQuery = window.jQuery;
|
|
12
|
+
|
|
13
|
+
var multiSelect$1;
|
|
14
|
+
var hasRequiredMultiSelect;
|
|
15
|
+
|
|
16
|
+
function requireMultiSelect () {
|
|
17
|
+
if (hasRequiredMultiSelect) return multiSelect$1;
|
|
18
|
+
hasRequiredMultiSelect = 1;
|
|
19
|
+
const $ = _global_window_jQuery;
|
|
20
|
+
|
|
21
|
+
function MultiSelect(options) {
|
|
22
|
+
this.container = $(options.container);
|
|
23
|
+
|
|
24
|
+
if (this.container.data('moj-multi-select-initialised')) {
|
|
25
|
+
return
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
this.container.data('moj-multi-select-initialised', true);
|
|
29
|
+
|
|
30
|
+
const idPrefix = options.id_prefix;
|
|
31
|
+
let allId = 'checkboxes-all';
|
|
32
|
+
if (typeof idPrefix !== 'undefined') {
|
|
33
|
+
allId = `${idPrefix}checkboxes-all`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
this.toggle = $(this.getToggleHtml(allId));
|
|
37
|
+
this.toggleButton = this.toggle.find('input');
|
|
38
|
+
this.toggleButton.on('click', $.proxy(this, 'onButtonClick'));
|
|
39
|
+
this.container.append(this.toggle);
|
|
40
|
+
this.checkboxes = $(options.checkboxes);
|
|
41
|
+
this.checkboxes.on('click', $.proxy(this, 'onCheckboxClick'));
|
|
42
|
+
this.checked = options.checked || false;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
MultiSelect.prototype.getToggleHtml = function (allId) {
|
|
46
|
+
let html = '';
|
|
47
|
+
html +=
|
|
48
|
+
'<div class="govuk-checkboxes__item govuk-checkboxes--small moj-multi-select__checkbox">';
|
|
49
|
+
html += ` <input type="checkbox" class="govuk-checkboxes__input" id="${allId}">`;
|
|
50
|
+
html += ` <label class="govuk-label govuk-checkboxes__label moj-multi-select__toggle-label" for="${allId}">`;
|
|
51
|
+
html += ' <span class="govuk-visually-hidden">Select all</span>';
|
|
52
|
+
html += ' </label>';
|
|
53
|
+
html += '</div>';
|
|
54
|
+
return html
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
MultiSelect.prototype.onButtonClick = function (e) {
|
|
58
|
+
if (this.checked) {
|
|
59
|
+
this.uncheckAll();
|
|
60
|
+
this.toggleButton[0].checked = false;
|
|
61
|
+
} else {
|
|
62
|
+
this.checkAll();
|
|
63
|
+
this.toggleButton[0].checked = true;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
MultiSelect.prototype.checkAll = function () {
|
|
68
|
+
this.checkboxes.each(
|
|
69
|
+
$.proxy(function (index, el) {
|
|
70
|
+
el.checked = true;
|
|
71
|
+
}, this)
|
|
72
|
+
);
|
|
73
|
+
this.checked = true;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
MultiSelect.prototype.uncheckAll = function () {
|
|
77
|
+
this.checkboxes.each(
|
|
78
|
+
$.proxy(function (index, el) {
|
|
79
|
+
el.checked = false;
|
|
80
|
+
}, this)
|
|
81
|
+
);
|
|
82
|
+
this.checked = false;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
MultiSelect.prototype.onCheckboxClick = function (e) {
|
|
86
|
+
if (!e.target.checked) {
|
|
87
|
+
this.toggleButton[0].checked = false;
|
|
88
|
+
this.checked = false;
|
|
89
|
+
} else {
|
|
90
|
+
if (this.checkboxes.filter(':checked').length === this.checkboxes.length) {
|
|
91
|
+
this.toggleButton[0].checked = true;
|
|
92
|
+
this.checked = true;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
multiSelect$1 = { MultiSelect };
|
|
98
|
+
return multiSelect$1;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
var multiSelectExports = requireMultiSelect();
|
|
102
|
+
var multiSelect = /*@__PURE__*/getDefaultExportFromCjs(multiSelectExports);
|
|
103
|
+
|
|
104
|
+
return multiSelect;
|
|
105
|
+
|
|
106
|
+
}));
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
========================================================================== */
|
|
4
4
|
|
|
5
5
|
.moj-notification-badge {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
6
|
+
@include govuk-font($size: 16, $weight: "bold");
|
|
7
|
+
display: inline-block;
|
|
8
|
+
min-width: 15px;
|
|
9
|
+
padding: 5px 8px 2px;
|
|
10
|
+
border-radius: 75px;
|
|
11
|
+
color: govuk-colour("white");
|
|
12
|
+
background-color: govuk-colour("red");
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
text-align: center;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
.moj-page-header-actions {
|
|
2
2
|
display: flex;
|
|
3
|
+
min-height: govuk-spacing(7); // Match button height
|
|
4
|
+
margin-bottom: govuk-spacing(7);
|
|
3
5
|
flex-wrap: wrap;
|
|
4
6
|
justify-content: space-between;
|
|
5
7
|
align-items: center;
|
|
6
8
|
gap: govuk-spacing(2);
|
|
7
|
-
margin-bottom: govuk-spacing(7);
|
|
8
|
-
min-height: govuk-spacing(7); // Match button height
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.moj-page-header-actions__title {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
.moj-button-group {
|
|
19
19
|
margin-bottom: 0;
|
|
20
20
|
}
|
|
21
|
+
|
|
21
22
|
.govuk-button {
|
|
22
23
|
margin-bottom: 0;
|
|
23
24
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// text-align: center;
|
|
3
3
|
|
|
4
4
|
@include govuk-media-query($from: desktop) {
|
|
5
|
+
margin-right: - govuk-spacing(1);
|
|
5
6
|
|
|
6
7
|
// Alignment adjustments
|
|
7
8
|
margin-left: - govuk-spacing(1);
|
|
8
|
-
margin-right: - govuk-spacing(1);
|
|
9
9
|
|
|
10
10
|
// Hide whitespace between elements
|
|
11
11
|
font-size: 0;
|
|
@@ -13,19 +13,18 @@
|
|
|
13
13
|
// Trick to remove the need for floats
|
|
14
14
|
text-align: justify;
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
content:
|
|
16
|
+
&::after {
|
|
17
|
+
content: "";
|
|
18
18
|
display: inline-block;
|
|
19
19
|
width: 100%;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
.moj-pagination__list {
|
|
26
|
-
list-style: none;
|
|
27
25
|
margin: 0;
|
|
28
26
|
padding: 0;
|
|
27
|
+
list-style: none;
|
|
29
28
|
@include govuk-media-query($from: desktop) {
|
|
30
29
|
display: inline-block;
|
|
31
30
|
margin-bottom: 0;
|
|
@@ -36,6 +35,7 @@
|
|
|
36
35
|
.moj-pagination__results {
|
|
37
36
|
@include govuk-font(19);
|
|
38
37
|
margin-top: 0;
|
|
38
|
+
padding: govuk-spacing(1);
|
|
39
39
|
@include govuk-media-query($from: desktop) {
|
|
40
40
|
display: inline-block;
|
|
41
41
|
margin-bottom: 0;
|
|
@@ -50,49 +50,49 @@
|
|
|
50
50
|
|
|
51
51
|
.moj-pagination__item--active,
|
|
52
52
|
.moj-pagination__item--dots {
|
|
53
|
-
font-weight: bold;
|
|
54
53
|
height: 25px;
|
|
55
54
|
padding: govuk-spacing(1) govuk-spacing(2);
|
|
55
|
+
font-weight: bold;
|
|
56
56
|
text-align: center;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.moj-pagination__item--dots {
|
|
60
|
-
padding-left: 0;
|
|
61
60
|
padding-right: 0;
|
|
61
|
+
padding-left: 0;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
.moj-pagination__item--prev .moj-pagination__link
|
|
65
|
-
.moj-pagination__item--next .moj-pagination__link
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
.moj-pagination__item--prev .moj-pagination__link::before,
|
|
65
|
+
.moj-pagination__item--next .moj-pagination__link::after {
|
|
66
|
+
content: "";
|
|
67
|
+
display: inline-block;
|
|
68
|
+
width: 10px;
|
|
69
|
+
height: 10px;
|
|
70
|
+
-webkit-transform: rotate(-45deg);
|
|
71
|
+
-ms-transform: rotate(-45deg);
|
|
72
|
+
transform: rotate(-45deg);
|
|
73
|
+
border-style: solid;
|
|
74
|
+
color: govuk-colour("black");
|
|
75
|
+
background: transparent;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
.moj-pagination__item--prev .moj-pagination__link
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
.moj-pagination__item--prev .moj-pagination__link::before {
|
|
79
|
+
margin-right: govuk-spacing(1);
|
|
80
|
+
border-width: 3px 0 0 3px;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
.moj-pagination__item--next .moj-pagination__link
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
.moj-pagination__item--next .moj-pagination__link::after {
|
|
84
|
+
margin-left: govuk-spacing(1);
|
|
85
|
+
border-width: 0 3px 3px 0;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.moj-pagination__link {
|
|
89
89
|
@include govuk-link-common;
|
|
90
90
|
@include govuk-link-style-default;
|
|
91
91
|
display: block;
|
|
92
|
+
min-width: 25px;
|
|
92
93
|
padding: govuk-spacing(1);
|
|
93
94
|
text-align: center;
|
|
94
95
|
text-decoration: none;
|
|
95
|
-
min-width: 25px;
|
|
96
96
|
|
|
97
97
|
&:link,
|
|
98
98
|
&:visited {
|
|
@@ -106,9 +106,4 @@
|
|
|
106
106
|
&:focus {
|
|
107
107
|
color: govuk-colour("black");
|
|
108
108
|
}
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.moj-pagination__results {
|
|
113
|
-
padding: govuk-spacing(1);
|
|
114
109
|
}
|
|
@@ -1,32 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
$el.data('moj-password-reveal-initialised', true);
|
|
10
|
-
$el.attr('spellcheck', 'false');
|
|
11
|
-
|
|
12
|
-
$el.wrap('<div class="moj-password-reveal"></div>');
|
|
13
|
-
this.container = $(this.el).parent();
|
|
14
|
-
this.createButton();
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
MOJFrontend.PasswordReveal.prototype.createButton = function() {
|
|
18
|
-
this.button = $('<button type="button" class="govuk-button govuk-button--secondary moj-password-reveal__button">Show <span class="govuk-visually-hidden">password</span></button>');
|
|
19
|
-
this.container.append(this.button);
|
|
20
|
-
this.button.on('click', $.proxy(this, 'onButtonClick'));
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
MOJFrontend.PasswordReveal.prototype.onButtonClick = function() {
|
|
24
|
-
if (this.el.type === 'password') {
|
|
25
|
-
this.el.type = 'text';
|
|
26
|
-
this.button.html('Hide <span class="govuk-visually-hidden">password</span>');
|
|
27
|
-
} else {
|
|
28
|
-
this.el.type = 'password';
|
|
29
|
-
this.button.html('Show <span class="govuk-visually-hidden">password</span>');
|
|
30
|
-
}
|
|
31
|
-
};
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.MOJFrontend = factory());
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
32
6
|
|
|
7
|
+
function getDefaultExportFromCjs (x) {
|
|
8
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
var _global_window_jQuery = window.jQuery;
|
|
12
|
+
|
|
13
|
+
var passwordReveal$1;
|
|
14
|
+
var hasRequiredPasswordReveal;
|
|
15
|
+
|
|
16
|
+
function requirePasswordReveal () {
|
|
17
|
+
if (hasRequiredPasswordReveal) return passwordReveal$1;
|
|
18
|
+
hasRequiredPasswordReveal = 1;
|
|
19
|
+
const $ = _global_window_jQuery;
|
|
20
|
+
|
|
21
|
+
function PasswordReveal(element) {
|
|
22
|
+
this.el = element;
|
|
23
|
+
const $el = $(this.el);
|
|
24
|
+
|
|
25
|
+
if ($el.data('moj-password-reveal-initialised')) {
|
|
26
|
+
return
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
$el.data('moj-password-reveal-initialised', true);
|
|
30
|
+
$el.attr('spellcheck', 'false');
|
|
31
|
+
|
|
32
|
+
$el.wrap('<div class="moj-password-reveal"></div>');
|
|
33
|
+
this.container = $(this.el).parent();
|
|
34
|
+
this.createButton();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
PasswordReveal.prototype.createButton = function () {
|
|
38
|
+
this.button = $(
|
|
39
|
+
'<button type="button" class="govuk-button govuk-button--secondary moj-password-reveal__button">Show <span class="govuk-visually-hidden">password</span></button>'
|
|
40
|
+
);
|
|
41
|
+
this.container.append(this.button);
|
|
42
|
+
this.button.on('click', $.proxy(this, 'onButtonClick'));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
PasswordReveal.prototype.onButtonClick = function () {
|
|
46
|
+
if (this.el.type === 'password') {
|
|
47
|
+
this.el.type = 'text';
|
|
48
|
+
this.button.html('Hide <span class="govuk-visually-hidden">password</span>');
|
|
49
|
+
} else {
|
|
50
|
+
this.el.type = 'password';
|
|
51
|
+
this.button.html('Show <span class="govuk-visually-hidden">password</span>');
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
passwordReveal$1 = { PasswordReveal };
|
|
56
|
+
return passwordReveal$1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var passwordRevealExports = requirePasswordReveal();
|
|
60
|
+
var passwordReveal = /*@__PURE__*/getDefaultExportFromCjs(passwordRevealExports);
|
|
61
|
+
|
|
62
|
+
return passwordReveal;
|
|
63
|
+
|
|
64
|
+
}));
|
|
@@ -11,12 +11,11 @@
|
|
|
11
11
|
font-size: 0; // Hide whitespace between elements
|
|
12
12
|
text-align: justify; // Trick to remove the need for floats
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
content:
|
|
14
|
+
&::after {
|
|
15
|
+
content: "";
|
|
16
16
|
display: inline-block;
|
|
17
17
|
width: 100%;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
.moj-primary-navigation__nav {
|
|
@@ -25,36 +24,34 @@
|
|
|
25
24
|
display: inline-block;
|
|
26
25
|
vertical-align: middle;
|
|
27
26
|
}
|
|
28
|
-
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
.moj-primary-navigation__list {
|
|
32
|
-
font-size: 0; // Removes white space when using inline-block on child element.
|
|
33
|
-
list-style: none;
|
|
34
30
|
margin: 0;
|
|
35
31
|
padding: 0;
|
|
32
|
+
font-size: 0; // Removes white space when using inline-block on child element.
|
|
33
|
+
list-style: none;
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
.moj-primary-navigation__item {
|
|
39
37
|
@include govuk-font($size: 19);
|
|
40
38
|
display: inline-block;
|
|
41
|
-
margin-right: govuk-spacing(4);
|
|
42
39
|
margin-top: 0;
|
|
40
|
+
margin-right: govuk-spacing(4);
|
|
43
41
|
|
|
44
42
|
&:last-child {
|
|
45
43
|
margin-right: 0;
|
|
46
44
|
}
|
|
47
|
-
|
|
48
45
|
}
|
|
49
46
|
|
|
50
47
|
.moj-primary-navigation__link {
|
|
51
48
|
@include govuk-link-common;
|
|
52
49
|
@include govuk-link-style-default;
|
|
53
50
|
display: block;
|
|
54
|
-
padding-bottom: 15px;
|
|
55
51
|
padding-top: 15px;
|
|
56
|
-
|
|
52
|
+
padding-bottom: 15px;
|
|
57
53
|
font-weight: bold;
|
|
54
|
+
text-decoration: none;
|
|
58
55
|
|
|
59
56
|
&:link,
|
|
60
57
|
&:visited {
|
|
@@ -66,63 +63,63 @@
|
|
|
66
63
|
}
|
|
67
64
|
|
|
68
65
|
&:focus {
|
|
69
|
-
color: govuk-colour("black"); // Focus colour on yellow should really be black.
|
|
70
66
|
position: relative; // Ensure focus sits above everything else.
|
|
71
67
|
z-index: 1;
|
|
68
|
+
color: govuk-colour("black"); // Focus colour on yellow should really be black.
|
|
72
69
|
box-shadow: none;
|
|
73
70
|
}
|
|
74
71
|
|
|
75
|
-
&:focus
|
|
76
|
-
background-color: govuk-colour("black");
|
|
72
|
+
&:focus::before {
|
|
77
73
|
content: "";
|
|
78
74
|
display: block;
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
position: absolute;
|
|
76
|
+
bottom: 0;
|
|
77
|
+
left: 0;
|
|
81
78
|
width: 100%;
|
|
79
|
+
height: 5px;
|
|
80
|
+
background-color: govuk-colour("black");
|
|
82
81
|
}
|
|
83
82
|
|
|
84
83
|
&[aria-current] {
|
|
85
|
-
color: $govuk-link-colour;
|
|
86
84
|
position: relative;
|
|
87
|
-
|
|
85
|
+
color: $govuk-link-colour;
|
|
88
86
|
font-weight: bold;
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
|
|
89
|
+
&::before {
|
|
91
90
|
content: "";
|
|
92
91
|
display: block;
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
position: absolute;
|
|
93
|
+
bottom: 0;
|
|
94
|
+
left: 0;
|
|
95
95
|
width: 100%;
|
|
96
|
+
height: 5px;
|
|
97
|
+
background-color: $govuk-link-colour;
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
&:hover {
|
|
99
101
|
color: $govuk-link-hover-colour;
|
|
100
102
|
|
|
101
|
-
|
|
103
|
+
&::before {
|
|
102
104
|
background-color: $govuk-link-hover-colour;
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
&:focus {
|
|
107
|
-
color: govuk-colour("black"); // Focus colour on yellow should really be black.
|
|
108
109
|
position: relative; // Ensure focus sits above everything else.
|
|
109
110
|
border: none;
|
|
111
|
+
color: govuk-colour("black"); // Focus colour on yellow should really be black.
|
|
110
112
|
|
|
111
|
-
|
|
113
|
+
&::before {
|
|
112
114
|
background-color: govuk-colour("black");
|
|
113
115
|
}
|
|
114
|
-
|
|
115
116
|
}
|
|
116
|
-
|
|
117
117
|
}
|
|
118
|
-
|
|
119
118
|
}
|
|
120
119
|
|
|
121
120
|
.moj-primary-navigation__search {
|
|
122
|
-
|
|
123
121
|
@include govuk-media-query($from: desktop) {
|
|
124
122
|
display: inline-block;
|
|
125
123
|
vertical-align: middle;
|
|
126
124
|
}
|
|
127
|
-
|
|
128
125
|
}
|