@nationalarchives/frontend 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/nationalarchives/all.css +1 -1
  2. package/nationalarchives/all.css.map +1 -1
  3. package/nationalarchives/components/card/card.css +1 -1
  4. package/nationalarchives/components/card/card.css.map +1 -1
  5. package/nationalarchives/components/card/card.scss +7 -3
  6. package/nationalarchives/components/checkboxes/checkboxes.njk +3 -1
  7. package/nationalarchives/components/checkboxes/fixtures.json +108 -0
  8. package/nationalarchives/components/checkboxes/macro-options.json +1 -1
  9. package/nationalarchives/components/checkboxes/template.njk +1 -1
  10. package/nationalarchives/components/date-input/fixtures.json +52 -0
  11. package/nationalarchives/components/date-input/macro-options.json +12 -0
  12. package/nationalarchives/components/date-input/template.njk +9 -5
  13. package/nationalarchives/components/date-search/fixtures.json +52 -0
  14. package/nationalarchives/components/date-search/macro-options.json +1 -1
  15. package/nationalarchives/components/footer/fixtures.json +1 -1
  16. package/nationalarchives/components/footer/template.njk +1 -1
  17. package/nationalarchives/components/pagination/fixtures.json +5 -3
  18. package/nationalarchives/components/pagination/macro-options.json +12 -0
  19. package/nationalarchives/components/quick-filters/fixtures.json +2 -1
  20. package/nationalarchives/components/radios/fixtures.json +108 -0
  21. package/nationalarchives/components/radios/macro-options.json +1 -1
  22. package/nationalarchives/components/radios/radios.njk +3 -1
  23. package/nationalarchives/components/radios/template.njk +1 -1
  24. package/nationalarchives/components/search-field/fixtures.json +52 -0
  25. package/nationalarchives/components/search-field/macro-options.json +1 -1
  26. package/nationalarchives/components/search-field/template.njk +1 -1
  27. package/nationalarchives/components/select/fixtures.json +108 -0
  28. package/nationalarchives/components/select/macro-options.json +1 -1
  29. package/nationalarchives/components/text-input/fixtures.json +52 -0
  30. package/nationalarchives/components/text-input/macro-options.json +1 -1
  31. package/nationalarchives/components/textarea/fixtures.json +52 -0
  32. package/nationalarchives/components/textarea/macro-options.json +1 -1
  33. package/nationalarchives/prototype-kit.css +1 -1
  34. package/nationalarchives/prototype-kit.css.map +1 -1
  35. package/package.json +1 -1
@@ -1 +1 @@
1
- .tna-card{margin-top:32px}.tna-card:first-child{margin-top:0}.tna-card{display:flex;flex-direction:column;gap:8px;position:relative;border-radius:4px}.tna-card:not(:has(.tna-card__image-container)){padding-top:8px;border-top:5px var(--keyline-dark, rgb(38, 38, 42)) solid;border-radius:.1px}.tna-card__heading{order:2}.tna-card__heading .tna-hgroup__supertitle{margin-top:8px}.tna-card__heading.tna-heading-l{margin-top:4px}.tna-card--full-click:hover{outline:2px var(--base-keyline, ) solid;outline-offset:4px}.tna-card--full-click:focus,.tna-card--full-click:active{outline:none}.tna-card--full-click.tna-card--plain:hover{outline:2px var(--base-keyline, ) solid}.tna-card--full-click .tna-card__heading-link::before{content:"";position:absolute;inset:0;z-index:3;border-radius:4px}.tna-card--full-click .tna-card__heading-link:focus-visible,.tna-card--full-click .tna-card__heading-link:active{outline:none}.tna-card--full-click .tna-card__heading-link:focus-visible::before,.tna-card--full-click .tna-card__heading-link:active::before{outline:5px var(--focus-outline, rgb(0, 176, 255)) solid;outline-offset:2px}.tna-card--full-click .tna-card__heading-link:active::before{outline-offset:0}.tna-card--full-click.tna-card:not(:has(.tna-card__image-container)) .tna-card__heading-link::before{border-radius:.1px}.tna-card--full-click.tna-card--padded.tna-card:not(:has(.tna-card__image-container)) .tna-card__heading-link::before{border-radius:.1px .1px 4px 4px}.tna-card--full-click:not(:has(.tna-card__image-container)) .tna-card__heading-link::before{top:-5px}.tna-card__image-container{aspect-ratio:3/2;overflow:hidden;position:relative;border-radius:4px 4px 0 0;order:1;background:linear-gradient(-45deg, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.25));background-size:500% 500%;background-position:0 50%;animation:image-loader-background ease-in-out 1.2s infinite}.tna-card__image{position:absolute;inset:0;z-index:1}.tna-card__image img{width:100%;height:100%;object-fit:cover}.tna-card__image-label{position:absolute;top:8px;left:8px;z-index:2}.tna-card__body{padding-top:8px;order:3;display:flex;flex-direction:column;gap:16px}.tna-card__body>*{margin-top:0}.tna-card__actions{margin-top:8px;display:flex;gap:16px 32px}.tna-card__action{font-weight:700}.tna-card--padded{padding-bottom:16px}.tna-card--padded:not(:has(.tna-card__image-container)){border-radius:.1px .1px 4px 4px}.tna-card--padded .tna-card__heading,.tna-card--padded .tna-card__body{padding-right:16px;padding-left:16px}.tna-card--plain{box-shadow:inset 0 0 0 1px var(--keyline, rgba(38, 38, 42, 0.25))}@media(prefers-contrast: more){.tna-card{padding-bottom:16px;border:1px var(--keyline-dark, rgb(38, 38, 42)) solid}.tna-card__heading,.tna-card__body{padding-right:16px;padding-left:16px}.tna-card--plain{box-shadow:none}.tna-card:not(:has(.tna-card__image-container)){border-radius:.1px .1px 4px 4px}.tna-card--full-click:not(.tna-card--padded) .tna-card__heading-link::before{border-radius:4px}.tna-card--full-click:not(:has(.tna-card__image-container),.tna-card--padded) .tna-card__heading-link::before{border-radius:.1px .1px 4px 4px}}@media(min-width: 48.0625em){.tna-card--horizontal{padding-bottom:0;display:grid;grid-template:min-content 1fr/50% 50%;grid-template-areas:"image header" "image body";gap:0}.tna-card--horizontal>*+*{margin-top:8px}.tna-card--horizontal>:first-child{padding-top:16px}.tna-card--horizontal>:last-child{padding-bottom:24px}.tna-card--horizontal:not(:has(.tna-card__image-container)){grid-template-columns:0 100%}.tna-card--horizontal.tna-card--flipped{grid-template-areas:"header image" "body image" "footer image"}.tna-card--horizontal.tna-card--flipped:not(:has(.tna-card__image-container)){grid-template-columns:100% 0}.tna-card--horizontal .tna-card__heading,.tna-card--horizontal .tna-card__body{padding-right:24px;padding-left:24px}.tna-card--horizontal .tna-card__heading{grid-area:header}.tna-card--horizontal .tna-card__image-container{width:100%;height:100%;margin:0;padding:0;grid-area:image;border-radius:4px 0 0 4px}.tna-card--horizontal.tna-card--flipped .tna-card__image-container{border-radius:0 4px 4px 0}.tna-card--horizontal .tna-card__body{grid-area:body}.tna-card--horizontal-small-image{grid-template-columns:max(10rem,25%) 1fr}.tna-card--horizontal-small-image.tna-card--flipped{grid-template-columns:1fr max(10rem,25%)}}@media(min-width: 30.0625em)and (max-width: 48em){.tna-card--horizontal-on-small{padding-bottom:0;display:grid;grid-template:min-content 1fr/50% 50%;grid-template-areas:"image header" "image body";gap:0}.tna-card--horizontal-on-small>*+*{margin-top:8px}.tna-card--horizontal-on-small>:first-child{padding-top:8px}.tna-card--horizontal-on-small>:last-child{padding-bottom:16px}.tna-card--horizontal-on-small:not(:has(.tna-card__image-container)){grid-template-columns:0 100%}.tna-card--horizontal-on-small.tna-card--flipped{grid-template-areas:"header image" "body image" "footer image"}.tna-card--horizontal-on-small.tna-card--flipped:not(:has(.tna-card__image-container)){grid-template-columns:100% 0}.tna-card--horizontal-on-small .tna-card__heading,.tna-card--horizontal-on-small .tna-card__body{padding-right:16px;padding-left:16px}.tna-card--horizontal-on-small .tna-card__heading{grid-area:header}.tna-card--horizontal-on-small .tna-card__image-container{width:100%;height:100%;margin:0;padding:0;grid-area:image;border-radius:4px 0 0 4px}.tna-card--horizontal-on-small.tna-card--flipped .tna-card__image-container{border-radius:0 4px 4px 0}.tna-card--horizontal-on-small .tna-card__body{grid-area:body}.tna-card--horizontal-small-image{grid-template-columns:max(10rem,25%) 1fr}.tna-card--horizontal-small-image.tna-card--flipped{grid-template-columns:1fr max(10rem,25%)}}/*# sourceMappingURL=card.css.map */
1
+ .tna-card{margin-top:32px}.tna-card:first-child{margin-top:0}.tna-card{display:flex;flex-direction:column;gap:8px;position:relative;border-radius:4px}.tna-card:not(:has(.tna-card__image-container)){padding-top:8px;border-top:5px var(--keyline-dark, rgb(38, 38, 42)) solid;border-radius:.1px}.tna-card__heading{order:2}.tna-card__heading .tna-hgroup__supertitle{margin-top:8px}.tna-card__heading.tna-heading-l{margin-top:4px}.tna-card--full-click:hover{outline:2px var(--base-keyline, ) solid;outline-offset:4px}.tna-card--full-click:focus,.tna-card--full-click:active{outline:none}.tna-card--full-click.tna-card--plain:hover{outline:2px var(--base-keyline, ) solid}.tna-card--full-click .tna-card__heading-link::before{content:"";position:absolute;inset:0;z-index:3;border-radius:4px}.tna-card--full-click .tna-card__heading-link:focus-visible,.tna-card--full-click .tna-card__heading-link:active{outline:none}.tna-card--full-click .tna-card__heading-link:focus-visible::before,.tna-card--full-click .tna-card__heading-link:active::before{outline:5px var(--focus-outline, rgb(0, 176, 255)) solid;outline-offset:2px}.tna-card--full-click .tna-card__heading-link:active::before{outline-offset:0}.tna-card--full-click.tna-card:not(:has(.tna-card__image-container)) .tna-card__heading-link::before{border-radius:.1px}.tna-card--full-click.tna-card--padded.tna-card:not(:has(.tna-card__image-container)) .tna-card__heading-link::before{border-radius:.1px .1px 4px 4px}.tna-card--full-click:not(:has(.tna-card__image-container)) .tna-card__heading-link::before{top:-5px}.tna-card__image-container{aspect-ratio:3/2;overflow:hidden;position:relative;order:1;border-radius:4px;background:linear-gradient(-45deg, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.25));background-size:500% 500%;background-position:0 50%;animation:image-loader-background ease-in-out 1.2s infinite}.tna-card--padded .tna-card__image-container{border-radius:4px 4px 0 0}.tna-card__image{position:absolute;inset:0;z-index:1}.tna-card__image img{width:100%;height:100%;object-fit:cover}.tna-card__image-label{position:absolute;top:8px;left:8px;z-index:2}.tna-card__body{padding-top:8px;order:3;display:flex;flex-direction:column;gap:16px}.tna-card__body>*{margin-top:0}.tna-card__actions{margin-top:8px;display:flex;gap:16px 32px}.tna-card__action{font-weight:700}.tna-card--padded{padding-bottom:16px}.tna-card--padded:not(:has(.tna-card__image-container)){border-radius:.1px .1px 4px 4px}.tna-card--padded .tna-card__heading,.tna-card--padded .tna-card__body{padding-right:16px;padding-left:16px}.tna-card--plain{box-shadow:inset 0 0 0 1px var(--keyline, rgba(38, 38, 42, 0.25))}@media(prefers-contrast: more){.tna-card{padding-bottom:16px;border:1px var(--keyline-dark, rgb(38, 38, 42)) solid}.tna-card__heading,.tna-card__body{padding-right:16px;padding-left:16px}.tna-card--plain{box-shadow:none}.tna-card:not(:has(.tna-card__image-container)){border-radius:.1px .1px 4px 4px}.tna-card--full-click:not(.tna-card--padded) .tna-card__heading-link::before{border-radius:4px}.tna-card--full-click:not(:has(.tna-card__image-container),.tna-card--padded) .tna-card__heading-link::before{border-radius:.1px .1px 4px 4px}}@media(min-width: 48.0625em){.tna-card--horizontal{padding-bottom:0;display:grid;grid-template:min-content 1fr/50% 50%;grid-template-areas:"image header" "image body";gap:0}.tna-card--horizontal>*+*{margin-top:8px}.tna-card--horizontal>:first-child{padding-top:16px}.tna-card--horizontal>:last-child{padding-bottom:24px}.tna-card--horizontal:not(:has(.tna-card__image-container)){grid-template-columns:0 100%}.tna-card--horizontal.tna-card--flipped{grid-template-areas:"header image" "body image" "footer image"}.tna-card--horizontal.tna-card--flipped:not(:has(.tna-card__image-container)){grid-template-columns:100% 0}.tna-card--horizontal .tna-card__heading,.tna-card--horizontal .tna-card__body{padding-right:24px;padding-left:24px}.tna-card--horizontal .tna-card__heading{grid-area:header}.tna-card--horizontal .tna-card__image-container{width:100%;height:100%;margin:0;padding:0;grid-area:image;border-radius:4px 0 0 4px}.tna-card--horizontal.tna-card--flipped .tna-card__image-container{border-radius:0 4px 4px 0}.tna-card--horizontal .tna-card__body{grid-area:body}.tna-card--horizontal-small-image{grid-template-columns:max(10rem,25%) 1fr}.tna-card--horizontal-small-image.tna-card--flipped{grid-template-columns:1fr max(10rem,25%)}}@media(min-width: 30.0625em)and (max-width: 48em){.tna-card--horizontal-on-small{padding-bottom:0;display:grid;grid-template:min-content 1fr/50% 50%;grid-template-areas:"image header" "image body";gap:0}.tna-card--horizontal-on-small>*+*{margin-top:8px}.tna-card--horizontal-on-small>:first-child{padding-top:8px}.tna-card--horizontal-on-small>:last-child{padding-bottom:16px}.tna-card--horizontal-on-small:not(:has(.tna-card__image-container)){grid-template-columns:0 100%}.tna-card--horizontal-on-small.tna-card--flipped{grid-template-areas:"header image" "body image" "footer image"}.tna-card--horizontal-on-small.tna-card--flipped:not(:has(.tna-card__image-container)){grid-template-columns:100% 0}.tna-card--horizontal-on-small .tna-card__heading,.tna-card--horizontal-on-small .tna-card__body{padding-right:16px;padding-left:16px}.tna-card--horizontal-on-small .tna-card__heading{grid-area:header}.tna-card--horizontal-on-small .tna-card__image-container{width:100%;height:100%;margin:0;padding:0;grid-area:image;border-radius:4px 0 0 4px}.tna-card--horizontal-on-small.tna-card--flipped .tna-card__image-container{border-radius:0 4px 4px 0}.tna-card--horizontal-on-small .tna-card__body{grid-area:body}.tna-card--horizontal-small-image{grid-template-columns:max(10rem,25%) 1fr}.tna-card--horizontal-small-image.tna-card--flipped{grid-template-columns:1fr max(10rem,25%)}}/*# sourceMappingURL=card.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/card/card.scss","../../../../src/nationalarchives/tools/_borders.scss","../../../../src/nationalarchives/variables/_borders.scss","../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_a11y.scss","../../../../src/nationalarchives/variables/_a11y.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/tools/_media.scss"],"names":[],"mappings":"AAUA,UACE,gBAEA,sBACE,aCuEJ,UAGE,aACA,sBACA,QAEA,kBCzFA,cCFsB,IF+FtB,gDACE,gBGPE,0DHUF,mBAGF,mBACE,QAEA,2CACE,eAGF,iCACE,eAKF,oEAEE,mBAGF,yDAEE,aAKF,4CGZA,wCHsBA,sDACE,WAEA,kBACA,QACA,UC5IJ,cCFsB,IFmJpB,iHAEE,aAEA,iIGpCF,yDC9EF,eCrCqB,IL6JjB,6DIpHJ,iBJ0HA,qGACE,mBAGF,sHAEE,gCAKA,4FACE,SAIJ,2BACE,iBAEA,gBAEA,kBAEA,0BAGA,QG+SA,wGAMA,0BACA,0BAEA,4DHnTF,iBACE,kBACA,QACA,UAEA,qBACE,WACA,YAEA,iBAIJ,uBACE,kBACA,QACA,SACA,UAGF,gBACE,gBAEA,QAEA,aACA,sBAEA,SAEA,kBACE,aAIJ,mBACE,eAEA,aACA,cAGF,kBMtNA,YCgBsB,IP0MtB,kBACE,oBAGF,wDACE,gCAIF,uEAEE,mBACA,kBAGF,iBACE,kEGqNF,+BHjYF,UAgLI,oBGjKE,sDHqKF,mCAEE,mBACA,kBAGF,iBACE,gBAGF,gDACE,gCAIF,6ECrRF,cCFsB,IF2RpB,8GAEE,iCQ9NJ,6BRrDA,sBACE,iBAEA,aACA,sCACA,oBACE,4BAEF,MAEA,0BACE,eAGF,mCACE,iBAGF,kCACE,oBAIJ,4DACE,6BAGF,wCACE,oBACE,2CAKJ,8EACE,6BAGF,+EAEE,mBACA,kBAGF,yCACE,iBAOF,iDACE,WACA,YACA,SACA,UAEA,gBAEA,0BAIF,mEACE,0BAIF,sCACE,eAqNA,kCACE,yCAGF,oDACE,0CQvPJ,kDRzCA,+BACE,iBAEA,aACA,sCACA,oBACE,4BAEF,MAEA,mCACE,eAGF,4CACE,gBAGF,2CACE,oBAIJ,qEACE,6BAGF,iDACE,oBACE,2CAKJ,uFACE,6BAGF,iGAEE,mBACA,kBAGF,kDACE,iBAOF,0DACE,WACA,YACA,SACA,UAEA,gBAEA,0BAIF,4EACE,0BAIF,+CACE,eAiOA,kCACE,yCAGF,oDACE","file":"card.css","sourcesContent":["@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n@function space($size) {\n @return #{$size * spacing.$spacing-unit-px}px;\n}\n\n%space-above {\n margin-top: space(2);\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../../variables/a11y\" as a11yVariables;\n@use \"../../variables/borders\" as bordersVars;\n@use \"../../tools/a11y\";\n@use \"../../tools/borders\";\n@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n@mixin horizontal-card-layout($modifierClass, $innerPaddingAmount) {\n &#{$modifierClass} {\n padding-bottom: 0;\n\n display: grid;\n grid-template: min-content 1fr / 50% 50%;\n grid-template-areas:\n \"image header\"\n \"image body\";\n gap: 0;\n\n > * + * {\n margin-top: spacing.space(0.5);\n }\n\n > :first-child {\n padding-top: spacing.space($innerPaddingAmount - 0.5);\n }\n\n > :last-child {\n padding-bottom: spacing.space($innerPaddingAmount);\n }\n }\n\n &#{$modifierClass}:not(:has(&__image-container)) {\n grid-template-columns: 0 100%;\n }\n\n &#{$modifierClass}#{&}--flipped {\n grid-template-areas:\n \"header image\"\n \"body image\"\n \"footer image\";\n }\n\n &#{$modifierClass}#{&}--flipped:not(:has(&__image-container)) {\n grid-template-columns: 100% 0;\n }\n\n &#{$modifierClass} &__heading,\n &#{$modifierClass} &__body {\n padding-right: spacing.space($innerPaddingAmount);\n padding-left: spacing.space($innerPaddingAmount);\n }\n\n &#{$modifierClass} &__heading {\n grid-area: header;\n\n // .tna-hgroup__supertitle {\n // margin-top: 0;\n // }\n }\n\n &#{$modifierClass} &__image-container {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n\n grid-area: image;\n\n border-radius: bordersVars.$rounded-border-radius 0 0\n bordersVars.$rounded-border-radius;\n }\n\n &#{$modifierClass}#{&}--flipped &__image-container {\n border-radius: 0 bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius 0;\n }\n\n &#{$modifierClass} &__body {\n grid-area: body;\n }\n}\n\n.tna-card {\n @include spacing.space-above;\n\n display: flex;\n flex-direction: column;\n gap: spacing.space(0.5);\n\n position: relative;\n\n @include borders.rounded-border;\n\n &:not(:has(&__image-container)) {\n padding-top: spacing.space(0.5);\n\n @include colour.thick-keyline-dark(top);\n border-radius: 0.1px;\n }\n\n &__heading {\n order: 2;\n\n .tna-hgroup__supertitle {\n margin-top: spacing.space(0.5);\n }\n\n &.tna-heading-l {\n margin-top: spacing.space(0.25);\n }\n }\n\n &--full-click {\n &:hover {\n @include colour.colour-outline(\"base-keyline\", 2px, solid);\n outline-offset: a11yVariables.$focus-outline-width - 1px;\n }\n\n &:focus,\n &:active {\n outline: none;\n }\n }\n\n &--full-click#{&}--plain {\n &:hover {\n @include colour.colour-outline(\n \"base-keyline\",\n a11yVariables.$focus-outline-offset,\n solid\n );\n }\n }\n\n &--full-click &__heading-link {\n &::before {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 3;\n\n @include borders.rounded-border;\n }\n\n &:focus-visible,\n &:active {\n outline: none;\n\n &::before {\n @include a11y.focus-outline;\n }\n }\n\n &:active {\n &::before {\n @include a11y.active-outline;\n }\n }\n }\n\n &--full-click#{&}:not(:has(&__image-container)) &__heading-link::before {\n border-radius: 0.1px;\n }\n\n &--full-click#{&}--padded#{&}:not(:has(&__image-container))\n &__heading-link::before {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &--full-click:not(:has(&__image-container)) &__heading-link {\n &::before {\n top: -#{bordersVars.$thick-border-width};\n }\n }\n\n &__image-container {\n aspect-ratio: 3/2;\n\n overflow: hidden;\n\n position: relative;\n\n border-radius: bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius 0 0;\n\n order: 1;\n\n @include colour.image-loader-background;\n }\n\n &__image {\n position: absolute;\n inset: 0;\n z-index: 1;\n\n img {\n width: 100%;\n height: 100%;\n\n object-fit: cover;\n }\n }\n\n &__image-label {\n position: absolute;\n top: spacing.space(0.5);\n left: spacing.space(0.5);\n z-index: 2;\n }\n\n &__body {\n padding-top: spacing.space(0.5);\n\n order: 3;\n\n display: flex;\n flex-direction: column;\n\n gap: spacing.space(1);\n\n > * {\n margin-top: 0;\n }\n }\n\n &__actions {\n margin-top: spacing.space(0.5);\n\n display: flex;\n gap: spacing.space(1) spacing.space(2);\n }\n\n &__action {\n @include typography.main-font-weight-bold;\n }\n\n &--padded {\n padding-bottom: spacing.space(1);\n }\n\n &--padded:not(:has(&__image-container)) {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &--padded &__heading,\n &--padded &__body {\n padding-right: spacing.space(1);\n padding-left: spacing.space(1);\n }\n\n &--plain {\n box-shadow: inset 0 0 0 1px colour.colour-var(\"keyline\");\n }\n\n @include colour.on-high-contrast {\n padding-bottom: spacing.space(1);\n\n @include colour.colour-border(\"keyline-dark\", 1px, solid);\n\n &__heading,\n &__body {\n padding-right: spacing.space(1);\n padding-left: spacing.space(1);\n }\n\n &--plain {\n box-shadow: none;\n }\n\n &:not(:has(&__image-container)) {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &--full-click:not(&--padded) &__heading-link::before {\n @include borders.rounded-border;\n }\n\n &--full-click:not(:has(&__image-container), &--padded)\n &__heading-link::before {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n }\n\n @include media.on-larger-than-mobile {\n @include horizontal-card-layout(\"--horizontal\", 1.5);\n\n &--horizontal-small-image {\n grid-template-columns: max(10rem, 25%) 1fr;\n }\n\n &--horizontal-small-image#{&}--flipped {\n grid-template-columns: 1fr max(10rem, 25%);\n }\n }\n\n @include media.on-small {\n @include horizontal-card-layout(\"--horizontal-on-small\", 1);\n\n &--horizontal-small-image {\n grid-template-columns: max(10rem, 25%) 1fr;\n }\n\n &--horizontal-small-image#{&}--flipped {\n grid-template-columns: 1fr max(10rem, 25%);\n }\n }\n}\n","@use \"../variables/borders\";\n\n@mixin rounded-border {\n border-radius: borders.$rounded-border-radius;\n}\n","$thick-border-width: 5px !default;\n$rounded-border-radius: 4px !default;\n","@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n \"keyline\",\n \"keyline-dark\" // , \"form-error-text\", \"form-error-border\", \"focus-outline\"\n);\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index((\"keyline\", \"keyline-dark\"), $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@function colour-var($colour) {\n @return var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n );\n}\n\n@mixin colour-font($colour, $important: false) {\n color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n border-#{$direction}: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width colour-var($colour) $style if($important, !important, null);\n } @else {\n outline-color: colour-var($colour) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"keyline\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"keyline\", borders.$thick-border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"keyline-dark\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"keyline-dark\", borders.$thick-border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"accent-border\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"accent-border\", borders.$thick-border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\n \"form-error-border\",\n borders.$thick-border-width,\n solid\n );\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour) {\n @if $direction != \"\" {\n border-#{$direction}: borders.$thick-border-width\n #{brand-colour($brandColour)}\n solid;\n } @else {\n border: borders.$thick-border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\") {\n @if $direction != \"\" {\n border-#{$direction}: borders.$thick-border-width transparent solid;\n } @else {\n border: borders.$thick-border-width transparent solid;\n }\n}\n\n// Use light theme colours (except for \"form-error-border\")\n%always-light {\n @include colour-css-vars(\"form-error-border\", \"focus-outline\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\n \"form-error-border\",\n \"focus-outline\"\n );\n }\n}\n\n@mixin always-light {\n @extend %always-light;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n\n // @include colour-font(\"font-base\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n --accent-border: var(--accent-background);\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n }\n\n .tna-template--dark-theme & {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-border: #{colour.brand-colour(\"yellow\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n --button-accented-background: #{colour.brand-colour(\"brown\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --accent-border: #{colour.brand-colour(\"black\")} !important;\n --button-accented-text: #{colour.brand-colour(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %accent-lighter-text;\n @extend %black-accent;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --accent-border: #{colour.brand-colour(\"pink\")} !important;\n --button-accented-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %accent-lighter-text;\n @extend %pink-accent;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --accent-border: #{colour.brand-colour(\"orange\")} !important;\n --button-accented-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %accent-lighter-text;\n @extend %orange-accent;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --accent-border: #{colour.brand-colour(\"green\")} !important;\n --button-accented-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %accent-lighter-text;\n @extend %green-accent;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --accent-border: #{colour.brand-colour(\"blue\")} !important;\n --button-accented-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %accent-lighter-text;\n @extend %blue-accent;\n}\n\n@mixin on-high-contrast {\n @media (prefers-contrast: more) {\n @content;\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n background: linear-gradient(\n -45deg,\n rgba(0 0 0 / 25%),\n rgba(255 255 255 / 25%),\n rgba(0 0 0 / 25%)\n );\n background-size: 500% 500%;\n background-position: 0 50%;\n\n animation: image-loader-background ease-in-out 1.2s infinite;\n }\n}\n","@use \"../variables/a11y\";\n@use \"colour\";\n\n@mixin visually-hidden {\n width: 1px !important;\n height: 1px !important;\n margin: 0 !important;\n padding: 0 !important;\n\n overflow: hidden !important;\n\n position: absolute !important;\n top: -9999px !important;\n left: -9999px !important;\n z-index: -1 !important;\n\n background-color: transparent !important;\n\n border: 0 !important;\n\n clip: rect(0, 0, 0, 0) !important;\n\n // &::before,\n // &::after {\n // content: \"\\00a0\";\n // }\n}\n\n@mixin focus-outline-without-offset {\n @include colour.colour-outline(\n \"focus-outline\",\n a11y.$focus-outline-width,\n solid\n );\n}\n\n@mixin focus-outline {\n @include focus-outline-without-offset;\n outline-offset: a11y.$focus-outline-offset;\n}\n\n@mixin active-outline {\n outline-offset: 0;\n}\n\n@mixin no-focus-outline-on-click {\n .tna-template--clicked &:focus {\n outline: none;\n }\n}\n","$focus-outline-width: 5px !default;\n$focus-outline-offset: 2px !default;\n$focus-outline-padding: $focus-outline-width + $focus-outline-offset;\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin relative-font-size($font-size-px) {\n @warn \"relative-font-size() will soon be deprecated in favour of font-size().\";\n @include font-size($font-size-px);\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n font-variation-settings: \"wdth\" 100;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include font-size(14);\n line-height: 1.1;\n text-transform: uppercase;\n}\n\n@mixin interactable-text-decoration {\n text-underline-offset: typography.$interactable-text-decoration-offset;\n\n text-decoration-thickness: typography.$interactable-text-decoration-thickness;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n line-height: $line-height;\n @include font-size($font-size-default);\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include font-size($font-size-medium);\n }\n }\n }\n}\n","@use \"sass:math\";\n\n/*\n * ------------------------------------------\n * The typefaces, sizes and spacings that are\n * defined in this file have been selected to\n * ensure 100% match with the latest National\n * Archives brand guidelines - avoid changing\n * or overwriting any of these values without\n * signing off with the Digital Services team\n * first\n * ------------------------------------------\n */\n\n$relative-1rem-px: 16; // 16px = 1rem\n\n/*\n * ------------------------------------------\n * When true, use the included font files for\n * Open Sans and Roboto Mono, rather than the\n * versions hosted by Google Fonts\n * ------------------------------------------\n */\n$use-local-fonts: false !default;\n\n$body-font-size-px: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: 1.75 !default;\n\n$interactable-text-decoration-offset: 0.125em !default;\n$interactable-text-decoration-thickness: #{math.div(1.5, $relative-1rem-px)}rem !default;\n$interactive-text-decoration-thickness: #{math.div(4, $relative-1rem-px)}rem !default;\n\n$main-font-family-name: \"Open Sans\" !default;\n$main-font-family:\n #{$main-font-family-name},\n sans-serif;\n$main-font-weight: 400 !default;\n$main-font-weight-medium: 600 !default;\n$main-font-weight-bold: 700 !default;\n$main-font-file: \"OpenSans-Regular.ttf\" !default;\n$main-font-file-medium: \"OpenSans-SemiBold.ttf\" !default;\n$main-font-file-bold: \"OpenSans-Bold.ttf\" !default;\n\n/*\n * ------------------------------------------\n * To use Supria Sans Condensed (which is the\n * approved heading typeface for The National\n * Archives), you need to obtain a licence to\n * properly embed the CSS files with the font\n * definitions in your service - check with a\n * member of the Digital Services team on how\n * to get a licence\n * ------------------------------------------\n */\n$heading-font-family-name: \"supria-sans-condensed\" !default;\n$heading-font-family:\n #{$heading-font-family-name},\n \"Arial Narrow\",\n sans-serif;\n$heading-font-weight: 500 !default;\n\n/*\n * ------------------------------------------\n * The detail font should be a monospace font\n * and is used for chips, supertitles as well\n * as the date search component\n * ------------------------------------------\n */\n$detail-font-family-name: \"Roboto Mono\" !default;\n$detail-font-family:\n #{$detail-font-family-name},\n monospace;\n$detail-font-weight: 400 !default;\n$detail-font-weight-bold: 500 !default;\n$detail-font-file: \"RobotoMono-Regular.ttf\" !default;\n$detail-font-file-bold: \"RobotoMono-Medium.ttf\" !default;\n\n$heading-xl-font-size-default: 64 !default;\n$heading-xl-font-size-medium: 48 !default;\n$heading-xl-font-size-small: 36 !default;\n$heading-xl-font-size-tiny: $heading-xl-font-size-small !default;\n$heading-xl-line-height: 1.1 !default;\n\n$heading-l-font-size-default: 36 !default;\n$heading-l-font-size-medium: 30 !default;\n$heading-l-font-size-small: 28 !default;\n$heading-l-font-size-tiny: 25 !default;\n$heading-l-line-height: 1.3 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: 21 !default;\n$heading-m-font-size-small: 20 !default;\n$heading-m-font-size-tiny: 19 !default;\n$heading-m-line-height: 1.6 !default;\n\n$heading-s-font-size-default: 18 !default;\n$heading-s-font-size-medium: $heading-s-font-size-default !default;\n$heading-s-font-size-small: $heading-s-font-size-default !default;\n$heading-s-font-size-tiny: $heading-s-font-size-default !default;\n$heading-s-line-height: 1.6 !default;\n","@use \"sass:math\";\n@use \"../variables/media\";\n@use \"../variables/typography\";\n\n$smallest-large-device-em: #{math.div(\n media.$largest-medium-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-medium-device-em: #{math.div(\n media.$largest-medium-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-medium-device-em: #{math.div(\n media.$largest-small-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-small-device-em: #{math.div(\n media.$largest-small-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-small-device-em: #{math.div(\n media.$largest-tiny-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-tiny-device-em: #{math.div(\n media.$largest-tiny-device-px,\n typography.$relative-1rem-px\n )}em;\n\n$media-large: \"(min-width: #{$smallest-large-device-em})\";\n$media-lt-large: \"(max-width: #{$largest-medium-device-em})\";\n$media-medium: \"(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})\";\n$media-gt-mobile: \"(min-width: #{$smallest-medium-device-em})\";\n$media-mobile: \"(max-width: #{$largest-small-device-em})\";\n$media-small: \"(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})\";\n$media-gt-tiny: \"(min-width: #{$smallest-small-device-em})\";\n$media-tiny: \"(max-width: #{$largest-tiny-device-em})\";\n\n// https://nationalarchives.github.io/design-system/styles/media/#media-queries\n@mixin on-large() {\n @media #{$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{$media-mobile} {\n @content;\n }\n}\n\n@mixin on-print() {\n @media print {\n @content;\n }\n}\n"]}
1
+ {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/card/card.scss","../../../../src/nationalarchives/tools/_borders.scss","../../../../src/nationalarchives/variables/_borders.scss","../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_a11y.scss","../../../../src/nationalarchives/variables/_a11y.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/tools/_media.scss"],"names":[],"mappings":"AAUA,UACE,gBAEA,sBACE,aCuEJ,UAGE,aACA,sBACA,QAEA,kBCzFA,cCFsB,IF+FtB,gDACE,gBGPE,0DHUF,mBAGF,mBACE,QAEA,2CACE,eAGF,iCACE,eAKF,oEAEE,mBAGF,yDAEE,aAKF,4CGZA,wCHsBA,sDACE,WAEA,kBACA,QACA,UC5IJ,cCFsB,IFmJpB,iHAEE,aAEA,iIGpCF,yDC9EF,eCrCqB,IL6JjB,6DIpHJ,iBJ0HA,qGACE,mBAGF,sHAEE,gCAKA,4FACE,SAIJ,2BACE,iBAEA,gBAEA,kBAEA,QCxLF,cCFsB,IC4epB,wGAMA,0BACA,0BAEA,4DHpTF,6CACE,0BAIF,iBACE,kBACA,QACA,UAEA,qBACE,WACA,YAEA,iBAIJ,uBACE,kBACA,QACA,SACA,UAGF,gBACE,gBAEA,QAEA,aACA,sBAEA,SAEA,kBACE,aAIJ,mBACE,eAEA,aACA,cAGF,kBM1NA,YCgBsB,IP8MtB,kBACE,oBAGF,wDACE,gCAIF,uEAEE,mBACA,kBAGF,iBACE,kEGiNF,+BHjYF,UAoLI,oBGrKE,sDHyKF,mCAEE,mBACA,kBAGF,iBACE,gBAGF,gDACE,gCAIF,6ECzRF,cCFsB,IF+RpB,8GAEE,iCQlOJ,6BRrDA,sBACE,iBAEA,aACA,sCACA,oBACE,4BAEF,MAEA,0BACE,eAGF,mCACE,iBAGF,kCACE,oBAIJ,4DACE,6BAGF,wCACE,oBACE,2CAKJ,8EACE,6BAGF,+EAEE,mBACA,kBAGF,yCACE,iBAOF,iDACE,WACA,YACA,SACA,UAEA,gBAEA,0BAIF,mEACE,0BAIF,sCACE,eAyNA,kCACE,yCAGF,oDACE,0CQ3PJ,kDRzCA,+BACE,iBAEA,aACA,sCACA,oBACE,4BAEF,MAEA,mCACE,eAGF,4CACE,gBAGF,2CACE,oBAIJ,qEACE,6BAGF,iDACE,oBACE,2CAKJ,uFACE,6BAGF,iGAEE,mBACA,kBAGF,kDACE,iBAOF,0DACE,WACA,YACA,SACA,UAEA,gBAEA,0BAIF,4EACE,0BAIF,+CACE,eAqOA,kCACE,yCAGF,oDACE","file":"card.css","sourcesContent":["@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n@function space($size) {\n @return #{$size * spacing.$spacing-unit-px}px;\n}\n\n%space-above {\n margin-top: space(2);\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../../variables/a11y\" as a11yVariables;\n@use \"../../variables/borders\" as bordersVars;\n@use \"../../tools/a11y\";\n@use \"../../tools/borders\";\n@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n@mixin horizontal-card-layout($modifierClass, $innerPaddingAmount) {\n &#{$modifierClass} {\n padding-bottom: 0;\n\n display: grid;\n grid-template: min-content 1fr / 50% 50%;\n grid-template-areas:\n \"image header\"\n \"image body\";\n gap: 0;\n\n > * + * {\n margin-top: spacing.space(0.5);\n }\n\n > :first-child {\n padding-top: spacing.space($innerPaddingAmount - 0.5);\n }\n\n > :last-child {\n padding-bottom: spacing.space($innerPaddingAmount);\n }\n }\n\n &#{$modifierClass}:not(:has(&__image-container)) {\n grid-template-columns: 0 100%;\n }\n\n &#{$modifierClass}#{&}--flipped {\n grid-template-areas:\n \"header image\"\n \"body image\"\n \"footer image\";\n }\n\n &#{$modifierClass}#{&}--flipped:not(:has(&__image-container)) {\n grid-template-columns: 100% 0;\n }\n\n &#{$modifierClass} &__heading,\n &#{$modifierClass} &__body {\n padding-right: spacing.space($innerPaddingAmount);\n padding-left: spacing.space($innerPaddingAmount);\n }\n\n &#{$modifierClass} &__heading {\n grid-area: header;\n\n // .tna-hgroup__supertitle {\n // margin-top: 0;\n // }\n }\n\n &#{$modifierClass} &__image-container {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n\n grid-area: image;\n\n border-radius: bordersVars.$rounded-border-radius 0 0\n bordersVars.$rounded-border-radius;\n }\n\n &#{$modifierClass}#{&}--flipped &__image-container {\n border-radius: 0 bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius 0;\n }\n\n &#{$modifierClass} &__body {\n grid-area: body;\n }\n}\n\n.tna-card {\n @include spacing.space-above;\n\n display: flex;\n flex-direction: column;\n gap: spacing.space(0.5);\n\n position: relative;\n\n @include borders.rounded-border;\n\n &:not(:has(&__image-container)) {\n padding-top: spacing.space(0.5);\n\n @include colour.thick-keyline-dark(top);\n border-radius: 0.1px;\n }\n\n &__heading {\n order: 2;\n\n .tna-hgroup__supertitle {\n margin-top: spacing.space(0.5);\n }\n\n &.tna-heading-l {\n margin-top: spacing.space(0.25);\n }\n }\n\n &--full-click {\n &:hover {\n @include colour.colour-outline(\"base-keyline\", 2px, solid);\n outline-offset: a11yVariables.$focus-outline-width - 1px;\n }\n\n &:focus,\n &:active {\n outline: none;\n }\n }\n\n &--full-click#{&}--plain {\n &:hover {\n @include colour.colour-outline(\n \"base-keyline\",\n a11yVariables.$focus-outline-offset,\n solid\n );\n }\n }\n\n &--full-click &__heading-link {\n &::before {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 3;\n\n @include borders.rounded-border;\n }\n\n &:focus-visible,\n &:active {\n outline: none;\n\n &::before {\n @include a11y.focus-outline;\n }\n }\n\n &:active {\n &::before {\n @include a11y.active-outline;\n }\n }\n }\n\n &--full-click#{&}:not(:has(&__image-container)) &__heading-link::before {\n border-radius: 0.1px;\n }\n\n &--full-click#{&}--padded#{&}:not(:has(&__image-container))\n &__heading-link::before {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &--full-click:not(:has(&__image-container)) &__heading-link {\n &::before {\n top: -#{bordersVars.$thick-border-width};\n }\n }\n\n &__image-container {\n aspect-ratio: 3/2;\n\n overflow: hidden;\n\n position: relative;\n\n order: 1;\n\n @include borders.rounded-border;\n\n @include colour.image-loader-background;\n }\n\n &--padded &__image-container {\n border-radius: bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius 0 0;\n }\n\n &__image {\n position: absolute;\n inset: 0;\n z-index: 1;\n\n img {\n width: 100%;\n height: 100%;\n\n object-fit: cover;\n }\n }\n\n &__image-label {\n position: absolute;\n top: spacing.space(0.5);\n left: spacing.space(0.5);\n z-index: 2;\n }\n\n &__body {\n padding-top: spacing.space(0.5);\n\n order: 3;\n\n display: flex;\n flex-direction: column;\n\n gap: spacing.space(1);\n\n > * {\n margin-top: 0;\n }\n }\n\n &__actions {\n margin-top: spacing.space(0.5);\n\n display: flex;\n gap: spacing.space(1) spacing.space(2);\n }\n\n &__action {\n @include typography.main-font-weight-bold;\n }\n\n &--padded {\n padding-bottom: spacing.space(1);\n }\n\n &--padded:not(:has(&__image-container)) {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &--padded &__heading,\n &--padded &__body {\n padding-right: spacing.space(1);\n padding-left: spacing.space(1);\n }\n\n &--plain {\n box-shadow: inset 0 0 0 1px colour.colour-var(\"keyline\");\n }\n\n @include colour.on-high-contrast {\n padding-bottom: spacing.space(1);\n\n @include colour.colour-border(\"keyline-dark\", 1px, solid);\n\n &__heading,\n &__body {\n padding-right: spacing.space(1);\n padding-left: spacing.space(1);\n }\n\n &--plain {\n box-shadow: none;\n }\n\n &:not(:has(&__image-container)) {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n\n &--full-click:not(&--padded) &__heading-link::before {\n @include borders.rounded-border;\n }\n\n &--full-click:not(:has(&__image-container), &--padded)\n &__heading-link::before {\n border-radius: 0.1px 0.1px bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius;\n }\n }\n\n @include media.on-larger-than-mobile {\n @include horizontal-card-layout(\"--horizontal\", 1.5);\n\n &--horizontal-small-image {\n grid-template-columns: max(10rem, 25%) 1fr;\n }\n\n &--horizontal-small-image#{&}--flipped {\n grid-template-columns: 1fr max(10rem, 25%);\n }\n }\n\n @include media.on-small {\n @include horizontal-card-layout(\"--horizontal-on-small\", 1);\n\n &--horizontal-small-image {\n grid-template-columns: max(10rem, 25%) 1fr;\n }\n\n &--horizontal-small-image#{&}--flipped {\n grid-template-columns: 1fr max(10rem, 25%);\n }\n }\n}\n","@use \"../variables/borders\";\n\n@mixin rounded-border {\n border-radius: borders.$rounded-border-radius;\n}\n","$thick-border-width: 5px !default;\n$rounded-border-radius: 4px !default;\n","@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n \"keyline\",\n \"keyline-dark\" // , \"form-error-text\", \"form-error-border\", \"focus-outline\"\n);\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index((\"keyline\", \"keyline-dark\"), $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@function colour-var($colour) {\n @return var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n );\n}\n\n@mixin colour-font($colour, $important: false) {\n color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n border-#{$direction}: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width colour-var($colour) $style if($important, !important, null);\n } @else {\n outline-color: colour-var($colour) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"keyline\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"keyline\", borders.$thick-border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"keyline-dark\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"keyline-dark\", borders.$thick-border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"accent-border\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"accent-border\", borders.$thick-border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\") {\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\n \"form-error-border\",\n borders.$thick-border-width,\n solid\n );\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour) {\n @if $direction != \"\" {\n border-#{$direction}: borders.$thick-border-width\n #{brand-colour($brandColour)}\n solid;\n } @else {\n border: borders.$thick-border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\") {\n @if $direction != \"\" {\n border-#{$direction}: borders.$thick-border-width transparent solid;\n } @else {\n border: borders.$thick-border-width transparent solid;\n }\n}\n\n// Use light theme colours (except for \"form-error-border\")\n%always-light {\n @include colour-css-vars(\"form-error-border\", \"focus-outline\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\n \"form-error-border\",\n \"focus-outline\"\n );\n }\n}\n\n@mixin always-light {\n @extend %always-light;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n\n // @include colour-font(\"font-base\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n --accent-border: var(--accent-background);\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n }\n\n .tna-template--dark-theme & {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-border: #{colour.brand-colour(\"yellow\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n --button-accented-background: #{colour.brand-colour(\"brown\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --accent-border: #{colour.brand-colour(\"black\")} !important;\n --button-accented-text: #{colour.brand-colour(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %accent-lighter-text;\n @extend %black-accent;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --accent-border: #{colour.brand-colour(\"pink\")} !important;\n --button-accented-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %accent-lighter-text;\n @extend %pink-accent;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --accent-border: #{colour.brand-colour(\"orange\")} !important;\n --button-accented-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %accent-lighter-text;\n @extend %orange-accent;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --accent-border: #{colour.brand-colour(\"green\")} !important;\n --button-accented-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %accent-lighter-text;\n @extend %green-accent;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --accent-border: #{colour.brand-colour(\"blue\")} !important;\n --button-accented-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %accent-lighter-text;\n @extend %blue-accent;\n}\n\n@mixin on-high-contrast {\n @media (prefers-contrast: more) {\n @content;\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n background: linear-gradient(\n -45deg,\n rgba(0 0 0 / 25%),\n rgba(255 255 255 / 25%),\n rgba(0 0 0 / 25%)\n );\n background-size: 500% 500%;\n background-position: 0 50%;\n\n animation: image-loader-background ease-in-out 1.2s infinite;\n }\n}\n","@use \"../variables/a11y\";\n@use \"colour\";\n\n@mixin visually-hidden {\n width: 1px !important;\n height: 1px !important;\n margin: 0 !important;\n padding: 0 !important;\n\n overflow: hidden !important;\n\n position: absolute !important;\n top: -9999px !important;\n left: -9999px !important;\n z-index: -1 !important;\n\n background-color: transparent !important;\n\n border: 0 !important;\n\n clip: rect(0, 0, 0, 0) !important;\n\n // &::before,\n // &::after {\n // content: \"\\00a0\";\n // }\n}\n\n@mixin focus-outline-without-offset {\n @include colour.colour-outline(\n \"focus-outline\",\n a11y.$focus-outline-width,\n solid\n );\n}\n\n@mixin focus-outline {\n @include focus-outline-without-offset;\n outline-offset: a11y.$focus-outline-offset;\n}\n\n@mixin active-outline {\n outline-offset: 0;\n}\n\n@mixin no-focus-outline-on-click {\n .tna-template--clicked &:focus {\n outline: none;\n }\n}\n","$focus-outline-width: 5px !default;\n$focus-outline-offset: 2px !default;\n$focus-outline-padding: $focus-outline-width + $focus-outline-offset;\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin relative-font-size($font-size-px) {\n @warn \"relative-font-size() will soon be deprecated in favour of font-size().\";\n @include font-size($font-size-px);\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n font-variation-settings: \"wdth\" 100;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include font-size(14);\n line-height: 1.1;\n text-transform: uppercase;\n}\n\n@mixin interactable-text-decoration {\n text-underline-offset: typography.$interactable-text-decoration-offset;\n\n text-decoration-thickness: typography.$interactable-text-decoration-thickness;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n line-height: $line-height;\n @include font-size($font-size-default);\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include font-size($font-size-medium);\n }\n }\n }\n}\n","@use \"sass:math\";\n\n/*\n * ------------------------------------------\n * The typefaces, sizes and spacings that are\n * defined in this file have been selected to\n * ensure 100% match with the latest National\n * Archives brand guidelines - avoid changing\n * or overwriting any of these values without\n * signing off with the Digital Services team\n * first\n * ------------------------------------------\n */\n\n$relative-1rem-px: 16; // 16px = 1rem\n\n/*\n * ------------------------------------------\n * When true, use the included font files for\n * Open Sans and Roboto Mono, rather than the\n * versions hosted by Google Fonts\n * ------------------------------------------\n */\n$use-local-fonts: false !default;\n\n$body-font-size-px: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: 1.75 !default;\n\n$interactable-text-decoration-offset: 0.125em !default;\n$interactable-text-decoration-thickness: #{math.div(1.5, $relative-1rem-px)}rem !default;\n$interactive-text-decoration-thickness: #{math.div(4, $relative-1rem-px)}rem !default;\n\n$main-font-family-name: \"Open Sans\" !default;\n$main-font-family:\n #{$main-font-family-name},\n sans-serif;\n$main-font-weight: 400 !default;\n$main-font-weight-medium: 600 !default;\n$main-font-weight-bold: 700 !default;\n$main-font-file: \"OpenSans-Regular.ttf\" !default;\n$main-font-file-medium: \"OpenSans-SemiBold.ttf\" !default;\n$main-font-file-bold: \"OpenSans-Bold.ttf\" !default;\n\n/*\n * ------------------------------------------\n * To use Supria Sans Condensed (which is the\n * approved heading typeface for The National\n * Archives), you need to obtain a licence to\n * properly embed the CSS files with the font\n * definitions in your service - check with a\n * member of the Digital Services team on how\n * to get a licence\n * ------------------------------------------\n */\n$heading-font-family-name: \"supria-sans-condensed\" !default;\n$heading-font-family:\n #{$heading-font-family-name},\n \"Arial Narrow\",\n sans-serif;\n$heading-font-weight: 500 !default;\n\n/*\n * ------------------------------------------\n * The detail font should be a monospace font\n * and is used for chips, supertitles as well\n * as the date search component\n * ------------------------------------------\n */\n$detail-font-family-name: \"Roboto Mono\" !default;\n$detail-font-family:\n #{$detail-font-family-name},\n monospace;\n$detail-font-weight: 400 !default;\n$detail-font-weight-bold: 500 !default;\n$detail-font-file: \"RobotoMono-Regular.ttf\" !default;\n$detail-font-file-bold: \"RobotoMono-Medium.ttf\" !default;\n\n$heading-xl-font-size-default: 64 !default;\n$heading-xl-font-size-medium: 48 !default;\n$heading-xl-font-size-small: 36 !default;\n$heading-xl-font-size-tiny: $heading-xl-font-size-small !default;\n$heading-xl-line-height: 1.1 !default;\n\n$heading-l-font-size-default: 36 !default;\n$heading-l-font-size-medium: 30 !default;\n$heading-l-font-size-small: 28 !default;\n$heading-l-font-size-tiny: 25 !default;\n$heading-l-line-height: 1.3 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: 21 !default;\n$heading-m-font-size-small: 20 !default;\n$heading-m-font-size-tiny: 19 !default;\n$heading-m-line-height: 1.6 !default;\n\n$heading-s-font-size-default: 18 !default;\n$heading-s-font-size-medium: $heading-s-font-size-default !default;\n$heading-s-font-size-small: $heading-s-font-size-default !default;\n$heading-s-font-size-tiny: $heading-s-font-size-default !default;\n$heading-s-line-height: 1.6 !default;\n","@use \"sass:math\";\n@use \"../variables/media\";\n@use \"../variables/typography\";\n\n$smallest-large-device-em: #{math.div(\n media.$largest-medium-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-medium-device-em: #{math.div(\n media.$largest-medium-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-medium-device-em: #{math.div(\n media.$largest-small-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-small-device-em: #{math.div(\n media.$largest-small-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-small-device-em: #{math.div(\n media.$largest-tiny-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-tiny-device-em: #{math.div(\n media.$largest-tiny-device-px,\n typography.$relative-1rem-px\n )}em;\n\n$media-large: \"(min-width: #{$smallest-large-device-em})\";\n$media-lt-large: \"(max-width: #{$largest-medium-device-em})\";\n$media-medium: \"(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})\";\n$media-gt-mobile: \"(min-width: #{$smallest-medium-device-em})\";\n$media-mobile: \"(max-width: #{$largest-small-device-em})\";\n$media-small: \"(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})\";\n$media-gt-tiny: \"(min-width: #{$smallest-small-device-em})\";\n$media-tiny: \"(max-width: #{$largest-tiny-device-em})\";\n\n// https://nationalarchives.github.io/design-system/styles/media/#media-queries\n@mixin on-large() {\n @media #{$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{$media-mobile} {\n @content;\n }\n}\n\n@mixin on-print() {\n @media print {\n @content;\n }\n}\n"]}
@@ -185,14 +185,18 @@
185
185
 
186
186
  position: relative;
187
187
 
188
- border-radius: bordersVars.$rounded-border-radius
189
- bordersVars.$rounded-border-radius 0 0;
190
-
191
188
  order: 1;
192
189
 
190
+ @include borders.rounded-border;
191
+
193
192
  @include colour.image-loader-background;
194
193
  }
195
194
 
195
+ &--padded &__image-container {
196
+ border-radius: bordersVars.$rounded-border-radius
197
+ bordersVars.$rounded-border-radius 0 0;
198
+ }
199
+
196
200
  &__image {
197
201
  position: absolute;
198
202
  inset: 0;
@@ -1,8 +1,10 @@
1
1
  {%- macro tnaCheckboxesElement(params, extraAttributes) -%}
2
+ {%- set inputClassesParams = [params.classes] if params.classes else [] -%}
3
+ {%- set inputClasses = inputClassesParams | join(' ') -%}
2
4
  <div class="tna-checkboxes{% if params.small or params.inline %} tna-checkboxes--small{% endif %}{% if params.inline %} tna-checkboxes--inline{% endif %}" id="{{ params.id }}">
3
5
  {%- for item in params.items %}
4
6
  <div class="tna-checkboxes__item">
5
- <input type="checkbox" id="{{ params.id }}-{{ item.value }}" value="{{ item.value }}" name="{{ item.name or params.name }}"{% for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}{% for attribute, value in extraAttributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}{% if item.checked %} checked{% endif %}>
7
+ <input type="checkbox" id="{{ params.id }}-{{ item.value }}"{% if inputClasses %} class="{{ inputClasses }}"{% endif %} value="{{ item.value }}" name="{{ item.name or params.name }}"{% for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}{% for attribute, value in extraAttributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}{% if item.checked %} checked{% endif %}>
6
8
  <label for="{{ params.id }}-{{ item.value }}" class="tna-checkboxes__item-label">
7
9
  {{ item.text }}
8
10
  </label>
@@ -185,6 +185,114 @@
185
185
  "inline": true
186
186
  },
187
187
  "html": "<div class=\"tna-form__group tna-form__group--inline\"><fieldset class=\"tna-form__fieldset\"><legend class=\"tna-form__legend\"><h4 class=\"tna-form__heading tna-form__heading--xs\">Categories</h4></legend><div class=\"tna-checkboxes tna-checkboxes--small tna-checkboxes--inline\" id=\"categories\"><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-alpha\" value=\"alpha\" name=\"categories\"><label for=\"categories-alpha\" class=\"tna-checkboxes__item-label\">Alpha</label></div><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-beta\" value=\"beta\" name=\"categories\"><label for=\"categories-beta\" class=\"tna-checkboxes__item-label\">Beta</label></div><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-gamma\" value=\"gamma\" name=\"categories\"><label for=\"categories-gamma\" class=\"tna-checkboxes__item-label\">Gamma</label></div></div></fieldset></div>"
188
+ },
189
+ {
190
+ "name": "with classes",
191
+ "options": {
192
+ "label": "Categories",
193
+ "headingLevel": 4,
194
+ "headingSize": "m",
195
+ "id": "categories",
196
+ "name": "categories",
197
+ "items": [
198
+ {
199
+ "text": "Alpha",
200
+ "value": "alpha"
201
+ },
202
+ {
203
+ "text": "Beta",
204
+ "value": "beta"
205
+ },
206
+ {
207
+ "text": "Gamma",
208
+ "value": "gamma"
209
+ }
210
+ ],
211
+ "classes": "checkboxes__test-class"
212
+ },
213
+ "html": "<div class=\"tna-form__group\"><fieldset class=\"tna-form__fieldset\"><legend class=\"tna-form__legend\"><h4 class=\"tna-form__heading tna-form__heading--m\">Categories</h4></legend><div class=\"tna-checkboxes\" id=\"categories\"><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-alpha\" class=\"checkboxes__test-class\" value=\"alpha\" name=\"categories\"><label for=\"categories-alpha\" class=\"tna-checkboxes__item-label\">Alpha</label></div><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-beta\" class=\"checkboxes__test-class\" value=\"beta\" name=\"categories\"><label for=\"categories-beta\" class=\"tna-checkboxes__item-label\">Beta</label></div><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-gamma\" class=\"checkboxes__test-class\" value=\"gamma\" name=\"categories\"><label for=\"categories-gamma\" class=\"tna-checkboxes__item-label\">Gamma</label></div></div></fieldset></div>"
214
+ },
215
+ {
216
+ "name": "with attributes",
217
+ "options": {
218
+ "label": "Categories",
219
+ "headingLevel": 4,
220
+ "headingSize": "m",
221
+ "id": "categories",
222
+ "name": "categories",
223
+ "items": [
224
+ {
225
+ "text": "Alpha",
226
+ "value": "alpha"
227
+ },
228
+ {
229
+ "text": "Beta",
230
+ "value": "beta"
231
+ },
232
+ {
233
+ "text": "Gamma",
234
+ "value": "gamma"
235
+ }
236
+ ],
237
+ "attributes": {
238
+ "data-testattribute": "foobar"
239
+ }
240
+ },
241
+ "html": "<div class=\"tna-form__group\"><fieldset class=\"tna-form__fieldset\"><legend class=\"tna-form__legend\"><h4 class=\"tna-form__heading tna-form__heading--m\">Categories</h4></legend><div class=\"tna-checkboxes\" id=\"categories\"><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-alpha\" value=\"alpha\" name=\"categories\" data-testattribute=\"foobar\"><label for=\"categories-alpha\" class=\"tna-checkboxes__item-label\">Alpha</label></div><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-beta\" value=\"beta\" name=\"categories\" data-testattribute=\"foobar\"><label for=\"categories-beta\" class=\"tna-checkboxes__item-label\">Beta</label></div><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-gamma\" value=\"gamma\" name=\"categories\" data-testattribute=\"foobar\"><label for=\"categories-gamma\" class=\"tna-checkboxes__item-label\">Gamma</label></div></div></fieldset></div>"
242
+ },
243
+ {
244
+ "name": "with form group classes",
245
+ "options": {
246
+ "label": "Categories",
247
+ "headingLevel": 4,
248
+ "headingSize": "m",
249
+ "id": "categories",
250
+ "name": "categories",
251
+ "items": [
252
+ {
253
+ "text": "Alpha",
254
+ "value": "alpha"
255
+ },
256
+ {
257
+ "text": "Beta",
258
+ "value": "beta"
259
+ },
260
+ {
261
+ "text": "Gamma",
262
+ "value": "gamma"
263
+ }
264
+ ],
265
+ "formGroupClasses": "checkboxes__test-class"
266
+ },
267
+ "html": "<div class=\"tna-form__group checkboxes__test-class\"><fieldset class=\"tna-form__fieldset\"><legend class=\"tna-form__legend\"><h4 class=\"tna-form__heading tna-form__heading--m\">Categories</h4></legend><div class=\"tna-checkboxes\" id=\"categories\"><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-alpha\" value=\"alpha\" name=\"categories\"><label for=\"categories-alpha\" class=\"tna-checkboxes__item-label\">Alpha</label></div><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-beta\" value=\"beta\" name=\"categories\"><label for=\"categories-beta\" class=\"tna-checkboxes__item-label\">Beta</label></div><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-gamma\" value=\"gamma\" name=\"categories\"><label for=\"categories-gamma\" class=\"tna-checkboxes__item-label\">Gamma</label></div></div></fieldset></div>"
268
+ },
269
+ {
270
+ "name": "with form group attributes",
271
+ "options": {
272
+ "label": "Categories",
273
+ "headingLevel": 4,
274
+ "headingSize": "m",
275
+ "id": "categories",
276
+ "name": "categories",
277
+ "items": [
278
+ {
279
+ "text": "Alpha",
280
+ "value": "alpha"
281
+ },
282
+ {
283
+ "text": "Beta",
284
+ "value": "beta"
285
+ },
286
+ {
287
+ "text": "Gamma",
288
+ "value": "gamma"
289
+ }
290
+ ],
291
+ "formGroupAttributes": {
292
+ "data-testattribute": "foobar"
293
+ }
294
+ },
295
+ "html": "<div class=\"tna-form__group\" data-testattribute=\"foobar\"><fieldset class=\"tna-form__fieldset\"><legend class=\"tna-form__legend\"><h4 class=\"tna-form__heading tna-form__heading--m\">Categories</h4></legend><div class=\"tna-checkboxes\" id=\"categories\"><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-alpha\" value=\"alpha\" name=\"categories\"><label for=\"categories-alpha\" class=\"tna-checkboxes__item-label\">Alpha</label></div><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-beta\" value=\"beta\" name=\"categories\"><label for=\"categories-beta\" class=\"tna-checkboxes__item-label\">Beta</label></div><div class=\"tna-checkboxes__item\"><input type=\"checkbox\" id=\"categories-gamma\" value=\"gamma\" name=\"categories\"><label for=\"categories-gamma\" class=\"tna-checkboxes__item-label\">Gamma</label></div></div></fieldset></div>"
188
296
  }
189
297
  ]
190
298
  }
@@ -101,7 +101,7 @@
101
101
  },
102
102
  {
103
103
  "name": "formGroupAttributes",
104
- "type": "string",
104
+ "type": "object",
105
105
  "required": false,
106
106
  "description": "HTML attributes (for example data attributes) to add to the checkboxes form group."
107
107
  },
@@ -1,6 +1,6 @@
1
1
  {% from "nationalarchives/components/checkboxes/checkboxes.njk" import tnaCheckboxesElement %}
2
2
 
3
- {%- set containerClasses = [params.classes] if params.classes else [] -%}
3
+ {%- set containerClasses = [params.formGroupClasses] if params.formGroupClasses else [] -%}
4
4
  {%- if params.inline -%}
5
5
  {%- set containerClasses = containerClasses.concat('tna-form__group--inline') -%}
6
6
  {%- endif -%}
@@ -65,6 +65,58 @@
65
65
  "inline": true
66
66
  },
67
67
  "html": "<div class=\"tna-form__group tna-form__group--inline\"><fieldset class=\"tna-form__fieldset\"><legend class=\"tna-form__legend\"><h4 class=\"tna-form__heading tna-form__heading--xs\">Enter a start date</h4></legend><div class=\"tna-date-input tna-date-input--inline\" id=\"date\"><div class=\"tna-date-input__item\"><label for=\"date-day\" class=\"tna-date-input__item-label\">Day</label><input type=\"text\" id=\"date-day\" value=\"\" name=\"date-day\" class=\"tna-date-input__item-input\" inputmode=\"numeric\"></div><div class=\"tna-date-input__item\"><label for=\"date-month\" class=\"tna-date-input__item-label\">Month</label><input type=\"text\" id=\"date-month\" value=\"\" name=\"date-month\" class=\"tna-date-input__item-input\" inputmode=\"numeric\"></div><div class=\"tna-date-input__item\"><label for=\"date-year\" class=\"tna-date-input__item-label\">Year</label><input type=\"text\" id=\"date-year\" value=\"\" name=\"date-year\" class=\"tna-date-input__item-input tna-date-input__item-input--wider\" inputmode=\"numeric\"></div></div></fieldset></div>"
68
+ },
69
+ {
70
+ "name": "with classes",
71
+ "options": {
72
+ "label": "Enter a start date",
73
+ "headingLevel": 4,
74
+ "headingSize": "m",
75
+ "id": "date",
76
+ "name": "date",
77
+ "classes": "test-class"
78
+ },
79
+ "html": "<div class=\"tna-form__group\"><fieldset class=\"tna-form__fieldset\"><legend class=\"tna-form__legend\"><h4 class=\"tna-form__heading tna-form__heading--m\">Enter a start date</h4></legend><div class=\"tna-date-input\" id=\"date\"><div class=\"tna-date-input__item\"><label for=\"date-day\" class=\"tna-date-input__item-label\">Day</label><input type=\"text\" id=\"date-day\" value=\"\" name=\"date-day\" class=\"tna-date-input__item-input test-class\" inputmode=\"numeric\"></div><div class=\"tna-date-input__item\"><label for=\"date-month\" class=\"tna-date-input__item-label\">Month</label><input type=\"text\" id=\"date-month\" value=\"\" name=\"date-month\" class=\"tna-date-input__item-input test-class\" inputmode=\"numeric\"></div><div class=\"tna-date-input__item\"><label for=\"date-year\" class=\"tna-date-input__item-label\">Year</label><input type=\"text\" id=\"date-year\" value=\"\" name=\"date-year\" class=\"tna-date-input__item-input test-class tna-date-input__item-input--wider\" inputmode=\"numeric\"></div></div></fieldset></div>"
80
+ },
81
+ {
82
+ "name": "with attributes",
83
+ "options": {
84
+ "label": "Enter a start date",
85
+ "headingLevel": 4,
86
+ "headingSize": "m",
87
+ "id": "date",
88
+ "name": "date",
89
+ "attributes": {
90
+ "data-testattribute": "foobar"
91
+ }
92
+ },
93
+ "html": "<div class=\"tna-form__group\"><fieldset class=\"tna-form__fieldset\"><legend class=\"tna-form__legend\"><h4 class=\"tna-form__heading tna-form__heading--m\">Enter a start date</h4></legend><div class=\"tna-date-input\" id=\"date\"><div class=\"tna-date-input__item\"><label for=\"date-day\" class=\"tna-date-input__item-label\">Day</label><input type=\"text\" id=\"date-day\" value=\"\" name=\"date-day\" class=\"tna-date-input__item-input\" inputmode=\"numeric\" data-testattribute=\"foobar\"></div><div class=\"tna-date-input__item\"><label for=\"date-month\" class=\"tna-date-input__item-label\">Month</label><input type=\"text\" id=\"date-month\" value=\"\" name=\"date-month\" class=\"tna-date-input__item-input\" inputmode=\"numeric\" data-testattribute=\"foobar\"></div><div class=\"tna-date-input__item\"><label for=\"date-year\" class=\"tna-date-input__item-label\">Year</label><input type=\"text\" id=\"date-year\" value=\"\" name=\"date-year\" class=\"tna-date-input__item-input tna-date-input__item-input--wider\" inputmode=\"numeric\" data-testattribute=\"foobar\"></div></div></fieldset></div>"
94
+ },
95
+ {
96
+ "name": "with form group classes",
97
+ "options": {
98
+ "label": "Enter a start date",
99
+ "headingLevel": 4,
100
+ "headingSize": "m",
101
+ "id": "date",
102
+ "name": "date",
103
+ "formGroupClasses": "test-class"
104
+ },
105
+ "html": "<div class=\"tna-form__group test-class\"><fieldset class=\"tna-form__fieldset\"><legend class=\"tna-form__legend\"><h4 class=\"tna-form__heading tna-form__heading--m\">Enter a start date</h4></legend><div class=\"tna-date-input\" id=\"date\"><div class=\"tna-date-input__item\"><label for=\"date-day\" class=\"tna-date-input__item-label\">Day</label><input type=\"text\" id=\"date-day\" value=\"\" name=\"date-day\" class=\"tna-date-input__item-input\" inputmode=\"numeric\"></div><div class=\"tna-date-input__item\"><label for=\"date-month\" class=\"tna-date-input__item-label\">Month</label><input type=\"text\" id=\"date-month\" value=\"\" name=\"date-month\" class=\"tna-date-input__item-input\" inputmode=\"numeric\"></div><div class=\"tna-date-input__item\"><label for=\"date-year\" class=\"tna-date-input__item-label\">Year</label><input type=\"text\" id=\"date-year\" value=\"\" name=\"date-year\" class=\"tna-date-input__item-input tna-date-input__item-input--wider\" inputmode=\"numeric\"></div></div></fieldset></div>"
106
+ },
107
+ {
108
+ "name": "with form group attributes",
109
+ "options": {
110
+ "label": "Enter a start date",
111
+ "headingLevel": 4,
112
+ "headingSize": "m",
113
+ "id": "date",
114
+ "name": "date",
115
+ "formGroupAttributes": {
116
+ "data-testattribute": "foobar"
117
+ }
118
+ },
119
+ "html": "<div class=\"tna-form__group\" data-testattribute=\"foobar\"><fieldset class=\"tna-form__fieldset\"><legend class=\"tna-form__legend\"><h4 class=\"tna-form__heading tna-form__heading--m\">Enter a start date</h4></legend><div class=\"tna-date-input\" id=\"date\"><div class=\"tna-date-input__item\"><label for=\"date-day\" class=\"tna-date-input__item-label\">Day</label><input type=\"text\" id=\"date-day\" value=\"\" name=\"date-day\" class=\"tna-date-input__item-input\" inputmode=\"numeric\"></div><div class=\"tna-date-input__item\"><label for=\"date-month\" class=\"tna-date-input__item-label\">Month</label><input type=\"text\" id=\"date-month\" value=\"\" name=\"date-month\" class=\"tna-date-input__item-input\" inputmode=\"numeric\"></div><div class=\"tna-date-input__item\"><label for=\"date-year\" class=\"tna-date-input__item-label\">Year</label><input type=\"text\" id=\"date-year\" value=\"\" name=\"date-year\" class=\"tna-date-input__item-input tna-date-input__item-input--wider\" inputmode=\"numeric\"></div></div></fieldset></div>"
68
120
  }
69
121
  ]
70
122
  }
@@ -81,6 +81,18 @@
81
81
  "required": false,
82
82
  "description": ""
83
83
  },
84
+ {
85
+ "name": "formGroupClasses",
86
+ "type": "string",
87
+ "required": false,
88
+ "description": "Classes to add to the date input form group."
89
+ },
90
+ {
91
+ "name": "formGroupAttributes",
92
+ "type": "object",
93
+ "required": false,
94
+ "description": "HTML attributes (for example data attributes) to add to the date input form group."
95
+ },
84
96
  {
85
97
  "name": "classes",
86
98
  "type": "string",
@@ -1,9 +1,13 @@
1
- {%- set containerClasses = [params.classes] if params.classes else [] -%}
1
+ {%- set containerClasses = [params.formGroupClasses] if params.formGroupClasses else [] -%}
2
2
  {%- if params.inline -%}
3
3
  {%- set containerClasses = containerClasses.concat('tna-form__group--inline') -%}
4
4
  {%- endif -%}
5
5
  {%- set classes = containerClasses | join(' ') -%}
6
- <div class="tna-form__group{% if params.error %} tna-form__group--error{% endif %}{% if classes %} {{ classes }}{% endif %}"{% for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>
6
+
7
+ {%- set inputClassesParams = [params.classes] if params.classes else [] -%}
8
+ {%- set inputClasses = inputClassesParams | join(' ') -%}
9
+
10
+ <div class="tna-form__group{% if params.error %} tna-form__group--error{% endif %}{% if classes %} {{ classes }}{% endif %}"{% for attribute, value in params.formGroupAttributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>
7
11
  <fieldset class="tna-form__fieldset"{%- if params.hint or params.error %} aria-describedby="{%- if params.hint -%}{{ params.id }}-hint{%- endif %} {% if params.error -%}{{ params.id }}-error{%- endif -%}"{%- endif %}>
8
12
  <legend class="tna-form__legend">
9
13
  <h{{ params.headingLevel }} class="tna-form__heading tna-form__heading--{{ params.headingSize or 'm' }}">
@@ -25,19 +29,19 @@
25
29
  <label for="{{ params.id }}-day" class="tna-date-input__item-label">
26
30
  Day
27
31
  </label>
28
- <input type="text" id="{{ params.id }}-day" value="{{ params.value.day if params.value }}" name="{{ params.name }}-day" class="tna-date-input__item-input" inputmode="numeric">
32
+ <input type="text" id="{{ params.id }}-day" value="{{ params.value.day if params.value }}" name="{{ params.name }}-day" class="tna-date-input__item-input{% if inputClasses %} {{ inputClasses }}{% endif %}" inputmode="numeric"{%- for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>
29
33
  </div>
30
34
  <div class="tna-date-input__item">
31
35
  <label for="{{ params.id }}-month" class="tna-date-input__item-label">
32
36
  Month
33
37
  </label>
34
- <input type="text" id="{{ params.id }}-month" value="{{ params.value.month if params.value }}" name="{{ params.name }}-month" class="tna-date-input__item-input" inputmode="numeric">
38
+ <input type="text" id="{{ params.id }}-month" value="{{ params.value.month if params.value }}" name="{{ params.name }}-month" class="tna-date-input__item-input{% if inputClasses %} {{ inputClasses }}{% endif %}" inputmode="numeric"{%- for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>
35
39
  </div>
36
40
  <div class="tna-date-input__item">
37
41
  <label for="{{ params.id }}-year" class="tna-date-input__item-label">
38
42
  Year
39
43
  </label>
40
- <input type="text" id="{{ params.id }}-year" value="{{ params.value.year if params.value }}" name="{{ params.name }}-year" class="tna-date-input__item-input tna-date-input__item-input--wider" inputmode="numeric">
44
+ <input type="text" id="{{ params.id }}-year" value="{{ params.value.year if params.value }}" name="{{ params.name }}-year" class="tna-date-input__item-input{% if inputClasses %} {{ inputClasses }}{% endif %} tna-date-input__item-input--wider" inputmode="numeric"{%- for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>
41
45
  </div>
42
46
  </div>
43
47
  </fieldset>
@@ -73,6 +73,58 @@
73
73
  "maxWidth": true
74
74
  },
75
75
  "html": "<div class=\"tna-form__group\"><div class=\"tna-form__group-contents\"><h4 class=\"tna-form__heading tna-form__heading--m\"><label class=\"tna-form__label\" for=\"date\">Enter a start date</label></h4></div><input type=\"date\" id=\"date\" class=\"tna-date-search tna-date-search--max-width \" name=\"date\" value=\"\"></div>"
76
+ },
77
+ {
78
+ "name": "with classes",
79
+ "options": {
80
+ "label": "Enter a start date",
81
+ "headingLevel": 4,
82
+ "headingSize": "m",
83
+ "id": "date",
84
+ "name": "date",
85
+ "classes": "test-class"
86
+ },
87
+ "html": "<div class=\"tna-form__group\"><div class=\"tna-form__group-contents\"><h4 class=\"tna-form__heading tna-form__heading--m\"><label class=\"tna-form__label\" for=\"date\">Enter a start date</label></h4></div><input type=\"date\" id=\"date\" class=\"tna-date-search test-class\" name=\"date\" value=\"\"></div>"
88
+ },
89
+ {
90
+ "name": "with attributes",
91
+ "options": {
92
+ "label": "Enter a start date",
93
+ "headingLevel": 4,
94
+ "headingSize": "m",
95
+ "id": "date",
96
+ "name": "date",
97
+ "attributes": {
98
+ "data-testattribute": "foobar"
99
+ }
100
+ },
101
+ "html": "<div class=\"tna-form__group\"><div class=\"tna-form__group-contents\"><h4 class=\"tna-form__heading tna-form__heading--m\"><label class=\"tna-form__label\" for=\"date\">Enter a start date</label></h4></div><input type=\"date\" id=\"date\" class=\"tna-date-search \" name=\"date\" value=\"\" data-testattribute=\"foobar\"></div>"
102
+ },
103
+ {
104
+ "name": "with form group classes",
105
+ "options": {
106
+ "label": "Enter a start date",
107
+ "headingLevel": 4,
108
+ "headingSize": "m",
109
+ "id": "date",
110
+ "name": "date",
111
+ "formGroupClasses": "test-class"
112
+ },
113
+ "html": "<div class=\"tna-form__group test-class\"><div class=\"tna-form__group-contents\"><h4 class=\"tna-form__heading tna-form__heading--m\"><label class=\"tna-form__label\" for=\"date\">Enter a start date</label></h4></div><input type=\"date\" id=\"date\" class=\"tna-date-search \" name=\"date\" value=\"\"></div>"
114
+ },
115
+ {
116
+ "name": "with form group attributes",
117
+ "options": {
118
+ "label": "Enter a start date",
119
+ "headingLevel": 4,
120
+ "headingSize": "m",
121
+ "id": "date",
122
+ "name": "date",
123
+ "formGroupAttributes": {
124
+ "data-testattribute": "foobar"
125
+ }
126
+ },
127
+ "html": "<div class=\"tna-form__group\" data-testattribute=\"foobar\"><div class=\"tna-form__group-contents\"><h4 class=\"tna-form__heading tna-form__heading--m\"><label class=\"tna-form__label\" for=\"date\">Enter a start date</label></h4></div><input type=\"date\" id=\"date\" class=\"tna-date-search \" name=\"date\" value=\"\"></div>"
76
128
  }
77
129
  ]
78
130
  }
@@ -75,7 +75,7 @@
75
75
  },
76
76
  {
77
77
  "name": "formGroupAttributes",
78
- "type": "string",
78
+ "type": "object",
79
79
  "required": false,
80
80
  "description": "HTML attributes (for example data attributes) to add to the date search form group."
81
81
  },