@nationalarchives/frontend 1.1.0 → 1.3.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 (161) hide show
  1. package/nationalarchives/all+analytics.js +1 -1
  2. package/nationalarchives/all+analytics.js.map +1 -1
  3. package/nationalarchives/all+analytics.mjs +0 -2
  4. package/nationalarchives/all.css +1 -1
  5. package/nationalarchives/all.css.map +1 -1
  6. package/nationalarchives/all.js +1 -1
  7. package/nationalarchives/all.js.map +1 -1
  8. package/nationalarchives/all.mjs +0 -2
  9. package/nationalarchives/analytics.js +1 -1
  10. package/nationalarchives/analytics.js.map +1 -1
  11. package/nationalarchives/analytics.mjs +4 -3
  12. package/nationalarchives/assets/fonts/fa-brands-400.woff2 +0 -0
  13. package/nationalarchives/assets/fonts/fa-solid-900.woff2 +0 -0
  14. package/nationalarchives/components/_presentation.scss +1 -1
  15. package/nationalarchives/components/accordion/accordion.css.map +1 -1
  16. package/nationalarchives/components/accordion/accordion.js +1 -1
  17. package/nationalarchives/components/accordion/accordion.js.map +1 -1
  18. package/nationalarchives/components/back-link/back-link.css.map +1 -1
  19. package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
  20. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
  21. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
  22. package/nationalarchives/components/button/button.css.map +1 -1
  23. package/nationalarchives/components/button/button.scss +0 -1
  24. package/nationalarchives/components/card/card.css +1 -1
  25. package/nationalarchives/components/card/card.css.map +1 -1
  26. package/nationalarchives/components/card/card.scss +2 -2
  27. package/nationalarchives/components/checkboxes/checkboxes.css +1 -1
  28. package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
  29. package/nationalarchives/components/checkboxes/checkboxes.scss +26 -13
  30. package/nationalarchives/components/checkboxes/fixtures.json +52 -0
  31. package/nationalarchives/components/code-block/code-block.css.map +1 -1
  32. package/nationalarchives/components/code-block/code-block.js +1 -1
  33. package/nationalarchives/components/code-block/code-block.js.map +1 -1
  34. package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
  35. package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
  36. package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
  37. package/nationalarchives/components/cookie-banner/cookie-banner.mjs +18 -35
  38. package/nationalarchives/components/cookie-banner/fixtures.json +0 -9
  39. package/nationalarchives/components/cookie-banner/macro-options.json +0 -7
  40. package/nationalarchives/components/cookie-banner/template.njk +0 -1
  41. package/nationalarchives/components/date-input/date-input.css +1 -1
  42. package/nationalarchives/components/date-input/date-input.css.map +1 -1
  43. package/nationalarchives/components/date-input/date-input.js +1 -1
  44. package/nationalarchives/components/date-input/date-input.js.map +1 -1
  45. package/nationalarchives/components/date-input/date-input.mjs +0 -4
  46. package/nationalarchives/components/date-input/fixtures.json +24 -0
  47. package/nationalarchives/components/date-search/date-search.css +1 -1
  48. package/nationalarchives/components/date-search/date-search.css.map +1 -1
  49. package/nationalarchives/components/details/details.css.map +1 -1
  50. package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
  51. package/nationalarchives/components/error-summary/error-summary.js +1 -1
  52. package/nationalarchives/components/error-summary/error-summary.js.map +1 -1
  53. package/nationalarchives/components/fieldset/fieldset.css.map +1 -1
  54. package/nationalarchives/components/file-input/file-input.css.map +1 -1
  55. package/nationalarchives/components/file-input/file-input.js +1 -1
  56. package/nationalarchives/components/file-input/file-input.js.map +1 -1
  57. package/nationalarchives/components/file-input/file-input.mjs +3 -13
  58. package/nationalarchives/components/files-list/files-list.css.map +1 -1
  59. package/nationalarchives/components/files-list/macro-options.json +1 -1
  60. package/nationalarchives/components/footer/fixtures.json +2 -2
  61. package/nationalarchives/components/footer/footer.css +1 -1
  62. package/nationalarchives/components/footer/footer.css.map +1 -1
  63. package/nationalarchives/components/footer/footer.js +1 -1
  64. package/nationalarchives/components/footer/footer.js.map +1 -1
  65. package/nationalarchives/components/footer/footer.mjs +5 -5
  66. package/nationalarchives/components/footer/template.njk +1 -1
  67. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  68. package/nationalarchives/components/gallery/gallery.js +1 -1
  69. package/nationalarchives/components/gallery/gallery.js.map +1 -1
  70. package/nationalarchives/components/global-header/global-header.css +1 -1
  71. package/nationalarchives/components/global-header/global-header.css.map +1 -1
  72. package/nationalarchives/components/global-header/global-header.js +1 -1
  73. package/nationalarchives/components/global-header/global-header.js.map +1 -1
  74. package/nationalarchives/components/header/header.css +1 -1
  75. package/nationalarchives/components/header/header.css.map +1 -1
  76. package/nationalarchives/components/header/header.js +1 -1
  77. package/nationalarchives/components/header/header.js.map +1 -1
  78. package/nationalarchives/components/hero/fixtures.json +7 -7
  79. package/nationalarchives/components/hero/hero.css +1 -1
  80. package/nationalarchives/components/hero/hero.css.map +1 -1
  81. package/nationalarchives/components/hero/hero.scss +1 -1
  82. package/nationalarchives/components/hero/template.njk +1 -1
  83. package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
  84. package/nationalarchives/components/panel/panel.css.map +1 -1
  85. package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
  86. package/nationalarchives/components/picture/picture.css +1 -1
  87. package/nationalarchives/components/picture/picture.css.map +1 -1
  88. package/nationalarchives/components/picture/picture.js +1 -1
  89. package/nationalarchives/components/picture/picture.js.map +1 -1
  90. package/nationalarchives/components/picture/picture.scss +4 -0
  91. package/nationalarchives/components/radios/fixtures.json +52 -0
  92. package/nationalarchives/components/radios/radios.css +1 -1
  93. package/nationalarchives/components/radios/radios.css.map +1 -1
  94. package/nationalarchives/components/radios/radios.scss +26 -13
  95. package/nationalarchives/components/search-field/search-field.css +1 -1
  96. package/nationalarchives/components/search-field/search-field.css.map +1 -1
  97. package/nationalarchives/components/secondary-navigation/secondary-navigation.css.map +1 -1
  98. package/nationalarchives/components/select/select.css +1 -1
  99. package/nationalarchives/components/select/select.css.map +1 -1
  100. package/nationalarchives/components/sidebar/fixtures.json +14 -6
  101. package/nationalarchives/components/sidebar/macro-options.json +56 -0
  102. package/nationalarchives/components/sidebar/sidebar.css.map +1 -1
  103. package/nationalarchives/components/sidebar/sidebar.js +1 -1
  104. package/nationalarchives/components/sidebar/sidebar.js.map +1 -1
  105. package/nationalarchives/components/sidebar/template.njk +3 -3
  106. package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
  107. package/nationalarchives/components/skip-link/skip-link.js +1 -1
  108. package/nationalarchives/components/skip-link/skip-link.js.map +1 -1
  109. package/nationalarchives/components/tabs/macro-options.json +21 -0
  110. package/nationalarchives/components/tabs/tabs.css +1 -1
  111. package/nationalarchives/components/tabs/tabs.css.map +1 -1
  112. package/nationalarchives/components/tabs/tabs.js +1 -1
  113. package/nationalarchives/components/tabs/tabs.js.map +1 -1
  114. package/nationalarchives/components/tabs/tabs.mjs +11 -1
  115. package/nationalarchives/components/tabs/tabs.scss +31 -33
  116. package/nationalarchives/components/tabs/template.njk +3 -3
  117. package/nationalarchives/components/tags/_index.scss +1 -0
  118. package/nationalarchives/components/tags/fixtures.json +194 -0
  119. package/nationalarchives/components/tags/macro-options.json +73 -0
  120. package/nationalarchives/components/tags/macro.njk +3 -0
  121. package/nationalarchives/components/tags/tags.css +1 -0
  122. package/nationalarchives/components/tags/tags.css.map +1 -0
  123. package/nationalarchives/components/tags/tags.scss +68 -0
  124. package/nationalarchives/components/tags/template.njk +20 -0
  125. package/nationalarchives/components/text-input/text-input.css +1 -1
  126. package/nationalarchives/components/text-input/text-input.css.map +1 -1
  127. package/nationalarchives/components/text-input/text-input.js +1 -1
  128. package/nationalarchives/components/text-input/text-input.js.map +1 -1
  129. package/nationalarchives/components/textarea/textarea.css +1 -1
  130. package/nationalarchives/components/textarea/textarea.css.map +1 -1
  131. package/nationalarchives/components/textarea/textarea.js +1 -1
  132. package/nationalarchives/components/textarea/textarea.js.map +1 -1
  133. package/nationalarchives/components/warning/warning.css.map +1 -1
  134. package/nationalarchives/error-page.css +1 -1
  135. package/nationalarchives/error-page.css.map +1 -1
  136. package/nationalarchives/font-awesome.css +5 -5
  137. package/nationalarchives/font-awesome.css.map +1 -1
  138. package/nationalarchives/ie.css +1 -1
  139. package/nationalarchives/ie.css.map +1 -1
  140. package/nationalarchives/print.css +1 -1
  141. package/nationalarchives/print.css.map +1 -1
  142. package/nationalarchives/print.scss +17 -1
  143. package/nationalarchives/prototype-kit.css +1 -1
  144. package/nationalarchives/prototype-kit.css.map +1 -1
  145. package/nationalarchives/templates/fixtures.json +25 -0
  146. package/nationalarchives/templates/layouts/_generic.njk +14 -2
  147. package/nationalarchives/tools/_colour.scss +5 -0
  148. package/nationalarchives/utilities/overrides/_index.scss +0 -6
  149. package/nationalarchives/variables/_a11y.scss +2 -0
  150. package/nationalarchives/variables/_forms.scss +2 -0
  151. package/package.json +17 -19
  152. package/nationalarchives/components/quick-filters/_index.scss +0 -1
  153. package/nationalarchives/components/quick-filters/fixtures.json +0 -131
  154. package/nationalarchives/components/quick-filters/macro-options.json +0 -54
  155. package/nationalarchives/components/quick-filters/macro.njk +0 -3
  156. package/nationalarchives/components/quick-filters/quick-filters.css +0 -1
  157. package/nationalarchives/components/quick-filters/quick-filters.css.map +0 -1
  158. package/nationalarchives/components/quick-filters/quick-filters.scss +0 -70
  159. package/nationalarchives/components/quick-filters/template.njk +0 -13
  160. package/nationalarchives/lib/cookie-events.mjs +0 -70
  161. package/nationalarchives/lib/cookies.mjs +0 -398
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_a11y.scss","../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/compound-filters/compound-filters.scss","../../../../src/nationalarchives/tools/_borders.scss","../../../../src/nationalarchives/variables/_borders.scss","../../../../src/nationalarchives/tools/_typography.scss"],"names":[],"mappings":"AA8OA,kCACE,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEACA,6CA3KA,4CAJA,gCC2DA,gDA9EA,wBAEA,2BClCF,sBACE,gBAUA,kCACE,aChCJ,sBAGE,aACA,eACA,mBACA,mBAEA,gBAEA,mBAIA,4BACE,aAGF,4BACE,6BAEA,aACA,mBACA,WAEA,iBC5BF,cCDsB,ICItB,eNuGI,wDGtEF,oCACE,gBACA,eAEA,gBAEA,YACA,gBAIJ,4BACE,aACA,cAEA,cAEA,kBAEA,YACA,cAEA,qBAEA,yBAEA,YAEA,eChEF,cCDsB,IFqEpB,uEAEE,WAEA,YACA,iBAEA,cAEA,kBACA,WACA,SHiBA,gDGZF,oCACE,wBAGF,mCACE","file":"compound-filters.css","sourcesContent":["@use \"sass:list\";\n@use \"sass:map\";\n@use \"sass:meta\";\n@use \"../variables/borders\";\n@use \"../variables/forms\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n \"keyline\",\n \"keyline-dark\"\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(sass($important): !important; else: null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour)\n if(sass($important): !important; else: null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if(sass($important): !important; else: 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(sass($important): !important; else: null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if(sass($important): !important; else: null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if(sass($important): !important; else: null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if(sass($important): !important; else: null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width\n colour-var($colour)\n $style\n if(sass($important): !important; else: null);\n } @else {\n outline-color: colour-var($colour)\n if(sass($important): !important; else: null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if(sass($important): !important; else: null);\n}\n\n%colour-input {\n @include colour-font(\"input-foreground\");\n @include colour-background(\"input-background\");\n @include colour-border(\"input-border\", forms.$form-field-border-width);\n}\n\n@mixin colour-input() {\n @extend %colour-input;\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%always-light {\n @include colour-css-vars;\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast;\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 --accent-border: var(--accent-border-bright);\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 --accent-border: var(--accent-border-bright);\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-border-bright: #{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(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"yellow\")} !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 --accent-border-bright: #{colour.brand-colour(\"grey\")} !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(\"maroon\")} !important;\n --accent-border-bright: #{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(\"chestnut\")} !important;\n --accent-border-bright: #{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(\"forest\")} !important;\n --accent-border-bright: #{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(\"navy\")} !important;\n --accent-border-bright: #{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%image-loader-background {\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 @media (prefers-reduced-motion) {\n animation: none !important;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n @extend %image-loader-background;\n }\n}\n","@use \"../variables/a11y\";\n@use \"colour\";\n@use \"borders\";\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 -webkit-clip-path: inset(50%) !important;\n clip-path: inset(50%) !important;\n}\n\n%focus-outline {\n outline: a11y.$focus-outline-outer-width colour.brand-colour(\"black\") solid !important;\n outline-offset: a11y.$focus-outline-inner-width !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"yellow\") !important;\n\n transition:\n outline-offset 0.1s,\n box-shadow 0.1s;\n\n .tna-template--dark-theme & {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"black\") !important;\n }\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"black\") !important;\n }\n }\n}\n\n@mixin focus-outline {\n @extend %focus-outline;\n}\n\n@mixin no-focus-outline {\n outline: none !important;\n\n box-shadow: none !important;\n}\n\n%active-outline {\n outline: a11y.$focus-outline-active-outer-width colour.brand-colour(\"black\")\n solid !important;\n outline-offset: a11y.$focus-outline-active-inner-width !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"yellow\") !important;\n\n transition: none;\n\n .tna-template--dark-theme & {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"black\") !important;\n }\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"black\") !important;\n }\n }\n}\n\n@mixin active-outline {\n @extend %active-outline;\n}\n\n%faux-full-outline {\n position: relative;\n}\n\n%faux-full-outline-anchor {\n &::before {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 9;\n\n @include borders.rounded-border;\n }\n\n &:focus,\n &:active {\n @include no-focus-outline;\n }\n\n &:focus {\n &::before {\n @include focus-outline;\n }\n }\n\n &:active {\n &::before {\n @include active-outline;\n }\n }\n}\n\n@mixin faux-full-outline($anchor_selector) {\n @extend %faux-full-outline;\n\n #{$anchor_selector} {\n @extend %faux-full-outline-anchor;\n }\n}\n\n%focus-indicator-only-on-keyboard-focus {\n &:focus:not(:focus-visible) {\n @include no-focus-outline;\n }\n}\n\n@mixin focus-indicator-only-on-keyboard-focus {\n @extend %focus-indicator-only-on-keyboard-focus;\n}\n","@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n/*\n * ------------------------------------------\n * Spacing is created with rem rather than px\n * units as when users use a custom font size\n * some browsers handle the resize of rem and\n * em separately from px which causes spacing\n * and layout issues, so to ensure everything\n * remaians consistent we use rem for spacing\n * and typography. The original intention was\n * separation so that we could scale the type\n * without affecting spacing, but in practice\n * there are too many ways to change the font\n * size in various browsers and devices\n * ------------------------------------------\n */\n@function space($size) {\n // @return #{$size * spacing.$spacing-unit-px}px;\n @return #{$size}rem;\n}\n\n%space-above {\n margin-top: space(2);\n @extend %no-space-above-for-first-children;\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n @extend %no-space-above-for-first-children;\n}\n\n%no-space-above-for-first-children {\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 \"../../tools/a11y\";\n@use \"../../tools/borders\";\n@use \"../../tools/colour\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-compound-filters {\n @include spacing.space-above;\n\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: spacing.space(0.5) spacing.space(0.75);\n\n list-style: none;\n\n border-radius: 0.1px;\n\n @include a11y.focus-indicator-only-on-keyboard-focus;\n\n &:empty {\n display: none;\n }\n\n &__item {\n padding: 0 spacing.space(0.125) 0 spacing.space(0.75);\n\n display: flex;\n align-items: center;\n gap: spacing.space(0.5);\n\n line-height: 1.75;\n\n @include borders.rounded-border;\n\n @include typography.font-size(16);\n\n @include colour.colour-border(\"keyline\", 1px);\n\n &--remove {\n padding-right: 0;\n padding-left: 0;\n\n background: none;\n\n border: none;\n border-radius: 0;\n }\n }\n\n &__link {\n width: 1.5rem;\n height: 1.5rem;\n\n flex-shrink: 0;\n\n position: relative;\n\n font-size: 0;\n line-height: 0;\n\n text-decoration: none;\n\n background: transparent;\n\n border: none;\n\n cursor: pointer;\n\n @include borders.rounded-border;\n\n &::before,\n &::after {\n content: \"\";\n\n height: 1rem;\n margin-left: -1px;\n\n display: block;\n\n position: absolute;\n top: 0.25rem;\n left: 50%;\n\n @include colour.colour-border(\"font-base\", 2px, solid, left);\n }\n\n &::before {\n transform: rotate(45deg);\n }\n\n &::after {\n transform: rotate(-45deg);\n }\n\n &:hover {\n @include colour.contrast;\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: 2px !default;\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-variation-settings: \"wdth\" 100;\n font-style: normal;\n font-optical-sizing: auto;\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"]}
1
+ {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_a11y.scss","../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/compound-filters/compound-filters.scss","../../../../src/nationalarchives/tools/_borders.scss","../../../../src/nationalarchives/variables/_borders.scss","../../../../src/nationalarchives/tools/_typography.scss"],"names":[],"mappings":"AAmPA,kCACE,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEACA,6CA/KA,4CAJA,gCC0DA,gDA9EA,wBAEA,2BClCF,sBACE,gBAUA,kCACE,aChCJ,sBAGE,aACA,eACA,mBACA,mBAEA,gBAEA,mBAIA,4BACE,aAGF,4BACE,6BAEA,aACA,mBACA,WAEA,iBC5BF,cCDsB,ICItB,eNwGI,wDGvEF,oCACE,gBACA,eAEA,gBAEA,YACA,gBAIJ,4BACE,aACA,cAEA,cAEA,kBAEA,YACA,cAEA,qBAEA,yBAEA,YAEA,eChEF,cCDsB,IFqEpB,uEAEE,WAEA,YACA,iBAEA,cAEA,kBACA,WACA,SHkBA,gDGbF,oCACE,wBAGF,mCACE","file":"compound-filters.css","sourcesContent":["@use \"sass:list\";\n@use \"sass:map\";\n@use \"sass:meta\";\n@use \"../variables/a11y\";\n@use \"../variables/borders\";\n@use \"../variables/forms\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n \"keyline\",\n \"keyline-dark\"\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(sass($important): !important; else: null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour)\n if(sass($important): !important; else: null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if(sass($important): !important; else: 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(sass($important): !important; else: null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if(sass($important): !important; else: null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if(sass($important): !important; else: null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if(sass($important): !important; else: null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width\n colour-var($colour)\n $style\n if(sass($important): !important; else: null);\n } @else {\n outline-color: colour-var($colour)\n if(sass($important): !important; else: null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if(sass($important): !important; else: null);\n}\n\n%colour-input {\n @include colour-font(\"input-foreground\");\n @include colour-background(\"input-background\");\n @include colour-border(\"input-border\", forms.$form-field-border-width);\n\n &:hover {\n outline: a11y.$focus-outline-active-total-width var(--keyline) solid;\n }\n}\n\n@mixin colour-input() {\n @extend %colour-input;\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%always-light {\n @include colour-css-vars;\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast;\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 --accent-border: var(--accent-border-bright);\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 --accent-border: var(--accent-border-bright);\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-border-bright: #{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(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"yellow\")} !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 --accent-border-bright: #{colour.brand-colour(\"grey\")} !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(\"maroon\")} !important;\n --accent-border-bright: #{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(\"chestnut\")} !important;\n --accent-border-bright: #{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(\"forest\")} !important;\n --accent-border-bright: #{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(\"navy\")} !important;\n --accent-border-bright: #{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%image-loader-background {\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 @media (prefers-reduced-motion) {\n animation: none !important;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n @extend %image-loader-background;\n }\n}\n","@use \"../variables/a11y\";\n@use \"colour\";\n@use \"borders\";\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 -webkit-clip-path: inset(50%) !important;\n clip-path: inset(50%) !important;\n}\n\n%focus-outline {\n outline: a11y.$focus-outline-outer-width colour.brand-colour(\"black\") solid !important;\n outline-offset: a11y.$focus-outline-inner-width !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"yellow\") !important;\n\n transition:\n outline-offset 0.1s,\n box-shadow 0.1s;\n\n .tna-template--dark-theme & {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"black\") !important;\n }\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"black\") !important;\n }\n }\n}\n\n@mixin focus-outline {\n @extend %focus-outline;\n}\n\n@mixin no-focus-outline {\n outline: none !important;\n\n box-shadow: none !important;\n}\n\n%active-outline {\n outline: a11y.$focus-outline-active-outer-width colour.brand-colour(\"black\")\n solid !important;\n outline-offset: a11y.$focus-outline-active-inner-width !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"yellow\") !important;\n\n transition: none;\n\n .tna-template--dark-theme & {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"black\") !important;\n }\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"black\") !important;\n }\n }\n}\n\n@mixin active-outline {\n @extend %active-outline;\n}\n\n%faux-full-outline {\n position: relative;\n}\n\n%faux-full-outline-anchor {\n &::before {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 9;\n\n @include borders.rounded-border;\n }\n\n &:focus,\n &:active {\n @include no-focus-outline;\n }\n\n &:focus {\n &::before {\n @include focus-outline;\n }\n }\n\n &:active {\n &::before {\n @include active-outline;\n }\n }\n}\n\n@mixin faux-full-outline($anchor_selector) {\n @extend %faux-full-outline;\n\n #{$anchor_selector} {\n @extend %faux-full-outline-anchor;\n }\n}\n\n%focus-indicator-only-on-keyboard-focus {\n &:focus:not(:focus-visible) {\n @include no-focus-outline;\n }\n}\n\n@mixin focus-indicator-only-on-keyboard-focus {\n @extend %focus-indicator-only-on-keyboard-focus;\n}\n","@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n/*\n * ------------------------------------------\n * Spacing is created with rem rather than px\n * units as when users use a custom font size\n * some browsers handle the resize of rem and\n * em separately from px which causes spacing\n * and layout issues, so to ensure everything\n * remaians consistent we use rem for spacing\n * and typography. The original intention was\n * separation so that we could scale the type\n * without affecting spacing, but in practice\n * there are too many ways to change the font\n * size in various browsers and devices\n * ------------------------------------------\n */\n@function space($size) {\n // @return #{$size * spacing.$spacing-unit-px}px;\n @return #{$size}rem;\n}\n\n%space-above {\n margin-top: space(2);\n @extend %no-space-above-for-first-children;\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n @extend %no-space-above-for-first-children;\n}\n\n%no-space-above-for-first-children {\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 \"../../tools/a11y\";\n@use \"../../tools/borders\";\n@use \"../../tools/colour\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-compound-filters {\n @include spacing.space-above;\n\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: spacing.space(0.5) spacing.space(0.75);\n\n list-style: none;\n\n border-radius: 0.1px;\n\n @include a11y.focus-indicator-only-on-keyboard-focus;\n\n &:empty {\n display: none;\n }\n\n &__item {\n padding: 0 spacing.space(0.125) 0 spacing.space(0.75);\n\n display: flex;\n align-items: center;\n gap: spacing.space(0.5);\n\n line-height: 1.75;\n\n @include borders.rounded-border;\n\n @include typography.font-size(16);\n\n @include colour.colour-border(\"keyline\", 1px);\n\n &--remove {\n padding-right: 0;\n padding-left: 0;\n\n background: none;\n\n border: none;\n border-radius: 0;\n }\n }\n\n &__link {\n width: 1.5rem;\n height: 1.5rem;\n\n flex-shrink: 0;\n\n position: relative;\n\n font-size: 0;\n line-height: 0;\n\n text-decoration: none;\n\n background: transparent;\n\n border: none;\n\n cursor: pointer;\n\n @include borders.rounded-border;\n\n &::before,\n &::after {\n content: \"\";\n\n height: 1rem;\n margin-left: -1px;\n\n display: block;\n\n position: absolute;\n top: 0.25rem;\n left: 50%;\n\n @include colour.colour-border(\"font-base\", 2px, solid, left);\n }\n\n &::before {\n transform: rotate(45deg);\n }\n\n &::after {\n transform: rotate(-45deg);\n }\n\n &:hover {\n @include colour.contrast;\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: 2px !default;\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-variation-settings: \"wdth\" 100;\n font-style: normal;\n font-optical-sizing: auto;\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"]}
@@ -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={533(e,t,i){i.d(t,{A:()=>n}),window.TNAFrontendCookieEvents||=null;class s{events={};oneTimeEvents={};debug=!1;constructor(e=!1){if(this.debug=e,window.TNAFrontendCookieEvents)return this.log("Using existing TNAFrontendCookieEvents instance"),window.TNAFrontendCookieEvents;window.TNAFrontendCookieEvents=this}log(...e){this.debug&&console.log("[TNA Frontend Cookie Events]",...e)}on(e,t){Object.hasOwn(this.events,e)||(this.events[e]=[]),this.events[e]=[...this.events[e],t]}once(e,t){Object.hasOwn(this.oneTimeEvents,e)||(this.oneTimeEvents[e]=[]),this.oneTimeEvents[e]=[...this.oneTimeEvents[e],t]}trigger(e,t={}){if(Object.hasOwn(this.events,e)&&(this.log(`Triggering event: ${e}`,t),this.events[e].forEach(e=>e.call(this,t))),Object.hasOwn(this.oneTimeEvents,e)){this.log(`Triggering one-time event: ${e}`,t);for(let i=this.oneTimeEvents[e].length-1;i>=0;i-=1)this.oneTimeEvents[e][i].call(this,t),this.oneTimeEvents[e].splice(i,1)}}}window.TNAFrontendCookies||=null;const o=["usage","settings","marketing","essential"];class n{defaultDomain="";defaultPath="";secure=!0;policiesKey="";events=null;defaultAge=null;policiesCorrectOnInit=!1;debug="true"===document.documentElement.dataset.tnaFrontendDebug;constructor(e={}){const{defaultDomain:t,defaultPath:i,secure:n,policiesKey:c,defaultAge:l,newInstance:r=!1,noInit:a=!1}=e;if(!r&&window.TNAFrontendCookies)return window.TNAFrontendCookies;if(this.defaultDomain=t||document.documentElement.dataset.tnaCookiesDomain||window.location.hostname,this.defaultPath=i||document.documentElement.dataset.tnaCookiesPath||"/",this.secure=n||"true"!==document.documentElement.dataset.tnaCookiesInsecure,this.policiesKey=c||document.documentElement.dataset.tnaCookiesPoliciesKey||"cookies_policy",l)this.defaultAge=l;else{const e=31536e3;this.defaultAge=parseInt(document.documentElement.dataset.tnaCookiesDefaultAge,10)||e}this.events=new s(this.debug),this.policiesCorrectOnInit=Object.keys(this.policies).length===o.length&&o.every(e=>Object.keys(this.policies).includes(e)&&"boolean"==typeof this.policies[e]),this.policiesCorrectOnInit||a||this.init(),this.log({defaultDomain:this.defaultDomain,defaultPath:this.defaultPath,secure:this.secure,policiesKey:this.policiesKey,defaultAge:this.defaultAge,policiesCorrectOnInit:this.policiesCorrectOnInit}),r||window.TNAFrontendCookies||(window.TNAFrontendCookies=this)}init(){const e=this.policies;this.log("Existing policies on init:",e);const t=Object.fromEntries(Object.keys(e).filter(e=>o.includes(e)).map(t=>[t,e[t]]));Object.keys(t).length&&this.log("Filtered existing policies:",t),this.savePolicies({usage:!1,settings:!1,marketing:!1,...t,essential:!0})}log(...e){this.debug&&console.log("[TNA Frontend Cookies]",...e,this.all)}destroyInstance(){this.log("Destroying TNAFrontendCookies instance"),window.TNAFrontendCookies=null}get all(){const e={};return document.cookie.split("; ").filter(e=>""!==e.trim()).forEach(t=>{const i=t.trim().split("="),[s,o]=i;s&&(e[s]=decodeURIComponent(o||""))}),e}get policies(){try{return JSON.parse(this.get(this.policiesKey)||"{}")}catch(e){return{}}}exists(e){return Object.hasOwn(this.all,e)}hasValue(e,t){return this.get(e)===t}get(e){return this.exists(e)?decodeURIComponent(this.all[e]):null}set(e,t,i={}){const{maxAge:s=this.defaultAge,sameSite:o="Lax",domain:n=this.defaultDomain,path:c=this.defaultPath,secure:l=this.secure,session:r=!1}=i;if(!e)return;let a="";l&&(a="; secure");let h="";r||(h=`; max-age=${s}`);const d=`${encodeURIComponent(e)}=${encodeURIComponent(t)}; domain=${n}; samesite=${o}; path=${c}${h}${a}`;document.cookie=d,this.log("Set cookie:",{key:e,value:t,maxAge:s,path:c,sameSite:o,domain:n,secure:l,session:r,cookie:d}),this.events.trigger("setCookie",{key:e,value:t,maxAge:s,path:c,sameSite:o,domain:n,secure:l,session:r,cookie:d})}delete(e,t="/",i=this.defaultDomain){const s={maxAge:-1,path:t,domain:i||this.defaultDomain};this.set(e,"",s),this.log("Deleted cookie:",{key:e,path:t,domain:i,...s}),this.events.trigger("deleteCookie",{key:e,...s})}deleteAll(e="/",t=this.defaultDomain){Object.keys(this.all).forEach(i=>{this.delete(i,e,t)}),this.log("Deleted all cookies",{path:e,domain:t}),this.events.trigger("deleteAllCookies",{path:e,domain:t})}acceptPolicy(e){this.log("Accepting policy:",e),this.setPolicy(e,!0),this.events.trigger("acceptPolicy",e),this.events.trigger("changePolicy",{[e]:!0})}rejectPolicy(e){this.log("Rejecting policy:",e),this.setPolicy(e,!1),this.events.trigger("rejectPolicy",e),this.events.trigger("changePolicy",{[e]:!1})}setPolicy(e,t){"essential"!==e?(this.log(`Setting policy ${e} to ${t}`),this.savePolicies({...this.policies,[e]:t,essential:!0}),this.events.trigger("changePolicy",{[e]:t})):this.log("Cannot change essential policy, it is always accepted.")}acceptAllPolicies(){this.log("Accepting all policies");const e=Object.fromEntries(Object.keys(this.policies).map(e=>[e.toLowerCase(),!0]));this.savePolicies(e),this.events.trigger("acceptAllPolicies"),this.events.trigger("changePolicy",e)}rejectAllPolicies(){this.log("Rejecting all policies");const e={...Object.fromEntries(Object.keys(this.policies).map(e=>[e.toLowerCase(),!1])),essential:!0};this.savePolicies(e),this.events.trigger("rejectAllPolicies"),this.events.trigger("changePolicy",e)}savePolicies(e){this.log("Saving policies:",e),this.set(this.policiesKey,JSON.stringify(e))}isPolicyAccepted(e){return Object.hasOwn(this.policies,e)?!0===this.policies[e]:null}on(e,t){this.log(`Adding event listener for: ${e}`),this.events.on(e,t)}once(e,t){this.log(`Adding one-time event listener for: ${e}`),this.events.once(e,t)}}}},t={};function i(s){var o=t[s];if(void 0!==o)return o.exports;var n=t[s]={exports:{}};return e[s](n,n.exports,i),n.exports}i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};i.r(s),i.d(s,{CookieBanner:()=>n,Cookies:()=>o.A});var o=i(533);class n{constructor(e){this.$module=e,this.$acceptButton=e&&e.querySelector('[value="accept"]'),this.$rejectButton=e&&e.querySelector('[value="reject"]'),this.$prompt=e&&e.querySelector(".tna-cookie-banner__message--prompt"),this.$acceptedMessage=e&&e.querySelector(".tna-cookie-banner__message--accepted"),this.$rejectedMessage=e&&e.querySelector(".tna-cookie-banner__message--rejected"),this.$closeButtons=e&&e.querySelectorAll('[value="close"]'),this.$module&&this.$acceptButton&&this.$rejectButton&&this.$prompt&&this.$acceptedMessage&&this.$rejectedMessage&&this.$closeButtons&&(this.cookies=new o.A({newInstance:!0}),this.cookiePreferencesSetKey=this.$module.dataset.preferencesKey||"cookie_preferences_set",this.cookies.policiesCorrectOnInit||this.cookies.delete(this.cookiePreferencesSetKey),this.cookies.exists(this.cookiePreferencesSetKey)&&this.cookies.hasValue(this.cookiePreferencesSetKey,"true")||(this.$module.removeAttribute("hidden"),this.$acceptButton.addEventListener("click",()=>this.accept()),this.$rejectButton.addEventListener("click",()=>this.reject())))}accept(){this.$prompt.setAttribute("hidden",""),this.complete(),this.cookies.acceptAllPolicies(),this.$acceptedMessage.removeAttribute("hidden"),this.$acceptedMessage.setAttribute("tabindex","0"),this.$acceptedMessage.focus(),this.$acceptedMessage.addEventListener("blur",()=>{this.$acceptedMessage.removeAttribute("tabindex")})}reject(){this.$prompt.setAttribute("hidden",""),this.complete(),this.cookies.rejectAllPolicies(),this.$rejectedMessage.removeAttribute("hidden"),this.$rejectedMessage.setAttribute("tabindex","0"),this.$rejectedMessage.focus(),this.$rejectedMessage.addEventListener("blur",()=>{this.$rejectedMessage.removeAttribute("tabindex")})}complete(){this.cookies.set(this.cookiePreferencesSetKey,!0),this.$closeButtons.forEach(e=>{e.addEventListener("click",()=>this.close())})}close(){this.$module.setAttribute("hidden","")}}return s})());
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={404(e,t,s){s.d(t,{A:()=>n});class r{events={};oneTimeEvents={};constructor(){if(window.TNAFrontendCookieEvents&&window.TNAFrontendCookieEvents instanceof r)return window.TNAFrontendCookieEvents;window.TNAFrontendCookieEvents=this}clearAll(){this.events={},this.oneTimeEvents={}}on(e,t){this.events[e]=[...this.events[e]||[],t]}once(e,t){this.oneTimeEvents[e]=[...this.oneTimeEvents[e]||[],t]}trigger(e,t={}){Object.hasOwn(this.events,e)&&this.events[e].forEach(e=>e.call(this,t)),Object.hasOwn(this.oneTimeEvents,e)&&(this.oneTimeEvents[e].forEach(e=>e.call(this,t)),this.oneTimeEvents[e]=[])}}class n{defaultDomain="";defaultPath="";secure=!0;preferencesKey="";events=null;defaultAge=null;preferencesCorrectOnInit=!1;tnaCookiePreferences=["usage","settings","marketing","essential"];constructor(e={}){const{defaultDomain:t,defaultPath:s,secure:n,preferencesKey:i,preferencesSetKey:o,defaultAge:c,noInit:a=!1}=e,h=document.documentElement.dataset;this.defaultDomain=t||h.tnaCookiesDomain||window.location.hostname,this.defaultPath=s||h.tnaCookiesPath||"/",this.secure=n||"true"!==h.tnaCookiesInsecure,this.preferencesKey=i||h.tnaCookiesPreferencesKey||"cookie_preferences",this.preferencesSetKey=o||h.tnaCookiesPreferencesSetKey||"cookie_preferences_set",this.defaultAge=c||parseInt(h.tnaCookiesDefaultAge,10)||31536e3,this.events=new r,this.preferencesCorrectOnInit=this.validatePreferences(this.preferences),this.preferencesCorrectOnInit||(this.preferencesSet=!1,a||this.init())}init(){const e=this.preferences,t=Object.fromEntries(Object.keys(e).filter(e=>this.tnaCookiePreferences.includes(e)).map(t=>[t,e[t]]));this.savePreferences({usage:!1,settings:!1,marketing:!1,...t,essential:!0})}validatePreferences(e){return Object.keys(e).length===this.tnaCookiePreferences.length&&this.tnaCookiePreferences.every(t=>Object.keys(e).includes(t)&&"boolean"==typeof e[t])}get all(){const e={};return document.cookie.split("; ").filter(e=>""!==e.trim()).filter(e=>e.includes("=")).forEach(t=>{const s=t.trim().split("="),[r,n=""]=s;e[r]=decodeURIComponent(n)}),e}get preferences(){try{return JSON.parse(this.get(this.preferencesKey)||"{}")}catch(e){return{}}}exists(e){return Object.hasOwn(this.all,e)}hasValue(e,t){return this.get(e)===t}get(e){if(this.exists(e))return decodeURIComponent(this.all[e])}set(e,t,s={}){const{maxAge:r=this.defaultAge,sameSite:n="Lax",domain:i=this.defaultDomain,path:o=this.defaultPath,secure:c=this.secure,session:a=!1}=s;if(!e)return;const h=c?"; secure":"",l=a?"":`; max-age=${r}`,f=`${encodeURIComponent(e)}=${encodeURIComponent(t)}; domain=${i}; samesite=${n}; path=${o}${l}${h}`;document.cookie=f;const d={key:e,value:t,maxAge:r,path:o,sameSite:n,domain:i,secure:c,session:a,cookie:f};this.events.trigger("setCookie",d)}delete(e,t="/",s=this.defaultDomain){const r={maxAge:-1,path:t,domain:s};this.set(e,"",r),this.events.trigger("deleteCookie",{key:e,...r})}deleteAll(e="/",t=this.defaultDomain){Object.keys(this.all).forEach(s=>{this.delete(s,e,t)});const s={path:e,domain:t};this.events.trigger("deleteAllCookies",s)}enablePreference(e){if(!Object.hasOwn(this.preferences,e))throw new Error(`Preference '${e}' does not exist`);this.setPreference(e,!0),this.events.trigger("enablePreference",e),this.events.trigger("changePreference",{[e]:!0})}disablePreference(e){if(!Object.hasOwn(this.preferences,e))throw new Error(`Preference '${e}' does not exist`);this.setPreference(e,!1),this.events.trigger("disablePreference",e),this.events.trigger("changePreference",{[e]:!1})}setPreference(e,t){if(!Object.hasOwn(this.preferences,e))throw new Error(`Preference '${e}' does not exist`);"essential"!==e&&(this.savePreferences({...this.preferences,[e]:t,essential:!0}),this.events.trigger("changePreference",{[e]:t}))}enableAllPreferences(){const e=Object.fromEntries(Object.keys(this.preferences).map(e=>[e.toLowerCase(),!0]));this.savePreferences(e),this.preferencesSet=!0,this.events.trigger("enableAllPreferences"),this.events.trigger("changePreference",e)}disableAllPreferences(){const e={...Object.fromEntries(Object.keys(this.preferences).map(e=>[e.toLowerCase(),!1])),essential:!0};this.savePreferences(e),this.preferencesSet=!0,this.events.trigger("disableAllPreferences"),this.events.trigger("changePreference",e)}savePreferences(e){this.set(this.preferencesKey,JSON.stringify(e))}get preferencesSet(){return this.hasValue(this.preferencesSetKey,"true")}set preferencesSet(e){!0===e&&this.validatePreferences(JSON.parse(this.get(this.preferencesKey)))?this.set(this.preferencesSetKey,"true"):this.delete(this.preferencesSetKey),this.events.trigger("preferencesSet")}preference(e){if(Object.hasOwn(this.preferences,e))return!0===this.preferences[e];throw new Error(`Preference '${e}' does not exist`)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}}}};const t={};function s(r){const n=t[r];if(void 0!==n)return n.exports;const i=t[r]={exports:{}};return e[r](i,i.exports,s),i.exports}s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};let r={};s.r(r),s.d(r,{CookieBanner:()=>i,Cookies:()=>n.A});var n=s(404);class i{constructor(e){this.$module=e,this.$acceptButton=e&&e.querySelector('[value="accept"]'),this.$rejectButton=e&&e.querySelector('[value="reject"]'),this.$prompt=e&&e.querySelector(".tna-cookie-banner__message--prompt"),this.$acceptedMessage=e&&e.querySelector(".tna-cookie-banner__message--accepted"),this.$rejectedMessage=e&&e.querySelector(".tna-cookie-banner__message--rejected"),this.$closeButtons=e&&e.querySelectorAll('[value="close"]'),this.$module&&this.$acceptButton&&this.$rejectButton&&this.$prompt&&this.$acceptedMessage&&this.$rejectedMessage&&this.$closeButtons&&(this.cookies=new n.A,this.cookies.preferencesSet||(this.$module.removeAttribute("hidden"),this.$acceptButton.addEventListener("click",()=>this.accept()),this.$rejectButton.addEventListener("click",()=>this.reject()),this.$closeButtons.forEach(e=>{e.addEventListener("click",()=>this.close())})))}accept(){this.cookies.enableAllPreferences(),this.showPanel(this.$acceptedMessage)}reject(){this.cookies.disableAllPreferences(),this.showPanel(this.$rejectedMessage)}showPanel(e){this.$prompt.setAttribute("hidden",""),e.removeAttribute("hidden"),e.setAttribute("tabindex","0"),e.focus(),e.addEventListener("blur",()=>{e.removeAttribute("tabindex")})}close(){this.$module.setAttribute("hidden","")}}return r})());
2
2
  //# sourceMappingURL=cookie-banner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/cookie-banner/cookie-banner.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OA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c9G,QAAS4H,IAC1BA,EAAaN,iBAAiB,QAAS,IAAMlI,KAAKyI,UAEtD,CAEA,KAAAA,GACEzI,KAAKmH,QAAQkB,aAAa,SAAU,GACtC","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/lib/cookie-events.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/cookies.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/cookie-banner/cookie-banner.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 ","window.TNAFrontendCookieEvents ||= null;\n\nexport class CookieEventHandler {\n events = {};\n oneTimeEvents = {};\n debug = false;\n\n constructor(debug = false) {\n this.debug = debug;\n if (window.TNAFrontendCookieEvents) {\n this.log(\"Using existing TNAFrontendCookieEvents instance\");\n /* eslint-disable-next-line no-constructor-return */\n return window.TNAFrontendCookieEvents;\n }\n window.TNAFrontendCookieEvents = this;\n }\n\n log(...args) {\n if (this.debug) {\n /* eslint-disable-next-line no-console */\n console.log(\"[TNA Frontend Cookie Events]\", ...args);\n }\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n if (!Object.hasOwn(this.events, event)) {\n this.events[event] = [];\n }\n this.events[event] = [...this.events[event], callback];\n }\n\n once(event, callback) {\n if (!Object.hasOwn(this.oneTimeEvents, event)) {\n this.oneTimeEvents[event] = [];\n }\n this.oneTimeEvents[event] = [...this.oneTimeEvents[event], callback];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.hasOwn(this.events, event)) {\n this.log(`Triggering event: ${event}`, data);\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n if (Object.hasOwn(this.oneTimeEvents, event)) {\n this.log(`Triggering one-time event: ${event}`, data);\n\n for (\n /* eslint-disable-next-line no-magic-numbers */\n let eventIndex = this.oneTimeEvents[event].length - 1;\n /* eslint-disable-next-line no-magic-numbers */\n eventIndex >= 0;\n /* eslint-disable-next-line no-magic-numbers */\n eventIndex -= 1\n ) {\n const eventToTrigger = this.oneTimeEvents[event][eventIndex];\n eventToTrigger.call(this, data);\n /* eslint-disable-next-line no-magic-numbers */\n this.oneTimeEvents[event].splice(eventIndex, 1);\n }\n }\n }\n}\n","/* eslint-disable max-lines */\n/* eslint-disable no-console */\n\nimport { CookieEventHandler } from \"./cookie-events.mjs\";\n\nwindow.TNAFrontendCookies ||= null;\n\nconst tnaCookiePolicies = [\"usage\", \"settings\", \"marketing\", \"essential\"];\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n defaultDomain = \"\";\n /** @protected */\n defaultPath = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n policiesKey = \"\";\n /** @protected */\n events = null;\n /** @protected */\n defaultAge = null;\n /** @protected */\n policiesCorrectOnInit = false;\n /** @protected */\n debug = document.documentElement.dataset.tnaFrontendDebug === \"true\";\n\n /**\n * Create a cookie handler.\n * @param {String} [options.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path] - The domain to register the cookie with.\n * @param {Boolean} [options.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.policiesKey] - The name of the cookie.\n * @param {Number} [options.defaultAge] - The default age of non-session cookies.\n * @param {String} [options.newInstance=false] - Create a fresh instance of the cookie class.\n * @param {Boolean} [options.noInit=false] - Don't initialise a blank cookie policy.\n */\n constructor(options = {}) {\n const {\n defaultDomain,\n defaultPath,\n secure,\n policiesKey,\n defaultAge,\n newInstance = false,\n noInit = false,\n } = options;\n if (!newInstance && window.TNAFrontendCookies) {\n /* eslint-disable-next-line no-constructor-return */\n return window.TNAFrontendCookies;\n }\n if (defaultDomain) {\n this.defaultDomain = defaultDomain;\n } else {\n this.defaultDomain =\n document.documentElement.dataset.tnaCookiesDomain ||\n window.location.hostname;\n }\n if (defaultPath) {\n this.defaultPath = defaultPath;\n } else {\n this.defaultPath = document.documentElement.dataset.tnaCookiesPath || \"/\";\n }\n if (secure) {\n this.secure = secure;\n } else {\n this.secure =\n document.documentElement.dataset.tnaCookiesInsecure !== \"true\";\n }\n if (policiesKey) {\n this.policiesKey = policiesKey;\n } else {\n this.policiesKey =\n document.documentElement.dataset.tnaCookiesPoliciesKey ||\n \"cookies_policy\";\n }\n if (defaultAge) {\n this.defaultAge = defaultAge;\n } else {\n /* eslint-disable-next-line no-magic-numbers */\n const secondsInAYear = 365 * 24 * 60 * 60;\n this.defaultAge =\n parseInt(document.documentElement.dataset.tnaCookiesDefaultAge, 10) ||\n secondsInAYear;\n }\n this.events = new CookieEventHandler(this.debug);\n this.policiesCorrectOnInit =\n Object.keys(this.policies).length === tnaCookiePolicies.length &&\n tnaCookiePolicies.every(\n (policy) =>\n Object.keys(this.policies).includes(policy) &&\n typeof this.policies[policy] === \"boolean\",\n );\n if (!this.policiesCorrectOnInit && !noInit) {\n this.init();\n }\n this.log({\n defaultDomain: this.defaultDomain,\n defaultPath: this.defaultPath,\n secure: this.secure,\n policiesKey: this.policiesKey,\n defaultAge: this.defaultAge,\n policiesCorrectOnInit: this.policiesCorrectOnInit,\n });\n if (!newInstance && !window.TNAFrontendCookies) {\n window.TNAFrontendCookies = this;\n }\n }\n\n /** @protected */\n init() {\n const existingPolicies = this.policies;\n this.log(\"Existing policies on init:\", existingPolicies);\n const filteredExistingPolicies = Object.fromEntries(\n Object.keys(existingPolicies)\n .filter((policy) => tnaCookiePolicies.includes(policy))\n .map((policy) => [policy, existingPolicies[policy]]),\n );\n if (Object.keys(filteredExistingPolicies).length) {\n this.log(\"Filtered existing policies:\", filteredExistingPolicies);\n }\n this.savePolicies({\n usage: false,\n settings: false,\n marketing: false,\n ...filteredExistingPolicies,\n essential: true,\n });\n }\n\n log(...args) {\n if (this.debug) {\n console.log(\"[TNA Frontend Cookies]\", ...args, this.all);\n }\n }\n\n destroyInstance() {\n this.log(\"Destroying TNAFrontendCookies instance\");\n window.TNAFrontendCookies = null;\n }\n\n /** @protected */\n /* eslint-disable-next-line class-methods-use-this */\n get all() {\n const deserialised = {};\n document.cookie\n .split(\"; \")\n .filter((cookie) => cookie.trim() !== \"\")\n .forEach((cookie) => {\n const parts = cookie.trim().split(\"=\");\n const [key, value] = parts;\n if (key) {\n deserialised[key] = decodeURIComponent(value || \"\");\n }\n });\n return deserialised;\n }\n\n /** @protected */\n get policies() {\n try {\n return JSON.parse(this.get(this.policiesKey) || \"{}\");\n // eslint-disable-next-line no-unused-vars\n } catch (error) {\n return {};\n }\n }\n\n /**\n * Check to see whether a cookie exists or not.\n * @param {String} key - The cookie name.\n * @returns {Boolean}\n */\n exists(key) {\n return Object.hasOwn(this.all, key);\n }\n\n /**\n * Check to see whether a cookie has a particular value.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The value to check against.\n * @returns\n */\n hasValue(key, value) {\n return this.get(key) === value;\n }\n\n /**\n * Get a cookie.\n * @param {String} key - The cookie name.\n * @returns {String|Number|Boolean|null}\n */\n get(key) {\n if (this.exists(key)) {\n return decodeURIComponent(this.all[key]);\n }\n return null;\n }\n\n /**\n * Set a cookie.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The cookie value.\n * @param {Object} options\n * @param {Number} [options.maxAge=this.defaultAge] - The maximum age of the cookie in seconds.\n * @param {String} [options.path=/] - The path to register the cookie for.\n * @param {String} [options.sameSite=Lax] - The sameSite attribute.\n * @param {String} [options.domain=this.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path=this.defaultPath] - The path to register the cookie with.\n * @param {String} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.session=false] - Set a session cookie.\n */\n set(key, value, options = {}) {\n const {\n maxAge = this.defaultAge,\n sameSite = \"Lax\",\n domain = this.defaultDomain,\n path = this.defaultPath,\n secure = this.secure,\n session = false,\n } = options;\n if (!key) {\n return;\n }\n let secureString = \"\";\n if (secure) {\n secureString = \"; secure\";\n }\n let sessionString = \"\";\n if (!session) {\n sessionString = `; max-age=${maxAge}`;\n }\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)}; domain=${domain}; samesite=${sameSite}; path=${path}${sessionString}${secureString}`;\n document.cookie = cookie;\n this.log(\"Set cookie:\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n });\n this.events.trigger(\"setCookie\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n });\n }\n\n /**\n * Delete a cookie.\n * @param {String} key - The cookie name.\n * @param {String} [path=/] - The path to the cookie is registered on.\n */\n delete(key, path = \"/\", domain = this.defaultDomain) {\n const options = { maxAge: -1, path, domain: domain || this.defaultDomain };\n this.set(key, \"\", options);\n this.log(\"Deleted cookie:\", { key, path, domain, ...options });\n this.events.trigger(\"deleteCookie\", { key, ...options });\n }\n\n /**\n * Delete all cookies.\n */\n deleteAll(path = \"/\", domain = this.defaultDomain) {\n Object.keys(this.all).forEach((cookie) => {\n this.delete(cookie, path, domain);\n });\n this.log(\"Deleted all cookies\", { path, domain });\n this.events.trigger(\"deleteAllCookies\", { path, domain });\n }\n\n /**\n * Accept a policy.\n * @param {String} policy - The name of the policy.\n */\n acceptPolicy(policy) {\n this.log(\"Accepting policy:\", policy);\n this.setPolicy(policy, true);\n this.events.trigger(\"acceptPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: true });\n }\n\n /**\n * Reject a policy.\n * @param {String} policy - The name of the policy.\n */\n rejectPolicy(policy) {\n this.log(\"Rejecting policy:\", policy);\n this.setPolicy(policy, false);\n this.events.trigger(\"rejectPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: false });\n }\n\n /**\n * Set a policy.\n * @param {String} policy - The name of the policy.\n * @param {Boolean} accepted - Whether the policy is accepted or not.\n */\n setPolicy(policy, accepted) {\n if (policy === \"essential\") {\n this.log(\"Cannot change essential policy, it is always accepted.\");\n return;\n }\n this.log(`Setting policy ${policy} to ${accepted}`);\n this.savePolicies({\n ...this.policies,\n [policy]: accepted,\n essential: true,\n });\n this.events.trigger(\"changePolicy\", { [policy]: accepted });\n }\n\n /**\n * Accept all the cookie policies.\n */\n acceptAllPolicies() {\n this.log(\"Accepting all policies\");\n const allPolicies = Object.fromEntries(\n Object.keys(this.policies).map((key) => [key.toLowerCase(), true]),\n );\n this.savePolicies(allPolicies);\n this.events.trigger(\"acceptAllPolicies\");\n this.events.trigger(\"changePolicy\", allPolicies);\n }\n\n /**\n * Reject all the cookie policies.\n */\n rejectAllPolicies() {\n this.log(\"Rejecting all policies\");\n const allPolicies = {\n ...Object.fromEntries(\n Object.keys(this.policies).map((key) => [key.toLowerCase(), false]),\n ),\n essential: true,\n };\n this.savePolicies(allPolicies);\n this.events.trigger(\"rejectAllPolicies\");\n this.events.trigger(\"changePolicy\", allPolicies);\n }\n\n /**\n * Commit policy preferences to the browser.\n * @param {object} policies - The policies to commit.\n */\n savePolicies(policies) {\n this.log(\"Saving policies:\", policies);\n this.set(this.policiesKey, JSON.stringify(policies));\n }\n\n /**\n * Get the acceptance status of a policy.\n * @param {String} policy - The name of the policy.\n * @returns {Boolean}\n */\n isPolicyAccepted(policy) {\n if (Object.hasOwn(this.policies, policy)) {\n return this.policies[policy] === true;\n }\n return null;\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n this.log(`Adding event listener for: ${event}`);\n this.events.on(event, callback);\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.log(`Adding one-time event listener for: ${event}`);\n this.events.once(event, callback);\n }\n}\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 Cookies from \"../../lib/cookies.mjs\";\n\nexport { Cookies };\n\nexport class CookieBanner {\n constructor($module) {\n this.$module = $module;\n this.$acceptButton = $module && $module.querySelector('[value=\"accept\"]');\n this.$rejectButton = $module && $module.querySelector('[value=\"reject\"]');\n this.$prompt =\n $module && $module.querySelector(\".tna-cookie-banner__message--prompt\");\n this.$acceptedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--accepted\");\n this.$rejectedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--rejected\");\n this.$closeButtons = $module && $module.querySelectorAll('[value=\"close\"]');\n\n if (\n !this.$module ||\n !this.$acceptButton ||\n !this.$rejectButton ||\n !this.$prompt ||\n !this.$acceptedMessage ||\n !this.$rejectedMessage ||\n !this.$closeButtons\n ) {\n return;\n }\n\n this.cookies = new Cookies({ newInstance: true });\n\n this.cookiePreferencesSetKey =\n this.$module.dataset.preferencesKey || \"cookie_preferences_set\";\n\n if (!this.cookies.policiesCorrectOnInit) {\n this.cookies.delete(this.cookiePreferencesSetKey);\n }\n\n if (\n !this.cookies.exists(this.cookiePreferencesSetKey) ||\n !this.cookies.hasValue(this.cookiePreferencesSetKey, \"true\")\n ) {\n this.$module.removeAttribute(\"hidden\");\n\n this.$acceptButton.addEventListener(\"click\", () => this.accept());\n this.$rejectButton.addEventListener(\"click\", () => this.reject());\n }\n }\n\n accept() {\n this.$prompt.setAttribute(\"hidden\", \"\");\n this.complete();\n this.cookies.acceptAllPolicies();\n this.$acceptedMessage.removeAttribute(\"hidden\");\n this.$acceptedMessage.setAttribute(\"tabindex\", \"0\");\n this.$acceptedMessage.focus();\n this.$acceptedMessage.addEventListener(\"blur\", () => {\n this.$acceptedMessage.removeAttribute(\"tabindex\");\n });\n }\n\n reject() {\n this.$prompt.setAttribute(\"hidden\", \"\");\n this.complete();\n this.cookies.rejectAllPolicies();\n this.$rejectedMessage.removeAttribute(\"hidden\");\n this.$rejectedMessage.setAttribute(\"tabindex\", \"0\");\n this.$rejectedMessage.focus();\n this.$rejectedMessage.addEventListener(\"blur\", () => {\n this.$rejectedMessage.removeAttribute(\"tabindex\");\n });\n }\n\n complete() {\n this.cookies.set(this.cookiePreferencesSetKey, true);\n this.$closeButtons.forEach(($closeButton) => {\n $closeButton.addEventListener(\"click\", () => this.close());\n });\n }\n\n close() {\n this.$module.setAttribute(\"hidden\", \"\");\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","window","TNAFrontendCookieEvents","CookieEventHandler","events","oneTimeEvents","debug","constructor","this","log","args","console","on","event","callback","Object","hasOwn","once","trigger","data","forEach","eventToTrigger","call","eventIndex","length","splice","TNAFrontendCookies","tnaCookiePolicies","Cookies","defaultDomain","defaultPath","secure","policiesKey","defaultAge","policiesCorrectOnInit","document","documentElement","dataset","tnaFrontendDebug","options","newInstance","noInit","tnaCookiesDomain","location","hostname","tnaCookiesPath","tnaCookiesInsecure","tnaCookiesPoliciesKey","secondsInAYear","parseInt","tnaCookiesDefaultAge","keys","policies","every","policy","includes","init","existingPolicies","filteredExistingPolicies","fromEntries","filter","map","savePolicies","usage","settings","marketing","essential","all","destroyInstance","deserialised","cookie","split","trim","parts","key","value","decodeURIComponent","JSON","parse","get","error","exists","hasValue","set","maxAge","sameSite","domain","path","session","secureString","sessionString","encodeURIComponent","deleteAll","delete","acceptPolicy","setPolicy","rejectPolicy","accepted","acceptAllPolicies","allPolicies","toLowerCase","rejectAllPolicies","stringify","isPolicyAccepted","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","CookieBanner","$module","$acceptButton","querySelector","$rejectButton","$prompt","$acceptedMessage","$rejectedMessage","$closeButtons","querySelectorAll","cookies","_lib_cookies_mjs__WEBPACK_IMPORTED_MODULE_0__","A","cookiePreferencesSetKey","preferencesKey","removeAttribute","addEventListener","accept","reject","setAttribute","complete","focus","$closeButton","close"],"sourceRoot":""}
1
+ {"version":3,"file":"components/cookie-banner/cookie-banner.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,0DCHc,MAAAC,EAEfC,OAAA,GAEAC,cAAA,GAEA,WAAAC,GACA,GACAC,OAAAC,yBACAD,OAAAC,mCAAAL,EAGA,OAAAI,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AAKqH,eACLrH,KAAKsH,SACLtH,KAAKuH,kBACLvH,KAAKwH,kBACLxH,KAAKyH,gBAKRzH,KAAK2H,QAAU,IAAIC,EAAAC,EAEd7H,KAAK2H,QAAQnF,iBAChBxC,KAAKkH,QAAQY,gBAAgB,UAE7B9H,KAAKmH,cAAcY,iBAAiB,QAAS,IAAM/H,KAAKgI,UACxDhI,KAAKqH,cAAcU,iBAAiB,QAAS,IAAM/H,KAAKiI,UAExDjI,KAAKyH,cAAc/G,QAASwH,IAC1BA,EAAaH,iBAAiB,QAAS,IAAM/H,KAAKmI,YAGxD,CAEA,MAAAH,GACEhI,KAAK2H,QAAQjC,uBACb1F,KAAKoI,UAAUpI,KAAKuH,iBACtB,CAEA,MAAAU,GACEjI,KAAK2H,QAAQ9B,wBACb7F,KAAKoI,UAAUpI,KAAKwH,iBACtB,CAEA,SAAAY,CAAUC,GACRrI,KAAKsH,QAAQgB,aAAa,SAAU,IACpCD,EAAOP,gBAAgB,UACvBO,EAAOC,aAAa,WAAY,KAChCD,EAAOE,QACPF,EAAON,iBAAiB,OAAQ,KAC9BM,EAAOP,gBAAgB,aAE3B,CAEA,KAAAK,GACEnI,KAAKkH,QAAQoB,aAAa,SAAU,GACtC","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./node_modules/@nationalarchives/cookies/src/events.js","webpack://TNAFrontend/./node_modules/@nationalarchives/cookies/src/index.js","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/cookie-banner/cookie-banner.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 ","/**\n * Class to handle cookie events.\n * @class CookieEventHandler\n * @constructor\n * @public\n */\nexport default class CookieEventHandler {\n /** @protected */\n events = {};\n /** @protected */\n oneTimeEvents = {};\n\n constructor() {\n if (\n window.TNAFrontendCookieEvents &&\n window.TNAFrontendCookieEvents instanceof CookieEventHandler\n ) {\n /* eslint-disable-next-line no-constructor-return */\n return window.TNAFrontendCookieEvents;\n }\n window.TNAFrontendCookieEvents = this;\n }\n\n /**\n * Clear all event listeners.\n */\n clearAll() {\n this.events = {};\n this.oneTimeEvents = {};\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n this.events[event] = [...(this.events[event] || []), callback];\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.oneTimeEvents[event] = [\n ...(this.oneTimeEvents[event] || []),\n callback,\n ];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.hasOwn(this.events, event)) {\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n if (Object.hasOwn(this.oneTimeEvents, event)) {\n this.oneTimeEvents[event].forEach((eachEvent) =>\n eachEvent.call(this, data),\n );\n this.oneTimeEvents[event] = [];\n }\n }\n}\n","/* eslint-disable max-lines, no-ternary */\n\nimport CookieEventHandler from \"./events\";\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n defaultDomain = \"\";\n /** @protected */\n defaultPath = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n preferencesKey = \"\";\n /** @protected */\n events = null;\n /** @protected */\n defaultAge = null;\n /** @protected */\n preferencesCorrectOnInit = false;\n\n /** @protected */\n tnaCookiePreferences = [\"usage\", \"settings\", \"marketing\", \"essential\"];\n\n /**\n * Create a cookie handler.\n * @param {String} [options.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path] - The domain to register the cookie with.\n * @param {Boolean} [options.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.preferencesKey] - The name of the cookie that stores the user's preferences.\n * @param {String} [options.preferencesSetKey] - The name of the cookie that dictates whether the user's preferences have been set.\n * @param {Number} [options.defaultAge] - The default age of non-session cookies.\n * @param {Boolean} [options.noInit=false] - Don't initialise a blank cookie preference.\n */\n /* eslint-disable-next-line max-statements, */\n constructor(options = {}) {\n const {\n defaultDomain,\n defaultPath,\n secure,\n preferencesKey,\n preferencesSetKey,\n defaultAge,\n noInit = false,\n } = options;\n const docDataset = document.documentElement.dataset;\n this.defaultDomain = defaultDomain\n ? defaultDomain\n : docDataset.tnaCookiesDomain || window.location.hostname;\n this.defaultPath = defaultPath\n ? defaultPath\n : docDataset.tnaCookiesPath || \"/\";\n this.secure = secure ? secure : docDataset.tnaCookiesInsecure !== \"true\";\n this.preferencesKey = preferencesKey\n ? preferencesKey\n : docDataset.tnaCookiesPreferencesKey || \"cookie_preferences\";\n this.preferencesSetKey = preferencesSetKey\n ? preferencesSetKey\n : docDataset.tnaCookiesPreferencesSetKey || \"cookie_preferences_set\";\n this.defaultAge = defaultAge\n ? defaultAge\n : parseInt(docDataset.tnaCookiesDefaultAge, 10) ||\n /* eslint-disable-next-line no-magic-numbers */\n 365 * 24 * 60 * 60;\n this.events = new CookieEventHandler();\n this.preferencesCorrectOnInit = this.validatePreferences(this.preferences);\n if (!this.preferencesCorrectOnInit) {\n this.preferencesSet = false;\n if (!noInit) {\n this.init();\n }\n }\n }\n\n /** @protected */\n init() {\n const existingPreferences = this.preferences;\n const filteredExistingPreferences = Object.fromEntries(\n Object.keys(existingPreferences)\n .filter((preference) => this.tnaCookiePreferences.includes(preference))\n .map((preference) => [preference, existingPreferences[preference]]),\n );\n this.savePreferences({\n usage: false,\n settings: false,\n marketing: false,\n ...filteredExistingPreferences,\n essential: true,\n });\n }\n\n validatePreferences(preferences) {\n return (\n Object.keys(preferences).length === this.tnaCookiePreferences.length &&\n this.tnaCookiePreferences.every(\n (preference) =>\n Object.keys(preferences).includes(preference) &&\n typeof preferences[preference] === \"boolean\",\n )\n );\n }\n\n /** @protected */\n /* eslint-disable-next-line class-methods-use-this */\n get all() {\n const deserialised = {};\n document.cookie\n .split(\"; \")\n .filter((cookie) => cookie.trim() !== \"\")\n .filter((cookie) => cookie.includes(\"=\"))\n .forEach((cookie) => {\n const parts = cookie.trim().split(\"=\");\n const [key, value = \"\"] = parts;\n deserialised[key] = decodeURIComponent(value);\n });\n return deserialised;\n }\n\n /** @protected */\n get preferences() {\n try {\n return JSON.parse(this.get(this.preferencesKey) || \"{}\");\n // eslint-disable-next-line no-unused-vars\n } catch (error) {\n return {};\n }\n }\n\n /**\n * Check to see whether a cookie exists or not.\n * @param {String} key - The cookie name.\n * @returns {Boolean}\n */\n exists(key) {\n return Object.hasOwn(this.all, key);\n }\n\n /**\n * Check to see whether a cookie has a particular value.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The value to check against.\n * @returns\n */\n hasValue(key, value) {\n return this.get(key) === value;\n }\n\n /**\n * Get a cookie.\n * @param {String} key - The cookie name.\n * @returns {String|Number|Boolean|null}\n */\n get(key) {\n if (this.exists(key)) {\n return decodeURIComponent(this.all[key]);\n }\n /* eslint-disable-next-line no-undefined */\n return undefined;\n }\n\n /**\n * Set a cookie.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The cookie value.\n * @param {Object} options\n * @param {Number} [options.maxAge=this.defaultAge] - The maximum age of the cookie in seconds.\n * @param {String} [options.path=/] - The path to register the cookie for.\n * @param {String} [options.sameSite=Lax] - The sameSite attribute.\n * @param {String} [options.domain=this.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path=this.defaultPath] - The path to register the cookie with.\n * @param {String} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.session=false] - Set a session cookie.\n */\n set(key, value, options = {}) {\n const {\n maxAge = this.defaultAge,\n sameSite = \"Lax\",\n domain = this.defaultDomain,\n path = this.defaultPath,\n secure = this.secure,\n session = false,\n } = options;\n if (!key) {\n return;\n }\n const secureString = secure ? \"; secure\" : \"\";\n const sessionString = session ? \"\" : `; max-age=${maxAge}`;\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)}; domain=${domain}; samesite=${sameSite}; path=${path}${sessionString}${secureString}`;\n document.cookie = cookie;\n const cookieDetails = {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n };\n this.events.trigger(\"setCookie\", cookieDetails);\n }\n\n /**\n * Delete a cookie.\n * @param {String} key - The cookie name.\n * @param {String} [path=/] - The path to the cookie is registered on.\n */\n delete(key, path = \"/\", domain = this.defaultDomain) {\n const options = { maxAge: -1, path, domain };\n this.set(key, \"\", options);\n this.events.trigger(\"deleteCookie\", { key, ...options });\n }\n\n /**\n * Delete all cookies.\n */\n deleteAll(path = \"/\", domain = this.defaultDomain) {\n Object.keys(this.all).forEach((cookie) => {\n this.delete(cookie, path, domain);\n });\n const details = { path, domain };\n this.events.trigger(\"deleteAllCookies\", details);\n }\n\n /**\n * Accept a preference.\n * @param {String} preference - The name of the preference.\n */\n enablePreference(preference) {\n if (!Object.hasOwn(this.preferences, preference)) {\n throw new Error(`Preference '${preference}' does not exist`);\n }\n this.setPreference(preference, true);\n this.events.trigger(\"enablePreference\", preference);\n this.events.trigger(\"changePreference\", { [preference]: true });\n }\n\n /**\n * Reject a preference.\n * @param {String} preference - The name of the preference.\n */\n disablePreference(preference) {\n if (!Object.hasOwn(this.preferences, preference)) {\n throw new Error(`Preference '${preference}' does not exist`);\n }\n this.setPreference(preference, false);\n this.events.trigger(\"disablePreference\", preference);\n this.events.trigger(\"changePreference\", { [preference]: false });\n }\n\n /**\n * Set a preference.\n * @param {String} preference - The name of the preference.\n * @param {Boolean} accepted - Whether the preference is accepted or not.\n */\n setPreference(preference, accepted) {\n if (!Object.hasOwn(this.preferences, preference)) {\n throw new Error(`Preference '${preference}' does not exist`);\n }\n if (preference === \"essential\") {\n return;\n }\n this.savePreferences({\n ...this.preferences,\n [preference]: accepted,\n essential: true,\n });\n this.events.trigger(\"changePreference\", { [preference]: accepted });\n }\n\n /**\n * Accept all the cookie preferences.\n */\n enableAllPreferences() {\n const allPreferences = Object.fromEntries(\n Object.keys(this.preferences).map((key) => [key.toLowerCase(), true]),\n );\n this.savePreferences(allPreferences);\n this.preferencesSet = true;\n this.events.trigger(\"enableAllPreferences\");\n this.events.trigger(\"changePreference\", allPreferences);\n }\n\n /**\n * Reject all the cookie preferences.\n */\n disableAllPreferences() {\n const allPreferences = {\n ...Object.fromEntries(\n Object.keys(this.preferences).map((key) => [key.toLowerCase(), false]),\n ),\n essential: true,\n };\n this.savePreferences(allPreferences);\n this.preferencesSet = true;\n this.events.trigger(\"disableAllPreferences\");\n this.events.trigger(\"changePreference\", allPreferences);\n }\n\n /** @protected */\n savePreferences(preferences) {\n this.set(this.preferencesKey, JSON.stringify(preferences));\n }\n\n /**\n * Get the status of whether the preferences have been set.\n * @returns {Boolean}\n */\n get preferencesSet() {\n return this.hasValue(this.preferencesSetKey, \"true\");\n }\n\n /**\n * Set the status of whether the preferences have been set.\n * @param {Boolean} value\n */\n set preferencesSet(value) {\n if (\n value === true &&\n this.validatePreferences(JSON.parse(this.get(this.preferencesKey)))\n ) {\n this.set(this.preferencesSetKey, \"true\");\n } else {\n this.delete(this.preferencesSetKey);\n }\n this.events.trigger(\"preferencesSet\");\n }\n\n /**\n * Get the acceptance status of a preference.\n * @param {String} preference - The name of the preference.\n * @returns {Boolean}\n */\n preference(preference) {\n if (Object.hasOwn(this.preferences, preference)) {\n return this.preferences[preference] === true;\n }\n throw new Error(`Preference '${preference}' does not exist`);\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n this.events.on(event, callback);\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.events.once(event, callback);\n }\n}\n","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst 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\tconst 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/value 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\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Cookies from \"@nationalarchives/cookies/src/index.js\";\n\nexport { Cookies };\n\nexport class CookieBanner {\n constructor($module) {\n this.$module = $module;\n this.$acceptButton = $module && $module.querySelector('[value=\"accept\"]');\n this.$rejectButton = $module && $module.querySelector('[value=\"reject\"]');\n this.$prompt =\n $module && $module.querySelector(\".tna-cookie-banner__message--prompt\");\n this.$acceptedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--accepted\");\n this.$rejectedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--rejected\");\n this.$closeButtons = $module && $module.querySelectorAll('[value=\"close\"]');\n\n if (\n !this.$module ||\n !this.$acceptButton ||\n !this.$rejectButton ||\n !this.$prompt ||\n !this.$acceptedMessage ||\n !this.$rejectedMessage ||\n !this.$closeButtons\n ) {\n return;\n }\n\n this.cookies = new Cookies();\n\n if (!this.cookies.preferencesSet) {\n this.$module.removeAttribute(\"hidden\");\n\n this.$acceptButton.addEventListener(\"click\", () => this.accept());\n this.$rejectButton.addEventListener(\"click\", () => this.reject());\n\n this.$closeButtons.forEach(($closeButton) => {\n $closeButton.addEventListener(\"click\", () => this.close());\n });\n }\n }\n\n accept() {\n this.cookies.enableAllPreferences();\n this.showPanel(this.$acceptedMessage);\n }\n\n reject() {\n this.cookies.disableAllPreferences();\n this.showPanel(this.$rejectedMessage);\n }\n\n showPanel($panel) {\n this.$prompt.setAttribute(\"hidden\", \"\");\n $panel.removeAttribute(\"hidden\");\n $panel.setAttribute(\"tabindex\", \"0\");\n $panel.focus();\n $panel.addEventListener(\"blur\", () => {\n $panel.removeAttribute(\"tabindex\");\n });\n }\n\n close() {\n this.$module.setAttribute(\"hidden\", \"\");\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","CookieEventHandler","events","oneTimeEvents","constructor","window","TNAFrontendCookieEvents","this","clearAll","on","event","callback","once","trigger","data","Object","hasOwn","forEach","eventToTrigger","call","eachEvent","Cookies","defaultDomain","defaultPath","secure","preferencesKey","defaultAge","preferencesCorrectOnInit","tnaCookiePreferences","options","preferencesSetKey","noInit","docDataset","document","documentElement","dataset","tnaCookiesDomain","location","hostname","tnaCookiesPath","tnaCookiesInsecure","tnaCookiesPreferencesKey","tnaCookiesPreferencesSetKey","parseInt","tnaCookiesDefaultAge","validatePreferences","preferences","preferencesSet","init","existingPreferences","filteredExistingPreferences","fromEntries","keys","filter","preference","includes","map","savePreferences","usage","settings","marketing","essential","length","every","all","deserialised","cookie","split","trim","parts","key","value","decodeURIComponent","JSON","parse","get","error","exists","hasValue","set","maxAge","sameSite","domain","path","session","secureString","sessionString","encodeURIComponent","cookieDetails","deleteAll","delete","details","enablePreference","Error","setPreference","disablePreference","accepted","enableAllPreferences","allPreferences","toLowerCase","disableAllPreferences","stringify","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","CookieBanner","$module","$acceptButton","querySelector","$rejectButton","$prompt","$acceptedMessage","$rejectedMessage","$closeButtons","querySelectorAll","cookies","_nationalarchives_cookies_src_index_js__WEBPACK_IMPORTED_MODULE_0__","A","removeAttribute","addEventListener","accept","reject","$closeButton","close","showPanel","$panel","setAttribute","focus"],"sourceRoot":""}
@@ -1,4 +1,4 @@
1
- import Cookies from "../../lib/cookies.mjs";
1
+ import Cookies from "@nationalarchives/cookies/src/index.js";
2
2
 
3
3
  export { Cookies };
4
4
 
@@ -27,54 +27,37 @@ export class CookieBanner {
27
27
  return;
28
28
  }
29
29
 
30
- this.cookies = new Cookies({ newInstance: true });
30
+ this.cookies = new Cookies();
31
31
 
32
- this.cookiePreferencesSetKey =
33
- this.$module.dataset.preferencesKey || "cookie_preferences_set";
34
-
35
- if (!this.cookies.policiesCorrectOnInit) {
36
- this.cookies.delete(this.cookiePreferencesSetKey);
37
- }
38
-
39
- if (
40
- !this.cookies.exists(this.cookiePreferencesSetKey) ||
41
- !this.cookies.hasValue(this.cookiePreferencesSetKey, "true")
42
- ) {
32
+ if (!this.cookies.preferencesSet) {
43
33
  this.$module.removeAttribute("hidden");
44
34
 
45
35
  this.$acceptButton.addEventListener("click", () => this.accept());
46
36
  this.$rejectButton.addEventListener("click", () => this.reject());
37
+
38
+ this.$closeButtons.forEach(($closeButton) => {
39
+ $closeButton.addEventListener("click", () => this.close());
40
+ });
47
41
  }
48
42
  }
49
43
 
50
44
  accept() {
51
- this.$prompt.setAttribute("hidden", "");
52
- this.complete();
53
- this.cookies.acceptAllPolicies();
54
- this.$acceptedMessage.removeAttribute("hidden");
55
- this.$acceptedMessage.setAttribute("tabindex", "0");
56
- this.$acceptedMessage.focus();
57
- this.$acceptedMessage.addEventListener("blur", () => {
58
- this.$acceptedMessage.removeAttribute("tabindex");
59
- });
45
+ this.cookies.enableAllPreferences();
46
+ this.showPanel(this.$acceptedMessage);
60
47
  }
61
48
 
62
49
  reject() {
63
- this.$prompt.setAttribute("hidden", "");
64
- this.complete();
65
- this.cookies.rejectAllPolicies();
66
- this.$rejectedMessage.removeAttribute("hidden");
67
- this.$rejectedMessage.setAttribute("tabindex", "0");
68
- this.$rejectedMessage.focus();
69
- this.$rejectedMessage.addEventListener("blur", () => {
70
- this.$rejectedMessage.removeAttribute("tabindex");
71
- });
50
+ this.cookies.disableAllPreferences();
51
+ this.showPanel(this.$rejectedMessage);
72
52
  }
73
53
 
74
- complete() {
75
- this.cookies.set(this.cookiePreferencesSetKey, true);
76
- this.$closeButtons.forEach(($closeButton) => {
77
- $closeButton.addEventListener("click", () => this.close());
54
+ showPanel($panel) {
55
+ this.$prompt.setAttribute("hidden", "");
56
+ $panel.removeAttribute("hidden");
57
+ $panel.setAttribute("tabindex", "0");
58
+ $panel.focus();
59
+ $panel.addEventListener("blur", () => {
60
+ $panel.removeAttribute("tabindex");
78
61
  });
79
62
  }
80
63
 
@@ -9,15 +9,6 @@
9
9
  },
10
10
  "html": "<section class=\"tna-cookie-banner\" data-module=\"tna-cookie-banner\" aria-label=\"Cookies on My service\" hidden><div class=\"tna-container\"><div class=\"tna-column tna-column--full tna-cookie-banner__message tna-cookie-banner__message--prompt\"><h2 class=\"tna-heading-m\">This website uses cookies</h2><p>We use some essential cookies to make this service work.</p><p>We'd also like to use analytics cookies so we can understand how you use the service and make improvements.</p><div class=\"tna-button-group\"><button class=\"tna-button\" type=\"button\" value=\"accept\">Accept cookies</button><button class=\"tna-button\" type=\"button\" value=\"reject\">Reject cookies</button><a href=\"/cookies\" class=\"tna-button tna-button--plain\">Set cookie preferences</a></div></div><div class=\"tna-column tna-column--full tna-cookie-banner__message tna-cookie-banner__message--accepted tna-!--no-focus-style\" hidden><p>You have accepted optional cookies. You can change your cookie settings on the <a href=\"/cookies\">cookies page</a>.</p><div class=\"tna-button-group\"><button class=\"tna-button\" type=\"button\" value=\"close\">Hide cookies message</button></div></div><div class=\"tna-column tna-column--full tna-cookie-banner__message tna-cookie-banner__message--rejected tna-!--no-focus-style\" hidden><p>You have rejected optional cookies. You can change your cookie settings on the <a href=\"/cookies\">cookies page</a>.</p><div class=\"tna-button-group\"><button class=\"tna-button\" type=\"button\" value=\"close\">Hide cookies message</button></div></div></div></section>"
11
11
  },
12
- {
13
- "name": "custom preferences set key",
14
- "options": {
15
- "serviceName": "My service",
16
- "cookiesUrl": "/cookies",
17
- "preferencesSetKey": "custom"
18
- },
19
- "html": "<section class=\"tna-cookie-banner\" data-module=\"tna-cookie-banner\" aria-label=\"Cookies on My service\" data-preferences-key=\"custom\" hidden><div class=\"tna-container\"><div class=\"tna-column tna-column--full tna-cookie-banner__message tna-cookie-banner__message--prompt\"><h2 class=\"tna-heading-m\">This website uses cookies</h2><p>We use some essential cookies to make this service work.</p><p>We'd also like to use analytics cookies so we can understand how you use the service and make improvements.</p><div class=\"tna-button-group\"><button class=\"tna-button\" type=\"button\" value=\"accept\">Accept cookies</button><button class=\"tna-button\" type=\"button\" value=\"reject\">Reject cookies</button><a href=\"/cookies\" class=\"tna-button tna-button--plain\">Set cookie preferences</a></div></div><div class=\"tna-column tna-column--full tna-cookie-banner__message tna-cookie-banner__message--accepted tna-!--no-focus-style\" hidden><p>You have accepted optional cookies. You can change your cookie settings on the <a href=\"/cookies\">cookies page</a>.</p><div class=\"tna-button-group\"><button class=\"tna-button\" type=\"button\" value=\"close\">Hide cookies message</button></div></div><div class=\"tna-column tna-column--full tna-cookie-banner__message tna-cookie-banner__message--rejected tna-!--no-focus-style\" hidden><p>You have rejected optional cookies. You can change your cookie settings on the <a href=\"/cookies\">cookies page</a>.</p><div class=\"tna-button-group\"><button class=\"tna-button\" type=\"button\" value=\"close\">Hide cookies message</button></div></div></div></section>"
20
- },
21
12
  {
22
13
  "name": "custom content",
23
14
  "options": {
@@ -39,13 +39,6 @@
39
39
  "required": true,
40
40
  "description": "The URL of the cookie preferences page for the service."
41
41
  },
42
- {
43
- "name": "preferencesSetKey",
44
- "type": "string",
45
- "required": false,
46
- "description": "If set, the name of the cookie used to indicate that the user has set their cookie preferences.",
47
- "default": "cookie_preferences_set"
48
- },
49
42
  {
50
43
  "name": "style",
51
44
  "type": "string",
@@ -10,7 +10,6 @@
10
10
  {%- endif -%}
11
11
  {%- set classes = containerClasses | join(' ') -%}
12
12
  <section class="tna-cookie-banner{% if classes %} {{ classes }}{% endif %}" data-module="tna-cookie-banner" aria-label="Cookies on {{ params.serviceName }}"
13
- {%- if params.preferencesSetKey %} data-preferences-key="{{ params.preferencesSetKey }}"{% endif %}
14
13
  {%- for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %} hidden>
15
14
  <div class="tna-container">
16
15
  <div class="tna-column tna-column--full tna-cookie-banner__message tna-cookie-banner__message--prompt">
@@ -1 +1 @@
1
- .tna-date-input__item-input{color:var(--input-foreground, rgb(1, 1, 1));background-color:var(--input-background, rgb(255, 255, 255));border:2px var(--input-border, rgb(1, 1, 1)) solid}.tna-date-input{display:flex;gap:1rem}.tna-date-input__item-label{padding-bottom:0.5rem;display:block;line-height:1;font-size:1rem}.tna-date-input__item-input{width:3rem;padding:0 0.375rem;display:block;box-sizing:border-box;line-height:2rem;border-radius:2px}.tna-date-input__item-input--wider{width:4.5rem}.tna-form-item--error .tna-date-input__item-input{border-color:var(--form-error-border, #c20000)}/*# sourceMappingURL=date-input.css.map */
1
+ .tna-date-input__item-input{color:var(--input-foreground, rgb(1, 1, 1));background-color:var(--input-background, rgb(255, 255, 255));border:2px var(--input-border, rgb(1, 1, 1)) solid}.tna-date-input__item-input:hover{outline:4px var(--keyline) solid}.tna-date-input{display:flex;gap:1rem}.tna-date-input__item-label{padding-bottom:0.5rem;display:block;line-height:1;font-size:1rem}.tna-date-input__item-input{width:3rem;padding:0 0.375rem;display:block;box-sizing:border-box;line-height:2rem;border-radius:2px}.tna-date-input__item-input--wider{width:4.5rem}.tna-form-item--error .tna-date-input__item-input{border-color:var(--form-error-border, #c20000)}/*# sourceMappingURL=date-input.css.map */