hmrc-frontend 5.45.0 → 5.47.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.
@@ -1,4 +1,12 @@
1
1
  {
2
+ "meta": {
3
+ "description": "HMRC Frontend contains the code and documentation for patterns specifically designed for HMRC.",
4
+ "urls": {
5
+ "documentation": "https://design.tax.service.gov.uk/hmrc-design-patterns/",
6
+ "releaseNotes": "https://github.com/hmrc/hmrc-frontend/releases/tag/v{{version}}",
7
+ "versionHistory": "https://github.com/hmrc/hmrc-frontend/releases"
8
+ }
9
+ },
2
10
  "pluginDependencies": [
3
11
  {
4
12
  "packageName": "govuk-frontend",
package/hmrc/VERSION.txt CHANGED
@@ -1 +1 @@
1
- 5.45.0
1
+ 5.47.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:16px;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:19px;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-5.45.0.css.map */
2
+ /*# sourceMappingURL=maps/accessible-autocomplete-5.47.0.css.map */
package/hmrc/all.js CHANGED
@@ -409,20 +409,21 @@
409
409
  // store referrer value to cater for IE
410
410
  var docReferrer = this.document.referrer;
411
411
 
412
- // prevent resubmit warning
413
- if (this.window.history.replaceState && typeof this.window.history.replaceState === 'function') {
414
- this.window.history.replaceState(null, null, this.window.location.href);
415
- }
416
-
417
- // handle 'Back' click, dependent upon presence of referrer & no host change
418
- this.$module.addEventListener('click', function (event) {
419
- event.preventDefault();
420
- if (_this.window.history.back && typeof _this.window.history.back === 'function') {
421
- if (docReferrer !== '' && docReferrer.indexOf(_this.window.location.host) !== -1) {
412
+ // hide the backlink if the referrer is on a different domain or the referrer is not set
413
+ if (docReferrer === '' || docReferrer.indexOf(this.window.location.host) === -1) {
414
+ this.$module.classList.add('hmrc-hidden-backlink');
415
+ } else {
416
+ // prevent resubmit warning
417
+ if (this.window.history.replaceState && typeof this.window.history.replaceState === 'function') {
418
+ this.window.history.replaceState(null, null, this.window.location.href);
419
+ }
420
+ this.$module.addEventListener('click', function (event) {
421
+ event.preventDefault();
422
+ if (_this.window.history.back && typeof _this.window.history.back === 'function') {
422
423
  _this.window.history.back();
423
424
  }
424
- }
425
- });
425
+ });
426
+ }
426
427
  }
427
428
  };
428
429
 
@@ -2,3 +2,7 @@
2
2
  body:not(.js-enabled) a[data-module="hmrc-back-link"][href="#"] {
3
3
  display: none;
4
4
  }
5
+
6
+ .hmrc-hidden-backlink {
7
+ display: none;
8
+ }
@@ -10,20 +10,22 @@ BackLinkHelper.prototype.init = function init() {
10
10
  // store referrer value to cater for IE
11
11
  const docReferrer = this.document.referrer;
12
12
 
13
- // prevent resubmit warning
14
- if (this.window.history.replaceState && typeof this.window.history.replaceState === 'function') {
15
- this.window.history.replaceState(null, null, this.window.location.href);
16
- }
13
+ // hide the backlink if the referrer is on a different domain or the referrer is not set
14
+ if (docReferrer === '' || docReferrer.indexOf(this.window.location.host) === -1) {
15
+ this.$module.classList.add('hmrc-hidden-backlink');
16
+ } else {
17
+ // prevent resubmit warning
18
+ if (this.window.history.replaceState && typeof this.window.history.replaceState === 'function') {
19
+ this.window.history.replaceState(null, null, this.window.location.href);
20
+ }
17
21
 
18
- // handle 'Back' click, dependent upon presence of referrer & no host change
19
- this.$module.addEventListener('click', (event) => {
20
- event.preventDefault();
21
- if (this.window.history.back && typeof this.window.history.back === 'function') {
22
- if (docReferrer !== '' && docReferrer.indexOf(this.window.location.host) !== -1) {
22
+ this.$module.addEventListener('click', (event) => {
23
+ event.preventDefault();
24
+ if (this.window.history.back && typeof this.window.history.back === 'function') {
23
25
  this.window.history.back();
24
26
  }
25
- }
26
- });
27
+ });
28
+ }
27
29
  }
28
30
  };
29
31