@nationalarchives/frontend 0.1.15-prerelease → 0.1.17-prerelease

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 (115) hide show
  1. package/LICENCE +21 -0
  2. package/nationalarchives/all.css +13 -1
  3. package/nationalarchives/all.css.map +1 -1
  4. package/nationalarchives/all.js +1 -1
  5. package/nationalarchives/all.js.map +1 -1
  6. package/nationalarchives/all.scss +2 -3
  7. package/nationalarchives/assets/fonts/fa-brands-400.ttf +0 -0
  8. package/nationalarchives/assets/fonts/fa-brands-400.woff2 +0 -0
  9. package/nationalarchives/assets/fonts/fa-regular-400.ttf +0 -0
  10. package/nationalarchives/assets/fonts/fa-regular-400.woff2 +0 -0
  11. package/nationalarchives/assets/fonts/fa-solid-900.ttf +0 -0
  12. package/nationalarchives/assets/fonts/fa-solid-900.woff2 +0 -0
  13. package/nationalarchives/components/_index.scss +1 -0
  14. package/nationalarchives/components/breadcrumbs/_index.scss +13 -41
  15. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
  16. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
  17. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +8 -4
  18. package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +9 -30
  19. package/nationalarchives/components/breadcrumbs/fixtures.json +23 -1
  20. package/nationalarchives/components/breadcrumbs/macro-options.json +6 -0
  21. package/nationalarchives/components/breadcrumbs/template.njk +17 -12
  22. package/nationalarchives/components/button/_button-group.scss +18 -0
  23. package/nationalarchives/components/button/_index.scss +25 -9
  24. package/nationalarchives/components/button/button.stories.js +64 -8
  25. package/nationalarchives/components/button/fixtures.json +3 -3
  26. package/nationalarchives/components/button/macro-options.json +13 -1
  27. package/nationalarchives/components/button/template.njk +7 -2
  28. package/nationalarchives/components/card/_index.scss +67 -51
  29. package/nationalarchives/components/card/card.stories.js +123 -10
  30. package/nationalarchives/components/card/fixtures.json +62 -10
  31. package/nationalarchives/components/card/macro-options.json +9 -3
  32. package/nationalarchives/components/card/template.njk +12 -8
  33. package/nationalarchives/components/filters/_index.scss +19 -14
  34. package/nationalarchives/components/filters/filters.stories.js +3 -4
  35. package/nationalarchives/components/footer/_index.scss +195 -72
  36. package/nationalarchives/components/footer/fixtures.json +1 -1
  37. package/nationalarchives/components/footer/footer.stories.js +82 -74
  38. package/nationalarchives/components/footer/macro-options.json +34 -8
  39. package/nationalarchives/components/footer/template.njk +110 -53
  40. package/nationalarchives/components/grid/_index.scss +2 -2
  41. package/nationalarchives/components/grid/grid.stories.js +2 -3
  42. package/nationalarchives/components/header/_index.scss +57 -23
  43. package/nationalarchives/components/header/header.stories.js +2 -3
  44. package/nationalarchives/components/hero/_index.scss +4 -8
  45. package/nationalarchives/components/hero/hero.stories.js +2 -3
  46. package/nationalarchives/components/index-grid/_index.scss +28 -7
  47. package/nationalarchives/components/index-grid/index-grid.stories.js +27 -4
  48. package/nationalarchives/components/index-grid/macro-options.json +12 -0
  49. package/nationalarchives/components/index-grid/template.njk +9 -11
  50. package/nationalarchives/components/message/_index.scss +12 -6
  51. package/nationalarchives/components/message/phase-banner.stories.js +2 -3
  52. package/nationalarchives/components/phase-banner/phase-banner.stories.js +2 -3
  53. package/nationalarchives/components/picture/_index.scss +5 -5
  54. package/nationalarchives/components/picture/picture.js +1 -1
  55. package/nationalarchives/components/picture/picture.js.map +1 -1
  56. package/nationalarchives/components/picture/picture.mjs +2 -0
  57. package/nationalarchives/components/picture/picture.stories.js +2 -3
  58. package/nationalarchives/components/profile/profile.stories.js +2 -3
  59. package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +3 -4
  60. package/nationalarchives/components/skip-link/_index.scss +63 -0
  61. package/nationalarchives/components/skip-link/fixtures.json +11 -0
  62. package/nationalarchives/{patterns/featured-collection → components/skip-link}/macro-options.json +10 -4
  63. package/nationalarchives/components/skip-link/macro.njk +3 -0
  64. package/nationalarchives/{patterns/featured-collection/featured-collection.stories.js → components/skip-link/skip-link.stories.js} +7 -10
  65. package/nationalarchives/components/skip-link/template.njk +4 -0
  66. package/nationalarchives/components/tabs/_index.scss +7 -5
  67. package/nationalarchives/components/tabs/tabs.stories.js +8 -9
  68. package/nationalarchives/lib/font-awesome/_animated.scss +276 -0
  69. package/nationalarchives/lib/font-awesome/_bordered-pulled.scss +20 -0
  70. package/nationalarchives/lib/font-awesome/_core.scss +42 -0
  71. package/nationalarchives/lib/font-awesome/_fixed-width.scss +7 -0
  72. package/nationalarchives/lib/font-awesome/_functions.scss +57 -0
  73. package/nationalarchives/lib/font-awesome/_icons.scss +11 -0
  74. package/nationalarchives/lib/font-awesome/_list.scss +20 -0
  75. package/nationalarchives/lib/font-awesome/_mixins.scss +74 -0
  76. package/nationalarchives/lib/font-awesome/_rotated-flipped.scss +31 -0
  77. package/nationalarchives/lib/font-awesome/_screen-reader.scss +14 -0
  78. package/nationalarchives/lib/font-awesome/_shims.scss +2653 -0
  79. package/nationalarchives/lib/font-awesome/_sizing.scss +16 -0
  80. package/nationalarchives/lib/font-awesome/_stacked.scss +32 -0
  81. package/nationalarchives/lib/font-awesome/_variables.scss +4976 -0
  82. package/nationalarchives/lib/font-awesome/brands.scss +34 -0
  83. package/nationalarchives/lib/font-awesome/fontawesome.scss +21 -0
  84. package/nationalarchives/lib/font-awesome/regular.scss +28 -0
  85. package/nationalarchives/lib/font-awesome/solid.scss +28 -0
  86. package/nationalarchives/lib/font-awesome/v4-shims.scss +11 -0
  87. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.mdx +22 -0
  88. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +494 -91
  89. package/nationalarchives/stories/utilities/overrides/overrides.mdx +37 -57
  90. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +8 -14
  91. package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +1 -1
  92. package/nationalarchives/stories/utilities/typography/typography.mdx +2 -0
  93. package/nationalarchives/stories/utilities/typography/typography.stories.js +20 -1
  94. package/nationalarchives/templates/layouts/_generic.njk +10 -8
  95. package/nationalarchives/tools/_colour.scss +163 -49
  96. package/nationalarchives/tools/_index.scss +0 -1
  97. package/nationalarchives/tools/_typography.scss +13 -0
  98. package/nationalarchives/utilities/_debug.scss +41 -1
  99. package/nationalarchives/utilities/_font-awesome.scss +5 -0
  100. package/nationalarchives/utilities/_global.scss +75 -26
  101. package/nationalarchives/utilities/_index.scss +1 -0
  102. package/nationalarchives/utilities/_overrides.scss +54 -9
  103. package/nationalarchives/utilities/_typography.scss +203 -65
  104. package/nationalarchives/variables/_assets.scss +1 -1
  105. package/nationalarchives/variables/_colour.scss +93 -93
  106. package/nationalarchives/variables/_grid.scss +1 -1
  107. package/nationalarchives/variables/_media.scss +23 -23
  108. package/nationalarchives/variables/_spacing.scss +12 -2
  109. package/nationalarchives/variables/_typography.scss +4 -1
  110. package/package.json +14 -14
  111. package/nationalarchives/patterns/_index.scss +0 -1
  112. package/nationalarchives/patterns/featured-collection/_index.scss +0 -13
  113. package/nationalarchives/patterns/featured-collection/macro.njk +0 -3
  114. package/nationalarchives/patterns/featured-collection/template.njk +0 -96
  115. package/nationalarchives/tools/_assets.scss +0 -5
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={908:(t,e,i)=>{i.d(e,{Breadcrumbs:()=>s});var r=i(948);function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function a(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,a=function(t,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===n(a)?a:String(a)),r)}var a}var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$breadcrumbsListWrapper=e&&e.querySelector(".tna-breadcrumbs__wrapper"),this.$breadcrumbsList=e&&this.$breadcrumbsListWrapper&&e.querySelector(".tna-breadcrumbs__list"),this.$breadcrumbs=e&&this.$breadcrumbsListWrapper&&this.$breadcrumbsList&&e.querySelectorAll(".tna-breadcrumbs__item")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$breadcrumbsListWrapper&&this.$breadcrumbsList&&this.$breadcrumbs&&this.$breadcrumbs.length>2){var e="tna-breadcrumbs-".concat((0,r.Z)()),i=document.createElement("li");i.classList.add("tna-breadcrumbs__item","tna-breadcrumbs__item--expandable");var n=document.createElement("button");n.classList.add("tna-breadcrumbs__link"),n.innerHTML="<span class='tna-visually-hidden'>Expand breadcrumbs</span>&hellip;",n.setAttribute("aria-expanded","false"),n.setAttribute("aria-controls",e),n.addEventListener("click",(function(){t.$breadcrumbsList.classList.remove("tna-breadcrumbs__list--collapse-on-mobile"),i.remove(),t.$breadcrumbsListWrapper.setAttribute("tabindex","0"),t.$breadcrumbsListWrapper.focus(),t.$breadcrumbsListWrapper.setAttribute("tabindex","-1")})),i.appendChild(n),this.$breadcrumbsList.setAttribute("id",e),this.$breadcrumbsList.insertBefore(i,this.$breadcrumbs[this.$breadcrumbs.length-2].nextSibling)}}}])&&a(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},8:(t,e,i)=>{i.d(e,{Header:()=>s});var r=i(948);function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function a(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,a=function(t,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===n(a)?a:String(a)),r)}var a}var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$toggleButtonWrapper=e&&e.querySelector(".tna-header__navigation-toggle"),this.$navigation=e&&e.querySelector(".tna-header__navigation"),this.$links=e&&this.$navigation&&this.$navigation.querySelectorAll("[tabindex='0']"),this.menuOpened=!1,this.mql=window.matchMedia("(max-width: 768px)")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$toggleButtonWrapper&&this.$navigation){var e="tna-menu-content-".concat((0,r.Z)());this.$navigation.setAttribute("id",e),this.$toggleButton=document.createElement("button"),this.$toggleButton.innerText="Menu",this.$toggleButton.setAttribute("aria-controls",e),this.$toggleButton.setAttribute("aria-haspopup","true"),this.$toggleButton.classList.add("tna-header__navigation-toggle-button"),this.$hamburger=document.createElement("div"),this.$hamburger.classList.add("tna-header__hamburger"),this.$toggleButton.appendChild(this.$hamburger),this.$toggleButtonWrapper.appendChild(this.$toggleButton),this.syncState(),this.$toggleButton.addEventListener("click",(function(){return t.handleToggleNavigation()})),"addEventListener"in this.mql?this.mql.addEventListener("change",(function(){return t.syncState()})):this.mql.addListener((function(){return t.syncState()}))}}},{key:"handleToggleNavigation",value:function(){this.menuOpened=!this.menuOpened,this.syncState()}},{key:"syncState",value:function(){if(this.mql.matches)if(this.menuOpened){this.$navigation.classList.add("tna-header__navigation--open"),this.$navigation.hidden=!1,this.$navigation.setAttribute("aria-hidden","false"),this.$toggleButton.setAttribute("aria-expanded","true"),this.$toggleButton.setAttribute("title","Close menu"),this.$toggleButton.classList.add("tna-header__navigation-toggle-button--opened");for(var t=0;t<this.$links.length;t++)this.$links[t].setAttribute("tabindex","0")}else{this.$navigation.classList.remove("tna-header__navigation--open"),this.$navigation.hidden=!0,this.$navigation.setAttribute("aria-hidden","true"),this.$toggleButton.setAttribute("aria-expanded","false"),this.$toggleButton.setAttribute("title","Open menu"),this.$toggleButton.classList.remove("tna-header__navigation-toggle-button--opened");for(var e=0;e<this.$links.length;e++)this.$links[e].setAttribute("tabindex","-1")}else{this.$navigation.classList.add("tna-header__navigation--open"),this.$navigation.hidden=!1,this.$navigation.setAttribute("aria-hidden","false"),this.$toggleButton.setAttribute("aria-expanded","true"),this.$toggleButton.setAttribute("title","Close menu");for(var i=0;i<this.$links.length;i++)this.$links[i].setAttribute("tabindex","0")}}}])&&a(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},765:(t,e,i)=>{i.d(e,{Picture:()=>s});var r=i(948);function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function a(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,a=function(t,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===n(a)?a:String(a)),r)}var a}var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$imageWrapper=e&&e.querySelector(".tna-picture__image-wrapper"),this.$transcript=e&&e.querySelector(".tna-picture__transcript"),this.transcriptOpened=!1}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$imageWrapper&&this.$transcript){var e="tna-picture-".concat((0,r.Z)());this.$transcriptToggle=document.createElement("button"),this.$transcriptToggle.classList.add("tna-picture__toggle-transcript","tna-button"),this.$transcriptToggle.setAttribute("aria-controls",e),this.$transcriptToggle.setAttribute("aria-expanded",!1),this.$transcriptToggle.innerText="Open transcript",this.$transcriptToggle.addEventListener("click",(function(){return t.handleToggleTranscript()})),this.$imageWrapper.appendChild(this.$transcriptToggle),this.$transcript.setAttribute("id",e),this.$transcript.setAttribute("hidden",!0)}}},{key:"handleToggleTranscript",value:function(){var t="tna-picture__toggle-transcript--opened";this.transcriptOpened=!this.transcriptOpened,this.transcriptOpened?(this.$transcriptToggle.classList.add(t),this.$transcriptToggle.setAttribute("aria-expanded",!0),this.$transcriptToggle.innerText="Close transcript",this.$transcript.removeAttribute("hidden")):(this.$transcriptToggle.classList.remove(t),this.$transcriptToggle.setAttribute("aria-expanded",!1),this.$transcriptToggle.innerText="Open transcript",this.$transcript.setAttribute("hidden",!0))}}])&&a(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},554:(t,e,i)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,a=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(a)?a:String(a)),n)}var a}i.d(e,{SensitiveImage:()=>a});var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$imageDetails=e&&e.querySelector(".tna-sensitive-image__details"),this.$image=e&&e.querySelector(".tna-sensitive-image__image"),this.imageIsVisible=!1}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;this.$module&&this.$imageDetails&&this.$image&&this.$imageDetails.addEventListener("toggle",(function(){return t.handleImageDetailsToggle()}))}},{key:"handleImageDetailsToggle",value:function(){this.$imageDetails.hasAttribute("open")&&this.$image.focus({preventScroll:!0,focusVisible:!0})}}])&&n(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},973:(t,e,i)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=t[i];return r}function s(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,a=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(a)?a:String(a)),n)}var a}i.d(e,{Tabs:()=>o});var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$tabList=e&&e.querySelector(".tna-tabs__list"),this.$tabListItemLinks=e&&this.$tabList&&e.querySelectorAll(".tna-tabs__list-item-link"),this.$tabItems=e&&e.querySelectorAll(".tna-tabs__item")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$tabList&&this.$tabListItemLinks&&this.$tabItems&&this.$tabListItemLinks.length===this.$tabItems.length){this.sticky=this.$module.classList.contains("tna-tabs--sticky");var e=window.location.hash.replace(/^#/,"");this.$newTabList=document.createElement("div"),this.$newTabList.setAttribute("role","tablist"),this.$newTabList.setAttribute("class",this.$tabList.getAttribute("class")),this.$tabItems.forEach((function(t,i){t.setAttribute("role","tabpanel"),t.setAttribute("aria-labelledby","".concat(t.getAttribute("id"),"-tab")),t.setAttribute("tabindex","0"),(e&&t.getAttribute("id")!==e||!e&&i>0)&&t.setAttribute("hidden",!0)})),this.$tabListItemLinks.forEach((function(e){var i=document.createElement("button");i.innerText=e.innerText,i.setAttribute("class",e.getAttribute("class")),i.setAttribute("role","tab"),i.setAttribute("id",e.getAttribute("id")),i.setAttribute("aria-controls",e.getAttribute("href").replace(/^#/,"")),i.setAttribute("tabindex","-1"),t.$newTabList.appendChild(i)})),this.$tabList.replaceWith(this.$newTabList),this.$tabListItemLinks=this.$module.querySelectorAll(".tna-tabs__list-item-link"),this.$tabListItemLinks.forEach((function(i,r){e&&i.getAttribute("aria-controls")==="".concat(e)||!e&&0===r?(i.classList.add("tna-tabs__list-item-link--selected"),i.setAttribute("aria-selected",!0),i.setAttribute("tabindex","0")):i.setAttribute("aria-selected",!1),i.addEventListener("keydown",(function(e){return t.handleItemLinkKeyDown(e)}),!0),i.addEventListener("click",(function(e){return t.handleItemLinkClick(e)}),!0)}))}}},{key:"handleItemLinkClick",value:function(t){t.preventDefault();var e=t.currentTarget.getAttribute("aria-controls");this.switchTab(e)}},{key:"handleItemLinkKeyDown",value:function(t){var e=t.currentTarget,i=!1;switch(t.key){case"ArrowLeft":this.setSelectedToPreviousTab(e),i=!0;break;case"ArrowRight":this.setSelectedToNextTab(e),i=!0;break;case"Home":this.switchTab(this.$tabListItemLinks[0].getAttribute("aria-controls")),i=!0;break;case"End":this.switchTab(this.$tabListItemLinks[this.$tabListItemLinks.length-1].getAttribute("aria-controls")),i=!0}i&&(t.stopPropagation(),t.preventDefault())}},{key:"setSelectedToNextTab",value:function(t){console.log("setSelectedToNextTab",t);var e,i=n(this.$tabListItemLinks).findIndex((function(e){return e.getAttribute("id")===t.getAttribute("id")}));e=i<this.$tabListItemLinks.length-1?i+1:0,console.log(i,e),this.switchTab(this.$tabListItemLinks[e].getAttribute("aria-controls"))}},{key:"setSelectedToPreviousTab",value:function(t){console.log("setSelectedToPreviousTab",t);var e,i=n(this.$tabListItemLinks).findIndex((function(e){return e.getAttribute("id")===t.getAttribute("id")}));e=i>=1?i-1:this.$tabListItemLinks.length-1,console.log(i,e),this.switchTab(this.$tabListItemLinks[e].getAttribute("aria-controls"))}},{key:"switchTab",value:function(t){this.$tabListItemLinks.forEach((function(e){e.getAttribute("aria-controls")===t?(e.classList.add("tna-tabs__list-item-link--selected"),e.setAttribute("aria-selected",!0),e.setAttribute("tabindex","0"),e.focus()):(e.classList.remove("tna-tabs__list-item-link--selected"),e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"))})),this.$tabItems.forEach((function(e){e.getAttribute("id")===t?(e.removeAttribute("hidden"),e.setAttribute("tabindex","0")):(e.setAttribute("hidden",!0),e.setAttribute("tabindex","-1"))})),this.sticky&&(history.replaceState?history.replaceState(null,null,"#".concat(t)):location.hash="#".concat(t))}}])&&s(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},948:(t,e,i)=>{i.d(e,{Z:()=>r});const r=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)}))}}},e={};function i(r){var n=e[r];if(void 0!==n)return n.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,i),a.exports}i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{i.r(r),i.d(r,{Breadcrumbs:()=>t.Breadcrumbs,Header:()=>e.Header,Picture:()=>n.Picture,SensitiveImage:()=>a.SensitiveImage,Tabs:()=>s.Tabs,initAll:()=>l});var t=i(908),e=i(8),n=i(765),a=i(554),s=i(973),o=document.documentElement;o.classList.add("tna-template--js-enabled"),window.addEventListener("touchstart",(function t(){window.removeEventListener("touchstart",t),o.classList.add("tna-template--touched")})),window.addEventListener("keydown",(function(t){"Tab"===t.key&&(o.classList.add("tna-template--tabbed"),o.classList.remove("tna-template--clicked"))})),window.addEventListener("mousedown",(function(){o.classList.add("tna-template--clicked"),o.classList.remove("tna-template--tabbed")})),document.documentElement.classList.contains("tna-template--system-theme")&&(document.documentElement.classList.add(window.matchMedia("(prefers-color-scheme: dark)").matches?"tna-template--dark-theme":"tna-template--light-theme"),window.matchMedia("(prefers-contrast: more)").matches&&document.documentElement.classList.add("tna-template--high-contrast-theme"));var l=function(i){var r=(i=void 0!==i?i:{}).scope instanceof HTMLElement?i.scope:document,o=r.querySelector('[data-module="tna-breadcrumbs"]');o&&new t.Breadcrumbs(o).init();var l=r.querySelector('[data-module="tna-header"]');l&&new e.Header(l).init(),r.querySelectorAll('[data-module="tna-picture"]').forEach((function(t){new n.Picture(t).init()})),r.querySelectorAll('[data-module="tna-sensitive-image"]').forEach((function(t){new a.SensitiveImage(t).init()})),r.querySelectorAll('[data-module="tna-tabs"]').forEach((function(t){new s.Tabs(t).init()}))}})(),r})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={908:(t,e,i)=>{i.d(e,{Breadcrumbs:()=>s});var n=i(948);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,a=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(a)?a:String(a)),n)}var a}var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$breadcrumbsListWrapper=e&&e.querySelector(".tna-breadcrumbs__wrapper"),this.$breadcrumbsList=e&&this.$breadcrumbsListWrapper&&e.querySelector(".tna-breadcrumbs__list"),this.$breadcrumbs=e&&this.$breadcrumbsListWrapper&&this.$breadcrumbsList&&e.querySelectorAll(".tna-breadcrumbs__item")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$breadcrumbsListWrapper&&this.$breadcrumbsList&&this.$breadcrumbs&&this.$breadcrumbs.length>2&&!this.$module.classList.contains("tna-breadcrumbs--no-collapse")){var e="tna-breadcrumbs-".concat((0,n.Z)()),i=document.createElement("li");i.classList.add("tna-breadcrumbs__item","tna-breadcrumbs__item--expandable"),i.style.display="none";var r=document.createElement("button");r.classList.add("tna-breadcrumbs__link"),r.innerHTML="<span class='tna-visually-hidden'>Expand breadcrumbs</span>&hellip;",r.setAttribute("aria-expanded","false"),r.setAttribute("aria-controls",e),r.addEventListener("click",(function(){t.$module.classList.remove("tna-breadcrumbs--collapsed"),i.remove(),t.$breadcrumbsListWrapper.setAttribute("tabindex","0"),t.$breadcrumbsListWrapper.focus(),t.$breadcrumbsListWrapper.setAttribute("tabindex","-1")})),i.appendChild(r),this.$breadcrumbsList.setAttribute("id",e),this.$breadcrumbsList.insertBefore(i,this.$breadcrumbs[this.$breadcrumbs.length-2].nextSibling),this.$module.classList.add("tna-breadcrumbs--collapsed")}}}])&&a(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},8:(t,e,i)=>{i.d(e,{Header:()=>s});var n=i(948);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,a=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(a)?a:String(a)),n)}var a}var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$toggleButtonWrapper=e&&e.querySelector(".tna-header__navigation-toggle"),this.$navigation=e&&e.querySelector(".tna-header__navigation"),this.$links=e&&this.$navigation&&this.$navigation.querySelectorAll("[tabindex='0']"),this.menuOpened=!1,this.mql=window.matchMedia("(max-width: 768px)")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$toggleButtonWrapper&&this.$navigation){var e="tna-menu-content-".concat((0,n.Z)());this.$navigation.setAttribute("id",e),this.$toggleButton=document.createElement("button"),this.$toggleButton.innerText="Menu",this.$toggleButton.setAttribute("aria-controls",e),this.$toggleButton.setAttribute("aria-haspopup","true"),this.$toggleButton.classList.add("tna-header__navigation-toggle-button"),this.$hamburger=document.createElement("div"),this.$hamburger.classList.add("tna-header__hamburger"),this.$toggleButton.appendChild(this.$hamburger),this.$toggleButtonWrapper.appendChild(this.$toggleButton),this.syncState(),this.$toggleButton.addEventListener("click",(function(){return t.handleToggleNavigation()})),"addEventListener"in this.mql?this.mql.addEventListener("change",(function(){return t.syncState()})):this.mql.addListener((function(){return t.syncState()}))}}},{key:"handleToggleNavigation",value:function(){this.menuOpened=!this.menuOpened,this.syncState()}},{key:"syncState",value:function(){if(this.mql.matches)if(this.menuOpened){this.$navigation.classList.add("tna-header__navigation--open"),this.$navigation.hidden=!1,this.$navigation.setAttribute("aria-hidden","false"),this.$toggleButton.setAttribute("aria-expanded","true"),this.$toggleButton.setAttribute("title","Close menu"),this.$toggleButton.classList.add("tna-header__navigation-toggle-button--opened");for(var t=0;t<this.$links.length;t++)this.$links[t].setAttribute("tabindex","0")}else{this.$navigation.classList.remove("tna-header__navigation--open"),this.$navigation.hidden=!0,this.$navigation.setAttribute("aria-hidden","true"),this.$toggleButton.setAttribute("aria-expanded","false"),this.$toggleButton.setAttribute("title","Open menu"),this.$toggleButton.classList.remove("tna-header__navigation-toggle-button--opened");for(var e=0;e<this.$links.length;e++)this.$links[e].setAttribute("tabindex","-1")}else{this.$navigation.classList.add("tna-header__navigation--open"),this.$navigation.hidden=!1,this.$navigation.setAttribute("aria-hidden","false"),this.$toggleButton.setAttribute("aria-expanded","true"),this.$toggleButton.setAttribute("title","Close menu");for(var i=0;i<this.$links.length;i++)this.$links[i].setAttribute("tabindex","0")}}}])&&a(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},765:(t,e,i)=>{i.d(e,{Picture:()=>s});var n=i(948);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,a=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(a)?a:String(a)),n)}var a}var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$imageWrapper=e&&e.querySelector(".tna-picture__image-wrapper"),this.$transcript=e&&e.querySelector(".tna-picture__transcript"),this.transcriptOpened=!1}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$imageWrapper&&this.$transcript){var e="tna-picture-".concat((0,n.Z)());this.$transcriptToggle=document.createElement("button"),this.$transcriptToggle.classList.add("tna-picture__toggle-transcript","tna-button","tna-button--accent","tna-button--solid-hover"),this.$transcriptToggle.setAttribute("aria-controls",e),this.$transcriptToggle.setAttribute("aria-expanded",!1),this.$transcriptToggle.innerText="Open transcript",this.$transcriptToggle.addEventListener("click",(function(){return t.handleToggleTranscript()})),this.$imageWrapper.appendChild(this.$transcriptToggle),this.$transcript.setAttribute("id",e),this.$transcript.setAttribute("hidden",!0)}}},{key:"handleToggleTranscript",value:function(){var t="tna-picture__toggle-transcript--opened";this.transcriptOpened=!this.transcriptOpened,this.transcriptOpened?(this.$transcriptToggle.classList.add(t),this.$transcriptToggle.setAttribute("aria-expanded",!0),this.$transcriptToggle.innerText="Close transcript",this.$transcript.removeAttribute("hidden")):(this.$transcriptToggle.classList.remove(t),this.$transcriptToggle.setAttribute("aria-expanded",!1),this.$transcriptToggle.innerText="Open transcript",this.$transcript.setAttribute("hidden",!0))}}])&&a(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},554:(t,e,i)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,a=function(t,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===n(a)?a:String(a)),r)}var a}i.d(e,{SensitiveImage:()=>a});var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$imageDetails=e&&e.querySelector(".tna-sensitive-image__details"),this.$image=e&&e.querySelector(".tna-sensitive-image__image"),this.imageIsVisible=!1}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;this.$module&&this.$imageDetails&&this.$image&&this.$imageDetails.addEventListener("toggle",(function(){return t.handleImageDetailsToggle()}))}},{key:"handleImageDetailsToggle",value:function(){this.$imageDetails.hasAttribute("open")&&this.$image.focus({preventScroll:!0,focusVisible:!0})}}])&&r(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},973:(t,e,i)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function s(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,a=function(t,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===n(a)?a:String(a)),r)}var a}i.d(e,{Tabs:()=>o});var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$tabList=e&&e.querySelector(".tna-tabs__list"),this.$tabListItemLinks=e&&this.$tabList&&e.querySelectorAll(".tna-tabs__list-item-link"),this.$tabItems=e&&e.querySelectorAll(".tna-tabs__item")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$tabList&&this.$tabListItemLinks&&this.$tabItems&&this.$tabListItemLinks.length===this.$tabItems.length){this.sticky=this.$module.classList.contains("tna-tabs--sticky");var e=window.location.hash.replace(/^#/,"");this.$newTabList=document.createElement("div"),this.$newTabList.setAttribute("role","tablist"),this.$newTabList.setAttribute("class",this.$tabList.getAttribute("class")),this.$tabItems.forEach((function(t,i){t.setAttribute("role","tabpanel"),t.setAttribute("aria-labelledby","".concat(t.getAttribute("id"),"-tab")),t.setAttribute("tabindex","0"),(e&&t.getAttribute("id")!==e||!e&&i>0)&&t.setAttribute("hidden",!0)})),this.$tabListItemLinks.forEach((function(e){var i=document.createElement("button");i.innerText=e.innerText,i.setAttribute("class",e.getAttribute("class")),i.setAttribute("role","tab"),i.setAttribute("id",e.getAttribute("id")),i.setAttribute("aria-controls",e.getAttribute("href").replace(/^#/,"")),i.setAttribute("tabindex","-1"),t.$newTabList.appendChild(i)})),this.$tabList.replaceWith(this.$newTabList),this.$tabListItemLinks=this.$module.querySelectorAll(".tna-tabs__list-item-link"),this.$tabListItemLinks.forEach((function(i,n){e&&i.getAttribute("aria-controls")==="".concat(e)||!e&&0===n?(i.classList.add("tna-tabs__list-item-link--selected"),i.setAttribute("aria-selected",!0),i.setAttribute("tabindex","0")):i.setAttribute("aria-selected",!1),i.addEventListener("keydown",(function(e){return t.handleItemLinkKeyDown(e)}),!0),i.addEventListener("click",(function(e){return t.handleItemLinkClick(e)}),!0)}))}}},{key:"handleItemLinkClick",value:function(t){t.preventDefault();var e=t.currentTarget.getAttribute("aria-controls");this.switchTab(e)}},{key:"handleItemLinkKeyDown",value:function(t){var e=t.currentTarget,i=!1;switch(t.key){case"ArrowLeft":this.setSelectedToPreviousTab(e),i=!0;break;case"ArrowRight":this.setSelectedToNextTab(e),i=!0;break;case"Home":this.switchTab(this.$tabListItemLinks[0].getAttribute("aria-controls")),i=!0;break;case"End":this.switchTab(this.$tabListItemLinks[this.$tabListItemLinks.length-1].getAttribute("aria-controls")),i=!0}i&&(t.stopPropagation(),t.preventDefault())}},{key:"setSelectedToNextTab",value:function(t){console.log("setSelectedToNextTab",t);var e,i=r(this.$tabListItemLinks).findIndex((function(e){return e.getAttribute("id")===t.getAttribute("id")}));e=i<this.$tabListItemLinks.length-1?i+1:0,console.log(i,e),this.switchTab(this.$tabListItemLinks[e].getAttribute("aria-controls"))}},{key:"setSelectedToPreviousTab",value:function(t){console.log("setSelectedToPreviousTab",t);var e,i=r(this.$tabListItemLinks).findIndex((function(e){return e.getAttribute("id")===t.getAttribute("id")}));e=i>=1?i-1:this.$tabListItemLinks.length-1,console.log(i,e),this.switchTab(this.$tabListItemLinks[e].getAttribute("aria-controls"))}},{key:"switchTab",value:function(t){this.$tabListItemLinks.forEach((function(e){e.getAttribute("aria-controls")===t?(e.classList.add("tna-tabs__list-item-link--selected"),e.setAttribute("aria-selected",!0),e.setAttribute("tabindex","0"),e.focus()):(e.classList.remove("tna-tabs__list-item-link--selected"),e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"))})),this.$tabItems.forEach((function(e){e.getAttribute("id")===t?(e.removeAttribute("hidden"),e.setAttribute("tabindex","0")):(e.setAttribute("hidden",!0),e.setAttribute("tabindex","-1"))})),this.sticky&&(history.replaceState?history.replaceState(null,null,"#".concat(t)):location.hash="#".concat(t))}}])&&s(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},948:(t,e,i)=>{i.d(e,{Z:()=>n});const n=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)}))}}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,i),a.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{i.r(n),i.d(n,{Breadcrumbs:()=>t.Breadcrumbs,Header:()=>e.Header,Picture:()=>r.Picture,SensitiveImage:()=>a.SensitiveImage,Tabs:()=>s.Tabs,initAll:()=>l});var t=i(908),e=i(8),r=i(765),a=i(554),s=i(973),o=document.documentElement;o.classList.add("tna-template--js-enabled"),window.addEventListener("touchstart",(function t(){window.removeEventListener("touchstart",t),o.classList.add("tna-template--touched")})),window.addEventListener("keydown",(function(t){"Tab"===t.key&&(o.classList.add("tna-template--tabbed"),o.classList.remove("tna-template--clicked"))})),window.addEventListener("mousedown",(function(){o.classList.add("tna-template--clicked"),o.classList.remove("tna-template--tabbed")})),document.documentElement.classList.contains("tna-template--system-theme")&&(document.documentElement.classList.add(window.matchMedia("(prefers-color-scheme: dark)").matches?"tna-template--dark-theme":"tna-template--light-theme"),window.matchMedia("(prefers-contrast: more)").matches&&document.documentElement.classList.add("tna-template--high-contrast-theme"));var l=function(i){var n=(i=void 0!==i?i:{}).scope instanceof HTMLElement?i.scope:document,o=n.querySelector('[data-module="tna-breadcrumbs"]');o&&new t.Breadcrumbs(o).init();var l=n.querySelector('[data-module="tna-header"]');l&&new e.Header(l).init(),n.querySelectorAll('[data-module="tna-picture"]').forEach((function(t){new r.Picture(t).init()})),n.querySelectorAll('[data-module="tna-sensitive-image"]').forEach((function(t){new a.SensitiveImage(t).init()})),n.querySelectorAll('[data-module="tna-tabs"]').forEach((function(t){new s.Tabs(t).init()}))}})(),n})()));
2
2
  //# sourceMappingURL=all.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"all.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,mvBCPF,IAAMC,EAAW,WACtB,SAAAA,EAAYC,I,4FAASC,CAAA,KAAAF,GACnBG,KAAKF,QAAUA,EACfE,KAAKC,wBACHH,GAAWA,EAAQI,cAAc,6BACnCF,KAAKG,iBACHL,GACAE,KAAKC,yBACLH,EAAQI,cAAc,0BACxBF,KAAKI,aACHN,GACAE,KAAKC,yBACLD,KAAKG,kBACLL,EAAQO,iBAAiB,yBAC7B,C,QA6CC,O,EA7CAR,G,EAAA,EAAAS,IAAA,OAAAC,MAED,WAAO,IAAAC,EAAA,KACL,GACGR,KAAKF,SACLE,KAAKC,yBACLD,KAAKG,kBACLH,KAAKI,cAKJJ,KAAKI,aAAaK,OAAS,EAAG,CAChC,IAAMC,EAAW,mBAAHC,QAAsBC,EAAAA,EAAAA,MAE9BC,EAAcC,SAASC,cAAc,MAC3CF,EAAYG,UAAUC,IACpB,wBACA,qCAG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AgB/G,UAAUiD,SAAS,gCAC9CnD,SAASiH,gBAAgB/G,UAAUC,IACjCgB,OAAOC,WAAW,gCAAgCO,QAC9C,2BACA,6BAEFR,OAAOC,WAAW,4BAA4BO,SAChD3B,SAASiH,gBAAgB/G,UAAUC,IAAI,sCAI3C,IAAMiH,EAAU,SAACC,GAEf,IAAMC,GADND,OAA6B,IAAZA,EAA0BA,EAAU,CAAC,GAE5CE,iBAAiBC,YAAcH,EAAQE,MAAQvH,SAEnDV,EAAegI,EAAOlI,cAAc,mCACtCE,GACF,IAAIP,EAAAA,YAAYO,GAAcmI,OAGhC,IAAMC,EAAUJ,EAAOlI,cAAc,8BACjCsI,GACF,IAAI7G,EAAAA,OAAO6G,GAASD,OAGJH,EAAO/H,iBAAiB,+BAChCmE,SAAQ,SAACiE,GACjB,IAAI7F,EAAAA,QAAQ6F,GAAUF,MACxB,IAEyBH,EAAO/H,iBAC9B,uCAEemE,SAAQ,SAACkE,GACxB,IAAItF,EAAAA,eAAesF,GAAiBH,MACtC,IAEcH,EAAO/H,iBAAiB,4BAChCmE,SAAQ,SAACmE,GACb,IAAI/E,EAAAA,KAAK+E,GAAYJ,MACvB,GACF,C","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/components/breadcrumbs/breadcrumbs.mjs","webpack://TNAFrontend/./src/nationalarchives/components/header/header.mjs","webpack://TNAFrontend/./src/nationalarchives/components/picture/picture.mjs","webpack://TNAFrontend/./src/nationalarchives/components/sensitive-image/sensitive-image.mjs","webpack://TNAFrontend/./src/nationalarchives/components/tabs/tabs.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/uuid.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/all.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Breadcrumbs {\n constructor($module) {\n this.$module = $module;\n this.$breadcrumbsListWrapper =\n $module && $module.querySelector(\".tna-breadcrumbs__wrapper\");\n this.$breadcrumbsList =\n $module &&\n this.$breadcrumbsListWrapper &&\n $module.querySelector(\".tna-breadcrumbs__list\");\n this.$breadcrumbs =\n $module &&\n this.$breadcrumbsListWrapper &&\n this.$breadcrumbsList &&\n $module.querySelectorAll(\".tna-breadcrumbs__item\");\n }\n\n init() {\n if (\n !this.$module ||\n !this.$breadcrumbsListWrapper ||\n !this.$breadcrumbsList ||\n !this.$breadcrumbs\n ) {\n return;\n }\n\n if (this.$breadcrumbs.length > 2) {\n const uniqueId = `tna-breadcrumbs-${uuidv4()}`;\n\n const $expandable = document.createElement(\"li\");\n $expandable.classList.add(\n \"tna-breadcrumbs__item\",\n \"tna-breadcrumbs__item--expandable\",\n );\n\n const $expandButton = document.createElement(\"button\");\n $expandButton.classList.add(\"tna-breadcrumbs__link\");\n $expandButton.innerHTML =\n \"<span class='tna-visually-hidden'>Expand breadcrumbs</span>&hellip;\";\n $expandButton.setAttribute(\"aria-expanded\", \"false\");\n $expandButton.setAttribute(\"aria-controls\", uniqueId);\n $expandButton.addEventListener(\"click\", () => {\n this.$breadcrumbsList.classList.remove(\n \"tna-breadcrumbs__list--collapse-on-mobile\",\n );\n $expandable.remove();\n this.$breadcrumbsListWrapper.setAttribute(\"tabindex\", \"0\");\n this.$breadcrumbsListWrapper.focus();\n this.$breadcrumbsListWrapper.setAttribute(\"tabindex\", \"-1\");\n });\n\n $expandable.appendChild($expandButton);\n\n this.$breadcrumbsList.setAttribute(\"id\", uniqueId);\n this.$breadcrumbsList.insertBefore(\n $expandable,\n this.$breadcrumbs[this.$breadcrumbs.length - 2].nextSibling,\n );\n }\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Header {\n constructor($module) {\n this.$module = $module;\n this.$toggleButtonWrapper =\n $module && $module.querySelector(\".tna-header__navigation-toggle\");\n this.$navigation =\n $module && $module.querySelector(\".tna-header__navigation\");\n this.$links =\n $module &&\n this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\");\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 768px)\");\n }\n\n init() {\n if (!this.$module || !this.$toggleButtonWrapper || !this.$navigation) {\n return;\n }\n\n const uniqueId = `tna-menu-content-${uuidv4()}`;\n this.$navigation.setAttribute(\"id\", uniqueId);\n\n this.$toggleButton = document.createElement(\"button\");\n this.$toggleButton.innerText = \"Menu\";\n this.$toggleButton.setAttribute(\"aria-controls\", uniqueId);\n this.$toggleButton.setAttribute(\"aria-haspopup\", \"true\");\n this.$toggleButton.classList.add(\"tna-header__navigation-toggle-button\");\n\n this.$hamburger = document.createElement(\"div\");\n this.$hamburger.classList.add(\"tna-header__hamburger\");\n\n this.$toggleButton.appendChild(this.$hamburger);\n this.$toggleButtonWrapper.appendChild(this.$toggleButton);\n\n this.syncState();\n\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\n \"tna-header__navigation-toggle-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n } else {\n this.$navigation.classList.remove(\"tna-header__navigation--open\");\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-header__navigation-toggle-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"-1\");\n }\n }\n } else {\n this.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n }\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Picture {\n constructor($module) {\n this.$module = $module;\n this.$imageWrapper =\n $module && $module.querySelector(\".tna-picture__image-wrapper\");\n this.$transcript =\n $module && $module.querySelector(\".tna-picture__transcript\");\n this.transcriptOpened = false;\n }\n\n init() {\n if (!this.$module || !this.$imageWrapper || !this.$transcript) {\n return;\n }\n\n const uniqueId = `tna-picture-${uuidv4()}`;\n\n this.$transcriptToggle = document.createElement(\"button\");\n this.$transcriptToggle.classList.add(\n \"tna-picture__toggle-transcript\",\n \"tna-button\",\n );\n this.$transcriptToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = \"Open transcript\";\n this.$transcriptToggle.addEventListener(\"click\", () =>\n this.handleToggleTranscript(),\n );\n this.$imageWrapper.appendChild(this.$transcriptToggle);\n\n this.$transcript.setAttribute(\"id\", uniqueId);\n this.$transcript.setAttribute(\"hidden\", true);\n // this.$transcript.setAttribute(\"tabindex\", \"-1\");\n }\n\n handleToggleTranscript() {\n const transcriptToggleOpenedClass =\n \"tna-picture__toggle-transcript--opened\";\n this.transcriptOpened = !this.transcriptOpened;\n if (this.transcriptOpened) {\n this.$transcriptToggle.classList.add(transcriptToggleOpenedClass);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", true);\n this.$transcriptToggle.innerText = \"Close transcript\";\n this.$transcript.removeAttribute(\"hidden\");\n // this.$transcript.setAttribute(\"tabindex\", \"0\");\n // this.$transcript.focus();\n } else {\n this.$transcriptToggle.classList.remove(transcriptToggleOpenedClass);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = \"Open transcript\";\n this.$transcript.setAttribute(\"hidden\", true);\n // this.$transcript.setAttribute(\"tabindex\", \"-1\");\n }\n }\n}\n","export class SensitiveImage {\n constructor($module) {\n this.$module = $module;\n this.$imageDetails =\n $module && $module.querySelector(\".tna-sensitive-image__details\");\n this.$image =\n $module && $module.querySelector(\".tna-sensitive-image__image\");\n this.imageIsVisible = false;\n }\n\n init() {\n if (!this.$module || !this.$imageDetails || !this.$image) {\n return;\n }\n this.$imageDetails.addEventListener(\"toggle\", () =>\n this.handleImageDetailsToggle(),\n );\n }\n\n handleImageDetailsToggle() {\n if (this.$imageDetails.hasAttribute(\"open\")) {\n this.$image.focus({ preventScroll: true, focusVisible: true });\n }\n }\n}\n","export class Tabs {\n constructor($module) {\n this.$module = $module;\n this.$tabList = $module && $module.querySelector(\".tna-tabs__list\");\n this.$tabListItemLinks =\n $module &&\n this.$tabList &&\n $module.querySelectorAll(\".tna-tabs__list-item-link\");\n this.$tabItems = $module && $module.querySelectorAll(\".tna-tabs__item\");\n }\n\n init() {\n if (\n !this.$module ||\n !this.$tabList ||\n !this.$tabListItemLinks ||\n !this.$tabItems ||\n this.$tabListItemLinks.length !== this.$tabItems.length\n ) {\n return;\n }\n\n this.sticky = this.$module.classList.contains(\"tna-tabs--sticky\");\n\n const startingTarget = window.location.hash.replace(/^#/, \"\");\n\n this.$newTabList = document.createElement(\"div\");\n this.$newTabList.setAttribute(\"role\", \"tablist\");\n this.$newTabList.setAttribute(\"class\", this.$tabList.getAttribute(\"class\"));\n\n this.$tabItems.forEach(($tabItem, index) => {\n $tabItem.setAttribute(\"role\", \"tabpanel\");\n $tabItem.setAttribute(\n \"aria-labelledby\",\n `${$tabItem.getAttribute(\"id\")}-tab`,\n );\n $tabItem.setAttribute(\"tabindex\", \"0\");\n if (\n (startingTarget && $tabItem.getAttribute(\"id\") !== startingTarget) ||\n (!startingTarget && index > 0)\n ) {\n $tabItem.setAttribute(\"hidden\", true);\n }\n });\n\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n const $replacementButton = document.createElement(\"button\");\n $replacementButton.innerText = $tabListItemLink.innerText;\n $replacementButton.setAttribute(\n \"class\",\n $tabListItemLink.getAttribute(\"class\"),\n );\n $replacementButton.setAttribute(\"role\", \"tab\");\n $replacementButton.setAttribute(\n \"id\",\n $tabListItemLink.getAttribute(\"id\"),\n );\n $replacementButton.setAttribute(\n \"aria-controls\",\n $tabListItemLink.getAttribute(\"href\").replace(/^#/, \"\"),\n );\n $replacementButton.setAttribute(\"tabindex\", \"-1\");\n this.$newTabList.appendChild($replacementButton);\n });\n\n this.$tabList.replaceWith(this.$newTabList);\n\n this.$tabListItemLinks = this.$module.querySelectorAll(\n \".tna-tabs__list-item-link\",\n );\n\n this.$tabListItemLinks.forEach(($tabListItemLink, index) => {\n if (\n (startingTarget &&\n $tabListItemLink.getAttribute(\"aria-controls\") ===\n `${startingTarget}`) ||\n (!startingTarget && index === 0)\n ) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n }\n\n $tabListItemLink.addEventListener(\n \"keydown\",\n (e) => this.handleItemLinkKeyDown(e),\n true,\n );\n $tabListItemLink.addEventListener(\n \"click\",\n (e) => this.handleItemLinkClick(e),\n true,\n );\n });\n }\n\n handleItemLinkClick(itemLinkClickEvent) {\n itemLinkClickEvent.preventDefault();\n const targetItem =\n itemLinkClickEvent.currentTarget.getAttribute(\"aria-controls\");\n\n this.switchTab(targetItem);\n }\n\n handleItemLinkKeyDown(itemLinkKeyDownEvent) {\n const targetItem = itemLinkKeyDownEvent.currentTarget;\n let overwriteKeyAction = false;\n\n switch (itemLinkKeyDownEvent.key) {\n case \"ArrowLeft\":\n this.setSelectedToPreviousTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"ArrowRight\":\n this.setSelectedToNextTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"Home\":\n this.switchTab(this.$tabListItemLinks[0].getAttribute(\"aria-controls\"));\n overwriteKeyAction = true;\n break;\n\n case \"End\":\n this.switchTab(\n this.$tabListItemLinks[\n this.$tabListItemLinks.length - 1\n ].getAttribute(\"aria-controls\"),\n );\n overwriteKeyAction = true;\n break;\n\n default:\n break;\n }\n\n if (overwriteKeyAction) {\n itemLinkKeyDownEvent.stopPropagation();\n itemLinkKeyDownEvent.preventDefault();\n }\n }\n\n setSelectedToNextTab(targetItem) {\n console.log(\"setSelectedToNextTab\", targetItem);\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex < this.$tabListItemLinks.length - 1) {\n newIndex = currentIndex + 1;\n } else {\n newIndex = 0;\n }\n console.log(currentIndex, newIndex);\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n setSelectedToPreviousTab(targetItem) {\n console.log(\"setSelectedToPreviousTab\", targetItem);\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex >= 1) {\n newIndex = currentIndex - 1;\n } else {\n newIndex = this.$tabListItemLinks.length - 1;\n }\n console.log(currentIndex, newIndex);\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n switchTab(targetId) {\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n if ($tabListItemLink.getAttribute(\"aria-controls\") === targetId) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n $tabListItemLink.focus();\n } else {\n $tabListItemLink.classList.remove(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n $tabListItemLink.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n this.$tabItems.forEach(($tabItem) => {\n if ($tabItem.getAttribute(\"id\") === targetId) {\n $tabItem.removeAttribute(\"hidden\");\n $tabItem.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabItem.setAttribute(\"hidden\", true);\n $tabItem.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n if (this.sticky) {\n if (history.replaceState) {\n history.replaceState(null, null, `#${targetId}`);\n } else {\n location.hash = `#${targetId}`;\n }\n }\n }\n}\n","const uuidv4 = () =>\n ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16),\n );\n\nexport default uuidv4;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Breadcrumbs } from \"./components/breadcrumbs/breadcrumbs.mjs\";\nimport { Header } from \"./components/header/header.mjs\";\nimport { Picture } from \"./components/picture/picture.mjs\";\nimport { SensitiveImage } from \"./components/sensitive-image/sensitive-image.mjs\";\nimport { Tabs } from \"./components/tabs/tabs.mjs\";\n\nconst $body = document.documentElement;\n\n$body.classList.add(\"tna-template--js-enabled\");\n\nconst onFirstTouch = () => {\n window.removeEventListener(\"touchstart\", onFirstTouch);\n $body.classList.add(\"tna-template--touched\");\n};\n\nconst onKeyDown = (e) => {\n if (e.key === \"Tab\") {\n $body.classList.add(\"tna-template--tabbed\");\n $body.classList.remove(\"tna-template--clicked\");\n }\n};\n\nconst onMouseDown = () => {\n $body.classList.add(\"tna-template--clicked\");\n $body.classList.remove(\"tna-template--tabbed\");\n};\n\nwindow.addEventListener(\"touchstart\", onFirstTouch);\nwindow.addEventListener(\"keydown\", onKeyDown);\nwindow.addEventListener(\"mousedown\", onMouseDown);\n\nif (document.documentElement.classList.contains(\"tna-template--system-theme\")) {\n document.documentElement.classList.add(\n window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"tna-template--dark-theme\"\n : \"tna-template--light-theme\",\n );\n if (window.matchMedia(\"(prefers-contrast: more)\").matches) {\n document.documentElement.classList.add(\"tna-template--high-contrast-theme\");\n }\n}\n\nconst initAll = (options) => {\n options = typeof options !== \"undefined\" ? options : {};\n const $scope =\n options.scope instanceof HTMLElement ? options.scope : document;\n\n const $breadcrumbs = $scope.querySelector('[data-module=\"tna-breadcrumbs\"]');\n if ($breadcrumbs) {\n new Breadcrumbs($breadcrumbs).init();\n }\n\n const $header = $scope.querySelector('[data-module=\"tna-header\"]');\n if ($header) {\n new Header($header).init();\n }\n\n const $pictures = $scope.querySelectorAll('[data-module=\"tna-picture\"]');\n $pictures.forEach(($picture) => {\n new Picture($picture).init();\n });\n\n const $sensitiveImages = $scope.querySelectorAll(\n '[data-module=\"tna-sensitive-image\"]',\n );\n $sensitiveImages.forEach(($sensitiveImage) => {\n new SensitiveImage($sensitiveImage).init();\n });\n\n const $tabs = $scope.querySelectorAll('[data-module=\"tna-tabs\"]');\n $tabs.forEach(($tabModule) => {\n new Tabs($tabModule).init();\n });\n};\n\nexport { initAll, Breadcrumbs, Header, Picture, SensitiveImage, Tabs };\n"],"names":["root","factory","exports","module","define","amd","self","Breadcrumbs","$module","_classCallCheck","this","$breadcrumbsListWrapper","querySelector","$breadcrumbsList","$breadcrumbs","querySelectorAll","key","value","_this","length","uniqueId","concat","uuidv4","$expandable","document","createElement","classList","add","$expandButton","innerHTML","setAttribute","addEventListener","remove","focus","appendChild","insertBefore","nextSibling","Header","$toggleButtonWrapper","$navigation","$links","menuOpened","mql","window","matchMedia","$toggleButton","innerText","$hamburger","syncState","handleToggleNavigation","addListener","matches","hidden","i","Picture","$imageWrapper","$transcript","transcriptOpened","$transcriptToggle","handleToggleTranscript","transcriptToggleOpenedClass","removeAttribute","SensitiveImage","$imageDetails","$image","imageIsVisible","handleImageDetailsToggle","hasAttribute","preventScroll","focusVisible","Tabs","$tabList","$tabListItemLinks","$tabItems","sticky","contains","startingTarget","location","hash","replace","$newTabList","getAttribute","forEach","$tabItem","index","$tabListItemLink","$replacementButton","replaceWith","e","handleItemLinkKeyDown","handleItemLinkClick","itemLinkClickEvent","preventDefault","targetItem","currentTarget","switchTab","itemLinkKeyDownEvent","overwriteKeyAction","setSelectedToPreviousTab","setSelectedToNextTab","stopPropagation","console","log","newIndex","currentIndex","_toConsumableArray","findIndex","targetId","history","replaceState","c","crypto","getRandomValues","Uint8Array","toString","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","$body","documentElement","onFirstTouch","removeEventListener","initAll","options","$scope","scope","HTMLElement","init","$header","$picture","$sensitiveImage","$tabModule"],"sourceRoot":""}
1
+ {"version":3,"file":"all.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,mvBCPF,IAAMC,EAAW,WACtB,SAAAA,EAAYC,I,4FAASC,CAAA,KAAAF,GACnBG,KAAKF,QAAUA,EACfE,KAAKC,wBACHH,GAAWA,EAAQI,cAAc,6BACnCF,KAAKG,iBACHL,GACAE,KAAKC,yBACLH,EAAQI,cAAc,0BACxBF,KAAKI,aACHN,GACAE,KAAKC,yBACLD,KAAKG,kBACLL,EAAQO,iBAAiB,yBAC7B,C,QAiDC,O,EAjDAR,G,EAAA,EAAAS,IAAA,OAAAC,MAED,WAAO,IAAAC,EAAA,KACL,GACGR,KAAKF,SACLE,KAAKC,yBACLD,KAAKG,kBACLH,KAAKI,cAMNJ,KAAKI,aAAaK,OAAS,IAC1BT,KAAKF,QAAQY,UAAUC,SAAS,gCACjC,CACA,IAAMC,EAAW,mBAAHC,QAAsBC,EAAAA,EAAAA,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MtH,UAAUQ,IAAI,wBACpB8G,EAAMtH,UAAUe,OAAO,yBAE3B,IASAW,OAAOZ,iBAAiB,aAPJ,WAClBwG,EAAMtH,UAAUQ,IAAI,yBACpB8G,EAAMtH,UAAUe,OAAO,uBACzB,IAMIT,SAASiH,gBAAgBvH,UAAUC,SAAS,gCAC9CK,SAASiH,gBAAgBvH,UAAUQ,IACjCkB,OAAOC,WAAW,gCAAgCO,QAC9C,2BACA,6BAEFR,OAAOC,WAAW,4BAA4BO,SAChD5B,SAASiH,gBAAgBvH,UAAUQ,IAAI,sCAI3C,IAAMkH,EAAU,SAACC,GAEf,IAAMC,GADND,OAA6B,IAAZA,EAA0BA,EAAU,CAAC,GAE5CE,iBAAiBC,YAAcH,EAAQE,MAAQvH,SAEnDZ,EAAekI,EAAOpI,cAAc,mCACtCE,GACF,IAAIP,EAAAA,YAAYO,GAAcqI,OAGhC,IAAMC,EAAUJ,EAAOpI,cAAc,8BACjCwI,GACF,IAAI5G,EAAAA,OAAO4G,GAASD,OAGJH,EAAOjI,iBAAiB,+BAChCqE,SAAQ,SAACiE,GACjB,IAAI5F,EAAAA,QAAQ4F,GAAUF,MACxB,IAEyBH,EAAOjI,iBAC9B,uCAEeqE,SAAQ,SAACkE,GACxB,IAAIrF,EAAAA,eAAeqF,GAAiBH,MACtC,IAEcH,EAAOjI,iBAAiB,4BAChCqE,SAAQ,SAACmE,GACb,IAAI9E,EAAAA,KAAK8E,GAAYJ,MACvB,GACF,C","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/components/breadcrumbs/breadcrumbs.mjs","webpack://TNAFrontend/./src/nationalarchives/components/header/header.mjs","webpack://TNAFrontend/./src/nationalarchives/components/picture/picture.mjs","webpack://TNAFrontend/./src/nationalarchives/components/sensitive-image/sensitive-image.mjs","webpack://TNAFrontend/./src/nationalarchives/components/tabs/tabs.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/uuid.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/all.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Breadcrumbs {\n constructor($module) {\n this.$module = $module;\n this.$breadcrumbsListWrapper =\n $module && $module.querySelector(\".tna-breadcrumbs__wrapper\");\n this.$breadcrumbsList =\n $module &&\n this.$breadcrumbsListWrapper &&\n $module.querySelector(\".tna-breadcrumbs__list\");\n this.$breadcrumbs =\n $module &&\n this.$breadcrumbsListWrapper &&\n this.$breadcrumbsList &&\n $module.querySelectorAll(\".tna-breadcrumbs__item\");\n }\n\n init() {\n if (\n !this.$module ||\n !this.$breadcrumbsListWrapper ||\n !this.$breadcrumbsList ||\n !this.$breadcrumbs\n ) {\n return;\n }\n\n if (\n this.$breadcrumbs.length > 2 &&\n !this.$module.classList.contains(\"tna-breadcrumbs--no-collapse\")\n ) {\n const uniqueId = `tna-breadcrumbs-${uuidv4()}`;\n\n const $expandable = document.createElement(\"li\");\n $expandable.classList.add(\n \"tna-breadcrumbs__item\",\n \"tna-breadcrumbs__item--expandable\",\n );\n $expandable.style.display = \"none\";\n\n const $expandButton = document.createElement(\"button\");\n $expandButton.classList.add(\"tna-breadcrumbs__link\");\n $expandButton.innerHTML =\n \"<span class='tna-visually-hidden'>Expand breadcrumbs</span>&hellip;\";\n $expandButton.setAttribute(\"aria-expanded\", \"false\");\n $expandButton.setAttribute(\"aria-controls\", uniqueId);\n $expandButton.addEventListener(\"click\", () => {\n this.$module.classList.remove(\"tna-breadcrumbs--collapsed\");\n $expandable.remove();\n this.$breadcrumbsListWrapper.setAttribute(\"tabindex\", \"0\");\n this.$breadcrumbsListWrapper.focus();\n this.$breadcrumbsListWrapper.setAttribute(\"tabindex\", \"-1\");\n });\n\n $expandable.appendChild($expandButton);\n\n this.$breadcrumbsList.setAttribute(\"id\", uniqueId);\n this.$breadcrumbsList.insertBefore(\n $expandable,\n this.$breadcrumbs[this.$breadcrumbs.length - 2].nextSibling,\n );\n\n this.$module.classList.add(\"tna-breadcrumbs--collapsed\");\n }\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Header {\n constructor($module) {\n this.$module = $module;\n this.$toggleButtonWrapper =\n $module && $module.querySelector(\".tna-header__navigation-toggle\");\n this.$navigation =\n $module && $module.querySelector(\".tna-header__navigation\");\n this.$links =\n $module &&\n this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\");\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 768px)\");\n }\n\n init() {\n if (!this.$module || !this.$toggleButtonWrapper || !this.$navigation) {\n return;\n }\n\n const uniqueId = `tna-menu-content-${uuidv4()}`;\n this.$navigation.setAttribute(\"id\", uniqueId);\n\n this.$toggleButton = document.createElement(\"button\");\n this.$toggleButton.innerText = \"Menu\";\n this.$toggleButton.setAttribute(\"aria-controls\", uniqueId);\n this.$toggleButton.setAttribute(\"aria-haspopup\", \"true\");\n this.$toggleButton.classList.add(\"tna-header__navigation-toggle-button\");\n\n this.$hamburger = document.createElement(\"div\");\n this.$hamburger.classList.add(\"tna-header__hamburger\");\n\n this.$toggleButton.appendChild(this.$hamburger);\n this.$toggleButtonWrapper.appendChild(this.$toggleButton);\n\n this.syncState();\n\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\n \"tna-header__navigation-toggle-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n } else {\n this.$navigation.classList.remove(\"tna-header__navigation--open\");\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-header__navigation-toggle-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"-1\");\n }\n }\n } else {\n this.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n }\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Picture {\n constructor($module) {\n this.$module = $module;\n this.$imageWrapper =\n $module && $module.querySelector(\".tna-picture__image-wrapper\");\n this.$transcript =\n $module && $module.querySelector(\".tna-picture__transcript\");\n this.transcriptOpened = false;\n }\n\n init() {\n if (!this.$module || !this.$imageWrapper || !this.$transcript) {\n return;\n }\n\n const uniqueId = `tna-picture-${uuidv4()}`;\n\n this.$transcriptToggle = document.createElement(\"button\");\n this.$transcriptToggle.classList.add(\n \"tna-picture__toggle-transcript\",\n \"tna-button\",\n \"tna-button--accent\",\n \"tna-button--solid-hover\",\n );\n this.$transcriptToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = \"Open transcript\";\n this.$transcriptToggle.addEventListener(\"click\", () =>\n this.handleToggleTranscript(),\n );\n this.$imageWrapper.appendChild(this.$transcriptToggle);\n\n this.$transcript.setAttribute(\"id\", uniqueId);\n this.$transcript.setAttribute(\"hidden\", true);\n // this.$transcript.setAttribute(\"tabindex\", \"-1\");\n }\n\n handleToggleTranscript() {\n const transcriptToggleOpenedClass =\n \"tna-picture__toggle-transcript--opened\";\n this.transcriptOpened = !this.transcriptOpened;\n if (this.transcriptOpened) {\n this.$transcriptToggle.classList.add(transcriptToggleOpenedClass);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", true);\n this.$transcriptToggle.innerText = \"Close transcript\";\n this.$transcript.removeAttribute(\"hidden\");\n // this.$transcript.setAttribute(\"tabindex\", \"0\");\n // this.$transcript.focus();\n } else {\n this.$transcriptToggle.classList.remove(transcriptToggleOpenedClass);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = \"Open transcript\";\n this.$transcript.setAttribute(\"hidden\", true);\n // this.$transcript.setAttribute(\"tabindex\", \"-1\");\n }\n }\n}\n","export class SensitiveImage {\n constructor($module) {\n this.$module = $module;\n this.$imageDetails =\n $module && $module.querySelector(\".tna-sensitive-image__details\");\n this.$image =\n $module && $module.querySelector(\".tna-sensitive-image__image\");\n this.imageIsVisible = false;\n }\n\n init() {\n if (!this.$module || !this.$imageDetails || !this.$image) {\n return;\n }\n this.$imageDetails.addEventListener(\"toggle\", () =>\n this.handleImageDetailsToggle(),\n );\n }\n\n handleImageDetailsToggle() {\n if (this.$imageDetails.hasAttribute(\"open\")) {\n this.$image.focus({ preventScroll: true, focusVisible: true });\n }\n }\n}\n","export class Tabs {\n constructor($module) {\n this.$module = $module;\n this.$tabList = $module && $module.querySelector(\".tna-tabs__list\");\n this.$tabListItemLinks =\n $module &&\n this.$tabList &&\n $module.querySelectorAll(\".tna-tabs__list-item-link\");\n this.$tabItems = $module && $module.querySelectorAll(\".tna-tabs__item\");\n }\n\n init() {\n if (\n !this.$module ||\n !this.$tabList ||\n !this.$tabListItemLinks ||\n !this.$tabItems ||\n this.$tabListItemLinks.length !== this.$tabItems.length\n ) {\n return;\n }\n\n this.sticky = this.$module.classList.contains(\"tna-tabs--sticky\");\n\n const startingTarget = window.location.hash.replace(/^#/, \"\");\n\n this.$newTabList = document.createElement(\"div\");\n this.$newTabList.setAttribute(\"role\", \"tablist\");\n this.$newTabList.setAttribute(\"class\", this.$tabList.getAttribute(\"class\"));\n\n this.$tabItems.forEach(($tabItem, index) => {\n $tabItem.setAttribute(\"role\", \"tabpanel\");\n $tabItem.setAttribute(\n \"aria-labelledby\",\n `${$tabItem.getAttribute(\"id\")}-tab`,\n );\n $tabItem.setAttribute(\"tabindex\", \"0\");\n if (\n (startingTarget && $tabItem.getAttribute(\"id\") !== startingTarget) ||\n (!startingTarget && index > 0)\n ) {\n $tabItem.setAttribute(\"hidden\", true);\n }\n });\n\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n const $replacementButton = document.createElement(\"button\");\n $replacementButton.innerText = $tabListItemLink.innerText;\n $replacementButton.setAttribute(\n \"class\",\n $tabListItemLink.getAttribute(\"class\"),\n );\n $replacementButton.setAttribute(\"role\", \"tab\");\n $replacementButton.setAttribute(\n \"id\",\n $tabListItemLink.getAttribute(\"id\"),\n );\n $replacementButton.setAttribute(\n \"aria-controls\",\n $tabListItemLink.getAttribute(\"href\").replace(/^#/, \"\"),\n );\n $replacementButton.setAttribute(\"tabindex\", \"-1\");\n this.$newTabList.appendChild($replacementButton);\n });\n\n this.$tabList.replaceWith(this.$newTabList);\n\n this.$tabListItemLinks = this.$module.querySelectorAll(\n \".tna-tabs__list-item-link\",\n );\n\n this.$tabListItemLinks.forEach(($tabListItemLink, index) => {\n if (\n (startingTarget &&\n $tabListItemLink.getAttribute(\"aria-controls\") ===\n `${startingTarget}`) ||\n (!startingTarget && index === 0)\n ) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n }\n\n $tabListItemLink.addEventListener(\n \"keydown\",\n (e) => this.handleItemLinkKeyDown(e),\n true,\n );\n $tabListItemLink.addEventListener(\n \"click\",\n (e) => this.handleItemLinkClick(e),\n true,\n );\n });\n }\n\n handleItemLinkClick(itemLinkClickEvent) {\n itemLinkClickEvent.preventDefault();\n const targetItem =\n itemLinkClickEvent.currentTarget.getAttribute(\"aria-controls\");\n\n this.switchTab(targetItem);\n }\n\n handleItemLinkKeyDown(itemLinkKeyDownEvent) {\n const targetItem = itemLinkKeyDownEvent.currentTarget;\n let overwriteKeyAction = false;\n\n switch (itemLinkKeyDownEvent.key) {\n case \"ArrowLeft\":\n this.setSelectedToPreviousTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"ArrowRight\":\n this.setSelectedToNextTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"Home\":\n this.switchTab(this.$tabListItemLinks[0].getAttribute(\"aria-controls\"));\n overwriteKeyAction = true;\n break;\n\n case \"End\":\n this.switchTab(\n this.$tabListItemLinks[\n this.$tabListItemLinks.length - 1\n ].getAttribute(\"aria-controls\"),\n );\n overwriteKeyAction = true;\n break;\n\n default:\n break;\n }\n\n if (overwriteKeyAction) {\n itemLinkKeyDownEvent.stopPropagation();\n itemLinkKeyDownEvent.preventDefault();\n }\n }\n\n setSelectedToNextTab(targetItem) {\n console.log(\"setSelectedToNextTab\", targetItem);\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex < this.$tabListItemLinks.length - 1) {\n newIndex = currentIndex + 1;\n } else {\n newIndex = 0;\n }\n console.log(currentIndex, newIndex);\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n setSelectedToPreviousTab(targetItem) {\n console.log(\"setSelectedToPreviousTab\", targetItem);\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex >= 1) {\n newIndex = currentIndex - 1;\n } else {\n newIndex = this.$tabListItemLinks.length - 1;\n }\n console.log(currentIndex, newIndex);\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n switchTab(targetId) {\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n if ($tabListItemLink.getAttribute(\"aria-controls\") === targetId) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n $tabListItemLink.focus();\n } else {\n $tabListItemLink.classList.remove(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n $tabListItemLink.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n this.$tabItems.forEach(($tabItem) => {\n if ($tabItem.getAttribute(\"id\") === targetId) {\n $tabItem.removeAttribute(\"hidden\");\n $tabItem.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabItem.setAttribute(\"hidden\", true);\n $tabItem.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n if (this.sticky) {\n if (history.replaceState) {\n history.replaceState(null, null, `#${targetId}`);\n } else {\n location.hash = `#${targetId}`;\n }\n }\n }\n}\n","const uuidv4 = () =>\n ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16),\n );\n\nexport default uuidv4;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Breadcrumbs } from \"./components/breadcrumbs/breadcrumbs.mjs\";\nimport { Header } from \"./components/header/header.mjs\";\nimport { Picture } from \"./components/picture/picture.mjs\";\nimport { SensitiveImage } from \"./components/sensitive-image/sensitive-image.mjs\";\nimport { Tabs } from \"./components/tabs/tabs.mjs\";\n\nconst $body = document.documentElement;\n\n$body.classList.add(\"tna-template--js-enabled\");\n\nconst onFirstTouch = () => {\n window.removeEventListener(\"touchstart\", onFirstTouch);\n $body.classList.add(\"tna-template--touched\");\n};\n\nconst onKeyDown = (e) => {\n if (e.key === \"Tab\") {\n $body.classList.add(\"tna-template--tabbed\");\n $body.classList.remove(\"tna-template--clicked\");\n }\n};\n\nconst onMouseDown = () => {\n $body.classList.add(\"tna-template--clicked\");\n $body.classList.remove(\"tna-template--tabbed\");\n};\n\nwindow.addEventListener(\"touchstart\", onFirstTouch);\nwindow.addEventListener(\"keydown\", onKeyDown);\nwindow.addEventListener(\"mousedown\", onMouseDown);\n\nif (document.documentElement.classList.contains(\"tna-template--system-theme\")) {\n document.documentElement.classList.add(\n window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"tna-template--dark-theme\"\n : \"tna-template--light-theme\",\n );\n if (window.matchMedia(\"(prefers-contrast: more)\").matches) {\n document.documentElement.classList.add(\"tna-template--high-contrast-theme\");\n }\n}\n\nconst initAll = (options) => {\n options = typeof options !== \"undefined\" ? options : {};\n const $scope =\n options.scope instanceof HTMLElement ? options.scope : document;\n\n const $breadcrumbs = $scope.querySelector('[data-module=\"tna-breadcrumbs\"]');\n if ($breadcrumbs) {\n new Breadcrumbs($breadcrumbs).init();\n }\n\n const $header = $scope.querySelector('[data-module=\"tna-header\"]');\n if ($header) {\n new Header($header).init();\n }\n\n const $pictures = $scope.querySelectorAll('[data-module=\"tna-picture\"]');\n $pictures.forEach(($picture) => {\n new Picture($picture).init();\n });\n\n const $sensitiveImages = $scope.querySelectorAll(\n '[data-module=\"tna-sensitive-image\"]',\n );\n $sensitiveImages.forEach(($sensitiveImage) => {\n new SensitiveImage($sensitiveImage).init();\n });\n\n const $tabs = $scope.querySelectorAll('[data-module=\"tna-tabs\"]');\n $tabs.forEach(($tabModule) => {\n new Tabs($tabModule).init();\n });\n};\n\nexport { initAll, Breadcrumbs, Header, Picture, SensitiveImage, Tabs };\n"],"names":["root","factory","exports","module","define","amd","self","Breadcrumbs","$module","_classCallCheck","this","$breadcrumbsListWrapper","querySelector","$breadcrumbsList","$breadcrumbs","querySelectorAll","key","value","_this","length","classList","contains","uniqueId","concat","uuidv4","$expandable","document","createElement","add","style","display","$expandButton","innerHTML","setAttribute","addEventListener","remove","focus","appendChild","insertBefore","nextSibling","Header","$toggleButtonWrapper","$navigation","$links","menuOpened","mql","window","matchMedia","$toggleButton","innerText","$hamburger","syncState","handleToggleNavigation","addListener","matches","hidden","i","Picture","$imageWrapper","$transcript","transcriptOpened","$transcriptToggle","handleToggleTranscript","transcriptToggleOpenedClass","removeAttribute","SensitiveImage","$imageDetails","$image","imageIsVisible","handleImageDetailsToggle","hasAttribute","preventScroll","focusVisible","Tabs","$tabList","$tabListItemLinks","$tabItems","sticky","startingTarget","location","hash","replace","$newTabList","getAttribute","forEach","$tabItem","index","$tabListItemLink","$replacementButton","replaceWith","e","handleItemLinkKeyDown","handleItemLinkClick","itemLinkClickEvent","preventDefault","targetItem","currentTarget","switchTab","itemLinkKeyDownEvent","overwriteKeyAction","setSelectedToPreviousTab","setSelectedToNextTab","stopPropagation","console","log","newIndex","currentIndex","_toConsumableArray","findIndex","targetId","history","replaceState","c","crypto","getRandomValues","Uint8Array","toString","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","$body","documentElement","onFirstTouch","removeEventListener","initAll","options","$scope","scope","HTMLElement","init","$header","$picture","$sensitiveImage","$tabModule"],"sourceRoot":""}
@@ -1,6 +1,5 @@
1
1
  @forward "variables";
2
2
  @forward "tools";
3
3
 
4
- @use "utilities";
5
- @use "components";
6
- @use "patterns";
4
+ @forward "utilities";
5
+ @forward "components";
@@ -12,4 +12,5 @@
12
12
  @forward "picture";
13
13
  @forward "profile";
14
14
  @forward "sensitive-image";
15
+ @forward "skip-link";
15
16
  @forward "tabs";
@@ -1,15 +1,14 @@
1
1
  @use "../../tools/colour";
2
2
  @use "../../tools/media";
3
+ @use "../../tools/typography";
3
4
 
4
5
  .tna-breadcrumbs {
5
6
  padding-top: 1rem;
6
7
  padding-bottom: 1rem;
7
8
 
8
9
  &__wrapper {
9
- .tna-template--clicked & {
10
- &:focus {
11
- outline: none !important;
12
- }
10
+ &:focus {
11
+ outline: none !important;
13
12
  }
14
13
  }
15
14
 
@@ -40,6 +39,10 @@
40
39
 
41
40
  &--expandable {
42
41
  display: none;
42
+
43
+ @include media.on-mobile {
44
+ display: inline-block !important;
45
+ }
43
46
  }
44
47
  }
45
48
 
@@ -62,8 +65,7 @@
62
65
 
63
66
  text-decoration: none;
64
67
 
65
- border: 1px transparent solid;
66
- @include colour.colour-border("keyline-dark");
68
+ @include colour.colour-border("keyline-dark", 1px);
67
69
 
68
70
  &:hover {
69
71
  text-decoration: underline;
@@ -92,46 +94,16 @@
92
94
  cursor: pointer;
93
95
 
94
96
  &:hover {
95
- text-decoration: underline;
96
- text-decoration-thickness: 3px;
97
+ color: inherit;
98
+ @include typography.interacted-text-decoration;
99
+
100
+ background-color: transparent;
97
101
  }
98
102
  }
99
103
 
100
104
  @include media.on-mobile {
101
- // &__item {
102
- // &,
103
- // + .tna-breadcrumbs__item {
104
- // &::before {
105
- // margin-left: 0;
106
-
107
- // display: none;
108
- // }
109
- // }
110
-
111
- // &:not(:nth-last-child(2)) {
112
- // display: none;
113
- // }
114
-
115
- // &:nth-last-child(2) {
116
- // .tna-breadcrumbs__link {
117
- // &::before {
118
- // content: "\2190\00a0" attr(data-prefix);
119
- // }
120
- // }
121
- // }
122
- // }
123
-
124
- &__list--collapse-on-mobile
125
- #{&}__item:not(
126
- :first-child,
127
- .tna-breadcrumbs__item--expandable,
128
- :last-child
129
- ) {
105
+ &--collapsed &__item:not(:first-child, &__item--expandable, :last-child) {
130
106
  display: none;
131
107
  }
132
-
133
- &__list--collapse-on-mobile #{&}__item--expandable {
134
- display: inline-block;
135
- }
136
108
  }
137
109
  }
@@ -1,2 +1,2 @@
1
- !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("TNAFrontend",[],r):"object"==typeof exports?exports.TNAFrontend=r():(e.TNAFrontend=e.TNAFrontend||{},e.TNAFrontend["components/breadcrumbs/breadcrumbs"]=r())}(self,(()=>(()=>{"use strict";var e={948:(e,r,t)=>{t.d(r,{Z:()=>n});const n=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)}))}}},r={};function t(n){var i=r[n];if(void 0!==i)return i.exports;var o=r[n]={exports:{}};return e[n](o,o.exports,t),o.exports}t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{t.r(n),t.d(n,{Breadcrumbs:()=>o});var e=t(948);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}var o=function(){function r(e){!function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,r),this.$module=e,this.$breadcrumbsListWrapper=e&&e.querySelector(".tna-breadcrumbs__wrapper"),this.$breadcrumbsList=e&&this.$breadcrumbsListWrapper&&e.querySelector(".tna-breadcrumbs__list"),this.$breadcrumbs=e&&this.$breadcrumbsListWrapper&&this.$breadcrumbsList&&e.querySelectorAll(".tna-breadcrumbs__item")}var t,n;return t=r,(n=[{key:"init",value:function(){var r=this;if(this.$module&&this.$breadcrumbsListWrapper&&this.$breadcrumbsList&&this.$breadcrumbs&&this.$breadcrumbs.length>2){var t="tna-breadcrumbs-".concat((0,e.Z)()),n=document.createElement("li");n.classList.add("tna-breadcrumbs__item","tna-breadcrumbs__item--expandable");var i=document.createElement("button");i.classList.add("tna-breadcrumbs__link"),i.innerHTML="<span class='tna-visually-hidden'>Expand breadcrumbs</span>&hellip;",i.setAttribute("aria-expanded","false"),i.setAttribute("aria-controls",t),i.addEventListener("click",(function(){r.$breadcrumbsList.classList.remove("tna-breadcrumbs__list--collapse-on-mobile"),n.remove(),r.$breadcrumbsListWrapper.setAttribute("tabindex","0"),r.$breadcrumbsListWrapper.focus(),r.$breadcrumbsListWrapper.setAttribute("tabindex","-1")})),n.appendChild(i),this.$breadcrumbsList.setAttribute("id",t),this.$breadcrumbsList.insertBefore(n,this.$breadcrumbs[this.$breadcrumbs.length-2].nextSibling)}}}])&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),r}()})(),n})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("TNAFrontend",[],t):"object"==typeof exports?exports.TNAFrontend=t():(e.TNAFrontend=e.TNAFrontend||{},e.TNAFrontend["components/breadcrumbs/breadcrumbs"]=t())}(self,(()=>(()=>{"use strict";var e={948:(e,t,r)=>{r.d(t,{Z:()=>n});const n=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)}))}}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{Breadcrumbs:()=>o});var e=r(948);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function a(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,o=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==t(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===t(o)?o:String(o)),a)}var o}var o=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$breadcrumbsListWrapper=e&&e.querySelector(".tna-breadcrumbs__wrapper"),this.$breadcrumbsList=e&&this.$breadcrumbsListWrapper&&e.querySelector(".tna-breadcrumbs__list"),this.$breadcrumbs=e&&this.$breadcrumbsListWrapper&&this.$breadcrumbsList&&e.querySelectorAll(".tna-breadcrumbs__item")}var r,n;return r=t,(n=[{key:"init",value:function(){var t=this;if(this.$module&&this.$breadcrumbsListWrapper&&this.$breadcrumbsList&&this.$breadcrumbs&&this.$breadcrumbs.length>2&&!this.$module.classList.contains("tna-breadcrumbs--no-collapse")){var r="tna-breadcrumbs-".concat((0,e.Z)()),n=document.createElement("li");n.classList.add("tna-breadcrumbs__item","tna-breadcrumbs__item--expandable"),n.style.display="none";var a=document.createElement("button");a.classList.add("tna-breadcrumbs__link"),a.innerHTML="<span class='tna-visually-hidden'>Expand breadcrumbs</span>&hellip;",a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",r),a.addEventListener("click",(function(){t.$module.classList.remove("tna-breadcrumbs--collapsed"),n.remove(),t.$breadcrumbsListWrapper.setAttribute("tabindex","0"),t.$breadcrumbsListWrapper.focus(),t.$breadcrumbsListWrapper.setAttribute("tabindex","-1")})),n.appendChild(a),this.$breadcrumbsList.setAttribute("id",r),this.$breadcrumbsList.insertBefore(n,this.$breadcrumbs[this.$breadcrumbs.length-2].nextSibling),this.$module.classList.add("tna-breadcrumbs--collapsed")}}}])&&a(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}()})(),n})()));
2
2
  //# sourceMappingURL=breadcrumbs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/breadcrumbs/breadcrumbs.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,KAEzBD,EAAkB,YAAIA,EAAkB,aAAK,CAAC,EAAGA,EAAkB,YAAE,sCAAwCC,IAC9G,CATD,CASGK,MAAM,I,yDCDT,QARe,WAAH,OACT,CAAC,MAAQ,KAAO,KAAO,KAAO,MAAMC,QAAQ,UAAU,SAACC,GAAC,OAErDA,EACCC,OAAOC,gBAAgB,IAAIC,WAAW,IAAI,GAAM,IAAOH,EAAI,GAC5DI,SAAS,GAAG,GACf,C,GCLCC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAad,QAGrB,IAAIC,EAASU,EAAyBE,GAAY,CAGjDb,QAAS,CAAC,GAOX,OAHAgB,EAAoBH,GAAUZ,EAAQA,EAAOD,QAASY,GAG/CX,EAAOD,OACf,CCrBAY,EAAoBK,EAAI,CAACjB,EAASkB,KACjC,IAAI,IAAIC,KAAOD,EACXN,EAAoBQ,EAAEF,EAAYC,KAASP,EAAoBQ,EAAEpB,EAASmB,IAC5EE,OAAOC,eAAetB,EAASmB,EAA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,aAAa,KAAMV,GACzCR,KAAKG,iBAAiBoB,aACpBZ,EACAX,KAAKI,aAAaJ,KAAKI,aAAaG,OAAS,GAAGiB,YAEpD,CACF,M,oEAAC3B,CAAA,CA3DqB,E","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/lib/uuid.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/breadcrumbs/breadcrumbs.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = root[\"TNAFrontend\"] || {}, root[\"TNAFrontend\"][\"components/breadcrumbs/breadcrumbs\"] = factory();\n})(self, () => {\nreturn ","const uuidv4 = () =>\n ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16),\n );\n\nexport default uuidv4;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Breadcrumbs {\n constructor($module) {\n this.$module = $module;\n this.$breadcrumbsListWrapper =\n $module && $module.querySelector(\".tna-breadcrumbs__wrapper\");\n this.$breadcrumbsList =\n $module &&\n this.$breadcrumbsListWrapper &&\n $module.querySelector(\".tna-breadcrumbs__list\");\n this.$breadcrumbs =\n $module &&\n this.$breadcrumbsListWrapper &&\n this.$breadcrumbsList &&\n $module.querySelectorAll(\".tna-breadcrumbs__item\");\n }\n\n init() {\n if (\n !this.$module ||\n !this.$breadcrumbsListWrapper ||\n !this.$breadcrumbsList ||\n !this.$breadcrumbs\n ) {\n return;\n }\n\n if (this.$breadcrumbs.length > 2) {\n const uniqueId = `tna-breadcrumbs-${uuidv4()}`;\n\n const $expandable = document.createElement(\"li\");\n $expandable.classList.add(\n \"tna-breadcrumbs__item\",\n \"tna-breadcrumbs__item--expandable\",\n );\n\n const $expandButton = document.createElement(\"button\");\n $expandButton.classList.add(\"tna-breadcrumbs__link\");\n $expandButton.innerHTML =\n \"<span class='tna-visually-hidden'>Expand breadcrumbs</span>&hellip;\";\n $expandButton.setAttribute(\"aria-expanded\", \"false\");\n $expandButton.setAttribute(\"aria-controls\", uniqueId);\n $expandButton.addEventListener(\"click\", () => {\n this.$breadcrumbsList.classList.remove(\n \"tna-breadcrumbs__list--collapse-on-mobile\",\n );\n $expandable.remove();\n this.$breadcrumbsListWrapper.setAttribute(\"tabindex\", \"0\");\n this.$breadcrumbsListWrapper.focus();\n this.$breadcrumbsListWrapper.setAttribute(\"tabindex\", \"-1\");\n });\n\n $expandable.appendChild($expandButton);\n\n this.$breadcrumbsList.setAttribute(\"id\", uniqueId);\n this.$breadcrumbsList.insertBefore(\n $expandable,\n this.$breadcrumbs[this.$breadcrumbs.length - 2].nextSibling,\n );\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","replace","c","crypto","getRandomValues","Uint8Array","toString","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","Breadcrumbs","$module","_classCallCheck","this","$breadcrumbsListWrapper","querySelector","$breadcrumbsList","$breadcrumbs","querySelectorAll","_this","length","uniqueId","concat","uuidv4","$expandable","document","createElement","classList","add","$expandButton","innerHTML","setAttribute","addEventListener","remove","focus","appendChild","insertBefore","nextSibling"],"sourceRoot":""}
1
+ {"version":3,"file":"components/breadcrumbs/breadcrumbs.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,KAEzBD,EAAkB,YAAIA,EAAkB,aAAK,CAAC,EAAGA,EAAkB,YAAE,sCAAwCC,IAC9G,CATD,CASGK,MAAM,I,yDCDT,QARe,WAAH,OACT,CAAC,MAAQ,KAAO,KAAO,KAAO,MAAMC,QAAQ,UAAU,SAACC,GAAC,OAErDA,EACCC,OAAOC,gBAAgB,IAAIC,WAAW,IAAI,GAAM,IAAOH,EAAI,GAC5DI,SAAS,GAAG,GACf,C,GCLCC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAy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AMC,QAAU,OAE5B,IAAMC,EAAgBL,SAASC,cAAc,UAC7CI,EAAcX,UAAUQ,IAAI,yBAC5BG,EAAcC,UACZ,sEACFD,EAAcE,aAAa,gBAAiB,SAC5CF,EAAcE,aAAa,gBAAiBX,GAC5CS,EAAcG,iBAAiB,SAAS,WACtChB,EAAKR,QAAQU,UAAUe,OAAO,8BAC9BV,EAAYU,SACZjB,EAAKL,wBAAwBoB,aAAa,WAAY,KACtDf,EAAKL,wBAAwBuB,QAC7BlB,EAAKL,wBAAwBoB,aAAa,WAAY,KACxD,IAEAR,EAAYY,YAAYN,GAExBnB,KAAKG,iBAAiBkB,aAAa,KAAMX,GACzCV,KAAKG,iBAAiBuB,aACpBb,EACAb,KAAKI,aAAaJ,KAAKI,aAAaG,OAAS,GAAGoB,aAGlD3B,KAAKF,QAAQU,UAAUQ,IAAI,6BAC7B,CACF,M,oEAACnB,CAAA,CA/DqB,E","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/lib/uuid.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/breadcrumbs/breadcrumbs.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = root[\"TNAFrontend\"] || {}, root[\"TNAFrontend\"][\"components/breadcrumbs/breadcrumbs\"] = factory();\n})(self, () => {\nreturn ","const uuidv4 = () =>\n ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16),\n );\n\nexport default uuidv4;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Breadcrumbs {\n constructor($module) {\n this.$module = $module;\n this.$breadcrumbsListWrapper =\n $module && $module.querySelector(\".tna-breadcrumbs__wrapper\");\n this.$breadcrumbsList =\n $module &&\n this.$breadcrumbsListWrapper &&\n $module.querySelector(\".tna-breadcrumbs__list\");\n this.$breadcrumbs =\n $module &&\n this.$breadcrumbsListWrapper &&\n this.$breadcrumbsList &&\n $module.querySelectorAll(\".tna-breadcrumbs__item\");\n }\n\n init() {\n if (\n !this.$module ||\n !this.$breadcrumbsListWrapper ||\n !this.$breadcrumbsList ||\n !this.$breadcrumbs\n ) {\n return;\n }\n\n if (\n this.$breadcrumbs.length > 2 &&\n !this.$module.classList.contains(\"tna-breadcrumbs--no-collapse\")\n ) {\n const uniqueId = `tna-breadcrumbs-${uuidv4()}`;\n\n const $expandable = document.createElement(\"li\");\n $expandable.classList.add(\n \"tna-breadcrumbs__item\",\n \"tna-breadcrumbs__item--expandable\",\n );\n $expandable.style.display = \"none\";\n\n const $expandButton = document.createElement(\"button\");\n $expandButton.classList.add(\"tna-breadcrumbs__link\");\n $expandButton.innerHTML =\n \"<span class='tna-visually-hidden'>Expand breadcrumbs</span>&hellip;\";\n $expandButton.setAttribute(\"aria-expanded\", \"false\");\n $expandButton.setAttribute(\"aria-controls\", uniqueId);\n $expandButton.addEventListener(\"click\", () => {\n this.$module.classList.remove(\"tna-breadcrumbs--collapsed\");\n $expandable.remove();\n this.$breadcrumbsListWrapper.setAttribute(\"tabindex\", \"0\");\n this.$breadcrumbsListWrapper.focus();\n this.$breadcrumbsListWrapper.setAttribute(\"tabindex\", \"-1\");\n });\n\n $expandable.appendChild($expandButton);\n\n this.$breadcrumbsList.setAttribute(\"id\", uniqueId);\n this.$breadcrumbsList.insertBefore(\n $expandable,\n this.$breadcrumbs[this.$breadcrumbs.length - 2].nextSibling,\n );\n\n this.$module.classList.add(\"tna-breadcrumbs--collapsed\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","replace","c","crypto","getRandomValues","Uint8Array","toString","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","Breadcrumbs","$module","_classCallCheck","this","$breadcrumbsListWrapper","querySelector","$breadcrumbsList","$breadcrumbs","querySelectorAll","_this","length","classList","contains","uniqueId","concat","uuidv4","$expandable","document","createElement","add","style","display","$expandButton","innerHTML","setAttribute","addEventListener","remove","focus","appendChild","insertBefore","nextSibling"],"sourceRoot":""}
@@ -26,7 +26,10 @@ export class Breadcrumbs {
26
26
  return;
27
27
  }
28
28
 
29
- if (this.$breadcrumbs.length > 2) {
29
+ if (
30
+ this.$breadcrumbs.length > 2 &&
31
+ !this.$module.classList.contains("tna-breadcrumbs--no-collapse")
32
+ ) {
30
33
  const uniqueId = `tna-breadcrumbs-${uuidv4()}`;
31
34
 
32
35
  const $expandable = document.createElement("li");
@@ -34,6 +37,7 @@ export class Breadcrumbs {
34
37
  "tna-breadcrumbs__item",
35
38
  "tna-breadcrumbs__item--expandable",
36
39
  );
40
+ $expandable.style.display = "none";
37
41
 
38
42
  const $expandButton = document.createElement("button");
39
43
  $expandButton.classList.add("tna-breadcrumbs__link");
@@ -42,9 +46,7 @@ export class Breadcrumbs {
42
46
  $expandButton.setAttribute("aria-expanded", "false");
43
47
  $expandButton.setAttribute("aria-controls", uniqueId);
44
48
  $expandButton.addEventListener("click", () => {
45
- this.$breadcrumbsList.classList.remove(
46
- "tna-breadcrumbs__list--collapse-on-mobile",
47
- );
49
+ this.$module.classList.remove("tna-breadcrumbs--collapsed");
48
50
  $expandable.remove();
49
51
  this.$breadcrumbsListWrapper.setAttribute("tabindex", "0");
50
52
  this.$breadcrumbsListWrapper.focus();
@@ -58,6 +60,8 @@ export class Breadcrumbs {
58
60
  $expandable,
59
61
  this.$breadcrumbs[this.$breadcrumbs.length - 2].nextSibling,
60
62
  );
63
+
64
+ this.$module.classList.add("tna-breadcrumbs--collapsed");
61
65
  }
62
66
  }
63
67
  }
@@ -3,6 +3,7 @@ import macroOptions from "./macro-options.json";
3
3
 
4
4
  const argTypes = {
5
5
  items: { control: "object" },
6
+ noCollapse: { control: "boolean" },
6
7
  classes: { control: "text" },
7
8
  attributes: { control: "object" },
8
9
  };
@@ -18,15 +19,15 @@ export default {
18
19
  argTypes,
19
20
  };
20
21
 
21
- const Template = ({ items, classes, attributes }) => {
22
- return Breadcrumbs({
22
+ const Template = ({ items, noCollapse, classes, attributes }) =>
23
+ Breadcrumbs({
23
24
  params: {
24
25
  items,
26
+ noCollapse,
25
27
  classes,
26
28
  attributes,
27
29
  },
28
30
  });
29
- };
30
31
 
31
32
  export const Standard = Template.bind({});
32
33
  Standard.args = {
@@ -55,30 +56,8 @@ Standard.args = {
55
56
  classes: "tna-breadcrumbs--demo",
56
57
  };
57
58
 
58
- // TODO
59
- // export const NoCollapse = Template.bind({});
60
- // NoCollapse.args = {
61
- // items: [
62
- // {
63
- // text: "Alpha",
64
- // href: "#/alpha",
65
- // },
66
- // {
67
- // text: "Beta",
68
- // href: "#/beta",
69
- // },
70
- // {
71
- // text: "Gamma",
72
- // href: "#/gamma",
73
- // },
74
- // {
75
- // text: "Delta",
76
- // href: "#/delta",
77
- // },
78
- // {
79
- // text: "Epsilon",
80
- // href: "#/epsilon",
81
- // },
82
- // ],
83
- // classes: "tna-breadcrumbs--demo",
84
- // };
59
+ export const NoCollapse = Template.bind({});
60
+ NoCollapse.args = {
61
+ ...Standard.args,
62
+ noCollapse: true,
63
+ };
@@ -19,7 +19,29 @@
19
19
  }
20
20
  ]
21
21
  },
22
- "html": "<div class=\"tna-breadcrumbs tna-container \" data-module=\"tna-breadcrumbs\"><nav class=\"tna-breadcrumbs__wrapper tna-column tna-column--full\" aria-label=\"Breadcrumb\"><ol class=\"tna-breadcrumbs__list tna-breadcrumbs__list--collapse-on-mobile\"><li class=\"tna-breadcrumbs__item\"><a href=\"#/alpha\" class=\"tna-breadcrumbs__link\" data-prefix=\"Back to\">Alpha</a></li><li class=\"tna-breadcrumbs__item\"><a href=\"#/beta\" class=\"tna-breadcrumbs__link\" data-prefix=\"Back to\">Beta</a></li><li class=\"tna-breadcrumbs__item\"><a href=\"#/gamma\" class=\"tna-breadcrumbs__link\" data-prefix=\"Back to\">Gamma</a></li></ol></nav></div>",
22
+ "html": "<div class=\"tna-breadcrumbs \" data-module=\"tna-breadcrumbs\"><div class=\"tna-container\"><nav class=\"tna-breadcrumbs__wrapper tna-column tna-column--full\" aria-label=\"Breadcrumb\"><ol class=\"tna-breadcrumbs__list\"><li class=\"tna-breadcrumbs__item\"><a href=\"#/alpha\" class=\"tna-breadcrumbs__link\">Alpha</a></li><li class=\"tna-breadcrumbs__item\"><a href=\"#/beta\" class=\"tna-breadcrumbs__link\">Beta</a></li><li class=\"tna-breadcrumbs__item\"><a href=\"#/gamma\" class=\"tna-breadcrumbs__link\">Gamma</a></li></ol></nav></div></div>",
23
+ "hidden": false
24
+ },
25
+ {
26
+ "name": "non-collapsing",
27
+ "options": {
28
+ "items": [
29
+ {
30
+ "text": "Alpha",
31
+ "href": "#/alpha"
32
+ },
33
+ {
34
+ "text": "Beta",
35
+ "href": "#/beta"
36
+ },
37
+ {
38
+ "text": "Gamma",
39
+ "href": "#/gamma"
40
+ }
41
+ ]
42
+ },
43
+ "noCollapse": true,
44
+ "html": "<div class=\"tna-breadcrumbs \" data-module=\"tna-breadcrumbs\"><div class=\"tna-container\"><nav class=\"tna-breadcrumbs__wrapper tna-column tna-column--full\" aria-label=\"Breadcrumb\"><ol class=\"tna-breadcrumbs__list\"><li class=\"tna-breadcrumbs__item\"><a href=\"#/alpha\" class=\"tna-breadcrumbs__link\">Alpha</a></li><li class=\"tna-breadcrumbs__item\"><a href=\"#/beta\" class=\"tna-breadcrumbs__link\">Beta</a></li><li class=\"tna-breadcrumbs__item\"><a href=\"#/gamma\" class=\"tna-breadcrumbs__link\">Gamma</a></li></ol></nav></div></div>",
23
45
  "hidden": false
24
46
  }
25
47
  ]