hmrc-frontend 6.63.0 → 6.65.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/hmrc/VERSION.txt +1 -1
- package/hmrc/{accessible-autocomplete-6.63.0.css → accessible-autocomplete-6.65.0.css} +1 -1
- package/hmrc/{accessible-autocomplete-6.63.0.js → accessible-autocomplete-6.65.0.js} +17 -1
- package/hmrc/all.js +3 -4
- package/hmrc/components/accessible-autocomplete/accessible-autocomplete.js +11 -1
- package/hmrc/components/timeout-dialog/_timeout-dialog.scss +6 -8
- package/hmrc/components/timeout-dialog/timeout-dialog.js +3 -4
- package/hmrc/{hmrc-frontend-6.63.0.min.css → hmrc-frontend-6.65.0.min.css} +2 -2
- package/hmrc/{hmrc-frontend-6.63.0.min.js → hmrc-frontend-6.65.0.min.js} +2 -2
- package/hmrc/maps/{accessible-autocomplete-6.63.0.css.map → accessible-autocomplete-6.65.0.css.map} +1 -1
- package/hmrc/maps/hmrc-frontend-6.65.0.min.css.map +1 -0
- package/hmrc/maps/hmrc-frontend-6.65.0.min.js.map +1 -0
- package/package.json +1 -1
- package/hmrc/maps/hmrc-frontend-6.63.0.min.css.map +0 -1
- package/hmrc/maps/hmrc-frontend-6.63.0.min.js.map +0 -1
package/hmrc/VERSION.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.65.0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
.autocomplete__wrapper{position:relative}.autocomplete__hint,.autocomplete__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid #0b0c0c;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;height:2.5rem;line-height:1.25;margin-bottom:0;width:100%}.autocomplete__input{background-color:rgba(0,0,0,0);position:relative}.autocomplete__hint{color:#505a5f;position:absolute}.autocomplete__input--default{padding:5px}.autocomplete__input--focused{-webkit-box-shadow:inset 0 0 0 2px;box-shadow:inset 0 0 0 2px;outline:3px solid #fd0;outline-offset:0}.autocomplete__input--show-all-values{cursor:pointer;padding:5px 35px 5px 5px}.autocomplete__dropdown-arrow-down{display:inline-block;height:24px;position:absolute;right:8px;top:10px;width:24px;z-index:-1}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{-webkit-box-shadow:0 2px 6px rgba(0,0,0,.257);box-shadow:0 2px 6px rgba(0,0,0,.257);left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:1px solid #b1b4b6;border-left-width:0;border-right-width:0;border-top-width:1px;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#f3f2f1}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:none}@media (-ms-high-contrast:active),(forced-colors:active){.autocomplete__menu{border-color:FieldText}.autocomplete__option{background-color:Field;color:FieldText}.autocomplete__option--focused,.autocomplete__option:hover{background-color:Highlight;background-color:SelectedItem;border-color:SelectedItem;color:HighlightText;color:SelectedItemText;forced-color-adjust:none;outline-color:SelectedItemText}}.autocomplete__option--no-results{background-color:#f3f2f1;color:#505a5f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:1rem;font-weight:400}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:1.1875rem;line-height:1.3157894737}}.autocomplete__hint,.autocomplete__input,.autocomplete__option,.autocomplete__wrapper{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:1rem;line-height:1.25}@media print{.autocomplete__hint,.autocomplete__input,.autocomplete__option,.autocomplete__wrapper{font-family:sans-serif}}@media (min-width:40.0625em){.autocomplete__hint,.autocomplete__input,.autocomplete__option,.autocomplete__wrapper{font-size:1.1875rem;line-height:1.3157894737}}@media print{.autocomplete__hint,.autocomplete__input,.autocomplete__option,.autocomplete__wrapper{font-size:14pt;line-height:1.15}}.govuk-form-group--error div:has(+.govuk-select--error[data-module=hmrc-accessible-autocomplete])>.autocomplete__wrapper .autocomplete__input{border-color:#d4351c}.autocomplete__dropdown-arrow-down{z-index:0;pointer-events:none}
|
|
2
|
-
/*# sourceMappingURL=maps/accessible-autocomplete-6.
|
|
2
|
+
/*# sourceMappingURL=maps/accessible-autocomplete-6.65.0.css.map */
|
|
@@ -2851,6 +2851,14 @@
|
|
|
2851
2851
|
}
|
|
2852
2852
|
AccessibleAutoComplete.prototype.init = function init() {
|
|
2853
2853
|
if (this.$module) {
|
|
2854
|
+
var trimQuery = function trimQuery(values) {
|
|
2855
|
+
return function (query, syncResults) {
|
|
2856
|
+
var matches = values.filter(function (r) {
|
|
2857
|
+
return r.toLowerCase().indexOf(query.toLowerCase().trim()) !== -1;
|
|
2858
|
+
});
|
|
2859
|
+
syncResults(matches);
|
|
2860
|
+
};
|
|
2861
|
+
};
|
|
2854
2862
|
var selectElement = this.$module;
|
|
2855
2863
|
var selectOptions = Array.from(selectElement.options);
|
|
2856
2864
|
var autocompleteId = selectElement.id;
|
|
@@ -2864,6 +2872,14 @@
|
|
|
2864
2872
|
autoselect: autoselect,
|
|
2865
2873
|
defaultValue: defaultValue,
|
|
2866
2874
|
minLength: minLength,
|
|
2875
|
+
// we don't yet support preserveNullOptions,
|
|
2876
|
+
// but if we start then it needs to override this filtering
|
|
2877
|
+
// https://github.com/alphagov/accessible-autocomplete/blob/main/src/wrapper.js#L24
|
|
2878
|
+
source: trimQuery(Array.from(this.$module.options).filter(function (a) {
|
|
2879
|
+
return a.value;
|
|
2880
|
+
}).map(function (a) {
|
|
2881
|
+
return a.textContent;
|
|
2882
|
+
})),
|
|
2867
2883
|
onConfirm: function onConfirm(chosenOption) {
|
|
2868
2884
|
var _document$getElementB;
|
|
2869
2885
|
selectElement.value = '';
|
|
@@ -2903,7 +2919,7 @@
|
|
|
2903
2919
|
var autocompleteElementMissingAriaDescribedAttrs = autocompleteElement && autocompleteElement.tagName !== 'select' && !autocompleteElementAriaDescribedBy.includes(selectElementAriaDescribedBy);
|
|
2904
2920
|
if (autocompleteElementMissingAriaDescribedAttrs) {
|
|
2905
2921
|
// if there is a hint and/or error then the autocomplete element
|
|
2906
|
-
// needs to be aria-describedby these, which it isn't
|
|
2922
|
+
// needs to be aria-describedby these, which it isn't by default.
|
|
2907
2923
|
// we need to check if it hasn't already been done to avoid adding
|
|
2908
2924
|
// them twice if someone has added a separate patch.
|
|
2909
2925
|
autocompleteElement.setAttribute('aria-describedby', "".concat(selectElementAriaDescribedBy, " ").concat(autocompleteElementAriaDescribedBy));
|
package/hmrc/all.js
CHANGED
|
@@ -500,7 +500,6 @@
|
|
|
500
500
|
var $visualMessge = utils.generateDomElementFromStringAndAppendText('<p class="govuk-body hmrc-timeout-dialog__message" aria-hidden="true">', settings.message);
|
|
501
501
|
$visualMessge.appendChild(document.createTextNode(' '));
|
|
502
502
|
$visualMessge.appendChild($countdownElement);
|
|
503
|
-
$visualMessge.appendChild(document.createTextNode('.'));
|
|
504
503
|
if (settings.messageSuffix) {
|
|
505
504
|
$visualMessge.appendChild(document.createTextNode(" ".concat(settings.messageSuffix)));
|
|
506
505
|
}
|
|
@@ -535,16 +534,16 @@
|
|
|
535
534
|
var minutes;
|
|
536
535
|
var visibleMessage;
|
|
537
536
|
if (counter < 60) {
|
|
538
|
-
visibleMessage = "".concat(counter, " ").concat(settings.properties[counter !== 1 ? 'seconds' : 'second']);
|
|
537
|
+
visibleMessage = "".concat(counter, " ").concat(settings.properties[counter !== 1 ? 'seconds' : 'second'], ".");
|
|
539
538
|
} else {
|
|
540
539
|
minutes = Math.ceil(counter / 60);
|
|
541
|
-
visibleMessage = "".concat(minutes, " ").concat(settings.properties[minutes === 1 ? 'minute' : 'minutes']);
|
|
540
|
+
visibleMessage = "".concat(minutes, " ").concat(settings.properties[minutes === 1 ? 'minute' : 'minutes'], ".");
|
|
542
541
|
}
|
|
543
542
|
return visibleMessage;
|
|
544
543
|
};
|
|
545
544
|
var getAudibleHumanText = function getAudibleHumanText(counter) {
|
|
546
545
|
var humanText = getHumanText(roundSecondsUp(counter));
|
|
547
|
-
var messageParts = [settings.message, ' ', humanText
|
|
546
|
+
var messageParts = [settings.message, ' ', humanText];
|
|
548
547
|
if (settings.messageSuffix) {
|
|
549
548
|
messageParts.push(' ');
|
|
550
549
|
messageParts.push(settings.messageSuffix);
|
|
@@ -6,6 +6,11 @@ function AccessibleAutoComplete($module, window, document) {
|
|
|
6
6
|
|
|
7
7
|
AccessibleAutoComplete.prototype.init = function init() {
|
|
8
8
|
if (this.$module) {
|
|
9
|
+
const trimQuery = (values) => (query, syncResults) => {
|
|
10
|
+
const matches = values.filter((r) => r.toLowerCase()
|
|
11
|
+
.indexOf(query.toLowerCase().trim()) !== -1);
|
|
12
|
+
syncResults(matches);
|
|
13
|
+
};
|
|
9
14
|
const selectElement = this.$module;
|
|
10
15
|
const selectOptions = Array.from(selectElement.options);
|
|
11
16
|
const autocompleteId = selectElement.id;
|
|
@@ -20,6 +25,11 @@ AccessibleAutoComplete.prototype.init = function init() {
|
|
|
20
25
|
autoselect,
|
|
21
26
|
defaultValue,
|
|
22
27
|
minLength,
|
|
28
|
+
// we don't yet support preserveNullOptions,
|
|
29
|
+
// but if we start then it needs to override this filtering
|
|
30
|
+
// https://github.com/alphagov/accessible-autocomplete/blob/main/src/wrapper.js#L24
|
|
31
|
+
source: trimQuery(Array.from(this.$module.options).filter((a) => a.value)
|
|
32
|
+
.map((a) => a.textContent)),
|
|
23
33
|
onConfirm: (chosenOption) => {
|
|
24
34
|
selectElement.value = '';
|
|
25
35
|
const chosenOptionOrCurrentValue = (typeof chosenOption !== 'undefined')
|
|
@@ -60,7 +70,7 @@ AccessibleAutoComplete.prototype.init = function init() {
|
|
|
60
70
|
);
|
|
61
71
|
if (autocompleteElementMissingAriaDescribedAttrs) {
|
|
62
72
|
// if there is a hint and/or error then the autocomplete element
|
|
63
|
-
// needs to be aria-describedby these, which it isn't
|
|
73
|
+
// needs to be aria-describedby these, which it isn't by default.
|
|
64
74
|
// we need to check if it hasn't already been done to avoid adding
|
|
65
75
|
// them twice if someone has added a separate patch.
|
|
66
76
|
autocompleteElement.setAttribute(
|
|
@@ -16,29 +16,27 @@
|
|
|
16
16
|
-moz-opacity: 0.8;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
html {
|
|
20
|
-
&.no-scroll {
|
|
21
|
-
overflow: hidden;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
19
|
.hmrc-timeout-dialog {
|
|
26
20
|
position: fixed;
|
|
27
21
|
z-index: 1002;
|
|
28
22
|
top: 50%;
|
|
29
23
|
left: 50%;
|
|
30
24
|
width: 280px;
|
|
25
|
+
max-width: 100%;
|
|
26
|
+
max-height: 100%;
|
|
31
27
|
padding: 30px;
|
|
32
|
-
overflow
|
|
33
|
-
overflow-y: auto;
|
|
28
|
+
overflow: auto;
|
|
34
29
|
-webkit-transform: translate(-50%, -50%);
|
|
35
30
|
-ms-transform: translate(-50%, -50%);
|
|
36
31
|
transform: translate(-50%, -50%);
|
|
37
32
|
border: 5px solid govuk-colour("black");
|
|
38
33
|
background-color: govuk-colour("white");
|
|
34
|
+
-webkit-box-sizing: border-box;
|
|
35
|
+
box-sizing: border-box;
|
|
39
36
|
|
|
40
37
|
@include govuk-media-query($from: tablet) {
|
|
41
38
|
width: 435px;
|
|
39
|
+
max-width: 100%;
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
&:focus {
|
|
@@ -163,7 +163,6 @@ function TimeoutDialog($module, $sessionActivityService) {
|
|
|
163
163
|
);
|
|
164
164
|
$visualMessge.appendChild(document.createTextNode(' '));
|
|
165
165
|
$visualMessge.appendChild($countdownElement);
|
|
166
|
-
$visualMessge.appendChild(document.createTextNode('.'));
|
|
167
166
|
if (settings.messageSuffix) {
|
|
168
167
|
$visualMessge.appendChild(document.createTextNode(` ${settings.messageSuffix}`));
|
|
169
168
|
}
|
|
@@ -212,17 +211,17 @@ function TimeoutDialog($module, $sessionActivityService) {
|
|
|
212
211
|
let minutes; let
|
|
213
212
|
visibleMessage;
|
|
214
213
|
if (counter < 60) {
|
|
215
|
-
visibleMessage = `${counter} ${settings.properties[counter !== 1 ? 'seconds' : 'second']}
|
|
214
|
+
visibleMessage = `${counter} ${settings.properties[counter !== 1 ? 'seconds' : 'second']}.`;
|
|
216
215
|
} else {
|
|
217
216
|
minutes = Math.ceil(counter / 60);
|
|
218
|
-
visibleMessage = `${minutes} ${settings.properties[minutes === 1 ? 'minute' : 'minutes']}
|
|
217
|
+
visibleMessage = `${minutes} ${settings.properties[minutes === 1 ? 'minute' : 'minutes']}.`;
|
|
219
218
|
}
|
|
220
219
|
return visibleMessage;
|
|
221
220
|
};
|
|
222
221
|
|
|
223
222
|
const getAudibleHumanText = (counter) => {
|
|
224
223
|
const humanText = getHumanText(roundSecondsUp(counter));
|
|
225
|
-
const messageParts = [settings.message, ' ', humanText
|
|
224
|
+
const messageParts = [settings.message, ' ', humanText];
|
|
226
225
|
if (settings.messageSuffix) {
|
|
227
226
|
messageParts.push(' ');
|
|
228
227
|
messageParts.push(settings.messageSuffix);
|