hmrc-frontend 6.12.0 → 6.14.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.12.0.css → accessible-autocomplete-6.14.0.css} +1 -1
- package/hmrc/all.js +15 -18
- package/hmrc/components/account-menu/_account-menu.scss +5 -0
- package/hmrc/components/back-link-helper/back-link-helper.js +15 -19
- package/hmrc/{hmrc-frontend-6.12.0.min.css → hmrc-frontend-6.14.0.min.css} +2 -2
- package/hmrc/{hmrc-frontend-6.12.0.min.js → hmrc-frontend-6.14.0.min.js} +2 -2
- package/hmrc/maps/{accessible-autocomplete-6.12.0.css.map → accessible-autocomplete-6.14.0.css.map} +1 -1
- package/hmrc/maps/hmrc-frontend-6.14.0.min.css.map +1 -0
- package/hmrc/maps/hmrc-frontend-6.14.0.min.js.map +1 -0
- package/package.json +1 -1
- package/hmrc/maps/hmrc-frontend-6.12.0.min.css.map +0 -1
- package/hmrc/maps/hmrc-frontend-6.12.0.min.js.map +0 -1
- /package/hmrc/{accessible-autocomplete-6.12.0.js → accessible-autocomplete-6.14.0.js} +0 -0
package/hmrc/VERSION.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.14.0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
.autocomplete__wrapper{position:relative}.autocomplete__hint,.autocomplete__input{-webkit-appearance:none;border:2px solid #0b0c0c;border-radius:0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;margin-bottom:0;width:100%}.autocomplete__input{background-color:rgba(0,0,0,0);position:relative}.autocomplete__hint{color:#b1b4b6;position:absolute}.autocomplete__input--default{padding:5px}.autocomplete__input--focused{outline:3px solid #fd0;outline-offset:0;-webkit-box-shadow:inset 0 0 0 2px;box-shadow:inset 0 0 0 2px}.autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.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:rgba(0,0,0,.256863) 0 2px 6px;box-shadow:0 2px 6px rgba(0,0,0,.256863);left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-left-width:0;border-bottom:1px solid #b1b4b6;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:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}@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{forced-color-adjust:none;background-color:SelectedItem;border-color:SelectedItem;color:SelectedItemText;outline-color:SelectedItemText}}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:16px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:19px;line-height:1.31579}}.autocomplete__hint,.autocomplete__input,.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__wrapper{font-family:sans-serif}}@media (min-width:40.0625em){.autocomplete__hint,.autocomplete__input,.autocomplete__wrapper{font-size:1.1875rem;line-height:1.31579}}@media print{.autocomplete__hint,.autocomplete__input,.autocomplete__wrapper{font-size:14pt;line-height:1.15}}
|
|
2
|
-
/*# sourceMappingURL=maps/accessible-autocomplete-6.
|
|
2
|
+
/*# sourceMappingURL=maps/accessible-autocomplete-6.14.0.css.map */
|
package/hmrc/all.js
CHANGED
|
@@ -120,26 +120,23 @@
|
|
|
120
120
|
}
|
|
121
121
|
BackLinkHelper.prototype.init = function init() {
|
|
122
122
|
var _this = this;
|
|
123
|
-
var isReferrerExternal = function isReferrerExternal() {
|
|
124
|
-
// If there is no referrer, consider it on the same domain
|
|
125
|
-
if (!_this.document.referrer) {
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
try {
|
|
129
|
-
var currentDomain = new URL(_this.window.location.href).hostname;
|
|
130
|
-
var referrerDomain = new URL(_this.document.referrer).hostname;
|
|
131
|
-
|
|
132
|
-
// Check if the referrer is not the same as the current domain
|
|
133
|
-
return currentDomain !== referrerDomain;
|
|
134
|
-
} catch (err) {
|
|
135
|
-
return false;
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
|
|
139
123
|
// do nothing if History API is absent
|
|
140
124
|
if (this.window.history) {
|
|
141
|
-
//
|
|
142
|
-
|
|
125
|
+
// eslint-disable-next-line max-len
|
|
126
|
+
/* TODO: It remains unclear whether a check for the same domain is necessary for security reasons.
|
|
127
|
+
There may be user research suggesting considerations regarding the visibility of the
|
|
128
|
+
back link on refresh.
|
|
129
|
+
Currently, a page refresh sets the referer to empty, leading to the back link being hidden
|
|
130
|
+
under our existing logic.
|
|
131
|
+
*/
|
|
132
|
+
// eslint-disable-next-line max-len
|
|
133
|
+
var referrerNotOnSameDomain = function referrerNotOnSameDomain() {
|
|
134
|
+
var referer = _this.document.referrer;
|
|
135
|
+
return !referer || referer.indexOf(_this.window.location.host) === -1;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// hide the backlink if the referrer is on a different domain or the referrer is not set
|
|
139
|
+
if (referrerNotOnSameDomain()) {
|
|
143
140
|
this.$module.classList.add('hmrc-hidden-backlink');
|
|
144
141
|
} else {
|
|
145
142
|
// prevent resubmit warning
|
|
@@ -103,6 +103,10 @@ $hmrc-transition-type: "all";
|
|
|
103
103
|
// get a small gap under menu items without a notification badge.
|
|
104
104
|
line-height: inherit;
|
|
105
105
|
}
|
|
106
|
+
|
|
107
|
+
&:not(.hmrc-account-menu__link--menu) {
|
|
108
|
+
outline-offset: -3px;
|
|
109
|
+
}
|
|
106
110
|
}
|
|
107
111
|
|
|
108
112
|
.is-smaller .hmrc-account-menu__link {
|
|
@@ -222,6 +226,7 @@ body:not(.js-enabled) {
|
|
|
222
226
|
padding: 12px 8px 8px;
|
|
223
227
|
|
|
224
228
|
&:focus {
|
|
229
|
+
outline-offset: -3px;
|
|
225
230
|
outline: 3px solid rgba(0, 0, 0, 0);
|
|
226
231
|
}
|
|
227
232
|
}
|
|
@@ -5,27 +5,23 @@ function BackLinkHelper($module, window, document) {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
BackLinkHelper.prototype.init = function init() {
|
|
8
|
-
const isReferrerExternal = () => {
|
|
9
|
-
// If there is no referrer, consider it on the same domain
|
|
10
|
-
if (!this.document.referrer) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
try {
|
|
15
|
-
const currentDomain = new URL(this.window.location.href).hostname;
|
|
16
|
-
const referrerDomain = new URL(this.document.referrer).hostname;
|
|
17
|
-
|
|
18
|
-
// Check if the referrer is not the same as the current domain
|
|
19
|
-
return currentDomain !== referrerDomain;
|
|
20
|
-
} catch (err) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
8
|
// do nothing if History API is absent
|
|
26
9
|
if (this.window.history) {
|
|
27
|
-
//
|
|
28
|
-
|
|
10
|
+
// eslint-disable-next-line max-len
|
|
11
|
+
/* TODO: It remains unclear whether a check for the same domain is necessary for security reasons.
|
|
12
|
+
There may be user research suggesting considerations regarding the visibility of the
|
|
13
|
+
back link on refresh.
|
|
14
|
+
Currently, a page refresh sets the referer to empty, leading to the back link being hidden
|
|
15
|
+
under our existing logic.
|
|
16
|
+
*/
|
|
17
|
+
// eslint-disable-next-line max-len
|
|
18
|
+
const referrerNotOnSameDomain = () => {
|
|
19
|
+
const referer = this.document.referrer;
|
|
20
|
+
return !referer || referer.indexOf(this.window.location.host) === -1;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// hide the backlink if the referrer is on a different domain or the referrer is not set
|
|
24
|
+
if (referrerNotOnSameDomain()) {
|
|
29
25
|
this.$module.classList.add('hmrc-hidden-backlink');
|
|
30
26
|
} else {
|
|
31
27
|
// prevent resubmit warning
|