@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,124 +1,167 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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;
|
|
6
9
|
}
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
11
|
+
var _global_window_jQuery = window.jQuery;
|
|
12
|
+
|
|
13
|
+
var sortableTable$1;
|
|
14
|
+
var hasRequiredSortableTable;
|
|
15
|
+
|
|
16
|
+
function requireSortableTable () {
|
|
17
|
+
if (hasRequiredSortableTable) return sortableTable$1;
|
|
18
|
+
hasRequiredSortableTable = 1;
|
|
19
|
+
const $ = _global_window_jQuery;
|
|
20
|
+
|
|
21
|
+
function SortableTable(params) {
|
|
22
|
+
this.table = $(params.table);
|
|
23
|
+
|
|
24
|
+
if (this.table.data('moj-search-toggle-initialised')) {
|
|
25
|
+
return
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
this.table.data('moj-search-toggle-initialised', true);
|
|
29
|
+
|
|
30
|
+
this.setupOptions(params);
|
|
31
|
+
this.body = this.table.find('tbody');
|
|
32
|
+
this.createHeadingButtons();
|
|
33
|
+
this.createStatusBox();
|
|
34
|
+
this.initialiseSortedColumn();
|
|
35
|
+
this.table.on('click', 'th button', $.proxy(this, 'onSortButtonClick'));
|
|
32
36
|
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
MOJFrontend.SortableTable.prototype.createHeadingButton = function(heading, i) {
|
|
37
|
-
var text = heading.text();
|
|
38
|
-
var button = $('<button type="button" data-index="'+i+'">'+text+'</button>');
|
|
39
|
-
heading.text('');
|
|
40
|
-
heading.append(button);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
MOJFrontend.SortableTable.prototype.createStatusBox = function() {
|
|
44
|
-
this.status = $('<div aria-live="polite" role="status" aria-atomic="true" class="govuk-visually-hidden" />');
|
|
45
|
-
this.table.parent().append(this.status);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
MOJFrontend.SortableTable.prototype.initialiseSortedColumn = function () {
|
|
49
|
-
var rows = this.getTableRowsArray();
|
|
50
|
-
|
|
51
|
-
this.table.find("th")
|
|
52
|
-
.filter('[aria-sort="ascending"], [aria-sort="descending"]')
|
|
53
|
-
.first()
|
|
54
|
-
.each((index, el) => {
|
|
55
|
-
var sortDirection = $(el).attr('aria-sort');
|
|
56
|
-
var columnNumber = $(el).find('button').attr('data-index');
|
|
57
|
-
var sortedRows = this.sort(rows, columnNumber, sortDirection);
|
|
58
|
-
this.addRows(sortedRows);
|
|
59
|
-
})
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
MOJFrontend.SortableTable.prototype.onSortButtonClick = function(e) {
|
|
63
|
-
var columnNumber = e.currentTarget.getAttribute('data-index');
|
|
64
|
-
var sortDirection = $(e.currentTarget).parent().attr('aria-sort');
|
|
65
|
-
var newSortDirection;
|
|
66
|
-
if(sortDirection === 'none' || sortDirection === 'descending') {
|
|
67
|
-
newSortDirection = 'ascending';
|
|
68
|
-
} else {
|
|
69
|
-
newSortDirection = 'descending';
|
|
70
|
-
}
|
|
71
|
-
var rows = this.getTableRowsArray();
|
|
72
|
-
var sortedRows = this.sort(rows, columnNumber, newSortDirection);
|
|
73
|
-
this.addRows(sortedRows);
|
|
74
|
-
this.removeButtonStates();
|
|
75
|
-
this.updateButtonState($(e.currentTarget), newSortDirection);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
MOJFrontend.SortableTable.prototype.updateButtonState = function(button, direction) {
|
|
79
|
-
button.parent().attr('aria-sort', direction);
|
|
80
|
-
var message = this.statusMessage;
|
|
81
|
-
message = message.replace(/%heading%/, button.text());
|
|
82
|
-
message = message.replace(/%direction%/, this[direction+'Text']);
|
|
83
|
-
this.status.text(message);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
MOJFrontend.SortableTable.prototype.removeButtonStates = function() {
|
|
87
|
-
this.table.find('thead th').attr('aria-sort', 'none');
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
MOJFrontend.SortableTable.prototype.addRows = function(rows) {
|
|
91
|
-
for(var i = 0; i < rows.length; i++) {
|
|
92
|
-
this.body.append(rows[i]);
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
37
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
38
|
+
SortableTable.prototype.setupOptions = function (params) {
|
|
39
|
+
params = params || {};
|
|
40
|
+
this.statusMessage = params.statusMessage || 'Sort by %heading% (%direction%)';
|
|
41
|
+
this.ascendingText = params.ascendingText || 'ascending';
|
|
42
|
+
this.descendingText = params.descendingText || 'descending';
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
SortableTable.prototype.createHeadingButtons = function () {
|
|
46
|
+
const headings = this.table.find('thead th');
|
|
47
|
+
let heading;
|
|
48
|
+
for (let i = 0; i < headings.length; i++) {
|
|
49
|
+
heading = $(headings[i]);
|
|
50
|
+
if (heading.attr('aria-sort')) {
|
|
51
|
+
this.createHeadingButton(heading, i);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
SortableTable.prototype.createHeadingButton = function (heading, i) {
|
|
57
|
+
const text = heading.text();
|
|
58
|
+
const button = $(`<button type="button" data-index="${i}">${text}</button>`);
|
|
59
|
+
heading.text('');
|
|
60
|
+
heading.append(button);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
SortableTable.prototype.createStatusBox = function () {
|
|
64
|
+
this.status = $(
|
|
65
|
+
'<div aria-live="polite" role="status" aria-atomic="true" class="govuk-visually-hidden" />'
|
|
66
|
+
);
|
|
67
|
+
this.table.parent().append(this.status);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
SortableTable.prototype.initialiseSortedColumn = function () {
|
|
71
|
+
const rows = this.getTableRowsArray();
|
|
72
|
+
|
|
73
|
+
this.table
|
|
74
|
+
.find('th')
|
|
75
|
+
.filter('[aria-sort="ascending"], [aria-sort="descending"]')
|
|
76
|
+
.first()
|
|
77
|
+
.each((index, el) => {
|
|
78
|
+
const sortDirection = $(el).attr('aria-sort');
|
|
79
|
+
const columnNumber = $(el).find('button').attr('data-index');
|
|
80
|
+
const sortedRows = this.sort(rows, columnNumber, sortDirection);
|
|
81
|
+
this.addRows(sortedRows);
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
SortableTable.prototype.onSortButtonClick = function (e) {
|
|
86
|
+
const columnNumber = e.currentTarget.getAttribute('data-index');
|
|
87
|
+
const sortDirection = $(e.currentTarget).parent().attr('aria-sort');
|
|
88
|
+
let newSortDirection;
|
|
89
|
+
if (sortDirection === 'none' || sortDirection === 'descending') {
|
|
90
|
+
newSortDirection = 'ascending';
|
|
91
|
+
} else {
|
|
92
|
+
newSortDirection = 'descending';
|
|
93
|
+
}
|
|
94
|
+
const rows = this.getTableRowsArray();
|
|
95
|
+
const sortedRows = this.sort(rows, columnNumber, newSortDirection);
|
|
96
|
+
this.addRows(sortedRows);
|
|
97
|
+
this.removeButtonStates();
|
|
98
|
+
this.updateButtonState($(e.currentTarget), newSortDirection);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
SortableTable.prototype.updateButtonState = function (button, direction) {
|
|
102
|
+
button.parent().attr('aria-sort', direction);
|
|
103
|
+
let message = this.statusMessage;
|
|
104
|
+
message = message.replace(/%heading%/, button.text());
|
|
105
|
+
message = message.replace(/%direction%/, this[`${direction}Text`]);
|
|
106
|
+
this.status.text(message);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
SortableTable.prototype.removeButtonStates = function () {
|
|
110
|
+
this.table.find('thead th').attr('aria-sort', 'none');
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
SortableTable.prototype.addRows = function (rows) {
|
|
114
|
+
for (let i = 0; i < rows.length; i++) {
|
|
115
|
+
this.body.append(rows[i]);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
SortableTable.prototype.getTableRowsArray = function () {
|
|
120
|
+
const rows = [];
|
|
121
|
+
const trs = this.body.find('tr');
|
|
122
|
+
for (let i = 0; i < trs.length; i++) {
|
|
123
|
+
rows.push(trs[i]);
|
|
124
|
+
}
|
|
125
|
+
return rows
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
SortableTable.prototype.sort = function (rows, columnNumber, sortDirection) {
|
|
129
|
+
const newRows = rows.sort(
|
|
130
|
+
function (rowA, rowB) {
|
|
131
|
+
const tdA = $(rowA).find('td,th').eq(columnNumber);
|
|
132
|
+
const tdB = $(rowB).find('td,th').eq(columnNumber);
|
|
133
|
+
|
|
134
|
+
const valueA =
|
|
135
|
+
sortDirection === 'ascending'
|
|
136
|
+
? this.getCellValue(tdA)
|
|
137
|
+
: this.getCellValue(tdB);
|
|
138
|
+
const valueB =
|
|
139
|
+
sortDirection === 'ascending'
|
|
140
|
+
? this.getCellValue(tdB)
|
|
141
|
+
: this.getCellValue(tdA);
|
|
142
|
+
|
|
143
|
+
if (typeof valueA === 'string' || typeof valueB === 'string')
|
|
144
|
+
return valueA.toString().localeCompare(valueB.toString())
|
|
145
|
+
return valueA - valueB
|
|
146
|
+
}.bind(this)
|
|
147
|
+
);
|
|
148
|
+
return newRows
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
SortableTable.prototype.getCellValue = function (cell) {
|
|
152
|
+
const val = cell.attr('data-sort-value') || cell.html();
|
|
153
|
+
|
|
154
|
+
const valAsNumber = Number(val);
|
|
155
|
+
return isNaN(valAsNumber) ? val : valAsNumber
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
sortableTable$1 = { SortableTable };
|
|
159
|
+
return sortableTable$1;
|
|
101
160
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
var valueA = sortDirection === 'ascending' ? this.getCellValue(tdA) : this.getCellValue(tdB);
|
|
111
|
-
var valueB = sortDirection === 'ascending' ? this.getCellValue(tdB) : this.getCellValue(tdA);
|
|
112
|
-
|
|
113
|
-
if (typeof valueA === 'string' || typeof valueB === 'string') return valueA.toString().localeCompare(valueB.toString());
|
|
114
|
-
return valueA-valueB;
|
|
115
|
-
}.bind(this)));
|
|
116
|
-
return newRows;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
MOJFrontend.SortableTable.prototype.getCellValue = function(cell) {
|
|
120
|
-
var val = cell.attr('data-sort-value') || cell.html();
|
|
121
|
-
|
|
122
|
-
var floatVal = parseFloat(val)
|
|
123
|
-
return isNaN(floatVal) ? val : floatVal
|
|
124
|
-
};
|
|
161
|
+
|
|
162
|
+
var sortableTableExports = requireSortableTable();
|
|
163
|
+
var sortableTable = /*@__PURE__*/getDefaultExportFromCjs(sortableTableExports);
|
|
164
|
+
|
|
165
|
+
return sortableTable;
|
|
166
|
+
|
|
167
|
+
}));
|
|
@@ -6,49 +6,45 @@
|
|
|
6
6
|
margin-bottom: govuk-spacing(7);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
.moj-sub-navigation__list {
|
|
11
|
-
font-size: 0; // Removes white space when using inline-block on child element.
|
|
12
|
-
list-style: none;
|
|
13
10
|
margin: 0;
|
|
14
11
|
padding: 0;
|
|
12
|
+
font-size: 0; // Removes white space when using inline-block on child element.
|
|
13
|
+
list-style: none;
|
|
15
14
|
|
|
16
15
|
@include govuk-media-query($from: tablet) {
|
|
17
|
-
box-shadow: inset 0 -1px 0 $govuk-border-colour;
|
|
18
16
|
width: 100%;
|
|
17
|
+
box-shadow: inset 0 -1px 0 $govuk-border-colour;
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
|
|
23
21
|
.moj-sub-navigation__item {
|
|
24
22
|
@include govuk-font(19);
|
|
25
|
-
box-shadow: inset 0 -1px 0 $govuk-border-colour;
|
|
26
23
|
display: block;
|
|
27
24
|
margin-top: -1px;
|
|
25
|
+
box-shadow: inset 0 -1px 0 $govuk-border-colour;
|
|
28
26
|
|
|
29
27
|
&:last-child {
|
|
30
28
|
box-shadow: none;
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
@include govuk-media-query($from: tablet) {
|
|
34
|
-
box-shadow: none;
|
|
35
32
|
display: inline-block;
|
|
36
|
-
margin-right: govuk-spacing(4);
|
|
37
33
|
margin-top: 0;
|
|
34
|
+
margin-right: govuk-spacing(4);
|
|
35
|
+
box-shadow: none;
|
|
38
36
|
}
|
|
39
|
-
|
|
40
37
|
}
|
|
41
38
|
|
|
42
|
-
|
|
43
39
|
.moj-sub-navigation__link {
|
|
44
40
|
@include govuk-link-common;
|
|
45
41
|
@include govuk-link-style-default;
|
|
46
42
|
display: block;
|
|
43
|
+
position: relative;
|
|
47
44
|
padding-top: 12px;
|
|
48
45
|
padding-bottom: 12px;
|
|
49
46
|
padding-left: govuk-spacing(3);
|
|
50
47
|
text-decoration: none;
|
|
51
|
-
position: relative;
|
|
52
48
|
|
|
53
49
|
@include govuk-media-query($from: tablet) {
|
|
54
50
|
padding-left: 0;
|
|
@@ -64,54 +60,54 @@
|
|
|
64
60
|
}
|
|
65
61
|
|
|
66
62
|
&:focus {
|
|
67
|
-
color: govuk-colour("black"); // Focus colour on yellow should really be black.
|
|
68
63
|
position: relative; // Ensure focus sits above everything else.
|
|
64
|
+
color: govuk-colour("black"); // Focus colour on yellow should really be black.
|
|
69
65
|
box-shadow: none;
|
|
70
66
|
}
|
|
71
67
|
|
|
72
|
-
&:focus
|
|
73
|
-
background-color: govuk-colour("black");
|
|
68
|
+
&:focus::before {
|
|
74
69
|
content: "";
|
|
75
70
|
display: block;
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
position: absolute;
|
|
72
|
+
bottom: 0;
|
|
73
|
+
left: 0;
|
|
78
74
|
width: 5px;
|
|
75
|
+
height: 100%;
|
|
76
|
+
background-color: govuk-colour("black");
|
|
79
77
|
|
|
80
78
|
@include govuk-media-query($from: tablet) {
|
|
81
|
-
height: 5px;
|
|
82
79
|
width: 100%;
|
|
80
|
+
height: 5px;
|
|
83
81
|
}
|
|
84
82
|
}
|
|
85
|
-
|
|
86
83
|
}
|
|
87
84
|
|
|
88
|
-
|
|
89
85
|
.moj-sub-navigation__link[aria-current="page"] {
|
|
90
|
-
color: $govuk-link-active-colour;
|
|
91
86
|
position: relative;
|
|
87
|
+
color: $govuk-link-active-colour;
|
|
92
88
|
text-decoration: none;
|
|
93
89
|
|
|
94
|
-
|
|
95
|
-
background-color: $govuk-link-colour;
|
|
90
|
+
&::before {
|
|
96
91
|
content: "";
|
|
97
92
|
display: block;
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
position: absolute;
|
|
94
|
+
bottom: 0;
|
|
95
|
+
left: 0;
|
|
100
96
|
width: 5px;
|
|
97
|
+
height: 100%;
|
|
98
|
+
background-color: $govuk-link-colour;
|
|
101
99
|
|
|
102
100
|
@include govuk-media-query($from: tablet) {
|
|
103
|
-
height: 5px;
|
|
104
101
|
width: 100%;
|
|
102
|
+
height: 5px;
|
|
105
103
|
}
|
|
106
|
-
|
|
107
104
|
}
|
|
108
105
|
|
|
109
106
|
&:hover {
|
|
110
107
|
color: $govuk-link-hover-colour;
|
|
111
108
|
}
|
|
112
109
|
|
|
113
|
-
&:focus
|
|
110
|
+
&:focus::before {
|
|
114
111
|
background-color: govuk-colour("black");
|
|
115
112
|
}
|
|
116
|
-
|
|
117
113
|
}
|
|
@@ -4,52 +4,51 @@
|
|
|
4
4
|
|
|
5
5
|
.moj-tag {
|
|
6
6
|
border: 2px solid $govuk-brand-colour;
|
|
7
|
-
background-color: $govuk-brand-colour;
|
|
8
7
|
color: govuk-colour("white");
|
|
8
|
+
background-color: $govuk-brand-colour;
|
|
9
9
|
|
|
10
10
|
&--purple {
|
|
11
11
|
border: 2px solid govuk-colour("purple");
|
|
12
|
-
background-color: govuk-colour("purple");
|
|
13
12
|
color: govuk-colour("white");
|
|
13
|
+
background-color: govuk-colour("purple");
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
&--bright-purple {
|
|
17
17
|
border: 2px solid govuk-colour("bright-purple");
|
|
18
|
-
background-color: govuk-colour("bright-purple");
|
|
19
18
|
color: govuk-colour("white");
|
|
19
|
+
background-color: govuk-colour("bright-purple");
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
&--red,
|
|
23
23
|
&--error {
|
|
24
24
|
border: 2px solid govuk-colour("red");
|
|
25
|
-
background-color: govuk-colour("red");
|
|
26
25
|
color: govuk-colour("white");
|
|
26
|
+
background-color: govuk-colour("red");
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&--green,
|
|
30
30
|
&--success {
|
|
31
31
|
border: 2px solid govuk-colour("green");
|
|
32
|
-
background-color: govuk-colour("green");
|
|
33
32
|
color: govuk-colour("white");
|
|
33
|
+
background-color: govuk-colour("green");
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&--blue,
|
|
37
37
|
&--information {
|
|
38
38
|
border: 2px solid govuk-colour("blue");
|
|
39
|
-
background-color: govuk-colour("blue");
|
|
40
39
|
color: govuk-colour("white");
|
|
40
|
+
background-color: govuk-colour("blue");
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&--black {
|
|
44
44
|
border: 2px solid govuk-colour("black");
|
|
45
|
-
background-color: govuk-colour("black");
|
|
46
45
|
color: govuk-colour("white");
|
|
46
|
+
background-color: govuk-colour("black");
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
&--grey {
|
|
50
50
|
border: 2px solid govuk-colour("dark-grey");
|
|
51
|
-
background-color: govuk-colour("dark-grey");
|
|
52
51
|
color: govuk-colour("white");
|
|
52
|
+
background-color: govuk-colour("dark-grey");
|
|
53
53
|
}
|
|
54
|
-
|
|
55
54
|
}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
========================================================================== */
|
|
4
4
|
|
|
5
5
|
.moj-task-list {
|
|
6
|
-
list-style-type: none;
|
|
7
|
-
padding-left: 0;
|
|
8
6
|
margin-top: 0;
|
|
9
7
|
margin-bottom: 0;
|
|
8
|
+
padding-left: 0;
|
|
9
|
+
list-style-type: none;
|
|
10
10
|
@include govuk-media-query($from: tablet) {
|
|
11
11
|
min-width: 550px;
|
|
12
12
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
.moj-task-list__section {
|
|
16
16
|
display: table;
|
|
17
|
-
@include govuk-font($size:24, $weight: bold);
|
|
17
|
+
@include govuk-font($size: 24, $weight: bold);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.moj-task-list__section-number {
|
|
@@ -29,18 +29,19 @@
|
|
|
29
29
|
.moj-task-list__items {
|
|
30
30
|
@include govuk-font($size: 19);
|
|
31
31
|
@include govuk-responsive-margin(9, "bottom");
|
|
32
|
-
list-style: none;
|
|
33
32
|
padding-left: 0;
|
|
33
|
+
list-style: none;
|
|
34
34
|
@include govuk-media-query($from: tablet) {
|
|
35
35
|
padding-left: govuk-spacing(6);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.moj-task-list__item {
|
|
40
|
-
|
|
40
|
+
// stylelint-disable-next-line declaration-no-important
|
|
41
41
|
margin-bottom: 0 !important;
|
|
42
42
|
padding-top: govuk-spacing(2);
|
|
43
43
|
padding-bottom: govuk-spacing(2);
|
|
44
|
+
border-bottom: 1px solid $govuk-border-colour;
|
|
44
45
|
@include govuk-clearfix;
|
|
45
46
|
}
|
|
46
47
|
|
|
@@ -51,8 +52,8 @@
|
|
|
51
52
|
.moj-task-list__task-name {
|
|
52
53
|
display: block;
|
|
53
54
|
@include govuk-media-query($from: 450px) {
|
|
54
|
-
float: left;
|
|
55
55
|
width: 75%;
|
|
56
|
+
float: left;
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -61,8 +62,8 @@
|
|
|
61
62
|
margin-bottom: govuk-spacing(1);
|
|
62
63
|
|
|
63
64
|
@include govuk-media-query($from: 450px) {
|
|
64
|
-
float: right;
|
|
65
65
|
margin-top: 0;
|
|
66
66
|
margin-bottom: 0;
|
|
67
|
+
float: right;
|
|
67
68
|
}
|
|
68
69
|
}
|
|
@@ -11,10 +11,12 @@
|
|
|
11
11
|
@include govuk-media-query($from: desktop) {
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-wrap: nowrap;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
&--inline > * + * {
|
|
18
|
+
@include govuk-media-query($from: desktop) {
|
|
19
|
+
margin-left: govuk-spacing(3);
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
|
|
@@ -25,30 +27,36 @@
|
|
|
25
27
|
&__content {
|
|
26
28
|
display: block;
|
|
27
29
|
position: relative;
|
|
28
|
-
background-color: govuk-colour("light-grey");
|
|
29
|
-
padding: govuk-spacing(4);
|
|
30
30
|
margin-bottom: govuk-spacing(3);
|
|
31
|
-
|
|
31
|
+
padding: govuk-spacing(4);
|
|
32
32
|
border-left: 4px solid transparent;
|
|
33
|
+
background-color: govuk-colour("light-grey");
|
|
34
|
+
flex-grow: 1;
|
|
33
35
|
|
|
34
36
|
&--grey {
|
|
35
37
|
border-left-color: $govuk-border-colour;
|
|
36
38
|
}
|
|
39
|
+
|
|
37
40
|
&--blue {
|
|
38
41
|
border-left-color: govuk-colour("blue");
|
|
39
42
|
}
|
|
43
|
+
|
|
40
44
|
&--red {
|
|
41
45
|
border-left-color: govuk-colour("red");
|
|
42
46
|
}
|
|
47
|
+
|
|
43
48
|
&--yellow {
|
|
44
49
|
border-left-color: govuk-colour("yellow");
|
|
45
50
|
}
|
|
51
|
+
|
|
46
52
|
&--green {
|
|
47
53
|
border-left-color: govuk-colour("green");
|
|
48
54
|
}
|
|
55
|
+
|
|
49
56
|
&--purple {
|
|
50
57
|
border-left-color: govuk-colour("purple");
|
|
51
58
|
}
|
|
59
|
+
|
|
52
60
|
&--orange {
|
|
53
61
|
border-left-color: govuk-colour("orange");
|
|
54
62
|
}
|