@nationalarchives/frontend 0.20.1 → 0.22.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 (55) hide show
  1. package/nationalarchives/all+analytics.js +1 -1
  2. package/nationalarchives/all+analytics.js.map +1 -1
  3. package/nationalarchives/all+analytics.mjs +4 -2
  4. package/nationalarchives/all.css +1 -1
  5. package/nationalarchives/all.css.map +1 -1
  6. package/nationalarchives/all.js +1 -1
  7. package/nationalarchives/all.js.map +1 -1
  8. package/nationalarchives/all.mjs +14 -5
  9. package/nationalarchives/analytics.js +1 -1
  10. package/nationalarchives/analytics.js.map +1 -1
  11. package/nationalarchives/analytics.mjs +4 -0
  12. package/nationalarchives/components/_forms.scss +1 -0
  13. package/nationalarchives/components/card/card.css +1 -1
  14. package/nationalarchives/components/card/card.css.map +1 -1
  15. package/nationalarchives/components/card/card.scss +1 -0
  16. package/nationalarchives/components/checkboxes/macro-options.json +1 -1
  17. package/nationalarchives/components/date-input/date-input.js +1 -1
  18. package/nationalarchives/components/date-input/date-input.js.map +1 -1
  19. package/nationalarchives/components/date-input/date-input.mjs +42 -15
  20. package/nationalarchives/components/date-input/fixtures.json +15 -3
  21. package/nationalarchives/components/date-input/macro-options.json +6 -6
  22. package/nationalarchives/components/date-input/template.njk +4 -4
  23. package/nationalarchives/components/date-search/macro-options.json +1 -1
  24. package/nationalarchives/components/error-summary/analytics.js +16 -0
  25. package/nationalarchives/components/error-summary/fixtures.json +4 -1
  26. package/nationalarchives/components/error-summary/macro-options.json +1 -1
  27. package/nationalarchives/components/error-summary/template.njk +4 -0
  28. package/nationalarchives/components/file-input/_index.scss +1 -0
  29. package/nationalarchives/components/file-input/analytics.js +59 -0
  30. package/nationalarchives/components/file-input/file-input.css +1 -0
  31. package/nationalarchives/components/file-input/file-input.css.map +1 -0
  32. package/nationalarchives/components/file-input/file-input.js +2 -0
  33. package/nationalarchives/components/file-input/file-input.js.map +1 -0
  34. package/nationalarchives/components/file-input/file-input.mjs +99 -0
  35. package/nationalarchives/components/file-input/file-input.njk +8 -0
  36. package/nationalarchives/components/file-input/file-input.scss +127 -0
  37. package/nationalarchives/components/file-input/fixtures.json +131 -0
  38. package/nationalarchives/components/file-input/macro-options.json +90 -0
  39. package/nationalarchives/components/file-input/macro.njk +3 -0
  40. package/nationalarchives/components/file-input/template.njk +27 -0
  41. package/nationalarchives/components/gallery/gallery.js +1 -1
  42. package/nationalarchives/components/gallery/gallery.js.map +1 -1
  43. package/nationalarchives/components/gallery/gallery.mjs +1 -0
  44. package/nationalarchives/components/radios/macro-options.json +1 -1
  45. package/nationalarchives/components/search-field/macro-options.json +1 -1
  46. package/nationalarchives/components/secondary-navigation/secondary-navigation.css +1 -1
  47. package/nationalarchives/components/secondary-navigation/secondary-navigation.css.map +1 -1
  48. package/nationalarchives/components/secondary-navigation/secondary-navigation.scss +5 -0
  49. package/nationalarchives/components/select/macro-options.json +1 -1
  50. package/nationalarchives/components/text-input/analytics.js +1 -2
  51. package/nationalarchives/components/text-input/macro-options.json +1 -1
  52. package/nationalarchives/components/textarea/macro-options.json +1 -1
  53. package/nationalarchives/prototype-kit.css +1 -1
  54. package/nationalarchives/prototype-kit.css.map +1 -1
  55. package/package.json +2 -2
@@ -0,0 +1,131 @@
1
+ {
2
+ "component": "file-input",
3
+ "fixtures": [
4
+ {
5
+ "name": "plain file input",
6
+ "options": {
7
+ "label": "Upload a file",
8
+ "headingLevel": 4,
9
+ "headingSize": "m",
10
+ "id": "file",
11
+ "name": "file"
12
+ },
13
+ "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=\"file\">Upload a file</label></h4></div><input id=\"file\" class=\"tna-file-input \" name=\"file\" type=\"file\"></div>"
14
+ },
15
+ {
16
+ "name": "file input with a hint",
17
+ "options": {
18
+ "label": "Upload a file",
19
+ "headingLevel": 4,
20
+ "headingSize": "m",
21
+ "id": "file",
22
+ "name": "file",
23
+ "hint": "This years report as a PDF."
24
+ },
25
+ "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=\"file\">Upload a file</label></h4><p id=\"file-hint\" class=\"tna-form__hint\">This years report as a PDF.</p></div><input id=\"file\" class=\"tna-file-input \" name=\"file\" type=\"file\" aria-describedby=\"file-hint \"></div>"
26
+ },
27
+ {
28
+ "name": "file input with an error",
29
+ "options": {
30
+ "label": "Upload a file",
31
+ "headingLevel": 4,
32
+ "headingSize": "m",
33
+ "id": "file",
34
+ "name": "file",
35
+ "error": {
36
+ "file": "Enter a name"
37
+ }
38
+ },
39
+ "html": "<div class=\"tna-form__group tna-form__group--error\"><div class=\"tna-form__group-contents\"><h4 class=\"tna-form__heading tna-form__heading--m\"><label class=\"tna-form__label\" for=\"file\">Upload a file</label></h4><p id=\"file-error\" class=\"tna-form__error-message\"><span class=\"tna-!--visually-hidden\">Error:</span> </p></div><input id=\"file\" class=\"tna-file-input \" name=\"file\" type=\"file\" aria-describedby=\" file-error\"></div>"
40
+ },
41
+ {
42
+ "name": "multiple",
43
+ "options": {
44
+ "label": "Upload a file",
45
+ "headingLevel": 4,
46
+ "headingSize": "m",
47
+ "id": "file",
48
+ "name": "file",
49
+ "multiple": true
50
+ },
51
+ "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=\"file\">Upload a file</label></h4></div><input id=\"file\" class=\"tna-file-input \" name=\"file\" type=\"file\" multiple></div>"
52
+ },
53
+ {
54
+ "name": "drag and drop support",
55
+ "options": {
56
+ "label": "Upload a file",
57
+ "headingLevel": 4,
58
+ "headingSize": "m",
59
+ "id": "file",
60
+ "name": "file",
61
+ "droppable": true
62
+ },
63
+ "html": "<div class=\"tna-form__group\" data-module=\"tna-file-input\"><div class=\"tna-form__group-contents\"><h4 class=\"tna-form__heading tna-form__heading--m\"><label class=\"tna-form__label\" for=\"file\">Upload a file</label></h4></div><input id=\"file\" class=\"tna-file-input \" name=\"file\" type=\"file\"></div>"
64
+ },
65
+ {
66
+ "name": "multiple drag and drop support",
67
+ "options": {
68
+ "label": "Upload a file",
69
+ "headingLevel": 4,
70
+ "headingSize": "m",
71
+ "id": "file",
72
+ "name": "file",
73
+ "multiple": true,
74
+ "droppable": true
75
+ },
76
+ "html": "<div class=\"tna-form__group\" data-module=\"tna-file-input\"><div class=\"tna-form__group-contents\"><h4 class=\"tna-form__heading tna-form__heading--m\"><label class=\"tna-form__label\" for=\"file\">Upload a file</label></h4></div><input id=\"file\" class=\"tna-file-input \" name=\"file\" type=\"file\" multiple></div>"
77
+ },
78
+ {
79
+ "name": "with classes",
80
+ "options": {
81
+ "label": "Upload a file",
82
+ "headingLevel": 4,
83
+ "headingSize": "m",
84
+ "id": "file",
85
+ "name": "file",
86
+ "classes": "test-class"
87
+ },
88
+ "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=\"file\">Upload a file</label></h4></div><input id=\"file\" class=\"tna-file-input test-class\" name=\"file\" type=\"file\"></div>"
89
+ },
90
+ {
91
+ "name": "with attributes",
92
+ "options": {
93
+ "label": "Upload a file",
94
+ "headingLevel": 4,
95
+ "headingSize": "m",
96
+ "id": "file",
97
+ "name": "file",
98
+ "attributes": {
99
+ "data-testattribute": "foobar"
100
+ }
101
+ },
102
+ "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=\"file\">Upload a file</label></h4></div><input id=\"file\" class=\"tna-file-input \" name=\"file\" type=\"file\" data-testattribute=\"foobar\"></div>"
103
+ },
104
+ {
105
+ "name": "with form group classes",
106
+ "options": {
107
+ "label": "Upload a file",
108
+ "headingLevel": 4,
109
+ "headingSize": "m",
110
+ "id": "file",
111
+ "name": "file",
112
+ "formGroupClasses": "test-class"
113
+ },
114
+ "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=\"file\">Upload a file</label></h4></div><input id=\"file\" class=\"tna-file-input \" name=\"file\" type=\"file\"></div>"
115
+ },
116
+ {
117
+ "name": "with form group attributes",
118
+ "options": {
119
+ "label": "Upload a file",
120
+ "headingLevel": 4,
121
+ "headingSize": "m",
122
+ "id": "file",
123
+ "name": "file",
124
+ "formGroupAttributes": {
125
+ "data-testattribute": "foobar"
126
+ }
127
+ },
128
+ "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=\"file\">Upload a file</label></h4></div><input id=\"file\" class=\"tna-file-input \" name=\"file\" type=\"file\"></div>"
129
+ }
130
+ ]
131
+ }
@@ -0,0 +1,90 @@
1
+ [
2
+ {
3
+ "name": "label",
4
+ "type": "string",
5
+ "required": true,
6
+ "description": "The label for the file input field."
7
+ },
8
+ {
9
+ "name": "headingLevel",
10
+ "type": "number",
11
+ "required": true,
12
+ "description": "The heading level which represents an element from `<h1>` through to `<h6>`."
13
+ },
14
+ {
15
+ "name": "headingSize",
16
+ "type": "string",
17
+ "required": false,
18
+ "description": "The physical size of the file input title (`xl`, `l`, `m`, `s` or `xs`)."
19
+ },
20
+ {
21
+ "name": "id",
22
+ "type": "string",
23
+ "required": true,
24
+ "description": "A unique ID for the file input component."
25
+ },
26
+ {
27
+ "name": "name",
28
+ "type": "string",
29
+ "required": true,
30
+ "description": "The name of the form field."
31
+ },
32
+ {
33
+ "name": "hint",
34
+ "type": "string",
35
+ "required": false,
36
+ "description": "An optional hint to display above the form field."
37
+ },
38
+ {
39
+ "name": "multiple",
40
+ "type": "boolean",
41
+ "required": false,
42
+ "description": "If true, allows multiple files to be selected.",
43
+ "default": false
44
+ },
45
+ {
46
+ "name": "droppable",
47
+ "type": "boolean",
48
+ "required": false,
49
+ "description": "If true, allows drag and drop functionality.",
50
+ "default": false
51
+ },
52
+ {
53
+ "name": "error",
54
+ "type": "object",
55
+ "required": false,
56
+ "description": "If set, the details of any errors.",
57
+ "params": [
58
+ {
59
+ "name": "text",
60
+ "type": "string",
61
+ "required": true,
62
+ "description": "The error text to display."
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "name": "formGroupClasses",
68
+ "type": "string",
69
+ "required": false,
70
+ "description": "Classes to add to the file input group."
71
+ },
72
+ {
73
+ "name": "formGroupAttributes",
74
+ "type": "object",
75
+ "required": false,
76
+ "description": "HTML attributes (for example data attributes) to add to the file input form group."
77
+ },
78
+ {
79
+ "name": "classes",
80
+ "type": "string",
81
+ "required": false,
82
+ "description": "Classes to add to the file input."
83
+ },
84
+ {
85
+ "name": "attributes",
86
+ "type": "object",
87
+ "required": false,
88
+ "description": "HTML attributes (for example data attributes) to add to the file input."
89
+ }
90
+ ]
@@ -0,0 +1,3 @@
1
+ {% macro tnaFileInput(params) %}
2
+ {%- include "nationalarchives/components/file-input/template.njk" -%}
3
+ {% endmacro %}
@@ -0,0 +1,27 @@
1
+ {% from "nationalarchives/components/file-input/file-input.njk" import tnaFileInputElement %}
2
+
3
+ {%- set containerClasses = [params.formGroupClasses] if params.formGroupClasses else [] -%}
4
+ {%- if params.inline -%}
5
+ {%- set containerClasses = containerClasses.concat('tna-form__group--inline') -%}
6
+ {%- endif -%}
7
+ {%- set classes = containerClasses | join(' ') -%}
8
+ <div class="tna-form__group{% if params.error %} tna-form__group--error{% endif %}{% if classes %} {{ classes }}{% endif %}" {%- if params.droppable %} data-module="tna-file-input"{% endif %} {%- for attribute, value in params.formGroupAttributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>
9
+ <div class="tna-form__group-contents">
10
+ <h{{ params.headingLevel }} class="tna-form__heading tna-form__heading--{{ params.headingSize or 'm' }}">
11
+ <label class="tna-form__label" for="{{ params.id }}">
12
+ {{ params.label }}
13
+ </label>
14
+ </h{{ params.headingLevel }}>
15
+ {%- if params.hint %}
16
+ <p id="{{ params.id }}-hint" class="tna-form__hint">
17
+ {{ params.hint }}
18
+ </p>
19
+ {%- endif %}
20
+ {%- if params.error %}
21
+ <p id="{{ params.id }}-error" class="tna-form__error-message">
22
+ <span class="tna-!--visually-hidden">Error:</span> {{ params.error.text }}
23
+ </p>
24
+ {%- endif %}
25
+ </div>
26
+ {{ tnaFileInputElement(params) | indent(4) }}
27
+ </div>
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,r(n.key),n)}}function r(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}t.r(e),t.d(e,{Gallery:()=>o});var o=function(){return t=function t(e){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$itemsContainer=e&&e.querySelector(".tna-gallery__items"),this.$items=this.$itemsContainer&&this.$itemsContainer.querySelectorAll(".tna-gallery__item"),this.$navigation=e&&e.querySelector(".tna-gallery__navigation"),this.$navigationItems=this.$navigation&&e.querySelectorAll(".tna-gallery__navigation-item"),this.$options=e&&e.querySelector(".tna-gallery__options"),this.$navigationButtons=e&&e.querySelector(".tna-gallery__navigation-buttons"),this.$module&&this.$itemsContainer&&this.$items&&this.$navigation&&this.$navigationItems&&this.$options&&this.$navigationButtons&&(this.$module.classList.add("tna-gallery--interactive"),this.$showIndex=this.$options.querySelector('button[value="show-index"]'),this.$enterFullscreen=this.$options.querySelector('button[value="enter-fullscreen"]'),this.$exitFullscreen=this.$options.querySelector('button[value="exit-fullscreen"]'),this.$navigationButtonPrev=this.$navigationButtons.querySelector(".tna-gallery__navigation-prev"),this.$navigationButtonNext=this.$navigationButtons.querySelector(".tna-gallery__navigation-next"),this.$module.addEventListener("fullscreenchange",(function(){return i.syncFullScreen()})),this.setup(),this.allowGridIndex=this.$module.dataset.showgrid||!1,this.allowGridIndex?this.showIndex():(this.currentId=this.$items[0].id,this.showItem(this.currentId)))},e=[{key:"setup",value:function(){var t,e,i,n,r,o,s,l=this;this.$items.forEach((function(t){var e;t.setAttribute("hidden",""),t.setAttribute("aria-hidden","true"),null===(e=t.querySelector(".tna-gallery__item-header"))||void 0===e||e.setAttribute("aria-hidden","true")})),this.$navigation.removeAttribute("hidden"),this.$navigationItems.forEach((function(t){t.addEventListener("click",(function(){l.showItem(t.getAttribute("aria-controls")),l.$itemsContainer.setAttribute("tabindex","0"),l.$itemsContainer.focus()}))})),this.$module.addEventListener("keydown",(function(t){var e=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":l.showPreviousItem(),e=!0;break;case"ArrowRight":case"ArrowDown":l.showNextItem(),e=!0;break;case"Home":l.showFirstItem(),e=!0;break;case"End":l.showLastItem(),e=!0}e&&(t.stopPropagation(),t.preventDefault())})),this.$options.removeAttribute("hidden"),document.fullscreenEnabled&&this.$enterFullscreen&&this.$exitFullscreen&&(null===(r=this.$enterFullscreen)||void 0===r||r.addEventListener("click",(function(){return l.enterFullScreen()})),null===(o=this.$exitFullscreen)||void 0===o||o.addEventListener("click",(function(){return l.exitFullScreen()})),null===(s=this.$enterFullscreen)||void 0===s||s.removeAttribute("hidden")),null===(t=this.$showIndex)||void 0===t||t.addEventListener("click",(function(){return l.showIndex()})),null===(e=this.$navigationButtons)||void 0===e||e.removeAttribute("hidden"),null===(i=this.$navigationButtonPrev)||void 0===i||i.addEventListener("click",(function(){l.showPreviousItem()})),null===(n=this.$navigationButtonNext)||void 0===n||n.addEventListener("click",(function(){l.showNextItem()})),this.$liveRegion=document.createElement("div"),this.$liveRegion.setAttribute("aria-live","polite"),this.$liveRegion.setAttribute("aria-atomic","true"),this.$liveRegion.setAttribute("class","tna-gallery__item-header"),this.$itemsContainer.prepend(this.$liveRegion),this.$itemsContainer.classList.add("tna-gallery__items--hide-item-titles"),this.$itemsContainer.addEventListener("blur",(function(){return l.$itemsContainer.removeAttribute("tabindex")}))}},{key:"showIndex",value:function(){var t;this.showItem(""),this.$itemsContainer.classList.add("tna-gallery__items--hide-items"),null===(t=this.$showIndex)||void 0===t||t.setAttribute("hidden","")}},{key:"showItem",value:function(t){var e,i=this;this.$items.forEach((function(e){t&&e.id===t?(e.removeAttribute("hidden"),e.removeAttribute("aria-hidden")):(e.setAttribute("hidden",""),e.setAttribute("aria-hidden","true"))})),this.$navigationItems.forEach((function(e){t&&e.getAttribute("aria-controls")===t?(e.setAttribute("aria-current","true"),i.isFullScreen()&&e.scrollIntoView({block:"nearest"})):e.setAttribute("aria-current","false")})),this.allowGridIndex&&(null===(e=this.$showIndex)||void 0===e||e.removeAttribute("hidden")),this.$itemsContainer.classList.remove("tna-gallery__items--hide-items"),this.currentId=t,this.$liveRegion.textContent="Image ".concat(this.getCurrentItemIndex()+1," of ").concat(this.$items.length)}},{key:"getCurrentItemIndex",value:function(){var t=this;return Array.from(this.$items).findIndex((function(e){return e.id===t.currentId}))}},{key:"showPreviousItem",value:function(){var t=this.getCurrentItemIndex()-1;t<0&&(t=this.$items.length-1),this.showItem(this.$items[t].id)}},{key:"showNextItem",value:function(){var t=this.getCurrentItemIndex()+1;t>=this.$items.length&&(t=0),this.showItem(this.$items[t].id)}},{key:"showFirstItem",value:function(){this.showItem(this.$items[0].id)}},{key:"showLastItem",value:function(){this.showItem(this.$items[this.$items.length-1].id)}},{key:"isFullScreen",value:function(){return document.fullscreenElement}},{key:"enterFullScreen",value:function(){this.$module.requestFullscreen(),this.syncFullScreen(),this.$module.focus()}},{key:"exitFullScreen",value:function(){document.exitFullscreen(),this.syncFullScreen()}},{key:"syncFullScreen",value:function(){this.isFullScreen()?(this.$enterFullscreen.setAttribute("hidden",""),this.$exitFullscreen.removeAttribute("hidden")):(this.$exitFullscreen.setAttribute("hidden",""),this.$enterFullscreen.removeAttribute("hidden"))}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,r(n.key),n)}}function r(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}t.r(e),t.d(e,{Gallery:()=>o});var o=function(){return t=function t(e){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$itemsContainer=e&&e.querySelector(".tna-gallery__items"),this.$items=this.$itemsContainer&&this.$itemsContainer.querySelectorAll(".tna-gallery__item"),this.$navigation=e&&e.querySelector(".tna-gallery__navigation"),this.$navigationItems=this.$navigation&&e.querySelectorAll(".tna-gallery__navigation-item"),this.$options=e&&e.querySelector(".tna-gallery__options"),this.$navigationButtons=e&&e.querySelector(".tna-gallery__navigation-buttons"),this.$module&&this.$itemsContainer&&this.$items&&!(this.$items.length<2)&&this.$navigation&&this.$navigationItems&&this.$options&&this.$navigationButtons&&(this.$module.classList.add("tna-gallery--interactive"),this.$showIndex=this.$options.querySelector('button[value="show-index"]'),this.$enterFullscreen=this.$options.querySelector('button[value="enter-fullscreen"]'),this.$exitFullscreen=this.$options.querySelector('button[value="exit-fullscreen"]'),this.$navigationButtonPrev=this.$navigationButtons.querySelector(".tna-gallery__navigation-prev"),this.$navigationButtonNext=this.$navigationButtons.querySelector(".tna-gallery__navigation-next"),this.$module.addEventListener("fullscreenchange",(function(){return i.syncFullScreen()})),this.setup(),this.allowGridIndex=this.$module.dataset.showgrid||!1,this.allowGridIndex?this.showIndex():(this.currentId=this.$items[0].id,this.showItem(this.currentId)))},e=[{key:"setup",value:function(){var t,e,i,n,r,o,s,l=this;this.$items.forEach((function(t){var e;t.setAttribute("hidden",""),t.setAttribute("aria-hidden","true"),null===(e=t.querySelector(".tna-gallery__item-header"))||void 0===e||e.setAttribute("aria-hidden","true")})),this.$navigation.removeAttribute("hidden"),this.$navigationItems.forEach((function(t){t.addEventListener("click",(function(){l.showItem(t.getAttribute("aria-controls")),l.$itemsContainer.setAttribute("tabindex","0"),l.$itemsContainer.focus()}))})),this.$module.addEventListener("keydown",(function(t){var e=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":l.showPreviousItem(),e=!0;break;case"ArrowRight":case"ArrowDown":l.showNextItem(),e=!0;break;case"Home":l.showFirstItem(),e=!0;break;case"End":l.showLastItem(),e=!0}e&&(t.stopPropagation(),t.preventDefault())})),this.$options.removeAttribute("hidden"),document.fullscreenEnabled&&this.$enterFullscreen&&this.$exitFullscreen&&(null===(r=this.$enterFullscreen)||void 0===r||r.addEventListener("click",(function(){return l.enterFullScreen()})),null===(o=this.$exitFullscreen)||void 0===o||o.addEventListener("click",(function(){return l.exitFullScreen()})),null===(s=this.$enterFullscreen)||void 0===s||s.removeAttribute("hidden")),null===(t=this.$showIndex)||void 0===t||t.addEventListener("click",(function(){return l.showIndex()})),null===(e=this.$navigationButtons)||void 0===e||e.removeAttribute("hidden"),null===(i=this.$navigationButtonPrev)||void 0===i||i.addEventListener("click",(function(){l.showPreviousItem()})),null===(n=this.$navigationButtonNext)||void 0===n||n.addEventListener("click",(function(){l.showNextItem()})),this.$liveRegion=document.createElement("div"),this.$liveRegion.setAttribute("aria-live","polite"),this.$liveRegion.setAttribute("aria-atomic","true"),this.$liveRegion.setAttribute("class","tna-gallery__item-header"),this.$itemsContainer.prepend(this.$liveRegion),this.$itemsContainer.classList.add("tna-gallery__items--hide-item-titles"),this.$itemsContainer.addEventListener("blur",(function(){return l.$itemsContainer.removeAttribute("tabindex")}))}},{key:"showIndex",value:function(){var t;this.showItem(""),this.$itemsContainer.classList.add("tna-gallery__items--hide-items"),null===(t=this.$showIndex)||void 0===t||t.setAttribute("hidden","")}},{key:"showItem",value:function(t){var e,i=this;this.$items.forEach((function(e){t&&e.id===t?(e.removeAttribute("hidden"),e.removeAttribute("aria-hidden")):(e.setAttribute("hidden",""),e.setAttribute("aria-hidden","true"))})),this.$navigationItems.forEach((function(e){t&&e.getAttribute("aria-controls")===t?(e.setAttribute("aria-current","true"),i.isFullScreen()&&e.scrollIntoView({block:"nearest"})):e.setAttribute("aria-current","false")})),this.allowGridIndex&&(null===(e=this.$showIndex)||void 0===e||e.removeAttribute("hidden")),this.$itemsContainer.classList.remove("tna-gallery__items--hide-items"),this.currentId=t,this.$liveRegion.textContent="Image ".concat(this.getCurrentItemIndex()+1," of ").concat(this.$items.length)}},{key:"getCurrentItemIndex",value:function(){var t=this;return Array.from(this.$items).findIndex((function(e){return e.id===t.currentId}))}},{key:"showPreviousItem",value:function(){var t=this.getCurrentItemIndex()-1;t<0&&(t=this.$items.length-1),this.showItem(this.$items[t].id)}},{key:"showNextItem",value:function(){var t=this.getCurrentItemIndex()+1;t>=this.$items.length&&(t=0),this.showItem(this.$items[t].id)}},{key:"showFirstItem",value:function(){this.showItem(this.$items[0].id)}},{key:"showLastItem",value:function(){this.showItem(this.$items[this.$items.length-1].id)}},{key:"isFullScreen",value:function(){return document.fullscreenElement}},{key:"enterFullScreen",value:function(){this.$module.requestFullscreen(),this.syncFullScreen(),this.$module.focus()}},{key:"exitFullScreen",value:function(){document.exitFullscreen(),this.syncFullScreen()}},{key:"syncFullScreen",value:function(){this.isFullScreen()?(this.$enterFullscreen.setAttribute("hidden",""),this.$exitFullscreen.removeAttribute("hidden")):(this.$exitFullscreen.setAttribute("hidden",""),this.$enterFullscreen.removeAttribute("hidden"))}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})()));
2
2
  //# sourceMappingURL=gallery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/gallery/gallery.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAA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AAA,eAAAa,MAED,WACEK,KAAKwB,SAASxB,KAAKG,OAAOH,KAAKG,OAAO8D,OAAS,GAAG1C,GACpD,GAAC,CAAAzC,IAAA,eAAAa,MAED,WACE,OAAOqD,SAASuB,iBAClB,GAAC,CAAAzF,IAAA,kBAAAa,MAED,WACEK,KAAKH,QAAQ2E,oBACbxE,KAAKiB,iBACLjB,KAAKH,QAAQ0C,OACf,GAAC,CAAAzD,IAAA,iBAAAa,MAED,WACEqD,SAASyB,iBACTzE,KAAKiB,gBACP,GAAC,CAAAnC,IAAA,iBAAAa,MAED,WACMK,KAAK0D,gBACP1D,KAAKY,iBAAiBwB,aAAa,SAAU,IAC7CpC,KAAKa,gBAAgBwB,gBAAgB,YAErCrC,KAAKa,gBAAgBuB,aAAa,SAAU,IAC5CpC,KAAKY,iBAAiByB,gBAAgB,UAE1C,I,gFAAC,CApOiB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/gallery/gallery.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Gallery {\n constructor($module) {\n this.$module = $module;\n this.$itemsContainer =\n $module && $module.querySelector(\".tna-gallery__items\");\n this.$items =\n this.$itemsContainer &&\n this.$itemsContainer.querySelectorAll(\".tna-gallery__item\");\n this.$navigation =\n $module && $module.querySelector(\".tna-gallery__navigation\");\n this.$navigationItems =\n this.$navigation &&\n $module.querySelectorAll(\".tna-gallery__navigation-item\");\n this.$options = $module && $module.querySelector(\".tna-gallery__options\");\n this.$navigationButtons =\n $module && $module.querySelector(\".tna-gallery__navigation-buttons\");\n\n if (\n !this.$module ||\n !this.$itemsContainer ||\n !this.$items ||\n !this.$navigation ||\n !this.$navigationItems ||\n !this.$options ||\n !this.$navigationButtons\n ) {\n return;\n }\n\n this.$module.classList.add(\"tna-gallery--interactive\");\n\n this.$showIndex = this.$options.querySelector('button[value=\"show-index\"]');\n this.$enterFullscreen = this.$options.querySelector(\n 'button[value=\"enter-fullscreen\"]',\n );\n this.$exitFullscreen = this.$options.querySelector(\n 'button[value=\"exit-fullscreen\"]',\n );\n\n this.$navigationButtonPrev = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-prev\",\n );\n this.$navigationButtonNext = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-next\",\n );\n\n this.$module.addEventListener(\"fullscreenchange\", () =>\n this.syncFullScreen(),\n );\n\n this.setup();\n this.allowGridIndex = this.$module.dataset[\"showgrid\"] || false;\n if (this.allowGridIndex) {\n this.showIndex();\n } else {\n this.currentId = this.$items[0].id;\n this.showItem(this.currentId);\n }\n }\n\n setup() {\n this.$items.forEach(($item) => {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n $item\n .querySelector(\".tna-gallery__item-header\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n });\n this.$navigation.removeAttribute(\"hidden\");\n this.$navigationItems.forEach(($item) => {\n $item.addEventListener(\"click\", () => {\n this.showItem($item.getAttribute(\"aria-controls\"));\n this.$itemsContainer.setAttribute(\"tabindex\", \"0\");\n this.$itemsContainer.focus();\n });\n });\n this.$module.addEventListener(\"keydown\", (e) => {\n let preventDefaultKeyAction = false;\n switch (e.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.showPreviousItem();\n preventDefaultKeyAction = true;\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.showNextItem();\n preventDefaultKeyAction = true;\n break;\n case \"Home\":\n this.showFirstItem();\n preventDefaultKeyAction = true;\n break;\n case \"End\":\n this.showLastItem();\n preventDefaultKeyAction = true;\n break;\n }\n if (preventDefaultKeyAction) {\n e.stopPropagation();\n e.preventDefault();\n }\n });\n this.$options.removeAttribute(\"hidden\");\n if (\n document.fullscreenEnabled &&\n this.$enterFullscreen &&\n this.$exitFullscreen\n ) {\n this.$enterFullscreen?.addEventListener(\"click\", () =>\n this.enterFullScreen(),\n );\n this.$exitFullscreen?.addEventListener(\"click\", () =>\n this.exitFullScreen(),\n );\n this.$enterFullscreen?.removeAttribute(\"hidden\");\n }\n this.$showIndex?.addEventListener(\"click\", () => this.showIndex());\n this.$navigationButtons?.removeAttribute(\"hidden\");\n this.$navigationButtonPrev?.addEventListener(\"click\", () => {\n this.showPreviousItem();\n });\n this.$navigationButtonNext?.addEventListener(\"click\", () => {\n this.showNextItem();\n });\n\n this.$liveRegion = document.createElement(\"div\");\n this.$liveRegion.setAttribute(\"aria-live\", \"polite\");\n this.$liveRegion.setAttribute(\"aria-atomic\", \"true\");\n this.$liveRegion.setAttribute(\"class\", \"tna-gallery__item-header\");\n this.$itemsContainer.prepend(this.$liveRegion);\n this.$itemsContainer.classList.add(\"tna-gallery__items--hide-item-titles\");\n this.$itemsContainer.addEventListener(\"blur\", () =>\n this.$itemsContainer.removeAttribute(\"tabindex\"),\n );\n }\n\n showIndex() {\n this.showItem(\"\");\n this.$itemsContainer.classList.add(\"tna-gallery__items--hide-items\");\n this.$showIndex?.setAttribute(\"hidden\", \"\");\n }\n\n showItem(id) {\n this.$items.forEach(($item) => {\n if (id && $item.id === id) {\n $item.removeAttribute(\"hidden\");\n $item.removeAttribute(\"aria-hidden\");\n } else {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n }\n });\n this.$navigationItems.forEach(($item) => {\n if (id) {\n if ($item.getAttribute(\"aria-controls\") === id) {\n $item.setAttribute(\"aria-current\", \"true\");\n if (this.isFullScreen()) {\n $item.scrollIntoView({ block: \"nearest\" });\n }\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n });\n if (this.allowGridIndex) {\n this.$showIndex?.removeAttribute(\"hidden\");\n }\n this.$itemsContainer.classList.remove(\"tna-gallery__items--hide-items\");\n this.currentId = id;\n this.$liveRegion.textContent = `Image ${this.getCurrentItemIndex() + 1} of ${this.$items.length}`;\n }\n\n getCurrentItemIndex() {\n return Array.from(this.$items).findIndex(\n ($item) => $item.id === this.currentId,\n );\n }\n\n showPreviousItem() {\n let nextIndexToShow = this.getCurrentItemIndex() - 1;\n if (nextIndexToShow < 0) {\n nextIndexToShow = this.$items.length - 1;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showNextItem() {\n let nextIndexToShow = this.getCurrentItemIndex() + 1;\n if (nextIndexToShow >= this.$items.length) {\n nextIndexToShow = 0;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showFirstItem() {\n this.showItem(this.$items[0].id);\n }\n\n showLastItem() {\n this.showItem(this.$items[this.$items.length - 1].id);\n }\n\n isFullScreen() {\n return document.fullscreenElement;\n }\n\n enterFullScreen() {\n this.$module.requestFullscreen();\n this.syncFullScreen();\n this.$module.focus();\n }\n\n exitFullScreen() {\n document.exitFullscreen();\n this.syncFullScreen();\n }\n\n syncFullScreen() {\n if (this.isFullScreen()) {\n this.$enterFullscreen.setAttribute(\"hidden\", \"\");\n this.$exitFullscreen.removeAttribute(\"hidden\");\n } else {\n this.$exitFullscreen.setAttribute(\"hidden\", \"\");\n this.$enterFullscreen.removeAttribute(\"hidden\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Gallery","$module","_this","_classCallCheck","this","$itemsContainer","querySelector","$items","querySelectorAll","$navigation","$navigationItems","$options","$navigationButtons","classList","add","$showIndex","$enterFullscreen","$exitFullscreen","$navigationButtonPrev","$navigationButtonNext","addEventListener","syncFullScreen","setup","allowGridIndex","dataset","showIndex","currentId","id","showItem","_this$$showIndex","_this$$navigationButt","_this$$navigationButt2","_this$$navigationButt3","_this$$enterFullscree","_this$$exitFullscreen","_this$$enterFullscree2","_this2","forEach","$item","_$item$querySelector","setAttribute","removeAttribute","getAttribute","focus","e","preventDefaultKeyAction","showPreviousItem","showNextItem","showFirstItem","showLastItem","stopPropagation","preventDefault","document","fullscreenEnabled","enterFullScreen","exitFullScreen","$liveRegion","createElement","prepend","_this$$showIndex2","_this$$showIndex3","_this3","isFullScreen","scrollIntoView","block","remove","textContent","concat","getCurrentItemIndex","length","_this4","Array","from","findIndex","nextIndexToShow","fullscreenElement","requestFullscreen","exitFullscreen"],"sourceRoot":""}
1
+ {"version":3,"file":"components/gallery/gallery.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAAS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,OAAOM,OAAS,GAAGe,GACpD,GAAC,CAAA1C,IAAA,eAAAa,MAED,WACE,OAAOsD,SAASsB,iBAClB,GAAC,CAAAzF,IAAA,kBAAAa,MAED,WACEK,KAAKH,QAAQ2E,oBACbxE,KAAKkB,iBACLlB,KAAKH,QAAQ2C,OACf,GAAC,CAAA1D,IAAA,iBAAAa,MAED,WACEsD,SAASwB,iBACTzE,KAAKkB,gBACP,GAAC,CAAApC,IAAA,iBAAAa,MAED,WACMK,KAAK2D,gBACP3D,KAAKa,iBAAiBwB,aAAa,SAAU,IAC7CrC,KAAKc,gBAAgBwB,gBAAgB,YAErCtC,KAAKc,gBAAgBuB,aAAa,SAAU,IAC5CrC,KAAKa,iBAAiByB,gBAAgB,UAE1C,I,gFAAC,CArOiB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/gallery/gallery.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Gallery {\n constructor($module) {\n this.$module = $module;\n this.$itemsContainer =\n $module && $module.querySelector(\".tna-gallery__items\");\n this.$items =\n this.$itemsContainer &&\n this.$itemsContainer.querySelectorAll(\".tna-gallery__item\");\n this.$navigation =\n $module && $module.querySelector(\".tna-gallery__navigation\");\n this.$navigationItems =\n this.$navigation &&\n $module.querySelectorAll(\".tna-gallery__navigation-item\");\n this.$options = $module && $module.querySelector(\".tna-gallery__options\");\n this.$navigationButtons =\n $module && $module.querySelector(\".tna-gallery__navigation-buttons\");\n\n if (\n !this.$module ||\n !this.$itemsContainer ||\n !this.$items ||\n this.$items.length < 2 ||\n !this.$navigation ||\n !this.$navigationItems ||\n !this.$options ||\n !this.$navigationButtons\n ) {\n return;\n }\n\n this.$module.classList.add(\"tna-gallery--interactive\");\n\n this.$showIndex = this.$options.querySelector('button[value=\"show-index\"]');\n this.$enterFullscreen = this.$options.querySelector(\n 'button[value=\"enter-fullscreen\"]',\n );\n this.$exitFullscreen = this.$options.querySelector(\n 'button[value=\"exit-fullscreen\"]',\n );\n\n this.$navigationButtonPrev = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-prev\",\n );\n this.$navigationButtonNext = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-next\",\n );\n\n this.$module.addEventListener(\"fullscreenchange\", () =>\n this.syncFullScreen(),\n );\n\n this.setup();\n this.allowGridIndex = this.$module.dataset[\"showgrid\"] || false;\n if (this.allowGridIndex) {\n this.showIndex();\n } else {\n this.currentId = this.$items[0].id;\n this.showItem(this.currentId);\n }\n }\n\n setup() {\n this.$items.forEach(($item) => {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n $item\n .querySelector(\".tna-gallery__item-header\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n });\n this.$navigation.removeAttribute(\"hidden\");\n this.$navigationItems.forEach(($item) => {\n $item.addEventListener(\"click\", () => {\n this.showItem($item.getAttribute(\"aria-controls\"));\n this.$itemsContainer.setAttribute(\"tabindex\", \"0\");\n this.$itemsContainer.focus();\n });\n });\n this.$module.addEventListener(\"keydown\", (e) => {\n let preventDefaultKeyAction = false;\n switch (e.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.showPreviousItem();\n preventDefaultKeyAction = true;\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.showNextItem();\n preventDefaultKeyAction = true;\n break;\n case \"Home\":\n this.showFirstItem();\n preventDefaultKeyAction = true;\n break;\n case \"End\":\n this.showLastItem();\n preventDefaultKeyAction = true;\n break;\n }\n if (preventDefaultKeyAction) {\n e.stopPropagation();\n e.preventDefault();\n }\n });\n this.$options.removeAttribute(\"hidden\");\n if (\n document.fullscreenEnabled &&\n this.$enterFullscreen &&\n this.$exitFullscreen\n ) {\n this.$enterFullscreen?.addEventListener(\"click\", () =>\n this.enterFullScreen(),\n );\n this.$exitFullscreen?.addEventListener(\"click\", () =>\n this.exitFullScreen(),\n );\n this.$enterFullscreen?.removeAttribute(\"hidden\");\n }\n this.$showIndex?.addEventListener(\"click\", () => this.showIndex());\n this.$navigationButtons?.removeAttribute(\"hidden\");\n this.$navigationButtonPrev?.addEventListener(\"click\", () => {\n this.showPreviousItem();\n });\n this.$navigationButtonNext?.addEventListener(\"click\", () => {\n this.showNextItem();\n });\n\n this.$liveRegion = document.createElement(\"div\");\n this.$liveRegion.setAttribute(\"aria-live\", \"polite\");\n this.$liveRegion.setAttribute(\"aria-atomic\", \"true\");\n this.$liveRegion.setAttribute(\"class\", \"tna-gallery__item-header\");\n this.$itemsContainer.prepend(this.$liveRegion);\n this.$itemsContainer.classList.add(\"tna-gallery__items--hide-item-titles\");\n this.$itemsContainer.addEventListener(\"blur\", () =>\n this.$itemsContainer.removeAttribute(\"tabindex\"),\n );\n }\n\n showIndex() {\n this.showItem(\"\");\n this.$itemsContainer.classList.add(\"tna-gallery__items--hide-items\");\n this.$showIndex?.setAttribute(\"hidden\", \"\");\n }\n\n showItem(id) {\n this.$items.forEach(($item) => {\n if (id && $item.id === id) {\n $item.removeAttribute(\"hidden\");\n $item.removeAttribute(\"aria-hidden\");\n } else {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n }\n });\n this.$navigationItems.forEach(($item) => {\n if (id) {\n if ($item.getAttribute(\"aria-controls\") === id) {\n $item.setAttribute(\"aria-current\", \"true\");\n if (this.isFullScreen()) {\n $item.scrollIntoView({ block: \"nearest\" });\n }\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n });\n if (this.allowGridIndex) {\n this.$showIndex?.removeAttribute(\"hidden\");\n }\n this.$itemsContainer.classList.remove(\"tna-gallery__items--hide-items\");\n this.currentId = id;\n this.$liveRegion.textContent = `Image ${this.getCurrentItemIndex() + 1} of ${this.$items.length}`;\n }\n\n getCurrentItemIndex() {\n return Array.from(this.$items).findIndex(\n ($item) => $item.id === this.currentId,\n );\n }\n\n showPreviousItem() {\n let nextIndexToShow = this.getCurrentItemIndex() - 1;\n if (nextIndexToShow < 0) {\n nextIndexToShow = this.$items.length - 1;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showNextItem() {\n let nextIndexToShow = this.getCurrentItemIndex() + 1;\n if (nextIndexToShow >= this.$items.length) {\n nextIndexToShow = 0;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showFirstItem() {\n this.showItem(this.$items[0].id);\n }\n\n showLastItem() {\n this.showItem(this.$items[this.$items.length - 1].id);\n }\n\n isFullScreen() {\n return document.fullscreenElement;\n }\n\n enterFullScreen() {\n this.$module.requestFullscreen();\n this.syncFullScreen();\n this.$module.focus();\n }\n\n exitFullScreen() {\n document.exitFullscreen();\n this.syncFullScreen();\n }\n\n syncFullScreen() {\n if (this.isFullScreen()) {\n this.$enterFullscreen.setAttribute(\"hidden\", \"\");\n this.$exitFullscreen.removeAttribute(\"hidden\");\n } else {\n this.$exitFullscreen.setAttribute(\"hidden\", \"\");\n this.$enterFullscreen.removeAttribute(\"hidden\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Gallery","$module","_this","_classCallCheck","this","$itemsContainer","querySelector","$items","querySelectorAll","$navigation","$navigationItems","$options","$navigationButtons","length","classList","add","$showIndex","$enterFullscreen","$exitFullscreen","$navigationButtonPrev","$navigationButtonNext","addEventListener","syncFullScreen","setup","allowGridIndex","dataset","showIndex","currentId","id","showItem","_this$$showIndex","_this$$navigationButt","_this$$navigationButt2","_this$$navigationButt3","_this$$enterFullscree","_this$$exitFullscreen","_this$$enterFullscree2","_this2","forEach","$item","_$item$querySelector","setAttribute","removeAttribute","getAttribute","focus","e","preventDefaultKeyAction","showPreviousItem","showNextItem","showFirstItem","showLastItem","stopPropagation","preventDefault","document","fullscreenEnabled","enterFullScreen","exitFullScreen","$liveRegion","createElement","prepend","_this$$showIndex2","_this$$showIndex3","_this3","isFullScreen","scrollIntoView","block","remove","textContent","concat","getCurrentItemIndex","_this4","Array","from","findIndex","nextIndexToShow","fullscreenElement","requestFullscreen","exitFullscreen"],"sourceRoot":""}
@@ -19,6 +19,7 @@ export class Gallery {
19
19
  !this.$module ||
20
20
  !this.$itemsContainer ||
21
21
  !this.$items ||
22
+ this.$items.length < 2 ||
22
23
  !this.$navigation ||
23
24
  !this.$navigationItems ||
24
25
  !this.$options ||
@@ -15,7 +15,7 @@
15
15
  "name": "headingSize",
16
16
  "type": "string",
17
17
  "required": false,
18
- "description": "The physical size of the radios title (`xl`, `l`, `m` or `s`)."
18
+ "description": "The physical size of the radios title (`xl`, `l`, `m`, `s` or `xs`)."
19
19
  },
20
20
  {
21
21
  "name": "id",
@@ -15,7 +15,7 @@
15
15
  "name": "headingSize",
16
16
  "type": "string",
17
17
  "required": false,
18
- "description": "The physical size of the search field title (`xl`, `l`, `m` or `s`)."
18
+ "description": "The physical size of the search field title (`xl`, `l`, `m`, `s` or `xs`)."
19
19
  },
20
20
  {
21
21
  "name": "id",
@@ -1 +1 @@
1
- .tna-secondary-navigation{display:flex;flex-flow:row wrap;gap:0 32px;line-height:1.35}.tna-secondary-navigation__heading{padding-bottom:8px;align-self:flex-end;line-height:inherit;border-bottom:5px rgba(0,0,0,0) solid}.tna-secondary-navigation__items{display:flex;align-items:flex-end;justify-content:flex-start;gap:32px;list-style:none}.tna-secondary-navigation__link{width:100%;padding:8px 0;display:block;box-sizing:border-box;line-height:inherit;text-align:left;text-decoration:underline;background:none;border:none;border-top:5px rgba(0,0,0,0) solid;border-bottom:5px rgba(0,0,0,0) solid;cursor:pointer}.tna-secondary-navigation__link,.tna-secondary-navigation__link:link{color:var(--link, #005fa3)}.tna-secondary-navigation__link:visited{color:var(--link-visited, #634abb)}.tna-secondary-navigation__link:hover,.tna-secondary-navigation__link:focus{text-decoration:underline;text-decoration-thickness:0.25rem;text-underline-offset:.125em}.tna-secondary-navigation__item--current .tna-secondary-navigation__link{color:var(--font-base, #343338);text-decoration:none;border-bottom:5px var(--accent-border, rgb(140, 150, 148)) solid}.tna-secondary-navigation__item--current .tna-secondary-navigation__link:hover,.tna-secondary-navigation__item--current .tna-secondary-navigation__link:focus{text-decoration:underline;text-decoration-thickness:0.25rem;text-underline-offset:.125em}.tna-secondary-navigation--overflow{overflow-x:auto}.tna-secondary-navigation::after{content:"";width:100%;border-bottom:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}.tna-secondary-navigation--no-bottom-border::after{display:none}.tna-secondary-navigation--unindent::after{width:calc(100% + 64px);margin-right:-32px;margin-left:-32px}@media(max-width: 64em){.tna-secondary-navigation{flex-direction:column;gap:0}.tna-secondary-navigation__heading{width:100%;border-bottom:none;align-self:flex-start}}@media(max-width: 48em){.tna-secondary-navigation{border-bottom:none}.tna-secondary-navigation__items{flex-direction:column;align-items:stretch;gap:0;position:relative}.tna-secondary-navigation__item{position:relative;border-top:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}.tna-secondary-navigation__item--current::before{content:"";position:absolute;top:0;bottom:0;left:0;border-left:5px var(--accent-border, rgb(140, 150, 148)) solid}.tna-secondary-navigation__link{padding:8px 16px}.tna-secondary-navigation__link,.tna-secondary-navigation__item--current .tna-secondary-navigation__link{border-top:none;border-bottom:none}.tna-secondary-navigation--overflow{overflow-x:visible}}@media(min-width: 30.0625em)and (max-width: 48em){.tna-secondary-navigation--unindent .tna-secondary-navigation__items{margin-right:-32px;margin-left:-32px}.tna-secondary-navigation--unindent .tna-secondary-navigation__link{padding:8px 32px}}@media(max-width: 30em){.tna-secondary-navigation--unindent .tna-secondary-navigation__items{margin-right:-16px;margin-left:-16px}.tna-secondary-navigation--unindent .tna-secondary-navigation__link{padding:8px 16px}}/*# sourceMappingURL=secondary-navigation.css.map */
1
+ .tna-secondary-navigation{display:flex;flex-flow:row wrap;gap:0 32px;line-height:1.35}.tna-secondary-navigation__heading{padding-bottom:8px;align-self:flex-end;line-height:inherit;border-bottom:5px rgba(0,0,0,0) solid}.tna-secondary-navigation__items{display:flex;align-items:flex-end;justify-content:flex-start;gap:32px;list-style:none}.tna-secondary-navigation__link{width:100%;padding:8px 0;display:block;box-sizing:border-box;line-height:inherit;text-align:left;text-decoration:underline;background:none;border:none;border-top:5px rgba(0,0,0,0) solid;border-bottom:5px rgba(0,0,0,0) solid;cursor:pointer}.tna-secondary-navigation__link,.tna-secondary-navigation__link:link{color:var(--link, #005fa3)}.tna-secondary-navigation__link:visited{color:var(--link-visited, #634abb)}.tna-secondary-navigation__link:hover,.tna-secondary-navigation__link:focus{text-decoration:underline;text-decoration-thickness:0.25rem;text-underline-offset:.125em}.tna-secondary-navigation__item--current .tna-secondary-navigation__link{color:var(--font-base, #343338);text-decoration:none;border-bottom:5px var(--accent-border, rgb(140, 150, 148)) solid}.tna-secondary-navigation__item--current .tna-secondary-navigation__link:hover,.tna-secondary-navigation__item--current .tna-secondary-navigation__link:focus{text-decoration:underline;text-decoration-thickness:0.25rem;text-underline-offset:.125em}.tna-secondary-navigation--overflow{overflow-x:auto}.tna-secondary-navigation::after{content:"";width:100%;border-bottom:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}.tna-secondary-navigation--no-bottom-border::after{display:none}.tna-secondary-navigation--unindent::after{width:calc(100% + 64px);margin-right:-32px;margin-left:-32px}@media(max-width: 64em){.tna-secondary-navigation{flex-direction:column;gap:0}.tna-secondary-navigation__heading{width:100%;border-bottom:none;align-self:flex-start}}@media(max-width: 48em){.tna-secondary-navigation{border-bottom:none}.tna-secondary-navigation__items{flex-direction:column;align-items:stretch;gap:0;position:relative}.tna-secondary-navigation__item{position:relative;border-top:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}.tna-secondary-navigation__item--current::before{content:"";position:absolute;top:0;bottom:0;left:0;border-left:5px var(--accent-border, rgb(140, 150, 148)) solid}.tna-secondary-navigation__link{padding:8px 16px}.tna-secondary-navigation__link,.tna-secondary-navigation__item--current .tna-secondary-navigation__link{border-top:none;border-bottom:none}.tna-secondary-navigation--overflow{overflow-x:visible}}@media(min-width: 30.0625em)and (max-width: 48em){.tna-secondary-navigation--unindent .tna-secondary-navigation__items{margin-right:-32px;margin-left:-32px}.tna-secondary-navigation--unindent .tna-secondary-navigation__link{padding:8px 32px}}@media(max-width: 30em){.tna-secondary-navigation--unindent::after{width:calc(100% + 32px)}.tna-secondary-navigation--unindent::after,.tna-secondary-navigation--unindent .tna-secondary-navigation__items{margin-right:-16px;margin-left:-16px}.tna-secondary-navigation--unindent .tna-secondary-navigation__link{padding:8px 16px}}/*# sourceMappingURL=secondary-navigation.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/components/secondary-navigation/secondary-navigation.scss","../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/tools/_media.scss"],"names":[],"mappings":"AAOA,0BACE,aACA,mBAEA,WAEA,iBAEA,mCACE,mBAEA,oBAEA,oBCkMA,sCD7LF,iCACE,aACA,qBACA,2BACA,SAEA,gBAMF,gCACE,WACA,cAEA,cAEA,sBAEA,oBAEA,gBACA,0BAEA,gBAEA,YCkKA,yED9JA,eAEA,qEC4BF,2BDvBE,wCCuBF,mCDnBE,sGECF,0BCpCsC,QDqCtC,sBCvCoC,OH2CpC,yECaA,gCDXE,qBCgCE,iED7BF,8JEXF,0BACA,0BCpCsC,QDqCtC,sBCvCoC,OHsDpC,oCACE,gBAGF,iCACE,WAEA,WCgBE,+DDXJ,mDACE,aAGF,2CACE,wBACA,mBACA,kBI3BF,wBJrEF,0BAoGI,sBACA,MAEA,mCACE,WAEA,mBAEA,uBIjCJ,wBJ3EF,0BAiHI,mBAEA,iCACE,sBACA,oBACA,MAEA,kBAIF,gCACE,kBCzBA,4DD8BE,iDACE,WAEA,kBACA,MACA,SACA,OCpCJ,+DD0CF,gCACE,iBAGF,yGAEE,gBACA,mBAGF,oCACE,oBI5GJ,kDJiHE,qEACE,mBACA,kBAGF,oEACE,kBIjHJ,wBJsHE,qEACE,mBACA,kBAGF,oEACE","file":"secondary-navigation.css","sourcesContent":["@use \"../../tools/a11y\";\n@use \"../../tools/colour\";\n@use \"../../tools/grid\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-secondary-navigation {\n display: flex;\n flex-flow: row wrap;\n\n gap: 0 spacing.space(2);\n\n line-height: 1.35;\n\n &__heading {\n padding-bottom: spacing.space(0.5);\n\n align-self: flex-end;\n\n line-height: inherit;\n\n @include colour.thick-keyline-transparent(bottom);\n }\n\n &__items {\n display: flex;\n align-items: flex-end;\n justify-content: flex-start;\n gap: spacing.space(2);\n\n list-style: none;\n }\n\n &__item {\n }\n\n &__link {\n width: 100%;\n padding: spacing.space(0.5) 0;\n\n display: block;\n\n box-sizing: border-box;\n\n line-height: inherit;\n\n text-align: left;\n text-decoration: underline;\n\n background: none;\n\n border: none;\n @include colour.thick-keyline-transparent(top);\n @include colour.thick-keyline-transparent(bottom);\n\n cursor: pointer;\n\n &,\n &:link {\n @include colour.colour-font(\"link\");\n }\n\n &:visited {\n @include colour.colour-font(\"link-visited\");\n }\n\n &:hover,\n &:focus {\n @include typography.interacted-text-decoration;\n }\n }\n\n &__item--current &__link {\n @include colour.colour-font(\"font-base\");\n text-decoration: none;\n @include colour.thick-keyline-accent(bottom);\n\n &:hover,\n &:focus {\n @include typography.interacted-text-decoration;\n }\n }\n\n &--overflow {\n overflow-x: auto;\n }\n\n &::after {\n content: \"\";\n\n width: 100%;\n\n @include colour.colour-border(\"keyline\", 1px, solid, bottom);\n }\n\n &--no-bottom-border::after {\n display: none;\n }\n\n &--unindent::after {\n width: calc(100% + #{grid.gutter-width-double()});\n margin-right: -#{grid.gutter-width()};\n margin-left: -#{grid.gutter-width()};\n }\n\n @include media.on-smaller-than-large {\n flex-direction: column;\n gap: 0;\n\n &__heading {\n width: 100%;\n // padding-bottom: 0;\n border-bottom: none;\n\n align-self: flex-start;\n }\n }\n\n @include media.on-mobile {\n border-bottom: none;\n\n &__items {\n flex-direction: column;\n align-items: stretch;\n gap: 0;\n\n position: relative;\n // @include colour.colour-border(\"keyline\", 1px, solid, bottom);\n }\n\n &__item {\n position: relative;\n\n @include colour.colour-border(\"keyline\", 1px, solid, top);\n\n &--current {\n &::before {\n content: \"\";\n\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n @include colour.thick-keyline-accent(left);\n }\n }\n }\n\n &__link {\n padding: spacing.space(0.5) spacing.space(1);\n }\n\n &__link,\n &__item--current &__link {\n border-top: none;\n border-bottom: none;\n }\n\n &--overflow {\n overflow-x: visible;\n }\n }\n\n @include media.on-small {\n &--unindent &__items {\n margin-right: -#{grid.gutter-width()};\n margin-left: -#{grid.gutter-width()};\n }\n\n &--unindent &__link {\n padding: spacing.space(0.5) grid.gutter-width();\n }\n }\n\n @include media.on-tiny {\n &--unindent &__items {\n margin-right: -#{grid.gutter-width-tiny()};\n margin-left: -#{grid.gutter-width-tiny()};\n }\n\n &--unindent &__link {\n padding: spacing.space(0.5) grid.gutter-width-tiny();\n }\n }\n}\n","@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n // \"background-tint\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n // \"focus-outline\",\n \"keyline\",\n \"keyline-dark\",\n // \"input-foreground\",\n // \"input-background\",\n // \"input-border\",\n // \"form-error-border\",\n // \"form-error-text\",\n // \"button-text\",\n // \"button-background\",\n // \"button-hover-text\",\n // \"button-hover-background\",\n);\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index((\"keyline\", \"keyline-dark\"), $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@function colour-var($colour) {\n @return var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n );\n}\n\n@mixin colour-font($colour, $important: false) {\n color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n border-#{$direction}: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width colour-var($colour) $style if($important, !important, null);\n } @else {\n outline-color: colour-var($colour) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline-dark\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline-dark\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"accent-border\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"accent-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n $border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"form-error-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour, $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width #{brand-colour($brandColour)} solid;\n } @else {\n border: $border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width transparent solid;\n } @else {\n border: $border-width transparent solid;\n }\n}\n\n// Use light theme colours (except for \"form-error-border\")\n%always-light {\n @include colour-css-vars(\"form-error-border\", \"focus-outline\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\n \"form-error-border\",\n \"focus-outline\"\n );\n }\n}\n\n@mixin always-light {\n @extend %always-light;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%base {\n @each $name, $value in $base-colours {\n --#{$name}: var(--base-#{$value});\n }\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin base {\n @extend %base;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n --accent-border: var(--accent-background);\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n }\n\n .tna-template--dark-theme & {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-border: #{colour.brand-colour(\"yellow\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n --button-accented-background: #{colour.brand-colour(\"brown\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --accent-border: #{colour.brand-colour(\"black\")} !important;\n --button-accented-text: #{colour.brand-colour(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %accent-lighter-text;\n @extend %black-accent;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --accent-border: #{colour.brand-colour(\"pink\")} !important;\n --button-accented-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %accent-lighter-text;\n @extend %pink-accent;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --accent-border: #{colour.brand-colour(\"orange\")} !important;\n --button-accented-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %accent-lighter-text;\n @extend %orange-accent;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --accent-border: #{colour.brand-colour(\"green\")} !important;\n --button-accented-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %accent-lighter-text;\n @extend %green-accent;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --accent-border: #{colour.brand-colour(\"blue\")} !important;\n --button-accented-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %accent-lighter-text;\n @extend %blue-accent;\n}\n\n@mixin on-high-contrast {\n @media (prefers-contrast: more) {\n @content;\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n background: linear-gradient(\n -45deg,\n rgb(0 0 0 / 25%),\n rgb(255 255 255 / 25%),\n rgb(0 0 0 / 25%)\n );\n background-size: 500% 500%;\n background-position: 0 50%;\n\n animation: image-loader-background ease-in-out 1.2s infinite;\n }\n}\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin relative-font-size($font-size-px) {\n @warn \"relative-font-size() will soon be deprecated in favour of font-size().\";\n @include font-size($font-size-px);\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n font-variation-settings: \"wdth\" 100;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include font-size(14);\n line-height: 1.1;\n text-transform: uppercase;\n}\n\n@mixin interactable-text-decoration {\n text-decoration-thickness: typography.$interactable-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n line-height: $line-height;\n @include font-size($font-size-default);\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include font-size($font-size-medium);\n }\n }\n }\n}\n","@use \"sass:math\";\n\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: 19 !default;\n$body-font-size-px-medium: 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: 32 !default;\n$heading-l-font-size-small: 29 !default;\n$heading-l-font-size-tiny: $heading-l-font-size-small !default;\n$heading-l-line-height: 1.15 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: $heading-m-font-size-default !default;\n$heading-m-font-size-small: 21 !default;\n$heading-m-font-size-tiny: $heading-m-font-size-small !default;\n$heading-m-line-height: 1.4 !default;\n\n$heading-s-font-size-default: 19 !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.5 !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/components/secondary-navigation/secondary-navigation.scss","../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/tools/_media.scss"],"names":[],"mappings":"AAOA,0BACE,aACA,mBAEA,WAEA,iBAEA,mCACE,mBAEA,oBAEA,oBCkMA,sCD7LF,iCACE,aACA,qBACA,2BACA,SAEA,gBAMF,gCACE,WACA,cAEA,cAEA,sBAEA,oBAEA,gBACA,0BAEA,gBAEA,YCkKA,yED9JA,eAEA,qEC4BF,2BDvBE,wCCuBF,mCDnBE,sGECF,0BCpCsC,QDqCtC,sBCvCoC,OH2CpC,yECaA,gCDXE,qBCgCE,iED7BF,8JEXF,0BACA,0BCpCsC,QDqCtC,sBCvCoC,OHsDpC,oCACE,gBAGF,iCACE,WAEA,WCgBE,+DDXJ,mDACE,aAGF,2CACE,wBACA,mBACA,kBI3BF,wBJrEF,0BAoGI,sBACA,MAEA,mCACE,WAEA,mBAEA,uBIjCJ,wBJ3EF,0BAiHI,mBAEA,iCACE,sBACA,oBACA,MAEA,kBAIF,gCACE,kBCzBA,4DD8BE,iDACE,WAEA,kBACA,MACA,SACA,OCpCJ,+DD0CF,gCACE,iBAGF,yGAEE,gBACA,mBAGF,oCACE,oBI5GJ,kDJiHE,qEACE,mBACA,kBAGF,oEACE,kBIjHJ,wBJsHE,2CACE,wBAGF,gHAEE,mBACA,kBAGF,oEACE","file":"secondary-navigation.css","sourcesContent":["@use \"../../tools/a11y\";\n@use \"../../tools/colour\";\n@use \"../../tools/grid\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-secondary-navigation {\n display: flex;\n flex-flow: row wrap;\n\n gap: 0 spacing.space(2);\n\n line-height: 1.35;\n\n &__heading {\n padding-bottom: spacing.space(0.5);\n\n align-self: flex-end;\n\n line-height: inherit;\n\n @include colour.thick-keyline-transparent(bottom);\n }\n\n &__items {\n display: flex;\n align-items: flex-end;\n justify-content: flex-start;\n gap: spacing.space(2);\n\n list-style: none;\n }\n\n &__item {\n }\n\n &__link {\n width: 100%;\n padding: spacing.space(0.5) 0;\n\n display: block;\n\n box-sizing: border-box;\n\n line-height: inherit;\n\n text-align: left;\n text-decoration: underline;\n\n background: none;\n\n border: none;\n @include colour.thick-keyline-transparent(top);\n @include colour.thick-keyline-transparent(bottom);\n\n cursor: pointer;\n\n &,\n &:link {\n @include colour.colour-font(\"link\");\n }\n\n &:visited {\n @include colour.colour-font(\"link-visited\");\n }\n\n &:hover,\n &:focus {\n @include typography.interacted-text-decoration;\n }\n }\n\n &__item--current &__link {\n @include colour.colour-font(\"font-base\");\n text-decoration: none;\n @include colour.thick-keyline-accent(bottom);\n\n &:hover,\n &:focus {\n @include typography.interacted-text-decoration;\n }\n }\n\n &--overflow {\n overflow-x: auto;\n }\n\n &::after {\n content: \"\";\n\n width: 100%;\n\n @include colour.colour-border(\"keyline\", 1px, solid, bottom);\n }\n\n &--no-bottom-border::after {\n display: none;\n }\n\n &--unindent::after {\n width: calc(100% + #{grid.gutter-width-double()});\n margin-right: -#{grid.gutter-width()};\n margin-left: -#{grid.gutter-width()};\n }\n\n @include media.on-smaller-than-large {\n flex-direction: column;\n gap: 0;\n\n &__heading {\n width: 100%;\n // padding-bottom: 0;\n border-bottom: none;\n\n align-self: flex-start;\n }\n }\n\n @include media.on-mobile {\n border-bottom: none;\n\n &__items {\n flex-direction: column;\n align-items: stretch;\n gap: 0;\n\n position: relative;\n // @include colour.colour-border(\"keyline\", 1px, solid, bottom);\n }\n\n &__item {\n position: relative;\n\n @include colour.colour-border(\"keyline\", 1px, solid, top);\n\n &--current {\n &::before {\n content: \"\";\n\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n @include colour.thick-keyline-accent(left);\n }\n }\n }\n\n &__link {\n padding: spacing.space(0.5) spacing.space(1);\n }\n\n &__link,\n &__item--current &__link {\n border-top: none;\n border-bottom: none;\n }\n\n &--overflow {\n overflow-x: visible;\n }\n }\n\n @include media.on-small {\n &--unindent &__items {\n margin-right: -#{grid.gutter-width()};\n margin-left: -#{grid.gutter-width()};\n }\n\n &--unindent &__link {\n padding: spacing.space(0.5) grid.gutter-width();\n }\n }\n\n @include media.on-tiny {\n &--unindent::after {\n width: calc(100% + #{grid.gutter-width-tiny-double()});\n }\n\n &--unindent::after,\n &--unindent &__items {\n margin-right: -#{grid.gutter-width-tiny()};\n margin-left: -#{grid.gutter-width-tiny()};\n }\n\n &--unindent &__link {\n padding: spacing.space(0.5) grid.gutter-width-tiny();\n }\n }\n}\n","@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n // \"background-tint\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n // \"focus-outline\",\n \"keyline\",\n \"keyline-dark\",\n // \"input-foreground\",\n // \"input-background\",\n // \"input-border\",\n // \"form-error-border\",\n // \"form-error-text\",\n // \"button-text\",\n // \"button-background\",\n // \"button-hover-text\",\n // \"button-hover-background\",\n);\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index((\"keyline\", \"keyline-dark\"), $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@function colour-var($colour) {\n @return var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n );\n}\n\n@mixin colour-font($colour, $important: false) {\n color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n border-#{$direction}: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width colour-var($colour) $style if($important, !important, null);\n } @else {\n outline-color: colour-var($colour) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline-dark\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline-dark\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"accent-border\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"accent-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n $border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"form-error-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour, $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width #{brand-colour($brandColour)} solid;\n } @else {\n border: $border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width transparent solid;\n } @else {\n border: $border-width transparent solid;\n }\n}\n\n// Use light theme colours (except for \"form-error-border\")\n%always-light {\n @include colour-css-vars(\"form-error-border\", \"focus-outline\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\n \"form-error-border\",\n \"focus-outline\"\n );\n }\n}\n\n@mixin always-light {\n @extend %always-light;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%base {\n @each $name, $value in $base-colours {\n --#{$name}: var(--base-#{$value});\n }\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin base {\n @extend %base;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n --accent-border: var(--accent-background);\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n }\n\n .tna-template--dark-theme & {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-border: #{colour.brand-colour(\"yellow\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n --button-accented-background: #{colour.brand-colour(\"brown\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --accent-border: #{colour.brand-colour(\"black\")} !important;\n --button-accented-text: #{colour.brand-colour(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %accent-lighter-text;\n @extend %black-accent;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --accent-border: #{colour.brand-colour(\"pink\")} !important;\n --button-accented-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %accent-lighter-text;\n @extend %pink-accent;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --accent-border: #{colour.brand-colour(\"orange\")} !important;\n --button-accented-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %accent-lighter-text;\n @extend %orange-accent;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --accent-border: #{colour.brand-colour(\"green\")} !important;\n --button-accented-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %accent-lighter-text;\n @extend %green-accent;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --accent-border: #{colour.brand-colour(\"blue\")} !important;\n --button-accented-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %accent-lighter-text;\n @extend %blue-accent;\n}\n\n@mixin on-high-contrast {\n @media (prefers-contrast: more) {\n @content;\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n background: linear-gradient(\n -45deg,\n rgb(0 0 0 / 25%),\n rgb(255 255 255 / 25%),\n rgb(0 0 0 / 25%)\n );\n background-size: 500% 500%;\n background-position: 0 50%;\n\n animation: image-loader-background ease-in-out 1.2s infinite;\n }\n}\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin relative-font-size($font-size-px) {\n @warn \"relative-font-size() will soon be deprecated in favour of font-size().\";\n @include font-size($font-size-px);\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n font-variation-settings: \"wdth\" 100;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include font-size(14);\n line-height: 1.1;\n text-transform: uppercase;\n}\n\n@mixin interactable-text-decoration {\n text-decoration-thickness: typography.$interactable-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n line-height: $line-height;\n @include font-size($font-size-default);\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include font-size($font-size-medium);\n }\n }\n }\n}\n","@use \"sass:math\";\n\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: 19 !default;\n$body-font-size-px-medium: 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: 32 !default;\n$heading-l-font-size-small: 29 !default;\n$heading-l-font-size-tiny: $heading-l-font-size-small !default;\n$heading-l-line-height: 1.15 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: $heading-m-font-size-default !default;\n$heading-m-font-size-small: 21 !default;\n$heading-m-font-size-tiny: $heading-m-font-size-small !default;\n$heading-m-line-height: 1.4 !default;\n\n$heading-s-font-size-default: 19 !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.5 !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"]}
@@ -174,6 +174,11 @@
174
174
  }
175
175
 
176
176
  @include media.on-tiny {
177
+ &--unindent::after {
178
+ width: calc(100% + #{grid.gutter-width-tiny-double()});
179
+ }
180
+
181
+ &--unindent::after,
177
182
  &--unindent &__items {
178
183
  margin-right: -#{grid.gutter-width-tiny()};
179
184
  margin-left: -#{grid.gutter-width-tiny()};
@@ -15,7 +15,7 @@
15
15
  "name": "headingSize",
16
16
  "type": "string",
17
17
  "required": false,
18
- "description": "The physical size of the select title (`xl`, `l`, `m` or `s`)."
18
+ "description": "The physical size of the select title (`xl`, `l`, `m`, `s` or `xs`)."
19
19
  },
20
20
  {
21
21
  "name": "id",
@@ -9,10 +9,9 @@ export default [
9
9
  eventName: "blurred",
10
10
  on: "blur",
11
11
  data: {
12
- // eslint-disable-next-line no-unused-vars
13
12
  value: valueGetters.value,
14
13
  // eslint-disable-next-line no-unused-vars
15
- group: ($el, $scope, event) =>
14
+ group: ($el, $scope) =>
16
15
  $scope
17
16
  .closest(".tna-form__group")
18
17
  ?.querySelector(".tna-form__heading")