@nationalarchives/frontend 0.22.0 → 0.23.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 (106) hide show
  1. package/nationalarchives/all+analytics.js +1 -1
  2. package/nationalarchives/all+analytics.js.map +1 -1
  3. package/nationalarchives/all.css +1 -1
  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/analytics.js +1 -1
  8. package/nationalarchives/analytics.js.map +1 -1
  9. package/nationalarchives/analytics.mjs +12 -4
  10. package/nationalarchives/assets/fonts/fa-brands-400.woff2 +0 -0
  11. package/nationalarchives/assets/fonts/fa-solid-900.woff2 +0 -0
  12. package/nationalarchives/components/accordion/accordion.js +1 -1
  13. package/nationalarchives/components/accordion/accordion.js.map +1 -1
  14. package/nationalarchives/components/accordion/accordion.mjs +1 -1
  15. package/nationalarchives/components/accordion/fixtures.json +26 -7
  16. package/nationalarchives/components/accordion/macro-options.json +9 -2
  17. package/nationalarchives/components/accordion/template.njk +2 -2
  18. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
  19. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
  20. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +1 -0
  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 +10 -4
  24. package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
  25. package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
  26. package/nationalarchives/components/cookie-banner/cookie-banner.mjs +1 -1
  27. package/nationalarchives/components/date-input/date-input.css +1 -1
  28. package/nationalarchives/components/date-input/date-input.css.map +1 -1
  29. package/nationalarchives/components/date-input/date-input.js +1 -1
  30. package/nationalarchives/components/date-input/date-input.js.map +1 -1
  31. package/nationalarchives/components/date-input/date-input.scss +4 -0
  32. package/nationalarchives/components/error-summary/error-summary.js +1 -1
  33. package/nationalarchives/components/error-summary/error-summary.js.map +1 -1
  34. package/nationalarchives/components/file-input/file-input.css.map +1 -1
  35. package/nationalarchives/components/file-input/file-input.js +1 -1
  36. package/nationalarchives/components/file-input/file-input.js.map +1 -1
  37. package/nationalarchives/components/file-input/file-input.scss +3 -3
  38. package/nationalarchives/components/footer/fixtures.json +3 -3
  39. package/nationalarchives/components/footer/footer.js +1 -1
  40. package/nationalarchives/components/footer/footer.js.map +1 -1
  41. package/nationalarchives/components/footer/template.njk +1 -1
  42. package/nationalarchives/components/gallery/gallery.css +1 -1
  43. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  44. package/nationalarchives/components/gallery/gallery.js +1 -1
  45. package/nationalarchives/components/gallery/gallery.js.map +1 -1
  46. package/nationalarchives/components/gallery/gallery.scss +2 -2
  47. package/nationalarchives/components/global-header/global-header.js +1 -1
  48. package/nationalarchives/components/global-header/global-header.js.map +1 -1
  49. package/nationalarchives/components/header/header.js +1 -1
  50. package/nationalarchives/components/header/header.js.map +1 -1
  51. package/nationalarchives/components/hero/fixtures.json +7 -7
  52. package/nationalarchives/components/hero/hero.css +1 -1
  53. package/nationalarchives/components/hero/hero.css.map +1 -1
  54. package/nationalarchives/components/hero/hero.scss +20 -24
  55. package/nationalarchives/components/hero/template.njk +3 -3
  56. package/nationalarchives/components/picture/picture.css.map +1 -1
  57. package/nationalarchives/components/picture/picture.js +1 -1
  58. package/nationalarchives/components/picture/picture.js.map +1 -1
  59. package/nationalarchives/components/picture/picture.scss +2 -3
  60. package/nationalarchives/components/skip-link/skip-link.js +1 -1
  61. package/nationalarchives/components/skip-link/skip-link.js.map +1 -1
  62. package/nationalarchives/components/tabs/tabs.js +1 -1
  63. package/nationalarchives/components/tabs/tabs.js.map +1 -1
  64. package/nationalarchives/components/text-input/text-input.js +1 -1
  65. package/nationalarchives/components/text-input/text-input.js.map +1 -1
  66. package/nationalarchives/font-awesome.css +9 -9
  67. package/nationalarchives/font-awesome.css.map +1 -1
  68. package/nationalarchives/font-awesome.scss +6 -5
  69. package/nationalarchives/lib/analytics-helpers.mjs +9 -13
  70. package/nationalarchives/lib/cookies.mjs +69 -14
  71. package/nationalarchives/lib/font-awesome/_animated.scss +93 -98
  72. package/nationalarchives/lib/font-awesome/_bordered.scss +27 -0
  73. package/nationalarchives/lib/font-awesome/_core.scss +20 -40
  74. package/nationalarchives/lib/font-awesome/_fa.scss +3 -0
  75. package/nationalarchives/lib/font-awesome/_functions.scss +3 -52
  76. package/nationalarchives/lib/font-awesome/_icons.scss +6 -4
  77. package/nationalarchives/lib/font-awesome/_list.scss +9 -6
  78. package/nationalarchives/lib/font-awesome/_mixins.scss +23 -60
  79. package/nationalarchives/lib/font-awesome/_pulled.scss +15 -0
  80. package/nationalarchives/lib/font-awesome/_rotated-flipped.scss +10 -9
  81. package/nationalarchives/lib/font-awesome/_shims.scss +1255 -1250
  82. package/nationalarchives/lib/font-awesome/_sizing.scss +6 -4
  83. package/nationalarchives/lib/font-awesome/_stacked.scss +11 -10
  84. package/nationalarchives/lib/font-awesome/_variables.scss +5110 -5025
  85. package/nationalarchives/lib/font-awesome/_widths.scss +12 -0
  86. package/nationalarchives/lib/font-awesome/brands.css +3 -3
  87. package/nationalarchives/lib/font-awesome/brands.css.map +1 -1
  88. package/nationalarchives/lib/font-awesome/brands.scss +29 -16
  89. package/nationalarchives/lib/font-awesome/fontawesome.css +3 -3
  90. package/nationalarchives/lib/font-awesome/fontawesome.css.map +1 -1
  91. package/nationalarchives/lib/font-awesome/fontawesome.scss +12 -15
  92. package/nationalarchives/lib/font-awesome/solid.css +3 -3
  93. package/nationalarchives/lib/font-awesome/solid.css.map +1 -1
  94. package/nationalarchives/lib/font-awesome/solid.scss +39 -14
  95. package/nationalarchives/lib/font-awesome/v4-shims.css +3 -3
  96. package/nationalarchives/lib/font-awesome/v4-shims.css.map +1 -1
  97. package/nationalarchives/lib/font-awesome/v4-shims.scss +5 -5
  98. package/nationalarchives/prototype-kit.css +1 -1
  99. package/nationalarchives/prototype-kit.css.map +1 -1
  100. package/nationalarchives/templates/fixtures.json +6 -6
  101. package/nationalarchives/tools/_index.scss +1 -0
  102. package/nationalarchives/tools/_shadows.scss +5 -0
  103. package/nationalarchives/utilities/lists/_index.scss +0 -1
  104. package/package.json +2 -2
  105. package/nationalarchives/assets/fonts/fa-brands-400.ttf +0 -0
  106. package/nationalarchives/assets/fonts/fa-solid-900.ttf +0 -0
@@ -2,6 +2,7 @@ import Cookies from "./lib/cookies.mjs";
2
2
  import {
3
3
  getXPathTo,
4
4
  getClosestHeading,
5
+ getClosestElement,
5
6
  valueGetters,
6
7
  } from "./lib/analytics-helpers.mjs";
7
8
  import AccordionAnalytics from "./components/accordion/analytics.js";
@@ -200,9 +201,11 @@ class EventTracker {
200
201
  this.computedValue(onCondition, ...computedValueParameters)
201
202
  ) {
202
203
  this.recordEvent(
203
- rootEventName
204
- ? `${this.prefix}.${rootEventName}`
205
- : this.generateEventName(areaName, eventConfig),
204
+ eventConfig.rootEventName
205
+ ? `${this.prefix}.${eventConfig.rootEventName}`
206
+ : rootEventName
207
+ ? `${this.prefix}.${rootEventName}`
208
+ : this.generateEventName(areaName, eventConfig),
206
209
  {
207
210
  ...data,
208
211
  name: this.generateEventName(areaName, eventConfig),
@@ -424,6 +427,11 @@ if (ga4Id) {
424
427
  new GA4({ id: ga4Id });
425
428
  }
426
429
 
427
- const helpers = { getXPathTo, getClosestHeading, valueGetters };
430
+ const helpers = {
431
+ getXPathTo,
432
+ getClosestHeading,
433
+ getClosestElement,
434
+ valueGetters,
435
+ };
428
436
 
429
437
  export { EventTracker, GA4, helpers };
@@ -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,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},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 r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}function n(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}t.r(e),t.d(e,{Accordion:()=>i});var i=function(){return t=function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$items=e&&e.querySelectorAll(".tna-accordion__item"),this.$module&&this.$items&&(this.allowMultipleItemsOpen="true"===this.$module.dataset.multiselectable,this.$items.forEach((function(t){return r.initItem(t)})),this.initState())},(e=[{key:"initItem",value:function(t){var e=this,r=t.querySelector(".tna-accordion__heading"),o=t.querySelector(".tna-accordion__body");if(r&&o){t.classList.add("tna-accordion__details"),t.classList.remove("tna-accordion__item"),r.removeAttribute("class"),o.classList.add("tna-accordion__content"),o.classList.remove("tna-accordion__body"),o.setAttribute("hidden","");var n=document.createElement("button");n.classList.add("tna-accordion__summary"),n.setAttribute("type","button"),n.setAttribute("aria-controls",o.id),n.innerText=r.innerText,r.innerText="",r.appendChild(n),n.addEventListener("click",(function(){"true"===n.getAttribute("aria-expanded")?e.closeItem(t):e.openItem(t)}))}}},{key:"initState",value:function(){var t=this;this.$items.forEach((function(e){"true"===e.dataset.isopen?t.openItem(e):t.closeItem(e),e.removeAttribute("data-isopen")}))}},{key:"openItem",value:function(t){this.allowMultipleItemsOpen||this.closeAllItemsExcept(t);var e=t.querySelector(".tna-accordion__summary"),r=t.querySelector(".tna-accordion__content");e.setAttribute("aria-expanded","true"),e.setAttribute("aria-label","".concat(e.innerText.trim(),", Hide this section")),r.removeAttribute("hidden")}},{key:"closeItem",value:function(t){var e=t.querySelector(".tna-accordion__summary"),r=t.querySelector(".tna-accordion__content");e.setAttribute("aria-expanded","false"),e.setAttribute("aria-label","".concat(e.innerText.trim(),", Show this section")),r.setAttribute("hidden","")}},{key:"closeAllItemsExcept",value:function(t){var e=this;Array.from(this.$items).filter((function(e){return e.querySelector(".tna-accordion__summary")!==t&&"true"===e.querySelector(".tna-accordion__summary").getAttribute("aria-expanded")})).forEach((function(t){return e.closeItem(t)}))}}])&&o(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,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},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 r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}function n(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}t.r(e),t.d(e,{Accordion:()=>i});var i=function(){return t=function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$items=e&&e.querySelectorAll(".tna-accordion__item"),this.$module&&this.$items&&(this.allowMultipleItemsOpen="true"!==this.$module.dataset.singleOpenItem,this.$items.forEach(function(t){return r.initItem(t)}),this.initState())},(e=[{key:"initItem",value:function(t){var e=this,r=t.querySelector(".tna-accordion__heading"),o=t.querySelector(".tna-accordion__body");if(r&&o){t.classList.add("tna-accordion__details"),t.classList.remove("tna-accordion__item"),r.removeAttribute("class"),o.classList.add("tna-accordion__content"),o.classList.remove("tna-accordion__body"),o.setAttribute("hidden","");var n=document.createElement("button");n.classList.add("tna-accordion__summary"),n.setAttribute("type","button"),n.setAttribute("aria-controls",o.id),n.innerText=r.innerText,r.innerText="",r.appendChild(n),n.addEventListener("click",function(){"true"===n.getAttribute("aria-expanded")?e.closeItem(t):e.openItem(t)})}}},{key:"initState",value:function(){var t=this;this.$items.forEach(function(e){"true"===e.dataset.isopen?t.openItem(e):t.closeItem(e),e.removeAttribute("data-isopen")})}},{key:"openItem",value:function(t){this.allowMultipleItemsOpen||this.closeAllItemsExcept(t);var e=t.querySelector(".tna-accordion__summary"),r=t.querySelector(".tna-accordion__content");e.setAttribute("aria-expanded","true"),e.setAttribute("aria-label","".concat(e.innerText.trim(),", Hide this section")),r.removeAttribute("hidden")}},{key:"closeItem",value:function(t){var e=t.querySelector(".tna-accordion__summary"),r=t.querySelector(".tna-accordion__content");e.setAttribute("aria-expanded","false"),e.setAttribute("aria-label","".concat(e.innerText.trim(),", Show this section")),r.setAttribute("hidden","")}},{key:"closeAllItemsExcept",value:function(t){var e=this;Array.from(this.$items).filter(function(e){return e.querySelector(".tna-accordion__summary")!==t&&"true"===e.querySelector(".tna-accordion__summary").getAttribute("aria-expanded")}).forEach(function(t){return e.closeItem(t)})}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})());
2
2
  //# sourceMappingURL=accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/accordion/accordion.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,MAAM,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,IAE1E,ECNDF,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,GAAO,G,usBCLvD,IAAMC,EAAS,WAanB,O,EAZD,SAAAA,EAAYC,GAAS,IAAAC,EAAA,M,4FAAAC,CAAA,KAAAH,GACnBI,KAAKH,QAAUA,EACfG,KAAKC,OAASJ,GAAWA,EAAQK,iBAAiB,wBAC7CF,KAAKH,SAAYG,KAAKC,SAI3BD,KAAKG,uBACyC,SAA5CH,KAAKH,QAAQO,QAAyB,gBAExCJ,KAAKC,OAAOI,SAAQ,SAACC,GAAK,OAAKR,EAAKS,SAASD,EAAM,IACnDN,KAAKQ,YACP,G,EAAC,EAAA1B,IAAA,WAAAa,MAED,SAASW,GAAO,IAAAG,EAAA,KACRC,EAAWJ,EAAMK,cAAc,2BAC/BC,EAAWN,EAAMK,cAAc,wBAErC,GAAKD,GAAaE,EAAlB,CAIAN,EAAMO,UAAUC,IAAI,0BACpBR,EAAMO,UAAUE,OAAO,uBAEvBL,EAASM,gBAAgB,SAEzBJ,EAASC,UAAUC,IAAI,0BACvBF,EAASC,UAAUE,OAAO,uBAC1BH,EAASK,aAAa,SAAU,IAEhC,IAAMC,EAAiBC,SAASC,cAAc,UAC9CF,EAAeL,UAAUC,IAAI,0BAC7BI,EAAeD,aAAa,OAAQ,UACpCC,EAAeD,aAAa,gBAAiBL,EAASS,IACtDH,EAAeI,UAAYZ,EAASY,UACpCZ,EAASY,UAAY,GACrBZ,EAASa,YAAYL,GAErBA,EAAeM,iBAAiB,SAAS,WACyB,SAAjDN,EAAeO,aAAa,iBAEzChB,EAAKiB,UAAUpB,GAEfG,EAAKkB,SAASrB,EAElB,GA1BA,CA2BF,GAAC,CAAAxB,IAAA,YAAAa,MAED,WAAY,IAAAiC,EAAA,KACV5B,KAAKC,OAAOI,SAAQ,SAACC,GACa,SAA5BA,EAAMF,QAAgB,OACxBwB,EAAKD,SAASrB,GAEdsB,EAAKF,UAAUpB,GAEjBA,EAAMU,gBAAgB,cACxB,GACF,GAAC,CAAAlC,IAAA,WAAAa,MAED,SAASW,GACFN,KAAKG,wBACRH,KAAK6B,oBAAoBvB,GAE3B,IAAMY,EAAiBZ,EAAMK,cAAc,2BACrCC,EAAWN,EAAMK,cAAc,2BACrCO,EAAeD,aAAa,gBAAiB,QAC7CC,EAAeD,aACb,aAAY,GAAAa,OACTZ,EAAeI,UAAUS,OAAM,wBAEpCnB,EAASI,gBAAgB,SAE3B,GAAC,CAAAlC,IAAA,YAAAa,MAED,SAAUW,GACR,IAAMY,EAAiBZ,EAAMK,cAAc,2BACrCC,EAAWN,EAAMK,cAAc,2BACrCO,EAAeD,aAAa,gBAAiB,SAC7CC,EAAeD,aACb,aAAY,GAAAa,OACTZ,EAAeI,UAAUS,OAAM,wBAEpCnB,EAASK,aAAa,SAAU,GAElC,GAAC,CAAAnC,IAAA,sBAAAa,MAED,SAAoBqC,GAAc,IAAAC,EAAA,KAChCC,MAAMC,KAAKnC,KAAKC,QACbmC,QACC,SAAC9B,GAAK,OACJA,EAAMK,cAAc,6BAA+BqB,GAGd,SAFrC1B,EACGK,cAAc,2BACdc,aAAa,gBAA2B,IAE9CpB,SAAQ,SAACC,GAAK,OAAK2B,EAAKP,UAAUpB,EAAM,GAC7C,M,6EAAC,CAlGmB,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/accordion/accordion.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 Accordion {\n constructor($module) {\n this.$module = $module;\n this.$items = $module && $module.querySelectorAll(\".tna-accordion__item\");\n if (!this.$module || !this.$items) {\n return;\n }\n\n this.allowMultipleItemsOpen =\n this.$module.dataset[\"multiselectable\"] === \"true\";\n\n this.$items.forEach(($item) => this.initItem($item));\n this.initState();\n }\n\n initItem($item) {\n const $heading = $item.querySelector(\".tna-accordion__heading\");\n const $content = $item.querySelector(\".tna-accordion__body\");\n\n if (!$heading || !$content) {\n return;\n }\n\n $item.classList.add(\"tna-accordion__details\");\n $item.classList.remove(\"tna-accordion__item\");\n\n $heading.removeAttribute(\"class\");\n\n $content.classList.add(\"tna-accordion__content\");\n $content.classList.remove(\"tna-accordion__body\");\n $content.setAttribute(\"hidden\", \"\");\n\n const $headingButton = document.createElement(\"button\");\n $headingButton.classList.add(\"tna-accordion__summary\");\n $headingButton.setAttribute(\"type\", \"button\");\n $headingButton.setAttribute(\"aria-controls\", $content.id);\n $headingButton.innerText = $heading.innerText;\n $heading.innerText = \"\";\n $heading.appendChild($headingButton);\n\n $headingButton.addEventListener(\"click\", () => {\n const isOpen = $headingButton.getAttribute(\"aria-expanded\") === \"true\";\n if (isOpen) {\n this.closeItem($item);\n } else {\n this.openItem($item);\n }\n });\n }\n\n initState() {\n this.$items.forEach(($item) => {\n if ($item.dataset[\"isopen\"] === \"true\") {\n this.openItem($item);\n } else {\n this.closeItem($item);\n }\n $item.removeAttribute(\"data-isopen\");\n });\n }\n\n openItem($item) {\n if (!this.allowMultipleItemsOpen) {\n this.closeAllItemsExcept($item);\n }\n const $headingButton = $item.querySelector(\".tna-accordion__summary\");\n const $content = $item.querySelector(\".tna-accordion__content\");\n $headingButton.setAttribute(\"aria-expanded\", \"true\");\n $headingButton.setAttribute(\n \"aria-label\",\n `${$headingButton.innerText.trim()}, Hide this section`,\n );\n $content.removeAttribute(\"hidden\");\n // $content.setAttribute(\"tabindex\", \"0\");\n }\n\n closeItem($item) {\n const $headingButton = $item.querySelector(\".tna-accordion__summary\");\n const $content = $item.querySelector(\".tna-accordion__content\");\n $headingButton.setAttribute(\"aria-expanded\", \"false\");\n $headingButton.setAttribute(\n \"aria-label\",\n `${$headingButton.innerText.trim()}, Show this section`,\n );\n $content.setAttribute(\"hidden\", \"\");\n // $content.setAttribute(\"tabindex\", \"-1\");\n }\n\n closeAllItemsExcept($excludeItem) {\n Array.from(this.$items)\n .filter(\n ($item) =>\n $item.querySelector(\".tna-accordion__summary\") !== $excludeItem &&\n $item\n .querySelector(\".tna-accordion__summary\")\n .getAttribute(\"aria-expanded\") === \"true\",\n )\n .forEach(($item) => this.closeItem($item));\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","Accordion","$module","_this","_classCallCheck","this","$items","querySelectorAll","allowMultipleItemsOpen","dataset","forEach","$item","initItem","initState","_this2","$heading","querySelector","$content","classList","add","remove","removeAttribute","setAttribute","$headingButton","document","createElement","id","innerText","appendChild","addEventListener","getAttribute","closeItem","openItem","_this3","closeAllItemsExcept","concat","trim","$excludeItem","_this4","Array","from","filter"],"sourceRoot":""}
1
+ {"version":3,"file":"components/accordion/accordion.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,usBCLhD,IAAMC,EAAS,WAanB,O,EAZD,SAAAA,EAAYC,GAAS,IAAAC,EAAA,M,4FAAAC,CAAA,KAAAH,GACnBI,KAAKH,QAAUA,EACfG,KAAKC,OAASJ,GAAWA,EAAQK,iBAAiB,wBAC7CF,KAAKH,SAAYG,KAAKC,SAI3BD,KAAKG,uBACqC,SAAxCH,KAAKH,QAAQO,QAAQC,eAEvBL,KAAKC,OAAOK,QAAQ,SAACC,GAAK,OAAKT,EAAKU,SAASD,EAAM,GACnDP,KAAKS,YACP,G,EAAC,EAAA3B,IAAA,WAAAa,MAED,SAASY,GAAO,IAAAG,EAAA,KACRC,EAAWJ,EAAMK,cAAc,2BAC/BC,EAAWN,EAAMK,cAAc,wBAErC,GAAKD,GAAaE,EAAlB,CAIAN,EAAMO,UAAUC,IAAI,0BACpBR,EAAMO,UAAUE,OAAO,uBAEvBL,EAASM,gBAAgB,SAEzBJ,EAASC,UAAUC,IAAI,0BACvBF,EAASC,UAAUE,OAAO,uBAC1BH,EAASK,aAAa,SAAU,IAEhC,IAAMC,EAAiBC,SAASC,cAAc,UAC9CF,EAAeL,UAAUC,IAAI,0BAC7BI,EAAeD,aAAa,OAAQ,UACpCC,EAAeD,aAAa,gBAAiBL,EAASS,IACtDH,EAAeI,UAAYZ,EAASY,UACpCZ,EAASY,UAAY,GACrBZ,EAASa,YAAYL,GAErBA,EAAeM,iBAAiB,QAAS,WACyB,SAAjDN,EAAeO,aAAa,iBAEzChB,EAAKiB,UAAUpB,GAEfG,EAAKkB,SAASrB,EAElB,EA1BA,CA2BF,GAAC,CAAAzB,IAAA,YAAAa,MAED,WAAY,IAAAkC,EAAA,KACV7B,KAAKC,OAAOK,QAAQ,SAACC,GACa,SAA5BA,EAAMH,QAAgB,OACxByB,EAAKD,SAASrB,GAEdsB,EAAKF,UAAUpB,GAEjBA,EAAMU,gBAAgB,cACxB,EACF,GAAC,CAAAnC,IAAA,WAAAa,MAED,SAASY,GACFP,KAAKG,wBACRH,KAAK8B,oBAAoBvB,GAE3B,IAAMY,EAAiBZ,EAAMK,cAAc,2BACrCC,EAAWN,EAAMK,cAAc,2BACrCO,EAAeD,aAAa,gBAAiB,QAC7CC,EAAeD,aACb,aAAY,GAAAa,OACTZ,EAAeI,UAAUS,OAAM,wBAEpCnB,EAASI,gBAAgB,SAE3B,GAAC,CAAAnC,IAAA,YAAAa,MAED,SAAUY,GACR,IAAMY,EAAiBZ,EAAMK,cAAc,2BACrCC,EAAWN,EAAMK,cAAc,2BACrCO,EAAeD,aAAa,gBAAiB,SAC7CC,EAAeD,aACb,aAAY,GAAAa,OACTZ,EAAeI,UAAUS,OAAM,wBAEpCnB,EAASK,aAAa,SAAU,GAElC,GAAC,CAAApC,IAAA,sBAAAa,MAED,SAAoBsC,GAAc,IAAAC,EAAA,KAChCC,MAAMC,KAAKpC,KAAKC,QACboC,OACC,SAAC9B,GAAK,OACJA,EAAMK,cAAc,6BAA+BqB,GAGd,SAFrC1B,EACGK,cAAc,2BACdc,aAAa,gBAA2B,GAE9CpB,QAAQ,SAACC,GAAK,OAAK2B,EAAKP,UAAUpB,EAAM,EAC7C,M,6EAAC,CAlGmB,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/accordion/accordion.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 Accordion {\n constructor($module) {\n this.$module = $module;\n this.$items = $module && $module.querySelectorAll(\".tna-accordion__item\");\n if (!this.$module || !this.$items) {\n return;\n }\n\n this.allowMultipleItemsOpen =\n this.$module.dataset.singleOpenItem !== \"true\";\n\n this.$items.forEach(($item) => this.initItem($item));\n this.initState();\n }\n\n initItem($item) {\n const $heading = $item.querySelector(\".tna-accordion__heading\");\n const $content = $item.querySelector(\".tna-accordion__body\");\n\n if (!$heading || !$content) {\n return;\n }\n\n $item.classList.add(\"tna-accordion__details\");\n $item.classList.remove(\"tna-accordion__item\");\n\n $heading.removeAttribute(\"class\");\n\n $content.classList.add(\"tna-accordion__content\");\n $content.classList.remove(\"tna-accordion__body\");\n $content.setAttribute(\"hidden\", \"\");\n\n const $headingButton = document.createElement(\"button\");\n $headingButton.classList.add(\"tna-accordion__summary\");\n $headingButton.setAttribute(\"type\", \"button\");\n $headingButton.setAttribute(\"aria-controls\", $content.id);\n $headingButton.innerText = $heading.innerText;\n $heading.innerText = \"\";\n $heading.appendChild($headingButton);\n\n $headingButton.addEventListener(\"click\", () => {\n const isOpen = $headingButton.getAttribute(\"aria-expanded\") === \"true\";\n if (isOpen) {\n this.closeItem($item);\n } else {\n this.openItem($item);\n }\n });\n }\n\n initState() {\n this.$items.forEach(($item) => {\n if ($item.dataset[\"isopen\"] === \"true\") {\n this.openItem($item);\n } else {\n this.closeItem($item);\n }\n $item.removeAttribute(\"data-isopen\");\n });\n }\n\n openItem($item) {\n if (!this.allowMultipleItemsOpen) {\n this.closeAllItemsExcept($item);\n }\n const $headingButton = $item.querySelector(\".tna-accordion__summary\");\n const $content = $item.querySelector(\".tna-accordion__content\");\n $headingButton.setAttribute(\"aria-expanded\", \"true\");\n $headingButton.setAttribute(\n \"aria-label\",\n `${$headingButton.innerText.trim()}, Hide this section`,\n );\n $content.removeAttribute(\"hidden\");\n // $content.setAttribute(\"tabindex\", \"0\");\n }\n\n closeItem($item) {\n const $headingButton = $item.querySelector(\".tna-accordion__summary\");\n const $content = $item.querySelector(\".tna-accordion__content\");\n $headingButton.setAttribute(\"aria-expanded\", \"false\");\n $headingButton.setAttribute(\n \"aria-label\",\n `${$headingButton.innerText.trim()}, Show this section`,\n );\n $content.setAttribute(\"hidden\", \"\");\n // $content.setAttribute(\"tabindex\", \"-1\");\n }\n\n closeAllItemsExcept($excludeItem) {\n Array.from(this.$items)\n .filter(\n ($item) =>\n $item.querySelector(\".tna-accordion__summary\") !== $excludeItem &&\n $item\n .querySelector(\".tna-accordion__summary\")\n .getAttribute(\"aria-expanded\") === \"true\",\n )\n .forEach(($item) => this.closeItem($item));\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","Accordion","$module","_this","_classCallCheck","this","$items","querySelectorAll","allowMultipleItemsOpen","dataset","singleOpenItem","forEach","$item","initItem","initState","_this2","$heading","querySelector","$content","classList","add","remove","removeAttribute","setAttribute","$headingButton","document","createElement","id","innerText","appendChild","addEventListener","getAttribute","closeItem","openItem","_this3","closeAllItemsExcept","concat","trim","$excludeItem","_this4","Array","from","filter"],"sourceRoot":""}
@@ -7,7 +7,7 @@ export class Accordion {
7
7
  }
8
8
 
9
9
  this.allowMultipleItemsOpen =
10
- this.$module.dataset["multiselectable"] === "true";
10
+ this.$module.dataset.singleOpenItem !== "true";
11
11
 
12
12
  this.$items.forEach(($item) => this.initItem($item));
13
13
  this.initState();
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "id": "test"
19
19
  },
20
- "html": "<div class=\"tna-accordion\" data-multiselectable=\"false\" data-module=\"tna-accordion\"><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Alpha</h2><div class=\"tna-accordion__body\" id=\"test-content-1\"><p>Content</p></div></div><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Beta</h2><div class=\"tna-accordion__body\" id=\"test-content-2\"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p></div></div></div>"
20
+ "html": "<div class=\"tna-accordion\" data-single-open-item=\"false\" data-module=\"tna-accordion\"><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Alpha</h2><div class=\"tna-accordion__body\" id=\"test-content-1\"><p>Content</p></div></div><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Beta</h2><div class=\"tna-accordion__body\" id=\"test-content-2\"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p></div></div></div>"
21
21
  },
22
22
  {
23
23
  "name": "with open items",
@@ -36,10 +36,10 @@
36
36
  ],
37
37
  "id": "test"
38
38
  },
39
- "html": "<div class=\"tna-accordion\" data-multiselectable=\"false\" data-module=\"tna-accordion\"><div class=\"tna-accordion__item\" data-isopen=\"true\"><h2 class=\"tna-accordion__heading tna-heading-s\">Alpha</h2><div class=\"tna-accordion__body\" id=\"test-content-1\"><p>Content</p></div></div><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Beta</h2><div class=\"tna-accordion__body\" id=\"test-content-2\"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p></div></div></div>"
39
+ "html": "<div class=\"tna-accordion\" data-single-open-item=\"false\" data-module=\"tna-accordion\"><div class=\"tna-accordion__item\" data-isopen=\"true\"><h2 class=\"tna-accordion__heading tna-heading-s\">Alpha</h2><div class=\"tna-accordion__body\" id=\"test-content-1\"><p>Content</p></div></div><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Beta</h2><div class=\"tna-accordion__body\" id=\"test-content-2\"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p></div></div></div>"
40
40
  },
41
41
  {
42
- "name": "allowing multiple items",
42
+ "name": "only allowing one open item",
43
43
  "options": {
44
44
  "itemHeadingLevel": 2,
45
45
  "items": [
@@ -53,9 +53,28 @@
53
53
  }
54
54
  ],
55
55
  "id": "test",
56
- "openMultipleItems": true
56
+ "singleOpenItem": true
57
57
  },
58
- "html": "<div class=\"tna-accordion\" data-multiselectable=\"true\" data-module=\"tna-accordion\"><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Alpha</h2><div class=\"tna-accordion__body\" id=\"test-content-1\"><p>Content</p></div></div><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Beta</h2><div class=\"tna-accordion__body\" id=\"test-content-2\"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p></div></div></div>"
58
+ "html": "<div class=\"tna-accordion\" data-single-open-item=\"true\" data-module=\"tna-accordion\"><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Alpha</h2><div class=\"tna-accordion__body\" id=\"test-content-1\"><p>Content</p></div></div><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Beta</h2><div class=\"tna-accordion__body\" id=\"test-content-2\"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p></div></div></div>"
59
+ },
60
+ {
61
+ "name": "different heading size",
62
+ "options": {
63
+ "itemHeadingLevel": 2,
64
+ "itemHeadingSize": "xl",
65
+ "items": [
66
+ {
67
+ "title": "Alpha",
68
+ "text": "Content"
69
+ },
70
+ {
71
+ "title": "Beta",
72
+ "body": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p>"
73
+ }
74
+ ],
75
+ "id": "test"
76
+ },
77
+ "html": "<div class=\"tna-accordion\" data-single-open-item=\"false\" data-module=\"tna-accordion\"><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-xl\">Alpha</h2><div class=\"tna-accordion__body\" id=\"test-content-1\"><p>Content</p></div></div><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-xl\">Beta</h2><div class=\"tna-accordion__body\" id=\"test-content-2\"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p></div></div></div>"
59
78
  },
60
79
  {
61
80
  "name": "with classes",
@@ -74,7 +93,7 @@
74
93
  "id": "test",
75
94
  "classes": "accordion__test-class"
76
95
  },
77
- "html": "<div class=\"tna-accordion accordion__test-class\" data-multiselectable=\"false\" data-module=\"tna-accordion\"><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Alpha</h2><div class=\"tna-accordion__body\" id=\"test-content-1\"><p>Content</p></div></div><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Beta</h2><div class=\"tna-accordion__body\" id=\"test-content-2\"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p></div></div></div>"
96
+ "html": "<div class=\"tna-accordion accordion__test-class\" data-single-open-item=\"false\" data-module=\"tna-accordion\"><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Alpha</h2><div class=\"tna-accordion__body\" id=\"test-content-1\"><p>Content</p></div></div><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Beta</h2><div class=\"tna-accordion__body\" id=\"test-content-2\"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p></div></div></div>"
78
97
  },
79
98
  {
80
99
  "name": "with attributes",
@@ -95,7 +114,7 @@
95
114
  "data-testattribute": "foobar"
96
115
  }
97
116
  },
98
- "html": "<div class=\"tna-accordion\" data-multiselectable=\"false\" data-module=\"tna-accordion\" data-testattribute=\"foobar\"><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Alpha</h2><div class=\"tna-accordion__body\" id=\"test-content-1\"><p>Content</p></div></div><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Beta</h2><div class=\"tna-accordion__body\" id=\"test-content-2\"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p></div></div></div>"
117
+ "html": "<div class=\"tna-accordion\" data-single-open-item=\"false\" data-module=\"tna-accordion\" data-testattribute=\"foobar\"><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Alpha</h2><div class=\"tna-accordion__body\" id=\"test-content-1\"><p>Content</p></div></div><div class=\"tna-accordion__item\" data-isopen=\"false\"><h2 class=\"tna-accordion__heading tna-heading-s\">Beta</h2><div class=\"tna-accordion__body\" id=\"test-content-2\"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p></div></div></div>"
99
118
  }
100
119
  ]
101
120
  }
@@ -5,6 +5,13 @@
5
5
  "required": true,
6
6
  "description": "The heading level which represents an element from `<h1>` through to `<h6>` for each of the accordion items."
7
7
  },
8
+ {
9
+ "name": "itemHeadingSize",
10
+ "type": "string",
11
+ "required": false,
12
+ "default": "s",
13
+ "description": "The physical size of the accordion item titles (`xl`, `l`, `m`, `s` or `xs`). This will be ignored if JavaScript is enabled and the items will have a small heading."
14
+ },
8
15
  {
9
16
  "name": "items",
10
17
  "type": "array",
@@ -45,11 +52,11 @@
45
52
  "description": "A unique ID for the accordion group."
46
53
  },
47
54
  {
48
- "name": "openMultipleItems",
55
+ "name": "singleOpenItem",
49
56
  "type": "boolean",
50
57
  "required": false,
51
58
  "default": false,
52
- "description": "If true, multiple accordion items can be opened."
59
+ "description": "If true, only one accordion items can be opened at a time."
53
60
  },
54
61
  {
55
62
  "name": "classes",
@@ -1,9 +1,9 @@
1
1
  {%- set containerClasses = [params.classes] if params.classes else [] -%}
2
2
  {%- set classes = containerClasses | join(' ') -%}
3
- <div class="tna-accordion{% if classes %} {{ classes }}{% endif %}" data-multiselectable="{{ params.openMultipleItems or 'false' }}" data-module="tna-accordion"{%- for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>
3
+ <div class="tna-accordion{% if classes %} {{ classes }}{% endif %}" data-single-open-item="{{ params.singleOpenItem or 'false' }}" data-module="tna-accordion"{%- for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>
4
4
  {%- for item in params.items %}
5
5
  <div class="tna-accordion__item" data-isopen="{{ item.open or 'false' }}">
6
- <h{{ params.itemHeadingLevel }} class="tna-accordion__heading tna-heading-s">
6
+ <h{{ params.itemHeadingLevel }} class="tna-accordion__heading tna-heading-{{ params.itemHeadingSize or 's' }}">
7
7
  {{ item.title }}
8
8
  </h{{ params.itemHeadingLevel }}>
9
9
  <div class="tna-accordion__body" id="{{ params.id }}-content-{{ loop.index }}">
@@ -1,2 +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=t()}(self,(()=>(()=>{"use strict";var e={181:(e,t,r)=>{r.d(t,{A:()=>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 o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.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={};r.r(n),r.d(n,{Breadcrumbs:()=>c});var o=r(181);function i(e){return i="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},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}var c=s((function e(t){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$module=t,this.$breadcrumbsList=t&&t.querySelector(".tna-breadcrumbs__list"),this.$breadcrumbs=t&&this.$breadcrumbsList&&t.querySelectorAll(".tna-breadcrumbs__item"),this.$module&&this.$breadcrumbsList&&this.$breadcrumbs&&this.$breadcrumbs.length>2&&!this.$module.classList.contains("tna-breadcrumbs--no-collapse")){var n="tna-breadcrumbs-".concat((0,o.A)()),i=document.createElement("li");i.classList.add("tna-breadcrumbs__item","tna-breadcrumbs__item--expandable"),i.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("type","button"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",n),a.addEventListener("click",(function(){r.$module.classList.remove("tna-breadcrumbs--collapsed"),i.remove(),r.$module.setAttribute("tabindex","0"),r.$module.focus(),r.$module.setAttribute("tabindex","-1")})),i.appendChild(a),this.$breadcrumbsList.setAttribute("id",n),this.$breadcrumbsList.insertBefore(i,this.$breadcrumbs[this.$breadcrumbs.length-2].nextSibling),this.$module.classList.add("tna-breadcrumbs--collapsed")}}));return n})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("TNAFrontend",[],t):"object"==typeof exports?exports.TNAFrontend=t():e.TNAFrontend=t()}(self,()=>(()=>{"use strict";var e={181:(e,t,r)=>{r.d(t,{A:()=>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 o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.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={};r.r(n),r.d(n,{Breadcrumbs:()=>c});var o=r(181);function i(e){return i="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},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}var c=s(function e(t){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$module=t,this.$breadcrumbsList=t&&t.querySelector(".tna-breadcrumbs__list"),this.$breadcrumbs=t&&this.$breadcrumbsList&&t.querySelectorAll(".tna-breadcrumbs__item"),this.$module&&this.$breadcrumbsList&&this.$breadcrumbs&&this.$breadcrumbs.length>2&&!this.$module.classList.contains("tna-breadcrumbs--no-collapse")){var n="tna-breadcrumbs-".concat((0,o.A)()),i=document.createElement("li");i.classList.add("tna-breadcrumbs__item","tna-breadcrumbs__item--expandable"),i.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("type","button"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",n),a.addEventListener("click",function(){r.$module.classList.remove("tna-breadcrumbs--collapsed"),i.remove(),r.$module.setAttribute("tabindex","0"),r.$module.focus(),r.$module.setAttribute("tabindex","-1")}),i.appendChild(a),this.$breadcrumbsList.setAttribute("id",n),this.$breadcrumbsList.insertBefore(i,this.$breadcrumbs[this.$breadcrumbs.length-2].nextSibling),this.$module.classList.add("tna-breadcrumbs--collapsed")}});return n})());
2
2
  //# sourceMappingURL=breadcrumbs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/breadcrumbs/breadcrumbs.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,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,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFd,EAAoBkB,EAAK9B,IACH,oBAAX+B,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAetB,EAAS+B,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAetB,EAAS,aAAc,CAAEiC,OAAO,GAAO,E,s0BCHvD,IAAMC,EAAWC,GACtB,SAAAD,EAAYE,GAAS,IAAAC,EAAA,KASnB,G,4FATmBC,CAAA,KAAAJ,GACnBK,KAAKH,QAAUA,EACfG,KAAKC,iBACHJ,GAAWA,EAAQK,cAAc,0BACnCF,KAAKG,aACHN,GACAG,KAAKC,kBACLJ,EAAQO,iBAAiB,0BAEtBJ,KAAKH,SAAYG,KAAKC,kBAAqBD,KAAKG,cAKnDH,KAAKG,aAAaE,OAAS,IAC1BL,KAAKH,QAAQS,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,yEACFD,EAAcE,aAAa,OAAQ,UACnCF,EAAcE,aAAa,gBAAiB,SAC5CF,EAAcE,aAAa,gBAAiBX,GAC5CS,EAAcG,iBAAiB,SAAS,WACtCtB,EAAKD,QAAQS,UAAUe,OAAO,8BAC9BV,EAAYU,SACZvB,EAAKD,QAAQsB,aAAa,WAAY,KACtCrB,EAAKD,QAAQyB,QACbxB,EAAKD,QAAQsB,aAAa,WAAY,KACxC,IAEAR,EAAYY,YAAYN,GAExBjB,KAAKC,iBAAiBkB,aAAa,KAAMX,GACzCR,KAAKC,iBAAiBuB,aACpBb,EACAX,KAAKG,aAAaH,KAAKG,aAAaE,OAAS,GAAGoB,aAGlDzB,KAAKH,QAAQS,UAAUQ,IAAI,6BAC7B,CACF,I","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\"] = 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.$breadcrumbsList =\n $module && $module.querySelector(\".tna-breadcrumbs__list\");\n this.$breadcrumbs =\n $module &&\n this.$breadcrumbsList &&\n $module.querySelectorAll(\".tna-breadcrumbs__item\");\n\n if (!this.$module || !this.$breadcrumbsList || !this.$breadcrumbs) {\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(\"type\", \"button\");\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.$module.setAttribute(\"tabindex\", \"0\");\n this.$module.focus();\n this.$module.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","_createClass","$module","_this","_classCallCheck","this","$breadcrumbsList","querySelector","$breadcrumbs","querySelectorAll","length","classList","contains","uniqueId","concat","uuidv4","$expandable","document","createElement","add","style","display","$expandButton","innerHTML","setAttribute","addEventListener","remove","focus","appendChild","insertBefore","nextSibling"],"sourceRoot":""}
1
+ {"version":3,"file":"components/breadcrumbs/breadcrumbs.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,KAAM,I,yDCDT,QARe,WAAH,OACT,CAAC,MAAQ,KAAO,KAAO,KAAO,MAAMC,QAAQ,SAAU,SAACC,GAAC,OAErDA,EACCC,OAAOC,gBAAgB,IAAIC,WAAW,IAAI,GAAM,IAAOH,EAAI,GAC5DI,SAAS,GAAG,EACf,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,MCJ3EP,EAAoBQ,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFd,EAAoBkB,EAAK9B,IACH,oBAAX+B,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAetB,EAAS+B,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAetB,EAAS,aAAc,CAAEiC,OAAO,K,s0BCHhD,IAAMC,EAAWC,EACtB,SAAAD,EAAYE,GAAS,IAAAC,EAAA,KASnB,G,4FATmBC,CAAA,KAAAJ,GACnBK,KAAKH,QAAUA,EACfG,KAAKC,iBACHJ,GAAWA,EAAQK,cAAc,0BACnCF,KAAKG,aACHN,GACAG,KAAKC,kBACLJ,EAAQO,iBAAiB,0BAEtBJ,KAAKH,SAAYG,KAAKC,kBAAqBD,KAAKG,cAKnDH,KAAKG,aAAaE,OAAS,IAC1BL,KAAKH,QAAQS,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,yEACFD,EAAcE,aAAa,OAAQ,UACnCF,EAAcE,aAAa,gBAAiB,SAC5CF,EAAcE,aAAa,gBAAiBX,GAE5CS,EAAcG,iBAAiB,QAAS,WACtCtB,EAAKD,QAAQS,UAAUe,OAAO,8BAC9BV,EAAYU,SACZvB,EAAKD,QAAQsB,aAAa,WAAY,KACtCrB,EAAKD,QAAQyB,QACbxB,EAAKD,QAAQsB,aAAa,WAAY,KACxC,GAEAR,EAAYY,YAAYN,GAExBjB,KAAKC,iBAAiBkB,aAAa,KAAMX,GACzCR,KAAKC,iBAAiBuB,aACpBb,EACAX,KAAKG,aAAaH,KAAKG,aAAaE,OAAS,GAAGoB,aAGlDzB,KAAKH,QAAQS,UAAUQ,IAAI,6BAC7B,CACF,G","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\"] = 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.$breadcrumbsList =\n $module && $module.querySelector(\".tna-breadcrumbs__list\");\n this.$breadcrumbs =\n $module &&\n this.$breadcrumbsList &&\n $module.querySelectorAll(\".tna-breadcrumbs__item\");\n\n if (!this.$module || !this.$breadcrumbsList || !this.$breadcrumbs) {\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(\"type\", \"button\");\n $expandButton.setAttribute(\"aria-expanded\", \"false\");\n $expandButton.setAttribute(\"aria-controls\", uniqueId);\n\n $expandButton.addEventListener(\"click\", () => {\n this.$module.classList.remove(\"tna-breadcrumbs--collapsed\");\n $expandable.remove();\n this.$module.setAttribute(\"tabindex\", \"0\");\n this.$module.focus();\n this.$module.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","_createClass","$module","_this","_classCallCheck","this","$breadcrumbsList","querySelector","$breadcrumbs","querySelectorAll","length","classList","contains","uniqueId","concat","uuidv4","$expandable","document","createElement","add","style","display","$expandButton","innerHTML","setAttribute","addEventListener","remove","focus","appendChild","insertBefore","nextSibling"],"sourceRoot":""}
@@ -34,6 +34,7 @@ export class Breadcrumbs {
34
34
  $expandButton.setAttribute("type", "button");
35
35
  $expandButton.setAttribute("aria-expanded", "false");
36
36
  $expandButton.setAttribute("aria-controls", uniqueId);
37
+
37
38
  $expandButton.addEventListener("click", () => {
38
39
  this.$module.classList.remove("tna-breadcrumbs--collapsed");
39
40
  $expandable.remove();
@@ -1 +1 @@
1
- .tna-card{margin-top:32px}.tna-card:first-child{margin-top:0}.tna-card{display:flex;flex-direction:column;gap:8px;position:relative;z-index:1;border-radius:4px}.tna-card:not(:has(.tna-card__image-container)){padding-top:8px;border-top:5px var(--keyline-dark, rgb(38, 38, 42)) solid;border-radius:.1px}.tna-card__heading{order:2}.tna-card__heading .tna-hgroup__supertitle{margin-top:8px}.tna-card__heading.tna-heading-l{margin-top:4px}.tna-card--full-click:hover{outline:2px var(--base-keyline, ) solid;outline-offset:4px}.tna-card--full-click:focus,.tna-card--full-click:active{outline:none}.tna-card--full-click.tna-card--plain:hover{outline:2px var(--base-keyline, ) solid}.tna-card--full-click .tna-card__heading-link::before{content:"";position:absolute;inset:0;z-index:3;border-radius:4px}.tna-card--full-click .tna-card__heading-link:focus-visible,.tna-card--full-click .tna-card__heading-link:active{outline:none}.tna-card--full-click .tna-card__heading-link:focus-visible::before,.tna-card--full-click .tna-card__heading-link:active::before{outline:5px var(--focus-outline, rgb(0, 176, 255)) solid;outline-offset:2px}.tna-card--full-click .tna-card__heading-link:active::before{outline-offset:0}.tna-card--full-click.tna-card:not(:has(.tna-card__image-container)) .tna-card__heading-link::before{border-radius:.1px}.tna-card--full-click.tna-card--padded.tna-card:not(:has(.tna-card__image-container)) .tna-card__heading-link::before{border-radius:.1px .1px 4px 4px}.tna-card--full-click:not(:has(.tna-card__image-container)) .tna-card__heading-link::before{top:-5px}.tna-card__image-container{aspect-ratio:3/2;overflow:hidden;position:relative;order:1;border-radius:4px;background:linear-gradient(-45deg, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.25));background-size:500% 500%;background-position:0 50%;animation:image-loader-background ease-in-out 1.2s infinite}.tna-card--padded .tna-card__image-container{border-radius:4px 4px 0 0}.tna-card__image{position:absolute;inset:0;z-index:1}.tna-card__image img{width:100%;height:100%;object-fit:cover}.tna-card__image-label{position:absolute;top:8px;left:8px;z-index:2}.tna-card__body{order:3;display:flex;flex-direction:column;gap:16px}.tna-card__body>*{margin-top:0}.tna-card__meta{padding-top:8px}.tna-card__actions{margin-top:8px;display:flex;gap:16px 32px}.tna-card__action{font-weight:700}.tna-card--padded{padding-bottom:16px}.tna-card--padded:not(:has(.tna-card__image-container)){border-radius:.1px .1px 4px 4px}.tna-card--padded .tna-card__heading,.tna-card--padded .tna-card__body{padding-right:16px;padding-left:16px}.tna-card--plain::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;border:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}.tna-card--plain:not(:has(.tna-card__image-container))::after{border-top-width:0}@media(prefers-contrast: more){.tna-card{padding-bottom:16px;border:1px var(--keyline-dark, rgb(38, 38, 42)) solid}.tna-card__heading,.tna-card__body{padding-right:16px;padding-left:16px}.tna-card--plain{box-shadow:none}.tna-card:not(:has(.tna-card__image-container)){border-radius:.1px .1px 4px 4px}.tna-card--full-click:not(.tna-card--padded) .tna-card__heading-link::before{border-radius:4px}.tna-card--full-click:not(:has(.tna-card__image-container),.tna-card--padded) .tna-card__heading-link::before{border-radius:.1px .1px 4px 4px}}@media(min-width: 48.0625em){.tna-card--horizontal{padding-bottom:0;display:grid;grid-template:min-content 1fr/50% 50%;grid-template-areas:"image header" "image body";gap:0}.tna-card--horizontal>*+*{margin-top:8px}.tna-card--horizontal>:first-child{padding-top:16px}.tna-card--horizontal>:last-child{padding-bottom:24px}.tna-card--horizontal:not(:has(.tna-card__image-container)){grid-template-columns:0 100%}.tna-card--horizontal.tna-card--flipped{grid-template-areas:"header image" "body image" "footer image"}.tna-card--horizontal.tna-card--flipped:not(:has(.tna-card__image-container)){grid-template-columns:100% 0}.tna-card--horizontal .tna-card__heading,.tna-card--horizontal .tna-card__body{padding-right:24px;padding-left:24px}.tna-card--horizontal .tna-card__heading{grid-area:header}.tna-card--horizontal .tna-card__image-container{width:100%;height:100%;margin:0;padding:0;grid-area:image;border-radius:4px 0 0 4px}.tna-card--horizontal.tna-card--flipped .tna-card__image-container{border-radius:0 4px 4px 0}.tna-card--horizontal .tna-card__body{grid-area:body}.tna-card--horizontal-small-image{grid-template-columns:max(10rem,25%) 1fr}.tna-card--horizontal-small-image.tna-card--flipped{grid-template-columns:1fr max(10rem,25%)}}@media(min-width: 30.0625em)and (max-width: 48em){.tna-card--horizontal-on-small{padding-bottom:0;display:grid;grid-template:min-content 1fr/50% 50%;grid-template-areas:"image header" "image body";gap:0}.tna-card--horizontal-on-small>*+*{margin-top:8px}.tna-card--horizontal-on-small>:first-child{padding-top:8px}.tna-card--horizontal-on-small>:last-child{padding-bottom:16px}.tna-card--horizontal-on-small:not(:has(.tna-card__image-container)){grid-template-columns:0 100%}.tna-card--horizontal-on-small.tna-card--flipped{grid-template-areas:"header image" "body image" "footer image"}.tna-card--horizontal-on-small.tna-card--flipped:not(:has(.tna-card__image-container)){grid-template-columns:100% 0}.tna-card--horizontal-on-small .tna-card__heading,.tna-card--horizontal-on-small .tna-card__body{padding-right:16px;padding-left:16px}.tna-card--horizontal-on-small .tna-card__heading{grid-area:header}.tna-card--horizontal-on-small .tna-card__image-container{width:100%;height:100%;margin:0;padding:0;grid-area:image;border-radius:4px 0 0 4px}.tna-card--horizontal-on-small.tna-card--flipped .tna-card__image-container{border-radius:0 4px 4px 0}.tna-card--horizontal-on-small .tna-card__body{grid-area:body}.tna-card--horizontal-small-image{grid-template-columns:max(10rem,25%) 1fr}.tna-card--horizontal-small-image.tna-card--flipped{grid-template-columns:1fr max(10rem,25%)}}/*# sourceMappingURL=card.css.map */
1
+ .tna-card{margin-top:32px}.tna-card:first-child{margin-top:0}.tna-card{display:flex;flex-direction:column;gap:8px;position:relative;z-index:1;border-radius:4px}.tna-card:not(:has(.tna-card__image-container)){padding-top:8px;border-top:5px var(--keyline-dark, rgb(38, 38, 42)) solid;border-radius:.1px}.tna-card__heading{order:2}.tna-card__heading .tna-hgroup__supertitle{margin-top:8px}.tna-card__heading.tna-heading-l{margin-top:4px}.tna-card--full-click:hover{outline:2px var(--base-keyline, ) solid;outline-offset:4px}.tna-card--full-click:focus,.tna-card--full-click:active{outline:none}.tna-card--full-click.tna-card--plain:hover{outline:2px var(--base-keyline, ) solid}.tna-card--full-click .tna-card__heading-link::before{content:"";position:absolute;inset:0;z-index:3;border-radius:4px}.tna-card--full-click .tna-card__heading-link:focus-visible,.tna-card--full-click .tna-card__heading-link:active{outline:none}.tna-card--full-click .tna-card__heading-link:focus-visible::before,.tna-card--full-click .tna-card__heading-link:active::before{outline:5px var(--focus-outline, rgb(0, 176, 255)) solid;outline-offset:2px}.tna-card--full-click .tna-card__heading-link:active::before{outline-offset:0}.tna-card--full-click.tna-card:not(:has(.tna-card__image-container)) .tna-card__heading-link::before{border-radius:.1px}.tna-card--full-click.tna-card--padded.tna-card:not(:has(.tna-card__image-container)) .tna-card__heading-link::before{border-radius:.1px .1px 4px 4px}.tna-card--full-click:not(:has(.tna-card__image-container)) .tna-card__heading-link::before{top:-5px}.tna-card--full-height{height:100%;box-sizing:border-box}@media(forced-colors: active){.tna-card--full-height{height:auto}}@media(prefers-contrast: more){.tna-card--full-height{height:auto}}.tna-card__image-container{aspect-ratio:3/2;overflow:hidden;position:relative;order:1;border-radius:4px;background:linear-gradient(-45deg, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.25));background-size:500% 500%;background-position:0 50%;animation:image-loader-background ease-in-out 1.2s infinite}.tna-card--padded .tna-card__image-container{border-radius:4px 4px 0 0}.tna-card__image{position:absolute;inset:0;z-index:1}.tna-card__image img{width:100%;height:100%;object-fit:cover}.tna-card__image-label{position:absolute;top:8px;left:8px;z-index:2}.tna-card__body{order:3;display:flex;flex-direction:column;gap:16px}.tna-card__body>*{margin-top:0}.tna-card__meta{padding-top:8px}.tna-card__actions{margin-top:8px;display:flex;gap:16px 32px}.tna-card__action{font-weight:700}.tna-card--padded{padding-bottom:16px}.tna-card--padded:not(:has(.tna-card__image-container)){border-radius:.1px .1px 4px 4px}.tna-card--padded .tna-card__heading,.tna-card--padded .tna-card__body{padding-right:16px;padding-left:16px}.tna-card--plain::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;border:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}.tna-card--plain:not(:has(.tna-card__image-container))::after{border-top-width:0}@media(prefers-contrast: more){.tna-card{padding-bottom:16px;border:1px var(--keyline-dark, rgb(38, 38, 42)) solid}.tna-card__heading,.tna-card__body{padding-right:16px;padding-left:16px}.tna-card:not(:has(.tna-card__image-container)){border-radius:.1px .1px 4px 4px}.tna-card--full-click:not(.tna-card--padded) .tna-card__heading-link::before{border-radius:4px}.tna-card--full-click:not(:has(.tna-card__image-container),.tna-card--padded) .tna-card__heading-link::before{border-radius:.1px .1px 4px 4px}}@media(min-width: 48.0625em){.tna-card--horizontal{padding-bottom:0;display:grid;grid-template:min-content 1fr/50% 50%;grid-template-areas:"image header" "image body";gap:0}.tna-card--horizontal>*+*{margin-top:8px}.tna-card--horizontal>:first-child{padding-top:16px}.tna-card--horizontal>:last-child{padding-bottom:24px}.tna-card--horizontal:not(:has(.tna-card__image-container)){grid-template-columns:0 100%}.tna-card--horizontal.tna-card--flipped{grid-template-areas:"header image" "body image" "footer image"}.tna-card--horizontal.tna-card--flipped:not(:has(.tna-card__image-container)){grid-template-columns:100% 0}.tna-card--horizontal .tna-card__heading,.tna-card--horizontal .tna-card__body{padding-right:24px;padding-left:24px}.tna-card--horizontal .tna-card__heading{grid-area:header}.tna-card--horizontal .tna-card__image-container{width:100%;height:100%;margin:0;padding:0;grid-area:image;border-radius:4px 0 0 4px}.tna-card--horizontal.tna-card--flipped .tna-card__image-container{border-radius:0 4px 4px 0}.tna-card--horizontal .tna-card__body{grid-area:body}.tna-card--horizontal-small-image{grid-template-columns:max(10rem,25%) 1fr}.tna-card--horizontal-small-image.tna-card--flipped{grid-template-columns:1fr max(10rem,25%)}}@media(min-width: 30.0625em)and (max-width: 48em){.tna-card--horizontal-on-small{padding-bottom:0;display:grid;grid-template:min-content 1fr/50% 50%;grid-template-areas:"image header" "image body";gap:0}.tna-card--horizontal-on-small>*+*{margin-top:8px}.tna-card--horizontal-on-small>:first-child{padding-top:8px}.tna-card--horizontal-on-small>:last-child{padding-bottom:16px}.tna-card--horizontal-on-small:not(:has(.tna-card__image-container)){grid-template-columns:0 100%}.tna-card--horizontal-on-small.tna-card--flipped{grid-template-areas:"header image" "body image" "footer image"}.tna-card--horizontal-on-small.tna-card--flipped:not(:has(.tna-card__image-container)){grid-template-columns:100% 0}.tna-card--horizontal-on-small .tna-card__heading,.tna-card--horizontal-on-small .tna-card__body{padding-right:16px;padding-left:16px}.tna-card--horizontal-on-small .tna-card__heading{grid-area:header}.tna-card--horizontal-on-small .tna-card__image-container{width:100%;height:100%;margin:0;padding:0;grid-area:image;border-radius:4px 0 0 4px}.tna-card--horizontal-on-small.tna-card--flipped .tna-card__image-container{border-radius:0 4px 4px 0}.tna-card--horizontal-on-small .tna-card__body{grid-area:body}.tna-card--horizontal-small-image{grid-template-columns:max(10rem,25%) 1fr}.tna-card--horizontal-small-image.tna-card--flipped{grid-template-columns:1fr max(10rem,25%)}}/*# sourceMappingURL=card.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/card/card.scss","../../../../src/nationalarchives/tools/_borders.scss","../../../../src/nationalarchives/variables/_borders.scss","../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_a11y.scss","../../../../src/nationalarchives/variables/_a11y.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/tools/_media.scss"],"names":[],"mappings":"AAUA,UACE,gBAEA,sBACE,aCuEJ,UAGE,aACA,sBACA,QAEA,kBACA,UC1FA,cCDsB,IF+FtB,gDACE,gBGSE,0DHNF,mBAGF,mBACE,QAEA,2CACE,eAGF,iCACE,eAKF,4BGgBA,wCHdE,mBAGF,yDAEE,aAKF,4CGIA,wCHMA,sDACE,WAEA,kBACA,QACA,UC7IJ,cCDsB,IFmJpB,iHAEE,aAEA,iIGpBF,yDC/FF,eCrCqB,IL8JjB,6DIrHJ,iBJ2HA,qGACE,mBAGF,sHAEE,gCAKA,4FACE,SAIJ,2BACE,iBAEA,gBAEA,kBAEA,QCzLF,cCDsB,IC2gBpB,wGAMA,0BACA,0BAEA,4DHnVF,6CACE,0BAIF,iBACE,kBACA,QACA,UAEA,qBACE,WACA,YAEA,iBAIJ,uBACE,kBACA,QACA,SACA,UAGF,gBACE,QAEA,aACA,sBAEA,SAEA,kBACE,aAIJ,gBACE,gBAGF,mBACE,eAEA,aACA,cAGF,kBM7NA,YCiBsB,IPgNtB,kBACE,oBAGF,wDACE,gCAIF,uEAEE,mBACA,kBAIA,wBACE,WAEA,kBACA,QACA,WAEA,sBG1JA,wDHgKF,8DACE,mBGgOJ,+BHjaF,UAsMI,oBGtKE,sDH0KF,mCAEE,mBACA,kBAGF,iBACE,gBAGF,gDACE,gCAIF,6EC3SF,cCDsB,IFgTpB,8GAEE,iCQpPJ,6BRrDA,sBACE,iBAEA,aACA,sCACA,oBACE,4BAEF,MAEA,0BACE,eAGF,mCACE,iBAGF,kCACE,oBAIJ,4DACE,6BAGF,wCACE,oBACE,2CAKJ,8EACE,6BAGF,+EAEE,mBACA,kBAGF,yCACE,iBAOF,iDACE,WACA,YACA,SACA,UAEA,gBAEA,0BAIF,mEACE,0BAIF,sCACE,eA2OA,kCACE,yCAGF,oDACE,0CQ7QJ,kDRzCA,+BACE,iBAEA,aACA,sCACA,oBACE,4BAEF,MAEA,mCACE,eAGF,4CACE,gBAGF,2CACE,oBAIJ,qEACE,6BAGF,iDACE,oBACE,2CAKJ,uFACE,6BAGF,iGAEE,mBACA,kBAGF,kDACE,iBAOF,0DACE,WACA,YACA,SACA,UAEA,gBAEA,0BAIF,4EACE,0BAIF,+CACE,eAuPA,kCACE,yCAGF,oDACE","file":"card.css","sourcesContent":["@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n@function space($size) {\n @return #{$size * spacing.$spacing-unit-px}px;\n}\n\n%space-above {\n margin-top: space(2);\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../../variables/a11y\" as a11yVariables;\n@use \"../../variables/borders\" as bordersVars;\n@use \"../../tools/a11y\";\n@use \"../../tools/borders\";\n@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n@mixin horizontal-card-layout($modifierClass, $innerPaddingAmount) {\n &#{$modifierClass} {\n padding-bottom: 0;\n\n display: grid;\n grid-template: min-content 1fr / 50% 50%;\n grid-template-areas:\n \"image header\"\n \"image body\";\n gap: 0;\n\n > * + * {\n margin-top: spacing.space(0.5);\n }\n\n > :first-child {\n padding-top: spacing.space($innerPaddingAmount - 0.5);\n }\n\n > :last-child {\n padding-bottom: spacing.space($innerPaddingAmount);\n }\n }\n\n &#{$modifierClass}:not(:has(&__image-container)) {\n grid-template-columns: 0 100%;\n }\n\n &#{$modifierClass}#{&}--flipped {\n grid-template-areas:\n \"header image\"\n \"body image\"\n \"footer image\";\n }\n\n &#{$modifierClass}#{&}--flipped:not(:has(&__image-container)) {\n grid-template-columns: 100% 0;\n }\n\n &#{$modifierClass} &__heading,\n &#{$modifierClass} &__body {\n padding-right: spacing.space($innerPaddingAmount);\n padding-left: spacing.space($innerPaddingAmount);\n }\n\n &#{$modifierClass} &__heading {\n grid-area: header;\n\n // .tna-hgroup__supertitle {\n // margin-top: 0;\n // }\n }\n\n &#{$modifierClass} &__image-container {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n\n grid-area: image;\n\n border-radius: bordersVars.$rounded-border-radius 0 0\n bordersVars.$rounded-border-radius;\n }\n\n &#{$modifierClass}#{&}--flipped &__image-container {\n border-radius: 0 bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius 0;\n }\n\n &#{$modifierClass} &__body {\n grid-area: body;\n }\n}\n\n.tna-card {\n @include spacing.space-above;\n\n display: flex;\n flex-direction: column;\n gap: spacing.space(0.5);\n\n position: relative;\n z-index: 1;\n\n @include borders.rounded-border;\n\n &:not(:has(&__image-container)) {\n padding-top: spacing.space(0.5);\n\n @include colour.thick-keyline-dark(top);\n border-radius: 0.1px;\n }\n\n &__heading {\n order: 2;\n\n .tna-hgroup__supertitle {\n margin-top: spacing.space(0.5);\n }\n\n &.tna-heading-l {\n margin-top: spacing.space(0.25);\n }\n }\n\n &--full-click {\n &:hover {\n @include colour.colour-outline(\"base-keyline\", 2px, solid);\n outline-offset: a11yVariables.$focus-outline-width - 1px;\n }\n\n &:focus,\n &:active {\n outline: none;\n }\n }\n\n &--full-click#{&}--plain {\n &:hover {\n @include colour.colour-outline(\n \"base-keyline\",\n a11yVariables.$focus-outline-offset,\n solid\n );\n }\n }\n\n &--full-click &__heading-link {\n &::before {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 3;\n\n @include borders.rounded-border;\n }\n\n &:focus-visible,\n &:active {\n outline: none;\n\n &::before {\n @include a11y.focus-outline;\n }\n }\n\n &:active {\n &::before {\n @include a11y.active-outline;\n }\n }\n }\n\n &--full-click#{&}:not(:has(&__image-container)) &__heading-link::before {\n border-radius: 0.1px;\n }\n\n &--full-click#{&}--padded#{&}:not(:has(&__image-container))\n &__heading-link::before {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &--full-click:not(:has(&__image-container)) &__heading-link {\n &::before {\n top: -#{bordersVars.$thick-border-width};\n }\n }\n\n &__image-container {\n aspect-ratio: 3/2;\n\n overflow: hidden;\n\n position: relative;\n\n order: 1;\n\n @include borders.rounded-border;\n\n @include colour.image-loader-background;\n }\n\n &--padded &__image-container {\n border-radius: bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius 0 0;\n }\n\n &__image {\n position: absolute;\n inset: 0;\n z-index: 1;\n\n img {\n width: 100%;\n height: 100%;\n\n object-fit: cover;\n }\n }\n\n &__image-label {\n position: absolute;\n top: spacing.space(0.5);\n left: spacing.space(0.5);\n z-index: 2;\n }\n\n &__body {\n order: 3;\n\n display: flex;\n flex-direction: column;\n\n gap: spacing.space(1);\n\n > * {\n margin-top: 0;\n }\n }\n\n &__meta {\n padding-top: spacing.space(0.5);\n }\n\n &__actions {\n margin-top: spacing.space(0.5);\n\n display: flex;\n gap: spacing.space(1) spacing.space(2);\n }\n\n &__action {\n @include typography.main-font-weight-bold;\n }\n\n &--padded {\n padding-bottom: spacing.space(1);\n }\n\n &--padded:not(:has(&__image-container)) {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &--padded &__heading,\n &--padded &__body {\n padding-right: spacing.space(1);\n padding-left: spacing.space(1);\n }\n\n &--plain {\n &::after {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: -1;\n\n border-radius: inherit;\n @include colour.colour-border(\"keyline\", 1px, solid);\n }\n }\n\n &--plain:not(:has(&__image-container)) {\n &::after {\n border-top-width: 0;\n }\n }\n\n @include colour.on-high-contrast {\n padding-bottom: spacing.space(1);\n\n @include colour.colour-border(\"keyline-dark\", 1px, solid);\n\n &__heading,\n &__body {\n padding-right: spacing.space(1);\n padding-left: spacing.space(1);\n }\n\n &--plain {\n box-shadow: none;\n }\n\n &:not(:has(&__image-container)) {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &--full-click:not(&--padded) &__heading-link::before {\n @include borders.rounded-border;\n }\n\n &--full-click:not(:has(&__image-container), &--padded)\n &__heading-link::before {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n }\n\n @include media.on-larger-than-mobile {\n @include horizontal-card-layout(\"--horizontal\", 1.5);\n\n &--horizontal-small-image {\n grid-template-columns: max(10rem, 25%) 1fr;\n }\n\n &--horizontal-small-image#{&}--flipped {\n grid-template-columns: 1fr max(10rem, 25%);\n }\n }\n\n @include media.on-small {\n @include horizontal-card-layout(\"--horizontal-on-small\", 1);\n\n &--horizontal-small-image {\n grid-template-columns: max(10rem, 25%) 1fr;\n }\n\n &--horizontal-small-image#{&}--flipped {\n grid-template-columns: 1fr max(10rem, 25%);\n }\n }\n}\n","@use \"../variables/borders\";\n\n@mixin rounded-border {\n border-radius: borders.$rounded-border-radius;\n}\n","$thick-border-width: 5px !default;\n$very-thick-border-width: 8px !default;\n$rounded-border-radius: 4px !default;\n","@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n // \"background-tint\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n // \"focus-outline\",\n \"keyline\",\n \"keyline-dark\",\n // \"input-foreground\",\n // \"input-background\",\n // \"input-border\",\n // \"form-error-border\",\n // \"form-error-text\",\n // \"button-text\",\n // \"button-background\",\n // \"button-hover-text\",\n // \"button-hover-background\",\n);\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index((\"keyline\", \"keyline-dark\"), $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@function colour-var($colour) {\n @return var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n );\n}\n\n@mixin colour-font($colour, $important: false) {\n color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n border-#{$direction}: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width colour-var($colour) $style if($important, !important, null);\n } @else {\n outline-color: colour-var($colour) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline-dark\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline-dark\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"accent-border\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"accent-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n $border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"form-error-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour, $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width #{brand-colour($brandColour)} solid;\n } @else {\n border: $border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width transparent solid;\n } @else {\n border: $border-width transparent solid;\n }\n}\n\n// Use light theme colours (except for \"form-error-border\")\n%always-light {\n @include colour-css-vars(\"form-error-border\", \"focus-outline\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\n \"form-error-border\",\n \"focus-outline\"\n );\n }\n}\n\n@mixin always-light {\n @extend %always-light;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%base {\n @each $name, $value in $base-colours {\n --#{$name}: var(--base-#{$value});\n }\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin base {\n @extend %base;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n --accent-border: var(--accent-background);\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n }\n\n .tna-template--dark-theme & {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-border: #{colour.brand-colour(\"yellow\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n --button-accented-background: #{colour.brand-colour(\"brown\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --accent-border: #{colour.brand-colour(\"black\")} !important;\n --button-accented-text: #{colour.brand-colour(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %accent-lighter-text;\n @extend %black-accent;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --accent-border: #{colour.brand-colour(\"pink\")} !important;\n --button-accented-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %accent-lighter-text;\n @extend %pink-accent;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --accent-border: #{colour.brand-colour(\"orange\")} !important;\n --button-accented-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %accent-lighter-text;\n @extend %orange-accent;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --accent-border: #{colour.brand-colour(\"green\")} !important;\n --button-accented-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %accent-lighter-text;\n @extend %green-accent;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --accent-border: #{colour.brand-colour(\"blue\")} !important;\n --button-accented-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %accent-lighter-text;\n @extend %blue-accent;\n}\n\n@mixin on-high-contrast {\n @media (prefers-contrast: more) {\n @content;\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n background: linear-gradient(\n -45deg,\n rgb(0 0 0 / 25%),\n rgb(255 255 255 / 25%),\n rgb(0 0 0 / 25%)\n );\n background-size: 500% 500%;\n background-position: 0 50%;\n\n animation: image-loader-background ease-in-out 1.2s infinite;\n }\n}\n","@use \"../variables/a11y\";\n@use \"colour\";\n\n@mixin visually-hidden {\n width: 1px !important;\n height: 1px !important;\n margin: 0 !important;\n padding: 0 !important;\n\n overflow: hidden !important;\n\n position: absolute !important;\n top: -9999px !important;\n left: -9999px !important;\n z-index: -1 !important;\n\n background-color: transparent !important;\n\n border: 0 !important;\n\n clip: rect(0, 0, 0, 0) !important;\n\n // &::before,\n // &::after {\n // content: \"\\00a0\";\n // }\n}\n\n@mixin focus-outline-without-offset {\n @include colour.colour-outline(\n \"focus-outline\",\n a11y.$focus-outline-width,\n solid\n );\n}\n\n@mixin focus-outline {\n @include focus-outline-without-offset;\n outline-offset: a11y.$focus-outline-offset;\n}\n\n@mixin active-outline {\n outline-offset: 0;\n}\n\n@mixin no-focus-outline-on-click {\n .tna-template--clicked &:focus {\n outline: none;\n }\n}\n","$focus-outline-width: 5px !default;\n$focus-outline-offset: 2px !default;\n$focus-outline-padding: $focus-outline-width + $focus-outline-offset;\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin relative-font-size($font-size-px) {\n @warn \"relative-font-size() will soon be deprecated in favour of font-size().\";\n @include font-size($font-size-px);\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n font-variation-settings: \"wdth\" 100;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include font-size(14);\n line-height: 1.1;\n text-transform: uppercase;\n}\n\n@mixin interactable-text-decoration {\n text-decoration-thickness: typography.$interactable-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n line-height: $line-height;\n @include font-size($font-size-default);\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include font-size($font-size-medium);\n }\n }\n }\n}\n","@use \"sass:math\";\n\n/*\n * ------------------------------------------\n * The typefaces, sizes and spacings that are\n * defined in this file have been selected to\n * ensure 100% match with the latest National\n * Archives brand guidelines - avoid changing\n * or overwriting any of these values without\n * signing off with the Digital Services team\n * first\n * ------------------------------------------\n */\n\n$relative-1rem-px: 16; // 16px = 1rem\n\n/*\n * ------------------------------------------\n * When true, use the included font files for\n * Open Sans and Roboto Mono, rather than the\n * versions hosted by Google Fonts\n * ------------------------------------------\n */\n$use-local-fonts: false !default;\n\n$body-font-size-px: 19 !default;\n$body-font-size-px-medium: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: 1.75 !default;\n\n$interactable-text-decoration-offset: 0.125em !default;\n$interactable-text-decoration-thickness: #{math.div(1.5, $relative-1rem-px)}rem !default;\n$interactive-text-decoration-thickness: #{math.div(4, $relative-1rem-px)}rem !default;\n\n$main-font-family-name: \"Open Sans\" !default;\n$main-font-family:\n #{$main-font-family-name},\n sans-serif;\n$main-font-weight: 400 !default;\n$main-font-weight-medium: 600 !default;\n$main-font-weight-bold: 700 !default;\n$main-font-file: \"OpenSans-Regular.ttf\" !default;\n$main-font-file-medium: \"OpenSans-SemiBold.ttf\" !default;\n$main-font-file-bold: \"OpenSans-Bold.ttf\" !default;\n\n/*\n * ------------------------------------------\n * To use Supria Sans Condensed (which is the\n * approved heading typeface for The National\n * Archives), you need to obtain a licence to\n * properly embed the CSS files with the font\n * definitions in your service - check with a\n * member of the Digital Services team on how\n * to get a licence\n * ------------------------------------------\n */\n$heading-font-family-name: \"supria-sans-condensed\" !default;\n$heading-font-family:\n #{$heading-font-family-name},\n \"Arial Narrow\",\n sans-serif;\n$heading-font-weight: 500 !default;\n\n/*\n * ------------------------------------------\n * The detail font should be a monospace font\n * and is used for chips, supertitles as well\n * as the date search component\n * ------------------------------------------\n */\n$detail-font-family-name: \"Roboto Mono\" !default;\n$detail-font-family:\n #{$detail-font-family-name},\n monospace;\n$detail-font-weight: 400 !default;\n$detail-font-weight-bold: 500 !default;\n$detail-font-file: \"RobotoMono-Regular.ttf\" !default;\n$detail-font-file-bold: \"RobotoMono-Medium.ttf\" !default;\n\n$heading-xl-font-size-default: 64 !default;\n$heading-xl-font-size-medium: 48 !default;\n$heading-xl-font-size-small: 36 !default;\n$heading-xl-font-size-tiny: $heading-xl-font-size-small !default;\n$heading-xl-line-height: 1.1 !default;\n\n$heading-l-font-size-default: 36 !default;\n$heading-l-font-size-medium: 32 !default;\n$heading-l-font-size-small: 29 !default;\n$heading-l-font-size-tiny: $heading-l-font-size-small !default;\n$heading-l-line-height: 1.15 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: $heading-m-font-size-default !default;\n$heading-m-font-size-small: 21 !default;\n$heading-m-font-size-tiny: $heading-m-font-size-small !default;\n$heading-m-line-height: 1.4 !default;\n\n$heading-s-font-size-default: 19 !default;\n$heading-s-font-size-medium: $heading-s-font-size-default !default;\n$heading-s-font-size-small: $heading-s-font-size-default !default;\n$heading-s-font-size-tiny: $heading-s-font-size-default !default;\n$heading-s-line-height: 1.5 !default;\n","@use \"sass:math\";\n@use \"../variables/media\";\n@use \"../variables/typography\";\n\n$smallest-large-device-em: #{math.div(\n media.$largest-medium-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-medium-device-em: #{math.div(\n media.$largest-medium-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-medium-device-em: #{math.div(\n media.$largest-small-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-small-device-em: #{math.div(\n media.$largest-small-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-small-device-em: #{math.div(\n media.$largest-tiny-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-tiny-device-em: #{math.div(\n media.$largest-tiny-device-px,\n typography.$relative-1rem-px\n )}em;\n\n$media-large: \"(min-width: #{$smallest-large-device-em})\";\n$media-lt-large: \"(max-width: #{$largest-medium-device-em})\";\n$media-medium: \"(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})\";\n$media-gt-mobile: \"(min-width: #{$smallest-medium-device-em})\";\n$media-mobile: \"(max-width: #{$largest-small-device-em})\";\n$media-small: \"(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})\";\n$media-gt-tiny: \"(min-width: #{$smallest-small-device-em})\";\n$media-tiny: \"(max-width: #{$largest-tiny-device-em})\";\n\n// https://nationalarchives.github.io/design-system/styles/media/#media-queries\n@mixin on-large() {\n @media #{$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{$media-mobile} {\n @content;\n }\n}\n\n@mixin on-print() {\n @media print {\n @content;\n }\n}\n"]}
1
+ {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/card/card.scss","../../../../src/nationalarchives/tools/_borders.scss","../../../../src/nationalarchives/variables/_borders.scss","../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_a11y.scss","../../../../src/nationalarchives/variables/_a11y.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/tools/_media.scss"],"names":[],"mappings":"AAUA,UACE,gBAEA,sBACE,aCuEJ,UAGE,aACA,sBACA,QAEA,kBACA,UC1FA,cCDsB,IF+FtB,gDACE,gBGSE,0DHNF,mBAGF,mBACE,QAEA,2CACE,eAGF,iCACE,eAKF,4BGgBA,wCHdE,mBAGF,yDAEE,aAKF,4CGIA,wCHMA,sDACE,WAEA,kBACA,QACA,UC7IJ,cCDsB,IFmJpB,iHAEE,aAEA,iIGpBF,yDC/FF,eCrCqB,IL8JjB,6DIrHJ,iBJ2HA,qGACE,mBAGF,sHAEE,gCAKA,4FACE,SAIJ,uBACE,YAEA,sBGoUF,8BHvUA,uBAMI,aG2TJ,+BHjUA,uBAMI,aAIJ,2BACE,iBAEA,gBAEA,kBAEA,QCnMF,cCDsB,IC2gBpB,wGAMA,0BACA,0BAEA,4DHzUF,6CACE,0BAIF,iBACE,kBACA,QACA,UAEA,qBACE,WACA,YAEA,iBAIJ,uBACE,kBACA,QACA,SACA,UAGF,gBACE,QAEA,aACA,sBAEA,SAEA,kBACE,aAIJ,gBACE,gBAGF,mBACE,eAEA,aACA,cAGF,kBMvOA,YCiBsB,IP0NtB,kBACE,oBAGF,wDACE,gCAIF,uEAEE,mBACA,kBAIA,wBACE,WAEA,kBACA,QACA,WAEA,sBGpKA,wDH0KF,8DACE,mBGsNJ,+BHjaF,UAgNI,oBGhLE,sDHoLF,mCAEE,mBACA,kBAGF,gDACE,gCAIF,6ECjTF,cCDsB,IFsTpB,8GAEE,iCQ1PJ,6BRrDA,sBACE,iBAEA,aACA,sCACA,oBACE,4BAEF,MAEA,0BACE,eAGF,mCACE,iBAGF,kCACE,oBAIJ,4DACE,6BAGF,wCACE,oBACE,2CAKJ,8EACE,6BAGF,+EAEE,mBACA,kBAGF,yCACE,iBAOF,iDACE,WACA,YACA,SACA,UAEA,gBAEA,0BAIF,mEACE,0BAIF,sCACE,eAiPA,kCACE,yCAGF,oDACE,0CQnRJ,kDRzCA,+BACE,iBAEA,aACA,sCACA,oBACE,4BAEF,MAEA,mCACE,eAGF,4CACE,gBAGF,2CACE,oBAIJ,qEACE,6BAGF,iDACE,oBACE,2CAKJ,uFACE,6BAGF,iGAEE,mBACA,kBAGF,kDACE,iBAOF,0DACE,WACA,YACA,SACA,UAEA,gBAEA,0BAIF,4EACE,0BAIF,+CACE,eA6PA,kCACE,yCAGF,oDACE","file":"card.css","sourcesContent":["@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n@function space($size) {\n @return #{$size * spacing.$spacing-unit-px}px;\n}\n\n%space-above {\n margin-top: space(2);\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../../variables/a11y\" as a11yVariables;\n@use \"../../variables/borders\" as bordersVars;\n@use \"../../tools/a11y\";\n@use \"../../tools/borders\";\n@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n@mixin horizontal-card-layout($modifierClass, $innerPaddingAmount) {\n &#{$modifierClass} {\n padding-bottom: 0;\n\n display: grid;\n grid-template: min-content 1fr / 50% 50%;\n grid-template-areas:\n \"image header\"\n \"image body\";\n gap: 0;\n\n > * + * {\n margin-top: spacing.space(0.5);\n }\n\n > :first-child {\n padding-top: spacing.space($innerPaddingAmount - 0.5);\n }\n\n > :last-child {\n padding-bottom: spacing.space($innerPaddingAmount);\n }\n }\n\n &#{$modifierClass}:not(:has(&__image-container)) {\n grid-template-columns: 0 100%;\n }\n\n &#{$modifierClass}#{&}--flipped {\n grid-template-areas:\n \"header image\"\n \"body image\"\n \"footer image\";\n }\n\n &#{$modifierClass}#{&}--flipped:not(:has(&__image-container)) {\n grid-template-columns: 100% 0;\n }\n\n &#{$modifierClass} &__heading,\n &#{$modifierClass} &__body {\n padding-right: spacing.space($innerPaddingAmount);\n padding-left: spacing.space($innerPaddingAmount);\n }\n\n &#{$modifierClass} &__heading {\n grid-area: header;\n\n // .tna-hgroup__supertitle {\n // margin-top: 0;\n // }\n }\n\n &#{$modifierClass} &__image-container {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n\n grid-area: image;\n\n border-radius: bordersVars.$rounded-border-radius 0 0\n bordersVars.$rounded-border-radius;\n }\n\n &#{$modifierClass}#{&}--flipped &__image-container {\n border-radius: 0 bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius 0;\n }\n\n &#{$modifierClass} &__body {\n grid-area: body;\n }\n}\n\n.tna-card {\n @include spacing.space-above;\n\n display: flex;\n flex-direction: column;\n gap: spacing.space(0.5);\n\n position: relative;\n z-index: 1;\n\n @include borders.rounded-border;\n\n &:not(:has(&__image-container)) {\n padding-top: spacing.space(0.5);\n\n @include colour.thick-keyline-dark(top);\n border-radius: 0.1px;\n }\n\n &__heading {\n order: 2;\n\n .tna-hgroup__supertitle {\n margin-top: spacing.space(0.5);\n }\n\n &.tna-heading-l {\n margin-top: spacing.space(0.25);\n }\n }\n\n &--full-click {\n &:hover {\n @include colour.colour-outline(\"base-keyline\", 2px, solid);\n outline-offset: a11yVariables.$focus-outline-width - 1px;\n }\n\n &:focus,\n &:active {\n outline: none;\n }\n }\n\n &--full-click#{&}--plain {\n &:hover {\n @include colour.colour-outline(\n \"base-keyline\",\n a11yVariables.$focus-outline-offset,\n solid\n );\n }\n }\n\n &--full-click &__heading-link {\n &::before {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 3;\n\n @include borders.rounded-border;\n }\n\n &:focus-visible,\n &:active {\n outline: none;\n\n &::before {\n @include a11y.focus-outline;\n }\n }\n\n &:active {\n &::before {\n @include a11y.active-outline;\n }\n }\n }\n\n &--full-click#{&}:not(:has(&__image-container)) &__heading-link::before {\n border-radius: 0.1px;\n }\n\n &--full-click#{&}--padded#{&}:not(:has(&__image-container))\n &__heading-link::before {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &--full-click:not(:has(&__image-container)) &__heading-link {\n &::before {\n top: -#{bordersVars.$thick-border-width};\n }\n }\n\n &--full-height {\n height: 100%;\n\n box-sizing: border-box;\n\n @include colour.on-high-contrast-and-forced-colours {\n height: auto;\n }\n }\n\n &__image-container {\n aspect-ratio: 3/2;\n\n overflow: hidden;\n\n position: relative;\n\n order: 1;\n\n @include borders.rounded-border;\n\n @include colour.image-loader-background;\n }\n\n &--padded &__image-container {\n border-radius: bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius 0 0;\n }\n\n &__image {\n position: absolute;\n inset: 0;\n z-index: 1;\n\n img {\n width: 100%;\n height: 100%;\n\n object-fit: cover;\n }\n }\n\n &__image-label {\n position: absolute;\n top: spacing.space(0.5);\n left: spacing.space(0.5);\n z-index: 2;\n }\n\n &__body {\n order: 3;\n\n display: flex;\n flex-direction: column;\n\n gap: spacing.space(1);\n\n > * {\n margin-top: 0;\n }\n }\n\n &__meta {\n padding-top: spacing.space(0.5);\n }\n\n &__actions {\n margin-top: spacing.space(0.5);\n\n display: flex;\n gap: spacing.space(1) spacing.space(2);\n }\n\n &__action {\n @include typography.main-font-weight-bold;\n }\n\n &--padded {\n padding-bottom: spacing.space(1);\n }\n\n &--padded:not(:has(&__image-container)) {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &--padded &__heading,\n &--padded &__body {\n padding-right: spacing.space(1);\n padding-left: spacing.space(1);\n }\n\n &--plain {\n &::after {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: -1;\n\n border-radius: inherit;\n @include colour.colour-border(\"keyline\", 1px, solid);\n }\n }\n\n &--plain:not(:has(&__image-container)) {\n &::after {\n border-top-width: 0;\n }\n }\n\n @include colour.on-high-contrast {\n padding-bottom: spacing.space(1);\n\n @include colour.colour-border(\"keyline-dark\", 1px, solid);\n\n &__heading,\n &__body {\n padding-right: spacing.space(1);\n padding-left: spacing.space(1);\n }\n\n &:not(:has(&__image-container)) {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &--full-click:not(&--padded) &__heading-link::before {\n @include borders.rounded-border;\n }\n\n &--full-click:not(:has(&__image-container), &--padded)\n &__heading-link::before {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n }\n\n @include media.on-larger-than-mobile {\n @include horizontal-card-layout(\"--horizontal\", 1.5);\n\n &--horizontal-small-image {\n grid-template-columns: max(10rem, 25%) 1fr;\n }\n\n &--horizontal-small-image#{&}--flipped {\n grid-template-columns: 1fr max(10rem, 25%);\n }\n }\n\n @include media.on-small {\n @include horizontal-card-layout(\"--horizontal-on-small\", 1);\n\n &--horizontal-small-image {\n grid-template-columns: max(10rem, 25%) 1fr;\n }\n\n &--horizontal-small-image#{&}--flipped {\n grid-template-columns: 1fr max(10rem, 25%);\n }\n }\n}\n","@use \"../variables/borders\";\n\n@mixin rounded-border {\n border-radius: borders.$rounded-border-radius;\n}\n","$thick-border-width: 5px !default;\n$very-thick-border-width: 8px !default;\n$rounded-border-radius: 4px !default;\n","@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n // \"background-tint\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n // \"focus-outline\",\n \"keyline\",\n \"keyline-dark\",\n // \"input-foreground\",\n // \"input-background\",\n // \"input-border\",\n // \"form-error-border\",\n // \"form-error-text\",\n // \"button-text\",\n // \"button-background\",\n // \"button-hover-text\",\n // \"button-hover-background\",\n);\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index((\"keyline\", \"keyline-dark\"), $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@function colour-var($colour) {\n @return var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n );\n}\n\n@mixin colour-font($colour, $important: false) {\n color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n border-#{$direction}: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width colour-var($colour) $style if($important, !important, null);\n } @else {\n outline-color: colour-var($colour) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline-dark\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline-dark\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"accent-border\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"accent-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n $border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"form-error-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour, $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width #{brand-colour($brandColour)} solid;\n } @else {\n border: $border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width transparent solid;\n } @else {\n border: $border-width transparent solid;\n }\n}\n\n// Use light theme colours (except for \"form-error-border\")\n%always-light {\n @include colour-css-vars(\"form-error-border\", \"focus-outline\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\n \"form-error-border\",\n \"focus-outline\"\n );\n }\n}\n\n@mixin always-light {\n @extend %always-light;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%base {\n @each $name, $value in $base-colours {\n --#{$name}: var(--base-#{$value});\n }\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin base {\n @extend %base;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n --accent-border: var(--accent-background);\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n }\n\n .tna-template--dark-theme & {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-border: #{colour.brand-colour(\"yellow\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n --button-accented-background: #{colour.brand-colour(\"brown\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --accent-border: #{colour.brand-colour(\"black\")} !important;\n --button-accented-text: #{colour.brand-colour(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %accent-lighter-text;\n @extend %black-accent;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --accent-border: #{colour.brand-colour(\"pink\")} !important;\n --button-accented-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %accent-lighter-text;\n @extend %pink-accent;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --accent-border: #{colour.brand-colour(\"orange\")} !important;\n --button-accented-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %accent-lighter-text;\n @extend %orange-accent;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --accent-border: #{colour.brand-colour(\"green\")} !important;\n --button-accented-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %accent-lighter-text;\n @extend %green-accent;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --accent-border: #{colour.brand-colour(\"blue\")} !important;\n --button-accented-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %accent-lighter-text;\n @extend %blue-accent;\n}\n\n@mixin on-high-contrast {\n @media (prefers-contrast: more) {\n @content;\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n background: linear-gradient(\n -45deg,\n rgb(0 0 0 / 25%),\n rgb(255 255 255 / 25%),\n rgb(0 0 0 / 25%)\n );\n background-size: 500% 500%;\n background-position: 0 50%;\n\n animation: image-loader-background ease-in-out 1.2s infinite;\n }\n}\n","@use \"../variables/a11y\";\n@use \"colour\";\n\n@mixin visually-hidden {\n width: 1px !important;\n height: 1px !important;\n margin: 0 !important;\n padding: 0 !important;\n\n overflow: hidden !important;\n\n position: absolute !important;\n top: -9999px !important;\n left: -9999px !important;\n z-index: -1 !important;\n\n background-color: transparent !important;\n\n border: 0 !important;\n\n clip: rect(0, 0, 0, 0) !important;\n\n // &::before,\n // &::after {\n // content: \"\\00a0\";\n // }\n}\n\n@mixin focus-outline-without-offset {\n @include colour.colour-outline(\n \"focus-outline\",\n a11y.$focus-outline-width,\n solid\n );\n}\n\n@mixin focus-outline {\n @include focus-outline-without-offset;\n outline-offset: a11y.$focus-outline-offset;\n}\n\n@mixin active-outline {\n outline-offset: 0;\n}\n\n@mixin no-focus-outline-on-click {\n .tna-template--clicked &:focus {\n outline: none;\n }\n}\n","$focus-outline-width: 5px !default;\n$focus-outline-offset: 2px !default;\n$focus-outline-padding: $focus-outline-width + $focus-outline-offset;\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin relative-font-size($font-size-px) {\n @warn \"relative-font-size() will soon be deprecated in favour of font-size().\";\n @include font-size($font-size-px);\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n font-variation-settings: \"wdth\" 100;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include font-size(14);\n line-height: 1.1;\n text-transform: uppercase;\n}\n\n@mixin interactable-text-decoration {\n text-decoration-thickness: typography.$interactable-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n line-height: $line-height;\n @include font-size($font-size-default);\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include font-size($font-size-medium);\n }\n }\n }\n}\n","@use \"sass:math\";\n\n/*\n * ------------------------------------------\n * The typefaces, sizes and spacings that are\n * defined in this file have been selected to\n * ensure 100% match with the latest National\n * Archives brand guidelines - avoid changing\n * or overwriting any of these values without\n * signing off with the Digital Services team\n * first\n * ------------------------------------------\n */\n\n$relative-1rem-px: 16; // 16px = 1rem\n\n/*\n * ------------------------------------------\n * When true, use the included font files for\n * Open Sans and Roboto Mono, rather than the\n * versions hosted by Google Fonts\n * ------------------------------------------\n */\n$use-local-fonts: false !default;\n\n$body-font-size-px: 19 !default;\n$body-font-size-px-medium: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: 1.75 !default;\n\n$interactable-text-decoration-offset: 0.125em !default;\n$interactable-text-decoration-thickness: #{math.div(1.5, $relative-1rem-px)}rem !default;\n$interactive-text-decoration-thickness: #{math.div(4, $relative-1rem-px)}rem !default;\n\n$main-font-family-name: \"Open Sans\" !default;\n$main-font-family:\n #{$main-font-family-name},\n sans-serif;\n$main-font-weight: 400 !default;\n$main-font-weight-medium: 600 !default;\n$main-font-weight-bold: 700 !default;\n$main-font-file: \"OpenSans-Regular.ttf\" !default;\n$main-font-file-medium: \"OpenSans-SemiBold.ttf\" !default;\n$main-font-file-bold: \"OpenSans-Bold.ttf\" !default;\n\n/*\n * ------------------------------------------\n * To use Supria Sans Condensed (which is the\n * approved heading typeface for The National\n * Archives), you need to obtain a licence to\n * properly embed the CSS files with the font\n * definitions in your service - check with a\n * member of the Digital Services team on how\n * to get a licence\n * ------------------------------------------\n */\n$heading-font-family-name: \"supria-sans-condensed\" !default;\n$heading-font-family:\n #{$heading-font-family-name},\n \"Arial Narrow\",\n sans-serif;\n$heading-font-weight: 500 !default;\n\n/*\n * ------------------------------------------\n * The detail font should be a monospace font\n * and is used for chips, supertitles as well\n * as the date search component\n * ------------------------------------------\n */\n$detail-font-family-name: \"Roboto Mono\" !default;\n$detail-font-family:\n #{$detail-font-family-name},\n monospace;\n$detail-font-weight: 400 !default;\n$detail-font-weight-bold: 500 !default;\n$detail-font-file: \"RobotoMono-Regular.ttf\" !default;\n$detail-font-file-bold: \"RobotoMono-Medium.ttf\" !default;\n\n$heading-xl-font-size-default: 64 !default;\n$heading-xl-font-size-medium: 48 !default;\n$heading-xl-font-size-small: 36 !default;\n$heading-xl-font-size-tiny: $heading-xl-font-size-small !default;\n$heading-xl-line-height: 1.1 !default;\n\n$heading-l-font-size-default: 36 !default;\n$heading-l-font-size-medium: 32 !default;\n$heading-l-font-size-small: 29 !default;\n$heading-l-font-size-tiny: $heading-l-font-size-small !default;\n$heading-l-line-height: 1.15 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: $heading-m-font-size-default !default;\n$heading-m-font-size-small: 21 !default;\n$heading-m-font-size-tiny: $heading-m-font-size-small !default;\n$heading-m-line-height: 1.4 !default;\n\n$heading-s-font-size-default: 19 !default;\n$heading-s-font-size-medium: $heading-s-font-size-default !default;\n$heading-s-font-size-small: $heading-s-font-size-default !default;\n$heading-s-font-size-tiny: $heading-s-font-size-default !default;\n$heading-s-line-height: 1.5 !default;\n","@use \"sass:math\";\n@use \"../variables/media\";\n@use \"../variables/typography\";\n\n$smallest-large-device-em: #{math.div(\n media.$largest-medium-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-medium-device-em: #{math.div(\n media.$largest-medium-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-medium-device-em: #{math.div(\n media.$largest-small-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-small-device-em: #{math.div(\n media.$largest-small-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-small-device-em: #{math.div(\n media.$largest-tiny-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-tiny-device-em: #{math.div(\n media.$largest-tiny-device-px,\n typography.$relative-1rem-px\n )}em;\n\n$media-large: \"(min-width: #{$smallest-large-device-em})\";\n$media-lt-large: \"(max-width: #{$largest-medium-device-em})\";\n$media-medium: \"(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})\";\n$media-gt-mobile: \"(min-width: #{$smallest-medium-device-em})\";\n$media-mobile: \"(max-width: #{$largest-small-device-em})\";\n$media-small: \"(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})\";\n$media-gt-tiny: \"(min-width: #{$smallest-small-device-em})\";\n$media-tiny: \"(max-width: #{$largest-tiny-device-em})\";\n\n// https://nationalarchives.github.io/design-system/styles/media/#media-queries\n@mixin on-large() {\n @media #{$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{$media-mobile} {\n @content;\n }\n}\n\n@mixin on-print() {\n @media print {\n @content;\n }\n}\n"]}
@@ -179,6 +179,16 @@
179
179
  }
180
180
  }
181
181
 
182
+ &--full-height {
183
+ height: 100%;
184
+
185
+ box-sizing: border-box;
186
+
187
+ @include colour.on-high-contrast-and-forced-colours {
188
+ height: auto;
189
+ }
190
+ }
191
+
182
192
  &__image-container {
183
193
  aspect-ratio: 3/2;
184
194
 
@@ -291,10 +301,6 @@
291
301
  padding-left: spacing.space(1);
292
302
  }
293
303
 
294
- &--plain {
295
- box-shadow: none;
296
- }
297
-
298
304
  &:not(:has(&__image-container)) {
299
305
  border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius
300
306
  bordersVars.$rounded-border-radius;