@nationalarchives/frontend 0.26.2 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/nationalarchives/all+analytics.js +1 -1
  2. package/nationalarchives/all+analytics.js.map +1 -1
  3. package/nationalarchives/all.css +5 -8
  4. package/nationalarchives/all.css.map +1 -1
  5. package/nationalarchives/all.js +1 -1
  6. package/nationalarchives/all.js.map +1 -1
  7. package/nationalarchives/all.scss +4 -7
  8. package/nationalarchives/analytics.js +1 -1
  9. package/nationalarchives/analytics.js.map +1 -1
  10. package/nationalarchives/components/accordion/accordion.css +1 -1
  11. package/nationalarchives/components/accordion/accordion.css.map +1 -1
  12. package/nationalarchives/components/accordion/accordion.scss +1 -8
  13. package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
  14. package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
  15. package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +0 -5
  16. package/nationalarchives/components/button/button.css +1 -1
  17. package/nationalarchives/components/button/button.css.map +1 -1
  18. package/nationalarchives/components/button/button.scss +21 -22
  19. package/nationalarchives/components/button/fixtures.json +11 -0
  20. package/nationalarchives/components/button/template.njk +2 -4
  21. package/nationalarchives/components/card/card.css +1 -1
  22. package/nationalarchives/components/card/card.css.map +1 -1
  23. package/nationalarchives/components/card/card.scss +58 -36
  24. package/nationalarchives/components/checkboxes/checkboxes.css +1 -1
  25. package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
  26. package/nationalarchives/components/checkboxes/checkboxes.scss +0 -2
  27. package/nationalarchives/components/checkboxes/fixtures.json +14 -0
  28. package/nationalarchives/components/checkboxes/macro-options.json +2 -2
  29. package/nationalarchives/components/compound-filters/compound-filters.css +1 -1
  30. package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
  31. package/nationalarchives/components/compound-filters/compound-filters.scss +1 -2
  32. package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
  33. package/nationalarchives/components/cookie-banner/cookie-banner.scss +0 -4
  34. package/nationalarchives/components/date-input/date-input.css +1 -1
  35. package/nationalarchives/components/date-input/date-input.css.map +1 -1
  36. package/nationalarchives/components/date-input/date-input.scss +0 -1
  37. package/nationalarchives/components/date-search/date-search.css +1 -1
  38. package/nationalarchives/components/date-search/date-search.css.map +1 -1
  39. package/nationalarchives/components/date-search/date-search.scss +0 -1
  40. package/nationalarchives/components/details/details.css +1 -1
  41. package/nationalarchives/components/details/details.css.map +1 -1
  42. package/nationalarchives/components/details/details.scss +1 -2
  43. package/nationalarchives/components/error-summary/error-summary.css +1 -1
  44. package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
  45. package/nationalarchives/components/error-summary/error-summary.scss +0 -2
  46. package/nationalarchives/components/fieldset/fieldset.css.map +1 -1
  47. package/nationalarchives/components/file-input/file-input.css +1 -1
  48. package/nationalarchives/components/file-input/file-input.css.map +1 -1
  49. package/nationalarchives/components/file-input/file-input.scss +0 -4
  50. package/nationalarchives/components/files-list/files-list.css +1 -1
  51. package/nationalarchives/components/files-list/files-list.css.map +1 -1
  52. package/nationalarchives/components/files-list/files-list.scss +3 -4
  53. package/nationalarchives/components/footer/footer.css +1 -1
  54. package/nationalarchives/components/footer/footer.css.map +1 -1
  55. package/nationalarchives/components/footer/footer.scss +2 -4
  56. package/nationalarchives/components/gallery/analytics.js +0 -21
  57. package/nationalarchives/components/gallery/fixtures.json +3 -3
  58. package/nationalarchives/components/gallery/gallery.css +1 -1
  59. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  60. package/nationalarchives/components/gallery/gallery.js +1 -1
  61. package/nationalarchives/components/gallery/gallery.js.map +1 -1
  62. package/nationalarchives/components/gallery/gallery.mjs +3 -74
  63. package/nationalarchives/components/gallery/gallery.scss +15 -136
  64. package/nationalarchives/components/gallery/macro-options.json +0 -6
  65. package/nationalarchives/components/gallery/template.njk +3 -33
  66. package/nationalarchives/components/global-header/global-header.css +1 -1
  67. package/nationalarchives/components/global-header/global-header.css.map +1 -1
  68. package/nationalarchives/components/global-header/global-header.scss +5 -8
  69. package/nationalarchives/components/header/header.css +1 -1
  70. package/nationalarchives/components/header/header.css.map +1 -1
  71. package/nationalarchives/components/header/header.scss +10 -15
  72. package/nationalarchives/components/hero/hero.css +1 -1
  73. package/nationalarchives/components/hero/hero.css.map +1 -1
  74. package/nationalarchives/components/hero/hero.scss +2 -4
  75. package/nationalarchives/components/index-grid/index-grid.css +1 -1
  76. package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
  77. package/nationalarchives/components/index-grid/index-grid.scss +1 -2
  78. package/nationalarchives/components/panel/panel.css.map +1 -1
  79. package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
  80. package/nationalarchives/components/picture/picture.css.map +1 -1
  81. package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
  82. package/nationalarchives/components/radios/radios.css +1 -1
  83. package/nationalarchives/components/radios/radios.css.map +1 -1
  84. package/nationalarchives/components/radios/radios.scss +0 -2
  85. package/nationalarchives/components/search-field/search-field.css +1 -1
  86. package/nationalarchives/components/search-field/search-field.css.map +1 -1
  87. package/nationalarchives/components/search-field/search-field.scss +0 -36
  88. package/nationalarchives/components/secondary-navigation/secondary-navigation.css +1 -1
  89. package/nationalarchives/components/secondary-navigation/secondary-navigation.css.map +1 -1
  90. package/nationalarchives/components/secondary-navigation/secondary-navigation.scss +2 -4
  91. package/nationalarchives/components/select/select.css +1 -1
  92. package/nationalarchives/components/select/select.css.map +1 -1
  93. package/nationalarchives/components/select/select.scss +0 -1
  94. package/nationalarchives/components/sidebar/sidebar.css.map +1 -1
  95. package/nationalarchives/components/sidebar/sidebar.scss +0 -4
  96. package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
  97. package/nationalarchives/components/tabs/tabs.css +1 -1
  98. package/nationalarchives/components/tabs/tabs.css.map +1 -1
  99. package/nationalarchives/components/tabs/tabs.scss +1 -8
  100. package/nationalarchives/components/text-input/text-input.css +1 -1
  101. package/nationalarchives/components/text-input/text-input.css.map +1 -1
  102. package/nationalarchives/components/text-input/text-input.scss +0 -1
  103. package/nationalarchives/components/textarea/textarea.css +1 -1
  104. package/nationalarchives/components/textarea/textarea.css.map +1 -1
  105. package/nationalarchives/components/textarea/textarea.scss +0 -1
  106. package/nationalarchives/components/warning/warning.css +1 -1
  107. package/nationalarchives/components/warning/warning.css.map +1 -1
  108. package/nationalarchives/error-page.css +1 -1
  109. package/nationalarchives/error-page.css.map +1 -1
  110. package/nationalarchives/print.css.map +1 -1
  111. package/nationalarchives/prototype-kit.css +5 -8
  112. package/nationalarchives/prototype-kit.css.map +1 -1
  113. package/nationalarchives/tools/_a11y.scss +46 -18
  114. package/nationalarchives/tools/_colour.scss +7 -5
  115. package/nationalarchives/utilities/_a11y.scss +2 -6
  116. package/nationalarchives/utilities/forms/_index.scss +4 -0
  117. package/nationalarchives/utilities/forms/form-item.njk +2 -0
  118. package/nationalarchives/utilities/lists/_index.scss +1 -6
  119. package/nationalarchives/utilities/typography/_index.scss +2 -5
  120. package/nationalarchives/variables/_colour.scss +2 -1
  121. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){return i="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},i(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,r(n.key),n)}}function r(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}t.r(e),t.d(e,{Gallery:()=>o});var o=function(){return t=function t(e){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$itemsContainer=e&&e.querySelector(".tna-gallery__items"),this.$items=this.$itemsContainer&&this.$itemsContainer.querySelectorAll(".tna-gallery__item"),this.$navigation=e&&e.querySelector(".tna-gallery__navigation"),this.$navigationItems=this.$navigation&&e.querySelectorAll(".tna-gallery__navigation-item"),this.$options=e&&e.querySelector(".tna-gallery__options"),this.$navigationButtons=e&&e.querySelector(".tna-gallery__navigation-buttons"),this.$module&&this.$itemsContainer&&this.$items&&!(this.$items.length<2)&&this.$navigation&&this.$navigationItems&&this.$options&&this.$navigationButtons&&(this.$module.classList.add("tna-gallery--interactive"),this.$showIndex=this.$options.querySelector('button[value="show-index"]'),this.$enterFullscreen=this.$options.querySelector('button[value="enter-fullscreen"]'),this.$exitFullscreen=this.$options.querySelector('button[value="exit-fullscreen"]'),this.$navigationButtonPrev=this.$navigationButtons.querySelector(".tna-gallery__navigation-prev"),this.$navigationButtonNext=this.$navigationButtons.querySelector(".tna-gallery__navigation-next"),this.$module.addEventListener("fullscreenchange",function(){return i.syncFullScreen()}),this.setup(),this.allowGridIndex=this.$module.dataset.showgrid||!1,this.allowGridIndex?this.showIndex():(this.currentId=this.$items[0].id,this.showItem(this.currentId)))},e=[{key:"setup",value:function(){var t,e,i,n,r,o,s,l=this;this.$items.forEach(function(t){var e;t.setAttribute("hidden",""),t.setAttribute("aria-hidden","true"),null===(e=t.querySelector(".tna-gallery__item-header"))||void 0===e||e.setAttribute("aria-hidden","true")}),this.$navigation.removeAttribute("hidden"),this.$navigationItems.forEach(function(t){t.addEventListener("click",function(){l.showItem(t.getAttribute("aria-controls")),l.$itemsContainer.setAttribute("tabindex","0"),l.$itemsContainer.focus()})}),this.$module.addEventListener("keydown",function(t){var e=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":l.showPreviousItem(),e=!0;break;case"ArrowRight":case"ArrowDown":l.showNextItem(),e=!0;break;case"Home":l.showFirstItem(),e=!0;break;case"End":l.showLastItem(),e=!0}e&&(t.stopPropagation(),t.preventDefault())}),this.$options.removeAttribute("hidden"),document.fullscreenEnabled&&this.$enterFullscreen&&this.$exitFullscreen&&(null===(r=this.$enterFullscreen)||void 0===r||r.addEventListener("click",function(){return l.enterFullScreen()}),null===(o=this.$exitFullscreen)||void 0===o||o.addEventListener("click",function(){return l.exitFullScreen()}),null===(s=this.$enterFullscreen)||void 0===s||s.removeAttribute("hidden")),null===(t=this.$showIndex)||void 0===t||t.addEventListener("click",function(){return l.showIndex()}),null===(e=this.$navigationButtons)||void 0===e||e.removeAttribute("hidden"),null===(i=this.$navigationButtonPrev)||void 0===i||i.addEventListener("click",function(){l.showPreviousItem()}),null===(n=this.$navigationButtonNext)||void 0===n||n.addEventListener("click",function(){l.showNextItem()}),this.$liveRegion=document.createElement("div"),this.$liveRegion.setAttribute("aria-live","polite"),this.$liveRegion.setAttribute("aria-atomic","true"),this.$liveRegion.setAttribute("class","tna-gallery__item-header"),this.$itemsContainer.prepend(this.$liveRegion),this.$itemsContainer.classList.add("tna-gallery__items--hide-item-titles"),this.$itemsContainer.addEventListener("blur",function(){return l.$itemsContainer.removeAttribute("tabindex")})}},{key:"showIndex",value:function(){var t;this.showItem(""),this.$itemsContainer.classList.add("tna-gallery__items--hide-items"),null===(t=this.$showIndex)||void 0===t||t.setAttribute("hidden","")}},{key:"showItem",value:function(t){var e,i=this;this.$items.forEach(function(e){t&&e.id===t?(e.removeAttribute("hidden"),e.removeAttribute("aria-hidden")):(e.setAttribute("hidden",""),e.setAttribute("aria-hidden","true"))}),this.$navigationItems.forEach(function(e){t&&e.getAttribute("aria-controls")===t?(e.setAttribute("aria-current","true"),i.isFullScreen()&&e.scrollIntoView({block:"nearest"})):e.setAttribute("aria-current","false")}),this.allowGridIndex&&(null===(e=this.$showIndex)||void 0===e||e.removeAttribute("hidden")),this.$itemsContainer.classList.remove("tna-gallery__items--hide-items"),this.currentId=t,this.$liveRegion.textContent="Image ".concat(this.getCurrentItemIndex()+1," of ").concat(this.$items.length)}},{key:"getCurrentItemIndex",value:function(){var t=this;return Array.from(this.$items).findIndex(function(e){return e.id===t.currentId})}},{key:"showPreviousItem",value:function(){var t=this.getCurrentItemIndex()-1;t<0&&(t=this.$items.length-1),this.showItem(this.$items[t].id)}},{key:"showNextItem",value:function(){var t=this.getCurrentItemIndex()+1;t>=this.$items.length&&(t=0),this.showItem(this.$items[t].id)}},{key:"showFirstItem",value:function(){this.showItem(this.$items[0].id)}},{key:"showLastItem",value:function(){this.showItem(this.$items[this.$items.length-1].id)}},{key:"isFullScreen",value:function(){return document.fullscreenElement}},{key:"enterFullScreen",value:function(){this.$module.requestFullscreen(),this.syncFullScreen(),this.$module.focus()}},{key:"exitFullScreen",value:function(){document.exitFullscreen(),this.syncFullScreen()}},{key:"syncFullScreen",value:function(){this.isFullScreen()?(this.$enterFullscreen.setAttribute("hidden",""),this.$exitFullscreen.removeAttribute("hidden")):(this.$exitFullscreen.setAttribute("hidden",""),this.$enterFullscreen.removeAttribute("hidden"))}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})());
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){return i="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},i(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,r(n.key),n)}}function r(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}t.r(e),t.d(e,{Gallery:()=>o});var o=function(){return t=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.$itemsContainer=e&&e.querySelector(".tna-gallery__items"),this.$items=this.$itemsContainer&&this.$itemsContainer.querySelectorAll(".tna-gallery__item"),this.$navigation=e&&e.querySelector(".tna-gallery__navigation"),this.$navigationItems=this.$navigation&&e.querySelectorAll(".tna-gallery__navigation-item"),this.$navigationButtons=e&&e.querySelector(".tna-gallery__navigation-buttons"),this.$module&&this.$itemsContainer&&this.$items&&!(this.$items.length<2)&&this.$navigation&&this.$navigationItems&&this.$navigationButtons&&(this.$module.classList.add("tna-gallery--interactive"),this.$navigationButtonPrev=this.$navigationButtons.querySelector(".tna-gallery__navigation-prev"),this.$navigationButtonNext=this.$navigationButtons.querySelector(".tna-gallery__navigation-next"),this.setup(),this.currentId=this.$items[0].id,this.showItem(this.currentId))},e=[{key:"setup",value:function(){var t,e,i,n=this;this.$items.forEach(function(t){var e;t.setAttribute("hidden",""),t.setAttribute("aria-hidden","true"),null===(e=t.querySelector(".tna-gallery__item-header"))||void 0===e||e.setAttribute("aria-hidden","true")}),this.$navigation.removeAttribute("hidden"),this.$navigationItems.forEach(function(t){t.addEventListener("click",function(){n.showItem(t.getAttribute("aria-controls")),n.$itemsContainer.setAttribute("tabindex","0"),n.$itemsContainer.focus()})}),this.$module.addEventListener("keydown",function(t){var e=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":n.showPreviousItem(),e=!0;break;case"ArrowRight":case"ArrowDown":n.showNextItem(),e=!0;break;case"Home":n.showFirstItem(),e=!0;break;case"End":n.showLastItem(),e=!0}e&&(t.stopPropagation(),t.preventDefault())}),null===(t=this.$navigationButtons)||void 0===t||t.removeAttribute("hidden"),null===(e=this.$navigationButtonPrev)||void 0===e||e.addEventListener("click",function(){n.showPreviousItem()}),null===(i=this.$navigationButtonNext)||void 0===i||i.addEventListener("click",function(){n.showNextItem()}),this.$liveRegion=document.createElement("div"),this.$liveRegion.setAttribute("aria-live","polite"),this.$liveRegion.setAttribute("aria-atomic","true"),this.$liveRegion.setAttribute("class","tna-gallery__item-header"),this.$itemsContainer.prepend(this.$liveRegion),this.$itemsContainer.classList.add("tna-gallery__items--hide-item-titles"),this.$itemsContainer.addEventListener("blur",function(){return n.$itemsContainer.removeAttribute("tabindex")})}},{key:"showItem",value:function(t){this.$items.forEach(function(e){t&&e.id===t?(e.removeAttribute("hidden"),e.removeAttribute("aria-hidden")):(e.setAttribute("hidden",""),e.setAttribute("aria-hidden","true"))}),this.$navigationItems.forEach(function(e){t&&e.getAttribute("aria-controls")===t?e.setAttribute("aria-current","true"):e.setAttribute("aria-current","false")}),this.currentId=t,this.$liveRegion.textContent="Image ".concat(this.getCurrentItemIndex()+1," of ").concat(this.$items.length)}},{key:"getCurrentItemIndex",value:function(){var t=this;return Array.from(this.$items).findIndex(function(e){return e.id===t.currentId})}},{key:"showPreviousItem",value:function(){var t=this.getCurrentItemIndex()-1;t<0&&(t=this.$items.length-1),this.showItem(this.$items[t].id)}},{key:"showNextItem",value:function(){var t=this.getCurrentItemIndex()+1;t>=this.$items.length&&(t=0),this.showItem(this.$items[t].id)}},{key:"showFirstItem",value:function(){this.showItem(this.$items[0].id)}},{key:"showLastItem",value:function(){this.showItem(this.$items[this.$items.length-1].id)}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})());
2
2
  //# sourceMappingURL=gallery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/gallery/gallery.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,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,KAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,M,qsBCLhD,IAAMC,EAAO,WA2DjB,O,EA1DD,SAAAA,EAAYC,GAAS,IAAAC,EAAA,M,4FAAAC,CAAA,KAAAH,GACnBI,KAAKH,QAAUA,EACfG,KAAKC,gBACHJ,GAAWA,EAAQK,cAAc,uBACnCF,KAAKG,OACHH,KAAKC,iBACLD,KAAKC,gBAAgBG,iBAAiB,sBACxCJ,KAAKK,YACHR,GAAWA,EAAQK,cAAc,4BACnCF,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AKA,EAAMX,KAAO0C,EAAK3C,SAAS,EAE1C,GAAC,CAAAzC,IAAA,mBAAAa,MAED,WACE,IAAI2E,EAAkBtE,KAAKiE,sBAAwB,EAC/CK,EAAkB,IACpBA,EAAkBtE,KAAKG,OAAOM,OAAS,GAEzCT,KAAKyB,SAASzB,KAAKG,OAAOmE,GAAiB9C,GAC7C,GAAC,CAAA1C,IAAA,eAAAa,MAED,WACE,IAAI2E,EAAkBtE,KAAKiE,sBAAwB,EAC/CK,GAAmBtE,KAAKG,OAAOM,SACjC6D,EAAkB,GAEpBtE,KAAKyB,SAASzB,KAAKG,OAAOmE,GAAiB9C,GAC7C,GAAC,CAAA1C,IAAA,gBAAAa,MAED,WACEK,KAAKyB,SAASzB,KAAKG,OAAO,GAAGqB,GAC/B,GAAC,CAAA1C,IAAA,eAAAa,MAED,WACEK,KAAKyB,SAASzB,KAAKG,OAAOH,KAAKG,OAAOM,OAAS,GAAGe,GACpD,GAAC,CAAA1C,IAAA,eAAAa,MAED,WACE,OAAOsD,SAASsB,iBAClB,GAAC,CAAAzF,IAAA,kBAAAa,MAED,WACEK,KAAKH,QAAQ2E,oBACbxE,KAAKkB,iBACLlB,KAAKH,QAAQ2C,OACf,GAAC,CAAA1D,IAAA,iBAAAa,MAED,WACEsD,SAASwB,iBACTzE,KAAKkB,gBACP,GAAC,CAAApC,IAAA,iBAAAa,MAED,WACMK,KAAK2D,gBACP3D,KAAKa,iBAAiBwB,aAAa,SAAU,IAC7CrC,KAAKc,gBAAgBwB,gBAAgB,YAErCtC,KAAKc,gBAAgBuB,aAAa,SAAU,IAC5CrC,KAAKa,iBAAiByB,gBAAgB,UAE1C,I,gFAAC,CArOiB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","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/gallery/gallery.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\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\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};","export class Gallery {\n constructor($module) {\n this.$module = $module;\n this.$itemsContainer =\n $module && $module.querySelector(\".tna-gallery__items\");\n this.$items =\n this.$itemsContainer &&\n this.$itemsContainer.querySelectorAll(\".tna-gallery__item\");\n this.$navigation =\n $module && $module.querySelector(\".tna-gallery__navigation\");\n this.$navigationItems =\n this.$navigation &&\n $module.querySelectorAll(\".tna-gallery__navigation-item\");\n this.$options = $module && $module.querySelector(\".tna-gallery__options\");\n this.$navigationButtons =\n $module && $module.querySelector(\".tna-gallery__navigation-buttons\");\n\n if (\n !this.$module ||\n !this.$itemsContainer ||\n !this.$items ||\n this.$items.length < 2 ||\n !this.$navigation ||\n !this.$navigationItems ||\n !this.$options ||\n !this.$navigationButtons\n ) {\n return;\n }\n\n this.$module.classList.add(\"tna-gallery--interactive\");\n\n this.$showIndex = this.$options.querySelector('button[value=\"show-index\"]');\n this.$enterFullscreen = this.$options.querySelector(\n 'button[value=\"enter-fullscreen\"]',\n );\n this.$exitFullscreen = this.$options.querySelector(\n 'button[value=\"exit-fullscreen\"]',\n );\n\n this.$navigationButtonPrev = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-prev\",\n );\n this.$navigationButtonNext = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-next\",\n );\n\n this.$module.addEventListener(\"fullscreenchange\", () =>\n this.syncFullScreen(),\n );\n\n this.setup();\n this.allowGridIndex = this.$module.dataset[\"showgrid\"] || false;\n if (this.allowGridIndex) {\n this.showIndex();\n } else {\n this.currentId = this.$items[0].id;\n this.showItem(this.currentId);\n }\n }\n\n setup() {\n this.$items.forEach(($item) => {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n $item\n .querySelector(\".tna-gallery__item-header\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n });\n this.$navigation.removeAttribute(\"hidden\");\n this.$navigationItems.forEach(($item) => {\n $item.addEventListener(\"click\", () => {\n this.showItem($item.getAttribute(\"aria-controls\"));\n this.$itemsContainer.setAttribute(\"tabindex\", \"0\");\n this.$itemsContainer.focus();\n });\n });\n this.$module.addEventListener(\"keydown\", (e) => {\n let preventDefaultKeyAction = false;\n switch (e.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.showPreviousItem();\n preventDefaultKeyAction = true;\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.showNextItem();\n preventDefaultKeyAction = true;\n break;\n case \"Home\":\n this.showFirstItem();\n preventDefaultKeyAction = true;\n break;\n case \"End\":\n this.showLastItem();\n preventDefaultKeyAction = true;\n break;\n }\n if (preventDefaultKeyAction) {\n e.stopPropagation();\n e.preventDefault();\n }\n });\n this.$options.removeAttribute(\"hidden\");\n if (\n document.fullscreenEnabled &&\n this.$enterFullscreen &&\n this.$exitFullscreen\n ) {\n this.$enterFullscreen?.addEventListener(\"click\", () =>\n this.enterFullScreen(),\n );\n this.$exitFullscreen?.addEventListener(\"click\", () =>\n this.exitFullScreen(),\n );\n this.$enterFullscreen?.removeAttribute(\"hidden\");\n }\n this.$showIndex?.addEventListener(\"click\", () => this.showIndex());\n this.$navigationButtons?.removeAttribute(\"hidden\");\n this.$navigationButtonPrev?.addEventListener(\"click\", () => {\n this.showPreviousItem();\n });\n this.$navigationButtonNext?.addEventListener(\"click\", () => {\n this.showNextItem();\n });\n\n this.$liveRegion = document.createElement(\"div\");\n this.$liveRegion.setAttribute(\"aria-live\", \"polite\");\n this.$liveRegion.setAttribute(\"aria-atomic\", \"true\");\n this.$liveRegion.setAttribute(\"class\", \"tna-gallery__item-header\");\n this.$itemsContainer.prepend(this.$liveRegion);\n this.$itemsContainer.classList.add(\"tna-gallery__items--hide-item-titles\");\n this.$itemsContainer.addEventListener(\"blur\", () =>\n this.$itemsContainer.removeAttribute(\"tabindex\"),\n );\n }\n\n showIndex() {\n this.showItem(\"\");\n this.$itemsContainer.classList.add(\"tna-gallery__items--hide-items\");\n this.$showIndex?.setAttribute(\"hidden\", \"\");\n }\n\n showItem(id) {\n this.$items.forEach(($item) => {\n if (id && $item.id === id) {\n $item.removeAttribute(\"hidden\");\n $item.removeAttribute(\"aria-hidden\");\n } else {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n }\n });\n this.$navigationItems.forEach(($item) => {\n if (id) {\n if ($item.getAttribute(\"aria-controls\") === id) {\n $item.setAttribute(\"aria-current\", \"true\");\n if (this.isFullScreen()) {\n $item.scrollIntoView({ block: \"nearest\" });\n }\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n });\n if (this.allowGridIndex) {\n this.$showIndex?.removeAttribute(\"hidden\");\n }\n this.$itemsContainer.classList.remove(\"tna-gallery__items--hide-items\");\n this.currentId = id;\n this.$liveRegion.textContent = `Image ${this.getCurrentItemIndex() + 1} of ${this.$items.length}`;\n }\n\n getCurrentItemIndex() {\n return Array.from(this.$items).findIndex(\n ($item) => $item.id === this.currentId,\n );\n }\n\n showPreviousItem() {\n let nextIndexToShow = this.getCurrentItemIndex() - 1;\n if (nextIndexToShow < 0) {\n nextIndexToShow = this.$items.length - 1;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showNextItem() {\n let nextIndexToShow = this.getCurrentItemIndex() + 1;\n if (nextIndexToShow >= this.$items.length) {\n nextIndexToShow = 0;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showFirstItem() {\n this.showItem(this.$items[0].id);\n }\n\n showLastItem() {\n this.showItem(this.$items[this.$items.length - 1].id);\n }\n\n isFullScreen() {\n return document.fullscreenElement;\n }\n\n enterFullScreen() {\n this.$module.requestFullscreen();\n this.syncFullScreen();\n this.$module.focus();\n }\n\n exitFullScreen() {\n document.exitFullscreen();\n this.syncFullScreen();\n }\n\n syncFullScreen() {\n if (this.isFullScreen()) {\n this.$enterFullscreen.setAttribute(\"hidden\", \"\");\n this.$exitFullscreen.removeAttribute(\"hidden\");\n } else {\n this.$exitFullscreen.setAttribute(\"hidden\", \"\");\n this.$enterFullscreen.removeAttribute(\"hidden\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Gallery","$module","_this","_classCallCheck","this","$itemsContainer","querySelector","$items","querySelectorAll","$navigation","$navigationItems","$options","$navigationButtons","length","classList","add","$showIndex","$enterFullscreen","$exitFullscreen","$navigationButtonPrev","$navigationButtonNext","addEventListener","syncFullScreen","setup","allowGridIndex","dataset","showIndex","currentId","id","showItem","_this$$showIndex","_this$$navigationButt","_this$$navigationButt2","_this$$navigationButt3","_this$$enterFullscree","_this$$exitFullscreen","_this$$enterFullscree2","_this2","forEach","$item","_$item$querySelector","setAttribute","removeAttribute","getAttribute","focus","e","preventDefaultKeyAction","showPreviousItem","showNextItem","showFirstItem","showLastItem","stopPropagation","preventDefault","document","fullscreenEnabled","enterFullScreen","exitFullScreen","$liveRegion","createElement","prepend","_this$$showIndex2","_this$$showIndex3","_this3","isFullScreen","scrollIntoView","block","remove","textContent","concat","getCurrentItemIndex","_this4","Array","from","findIndex","nextIndexToShow","fullscreenElement","requestFullscreen","exitFullscreen"],"sourceRoot":""}
1
+ {"version":3,"file":"components/gallery/gallery.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,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,KAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,M,qsBCLhD,IAAMC,EAAO,WAwCjB,O,EAvCD,SAAAA,EAAYC,I,4FAASC,CAAA,KAAAF,GACnBG,KAAKF,QAAUA,EACfE,KAAKC,gBACHH,GAAWA,EAAQI,cAAc,uBACnCF,KAAKG,OACHH,KAAKC,iBACLD,KAAKC,gBAAgBG,iBAAiB,sBACxCJ,KAAKK,YACHP,GAAWA,EAAQI,cAAc,4BACnCF,KAAKM,iBACHN,KAAKK,aACLP,EAAQM,iBAAiB,iCAC3BJ,KAAKO,mBACHT,GAAWA,EA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wB,EAC/CK,EAAkB,IACpBA,EAAkBhD,KAAKG,OAAOK,OAAS,GAEzCR,KAAKgB,SAAShB,KAAKG,OAAO6C,GAAiBjC,GAC7C,GAAC,CAAAhC,IAAA,eAAAa,MAED,WACE,IAAIoD,EAAkBhD,KAAK2C,sBAAwB,EAC/CK,GAAmBhD,KAAKG,OAAOK,SACjCwC,EAAkB,GAEpBhD,KAAKgB,SAAShB,KAAKG,OAAO6C,GAAiBjC,GAC7C,GAAC,CAAAhC,IAAA,gBAAAa,MAED,WACEI,KAAKgB,SAAShB,KAAKG,OAAO,GAAGY,GAC/B,GAAC,CAAAhC,IAAA,eAAAa,MAED,WACEI,KAAKgB,SAAShB,KAAKG,OAAOH,KAAKG,OAAOK,OAAS,GAAGO,GACpD,I,gFAAC,CA9JiB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","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/gallery/gallery.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\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\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};","export class Gallery {\n constructor($module) {\n this.$module = $module;\n this.$itemsContainer =\n $module && $module.querySelector(\".tna-gallery__items\");\n this.$items =\n this.$itemsContainer &&\n this.$itemsContainer.querySelectorAll(\".tna-gallery__item\");\n this.$navigation =\n $module && $module.querySelector(\".tna-gallery__navigation\");\n this.$navigationItems =\n this.$navigation &&\n $module.querySelectorAll(\".tna-gallery__navigation-item\");\n this.$navigationButtons =\n $module && $module.querySelector(\".tna-gallery__navigation-buttons\");\n\n if (\n !this.$module ||\n !this.$itemsContainer ||\n !this.$items ||\n this.$items.length < 2 ||\n !this.$navigation ||\n !this.$navigationItems ||\n !this.$navigationButtons\n ) {\n return;\n }\n\n this.$module.classList.add(\"tna-gallery--interactive\");\n\n this.$navigationButtonPrev = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-prev\",\n );\n this.$navigationButtonNext = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-next\",\n );\n\n this.setup();\n this.currentId = this.$items[0].id;\n this.showItem(this.currentId);\n }\n\n setup() {\n this.$items.forEach(($item) => {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n $item\n .querySelector(\".tna-gallery__item-header\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n });\n this.$navigation.removeAttribute(\"hidden\");\n this.$navigationItems.forEach(($item) => {\n $item.addEventListener(\"click\", () => {\n this.showItem($item.getAttribute(\"aria-controls\"));\n this.$itemsContainer.setAttribute(\"tabindex\", \"0\");\n this.$itemsContainer.focus();\n });\n });\n this.$module.addEventListener(\"keydown\", (e) => {\n let preventDefaultKeyAction = false;\n switch (e.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.showPreviousItem();\n preventDefaultKeyAction = true;\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.showNextItem();\n preventDefaultKeyAction = true;\n break;\n case \"Home\":\n this.showFirstItem();\n preventDefaultKeyAction = true;\n break;\n case \"End\":\n this.showLastItem();\n preventDefaultKeyAction = true;\n break;\n }\n if (preventDefaultKeyAction) {\n e.stopPropagation();\n e.preventDefault();\n }\n });\n\n this.$navigationButtons?.removeAttribute(\"hidden\");\n this.$navigationButtonPrev?.addEventListener(\"click\", () => {\n this.showPreviousItem();\n });\n this.$navigationButtonNext?.addEventListener(\"click\", () => {\n this.showNextItem();\n });\n\n this.$liveRegion = document.createElement(\"div\");\n this.$liveRegion.setAttribute(\"aria-live\", \"polite\");\n this.$liveRegion.setAttribute(\"aria-atomic\", \"true\");\n this.$liveRegion.setAttribute(\"class\", \"tna-gallery__item-header\");\n this.$itemsContainer.prepend(this.$liveRegion);\n this.$itemsContainer.classList.add(\"tna-gallery__items--hide-item-titles\");\n this.$itemsContainer.addEventListener(\"blur\", () =>\n this.$itemsContainer.removeAttribute(\"tabindex\"),\n );\n }\n\n showItem(id) {\n this.$items.forEach(($item) => {\n if (id && $item.id === id) {\n $item.removeAttribute(\"hidden\");\n $item.removeAttribute(\"aria-hidden\");\n } else {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n }\n });\n this.$navigationItems.forEach(($item) => {\n if (id) {\n if ($item.getAttribute(\"aria-controls\") === id) {\n $item.setAttribute(\"aria-current\", \"true\");\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n });\n this.currentId = id;\n this.$liveRegion.textContent = `Image ${this.getCurrentItemIndex() + 1} of ${this.$items.length}`;\n }\n\n getCurrentItemIndex() {\n return Array.from(this.$items).findIndex(\n ($item) => $item.id === this.currentId,\n );\n }\n\n showPreviousItem() {\n let nextIndexToShow = this.getCurrentItemIndex() - 1;\n if (nextIndexToShow < 0) {\n nextIndexToShow = this.$items.length - 1;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showNextItem() {\n let nextIndexToShow = this.getCurrentItemIndex() + 1;\n if (nextIndexToShow >= this.$items.length) {\n nextIndexToShow = 0;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showFirstItem() {\n this.showItem(this.$items[0].id);\n }\n\n showLastItem() {\n this.showItem(this.$items[this.$items.length - 1].id);\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Gallery","$module","_classCallCheck","this","$itemsContainer","querySelector","$items","querySelectorAll","$navigation","$navigationItems","$navigationButtons","length","classList","add","$navigationButtonPrev","$navigationButtonNext","setup","currentId","id","showItem","_this$$navigationButt","_this$$navigationButt2","_this$$navigationButt3","_this","forEach","$item","_$item$querySelector","setAttribute","removeAttribute","addEventListener","getAttribute","focus","e","preventDefaultKeyAction","showPreviousItem","showNextItem","showFirstItem","showLastItem","stopPropagation","preventDefault","$liveRegion","document","createElement","prepend","textContent","concat","getCurrentItemIndex","_this2","Array","from","findIndex","nextIndexToShow"],"sourceRoot":""}
@@ -11,7 +11,6 @@ export class Gallery {
11
11
  this.$navigationItems =
12
12
  this.$navigation &&
13
13
  $module.querySelectorAll(".tna-gallery__navigation-item");
14
- this.$options = $module && $module.querySelector(".tna-gallery__options");
15
14
  this.$navigationButtons =
16
15
  $module && $module.querySelector(".tna-gallery__navigation-buttons");
17
16
 
@@ -22,7 +21,6 @@ export class Gallery {
22
21
  this.$items.length < 2 ||
23
22
  !this.$navigation ||
24
23
  !this.$navigationItems ||
25
- !this.$options ||
26
24
  !this.$navigationButtons
27
25
  ) {
28
26
  return;
@@ -30,14 +28,6 @@ export class Gallery {
30
28
 
31
29
  this.$module.classList.add("tna-gallery--interactive");
32
30
 
33
- this.$showIndex = this.$options.querySelector('button[value="show-index"]');
34
- this.$enterFullscreen = this.$options.querySelector(
35
- 'button[value="enter-fullscreen"]',
36
- );
37
- this.$exitFullscreen = this.$options.querySelector(
38
- 'button[value="exit-fullscreen"]',
39
- );
40
-
41
31
  this.$navigationButtonPrev = this.$navigationButtons.querySelector(
42
32
  ".tna-gallery__navigation-prev",
43
33
  );
@@ -45,18 +35,9 @@ export class Gallery {
45
35
  ".tna-gallery__navigation-next",
46
36
  );
47
37
 
48
- this.$module.addEventListener("fullscreenchange", () =>
49
- this.syncFullScreen(),
50
- );
51
-
52
38
  this.setup();
53
- this.allowGridIndex = this.$module.dataset["showgrid"] || false;
54
- if (this.allowGridIndex) {
55
- this.showIndex();
56
- } else {
57
- this.currentId = this.$items[0].id;
58
- this.showItem(this.currentId);
59
- }
39
+ this.currentId = this.$items[0].id;
40
+ this.showItem(this.currentId);
60
41
  }
61
42
 
62
43
  setup() {
@@ -102,21 +83,7 @@ export class Gallery {
102
83
  e.preventDefault();
103
84
  }
104
85
  });
105
- this.$options.removeAttribute("hidden");
106
- if (
107
- document.fullscreenEnabled &&
108
- this.$enterFullscreen &&
109
- this.$exitFullscreen
110
- ) {
111
- this.$enterFullscreen?.addEventListener("click", () =>
112
- this.enterFullScreen(),
113
- );
114
- this.$exitFullscreen?.addEventListener("click", () =>
115
- this.exitFullScreen(),
116
- );
117
- this.$enterFullscreen?.removeAttribute("hidden");
118
- }
119
- this.$showIndex?.addEventListener("click", () => this.showIndex());
86
+
120
87
  this.$navigationButtons?.removeAttribute("hidden");
121
88
  this.$navigationButtonPrev?.addEventListener("click", () => {
122
89
  this.showPreviousItem();
@@ -136,12 +103,6 @@ export class Gallery {
136
103
  );
137
104
  }
138
105
 
139
- showIndex() {
140
- this.showItem("");
141
- this.$itemsContainer.classList.add("tna-gallery__items--hide-items");
142
- this.$showIndex?.setAttribute("hidden", "");
143
- }
144
-
145
106
  showItem(id) {
146
107
  this.$items.forEach(($item) => {
147
108
  if (id && $item.id === id) {
@@ -156,9 +117,6 @@ export class Gallery {
156
117
  if (id) {
157
118
  if ($item.getAttribute("aria-controls") === id) {
158
119
  $item.setAttribute("aria-current", "true");
159
- if (this.isFullScreen()) {
160
- $item.scrollIntoView({ block: "nearest" });
161
- }
162
120
  } else {
163
121
  $item.setAttribute("aria-current", "false");
164
122
  }
@@ -166,10 +124,6 @@ export class Gallery {
166
124
  $item.setAttribute("aria-current", "false");
167
125
  }
168
126
  });
169
- if (this.allowGridIndex) {
170
- this.$showIndex?.removeAttribute("hidden");
171
- }
172
- this.$itemsContainer.classList.remove("tna-gallery__items--hide-items");
173
127
  this.currentId = id;
174
128
  this.$liveRegion.textContent = `Image ${this.getCurrentItemIndex() + 1} of ${this.$items.length}`;
175
129
  }
@@ -203,29 +157,4 @@ export class Gallery {
203
157
  showLastItem() {
204
158
  this.showItem(this.$items[this.$items.length - 1].id);
205
159
  }
206
-
207
- isFullScreen() {
208
- return document.fullscreenElement;
209
- }
210
-
211
- enterFullScreen() {
212
- this.$module.requestFullscreen();
213
- this.syncFullScreen();
214
- this.$module.focus();
215
- }
216
-
217
- exitFullScreen() {
218
- document.exitFullscreen();
219
- this.syncFullScreen();
220
- }
221
-
222
- syncFullScreen() {
223
- if (this.isFullScreen()) {
224
- this.$enterFullscreen.setAttribute("hidden", "");
225
- this.$exitFullscreen.removeAttribute("hidden");
226
- } else {
227
- this.$exitFullscreen.setAttribute("hidden", "");
228
- this.$enterFullscreen.removeAttribute("hidden");
229
- }
230
- }
231
160
  }
@@ -1,4 +1,3 @@
1
- @use "../../variables/a11y" as a11yVariables;
2
1
  @use "../../variables/borders" as bordersVars;
3
2
  @use "../../tools/a11y";
4
3
  @use "../../tools/borders";
@@ -17,6 +16,8 @@
17
16
  border-radius: 0.1px;
18
17
 
19
18
  &__header {
19
+ padding-bottom: spacing.space(1);
20
+
20
21
  grid-column: 1 / 3;
21
22
  grid-row: 1;
22
23
 
@@ -28,24 +29,6 @@
28
29
  flex: 1;
29
30
  }
30
31
 
31
- &__options {
32
- margin-top: 0;
33
-
34
- flex-direction: column;
35
- align-items: flex-end;
36
- justify-content: flex-start;
37
-
38
- .tna-button {
39
- white-space: nowrap;
40
-
41
- &[value="enter-fullscreen"] {
42
- @include media.on-mobile {
43
- display: none;
44
- }
45
- }
46
- }
47
- }
48
-
49
32
  &__items,
50
33
  &__navigation-buttons {
51
34
  grid-column: 1 / 3;
@@ -58,7 +41,9 @@
58
41
 
59
42
  border-radius: 0.1px;
60
43
 
61
- @include a11y.no-focus-outline-on-click;
44
+ .tna-template--clicked &:focus {
45
+ @include a11y.no-focus-outline;
46
+ }
62
47
  }
63
48
 
64
49
  &__item {
@@ -69,7 +54,7 @@
69
54
  }
70
55
 
71
56
  &__item-header {
72
- padding: spacing.space(1);
57
+ padding: 0 spacing.space(1) spacing.space(1);
73
58
 
74
59
  line-height: 1;
75
60
  text-align: center;
@@ -114,7 +99,7 @@
114
99
  aspect-ratio: 3 / 2;
115
100
 
116
101
  position: relative;
117
- top: 3rem;
102
+ top: spacing.space(2);
118
103
  z-index: 2;
119
104
 
120
105
  pointer-events: none;
@@ -201,12 +186,6 @@
201
186
  transform: rotate(45deg);
202
187
  }
203
188
 
204
- &__items--hide-item-titles &__item &__item-header,
205
- &__items--hide-items,
206
- &__items--hide-items + &__navigation-buttons {
207
- display: none;
208
- }
209
-
210
189
  &__navigation {
211
190
  max-height: 40rem;
212
191
  max-height: clamp(15rem, calc(100vh - #{spacing.space(2)}), 40rem);
@@ -293,7 +272,6 @@
293
272
 
294
273
  @include colour.colour-background("background");
295
274
 
296
- // @include borders.rounded-border;
297
275
  border-radius: 0 0 bordersVars.$rounded-border-radius 0;
298
276
  }
299
277
 
@@ -319,11 +297,6 @@
319
297
  }
320
298
 
321
299
  @include media.on-mobile {
322
- &__options {
323
- flex-direction: row-reverse;
324
- align-items: flex-start;
325
- }
326
-
327
300
  &__navigation {
328
301
  grid-template-columns: repeat(3, 1fr);
329
302
  }
@@ -340,122 +313,28 @@
340
313
  @include colour.tint;
341
314
  }
342
315
 
343
- &:fullscreen {
344
- @include colour.contrast;
345
- }
346
-
347
- &--bounded &__header,
348
- &:fullscreen &__header {
316
+ &--bounded &__header {
349
317
  padding: spacing.space(1);
350
318
  }
351
319
 
352
- &:fullscreen &__header-inner {
353
- display: none;
320
+ &--bounded &__navigation-buttons {
321
+ top: spacing.space(3);
354
322
  }
355
323
 
356
- &:fullscreen &__options {
357
- flex: 1;
358
-
359
- flex-direction: row;
360
- align-items: flex-start;
361
- justify-content: flex-end;
362
-
363
- .tna-button[value="show-index"] {
364
- display: none;
365
- }
324
+ &--bounded &__item-header {
325
+ padding-top: spacing.space(1);
366
326
  }
367
327
 
368
328
  &--bounded &__item-figure-inner {
369
329
  border-radius: 0.1px;
370
330
  }
371
331
 
372
- &--bounded &__item-description,
373
- &:fullscreen &__item-description {
332
+ &--bounded &__item-description {
374
333
  margin-right: spacing.space(1);
375
334
  margin-left: spacing.space(1);
376
335
  }
377
336
 
378
- &:fullscreen &__item-description {
379
- max-height: 6rem;
380
-
381
- overflow: auto;
382
- }
383
-
384
- &:fullscreen &__navigation {
385
- max-height: none;
386
- }
387
-
388
- @media (aspect-ratio >= 1/1) {
389
- &:fullscreen &__header {
390
- grid-column: 2 / 3;
391
- }
392
-
393
- &:fullscreen &__items {
394
- grid-column: 1;
395
- grid-row: 1 / 4;
396
-
397
- display: flex;
398
- flex-direction: column;
399
- }
400
-
401
- &:fullscreen &__item {
402
- flex: 1;
403
- }
404
-
405
- &:fullscreen &__item-figure {
406
- flex: 1;
407
- }
408
-
409
- &:fullscreen &__item-figure-inner {
410
- border-radius: 0 bordersVars.$rounded-border-radius
411
- bordersVars.$rounded-border-radius 0;
412
- }
413
-
414
- &:fullscreen &__item-description {
415
- margin-right: 0;
416
- margin-bottom: 0;
417
- }
418
-
419
- &:fullscreen &__item-figure-inner,
420
- &:fullscreen &__navigation-buttons {
421
- max-height: none;
422
- flex: 1;
423
-
424
- aspect-ratio: auto;
425
- }
426
-
427
- &:fullscreen &__navigation-buttons {
428
- width: auto;
429
- padding: spacing.space(1);
430
-
431
- grid-column: 1;
432
- grid-row: 4;
433
-
434
- display: flex;
435
- align-items: center;
436
- justify-content: space-between;
437
-
438
- top: 0;
439
- }
440
-
441
- &:fullscreen &__navigation-button {
442
- width: auto;
443
- padding: 0;
444
-
445
- position: static;
446
-
447
- opacity: 1;
448
- }
449
-
450
- &:fullscreen &__navigation {
451
- // padding-top: 0;
452
- // padding-left: 0;
453
-
454
- grid-column: 2 / 3;
455
- grid-row: 2 / 4;
456
-
457
- grid-template-columns: repeat(3, 1fr);
458
- gap: spacing.space(0.5);
459
- }
337
+ &__items--hide-item-titles &__item &__item-header {
338
+ display: none;
460
339
  }
461
340
  }
@@ -74,12 +74,6 @@
74
74
  "required": true,
75
75
  "description": "A unique ID for the gallery component."
76
76
  },
77
- {
78
- "name": "showGrid",
79
- "type": "boolean",
80
- "required": false,
81
- "description": "If `true`, don't select the first image when the gallery loads and instead show a grid of images."
82
- },
83
77
  {
84
78
  "name": "bounded",
85
79
  "type": "boolean",
@@ -5,7 +5,8 @@
5
5
  {%- set containerClasses = containerClasses.concat('tna-gallery--bounded') -%}
6
6
  {%- endif -%}
7
7
  {%- set classes = containerClasses | join(' ') -%}
8
- <section class="tna-gallery{% if classes %} {{ classes }}{% endif %}" data-module="tna-gallery"{% if params.showGrid %} data-showgrid="true"{% endif %}{% for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>
8
+ <section class="tna-gallery{% if classes %} {{ classes }}{% endif %}" data-module="tna-gallery"{% for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>
9
+ {%- if params.title or params.text or params.body %}
9
10
  <div class="tna-gallery__header">
10
11
  <div class="tna-gallery__header-inner">
11
12
  {%- if params.title %}
@@ -19,39 +20,8 @@
19
20
  {{ params.body | safe }}
20
21
  {%- endif %}
21
22
  </div>
22
- <div class="tna-gallery__options tna-button-group tna-button-group--small" hidden>
23
- {{ tnaButton({
24
- html: '<span class="tna-visually-hidden">View the ' ~ (params.title or '') ~ ' gallery in </span>Full screen',
25
- iconSvg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" height="24" aria-hidden="true" focusable="false"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M128 96C110.3 96 96 110.3 96 128L96 224C96 241.7 110.3 256 128 256C145.7 256 160 241.7 160 224L160 160L224 160C241.7 160 256 145.7 256 128C256 110.3 241.7 96 224 96L128 96zM160 416C160 398.3 145.7 384 128 384C110.3 384 96 398.3 96 416L96 512C96 529.7 110.3 544 128 544L224 544C241.7 544 256 529.7 256 512C256 494.3 241.7 480 224 480L160 480L160 416zM416 96C398.3 96 384 110.3 384 128C384 145.7 398.3 160 416 160L480 160L480 224C480 241.7 494.3 256 512 256C529.7 256 544 241.7 544 224L544 128C544 110.3 529.7 96 512 96L416 96zM544 416C544 398.3 529.7 384 512 384C494.3 384 480 398.3 480 416L480 480L416 480C398.3 480 384 494.3 384 512C384 529.7 398.3 544 416 544L512 544C529.7 544 544 529.7 544 512L544 416z"/></svg>',
26
- iconOnlyOnMobile: true,
27
- buttonElement: true,
28
- attributes: {
29
- hidden: "",
30
- value: "enter-fullscreen"
31
- }
32
- }) | indent(6) }}
33
- {{ tnaButton({
34
- text: "Exit full screen",
35
- iconSvg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" height="24" aria-hidden="true" focusable="false"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M256 128C256 110.3 241.7 96 224 96C206.3 96 192 110.3 192 128L192 192L128 192C110.3 192 96 206.3 96 224C96 241.7 110.3 256 128 256L224 256C241.7 256 256 241.7 256 224L256 128zM128 384C110.3 384 96 398.3 96 416C96 433.7 110.3 448 128 448L192 448L192 512C192 529.7 206.3 544 224 544C241.7 544 256 529.7 256 512L256 416C256 398.3 241.7 384 224 384L128 384zM448 128C448 110.3 433.7 96 416 96C398.3 96 384 110.3 384 128L384 224C384 241.7 398.3 256 416 256L512 256C529.7 256 544 241.7 544 224C544 206.3 529.7 192 512 192L448 192L448 128zM416 384C398.3 384 384 398.3 384 416L384 512C384 529.7 398.3 544 416 544C433.7 544 448 529.7 448 512L448 448L512 448C529.7 448 544 433.7 544 416C544 398.3 529.7 384 512 384L416 384z"/></svg>',
36
- iconOnlyOnMobile: true,
37
- buttonElement: true,
38
- attributes: {
39
- hidden: "",
40
- value: "exit-fullscreen"
41
- }
42
- }) | indent(6) }}
43
- {{ tnaButton({
44
- text: "See all images",
45
- iconSvg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" height="24" aria-hidden="true" focusable="false"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M152 160C174.1 160 192 177.9 192 200L192 248C192 270.1 174.1 288 152 288L104 288C81.9 288 64 270.1 64 248L64 200C64 177.9 81.9 160 104 160L152 160zM344 288L296 288C273.9 288 256 270.1 256 248L256 200C256 177.9 273.9 160 296 160L344 160C366.1 160 384 177.9 384 200L384 248C384 270.1 366.1 288 344 288zM536 288L488 288C465.9 288 448 270.1 448 248L448 200C448 177.9 465.9 160 488 160L536 160C558.1 160 576 177.9 576 200L576 248C576 270.1 558.1 288 536 288zM536 480L488 480C465.9 480 448 462.1 448 440L448 392C448 369.9 465.9 352 488 352L536 352C558.1 352 576 369.9 576 392L576 440C576 462.1 558.1 480 536 480zM344 352C366.1 352 384 369.9 384 392L384 440C384 462.1 366.1 480 344 480L296 480C273.9 480 256 462.1 256 440L256 392C256 369.9 273.9 352 296 352L344 352zM152 480L104 480C81.9 480 64 462.1 64 440L64 392C64 369.9 81.9 352 104 352L152 352C174.1 352 192 369.9 192 392L192 440C192 462.1 174.1 480 152 480z"/></svg>',
46
- iconOnlyOnMobile: true,
47
- buttonElement: true,
48
- attributes: {
49
- hidden: "",
50
- value: "show-index"
51
- }
52
- }) | indent(6) }}
53
- </div>
54
23
  </div>
24
+ {%- endif %}
55
25
  <div class="tna-gallery__items">
56
26
  {%- for item in params.items %}
57
27
  <div class="tna-gallery__item" id="{{ params.id }}-item-{{ loop.index }}">
@@ -1 +1 @@
1
- .tna-global-header{--background: var(--contrast-background);--font-base: var(--contrast-font-base);--font-dark: var(--contrast-font-dark);--font-light: var(--contrast-font-light);--icon-light: var(--contrast-icon-light);--link: var(--contrast-link);--link-visited: var(--contrast-link-visited);--keyline: var(--contrast-keyline);--keyline-dark: var(--contrast-keyline-dark);--button-text: var(--contrast-button-text);--button-background: var(--contrast-button-background);--button-hover-text: var(--contrast-button-hover-text);--button-hover-background: var(--contrast-button-hover-background);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-global-header{background:linear-gradient(0deg, rgb(34, 34, 34) 0%, rgb(0, 0, 0) 100%);color:var(--font-base, #343338)}.tna-template--dark-theme .tna-global-header{background:#010101}@media(prefers-color-scheme: dark){.tna-template--system-theme .tna-global-header{background:#010101}}.tna-global-header__main{padding-top:16px;padding-bottom:24px}.tna-global-header__logo-wrapper{margin-top:8px;display:flex}.tna-global-header__logo{display:flex;align-items:flex-end;gap:16px;text-decoration:none}.tna-global-header__logo--link,.tna-global-header__logo--link:link,.tna-global-header__logo--link:visited{color:var(--font-base, #343338)}.tna-global-header__logo--link:hover{outline:.3125rem var(--font-dark, rgb(1, 1, 1)) solid;outline-offset:2px}.tna-global-header__logo--link:focus-visible{outline:5px var(--focus-outline, rgb(0, 176, 255)) solid;outline-offset:2px}.tna-global-header__logo-strapline{padding-right:10px;line-height:2.25rem;text-transform:uppercase;font-family:supria-sans-condensed,"Arial Narrow",sans-serif;font-weight:500;font-size:1.25rem}.tna-global-header__navigation-button-wrapper{display:none}.tna-global-header__hamburger{width:2rem;height:.25rem;display:inline-block;background-color:var(--font-dark, rgb(1, 1, 1))}.tna-global-header__hamburger::before,.tna-global-header__hamburger::after{content:"";width:2rem;height:.25rem;display:block;position:absolute;right:0;background-color:inherit}.tna-global-header__hamburger::before{top:0}.tna-global-header__hamburger::after{bottom:0}.tna-global-header__navigation-button{height:2rem;padding:0;appearance:none;display:flex;align-items:center;gap:.75rem;position:relative;color:inherit;background:none;border:0 rgba(0,0,0,0) solid;border-width:.25rem 0;border-radius:.1px;cursor:pointer;font-weight:700;font-size:1rem}.tna-global-header__navigation-button:hover,.tna-global-header__navigation-button:focus-visible{text-decoration:underline;text-decoration-thickness:0.25rem;text-underline-offset:.125em}.tna-global-header__navigation-button--opened .tna-global-header__hamburger{height:0}.tna-global-header__navigation-button--opened .tna-global-header__hamburger::before{top:.625rem;transform:rotate(-135deg)}.tna-global-header__navigation-button--opened .tna-global-header__hamburger::after{bottom:.625rem;transform:rotate(135deg)}.tna-global-header__navigation{height:100%;margin:8px 0 0;position:relative;columns:2;column-gap:32px;list-style:none}.tna-global-header__navigation-item{break-inside:avoid}.tna-global-header__navigation-item-link{min-width:15rem;height:2.25rem;display:block;box-sizing:border-box;line-height:2.25rem;text-decoration:none;font-size:1.0625rem;border-bottom:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}.tna-global-header__navigation-item-link,.tna-global-header__navigation-item-link:link,.tna-global-header__navigation-item-link:visited{color:var(--font-base, #343338)}.tna-global-header__navigation-item-link:hover,.tna-global-header__navigation-item-link:focus-visible{text-decoration:underline;text-decoration-thickness:0.25rem;text-underline-offset:.125em}.tna-global-header__top-navigation{padding:0 0 8px;display:flex;justify-content:flex-end;gap:24px;font-size:0.9375rem;list-style:none}.tna-global-header__top-navigation-link{display:flex;align-items:center;gap:8px;text-decoration:none}.tna-global-header__top-navigation-link,.tna-global-header__top-navigation-link:link,.tna-global-header__top-navigation-link:visited{color:var(--font-light, rgba(1, 1, 1, 0.58))}.tna-global-header__top-navigation-link:hover,.tna-global-header__top-navigation-link:focus-visible{color:var(--font-base, #343338);text-decoration:underline;text-decoration-thickness:0.25rem;text-underline-offset:.125em}.tna-global-header__top-navigation-link svg{height:1em;display:inline-block}.tna-global-header__top-navigation-link svg path{fill:currentColor}.tna-global-header .tna-logo{width:6.75rem;height:6.75rem;flex-shrink:0}.tna-global-header .tna-logo svg{width:100%;height:100%}@media(min-width: 48.0625em)and (max-width: 64em){.tna-global-header__navigation{column-gap:16px}.tna-global-header__navigation-item-link{font-size:1rem}.tna-global-header--collapse-on-medium .tna-global-header__navigation-wrapper{width:100%}.tna-global-header--collapse-on-medium .tna-global-header__top-navigation-wrapper{flex:1;order:2}.tna-global-header--collapse-on-medium .tna-global-header__main{padding-bottom:16px}.tna-global-header--collapse-on-medium .tna-global-header__logo{gap:12px}.tna-global-header--collapse-on-medium .tna-global-header__logo-wrapper{margin-top:8px;margin-bottom:8px}.tna-global-header--collapse-on-medium .tna-logo{width:5rem;height:5rem}.tna-global-header--collapse-on-medium .tna-global-header__logo-strapline{line-height:1.6666666667rem}.tna-global-header--collapse-on-medium .tna-global-header__navigation{margin-bottom:8px}.tna-global-header--collapse-on-medium .tna-global-header__navigation,.tna-global-header--collapse-on-medium .tna-global-header__navigation-item,.tna-global-header--collapse-on-medium .tna-global-header__navigation-item-link{height:auto}}@media(max-width: 48em){.tna-global-header__main{padding-bottom:0}.tna-global-header__logo-wrapper,.tna-global-header__navigation-button-wrapper{margin-top:0;margin-bottom:16px}.tna-global-header__logo{gap:12px}.tna-global-header__navigation-button-wrapper{display:flex;align-items:center}.tna-global-header__navigation,.tna-global-header__navigation-item,.tna-global-header__navigation-item-link{height:auto}.tna-global-header__navigation{margin-top:0;columns:1;background-color:hsla(0,0%,100%,.1);border-top:2px var(--keyline-dark, rgb(38, 38, 42)) solid;border-bottom:2px var(--keyline-dark, rgb(38, 38, 42)) solid}.tna-global-header__navigation-item{flex-direction:column;align-items:flex-start}.tna-global-header__navigation-item-link{line-height:1.75rem;font-weight:600}.tna-global-header__navigation-item:last-child .tna-global-header__navigation-item-link{border-bottom:none}.tna-global-header__navigation-item-contents{display:block}.tna-global-header__navigation-item-children{margin-bottom:16px;margin-left:24px}.tna-global-header__top-navigation{padding-top:8px;padding-bottom:8px;justify-content:flex-start;gap:24px}.tna-global-header__top-navigation-link{padding:4px 0}}@media(min-width: 30.0625em)and (max-width: 48em){.tna-global-header .tna-logo{width:4rem;height:4rem}.tna-global-header__logo-strapline{line-height:1.25rem}.tna-global-header__navigation{width:calc(100% + 64px);left:-32px}.tna-global-header__navigation-item-link{padding:8px 32px}}@media(max-width: 30em){.tna-global-header .tna-logo{width:3.5rem;height:3.5rem}.tna-global-header__logo-strapline{line-height:1}.tna-global-header__navigation-button{font-size:0.875rem}.tna-global-header__navigation{width:calc(100% + 32px);left:-16px}.tna-global-header__navigation-item-link{padding:8px 16px}}@media(forced-colors: active){.tna-global-header{border-bottom:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}}@media(prefers-contrast: more){.tna-global-header{border-bottom:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}}@media(forced-colors: active){.tna-global-header__navigation-button{height:auto;line-height:2;font-size:1.125rem;font-weight:700;border:none}.tna-global-header__hamburger{display:none}}/*# sourceMappingURL=global-header.css.map */
1
+ .tna-global-header{--background: var(--contrast-background);--font-base: var(--contrast-font-base);--font-dark: var(--contrast-font-dark);--font-light: var(--contrast-font-light);--icon-light: var(--contrast-icon-light);--link: var(--contrast-link);--link-visited: var(--contrast-link-visited);--keyline: var(--contrast-keyline);--keyline-dark: var(--contrast-keyline-dark);--button-text: var(--contrast-button-text);--button-background: var(--contrast-button-background);--button-hover-text: var(--contrast-button-hover-text);--button-hover-background: var(--contrast-button-hover-background);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-global-header{background:linear-gradient(0deg, rgb(34, 34, 34) 0%, rgb(0, 0, 0) 100%);color:var(--font-base, #343338)}.tna-template--dark-theme .tna-global-header{background:#010101}@media(prefers-color-scheme: dark){.tna-template--system-theme .tna-global-header{background:#010101}}.tna-global-header__main{padding-top:16px;padding-bottom:24px}.tna-global-header__logo-wrapper{margin-top:8px;display:flex}.tna-global-header__logo{display:flex;align-items:flex-end;gap:16px;text-decoration:none}.tna-global-header__logo--link,.tna-global-header__logo--link:link,.tna-global-header__logo--link:visited{color:var(--font-base, #343338)}.tna-global-header__logo--link:hover{outline:.3125rem var(--font-dark, rgb(1, 1, 1)) solid;outline-offset:2px}.tna-global-header__logo-strapline{padding-right:10px;line-height:2.25rem;text-transform:uppercase;font-family:supria-sans-condensed,"Arial Narrow",sans-serif;font-weight:500;font-size:1.25rem}.tna-global-header__navigation-button-wrapper{display:none}.tna-global-header__hamburger{width:2rem;height:.25rem;display:inline-block;background-color:var(--font-dark, rgb(1, 1, 1))}.tna-global-header__hamburger::before,.tna-global-header__hamburger::after{content:"";width:2rem;height:.25rem;display:block;position:absolute;right:0;background-color:inherit}.tna-global-header__hamburger::before{top:0}.tna-global-header__hamburger::after{bottom:0}.tna-global-header__navigation-button{height:2rem;padding:0;appearance:none;display:flex;align-items:center;gap:.75rem;position:relative;color:inherit;background:none;border:0 rgba(0,0,0,0) solid;border-width:.25rem 0;border-radius:.1px;cursor:pointer;font-weight:700;font-size:1rem}.tna-global-header__navigation-button:hover{text-decoration:underline;text-decoration-thickness:0.25rem;text-underline-offset:.125em}.tna-global-header__navigation-button--opened .tna-global-header__hamburger{height:0}.tna-global-header__navigation-button--opened .tna-global-header__hamburger::before{top:.625rem;transform:rotate(-135deg)}.tna-global-header__navigation-button--opened .tna-global-header__hamburger::after{bottom:.625rem;transform:rotate(135deg)}.tna-global-header__navigation{height:100%;margin:8px 0 0;position:relative;columns:2;column-gap:32px;list-style:none}.tna-global-header__navigation-item{break-inside:avoid}.tna-global-header__navigation-item-link{min-width:15rem;height:2.25rem;display:block;box-sizing:border-box;line-height:2.25rem;text-decoration:none;font-size:1.0625rem;border-bottom:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}.tna-global-header__navigation-item-link,.tna-global-header__navigation-item-link:link,.tna-global-header__navigation-item-link:visited{color:var(--font-base, #343338)}.tna-global-header__navigation-item-link:hover{text-decoration:underline;text-decoration-thickness:0.25rem;text-underline-offset:.125em}.tna-global-header__top-navigation{padding:0 0 8px;display:flex;justify-content:flex-end;gap:24px;font-size:0.9375rem;list-style:none}.tna-global-header__top-navigation-link{display:flex;align-items:center;gap:8px;text-decoration:none}.tna-global-header__top-navigation-link,.tna-global-header__top-navigation-link:link,.tna-global-header__top-navigation-link:visited{color:var(--font-light, rgba(1, 1, 1, 0.58))}.tna-global-header__top-navigation-link:hover,.tna-global-header__top-navigation-link:focus-visible{color:var(--font-base, #343338)}.tna-global-header__top-navigation-link:hover{text-decoration:underline;text-decoration-thickness:0.25rem;text-underline-offset:.125em}.tna-global-header__top-navigation-link svg{height:1em;display:inline-block}.tna-global-header__top-navigation-link svg path{fill:currentColor}.tna-global-header .tna-logo{width:6.75rem;height:6.75rem;flex-shrink:0}.tna-global-header .tna-logo svg{width:100%;height:100%}@media(min-width: 48.0625em)and (max-width: 64em){.tna-global-header__navigation{column-gap:16px}.tna-global-header__navigation-item-link{font-size:1rem}.tna-global-header--collapse-on-medium .tna-global-header__navigation-wrapper{width:100%}.tna-global-header--collapse-on-medium .tna-global-header__top-navigation-wrapper{flex:1;order:2}.tna-global-header--collapse-on-medium .tna-global-header__main{padding-bottom:16px}.tna-global-header--collapse-on-medium .tna-global-header__logo{gap:12px}.tna-global-header--collapse-on-medium .tna-global-header__logo-wrapper{margin-top:8px;margin-bottom:8px}.tna-global-header--collapse-on-medium .tna-logo{width:5rem;height:5rem}.tna-global-header--collapse-on-medium .tna-global-header__logo-strapline{line-height:1.6666666667rem}.tna-global-header--collapse-on-medium .tna-global-header__navigation{margin-bottom:8px}.tna-global-header--collapse-on-medium .tna-global-header__navigation,.tna-global-header--collapse-on-medium .tna-global-header__navigation-item,.tna-global-header--collapse-on-medium .tna-global-header__navigation-item-link{height:auto}}@media(max-width: 48em){.tna-global-header__main{padding-bottom:0}.tna-global-header__logo-wrapper,.tna-global-header__navigation-button-wrapper{margin-top:0;margin-bottom:16px}.tna-global-header__logo{gap:12px}.tna-global-header__navigation-button-wrapper{display:flex;align-items:center}.tna-global-header__navigation,.tna-global-header__navigation-item,.tna-global-header__navigation-item-link{height:auto}.tna-global-header__navigation{margin-top:0;columns:1;background-color:hsla(0,0%,100%,.1);border-top:2px var(--keyline-dark, rgb(38, 38, 42)) solid;border-bottom:2px var(--keyline-dark, rgb(38, 38, 42)) solid}.tna-global-header__navigation-item{flex-direction:column;align-items:flex-start}.tna-global-header__navigation-item-link{line-height:1.75rem;font-weight:600}.tna-global-header__navigation-item:last-child .tna-global-header__navigation-item-link{border-bottom:none}.tna-global-header__navigation-item-contents{display:block}.tna-global-header__navigation-item-children{margin-bottom:16px;margin-left:24px}.tna-global-header__top-navigation{padding-top:8px;padding-bottom:8px;justify-content:flex-start;gap:24px}.tna-global-header__top-navigation-link{padding:4px 0}}@media(min-width: 30.0625em)and (max-width: 48em){.tna-global-header .tna-logo{width:4rem;height:4rem}.tna-global-header__logo-strapline{line-height:1.25rem}.tna-global-header__navigation{width:calc(100% + 64px);left:-32px}.tna-global-header__navigation-item-link{padding:8px 32px}}@media(max-width: 30em){.tna-global-header .tna-logo{width:3.5rem;height:3.5rem}.tna-global-header__logo-strapline{line-height:1}.tna-global-header__navigation-button{font-size:0.875rem}.tna-global-header__navigation{width:calc(100% + 32px);left:-16px}.tna-global-header__navigation-item-link{padding:8px 16px}}@media(forced-colors: active){.tna-global-header{border-bottom:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}}@media(prefers-contrast: more){.tna-global-header{border-bottom:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}}@media(forced-colors: active){.tna-global-header__navigation-button{height:auto;line-height:2;font-size:1.125rem;font-weight:700;border:none}.tna-global-header__hamburger{display:none}}/*# sourceMappingURL=global-header.css.map */