hmrc-frontend 6.117.0 → 7.0.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.
Files changed (63) hide show
  1. package/check-compatibility-with-govuk-frontend-version.js +4 -4
  2. package/govuk-prototype-kit.config.json +3 -26
  3. package/hmrc/VERSION.txt +1 -1
  4. package/hmrc/{accessible-autocomplete-6.117.0.css → accessible-autocomplete-7.0.0.css} +2 -2
  5. package/hmrc/all.js +0 -114
  6. package/hmrc/components/_all.scss +1 -4
  7. package/hmrc/components/banner/template.njk +12 -28
  8. package/hmrc/components/footer/template.njk +21 -19
  9. package/hmrc/components/header/_header.scss +27 -197
  10. package/hmrc/components/header/template.njk +12 -75
  11. package/hmrc/components/internal-header/template.njk +12 -28
  12. package/hmrc/components/service-navigation-language-select/_service-navigation-language-select.scss +6 -8
  13. package/hmrc/components/service-navigation-language-select/layout.njk +1 -1
  14. package/hmrc/govuk/images/favicon.ico +0 -0
  15. package/hmrc/govuk/images/favicon.svg +1 -1
  16. package/hmrc/govuk/images/govuk-icon-180.png +0 -0
  17. package/hmrc/govuk/images/govuk-icon-192.png +0 -0
  18. package/hmrc/govuk/images/govuk-icon-512.png +0 -0
  19. package/hmrc/govuk/images/govuk-opengraph-image.png +0 -0
  20. package/hmrc/hmrc-frontend-7.0.0.min.css +3 -0
  21. package/hmrc/hmrc-frontend-7.0.0.min.js +3 -0
  22. package/hmrc/maps/accessible-autocomplete-7.0.0.css.map +1 -0
  23. package/hmrc/maps/hmrc-frontend-7.0.0.min.css.map +1 -0
  24. package/hmrc/maps/hmrc-frontend-7.0.0.min.js.map +1 -0
  25. package/package.json +2 -2
  26. package/hmrc/components/account-header/README.md +0 -39
  27. package/hmrc/components/account-menu/README.md +0 -12
  28. package/hmrc/components/account-menu/_account-menu.scss +0 -380
  29. package/hmrc/components/account-menu/account-menu.js +0 -84
  30. package/hmrc/components/account-menu/images/icon-chevron-down.png +0 -0
  31. package/hmrc/components/account-menu/images/icon-chevron-down.svg +0 -1
  32. package/hmrc/components/account-menu/images/icon-chevron-left.png +0 -0
  33. package/hmrc/components/account-menu/images/icon-chevron-left.svg +0 -1
  34. package/hmrc/components/account-menu/images/icon-chevron-right.png +0 -0
  35. package/hmrc/components/account-menu/images/icon-chevron-right.svg +0 -1
  36. package/hmrc/components/account-menu/images/icon-home.png +0 -0
  37. package/hmrc/components/account-menu/macro.njk +0 -3
  38. package/hmrc/components/account-menu/template.njk +0 -59
  39. package/hmrc/components/currency-input/README.md +0 -33
  40. package/hmrc/components/currency-input/_currency-input.scss +0 -109
  41. package/hmrc/components/currency-input/macro.njk +0 -3
  42. package/hmrc/components/currency-input/template.njk +0 -67
  43. package/hmrc/components/language-select/README.md +0 -7
  44. package/hmrc/components/language-select/_language-select.scss +0 -29
  45. package/hmrc/components/language-select/macro.njk +0 -3
  46. package/hmrc/components/language-select/template.njk +0 -39
  47. package/hmrc/govuk/rebrand/images/favicon.ico +0 -0
  48. package/hmrc/govuk/rebrand/images/favicon.svg +0 -1
  49. package/hmrc/govuk/rebrand/images/govuk-crest.svg +0 -1
  50. package/hmrc/govuk/rebrand/images/govuk-icon-180.png +0 -0
  51. package/hmrc/govuk/rebrand/images/govuk-icon-192.png +0 -0
  52. package/hmrc/govuk/rebrand/images/govuk-icon-512.png +0 -0
  53. package/hmrc/govuk/rebrand/images/govuk-icon-mask.svg +0 -1
  54. package/hmrc/govuk/rebrand/images/govuk-opengraph-image.png +0 -0
  55. package/hmrc/govuk/rebrand/manifest.json +0 -39
  56. package/hmrc/hmrc-frontend-6.117.0.min.css +0 -3
  57. package/hmrc/hmrc-frontend-6.117.0.min.js +0 -3
  58. package/hmrc/layouts/account-header.html +0 -39
  59. package/hmrc/maps/accessible-autocomplete-6.117.0.css.map +0 -1
  60. package/hmrc/maps/hmrc-frontend-6.117.0.min.css.map +0 -1
  61. package/hmrc/maps/hmrc-frontend-6.117.0.min.js.map +0 -1
  62. package/hmrc/templates/account-header.html +0 -15
  63. /package/hmrc/{accessible-autocomplete-6.117.0.js → accessible-autocomplete-7.0.0.js} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/components/back-link-helper/back-link-helper.js","src/components/timeout-dialog/utils.js","src/components/timeout-dialog/dialog.js","src/components/timeout-dialog/validate-input.js","src/components/timeout-dialog/redirectHelper.js","src/components/timeout-dialog/timeout-dialog.js","src/components/user-research-banner/user-research-banner.js","src/utils/cookies.js","src/components/timeout-dialog/session-activity-service.js","src/components/hmrc-print-link/hmrc-print-link.js","src/all.js","src/all-govuk-and-hmrc.js"],"names":["BackLinkHelper","$module","window","document","this","prototype","init","_this","history","replaceState","location","href","addEventListener","event","preventDefault","back","warn","console","utils","generateDomElementFromString","str","abc","createElement","innerHTML","firstChild","generateDomElementFromStringAndAppendText","text","$tmp","innerText","hasClass","selector","className","querySelector","classList","contains","addClass","querySelectorAll","forEach","i","add","removeClass","remove","removeElement","$elem","parent","parentNode","removeChild","ajaxGet","url","success","xhr","XMLHttpRequest","open","onreadystatechange","readyState","status","responseText","setRequestHeader","send","dialog","displayDialog","$elementToDisplay","$dialog","$overlay","$preparedElementToDisplay","resetElementsFunctionList","closeCallbacks","appendChild","push","body","handleTouch","elements","join","close","length","shift","fn","value","getAttribute","setAttribute","removeAttribute","keepFocus","modalFocus","getElementById","target","stopPropagation","focus","elemToFocusOnReset","activeElement","removeEventListener","setupFocusHandlerAndFocusDialog","keydownListener","e","keyCode","setupKeydownHandler","touches","changedTouches","closeDialog","setAriaLabelledBy","addCloseHandler","closeHandler","ValidateInput","RedirectHelper","TimeoutDialog","$sessionActivityService","currentTimer","options","settings","cleanupFunctions","sessionActivityService","listenForSessionActivityAndResetDialogTimer","synchroniseTabs","onActivity","timeOfActivity","timestamp","cleanup","setupDialogTimer","validateInput","config","missingRequiredConfig","item","concat","replace","toLowerCase","Error","mergeOptionsWithDefaults","theOptions","localisedDefaults","clone","_objectSpread","Object","keys","key","_typeof","undefined","timeOfLastActivity","arguments","getDateNow","signoutTime","timeout","delta","secondsUntilTimeoutDialog","countdown","setTimeout","setupDialog","clearTimeout","$element","title","$countdownElement","$audibleMessage","$visualMessge","message","createTextNode","messageSuffix","$staySignedInButton","keepAliveButtonText","$wrapper","keepAliveAndClose","hideSignOutButton","$signOutButton","signOutButtonText","signOut","signOutUrl","dialogControl","getMillisecondsRemaining","getHumanText","counter","minutes","visibleMessage","properties","Math","ceil","roundSecondsUp","updateTextIfChanged","updateCountdown","audibleHumanText","humanText","messageParts","getAudibleHumanText","runUpdate","remaining","roundedRemaining","max","round","floor","keepAliveUrl","logActivity","Date","now","redirectToUrl","timeoutUrl","validate","lookupData","attributes","getNamedItem","string","minute","seconds","second","stringToValidate","parsedInt","parseInt","Number","isNaN","String","redirectHelper","UserResearchBanner","$closeLink","cookieName","cookieExpiryDays","name","nameEQ","cookies","cookie","split","len","charAt","substring","indexOf","decodeURIComponent","getCookie","eventHandlers","noThanksClick","bind","cookieString","days","date","setTime","getTime","toGMTString","protocol","setCookie","SessionActivityService","BrowserBroadcastChannel","_classCallCheck","activityChannel","_createClass","postMessage","callback","onmessage","data","HmrcPrintLink","print","HMRCFrontend","initAll","logAndIgnoreErrors","error","$HmrcPrintLink","BroadcastChannel","$TimeoutDialog","$UserResearchBanner","$BackLink"],"mappings":"uv0CAAA,SAASA,EAAeC,EAASC,EAAQC,GACvCC,KAAKH,QAAUA,EACfG,KAAKF,OAASA,EACdE,KAAKD,SAAWA,CAClB,C,soCAEAH,EAAeK,UAAUC,KAAO,WAAgB,IAAAC,EAAAH,KAE1CA,KAAKF,OAAOM,UAEVJ,KAAKF,OAAOM,QAAQC,cAA4D,mBAArCL,KAAKF,OAAOM,QAAQC,cACjEL,KAAKF,OAAOM,QAAQC,aAAa,KAAM,KAAML,KAAKF,OAAOQ,SAASC,MAGpEP,KAAKH,QAAQW,iBAAiB,SAAS,SAACC,GACtCA,EAAMC,iBACFP,EAAKL,OAAOM,QAAQO,MAA4C,mBAA7BR,EAAKL,OAAOM,QAAQO,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EAASC,GAC9BE,KAAKH,QAAUA,EACfG,KAAKF,OAASA,CAChB,CAEA+O,EAAc5O,UAAUC,KAAO,WAAgB,IAAAC,EAAAH,KAC7CA,KAAKH,QAAQW,iBAAiB,SAAS,SAACC,GACtCA,EAAMC,iBACNP,EAAKL,OAAOgP,OACd,GACF,ECsCA,IAAAC,EAAe,CACbC,QA3CF,WACE,SAASC,EAAmB/O,GAC1B,IACEA,GACF,CAAE,MAAOgP,GAEPrO,QAAQqO,MAAM,gDAAiDA,EACjE,CACF,CAEwBnP,SAASiC,iBAAiB,oCAClCC,SAAQ,SAACkN,GACvBF,GAAmB,WACjB,IAAIJ,EAAcM,EAAgBrP,QAAQI,MAC5C,GACF,IAEA,IAAMuG,EAAyB,IAAI2H,EAAuBtO,OAAOsP,kBACjE3I,EAAuB6E,cAEvB,IAAM+D,EAAiBtP,SAAS6B,cAAc,oCAC1CyN,GACFJ,GAAmB,WACjB,IAAI9I,EAAckJ,EAAgB5I,GAAwBvG,MAC5D,IAGF,IAAMoP,EAAsBvP,SAAS6B,cAAc,6CAC/C0N,GACFL,GAAmB,WACjB,IAAIvC,EAAmB4C,GAAqBpP,MAC9C,IAGiBH,SAASiC,iBAAiB,kCAClCC,SAAQ,SAACsN,GAClBN,GAAmB,WACjB,IAAIrP,EAAe2P,EAAWzP,OAAQC,UAAUG,MAClD,GACF,GACF,EAIEiG,gBACAuG,qBACA9M,mB,07BCjDFoP,GACAD,EAAaC,S","file":"../hmrc-frontend-7.0.0.min.js","sourcesContent":["function BackLinkHelper($module, window, document) {\n this.$module = $module;\n this.window = window;\n this.document = document;\n}\n\nBackLinkHelper.prototype.init = function init() {\n // do nothing if History API is absent\n if (this.window.history) {\n // prevent resubmit warning\n if (this.window.history.replaceState && typeof this.window.history.replaceState === 'function') {\n this.window.history.replaceState(null, null, this.window.location.href);\n }\n\n this.$module.addEventListener('click', (event) => {\n event.preventDefault();\n if (this.window.history.back && typeof this.window.history.back === 'function') {\n this.window.history.back();\n }\n });\n }\n};\n\nexport default BackLinkHelper;\n","const { warn } = console;\n\nconst utils = {\n generateDomElementFromString(str) {\n const abc = document.createElement('div');\n abc.innerHTML = str;\n return abc.firstChild;\n },\n\n generateDomElementFromStringAndAppendText(str, text) {\n const $tmp = utils.generateDomElementFromString(str);\n $tmp.innerText = text;\n return $tmp;\n },\n\n hasClass(selector, className) {\n return document.querySelector(selector).classList.contains(className);\n },\n\n addClass(selector, className) {\n const elements = document.querySelectorAll(selector);\n elements.forEach((i) => { i.classList.add(className); });\n },\n\n removeClass(selector, className) {\n const elements = document.querySelectorAll(selector);\n elements.forEach((i) => { i.classList.remove(className); });\n },\n\n removeElement($elem) {\n const parent = $elem.parentNode;\n if (parent) {\n parent.removeChild($elem);\n } else {\n warn(\"couldn't find parent for elem\", $elem);\n }\n },\n\n ajaxGet(url, success) {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n xhr.onreadystatechange = () => {\n if (xhr.readyState > 3 && xhr.status === 200) success(xhr.responseText);\n };\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n xhr.send();\n return xhr;\n },\n};\n\nexport default utils;\n","import utils from './utils';\n\nfunction displayDialog($elementToDisplay) {\n const $dialog = utils.generateDomElementFromString('<div id=\"hmrc-timeout-dialog\" tabindex=\"-1\" role=\"dialog\" aria-modal=\"true\" class=\"hmrc-timeout-dialog\">');\n const $overlay = utils.generateDomElementFromString('<div id=\"hmrc-timeout-overlay\" class=\"hmrc-timeout-overlay\">');\n const $preparedElementToDisplay = typeof $elementToDisplay === 'string' ? utils.generateDomElementFromString($elementToDisplay) : $elementToDisplay;\n const resetElementsFunctionList = [];\n const closeCallbacks = [];\n\n $dialog.appendChild($preparedElementToDisplay);\n\n if (!utils.hasClass('html', 'noScroll')) {\n utils.addClass('html', 'noScroll');\n resetElementsFunctionList.push(() => {\n utils.removeClass('html', 'noScroll');\n });\n }\n document.body.appendChild($dialog);\n document.body.appendChild($overlay);\n\n resetElementsFunctionList.push(() => {\n utils.removeElement($dialog);\n utils.removeElement($overlay);\n });\n\n const setupFocusHandlerAndFocusDialog = () => {\n function keepFocus(event) {\n const modalFocus = document.getElementById('hmrc-timeout-dialog');\n if (modalFocus) {\n if (event.target !== modalFocus && !modalFocus.contains(event.target)) {\n event.stopPropagation();\n modalFocus.focus();\n }\n }\n }\n\n const elemToFocusOnReset = document.activeElement;\n $dialog.focus();\n\n document.addEventListener('focus', keepFocus, true);\n\n resetElementsFunctionList.push(() => {\n document.removeEventListener('focus', keepFocus);\n elemToFocusOnReset.focus();\n });\n };\n\n // disable the non-dialog page to prevent confusion for VoiceOver users\n const selectors = [\n '#skiplink-container',\n 'body > header',\n '#global-cookie-message',\n 'main',\n 'body > footer',\n 'body > .govuk-skip-link',\n '.cbanner-govuk-cookie-banner',\n 'body > .govuk-width-container',\n ];\n const elements = document.querySelectorAll(selectors.join(', '));\n const close = () => {\n while (resetElementsFunctionList.length > 0) {\n const fn = resetElementsFunctionList.shift();\n fn();\n }\n };\n const closeAndInform = () => {\n closeCallbacks.forEach((fn) => { fn(); });\n close();\n };\n const setupKeydownHandler = () => {\n function keydownListener(e) {\n if (e.keyCode === 27) {\n closeAndInform();\n }\n }\n\n document.addEventListener('keydown', keydownListener);\n\n resetElementsFunctionList.push(() => {\n document.removeEventListener('keydown', keydownListener);\n });\n };\n const preventMobileScrollWhileAllowingPinchZoom = () => {\n const handleTouch = (e) => {\n const touches = e.touches || e.changedTouches || [];\n\n if (touches.length === 1) {\n e.preventDefault();\n }\n };\n\n document.addEventListener('touchmove', handleTouch, true);\n\n resetElementsFunctionList.push(() => {\n document.removeEventListener('touchmove', handleTouch, true);\n });\n };\n\n elements.forEach(($elem) => {\n const value = $elem.getAttribute('aria-hidden');\n $elem.setAttribute('aria-hidden', 'true');\n resetElementsFunctionList.push(() => {\n if (value) {\n $elem.setAttribute('aria-hidden', value);\n } else {\n $elem.removeAttribute('aria-hidden');\n }\n });\n });\n\n //\n setupFocusHandlerAndFocusDialog();\n\n setupKeydownHandler();\n\n preventMobileScrollWhileAllowingPinchZoom();\n\n return {\n closeDialog() {\n close();\n },\n setAriaLabelledBy(value) {\n if (value) {\n $dialog.setAttribute('aria-labelledby', value);\n } else {\n $dialog.removeAttribute('aria-labelledby');\n }\n },\n addCloseHandler(closeHandler) {\n closeCallbacks.push(closeHandler);\n },\n };\n}\n\nexport default { displayDialog };\n","function ValidateInput() {\n}\n\nValidateInput.int = (stringToValidate) => {\n const parsedInt = parseInt(stringToValidate, 10);\n return Number.isNaN(parsedInt) ? undefined : parsedInt;\n};\n\nValidateInput.string = (stringToValidate) => (typeof stringToValidate === 'string' ? stringToValidate : undefined);\n\nValidateInput.boolean = (stringToValidate) => String(stringToValidate).toLowerCase() === 'true';\n\nexport default ValidateInput;\n","function RedirectHelper() {}\n\nRedirectHelper.redirectToUrl = (url) => {\n // This exists to make redirects more testable\n window.location.href = url;\n};\n\nexport default RedirectHelper;\n","import dialog from './dialog';\nimport ValidateInput from './validate-input';\nimport RedirectHelper from './redirectHelper';\nimport utils from './utils';\n\n// TODO: rewrite this to follow govuk-frontend prototype module pattern\n\nfunction TimeoutDialog($module, $sessionActivityService) {\n let options = {};\n let settings = {};\n const cleanupFunctions = [];\n let currentTimer;\n const sessionActivityService = $sessionActivityService;\n\n function init() {\n const validate = ValidateInput;\n\n function lookupData(key) {\n return ($module.attributes.getNamedItem(key) || {}).value;\n }\n\n const localisedDefaults = validate.string(lookupData('data-language')) === 'cy' ? {\n title: 'Rydych ar fin cael eich allgofnodi',\n message: 'Er eich diogelwch, byddwn yn eich allgofnodi cyn pen',\n keepAliveButtonText: 'Parhau i fod wedi’ch mewngofnodi',\n signOutButtonText: 'Allgofnodi',\n properties: {\n minutes: 'funud',\n minute: 'funud',\n seconds: 'eiliad',\n second: 'eiliad',\n },\n } : {\n title: 'You’re about to be signed out',\n message: 'For your security, we will sign you out in',\n keepAliveButtonText: 'Stay signed in',\n signOutButtonText: 'Sign out',\n properties: {\n minutes: 'minutes',\n minute: 'minute',\n seconds: 'seconds',\n second: 'second',\n },\n };\n\n options = {\n timeout: validate.int(lookupData('data-timeout')),\n countdown: validate.int(lookupData('data-countdown')),\n keepAliveUrl: validate.string(lookupData('data-keep-alive-url')),\n signOutUrl: validate.string(lookupData('data-sign-out-url')),\n timeoutUrl: validate.string(lookupData('data-timeout-url')),\n title: validate.string(lookupData('data-title')),\n message: validate.string(lookupData('data-message')),\n messageSuffix: validate.string(lookupData('data-message-suffix')),\n keepAliveButtonText: validate.string(\n lookupData('data-keep-alive-button-text'),\n ),\n signOutButtonText: validate.string(\n lookupData('data-sign-out-button-text'),\n ),\n synchroniseTabs: validate.boolean(\n lookupData('data-synchronise-tabs') || false,\n ),\n hideSignOutButton: validate.boolean(\n lookupData('data-hide-sign-out-button') || false,\n ),\n };\n\n // Default timeoutUrl to signOutUrl if not set\n options.timeoutUrl = options.timeoutUrl || options.signOutUrl;\n\n validateInput(options);\n settings = mergeOptionsWithDefaults(options, localisedDefaults);\n setupDialogTimer();\n listenForSessionActivityAndResetDialogTimer();\n }\n\n const broadcastSessionActivity = () => {\n sessionActivityService.logActivity();\n };\n\n const listenForSessionActivityAndResetDialogTimer = () => {\n if (settings.synchroniseTabs) {\n sessionActivityService.onActivity((event) => {\n const timeOfActivity = event.timestamp;\n cleanup();\n setupDialogTimer(timeOfActivity);\n });\n }\n };\n\n const validateInput = (config) => {\n const requiredConfig = ['timeout', 'countdown', 'keepAliveUrl', 'signOutUrl'];\n const missingRequiredConfig = [];\n\n requiredConfig.forEach((item) => {\n if (!config[item]) {\n missingRequiredConfig.push(`data-${item.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()}`);\n }\n });\n\n if (missingRequiredConfig.length > 0) {\n throw new Error(\n `Missing config item(s): [${missingRequiredConfig.join(', ')}]`,\n );\n }\n };\n\n const mergeOptionsWithDefaults = (theOptions, localisedDefaults) => {\n const clone = { ...theOptions };\n\n Object.keys(localisedDefaults).forEach((key) => {\n if (typeof clone[key] === 'object') {\n clone[key] = mergeOptionsWithDefaults(\n theOptions[key],\n localisedDefaults[key],\n );\n }\n if (clone[key] === undefined || clone[key] === '') {\n clone[key] = localisedDefaults[key];\n }\n });\n\n return clone;\n };\n\n const setupDialogTimer = (timeOfLastActivity = getDateNow()) => {\n const signoutTime = timeOfLastActivity + settings.timeout * 1000;\n\n const delta = getDateNow() - timeOfLastActivity;\n const secondsUntilTimeoutDialog = settings.timeout - settings.countdown;\n const timeout = window.setTimeout(() => {\n setupDialog(signoutTime);\n }, (secondsUntilTimeoutDialog * 1000) - delta);\n\n cleanupFunctions.push(() => {\n window.clearTimeout(timeout);\n if (currentTimer) {\n window.clearTimeout(currentTimer);\n }\n });\n };\n\n const setupDialog = (signoutTime) => {\n const $element = utils.generateDomElementFromString('<div>');\n\n if (settings.title) {\n const $tmp = utils.generateDomElementFromStringAndAppendText(\n '<h1 id=\"hmrc-timeout-heading\" class=\"govuk-heading-m push--top\">',\n settings.title,\n );\n $element.appendChild($tmp);\n }\n\n const $countdownElement = utils.generateDomElementFromString(\n '<span id=\"hmrc-timeout-countdown\" class=\"hmrc-timeout-dialog__countdown\">',\n );\n\n const $audibleMessage = utils.generateDomElementFromString('<p id=\"hmrc-timeout-message\" class=\"govuk-visually-hidden screenreader-content\" aria-live=\"assertive\">');\n const $visualMessge = utils.generateDomElementFromStringAndAppendText(\n '<p class=\"govuk-body hmrc-timeout-dialog__message\" aria-hidden=\"true\">',\n settings.message,\n );\n $visualMessge.appendChild(document.createTextNode(' '));\n $visualMessge.appendChild($countdownElement);\n if (settings.messageSuffix) {\n $visualMessge.appendChild(document.createTextNode(` ${settings.messageSuffix}`));\n }\n\n const $staySignedInButton = utils.generateDomElementFromStringAndAppendText(\n '<button id=\"hmrc-timeout-keep-signin-btn\" class=\"govuk-button\">',\n settings.keepAliveButtonText,\n );\n\n const $wrapper = document.createElement('div');\n $wrapper.classList.add('govuk-button-group');\n $wrapper.appendChild($staySignedInButton);\n\n $element.appendChild($visualMessge);\n $element.appendChild($audibleMessage);\n $staySignedInButton.addEventListener('click', keepAliveAndClose);\n $element.appendChild(document.createTextNode(' '));\n\n if (!settings.hideSignOutButton) {\n const $signOutButton = utils.generateDomElementFromStringAndAppendText(\n '<a id=\"hmrc-timeout-sign-out-link\" class=\"govuk-link hmrc-timeout-dialog__link\">',\n settings.signOutButtonText,\n );\n $signOutButton.addEventListener('click', signOut);\n $signOutButton.setAttribute('href', settings.signOutUrl);\n\n $wrapper.appendChild($signOutButton);\n }\n\n $element.appendChild($wrapper);\n\n const dialogControl = dialog.displayDialog($element);\n\n cleanupFunctions.push(() => {\n dialogControl.closeDialog();\n });\n\n dialogControl.addCloseHandler(keepAliveAndClose);\n\n dialogControl.setAriaLabelledBy('hmrc-timeout-heading hmrc-timeout-message');\n\n const getMillisecondsRemaining = () => signoutTime - getDateNow();\n const getSecondsRemaining = () => Math.round(getMillisecondsRemaining() / 1000);\n\n const getHumanText = (counter) => {\n let minutes; let\n visibleMessage;\n if (counter < 60) {\n visibleMessage = `${counter} ${settings.properties[counter !== 1 ? 'seconds' : 'second']}.`;\n } else {\n minutes = Math.ceil(counter / 60);\n visibleMessage = `${minutes} ${settings.properties[minutes === 1 ? 'minute' : 'minutes']}.`;\n }\n return visibleMessage;\n };\n\n const getAudibleHumanText = (counter) => {\n const humanText = getHumanText(roundSecondsUp(counter));\n const messageParts = [settings.message, ' ', humanText];\n if (settings.messageSuffix) {\n messageParts.push(' ');\n messageParts.push(settings.messageSuffix);\n }\n return messageParts.join('');\n };\n\n const roundSecondsUp = (counter) => {\n if (counter > 60) {\n return counter;\n } if (counter < 20) {\n return 20;\n }\n return Math.ceil(counter / 20) * 20;\n };\n\n const updateTextIfChanged = ($elem, text) => {\n if ($elem.innerText !== text) {\n // eslint-disable-next-line no-param-reassign\n $elem.innerText = text;\n }\n };\n\n const updateCountdown = (counter) => {\n const visibleMessage = getHumanText(counter);\n const audibleHumanText = getAudibleHumanText(counter);\n\n updateTextIfChanged($countdownElement, visibleMessage);\n updateTextIfChanged($audibleMessage, audibleHumanText);\n };\n\n const getNextTimeout = () => {\n const remaining = getMillisecondsRemaining();\n const roundedRemaining = Math.floor(getMillisecondsRemaining() / 1000) * 1000;\n if (roundedRemaining <= 60000) {\n return (remaining - roundedRemaining) || 1000;\n }\n return remaining - (roundedRemaining - (roundedRemaining % 60000 || 60000));\n };\n\n const runUpdate = () => {\n const counter = Math.max(getSecondsRemaining(), 0);\n updateCountdown(counter);\n if (counter === 0) {\n timeout();\n } else {\n currentTimer = window.setTimeout(runUpdate, getNextTimeout());\n }\n };\n\n runUpdate();\n };\n\n const keepAliveAndClose = () => {\n cleanup();\n setupDialogTimer();\n utils.ajaxGet(settings.keepAliveUrl, () => {});\n broadcastSessionActivity();\n };\n\n const getDateNow = () => Date.now();\n\n const signOut = () => {\n RedirectHelper.redirectToUrl(settings.signOutUrl);\n };\n\n const timeout = () => {\n RedirectHelper.redirectToUrl(settings.timeoutUrl);\n };\n\n const cleanup = () => {\n while (cleanupFunctions.length > 0) {\n const fn = cleanupFunctions.shift();\n fn();\n }\n };\n\n return { init, cleanup };\n}\n\nTimeoutDialog.dialog = dialog;\nTimeoutDialog.redirectHelper = RedirectHelper;\nTimeoutDialog.utils = utils;\n\nexport default TimeoutDialog;\n","import { getCookie, setCookie } from '../../utils/cookies';\n\nfunction UserResearchBanner($module) {\n this.$module = $module;\n this.$closeLink = this.$module.querySelector('.hmrc-user-research-banner__close');\n this.cookieName = 'mdtpurr';\n this.cookieExpiryDays = 28;\n}\n\nUserResearchBanner.prototype.init = function init() {\n const cookieData = getCookie(this.cookieName);\n\n if (cookieData == null) {\n this.$module.classList.add('hmrc-user-research-banner--show');\n if (this.$closeLink) {\n this.$closeLink.addEventListener('click', this.eventHandlers.noThanksClick.bind(this));\n }\n }\n};\n\nUserResearchBanner.prototype.eventHandlers = {\n noThanksClick(event) {\n event.preventDefault();\n\n setCookie(this.cookieName, 'suppress_for_all_services', { days: this.cookieExpiryDays });\n this.$module.classList.remove('hmrc-user-research-banner--show');\n },\n};\n\nexport default UserResearchBanner;\n","// Based on https://github.com/alphagov/govuk_template_jinja\nexport const setCookie = (name, value, options = {}) => {\n let cookieString = `${name}=${value}; path=/`;\n if (options.days) {\n const date = new Date();\n date.setTime(date.getTime() + (options.days * 24 * 60 * 60 * 1000));\n cookieString = `${cookieString}; expires=${date.toGMTString()}`;\n }\n if (window.location.protocol === 'https:') {\n cookieString += '; Secure';\n }\n document.cookie = cookieString;\n\n return cookieString;\n};\n\nexport const getCookie = (name) => {\n const nameEQ = `${name}=`;\n const cookies = document.cookie.split(';');\n for (let i = 0, len = cookies.length; i < len; i += 1) {\n let cookie = cookies[i];\n while (cookie.charAt(0) === ' ') {\n cookie = cookie.substring(1, cookie.length);\n }\n if (cookie.indexOf(nameEQ) === 0) {\n return decodeURIComponent(cookie.substring(nameEQ.length));\n }\n }\n return null;\n};\n","export default class SessionActivityService {\n constructor(BrowserBroadcastChannel) {\n this.activityChannel = BrowserBroadcastChannel && new BrowserBroadcastChannel('session-activity');\n }\n\n logActivity() {\n if (this.activityChannel) {\n const event = { timestamp: Date.now() };\n this.activityChannel.postMessage(event);\n }\n }\n\n onActivity(callback) {\n if (this.activityChannel) {\n this.activityChannel.onmessage = (event) => {\n callback(event.data);\n };\n }\n }\n}\n","function HmrcPrintLink($module, window) {\n this.$module = $module;\n this.window = window;\n}\n\nHmrcPrintLink.prototype.init = function init() {\n this.$module.addEventListener('click', (event) => {\n event.preventDefault();\n this.window.print();\n });\n};\n\nexport default HmrcPrintLink;\n","import BackLinkHelper from './components/back-link-helper/back-link-helper';\nimport TimeoutDialog from './components/timeout-dialog/timeout-dialog';\nimport UserResearchBanner from './components/user-research-banner/user-research-banner';\nimport SessionActivityService from './components/timeout-dialog/session-activity-service';\nimport HmrcPrintLink from './components/hmrc-print-link/hmrc-print-link';\n\nfunction initAll() {\n function logAndIgnoreErrors(init) {\n try {\n init();\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('hmrc-frontend component initialisation failed', error);\n }\n }\n\n const $HmrcPrintLinks = document.querySelectorAll('a[data-module=\"hmrc-print-link\"]');\n $HmrcPrintLinks.forEach(($HmrcPrintLink) => {\n logAndIgnoreErrors(() => {\n new HmrcPrintLink($HmrcPrintLink, window).init();\n });\n });\n\n const sessionActivityService = new SessionActivityService(window.BroadcastChannel);\n sessionActivityService.logActivity();\n\n const $TimeoutDialog = document.querySelector('meta[name=\"hmrc-timeout-dialog\"]');\n if ($TimeoutDialog) {\n logAndIgnoreErrors(() => {\n new TimeoutDialog($TimeoutDialog, sessionActivityService).init();\n });\n }\n\n const $UserResearchBanner = document.querySelector('[data-module=\"hmrc-user-research-banner\"]');\n if ($UserResearchBanner) {\n logAndIgnoreErrors(() => {\n new UserResearchBanner($UserResearchBanner).init();\n });\n }\n\n const $BackLinks = document.querySelectorAll('[data-module=\"hmrc-back-link\"]');\n $BackLinks.forEach(($BackLink) => {\n logAndIgnoreErrors(() => {\n new BackLinkHelper($BackLink, window, document).init();\n });\n });\n}\n\nexport default {\n initAll,\n TimeoutDialog,\n UserResearchBanner,\n BackLinkHelper,\n};\n","import { initAll } from 'govuk-frontend/dist/govuk/govuk-frontend.min.js';\nimport HMRCFrontend from './all';\n\ninitAll();\nHMRCFrontend.initAll();\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hmrc-frontend",
3
- "version": "6.117.0",
3
+ "version": "7.0.0",
4
4
  "description": "Design patterns for HMRC frontends",
5
5
  "scripts": {
6
6
  "postinstall": "node check-compatibility-with-govuk-frontend-version.js"
@@ -25,6 +25,6 @@
25
25
  "homepage": "https://github.com/hmrc/hmrc-frontend#readme",
26
26
  "dependencies": {
27
27
  "accessible-autocomplete": "^3.0.1",
28
- "govuk-frontend": "^5.14.0"
28
+ "govuk-frontend": "^6.0.0"
29
29
  }
30
30
  }
@@ -1,39 +0,0 @@
1
- # HMRC Account Header
2
-
3
- ## Introduction
4
-
5
- The account header component is used at the top of HMRC pages where a user is logged in, to help users navigate around their account.
6
-
7
- ## Prototype Kit Usage
8
-
9
- To use the Account header in a view you will need to extend 'hmrc/layouts/account-header.html'
10
-
11
- ```
12
- {% extends 'hmrc/layouts/account-header.html' %}
13
-
14
- {% set currentLanguage = 'cy' %}
15
-
16
- {% block content %}
17
- <main id="content">
18
- <h1>your content goes here</h1>
19
- <p>etc.</p>
20
- </main>
21
- {% endblock %}
22
- ```
23
- The page will then have a variation of the GOVUK page header which includes a language toggle, and the Account Menu.
24
-
25
- ## Notes
26
-
27
- Implemented as a [layout file](`/src/layouts/account-header.html`) for use in GOVUK prototype kits. It extends the default GOVUK layout file and overrides the _header_ and _main_ blocks.
28
-
29
- * The Header block is overridden to include the HMRC Header variation with a language selector on the right hand side.
30
- * We have been able to parameterise the HMRC `header` component to allow a single macro to provide all the necessary variants.
31
-
32
- * The main block is overridden to insert the HMRC Account Menu between the header and the _beforeContent_ block.
33
- * We have decided to use this method as it seems the least worst option of the methods that we have considered.
34
-
35
- * Other options considered:
36
-
37
- * We aren't using the _beforeContent_ block as we don't know if teams are already using _beforeContent_ with something incompatible.
38
- * We have discounted the use of the `super()` nunjucks function as we think this may confuse some users.
39
- * We have considered whether other nunjucks features could allow us to access the child's block content before redefining the block, we couldn't find a way to do this.
@@ -1,12 +0,0 @@
1
- # HMRC Account Menu
2
-
3
- This component was updated in PLATUI-1419 to match current implementation used by PTA.
4
-
5
- ## Basic functionality
6
-
7
- - if the viewport is small, show the extra menu link (showNavLinkMobile)
8
- - if showNavLinkMobile is triggered, open the main nav (subNav)
9
- - if a menu link (accountLink) is triggered, close sub-nav (subNav)
10
- - if showNavLinkMobile is open, close it when triggered
11
-
12
- This code is open source software licensed under the [Apache 2.0 License]("http://www.apache.org/licenses/LICENSE-2.0.html").
@@ -1,380 +0,0 @@
1
- // stylelint-disable
2
- // Hello friend, you may see this comment when installing via govuk-prototype-kit.
3
- // If so, please ensure your version of govuk-frontend is at least 5.4.0
4
- // - PlatUI
5
- @import "../../../../govuk-frontend/dist/govuk/settings/index";
6
- @import "../../../../govuk-frontend/dist/govuk/tools/index";
7
- @import "../../../../govuk-frontend/dist/govuk/helpers/index";
8
-
9
- // previously provided by govuk-template, no equivalent in govuk-frontend
10
- .hidden {
11
- display: none;
12
- visibility: hidden;
13
- }
14
-
15
- // dirty, dirty, dirty
16
- // Necessary as there's a specificity problem on the <li>'s in the mobile menu
17
- // Note: these are relied on by teams not using the account menu, so handle with care
18
- .hidden,
19
- .no-js .js-visible,
20
- .js .js-hidden {
21
- display: none !important;
22
- }
23
-
24
- $hmrc-account-menu-grey-1: #4a4a4a;
25
- $hmrc-account-menu-yellow-1: #ffbf47;
26
- $hmrc-account-menu-blue-1: #005ea5;
27
- $hmrc-account-menu-transition-time: 0.3s;
28
- $hmrc-transition-type: "all";
29
-
30
- .hmrc-account-icon {
31
- background-repeat: no-repeat;
32
- }
33
-
34
- .hmrc-account-icon--home {
35
- padding-left: 22px;
36
- background-image: url("data:image/svg+xml;base64,PHN2ZyBkYXRhLW5hbWU9IkxheWVyIDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWlkIj48dGl0bGU+aWNvbi1ob21lPC90aXRsZT48cGF0aCBkPSJNMTIgMkwxIDEyLjVoMy4xOXY5LjM4aDUuNDR2LTcuMTNoNC41djcuMTNoNS40NFYxMi41SDIzTDEyIDJ6Ii8+PC9zdmc+");
37
- background-position: left -1px;
38
- background-size: 19px;
39
- }
40
-
41
- .hmrc-account-menu {
42
- @include govuk-font($size: 16);
43
- @include govuk-clearfix;
44
-
45
- position: relative;
46
- z-index: 0;
47
- margin-bottom: 0;
48
- -webkit-transition: #{$hmrc-transition-type} $hmrc-account-menu-transition-time ease-in-out;
49
- transition: #{$hmrc-transition-type} $hmrc-account-menu-transition-time ease-in-out;
50
- border-bottom: 1px solid govuk-colour("mid-grey");
51
- background-color: govuk-colour("white");
52
- }
53
-
54
- .is-smaller.hmrc-account-menu {
55
- margin-bottom: 0;
56
- -webkit-transition: none;
57
- transition: none;
58
- border-bottom: 1px solid govuk-colour("mid-grey");
59
-
60
- &.main-nav-menu-is-open {
61
- margin-bottom: 5em;
62
- }
63
-
64
- li:last-of-type {
65
- a:last-of-type {
66
- padding-right: 0;
67
- }
68
- }
69
- }
70
-
71
- .hmrc-account-menu__link {
72
- @include govuk-font-size($size: 16);
73
-
74
- -webkit-box-sizing: border-box;
75
-
76
- box-sizing: border-box;
77
- display: inline-block;
78
- padding: 12px 16px 8px;
79
- border-bottom: 4px solid transparent;
80
- color: $hmrc-account-menu-grey-1;
81
- font-weight: 300;
82
- line-height: 1.25;
83
- text-decoration: none;
84
- text-transform: none;
85
-
86
- &:visited {
87
- color: $hmrc-account-menu-grey-1;
88
- }
89
-
90
- &:hover,
91
- &:focus {
92
- outline: 3px solid rgba(0, 0, 0, 0);
93
- border-bottom-width: 4px;
94
- border-bottom-style: solid;
95
- color: $govuk-link-hover-colour;
96
- border-bottom-color: $govuk-link-hover-colour;
97
- }
98
-
99
- &:focus {
100
- background-color: $govuk-focus-colour;
101
- color: $govuk-focus-text-colour;
102
- }
103
-
104
- .hmrc-notification-badge {
105
- // otherwise the line height is slightly larger than the menu items and we
106
- // get a small gap under menu items without a notification badge.
107
- line-height: inherit;
108
- }
109
-
110
- &:not(.hmrc-account-menu__link--menu) {
111
- outline-offset: -3px;
112
- }
113
- }
114
-
115
- .is-smaller .hmrc-account-menu__link {
116
- padding-left: 10px;
117
- color: govuk-colour("black");
118
- }
119
-
120
- .hmrc-account-menu__link--home {
121
- padding: 12px 18px 8px 0;
122
- float: left;
123
- }
124
-
125
- /* stylelint-disable no-descending-specificity */
126
- .is-smaller .hmrc-account-menu__link--home,
127
- .is-smaller .hmrc-account-menu__link--menu {
128
- padding-left: 0;
129
- }
130
-
131
- body:not(.js-enabled) {
132
- .hmrc-account-menu__main {
133
- display: inline;
134
- }
135
-
136
- .hmrc-account-menu__link--menu {
137
- display: none;
138
- }
139
- }
140
-
141
- .hmrc-account-menu__link--menu {
142
- padding: 12px 20px 8px 0;
143
- float: right;
144
- border-bottom: 4px solid transparent;
145
- }
146
-
147
- .hmrc-account-menu__link--active,
148
- .hmrc-account-menu__link--active:visited {
149
- border-bottom: 4px solid $govuk-brand-colour;
150
- color: govuk-colour("black");
151
- }
152
-
153
- .hmrc-account-menu__main {
154
- z-index: 995;
155
- margin: 0;
156
- float: right;
157
-
158
- li {
159
- display: inline-block;
160
- margin-bottom: 0;
161
- }
162
- }
163
-
164
- .is-smaller {
165
- .hmrc-account-menu__main {
166
- padding: 0;
167
- float: none;
168
- clear: both;
169
- background-color: govuk-colour("light-grey");
170
-
171
- &.main-nav-is-open {
172
- position: relative;
173
- border-top: 1px solid govuk-colour("mid-grey");
174
-
175
- &::before,
176
- &::after {
177
- content: " ";
178
- position: absolute;
179
- right: 4px;
180
- bottom: 100%;
181
- width: 0;
182
- height: 0;
183
- border: solid transparent;
184
- pointer-events: none;
185
- }
186
-
187
- &::before {
188
- right: 3px;
189
- border-width: 7px;
190
- border-bottom-color: govuk-colour("mid-grey");
191
- }
192
-
193
- &::after {
194
- margin-left: -6px;
195
- border-width: 6px;
196
- border-bottom-color: $govuk-body-background-colour;
197
- }
198
- }
199
-
200
- li {
201
- display: block;
202
- overflow: hidden;
203
- border-bottom: 1px solid govuk-colour("mid-grey");
204
-
205
- &:last-child {
206
- border-bottom: 0;
207
- }
208
- }
209
-
210
- .hmrc-account-menu__link {
211
- border-bottom: 0;
212
- display: block;
213
-
214
- &:hover {
215
- border-bottom: 0;
216
- }
217
- }
218
- }
219
-
220
- .hmrc-account-menu__link--back {
221
- padding-left: 20px;
222
- border-bottom: 1px solid govuk-colour("light-grey");
223
- background-image: url("#{$hmrc-assets-path}components/account-menu/images/icon-chevron-left.svg");
224
- background-repeat: no-repeat;
225
- background-position: 10px;
226
- background-size: 12px;
227
-
228
- .hmrc-account-menu__link {
229
- padding: 12px 8px 8px;
230
-
231
- &:focus {
232
- outline-offset: -3px;
233
- outline: 3px solid rgba(0, 0, 0, 0);
234
- }
235
- }
236
- }
237
- }
238
-
239
- .js-enabled .hmrc-account-menu__link--menu,
240
- .js-enabled .is-smaller .hmrc-account-menu__link--more {
241
- background-image: url("#{$hmrc-assets-path}components/account-menu/images/icon-chevron-right.svg");
242
- background-repeat: no-repeat;
243
- background-position: right 4px center;
244
- background-size: 12px;
245
- }
246
-
247
- .js-enabled .hmrc-account-home--account--is-open,
248
- .js-enabled .is-smaller .hmrc-account-menu__link--more-expanded,
249
- .js-enabled .hmrc-account-menu__link--more {
250
- background-image: url("#{$hmrc-assets-path}components/account-menu/images/icon-chevron-down.svg");
251
- background-position: right 4px center;
252
- background-size: 12px;
253
- }
254
-
255
- .js-enabled .hmrc-account-menu__link--more {
256
- position: relative;
257
- padding-right: 31px;
258
- background-image: url("#{$hmrc-assets-path}components/account-menu/images/icon-chevron-down.svg");
259
- background-position: right 14px center;
260
- background-size: 12px;
261
-
262
- &::before,
263
- &::after {
264
- content: none;
265
- }
266
-
267
- &.hmrc-account-menu__link--more-expanded {
268
- &::before,
269
- &::after {
270
- content: " ";
271
- position: absolute;
272
- right: 14px;
273
- bottom: -5px;
274
- width: 0;
275
- height: 0;
276
- border: solid transparent;
277
- pointer-events: none;
278
- }
279
-
280
- &::before {
281
- right: 13px;
282
- border-width: 7px;
283
- border-bottom-color: govuk-colour("mid-grey");
284
- }
285
-
286
- &::after {
287
- margin-left: -6px;
288
- border-width: 6px;
289
- border-bottom-color: govuk-colour("light-grey");
290
- }
291
- }
292
- }
293
-
294
- .is-smaller .hmrc-account-menu__link--more-expanded {
295
- display: none;
296
- }
297
-
298
- .no-js {
299
- .hmrc-account-menu__main {
300
- li {
301
- display: inline;
302
- }
303
- }
304
- }
305
-
306
- $hmrc-banner-blue: #005ea5;
307
-
308
- .hmrc-full-width-banner {
309
- display: block;
310
- position: relative;
311
- z-index: 999;
312
- color: govuk-colour("white");
313
- background-color: $hmrc-banner-blue;
314
- }
315
-
316
- .hmrc-full-width-banner__container {
317
- position: relative;
318
- padding: 20px 0.78947em;
319
- }
320
-
321
- .hmrc-full-width-banner a {
322
- color: govuk-colour("white");
323
- }
324
-
325
- .hmrc-full-width-banner__title {
326
- @include govuk-font($size: 19);
327
-
328
- margin-bottom: 5px;
329
- font-weight: 600;
330
- }
331
-
332
- .hmrc-full-width-banner__close {
333
- font-family: "GDS Transport", arial, sans-serif;
334
- -webkit-font-smoothing: antialiased;
335
- -moz-osx-font-smoothing: grayscale;
336
- font-weight: 400;
337
- font-size: 0.75rem;
338
- line-height: 1.25;
339
- position: absolute;
340
- top: 20px;
341
- right: 15px;
342
- color: #ffffff;
343
- }
344
-
345
- @media print {
346
- .hmrc-full-width-banner__close {
347
- font-family: sans-serif;
348
- }
349
- }
350
-
351
- @media (min-width: 40.0625em) {
352
- .hmrc-full-width-banner__close {
353
- font-size: 0.875rem;
354
- line-height: 1.42857;
355
- }
356
- }
357
-
358
- @media print {
359
- .hmrc-full-width-banner__close {
360
- font-size: 12pt;
361
- line-height: 1.2;
362
- }
363
- }
364
-
365
- @include govuk-media-query($from: tablet) {
366
- .hmrc-full-width-banner__close {
367
- right: 35px;
368
- }
369
-
370
- .hmrc-full-width-banner__container {
371
- padding: 20px 30px 10px;
372
- }
373
- }
374
-
375
- // Note: this is relied on by teams not using the account menu, so handle with care
376
- .js-hidden {
377
- display: none;
378
- }
379
-
380
- /* stylelint-enable no-descending-specificity */
@@ -1,84 +0,0 @@
1
- import { debounce } from '../../utils/debounce';
2
- import { getCurrentBreakpoint } from '../../utils/breakpoints';
3
-
4
- const isSmall = (element) => element.innerWidth <= 768;
5
-
6
- function AccountMenu($module) {
7
- this.$module = document.querySelector($module);
8
- this.$moduleBottomMargin = this.$module.style.marginBottom;
9
- this.$mainNav = this.$module.querySelector('.hmrc-account-menu__main');
10
- this.$showNavLinkMobile = this.$module.querySelector('.hmrc-account-menu__link--menu');
11
- this.$currentBreakpoint = getCurrentBreakpoint();
12
- }
13
-
14
- AccountMenu.prototype.init = function init() {
15
- this.setup();
16
-
17
- this.$showNavLinkMobile.addEventListener('click', this.eventHandlers.showNavLinkMobileClick.bind(this));
18
-
19
- window.addEventListener('resize', debounce(this.reinstantiate.bind(this)));
20
- };
21
-
22
- AccountMenu.prototype.reinstantiate = function reinstantiate(resizeEvent) {
23
- const newBreakpoint = getCurrentBreakpoint(resizeEvent.target.innerWidth);
24
- const hasCrossedBreakpoint = this.$currentBreakpoint !== newBreakpoint;
25
- if (hasCrossedBreakpoint) {
26
- this.$currentBreakpoint = newBreakpoint;
27
- this.setup();
28
- }
29
- };
30
-
31
- AccountMenu.prototype.eventHandlers = {
32
- showNavLinkMobileClick(event) {
33
- event.preventDefault();
34
-
35
- if (isSmall(window)) {
36
- if (this.$mainNav.classList.contains('main-nav-is-open')) {
37
- this.hideMainNavMobile(event.currentTarget);
38
- } else {
39
- this.showMainNavMobile();
40
- }
41
- }
42
- },
43
- };
44
-
45
- AccountMenu.prototype.setup = function setup() {
46
- if (isSmall(window)) {
47
- this.$module.classList.add('is-smaller');
48
- this.$showNavLinkMobile.setAttribute('aria-hidden', 'false');
49
- this.$showNavLinkMobile.removeAttribute('tabindex');
50
- this.$showNavLinkMobile.classList.remove('js-hidden');
51
-
52
- this.hideMainNavMobile(this.$showNavLinkMobile);
53
- } else {
54
- this.$module.classList.remove('is-smaller');
55
- this.$mainNav.classList.remove('main-nav-is-open', 'js-hidden');
56
- this.$showNavLinkMobile.setAttribute('aria-hidden', 'true');
57
- this.$showNavLinkMobile.setAttribute('tabindex', '-1');
58
- this.$showNavLinkMobile.classList.add('js-hidden');
59
- }
60
- };
61
-
62
- AccountMenu.prototype.showMainNavMobile = function showMainNavMobile() {
63
- // TODO: shall we add main-nav-is-open to `nav`????
64
- this.$mainNav.classList.remove('js-hidden');
65
- this.$mainNav.classList.add('main-nav-is-open');
66
- this.$mainNav.setAttribute('aria-expanded', 'true');
67
-
68
- this.$showNavLinkMobile.setAttribute('aria-expanded', 'true');
69
- this.$showNavLinkMobile.classList.add('hmrc-account-home--account--is-open');
70
- };
71
-
72
- AccountMenu.prototype.hideMainNavMobile = function hideMainNavMobile(element) {
73
- this.$mainNav.classList.remove('main-nav-is-open');
74
- this.$mainNav.setAttribute('aria-expanded', 'false');
75
-
76
- if (element.classList.contains('hmrc-account-menu__link--menu')) {
77
- this.$mainNav.classList.add('js-hidden');
78
-
79
- this.$showNavLinkMobile.setAttribute('aria-expanded', 'false');
80
- this.$showNavLinkMobile.classList.remove('hmrc-account-home--account--is-open');
81
- }
82
- };
83
-
84
- export default AccountMenu;
@@ -1 +0,0 @@
1
- <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><defs><style>.cls-1{fill:#666;}</style></defs><title>icon-chevron-down</title><polygon class="cls-1" points="19.78 5.99 12 13.77 4.22 5.99 2.1 8.11 9.88 15.89 12 18.01 14.12 15.89 21.9 8.11 19.78 5.99"/></svg>
@@ -1 +0,0 @@
1
- <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24px" height="24px"><defs><style>.cls-1{fill:#666;}</style></defs><title>icon-chevron-left</title><polygon class="cls-1" points="18.01 19.78 10.23 12 18.01 4.22 15.89 2.1 8.11 9.88 5.99 12 8.11 14.12 15.89 21.9 18.01 19.78"/></svg>
@@ -1 +0,0 @@
1
- <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><defs><style>.cls-1{fill:#666;}</style></defs><title>icon-chevron-right</title><polygon class="cls-1" points="5.99 4.22 13.77 12 5.99 19.78 8.11 21.9 15.89 14.12 18.01 12 15.89 9.88 8.11 2.1 5.99 4.22"/></svg>
@@ -1,3 +0,0 @@
1
- {% macro hmrcAccountMenu(params) %}
2
- {%- include "./template.njk" -%}
3
- {% endmacro %}