@nationalarchives/frontend 0.32.0 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nationalarchives/all+analytics.js +1 -1
- package/nationalarchives/all+analytics.js.map +1 -1
- package/nationalarchives/all.css +1 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/analytics.js.map +1 -1
- package/nationalarchives/components/accordion/accordion.css +1 -1
- package/nationalarchives/components/accordion/accordion.css.map +1 -1
- package/nationalarchives/components/accordion/accordion.js +1 -1
- package/nationalarchives/components/accordion/accordion.js.map +1 -1
- package/nationalarchives/components/back-link/back-link.css +1 -1
- package/nationalarchives/components/back-link/back-link.css.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/button/button.css +1 -1
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/card/card.css +1 -1
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.css +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
- package/nationalarchives/components/compound-filters/compound-filters.css +1 -1
- package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.css +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
- package/nationalarchives/components/cookie-banner/macro-options.json +2 -1
- package/nationalarchives/components/date-input/date-input.css +1 -1
- package/nationalarchives/components/date-input/date-input.css.map +1 -1
- package/nationalarchives/components/date-input/date-input.js.map +1 -1
- package/nationalarchives/components/date-search/date-search.css +1 -1
- package/nationalarchives/components/date-search/date-search.css.map +1 -1
- package/nationalarchives/components/details/details.css +1 -1
- package/nationalarchives/components/details/details.css.map +1 -1
- package/nationalarchives/components/error-summary/error-summary.css +1 -1
- package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
- package/nationalarchives/components/error-summary/error-summary.js.map +1 -1
- package/nationalarchives/components/fieldset/fieldset.css +1 -1
- package/nationalarchives/components/fieldset/fieldset.css.map +1 -1
- package/nationalarchives/components/file-input/file-input.css +1 -1
- package/nationalarchives/components/file-input/file-input.css.map +1 -1
- package/nationalarchives/components/file-input/file-input.js.map +1 -1
- package/nationalarchives/components/files-list/files-list.css +1 -1
- package/nationalarchives/components/files-list/files-list.css.map +1 -1
- package/nationalarchives/components/footer/fixtures.json +20 -2
- package/nationalarchives/components/footer/footer.css +1 -1
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/footer/footer.js +1 -1
- package/nationalarchives/components/footer/footer.js.map +1 -1
- package/nationalarchives/components/footer/footer.mjs +44 -16
- package/nationalarchives/components/footer/footer.scss +34 -0
- package/nationalarchives/components/footer/macro-options.json +6 -0
- package/nationalarchives/components/footer/template.njk +13 -1
- package/nationalarchives/components/gallery/gallery.css +1 -1
- package/nationalarchives/components/gallery/gallery.css.map +1 -1
- package/nationalarchives/components/gallery/gallery.js.map +1 -1
- package/nationalarchives/components/global-header/global-header.css +1 -1
- package/nationalarchives/components/global-header/global-header.css.map +1 -1
- package/nationalarchives/components/global-header/global-header.js.map +1 -1
- package/nationalarchives/components/header/header.css +1 -1
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/header/header.js.map +1 -1
- package/nationalarchives/components/hero/hero.css +1 -1
- package/nationalarchives/components/hero/hero.css.map +1 -1
- package/nationalarchives/components/index-grid/index-grid.css +1 -1
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
- package/nationalarchives/components/pagination/fixtures.json +27 -13
- package/nationalarchives/components/pagination/macro-options.json +12 -18
- package/nationalarchives/components/pagination/pagination.css +1 -1
- package/nationalarchives/components/pagination/pagination.css.map +1 -1
- package/nationalarchives/components/pagination/pagination.scss +79 -37
- package/nationalarchives/components/pagination/template.njk +9 -12
- package/nationalarchives/components/panel/panel.css +1 -1
- package/nationalarchives/components/panel/panel.css.map +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
- package/nationalarchives/components/picture/picture.css +1 -1
- package/nationalarchives/components/picture/picture.css.map +1 -1
- package/nationalarchives/components/picture/picture.js.map +1 -1
- package/nationalarchives/components/quick-filters/quick-filters.css +1 -1
- package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
- package/nationalarchives/components/radios/radios.css +1 -1
- package/nationalarchives/components/radios/radios.css.map +1 -1
- package/nationalarchives/components/search-field/search-field.css +1 -1
- package/nationalarchives/components/search-field/search-field.css.map +1 -1
- package/nationalarchives/components/secondary-navigation/secondary-navigation.css +1 -1
- package/nationalarchives/components/secondary-navigation/secondary-navigation.css.map +1 -1
- package/nationalarchives/components/select/select.css +1 -1
- package/nationalarchives/components/select/select.css.map +1 -1
- package/nationalarchives/components/sidebar/fixtures.json +1 -1
- package/nationalarchives/components/sidebar/sidebar.css +1 -1
- package/nationalarchives/components/sidebar/sidebar.css.map +1 -1
- package/nationalarchives/components/sidebar/template.njk +1 -1
- package/nationalarchives/components/skip-link/skip-link.css +1 -1
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
- package/nationalarchives/components/skip-link/skip-link.js +1 -1
- package/nationalarchives/components/skip-link/skip-link.js.map +1 -1
- package/nationalarchives/components/skip-link/skip-link.mjs +1 -1
- package/nationalarchives/components/tabs/tabs.css +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.js.map +1 -1
- package/nationalarchives/components/text-input/text-input.css +1 -1
- package/nationalarchives/components/text-input/text-input.css.map +1 -1
- package/nationalarchives/components/text-input/text-input.js.map +1 -1
- package/nationalarchives/components/textarea/textarea.css +1 -1
- package/nationalarchives/components/textarea/textarea.css.map +1 -1
- package/nationalarchives/components/warning/warning.css +1 -1
- package/nationalarchives/components/warning/warning.css.map +1 -1
- package/nationalarchives/error-page.css +1 -1
- package/nationalarchives/error-page.css.map +1 -1
- package/nationalarchives/ie.css +1 -1
- package/nationalarchives/prototype-kit.css +1 -1
- package/nationalarchives/prototype-kit.css.map +1 -1
- package/nationalarchives/tools/_spacing.scss +21 -5
- package/nationalarchives/utilities/_reset.scss +5 -16
- package/nationalarchives/utilities/lists/_index.scss +106 -162
- package/nationalarchives/utilities/tables/_index.scss +5 -4
- package/package.json +1 -1
|
@@ -40,35 +40,49 @@
|
|
|
40
40
|
"href": "#next"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
"html": "<nav class=\"tna-pagination\" aria-label=\"Pagination\"><div class=\"tna-pagination__prev\"><a href=\"#previous\" class=\"tna-button tna-button--plain\" rel=\"prev\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M73.4 297.4C60.9 309.9 60.9 330.2 73.4 342.7L233.4 502.7C245.9 515.2 266.2 515.2 278.7 502.7C291.2 490.2 291.2 469.9 278.7 457.4L173.3 352L544 352C561.7 352 576 337.7 576 320C576 302.3 561.7 288 544 288L173.3 288L278.7 182.6C291.2 170.1 291.2 149.8 278.7 137.3C266.2 124.8 245.9 124.8 233.4 137.3L73.4 297.3z\"/></svg>Previous</a></div><ul class=\"tna-pagination__list\"><li class=\"tna-pagination__item\"><a href=\"#1\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 1\" title=\"Page 1\">1</a></li><li class=\"tna-pagination__item tna-pagination__item--ellipses\">⋯</li><li class=\"tna-pagination__item\"><a href=\"#6\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 6\" title=\"Page 6\">6</a></li><li class=\"tna-pagination__item tna-pagination__item--current\"><a href=\"#7\" class=\"tna-button tna-pagination__link\" aria-label=\"Page 7\" title=\"Page 7\" aria-current=\"page\">7</a></li><li class=\"tna-pagination__item\"><a href=\"#8\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 8\" title=\"Page 8\">8</a></li><li class=\"tna-pagination__item tna-pagination__item--ellipses\">⋯</li><li class=\"tna-pagination__item\"><a href=\"#42\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 42\" title=\"Page 42\">42</a></li></ul><div class=\"tna-
|
|
43
|
+
"html": "<nav class=\"tna-pagination\" aria-label=\"Pagination\"><div class=\"tna-pagination__prev-next tna-pagination__prev-next--prev\"><a href=\"#previous\" class=\"tna-button tna-pagination__prev-next-button tna-pagination__prev-next-button--prev tna-button--plain\" rel=\"prev\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M73.4 297.4C60.9 309.9 60.9 330.2 73.4 342.7L233.4 502.7C245.9 515.2 266.2 515.2 278.7 502.7C291.2 490.2 291.2 469.9 278.7 457.4L173.3 352L544 352C561.7 352 576 337.7 576 320C576 302.3 561.7 288 544 288L173.3 288L278.7 182.6C291.2 170.1 291.2 149.8 278.7 137.3C266.2 124.8 245.9 124.8 233.4 137.3L73.4 297.3z\"/></svg><span class=\"tna-pagination__prev-next-button-text\"><span class=\"tna-pagination__prev-next-button-title\">Previous</span></span></a></div><ul class=\"tna-pagination__list\"><li class=\"tna-pagination__item\"><a href=\"#1\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 1\" title=\"Page 1\">1</a></li><li class=\"tna-pagination__item tna-pagination__item--ellipses\">⋯</li><li class=\"tna-pagination__item\"><a href=\"#6\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 6\" title=\"Page 6\">6</a></li><li class=\"tna-pagination__item tna-pagination__item--current\"><a href=\"#7\" class=\"tna-button tna-pagination__link\" aria-label=\"Page 7\" title=\"Page 7\" aria-current=\"page\">7</a></li><li class=\"tna-pagination__item\"><a href=\"#8\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 8\" title=\"Page 8\">8</a></li><li class=\"tna-pagination__item tna-pagination__item--ellipses\">⋯</li><li class=\"tna-pagination__item\"><a href=\"#42\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 42\" title=\"Page 42\">42</a></li></ul><div class=\"tna-pagination__prev-next tna-pagination__prev-next--next\"><a href=\"#next\" class=\"tna-button tna-pagination__prev-next-button tna-pagination__prev-next-button--next tna-button--icon-right tna-button--plain\" rel=\"next\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z\"/></svg><span class=\"tna-pagination__prev-next-button-text\"><span class=\"tna-pagination__prev-next-button-title\">Next</span></span></a></div></nav>"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
"name": "no numbers",
|
|
46
|
+
"name": "simple with no numbers",
|
|
47
47
|
"options": {
|
|
48
48
|
"previous": {
|
|
49
|
-
"href": "#previous"
|
|
50
|
-
"title": "Previous page"
|
|
49
|
+
"href": "#previous"
|
|
51
50
|
},
|
|
52
51
|
"next": {
|
|
53
|
-
"href": "#next"
|
|
54
|
-
"title": "Next page"
|
|
52
|
+
"href": "#next"
|
|
55
53
|
}
|
|
56
54
|
},
|
|
57
|
-
"html": "<nav class=\"tna-pagination\" aria-label=\"Pagination\"><div class=\"tna-pagination__prev\"><a href=\"#previous\" class=\"tna-button tna-button--
|
|
55
|
+
"html": "<nav class=\"tna-pagination\" aria-label=\"Pagination\"><div class=\"tna-pagination__prev-next tna-pagination__prev-next--prev\"><a href=\"#previous\" class=\"tna-button tna-pagination__prev-next-button tna-pagination__prev-next-button--prev tna-button--plain\" rel=\"prev\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M73.4 297.4C60.9 309.9 60.9 330.2 73.4 342.7L233.4 502.7C245.9 515.2 266.2 515.2 278.7 502.7C291.2 490.2 291.2 469.9 278.7 457.4L173.3 352L544 352C561.7 352 576 337.7 576 320C576 302.3 561.7 288 544 288L173.3 288L278.7 182.6C291.2 170.1 291.2 149.8 278.7 137.3C266.2 124.8 245.9 124.8 233.4 137.3L73.4 297.3z\"/></svg><span class=\"tna-pagination__prev-next-button-text\"><span class=\"tna-pagination__prev-next-button-title\">Previous</span></span></a></div><div class=\"tna-pagination__prev-next tna-pagination__prev-next--next\"><a href=\"#next\" class=\"tna-button tna-pagination__prev-next-button tna-pagination__prev-next-button--next tna-button--icon-right tna-button--plain\" rel=\"next\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z\"/></svg><span class=\"tna-pagination__prev-next-button-text\"><span class=\"tna-pagination__prev-next-button-title\">Next</span></span></a></div></nav>"
|
|
58
56
|
},
|
|
59
57
|
{
|
|
60
|
-
"name": "custom next and previous text",
|
|
58
|
+
"name": "custom next and previous text and title",
|
|
61
59
|
"options": {
|
|
62
60
|
"previous": {
|
|
63
61
|
"text": "Backwards",
|
|
64
|
-
"href": "#backwards"
|
|
62
|
+
"href": "#backwards",
|
|
63
|
+
"title": "Previous page"
|
|
65
64
|
},
|
|
66
65
|
"next": {
|
|
67
66
|
"text": "Forwards",
|
|
68
|
-
"href": "#forwards"
|
|
67
|
+
"href": "#forwards",
|
|
68
|
+
"title": "Next page"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"html": "<nav class=\"tna-pagination\" aria-label=\"Pagination\"><div class=\"tna-pagination__prev-next tna-pagination__prev-next--prev\"><a href=\"#backwards\" class=\"tna-button tna-pagination__prev-next-button tna-pagination__prev-next-button--prev tna-button--plain\" aria-label=\"Previous page\" title=\"Previous page\" rel=\"prev\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M73.4 297.4C60.9 309.9 60.9 330.2 73.4 342.7L233.4 502.7C245.9 515.2 266.2 515.2 278.7 502.7C291.2 490.2 291.2 469.9 278.7 457.4L173.3 352L544 352C561.7 352 576 337.7 576 320C576 302.3 561.7 288 544 288L173.3 288L278.7 182.6C291.2 170.1 291.2 149.8 278.7 137.3C266.2 124.8 245.9 124.8 233.4 137.3L73.4 297.3z\"/></svg><span class=\"tna-pagination__prev-next-button-text\"><span class=\"tna-pagination__prev-next-button-title\">Backwards</span></span></a></div><div class=\"tna-pagination__prev-next tna-pagination__prev-next--next\"><a href=\"#forwards\" class=\"tna-button tna-pagination__prev-next-button tna-pagination__prev-next-button--next tna-button--icon-right tna-button--plain\" aria-label=\"Next page\" title=\"Next page\" rel=\"next\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z\"/></svg><span class=\"tna-pagination__prev-next-button-text\"><span class=\"tna-pagination__prev-next-button-title\">Forwards</span></span></a></div></nav>"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "no numbers and prev/next descriptions",
|
|
75
|
+
"options": {
|
|
76
|
+
"previous": {
|
|
77
|
+
"href": "#previous",
|
|
78
|
+
"description": "Previous item description"
|
|
79
|
+
},
|
|
80
|
+
"next": {
|
|
81
|
+
"href": "#next",
|
|
82
|
+
"description": "Next item description"
|
|
69
83
|
}
|
|
70
84
|
},
|
|
71
|
-
"html": "<nav class=\"tna-pagination\" aria-label=\"Pagination\"><div class=\"tna-pagination__prev\"><a href=\"#
|
|
85
|
+
"html": "<nav class=\"tna-pagination\" aria-label=\"Pagination\"><div class=\"tna-pagination__prev-next tna-pagination__prev-next--prev\"><a href=\"#previous\" class=\"tna-button tna-pagination__prev-next-button tna-pagination__prev-next-button--prev tna-button--plain\" rel=\"prev\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M73.4 297.4C60.9 309.9 60.9 330.2 73.4 342.7L233.4 502.7C245.9 515.2 266.2 515.2 278.7 502.7C291.2 490.2 291.2 469.9 278.7 457.4L173.3 352L544 352C561.7 352 576 337.7 576 320C576 302.3 561.7 288 544 288L173.3 288L278.7 182.6C291.2 170.1 291.2 149.8 278.7 137.3C266.2 124.8 245.9 124.8 233.4 137.3L73.4 297.3z\"/></svg><span class=\"tna-pagination__prev-next-button-text\"><span class=\"tna-pagination__prev-next-button-title\">Previous</span><span class=\"tna-pagination__prev-next-button-description\">Previous item description</span></span></a></div><div class=\"tna-pagination__prev-next tna-pagination__prev-next--next\"><a href=\"#next\" class=\"tna-button tna-pagination__prev-next-button tna-pagination__prev-next-button--next tna-button--icon-right tna-button--plain\" rel=\"next\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z\"/></svg><span class=\"tna-pagination__prev-next-button-text\"><span class=\"tna-pagination__prev-next-button-title\">Next</span><span class=\"tna-pagination__prev-next-button-description\">Next item description</span></span></a></div></nav>"
|
|
72
86
|
},
|
|
73
87
|
{
|
|
74
88
|
"name": "with classes",
|
|
@@ -110,7 +124,7 @@
|
|
|
110
124
|
},
|
|
111
125
|
"classes": "pagination__test-class"
|
|
112
126
|
},
|
|
113
|
-
"html": "<nav class=\"tna-pagination pagination__test-class\" aria-label=\"Pagination\"><div class=\"tna-pagination__prev\"><a href=\"#previous\" class=\"tna-button tna-button--plain\" rel=\"prev\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M73.4 297.4C60.9 309.9 60.9 330.2 73.4 342.7L233.4 502.7C245.9 515.2 266.2 515.2 278.7 502.7C291.2 490.2 291.2 469.9 278.7 457.4L173.3 352L544 352C561.7 352 576 337.7 576 320C576 302.3 561.7 288 544 288L173.3 288L278.7 182.6C291.2 170.1 291.2 149.8 278.7 137.3C266.2 124.8 245.9 124.8 233.4 137.3L73.4 297.3z\"/></svg>Previous</a></div><ul class=\"tna-pagination__list\"><li class=\"tna-pagination__item\"><a href=\"#1\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 1\" title=\"Page 1\">1</a></li><li class=\"tna-pagination__item tna-pagination__item--ellipses\">⋯</li><li class=\"tna-pagination__item\"><a href=\"#6\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 6\" title=\"Page 6\">6</a></li><li class=\"tna-pagination__item tna-pagination__item--current\"><a href=\"#7\" class=\"tna-button tna-pagination__link\" aria-label=\"Page 7\" title=\"Page 7\" aria-current=\"page\">7</a></li><li class=\"tna-pagination__item\"><a href=\"#8\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 8\" title=\"Page 8\">8</a></li><li class=\"tna-pagination__item tna-pagination__item--ellipses\">⋯</li><li class=\"tna-pagination__item\"><a href=\"#42\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 42\" title=\"Page 42\">42</a></li></ul><div class=\"tna-
|
|
127
|
+
"html": "<nav class=\"tna-pagination pagination__test-class\" aria-label=\"Pagination\"><div class=\"tna-pagination__prev-next tna-pagination__prev-next--prev\"><a href=\"#previous\" class=\"tna-button tna-pagination__prev-next-button tna-pagination__prev-next-button--prev tna-button--plain\" rel=\"prev\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M73.4 297.4C60.9 309.9 60.9 330.2 73.4 342.7L233.4 502.7C245.9 515.2 266.2 515.2 278.7 502.7C291.2 490.2 291.2 469.9 278.7 457.4L173.3 352L544 352C561.7 352 576 337.7 576 320C576 302.3 561.7 288 544 288L173.3 288L278.7 182.6C291.2 170.1 291.2 149.8 278.7 137.3C266.2 124.8 245.9 124.8 233.4 137.3L73.4 297.3z\"/></svg><span class=\"tna-pagination__prev-next-button-text\"><span class=\"tna-pagination__prev-next-button-title\">Previous</span></span></a></div><ul class=\"tna-pagination__list\"><li class=\"tna-pagination__item\"><a href=\"#1\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 1\" title=\"Page 1\">1</a></li><li class=\"tna-pagination__item tna-pagination__item--ellipses\">⋯</li><li class=\"tna-pagination__item\"><a href=\"#6\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 6\" title=\"Page 6\">6</a></li><li class=\"tna-pagination__item tna-pagination__item--current\"><a href=\"#7\" class=\"tna-button tna-pagination__link\" aria-label=\"Page 7\" title=\"Page 7\" aria-current=\"page\">7</a></li><li class=\"tna-pagination__item\"><a href=\"#8\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 8\" title=\"Page 8\">8</a></li><li class=\"tna-pagination__item tna-pagination__item--ellipses\">⋯</li><li class=\"tna-pagination__item\"><a href=\"#42\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 42\" title=\"Page 42\">42</a></li></ul><div class=\"tna-pagination__prev-next tna-pagination__prev-next--next\"><a href=\"#next\" class=\"tna-button tna-pagination__prev-next-button tna-pagination__prev-next-button--next tna-button--icon-right tna-button--plain\" rel=\"next\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z\"/></svg><span class=\"tna-pagination__prev-next-button-text\"><span class=\"tna-pagination__prev-next-button-title\">Next</span></span></a></div></nav>"
|
|
114
128
|
},
|
|
115
129
|
{
|
|
116
130
|
"name": "with attributes",
|
|
@@ -154,7 +168,7 @@
|
|
|
154
168
|
"data-testattribute": "foobar"
|
|
155
169
|
}
|
|
156
170
|
},
|
|
157
|
-
"html": "<nav class=\"tna-pagination\" aria-label=\"Pagination\" data-testattribute=\"foobar\"><div class=\"tna-pagination__prev\"><a href=\"#previous\" class=\"tna-button tna-button--plain\" rel=\"prev\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M73.4 297.4C60.9 309.9 60.9 330.2 73.4 342.7L233.4 502.7C245.9 515.2 266.2 515.2 278.7 502.7C291.2 490.2 291.2 469.9 278.7 457.4L173.3 352L544 352C561.7 352 576 337.7 576 320C576 302.3 561.7 288 544 288L173.3 288L278.7 182.6C291.2 170.1 291.2 149.8 278.7 137.3C266.2 124.8 245.9 124.8 233.4 137.3L73.4 297.3z\"/></svg>Previous</a></div><ul class=\"tna-pagination__list\"><li class=\"tna-pagination__item\"><a href=\"#1\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 1\" title=\"Page 1\">1</a></li><li class=\"tna-pagination__item tna-pagination__item--ellipses\">⋯</li><li class=\"tna-pagination__item\"><a href=\"#6\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 6\" title=\"Page 6\">6</a></li><li class=\"tna-pagination__item tna-pagination__item--current\"><a href=\"#7\" class=\"tna-button tna-pagination__link\" aria-label=\"Page 7\" title=\"Page 7\" aria-current=\"page\">7</a></li><li class=\"tna-pagination__item\"><a href=\"#8\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 8\" title=\"Page 8\">8</a></li><li class=\"tna-pagination__item tna-pagination__item--ellipses\">⋯</li><li class=\"tna-pagination__item\"><a href=\"#42\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 42\" title=\"Page 42\">42</a></li></ul><div class=\"tna-
|
|
171
|
+
"html": "<nav class=\"tna-pagination\" aria-label=\"Pagination\" data-testattribute=\"foobar\"><div class=\"tna-pagination__prev-next tna-pagination__prev-next--prev\"><a href=\"#previous\" class=\"tna-button tna-pagination__prev-next-button tna-pagination__prev-next-button--prev tna-button--plain\" rel=\"prev\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M73.4 297.4C60.9 309.9 60.9 330.2 73.4 342.7L233.4 502.7C245.9 515.2 266.2 515.2 278.7 502.7C291.2 490.2 291.2 469.9 278.7 457.4L173.3 352L544 352C561.7 352 576 337.7 576 320C576 302.3 561.7 288 544 288L173.3 288L278.7 182.6C291.2 170.1 291.2 149.8 278.7 137.3C266.2 124.8 245.9 124.8 233.4 137.3L73.4 297.3z\"/></svg><span class=\"tna-pagination__prev-next-button-text\"><span class=\"tna-pagination__prev-next-button-title\">Previous</span></span></a></div><ul class=\"tna-pagination__list\"><li class=\"tna-pagination__item\"><a href=\"#1\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 1\" title=\"Page 1\">1</a></li><li class=\"tna-pagination__item tna-pagination__item--ellipses\">⋯</li><li class=\"tna-pagination__item\"><a href=\"#6\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 6\" title=\"Page 6\">6</a></li><li class=\"tna-pagination__item tna-pagination__item--current\"><a href=\"#7\" class=\"tna-button tna-pagination__link\" aria-label=\"Page 7\" title=\"Page 7\" aria-current=\"page\">7</a></li><li class=\"tna-pagination__item\"><a href=\"#8\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 8\" title=\"Page 8\">8</a></li><li class=\"tna-pagination__item tna-pagination__item--ellipses\">⋯</li><li class=\"tna-pagination__item\"><a href=\"#42\" class=\"tna-button tna-pagination__link tna-button--plain\" aria-label=\"Page 42\" title=\"Page 42\">42</a></li></ul><div class=\"tna-pagination__prev-next tna-pagination__prev-next--next\"><a href=\"#next\" class=\"tna-button tna-pagination__prev-next-button tna-pagination__prev-next-button--next tna-button--icon-right tna-button--plain\" rel=\"next\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" height=\"24\" aria-hidden=\"true\" focusable=\"false\"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z\"/></svg><span class=\"tna-pagination__prev-next-button-text\"><span class=\"tna-pagination__prev-next-button-title\">Next</span></span></a></div></nav>"
|
|
158
172
|
}
|
|
159
173
|
]
|
|
160
174
|
}
|
|
@@ -23,6 +23,12 @@
|
|
|
23
23
|
"type": "string",
|
|
24
24
|
"required": false,
|
|
25
25
|
"description": "An optional title attribute for the previous button."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "description",
|
|
29
|
+
"type": "string",
|
|
30
|
+
"required": false,
|
|
31
|
+
"description": "An optional description to show below the previous button text."
|
|
26
32
|
}
|
|
27
33
|
]
|
|
28
34
|
},
|
|
@@ -82,6 +88,12 @@
|
|
|
82
88
|
"type": "string",
|
|
83
89
|
"required": false,
|
|
84
90
|
"description": "An optional title attribute for the next button."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "description",
|
|
94
|
+
"type": "string",
|
|
95
|
+
"required": false,
|
|
96
|
+
"description": "An optional description to show below the next button text."
|
|
85
97
|
}
|
|
86
98
|
]
|
|
87
99
|
},
|
|
@@ -92,24 +104,6 @@
|
|
|
92
104
|
"description": "An optional label for the pagination region.",
|
|
93
105
|
"default": "Pagination"
|
|
94
106
|
},
|
|
95
|
-
{
|
|
96
|
-
"name": "currentItemText",
|
|
97
|
-
"type": "string",
|
|
98
|
-
"required": false,
|
|
99
|
-
"description": "If no `items` are provided, this text will be used to indicate the current page."
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"name": "solid",
|
|
103
|
-
"type": "boolean",
|
|
104
|
-
"required": false,
|
|
105
|
-
"description": "If `true`, use a solid background for the pagination buttons."
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"name": "spaced",
|
|
109
|
-
"type": "boolean",
|
|
110
|
-
"required": false,
|
|
111
|
-
"description": "If `true`, add spacing between the pagination buttons and align the previous and next buttons to the extreme left and right of the component respectively."
|
|
112
|
-
},
|
|
113
107
|
{
|
|
114
108
|
"name": "classes",
|
|
115
109
|
"type": "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tna-pagination{margin-top:
|
|
1
|
+
.tna-pagination{margin-top:2rem}.tna-pagination:first-child{margin-top:0}.tna-pagination{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:1rem}.tna-pagination:not(:has(.tna-pagination__list)){flex-wrap:nowrap;align-items:flex-start;justify-content:space-between;gap:2rem}.tna-pagination__prev-next--prev{text-align:left}.tna-pagination__prev-next--next{text-align:right}.tna-pagination__prev-next-button{text-align:inherit;text-wrap:wrap}.tna-pagination__prev-next-button-text{display:block}.tna-pagination__prev-next-button-title{display:block}.tna-pagination__prev-next-button-description{padding-bottom:0.25rem;display:block;line-height:1.25;font-size:1rem}.tna-pagination__prev-next-button:has(.tna-pagination__prev-next-button-description) svg{margin-top:.35em;align-self:flex-start}:has(.tna-pagination__prev-next-button-description) .tna-pagination__prev-next-button-title{font-weight:700}.tna-pagination:not(:has(.tna-pagination__list)) .tna-pagination__prev-next{flex:1}.tna-pagination:not(:has(.tna-pagination__list)) .tna-pagination__prev-next-button{padding:0;border-width:0}.tna-pagination:not(:has(.tna-pagination__list)) .tna-pagination__prev-next-button-title{font-weight:700}.tna-pagination__link{min-width:1.5rem;padding-right:0.5rem;padding-left:0.5rem}.tna-pagination__list{margin:0;padding:0;display:flex;align-items:center;gap:0.25rem;list-style:none}.tna-pagination__item--ellipses{min-width:2rem;padding:0.5rem;text-align:center}@media(max-width: 48em){.tna-pagination{flex-direction:column;gap:0.5rem}.tna-pagination:not(:has(.tna-pagination__list)){align-items:flex-start;gap:1rem}.tna-pagination:not(:has(.tna-pagination__list)) .tna-pagination__prev-next--next{text-align:left}.tna-pagination:not(:has(.tna-pagination__list)) .tna-pagination__prev-next-button--next{flex-direction:row}}@media(max-width: 30em){.tna-pagination:has(.tna-pagination__list) .tna-pagination__item:not(:is(.tna-pagination:has(.tna-pagination__list) .tna-pagination__item:first-child,.tna-pagination:has(.tna-pagination__list) .tna-pagination__item:last-child,.tna-pagination:has(.tna-pagination__list) .tna-pagination__item--current,.tna-pagination:has(.tna-pagination__list) .tna-pagination__item--ellipses)){display:none}}/*# sourceMappingURL=pagination.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/pagination/pagination.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/tools/_media.scss"],"names":[],"mappings":"AAUA,gBACE,gBAEA,4BACE,aCRJ,gBACE,aACA,eACA,mBACA,uBACA,SAIA,wBACE,8BASF,sBACE,iBACA,kBACA,iBAGF,sBACE,qBAEA,2BACE,kBAGF,4BACE,gBAGF,4BACE,iBAIJ,4BACE,kBACA,iBAGF,sBACE,SACA,UAEA,aACA,mBACA,QAEA,gBAIA,gCACE,eACA,YAEA,kBAYJ,mCACE,aC9DF,YCoBwB,IC2CxB,wBH5EF,gBAiFI,uBG7BF,wBHiCE,sBACE,aAEA,kIAIE","file":"pagination.css","sourcesContent":["@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n@function space($size) {\n @return #{$size * spacing.$spacing-unit-px}px;\n}\n\n%space-above {\n margin-top: space(2);\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-pagination {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n gap: spacing.space(1);\n\n @include spacing.space-above;\n\n &--spaced {\n justify-content: space-between;\n }\n\n &__prev {\n }\n\n &__next {\n }\n\n &__link {\n min-width: 1.5rem;\n padding-right: spacing.space(0.5);\n padding-left: spacing.space(0.5);\n }\n\n &__icon {\n display: inline-block;\n\n path {\n fill: currentColor;\n }\n\n &--prev {\n margin-left: spacing.space(0.5);\n }\n\n &--next {\n margin-right: spacing.space(0.5);\n }\n }\n\n &__link-title {\n padding-right: spacing.space(0.5);\n padding-left: spacing.space(0.5);\n }\n\n &__list {\n margin: 0;\n padding: 0;\n\n display: flex;\n align-items: center;\n gap: spacing.space(0.25);\n\n list-style: none;\n }\n\n &__item {\n &--ellipses {\n min-width: 2rem;\n padding: spacing.space(0.5);\n\n text-align: center;\n }\n\n &--current {\n }\n }\n\n &__item--current &__link {\n .tna-background-accent & {\n }\n }\n\n &__current-item-text {\n margin-top: 0;\n\n @include typography.main-font-weight-medium;\n }\n\n @include media.on-mobile {\n flex-direction: column;\n }\n\n @include media.on-tiny {\n &__item {\n display: none;\n\n &:first-child,\n &:last-child,\n &--current,\n &--ellipses {\n display: block;\n }\n }\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/tools/_spacing.scss","../../../../src/nationalarchives/components/pagination/pagination.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/tools/_media.scss"],"names":[],"mappings":"AA0BA,gBACE,gBAUA,4BACE,aChCJ,gBACE,aACA,eACA,mBACA,uBACA,SAIA,iDACE,iBACA,uBACA,8BACA,SAIA,iCACE,gBAGF,iCACE,iBAGF,kCACE,mBACA,eAQA,uCACE,cAGF,wCACE,cAGF,8CACE,uBAEA,cAEA,iBChDN,eDqDM,yFACE,iBAEA,sBAMR,4FC7CA,YCiBsB,IFgCtB,4EACE,OAEA,mFACE,UAEA,eAEA,yFCzDJ,YCiBsB,IF8CtB,sBACE,iBACA,qBACA,oBAGF,sBACE,SACA,UAEA,aACA,mBACA,YAEA,gBAIA,gCACE,eACA,eAEA,kBG1BJ,wBH5EF,gBA8GI,sBACA,WAEA,iDACE,uBACA,SAIA,kFACE,gBAIA,yFACE,oBGzER,wBHiFI,yXACE","file":"pagination.css","sourcesContent":["@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n/*\n * ------------------------------------------\n * Spacing is created with rem rather than px\n * units as when users use a custom font size\n * some browsers handle the resize of rem and\n * em separately from px which causes spacing\n * and layout issues, so to ensure everything\n * remaians consistent we use rem for spacing\n * and typography. The original intention was\n * separation so that we could scale the type\n * without affecting spacing, but in practice\n * there are too many ways to change the font\n * size in various browsers and devices\n * ------------------------------------------\n */\n@function space($size) {\n // @return #{$size * spacing.$spacing-unit-px}px;\n @return #{$size}rem;\n}\n\n%space-above {\n margin-top: space(2);\n @extend %no-space-above-for-first-children;\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n @extend %no-space-above-for-first-children;\n}\n\n%no-space-above-for-first-children {\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-pagination {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n gap: spacing.space(1);\n\n @include spacing.space-above;\n\n &:not(:has(&__list)) {\n flex-wrap: nowrap;\n align-items: flex-start;\n justify-content: space-between;\n gap: spacing.space(2);\n }\n\n &__prev-next {\n &--prev {\n text-align: left;\n }\n\n &--next {\n text-align: right;\n }\n\n &-button {\n text-align: inherit;\n text-wrap: wrap;\n\n &--prev {\n }\n\n &--next {\n }\n\n &-text {\n display: block;\n }\n\n &-title {\n display: block;\n }\n\n &-description {\n padding-bottom: spacing.space(0.25);\n\n display: block;\n\n line-height: 1.25;\n @include typography.font-size(16);\n }\n\n &:has(&-description) {\n svg {\n margin-top: 0.35em;\n\n align-self: flex-start;\n }\n }\n }\n }\n\n :has(&__prev-next-button-description) &__prev-next-button-title {\n @include typography.main-font-weight-bold;\n }\n\n &:not(:has(&__list)) &__prev-next {\n flex: 1;\n\n &-button {\n padding: 0;\n\n border-width: 0;\n\n &-title {\n @include typography.main-font-weight-bold;\n }\n }\n }\n\n &__link {\n min-width: 1.5rem;\n padding-right: spacing.space(0.5);\n padding-left: spacing.space(0.5);\n }\n\n &__list {\n margin: 0;\n padding: 0;\n\n display: flex;\n align-items: center;\n gap: spacing.space(0.25);\n\n list-style: none;\n }\n\n &__item {\n &--ellipses {\n min-width: 2rem;\n padding: spacing.space(0.5);\n\n text-align: center;\n }\n\n &--current {\n }\n }\n\n @include media.on-mobile {\n flex-direction: column;\n gap: spacing.space(0.5);\n\n &:not(:has(&__list)) {\n align-items: flex-start;\n gap: spacing.space(1);\n }\n\n &:not(:has(&__list)) &__prev-next {\n &--next {\n text-align: left;\n }\n\n &-button {\n &--next {\n flex-direction: row;\n }\n }\n }\n }\n\n @include media.on-tiny {\n &:has(&__list) &__item {\n &:not(:is(&:first-child, &:last-child, &--current, &--ellipses)) {\n display: none;\n }\n }\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"]}
|
|
@@ -13,39 +13,79 @@
|
|
|
13
13
|
|
|
14
14
|
@include spacing.space-above;
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
&:not(:has(&__list)) {
|
|
17
|
+
flex-wrap: nowrap;
|
|
18
|
+
align-items: flex-start;
|
|
17
19
|
justify-content: space-between;
|
|
20
|
+
gap: spacing.space(2);
|
|
18
21
|
}
|
|
19
22
|
|
|
20
|
-
&__prev {
|
|
21
|
-
|
|
23
|
+
&__prev-next {
|
|
24
|
+
&--prev {
|
|
25
|
+
text-align: left;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&--next {
|
|
29
|
+
text-align: right;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-button {
|
|
33
|
+
text-align: inherit;
|
|
34
|
+
text-wrap: wrap;
|
|
22
35
|
|
|
23
|
-
|
|
36
|
+
&--prev {
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&--next {
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&-text {
|
|
43
|
+
display: block;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-title {
|
|
47
|
+
display: block;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&-description {
|
|
51
|
+
padding-bottom: spacing.space(0.25);
|
|
52
|
+
|
|
53
|
+
display: block;
|
|
54
|
+
|
|
55
|
+
line-height: 1.25;
|
|
56
|
+
@include typography.font-size(16);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:has(&-description) {
|
|
60
|
+
svg {
|
|
61
|
+
margin-top: 0.35em;
|
|
62
|
+
|
|
63
|
+
align-self: flex-start;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
24
67
|
}
|
|
25
68
|
|
|
26
|
-
&
|
|
27
|
-
|
|
28
|
-
padding-right: spacing.space(0.5);
|
|
29
|
-
padding-left: spacing.space(0.5);
|
|
69
|
+
:has(&__prev-next-button-description) &__prev-next-button-title {
|
|
70
|
+
@include typography.main-font-weight-bold;
|
|
30
71
|
}
|
|
31
72
|
|
|
32
|
-
&
|
|
33
|
-
|
|
73
|
+
&:not(:has(&__list)) &__prev-next {
|
|
74
|
+
flex: 1;
|
|
34
75
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
76
|
+
&-button {
|
|
77
|
+
padding: 0;
|
|
38
78
|
|
|
39
|
-
|
|
40
|
-
margin-left: spacing.space(0.5);
|
|
41
|
-
}
|
|
79
|
+
border-width: 0;
|
|
42
80
|
|
|
43
|
-
|
|
44
|
-
|
|
81
|
+
&-title {
|
|
82
|
+
@include typography.main-font-weight-bold;
|
|
83
|
+
}
|
|
45
84
|
}
|
|
46
85
|
}
|
|
47
86
|
|
|
48
|
-
&__link
|
|
87
|
+
&__link {
|
|
88
|
+
min-width: 1.5rem;
|
|
49
89
|
padding-right: spacing.space(0.5);
|
|
50
90
|
padding-left: spacing.space(0.5);
|
|
51
91
|
}
|
|
@@ -73,30 +113,32 @@
|
|
|
73
113
|
}
|
|
74
114
|
}
|
|
75
115
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
116
|
+
@include media.on-mobile {
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
gap: spacing.space(0.5);
|
|
80
119
|
|
|
81
|
-
|
|
82
|
-
|
|
120
|
+
&:not(:has(&__list)) {
|
|
121
|
+
align-items: flex-start;
|
|
122
|
+
gap: spacing.space(1);
|
|
123
|
+
}
|
|
83
124
|
|
|
84
|
-
|
|
85
|
-
|
|
125
|
+
&:not(:has(&__list)) &__prev-next {
|
|
126
|
+
&--next {
|
|
127
|
+
text-align: left;
|
|
128
|
+
}
|
|
86
129
|
|
|
87
|
-
|
|
88
|
-
|
|
130
|
+
&-button {
|
|
131
|
+
&--next {
|
|
132
|
+
flex-direction: row;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
89
136
|
}
|
|
90
137
|
|
|
91
138
|
@include media.on-tiny {
|
|
92
|
-
&__item {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
&:first-child,
|
|
96
|
-
&:last-child,
|
|
97
|
-
&--current,
|
|
98
|
-
&--ellipses {
|
|
99
|
-
display: block;
|
|
139
|
+
&:has(&__list) &__item {
|
|
140
|
+
&:not(:is(&:first-child, &:last-child, &--current, &--ellipses)) {
|
|
141
|
+
display: none;
|
|
100
142
|
}
|
|
101
143
|
}
|
|
102
144
|
}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
{% from "nationalarchives/components/button/macro.njk" import tnaButton %}
|
|
2
2
|
|
|
3
3
|
{%- set containerClasses = [params.classes] if params.classes else [] -%}
|
|
4
|
-
{%- if params.spaced -%}
|
|
5
|
-
{%- set containerClasses = containerClasses.concat('tna-pagination--spaced') -%}
|
|
6
|
-
{%- endif -%}
|
|
7
4
|
{%- set classes = containerClasses | join(' ') -%}
|
|
8
5
|
<nav class="tna-pagination{% if classes %} {{ classes }}{% endif %}" aria-label="{{ params.landmarkLabel if params.landmarkLabel else 'Pagination' }}" {%- for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>
|
|
9
6
|
{% if params.previous -%}
|
|
10
|
-
<div class="tna-pagination__prev">
|
|
7
|
+
<div class="tna-pagination__prev-next tna-pagination__prev-next--prev">
|
|
11
8
|
{{ tnaButton({
|
|
12
|
-
|
|
9
|
+
html: '<span class="tna-pagination__prev-next-button-text"><span class="tna-pagination__prev-next-button-title">' ~ (params.previous.text if params.previous.text else 'Previous') ~ '</span>' ~ ('<span class="tna-pagination__prev-next-button-description">' ~ params.previous.description ~ '</span>' if params.previous.description else '') ~ '</span>',
|
|
13
10
|
href: params.previous.href,
|
|
14
11
|
title: params.previous.title,
|
|
15
12
|
iconSvg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" height="24" aria-hidden="true" focusable="false"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M73.4 297.4C60.9 309.9 60.9 330.2 73.4 342.7L233.4 502.7C245.9 515.2 266.2 515.2 278.7 502.7C291.2 490.2 291.2 469.9 278.7 457.4L173.3 352L544 352C561.7 352 576 337.7 576 320C576 302.3 561.7 288 544 288L173.3 288L278.7 182.6C291.2 170.1 291.2 149.8 278.7 137.3C266.2 124.8 245.9 124.8 233.4 137.3L73.4 297.3z"/></svg>',
|
|
16
|
-
plain:
|
|
13
|
+
plain: true,
|
|
14
|
+
classes: 'tna-pagination__prev-next-button tna-pagination__prev-next-button--prev',
|
|
17
15
|
attributes: {
|
|
18
16
|
rel: 'prev'
|
|
19
17
|
}
|
|
@@ -31,8 +29,7 @@
|
|
|
31
29
|
text: item.number,
|
|
32
30
|
href: item.href,
|
|
33
31
|
title: 'Page ' ~ item.number,
|
|
34
|
-
|
|
35
|
-
plain: not params.solid and not item.current,
|
|
32
|
+
plain: not item.current,
|
|
36
33
|
classes: 'tna-pagination__link',
|
|
37
34
|
attributes: { 'aria-current': 'page' } if item.current else {}
|
|
38
35
|
}) }}
|
|
@@ -44,14 +41,14 @@
|
|
|
44
41
|
<p class="tna-pagination__current-item-text">{{ params.currentItemText }}</p>
|
|
45
42
|
{% endif -%}
|
|
46
43
|
{% if params.next -%}
|
|
47
|
-
<div class="tna-
|
|
44
|
+
<div class="tna-pagination__prev-next tna-pagination__prev-next--next">
|
|
48
45
|
{{ tnaButton({
|
|
49
|
-
|
|
46
|
+
html: '<span class="tna-pagination__prev-next-button-text"><span class="tna-pagination__prev-next-button-title">' ~ (params.next.text if params.next.text else 'Next') ~ '</span>' ~ ('<span class="tna-pagination__prev-next-button-description">' ~ params.next.description ~ '</span>' if params.next.description else '') ~ '</span>',
|
|
50
47
|
href: params.next.href,
|
|
51
48
|
title: params.next.title,
|
|
52
49
|
iconSvg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" height="24" aria-hidden="true" focusable="false"><!--!Font Awesome Free v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z"/></svg>',
|
|
53
|
-
plain:
|
|
54
|
-
classes: 'tna-button--icon-right',
|
|
50
|
+
plain: true,
|
|
51
|
+
classes: 'tna-pagination__prev-next-button tna-pagination__prev-next-button--next tna-button--icon-right',
|
|
55
52
|
attributes: {
|
|
56
53
|
rel: 'next'
|
|
57
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tna-panel{--background: var(--accent-background);--font-base: var(--accent-font-base);--font-dark: var(--accent-font-dark);--font-light: var(--accent-font-light);--icon-light: var(--accent-icon-light);--link: var(--accent-link);--link-visited: var(--accent-link);--keyline: var(--accent-keyline);--keyline-dark: var(--accent-keyline-dark);--accent-border: var(--accent-font-dark);--button-text: var(--accent-button-text);--button-background: var(--accent-button-background);--button-hover-text: var(--accent-button-hover-text);--button-hover-background: var(--accent-button-hover-background);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-panel{--accent-font-base: rgb(255, 255, 255) !important;--accent-font-dark: rgb(255, 255, 255) !important;--accent-font-light: rgba(255, 255, 255, 0.7) !important;--accent-icon-light: rgba(255, 255, 255, 0.7) !important;--accent-link: rgb(255, 255, 255) !important;--accent-link-visited: rgb(255, 255, 255) !important;--accent-keyline: rgba(255, 255, 255, 0.5) !important;--accent-keyline-dark: rgba(255, 255, 255, 0.8) !important;--button-accented-text: rgb(255, 255, 255) !important}.tna-panel{--accent-background: rgb(0, 98, 59) !important;--accent-background-light: rgb(221, 229, 213) !important;--accent-border: rgb(134, 188, 37) !important;--button-accented-background: rgb(0, 98, 59) !important}.tna-panel{padding:
|
|
1
|
+
.tna-panel{--background: var(--accent-background);--font-base: var(--accent-font-base);--font-dark: var(--accent-font-dark);--font-light: var(--accent-font-light);--icon-light: var(--accent-icon-light);--link: var(--accent-link);--link-visited: var(--accent-link);--keyline: var(--accent-keyline);--keyline-dark: var(--accent-keyline-dark);--accent-border: var(--accent-font-dark);--button-text: var(--accent-button-text);--button-background: var(--accent-button-background);--button-hover-text: var(--accent-button-hover-text);--button-hover-background: var(--accent-button-hover-background);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-panel{--accent-font-base: rgb(255, 255, 255) !important;--accent-font-dark: rgb(255, 255, 255) !important;--accent-font-light: rgba(255, 255, 255, 0.7) !important;--accent-icon-light: rgba(255, 255, 255, 0.7) !important;--accent-link: rgb(255, 255, 255) !important;--accent-link-visited: rgb(255, 255, 255) !important;--accent-keyline: rgba(255, 255, 255, 0.5) !important;--accent-keyline-dark: rgba(255, 255, 255, 0.8) !important;--button-accented-text: rgb(255, 255, 255) !important}.tna-panel{--accent-background: rgb(0, 98, 59) !important;--accent-background-light: rgb(221, 229, 213) !important;--accent-border: rgb(134, 188, 37) !important;--button-accented-background: rgb(0, 98, 59) !important}.tna-panel{padding:2rem;text-align:center}.tna-panel__content{margin-top:1rem;font-size:1.375rem}.tna-panel__content p+p{margin-top:0.5rem}@media(max-width: 48em){.tna-panel{padding:1rem}.tna-panel__content{font-size:1.125rem}}/*# sourceMappingURL=panel.css.map */
|