@nationalarchives/frontend 0.8.0 → 0.8.1

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.
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/accordion/accordion.scss","../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss"],"names":[],"mappings":"CAUA,oCACE,gBAEA,4DACE,aCDF,wBACE,iBAGF,qBACE,iBAIF,wBCkDI,+DD/CF,kBACA,UAEA,oCC4CE,4DDrCJ,sHAEE,UAGF,wBACE,WACA,SACA,0BAGA,cAEA,kBAEA,oBACA,gBAEA,gBAEA,yBAEA,YACA,mBAEA,eCTF,qCC7CA,mBAqBA,YCIA,qBDHA,kBACA,yBACA,mCAPA,YCYsB,IH+BpB,0BACE,kBAGF,gCACE,WAEA,QACA,SAEA,kBACA,gCACA,aAEA,2CACA,kEACA,mBAGF,oEEvBF,0BACA,0BCpCsC,MF4BtC,4DDmCI,oFACE,0DAKF,oDACE,2CAIJ,+BACE,UAIJ,wBACE,aAEA,kBAEA,mBAQA,gEACE,gBACA,eAGF,2CACE,gBACA,eAEA,OAGF,mCACE,wBACA,kBACA,iBAEA,4CACE,cACA,oBAEA,kBACA,oBACA,gBACA,iBC2TN,8BDpTI,gCACE,YAEA,WACA,YAEA,sBAEA,iBAEA,YAIA,oDACE,YAEA","file":"accordion.css","sourcesContent":["@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n@function space($size) {\n @return #{$size * spacing.$spacing-unit-px}px;\n}\n\n%space-above {\n margin-top: space(2);\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../../tools/colour\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-accordion {\n @include spacing.space-above;\n\n // NON INTERACTIVE\n &__item {\n @include spacing.space-above;\n }\n\n &__heading {\n padding-top: spacing.space(1);\n }\n\n &__body {\n padding-top: spacing.space(1);\n }\n\n // INTERACTIVE\n &__details {\n @include colour.colour-border(\"keyline\", 1px, solid, bottom);\n\n position: relative;\n z-index: 1;\n\n &:first-child {\n @include colour.colour-border(\"keyline\", 1px, solid, top);\n // @include colour.thick-keyline-dark(top);\n // @include colour.thick-keyline-accent(top);\n }\n }\n\n &__details:has(&__summary:focus),\n &__details:has(&__content:focus) {\n z-index: 2;\n }\n\n &__summary {\n width: 100%;\n margin: 0;\n padding: spacing.space(0.5) spacing.space(3) spacing.space(0.5)\n spacing.space(1);\n\n display: block;\n\n position: relative;\n\n line-height: inherit;\n text-align: left;\n\n list-style: none;\n\n background: transparent;\n\n border: none;\n border-radius: 0.1px;\n\n cursor: pointer;\n\n @include colour.colour-font(\"font-dark\");\n @include typography.font-size(18);\n @include typography.main-font(true);\n\n * {\n font-size: inherit;\n }\n\n &::before {\n content: \"\";\n\n width: 0;\n height: 0;\n\n position: absolute;\n top: calc(50% - #{math.div(math.sqrt(3), 4)}rem);\n right: 0.75rem;\n\n border-width: #{math.div(math.sqrt(3), 2)}rem 0.5rem 0 0.5rem;\n border-color: colour.colour-var(\"font-light\") transparent;\n border-style: solid;\n }\n\n &:hover,\n &:focus-visible {\n @include typography.interacted-text-decoration;\n @include colour.colour-background(\"background-tint\");\n\n &::before {\n border-color: colour.colour-var(\"font-dark\") transparent;\n }\n }\n\n &[aria-expanded=\"true\"] {\n &::before {\n border-width: 0 0.5rem #{math.div(math.sqrt(3), 2)}rem 0.5rem;\n }\n }\n\n &:active {\n z-index: 1;\n }\n }\n\n &__content {\n padding: spacing.space(1);\n\n position: relative;\n\n border-radius: 0.1px;\n\n // &:focus {\n // z-index: 2;\n\n // @include a11y.no-focus-outline-on-click;\n // }\n\n &:has(.tna-table-wrapper):has(.tna-table) {\n padding-right: 0;\n padding-left: 0;\n }\n\n .tna-table-wrapper {\n padding-right: 0;\n padding-left: 0;\n\n left: 0;\n }\n\n .tna-table {\n width: calc(100% - #{spacing.space(2)});\n margin-right: spacing.space(1);\n margin-left: spacing.space(1);\n\n &__caption {\n padding-top: 0;\n padding-bottom: spacing.space(1);\n\n font-size: inherit;\n line-height: inherit;\n text-align: left;\n caption-side: top;\n }\n }\n }\n\n @include colour.on-forced-colours {\n &__summary {\n &::before {\n content: \"\\2193\";\n\n width: auto;\n height: auto;\n\n top: calc(50% - 0.5rem);\n\n line-height: 1rem;\n\n border: none;\n }\n\n &[aria-expanded=\"true\"] {\n &::before {\n content: \"\\2191\";\n\n border: none;\n }\n }\n }\n }\n}\n","@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n@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 }\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 }\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 }\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 }\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: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"keyline\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"keyline\", borders.$thick-border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"keyline-dark\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"keyline-dark\", borders.$thick-border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"accent-border\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"accent-border\", borders.$thick-border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\n \"form-error-border\",\n borders.$thick-border-width,\n solid\n );\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour) {\n @if $direction != \"\" {\n border-#{$direction}: borders.$thick-border-width\n #{brand-colour($brandColour)}\n solid;\n } @else {\n border: borders.$thick-border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\") {\n @if $direction != \"\" {\n border-#{$direction}: borders.$thick-border-width transparent solid;\n } @else {\n border: borders.$thick-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%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n\n // @include colour-font(\"font-base\");\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.45)} !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.45)} !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 rgba(0 0 0 / 25%),\n rgba(255 255 255 / 25%),\n rgba(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: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 interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\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","/*\n * ------------------------------------------\n * The typefaces, sizes and spacings that are\n * defined in this file have been selected to\n * ensure 100% match with the latest National\n * Archives brand guidelines - avoid changing\n * or overwriting any of these values without\n * signing off with the Digital Services team\n * first\n * ------------------------------------------\n */\n\n$relative-1rem-px: 16; // 16px = 1rem\n\n/*\n * ------------------------------------------\n * When true, use the included font files for\n * Open Sans and Roboto Mono, rather than the\n * versions hosted by Google Fonts\n * ------------------------------------------\n */\n$use-local-fonts: false !default;\n\n$body-font-size-px: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: 1.75 !default;\n\n$interactive-text-decoration-thickness: 3.5px !default;\n\n$main-font-family-name: \"Open Sans\" !default;\n$main-font-family:\n #{$main-font-family-name},\n sans-serif;\n$main-font-weight: 400 !default;\n$main-font-weight-medium: 600 !default;\n$main-font-weight-bold: 700 !default;\n$main-font-file: \"OpenSans-Regular.ttf\" !default;\n$main-font-file-medium: \"OpenSans-SemiBold.ttf\" !default;\n$main-font-file-bold: \"OpenSans-Bold.ttf\" !default;\n\n/*\n * ------------------------------------------\n * To use Supria Sans Condensed (which is the\n * approved heading typeface for The National\n * Archives), you need to obtain a licence to\n * properly embed the CSS files with the font\n * definitions in your service - check with a\n * member of the Digital Services team on how\n * to get a licence\n * ------------------------------------------\n */\n$heading-font-family-name: \"supria-sans-condensed\" !default;\n$heading-font-family:\n #{$heading-font-family-name},\n \"Arial Narrow\",\n sans-serif;\n$heading-font-weight: 500 !default;\n\n/*\n * ------------------------------------------\n * The detail font should be a monospace font\n * and is used for chips, supertitles as well\n * as the date search component\n * ------------------------------------------\n */\n$detail-font-family-name: \"Roboto Mono\" !default;\n$detail-font-family:\n #{$detail-font-family-name},\n monospace;\n$detail-font-weight: 400 !default;\n$detail-font-weight-bold: 500 !default;\n$detail-font-file: \"RobotoMono-Regular.ttf\" !default;\n$detail-font-file-bold: \"RobotoMono-Medium.ttf\" !default;\n\n$heading-xl-font-size-default: 64 !default;\n$heading-xl-font-size-medium: 48 !default;\n$heading-xl-font-size-small: 36 !default;\n$heading-xl-font-size-tiny: $heading-xl-font-size-small !default;\n$heading-xl-line-height: 1.1 !default;\n\n$heading-l-font-size-default: 36 !default;\n$heading-l-font-size-medium: 30 !default;\n$heading-l-font-size-small: 28 !default;\n$heading-l-font-size-tiny: 25 !default;\n$heading-l-line-height: 1.3 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: 21 !default;\n$heading-m-font-size-small: 20 !default;\n$heading-m-font-size-tiny: 19 !default;\n$heading-m-line-height: 1.6 !default;\n\n$heading-s-font-size-default: 18 !default;\n$heading-s-font-size-medium: $heading-s-font-size-default !default;\n$heading-s-font-size-small: $heading-s-font-size-default !default;\n$heading-s-font-size-tiny: $heading-s-font-size-default !default;\n$heading-s-line-height: 1.6 !default;\n"]}
1
+ {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/accordion/accordion.scss","../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss"],"names":[],"mappings":"CAUA,oCACE,gBAEA,4DACE,aCDF,wBACE,iBAGF,qBACE,iBAIF,wBCkDI,+DD/CF,kBACA,UAEA,oCC4CE,4DDrCJ,sHAEE,UAGF,wBACE,WACA,SACA,0BAGA,cAEA,kBAEA,oBACA,gBAEA,gBAEA,yBAEA,YACA,mBAEA,eCTF,qCC7CA,mBAqBA,YCIA,qBDHA,kBACA,yBACA,mCAPA,YCYsB,IH+BpB,0BACE,kBAGF,gCACE,WAEA,QACA,SAEA,kBACA,gCACA,aAEA,2CACA,kEACA,mBAGF,oEEvBF,0BACA,0BCpCsC,MF4BtC,4DDmCI,oFACE,0DAKF,oDACE,2CAIJ,+BACE,UAMF,mFACE,gBACA,eAEA,OAIJ,wBACE,aAEA,kBAEA,mBAQA,gEACE,gBACA,eAGF,mCACE,wBACA,kBACA,iBAEA,4CACE,cACA,oBAEA,kBACA,oBACA,gBACA,iBCwTN,8BDjTI,gCACE,YAEA,WACA,YAEA,sBAEA,iBAEA,YAIA,oDACE,YAEA","file":"accordion.css","sourcesContent":["@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n@function space($size) {\n @return #{$size * spacing.$spacing-unit-px}px;\n}\n\n%space-above {\n margin-top: space(2);\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../../tools/colour\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-accordion {\n @include spacing.space-above;\n\n // NON INTERACTIVE\n &__item {\n @include spacing.space-above;\n }\n\n &__heading {\n padding-top: spacing.space(1);\n }\n\n &__body {\n padding-top: spacing.space(1);\n }\n\n // INTERACTIVE\n &__details {\n @include colour.colour-border(\"keyline\", 1px, solid, bottom);\n\n position: relative;\n z-index: 1;\n\n &:first-child {\n @include colour.colour-border(\"keyline\", 1px, solid, top);\n // @include colour.thick-keyline-dark(top);\n // @include colour.thick-keyline-accent(top);\n }\n }\n\n &__details:has(&__summary:focus),\n &__details:has(&__content:focus) {\n z-index: 2;\n }\n\n &__summary {\n width: 100%;\n margin: 0;\n padding: spacing.space(0.5) spacing.space(3) spacing.space(0.5)\n spacing.space(1);\n\n display: block;\n\n position: relative;\n\n line-height: inherit;\n text-align: left;\n\n list-style: none;\n\n background: transparent;\n\n border: none;\n border-radius: 0.1px;\n\n cursor: pointer;\n\n @include colour.colour-font(\"font-dark\");\n @include typography.font-size(18);\n @include typography.main-font(true);\n\n * {\n font-size: inherit;\n }\n\n &::before {\n content: \"\";\n\n width: 0;\n height: 0;\n\n position: absolute;\n top: calc(50% - #{math.div(math.sqrt(3), 4)}rem);\n right: 0.75rem;\n\n border-width: #{math.div(math.sqrt(3), 2)}rem 0.5rem 0 0.5rem;\n border-color: colour.colour-var(\"font-light\") transparent;\n border-style: solid;\n }\n\n &:hover,\n &:focus-visible {\n @include typography.interacted-text-decoration;\n @include colour.colour-background(\"background-tint\");\n\n &::before {\n border-color: colour.colour-var(\"font-dark\") transparent;\n }\n }\n\n &[aria-expanded=\"true\"] {\n &::before {\n border-width: 0 0.5rem #{math.div(math.sqrt(3), 2)}rem 0.5rem;\n }\n }\n\n &:active {\n z-index: 1;\n }\n }\n\n &__body,\n &__content {\n .tna-table-wrapper {\n padding-right: 0;\n padding-left: 0;\n\n left: 0;\n }\n }\n\n &__content {\n padding: spacing.space(1);\n\n position: relative;\n\n border-radius: 0.1px;\n\n // &:focus {\n // z-index: 2;\n\n // @include a11y.no-focus-outline-on-click;\n // }\n\n &:has(.tna-table-wrapper):has(.tna-table) {\n padding-right: 0;\n padding-left: 0;\n }\n\n .tna-table {\n width: calc(100% - #{spacing.space(2)});\n margin-right: spacing.space(1);\n margin-left: spacing.space(1);\n\n &__caption {\n padding-top: 0;\n padding-bottom: spacing.space(1);\n\n font-size: inherit;\n line-height: inherit;\n text-align: left;\n caption-side: top;\n }\n }\n }\n\n @include colour.on-forced-colours {\n &__summary {\n &::before {\n content: \"\\2193\";\n\n width: auto;\n height: auto;\n\n top: calc(50% - 0.5rem);\n\n line-height: 1rem;\n\n border: none;\n }\n\n &[aria-expanded=\"true\"] {\n &::before {\n content: \"\\2191\";\n\n border: none;\n }\n }\n }\n }\n}\n","@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n@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 }\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 }\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 }\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 }\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: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"keyline\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"keyline\", borders.$thick-border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"keyline-dark\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"keyline-dark\", borders.$thick-border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"accent-border\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"accent-border\", borders.$thick-border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\n \"form-error-border\",\n borders.$thick-border-width,\n solid\n );\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour) {\n @if $direction != \"\" {\n border-#{$direction}: borders.$thick-border-width\n #{brand-colour($brandColour)}\n solid;\n } @else {\n border: borders.$thick-border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\") {\n @if $direction != \"\" {\n border-#{$direction}: borders.$thick-border-width transparent solid;\n } @else {\n border: borders.$thick-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%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n\n // @include colour-font(\"font-base\");\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.45)} !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.45)} !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 rgba(0 0 0 / 25%),\n rgba(255 255 255 / 25%),\n rgba(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: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 interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\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","/*\n * ------------------------------------------\n * The typefaces, sizes and spacings that are\n * defined in this file have been selected to\n * ensure 100% match with the latest National\n * Archives brand guidelines - avoid changing\n * or overwriting any of these values without\n * signing off with the Digital Services team\n * first\n * ------------------------------------------\n */\n\n$relative-1rem-px: 16; // 16px = 1rem\n\n/*\n * ------------------------------------------\n * When true, use the included font files for\n * Open Sans and Roboto Mono, rather than the\n * versions hosted by Google Fonts\n * ------------------------------------------\n */\n$use-local-fonts: false !default;\n\n$body-font-size-px: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: 1.75 !default;\n\n$interactive-text-decoration-thickness: 3.5px !default;\n\n$main-font-family-name: \"Open Sans\" !default;\n$main-font-family:\n #{$main-font-family-name},\n sans-serif;\n$main-font-weight: 400 !default;\n$main-font-weight-medium: 600 !default;\n$main-font-weight-bold: 700 !default;\n$main-font-file: \"OpenSans-Regular.ttf\" !default;\n$main-font-file-medium: \"OpenSans-SemiBold.ttf\" !default;\n$main-font-file-bold: \"OpenSans-Bold.ttf\" !default;\n\n/*\n * ------------------------------------------\n * To use Supria Sans Condensed (which is the\n * approved heading typeface for The National\n * Archives), you need to obtain a licence to\n * properly embed the CSS files with the font\n * definitions in your service - check with a\n * member of the Digital Services team on how\n * to get a licence\n * ------------------------------------------\n */\n$heading-font-family-name: \"supria-sans-condensed\" !default;\n$heading-font-family:\n #{$heading-font-family-name},\n \"Arial Narrow\",\n sans-serif;\n$heading-font-weight: 500 !default;\n\n/*\n * ------------------------------------------\n * The detail font should be a monospace font\n * and is used for chips, supertitles as well\n * as the date search component\n * ------------------------------------------\n */\n$detail-font-family-name: \"Roboto Mono\" !default;\n$detail-font-family:\n #{$detail-font-family-name},\n monospace;\n$detail-font-weight: 400 !default;\n$detail-font-weight-bold: 500 !default;\n$detail-font-file: \"RobotoMono-Regular.ttf\" !default;\n$detail-font-file-bold: \"RobotoMono-Medium.ttf\" !default;\n\n$heading-xl-font-size-default: 64 !default;\n$heading-xl-font-size-medium: 48 !default;\n$heading-xl-font-size-small: 36 !default;\n$heading-xl-font-size-tiny: $heading-xl-font-size-small !default;\n$heading-xl-line-height: 1.1 !default;\n\n$heading-l-font-size-default: 36 !default;\n$heading-l-font-size-medium: 30 !default;\n$heading-l-font-size-small: 28 !default;\n$heading-l-font-size-tiny: 25 !default;\n$heading-l-line-height: 1.3 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: 21 !default;\n$heading-m-font-size-small: 20 !default;\n$heading-m-font-size-tiny: 19 !default;\n$heading-m-line-height: 1.6 !default;\n\n$heading-s-font-size-default: 18 !default;\n$heading-s-font-size-medium: $heading-s-font-size-default !default;\n$heading-s-font-size-small: $heading-s-font-size-default !default;\n$heading-s-font-size-tiny: $heading-s-font-size-default !default;\n$heading-s-line-height: 1.6 !default;\n"]}
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("TNAFrontend",[],t):"object"==typeof exports?exports.TNAFrontend=t():e.TNAFrontend=t()}(self,(()=>(()=>{"use strict";var e={d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},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 r(e){return r="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},r(e)}function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n(o.key),o)}}function n(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}e.r(t),e.d(t,{Accordion:()=>i});var i=function(){return e=function e(t){var r,o,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=this,(o=n(o="polyfillRequired"))in r?Object.defineProperty(r,o,{value:null,enumerable:!0,configurable:!0,writable:!0}):r[o]=null,this.$module=t,this.$items=t&&t.querySelectorAll(".tna-accordion__item"),this.$module&&this.$items&&(this.allowMultipleItemsOpen="true"===this.$module.dataset.multiselectable,this.$items.forEach((function(e){return i.initItem(e)})),this.initState())},(t=[{key:"initItem",value:function(e){var t=this,r=e.querySelector(".tna-accordion__heading"),o=e.querySelector(".tna-accordion__body");if(r&&o){e.classList.add("tna-accordion__details"),e.classList.remove("tna-accordion__item"),r.removeAttribute("class"),o.classList.add("tna-accordion__content"),o.classList.remove("tna-accordion__body"),o.setAttribute("hidden","");var n=document.createElement("button");n.classList.add("tna-accordion__summary"),n.setAttribute("aria-controls",o.id),r.parentNode.insertBefore(n,r.nextSibling),n.appendChild(r),n.addEventListener("click",(function(){"true"===n.getAttribute("aria-expanded")?t.closeItem(e):t.openItem(e)}))}}},{key:"initState",value:function(){var e=this;this.$items.forEach((function(t){"true"===t.dataset.isopen?e.openItem(t):e.closeItem(t),t.removeAttribute("data-isopen")}))}},{key:"openItem",value:function(e){this.allowMultipleItemsOpen||this.closeAllItemsExcept(e);var t=e.querySelector(".tna-accordion__summary"),r=e.querySelector(".tna-accordion__content");t.setAttribute("aria-expanded","true"),t.setAttribute("aria-label","".concat(t.innerText.trim(),", Hide this section")),r.removeAttribute("hidden")}},{key:"closeItem",value:function(e){var t=e.querySelector(".tna-accordion__summary"),r=e.querySelector(".tna-accordion__content");t.setAttribute("aria-expanded","false"),t.setAttribute("aria-label","".concat(t.innerText.trim(),", Show this section")),r.setAttribute("hidden","")}},{key:"closeAllItemsExcept",value:function(e){var t=this;Array.from(this.$items).filter((function(t){return t.querySelector(".tna-accordion__summary")!==e&&"true"===t.querySelector(".tna-accordion__summary").getAttribute("aria-expanded")})).forEach((function(e){return t.closeItem(e)}))}}])&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();return t})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={d:(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}function n(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}t.r(e),t.d(e,{Accordion:()=>i});var i=function(){return t=function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$items=e&&e.querySelectorAll(".tna-accordion__item"),this.$module&&this.$items&&(this.allowMultipleItemsOpen="true"===this.$module.dataset.multiselectable,this.$items.forEach((function(t){return r.initItem(t)})),this.initState())},(e=[{key:"initItem",value:function(t){var e=this,r=t.querySelector(".tna-accordion__heading"),o=t.querySelector(".tna-accordion__body");if(r&&o){t.classList.add("tna-accordion__details"),t.classList.remove("tna-accordion__item"),r.removeAttribute("class"),o.classList.add("tna-accordion__content"),o.classList.remove("tna-accordion__body"),o.setAttribute("hidden","");var n=document.createElement("button");n.classList.add("tna-accordion__summary"),n.setAttribute("type","button"),n.setAttribute("aria-controls",o.id),n.innerText=r.innerText,r.innerText="",r.appendChild(n),n.addEventListener("click",(function(){"true"===n.getAttribute("aria-expanded")?e.closeItem(t):e.openItem(t)}))}}},{key:"initState",value:function(){var t=this;this.$items.forEach((function(e){"true"===e.dataset.isopen?t.openItem(e):t.closeItem(e),e.removeAttribute("data-isopen")}))}},{key:"openItem",value:function(t){this.allowMultipleItemsOpen||this.closeAllItemsExcept(t);var e=t.querySelector(".tna-accordion__summary"),r=t.querySelector(".tna-accordion__content");e.setAttribute("aria-expanded","true"),e.setAttribute("aria-label","".concat(e.innerText.trim(),", Hide this section")),r.removeAttribute("hidden")}},{key:"closeItem",value:function(t){var e=t.querySelector(".tna-accordion__summary"),r=t.querySelector(".tna-accordion__content");e.setAttribute("aria-expanded","false"),e.setAttribute("aria-label","".concat(e.innerText.trim(),", Show this section")),r.setAttribute("hidden","")}},{key:"closeAllItemsExcept",value:function(t){var e=this;Array.from(this.$items).filter((function(e){return e.querySelector(".tna-accordion__summary")!==t&&"true"===e.querySelector(".tna-accordion__summary").getAttribute("aria-expanded")})).forEach((function(t){return e.closeItem(t)}))}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})()));
2
2
  //# sourceMappingURL=accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/accordion/accordion.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,i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CAlGmB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/accordion/accordion.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Accordion {\n polyfillRequired = null;\n\n constructor($module) {\n this.$module = $module;\n this.$items = $module && $module.querySelectorAll(\".tna-accordion__item\");\n if (!this.$module || !this.$items) {\n return;\n }\n\n this.allowMultipleItemsOpen =\n this.$module.dataset[\"multiselectable\"] === \"true\";\n\n this.$items.forEach(($item) => this.initItem($item));\n this.initState();\n }\n\n initItem($item) {\n const $heading = $item.querySelector(\".tna-accordion__heading\");\n const $content = $item.querySelector(\".tna-accordion__body\");\n\n if (!$heading || !$content) {\n return;\n }\n\n $item.classList.add(\"tna-accordion__details\");\n $item.classList.remove(\"tna-accordion__item\");\n\n $heading.removeAttribute(\"class\");\n\n $content.classList.add(\"tna-accordion__content\");\n $content.classList.remove(\"tna-accordion__body\");\n $content.setAttribute(\"hidden\", \"\");\n\n const $headingButton = document.createElement(\"button\");\n $headingButton.classList.add(\"tna-accordion__summary\");\n $headingButton.setAttribute(\"aria-controls\", $content.id);\n $heading.parentNode.insertBefore($headingButton, $heading.nextSibling);\n $headingButton.appendChild($heading);\n\n $headingButton.addEventListener(\"click\", () => {\n const isOpen = $headingButton.getAttribute(\"aria-expanded\") === \"true\";\n if (isOpen) {\n this.closeItem($item);\n } else {\n this.openItem($item);\n }\n });\n }\n\n initState() {\n this.$items.forEach(($item) => {\n if ($item.dataset[\"isopen\"] === \"true\") {\n this.openItem($item);\n } else {\n this.closeItem($item);\n }\n $item.removeAttribute(\"data-isopen\");\n });\n }\n\n openItem($item) {\n if (!this.allowMultipleItemsOpen) {\n this.closeAllItemsExcept($item);\n }\n const $headingButton = $item.querySelector(\".tna-accordion__summary\");\n const $content = $item.querySelector(\".tna-accordion__content\");\n $headingButton.setAttribute(\"aria-expanded\", \"true\");\n $headingButton.setAttribute(\n \"aria-label\",\n `${$headingButton.innerText.trim()}, Hide this section`,\n );\n $content.removeAttribute(\"hidden\");\n // $content.setAttribute(\"tabindex\", \"0\");\n }\n\n closeItem($item) {\n const $headingButton = $item.querySelector(\".tna-accordion__summary\");\n const $content = $item.querySelector(\".tna-accordion__content\");\n $headingButton.setAttribute(\"aria-expanded\", \"false\");\n $headingButton.setAttribute(\n \"aria-label\",\n `${$headingButton.innerText.trim()}, Show this section`,\n );\n $content.setAttribute(\"hidden\", \"\");\n // $content.setAttribute(\"tabindex\", \"-1\");\n }\n\n closeAllItemsExcept($excludeItem) {\n Array.from(this.$items)\n .filter(\n ($item) =>\n $item.querySelector(\".tna-accordion__summary\") !== $excludeItem &&\n $item\n .querySelector(\".tna-accordion__summary\")\n .getAttribute(\"aria-expanded\") === \"true\",\n )\n .forEach(($item) => this.closeItem($item));\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Accordion","$module","_this","_classCallCheck","this","$items","querySelectorAll","allowMultipleItemsOpen","dataset","forEach","$item","initItem","initState","_this2","$heading","querySelector","$content","classList","add","remove","removeAttribute","setAttribute","$headingButton","document","createElement","id","parentNode","insertBefore","nextSibling","appendChild","addEventListener","getAttribute","closeItem","openItem","_this3","closeAllItemsExcept","concat","innerText","trim","$excludeItem","_this4","Array","from","filter"],"sourceRoot":""}
1
+ {"version":3,"file":"components/accordion/accordion.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,GAAO,G,usBCLvD,IAAMC,EAAS,WAanB,O,EAZD,SAAAA,EAAYC,GAAS,IAAAC,EAAA,M,4FAAAC,CAAA,KAAAH,GACnBI,KAAKH,QAAUA,EACfG,KAAKC,OAASJ,GAAWA,EAAQ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TZ,EAAeI,UAAUS,OAAM,wBAEpCnB,EAASI,gBAAgB,SAE3B,GAAC,CAAAlC,IAAA,YAAAa,MAED,SAAUW,GACR,IAAMY,EAAiBZ,EAAMK,cAAc,2BACrCC,EAAWN,EAAMK,cAAc,2BACrCO,EAAeD,aAAa,gBAAiB,SAC7CC,EAAeD,aACb,aAAY,GAAAa,OACTZ,EAAeI,UAAUS,OAAM,wBAEpCnB,EAASK,aAAa,SAAU,GAElC,GAAC,CAAAnC,IAAA,sBAAAa,MAED,SAAoBqC,GAAc,IAAAC,EAAA,KAChCC,MAAMC,KAAKnC,KAAKC,QACbmC,QACC,SAAC9B,GAAK,OACJA,EAAMK,cAAc,6BAA+BqB,GAGd,SAFrC1B,EACGK,cAAc,2BACdc,aAAa,gBAA2B,IAE9CpB,SAAQ,SAACC,GAAK,OAAK2B,EAAKP,UAAUpB,EAAM,GAC7C,M,6EAAC,CAlGmB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/accordion/accordion.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Accordion {\n constructor($module) {\n this.$module = $module;\n this.$items = $module && $module.querySelectorAll(\".tna-accordion__item\");\n if (!this.$module || !this.$items) {\n return;\n }\n\n this.allowMultipleItemsOpen =\n this.$module.dataset[\"multiselectable\"] === \"true\";\n\n this.$items.forEach(($item) => this.initItem($item));\n this.initState();\n }\n\n initItem($item) {\n const $heading = $item.querySelector(\".tna-accordion__heading\");\n const $content = $item.querySelector(\".tna-accordion__body\");\n\n if (!$heading || !$content) {\n return;\n }\n\n $item.classList.add(\"tna-accordion__details\");\n $item.classList.remove(\"tna-accordion__item\");\n\n $heading.removeAttribute(\"class\");\n\n $content.classList.add(\"tna-accordion__content\");\n $content.classList.remove(\"tna-accordion__body\");\n $content.setAttribute(\"hidden\", \"\");\n\n const $headingButton = document.createElement(\"button\");\n $headingButton.classList.add(\"tna-accordion__summary\");\n $headingButton.setAttribute(\"type\", \"button\");\n $headingButton.setAttribute(\"aria-controls\", $content.id);\n $headingButton.innerText = $heading.innerText;\n $heading.innerText = \"\";\n $heading.appendChild($headingButton);\n\n $headingButton.addEventListener(\"click\", () => {\n const isOpen = $headingButton.getAttribute(\"aria-expanded\") === \"true\";\n if (isOpen) {\n this.closeItem($item);\n } else {\n this.openItem($item);\n }\n });\n }\n\n initState() {\n this.$items.forEach(($item) => {\n if ($item.dataset[\"isopen\"] === \"true\") {\n this.openItem($item);\n } else {\n this.closeItem($item);\n }\n $item.removeAttribute(\"data-isopen\");\n });\n }\n\n openItem($item) {\n if (!this.allowMultipleItemsOpen) {\n this.closeAllItemsExcept($item);\n }\n const $headingButton = $item.querySelector(\".tna-accordion__summary\");\n const $content = $item.querySelector(\".tna-accordion__content\");\n $headingButton.setAttribute(\"aria-expanded\", \"true\");\n $headingButton.setAttribute(\n \"aria-label\",\n `${$headingButton.innerText.trim()}, Hide this section`,\n );\n $content.removeAttribute(\"hidden\");\n // $content.setAttribute(\"tabindex\", \"0\");\n }\n\n closeItem($item) {\n const $headingButton = $item.querySelector(\".tna-accordion__summary\");\n const $content = $item.querySelector(\".tna-accordion__content\");\n $headingButton.setAttribute(\"aria-expanded\", \"false\");\n $headingButton.setAttribute(\n \"aria-label\",\n `${$headingButton.innerText.trim()}, Show this section`,\n );\n $content.setAttribute(\"hidden\", \"\");\n // $content.setAttribute(\"tabindex\", \"-1\");\n }\n\n closeAllItemsExcept($excludeItem) {\n Array.from(this.$items)\n .filter(\n ($item) =>\n $item.querySelector(\".tna-accordion__summary\") !== $excludeItem &&\n $item\n .querySelector(\".tna-accordion__summary\")\n .getAttribute(\"aria-expanded\") === \"true\",\n )\n .forEach(($item) => this.closeItem($item));\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Accordion","$module","_this","_classCallCheck","this","$items","querySelectorAll","allowMultipleItemsOpen","dataset","forEach","$item","initItem","initState","_this2","$heading","querySelector","$content","classList","add","remove","removeAttribute","setAttribute","$headingButton","document","createElement","id","innerText","appendChild","addEventListener","getAttribute","closeItem","openItem","_this3","closeAllItemsExcept","concat","trim","$excludeItem","_this4","Array","from","filter"],"sourceRoot":""}
@@ -1,6 +1,4 @@
1
1
  export class Accordion {
2
- polyfillRequired = null;
3
-
4
2
  constructor($module) {
5
3
  this.$module = $module;
6
4
  this.$items = $module && $module.querySelectorAll(".tna-accordion__item");
@@ -34,9 +32,11 @@ export class Accordion {
34
32
 
35
33
  const $headingButton = document.createElement("button");
36
34
  $headingButton.classList.add("tna-accordion__summary");
35
+ $headingButton.setAttribute("type", "button");
37
36
  $headingButton.setAttribute("aria-controls", $content.id);
38
- $heading.parentNode.insertBefore($headingButton, $heading.nextSibling);
39
- $headingButton.appendChild($heading);
37
+ $headingButton.innerText = $heading.innerText;
38
+ $heading.innerText = "";
39
+ $heading.appendChild($headingButton);
40
40
 
41
41
  $headingButton.addEventListener("click", () => {
42
42
  const isOpen = $headingButton.getAttribute("aria-expanded") === "true";
@@ -104,6 +104,16 @@
104
104
  }
105
105
  }
106
106
 
107
+ &__body,
108
+ &__content {
109
+ .tna-table-wrapper {
110
+ padding-right: 0;
111
+ padding-left: 0;
112
+
113
+ left: 0;
114
+ }
115
+ }
116
+
107
117
  &__content {
108
118
  padding: spacing.space(1);
109
119
 
@@ -122,13 +132,6 @@
122
132
  padding-left: 0;
123
133
  }
124
134
 
125
- .tna-table-wrapper {
126
- padding-right: 0;
127
- padding-left: 0;
128
-
129
- left: 0;
130
- }
131
-
132
135
  .tna-table {
133
136
  width: calc(100% - #{spacing.space(2)});
134
137
  margin-right: spacing.space(1);
@@ -10,31 +10,49 @@
10
10
  },
11
11
  "topNavigation": [
12
12
  {
13
- "text": "Top item 1",
14
- "href": "#/top-1"
13
+ "text": "Search",
14
+ "href": "https://www.nationalarchives.gov.uk/search/",
15
+ "icon": "search"
15
16
  },
16
17
  {
17
- "text": "Top item 2",
18
- "href": "#/top-2",
19
- "icon": "phone"
18
+ "text": "Shop",
19
+ "href": "https://shop.nationalarchives.gov.uk/",
20
+ "icon": "shop"
21
+ },
22
+ {
23
+ "text": "Sign in",
24
+ "href": "#/sign-in",
25
+ "icon": "user"
20
26
  }
21
27
  ],
22
28
  "navigation": [
23
29
  {
24
- "text": "Alpha",
25
- "href": "#/alpha"
30
+ "text": "Visit",
31
+ "href": "https://www.nationalarchives.gov.uk/about/visit-us/"
26
32
  },
27
33
  {
28
- "text": "Beta",
29
- "href": "#/beta"
34
+ "text": "What’s on",
35
+ "href": "https://www.nationalarchives.gov.uk/about/visit-us/whats-on/"
30
36
  },
31
37
  {
32
- "text": "Gamma",
33
- "href": "#/gamma"
38
+ "text": "Explore the collection",
39
+ "href": "https://beta.nationalarchives.gov.uk/explore-the-collection/"
40
+ },
41
+ {
42
+ "text": "Help using the archive",
43
+ "href": "https://www.nationalarchives.gov.uk/help-with-your-research/"
44
+ },
45
+ {
46
+ "text": "Education",
47
+ "href": "https://www.nationalarchives.gov.uk/education/"
48
+ },
49
+ {
50
+ "text": "Professional guidance and services",
51
+ "href": "https://www.nationalarchives.gov.uk/professional-guidance-and-services/"
34
52
  }
35
53
  ]
36
54
  },
37
- "html": "<header class=\"tna-global-header\" data-module=\"tna-global-header\"><div class=\"tna-container tna-global-header__main\"><div class=\"tna-column tna-column--flex-1 tna-column--order-2\"><span class=\"tna-global-header__logo-wrapper\"><a href=\"#/\" class=\"tna-global-header__logo tna-global-header__logo--link\" title=\"Home page\" aria-label=\"Home page\"><span class=\"tna-logo tna-logo--adornable\"><svg xmlns=\"http://www.w3.org/2000/svg\" xml:space=\"preserve\" viewBox=\"0 0 160 160\" width=\"96\" height=\"96\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"transparent\" d=\"M0 0h160v160H0z\" class=\"tna-logo__background\" /><g class=\"tna-logo__foreground\" fill=\"currentColor\"><path d=\"M1.9 107.2h156.3V158H1.9v-50.8zm0-52.7h156.3v50.8H1.9V54.5zm0-52.6h77.2v50.8H1.9V1.9zm79 0h77.2v50.8H80.9V1.9zm0-1.9H0v160h160V0H80.9z\" /><path d=\"M21.3 19.5h-5.4v-3h14.3v3h-5.4v18.4h-3.5zM31.6 16.5H35v9h8.4v-9h3.4v21.4h-3.4v-9.3H35v9.3h-3.4zM50.9 16.5h12.2v3h-8.8v6.1h7.4v3h-7.4v6.3h8.8v3H50.9zM19.7 69.2h3.8l6.4 12.5c.6 1.1 1.1 2.7 1.6 4h.2c-.2-1.7-.3-3.6-.3-4.8V69.2h3.5v21.4h-3.7l-6.3-12.3c-.7-1.4-1.2-2.7-1.7-4.2H23c.2 1.4.3 3.3.3 5v11.5h-3.5c-.1 0-.1-21.4-.1-21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132.5c0 5.3 1.9 8 4.8 8s4-2 4-5.2l3.5.1c0 .2.1.4.1.6 0 4.4-2.1 7.5-7.5 7.5-5.2 0-8.5-3.9-8.5-11.1 0-7.1 3.3-11 8.5-11 6.4 0 7.5 4.6 7.5 7.2 0 .3 0 .7-.1.9l-3.5.1c0-3.3-1.2-5.2-4-5.2-2.9.2-4.8 2.9-4.8 8.1M68 121.8h3.5v9.1h8.3v-9.1h3.5v21.5h-3.5v-9.4h-8.3v9.4H68zM87.9 121.8h3.5v21.4h-3.5zM94.2 121.8h3.6l3.2 12.3c.5 1.9.8 3.6 1.1 5.6h.2c.3-2 .6-3.7 1.1-5.6l3.2-12.3h3.6l-6.1 21.4H100l-5.8-21.4zM112.7 121.8H125v3.1h-8.8v6h7.4v3h-7.4v6.3h8.8v3.1h-12.3zM130.4 136c0 .2-.1.5-.1.8 0 1.9.8 3.7 3.4 3.7 2.1 0 3.3-1.2 3.3-2.9 0-1.6-.7-2.4-2.2-3l-3.4-1.3c-2.4-.9-4.2-2.4-4.2-5.7 0-3.5 2.3-6.1 6.6-6.1 5.5 0 6.4 3.6 6.4 5.9 0 .3 0 .7-.1 1.1l-3.4.1c0-.2.1-.5.1-.7 0-1.7-.6-3.2-3-3.2-2.1 0-3 1.2-3 2.8 0 1.7.9 2.5 2.2 2.9l3.5 1.3c2.6 1 4.3 2.6 4.3 5.8 0 3.6-2.4 6.1-7 6.1-5.9 0-6.8-3.9-6.8-6.5 0-.3 0-.6.1-1l3.3-.1z\" /></g></svg></span></a></span></div><div class=\"tna-column tna-column--order-2 tna-global-header__navigation-button-wrapper\"><button class=\"tna-global-header__navigation-button\" type=\"button\" aria-controls=\"tna-header__navigation tna-header__top-navigation\" hidden>Menu<span class=\"tna-global-header__hamburger\"></span></button></div><nav class=\"tna-column tna-column--full-small tna-column--full-tiny tna-column--order-3 tna-global-header__navigation-wrapper\" id=\"tna-header__navigation\" aria-label=\"Primary\"><ul class=\"tna-global-header__navigation\"><li class=\"tna-global-header__navigation-item\"><a href=\"#/alpha\" class=\"tna-global-header__navigation-item-link\" tabindex=\"0\">Alpha</a></li><li class=\"tna-global-header__navigation-item\"><a href=\"#/beta\" class=\"tna-global-header__navigation-item-link\" tabindex=\"0\">Beta</a></li><li class=\"tna-global-header__navigation-item\"><a href=\"#/gamma\" class=\"tna-global-header__navigation-item-link\" tabindex=\"0\">Gamma</a></li></ul></nav><nav class=\"tna-column tna-column--full tna-column--order-1 tna-column--order-4-small tna-column--order-4-tiny tna-global-header__top-navigation-wrapper\" id=\"tna-header__top-navigation\" aria-label=\"Secondary\"><ul class=\"tna-global-header__top-navigation\"><li class=\"tna-global-header__top-navigation-item\"><a href=\"#/top-1\" class=\"tna-global-header__top-navigation-link\" tabindex=\"0\">Top item 1</a></li><li class=\"tna-global-header__top-navigation-item\"><a href=\"#/top-2\" class=\"tna-global-header__top-navigation-link\" tabindex=\"0\">Top item 2</a></li></ul></nav></div></header>"
55
+ "html": "<header class=\"tna-global-header\" data-module=\"tna-global-header\"><div class=\"tna-container tna-global-header__main\"><div class=\"tna-column tna-column--flex-1 tna-column--order-2\"><span class=\"tna-global-header__logo-wrapper\"><a href=\"#/\" class=\"tna-global-header__logo tna-global-header__logo--link\" title=\"Home page\" aria-label=\"Home page\"><span class=\"tna-logo tna-logo--adornable\"><svg xmlns=\"http://www.w3.org/2000/svg\" xml:space=\"preserve\" viewBox=\"0 0 160 160\" width=\"96\" height=\"96\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"transparent\" d=\"M0 0h160v160H0z\" class=\"tna-logo__background\" /><g class=\"tna-logo__foreground\" fill=\"currentColor\"><path d=\"M1.9 107.2h156.3V158H1.9v-50.8zm0-52.7h156.3v50.8H1.9V54.5zm0-52.6h77.2v50.8H1.9V1.9zm79 0h77.2v50.8H80.9V1.9zm0-1.9H0v160h160V0H80.9z\" /><path d=\"M21.3 19.5h-5.4v-3h14.3v3h-5.4v18.4h-3.5zM31.6 16.5H35v9h8.4v-9h3.4v21.4h-3.4v-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column--order-2 tna-global-header__navigation-button-wrapper\"><button class=\"tna-global-header__navigation-button\" type=\"button\" aria-controls=\"tna-header__navigation tna-header__top-navigation\" hidden>Menu<span class=\"tna-global-header__hamburger\"></span></button></div><nav class=\"tna-column tna-column--full-small tna-column--full-tiny tna-column--order-3 tna-global-header__navigation-wrapper\" id=\"tna-header__navigation\" aria-label=\"Primary\"><ul class=\"tna-global-header__navigation\"><li class=\"tna-global-header__navigation-item\"><a href=\"https://www.nationalarchives.gov.uk/about/visit-us/\" class=\"tna-global-header__navigation-item-link\" tabindex=\"0\">Visit</a></li><li class=\"tna-global-header__navigation-item\"><a href=\"https://www.nationalarchives.gov.uk/about/visit-us/whats-on/\" class=\"tna-global-header__navigation-item-link\" tabindex=\"0\">What’s on</a></li><li class=\"tna-global-header__navigation-item\"><a href=\"https://beta.nationalarchives.gov.uk/explore-the-collection/\" class=\"tna-global-header__navigation-item-link\" tabindex=\"0\">Explore the collection</a></li><li class=\"tna-global-header__navigation-item\"><a href=\"https://www.nationalarchives.gov.uk/help-with-your-research/\" class=\"tna-global-header__navigation-item-link\" tabindex=\"0\">Help using the archive</a></li><li class=\"tna-global-header__navigation-item\"><a href=\"https://www.nationalarchives.gov.uk/education/\" class=\"tna-global-header__navigation-item-link\" tabindex=\"0\">Education</a></li><li class=\"tna-global-header__navigation-item\"><a href=\"https://www.nationalarchives.gov.uk/professional-guidance-and-services/\" class=\"tna-global-header__navigation-item-link\" tabindex=\"0\">Professional guidance and services</a></li></ul></nav><nav class=\"tna-column tna-column--full tna-column--order-1 tna-column--order-4-small tna-column--order-4-tiny tna-global-header__top-navigation-wrapper\" id=\"tna-header__top-navigation\" aria-label=\"Secondary\"><ul class=\"tna-global-header__top-navigation\"><li class=\"tna-global-header__top-navigation-item\"><a href=\"https://www.nationalarchives.gov.uk/search/\" class=\"tna-global-header__top-navigation-link\" tabindex=\"0\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" height=\"16\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d=\"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z\"/></svg>Search</a></li><li class=\"tna-global-header__top-navigation-item\"><a href=\"https://shop.nationalarchives.gov.uk/\" class=\"tna-global-header__top-navigation-link\" tabindex=\"0\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\" height=\"16\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d=\"M160 112c0-35.3 28.7-64 64-64s64 28.7 64 64v48H160V112zm-48 48H48c-26.5 0-48 21.5-48 48V416c0 53 43 96 96 96H352c53 0 96-43 96-96V208c0-26.5-21.5-48-48-48H336V112C336 50.1 285.9 0 224 0S112 50.1 112 112v48zm24 48a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm152 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z\"/></svg>Shop</a></li><li class=\"tna-global-header__top-navigation-item\"><a href=\"#/sign-in\" class=\"tna-global-header__top-navigation-link\" tabindex=\"0\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\" height=\"16\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d=\"M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z\"/></svg>Sign in</a></li></ul></nav></div></header>"
38
56
  },
39
57
  {
40
58
  "name": "with no logo link",
@@ -46,8 +64,7 @@
46
64
  },
47
65
  {
48
66
  "text": "Top item 2",
49
- "href": "#/top-2",
50
- "icon": "phone"
67
+ "href": "#/top-2"
51
68
  }
52
69
  ],
53
70
  "navigation": [
@@ -104,8 +121,7 @@
104
121
  },
105
122
  {
106
123
  "text": "Top item 2",
107
- "href": "#/top-2",
108
- "icon": "phone"
124
+ "href": "#/top-2"
109
125
  }
110
126
  ],
111
127
  "navigation": [
@@ -140,8 +156,7 @@
140
156
  },
141
157
  {
142
158
  "text": "Top item 2",
143
- "href": "#/top-2",
144
- "icon": "phone"
159
+ "href": "#/top-2"
145
160
  }
146
161
  ],
147
162
  "navigation": [
@@ -176,8 +191,7 @@
176
191
  },
177
192
  {
178
193
  "text": "Top item 2",
179
- "href": "#/top-2",
180
- "icon": "phone"
194
+ "href": "#/top-2"
181
195
  }
182
196
  ],
183
197
  "navigation": [
@@ -212,8 +226,7 @@
212
226
  },
213
227
  {
214
228
  "text": "Top item 2",
215
- "href": "#/top-2",
216
- "icon": "phone"
229
+ "href": "#/top-2"
217
230
  }
218
231
  ],
219
232
  "navigation": [