@nationalarchives/frontend 0.1.14-prerelease → 0.1.16-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 (89) hide show
  1. package/LICENCE +21 -0
  2. package/nationalarchives/all.css +1 -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.mjs +7 -7
  7. package/nationalarchives/all.scss +2 -5
  8. package/nationalarchives/components/_index.scss +1 -0
  9. package/nationalarchives/components/breadcrumbs/_index.scss +54 -39
  10. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +2 -0
  11. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -0
  12. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +67 -0
  13. package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +10 -3
  14. package/nationalarchives/components/breadcrumbs/fixtures.json +23 -1
  15. package/nationalarchives/components/breadcrumbs/macro-options.json +6 -0
  16. package/nationalarchives/components/breadcrumbs/template.njk +17 -12
  17. package/nationalarchives/components/button/_index.scss +1 -2
  18. package/nationalarchives/components/button/button.stories.js +2 -3
  19. package/nationalarchives/components/button/fixtures.json +5 -5
  20. package/nationalarchives/components/button/template.njk +1 -1
  21. package/nationalarchives/components/card/_index.scss +78 -34
  22. package/nationalarchives/components/card/card.stories.js +72 -5
  23. package/nationalarchives/components/card/fixtures.json +15 -2
  24. package/nationalarchives/components/card/macro-options.json +6 -12
  25. package/nationalarchives/components/card/template.njk +6 -6
  26. package/nationalarchives/components/filters/filters.stories.js +3 -4
  27. package/nationalarchives/components/footer/_index.scss +8 -14
  28. package/nationalarchives/components/footer/footer.stories.js +2 -3
  29. package/nationalarchives/components/footer/template.njk +1 -1
  30. package/nationalarchives/components/grid/_index.scss +2 -2
  31. package/nationalarchives/components/grid/grid.stories.js +2 -3
  32. package/nationalarchives/components/header/_index.scss +27 -26
  33. package/nationalarchives/components/header/header.stories.js +2 -3
  34. package/nationalarchives/components/header/template.njk +1 -1
  35. package/nationalarchives/components/hero/_index.scss +7 -20
  36. package/nationalarchives/components/hero/hero.stories.js +2 -3
  37. package/nationalarchives/components/index-grid/_index.scss +17 -1
  38. package/nationalarchives/components/index-grid/index-grid.stories.js +7 -5
  39. package/nationalarchives/components/index-grid/macro-options.json +22 -2
  40. package/nationalarchives/components/index-grid/template.njk +12 -6
  41. package/nationalarchives/components/message/_index.scss +4 -6
  42. package/nationalarchives/components/message/phase-banner.stories.js +2 -3
  43. package/nationalarchives/components/phase-banner/phase-banner.stories.js +2 -3
  44. package/nationalarchives/components/picture/_index.scss +12 -15
  45. package/nationalarchives/components/picture/picture.stories.js +2 -3
  46. package/nationalarchives/components/profile/profile.stories.js +2 -3
  47. package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +3 -4
  48. package/nationalarchives/components/skip-link/_index.scss +63 -0
  49. package/nationalarchives/components/skip-link/fixtures.json +11 -0
  50. package/nationalarchives/components/skip-link/macro-options.json +26 -0
  51. package/nationalarchives/components/skip-link/macro.njk +3 -0
  52. package/nationalarchives/components/skip-link/skip-link.stories.js +31 -0
  53. package/nationalarchives/components/skip-link/template.njk +4 -0
  54. package/nationalarchives/components/tabs/_index.scss +7 -14
  55. package/nationalarchives/components/tabs/tabs.stories.js +2 -3
  56. package/nationalarchives/patterns/featured-collection/_index.scss +2 -2
  57. package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +3 -4
  58. package/nationalarchives/patterns/featured-collection/template.njk +2 -2
  59. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.mdx +85 -0
  60. package/nationalarchives/stories/utilities/{colour.stories.js → colour-schemes/colour-schemes.stories.js} +142 -52
  61. package/nationalarchives/stories/utilities/overrides/overrides.mdx +66 -0
  62. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +30 -0
  63. package/nationalarchives/stories/utilities/{headings.stories.js → typography/headings.stories.js} +2 -1
  64. package/nationalarchives/stories/utilities/typography/typography.stories.js +34 -0
  65. package/nationalarchives/templates/layouts/_generic.njk +10 -8
  66. package/nationalarchives/tools/_colour.scss +105 -16
  67. package/nationalarchives/tools/_index.scss +0 -1
  68. package/nationalarchives/tools/_typography.scss +13 -1
  69. package/nationalarchives/utilities/_debug.scss +41 -1
  70. package/nationalarchives/utilities/_global.scss +13 -4
  71. package/nationalarchives/utilities/_index.scss +1 -0
  72. package/nationalarchives/utilities/_overrides.scss +30 -0
  73. package/nationalarchives/utilities/_typography.scss +42 -34
  74. package/nationalarchives/variables/_colour.scss +103 -106
  75. package/nationalarchives/variables/_grid.scss +1 -1
  76. package/nationalarchives/variables/_index.scss +1 -1
  77. package/nationalarchives/variables/_media.scss +23 -23
  78. package/nationalarchives/variables/_spacing.scss +15 -0
  79. package/nationalarchives/variables/_typography.scss +2 -1
  80. package/package.json +2 -2
  81. package/nationalarchives/components/card/card.js +0 -2
  82. package/nationalarchives/components/card/card.js.map +0 -1
  83. package/nationalarchives/components/card/card.mjs +0 -45
  84. package/nationalarchives/stories/utilities/typography.stories.js +0 -29
  85. package/nationalarchives/tools/_assets.scss +0 -5
  86. package/nationalarchives/variables/_assets.scss +0 -1
  87. /package/nationalarchives/stories/utilities/{heading-groups.stories.js → typography/heading-groups.stories.js} +0 -0
  88. /package/nationalarchives/stories/utilities/{lists.stories.js → typography/lists.stories.js} +0 -0
  89. /package/nationalarchives/stories/utilities/{typography.mdx → typography/typography.mdx} +0 -0
@@ -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,+tBCTF,IAAMC,EAAI,WACf,SAAAA,EAAYC,GAA2B,IAAlBC,EAAUC,UAAA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AVA,EAAExE,MACJuH,EAAMrH,UAAUyB,IAAI,wBACpB4F,EAAMrH,UAAUmC,OAAO,yBAE3B,IASArB,OAAOe,iBAAiB,aAPJ,WAClBwF,EAAMrH,UAAUyB,IAAI,yBACpB4F,EAAMrH,UAAUmC,OAAO,uBACzB,IAMIb,SAASgG,gBAAgBtH,UAAUC,SAAS,gCAC9CqB,SAASgG,gBAAgBtH,UAAUyB,IACjCX,OAAOC,WAAW,gCAAgCiB,QAC9C,2BACA,6BAEFlB,OAAOC,WAAW,4BAA4BiB,SAChDV,SAASgG,gBAAgBtH,UAAUyB,IAAI,sCAI3C,IAAMgG,EAAU,SAACC,GAEf,IAAMC,GADND,OAA6B,IAAZA,EAA0BA,EAAU,CAAC,GAE5CE,iBAAiBC,YAAcH,EAAQE,MAAQtG,SAEnDwG,EAAUH,EAAO/H,cAAc,8BACjCkI,GACF,IAAIvH,EAAAA,OAAOuH,GAASC,OAGPJ,EAAOhH,iBAAiB,4BAChCqD,SAAQ,SAACgE,GACd,IAAI7I,EAAAA,KAAK6I,GAAOD,MAClB,IAEkBJ,EAAOhH,iBAAiB,+BAChCqD,SAAQ,SAACiE,GACjB,IAAI7F,EAAAA,QAAQ6F,GAAUF,MACxB,IAEyBJ,EAAOhH,iBAC9B,uCAEeqD,SAAQ,SAACkE,GACxB,IAAItF,EAAAA,eAAesF,GAAiBH,MACtC,IAEcJ,EAAOhH,iBAAiB,4BAChCqD,SAAQ,SAACmE,GACb,IAAI9E,EAAAA,KAAK8E,GAAYJ,MACvB,GACF,C","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/components/card/card.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 ","export class Card {\n constructor($module, tapTimeMax = 300) {\n this.$module = $module;\n this.$cardTitleLink =\n $module && $module.querySelector(\".tna-card__title-link\");\n this.$cardAction = $module && $module.querySelector(\".tna-card__action\");\n this.tapTimeMax = tapTimeMax;\n }\n\n init() {\n if (\n !this.$module ||\n (!this.$cardTitleLink && !this.$cardAction) ||\n this.$module.classList.contains(\"tna-card--no-global-click\")\n ) {\n return;\n }\n\n this.touchStartTime = null;\n\n // this.$module.addEventListener(\"touchstart\", () =>\n // this.handleCardTouchStart(),\n // );\n // this.$module.addEventListener(\"touchend\", () => this.handleCardTouchEnd());\n }\n\n handleCardClick() {\n if (this.$cardTitleLink) {\n this.$cardTitleLink.click();\n } else if (this.$cardAction) {\n this.$cardAction.click();\n }\n }\n\n handleCardTouchStart() {\n this.touchStartTime = new Date();\n }\n\n handleCardTouchEnd() {\n const duration = new Date().getTime() - this.touchStartTime.getTime();\n if (duration < this.tapTimeMax) {\n this.handleCardClick();\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 { Card } from \"./components/card/card.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 $header = $scope.querySelector('[data-module=\"tna-header\"]');\n if ($header) {\n new Header($header).init();\n }\n\n const $cards = $scope.querySelectorAll('[data-module=\"tna-card\"]');\n $cards.forEach(($card) => {\n new Card($card).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, Header, SensitiveImage, Tabs };\n"],"names":["root","factory","exports","module","define","amd","self","Card","$module","tapTimeMax","arguments","length","undefined","_classCallCheck","this","$cardTitleLink","querySelector","$cardAction","key","value","classList","contains","touchStartTime","click","Date","getTime","handleCardClick","Header","$toggleButtonWrapper","$navigation","$links","querySelectorAll","menuOpened","mql","window","matchMedia","_this","uniqueId","concat","uuidv4","setAttribute","$toggleButton","document","createElement","innerText","add","$hamburger","appendChild","syncState","addEventListener","handleToggleNavigation","addListener","matches","hidden","i","remove","Picture","$imageWrapper","$transcript","transcriptOpened","$transcriptToggle","handleToggleTranscript","transcriptToggleOpenedClass","removeAttribute","SensitiveImage","$imageDetails","$image","imageIsVisible","handleImageDetailsToggle","hasAttribute","focus","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","__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","$header","init","$card","$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,MAE9BC,EAAcC,SAASC,cAAc,MAC3CF,EAAYL,UAAUQ,IACpB,wBACA,qCAEFH,EAAYI,MAAMC,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,EAAKV,QAAQY,UAAUe,OAAO,8BAC9BV,EAAYU,SACZjB,EAAKP,wBAAwBsB,aAAa,WAAY,KACtDf,EAAKP,wBAAwByB,QAC7BlB,EA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ZA,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 );\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,4 +1,4 @@
1
- import { Card } from "./components/card/card.mjs";
1
+ import { Breadcrumbs } from "./components/breadcrumbs/breadcrumbs.mjs";
2
2
  import { Header } from "./components/header/header.mjs";
3
3
  import { Picture } from "./components/picture/picture.mjs";
4
4
  import { SensitiveImage } from "./components/sensitive-image/sensitive-image.mjs";
@@ -45,16 +45,16 @@ const initAll = (options) => {
45
45
  const $scope =
46
46
  options.scope instanceof HTMLElement ? options.scope : document;
47
47
 
48
+ const $breadcrumbs = $scope.querySelector('[data-module="tna-breadcrumbs"]');
49
+ if ($breadcrumbs) {
50
+ new Breadcrumbs($breadcrumbs).init();
51
+ }
52
+
48
53
  const $header = $scope.querySelector('[data-module="tna-header"]');
49
54
  if ($header) {
50
55
  new Header($header).init();
51
56
  }
52
57
 
53
- const $cards = $scope.querySelectorAll('[data-module="tna-card"]');
54
- $cards.forEach(($card) => {
55
- new Card($card).init();
56
- });
57
-
58
58
  const $pictures = $scope.querySelectorAll('[data-module="tna-picture"]');
59
59
  $pictures.forEach(($picture) => {
60
60
  new Picture($picture).init();
@@ -73,4 +73,4 @@ const initAll = (options) => {
73
73
  });
74
74
  };
75
75
 
76
- export { initAll, Header, SensitiveImage, Tabs };
76
+ export { initAll, Breadcrumbs, Header, Picture, SensitiveImage, Tabs };
@@ -1,9 +1,6 @@
1
- @use "variables";
2
- @use "tools";
1
+ @forward "variables";
2
+ @forward "tools";
3
3
 
4
4
  @use "utilities";
5
5
  @use "components";
6
6
  @use "patterns";
7
-
8
- // @use "variables/colour";
9
- // @include colour.configure(#f0a);
@@ -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";
@@ -5,6 +5,12 @@
5
5
  padding-top: 1rem;
6
6
  padding-bottom: 1rem;
7
7
 
8
+ &__wrapper {
9
+ &:focus {
10
+ outline: none !important;
11
+ }
12
+ }
13
+
8
14
  &__list {
9
15
  margin: 0;
10
16
  padding: 0;
@@ -24,9 +30,19 @@
24
30
 
25
31
  display: inline-block;
26
32
 
33
+ vertical-align: baseline;
34
+
27
35
  content: "\203A";
28
36
  }
29
37
  }
38
+
39
+ &--expandable {
40
+ display: none;
41
+
42
+ @include media.on-mobile {
43
+ display: inline-block !important;
44
+ }
45
+ }
30
46
  }
31
47
 
32
48
  &__link {
@@ -41,54 +57,53 @@
41
57
  &:hover {
42
58
  @include colour.colour-font("font-dark");
43
59
  }
44
- }
45
-
46
- @include media.on-mobile {
47
- // &__item {
48
- // &,
49
- // + .tna-breadcrumbs__item {
50
- // &::before {
51
- // margin-left: 0;
52
-
53
- // display: none;
54
- // }
55
- // }
56
-
57
- // &:not(:nth-last-child(2)) {
58
- // display: none;
59
- // }
60
-
61
- // &:nth-last-child(2) {
62
- // .tna-breadcrumbs__link {
63
- // &::before {
64
- // content: "\2190\00a0" attr(data-prefix);
65
- // }
66
- // }
67
- // }
68
- // }
69
-
70
- &__item:not(:first-child, :last-child) {
71
- display: none;
72
- }
73
- }
74
60
 
75
- @mixin high-contrast {
76
- &__link {
61
+ @include colour.on-high-contrast {
77
62
  padding-right: 0.75rem;
78
63
  padding-left: 0.75rem;
79
64
 
80
- border: 1px transparent solid;
81
- @include colour.colour-border("keyline-dark");
65
+ text-decoration: none;
66
+
67
+ @include colour.colour-border("keyline-dark", 1px);
68
+
69
+ &:hover {
70
+ text-decoration: underline;
71
+
72
+ @include colour.colour-font("contrast-background");
73
+
74
+ @include colour.colour-background("contrast-font-base");
75
+ }
82
76
  }
83
77
  }
84
78
 
85
- .tna-template--high-contrast-theme & {
86
- @include high-contrast;
79
+ button#{&}__link {
80
+ margin: 0;
81
+ padding: 0;
82
+ height: 100%;
83
+
84
+ font-size: inherit;
85
+ line-height: inherit;
86
+ font-weight: inherit;
87
+
88
+ background-color: transparent;
89
+
90
+ border: none;
91
+
92
+ appearance: none;
93
+ cursor: pointer;
94
+
95
+ &:hover {
96
+ color: inherit;
97
+ text-decoration: underline;
98
+ text-decoration-thickness: 3px;
99
+
100
+ background-color: transparent;
101
+ }
87
102
  }
88
103
 
89
- @media (prefers-contrast: more) {
90
- .tna-template--system-theme & {
91
- @include high-contrast;
104
+ @include media.on-mobile {
105
+ &--collapsed &__item:not(:first-child, &__item--expandable, :last-child) {
106
+ display: none;
92
107
  }
93
108
  }
94
109
  }
@@ -0,0 +1,2 @@
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
+ //# sourceMappingURL=breadcrumbs.js.map
@@ -0,0 +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,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDP,EAAoBQ,EA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,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":""}
@@ -0,0 +1,67 @@
1
+ import uuidv4 from "../../lib/uuid.mjs";
2
+
3
+ export class Breadcrumbs {
4
+ constructor($module) {
5
+ this.$module = $module;
6
+ this.$breadcrumbsListWrapper =
7
+ $module && $module.querySelector(".tna-breadcrumbs__wrapper");
8
+ this.$breadcrumbsList =
9
+ $module &&
10
+ this.$breadcrumbsListWrapper &&
11
+ $module.querySelector(".tna-breadcrumbs__list");
12
+ this.$breadcrumbs =
13
+ $module &&
14
+ this.$breadcrumbsListWrapper &&
15
+ this.$breadcrumbsList &&
16
+ $module.querySelectorAll(".tna-breadcrumbs__item");
17
+ }
18
+
19
+ init() {
20
+ if (
21
+ !this.$module ||
22
+ !this.$breadcrumbsListWrapper ||
23
+ !this.$breadcrumbsList ||
24
+ !this.$breadcrumbs
25
+ ) {
26
+ return;
27
+ }
28
+
29
+ if (
30
+ this.$breadcrumbs.length > 2 &&
31
+ !this.$module.classList.contains("tna-breadcrumbs--no-collapse")
32
+ ) {
33
+ const uniqueId = `tna-breadcrumbs-${uuidv4()}`;
34
+
35
+ const $expandable = document.createElement("li");
36
+ $expandable.classList.add(
37
+ "tna-breadcrumbs__item",
38
+ "tna-breadcrumbs__item--expandable",
39
+ );
40
+ $expandable.style.display = "none";
41
+
42
+ const $expandButton = document.createElement("button");
43
+ $expandButton.classList.add("tna-breadcrumbs__link");
44
+ $expandButton.innerHTML =
45
+ "<span class='tna-visually-hidden'>Expand breadcrumbs</span>&hellip;";
46
+ $expandButton.setAttribute("aria-expanded", "false");
47
+ $expandButton.setAttribute("aria-controls", uniqueId);
48
+ $expandButton.addEventListener("click", () => {
49
+ this.$module.classList.remove("tna-breadcrumbs--collapsed");
50
+ $expandable.remove();
51
+ this.$breadcrumbsListWrapper.setAttribute("tabindex", "0");
52
+ this.$breadcrumbsListWrapper.focus();
53
+ this.$breadcrumbsListWrapper.setAttribute("tabindex", "-1");
54
+ });
55
+
56
+ $expandable.appendChild($expandButton);
57
+
58
+ this.$breadcrumbsList.setAttribute("id", uniqueId);
59
+ this.$breadcrumbsList.insertBefore(
60
+ $expandable,
61
+ this.$breadcrumbs[this.$breadcrumbs.length - 2].nextSibling,
62
+ );
63
+
64
+ this.$module.classList.add("tna-breadcrumbs--collapsed");
65
+ }
66
+ }
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 = {
@@ -54,3 +55,9 @@ Standard.args = {
54
55
  ],
55
56
  classes: "tna-breadcrumbs--demo",
56
57
  };
58
+
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 \"><nav class=\"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\" 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
  ]
@@ -25,6 +25,12 @@
25
25
  }
26
26
  ]
27
27
  },
28
+ {
29
+ "name": "noCollapse",
30
+ "type": "string",
31
+ "required": false,
32
+ "description": ""
33
+ },
28
34
  {
29
35
  "name": "classes",
30
36
  "type": "string",
@@ -1,14 +1,19 @@
1
1
  {%- set containerClasses = [params.classes] if params.classes else [] -%}
2
- <div class="tna-breadcrumbs tna-container {{ containerClasses | join(' ') }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
3
- <nav class="tna-column tna-column--full" aria-label="Breadcrumb">
4
- <ol class="tna-breadcrumbs__list">
5
- {%- for item in params.items -%}
6
- <li class="tna-breadcrumbs__item">
7
- <a href="{{ item.href }}" class="tna-breadcrumbs__link" data-prefix="{{ params.prefix if params.prefix else 'Back to' }}" {%- if item.title %} title="{{ item.title }}"{% endif %}>
8
- {{ item.text }}
9
- </a>
10
- </li>
11
- {%- endfor -%}
12
- </ol>
13
- </nav>
2
+ {%- if params.noCollapse -%}
3
+ {%- set containerClasses = containerClasses.concat('tna-breadcrumbs--no-collapse') -%}
4
+ {%- endif -%}
5
+ <div class="tna-breadcrumbs {{ containerClasses | join(' ') }}" data-module="tna-breadcrumbs" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
6
+ <div class="tna-container">
7
+ <nav class="tna-breadcrumbs__wrapper tna-column tna-column--full" aria-label="Breadcrumb">
8
+ <ol class="tna-breadcrumbs__list">
9
+ {%- for item in params.items -%}
10
+ <li class="tna-breadcrumbs__item">
11
+ <a href="{{ item.href }}" class="tna-breadcrumbs__link" {%- if item.title %} title="{{ item.title }}"{% endif %}>
12
+ {{ item.text }}
13
+ </a>
14
+ </li>
15
+ {%- endfor -%}
16
+ </ol>
17
+ </nav>
18
+ </div>
14
19
  </div>
@@ -10,8 +10,7 @@
10
10
 
11
11
  @include colour.colour-background("button-primary-background");
12
12
 
13
- border: 0.25rem transparent solid;
14
- @include colour.colour-border("button-primary-background");
13
+ @include colour.colour-border("button-primary-background", 0.25rem);
15
14
 
16
15
  transition:
17
16
  color 200ms,
@@ -21,8 +21,8 @@ export default {
21
21
  argTypes,
22
22
  };
23
23
 
24
- const Template = ({ text, href, title, secondary, classes, attributes }) => {
25
- return Button({
24
+ const Template = ({ text, href, title, secondary, classes, attributes }) =>
25
+ Button({
26
26
  params: {
27
27
  text,
28
28
  href,
@@ -32,7 +32,6 @@ const Template = ({ text, href, title, secondary, classes, attributes }) => {
32
32
  attributes,
33
33
  },
34
34
  });
35
- };
36
35
 
37
36
  export const Standard = Template.bind({});
38
37
  Standard.args = {