@nationalarchives/frontend 0.1.64 → 0.2.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 (270) hide show
  1. package/config/.babelrc.json +19 -0
  2. package/config/.eslintrc.js +25 -0
  3. package/config/.htmlvalidate.json +17 -0
  4. package/config/stylelint.config.js +240 -0
  5. package/nationalarchives/all.css +1 -3
  6. package/nationalarchives/all.css.map +1 -1
  7. package/nationalarchives/all.js +1 -1
  8. package/nationalarchives/all.js.map +1 -1
  9. package/nationalarchives/all.mjs +34 -18
  10. package/nationalarchives/all.scss +0 -2
  11. package/nationalarchives/components/_forms.scss +9 -0
  12. package/nationalarchives/components/_index.scss +2 -34
  13. package/nationalarchives/components/_presentation.scss +23 -0
  14. package/nationalarchives/components/accordion/accordion.css +1 -1
  15. package/nationalarchives/components/accordion/accordion.css.map +1 -1
  16. package/nationalarchives/components/accordion/accordion.js +1 -1
  17. package/nationalarchives/components/accordion/accordion.js.map +1 -1
  18. package/nationalarchives/components/accordion/accordion.mjs +92 -24
  19. package/nationalarchives/components/accordion/accordion.scss +56 -18
  20. package/nationalarchives/components/accordion/fixtures.json +34 -7
  21. package/nationalarchives/components/accordion/macro-options.json +14 -2
  22. package/nationalarchives/components/accordion/template.njk +7 -5
  23. package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
  24. package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
  25. package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +0 -10
  26. package/nationalarchives/components/breadcrumbs/template.njk +1 -1
  27. package/nationalarchives/components/button/button.css +1 -1
  28. package/nationalarchives/components/button/button.css.map +1 -1
  29. package/nationalarchives/components/button/button.scss +32 -10
  30. package/nationalarchives/components/button/macro-options.json +6 -0
  31. package/nationalarchives/components/button/template.njk +3 -1
  32. package/nationalarchives/components/card/card.css +1 -1
  33. package/nationalarchives/components/card/card.css.map +1 -1
  34. package/nationalarchives/components/card/template.njk +5 -5
  35. package/nationalarchives/components/checkboxes/checkboxes.css +1 -1
  36. package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
  37. package/nationalarchives/components/checkboxes/checkboxes.njk +1 -1
  38. package/nationalarchives/components/checkboxes/checkboxes.scss +1 -1
  39. package/nationalarchives/components/checkboxes/macro-options.json +6 -0
  40. package/nationalarchives/components/checkboxes/template.njk +1 -1
  41. package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
  42. package/nationalarchives/components/compound-filters/template.njk +1 -1
  43. package/nationalarchives/components/cookie-banner/cookie-banner.css +1 -1
  44. package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
  45. package/nationalarchives/components/cookie-banner/cookie-banner.scss +0 -2
  46. package/nationalarchives/components/cookie-banner/template.njk +1 -2
  47. package/nationalarchives/components/date-input/date-input.css +1 -1
  48. package/nationalarchives/components/date-input/date-input.css.map +1 -1
  49. package/nationalarchives/components/date-input/date-input.scss +2 -2
  50. package/nationalarchives/components/date-input/fixtures.json +5 -5
  51. package/nationalarchives/components/date-input/template.njk +2 -2
  52. package/nationalarchives/components/date-search/date-search.css +1 -1
  53. package/nationalarchives/components/date-search/date-search.css.map +1 -1
  54. package/nationalarchives/components/date-search/date-search.njk +2 -2
  55. package/nationalarchives/components/date-search/date-search.scss +2 -2
  56. package/nationalarchives/components/date-search/template.njk +1 -1
  57. package/nationalarchives/components/details/details.css.map +1 -1
  58. package/nationalarchives/components/details/template.njk +1 -1
  59. package/nationalarchives/components/error-summary/error-summary.css +1 -1
  60. package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
  61. package/nationalarchives/components/error-summary/error-summary.js +1 -1
  62. package/nationalarchives/components/error-summary/error-summary.js.map +1 -1
  63. package/nationalarchives/components/error-summary/error-summary.mjs +1 -1
  64. package/nationalarchives/components/error-summary/error-summary.scss +3 -4
  65. package/nationalarchives/components/error-summary/template.njk +1 -1
  66. package/nationalarchives/components/files-list/_index.scss +1 -0
  67. package/nationalarchives/components/files-list/files-list.css +1 -0
  68. package/nationalarchives/components/files-list/files-list.css.map +1 -0
  69. package/nationalarchives/components/files-list/files-list.scss +80 -0
  70. package/nationalarchives/components/files-list/fixtures.json +71 -0
  71. package/nationalarchives/components/{sensitive-image → files-list}/macro-options.json +20 -20
  72. package/nationalarchives/components/files-list/macro.njk +3 -0
  73. package/nationalarchives/components/files-list/template.njk +33 -0
  74. package/nationalarchives/components/footer/footer.css +1 -1
  75. package/nationalarchives/components/footer/footer.css.map +1 -1
  76. package/nationalarchives/components/footer/footer.scss +0 -2
  77. package/nationalarchives/components/footer/macro-options.json +0 -6
  78. package/nationalarchives/components/footer/template.njk +1 -1
  79. package/nationalarchives/components/gallery/fixtures.json +35 -1
  80. package/nationalarchives/components/gallery/gallery.css +1 -1
  81. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  82. package/nationalarchives/components/gallery/gallery.js +1 -1
  83. package/nationalarchives/components/gallery/gallery.js.map +1 -1
  84. package/nationalarchives/components/gallery/gallery.mjs +192 -53
  85. package/nationalarchives/components/gallery/gallery.scss +317 -56
  86. package/nationalarchives/components/gallery/macro-options.json +34 -49
  87. package/nationalarchives/components/gallery/template.njk +74 -33
  88. package/nationalarchives/components/global-header/global-header.css +1 -1
  89. package/nationalarchives/components/global-header/global-header.css.map +1 -1
  90. package/nationalarchives/components/global-header/global-header.scss +0 -2
  91. package/nationalarchives/components/global-header/template.njk +1 -1
  92. package/nationalarchives/components/header/header.css +1 -1
  93. package/nationalarchives/components/header/header.css.map +1 -1
  94. package/nationalarchives/components/header/header.scss +3 -5
  95. package/nationalarchives/components/header/template.njk +1 -1
  96. package/nationalarchives/components/hero/hero.css +1 -1
  97. package/nationalarchives/components/hero/hero.css.map +1 -1
  98. package/nationalarchives/components/hero/hero.scss +0 -24
  99. package/nationalarchives/components/hero/template.njk +1 -1
  100. package/nationalarchives/components/index-grid/index-grid.css +1 -1
  101. package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
  102. package/nationalarchives/components/index-grid/index-grid.scss +1 -1
  103. package/nationalarchives/components/index-grid/template.njk +3 -3
  104. package/nationalarchives/components/pagination/pagination.css +1 -1
  105. package/nationalarchives/components/pagination/pagination.css.map +1 -1
  106. package/nationalarchives/components/pagination/pagination.scss +1 -1
  107. package/nationalarchives/components/pagination/template.njk +1 -1
  108. package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
  109. package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
  110. package/nationalarchives/components/phase-banner/phase-banner.scss +0 -2
  111. package/nationalarchives/components/phase-banner/template.njk +1 -1
  112. package/nationalarchives/components/picture/picture.css.map +1 -1
  113. package/nationalarchives/components/picture/picture.js +1 -1
  114. package/nationalarchives/components/picture/picture.js.map +1 -1
  115. package/nationalarchives/components/picture/picture.mjs +2 -2
  116. package/nationalarchives/components/picture/template.njk +1 -1
  117. package/nationalarchives/components/quick-filters/quick-filters.css +1 -1
  118. package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
  119. package/nationalarchives/components/quick-filters/template.njk +1 -1
  120. package/nationalarchives/components/radios/radios.css +1 -1
  121. package/nationalarchives/components/radios/radios.css.map +1 -1
  122. package/nationalarchives/components/radios/radios.njk +1 -1
  123. package/nationalarchives/components/radios/radios.scss +1 -1
  124. package/nationalarchives/components/radios/template.njk +1 -1
  125. package/nationalarchives/components/records-list/_index.scss +1 -0
  126. package/nationalarchives/components/records-list/fixtures.json +42 -0
  127. package/nationalarchives/components/records-list/macro.njk +3 -0
  128. package/nationalarchives/components/records-list/records-list.css +1 -0
  129. package/nationalarchives/components/records-list/records-list.css.map +1 -0
  130. package/nationalarchives/components/{featured-records/featured-records.scss → records-list/records-list.scss} +2 -2
  131. package/nationalarchives/components/records-list/template.njk +21 -0
  132. package/nationalarchives/components/search-field/search-field.css +1 -1
  133. package/nationalarchives/components/search-field/search-field.css.map +1 -1
  134. package/nationalarchives/components/search-field/search-field.scss +3 -2
  135. package/nationalarchives/components/search-field/template.njk +2 -2
  136. package/nationalarchives/components/select/select.css +1 -1
  137. package/nationalarchives/components/select/select.css.map +1 -1
  138. package/nationalarchives/components/select/select.scss +2 -2
  139. package/nationalarchives/components/select/template.njk +2 -2
  140. package/nationalarchives/components/sidebar/fixtures.json +18 -8
  141. package/nationalarchives/components/sidebar/macro-options.json +9 -2
  142. package/nationalarchives/components/sidebar/sidebar.css +1 -1
  143. package/nationalarchives/components/sidebar/sidebar.css.map +1 -1
  144. package/nationalarchives/components/sidebar/template.njk +12 -3
  145. package/nationalarchives/components/skip-link/skip-link.css +1 -1
  146. package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
  147. package/nationalarchives/components/skip-link/skip-link.scss +0 -2
  148. package/nationalarchives/components/skip-link/template.njk +1 -1
  149. package/nationalarchives/components/tabs/tabs.css +1 -1
  150. package/nationalarchives/components/tabs/tabs.css.map +1 -1
  151. package/nationalarchives/components/tabs/tabs.scss +0 -12
  152. package/nationalarchives/components/tabs/template.njk +1 -1
  153. package/nationalarchives/components/text-input/template.njk +1 -1
  154. package/nationalarchives/components/text-input/text-input.css +1 -1
  155. package/nationalarchives/components/text-input/text-input.css.map +1 -1
  156. package/nationalarchives/components/text-input/text-input.njk +2 -2
  157. package/nationalarchives/components/text-input/text-input.scss +2 -2
  158. package/nationalarchives/components/textarea/template.njk +2 -2
  159. package/nationalarchives/components/textarea/textarea.css +1 -1
  160. package/nationalarchives/components/textarea/textarea.css.map +1 -1
  161. package/nationalarchives/components/textarea/textarea.scss +2 -2
  162. package/nationalarchives/components/warning/template.njk +1 -1
  163. package/nationalarchives/components/warning/warning.css +1 -1
  164. package/nationalarchives/components/warning/warning.css.map +1 -1
  165. package/nationalarchives/components/warning/warning.scss +2 -0
  166. package/nationalarchives/global-header-package.css +1 -1
  167. package/nationalarchives/global-header-package.css.map +1 -1
  168. package/nationalarchives/global-header-package.scss +1 -1
  169. package/nationalarchives/print.css +6 -0
  170. package/nationalarchives/print.css.map +1 -0
  171. package/nationalarchives/print.scss +44 -0
  172. package/nationalarchives/prototype-kit.css +1 -3
  173. package/nationalarchives/prototype-kit.css.map +1 -1
  174. package/nationalarchives/templates/layouts/_generic.njk +6 -6
  175. package/nationalarchives/tools/_a11y.scss +4 -0
  176. package/nationalarchives/tools/_colour.scss +75 -79
  177. package/nationalarchives/tools/_media.scss +0 -10
  178. package/nationalarchives/utilities/_columns.scss +1 -1
  179. package/nationalarchives/utilities/_index.scss +1 -0
  180. package/nationalarchives/utilities/_reset.scss +2 -8
  181. package/nationalarchives/utilities/{_colour.scss → colour/_index.scss} +2 -2
  182. package/nationalarchives/utilities/{_forms.scss → forms/_index.scss} +6 -6
  183. package/nationalarchives/utilities/grid/macro.njk +3 -0
  184. package/nationalarchives/{components → utilities}/grid/template.njk +1 -1
  185. package/nationalarchives/utilities/{_lists.scss → lists/_index.scss} +16 -7
  186. package/nationalarchives/utilities/{_overrides.scss → overrides/_index.scss} +8 -2
  187. package/nationalarchives/utilities/{_tables.scss → tables/_index.scss} +5 -5
  188. package/nationalarchives/utilities/{_typography.scss → typography/_index.scss} +8 -5
  189. package/nationalarchives/variables/_colour.scss +12 -5
  190. package/package.json +1 -1
  191. package/nationalarchives/components/accordion/accordion.stories.js +0 -410
  192. package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +0 -128
  193. package/nationalarchives/components/button/button-group.stories.js +0 -114
  194. package/nationalarchives/components/button/button.stories.js +0 -204
  195. package/nationalarchives/components/card/card.stories.js +0 -402
  196. package/nationalarchives/components/checkboxes/checkboxes.stories.js +0 -241
  197. package/nationalarchives/components/compound-filters/compound-filters.stories.js +0 -61
  198. package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +0 -250
  199. package/nationalarchives/components/date-input/date-input.stories.js +0 -119
  200. package/nationalarchives/components/date-search/date-search.stories.js +0 -124
  201. package/nationalarchives/components/details/details.stories.js +0 -33
  202. package/nationalarchives/components/error-summary/error-summary.stories.js +0 -59
  203. package/nationalarchives/components/featured-records/_index.scss +0 -1
  204. package/nationalarchives/components/featured-records/featured-records.css +0 -1
  205. package/nationalarchives/components/featured-records/featured-records.css.map +0 -1
  206. package/nationalarchives/components/featured-records/featured-records.stories.js +0 -50
  207. package/nationalarchives/components/featured-records/fixtures.json +0 -42
  208. package/nationalarchives/components/featured-records/macro.njk +0 -3
  209. package/nationalarchives/components/featured-records/template.njk +0 -21
  210. package/nationalarchives/components/footer/footer.stories.js +0 -241
  211. package/nationalarchives/components/gallery/gallery.stories.js +0 -74
  212. package/nationalarchives/components/global-header/global-header.stories.js +0 -364
  213. package/nationalarchives/components/grid/_index.scss +0 -1
  214. package/nationalarchives/components/grid/grid.css +0 -1
  215. package/nationalarchives/components/grid/grid.css.map +0 -1
  216. package/nationalarchives/components/grid/grid.stories.js +0 -279
  217. package/nationalarchives/components/grid/macro.njk +0 -3
  218. package/nationalarchives/components/header/header.stories.js +0 -239
  219. package/nationalarchives/components/hero/hero.stories.js +0 -326
  220. package/nationalarchives/components/index-grid/index-grid.stories.js +0 -128
  221. package/nationalarchives/components/pagination/pagination.stories.js +0 -532
  222. package/nationalarchives/components/phase-banner/phase-banner.stories.js +0 -39
  223. package/nationalarchives/components/picture/picture.stories.js +0 -75
  224. package/nationalarchives/components/quick-filters/quick-filters.stories.js +0 -76
  225. package/nationalarchives/components/radios/radios.stories.js +0 -244
  226. package/nationalarchives/components/search-field/search-field.stories.js +0 -88
  227. package/nationalarchives/components/search-filters/_index.scss +0 -1
  228. package/nationalarchives/components/search-filters/fixtures.json +0 -16
  229. package/nationalarchives/components/search-filters/macro-options.json +0 -39
  230. package/nationalarchives/components/search-filters/macro.njk +0 -3
  231. package/nationalarchives/components/search-filters/search-filters.css +0 -1
  232. package/nationalarchives/components/search-filters/search-filters.css.map +0 -1
  233. package/nationalarchives/components/search-filters/search-filters.js +0 -2
  234. package/nationalarchives/components/search-filters/search-filters.js.map +0 -1
  235. package/nationalarchives/components/search-filters/search-filters.mjs +0 -67
  236. package/nationalarchives/components/search-filters/search-filters.scss +0 -198
  237. package/nationalarchives/components/search-filters/search-filters.stories.js +0 -207
  238. package/nationalarchives/components/search-filters/template.njk +0 -108
  239. package/nationalarchives/components/select/select.stories.js +0 -197
  240. package/nationalarchives/components/sensitive-image/_index.scss +0 -1
  241. package/nationalarchives/components/sensitive-image/fixtures.json +0 -51
  242. package/nationalarchives/components/sensitive-image/macro.njk +0 -3
  243. package/nationalarchives/components/sensitive-image/sensitive-image.css +0 -1
  244. package/nationalarchives/components/sensitive-image/sensitive-image.css.map +0 -1
  245. package/nationalarchives/components/sensitive-image/sensitive-image.js +0 -2
  246. package/nationalarchives/components/sensitive-image/sensitive-image.js.map +0 -1
  247. package/nationalarchives/components/sensitive-image/sensitive-image.mjs +0 -23
  248. package/nationalarchives/components/sensitive-image/sensitive-image.scss +0 -85
  249. package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +0 -86
  250. package/nationalarchives/components/sensitive-image/template.njk +0 -11
  251. package/nationalarchives/components/sidebar/sidebar.stories.js +0 -224
  252. package/nationalarchives/components/skip-link/skip-link.stories.js +0 -76
  253. package/nationalarchives/components/tabs/tabs.stories.js +0 -300
  254. package/nationalarchives/components/text-input/text-input.stories.js +0 -188
  255. package/nationalarchives/components/textarea/textarea.stories.js +0 -130
  256. package/nationalarchives/components/warning/warning.stories.js +0 -39
  257. package/nationalarchives/stories/intro.mdx +0 -13
  258. package/nationalarchives/stories/utilities/colour-schemes/colour-combinations.stories.js +0 -293
  259. package/nationalarchives/stories/utilities/colour-schemes/colour-themes.stories.js +0 -1535
  260. package/nationalarchives/stories/utilities/forms/forms.mdx +0 -117
  261. package/nationalarchives/stories/utilities/lists/lists.stories.js +0 -212
  262. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +0 -42
  263. package/nationalarchives/stories/utilities/tables/tables.stories.js +0 -47
  264. package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +0 -94
  265. package/nationalarchives/stories/utilities/typography/headings.stories.js +0 -33
  266. package/nationalarchives/stories/utilities/typography/typography.stories.js +0 -91
  267. package/nationalarchives/components/{featured-records → records-list}/macro-options.json +0 -0
  268. package/nationalarchives/{components/grid/grid.scss → utilities/grid/_index.scss} +3 -3
  269. /package/nationalarchives/{components → utilities}/grid/fixtures.json +0 -0
  270. /package/nationalarchives/{components → utilities}/grid/macro-options.json +0 -0
@@ -1,1535 +0,0 @@
1
- import Accordion from "../../../components/accordion/template.njk";
2
- import Breadcrumbs from "../../../components/breadcrumbs/template.njk";
3
- import Button from "../../../components/button/template.njk";
4
- import Card from "../../../components/card/template.njk";
5
- import Checkboxes from "../../../components/checkboxes/template.njk";
6
- import ErrorSummary from "../../../components/error-summary/template.njk";
7
- import FeaturedRecords from "../../../components/featured-records/template.njk";
8
- import Footer from "../../../components/footer/template.njk";
9
- import Gallery from "../../../components/gallery/template.njk";
10
- import GlobalHeader from "../../../components/global-header/template.njk";
11
- import Hero from "../../../components/hero/template.njk";
12
- import IndexGrid from "../../../components/index-grid/template.njk";
13
- import Pagination from "../../../components/pagination/template.njk";
14
- import PhaseBanner from "../../../components/phase-banner/template.njk";
15
- import Picture from "../../../components/picture/template.njk";
16
- import Radios from "../../../components/radios/template.njk";
17
- import SearchField from "../../../components/search-field/template.njk";
18
- import Select from "../../../components/select/template.njk";
19
- import SkipLink from "../../../components/skip-link/template.njk";
20
- import Tabs from "../../../components/tabs/template.njk";
21
- import TextInput from "../../../components/text-input/template.njk";
22
- import Textarea from "../../../components/textarea/template.njk";
23
- import Warning from "../../../components/warning/template.njk";
24
-
25
- const argTypes = {
26
- theme: {
27
- control: "radio",
28
- options: [
29
- "system",
30
- "light",
31
- "dark",
32
- // "light high-contrast",
33
- // "dark high-contrast",
34
- ],
35
- },
36
- accent: {
37
- control: "radio",
38
- options: ["none", "yellow", "pink", "orange", "green", "blue"],
39
- },
40
- };
41
-
42
- export default {
43
- title: "Utilities/Colours/Themes",
44
- argTypes,
45
- };
46
-
47
- const Template = ({ theme, accent }) => {
48
- document.documentElement.classList.remove(
49
- "tna-template",
50
- "tna-template--yellow-accent",
51
- );
52
-
53
- const cardDefaultOptions = {
54
- supertitle: "Card supertitle",
55
- title: "Card title",
56
- headingLevel: 3,
57
- headingSize: "s",
58
- href: "#",
59
- imageSrc:
60
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
61
- imageAlt: "The National Archives office",
62
- imageWidth: 499,
63
- imageHeight: 333,
64
- label: "New",
65
- body: "<p>Card body</p>",
66
- actions: [
67
- {
68
- text: "Card action",
69
- href: "#",
70
- title: "Go and do the action",
71
- },
72
- ],
73
- };
74
-
75
- return `<div class="tna-template ${
76
- theme === "system"
77
- ? "tna-template--system-theme"
78
- : theme === "dark"
79
- ? "tna-template--dark-theme"
80
- : theme === "high-contrast"
81
- ? "tna-template--high-contrast-theme"
82
- : theme === "dark high-contrast"
83
- ? "tna-template--dark-theme tna-template--high-contrast-theme"
84
- : ""
85
- } ${
86
- accent === "yellow"
87
- ? "tna-template--yellow-accent"
88
- : accent === "pink"
89
- ? "tna-template--pink-accent"
90
- : accent === "orange"
91
- ? "tna-template--orange-accent"
92
- : accent === "green"
93
- ? "tna-template--green-accent"
94
- : accent === "blue"
95
- ? "tna-template--blue-accent"
96
- : ""
97
- }">
98
- <div class="tna-template__body tna-template__body--padded">
99
- ${SkipLink({
100
- params: {
101
- href: "main-content",
102
- },
103
- })}
104
- ${PhaseBanner({
105
- params: {
106
- phase: "beta",
107
- message:
108
- 'This is a new service - <a href="#">give us your feedback</a> to help improve it.',
109
- accent: true,
110
- },
111
- })}
112
- ${GlobalHeader({
113
- params: {
114
- logo: {
115
- href: "#/",
116
- },
117
- topNavigation: [
118
- {
119
- text: "Search",
120
- href: "https://www.nationalarchives.gov.uk/search/",
121
- icon: "search",
122
- },
123
- {
124
- text: "Shop",
125
- href: "#/shop",
126
- icon: "bag-shopping",
127
- },
128
- {
129
- text: "Sign in",
130
- href: "#/sign-in",
131
- icon: "user",
132
- },
133
- ],
134
- navigation: [
135
- {
136
- text: "Visit",
137
- href: "#/visit",
138
- },
139
- {
140
- text: "What’s on",
141
- href: "#/whats-on",
142
- },
143
- {
144
- text: "Explore the collection",
145
- href: "#/explore-the-collection",
146
- },
147
- {
148
- text: "Help using the archive",
149
- href: "#/using-the-archives",
150
- },
151
- {
152
- text: "Education",
153
- href: "#/education",
154
- },
155
- {
156
- text: "Professional guidance and services",
157
- href: "#/professional-guidance-and-services",
158
- },
159
- ],
160
- },
161
- })}
162
- <div class="tna-container">
163
- <div class="tna-column tna-column--full">
164
- ${Breadcrumbs({
165
- params: {
166
- items: [
167
- {
168
- text: "Alpha",
169
- href: "#/alpha",
170
- },
171
- {
172
- text: "Beta",
173
- href: "#/beta",
174
- },
175
- {
176
- text: "Gamma",
177
- href: "#/gamma",
178
- },
179
- {
180
- text: "Delta",
181
- href: "#/delta",
182
- },
183
- {
184
- text: "Epsilon",
185
- href: "#/epsilon",
186
- },
187
- ],
188
- },
189
- })}
190
- </div>
191
- </div>
192
- <main class="tna-main" id="main-content">
193
- ${Hero({
194
- params: {
195
- title: "Title",
196
- text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
197
- imageSrc:
198
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
199
- imageAlt: "The National Archives office",
200
- imageWidth: 499,
201
- imageHeight: 333,
202
- imageCaption: "An interesting photo by a famous photographer ©2023",
203
- },
204
- })}
205
- <div class="tna-container tna-section">
206
- <div class="tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny">
207
- <hgroup class="tna-hgroup-l">
208
- <p class="tna-hgroup__supertitle">TNA colour theme</p>
209
- <h2 class="tna-hgroup__title">Heading</h2>
210
- </hgroup>
211
- <p>This is some body text <a href="#">link</a>.</p>
212
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
213
- <p>Donec ac tellus in dui rutrum maximus. Aliquam vel euismod eros. Integer ut magna velit. Fusce sed dui sit amet metus eleifend dictum quis vitae mi. Aenean sagittis euismod purus, in accumsan metus venenatis nec. Nullam nec velit felis. Sed nec felis eu nisl varius dictum eu quis nisl.</p>
214
- <p>Donec dapibus est arcu, vel pellentesque risus pellentesque eget.</p>
215
- <ul class="tna-ul">
216
- <li>Alpha</li>
217
- <li>Beta</li>
218
- <li>Gamma</li>
219
- </ul>
220
- <div class="tna-button-group">
221
- ${Button({
222
- params: {
223
- text: "Primary button",
224
- href: "#",
225
- },
226
- })}
227
- ${Button({
228
- params: {
229
- text: "Accent button",
230
- href: "#",
231
- accent: true,
232
- },
233
- })}
234
- ${Button({
235
- params: {
236
- text: "Explore the collection",
237
- href: "#",
238
- icon: "map-location-dot",
239
- },
240
- })}
241
- ${Button({
242
- params: {
243
- text: "Plain button",
244
- plain: true,
245
- },
246
- })}
247
- </div>
248
- </div>
249
- <div class="tna-column tna-column--no-padding tna-column--width-1-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
250
- <div class="tna-container tna-container--no-padding">
251
- <div class="tna-column tna-column--full tna-column--width-1-2-medium tna-column--width-1-2-small tna-!--margin-vertical-m tna-!--no-margin-top-large">
252
- <div class="tna-aside tna-background-contrast">
253
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
254
- <div class="tna-button-group">
255
- ${Button({
256
- params: {
257
- text: "Accent button",
258
- href: "#",
259
- accent: true,
260
- },
261
- })}
262
- </div>
263
- </div>
264
- </div>
265
- <div class="tna-column tna-column--full tna-column--width-1-2-medium tna-column--width-1-2-small tna-!--margin-vertical-m tna-!--no-margin-top-large tna-!--no-margin-bottom-large">
266
- <div class="tna-aside tna-background-accent">
267
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
268
- <div class="tna-button-group">
269
- ${Button({
270
- params: {
271
- text: "Primary button",
272
- href: "#",
273
- },
274
- })}
275
- </div>
276
- </div>
277
- </div>
278
- </div>
279
- </div>
280
- </div>
281
- <hr>
282
- <div class="tna-container tna-section">
283
- <div class="tna-column tna-column--full">
284
- <h1 class="tna-heading-xl">
285
- This is a heading (XL)
286
- </h1>
287
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
288
- <h2 class="tna-heading-l">
289
- This is a heading (L)
290
- </h2>
291
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
292
- <h3 class="tna-heading-m">
293
- This is a heading (M)
294
- </h3>
295
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
296
- <h4 class="tna-heading-s">
297
- This is a heading (S)
298
- </h4>
299
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
300
- <hgroup class="tna-hgroup-xl">
301
- <p class="tna-hgroup__supertitle">Supertitle</p>
302
- <h2 class="tna-hgroup__title">This is a heading (XL)</h2>
303
- </hgroup>
304
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
305
- <hgroup class="tna-hgroup-l">
306
- <p class="tna-hgroup__supertitle">Supertitle</p>
307
- <h2 class="tna-hgroup__title">This is a heading (L)</h2>
308
- </hgroup>
309
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
310
- <hgroup class="tna-hgroup-m">
311
- <p class="tna-hgroup__supertitle">Supertitle</p>
312
- <h2 class="tna-hgroup__title">This is a heading (M)</h2>
313
- </hgroup>
314
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
315
- <hgroup class="tna-hgroup-s">
316
- <p class="tna-hgroup__supertitle">Supertitle</p>
317
- <h2 class="tna-hgroup__title">This is a heading (S)</h2>
318
- </hgroup>
319
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
320
- <p class="tna-large-paragraph">Large paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
321
- <p class="tna-scene-setter">
322
- We are the official archive of England and Wales. Discover 1,000 years of history through <a href="#">fascinating stories</a> from the past or <a href="#">start your own research</a> and <a href="#">search our catalogue</a> of 32 million records. <a href="#">Plan a visit</a> to access original historic documents from our collections then enjoy the grounds, café, and <a href="#">free exhibitions</a>.
323
- </p>
324
- <blockquote class="tna-blockquote">
325
- <div class="tna-blockquote__quote">
326
- <p>A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.</p>
327
- </div>
328
- <p class="tna-blockquote__citation">Douglas Adams, Mostly Harmless</p>
329
- </blockquote>
330
- <h2 class="tna-heading-m">
331
- <a href="#">Researching with The National Archives</a>
332
- </h2>
333
- <p>Lorem ipsum <a href="#">link</a></p>
334
- <hgroup class="tna-hgroup-m">
335
- <p class="tna-hgroup__supertitle">Supertitle</p>
336
- <h2 class="tna-hgroup__title">
337
- <a href="#">Researching with The National Archives</a>
338
- </h2>
339
- </hgroup>
340
- <p>Lorem ipsum <a href="#">link</a></p>
341
- </div>
342
- <div class="tna-column tna-column--width-1-2 tna-column--full-small tna-column--full-tiny tna-!--margin-top-m">
343
- <h3 class="tna-heading-m">
344
- Descriptions
345
- </h3>
346
- <dl class="tna-dl">
347
- <dt>Alpha</dt>
348
- <dd>Lorem ipsum</dd>
349
- <dt>Beta</dt>
350
- <dd>Lorem ipsum</dd>
351
- <dt>Gamma</dt>
352
- <dd>Lorem ipsum</dd>
353
- </dl>
354
- </div>
355
- <div class="tna-column tna-column--width-1-2 tna-column--full-small tna-column--full-tiny tna-!--margin-top-m">
356
- <h3 class="tna-heading-m">
357
- Descriptions
358
- </h3>
359
- <dl class="tna-dl tna-dl--plain">
360
- <dt>Alpha</dt>
361
- <dd>Lorem ipsum</dd>
362
- <dt>Beta</dt>
363
- <dd>Lorem ipsum</dd>
364
- <dt>Gamma</dt>
365
- <dd>Lorem ipsum</dd>
366
- </dl>
367
- </div>
368
- <div class="tna-column tna-column--full tna-!--margin-top-m">
369
- <h3 class="tna-heading-m">
370
- Descriptions
371
- </h3>
372
- <dl class="tna-dl tna-dl--icon-padding ">
373
- <dt>
374
- <i class="fa-solid fa-landmark" aria-hidden="true"></i>
375
- Held by
376
- </dt>
377
- <dd>The National Archives, Kew</dd>
378
- <dt>
379
- <i class="fa-solid fa-calendar" aria-hidden="true"></i>
380
- Date
381
- </dt>
382
- <dd>1972–1979</dd>
383
- <dt>
384
- <i class="fa-solid fa-database" aria-hidden="true"></i>
385
- Reference
386
- </dt>
387
- <dd>LC 4</dd>
388
- </dl>
389
- <h2 class="tna-heading-l">
390
- Categories
391
- </h2>
392
- <dl class="tna-dl-chips">
393
- <dt>Published</dt>
394
- <dd>
395
- <span class="tna-dl-chips__item">
396
- <i class="fa-solid fa-calendar"></i>
397
- 2014
398
- </span>
399
- </dd>
400
- <dt>Author</dt>
401
- <dd>
402
- <a class="tna-dl-chips__item">
403
- <i class="fa-solid fa-user"></i>
404
- James
405
- </a>
406
- </dd>
407
- <dt>Category</dt>
408
- <dd>
409
- <a class="tna-dl-chips__item">
410
- Research
411
- </a>
412
- </dd>
413
- <dt>Comments</dt>
414
- <dd>
415
- <span class="tna-dl-chips__item">
416
- 3 comments
417
- </span>
418
- </dd>
419
- </dl>
420
- <dl class="tna-dl-chips tna-dl-chips--plain">
421
- <dt>Published</dt>
422
- <dd>
423
- <span class="tna-dl-chips__item">
424
- <i class="fa-solid fa-calendar"></i>
425
- 2014
426
- </span>
427
- </dd>
428
- <dt>Author</dt>
429
- <dd>
430
- <a class="tna-dl-chips__item">
431
- <i class="fa-solid fa-user"></i>
432
- James
433
- </a>
434
- </dd>
435
- <dt>Category</dt>
436
- <dd>
437
- <a class="tna-dl-chips__item">
438
- Research
439
- </a>
440
- </dd>
441
- <dt>Comments</dt>
442
- <dd>
443
- <span class="tna-dl-chips__item">
444
- 3 comments
445
- </span>
446
- </dd>
447
- </dl>
448
- ${Warning({
449
- params: {
450
- body: "Please note this page references hunger strikes and force feeding, which some people may find upsetting.",
451
- },
452
- })}
453
- <h2 class="tna-heading-l">
454
- Featured records
455
- </h2>
456
- ${FeaturedRecords({
457
- params: {
458
- items: [
459
- {
460
- imageSrc: "https://picsum.photos/id/237/400/600",
461
- imageWidth: 400,
462
- imageHeight: 600,
463
- collection: "TS 11/45/167",
464
- title: "Court records relating to Robert Wedderburn’s trial",
465
- href: "#",
466
- date: "1819–1820",
467
- },
468
- {
469
- collection: "HO 42/191",
470
- title: "Home office letters",
471
- href: "#",
472
- date: "1819",
473
- },
474
- ],
475
- classes: "tna-featured-records--demo",
476
- },
477
- })}
478
- <h2 class="tna-heading-l">
479
- Accordion
480
- </h2>
481
- ${Accordion({
482
- params: {
483
- items: [
484
- {
485
- title: "Alpha",
486
- text: "Content",
487
- },
488
- {
489
- title: "Beta",
490
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim. Donec bibendum est leo, sed dapibus mauris facilisis vitae.</p><p>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit mi vel rhoncus aliquam.</p><p>Pellentesque ultrices bibendum nibh, sit amet ornare turpis efficitur id. Aenean ullamcorper neque eget justo sagittis, rutrum ultrices urna varius. Mauris sodales a lorem at sodales.</p>",
491
- },
492
- {
493
- title: "Gamma",
494
- body: `<ul class="tna-ul">
495
- <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
496
- <li>Nulla dignissim vehicula magna, et hendrerit quam iaculis a. Mauris in ultricies enim.</li>
497
- <li>Donec bibendum est leo, sed dapibus mauris facilisis vitae.</li>
498
- <li>Quisque hendrerit condimentum nisl, non volutpat ex eleifend at. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi id suscipit felis, sed tincidunt arcu. Etiam vel blandit diam, vitae commodo mi.</li>
499
- </ul>`,
500
- },
501
- {
502
- title: "Delta",
503
- body: `<div class="tna-table-wrapper">
504
- <table class="tna-table">
505
- <caption class="tna-table__caption">
506
- Records added and removed between 2020 and 2022.
507
- </caption>
508
- <thead class="tna-table__head">
509
- <tr class="tna-table__row">
510
- <th class="tna-table__header" scope="col">Year</th>
511
- <th class="tna-table__header" scope="col">Chinese zodiac sign</th>
512
- <th class="tna-table__header tna-table__header--numeric" scope="col">Records added</th>
513
- <th class="tna-table__header tna-table__header--numeric" scope="col">Size (megabytes)</th>
514
- </tr>
515
- </thead>
516
- <tbody class="tna-table__body">
517
- <tr>
518
- <th class="tna-table__header" scope="row">2020</th>
519
- <td class="tna-table__cell">Rat</td>
520
- <td class="tna-table__cell tna-table__cell--numeric">123,456</td>
521
- <td class="tna-table__cell tna-table__cell--numeric">789</td>
522
- </tr>
523
- <tr>
524
- <th class="tna-table__header" scope="row">2021</th>
525
- <td class="tna-table__cell">Ox</td>
526
- <td class="tna-table__cell tna-table__cell--numeric">456,789</td>
527
- <td class="tna-table__cell tna-table__cell--numeric">123</td>
528
- </tr>
529
- <tr>
530
- <th class="tna-table__header" scope="row">2022</th>
531
- <td class="tna-table__cell">Tiger</td>
532
- <td class="tna-table__cell tna-table__cell--numeric">42,424</td>
533
- <td class="tna-table__cell tna-table__cell--numeric">1,337</td>
534
- </tr>
535
- </tbody>
536
- <tfoot class="tna-table__foot">
537
- <tr>
538
- <th class="tna-table__header" scope="row">Totals</th>
539
- <td class="tna-table__cell"></td>
540
- <td class="tna-table__cell tna-table__cell--numeric">622,669</td>
541
- <td class="tna-table__cell tna-table__cell--numeric">2,249</td>
542
- </tr>
543
- </tfoot>
544
- </table>
545
- </div>`,
546
- },
547
- ],
548
- group: "group-1",
549
- },
550
- })}
551
- </div>
552
- </div>
553
- <hr>
554
- <div class="tna-container tna-section">
555
- <div class="tna-column tna-column--full">
556
- <p>Lorem ipsum</p>
557
- <p class="tna-!--no-margin-top">Lorem ipsum (tna-!--no-margin-top)</p>
558
- <p class="tna-!--margin-top-xs">Lorem ipsum (tna-!--margin-top-xs)</p>
559
- <p class="tna-!--margin-top-s">Lorem ipsum (tna-!--margin-top-s)</p>
560
- <p class="tna-!--margin-top-m">Lorem ipsum (tna-!--margin-top-m)</p>
561
- <p class="tna-!--margin-top-l">Lorem ipsum (tna-!--margin-top-l)</p>
562
- <p class="tna-!--margin-top-xl">Lorem ipsum (tna-!--margin-top-xl)</p>
563
- </div>
564
- </div>
565
- ${Hero({
566
- params: {
567
- imageSrc:
568
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
569
- imageAlt: "The National Archives office",
570
- imageWidth: 499,
571
- imageHeight: 333,
572
- imageCaption: "An interesting photo by a famous photographer ©2023",
573
- },
574
- })}
575
- <div class="tna-section tna-!--padding-bottom-s">
576
- <ul class="tna-ul tna-ul--plain tna-container">
577
- <li class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
578
- ${Card({
579
- params: {
580
- ...cardDefaultOptions,
581
- classes: "tna-!--margin-bottom-m",
582
- },
583
- })}
584
- </li>
585
- <li class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
586
- ${Card({
587
- params: {
588
- ...cardDefaultOptions,
589
- style: "contrast",
590
- classes: "tna-!--margin-bottom-m",
591
- },
592
- })}
593
- </li>
594
- <li class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
595
- ${Card({
596
- params: {
597
- ...cardDefaultOptions,
598
- style: "accent",
599
- classes: "tna-!--margin-bottom-m",
600
- },
601
- })}
602
- </li>
603
- </ul>
604
- </div>
605
- <hr>
606
- <div class="tna-section">
607
- <ul class="tna-ul tna-ul--plain tna-container">
608
- <li class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
609
- ${Card({
610
- params: {
611
- ...cardDefaultOptions,
612
- horizontal: true,
613
- classes: "tna-!--margin-bottom-m",
614
- },
615
- })}
616
- </li>
617
- <li class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
618
- ${Card({
619
- params: {
620
- ...cardDefaultOptions,
621
- horizontal: true,
622
- style: "contrast",
623
- classes: "tna-!--margin-bottom-m",
624
- },
625
- })}
626
- </li>
627
- <li class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
628
- ${Card({
629
- params: {
630
- ...cardDefaultOptions,
631
- horizontal: true,
632
- style: "accent",
633
- },
634
- })}
635
- </li>
636
- </ul>
637
- </div>
638
- <hr>
639
- <div class="tna-container tna-section">
640
- <div class="tna-column tna-column--full">
641
- ${Tabs({
642
- params: {
643
- title: "Example tabs",
644
- items: [
645
- {
646
- id: "unique-id-a",
647
- title: "Alpha section",
648
- body: '<h2 class="tna-heading-l">Alpha title</h2><p>Lorem ipsum</p>',
649
- },
650
- {
651
- id: "unique-id-b",
652
- title: "Beta section",
653
- body: '<h2 class="tna-heading-l">Beta title</h2><p>Lorem ipsum</p>',
654
- },
655
- {
656
- id: "unique-id-c",
657
- title: "Gamma section",
658
- body: '<h2 class="tna-heading-l">Gamma title</h2><p>Lorem ipsum</p>',
659
- },
660
- ],
661
- classes: "tna-tabs--demo",
662
- },
663
- })}
664
- </div>
665
- </div>
666
- <hr>
667
- <div class="tna-container tna-section">
668
- <div class="tna-column tna-column--full">
669
- ${Picture({
670
- params: {
671
- src: "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
672
- alt: "The National Archives office",
673
- width: 499,
674
- height: 333,
675
- caption: "<p>This is a pretty image</p>",
676
- information: [
677
- {
678
- id: "transcript",
679
- title: "Transcript",
680
- body: "<p>Lorem ipsum transcript</p>",
681
- },
682
- {
683
- id: "translation",
684
- title: "Translation",
685
- body: "<p>Lorem ipsum translation</p>",
686
- },
687
- ],
688
- classes: "tna-picture--demo",
689
- },
690
- })}
691
- </div>
692
- </div>
693
- ${Gallery({
694
- params: {
695
- heading: { title: "My gallery", level: 3 },
696
- items: [
697
- {
698
- src: "https://picsum.photos/id/1/800/600",
699
- alt: "",
700
- width: 800,
701
- height: 600,
702
- },
703
- {
704
- src: "https://picsum.photos/id/2/600/800",
705
- alt: "",
706
- width: 600,
707
- height: 800,
708
- description: "Image description",
709
- },
710
- {
711
- src: "https://picsum.photos/id/3/800/800",
712
- alt: "",
713
- width: 800,
714
- height: 800,
715
- tabs: [
716
- {
717
- id: "gallery-tabs-3-1",
718
- title: "Transcript",
719
- body: "<p>TEST TRANSCRIPT</p>",
720
- },
721
- {
722
- id: "gallery-tabs-3-2",
723
- title: "Translation",
724
- body: "<p>TEST TRANSLATION</p>",
725
- },
726
- ],
727
- },
728
- {
729
- src: "https://picsum.photos/id/4/800/600",
730
- alt: "",
731
- width: 800,
732
- height: 600,
733
- description: "Image description",
734
- tabs: [
735
- {
736
- id: "gallery-tabs-4-1",
737
- title: "Transcript",
738
- body: "<p>TEST TRANSCRIPT</p>",
739
- },
740
- {
741
- id: "gallery-tabs-4-2",
742
- title: "Translation",
743
- body: "<p>TEST TRANSLATION</p>",
744
- },
745
- ],
746
- },
747
- ],
748
- classes: "tna-gallery--demo",
749
- },
750
- })}
751
- <div class="tna-section">
752
- ${IndexGrid({
753
- params: {
754
- title: "My dogs 1",
755
- headingLevel: 3,
756
- href: "#",
757
- items: Array(4)
758
- .fill({
759
- ...{
760
- href: "#",
761
- src: "https://picsum.photos/id/237/800/600",
762
- alt: "Photo of a puppy",
763
- width: "800",
764
- height: "600",
765
- title: "Cat",
766
- subtitle: "4 photos",
767
- },
768
- })
769
- .map((item, index) => {
770
- const pseudoRandom = ((index * 29) % 8) + 1;
771
- return {
772
- ...item,
773
- href: `#/category-${index}`,
774
- title: `Category #${index + 101}`,
775
- subtitle: `${pseudoRandom} photos`,
776
- };
777
- }),
778
- columns: 4,
779
- columnsMedium: 3,
780
- columnsSmall: 2,
781
- columnsTiny: 1,
782
- },
783
- })}
784
- <div class="tna-container">
785
- <div class="tna-column tna-column--full">
786
- ${Pagination({
787
- params: {
788
- landmarkLabel: "My dogs 1 results",
789
- previous: {
790
- href: "#",
791
- },
792
- items: [
793
- {
794
- number: 1,
795
- href: "#",
796
- },
797
- {
798
- ellipsis: true,
799
- },
800
- {
801
- number: 6,
802
- href: "#",
803
- },
804
- {
805
- number: 7,
806
- current: true,
807
- href: "#",
808
- },
809
- {
810
- number: 8,
811
- href: "#",
812
- },
813
- {
814
- ellipsis: true,
815
- },
816
- {
817
- number: 42,
818
- href: "#",
819
- },
820
- ],
821
- next: {
822
- href: "#",
823
- },
824
- classes: "tna-pagination--demo tna-!--margin-top-m",
825
- },
826
- })}
827
- ${SearchField({
828
- params: {
829
- label: "Catalogue search results",
830
- headingLevel: 3,
831
- headingSize: "l",
832
- id: "search1",
833
- name: "q",
834
- },
835
- })}
836
- <div class="tna-button-group">
837
- <a href="#" class="tna-button">Primary button</a>
838
- <a href="#" class="tna-button tna-button--accent">Accent button</a>
839
- <a href="" class="tna-button tna-button--solid-hover">Solid hover button</a>
840
- <a href="" class="tna-button tna-button--plain">Plain button</a>
841
- </div>
842
- </div>
843
- </div>
844
- </div>
845
- <div class="tna-section tna-background-tint">
846
- ${IndexGrid({
847
- params: {
848
- title: "My dogs 2",
849
- headingLevel: 3,
850
- href: "#",
851
- items: Array(4)
852
- .fill({
853
- ...{
854
- href: "#",
855
- src: "https://picsum.photos/id/237/800/600",
856
- alt: "Photo of a puppy",
857
- width: "800",
858
- height: "600",
859
- title: "Cat",
860
- subtitle: "4 photos",
861
- },
862
- })
863
- .map((item, index) => {
864
- const pseudoRandom = ((index * 29) % 8) + 1;
865
- return {
866
- ...item,
867
- href: `#/category-${index}`,
868
- title: `Category #${index + 101}`,
869
- subtitle: `${pseudoRandom} photos`,
870
- };
871
- }),
872
- columns: 4,
873
- columnsMedium: 3,
874
- columnsSmall: 2,
875
- columnsTiny: 1,
876
- },
877
- })}
878
- <div class="tna-container">
879
- <div class="tna-column tna-column--full">
880
- ${Pagination({
881
- params: {
882
- landmarkLabel: "My dogs 2 results",
883
- previous: {
884
- href: "#",
885
- },
886
- items: [
887
- {
888
- number: 1,
889
- href: "#",
890
- },
891
- {
892
- ellipsis: true,
893
- },
894
- {
895
- number: 6,
896
- href: "#",
897
- },
898
- {
899
- number: 7,
900
- current: true,
901
- href: "#",
902
- },
903
- {
904
- number: 8,
905
- href: "#",
906
- },
907
- {
908
- ellipsis: true,
909
- },
910
- {
911
- number: 42,
912
- href: "#",
913
- },
914
- ],
915
- next: {
916
- href: "#",
917
- },
918
- classes: "tna-pagination--demo tna-!--margin-top-m",
919
- },
920
- })}
921
- ${SearchField({
922
- params: {
923
- label: "Catalogue search results",
924
- headingLevel: 3,
925
- headingSize: "l",
926
- id: "search2",
927
- name: "q",
928
- },
929
- })}
930
- <div class="tna-button-group">
931
- <a href="#" class="tna-button">Primary button</a>
932
- <a href="#" class="tna-button tna-button--accent">Accent button</a>
933
- <a href="" class="tna-button tna-button--solid-hover">Solid hover button</a>
934
- <a href="" class="tna-button tna-button--plain">Plain button</a>
935
- </div>
936
- </div>
937
- </div>
938
- </div>
939
- <div class="tna-section tna-background-contrast">
940
- ${IndexGrid({
941
- params: {
942
- title: "My dogs 3",
943
- headingLevel: 3,
944
- href: "#",
945
- items: Array(4)
946
- .fill({
947
- ...{
948
- href: "#",
949
- src: "https://picsum.photos/id/237/800/600",
950
- alt: "Photo of a puppy",
951
- width: "800",
952
- height: "600",
953
- title: "Cat",
954
- subtitle: "4 photos",
955
- },
956
- })
957
- .map((item, index) => {
958
- const pseudoRandom = ((index * 29) % 8) + 1;
959
- return {
960
- ...item,
961
- href: `#/category-${index}`,
962
- title: `Category #${index + 101}`,
963
- subtitle: `${pseudoRandom} photos`,
964
- };
965
- }),
966
- columns: 4,
967
- columnsMedium: 3,
968
- columnsSmall: 2,
969
- columnsTiny: 1,
970
- },
971
- })}
972
- <div class="tna-container">
973
- <div class="tna-column tna-column--full">
974
- ${Pagination({
975
- params: {
976
- landmarkLabel: "My dogs 3 results",
977
- previous: {
978
- href: "#",
979
- },
980
- items: [
981
- {
982
- number: 1,
983
- href: "#",
984
- },
985
- {
986
- ellipsis: true,
987
- },
988
- {
989
- number: 6,
990
- href: "#",
991
- },
992
- {
993
- number: 7,
994
- current: true,
995
- href: "#",
996
- },
997
- {
998
- number: 8,
999
- href: "#",
1000
- },
1001
- {
1002
- ellipsis: true,
1003
- },
1004
- {
1005
- number: 42,
1006
- href: "#",
1007
- },
1008
- ],
1009
- next: {
1010
- href: "#",
1011
- },
1012
- classes: "tna-pagination--demo tna-!--margin-top-m",
1013
- },
1014
- })}
1015
- ${SearchField({
1016
- params: {
1017
- label: "Catalogue search results",
1018
- headingLevel: 3,
1019
- headingSize: "l",
1020
- id: "search3",
1021
- name: "q",
1022
- },
1023
- })}
1024
- <div class="tna-button-group">
1025
- <a href="#" class="tna-button">Primary button</a>
1026
- <a href="#" class="tna-button tna-button--accent">Accent button</a>
1027
- <a href="" class="tna-button tna-button--solid-hover">Solid hover button</a>
1028
- <a href="" class="tna-button tna-button--plain">Plain button</a>
1029
- </div>
1030
- </div>
1031
- </div>
1032
- </div>
1033
- <div class="tna-section tna-background-accent-light">
1034
- ${IndexGrid({
1035
- params: {
1036
- title: "My dogs 4",
1037
- headingLevel: 3,
1038
- href: "#",
1039
- items: Array(4)
1040
- .fill({
1041
- ...{
1042
- href: "#",
1043
- src: "https://picsum.photos/id/237/800/600",
1044
- alt: "Photo of a puppy",
1045
- width: "800",
1046
- height: "600",
1047
- title: "Cat",
1048
- subtitle: "4 photos",
1049
- },
1050
- })
1051
- .map((item, index) => {
1052
- const pseudoRandom = ((index * 29) % 8) + 1;
1053
- return {
1054
- ...item,
1055
- href: `#/category-${index}`,
1056
- title: `Category #${index + 101}`,
1057
- subtitle: `${pseudoRandom} photos`,
1058
- };
1059
- }),
1060
- columns: 4,
1061
- columnsMedium: 3,
1062
- columnsSmall: 2,
1063
- columnsTiny: 1,
1064
- },
1065
- })}
1066
- <div class="tna-container">
1067
- <div class="tna-column tna-column--full">
1068
- ${Pagination({
1069
- params: {
1070
- landmarkLabel: "My dogs 4 results",
1071
- previous: {
1072
- href: "#",
1073
- },
1074
- items: [
1075
- {
1076
- number: 1,
1077
- href: "#",
1078
- },
1079
- {
1080
- ellipsis: true,
1081
- },
1082
- {
1083
- number: 6,
1084
- href: "#",
1085
- },
1086
- {
1087
- number: 7,
1088
- current: true,
1089
- href: "#",
1090
- },
1091
- {
1092
- number: 8,
1093
- href: "#",
1094
- },
1095
- {
1096
- ellipsis: true,
1097
- },
1098
- {
1099
- number: 42,
1100
- href: "#",
1101
- },
1102
- ],
1103
- next: {
1104
- href: "#",
1105
- },
1106
- classes: "tna-pagination--demo tna-!--margin-top-m",
1107
- },
1108
- })}
1109
- ${SearchField({
1110
- params: {
1111
- label: "Catalogue search results",
1112
- headingLevel: 3,
1113
- headingSize: "l",
1114
- id: "search4",
1115
- name: "q",
1116
- },
1117
- })}
1118
- <div class="tna-button-group">
1119
- <a href="#" class="tna-button">Primary button</a>
1120
- <a href="#" class="tna-button tna-button--accent">Accent button</a>
1121
- <a href="" class="tna-button tna-button--solid-hover">Solid hover button</a>
1122
- <a href="" class="tna-button tna-button--plain">Plain button</a>
1123
- </div>
1124
- </div>
1125
- </div>
1126
- </div>
1127
- <div class="tna-section tna-background-accent">
1128
- ${IndexGrid({
1129
- params: {
1130
- title: "My dogs 5",
1131
- headingLevel: 3,
1132
- href: "#",
1133
- items: Array(4)
1134
- .fill({
1135
- ...{
1136
- href: "#",
1137
- src: "https://picsum.photos/id/237/800/600",
1138
- alt: "Photo of a puppy",
1139
- width: "800",
1140
- height: "600",
1141
- title: "Cat",
1142
- subtitle: "4 photos",
1143
- },
1144
- })
1145
- .map((item, index) => {
1146
- const pseudoRandom = ((index * 29) % 8) + 1;
1147
- return {
1148
- ...item,
1149
- href: `#/category-${index}`,
1150
- title: `Category #${index + 101}`,
1151
- subtitle: `${pseudoRandom} photos`,
1152
- };
1153
- }),
1154
- columns: 4,
1155
- columnsMedium: 3,
1156
- columnsSmall: 2,
1157
- columnsTiny: 1,
1158
- },
1159
- })}
1160
- <div class="tna-container">
1161
- <div class="tna-column tna-column--full">
1162
- ${Pagination({
1163
- params: {
1164
- landmarkLabel: "My dogs 5 results",
1165
- previous: {
1166
- href: "#",
1167
- },
1168
- items: [
1169
- {
1170
- number: 1,
1171
- href: "#",
1172
- },
1173
- {
1174
- ellipsis: true,
1175
- },
1176
- {
1177
- number: 6,
1178
- href: "#",
1179
- },
1180
- {
1181
- number: 7,
1182
- current: true,
1183
- href: "#",
1184
- },
1185
- {
1186
- number: 8,
1187
- href: "#",
1188
- },
1189
- {
1190
- ellipsis: true,
1191
- },
1192
- {
1193
- number: 42,
1194
- href: "#",
1195
- },
1196
- ],
1197
- next: {
1198
- href: "#",
1199
- },
1200
- classes: "tna-pagination--demo tna-!--margin-top-m",
1201
- },
1202
- })}
1203
- ${SearchField({
1204
- params: {
1205
- label: "Catalogue search results",
1206
- headingLevel: 3,
1207
- headingSize: "l",
1208
- id: "search5",
1209
- name: "q",
1210
- },
1211
- })}
1212
- <div class="tna-button-group">
1213
- <a href="#" class="tna-button">Primary button</a>
1214
- <a href="#" class="tna-button tna-button--accent">Accent button</a>
1215
- <a href="" class="tna-button tna-button--solid-hover">Solid hover button</a>
1216
- <a href="" class="tna-button tna-button--plain">Plain button</a>
1217
- </div>
1218
- </div>
1219
- </div>
1220
- </div>
1221
- <div class="tna-section">
1222
- <div class="tna-container">
1223
- <div class="tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny">
1224
- <form>
1225
- <h2 class="tna-heading tna-heading--l">
1226
- Forms
1227
- </h2>
1228
- ${ErrorSummary({
1229
- params: {
1230
- title: "There is a problem",
1231
- headingLevel: 2,
1232
- items: [
1233
- {
1234
- text: "Enter a valid email address",
1235
- href: "#email",
1236
- },
1237
- ],
1238
- disableAutoFocus: true,
1239
- },
1240
- })}
1241
- ${TextInput({
1242
- params: {
1243
- label: "Enter your name",
1244
- headingLevel: 3,
1245
- headingSize: "m",
1246
- id: "name",
1247
- name: "name",
1248
- autofill: "name",
1249
- },
1250
- })}
1251
- ${TextInput({
1252
- params: {
1253
- label: "Enter your email",
1254
- headingLevel: 3,
1255
- headingSize: "m",
1256
- id: "email",
1257
- name: "email",
1258
- autofill: "email",
1259
- error: {
1260
- text: "Enter a valid email address",
1261
- },
1262
- },
1263
- })}
1264
- ${Select({
1265
- params: {
1266
- label: "Sort by",
1267
- headingLevel: 3,
1268
- headingSize: "m",
1269
- id: "sort",
1270
- name: "sort",
1271
- items: [
1272
- {
1273
- text: "Relevance",
1274
- value: "relevance",
1275
- },
1276
- {
1277
- text: "Date",
1278
- value: "date",
1279
- },
1280
- {
1281
- text: "Title",
1282
- value: "title",
1283
- },
1284
- ],
1285
- },
1286
- })}
1287
- ${Radios({
1288
- params: {
1289
- label: "Type",
1290
- headingLevel: 3,
1291
- headingSize: "m",
1292
- id: "type",
1293
- name: "type",
1294
- items: [
1295
- {
1296
- text: "Audio",
1297
- value: "audio",
1298
- },
1299
- {
1300
- text: "Image",
1301
- value: "image",
1302
- },
1303
- {
1304
- text: "Video",
1305
- value: "video",
1306
- },
1307
- ],
1308
- },
1309
- })}
1310
- ${Checkboxes({
1311
- params: {
1312
- label: "Categories",
1313
- headingLevel: 3,
1314
- headingSize: "m",
1315
- id: "categories",
1316
- name: "categories",
1317
- items: [
1318
- {
1319
- text: "Alpha",
1320
- value: "alpha",
1321
- },
1322
- {
1323
- text: "Beta",
1324
- value: "beta",
1325
- },
1326
- {
1327
- text: "Gamma",
1328
- value: "gamma",
1329
- },
1330
- ],
1331
- },
1332
- })}
1333
- ${Textarea({
1334
- params: {
1335
- label: "Enter your feedback",
1336
- headingLevel: 3,
1337
- headingSize: "m",
1338
- id: "feedback",
1339
- name: "feedback",
1340
- },
1341
- })}
1342
- <div class="tna-button-group">
1343
- <button type="button" class="tna-button">
1344
- Submit
1345
- </button>
1346
- <a href="#" class="tna-button tna-button--plain">
1347
- Skip
1348
- </a>
1349
- </div>
1350
- </form>
1351
- </div>
1352
- </div>
1353
- </div>
1354
- </main>
1355
- ${Footer({
1356
- params: {
1357
- meta: "<p>Open today<br>09:00&ndash;19:00</p>",
1358
- social: [
1359
- {
1360
- href: "https://twitter.com/UKNatArchives",
1361
- icon: "twitter",
1362
- title: "The National Archives X feed (formally known as Twitter)",
1363
- },
1364
- {
1365
- href: "https://www.youtube.com/c/TheNationalArchivesUK",
1366
- icon: "youtube",
1367
- title: "The National Archives YouTube channel",
1368
- },
1369
- {
1370
- href: "https://www.facebook.com/TheNationalArchives",
1371
- icon: "facebook",
1372
- title: "The National Archives Facebook page",
1373
- },
1374
- {
1375
- href: "https://www.flickr.com/photos/nationalarchives",
1376
- icon: "flickr",
1377
- title: "The National Archives Flickr feed",
1378
- },
1379
- {
1380
- href: "https://www.instagram.com/nationalarchivesuk/",
1381
- icon: "instagram",
1382
- title: "The National Archives Instagram feed",
1383
- },
1384
- {
1385
- href: "https://www.tiktok.com/@uknatarchives",
1386
- icon: "tiktok",
1387
- title: "The National Archives TikTok feed",
1388
- },
1389
- ],
1390
- navigation: [
1391
- {
1392
- title: "Quick links",
1393
- items: [
1394
- {
1395
- text: "About us",
1396
- href: "https://www.nationalarchives.gov.uk/about/",
1397
- },
1398
- {
1399
- text: "Contact us",
1400
- href: "https://www.nationalarchives.gov.uk/contact-us/",
1401
- },
1402
- {
1403
- text: "News",
1404
- href: "https://www.nationalarchives.gov.uk/about/news/",
1405
- },
1406
- {
1407
- text: "Blog",
1408
- href: "https://blog.nationalarchives.gov.uk/",
1409
- },
1410
- {
1411
- text: "Podcasts",
1412
- href: "https://media.nationalarchives.gov.uk/index.php/category/podcasts-2/",
1413
- },
1414
- {
1415
- text: "Image library",
1416
- href: "https://images.nationalarchives.gov.uk/",
1417
- },
1418
- {
1419
- text: "Press room",
1420
- href: "https://www.nationalarchives.gov.uk/about/press-room/",
1421
- },
1422
- {
1423
- text: "Jobs",
1424
- href: "https://www.nationalarchives.gov.uk/about/jobs/",
1425
- },
1426
- {
1427
- text: "British citizenship services",
1428
- href: "https://www.nationalarchives.gov.uk/contact-us/british-citizenship-services/",
1429
- },
1430
- {
1431
- text: "Historical Manuscripts Commission",
1432
- href: "https://www.nationalarchives.gov.uk/archives-sector/our-archives-sector-role/historical-manuscripts-commission/",
1433
- },
1434
- ],
1435
- },
1436
- {
1437
- title: "Other websites",
1438
- items: [
1439
- {
1440
- text: "UK Government Web Archive",
1441
- href: "https://www.nationalarchives.gov.uk/webarchive/",
1442
- },
1443
- {
1444
- text: "Legislation.gov.uk",
1445
- href: "https://www.legislation.gov.uk/",
1446
- },
1447
- {
1448
- text: "Find case law",
1449
- href: "https://caselaw.nationalarchives.gov.uk/",
1450
- },
1451
- {
1452
- text: "The Gazette",
1453
- href: "https://www.thegazette.co.uk/",
1454
- },
1455
- {
1456
- text: "The National Archives Trust",
1457
- href: "https://www.nationalarchivestrust.org.uk/",
1458
- },
1459
- {
1460
- text: "Friends of The National Archives",
1461
- href: "https://ftna.org.uk/",
1462
- },
1463
- ],
1464
- },
1465
- ],
1466
- showNewsletter: true,
1467
- legal: [
1468
- {
1469
- text: "Accessibility statement",
1470
- href: "#/accessibility",
1471
- },
1472
- {
1473
- text: "Freedom of information",
1474
- href: "#/freedom-of-information",
1475
- },
1476
- {
1477
- text: "Terms and conditions",
1478
- href: "#/terms-and-conditions",
1479
- },
1480
- {
1481
- text: "Privacy policy",
1482
- href: "#/privacy",
1483
- },
1484
- {
1485
- text: "Cookies",
1486
- href: "#/cookies",
1487
- },
1488
- ],
1489
- },
1490
- })}
1491
- </div>
1492
- </div>`;
1493
- };
1494
-
1495
- export const System = Template.bind({});
1496
- System.parameters = {
1497
- chromatic: { disableSnapshot: true },
1498
- };
1499
- System.args = {
1500
- theme: "system",
1501
- accent: "pink",
1502
- };
1503
-
1504
- export const Light = Template.bind({});
1505
- Light.args = {
1506
- theme: "light",
1507
- accent: "pink",
1508
- };
1509
-
1510
- export const Dark = Template.bind({});
1511
- Dark.parameters = {
1512
- chromatic: { disableSnapshot: true },
1513
- };
1514
- Dark.args = {
1515
- theme: "dark",
1516
- accent: "pink",
1517
- };
1518
-
1519
- // export const LightHighContrast = Template.bind({});
1520
- // LightHighContrast.parameters = {
1521
- // chromatic: { disableSnapshot: true },
1522
- // };
1523
- // LightHighContrast.args = {
1524
- // theme: "light high-contrast",
1525
- // accent: "pink",
1526
- // };
1527
-
1528
- // export const DarkHighContrast = Template.bind({});
1529
- // DarkHighContrast.parameters = {
1530
- // chromatic: { disableSnapshot: true },
1531
- // };
1532
- // DarkHighContrast.args = {
1533
- // theme: "dark high-contrast",
1534
- // accent: "pink",
1535
- // };