@nationalarchives/frontend 0.1.23-prerelease → 0.1.24-prerelease

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/govuk-prototype-kit.config.json +1 -1
  2. package/nationalarchives/all.css +2 -2
  3. package/nationalarchives/all.css.map +1 -1
  4. package/nationalarchives/all.js +1 -1
  5. package/nationalarchives/all.js.map +1 -1
  6. package/nationalarchives/assets/fonts/OpenSans-Regular.ttf +0 -0
  7. package/nationalarchives/assets/fonts/RobotoMono-Medium.ttf +0 -0
  8. package/nationalarchives/components/_index.scss +1 -1
  9. package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
  10. package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
  11. package/nationalarchives/components/button/button.css +1 -1
  12. package/nationalarchives/components/button/button.css.map +1 -1
  13. package/nationalarchives/components/button/button.scss +4 -4
  14. package/nationalarchives/components/card/card.css +1 -1
  15. package/nationalarchives/components/card/card.css.map +1 -1
  16. package/nationalarchives/components/card/card.scss +3 -2
  17. package/nationalarchives/components/card/card.stories.js +21 -0
  18. package/nationalarchives/components/card/macro-options.json +6 -0
  19. package/nationalarchives/components/card/template.njk +1 -1
  20. package/nationalarchives/components/cookie-banner/cookie-banner.css +1 -1
  21. package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
  22. package/nationalarchives/components/cookie-banner/cookie-banner.scss +1 -1
  23. package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +3 -3
  24. package/nationalarchives/components/cookie-banner/fixtures.json +57 -1
  25. package/nationalarchives/components/cookie-banner/template.njk +3 -3
  26. package/nationalarchives/components/featured-records/_index.scss +1 -0
  27. package/nationalarchives/components/featured-records/featured-records.css +1 -0
  28. package/nationalarchives/components/featured-records/featured-records.css.map +1 -0
  29. package/nationalarchives/components/featured-records/featured-records.scss +95 -0
  30. package/nationalarchives/components/featured-records/featured-records.stories.js +51 -0
  31. package/nationalarchives/components/featured-records/fixtures.json +4 -0
  32. package/nationalarchives/components/featured-records/macro-options.json +70 -0
  33. package/nationalarchives/components/featured-records/macro.njk +3 -0
  34. package/nationalarchives/components/featured-records/template.njk +20 -0
  35. package/nationalarchives/components/filters/filters.css +1 -1
  36. package/nationalarchives/components/filters/filters.css.map +1 -1
  37. package/nationalarchives/components/footer/footer.css +1 -1
  38. package/nationalarchives/components/footer/footer.css.map +1 -1
  39. package/nationalarchives/components/footer/footer.scss +2 -5
  40. package/nationalarchives/components/footer/template.njk +1 -1
  41. package/nationalarchives/components/gallery/gallery.css +1 -1
  42. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  43. package/nationalarchives/components/gallery/gallery.scss +2 -2
  44. package/nationalarchives/components/grid/grid.css +1 -1
  45. package/nationalarchives/components/grid/grid.css.map +1 -1
  46. package/nationalarchives/components/header/header.css +1 -1
  47. package/nationalarchives/components/header/header.css.map +1 -1
  48. package/nationalarchives/components/header/header.scss +46 -8
  49. package/nationalarchives/components/header/header.stories.js +4 -6
  50. package/nationalarchives/components/header/macro-options.json +2 -2
  51. package/nationalarchives/components/header/template.njk +2 -2
  52. package/nationalarchives/components/hero/hero.css +1 -1
  53. package/nationalarchives/components/hero/hero.css.map +1 -1
  54. package/nationalarchives/components/hero/hero.scss +4 -4
  55. package/nationalarchives/components/index-grid/index-grid.css +1 -1
  56. package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
  57. package/nationalarchives/components/index-grid/index-grid.scss +1 -1
  58. package/nationalarchives/components/message/message.css +1 -1
  59. package/nationalarchives/components/message/message.css.map +1 -1
  60. package/nationalarchives/components/pagination/pagination.css +1 -1
  61. package/nationalarchives/components/pagination/pagination.css.map +1 -1
  62. package/nationalarchives/components/pagination/pagination.scss +1 -1
  63. package/nationalarchives/components/pagination/pagination.stories.js +354 -0
  64. package/nationalarchives/components/pagination/template.njk +1 -1
  65. package/nationalarchives/components/phase-banner/fixtures.json +5 -41
  66. package/nationalarchives/components/phase-banner/macro-options.json +6 -0
  67. package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
  68. package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
  69. package/nationalarchives/components/phase-banner/phase-banner.scss +1 -1
  70. package/nationalarchives/components/phase-banner/phase-banner.stories.js +4 -28
  71. package/nationalarchives/components/phase-banner/template.njk +3 -1
  72. package/nationalarchives/components/picture/picture.css +1 -1
  73. package/nationalarchives/components/picture/picture.css.map +1 -1
  74. package/nationalarchives/components/picture/picture.scss +5 -4
  75. package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -1
  76. package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -1
  77. package/nationalarchives/components/skip-link/skip-link.css +1 -1
  78. package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
  79. package/nationalarchives/components/tabs/tabs.css +1 -1
  80. package/nationalarchives/components/tabs/tabs.css.map +1 -1
  81. package/nationalarchives/components/tabs/tabs.js +1 -1
  82. package/nationalarchives/components/tabs/tabs.js.map +1 -1
  83. package/nationalarchives/components/tabs/tabs.mjs +0 -4
  84. package/nationalarchives/prototype-kit.css +23 -0
  85. package/nationalarchives/prototype-kit.css.map +1 -0
  86. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +38 -11
  87. package/nationalarchives/stories/utilities/lists/lists.mdx +18 -0
  88. package/nationalarchives/stories/utilities/{typography → lists}/lists.stories.js +1 -1
  89. package/nationalarchives/stories/utilities/overrides/overrides.mdx +27 -20
  90. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +18 -2
  91. package/nationalarchives/stories/utilities/typography/typography.mdx +3 -25
  92. package/nationalarchives/stories/utilities/typography/typography.stories.js +28 -2
  93. package/nationalarchives/templates/layouts/_generic.njk +1 -0
  94. package/nationalarchives/templates/layouts/_prototype-kit.njk +2 -1
  95. package/nationalarchives/tools/_colour.scss +13 -20
  96. package/nationalarchives/tools/_spacing.scss +91 -2
  97. package/nationalarchives/tools/_typography.scss +15 -8
  98. package/nationalarchives/utilities/_a11y.scss +2 -1
  99. package/nationalarchives/utilities/_colour.scss +100 -0
  100. package/nationalarchives/utilities/_global.scss +2 -98
  101. package/nationalarchives/utilities/_index.scss +1 -0
  102. package/nationalarchives/utilities/_overrides.scss +16 -36
  103. package/nationalarchives/utilities/_typography.scss +145 -51
  104. package/nationalarchives/variables/_colour.scss +9 -8
  105. package/nationalarchives/variables/_spacing.scss +14 -9
  106. package/nationalarchives/variables/_typography.scss +10 -7
  107. package/package.json +9 -9
  108. package/nationalarchives/assets/fonts/OpenSans-Medium.ttf +0 -0
  109. package/nationalarchives/assets/fonts/fa-regular-400.ttf +0 -0
  110. package/nationalarchives/assets/fonts/fa-regular-400.woff2 +0 -0
  111. package/nationalarchives/components/profile/_index.scss +0 -1
  112. package/nationalarchives/components/profile/fixtures.json +0 -4
  113. package/nationalarchives/components/profile/macro-options.json +0 -14
  114. package/nationalarchives/components/profile/macro.njk +0 -3
  115. package/nationalarchives/components/profile/profile.css +0 -1
  116. package/nationalarchives/components/profile/profile.css.map +0 -1
  117. package/nationalarchives/components/profile/profile.scss +0 -5
  118. package/nationalarchives/components/profile/profile.stories.js +0 -31
  119. package/nationalarchives/components/profile/template.njk +0 -15
  120. package/nationalarchives/lib/font-awesome/regular.css +0 -5
  121. package/nationalarchives/lib/font-awesome/regular.css.map +0 -1
  122. package/nationalarchives/lib/font-awesome/regular.scss +0 -28
  123. package/nationalarchives/stories/development/about.mdx +0 -122
  124. package/nationalarchives/stories/development/contributing.mdx +0 -32
  125. package/nationalarchives/stories/development/cookies.mdx +0 -82
  126. package/nationalarchives/stories/development/publishing.mdx +0 -15
  127. package/nationalarchives/stories/development/structure.mdx +0 -88
  128. package/nationalarchives/stories/development/using/compiled.mdx +0 -9
  129. package/nationalarchives/stories/development/using/hosted.mdx +0 -53
  130. package/nationalarchives/stories/development/using/npm.mdx +0 -59
  131. /package/nationalarchives/{_prototype-kit.scss → prototype-kit.scss} +0 -0
@@ -2,6 +2,7 @@ import SkipLink from "../../../components/skip-link/template.njk";
2
2
  import Breadcrumbs from "../../../components/breadcrumbs/template.njk";
3
3
  import Button from "../../../components/button/template.njk";
4
4
  import Card from "../../../components/card/template.njk";
5
+ import FeaturedRecords from "../../../components/featured-records/template.njk";
5
6
  import Footer from "../../../components/footer/template.njk";
6
7
  import CookieBanner from "../../../components/cookie-banner/template.njk";
7
8
  import Gallery from "../../../components/gallery/template.njk";
@@ -27,7 +28,7 @@ const argTypes = {
27
28
  },
28
29
  accent: {
29
30
  control: "radio",
30
- options: ["none", /*"black",*/ "yellow", "pink", "orange", "green", "blue"],
31
+ options: ["none", "black", "yellow", "pink", "orange", "green", "blue"],
31
32
  },
32
33
  };
33
34
 
@@ -104,7 +105,7 @@ const Template = ({ theme, accent }) => {
104
105
  phase: "beta",
105
106
  message:
106
107
  'This is a new service - <a href="#">give us your feedback</a> to help improve it.',
107
- classes: "tna-phase-banner--accent",
108
+ accent: true,
108
109
  },
109
110
  })}
110
111
  ${Header({
@@ -235,8 +236,8 @@ const Template = ({ theme, accent }) => {
235
236
  </div>
236
237
  <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">
237
238
  <div class="tna-container tna-container--no-padding">
238
- <div class="tna-column tna-column--full tna-column--width-1-2-medium tna-column--width-1-2-small tna-!--margin-top-l-medium tna-!--margin-top-l-small tna-!--margin-top-l-tiny">
239
- <div class="tna-aside tna-background--contrast">
239
+ <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">
240
+ <div class="tna-aside tna-background-contrast">
240
241
  <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>
241
242
  <div class="tna-button-group">
242
243
  ${Button({
@@ -249,8 +250,8 @@ const Template = ({ theme, accent }) => {
249
250
  </div>
250
251
  </div>
251
252
  </div>
252
- <div class="tna-column tna-column--full tna-column--width-1-2-medium tna-column--width-1-2-small tna-!--margin-top-m tna-!--margin-top-l-medium tna-!--margin-top-l-small tna-!--margin-top-l-tiny">
253
- <div class="tna-aside tna-background--accent">
253
+ <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">
254
+ <div class="tna-aside tna-background-accent">
254
255
  <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>
255
256
  <div class="tna-button-group">
256
257
  ${Button({
@@ -316,13 +317,13 @@ const Template = ({ theme, accent }) => {
316
317
  <p class="tna-blockquote__author">Douglas Adams, Mostly Harmless</p>
317
318
  </blockquote>
318
319
  <h2 class="tna-heading-m">
319
- <a href="#">Reaerching with The National Archives</a>
320
+ <a href="#">Researching with The National Archives</a>
320
321
  </h2>
321
322
  <p>Lorem ipsum <a href="#">link</a></p>
322
323
  <hgroup class="tna-hgroup-m">
323
324
  <p class="tna-hgroup__supertitle">Supertitle</p>
324
325
  <h2 class="tna-hgroup__title">
325
- <a href="#">Reaerching with The National Archives</a>
326
+ <a href="#">Researching with The National Archives</a>
326
327
  </h2>
327
328
  </hgroup>
328
329
  <p>Lorem ipsum <a href="#">link</a></p>
@@ -394,6 +395,32 @@ const Template = ({ theme, accent }) => {
394
395
  "Please note this page references hunger strikes and force feeding, which some people may find upsetting.",
395
396
  },
396
397
  })}
398
+ <h2 class="tna-heading-l">
399
+ Featured records
400
+ </h2>
401
+ ${FeaturedRecords({
402
+ params: {
403
+ items: [
404
+ {
405
+ imageSrc:
406
+ "https://beta.nationalarchives.gov.uk/media/images/wedderburn-trial.max-832x591.format-webp_i3c9pUH.webp",
407
+ imageWidth: 576,
408
+ imageHeight: 591,
409
+ collection: "TS 11/45/167",
410
+ title: "Court records relating to Robert Wedderburn's trial",
411
+ href: "#",
412
+ date: "1819–1820",
413
+ },
414
+ {
415
+ collection: "HO 42/191",
416
+ title: "Home office letters",
417
+ href: "#",
418
+ date: "1819",
419
+ },
420
+ ],
421
+ classes: "tna-featured-records--demo",
422
+ },
423
+ })}
397
424
  </div>
398
425
  </div>
399
426
  <hr>
@@ -663,7 +690,7 @@ const Template = ({ theme, accent }) => {
663
690
  </div>
664
691
  </div>
665
692
  </div>
666
- <div class="tna-section tna-background--contrast">
693
+ <div class="tna-section tna-background-contrast">
667
694
  ${IndexGrid({
668
695
  params: {
669
696
  heading: { title: "My dogs 2", level: 3, href: "#" },
@@ -745,7 +772,7 @@ const Template = ({ theme, accent }) => {
745
772
  </div>
746
773
  </div>
747
774
  </div>
748
- <div class="tna-section tna-background--accent-light">
775
+ <div class="tna-section tna-background-accent-light">
749
776
  ${IndexGrid({
750
777
  params: {
751
778
  heading: { title: "My dogs 3", level: 3, href: "#" },
@@ -827,7 +854,7 @@ const Template = ({ theme, accent }) => {
827
854
  </div>
828
855
  </div>
829
856
  </div>
830
- <div class="tna-section tna-background--accent">
857
+ <div class="tna-section tna-background-accent">
831
858
  ${IndexGrid({
832
859
  params: {
833
860
  heading: { title: "My dogs 4", level: 3, href: "#" },
@@ -0,0 +1,18 @@
1
+ import { Meta, Canvas } from "@storybook/blocks";
2
+ import * as ListStories from './lists.stories';
3
+
4
+ <Meta of={ListStories} />
5
+
6
+ # Lists
7
+
8
+ <Canvas of={ListStories.UnorderedList} />
9
+ <Canvas of={ListStories.OrderedList} />
10
+ <Canvas of={ListStories.DescriptionList} />
11
+ <Canvas of={ListStories.DescriptionListWithIcons} />
12
+
13
+ ## Plain versions
14
+
15
+ <Canvas of={ListStories.UnorderedListPlain} />
16
+ <Canvas of={ListStories.OrderedListPlain} />
17
+ <Canvas of={ListStories.PlainDescriptionList} />
18
+ <Canvas of={ListStories.PlainDescriptionListWithIcons} />
@@ -4,7 +4,7 @@ const argTypes = {
4
4
  };
5
5
 
6
6
  export default {
7
- title: "Utilities/Typography",
7
+ title: "Utilities/Lists",
8
8
  argTypes,
9
9
  };
10
10
 
@@ -5,42 +5,49 @@ import * as OverrideStories from './overrides.stories';
5
5
 
6
6
  # Overrides
7
7
 
8
- ## Properties
8
+ ## Options
9
9
 
10
- Property options: `margin`, `padding`
10
+ `property`:
11
11
 
12
- ```css
13
- tna-!--no-[property]-[direction]
14
- ```
12
+ - `margin`
13
+ - `padding`
15
14
 
16
- ### No margin/padding
17
-
18
- Direction options:
15
+ `direction`:
19
16
 
20
17
  - `top`
21
18
  - `bottom`
22
19
  - `vertical` - `top` and `bottom`
23
20
 
24
- ```css
21
+ ## Removing space
22
+
23
+ ```
24
+ // For all devices
25
25
  tna-!--no-[property]-[direction]
26
26
  ```
27
27
 
28
- ### Sizes
28
+ `device` options (optional):
29
29
 
30
- Size options: `xs`, `s`, `m`, `l`, `xl`, `xxl`
30
+ - `large`
31
+ - `medium`
32
+ - `small`
33
+ - `tiny`
31
34
 
32
- ```css
33
- tna-!--[property]-[direction]-[size]
34
35
  ```
35
-
36
- ### Responsive
37
-
38
- Device options: `medium`, `small`, `tiny`
39
-
40
- ```css
36
+ // For a specific device size
41
37
  tna-!--no-[property]-[direction]-[device]
42
- tna-!--[property]-[direction]-[size]-[device]
43
38
  ```
44
39
 
40
+ ## Adding space
45
41
 
42
+ `size` options:
46
43
 
44
+ - `xs`
45
+ - `s`
46
+ - `m`
47
+ - `l`
48
+ - `xl`
49
+ - `xxl`
50
+
51
+ ```css
52
+ tna-!--[property]-[direction]-[size]
53
+ ```
@@ -1,3 +1,5 @@
1
+ import { customViewports } from "../../../../../.storybook/viewports";
2
+
1
3
  const argTypes = {};
2
4
 
3
5
  export default {
@@ -6,14 +8,28 @@ export default {
6
8
  };
7
9
 
8
10
  const Template = () => {
9
- return `<p>Lorem ipsum</p>
11
+ return `<div class="tna-spacing-demo">
12
+ <p>Lorem ipsum</p>
10
13
  <p class="tna-!--no-margin-top">Lorem ipsum (tna-!--no-margin-top)</p>
11
14
  <p class="tna-!--margin-top-xs">Lorem ipsum (tna-!--margin-top-xs)</p>
12
15
  <p class="tna-!--margin-top-s">Lorem ipsum (tna-!--margin-top-s)</p>
13
16
  <p class="tna-!--margin-top-m">Lorem ipsum (tna-!--margin-top-m)</p>
14
17
  <p class="tna-!--margin-top-l">Lorem ipsum (tna-!--margin-top-l)</p>
15
- <p class="tna-!--margin-top-xl">Lorem ipsum (tna-!--margin-top-xl)</p>`;
18
+ <p class="tna-!--margin-top-xl">Lorem ipsum (tna-!--margin-top-xl)</p>
19
+ <p class="tna-!--margin-top-xxl">Lorem ipsum (tna-!--margin-top-xxl)</p>
20
+ </div>`;
16
21
  };
17
22
 
18
23
  export const Margin = Template.bind({});
19
24
  Margin.args = {};
25
+
26
+ export const MarginMobile = Template.bind({});
27
+ MarginMobile.parameters = {
28
+ viewport: {
29
+ defaultViewport: "small",
30
+ },
31
+ chromatic: {
32
+ viewports: [customViewports["small"].styles.width.replace(/px$/, "")],
33
+ },
34
+ };
35
+ MarginMobile.args = {};
@@ -2,14 +2,11 @@ import { Meta, Canvas } from "@storybook/blocks";
2
2
  import * as HeadingStories from './headings.stories';
3
3
  import * as HeadingGroupStories from './heading-groups.stories';
4
4
  import * as TypographyStories from './typography.stories';
5
- import * as ListStories from './lists.stories';
6
5
 
7
6
  <Meta of={TypographyStories} />
8
7
 
9
8
  # Typography
10
9
 
11
- We use a set of typefaces...
12
-
13
10
  ## Headings
14
11
 
15
12
  <Canvas of={HeadingStories.Headings} />
@@ -17,32 +14,13 @@ We use a set of typefaces...
17
14
 
18
15
  ## Heading groups
19
16
 
20
- Although visually identical, there are two types of header groups based on whether the group should be read as a single sentence or not.
21
-
22
- In the first example, the heading will be read by screen readers as `The story of Alice Hawkins.`
23
-
24
17
  <Canvas of={HeadingGroupStories.HeadingGroup} />
25
-
26
- In the second example, the heading will be read as two separate sentences; `Record revealed. The Monteagle Letter.`
27
-
28
18
  <Canvas of={HeadingGroupStories.HeadingGroupSeparated} />
29
19
 
30
20
  ## General typography
31
21
 
32
22
  <Canvas of={TypographyStories.Paragraph} />
33
- <Canvas of={TypographyStories.Blockquote} />
23
+ <Canvas of={TypographyStories.LargeParagraph} />
34
24
  <Canvas of={TypographyStories.SceneSetter} />
35
-
36
- ## Lists
37
-
38
- <Canvas of={ListStories.UnorderedList} />
39
- <Canvas of={ListStories.OrderedList} />
40
- <Canvas of={ListStories.DescriptionList} />
41
- <Canvas of={ListStories.DescriptionListWithIcons} />
42
-
43
- ### Plain versions
44
-
45
- <Canvas of={ListStories.UnorderedListPlain} />
46
- <Canvas of={ListStories.OrderedListPlain} />
47
- <Canvas of={ListStories.PlainDescriptionList} />
48
- <Canvas of={ListStories.PlainDescriptionListWithIcons} />
25
+ <Canvas of={TypographyStories.SceneSetterSmall} />
26
+ <Canvas of={TypographyStories.Blockquote} />
@@ -18,17 +18,28 @@ Paragraph.args = {
18
18
  ],
19
19
  };
20
20
 
21
+ const LargeParagraphTemplate = ({ paragraphs }) =>
22
+ paragraphs
23
+ .map((paragraph) => `<p class="tna-large-paragraph">${paragraph}</p>`)
24
+ .join("");
25
+ export const LargeParagraph = LargeParagraphTemplate.bind({});
26
+ LargeParagraph.args = {
27
+ paragraphs: [
28
+ "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. 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. Donec dapibus est arcu, vel pellentesque risus pellentesque eget.",
29
+ ],
30
+ };
31
+
21
32
  const HeadingLinkTemplate = ({ text, href }) =>
22
33
  `<h2 class="tna-heading-s">
23
34
  <a href="${href}">${text}</a>
24
35
  </h2>`;
25
36
  export const HeadingLink = HeadingLinkTemplate.bind({});
26
37
  HeadingLink.args = {
27
- text: "Reaerching with The National Archives",
38
+ text: "Researching with The National Archives",
28
39
  href: "#",
29
40
  };
30
41
 
31
- const SceneSetterTemplate = ({ text, href }) =>
42
+ const SceneSetterTemplate = ({ text }) =>
32
43
  `<p class="tna-scene-setter">
33
44
  ${text}
34
45
  </p>`;
@@ -37,6 +48,21 @@ SceneSetter.args = {
37
48
  text: `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>.`,
38
49
  };
39
50
 
51
+ const SceneSetterSmallTemplate = ({ text }) =>
52
+ `<p class="tna-scene-setter tna-scene-setter--small">
53
+ ${text}
54
+ </p>`;
55
+ export const SceneSetterSmall = SceneSetterSmallTemplate.bind({});
56
+ SceneSetterSmall.args = {
57
+ text: `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>.`,
58
+ };
59
+
60
+ // const TextDetailsTemplate = () =>
61
+ // `<p>
62
+ // Typed slip with photographs - 'The <span class="tna-detail" title="Italian (miscellaneous)" data-type="misc">Italian</span> Steamer <span class="tna-detail" title="Aida Lauro (person)" data-type="per">Aida Lauro</span> which ran on the rocks near <span class="tna-detail" title="Cape Cornwall (location)" data-type="loc">Cape Cornwall</span> a few days ago is now a total wreck. After a severe buffeting by heavy seas the ship has broken in two. The photograph shows the <span class="tna-detail" title="Aida Lauro (person)" data-type="per">Aida Lauro</span> broken in two by a severe buffeting from the seas near <a href="#" class="tna-detail" title="Cape Cornwall (location)" data-type="loc">Cape Cornwall</a>.
63
+ // </p>`;
64
+ // export const TextDetails = TextDetailsTemplate.bind({});
65
+
40
66
  const BlockquoteTemplate = ({
41
67
  html,
42
68
  author,
@@ -25,6 +25,7 @@
25
25
 
26
26
  {% block stylesheets %}
27
27
  <link rel="stylesheet" type="text/css" href="{{ tnaFrontendCssPath | default('/static/tna-frontend') }}/all.css">
28
+ <link rel="stylesheet" type="text/css" href="https://use.typekit.net/hkj3kuz.css">
28
29
  {% endblock %}
29
30
  </head>
30
31
  <body class="tna-template__body {{ bodyClasses }}" {%- for attribute, value in bodyAttributes %} {{attribute}}="{{value}}"{% endfor %}>
@@ -1,7 +1,8 @@
1
1
  {% extends "./_generic.njk" %}
2
2
 
3
3
  {% block stylesheets %}
4
- {% include "govuk-prototype-kit/includes/stylesheets-plugins.njk" %}
4
+ {% include "govuk-prototype-kit/includes/stylesheets-plugins.njk" %}
5
+ <link rel="stylesheet" type="text/css" href="https://use.typekit.net/hkj3kuz.css">
5
6
  {% endblock %}
6
7
 
7
8
  {% block bodyEnd %}
@@ -53,14 +53,7 @@
53
53
  --accent-link-visited: #{brand-colour("white")} !important;
54
54
  --accent-keyline: #{brand-colour("white", 0.5)} !important;
55
55
  --accent-keyline-dark: #{brand-colour("white", 0.8)} !important;
56
-
57
- @if $colour == "black" {
58
- // --accent: #{brand-colour("light-grey")} !important;
59
- // --accent-background: #{brand-colour("black")} !important;
60
- // --accent-background-light: #{brand-colour("light-grey")} !important;
61
- // --button-accent-text: #{brand-colour("black")} !important;
62
- // --button-accent-background: #{brand-colour("grey")} !important;
63
- } @else {
56
+ @if $colour != "black" {
64
57
  --button-accent-text: #{brand-colour("white")} !important;
65
58
  @if $colour == "pink" {
66
59
  --accent: #{brand-colour("pink")} !important;
@@ -204,7 +197,7 @@
204
197
  @extend %plain;
205
198
  }
206
199
 
207
- %invert {
200
+ %contrast {
208
201
  --background: var(--contrast-background);
209
202
  --font-base: var(--contrast-font-base);
210
203
  --font-dark: var(--contrast-font-dark);
@@ -224,11 +217,11 @@
224
217
  @include colour-font("font-base", false, colour.$colour-palette-dark);
225
218
  }
226
219
 
227
- @mixin invert {
228
- @extend %invert;
220
+ @mixin contrast {
221
+ @extend %contrast;
229
222
  }
230
223
 
231
- %invert-on-mobile {
224
+ %contrast-on-mobile {
232
225
  @include media.on-mobile {
233
226
  --background: var(--contrast-background);
234
227
  --font-base: var(--contrast-font-base);
@@ -250,8 +243,8 @@
250
243
  }
251
244
  }
252
245
 
253
- @mixin invert-on-mobile {
254
- @extend %invert-on-mobile;
246
+ @mixin contrast-on-mobile {
247
+ @extend %contrast-on-mobile;
255
248
  }
256
249
 
257
250
  %accent {
@@ -274,12 +267,12 @@
274
267
  @extend %accent;
275
268
  }
276
269
 
277
- %tint-background {
270
+ %tint {
278
271
  @include colour-background("background-tint");
279
272
  }
280
273
 
281
- @mixin tint-background {
282
- @extend %tint-background;
274
+ @mixin tint {
275
+ @extend %tint;
283
276
  }
284
277
 
285
278
  %accent-background {
@@ -290,7 +283,7 @@
290
283
  @extend %accent-background;
291
284
  }
292
285
 
293
- %light-accent-background {
286
+ %accent-light {
294
287
  --background: var(--accent-background-light);
295
288
  --font-base: #{map.get(colour.$colour-palette-default, "font-base")};
296
289
  --font-dark: #{map.get(colour.$colour-palette-default, "font-dark")};
@@ -316,8 +309,8 @@
316
309
  @include colour-background("background");
317
310
  }
318
311
 
319
- @mixin light-accent-background {
320
- @extend %light-accent-background;
312
+ @mixin accent-light {
313
+ @extend %accent-light;
321
314
  }
322
315
 
323
316
  @mixin on-high-contrast {
@@ -1,5 +1,6 @@
1
1
  @use "sass:map";
2
2
  @use "../variables/spacing";
3
+ @use "../tools/media";
3
4
 
4
5
  %space-above {
5
6
  margin-top: 2rem;
@@ -13,10 +14,98 @@
13
14
  @extend %space-above;
14
15
  }
15
16
 
16
- @function spacing($size) {
17
+ @function space($size) {
17
18
  @return map.get(spacing.$spacing, $size);
18
19
  }
19
20
 
20
- @function spacing-mobile($size) {
21
+ @function space-mobile($size) {
21
22
  @return map.get(spacing.$spacing-mobile, $size);
22
23
  }
24
+
25
+ @mixin no-spacing-generator($suffix: "") {
26
+ @if $suffix != "" {
27
+ $suffix: "-" + $suffix;
28
+ }
29
+ @each $property in margin, padding {
30
+ @each $direction in top, bottom {
31
+ $combined-direction: "";
32
+ @if $direction == top or $direction == bottom {
33
+ $combined-direction: vertical;
34
+ } @else if $direction == right or $direction == left {
35
+ $combined-direction: horizontal;
36
+ }
37
+ @if $combined-direction {
38
+ .tna-\!--no-#{$property}-#{$direction}#{$suffix},
39
+ .tna-\!--no-#{$property}-#{$combined-direction}#{$suffix} {
40
+ #{$property}-#{$direction}: 0 !important;
41
+ }
42
+ } @else {
43
+ .tna-\!--no-#{$property}-#{$direction}#{$suffix} {
44
+ #{$property}-#{$direction}: 0 !important;
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+
51
+ @mixin spacing-generator($suffix: "") {
52
+ @each $property in margin, padding {
53
+ @each $direction in top, bottom {
54
+ @each $size, $amount in spacing.$spacing {
55
+ @if $direction == all {
56
+ .tna-\!--#{$property}-#{$size} {
57
+ #{$property}: #{$amount} !important;
58
+ }
59
+ } @else {
60
+ $combined-direction: "";
61
+ @if $direction == top or $direction == bottom {
62
+ $combined-direction: vertical;
63
+ } @else if $direction == right or $direction == left {
64
+ $combined-direction: horizontal;
65
+ }
66
+ @if $combined-direction {
67
+ .tna-\!--#{$property}-#{$direction}-#{$size},
68
+ .tna-\!--#{$property}-#{$combined-direction}-#{$size} {
69
+ #{$property}-#{$direction}: #{$amount} !important;
70
+ }
71
+ } @else {
72
+ .tna-\!--#{$property}-#{$direction}-#{$size} {
73
+ #{$property}-#{$direction}: #{$amount} !important;
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+
81
+ @include media.on-mobile {
82
+ @each $property in margin, padding {
83
+ @each $direction in top, bottom {
84
+ @each $size, $amount in spacing.$spacing-mobile {
85
+ @if $direction == all {
86
+ .tna-\!--#{$property}-#{$size} {
87
+ #{$property}: #{$amount} !important;
88
+ }
89
+ } @else {
90
+ $combined-direction: "";
91
+ @if $direction == top or $direction == bottom {
92
+ $combined-direction: vertical;
93
+ } @else if $direction == right or $direction == left {
94
+ $combined-direction: horizontal;
95
+ }
96
+ @if $combined-direction {
97
+ .tna-\!--#{$property}-#{$direction}-#{$size},
98
+ .tna-\!--#{$property}-#{$combined-direction}-#{$size} {
99
+ #{$property}-#{$direction}: #{$amount} !important;
100
+ }
101
+ } @else {
102
+ .tna-\!--#{$property}-#{$direction}-#{$size} {
103
+ #{$property}-#{$direction}: #{$amount} !important;
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }
@@ -12,30 +12,37 @@
12
12
  }
13
13
 
14
14
  @mixin main-font-weight {
15
- font-weight: typography.$font-weight-main;
15
+ font-weight: typography.$main-font-weight;
16
16
  }
17
17
 
18
18
  @mixin main-font-weight-bold {
19
- font-weight: typography.$font-weight-main-bold;
19
+ font-weight: typography.$main-font-weight-bold;
20
20
  }
21
21
 
22
22
  @mixin main-font {
23
- font-family: typography.$font-family-main;
23
+ font-family: typography.$main-font-family;
24
24
  @include main-font-weight;
25
25
  }
26
26
 
27
27
  @mixin heading-font {
28
- font-family: typography.$font-family-heading;
29
- font-weight: typography.$font-weight-heading;
28
+ font-family: typography.$heading-font-family;
29
+ font-weight: typography.$heading-font-weight;
30
+ }
31
+
32
+ @mixin detail-font-weight {
33
+ font-weight: typography.$detail-font-weight;
34
+ }
35
+
36
+ @mixin detail-font-weight-bold {
37
+ font-weight: typography.$detail-font-weight-bold;
30
38
  }
31
39
 
32
40
  @mixin detail-font {
33
- font-family: typography.$font-family-detail;
34
- font-weight: typography.$font-weight-detail;
41
+ font-family: typography.$detail-font-family;
42
+ @include detail-font-weight;
35
43
  }
36
44
 
37
45
  @mixin detail-font-small {
38
- @include colour.colour-font("font-dark");
39
46
  @include detail-font;
40
47
  @include relative-font-size(14);
41
48
  text-transform: uppercase;
@@ -1,6 +1,7 @@
1
1
  @use "../tools/colour";
2
2
 
3
- .tna-visually-hidden {
3
+ .tna-visually-hidden,
4
+ .tna-\!--visually-hidden {
4
5
  width: 1px !important;
5
6
  height: 1px !important;
6
7
  margin: 0 !important;