@nationalarchives/frontend 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/nationalarchives/all+analytics.js +1 -1
  2. package/nationalarchives/all+analytics.js.map +1 -1
  3. package/nationalarchives/all.css +1 -1
  4. package/nationalarchives/all.css.map +1 -1
  5. package/nationalarchives/all.js +1 -1
  6. package/nationalarchives/all.js.map +1 -1
  7. package/nationalarchives/analytics.js +1 -1
  8. package/nationalarchives/analytics.js.map +1 -1
  9. package/nationalarchives/analytics.mjs +12 -4
  10. package/nationalarchives/assets/fonts/fa-brands-400.woff2 +0 -0
  11. package/nationalarchives/assets/fonts/fa-solid-900.woff2 +0 -0
  12. package/nationalarchives/components/accordion/accordion.js +1 -1
  13. package/nationalarchives/components/accordion/accordion.js.map +1 -1
  14. package/nationalarchives/components/accordion/accordion.mjs +1 -1
  15. package/nationalarchives/components/accordion/fixtures.json +26 -7
  16. package/nationalarchives/components/accordion/macro-options.json +9 -2
  17. package/nationalarchives/components/accordion/template.njk +2 -2
  18. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
  19. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
  20. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +1 -0
  21. package/nationalarchives/components/card/card.css +1 -1
  22. package/nationalarchives/components/card/card.css.map +1 -1
  23. package/nationalarchives/components/card/card.scss +10 -4
  24. package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
  25. package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
  26. package/nationalarchives/components/cookie-banner/cookie-banner.mjs +1 -1
  27. package/nationalarchives/components/date-input/date-input.css +1 -1
  28. package/nationalarchives/components/date-input/date-input.css.map +1 -1
  29. package/nationalarchives/components/date-input/date-input.js +1 -1
  30. package/nationalarchives/components/date-input/date-input.js.map +1 -1
  31. package/nationalarchives/components/date-input/date-input.scss +4 -0
  32. package/nationalarchives/components/error-summary/error-summary.js +1 -1
  33. package/nationalarchives/components/error-summary/error-summary.js.map +1 -1
  34. package/nationalarchives/components/file-input/file-input.css.map +1 -1
  35. package/nationalarchives/components/file-input/file-input.js +1 -1
  36. package/nationalarchives/components/file-input/file-input.js.map +1 -1
  37. package/nationalarchives/components/file-input/file-input.scss +3 -3
  38. package/nationalarchives/components/footer/fixtures.json +3 -3
  39. package/nationalarchives/components/footer/footer.js +1 -1
  40. package/nationalarchives/components/footer/footer.js.map +1 -1
  41. package/nationalarchives/components/footer/template.njk +1 -1
  42. package/nationalarchives/components/gallery/gallery.css +1 -1
  43. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  44. package/nationalarchives/components/gallery/gallery.js +1 -1
  45. package/nationalarchives/components/gallery/gallery.js.map +1 -1
  46. package/nationalarchives/components/gallery/gallery.scss +2 -2
  47. package/nationalarchives/components/global-header/global-header.js +1 -1
  48. package/nationalarchives/components/global-header/global-header.js.map +1 -1
  49. package/nationalarchives/components/header/header.js +1 -1
  50. package/nationalarchives/components/header/header.js.map +1 -1
  51. package/nationalarchives/components/hero/fixtures.json +7 -7
  52. package/nationalarchives/components/hero/hero.css +1 -1
  53. package/nationalarchives/components/hero/hero.css.map +1 -1
  54. package/nationalarchives/components/hero/hero.scss +20 -24
  55. package/nationalarchives/components/hero/template.njk +3 -3
  56. package/nationalarchives/components/picture/picture.css.map +1 -1
  57. package/nationalarchives/components/picture/picture.js +1 -1
  58. package/nationalarchives/components/picture/picture.js.map +1 -1
  59. package/nationalarchives/components/picture/picture.scss +2 -3
  60. package/nationalarchives/components/skip-link/skip-link.js +1 -1
  61. package/nationalarchives/components/skip-link/skip-link.js.map +1 -1
  62. package/nationalarchives/components/tabs/tabs.js +1 -1
  63. package/nationalarchives/components/tabs/tabs.js.map +1 -1
  64. package/nationalarchives/components/text-input/text-input.js +1 -1
  65. package/nationalarchives/components/text-input/text-input.js.map +1 -1
  66. package/nationalarchives/font-awesome.css +9 -9
  67. package/nationalarchives/font-awesome.css.map +1 -1
  68. package/nationalarchives/font-awesome.scss +6 -5
  69. package/nationalarchives/lib/analytics-helpers.mjs +9 -13
  70. package/nationalarchives/lib/cookies.mjs +69 -14
  71. package/nationalarchives/lib/font-awesome/_animated.scss +93 -98
  72. package/nationalarchives/lib/font-awesome/_bordered.scss +27 -0
  73. package/nationalarchives/lib/font-awesome/_core.scss +20 -40
  74. package/nationalarchives/lib/font-awesome/_fa.scss +3 -0
  75. package/nationalarchives/lib/font-awesome/_functions.scss +3 -52
  76. package/nationalarchives/lib/font-awesome/_icons.scss +6 -4
  77. package/nationalarchives/lib/font-awesome/_list.scss +9 -6
  78. package/nationalarchives/lib/font-awesome/_mixins.scss +23 -60
  79. package/nationalarchives/lib/font-awesome/_pulled.scss +15 -0
  80. package/nationalarchives/lib/font-awesome/_rotated-flipped.scss +10 -9
  81. package/nationalarchives/lib/font-awesome/_shims.scss +1255 -1250
  82. package/nationalarchives/lib/font-awesome/_sizing.scss +6 -4
  83. package/nationalarchives/lib/font-awesome/_stacked.scss +11 -10
  84. package/nationalarchives/lib/font-awesome/_variables.scss +5110 -5025
  85. package/nationalarchives/lib/font-awesome/_widths.scss +12 -0
  86. package/nationalarchives/lib/font-awesome/brands.css +3 -3
  87. package/nationalarchives/lib/font-awesome/brands.css.map +1 -1
  88. package/nationalarchives/lib/font-awesome/brands.scss +29 -16
  89. package/nationalarchives/lib/font-awesome/fontawesome.css +3 -3
  90. package/nationalarchives/lib/font-awesome/fontawesome.css.map +1 -1
  91. package/nationalarchives/lib/font-awesome/fontawesome.scss +12 -15
  92. package/nationalarchives/lib/font-awesome/solid.css +3 -3
  93. package/nationalarchives/lib/font-awesome/solid.css.map +1 -1
  94. package/nationalarchives/lib/font-awesome/solid.scss +39 -14
  95. package/nationalarchives/lib/font-awesome/v4-shims.css +3 -3
  96. package/nationalarchives/lib/font-awesome/v4-shims.css.map +1 -1
  97. package/nationalarchives/lib/font-awesome/v4-shims.scss +5 -5
  98. package/nationalarchives/prototype-kit.css +1 -1
  99. package/nationalarchives/prototype-kit.css.map +1 -1
  100. package/nationalarchives/templates/fixtures.json +6 -6
  101. package/nationalarchives/tools/_index.scss +1 -0
  102. package/nationalarchives/tools/_shadows.scss +5 -0
  103. package/nationalarchives/utilities/lists/_index.scss +0 -1
  104. package/package.json +2 -2
  105. package/nationalarchives/assets/fonts/fa-brands-400.ttf +0 -0
  106. package/nationalarchives/assets/fonts/fa-solid-900.ttf +0 -0
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/picture/picture.scss","../../../../src/nationalarchives/tools/_borders.scss","../../../../src/nationalarchives/variables/_borders.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/tools/_media.scss"],"names":[],"mappings":"AA4OA,yBACE,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEA/JA,4CAJA,gCC5EF,aACE,gBAEA,yBACE,aCLJ,aAEE,eACA,gBACA,cACA,UAEA,4BACE,aAEA,kBChBF,cCDsB,IFsBtB,yEACE,0BAIF,oBACE,WACA,YACA,iBACA,cAEA,WACE,gFFyeF,wGAMA,0BACA,0BAEA,4DE5eF,gCACE,kBACA,WACA,YAGF,yBAGE,iBAEA,aAEA,cAEA,0BAIF,sBACE,cACA,aGzDF,eLqGI,+DErCJ,gDACE,UAGF,wCACE,gBIjBF,wBJqBE,4BACE,UAGF,yBACE,wBAEA,kBACA,WAGF,oBACE,iBAEA,gBAGF,sBACE,eACA,cG5FJ,oBLsfA,8BEnfF,aF4GM,sDEVF,sBACE,SAEA,aFwYJ,+BE7eF,aF4GM,sDEVF,sBACE,SAEA","file":"picture.css","sourcesContent":["@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n // \"background-tint\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n // \"focus-outline\",\n \"keyline\",\n \"keyline-dark\",\n // \"input-foreground\",\n // \"input-background\",\n // \"input-border\",\n // \"form-error-border\",\n // \"form-error-text\",\n // \"button-text\",\n // \"button-background\",\n // \"button-hover-text\",\n // \"button-hover-background\",\n);\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index((\"keyline\", \"keyline-dark\"), $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@function colour-var($colour) {\n @return var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n );\n}\n\n@mixin colour-font($colour, $important: false) {\n color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n border-#{$direction}: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width colour-var($colour) $style if($important, !important, null);\n } @else {\n outline-color: colour-var($colour) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline-dark\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline-dark\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"accent-border\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"accent-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n $border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"form-error-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour, $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width #{brand-colour($brandColour)} solid;\n } @else {\n border: $border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width transparent solid;\n } @else {\n border: $border-width transparent solid;\n }\n}\n\n// Use light theme colours (except for \"form-error-border\")\n%always-light {\n @include colour-css-vars(\"form-error-border\", \"focus-outline\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\n \"form-error-border\",\n \"focus-outline\"\n );\n }\n}\n\n@mixin always-light {\n @extend %always-light;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%base {\n @each $name, $value in $base-colours {\n --#{$name}: var(--base-#{$value});\n }\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin base {\n @extend %base;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n --accent-border: var(--accent-background);\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n }\n\n .tna-template--dark-theme & {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-border: #{colour.brand-colour(\"yellow\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n --button-accented-background: #{colour.brand-colour(\"brown\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --accent-border: #{colour.brand-colour(\"black\")} !important;\n --button-accented-text: #{colour.brand-colour(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %accent-lighter-text;\n @extend %black-accent;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --accent-border: #{colour.brand-colour(\"pink\")} !important;\n --button-accented-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %accent-lighter-text;\n @extend %pink-accent;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --accent-border: #{colour.brand-colour(\"orange\")} !important;\n --button-accented-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %accent-lighter-text;\n @extend %orange-accent;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --accent-border: #{colour.brand-colour(\"green\")} !important;\n --button-accented-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %accent-lighter-text;\n @extend %green-accent;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --accent-border: #{colour.brand-colour(\"blue\")} !important;\n --button-accented-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %accent-lighter-text;\n @extend %blue-accent;\n}\n\n@mixin on-high-contrast {\n @media (prefers-contrast: more) {\n @content;\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n background: linear-gradient(\n -45deg,\n rgb(0 0 0 / 25%),\n rgb(255 255 255 / 25%),\n rgb(0 0 0 / 25%)\n );\n background-size: 500% 500%;\n background-position: 0 50%;\n\n animation: image-loader-background ease-in-out 1.2s infinite;\n }\n}\n","@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n@function space($size) {\n @return #{$size * spacing.$spacing-unit-px}px;\n}\n\n%space-above {\n margin-top: space(2);\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"../../variables/borders\" as bordersVars;\n@use \"../../tools/a11y\";\n@use \"../../tools/borders\";\n@use \"../../tools/colour\";\n@use \"../../tools/grid\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-picture {\n @include spacing.space-above;\n margin-right: 0;\n margin-bottom: 0;\n margin-left: 0;\n padding: 0;\n\n &__image-wrapper {\n padding: spacing.space(1.5);\n\n position: relative;\n\n @include borders.rounded-border;\n }\n\n &__image-wrapper:has(+ #{&}__transcript:not([hidden])) {\n border-radius: bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius 0 0;\n }\n\n &__image {\n width: auto;\n height: auto;\n max-height: 40rem;\n margin: 0 auto;\n\n box-shadow:\n 0 0.25rem 1rem -0.25rem rgb(0 0 0 / 25%),\n 0 0.125rem 0.5rem -0.25rem rgb(0 0 0 / 75%);\n\n @include colour.image-loader-background;\n }\n\n &__toggle-transcript {\n position: absolute;\n right: spacing.space(1);\n bottom: spacing.space(1);\n }\n\n &__transcript {\n @include colour.contrast;\n\n max-height: 25rem;\n\n padding: spacing.space(1.5);\n\n overflow: auto;\n\n border-radius: 0 0 bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &__caption {\n margin: 0 spacing.space(1);\n padding: spacing.space(1);\n\n @include typography.font-size(16);\n\n @include colour.colour-border(\"keyline\", 1px, solid, bottom);\n }\n\n &--plain &__image-wrapper {\n padding: 0;\n }\n\n &--plain &__image {\n box-shadow: none;\n }\n\n @include media.on-tiny {\n &__image-wrapper {\n padding: 0;\n }\n\n .tna-column & {\n width: calc(100% + #{grid.gutter-width-tiny-double()});\n\n position: relative;\n left: -#{grid.gutter-width-tiny()};\n }\n\n &__image {\n max-height: 60rem;\n\n box-shadow: none;\n }\n\n &__caption {\n margin-right: 0;\n margin-left: 0;\n\n @include typography.font-size(14);\n }\n }\n\n @include colour.on-high-contrast-and-forced-colours {\n @include colour.colour-border(\"keyline-dark\", 1px);\n\n &__caption {\n margin: 0;\n\n border: none;\n }\n }\n}\n","@use \"../variables/borders\";\n\n@mixin rounded-border {\n border-radius: borders.$rounded-border-radius;\n}\n","$thick-border-width: 5px !default;\n$very-thick-border-width: 8px !default;\n$rounded-border-radius: 4px !default;\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin relative-font-size($font-size-px) {\n @warn \"relative-font-size() will soon be deprecated in favour of font-size().\";\n @include font-size($font-size-px);\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n font-variation-settings: \"wdth\" 100;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include font-size(14);\n line-height: 1.1;\n text-transform: uppercase;\n}\n\n@mixin interactable-text-decoration {\n text-decoration-thickness: typography.$interactable-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n line-height: $line-height;\n @include font-size($font-size-default);\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include font-size($font-size-medium);\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../variables/media\";\n@use \"../variables/typography\";\n\n$smallest-large-device-em: #{math.div(\n media.$largest-medium-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-medium-device-em: #{math.div(\n media.$largest-medium-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-medium-device-em: #{math.div(\n media.$largest-small-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-small-device-em: #{math.div(\n media.$largest-small-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-small-device-em: #{math.div(\n media.$largest-tiny-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-tiny-device-em: #{math.div(\n media.$largest-tiny-device-px,\n typography.$relative-1rem-px\n )}em;\n\n$media-large: \"(min-width: #{$smallest-large-device-em})\";\n$media-lt-large: \"(max-width: #{$largest-medium-device-em})\";\n$media-medium: \"(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})\";\n$media-gt-mobile: \"(min-width: #{$smallest-medium-device-em})\";\n$media-mobile: \"(max-width: #{$largest-small-device-em})\";\n$media-small: \"(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})\";\n$media-gt-tiny: \"(min-width: #{$smallest-small-device-em})\";\n$media-tiny: \"(max-width: #{$largest-tiny-device-em})\";\n\n// https://nationalarchives.github.io/design-system/styles/media/#media-queries\n@mixin on-large() {\n @media #{$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{$media-mobile} {\n @content;\n }\n}\n\n@mixin on-print() {\n @media print {\n @content;\n }\n}\n"]}
1
+ {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/picture/picture.scss","../../../../src/nationalarchives/tools/_borders.scss","../../../../src/nationalarchives/variables/_borders.scss","../../../../src/nationalarchives/tools/_shadows.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/tools/_media.scss"],"names":[],"mappings":"AA4OA,yBACE,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEA/JA,4CAJA,gCC5EF,aACE,gBAEA,yBACE,aCJJ,aAEE,eACA,gBACA,cACA,UAEA,4BACE,aAEA,kBCjBF,cCDsB,IFuBtB,yEACE,0BAIF,oBACE,WACA,YACA,iBACA,cGjCF,WACE,gFL2gBA,wGAMA,0BACA,0BAEA,4DE7eF,gCACE,kBACA,WACA,YAGF,yBAGE,iBAEA,aAEA,cAEA,0BAIF,sBACE,cACA,aIxDF,eNqGI,+DEtCJ,gDACE,UAGF,wCACE,gBKhBF,wBLoBE,4BACE,UAGF,yBACE,wBAEA,kBACA,WAGF,oBACE,iBAEA,gBAGF,sBACE,eACA,cI3FJ,oBNsfA,8BElfF,aF2GM,sDEXF,sBACE,SAEA,aFyYJ,+BE5eF,aF2GM,sDEXF,sBACE,SAEA","file":"picture.css","sourcesContent":["@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n // \"background-tint\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n // \"focus-outline\",\n \"keyline\",\n \"keyline-dark\",\n // \"input-foreground\",\n // \"input-background\",\n // \"input-border\",\n // \"form-error-border\",\n // \"form-error-text\",\n // \"button-text\",\n // \"button-background\",\n // \"button-hover-text\",\n // \"button-hover-background\",\n);\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index((\"keyline\", \"keyline-dark\"), $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@function colour-var($colour) {\n @return var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n );\n}\n\n@mixin colour-font($colour, $important: false) {\n color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n border-#{$direction}: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width colour-var($colour) $style if($important, !important, null);\n } @else {\n outline-color: colour-var($colour) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline-dark\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline-dark\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"accent-border\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"accent-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n $border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"form-error-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour, $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width #{brand-colour($brandColour)} solid;\n } @else {\n border: $border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width transparent solid;\n } @else {\n border: $border-width transparent solid;\n }\n}\n\n// Use light theme colours (except for \"form-error-border\")\n%always-light {\n @include colour-css-vars(\"form-error-border\", \"focus-outline\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\n \"form-error-border\",\n \"focus-outline\"\n );\n }\n}\n\n@mixin always-light {\n @extend %always-light;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%base {\n @each $name, $value in $base-colours {\n --#{$name}: var(--base-#{$value});\n }\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin base {\n @extend %base;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n --accent-border: var(--accent-background);\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n }\n\n .tna-template--dark-theme & {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-border: #{colour.brand-colour(\"yellow\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n --button-accented-background: #{colour.brand-colour(\"brown\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --accent-border: #{colour.brand-colour(\"black\")} !important;\n --button-accented-text: #{colour.brand-colour(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %accent-lighter-text;\n @extend %black-accent;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --accent-border: #{colour.brand-colour(\"pink\")} !important;\n --button-accented-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %accent-lighter-text;\n @extend %pink-accent;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --accent-border: #{colour.brand-colour(\"orange\")} !important;\n --button-accented-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %accent-lighter-text;\n @extend %orange-accent;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --accent-border: #{colour.brand-colour(\"green\")} !important;\n --button-accented-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %accent-lighter-text;\n @extend %green-accent;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --accent-border: #{colour.brand-colour(\"blue\")} !important;\n --button-accented-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %accent-lighter-text;\n @extend %blue-accent;\n}\n\n@mixin on-high-contrast {\n @media (prefers-contrast: more) {\n @content;\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n background: linear-gradient(\n -45deg,\n rgb(0 0 0 / 25%),\n rgb(255 255 255 / 25%),\n rgb(0 0 0 / 25%)\n );\n background-size: 500% 500%;\n background-position: 0 50%;\n\n animation: image-loader-background ease-in-out 1.2s infinite;\n }\n}\n","@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n@function space($size) {\n @return #{$size * spacing.$spacing-unit-px}px;\n}\n\n%space-above {\n margin-top: space(2);\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"../../variables/borders\" as bordersVars;\n@use \"../../tools/a11y\";\n@use \"../../tools/borders\";\n@use \"../../tools/colour\";\n@use \"../../tools/grid\";\n@use \"../../tools/media\";\n@use \"../../tools/shadows\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-picture {\n @include spacing.space-above;\n margin-right: 0;\n margin-bottom: 0;\n margin-left: 0;\n padding: 0;\n\n &__image-wrapper {\n padding: spacing.space(1.5);\n\n position: relative;\n\n @include borders.rounded-border;\n }\n\n &__image-wrapper:has(+ #{&}__transcript:not([hidden])) {\n border-radius: bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius 0 0;\n }\n\n &__image {\n width: auto;\n height: auto;\n max-height: 40rem;\n margin: 0 auto;\n\n @include shadows.drop-shadow;\n\n @include colour.image-loader-background;\n }\n\n &__toggle-transcript {\n position: absolute;\n right: spacing.space(1);\n bottom: spacing.space(1);\n }\n\n &__transcript {\n @include colour.contrast;\n\n max-height: 25rem;\n\n padding: spacing.space(1.5);\n\n overflow: auto;\n\n border-radius: 0 0 bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &__caption {\n margin: 0 spacing.space(1);\n padding: spacing.space(1);\n\n @include typography.font-size(16);\n\n @include colour.colour-border(\"keyline\", 1px, solid, bottom);\n }\n\n &--plain &__image-wrapper {\n padding: 0;\n }\n\n &--plain &__image {\n box-shadow: none;\n }\n\n @include media.on-tiny {\n &__image-wrapper {\n padding: 0;\n }\n\n .tna-column & {\n width: calc(100% + #{grid.gutter-width-tiny-double()});\n\n position: relative;\n left: -#{grid.gutter-width-tiny()};\n }\n\n &__image {\n max-height: 60rem;\n\n box-shadow: none;\n }\n\n &__caption {\n margin-right: 0;\n margin-left: 0;\n\n @include typography.font-size(14);\n }\n }\n\n @include colour.on-high-contrast-and-forced-colours {\n @include colour.colour-border(\"keyline-dark\", 1px);\n\n &__caption {\n margin: 0;\n\n border: none;\n }\n }\n}\n","@use \"../variables/borders\";\n\n@mixin rounded-border {\n border-radius: borders.$rounded-border-radius;\n}\n","$thick-border-width: 5px !default;\n$very-thick-border-width: 8px !default;\n$rounded-border-radius: 4px !default;\n","@mixin drop-shadow {\n box-shadow:\n 0 0.25rem 1rem -0.25rem rgb(0 0 0 / 25%),\n 0 0.125rem 0.5rem -0.25rem rgb(0 0 0 / 75%);\n}\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin relative-font-size($font-size-px) {\n @warn \"relative-font-size() will soon be deprecated in favour of font-size().\";\n @include font-size($font-size-px);\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n font-variation-settings: \"wdth\" 100;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include font-size(14);\n line-height: 1.1;\n text-transform: uppercase;\n}\n\n@mixin interactable-text-decoration {\n text-decoration-thickness: typography.$interactable-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n line-height: $line-height;\n @include font-size($font-size-default);\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include font-size($font-size-medium);\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../variables/media\";\n@use \"../variables/typography\";\n\n$smallest-large-device-em: #{math.div(\n media.$largest-medium-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-medium-device-em: #{math.div(\n media.$largest-medium-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-medium-device-em: #{math.div(\n media.$largest-small-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-small-device-em: #{math.div(\n media.$largest-small-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-small-device-em: #{math.div(\n media.$largest-tiny-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-tiny-device-em: #{math.div(\n media.$largest-tiny-device-px,\n typography.$relative-1rem-px\n )}em;\n\n$media-large: \"(min-width: #{$smallest-large-device-em})\";\n$media-lt-large: \"(max-width: #{$largest-medium-device-em})\";\n$media-medium: \"(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})\";\n$media-gt-mobile: \"(min-width: #{$smallest-medium-device-em})\";\n$media-mobile: \"(max-width: #{$largest-small-device-em})\";\n$media-small: \"(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})\";\n$media-gt-tiny: \"(min-width: #{$smallest-small-device-em})\";\n$media-tiny: \"(max-width: #{$largest-tiny-device-em})\";\n\n// https://nationalarchives.github.io/design-system/styles/media/#media-queries\n@mixin on-large() {\n @media #{$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{$media-mobile} {\n @content;\n }\n}\n\n@mixin on-print() {\n @media print {\n @content;\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={181:(t,e,r)=>{r.d(e,{A:()=>i});const i=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)}))}}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};r.r(i),r.d(i,{Picture:()=>p});var n=r(181);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,s(i.key),i)}}function s(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var p=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$imageWrapper=e&&e.querySelector(".tna-picture__image-wrapper"),this.$transcriptToggle=this.$imageWrapper&&this.$imageWrapper.querySelector(".tna-picture__toggle-transcript"),this.$transcript=e&&e.querySelector(".tna-picture__transcript"),this.transcriptOpened=!1,this.$module&&this.$imageWrapper&&this.$transcriptToggle&&this.$transcript&&(this.openLabel=this.$module.dataset.informationLabelOpen||"Open transcript",this.closeLabel=this.$module.dataset.informationLabelClose||"Close transcript",this.init())},e=[{key:"init",value:function(){var t=this,e="tna-picture-".concat((0,n.A)());this.$transcriptToggle.removeAttribute("hidden"),this.$transcriptToggle.setAttribute("aria-controls",e),this.$transcriptToggle.innerText=this.openLabel,this.$transcriptToggle.addEventListener("click",(function(){return t.toggleTranscript()})),this.$transcript.setAttribute("id",e),this.$transcript.setAttribute("hidden",""),this.$transcript.addEventListener("keydown",(function(e){"Escape"===e.key&&(t.toggleTranscript(),t.$transcriptToggle.focus())}))}},{key:"toggleTranscript",value:function(){this.transcriptOpened=!this.transcriptOpened,this.transcriptOpened?(this.$transcriptToggle.setAttribute("aria-expanded",!0),this.$transcriptToggle.innerText=this.closeLabel,this.$transcript.removeAttribute("hidden")):(this.$transcriptToggle.setAttribute("aria-expanded",!1),this.$transcriptToggle.innerText=this.openLabel,this.$transcript.setAttribute("hidden",""))}}],e&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return i})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,()=>(()=>{"use strict";var t={181:(t,e,r)=>{r.d(e,{A:()=>i});const i=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)})}}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};r.r(i),r.d(i,{Picture:()=>p});var n=r(181);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,s(i.key),i)}}function s(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var p=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$imageWrapper=e&&e.querySelector(".tna-picture__image-wrapper"),this.$transcriptToggle=this.$imageWrapper&&this.$imageWrapper.querySelector(".tna-picture__toggle-transcript"),this.$transcript=e&&e.querySelector(".tna-picture__transcript"),this.transcriptOpened=!1,this.$module&&this.$imageWrapper&&this.$transcriptToggle&&this.$transcript&&(this.openLabel=this.$module.dataset.informationLabelOpen||"Open transcript",this.closeLabel=this.$module.dataset.informationLabelClose||"Close transcript",this.init())},e=[{key:"init",value:function(){var t=this,e="tna-picture-".concat((0,n.A)());this.$transcriptToggle.removeAttribute("hidden"),this.$transcriptToggle.setAttribute("aria-controls",e),this.$transcriptToggle.innerText=this.openLabel,this.$transcriptToggle.addEventListener("click",function(){return t.toggleTranscript()}),this.$transcript.setAttribute("id",e),this.$transcript.setAttribute("hidden",""),this.$transcript.addEventListener("keydown",function(e){"Escape"===e.key&&(t.toggleTranscript(),t.$transcriptToggle.focus())})}},{key:"toggleTranscript",value:function(){this.transcriptOpened=!this.transcriptOpened,this.transcriptOpened?(this.$transcriptToggle.setAttribute("aria-expanded",!0),this.$transcriptToggle.innerText=this.closeLabel,this.$transcript.removeAttribute("hidden")):(this.$transcriptToggle.setAttribute("aria-expanded",!1),this.$transcriptToggle.innerText=this.openLabel,this.$transcript.setAttribute("hidden",""))}}],e&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return i})());
2
2
  //# sourceMappingURL=picture.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/picture/picture.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,yDCDT,QARe,WAAH,OACT,CAAC,MAAQ,KAAO,KAAO,KAAO,MAAMC,QAAQ,UAAU,SAACC,GAAC,OAErDA,EACCC,OAAOC,gBAAgB,IAAIC,WAAW,IAAI,GAAM,IAAOH,EAAI,GAC5DI,SAAS,GAAG,GACf,C,GCLCC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAad,QAGrB,IAAIC,EAASU,EAAyBE,GAAY,CAGjDb,QAAS,CAAC,GAOX,OAHAgB,EAAoBH,GAAUZ,EAAQA,EAAOD,QAASY,GAG/CX,EAAOD,OACf,CCrBAY,EAAoBK,EAAI,CAACjB,EAASkB,KACjC,IAAI,IAAIC,KAAOD,EACXN,EAAoBQ,EAAEF,EAAYC,KAASP,EAAoBQ,EAAEpB,EAASmB,IAC5EE,OAAOC,eAAetB,EAASmB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDP,EAAoBQ,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFd,EAAoBkB,EAAK9B,IACH,oBAAX+B,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAetB,EAAS+B,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAetB,EAAS,aAAc,CAAEiC,OAAO,GAAO,E,stBCHvD,IAAMC,EAAO,WA6BjB,O,EA5BD,SAAAA,EAAYC,I,4FAASC,CAAA,KAAAF,GACnBG,KAAKF,QAAUA,EACfE,KAAKC,cACHH,GAAWA,EAAQI,cAAc,+BAEnCF,KAAKG,kBACHH,KAAKC,eACLD,KAAKC,cAAcC,cAAc,mCAEnCF,KAAKI,YACHN,GAAWA,EAAQI,cAAc,4BACnCF,KAAKK,kBAAmB,EAGrBL,KAAKF,SACLE,KAAKC,eACLD,KAAKG,mBACLH,KAAKI,cAKRJ,KAAKM,UACHN,KAAKF,QAAQS,QAAQC,sBAAwB,kBAC/CR,KAAKS,WACHT,KAAKF,QAAQS,QAAQG,uBAAyB,mBAEhDV,KAAKW,OACP,E,EAAC,EAAA7B,IAAA,OAAAc,MAED,WAAO,IAAAgB,EAAA,KACCC,EAAW,eAAHC,QAAkBC,EAAAA,EAAAA,MAEhCf,KAAKG,kBAAkBa,gBAAgB,UACvChB,KAAKG,kBAAkBc,aAAa,gBAAiBJ,GACrDb,KAAKG,kBAAkBe,UAAYlB,KAAKM,UACxCN,KAAKG,kBAAkBgB,iBAAiB,SAAS,kBAC/CP,EAAKQ,kBAAkB,IAGzBpB,KAAKI,YAAYa,aAAa,KAAMJ,GACpCb,KAAKI,YAAYa,aAAa,SAAU,IAExCjB,KAAKI,YAAYe,iBAAiB,WAAW,SAACE,GAErC,WADCA,EAAEvC,MAEN8B,EAAKQ,mBACLR,EAAKT,kBAAkBmB,QAG7B,GACF,GAAC,CAAAxC,IAAA,mBAAAc,MAED,WACEI,KAAKK,kBAAoBL,KAAKK,iBAC1BL,KAAKK,kBACPL,KAAKG,kBAAkBc,aAAa,iBAAiB,GACrDjB,KAAKG,kBAAkBe,UAAYlB,KAAKS,WACxCT,KAAKI,YAAYY,gBAAgB,YAEjChB,KAAKG,kBAAkBc,aAAa,iBAAiB,GACrDjB,KAAKG,kBAAkBe,UAAYlB,KAAKM,UACxCN,KAAKI,YAAYa,aAAa,SAAU,IAE5C,I,gFAAC,CAjEiB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/lib/uuid.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/picture/picture.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","const uuidv4 = () =>\n ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16),\n );\n\nexport default uuidv4;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Picture {\n constructor($module) {\n this.$module = $module;\n this.$imageWrapper =\n $module && $module.querySelector(\".tna-picture__image-wrapper\");\n\n this.$transcriptToggle =\n this.$imageWrapper &&\n this.$imageWrapper.querySelector(\".tna-picture__toggle-transcript\");\n\n this.$transcript =\n $module && $module.querySelector(\".tna-picture__transcript\");\n this.transcriptOpened = false;\n\n if (\n !this.$module ||\n !this.$imageWrapper ||\n !this.$transcriptToggle ||\n !this.$transcript\n ) {\n return;\n }\n\n this.openLabel =\n this.$module.dataset.informationLabelOpen || \"Open transcript\";\n this.closeLabel =\n this.$module.dataset.informationLabelClose || \"Close transcript\";\n\n this.init();\n }\n\n init() {\n const uniqueId = `tna-picture-${uuidv4()}`;\n\n this.$transcriptToggle.removeAttribute(\"hidden\");\n this.$transcriptToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$transcriptToggle.innerText = this.openLabel;\n this.$transcriptToggle.addEventListener(\"click\", () =>\n this.toggleTranscript(),\n );\n\n this.$transcript.setAttribute(\"id\", uniqueId);\n this.$transcript.setAttribute(\"hidden\", \"\");\n\n this.$transcript.addEventListener(\"keydown\", (e) => {\n switch (e.key) {\n case \"Escape\":\n this.toggleTranscript();\n this.$transcriptToggle.focus();\n break;\n }\n });\n }\n\n toggleTranscript() {\n this.transcriptOpened = !this.transcriptOpened;\n if (this.transcriptOpened) {\n this.$transcriptToggle.setAttribute(\"aria-expanded\", true);\n this.$transcriptToggle.innerText = this.closeLabel;\n this.$transcript.removeAttribute(\"hidden\");\n } else {\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = this.openLabel;\n this.$transcript.setAttribute(\"hidden\", \"\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","replace","c","crypto","getRandomValues","Uint8Array","toString","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","Picture","$module","_classCallCheck","this","$imageWrapper","querySelector","$transcriptToggle","$transcript","transcriptOpened","openLabel","dataset","informationLabelOpen","closeLabel","informationLabelClose","init","_this","uniqueId","concat","uuidv4","removeAttribute","setAttribute","innerText","addEventListener","toggleTranscript","e","focus"],"sourceRoot":""}
1
+ {"version":3,"file":"components/picture/picture.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,KAAM,I,yDCDT,QARe,WAAH,OACT,CAAC,MAAQ,KAAO,KAAO,KAAO,MAAMC,QAAQ,SAAU,SAACC,GAAC,OAErDA,EACCC,OAAOC,gBAAgB,IAAIC,WAAW,IAAI,GAAM,IAAOH,EAAI,GAC5DI,SAAS,GAAG,EACf,C,GCLCC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAad,QAGrB,IAAIC,EAASU,EAAyBE,GAAY,CAGjDb,QAAS,CAAC,GAOX,OAHAgB,EAAoBH,GAAUZ,EAAQA,EAAOD,QAASY,GAG/CX,EAAOD,OACf,CCrBAY,EAAoBK,EAAI,CAACjB,EAASkB,KACjC,IAAI,IAAIC,KAAOD,EACXN,EAAoBQ,EAAEF,EAAYC,KAASP,EAAoBQ,EAAEpB,EAASmB,IAC5EE,OAAOC,eAAetB,EAASmB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EP,EAAoBQ,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFd,EAAoBkB,EAAK9B,IACH,oBAAX+B,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAetB,EAAS+B,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAetB,EAAS,aAAc,CAAEiC,OAAO,K,stBCHhD,IAAMC,EAAO,WA6BjB,O,EA5BD,SAAAA,EAAYC,I,4FAASC,CAAA,KAAAF,GACnBG,KAAKF,QAAUA,EACfE,KAAKC,cACHH,GAAWA,EAAQI,cAAc,+BAEnCF,KAAKG,kBACHH,KAAKC,eACLD,KAAKC,cAAcC,cAAc,mCAEnCF,KAAKI,YACHN,GAAWA,EAAQI,cAAc,4BACnCF,KAAKK,kBAAmB,EAGrBL,KAAKF,SACLE,KAAKC,eACLD,KAAKG,mBACLH,KAAKI,cAKRJ,KAAKM,UACHN,KAAKF,QAAQS,QAAQC,sBAAwB,kBAC/CR,KAAKS,WACHT,KAAKF,QAAQS,QAAQG,uBAAyB,mBAEhDV,KAAKW,OACP,E,EAAC,EAAA7B,IAAA,OAAAc,MAED,WAAO,IAAAgB,EAAA,KACCC,EAAW,eAAHC,QAAkBC,EAAAA,EAAAA,MAEhCf,KAAKG,kBAAkBa,gBAAgB,UACvChB,KAAKG,kBAAkBc,aAAa,gBAAiBJ,GACrDb,KAAKG,kBAAkBe,UAAYlB,KAAKM,UACxCN,KAAKG,kBAAkBgB,iBAAiB,QAAS,kBAC/CP,EAAKQ,kBAAkB,GAGzBpB,KAAKI,YAAYa,aAAa,KAAMJ,GACpCb,KAAKI,YAAYa,aAAa,SAAU,IAExCjB,KAAKI,YAAYe,iBAAiB,UAAW,SAACE,GAErC,WADCA,EAAEvC,MAEN8B,EAAKQ,mBACLR,EAAKT,kBAAkBmB,QAG7B,EACF,GAAC,CAAAxC,IAAA,mBAAAc,MAED,WACEI,KAAKK,kBAAoBL,KAAKK,iBAC1BL,KAAKK,kBACPL,KAAKG,kBAAkBc,aAAa,iBAAiB,GACrDjB,KAAKG,kBAAkBe,UAAYlB,KAAKS,WACxCT,KAAKI,YAAYY,gBAAgB,YAEjChB,KAAKG,kBAAkBc,aAAa,iBAAiB,GACrDjB,KAAKG,kBAAkBe,UAAYlB,KAAKM,UACxCN,KAAKI,YAAYa,aAAa,SAAU,IAE5C,I,gFAAC,CAjEiB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/lib/uuid.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/picture/picture.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","const uuidv4 = () =>\n ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16),\n );\n\nexport default uuidv4;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Picture {\n constructor($module) {\n this.$module = $module;\n this.$imageWrapper =\n $module && $module.querySelector(\".tna-picture__image-wrapper\");\n\n this.$transcriptToggle =\n this.$imageWrapper &&\n this.$imageWrapper.querySelector(\".tna-picture__toggle-transcript\");\n\n this.$transcript =\n $module && $module.querySelector(\".tna-picture__transcript\");\n this.transcriptOpened = false;\n\n if (\n !this.$module ||\n !this.$imageWrapper ||\n !this.$transcriptToggle ||\n !this.$transcript\n ) {\n return;\n }\n\n this.openLabel =\n this.$module.dataset.informationLabelOpen || \"Open transcript\";\n this.closeLabel =\n this.$module.dataset.informationLabelClose || \"Close transcript\";\n\n this.init();\n }\n\n init() {\n const uniqueId = `tna-picture-${uuidv4()}`;\n\n this.$transcriptToggle.removeAttribute(\"hidden\");\n this.$transcriptToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$transcriptToggle.innerText = this.openLabel;\n this.$transcriptToggle.addEventListener(\"click\", () =>\n this.toggleTranscript(),\n );\n\n this.$transcript.setAttribute(\"id\", uniqueId);\n this.$transcript.setAttribute(\"hidden\", \"\");\n\n this.$transcript.addEventListener(\"keydown\", (e) => {\n switch (e.key) {\n case \"Escape\":\n this.toggleTranscript();\n this.$transcriptToggle.focus();\n break;\n }\n });\n }\n\n toggleTranscript() {\n this.transcriptOpened = !this.transcriptOpened;\n if (this.transcriptOpened) {\n this.$transcriptToggle.setAttribute(\"aria-expanded\", true);\n this.$transcriptToggle.innerText = this.closeLabel;\n this.$transcript.removeAttribute(\"hidden\");\n } else {\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = this.openLabel;\n this.$transcript.setAttribute(\"hidden\", \"\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","replace","c","crypto","getRandomValues","Uint8Array","toString","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","Picture","$module","_classCallCheck","this","$imageWrapper","querySelector","$transcriptToggle","$transcript","transcriptOpened","openLabel","dataset","informationLabelOpen","closeLabel","informationLabelClose","init","_this","uniqueId","concat","uuidv4","removeAttribute","setAttribute","innerText","addEventListener","toggleTranscript","e","focus"],"sourceRoot":""}
@@ -4,6 +4,7 @@
4
4
  @use "../../tools/colour";
5
5
  @use "../../tools/grid";
6
6
  @use "../../tools/media";
7
+ @use "../../tools/shadows";
7
8
  @use "../../tools/spacing";
8
9
  @use "../../tools/typography";
9
10
 
@@ -33,9 +34,7 @@
33
34
  max-height: 40rem;
34
35
  margin: 0 auto;
35
36
 
36
- box-shadow:
37
- 0 0.25rem 1rem -0.25rem rgb(0 0 0 / 25%),
38
- 0 0.125rem 0.5rem -0.25rem rgb(0 0 0 / 75%);
37
+ @include shadows.drop-shadow;
39
38
 
40
39
  @include colour.image-loader-background;
41
40
  }
@@ -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={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,o(i.key),i)}}function o(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}e.r(t),e.d(t,{SkipLink:()=>r});var r=function(){return e=function e(t){var n,i,r,l=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,r=!1,(i=o(i="linkedElementListener"))in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r,this.$module=t,this.linkedElementId=t.getAttribute("href").split("#").pop(),this.$linkedElement=t&&this.linkedElementId&&document.getElementById(this.linkedElementId),this.$module&&this.$linkedElement&&this.$module.addEventListener("click",(function(){return l.focusLinkedElement()}))},(t=[{key:"focusLinkedElement",value:function(){var e=this;this.$linkedElement.getAttribute("tabindex")||(this.$linkedElement.setAttribute("tabindex","-1"),this.$linkedElement.classList.add("tna-!--no-focus-style"),this.linkedElementListener||(this.$linkedElement.addEventListener("blur",(function(){return e.removeFocusProperties()})),this.linkedElementListener=!0)),this.$linkedElement.focus()}},{key:"removeFocusProperties",value:function(){this.$linkedElement.removeAttribute("tabindex"),this.$linkedElement.classList.remove("tna-!--no-focus-style")}}])&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();return t})()));
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={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,o(i.key),i)}}function o(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}e.r(t),e.d(t,{SkipLink:()=>r});var r=function(){return e=function e(t){var n,i,r,l=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,r=!1,(i=o(i="linkedElementListener"))in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r,this.$module=t,this.linkedElementId=t.getAttribute("href").split("#").pop(),this.$linkedElement=t&&this.linkedElementId&&document.getElementById(this.linkedElementId),this.$module&&this.$linkedElement&&this.$module.addEventListener("click",function(){return l.focusLinkedElement()})},(t=[{key:"focusLinkedElement",value:function(){var e=this;this.$linkedElement.getAttribute("tabindex")||(this.$linkedElement.setAttribute("tabindex","-1"),this.$linkedElement.classList.add("tna-!--no-focus-style"),this.linkedElementListener||(this.$linkedElement.addEventListener("blur",function(){return e.removeFocusProperties()}),this.linkedElementListener=!0)),this.$linkedElement.focus()}},{key:"removeFocusProperties",value:function(){this.$linkedElement.removeAttribute("tabindex"),this.$linkedElement.classList.remove("tna-!--no-focus-style")}}])&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();return t})());
2
2
  //# sourceMappingURL=skip-link.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/skip-link/skip-link.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,GAAO,G,ssBCLvD,IAAMC,EAAQ,WAelB,O,EAZD,SAAAA,EAAYC,GAAS,I,MAAAC,EAAA,M,4FAAAC,CAAA,KAAAH,G,EAAA,K,GAFG,G,MAEH,4B,wFACnBI,KAAKH,QAAUA,EACfG,KAAKC,gBAAkBJ,EAAQK,aAAa,QAAQC,MAAM,KAAKC,MAC/DJ,KAAKK,eACHR,GACAG,KAAKC,iBACLK,SAASC,eAAeP,KAAKC,iBAE1BD,KAAKH,SAAYG,KAAKK,gBAG3BL,KAAKH,QAAQW,iBAAiB,SAAS,kBAAMV,EAAKW,oBAAoB,GACxE,G,EAAC,EAAA3B,IAAA,qBAAAa,MAED,WAAqB,IAAAe,EAAA,KACdV,KAAKK,eAAeH,aAAa,cACpCF,KAAKK,eAAeM,aAAa,WAAY,MAC7CX,KAAKK,eAAeO,UAAUC,IAAI,yBAE7Bb,KAAKc,wBACRd,KAAKK,eAAeG,iBAAiB,QAAQ,kBAC3CE,EAAKK,uBAAuB,IAE9Bf,KAAKc,uBAAwB,IAIjCd,KAAKK,eAAeW,OACtB,GAAC,CAAAlC,IAAA,wBAAAa,MAED,WACEK,KAAKK,eAAeY,gBAAgB,YACpCjB,KAAKK,eAAeO,UAAUM,OAAO,wBACvC,M,6EAAC,CApCkB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/skip-link/skip-link.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class SkipLink {\n linkedElementListener = false;\n\n constructor($module) {\n this.$module = $module;\n this.linkedElementId = $module.getAttribute(\"href\").split(\"#\").pop();\n this.$linkedElement =\n $module &&\n this.linkedElementId &&\n document.getElementById(this.linkedElementId);\n\n if (!this.$module || !this.$linkedElement) {\n return;\n }\n this.$module.addEventListener(\"click\", () => this.focusLinkedElement());\n }\n\n focusLinkedElement() {\n if (!this.$linkedElement.getAttribute(\"tabindex\")) {\n this.$linkedElement.setAttribute(\"tabindex\", \"-1\");\n this.$linkedElement.classList.add(\"tna-!--no-focus-style\");\n\n if (!this.linkedElementListener) {\n this.$linkedElement.addEventListener(\"blur\", () =>\n this.removeFocusProperties(),\n );\n this.linkedElementListener = true;\n }\n }\n\n this.$linkedElement.focus();\n }\n\n removeFocusProperties() {\n this.$linkedElement.removeAttribute(\"tabindex\");\n this.$linkedElement.classList.remove(\"tna-!--no-focus-style\");\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","SkipLink","$module","_this","_classCallCheck","this","linkedElementId","getAttribute","split","pop","$linkedElement","document","getElementById","addEventListener","focusLinkedElement","_this2","setAttribute","classList","add","linkedElementListener","removeFocusProperties","focus","removeAttribute","remove"],"sourceRoot":""}
1
+ {"version":3,"file":"components/skip-link/skip-link.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,KAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,M,ssBCLhD,IAAMC,EAAQ,WAelB,O,EAZD,SAAAA,EAAYC,GAAS,I,MAAAC,EAAA,M,4FAAAC,CAAA,KAAAH,G,EAAA,K,GAFG,G,MAEH,4B,wFACnBI,KAAKH,QAAUA,EACfG,KAAKC,gBAAkBJ,EAAQK,aAAa,QAAQC,MAAM,KAAKC,MAC/DJ,KAAKK,eACHR,GACAG,KAAKC,iBACLK,SAASC,eAAeP,KAAKC,iBAE1BD,KAAKH,SAAYG,KAAKK,gBAG3BL,KAAKH,QAAQW,iBAAiB,QAAS,kBAAMV,EAAKW,oBAAoB,EACxE,G,EAAC,EAAA3B,IAAA,qBAAAa,MAED,WAAqB,IAAAe,EAAA,KACdV,KAAKK,eAAeH,aAAa,cACpCF,KAAKK,eAAeM,aAAa,WAAY,MAC7CX,KAAKK,eAAeO,UAAUC,IAAI,yBAE7Bb,KAAKc,wBACRd,KAAKK,eAAeG,iBAAiB,OAAQ,kBAC3CE,EAAKK,uBAAuB,GAE9Bf,KAAKc,uBAAwB,IAIjCd,KAAKK,eAAeW,OACtB,GAAC,CAAAlC,IAAA,wBAAAa,MAED,WACEK,KAAKK,eAAeY,gBAAgB,YACpCjB,KAAKK,eAAeO,UAAUM,OAAO,wBACvC,M,6EAAC,CApCkB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/skip-link/skip-link.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class SkipLink {\n linkedElementListener = false;\n\n constructor($module) {\n this.$module = $module;\n this.linkedElementId = $module.getAttribute(\"href\").split(\"#\").pop();\n this.$linkedElement =\n $module &&\n this.linkedElementId &&\n document.getElementById(this.linkedElementId);\n\n if (!this.$module || !this.$linkedElement) {\n return;\n }\n this.$module.addEventListener(\"click\", () => this.focusLinkedElement());\n }\n\n focusLinkedElement() {\n if (!this.$linkedElement.getAttribute(\"tabindex\")) {\n this.$linkedElement.setAttribute(\"tabindex\", \"-1\");\n this.$linkedElement.classList.add(\"tna-!--no-focus-style\");\n\n if (!this.linkedElementListener) {\n this.$linkedElement.addEventListener(\"blur\", () =>\n this.removeFocusProperties(),\n );\n this.linkedElementListener = true;\n }\n }\n\n this.$linkedElement.focus();\n }\n\n removeFocusProperties() {\n this.$linkedElement.removeAttribute(\"tabindex\");\n this.$linkedElement.classList.remove(\"tna-!--no-focus-style\");\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","SkipLink","$module","_this","_classCallCheck","this","linkedElementId","getAttribute","split","pop","$linkedElement","document","getElementById","addEventListener","focusLinkedElement","_this2","setAttribute","classList","add","linkedElementListener","removeFocusProperties","focus","removeAttribute","remove"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,r(n.key),n)}}function r(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}t.r(e),t.d(e,{Tabs:()=>a});var a=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$tabList=e&&e.querySelector(".tna-tabs__list"),this.$tabListItemLinks=e&&this.$tabList&&this.$tabList.querySelectorAll(".tna-tabs__button"),this.$tabItems=e&&e.querySelectorAll(".tna-tabs__item"),this.$module&&this.$tabList&&this.$tabListItemLinks&&this.$tabItems&&this.$tabListItemLinks.length===this.$tabItems.length&&(this.currentTabIndex=0,this.init())},e=[{key:"init",value:function(){var t=this;this.$module.classList.add("tna-tabs--interactive"),this.$tabList.removeAttribute("hidden"),this.$tabListItemLinks.forEach((function(e){var i=e.getAttribute("aria-controls");e.setAttribute("aria-selected",!1);var n=document.getElementById(i);n.setAttribute("aria-labelledby",e.id),n.setAttribute("role","tabpanel"),e.addEventListener("click",(function(e){return t.handleItemLinkClick(e)}),!0)})),this.switchTabByIndex(this.currentTabIndex),this.$module.addEventListener("keydown",(function(e){return t.handleItemLinkKeyDown(e)}))}},{key:"handleItemLinkClick",value:function(t){t.preventDefault();var e=t.currentTarget.getAttribute("aria-controls");this.switchTabByID(e)}},{key:"handleItemLinkKeyDown",value:function(t){var e=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":this.previousTab(),e=!0;break;case"ArrowRight":case"ArrowDown":this.nextTab(),e=!0;break;case"Home":this.switchTabByIndex(0,!0),e=!0;break;case"End":this.switchTabByIndex(this.$tabListItemLinks.length-1,!0),e=!0}e&&(t.stopPropagation(),t.preventDefault())}},{key:"nextTab",value:function(){this.currentTabIndex<this.$tabListItemLinks.length-1?this.switchTabByIndex(this.currentTabIndex+1,!0):this.switchTabByIndex(0,!0)}},{key:"previousTab",value:function(){this.currentTabIndex>=1?this.switchTabByIndex(this.currentTabIndex-1,!0):this.switchTabByIndex(this.$tabListItemLinks.length-1,!0)}},{key:"switchTabByIndex",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.currentTabIndex=t,this.$tabListItemLinks.forEach((function(t,n){n===e.currentTabIndex?(t.setAttribute("aria-selected",!0),t.setAttribute("tabindex","0"),i&&t.focus()):(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"))})),this.$tabItems.forEach((function(t,i){i===e.currentTabIndex?(t.removeAttribute("hidden"),t.setAttribute("tabindex","0")):(t.setAttribute("hidden",""),t.setAttribute("tabindex","-1"))}))}},{key:"switchTabByID",value:function(t){var e=Array.from(this.$tabItems).findIndex((function(e){return e.getAttribute("id")===t}));this.switchTabByIndex(e)}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,r(n.key),n)}}function r(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}t.r(e),t.d(e,{Tabs:()=>a});var a=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$tabList=e&&e.querySelector(".tna-tabs__list"),this.$tabListItemLinks=e&&this.$tabList&&this.$tabList.querySelectorAll(".tna-tabs__button"),this.$tabItems=e&&e.querySelectorAll(".tna-tabs__item"),this.$module&&this.$tabList&&this.$tabListItemLinks&&this.$tabItems&&this.$tabListItemLinks.length===this.$tabItems.length&&(this.currentTabIndex=0,this.init())},e=[{key:"init",value:function(){var t=this;this.$module.classList.add("tna-tabs--interactive"),this.$tabList.removeAttribute("hidden"),this.$tabListItemLinks.forEach(function(e){var i=e.getAttribute("aria-controls");e.setAttribute("aria-selected",!1);var n=document.getElementById(i);n.setAttribute("aria-labelledby",e.id),n.setAttribute("role","tabpanel"),e.addEventListener("click",function(e){return t.handleItemLinkClick(e)},!0)}),this.switchTabByIndex(this.currentTabIndex),this.$module.addEventListener("keydown",function(e){return t.handleItemLinkKeyDown(e)})}},{key:"handleItemLinkClick",value:function(t){t.preventDefault();var e=t.currentTarget.getAttribute("aria-controls");this.switchTabByID(e)}},{key:"handleItemLinkKeyDown",value:function(t){var e=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":this.previousTab(),e=!0;break;case"ArrowRight":case"ArrowDown":this.nextTab(),e=!0;break;case"Home":this.switchTabByIndex(0,!0),e=!0;break;case"End":this.switchTabByIndex(this.$tabListItemLinks.length-1,!0),e=!0}e&&(t.stopPropagation(),t.preventDefault())}},{key:"nextTab",value:function(){this.currentTabIndex<this.$tabListItemLinks.length-1?this.switchTabByIndex(this.currentTabIndex+1,!0):this.switchTabByIndex(0,!0)}},{key:"previousTab",value:function(){this.currentTabIndex>=1?this.switchTabByIndex(this.currentTabIndex-1,!0):this.switchTabByIndex(this.$tabListItemLinks.length-1,!0)}},{key:"switchTabByIndex",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.currentTabIndex=t,this.$tabListItemLinks.forEach(function(t,n){n===e.currentTabIndex?(t.setAttribute("aria-selected",!0),t.setAttribute("tabindex","0"),i&&t.focus()):(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"))}),this.$tabItems.forEach(function(t,i){i===e.currentTabIndex?(t.removeAttribute("hidden"),t.setAttribute("tabindex","0")):(t.setAttribute("hidden",""),t.setAttribute("tabindex","-1"))})}},{key:"switchTabByID",value:function(t){var e=Array.from(this.$tabItems).findIndex(function(e){return e.getAttribute("id")===t});this.switchTabByIndex(e)}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})());
2
2
  //# sourceMappingURL=tabs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/tabs/tabs.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,GAAO,G,ksBCLvD,IAAMC,EAAI,WAsBd,O,EArBD,SAAAA,EAAYC,I,4FAASC,CAAA,KAAAF,GACnBG,KAAKF,QAAUA,EACfE,KAAKC,SAAWH,GAAWA,EAAQI,cAAc,mBACjDF,KAAKG,kBACHL,GACAE,KAAKC,UACLD,KAAKC,SAASG,iBAAiB,qBACjCJ,KAAKK,UAAYP,GAAWA,EAAQM,iBAAiB,mBAGlDJ,KAAKF,SACLE,KAAKC,UACLD,KAAKG,mBACLH,KAAKK,WACNL,KAAKG,kBAAkBG,SAAWN,KAAKK,UAAUC,SAKnDN,KAAKO,gBAAkB,EACvBP,KAAKQ,OACP,E,EAAC,EAAAzB,IAAA,OAAAa,MAED,WAAO,IAAAa,EAAA,KACLT,KAAKF,QAAQY,UAAUC,IAAI,yBAC3BX,KAAKC,SAASW,gBAAgB,UAC9BZ,KAAKG,kBAAkBU,SAAQ,SAACC,GAC9B,IAAMC,EAAaD,EAAiBE,aAAa,iBACjDF,EAAiBG,aAAa,iBAAiB,GAC/C,IAAMC,EAAYC,SAASC,eAAeL,GAC1CG,EAAUD,aAAa,kBAAmBH,EAAiBO,IAC3DH,EAAUD,aAAa,OAAQ,YAC/BH,EAAiBQ,iBACf,SACA,SAACC,GAAC,OAAKd,EAAKe,oBAAoBD,EAAE,IAClC,EAEJ,IACAvB,KAAKyB,iBAAiBzB,KAAKO,iBAC3BP,KAAKF,QAAQwB,iBAAiB,WAAW,SAACC,GAAC,OACzCd,EAAKiB,sBAAsBH,EAAE,GAEjC,GAAC,CAAAxC,IAAA,sBAAAa,MAED,SAAoB+B,GAClBA,EAAmBC,iBACnB,IAAMC,EACJF,EAAmBG,cAAcd,aAAa,iBAChDhB,KAAK+B,cAAcF,EACrB,GAAC,CAAA9C,IAAA,wBAAAa,MAED,SAAsBoC,GACpB,IAAIC,GAA0B,EAC9B,OAAQD,EAAqBjD,KAC3B,IAAK,YACL,IAAK,UACHiB,KAAKkC,cACLD,GAA0B,EAC1B,MACF,IAAK,aACL,IAAK,YACHjC,KAAKmC,UACLF,GAA0B,EAC1B,MACF,IAAK,OACHjC,KAAKyB,iBAAiB,GAAG,GACzBQ,GAA0B,EAC1B,MACF,IAAK,MACHjC,KAAKyB,iBAAiBzB,KAAKG,kBAAkBG,OAAS,GAAG,GACzD2B,GAA0B,EAK1BA,IACFD,EAAqBI,kBACrBJ,EAAqBJ,iBAEzB,GAAC,CAAA7C,IAAA,UAAAa,MAED,WACMI,KAAKO,gBAAkBP,KAAKG,kBAAkBG,OAAS,EACzDN,KAAKyB,iBAAiBzB,KAAKO,gBAAkB,GAAG,GAEhDP,KAAKyB,iBAAiB,GAAG,EAE7B,GAAC,CAAA1C,IAAA,cAAAa,MAED,WACMI,KAAKO,iBAAmB,EAC1BP,KAAKyB,iBAAiBzB,KAAKO,gBAAkB,GAAG,GAEhDP,KAAKyB,iBAAiBzB,KAAKG,kBAAkBG,OAAS,GAAG,EAE7D,GAAC,CAAAvB,IAAA,mBAAAa,MAED,SAAiByC,GAA+B,IAAAC,EAAA,KAArBC,EAAWC,UAAAlC,OAAA,QAAAmC,IAAAD,UAAA,IAAAA,UAAA,GACpCxC,KAAKO,gBAAkB8B,EACvBrC,KAAKG,kBAAkBU,SAAQ,SAACC,EAAkB4B,GAC5CA,IAAUJ,EAAK/B,iBACjBO,EAAiBG,aAAa,iBAAiB,GAC/CH,EAAiBG,aAAa,WAAY,KACtCsB,GACFzB,EAAiB6B,UAGnB7B,EAAiBG,aAAa,iBAAiB,GAC/CH,EAAiBG,aAAa,WAAY,MAE9C,IACAjB,KAAKK,UAAUQ,SAAQ,SAAC+B,EAAUF,GAC5BA,IAAUJ,EAAK/B,iBACjBqC,EAAShC,gBAAgB,UACzBgC,EAAS3B,aAAa,WAAY,OAElC2B,EAAS3B,aAAa,SAAU,IAChC2B,EAAS3B,aAAa,WAAY,MAEtC,GACF,GAAC,CAAAlC,IAAA,gBAAAa,MAED,SAAciD,GACZ,IAAMH,EAAQI,MAAMC,KAAK/C,KAAKK,WAAW2C,WACvC,SAACJ,GAAQ,OAAKA,EAAS5B,aAAa,QAAU6B,CAAQ,IAExD7C,KAAKyB,iBAAiBiB,EACxB,I,gFAAC,CAhIc,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/tabs/tabs.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Tabs {\n constructor($module) {\n this.$module = $module;\n this.$tabList = $module && $module.querySelector(\".tna-tabs__list\");\n this.$tabListItemLinks =\n $module &&\n this.$tabList &&\n this.$tabList.querySelectorAll(\".tna-tabs__button\");\n this.$tabItems = $module && $module.querySelectorAll(\".tna-tabs__item\");\n\n if (\n !this.$module ||\n !this.$tabList ||\n !this.$tabListItemLinks ||\n !this.$tabItems ||\n this.$tabListItemLinks.length !== this.$tabItems.length\n ) {\n return;\n }\n\n this.currentTabIndex = 0;\n this.init();\n }\n\n init() {\n this.$module.classList.add(\"tna-tabs--interactive\");\n this.$tabList.removeAttribute(\"hidden\");\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n const tabPanelID = $tabListItemLink.getAttribute(\"aria-controls\");\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n const $tabPanel = document.getElementById(tabPanelID);\n $tabPanel.setAttribute(\"aria-labelledby\", $tabListItemLink.id);\n $tabPanel.setAttribute(\"role\", \"tabpanel\");\n $tabListItemLink.addEventListener(\n \"click\",\n (e) => this.handleItemLinkClick(e),\n true,\n );\n });\n this.switchTabByIndex(this.currentTabIndex);\n this.$module.addEventListener(\"keydown\", (e) =>\n this.handleItemLinkKeyDown(e),\n );\n }\n\n handleItemLinkClick(itemLinkClickEvent) {\n itemLinkClickEvent.preventDefault();\n const targetItem =\n itemLinkClickEvent.currentTarget.getAttribute(\"aria-controls\");\n this.switchTabByID(targetItem);\n }\n\n handleItemLinkKeyDown(itemLinkKeyDownEvent) {\n let preventDefaultKeyAction = false;\n switch (itemLinkKeyDownEvent.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.previousTab();\n preventDefaultKeyAction = true;\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.nextTab();\n preventDefaultKeyAction = true;\n break;\n case \"Home\":\n this.switchTabByIndex(0, true);\n preventDefaultKeyAction = true;\n break;\n case \"End\":\n this.switchTabByIndex(this.$tabListItemLinks.length - 1, true);\n preventDefaultKeyAction = true;\n break;\n default:\n break;\n }\n if (preventDefaultKeyAction) {\n itemLinkKeyDownEvent.stopPropagation();\n itemLinkKeyDownEvent.preventDefault();\n }\n }\n\n nextTab() {\n if (this.currentTabIndex < this.$tabListItemLinks.length - 1) {\n this.switchTabByIndex(this.currentTabIndex + 1, true);\n } else {\n this.switchTabByIndex(0, true);\n }\n }\n\n previousTab() {\n if (this.currentTabIndex >= 1) {\n this.switchTabByIndex(this.currentTabIndex - 1, true);\n } else {\n this.switchTabByIndex(this.$tabListItemLinks.length - 1, true);\n }\n }\n\n switchTabByIndex(newIndex, switchFocus = false) {\n this.currentTabIndex = newIndex;\n this.$tabListItemLinks.forEach(($tabListItemLink, index) => {\n if (index === this.currentTabIndex) {\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n if (switchFocus) {\n $tabListItemLink.focus();\n }\n } else {\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n $tabListItemLink.setAttribute(\"tabindex\", \"-1\");\n }\n });\n this.$tabItems.forEach(($tabItem, index) => {\n if (index === this.currentTabIndex) {\n $tabItem.removeAttribute(\"hidden\");\n $tabItem.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabItem.setAttribute(\"hidden\", \"\");\n $tabItem.setAttribute(\"tabindex\", \"-1\");\n }\n });\n }\n\n switchTabByID(targetId) {\n const index = Array.from(this.$tabItems).findIndex(\n ($tabItem) => $tabItem.getAttribute(\"id\") === targetId,\n );\n this.switchTabByIndex(index);\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Tabs","$module","_classCallCheck","this","$tabList","querySelector","$tabListItemLinks","querySelectorAll","$tabItems","length","currentTabIndex","init","_this","classList","add","removeAttribute","forEach","$tabListItemLink","tabPanelID","getAttribute","setAttribute","$tabPanel","document","getElementById","id","addEventListener","e","handleItemLinkClick","switchTabByIndex","handleItemLinkKeyDown","itemLinkClickEvent","preventDefault","targetItem","currentTarget","switchTabByID","itemLinkKeyDownEvent","preventDefaultKeyAction","previousTab","nextTab","stopPropagation","newIndex","_this2","switchFocus","arguments","undefined","index","focus","$tabItem","targetId","Array","from","findIndex"],"sourceRoot":""}
1
+ {"version":3,"file":"components/tabs/tabs.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,KAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,M,ksBCLhD,IAAMC,EAAI,WAsBd,O,EArBD,SAAAA,EAAYC,I,4FAASC,CAAA,KAAAF,GACnBG,KAAKF,QAAUA,EACfE,KAAKC,SAAWH,GAAWA,EAAQI,cAAc,mBACjDF,KAAKG,kBACHL,GACAE,KAAKC,UACLD,KAAKC,SAASG,iBAAiB,qBACjCJ,KAAKK,UAAYP,GAAWA,EAAQM,iBAAiB,mBAGlDJ,KAAKF,SACLE,KAAKC,UACLD,KAAKG,mBACLH,KAAKK,WACNL,KAAKG,kBAAkBG,SAAWN,KAAKK,UAAUC,SAKnDN,KAAKO,gBAAkB,EACvBP,KAAKQ,OACP,E,EAAC,EAAAzB,IAAA,OAAAa,MAED,WAAO,IAAAa,EAAA,KACLT,KAAKF,QAAQY,UAAUC,IAAI,yBAC3BX,KAAKC,SAASW,gBAAgB,UAC9BZ,KAAKG,kBAAkBU,QAAQ,SAACC,GAC9B,IAAMC,EAAaD,EAAiBE,aAAa,iBACjDF,EAAiBG,aAAa,iBAAiB,GAC/C,IAAMC,EAAYC,SAASC,eAAeL,GAC1CG,EAAUD,aAAa,kBAAmBH,EAAiBO,IAC3DH,EAAUD,aAAa,OAAQ,YAC/BH,EAAiBQ,iBACf,QACA,SAACC,GAAC,OAAKd,EAAKe,oBAAoBD,EAAE,GAClC,EAEJ,GACAvB,KAAKyB,iBAAiBzB,KAAKO,iBAC3BP,KAAKF,QAAQwB,iBAAiB,UAAW,SAACC,GAAC,OACzCd,EAAKiB,sBAAsBH,EAAE,EAEjC,GAAC,CAAAxC,IAAA,sBAAAa,MAED,SAAoB+B,GAClBA,EAAmBC,iBACnB,IAAMC,EACJF,EAAmBG,cAAcd,aAAa,iBAChDhB,KAAK+B,cAAcF,EACrB,GAAC,CAAA9C,IAAA,wBAAAa,MAED,SAAsBoC,GACpB,IAAIC,GAA0B,EAC9B,OAAQD,EAAqBjD,KAC3B,IAAK,YACL,IAAK,UACHiB,KAAKkC,cACLD,GAA0B,EAC1B,MACF,IAAK,aACL,IAAK,YACHjC,KAAKmC,UACLF,GAA0B,EAC1B,MACF,IAAK,OACHjC,KAAKyB,iBAAiB,GAAG,GACzBQ,GAA0B,EAC1B,MACF,IAAK,MACHjC,KAAKyB,iBAAiBzB,KAAKG,kBAAkBG,OAAS,GAAG,GACzD2B,GAA0B,EAK1BA,IACFD,EAAqBI,kBACrBJ,EAAqBJ,iBAEzB,GAAC,CAAA7C,IAAA,UAAAa,MAED,WACMI,KAAKO,gBAAkBP,KAAKG,kBAAkBG,OAAS,EACzDN,KAAKyB,iBAAiBzB,KAAKO,gBAAkB,GAAG,GAEhDP,KAAKyB,iBAAiB,GAAG,EAE7B,GAAC,CAAA1C,IAAA,cAAAa,MAED,WACMI,KAAKO,iBAAmB,EAC1BP,KAAKyB,iBAAiBzB,KAAKO,gBAAkB,GAAG,GAEhDP,KAAKyB,iBAAiBzB,KAAKG,kBAAkBG,OAAS,GAAG,EAE7D,GAAC,CAAAvB,IAAA,mBAAAa,MAED,SAAiByC,GAA+B,IAAAC,EAAA,KAArBC,EAAWC,UAAAlC,OAAA,QAAAmC,IAAAD,UAAA,IAAAA,UAAA,GACpCxC,KAAKO,gBAAkB8B,EACvBrC,KAAKG,kBAAkBU,QAAQ,SAACC,EAAkB4B,GAC5CA,IAAUJ,EAAK/B,iBACjBO,EAAiBG,aAAa,iBAAiB,GAC/CH,EAAiBG,aAAa,WAAY,KACtCsB,GACFzB,EAAiB6B,UAGnB7B,EAAiBG,aAAa,iBAAiB,GAC/CH,EAAiBG,aAAa,WAAY,MAE9C,GACAjB,KAAKK,UAAUQ,QAAQ,SAAC+B,EAAUF,GAC5BA,IAAUJ,EAAK/B,iBACjBqC,EAAShC,gBAAgB,UACzBgC,EAAS3B,aAAa,WAAY,OAElC2B,EAAS3B,aAAa,SAAU,IAChC2B,EAAS3B,aAAa,WAAY,MAEtC,EACF,GAAC,CAAAlC,IAAA,gBAAAa,MAED,SAAciD,GACZ,IAAMH,EAAQI,MAAMC,KAAK/C,KAAKK,WAAW2C,UACvC,SAACJ,GAAQ,OAAKA,EAAS5B,aAAa,QAAU6B,CAAQ,GAExD7C,KAAKyB,iBAAiBiB,EACxB,I,gFAAC,CAhIc,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/tabs/tabs.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Tabs {\n constructor($module) {\n this.$module = $module;\n this.$tabList = $module && $module.querySelector(\".tna-tabs__list\");\n this.$tabListItemLinks =\n $module &&\n this.$tabList &&\n this.$tabList.querySelectorAll(\".tna-tabs__button\");\n this.$tabItems = $module && $module.querySelectorAll(\".tna-tabs__item\");\n\n if (\n !this.$module ||\n !this.$tabList ||\n !this.$tabListItemLinks ||\n !this.$tabItems ||\n this.$tabListItemLinks.length !== this.$tabItems.length\n ) {\n return;\n }\n\n this.currentTabIndex = 0;\n this.init();\n }\n\n init() {\n this.$module.classList.add(\"tna-tabs--interactive\");\n this.$tabList.removeAttribute(\"hidden\");\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n const tabPanelID = $tabListItemLink.getAttribute(\"aria-controls\");\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n const $tabPanel = document.getElementById(tabPanelID);\n $tabPanel.setAttribute(\"aria-labelledby\", $tabListItemLink.id);\n $tabPanel.setAttribute(\"role\", \"tabpanel\");\n $tabListItemLink.addEventListener(\n \"click\",\n (e) => this.handleItemLinkClick(e),\n true,\n );\n });\n this.switchTabByIndex(this.currentTabIndex);\n this.$module.addEventListener(\"keydown\", (e) =>\n this.handleItemLinkKeyDown(e),\n );\n }\n\n handleItemLinkClick(itemLinkClickEvent) {\n itemLinkClickEvent.preventDefault();\n const targetItem =\n itemLinkClickEvent.currentTarget.getAttribute(\"aria-controls\");\n this.switchTabByID(targetItem);\n }\n\n handleItemLinkKeyDown(itemLinkKeyDownEvent) {\n let preventDefaultKeyAction = false;\n switch (itemLinkKeyDownEvent.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.previousTab();\n preventDefaultKeyAction = true;\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.nextTab();\n preventDefaultKeyAction = true;\n break;\n case \"Home\":\n this.switchTabByIndex(0, true);\n preventDefaultKeyAction = true;\n break;\n case \"End\":\n this.switchTabByIndex(this.$tabListItemLinks.length - 1, true);\n preventDefaultKeyAction = true;\n break;\n default:\n break;\n }\n if (preventDefaultKeyAction) {\n itemLinkKeyDownEvent.stopPropagation();\n itemLinkKeyDownEvent.preventDefault();\n }\n }\n\n nextTab() {\n if (this.currentTabIndex < this.$tabListItemLinks.length - 1) {\n this.switchTabByIndex(this.currentTabIndex + 1, true);\n } else {\n this.switchTabByIndex(0, true);\n }\n }\n\n previousTab() {\n if (this.currentTabIndex >= 1) {\n this.switchTabByIndex(this.currentTabIndex - 1, true);\n } else {\n this.switchTabByIndex(this.$tabListItemLinks.length - 1, true);\n }\n }\n\n switchTabByIndex(newIndex, switchFocus = false) {\n this.currentTabIndex = newIndex;\n this.$tabListItemLinks.forEach(($tabListItemLink, index) => {\n if (index === this.currentTabIndex) {\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n if (switchFocus) {\n $tabListItemLink.focus();\n }\n } else {\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n $tabListItemLink.setAttribute(\"tabindex\", \"-1\");\n }\n });\n this.$tabItems.forEach(($tabItem, index) => {\n if (index === this.currentTabIndex) {\n $tabItem.removeAttribute(\"hidden\");\n $tabItem.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabItem.setAttribute(\"hidden\", \"\");\n $tabItem.setAttribute(\"tabindex\", \"-1\");\n }\n });\n }\n\n switchTabByID(targetId) {\n const index = Array.from(this.$tabItems).findIndex(\n ($tabItem) => $tabItem.getAttribute(\"id\") === targetId,\n );\n this.switchTabByIndex(index);\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Tabs","$module","_classCallCheck","this","$tabList","querySelector","$tabListItemLinks","querySelectorAll","$tabItems","length","currentTabIndex","init","_this","classList","add","removeAttribute","forEach","$tabListItemLink","tabPanelID","getAttribute","setAttribute","$tabPanel","document","getElementById","id","addEventListener","e","handleItemLinkClick","switchTabByIndex","handleItemLinkKeyDown","itemLinkClickEvent","preventDefault","targetItem","currentTarget","switchTabByID","itemLinkKeyDownEvent","preventDefaultKeyAction","previousTab","nextTab","stopPropagation","newIndex","_this2","switchFocus","arguments","undefined","index","focus","$tabItem","targetId","Array","from","findIndex"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={d:(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function n(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function s(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}t.r(e),t.d(e,{TextInput:()=>r});var r=function(){return t=function t(e){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$input=e&&e.querySelector(".tna-text-input"),this.$module&&this.$input&&"password"===this.$input.getAttribute("type")&&(this.$textInputWrapper=document.createElement("div"),this.$textInputWrapper.classList.add("tna-text-input-wrapper"),this.$textInputPasswordToggle=document.createElement("button"),this.$textInputPasswordToggle.setAttribute("type","button"),this.$textInputPasswordToggle.classList.add("tna-button","tna-button--small","tna-button--icon-only"),this.$textInputPasswordToggle.setAttribute("aria-controls",this.$input.id),this.updateTogglePasswordButtonText(),this.$textInputWrapper.appendChild(this.$input),this.$textInputWrapper.appendChild(this.$textInputPasswordToggle),this.$module.appendChild(this.$textInputWrapper),this.$textInputPasswordToggle.addEventListener("click",(function(){o.togglePasswordType(),o.$input.focus()})))},(e=[{key:"togglePasswordType",value:function(){"password"===this.$input.getAttribute("type")?this.$input.setAttribute("type","text"):this.$input.setAttribute("type","password"),this.updateTogglePasswordButtonText()}},{key:"updateTogglePasswordButtonText",value:function(){"password"===this.$input.getAttribute("type")?(this.$textInputPasswordToggle.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" height="16" aria-hidden="true" focusable="false">\x3c!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--\x3e<path d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"/></svg>Show password',this.$textInputPasswordToggle.setAttribute("title","Show password"),this.$textInputPasswordToggle.setAttribute("aria-label","Show password")):(this.$textInputPasswordToggle.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" height="16" aria-hidden="true" focusable="false">\x3c!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--\x3e<path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"/></svg></i>Hide password',this.$textInputPasswordToggle.setAttribute("title","Hide password"),this.$textInputPasswordToggle.setAttribute("aria-label","Hide password"))}}])&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,()=>(()=>{"use strict";var t={d:(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function n(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function s(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}t.r(e),t.d(e,{TextInput:()=>r});var r=function(){return t=function t(e){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$input=e&&e.querySelector(".tna-text-input"),this.$module&&this.$input&&"password"===this.$input.getAttribute("type")&&(this.$textInputWrapper=document.createElement("div"),this.$textInputWrapper.classList.add("tna-text-input-wrapper"),this.$textInputPasswordToggle=document.createElement("button"),this.$textInputPasswordToggle.setAttribute("type","button"),this.$textInputPasswordToggle.classList.add("tna-button","tna-button--small","tna-button--icon-only"),this.$textInputPasswordToggle.setAttribute("aria-controls",this.$input.id),this.updateTogglePasswordButtonText(),this.$textInputWrapper.appendChild(this.$input),this.$textInputWrapper.appendChild(this.$textInputPasswordToggle),this.$module.appendChild(this.$textInputWrapper),this.$textInputPasswordToggle.addEventListener("click",function(){o.togglePasswordType(),o.$input.focus()}))},(e=[{key:"togglePasswordType",value:function(){"password"===this.$input.getAttribute("type")?this.$input.setAttribute("type","text"):this.$input.setAttribute("type","password"),this.updateTogglePasswordButtonText()}},{key:"updateTogglePasswordButtonText",value:function(){"password"===this.$input.getAttribute("type")?(this.$textInputPasswordToggle.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" height="16" aria-hidden="true" focusable="false">\x3c!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--\x3e<path d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"/></svg>Show password',this.$textInputPasswordToggle.setAttribute("title","Show password"),this.$textInputPasswordToggle.setAttribute("aria-label","Show password")):(this.$textInputPasswordToggle.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" height="16" aria-hidden="true" focusable="false">\x3c!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--\x3e<path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"/></svg></i>Hide password',this.$textInputPasswordToggle.setAttribute("title","Hide password"),this.$textInputPasswordToggle.setAttribute("aria-label","Hide password"))}}])&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})());
2
2
  //# sourceMappingURL=text-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/text-input/text-input.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,GAAO,G,usBCLvD,IAAMC,EAAS,WAmCnB,O,EAlCD,SAAAA,EAAYC,GAAS,IAAAC,EAAA,M,4FAAAC,CAAA,KAAAH,GACnBI,KAAKH,QAAUA,EACfG,KAAKC,OAASJ,GAAWA,EAAQK,cAAc,mBAE1CF,KAAKH,SAAYG,KAAKC,QAIc,aAArCD,KAAKC,OAAOE,aAAa,UAC3BH,KAAKI,kBAAoBC,SAASC,cAAc,OAChDN,KAAKI,kBAAkBG,UAAUC,IAAI,0BAErCR,KAAKS,yBAA2BJ,SAASC,cAAc,UACvDN,KAAKS,yBAAyBC,aAAa,OAAQ,UACnDV,KAAKS,yBAAyBF,UAAUC,IACtC,aACA,oBACA,yBAEFR,KAAKS,yBAAyBC,aAC5B,gBACAV,KAAKC,OAAOU,IAEdX,KAAKY,iCAELZ,KAAKI,kBAAkBS,YAAYb,KAAKC,QACxCD,KAAKI,kBAAkBS,YAAYb,KAAKS,0BACxCT,KAAKH,QAAQgB,YAAYb,KAAKI,mBAE9BJ,KAAKS,yBAAyBK,iBAAiB,SAAS,WACtDhB,EAAKiB,qBACLjB,EAAKG,OAAOe,OACd,IAEJ,G,EAAC,EAAAlC,IAAA,qBAAAa,MAED,WAC2C,aAArCK,KAAKC,OAAOE,aAAa,QAC3BH,KAAKC,OAAOS,aAAa,OAAQ,QAEjCV,KAAKC,OAAOS,aAAa,OAAQ,YAEnCV,KAAKY,gCACP,GAAC,CAAA9B,IAAA,iCAAAa,MAED,WAC2C,aAArCK,KAAKC,OAAOE,aAAa,SAC3BH,KAAKS,yBAAyBQ,UAAY,02BAC1CjB,KAAKS,yBAAyBC,aAAa,QAAS,iBACpDV,KAAKS,yBAAyBC,aAAa,aAAc,mBAEzDV,KAAKS,yBAAyBQ,UAAY,mjCAC1CjB,KAAKS,yBAAyBC,aAAa,QAAS,iBACpDV,KAAKS,yBAAyBC,aAAa,aAAc,iBAE7D,M,6EAAC,CAxDmB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/text-input/text-input.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class TextInput {\n constructor($module) {\n this.$module = $module;\n this.$input = $module && $module.querySelector(\".tna-text-input\");\n\n if (!this.$module || !this.$input) {\n return;\n }\n\n if (this.$input.getAttribute(\"type\") === \"password\") {\n this.$textInputWrapper = document.createElement(\"div\");\n this.$textInputWrapper.classList.add(\"tna-text-input-wrapper\");\n\n this.$textInputPasswordToggle = document.createElement(\"button\");\n this.$textInputPasswordToggle.setAttribute(\"type\", \"button\");\n this.$textInputPasswordToggle.classList.add(\n \"tna-button\",\n \"tna-button--small\",\n \"tna-button--icon-only\",\n );\n this.$textInputPasswordToggle.setAttribute(\n \"aria-controls\",\n this.$input.id,\n );\n this.updateTogglePasswordButtonText();\n\n this.$textInputWrapper.appendChild(this.$input);\n this.$textInputWrapper.appendChild(this.$textInputPasswordToggle);\n this.$module.appendChild(this.$textInputWrapper);\n\n this.$textInputPasswordToggle.addEventListener(\"click\", () => {\n this.togglePasswordType();\n this.$input.focus();\n });\n }\n }\n\n togglePasswordType() {\n if (this.$input.getAttribute(\"type\") === \"password\") {\n this.$input.setAttribute(\"type\", \"text\");\n } else {\n this.$input.setAttribute(\"type\", \"password\");\n }\n this.updateTogglePasswordButtonText();\n }\n\n updateTogglePasswordButtonText() {\n if (this.$input.getAttribute(\"type\") === \"password\") {\n this.$textInputPasswordToggle.innerHTML = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\" height=\"16\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z\"/></svg>Show password`;\n this.$textInputPasswordToggle.setAttribute(\"title\", \"Show password\");\n this.$textInputPasswordToggle.setAttribute(\"aria-label\", \"Show password\");\n } else {\n this.$textInputPasswordToggle.innerHTML = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\" height=\"16\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z\"/></svg></i>Hide password`;\n this.$textInputPasswordToggle.setAttribute(\"title\", \"Hide password\");\n this.$textInputPasswordToggle.setAttribute(\"aria-label\", \"Hide password\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","TextInput","$module","_this","_classCallCheck","this","$input","querySelector","getAttribute","$textInputWrapper","document","createElement","classList","add","$textInputPasswordToggle","setAttribute","id","updateTogglePasswordButtonText","appendChild","addEventListener","togglePasswordType","focus","innerHTML"],"sourceRoot":""}
1
+ {"version":3,"file":"components/text-input/text-input.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,KAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,M,usBCLhD,IAAMC,EAAS,WAmCnB,O,EAlCD,SAAAA,EAAYC,GAAS,IAAAC,EAAA,M,4FAAAC,CAAA,KAAAH,GACnBI,KAAKH,QAAUA,EACfG,KAAKC,OAASJ,GAAWA,EAAQK,cAAc,mBAE1CF,KAAKH,SAAYG,KAAKC,QAIc,aAArCD,KAAKC,OAAOE,aAAa,UAC3BH,KAAKI,kBAAoBC,SAASC,cAAc,OAChDN,KAAKI,kBAAkBG,UAAUC,IAAI,0BAErCR,KAAKS,yBAA2BJ,SAASC,cAAc,UACvDN,KAAKS,yBAAyBC,aAAa,OAAQ,UACnDV,KAAKS,yBAAyBF,UAAUC,IACtC,aACA,oBACA,yBAEFR,KAAKS,yBAAyBC,aAC5B,gBACAV,KAAKC,OAAOU,IAEdX,KAAKY,iCAELZ,KAAKI,kBAAkBS,YAAYb,KAAKC,QACxCD,KAAKI,kBAAkBS,YAAYb,KAAKS,0BACxCT,KAAKH,QAAQgB,YAAYb,KAAKI,mBAE9BJ,KAAKS,yBAAyBK,iBAAiB,QAAS,WACtDhB,EAAKiB,qBACLjB,EAAKG,OAAOe,OACd,GAEJ,G,EAAC,EAAAlC,IAAA,qBAAAa,MAED,WAC2C,aAArCK,KAAKC,OAAOE,aAAa,QAC3BH,KAAKC,OAAOS,aAAa,OAAQ,QAEjCV,KAAKC,OAAOS,aAAa,OAAQ,YAEnCV,KAAKY,gCACP,GAAC,CAAA9B,IAAA,iCAAAa,MAED,WAC2C,aAArCK,KAAKC,OAAOE,aAAa,SAC3BH,KAAKS,yBAAyBQ,UAAY,02BAC1CjB,KAAKS,yBAAyBC,aAAa,QAAS,iBACpDV,KAAKS,yBAAyBC,aAAa,aAAc,mBAEzDV,KAAKS,yBAAyBQ,UAAY,mjCAC1CjB,KAAKS,yBAAyBC,aAAa,QAAS,iBACpDV,KAAKS,yBAAyBC,aAAa,aAAc,iBAE7D,M,6EAAC,CAxDmB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/text-input/text-input.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class TextInput {\n constructor($module) {\n this.$module = $module;\n this.$input = $module && $module.querySelector(\".tna-text-input\");\n\n if (!this.$module || !this.$input) {\n return;\n }\n\n if (this.$input.getAttribute(\"type\") === \"password\") {\n this.$textInputWrapper = document.createElement(\"div\");\n this.$textInputWrapper.classList.add(\"tna-text-input-wrapper\");\n\n this.$textInputPasswordToggle = document.createElement(\"button\");\n this.$textInputPasswordToggle.setAttribute(\"type\", \"button\");\n this.$textInputPasswordToggle.classList.add(\n \"tna-button\",\n \"tna-button--small\",\n \"tna-button--icon-only\",\n );\n this.$textInputPasswordToggle.setAttribute(\n \"aria-controls\",\n this.$input.id,\n );\n this.updateTogglePasswordButtonText();\n\n this.$textInputWrapper.appendChild(this.$input);\n this.$textInputWrapper.appendChild(this.$textInputPasswordToggle);\n this.$module.appendChild(this.$textInputWrapper);\n\n this.$textInputPasswordToggle.addEventListener(\"click\", () => {\n this.togglePasswordType();\n this.$input.focus();\n });\n }\n }\n\n togglePasswordType() {\n if (this.$input.getAttribute(\"type\") === \"password\") {\n this.$input.setAttribute(\"type\", \"text\");\n } else {\n this.$input.setAttribute(\"type\", \"password\");\n }\n this.updateTogglePasswordButtonText();\n }\n\n updateTogglePasswordButtonText() {\n if (this.$input.getAttribute(\"type\") === \"password\") {\n this.$textInputPasswordToggle.innerHTML = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\" height=\"16\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z\"/></svg>Show password`;\n this.$textInputPasswordToggle.setAttribute(\"title\", \"Show password\");\n this.$textInputPasswordToggle.setAttribute(\"aria-label\", \"Show password\");\n } else {\n this.$textInputPasswordToggle.innerHTML = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\" height=\"16\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z\"/></svg></i>Hide password`;\n this.$textInputPasswordToggle.setAttribute(\"title\", \"Hide password\");\n this.$textInputPasswordToggle.setAttribute(\"aria-label\", \"Hide password\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","TextInput","$module","_this","_classCallCheck","this","$input","querySelector","getAttribute","$textInputWrapper","document","createElement","classList","add","$textInputPasswordToggle","setAttribute","id","updateTogglePasswordButtonText","appendChild","addEventListener","togglePasswordType","focus","innerHTML"],"sourceRoot":""}