@nationalarchives/frontend 0.1.20-prerelease → 0.1.22-prerelease
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/govuk-prototype-kit.config.json +7 -2
- package/nationalarchives/_prototype-kit.scss +16 -0
- package/nationalarchives/all.css +3 -3
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.mjs +17 -10
- package/nationalarchives/all.scss +1 -5
- package/nationalarchives/assets/images/favicon.ico +0 -0
- package/nationalarchives/assets/images/mask-icon.svg +17 -5
- package/nationalarchives/assets/images/mstile-150x150.png +0 -0
- package/nationalarchives/components/_index.scss +1 -0
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +5 -15
- package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +12 -4
- package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +64 -0
- package/nationalarchives/components/breadcrumbs/fixtures.json +2 -2
- package/nationalarchives/components/breadcrumbs/template.njk +11 -15
- package/nationalarchives/components/button/_button-group.scss +1 -1
- package/nationalarchives/components/button/button.css +1 -13
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/button/button.scss +24 -6
- package/nationalarchives/components/card/card.css +1 -13
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/card/card.scss +52 -7
- package/nationalarchives/components/card/card.stories.js +78 -36
- package/nationalarchives/components/card/fixtures.json +40 -16
- package/nationalarchives/components/card/macro-options.json +26 -0
- package/nationalarchives/components/card/template.njk +38 -26
- package/nationalarchives/components/cookie-banner/cookie-banner.css +1 -13
- package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.mjs +15 -7
- package/nationalarchives/components/cookie-banner/cookie-banner.scss +9 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +23 -10
- package/nationalarchives/components/cookie-banner/macro-options.json +1 -1
- package/nationalarchives/components/cookie-banner/template.njk +4 -4
- package/nationalarchives/components/filters/filters.css +1 -1
- package/nationalarchives/components/filters/filters.css.map +1 -1
- package/nationalarchives/components/filters/filters.scss +2 -2
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.css +1 -13
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/footer/footer.scss +8 -55
- package/nationalarchives/components/footer/footer.stories.js +1 -1
- package/nationalarchives/components/footer/template.njk +16 -14
- package/nationalarchives/components/gallery/gallery.css +1 -13
- package/nationalarchives/components/gallery/gallery.css.map +1 -1
- package/nationalarchives/components/gallery/template.njk +2 -2
- package/nationalarchives/components/grid/grid.css +1 -1
- package/nationalarchives/components/grid/grid.css.map +1 -1
- package/nationalarchives/components/grid/grid.scss +15 -11
- package/nationalarchives/components/grid/grid.stories.js +21 -0
- package/nationalarchives/components/grid/macro-options.json +48 -0
- package/nationalarchives/components/grid/template.njk +29 -3
- package/nationalarchives/components/header/header.css +1 -1
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/header/header.scss +60 -145
- package/nationalarchives/components/header/header.stories.js +2 -0
- package/nationalarchives/components/header/macro-options.json +12 -0
- package/nationalarchives/components/header/template.njk +6 -1
- package/nationalarchives/components/hero/fixtures.json +166 -6
- package/nationalarchives/components/hero/hero.css +1 -1
- package/nationalarchives/components/hero/hero.css.map +1 -1
- package/nationalarchives/components/hero/hero.scss +187 -64
- package/nationalarchives/components/hero/hero.stories.js +98 -23
- package/nationalarchives/components/hero/macro-options.json +48 -12
- package/nationalarchives/components/hero/template.njk +34 -24
- package/nationalarchives/components/index-grid/index-grid.css +1 -1
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
- package/nationalarchives/components/index-grid/template.njk +2 -2
- package/nationalarchives/components/message/message.css +1 -1
- package/nationalarchives/components/message/message.css.map +1 -1
- package/nationalarchives/components/message/message.scss +4 -0
- package/nationalarchives/components/pagination/_index.scss +1 -0
- package/nationalarchives/components/pagination/fixtures.json +4 -0
- package/nationalarchives/components/pagination/macro-options.json +116 -0
- package/nationalarchives/components/pagination/macro.njk +3 -0
- package/nationalarchives/components/pagination/pagination.css +1 -0
- package/nationalarchives/components/pagination/pagination.css.map +1 -0
- package/nationalarchives/components/pagination/pagination.scss +98 -0
- package/nationalarchives/components/pagination/pagination.stories.js +73 -0
- package/nationalarchives/components/pagination/template.njk +38 -0
- package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.scss +5 -1
- package/nationalarchives/components/picture/picture.css +1 -13
- package/nationalarchives/components/picture/picture.css.map +1 -1
- package/nationalarchives/components/picture/picture.scss +1 -1
- package/nationalarchives/components/picture/picture.stories.js +2 -2
- package/nationalarchives/components/profile/profile.css +1 -1
- package/nationalarchives/components/profile/profile.css.map +1 -1
- package/nationalarchives/components/profile/template.njk +2 -2
- package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -1
- package/nationalarchives/components/skip-link/fixtures.json +1 -1
- package/nationalarchives/components/skip-link/skip-link.css +1 -1
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
- package/nationalarchives/components/skip-link/skip-link.js +2 -0
- package/nationalarchives/components/skip-link/skip-link.js.map +1 -0
- package/nationalarchives/components/skip-link/skip-link.mjs +40 -0
- package/nationalarchives/components/skip-link/skip-link.scss +18 -16
- package/nationalarchives/components/skip-link/skip-link.stories.js +48 -6
- package/nationalarchives/components/skip-link/template.njk +1 -1
- package/nationalarchives/components/tabs/tabs.css +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.js +1 -1
- package/nationalarchives/components/tabs/tabs.js.map +1 -1
- package/nationalarchives/components/tabs/tabs.mjs +6 -2
- package/nationalarchives/components/tabs/tabs.scss +17 -2
- package/nationalarchives/components/tabs/tabs.stories.js +6 -6
- package/nationalarchives/lib/_font-awesome.scss +3 -2
- package/nationalarchives/lib/cookies.mjs +122 -50
- package/nationalarchives/stories/development/contributing.mdx +0 -10
- package/nationalarchives/stories/development/cookies.mdx +82 -0
- package/nationalarchives/stories/development/structure.mdx +88 -0
- package/nationalarchives/stories/development/using/compiled.mdx +9 -0
- package/nationalarchives/stories/development/using/hosted.mdx +53 -0
- package/nationalarchives/stories/development/using/npm.mdx +59 -0
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +333 -72
- package/nationalarchives/stories/utilities/overrides/overrides.stories.js +10 -21
- package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +2 -2
- package/nationalarchives/stories/utilities/typography/headings.stories.js +6 -3
- package/nationalarchives/stories/utilities/typography/lists.stories.js +93 -0
- package/nationalarchives/stories/utilities/typography/typography.mdx +11 -1
- package/nationalarchives/stories/utilities/typography/typography.stories.js +1 -1
- package/nationalarchives/templates/homepage.njk +11 -58
- package/nationalarchives/templates/layouts/_generic.njk +31 -14
- package/nationalarchives/templates/layouts/_prototype-kit.njk +11 -0
- package/nationalarchives/templates/search-results.njk +11 -15
- package/nationalarchives/templates/topics.njk +18 -22
- package/nationalarchives/tools/_colour.scss +77 -23
- package/nationalarchives/tools/_grid.scss +12 -12
- package/nationalarchives/tools/_media.scss +6 -0
- package/nationalarchives/tools/_spacing.scss +6 -6
- package/nationalarchives/tools/_typography.scss +4 -2
- package/nationalarchives/utilities/_a11y.scss +15 -0
- package/nationalarchives/utilities/_columns.scss +42 -0
- package/nationalarchives/utilities/_debug.scss +1 -1
- package/nationalarchives/utilities/_global.scss +32 -32
- package/nationalarchives/utilities/_index.scss +2 -0
- package/nationalarchives/utilities/_lists.scss +181 -0
- package/nationalarchives/utilities/_typography.scss +129 -138
- package/nationalarchives/variables/_assets.scss +2 -1
- package/nationalarchives/variables/_colour.scss +94 -74
- package/nationalarchives/variables/_features.scss +1 -0
- package/nationalarchives/variables/_grid.scss +5 -5
- package/nationalarchives/variables/_index.scss +1 -0
- package/nationalarchives/variables/_media.scss +29 -29
- package/nationalarchives/variables/_typography.scss +15 -12
- package/package.json +15 -14
- package/nationalarchives/_features.scss +0 -1
- package/nationalarchives/assets/images/tna-horizontal-logo-inverted.svg +0 -51
- package/nationalarchives/assets/images/tna-horizontal-logo.svg +0 -51
- package/nationalarchives/stories/design/about.mdx +0 -25
- package/nationalarchives/stories/development/relationships.mdx +0 -57
- package/nationalarchives/stories/development/using.mdx +0 -75
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/utilities/_typography.scss","../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/utilities/_a11y.scss","../../../../src/nationalarchives/utilities/_global.scss","../../../../src/nationalarchives/tools/_media.scss","../../../../src/nationalarchives/utilities/_overrides.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/variables/_grid.scss","../../../../src/nationalarchives/components/tabs/tabs.scss"],"names":[],"mappings":"CAQQ,6CC+JR,0BACE,uCACA,uCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEAhFA,yBAEA,4CAPA,4BACA,uBAuHF,0DACE,qCACA,qCACA,uCACA,2BACA,2CACA,iCACA,2CA1HA,sBAEA,0CAPA,4BACA,uBAiJF,8BA7IE,yBAEA,gDA8IA,qBACA,kBACA,oCACA,aACA,wBACA,gBACA,wBACA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":["@use \"sass:math\";\n@use \"../tools/colour\";\n@use \"../tools/media\";\n@use \"../tools/spacing\";\n@use \"../tools/typography\";\n@use \"../variables/assets\";\n@use \"../variables/grid\";\n\n@import \"https://use.typekit.net/hkj3kuz.css\";\n\n@font-face {\n font-family: \"Open Sans\";\n src: url(\"#{assets.$tna-font-path}/OpenSans-Medium.ttf\");\n font-weight: normal;\n font-style: normal;\n}\n\n@font-face {\n font-family: \"Open Sans\";\n src: url(\"#{assets.$tna-font-path}/OpenSans-Bold.ttf\");\n font-weight: bold;\n font-style: normal;\n}\n\n@font-face {\n font-family: \"Roboto Mono\";\n src: url(\"#{assets.$tna-font-path}/RobotoMono-Regular.ttf\");\n font-weight: normal;\n font-style: normal;\n}\n\n.tna-template {\n @include colour.colour-font(\"font-base\");\n @include typography.main-font;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n -webkit-text-size-adjust: none;\n direction: ltr;\n}\n\n.tna-template__body {\n color: inherit;\n @include typography.relative-font-size(18);\n // line-height: 1.6;\n line-height: #{math.div(16, 18) * 2};\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nul,\nol {\n margin-top: 0;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nstrong {\n @include typography.main-font-weight-bold;\n}\n\np {\n margin: 0 0 1.5rem;\n\n @include media.on-tiny {\n margin-bottom: 1rem;\n }\n\n &:last-child {\n margin-bottom: 0;\n }\n}\n\na {\n @include colour.colour-font(\"link\");\n text-decoration-thickness: 1.5px;\n\n &:visited {\n @include colour.colour-font(\"link-visited\");\n }\n\n &:hover,\n &:active {\n @include typography.interacted-text-decoration;\n }\n\n &.tna-chip {\n text-decoration: none;\n\n &,\n &:link,\n &:visited {\n @include colour.colour-font(\"font-dark\");\n }\n\n &:hover {\n @include typography.interacted-text-decoration;\n }\n }\n}\n\n.tna-ul,\n.tna-ol {\n margin-top: 0;\n margin-right: 0;\n margin-left: 0;\n padding: 0 0 0 2rem;\n\n @include spacing.space-below;\n\n li::marker {\n @include colour.colour-font(\"accent-background\");\n font-weight: 700;\n }\n\n &--plain {\n padding-left: 0;\n\n list-style: none;\n }\n}\n\n%chip {\n max-width: max-content;\n padding: 0.375em 0.5rem;\n\n display: block;\n\n @include colour.colour-font(\"font-dark\");\n @include typography.detail-font-small;\n line-height: 1;\n\n @include colour.accent;\n}\n\n.tna-chip {\n @extend %chip;\n}\n\n.tna-chip-list {\n padding-left: 0;\n\n display: flex;\n flex-wrap: wrap;\n gap: 1rem;\n\n list-style: none;\n\n @include spacing.space-below;\n\n &__item {\n }\n}\n\n%heading {\n @include colour.colour-font(\"font-dark\");\n @include typography.heading-font;\n\n a {\n display: inline-block;\n\n &::after {\n padding-left: 0.25rem;\n\n display: inline-block;\n\n font-weight: 700;\n\n content: \"\\203A\";\n }\n\n &:hover {\n &::after {\n padding-left: 0.5rem;\n }\n }\n }\n}\n\n%heading-xl {\n @include typography.relative-font-size(64);\n line-height: 1.2;\n\n @include media.on-medium {\n // @include typography.relative-font-size(42);\n @include typography.relative-font-size(50);\n }\n\n @include media.on-mobile {\n @include typography.relative-font-size(36);\n }\n}\n\n%heading-l {\n @include typography.relative-font-size(32);\n line-height: 1.4;\n\n @include media.on-medium {\n // @include typography.relative-font-size(26);\n @include typography.relative-font-size(28);\n }\n\n @include media.on-mobile {\n @include typography.relative-font-size(24);\n }\n}\n\n%heading-m {\n @include typography.relative-font-size(20);\n line-height: 1.6;\n}\n\n%heading-s {\n @include typography.relative-font-size(18);\n line-height: 1.6;\n}\n\n.tna-heading {\n @extend %heading;\n\n &--xl {\n @extend %heading-xl;\n }\n\n &--l {\n @extend %heading-l;\n }\n\n &--m {\n @extend %heading-m;\n }\n\n &--s {\n @extend %heading-s;\n }\n}\n\n.tna-hgroup {\n &__supertitle {\n margin: 0 0 0.5rem;\n\n @extend %chip;\n }\n\n &__title {\n margin: 0;\n\n display: block;\n\n @extend %heading;\n }\n\n &--xl &__title {\n @extend %heading-xl;\n }\n\n &--l &__title {\n @extend %heading-l;\n }\n\n &--m &__title {\n @extend %heading-m;\n }\n\n &--s &__title {\n @extend %heading-s;\n }\n}\n\n.tna-heading,\n.tna-hgroup {\n margin-top: 3rem;\n margin-bottom: 1rem;\n\n &:first-child {\n margin-top: 0;\n }\n\n &:last-child {\n margin-bottom: 0;\n }\n}\n\n.tna-blockquote {\n margin-top: 0;\n margin-right: 0;\n margin-left: 0;\n padding: 1rem 1rem 1rem 2rem;\n\n @include colour.colour-border(\"accent-background\", 0.35rem, solid, left);\n\n @include spacing.space-below;\n\n &__quote {\n font-weight: 700;\n }\n\n &__author {\n font-style: italic;\n\n .tna-blockquote & {\n margin: 1rem 0 0;\n }\n\n &::before {\n content: \"\\2014\" \" \";\n }\n }\n}\n\n.tna-scene-setter {\n @include typography.detail-font;\n @include colour.colour-font(\"font-dark\");\n @include typography.relative-font-size(30);\n line-height: math.div(50, 30);\n\n @include spacing.space-below;\n\n @include media.on-mobile {\n @include typography.relative-font-size(24);\n line-height: 2;\n }\n\n a {\n color: inherit;\n text-decoration-thickness: 2px;\n\n &:hover {\n text-decoration-thickness: 4.5px;\n }\n }\n}\n\n.tna-columns {\n column-gap: grid.$gutter-width;\n\n &--2 {\n column-count: 2;\n }\n\n &--3 {\n column-count: 3;\n }\n\n @include media.on-mobile {\n column-gap: grid.$gutter-width-mobile;\n }\n\n @include media.on-small {\n @for $i from 1 through 4 {\n &--#{$i}-small {\n column-count: $i;\n }\n }\n }\n\n @include media.on-tiny {\n @for $i from 1 through 4 {\n &--#{$i}-tiny {\n column-count: $i;\n }\n }\n }\n\n &__block {\n break-inside: avoid;\n }\n\n &:has(&__block:only-of-type) {\n column-count: 1;\n }\n}\n","@use \"sass:map\";\n@use \"../features\";\n@use \"../variables/colour\";\n@use \"../tools/media\";\n\n@function brand-colour($colour) {\n @return map.get(colour.$colour-palette-brand, $colour);\n}\n\n@mixin colour-css-vars() {\n @each $name, $value in colour.$colour-palette-default {\n --#{$name}: #{$value};\n }\n}\n\n@mixin colour-css-vars-dark() {\n @each $name, $value in colour.$colour-palette-dark {\n --#{$name}: #{$value};\n }\n}\n\n@mixin colour-css-vars-high-contrast() {\n @each $name, $value in colour.$colour-palette-high-contrast {\n --#{$name}: #{$value};\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark() {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n --#{$name}: #{$value};\n }\n}\n\n@mixin accent-css-vars($colour) {\n @if $colour == \"yellow\" {\n --accent: #{brand-colour(\"yellow\")} !important;\n --accent-background: #{brand-colour(\"yellow\")} !important;\n --accent-background-light: #{brand-colour(\"cream\")} !important;\n --accent-font-base: #{brand-colour(\"black\")} !important;\n --accent-font-dark: #{brand-colour(\"black\")} !important;\n --accent-font-light: #{rgba(brand-colour(\"black\"), 0.7)} !important;\n --accent-link: #{brand-colour(\"black\")} !important;\n --accent-link-visited: #{brand-colour(\"black\")} !important;\n --accent-keyline: #{rgba(brand-colour(\"black\"), 0.5)} !important;\n --accent-keyline-dark: #{rgba(brand-colour(\"black\"), 0.8)} !important;\n --button-accent-background: #{brand-colour(\"yellow\")} !important;\n } @else {\n --accent-font-base: #{brand-colour(\"white\")} !important;\n --accent-font-dark: #{brand-colour(\"white\")} !important;\n --accent-font-light: #{rgba(brand-colour(\"white\"), 0.7)} !important;\n --accent-link: #{brand-colour(\"white\")} !important;\n --accent-link-visited: #{brand-colour(\"white\")} !important;\n --accent-keyline: #{rgba(brand-colour(\"white\"), 0.5)} !important;\n --accent-keyline-dark: #{rgba(brand-colour(\"white\"), 0.8)} !important;\n\n @if $colour == \"black\" {\n // --accent: #{brand-colour(\"light-grey\")} !important;\n // --accent-background: #{brand-colour(\"black\")} !important;\n // --accent-background-light: #{brand-colour(\"light-grey\")} !important;\n // --button-accent-text: #{brand-colour(\"black\")} !important;\n // --button-accent-background: #{brand-colour(\"grey\")} !important;\n } @else {\n --button-accent-text: #{brand-colour(\"white\")} !important;\n @if $colour == \"pink\" {\n --accent: #{brand-colour(\"pink\")} !important;\n --accent-background: #{brand-colour(\"maroon\")} !important;\n --accent-background-light: #{brand-colour(\"pastel-pink\")} !important;\n --button-accent-background: #{brand-colour(\"maroon\")} !important;\n } @else if $colour == \"orange\" {\n --accent: #{brand-colour(\"orange\")} !important;\n --accent-background: #{brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{brand-colour(\"pastel-orange\")} !important;\n --button-accent-background: #{brand-colour(\"chestnut\")} !important;\n } @else if $colour == \"green\" {\n --accent: #{brand-colour(\"green\")} !important;\n --accent-background: #{brand-colour(\"forest\")} !important;\n --accent-background-light: #{brand-colour(\"pastel-green\")} !important;\n --button-accent-background: #{brand-colour(\"forest\")} !important;\n } @else if $colour == \"blue\" {\n --accent: #{brand-colour(\"blue\")} !important;\n --accent-background: #{brand-colour(\"navy\")} !important;\n --accent-background-light: #{brand-colour(\"pastel-blue\")} !important;\n --button-accent-background: #{brand-colour(\"navy\")} !important;\n }\n }\n }\n}\n\n@mixin colour-font(\n $colour,\n $important: false,\n $default-palette: colour.$colour-palette-default\n) {\n color: map.get($default-palette, $colour) if($important, !important, null);\n color: var(--#{$colour}) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n background-color: var(--#{$colour}) 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 $property: border-#{$direction};\n border-#{$direction}: $width\n map.get(colour.$colour-palette-default, $colour)\n $style\n if($important, !important, null);\n border-#{$direction}: $width\n var(--#{$colour})\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: map.get(\n colour.$colour-palette-default,\n $colour\n )\n if($important, !important, null);\n border-#{$direction}-color: var(--#{$colour})\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n map.get(colour.$colour-palette-default, $colour)\n $style\n if($important, !important, null);\n border: $width var(--#{$colour}) $style if($important, !important, null);\n } @else {\n border-color: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n border-color: var(--#{$colour}) if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $important: false) {\n outline-color: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n outline-color: var(--#{$colour}) if($important, !important, null);\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n fill: var(--#{$colour}) if($important, !important, null);\n}\n\n%fixed {\n @include colour-css-vars;\n\n @include colour-font(\"font-base\");\n}\n\n@mixin fixed {\n @extend %fixed;\n}\n\n%invert {\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-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(\"contrast-background\");\n\n @include colour-font(\"font-base\", false, colour.$colour-palette-dark);\n}\n\n@mixin invert {\n @extend %invert;\n}\n\n%invert-on-mobile {\n @include media.on-mobile {\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-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(\"contrast-background\");\n\n @include colour-font(\"font-base\", false, colour.$colour-palette-dark);\n }\n}\n\n@mixin invert-on-mobile {\n @extend %invert-on-mobile;\n}\n\n%accent {\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link-visited);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n\n @include colour-background(\"accent-background\");\n\n @include colour-font(\"font-base\", false, colour.$colour-palette-dark);\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%accent-background {\n @include colour-background(\"accent-background\");\n}\n\n@mixin accent-background {\n @extend %accent-background;\n}\n\n%light-accent-background {\n @include colour-background(\"accent-background-light\");\n\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 --link: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\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}\n\n@mixin light-accent-background {\n @extend %light-accent-background;\n}\n\n@mixin on-high-contrast {\n .tna-template--high-contrast-theme & {\n @content;\n }\n\n .tna-template--system-theme & {\n @media (prefers-contrast: more) {\n @content;\n }\n }\n}\n","@use \"sass:map\";\n@use \"../variables/spacing\";\n\n%space-below {\n margin-bottom: 2rem;\n\n &:last-child {\n margin-bottom: 0;\n }\n}\n\n@mixin space-below {\n @extend %space-below;\n}\n\n@function spacing($size) {\n @return map.get(spacing.$spacing, $size);\n}\n\n@function spacing-mobile($size) {\n @return map.get(spacing.$spacing-mobile, $size);\n}\n",".tna-visually-hidden {\n width: 1px !important;\n height: 1px !important;\n margin: 0 !important;\n padding: 0 !important;\n\n position: absolute !important;\n top: -9999px !important;\n left: -9999px !important;\n z-index: -1 !important;\n\n overflow: hidden !important;\n\n clip: rect(0, 0, 0, 0) !important;\n\n border: 0 !important;\n\n background-color: transparent !important;\n\n &::before,\n &::after {\n content: \"\\00a0\";\n }\n}\n","@use \"../features\";\n@use \"../tools/colour\";\n@use \"../tools/media\";\n@use \"../tools/spacing\";\n@use \"../variables/typography\";\n\n:root {\n @include colour.colour-css-vars;\n}\n\n.tna-template {\n min-width: 320px;\n width: 100%;\n height: 100%;\n\n overflow-x: hidden;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n\n font-size: #{typography.$base-font-size-px}px;\n\n @include colour.colour-background(\"page-background\");\n\n accent-color: var(--accent);\n\n &--system-theme {\n @include colour.colour-css-vars;\n\n @media (prefers-color-scheme: dark) {\n @include colour.colour-css-vars-dark;\n }\n\n @media (prefers-contrast: more) {\n @include colour.colour-css-vars-high-contrast;\n\n * {\n background-image: none !important;\n }\n }\n\n @media (prefers-contrast: more) and (prefers-color-scheme: dark) {\n @include colour.colour-css-vars-high-contrast-dark;\n }\n }\n\n &--light-theme {\n @include colour.colour-css-vars;\n }\n\n &--dark-theme {\n @include colour.colour-css-vars-dark;\n }\n\n &--high-contrast-theme {\n @include colour.colour-css-vars-high-contrast;\n\n * {\n background-image: none !important;\n }\n\n &.tna-template--dark-theme {\n @include colour.colour-css-vars-high-contrast-dark;\n }\n }\n\n @include colour.accent-css-vars(\"black\"); // TODO: Temp\n\n // &--black-accent {\n // @include colour.accent-css-vars(\"black\");\n // }\n\n &--yellow-accent {\n @include colour.accent-css-vars(\"yellow\");\n }\n\n &--pink-accent {\n @include colour.accent-css-vars(\"pink\");\n }\n\n &--orange-accent {\n @include colour.accent-css-vars(\"orange\");\n }\n\n &--green-accent {\n @include colour.accent-css-vars(\"green\");\n }\n\n &--blue-accent {\n @include colour.accent-css-vars(\"blue\");\n }\n\n @media (prefers-reduced-motion) {\n * {\n animation: none !important;\n transition: none !important;\n }\n }\n}\n\n.tna-template__body {\n min-height: 100%;\n margin: 0;\n padding: 0;\n\n overflow: auto;\n\n &:has(.tna-header):has(#main-content[role=\"main\"]):has(.tna-footer) {\n display: flex;\n flex-direction: column;\n\n #main-content[role=\"main\"] {\n flex: 1;\n }\n }\n}\n\nimg,\nsvg,\npicture,\nvideo,\ncanvas {\n max-width: 100%;\n\n display: block;\n}\n\nvideo,\ncanvas {\n width: 100%;\n}\n\n[hidden] {\n display: none;\n}\n\n*:focus {\n // outline: 0.3125rem colour.$focus-colour solid;\n outline: 0.3125rem solid;\n @include colour.colour-outline(\"focus-outline\");\n outline-offset: 0.125rem;\n}\n\nhr {\n margin: 2rem 0;\n\n border-width: 1px 0 0;\n @include colour.colour-border(\"keyline\");\n border-style: solid;\n\n // @include colour.on-high-contrast {\n // border-style: solid;\n // }\n}\n\n.tna-section {\n padding-top: 3rem;\n padding-bottom: 3rem;\n\n @include media.on-mobile {\n padding-top: 2rem;\n padding-bottom: 2rem;\n }\n}\n\n.tna-aside {\n padding: 2rem;\n\n @include spacing.space-below;\n\n @include media.on-mobile {\n padding: 1rem;\n }\n\n @include colour.on-high-contrast {\n @include colour.colour-border(\"keyline-dark\", 1px);\n }\n}\n\n.tna-background--contrast {\n @include colour.invert;\n}\n\n.tna-background--accent {\n @include colour.accent;\n}\n\n.tna-background--accent-light {\n @include colour.light-accent-background;\n}\n","@use \"../variables/media\";\n\n// 0 ======= 320 = 480 ===== 768 == 1024 ========================== min-width/max-width (px)\n// | . | | |\n// |-TINY----------|-SMALL---|-MED--|-LARGE------------------------\n// | . | | |\n// |<------------->| | | on-tiny\n// |<----------------------->| | on-mobile\n// |<------------------------------>| on-smaller-than-large\n// | . |<------->| | on-small\n// | . |<------------------------- on-larger-than-tiny\n// | . | |<---->| on-medium\n// | . | |<--------------- on-larger-than-mobile\n// | . | | |<-------- on-large\n// |<------->. | | | Smallest device\n\n@mixin on-large() {\n @media #{media.$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{media.$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{media.$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{media.$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{media.$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{media.$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{media.$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{media.$media-mobile} {\n @content;\n }\n}\n","@use \"../variables/spacing\";\n@use \"../tools/media\";\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n\n @each $property in margin, padding {\n @each $direction in top, bottom {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-vertical#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n}\n\n@mixin overrides($spacing, $suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in $spacing {\n .tna-\\!--#{$property}-#{$direction}-#{$size}#{$suffix},\n .tna-\\!--#{$property}-vertical-#{$size}#{$suffix} {\n #{$property}-#{$direction}: #{$amount} !important;\n }\n }\n }\n }\n}\n\n@include no-spacing-generator;\n@include overrides(spacing.$spacing);\n\n@include media.on-medium {\n @include no-spacing-generator(\"medium\");\n @include overrides(spacing.$spacing, \"medium\");\n}\n\n@include media.on-small {\n @include no-spacing-generator(\"small\");\n @include overrides(spacing.$spacing-mobile, \"small\");\n}\n\n@include media.on-tiny {\n @include no-spacing-generator(\"tiny\");\n @include overrides(spacing.$spacing-mobile, \"tiny\");\n}\n","@use \"sass:math\";\n@use \"../variables/typography\";\n\n@mixin relative-font-size($fontSizePx) {\n font-size: #{math.div($fontSizePx, typography.$base-font-size-px)}rem;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n}\n\n@mixin main-font-weight {\n font-weight: typography.$font-weight-main;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$font-weight-main-bold;\n}\n\n@mixin main-font {\n font-family: typography.$font-family-main;\n @include main-font-weight;\n}\n\n@mixin heading-font {\n font-family: typography.$font-family-heading;\n font-weight: typography.$font-weight-heading;\n}\n\n@mixin detail-font {\n font-family: typography.$font-family-detail;\n font-weight: typography.$font-weight-detail;\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include relative-font-size(14);\n text-transform: uppercase;\n line-height: #{math.div(typography.$base-font-size-px, 14)};\n // line-height: 1;\n}\n","$base-font-size-px: 16;\n\n$interactive-text-decoration-thickness: 3.5px;\n\n$font-family-main: \"Open Sans\", serif;\n// $font-weight-main: 500;\n$font-weight-main: normal;\n// $font-weight-main-bold: 700;\n$font-weight-main-bold: bold;\n\n$font-family-heading: supria-sans-condensed, \"Arial Narrow\", sans-serif;\n$font-weight-heading: 400;\n\n$font-family-detail: \"Roboto Mono\", monospace;\n// $font-weight-detail: 400;\n$font-weight-detail: normal;\n","$largest-container-width: 75.25rem !default;\n\n$gutter-width: 2rem !default;\n$gutter-width-mobile: 1.5rem !default;\n\n$column-count: 12 !default;\n$column-count-medium: 6 !default;\n$column-count-small: 4 !default;\n$column-count-tiny: 2 !default;\n","@use \"../../tools/colour\";\n@use \"../../tools/typography\";\n@use \"../../tools/spacing\";\n@use \"../../utilities\";\n\n.tna-tabs {\n @include spacing.space-below;\n\n &__list {\n margin: 0 0 1rem;\n padding: 0;\n\n display: flex;\n align-items: stretch;\n gap: 1rem;\n flex-wrap: nowrap;\n\n list-style: none;\n }\n\n &__list-item {\n }\n\n &__list-item-link {\n padding: 0.5rem 0;\n\n display: flex;\n\n align-items: center;\n position: relative;\n\n @include typography.relative-font-size(20);\n @include typography.heading-font;\n text-decoration: none;\n // line-height: 1.5;\n text-align: center;\n\n background: transparent;\n\n border: none;\n\n cursor: pointer;\n\n &,\n &:link,\n &:visited {\n @include colour.colour-font(\"font-dark\");\n }\n\n &::after {\n height: 0;\n\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n\n @include colour.colour-background(\"keyline-dark\");\n\n content: \"\";\n }\n\n &:hover,\n &--selected,\n &--selected:hover {\n text-decoration: none;\n\n &::after {\n height: 0.25rem;\n }\n }\n\n .tna-template--js-enabled & {\n @include colour.colour-font(\"font-light\");\n\n &:hover {\n &::after {\n height: 0.125rem;\n\n @include colour.colour-background(\"font-light\");\n }\n }\n\n &--selected {\n @include colour.colour-font(\"font-dark\");\n\n &::after,\n &:hover::after {\n height: 0.25rem;\n\n @include colour.colour-background(\"keyline-dark\");\n }\n }\n }\n }\n\n &__items {\n // &:not(:target-within) {\n // .tna-tabs__item:first-child {\n // display: block;\n // }\n // }\n }\n\n &__item {\n display: none;\n\n &:first-child {\n display: block;\n }\n\n &:has(~ :target) {\n display: none;\n }\n\n &:target {\n display: block;\n }\n\n .tna-template--js-enabled & {\n display: block;\n\n &[hidden] {\n display: none;\n }\n }\n\n .tna-template--clicked &:focus {\n outline: none;\n }\n }\n\n @include colour.on-high-contrast {\n &__list-item-link {\n padding-right: 1rem;\n padding-left: 1rem;\n\n overflow: hidden;\n\n @include colour.colour-border(\"keyline-dark\", 1px);\n }\n }\n}\n"]}
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/utilities/_typography.scss","../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/utilities/_a11y.scss","../../../../src/nationalarchives/utilities/_columns.scss","../../../../src/nationalarchives/variables/_grid.scss","../../../../src/nationalarchives/tools/_media.scss","../../../../src/nationalarchives/utilities/_global.scss","../../../../src/nationalarchives/utilities/_lists.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/utilities/_overrides.scss","../../../../src/nationalarchives/components/tabs/tabs.scss"],"names":[],"mappings":"CASQ,6CCqMR,0BACE,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEAtHA,mCAPA,4BACA,uBAiKF,0DACE,uCACA,qCACA,qCACA,uCACA,uCACA,2BACA,2CACA,iCACA,2CApKA,mCAPA,4BACA,uBAqLF,sBAjLE,yBAEA,wCA+LF,8BACE,6CACA,qBACA,0BACA,gCACA,qBACA,wBACA,8BACA,wBACA,kCACA,kCAIA,kCAIA,8CAjNA,mCClGF,4LACE,gBAEA,wVACE,aCLJ,qBACE,qBACA,sBACA,oBACA,qBAEA,6BACA,uBACA,wBACA,sBAEA,2BAEA,iCAEA,oBAEA,0CAEA,yDAEE,YAIJ,QACE,UFwHE,+BAIA,4CEzHF,uBAIA,8BACE,aCjCJ,aACE,WCFa,KDIb,gBACE,eAGF,gBACE,eEwBF,wBFhCF,aAYI,WCZgB,MC0BlB,kDFTI,sBACE,aAFS,EACX,sBACE,aAFS,EACX,sBACE,aAFS,EACX,sBACE,aAFS,GEgBf,wBFPI,qBACE,aAFS,EACX,qBACE,aAFS,EACX,qBACE,aAFS,EACX,qBACE,aAFS,GAOf,oBACE,mBAGF,mDACE,eGlCJ,MNKI,w7CMDJ,cACE,gBACA,WACA,YAUA,iCAEA,eN2EA,yBAEA,wCMzEA,2BAEA,4BNpBE,w7CMuBA,mCAHF,4BNdE,4+CMqBA,+BAPF,4BNRE,85CMkBE,8BACE,kCAIJ,+DAfF,4BNFE,y/CMsBF,2BNxCE,w7CM4CF,0BNtCE,2+CM0CF,mCNpCE,85CMuCA,qCACE,iCAGF,4DNrCA,w/CM0CF,4BNvBE,kDACA,kDACA,qDACA,sDACA,6CACA,qDACA,kDACA,uDMoBF,6BNxCE,sCACA,iDACA,yDACA,4CACA,4CACA,+CACA,gDACA,uCACA,+CACA,4CACA,iDACA,wDMiCF,2BN/BE,kDACA,kDACA,qD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kDN8KF,kDShME,oBHsDA,wBN0IF,kDShME,mBTgNF,gDS1LE,YCboB,gDDcpB,YCboB,IDVpB,eTqNA,gBMnMA,kDN8LF,gDShNE,oBHsDA,wBN0JF,gDShNE,kBTgOF,gDSnNE,YCNsB,KDPtB,mBTqOA,gBM/KA,wBN0KF,gDShOE,mBT4OF,gDS/NE,YCNsB,KDPtB,mBTiPA,gBAGF,sHAEE,mBACA,iBAEA,sNACE,cAGF,8MACE,gBACA,iBAkCF,wBACE,kBAKF,mBACE,SAEA,cAoBJ,gBAEE,eACA,gBACA,cACA,4BCtNI,8BAIA,kDDsNJ,uBACE,gBAGF,wBACE,kBAEA,wCACE,gBAGF,gCACE,gBAKN,kBS7TE,YCfmB,wBDgBnB,YCfmB,OT4EnB,WACA,uBQ1FA,mBT4VA,yBMtSA,wBNkSF,kBSxVE,iBTkWE,eAGF,oBACE,cACA,8BAEA,0BACE,gCYtWJ,gBACE,gBACA,UAEA,aACA,oBACA,SACA,iBAEA,gBAMF,0BACE,gBAEA,aAEA,mBACA,kBHzBF,kBAsBA,YCboB,gDDcpB,YCboB,IEmBlB,qBAEA,kBAEA,yBAEA,YAEA,eAEA,2FXkDF,WACA,uBW7CE,iCACE,SAEA,kBACA,QACA,SACA,OX2CJ,yBAEA,qCWzCI,WAGF,8GAGE,qBAEA,mIACE,cAIJ,oDXqBF,wBACA,wBWlBM,iEACE,eXqBR,mCAEA,mCWjBI,8DXUJ,WACA,uBWRM,gJAEE,cXUR,yBAEA,qCWIA,gBACE,aAEA,4BACE,cAGF,8BACE,aAGF,uBACE,cAGF,0CACE,cAEA,kDACE,aAIJ,6CACE,aAKF,6DACE,mBACA,kBAEA,gBXLA,yBAIA,qCA+LF,+BWlMA,sDACE,mBACA,kBAEA,gBXLA,yBAIA,sCKxEJ,aMgFE,gBACE,aAGF,gBACE,yBAEA,gCACE","file":"tabs.css","sourcesContent":["@use \"sass:math\";\n@use \"../tools/colour\";\n@use \"../tools/media\";\n@use \"../tools/spacing\";\n@use \"../tools/typography\";\n@use \"../variables/assets\";\n@use \"../variables/grid\";\n@use \"../variables/typography\" as typographyVars;\n\n@import \"https://use.typekit.net/hkj3kuz.css\";\n\n@font-face {\n font-family: \"Open Sans\";\n src: url(\"#{assets.$tna-font-path}/OpenSans-Medium.ttf\");\n font-weight: normal;\n font-style: normal;\n // font-display: swap;\n}\n\n@font-face {\n font-family: \"Open Sans\";\n src: url(\"#{assets.$tna-font-path}/OpenSans-Bold.ttf\");\n font-weight: bold;\n font-style: normal;\n // font-display: swap;\n}\n\n@font-face {\n font-family: \"Roboto Mono\";\n src: url(\"#{assets.$tna-font-path}/RobotoMono-Regular.ttf\");\n font-weight: normal;\n font-style: normal;\n // font-display: swap;\n}\n\n.tna-template {\n @include colour.colour-font(\"font-base\");\n @include typography.main-font;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n -webkit-text-size-adjust: none;\n direction: ltr;\n}\n\n.tna-template__body {\n color: inherit;\n @include typography.relative-font-size(typographyVars.$body-font-size-px);\n line-height: typographyVars.$body-line-height;\n\n @include media.on-mobile {\n @include typography.relative-font-size(\n typographyVars.$body-font-size-px-mobile\n );\n }\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nul,\nol {\n margin-top: 0;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nstrong {\n @include typography.main-font-weight-bold;\n}\n\np {\n margin: 1rem 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\na {\n @include colour.colour-font(\"link\");\n text-decoration-thickness: 1.5px;\n\n &:visited {\n @include colour.colour-font(\"link-visited\");\n }\n\n &:hover,\n &:active {\n @include typography.interacted-text-decoration;\n }\n}\n\nsmall {\n @include typography.relative-font-size(\n typographyVars.$body-font-size-px * 0.85\n );\n}\n\n.tna-chip-list {\n @include spacing.space-above;\n margin-bottom: 0;\n padding-left: 0;\n\n display: flex;\n flex-wrap: wrap;\n gap: 1rem;\n\n list-style: none;\n\n &__item {\n }\n}\n\n%chip {\n max-width: max-content;\n padding: 0.125em 0.25rem;\n\n display: block;\n\n @include typography.detail-font-small;\n line-height: 1;\n\n @include colour.accent;\n\n @include colour.colour-border(\"accent-background\", 0.125rem);\n}\n\n.tna-chip {\n @extend %chip;\n\n &--plain {\n color: inherit;\n\n background-color: transparent;\n\n border-color: transparent;\n }\n}\n\na.tna-chip {\n text-decoration: none;\n\n &,\n &:link,\n &:visited {\n @include colour.colour-font(\"font-dark\");\n }\n\n &:hover {\n @include typography.interacted-text-decoration;\n }\n\n &--plain {\n &,\n &:link,\n &:visited {\n color: inherit;\n }\n }\n}\n\n%heading {\n @include colour.colour-font(\"font-dark\");\n\n text-wrap: balance;\n\n &:not(.tna-heading--no-link-arrow) {\n a {\n display: inline-block;\n\n &::after {\n padding-left: 0.25rem;\n\n display: inline-block;\n\n font-weight: 700;\n\n content: \"\\203A\";\n }\n\n &:hover {\n &::after {\n padding-left: 0.5rem;\n }\n }\n }\n }\n}\n\n%heading-xl {\n @extend %heading;\n\n @include typography.heading-font;\n @include typography.relative-font-size(64);\n line-height: 1.2;\n\n @include media.on-medium {\n @include typography.relative-font-size(42);\n }\n\n @include media.on-mobile {\n @include typography.relative-font-size(36);\n }\n}\n\n%heading-l {\n @extend %heading;\n\n @include typography.heading-font;\n @include typography.relative-font-size(32);\n line-height: 1.3;\n\n @include media.on-medium {\n @include typography.relative-font-size(26);\n }\n\n @include media.on-mobile {\n @include typography.relative-font-size(24);\n }\n}\n\n%heading-m {\n @extend %heading;\n\n @include typography.main-font-weight-bold;\n @include typography.relative-font-size(22);\n line-height: 1.6;\n\n @include media.on-mobile {\n @include typography.relative-font-size(20);\n }\n}\n\n%heading-s {\n @extend %heading;\n\n @include typography.main-font-weight-bold;\n @include typography.relative-font-size(18);\n line-height: 1.6;\n}\n\n%headings-and-heading-groups {\n @include spacing.space-above;\n margin-bottom: 1rem;\n padding-top: 1rem;\n\n &:first-child {\n padding-top: 0;\n }\n\n &:last-child {\n margin-bottom: 0;\n padding-bottom: 0;\n }\n}\n\n.tna-heading {\n &-xl {\n @extend %heading-xl;\n @extend %headings-and-heading-groups;\n }\n\n &-l {\n @extend %heading-l;\n @extend %headings-and-heading-groups;\n }\n\n &-m {\n @extend %heading-m;\n @extend %headings-and-heading-groups;\n }\n\n &-s {\n @extend %heading-s;\n @extend %headings-and-heading-groups;\n }\n}\n\n.tna-hgroup {\n &-xl,\n &-l,\n &-m,\n &-s {\n @extend %headings-and-heading-groups;\n }\n\n &__supertitle {\n margin: 0 0 0.25rem;\n\n @extend %chip;\n }\n\n &__title {\n margin: 0;\n\n display: block;\n }\n\n &-xl &__title {\n @extend %heading-xl;\n }\n\n &-l &__title {\n @extend %heading-l;\n }\n\n &-m &__title {\n @extend %heading-m;\n }\n\n &-s &__title {\n @extend %heading-s;\n }\n}\n\n.tna-blockquote {\n @include spacing.space-above;\n margin-right: 0;\n margin-bottom: 0;\n margin-left: 0;\n padding: 1rem 1rem 1rem 2rem;\n\n @include colour.colour-border(\"accent-background\", 0.35rem, solid, left);\n\n &__quote {\n font-weight: 700;\n }\n\n &__author {\n font-style: italic;\n\n .tna-blockquote & {\n margin: 1rem 0 0;\n }\n\n &::before {\n content: \"\\2014\" \" \";\n }\n }\n}\n\n.tna-scene-setter {\n @include typography.detail-font;\n @include colour.colour-font(\"font-dark\");\n @include typography.relative-font-size(30);\n line-height: math.div(50, 30);\n\n @include spacing.space-above;\n\n @include media.on-mobile {\n @include typography.relative-font-size(24);\n line-height: 2;\n }\n\n a {\n color: inherit;\n text-decoration-thickness: 2px;\n\n &:hover {\n text-decoration-thickness: 4.5px;\n }\n }\n}\n","@use \"sass:map\";\n@use \"../variables/colour\";\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() {\n @each $name, $value in colour.$colour-palette-default {\n --#{$name}: #{$value};\n }\n}\n\n@mixin colour-css-vars-dark() {\n @each $name, $value in colour.$colour-palette-dark {\n --#{$name}: #{$value};\n }\n}\n\n@mixin colour-css-vars-high-contrast() {\n @each $name, $value in colour.$colour-palette-high-contrast {\n --#{$name}: #{$value};\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark() {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n --#{$name}: #{$value};\n }\n}\n\n@mixin accent-css-vars($colour) {\n @if $colour == \"yellow\" {\n --accent: #{brand-colour(\"yellow\")} !important;\n --accent-background: #{brand-colour(\"yellow\")} !important;\n --accent-background-light: #{brand-colour(\"cream\")} !important;\n --accent-font-base: #{brand-colour(\"black\")} !important;\n --accent-font-dark: #{brand-colour(\"black\")} !important;\n --accent-font-light: #{brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{brand-colour(\"black\", 0.45)} !important;\n --accent-link: #{brand-colour(\"black\")} !important;\n --accent-link-visited: #{brand-colour(\"black\")} !important;\n --accent-keyline: #{brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{brand-colour(\"black\", 0.8)} !important;\n --button-accent-background: #{brand-colour(\"yellow\")} !important;\n } @else {\n --accent-font-base: #{brand-colour(\"white\")} !important;\n --accent-font-dark: #{brand-colour(\"white\")} !important;\n --accent-font-light: #{brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{brand-colour(\"white\", 0.45)} !important;\n --accent-link: #{brand-colour(\"white\")} !important;\n --accent-link-visited: #{brand-colour(\"white\")} !important;\n --accent-keyline: #{brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{brand-colour(\"white\", 0.8)} !important;\n\n @if $colour == \"black\" {\n // --accent: #{brand-colour(\"light-grey\")} !important;\n // --accent-background: #{brand-colour(\"black\")} !important;\n // --accent-background-light: #{brand-colour(\"light-grey\")} !important;\n // --button-accent-text: #{brand-colour(\"black\")} !important;\n // --button-accent-background: #{brand-colour(\"grey\")} !important;\n } @else {\n --button-accent-text: #{brand-colour(\"white\")} !important;\n @if $colour == \"pink\" {\n --accent: #{brand-colour(\"pink\")} !important;\n --accent-background: #{brand-colour(\"maroon\")} !important;\n --accent-background-light: #{brand-colour(\"pastel-pink\")} !important;\n --button-accent-background: #{brand-colour(\"maroon\")} !important;\n } @else if $colour == \"orange\" {\n --accent: #{brand-colour(\"orange\")} !important;\n --accent-background: #{brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{brand-colour(\"pastel-orange\")} !important;\n --button-accent-background: #{brand-colour(\"chestnut\")} !important;\n } @else if $colour == \"green\" {\n --accent: #{brand-colour(\"green\")} !important;\n --accent-background: #{brand-colour(\"forest\")} !important;\n --accent-background-light: #{brand-colour(\"pastel-green\")} !important;\n --button-accent-background: #{brand-colour(\"forest\")} !important;\n } @else if $colour == \"blue\" {\n --accent: #{brand-colour(\"blue\")} !important;\n --accent-background: #{brand-colour(\"navy\")} !important;\n --accent-background-light: #{brand-colour(\"pastel-blue\")} !important;\n --button-accent-background: #{brand-colour(\"navy\")} !important;\n }\n }\n }\n}\n\n@mixin colour-font(\n $colour,\n $important: false,\n $default-palette: colour.$colour-palette-default\n) {\n color: map.get($default-palette, $colour) if($important, !important, null);\n color: var(--#{$colour}) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n background-color: var(--#{$colour}) 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 $property: border-#{$direction};\n border-#{$direction}: $width\n map.get(colour.$colour-palette-default, $colour)\n $style\n if($important, !important, null);\n border-#{$direction}: $width\n var(--#{$colour})\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: map.get(\n colour.$colour-palette-default,\n $colour\n )\n if($important, !important, null);\n border-#{$direction}-color: var(--#{$colour})\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n map.get(colour.$colour-palette-default, $colour)\n $style\n if($important, !important, null);\n border: $width var(--#{$colour}) $style if($important, !important, null);\n } @else {\n border-color: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n border-color: var(--#{$colour}) if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width\n map.get(colour.$colour-palette-default, $colour)\n $style\n if($important, !important, null);\n outline: $width var(--#{$colour}) $style if($important, !important, null);\n } @else {\n outline-color: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n outline-color: var(--#{$colour}) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n fill: var(--#{$colour}) if($important, !important, null);\n}\n\n%plain {\n .tna-template--system-theme & {\n @include colour-css-vars;\n\n @media (prefers-color-scheme: dark) {\n @include colour-css-vars-dark;\n }\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast;\n }\n\n @media (prefers-contrast: more) and (prefers-color-scheme: dark) {\n @include colour-css-vars-high-contrast-dark;\n }\n }\n\n .tna-template--light-theme & {\n @include colour-css-vars;\n }\n\n .tna-template--dark-theme & {\n @include colour-css-vars-dark;\n }\n\n .tna-template--high-contrast-theme & {\n @include colour-css-vars-high-contrast;\n }\n\n .tna-template--high-contrast-theme.tna-template--dark-theme & {\n @include colour-css-vars-high-contrast-dark;\n }\n\n --background: var(--page-background);\n}\n\n@mixin plain {\n @extend %plain;\n}\n\n%invert {\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\", false, colour.$colour-palette-dark);\n}\n\n@mixin invert {\n @extend %invert;\n}\n\n%invert-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\", false, colour.$colour-palette-dark);\n }\n}\n\n@mixin invert-on-mobile {\n @extend %invert-on-mobile;\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-visited);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\", false, colour.$colour-palette-dark);\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%tint-background {\n @include colour-background(\"background-tint\");\n}\n\n@mixin tint-background {\n @extend %tint-background;\n}\n\n%accent-background {\n @include colour-background(\"accent-background\");\n}\n\n@mixin accent-background {\n @extend %accent-background;\n}\n\n%light-accent-background {\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 --link: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\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\n @include colour-background(\"background\");\n}\n\n@mixin light-accent-background {\n @extend %light-accent-background;\n}\n\n@mixin on-high-contrast {\n .tna-template--high-contrast-theme & {\n @content;\n }\n\n .tna-template--system-theme & {\n @media (prefers-contrast: more) {\n @content;\n }\n }\n}\n","@use \"sass:map\";\n@use \"../variables/spacing\";\n\n%space-above {\n margin-top: 2rem;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above {\n @extend %space-above;\n}\n\n@function spacing($size) {\n @return map.get(spacing.$spacing, $size);\n}\n\n@function spacing-mobile($size) {\n @return map.get(spacing.$spacing-mobile, $size);\n}\n","@use \"../tools/colour\";\n\n.tna-visually-hidden {\n width: 1px !important;\n height: 1px !important;\n margin: 0 !important;\n padding: 0 !important;\n\n position: absolute !important;\n top: -9999px !important;\n left: -9999px !important;\n z-index: -1 !important;\n\n overflow: hidden !important;\n\n clip: rect(0, 0, 0, 0) !important;\n\n border: 0 !important;\n\n background-color: transparent !important;\n\n &::before,\n &::after {\n content: \"\\00a0\";\n }\n}\n\n*:focus {\n z-index: 9;\n\n @include colour.colour-outline(\"focus-outline\", 0.3125rem, solid);\n outline-offset: 0.125rem;\n}\n\n.tna-\\!--no-focus-style {\n &:focus {\n outline: none;\n }\n}\n","@use \"../tools/media\";\n@use \"../variables/grid\";\n\n.tna-columns {\n column-gap: grid.$gutter-width;\n\n &--2 {\n column-count: 2;\n }\n\n &--3 {\n column-count: 3;\n }\n\n @include media.on-tiny {\n column-gap: grid.$gutter-width-tiny;\n }\n\n @include media.on-small {\n @for $i from 1 through 4 {\n &--#{$i}-small {\n column-count: $i;\n }\n }\n }\n\n @include media.on-tiny {\n @for $i from 1 through 4 {\n &--#{$i}-tiny {\n column-count: $i;\n }\n }\n }\n\n &__block {\n break-inside: avoid;\n }\n\n &:has(&__block:only-of-type) {\n column-count: 1;\n }\n}\n","$largest-container-width: 75.25rem !default;\n\n$gutter-width: 2rem !default;\n$gutter-width-tiny: 1rem !default;\n\n$column-count: 12;\n$column-count-medium: 6;\n$column-count-small: 4;\n$column-count-tiny: 2;\n","@use \"../variables/media\";\n\n// 0 ======= 320 = 480 ===== 768 == 1024 ========================== min-width/max-width (px)\n// | . | | |\n// |-TINY----------|-SMALL---|-MED--|-LARGE------------------------\n// | . | | |\n// |<------------->| | | on-tiny\n// |<----------------------->| | on-mobile\n// |<------------------------------>| on-smaller-than-large\n// | . |<------->| | on-small\n// | . |<------------------------- on-larger-than-tiny\n// | . | |<---->| on-medium\n// | . | |<--------------- on-larger-than-mobile\n// | . | | |<-------- on-large\n// |<------->. | | | Smallest device\n\n@mixin on-large() {\n @media #{media.$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{media.$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{media.$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{media.$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{media.$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{media.$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{media.$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{media.$media-mobile} {\n @content;\n }\n}\n\n@mixin on-print() {\n @media print {\n @content;\n }\n}\n","@use \"../tools/colour\";\n@use \"../tools/media\";\n@use \"../tools/spacing\";\n@use \"../variables/typography\";\n\n:root {\n @include colour.colour-css-vars;\n}\n\n.tna-template {\n min-width: 320px;\n width: 100%;\n height: 100%;\n\n /*\n * ------------------------------------------\n * Support ended with iOS 13 released on 19th\n * September 2019. Deprecate in the future if\n * iOS <13 share drops low enough.\n * https://caniuse.com/mdn-css_properties_-webkit-overflow-scrolling\n * ------------------------------------------\n */\n -webkit-overflow-scrolling: touch;\n\n font-size: #{typography.$relative-1rem-px}px;\n\n @include colour.colour-background(\"page-background\");\n\n accent-color: var(--accent);\n\n &--system-theme {\n @include colour.colour-css-vars;\n\n @media (prefers-color-scheme: dark) {\n @include colour.colour-css-vars-dark;\n }\n\n @media (prefers-contrast: more) {\n @include colour.colour-css-vars-high-contrast;\n\n * {\n background-image: none !important;\n }\n }\n\n @media (prefers-contrast: more) and (prefers-color-scheme: dark) {\n @include colour.colour-css-vars-high-contrast-dark;\n }\n }\n\n &--light-theme {\n @include colour.colour-css-vars;\n }\n\n &--dark-theme {\n @include colour.colour-css-vars-dark;\n }\n\n &--high-contrast-theme {\n @include colour.colour-css-vars-high-contrast;\n\n * {\n background-image: none !important;\n }\n\n &.tna-template--dark-theme {\n @include colour.colour-css-vars-high-contrast-dark;\n }\n }\n\n &--black-accent {\n @include colour.accent-css-vars(\"black\");\n }\n\n &--yellow-accent {\n @include colour.accent-css-vars(\"yellow\");\n }\n\n &--pink-accent {\n @include colour.accent-css-vars(\"pink\");\n }\n\n &--orange-accent {\n @include colour.accent-css-vars(\"orange\");\n }\n\n &--green-accent {\n @include colour.accent-css-vars(\"green\");\n }\n\n &--blue-accent {\n @include colour.accent-css-vars(\"blue\");\n }\n\n @media (prefers-reduced-motion) {\n * {\n animation: none !important;\n transition: none !important;\n }\n }\n}\n\n.tna-template__body {\n min-height: 100%;\n margin: 0;\n padding: 0;\n\n &:has(.tna-header):has(#main-content[role=\"main\"]):has(.tna-footer) {\n display: flex;\n flex-direction: column;\n\n #main-content[role=\"main\"] {\n flex: 1;\n }\n }\n}\n\nimg,\nsvg,\npicture,\nvideo,\ncanvas {\n max-width: 100%;\n\n display: block;\n}\n\nvideo,\ncanvas {\n width: 100%;\n}\n\n[hidden] {\n display: none;\n}\n\nhr {\n margin: 0;\n\n border-width: 1px 0 0;\n @include colour.colour-border(\"keyline\");\n border-style: solid;\n}\n\n.tna-section {\n padding-top: 3rem;\n padding-bottom: 3rem;\n\n @include media.on-mobile {\n padding-top: 2rem;\n padding-bottom: 2rem;\n }\n}\n\n.tna-aside {\n padding: 2rem;\n\n @include spacing.space-above;\n\n @include media.on-mobile {\n padding: 1rem;\n }\n\n @include colour.on-high-contrast {\n @include colour.colour-border(\"keyline-dark\", 1px);\n }\n\n &--tight {\n padding: 1rem;\n }\n}\n\n.tna-background {\n &--contrast {\n @include colour.invert;\n }\n\n &--accent {\n @include colour.accent;\n }\n\n &--accent-light {\n @include colour.light-accent-background;\n }\n\n &--tint {\n @include colour.tint-background;\n }\n}\n","@use \"../tools/colour\";\n@use \"../tools/media\";\n@use \"../tools/spacing\";\n@use \"../tools/typography\";\n\n.tna-ul,\n.tna-ol {\n margin: 1rem 0;\n padding: 0 0 0 2rem;\n\n &:first-child {\n margin-top: 0;\n }\n\n li::marker {\n @include colour.colour-font(\"accent-background\");\n font-weight: 700;\n }\n\n &--plain {\n padding-left: 0;\n\n list-style: none;\n }\n}\n\n.tna-dl {\n margin: 1rem 0;\n\n display: flex;\n flex-wrap: wrap;\n\n &:first-child {\n margin-top: 0;\n }\n\n dt,\n dd {\n margin: 0;\n padding: 0.5rem 1rem;\n\n position: relative;\n\n box-sizing: border-box;\n\n word-wrap: break-word;\n // word-break: break-all;\n }\n\n &--plain {\n dt {\n padding-left: 0;\n }\n\n dd {\n padding-right: 0;\n }\n }\n\n dt {\n width: 30%;\n\n @include typography.main-font-weight-bold;\n }\n\n dd {\n width: 70%;\n\n + dd {\n margin-left: 30%;\n }\n }\n\n &--icon-padding {\n dt {\n padding-left: 3rem !important;\n\n position: relative;\n\n .fa-solid {\n overflow: visible;\n\n position: absolute;\n top: 50%;\n left: 1rem;\n\n @include colour.colour-font(\"icon-light\");\n text-align: left;\n\n transform: translateY(-50%);\n }\n }\n }\n\n &--icon-padding#{&}--plain {\n dt {\n padding-left: 2rem !important;\n\n .fa-solid {\n left: 0;\n }\n }\n\n dd {\n padding-left: 2rem;\n }\n }\n\n &:not(&--plain) {\n dt:first-child,\n dd:nth-of-type(2n) + dt,\n dd:nth-of-type(2n + 1) {\n @include colour.colour-background(\"background-tint\");\n }\n }\n\n @include media.on-small {\n dt {\n width: 35%;\n }\n\n dd {\n width: 65%;\n\n + dd {\n margin-left: 35%;\n }\n }\n }\n\n @include media.on-tiny {\n dt,\n dd {\n width: 100%;\n margin-left: 0;\n }\n\n dd {\n padding-left: 1rem;\n }\n\n &--plain {\n dt {\n padding-bottom: 0;\n }\n\n dd {\n padding-top: 0;\n // padding-left: 2rem;\n\n + dt {\n // @include colour.colour-border(\"keyline\", 1px, solid, top);\n }\n }\n }\n\n &:not(&--plain) {\n dt {\n @include colour.colour-background(\"background-tint\");\n }\n\n dd {\n background: transparent !important;\n }\n }\n }\n\n @include colour.on-high-contrast {\n @include colour.colour-border(\"keyline-dark\", 1px, solid, bottom);\n\n dt,\n dd {\n // padding-left: 0;\n // padding-right: 0;\n\n background: transparent !important;\n\n @include colour.colour-border(\"keyline-dark\", 1px, solid, top);\n }\n }\n}\n","@use \"sass:math\";\n@use \"colour\";\n@use \"../variables/typography\";\n\n@mixin relative-font-size($fontSizePx) {\n font-size: #{math.div($fontSizePx, typography.$relative-1rem-px)}rem;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n}\n\n@mixin main-font-weight {\n font-weight: typography.$font-weight-main;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$font-weight-main-bold;\n}\n\n@mixin main-font {\n font-family: typography.$font-family-main;\n @include main-font-weight;\n}\n\n@mixin heading-font {\n font-family: typography.$font-family-heading;\n font-weight: typography.$font-weight-heading;\n}\n\n@mixin detail-font {\n font-family: typography.$font-family-detail;\n font-weight: typography.$font-weight-detail;\n}\n\n@mixin detail-font-small {\n @include colour.colour-font(\"font-dark\");\n @include detail-font;\n @include relative-font-size(14);\n text-transform: uppercase;\n line-height: #{math.div(typography.$relative-1rem-px, 14)};\n // line-height: 1;\n}\n","@use \"sass:math\";\n\n$relative-1rem-px: 16;\n\n$body-font-size-px: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: #{math.div(16, 18) * 2} !default; // 1.77777\n\n$interactive-text-decoration-thickness: 3.5px !default;\n\n$font-family-main: \"Open Sans\", sans-serif !default;\n$font-weight-main: normal !default; // Defined in utilities/_typography.scss\n$font-weight-main-bold: bold !default; // Defined in utilities/_typography.scss\n\n$font-family-heading: supria-sans-condensed, \"Arial Narrow\", sans-serif !default;\n$font-weight-heading: 500 !default;\n\n$font-family-detail: \"Roboto Mono\", monospace !default;\n$font-weight-detail: normal !default;\n","@use \"../variables/spacing\";\n@use \"../tools/media\";\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n\n @each $property in margin, padding {\n @each $direction in top, bottom {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-vertical#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n}\n\n@mixin overrides($spacing, $suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in $spacing {\n .tna-\\!--#{$property}-#{$direction}-#{$size}#{$suffix},\n .tna-\\!--#{$property}-vertical-#{$size}#{$suffix} {\n #{$property}-#{$direction}: #{$amount} !important;\n }\n }\n }\n }\n}\n\n@include no-spacing-generator;\n@include overrides(spacing.$spacing);\n\n@include media.on-medium {\n @include no-spacing-generator(\"medium\");\n @include overrides(spacing.$spacing, \"medium\");\n}\n\n@include media.on-small {\n @include no-spacing-generator(\"small\");\n @include overrides(spacing.$spacing-mobile, \"small\");\n}\n\n@include media.on-tiny {\n @include no-spacing-generator(\"tiny\");\n @include overrides(spacing.$spacing-mobile, \"tiny\");\n}\n","@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n@use \"../../utilities\";\n\n.tna-tabs {\n @include spacing.space-above;\n\n &__list {\n margin: 0 0 1rem;\n padding: 0;\n\n display: flex;\n align-items: stretch;\n gap: 1rem;\n flex-wrap: nowrap;\n\n list-style: none;\n }\n\n &__list-item {\n }\n\n &__list-item-link {\n padding: 0.5rem 0;\n\n display: flex;\n\n align-items: center;\n position: relative;\n\n @include typography.relative-font-size(20);\n @include typography.heading-font;\n text-decoration: none;\n // line-height: 1.5;\n text-align: center;\n\n background: transparent;\n\n border: none;\n\n cursor: pointer;\n\n &,\n &:link,\n &:visited {\n @include colour.colour-font(\"font-dark\");\n }\n\n &::after {\n height: 0;\n\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n\n @include colour.colour-background(\"keyline-dark\");\n\n content: \"\";\n }\n\n &:hover,\n &--selected,\n &--selected:hover {\n text-decoration: none;\n\n &::after {\n height: 0.25rem;\n }\n }\n\n .tna-template--js-enabled & {\n @include colour.colour-font(\"font-light\");\n\n &:hover {\n &::after {\n height: 0.125rem;\n\n @include colour.colour-background(\"font-light\");\n }\n }\n\n &--selected {\n @include colour.colour-font(\"font-dark\");\n\n &::after,\n &:hover::after {\n height: 0.25rem;\n\n @include colour.colour-background(\"keyline-dark\");\n }\n }\n }\n }\n\n &__items {\n // &:not(:target-within) {\n // .tna-tabs__item:first-child {\n // display: block;\n // }\n // }\n }\n\n &__item {\n display: none;\n\n &:first-child {\n display: block;\n }\n\n &:has(~ :target) {\n display: none;\n }\n\n &:target {\n display: block;\n }\n\n .tna-template--js-enabled & {\n display: block;\n\n &[hidden] {\n display: none;\n }\n }\n\n .tna-template--clicked &:focus {\n outline: none;\n }\n }\n\n @include colour.on-high-contrast {\n &__list-item-link {\n padding-right: 1rem;\n padding-left: 1rem;\n\n overflow: hidden;\n\n @include colour.colour-border(\"keyline-dark\", 1px);\n }\n }\n\n @include media.on-print {\n &__list {\n display: none;\n }\n\n &__item {\n display: block !important;\n\n & + & {\n margin-top: 2rem;\n }\n }\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={d:(e,i)=>{for(var r in i)t.o(i,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:i[r]})},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 r(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=t[i];return r}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,s=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(s)?s:String(s)),n)}var s}t.r(e),t.d(e,{Tabs:()=>a});var a=function(){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&&e.querySelectorAll(".tna-tabs__list-item-link"),this.$tabItems=e&&e.querySelectorAll(".tna-tabs__item")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$tabList&&this.$tabListItemLinks&&this.$tabItems&&this.$tabListItemLinks.length===this.$tabItems.length){this.sticky=this.$module.classList.contains("tna-tabs--sticky");var e=window.location.hash.replace(/^#/,"");this.$newTabList=document.createElement("div"),this.$newTabList.setAttribute("role","tablist"),this.$newTabList.setAttribute("class",this.$tabList.getAttribute("class")),this.$tabItems.forEach((function(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,i)=>{for(var r in i)t.o(i,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:i[r]})},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 r(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=t[i];return r}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,s=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(s)?s:String(s)),n)}var s}t.r(e),t.d(e,{Tabs:()=>a});var a=function(){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&&e.querySelectorAll(".tna-tabs__list-item-link"),this.$tabItems=e&&e.querySelectorAll(".tna-tabs__item")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$tabList&&this.$tabListItemLinks&&this.$tabItems&&this.$tabListItemLinks.length===this.$tabItems.length){this.sticky=this.$module.classList.contains("tna-tabs--sticky");var e=window.location.hash.replace(/^#/,""),i=r(this.$tabItems).some((function(t){return t.getAttribute("id")===e}));this.$newTabList=document.createElement("div"),this.$newTabList.setAttribute("role","tablist"),this.$newTabList.setAttribute("class",this.$tabList.getAttribute("class")),this.$tabItems.forEach((function(t,r){t.setAttribute("role","tabpanel"),t.setAttribute("aria-labelledby","".concat(t.getAttribute("id"),"-tab")),t.setAttribute("tabindex","0"),(i&&t.getAttribute("id")!==e||!i&&r>0)&&t.setAttribute("hidden",!0)})),this.$tabListItemLinks.forEach((function(e){var i=document.createElement("button");i.innerText=e.innerText,i.setAttribute("class",e.getAttribute("class")),i.setAttribute("role","tab"),i.setAttribute("id",e.getAttribute("id")),i.setAttribute("aria-controls",e.getAttribute("href").replace(/^#/,"")),i.setAttribute("tabindex","-1"),t.$newTabList.appendChild(i)})),this.$tabList.replaceWith(this.$newTabList),this.$tabListItemLinks=this.$module.querySelectorAll(".tna-tabs__list-item-link"),this.$tabListItemLinks.forEach((function(i,r){e&&i.getAttribute("aria-controls")==="".concat(e)||!e&&0===r?(i.classList.add("tna-tabs__list-item-link--selected"),i.setAttribute("aria-selected",!0),i.setAttribute("tabindex","0")):i.setAttribute("aria-selected",!1),i.addEventListener("keydown",(function(e){return t.handleItemLinkKeyDown(e)}),!0),i.addEventListener("click",(function(e){return t.handleItemLinkClick(e)}),!0)}))}}},{key:"handleItemLinkClick",value:function(t){t.preventDefault();var e=t.currentTarget.getAttribute("aria-controls");this.switchTab(e)}},{key:"handleItemLinkKeyDown",value:function(t){var e=t.currentTarget,i=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":this.setSelectedToPreviousTab(e),i=!0;break;case"ArrowRight":case"ArrowDown":this.setSelectedToNextTab(e),i=!0;break;case"Home":this.switchTab(this.$tabListItemLinks[0].getAttribute("aria-controls")),i=!0;break;case"End":this.switchTab(this.$tabListItemLinks[this.$tabListItemLinks.length-1].getAttribute("aria-controls")),i=!0}i&&(t.stopPropagation(),t.preventDefault())}},{key:"setSelectedToNextTab",value:function(t){console.log("setSelectedToNextTab",t);var e,i=r(this.$tabListItemLinks).findIndex((function(e){return e.getAttribute("id")===t.getAttribute("id")}));e=i<this.$tabListItemLinks.length-1?i+1:0,console.log(i,e),this.switchTab(this.$tabListItemLinks[e].getAttribute("aria-controls"))}},{key:"setSelectedToPreviousTab",value:function(t){console.log("setSelectedToPreviousTab",t);var e,i=r(this.$tabListItemLinks).findIndex((function(e){return e.getAttribute("id")===t.getAttribute("id")}));e=i>=1?i-1:this.$tabListItemLinks.length-1,console.log(i,e),this.switchTab(this.$tabListItemLinks[e].getAttribute("aria-controls"))}},{key:"switchTab",value:function(t){this.$tabListItemLinks.forEach((function(e){e.getAttribute("aria-controls")===t?(e.classList.add("tna-tabs__list-item-link--selected"),e.setAttribute("aria-selected",!0),e.setAttribute("tabindex","0"),e.focus()):(e.classList.remove("tna-tabs__list-item-link--selected"),e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"))})),this.$tabItems.forEach((function(e){e.getAttribute("id")===t?(e.removeAttribute("hidden"),e.setAttribute("tabindex","0")):(e.setAttribute("hidden",!0),e.setAttribute("tabindex","-1"))})),this.sticky&&(history.replaceState?history.replaceState(null,null,"#".concat(t)):location.hash="#".concat(t))}}])&&s(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();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,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Aa,WAAY,OAElCG,EAASH,aAAa,UAAU,GAChCG,EAASH,aAAa,WAAY,MAEtC,IAEInB,KAAKQ,SACH+C,QAAQC,aACVD,QAAQC,aAAa,KAAM,KAAM,IAAFhC,OAAM2B,IAErCtC,SAASC,KAAO,IAAHU,OAAO2B,GAG1B,M,oEAACtD,CAAA,CAtNc,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 $module.querySelectorAll(\".tna-tabs__list-item-link\");\n this.$tabItems = $module && $module.querySelectorAll(\".tna-tabs__item\");\n }\n\n init() {\n if (\n !this.$module ||\n !this.$tabList ||\n !this.$tabListItemLinks ||\n !this.$tabItems ||\n this.$tabListItemLinks.length !== this.$tabItems.length\n ) {\n return;\n }\n\n this.sticky = this.$module.classList.contains(\"tna-tabs--sticky\");\n\n const startingTarget = window.location.hash.replace(/^#/, \"\");\n\n this.$newTabList = document.createElement(\"div\");\n this.$newTabList.setAttribute(\"role\", \"tablist\");\n this.$newTabList.setAttribute(\"class\", this.$tabList.getAttribute(\"class\"));\n\n this.$tabItems.forEach(($tabItem, index) => {\n $tabItem.setAttribute(\"role\", \"tabpanel\");\n $tabItem.setAttribute(\n \"aria-labelledby\",\n `${$tabItem.getAttribute(\"id\")}-tab`,\n );\n $tabItem.setAttribute(\"tabindex\", \"0\");\n if (\n (startingTarget && $tabItem.getAttribute(\"id\") !== startingTarget) ||\n (!startingTarget && index > 0)\n ) {\n $tabItem.setAttribute(\"hidden\", true);\n }\n });\n\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n const $replacementButton = document.createElement(\"button\");\n $replacementButton.innerText = $tabListItemLink.innerText;\n $replacementButton.setAttribute(\n \"class\",\n $tabListItemLink.getAttribute(\"class\"),\n );\n $replacementButton.setAttribute(\"role\", \"tab\");\n $replacementButton.setAttribute(\n \"id\",\n $tabListItemLink.getAttribute(\"id\"),\n );\n $replacementButton.setAttribute(\n \"aria-controls\",\n $tabListItemLink.getAttribute(\"href\").replace(/^#/, \"\"),\n );\n $replacementButton.setAttribute(\"tabindex\", \"-1\");\n this.$newTabList.appendChild($replacementButton);\n });\n\n this.$tabList.replaceWith(this.$newTabList);\n\n this.$tabListItemLinks = this.$module.querySelectorAll(\n \".tna-tabs__list-item-link\",\n );\n\n this.$tabListItemLinks.forEach(($tabListItemLink, index) => {\n if (\n (startingTarget &&\n $tabListItemLink.getAttribute(\"aria-controls\") ===\n `${startingTarget}`) ||\n (!startingTarget && index === 0)\n ) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n }\n\n $tabListItemLink.addEventListener(\n \"keydown\",\n (e) => this.handleItemLinkKeyDown(e),\n true,\n );\n $tabListItemLink.addEventListener(\n \"click\",\n (e) => this.handleItemLinkClick(e),\n true,\n );\n });\n }\n\n handleItemLinkClick(itemLinkClickEvent) {\n itemLinkClickEvent.preventDefault();\n const targetItem =\n itemLinkClickEvent.currentTarget.getAttribute(\"aria-controls\");\n\n this.switchTab(targetItem);\n }\n\n handleItemLinkKeyDown(itemLinkKeyDownEvent) {\n const targetItem = itemLinkKeyDownEvent.currentTarget;\n let overwriteKeyAction = false;\n\n switch (itemLinkKeyDownEvent.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.setSelectedToPreviousTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.setSelectedToNextTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"Home\":\n this.switchTab(this.$tabListItemLinks[0].getAttribute(\"aria-controls\"));\n overwriteKeyAction = true;\n break;\n\n case \"End\":\n this.switchTab(\n this.$tabListItemLinks[\n this.$tabListItemLinks.length - 1\n ].getAttribute(\"aria-controls\"),\n );\n overwriteKeyAction = true;\n break;\n\n default:\n break;\n }\n\n if (overwriteKeyAction) {\n itemLinkKeyDownEvent.stopPropagation();\n itemLinkKeyDownEvent.preventDefault();\n }\n }\n\n setSelectedToNextTab(targetItem) {\n console.log(\"setSelectedToNextTab\", targetItem);\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex < this.$tabListItemLinks.length - 1) {\n newIndex = currentIndex + 1;\n } else {\n newIndex = 0;\n }\n console.log(currentIndex, newIndex);\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n setSelectedToPreviousTab(targetItem) {\n console.log(\"setSelectedToPreviousTab\", targetItem);\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex >= 1) {\n newIndex = currentIndex - 1;\n } else {\n newIndex = this.$tabListItemLinks.length - 1;\n }\n console.log(currentIndex, newIndex);\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n switchTab(targetId) {\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n if ($tabListItemLink.getAttribute(\"aria-controls\") === targetId) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n $tabListItemLink.focus();\n } else {\n $tabListItemLink.classList.remove(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n $tabListItemLink.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n this.$tabItems.forEach(($tabItem) => {\n if ($tabItem.getAttribute(\"id\") === targetId) {\n $tabItem.removeAttribute(\"hidden\");\n $tabItem.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabItem.setAttribute(\"hidden\", true);\n $tabItem.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n if (this.sticky) {\n if (history.replaceState) {\n history.replaceState(null, null, `#${targetId}`);\n } else {\n location.hash = `#${targetId}`;\n }\n }\n }\n}\n"],"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","_this","length","sticky","classList","contains","startingTarget","window","location","hash","replace","$newTabList","document","createElement","setAttribute","getAttribute","forEach","$tabItem","index","concat","$tabListItemLink","$replacementButton","innerText","appendChild","replaceWith","add","addEventListener","e","handleItemLinkKeyDown","handleItemLinkClick","itemLinkClickEvent","preventDefault","targetItem","currentTarget","switchTab","itemLinkKeyDownEvent","overwriteKeyAction","setSelectedToPreviousTab","setSelectedToNextTab","stopPropagation","console","log","newIndex","currentIndex","_toConsumableArray","findIndex","targetId","focus","remove","removeAttribute","history","replaceState"],"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,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,m7CCLvD,IAAMC,EAAI,WACf,SAAAA,EAAYC,I,4FAASC,CAAA,KAAAF,GACnBG,KAAKF,QAAUA,EACfE,KAAKC,SAAWH,GAAWA,EAAQI,cAAc,mBACjDF,KAAKG,kBACHL,GACAE,KAAKC,UACLH,EAAQM,iBAAiB,6BAC3BJ,KAAKK,UAA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efinition","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 $module.querySelectorAll(\".tna-tabs__list-item-link\");\n this.$tabItems = $module && $module.querySelectorAll(\".tna-tabs__item\");\n }\n\n init() {\n if (\n !this.$module ||\n !this.$tabList ||\n !this.$tabListItemLinks ||\n !this.$tabItems ||\n this.$tabListItemLinks.length !== this.$tabItems.length\n ) {\n return;\n }\n\n this.sticky = this.$module.classList.contains(\"tna-tabs--sticky\");\n\n const startingTarget = window.location.hash.replace(/^#/, \"\");\n const doesStartingTargetExist = [...this.$tabItems].some(\n ($tabItem) => $tabItem.getAttribute(\"id\") === startingTarget,\n );\n\n this.$newTabList = document.createElement(\"div\");\n this.$newTabList.setAttribute(\"role\", \"tablist\");\n this.$newTabList.setAttribute(\"class\", this.$tabList.getAttribute(\"class\"));\n\n this.$tabItems.forEach(($tabItem, index) => {\n $tabItem.setAttribute(\"role\", \"tabpanel\");\n $tabItem.setAttribute(\n \"aria-labelledby\",\n `${$tabItem.getAttribute(\"id\")}-tab`,\n );\n $tabItem.setAttribute(\"tabindex\", \"0\");\n if (\n (doesStartingTargetExist &&\n $tabItem.getAttribute(\"id\") !== startingTarget) ||\n (!doesStartingTargetExist && index > 0)\n ) {\n $tabItem.setAttribute(\"hidden\", true);\n }\n });\n\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n const $replacementButton = document.createElement(\"button\");\n $replacementButton.innerText = $tabListItemLink.innerText;\n $replacementButton.setAttribute(\n \"class\",\n $tabListItemLink.getAttribute(\"class\"),\n );\n $replacementButton.setAttribute(\"role\", \"tab\");\n $replacementButton.setAttribute(\n \"id\",\n $tabListItemLink.getAttribute(\"id\"),\n );\n $replacementButton.setAttribute(\n \"aria-controls\",\n $tabListItemLink.getAttribute(\"href\").replace(/^#/, \"\"),\n );\n $replacementButton.setAttribute(\"tabindex\", \"-1\");\n this.$newTabList.appendChild($replacementButton);\n });\n\n this.$tabList.replaceWith(this.$newTabList);\n\n this.$tabListItemLinks = this.$module.querySelectorAll(\n \".tna-tabs__list-item-link\",\n );\n\n this.$tabListItemLinks.forEach(($tabListItemLink, index) => {\n if (\n (startingTarget &&\n $tabListItemLink.getAttribute(\"aria-controls\") ===\n `${startingTarget}`) ||\n (!startingTarget && index === 0)\n ) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n }\n\n $tabListItemLink.addEventListener(\n \"keydown\",\n (e) => this.handleItemLinkKeyDown(e),\n true,\n );\n $tabListItemLink.addEventListener(\n \"click\",\n (e) => this.handleItemLinkClick(e),\n true,\n );\n });\n }\n\n handleItemLinkClick(itemLinkClickEvent) {\n itemLinkClickEvent.preventDefault();\n const targetItem =\n itemLinkClickEvent.currentTarget.getAttribute(\"aria-controls\");\n\n this.switchTab(targetItem);\n }\n\n handleItemLinkKeyDown(itemLinkKeyDownEvent) {\n const targetItem = itemLinkKeyDownEvent.currentTarget;\n let overwriteKeyAction = false;\n\n switch (itemLinkKeyDownEvent.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.setSelectedToPreviousTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.setSelectedToNextTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"Home\":\n this.switchTab(this.$tabListItemLinks[0].getAttribute(\"aria-controls\"));\n overwriteKeyAction = true;\n break;\n\n case \"End\":\n this.switchTab(\n this.$tabListItemLinks[\n this.$tabListItemLinks.length - 1\n ].getAttribute(\"aria-controls\"),\n );\n overwriteKeyAction = true;\n break;\n\n default:\n break;\n }\n\n if (overwriteKeyAction) {\n itemLinkKeyDownEvent.stopPropagation();\n itemLinkKeyDownEvent.preventDefault();\n }\n }\n\n setSelectedToNextTab(targetItem) {\n console.log(\"setSelectedToNextTab\", targetItem);\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex < this.$tabListItemLinks.length - 1) {\n newIndex = currentIndex + 1;\n } else {\n newIndex = 0;\n }\n console.log(currentIndex, newIndex);\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n setSelectedToPreviousTab(targetItem) {\n console.log(\"setSelectedToPreviousTab\", targetItem);\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex >= 1) {\n newIndex = currentIndex - 1;\n } else {\n newIndex = this.$tabListItemLinks.length - 1;\n }\n console.log(currentIndex, newIndex);\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n switchTab(targetId) {\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n if ($tabListItemLink.getAttribute(\"aria-controls\") === targetId) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n $tabListItemLink.focus();\n } else {\n $tabListItemLink.classList.remove(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n $tabListItemLink.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n this.$tabItems.forEach(($tabItem) => {\n if ($tabItem.getAttribute(\"id\") === targetId) {\n $tabItem.removeAttribute(\"hidden\");\n $tabItem.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabItem.setAttribute(\"hidden\", true);\n $tabItem.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n if (this.sticky) {\n if (history.replaceState) {\n history.replaceState(null, null, `#${targetId}`);\n } else {\n location.hash = `#${targetId}`;\n }\n }\n }\n}\n"],"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","_this","length","sticky","classList","contains","startingTarget","window","location","hash","replace","doesStartingTargetExist","_toConsumableArray","some","$tabItem","getAttribute","$newTabList","document","createElement","setAttribute","forEach","index","concat","$tabListItemLink","$replacementButton","innerText","appendChild","replaceWith","add","addEventListener","e","handleItemLinkKeyDown","handleItemLinkClick","itemLinkClickEvent","preventDefault","targetItem","currentTarget","switchTab","itemLinkKeyDownEvent","overwriteKeyAction","setSelectedToPreviousTab","setSelectedToNextTab","stopPropagation","console","log","newIndex","currentIndex","findIndex","targetId","focus","remove","removeAttribute","history","replaceState"],"sourceRoot":""}
|
@@ -23,6 +23,9 @@ export class Tabs {
|
|
23
23
|
this.sticky = this.$module.classList.contains("tna-tabs--sticky");
|
24
24
|
|
25
25
|
const startingTarget = window.location.hash.replace(/^#/, "");
|
26
|
+
const doesStartingTargetExist = [...this.$tabItems].some(
|
27
|
+
($tabItem) => $tabItem.getAttribute("id") === startingTarget,
|
28
|
+
);
|
26
29
|
|
27
30
|
this.$newTabList = document.createElement("div");
|
28
31
|
this.$newTabList.setAttribute("role", "tablist");
|
@@ -36,8 +39,9 @@ export class Tabs {
|
|
36
39
|
);
|
37
40
|
$tabItem.setAttribute("tabindex", "0");
|
38
41
|
if (
|
39
|
-
(
|
40
|
-
|
42
|
+
(doesStartingTargetExist &&
|
43
|
+
$tabItem.getAttribute("id") !== startingTarget) ||
|
44
|
+
(!doesStartingTargetExist && index > 0)
|
41
45
|
) {
|
42
46
|
$tabItem.setAttribute("hidden", true);
|
43
47
|
}
|
@@ -1,10 +1,11 @@
|
|
1
1
|
@use "../../tools/colour";
|
2
|
-
@use "../../tools/
|
2
|
+
@use "../../tools/media";
|
3
3
|
@use "../../tools/spacing";
|
4
|
+
@use "../../tools/typography";
|
4
5
|
@use "../../utilities";
|
5
6
|
|
6
7
|
.tna-tabs {
|
7
|
-
@include spacing.space-
|
8
|
+
@include spacing.space-above;
|
8
9
|
|
9
10
|
&__list {
|
10
11
|
margin: 0 0 1rem;
|
@@ -140,4 +141,18 @@
|
|
140
141
|
@include colour.colour-border("keyline-dark", 1px);
|
141
142
|
}
|
142
143
|
}
|
144
|
+
|
145
|
+
@include media.on-print {
|
146
|
+
&__list {
|
147
|
+
display: none;
|
148
|
+
}
|
149
|
+
|
150
|
+
&__item {
|
151
|
+
display: block !important;
|
152
|
+
|
153
|
+
& + & {
|
154
|
+
margin-top: 2rem;
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
143
158
|
}
|
@@ -40,17 +40,17 @@ Standard.args = {
|
|
40
40
|
{
|
41
41
|
id: "unique-id-a",
|
42
42
|
title: "Alpha section",
|
43
|
-
body: '<h2 class="tna-heading">Alpha title</h2><p>Lorem ipsum</p>',
|
43
|
+
body: '<h2 class="tna-heading-l">Alpha title</h2><p>Lorem ipsum</p>',
|
44
44
|
},
|
45
45
|
{
|
46
46
|
id: "unique-id-b",
|
47
47
|
title: "Beta section",
|
48
|
-
body: '<h2 class="tna-heading">Beta title</h2><p>Lorem ipsum</p>',
|
48
|
+
body: '<h2 class="tna-heading-l">Beta title</h2><p>Lorem ipsum</p>',
|
49
49
|
},
|
50
50
|
{
|
51
51
|
id: "unique-id-c",
|
52
52
|
title: "Gamma section",
|
53
|
-
body: '<h2 class="tna-heading">Gamma title</h2><p>Lorem ipsum</p>',
|
53
|
+
body: '<h2 class="tna-heading-l">Gamma title</h2><p>Lorem ipsum</p>',
|
54
54
|
},
|
55
55
|
],
|
56
56
|
classes: "tna-tabs--demo",
|
@@ -63,17 +63,17 @@ Test.args = {
|
|
63
63
|
{
|
64
64
|
id: "unique-id-a",
|
65
65
|
title: "Alpha section",
|
66
|
-
body: '<h2 class="tna-heading">Alpha title</h2><p>Lorem ipsum</p>',
|
66
|
+
body: '<h2 class="tna-heading-l">Alpha title</h2><p>Lorem ipsum</p>',
|
67
67
|
},
|
68
68
|
{
|
69
69
|
id: "unique-id-b",
|
70
70
|
title: "Beta section",
|
71
|
-
body: '<h2 class="tna-heading">Beta title</h2><p>Lorem ipsum</p>',
|
71
|
+
body: '<h2 class="tna-heading-l">Beta title</h2><p>Lorem ipsum</p>',
|
72
72
|
},
|
73
73
|
{
|
74
74
|
id: "unique-id-c",
|
75
75
|
title: "Gamma section",
|
76
|
-
body: '<h2 class="tna-heading">Gamma title</h2><p>Lorem ipsum</p>',
|
76
|
+
body: '<h2 class="tna-heading-l">Gamma title</h2><p>Lorem ipsum</p>',
|
77
77
|
},
|
78
78
|
],
|
79
79
|
classes: "tna-tabs--demo",
|
@@ -1,32 +1,43 @@
|
|
1
|
+
/**
|
2
|
+
* Class to handle cookies.
|
3
|
+
* @class Cookies
|
4
|
+
* @constructor
|
5
|
+
* @public
|
6
|
+
*/
|
1
7
|
export default class Cookies {
|
8
|
+
/** @protected */
|
2
9
|
#policies = {};
|
3
10
|
|
11
|
+
/**
|
12
|
+
* Create a cookie handler.
|
13
|
+
* @param {string[]} [policies=usage,settings] - The cookie policies to manage.
|
14
|
+
* @param {string} [cookiesPolicyKey=cookies_policy] - The name of the cookie.
|
15
|
+
*/
|
4
16
|
constructor(
|
5
|
-
policies = ["
|
17
|
+
policies = ["usage", "settings"],
|
6
18
|
cookiesPolicyKey = "cookies_policy",
|
7
|
-
crossDomain = false,
|
8
19
|
) {
|
9
20
|
this.cookiesPolicyKey = cookiesPolicyKey;
|
10
|
-
this.crossDomain = crossDomain;
|
11
21
|
policies.forEach((policy) => {
|
12
|
-
this.#policies[policy] = false;
|
22
|
+
this.#policies[policy.toLowerCase()] = false;
|
13
23
|
});
|
14
|
-
this.#
|
24
|
+
this.#policies.essential = true;
|
15
25
|
}
|
16
26
|
|
17
|
-
|
18
|
-
|
19
|
-
this.#policies = {
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
27
|
+
get policies() {
|
28
|
+
return this.exists(this.cookiesPolicyKey)
|
29
|
+
? (this.#policies = {
|
30
|
+
...this.#policies,
|
31
|
+
...this.allPolicies,
|
32
|
+
})
|
33
|
+
: this.#policies;
|
24
34
|
}
|
25
35
|
|
26
|
-
|
27
|
-
|
36
|
+
set policies(newPolicyValues) {
|
37
|
+
this.#policies = newPolicyValues;
|
28
38
|
}
|
29
39
|
|
40
|
+
/** @protected */
|
30
41
|
#deserialise(cookieString) {
|
31
42
|
const deserialised = {};
|
32
43
|
cookieString.split(";").forEach((cookie) => {
|
@@ -37,74 +48,135 @@ export default class Cookies {
|
|
37
48
|
}
|
38
49
|
|
39
50
|
get all() {
|
40
|
-
return this.
|
41
|
-
}
|
42
|
-
|
43
|
-
get allPolicies() {
|
44
|
-
return JSON.parse(this.get(this.cookiesPolicyKey));
|
51
|
+
return this.#deserialise(document.cookie);
|
45
52
|
}
|
46
53
|
|
54
|
+
/**
|
55
|
+
* Check to see whether a cookie exists or not.
|
56
|
+
* @param {string} key - The cookie name.
|
57
|
+
* @returns {boolean}
|
58
|
+
*/
|
47
59
|
exists(key) {
|
48
|
-
return Object.prototype.hasOwnProperty.call(this.
|
60
|
+
return Object.prototype.hasOwnProperty.call(this.all, key);
|
49
61
|
}
|
50
62
|
|
63
|
+
/**
|
64
|
+
* Check to see whether a cookie has a particular value.
|
65
|
+
* @param {string} key - The cookie name.
|
66
|
+
* @param {string|number|boolean} value - The value to check against.
|
67
|
+
* @returns
|
68
|
+
*/
|
51
69
|
hasValue(key, value) {
|
52
|
-
return this.get(key)
|
70
|
+
return this.get(key) == value;
|
53
71
|
}
|
54
72
|
|
73
|
+
/**
|
74
|
+
* Get a cookie.
|
75
|
+
* @param {string} key - The cookie name.
|
76
|
+
* @returns {string|number|boolean}
|
77
|
+
*/
|
55
78
|
get(key) {
|
56
|
-
return decodeURIComponent(this.
|
79
|
+
return this.exists(key) ? decodeURIComponent(this.all[key]) : null;
|
80
|
+
}
|
81
|
+
|
82
|
+
/**
|
83
|
+
* Set a cookie.
|
84
|
+
* @param {string} key - The cookie name.
|
85
|
+
* @param {string|number|boolean} value - The cookie value.
|
86
|
+
* @param {Object} options
|
87
|
+
* @param {number} [options.maxAge=31536000] - The maximum age of the cookie in seconds.
|
88
|
+
* @param {string} [options.path=/] - The path to register the cookie for.
|
89
|
+
* @param {string} [options.sameSite=Lax] - The sameSite attribute.
|
90
|
+
*/
|
91
|
+
set(key, value, options = {}) {
|
92
|
+
const {
|
93
|
+
maxAge = 60 * 60 * 24 * 365,
|
94
|
+
path = "/",
|
95
|
+
sameSite = "Lax",
|
96
|
+
} = options;
|
97
|
+
document.cookie = `${encodeURIComponent(key)}=${encodeURIComponent(
|
98
|
+
value,
|
99
|
+
)}; SameSite=${sameSite}; path=${path}; max-age=${maxAge}; Secure`;
|
57
100
|
}
|
58
101
|
|
102
|
+
/**
|
103
|
+
* Delete a cookie.
|
104
|
+
* @param {string} key - The cookie name.
|
105
|
+
* @param {string} [path=/] - The path to the cookie is registered on.
|
106
|
+
*/
|
59
107
|
delete(key, path = "/") {
|
60
108
|
this.set(key, "", 0, path);
|
61
109
|
}
|
62
110
|
|
111
|
+
get allPolicies() {
|
112
|
+
return JSON.parse(this.get(this.cookiesPolicyKey) || "{}");
|
113
|
+
}
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Accept a policy.
|
117
|
+
* @param {string} policy - The name of the policy.
|
118
|
+
*/
|
63
119
|
acceptPolicy(policy) {
|
64
|
-
this
|
120
|
+
this.#setPolicy(policy, true);
|
121
|
+
this.savePolicies();
|
65
122
|
}
|
66
123
|
|
124
|
+
/**
|
125
|
+
* Reject a policy.
|
126
|
+
* @param {string} policy - The name of the policy.
|
127
|
+
*/
|
67
128
|
rejectPolicy(policy) {
|
68
|
-
|
129
|
+
if (policy === "essential") {
|
130
|
+
return;
|
131
|
+
}
|
132
|
+
this.#setPolicy(policy, false);
|
133
|
+
this.savePolicies();
|
69
134
|
}
|
70
135
|
|
71
|
-
|
72
|
-
|
73
|
-
|
136
|
+
/** @protected */
|
137
|
+
#setPolicy(policy, accepted) {
|
138
|
+
this.policies = {
|
139
|
+
...this.policies,
|
74
140
|
[policy]: accepted,
|
141
|
+
essential: true,
|
75
142
|
};
|
76
|
-
this.set(this.cookiesPolicyKey, JSON.stringify(this.#policies));
|
77
143
|
}
|
78
144
|
|
145
|
+
/**
|
146
|
+
* Commit the policy preferences to the browser.
|
147
|
+
*/
|
148
|
+
savePolicies() {
|
149
|
+
this.set(this.cookiesPolicyKey, JSON.stringify(this.policies));
|
150
|
+
}
|
151
|
+
|
152
|
+
/**
|
153
|
+
* Accept all the cookie policies.
|
154
|
+
*/
|
79
155
|
acceptAllPolicies() {
|
80
|
-
Object.keys(this
|
81
|
-
|
82
|
-
|
156
|
+
Object.keys(this.policies).forEach((policy) =>
|
157
|
+
this.#setPolicy(policy, true),
|
158
|
+
);
|
159
|
+
this.savePolicies();
|
83
160
|
}
|
84
161
|
|
162
|
+
/**
|
163
|
+
* Reject all the cookie policies.
|
164
|
+
*/
|
85
165
|
rejectAllPolicies() {
|
86
|
-
Object.keys(this
|
87
|
-
|
88
|
-
|
166
|
+
Object.keys(this.policies).forEach((policy) =>
|
167
|
+
this.#setPolicy(policy, false),
|
168
|
+
);
|
169
|
+
this.savePolicies();
|
89
170
|
}
|
90
171
|
|
172
|
+
/**
|
173
|
+
* Get the acceptance status of a policy.
|
174
|
+
* @param {string} policy - The name of the policy.
|
175
|
+
* @returns {boolean}
|
176
|
+
*/
|
91
177
|
isPolicyAccepted(policy) {
|
92
|
-
this
|
93
|
-
|
94
|
-
? this.#policies[policy] === true
|
178
|
+
return Object.prototype.hasOwnProperty.call(this.policies, policy)
|
179
|
+
? this.policies[policy] === true
|
95
180
|
: null;
|
96
181
|
}
|
97
|
-
|
98
|
-
set(key, value, maxAge = 60 * 60 * 24 * 365, path = "/") {
|
99
|
-
document.cookie = `${encodeURIComponent(key)}=${encodeURIComponent(
|
100
|
-
value,
|
101
|
-
)}; SameSite=${
|
102
|
-
this.crossDomain ? "None" : "Lax"
|
103
|
-
}; path=${path}; max-age=${maxAge}; Secure`;
|
104
|
-
this.#getPolicies();
|
105
|
-
}
|
106
|
-
|
107
|
-
policy(policy) {
|
108
|
-
return this.#policies[policy];
|
109
|
-
}
|
110
182
|
}
|