@nationalarchives/frontend 0.1.20-prerelease → 0.1.22-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 (162) hide show
  1. package/README.md +1 -1
  2. package/govuk-prototype-kit.config.json +7 -2
  3. package/nationalarchives/_prototype-kit.scss +16 -0
  4. package/nationalarchives/all.css +3 -3
  5. package/nationalarchives/all.css.map +1 -1
  6. package/nationalarchives/all.js +1 -1
  7. package/nationalarchives/all.js.map +1 -1
  8. package/nationalarchives/all.mjs +17 -10
  9. package/nationalarchives/all.scss +1 -5
  10. package/nationalarchives/assets/images/favicon.ico +0 -0
  11. package/nationalarchives/assets/images/mask-icon.svg +17 -5
  12. package/nationalarchives/assets/images/mstile-150x150.png +0 -0
  13. package/nationalarchives/components/_index.scss +1 -0
  14. package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
  15. package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
  16. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
  17. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
  18. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +5 -15
  19. package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +12 -4
  20. package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +64 -0
  21. package/nationalarchives/components/breadcrumbs/fixtures.json +2 -2
  22. package/nationalarchives/components/breadcrumbs/template.njk +11 -15
  23. package/nationalarchives/components/button/_button-group.scss +1 -1
  24. package/nationalarchives/components/button/button.css +1 -13
  25. package/nationalarchives/components/button/button.css.map +1 -1
  26. package/nationalarchives/components/button/button.scss +24 -6
  27. package/nationalarchives/components/card/card.css +1 -13
  28. package/nationalarchives/components/card/card.css.map +1 -1
  29. package/nationalarchives/components/card/card.scss +52 -7
  30. package/nationalarchives/components/card/card.stories.js +78 -36
  31. package/nationalarchives/components/card/fixtures.json +40 -16
  32. package/nationalarchives/components/card/macro-options.json +26 -0
  33. package/nationalarchives/components/card/template.njk +38 -26
  34. package/nationalarchives/components/cookie-banner/cookie-banner.css +1 -13
  35. package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
  36. package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
  37. package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
  38. package/nationalarchives/components/cookie-banner/cookie-banner.mjs +15 -7
  39. package/nationalarchives/components/cookie-banner/cookie-banner.scss +9 -1
  40. package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +23 -10
  41. package/nationalarchives/components/cookie-banner/macro-options.json +1 -1
  42. package/nationalarchives/components/cookie-banner/template.njk +4 -4
  43. package/nationalarchives/components/filters/filters.css +1 -1
  44. package/nationalarchives/components/filters/filters.css.map +1 -1
  45. package/nationalarchives/components/filters/filters.scss +2 -2
  46. package/nationalarchives/components/footer/fixtures.json +1 -1
  47. package/nationalarchives/components/footer/footer.css +1 -13
  48. package/nationalarchives/components/footer/footer.css.map +1 -1
  49. package/nationalarchives/components/footer/footer.scss +8 -55
  50. package/nationalarchives/components/footer/footer.stories.js +1 -1
  51. package/nationalarchives/components/footer/template.njk +16 -14
  52. package/nationalarchives/components/gallery/gallery.css +1 -13
  53. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  54. package/nationalarchives/components/gallery/template.njk +2 -2
  55. package/nationalarchives/components/grid/grid.css +1 -1
  56. package/nationalarchives/components/grid/grid.css.map +1 -1
  57. package/nationalarchives/components/grid/grid.scss +15 -11
  58. package/nationalarchives/components/grid/grid.stories.js +21 -0
  59. package/nationalarchives/components/grid/macro-options.json +48 -0
  60. package/nationalarchives/components/grid/template.njk +29 -3
  61. package/nationalarchives/components/header/header.css +1 -1
  62. package/nationalarchives/components/header/header.css.map +1 -1
  63. package/nationalarchives/components/header/header.scss +60 -145
  64. package/nationalarchives/components/header/header.stories.js +2 -0
  65. package/nationalarchives/components/header/macro-options.json +12 -0
  66. package/nationalarchives/components/header/template.njk +6 -1
  67. package/nationalarchives/components/hero/fixtures.json +166 -6
  68. package/nationalarchives/components/hero/hero.css +1 -1
  69. package/nationalarchives/components/hero/hero.css.map +1 -1
  70. package/nationalarchives/components/hero/hero.scss +187 -64
  71. package/nationalarchives/components/hero/hero.stories.js +98 -23
  72. package/nationalarchives/components/hero/macro-options.json +48 -12
  73. package/nationalarchives/components/hero/template.njk +34 -24
  74. package/nationalarchives/components/index-grid/index-grid.css +1 -1
  75. package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
  76. package/nationalarchives/components/index-grid/template.njk +2 -2
  77. package/nationalarchives/components/message/message.css +1 -1
  78. package/nationalarchives/components/message/message.css.map +1 -1
  79. package/nationalarchives/components/message/message.scss +4 -0
  80. package/nationalarchives/components/pagination/_index.scss +1 -0
  81. package/nationalarchives/components/pagination/fixtures.json +4 -0
  82. package/nationalarchives/components/pagination/macro-options.json +116 -0
  83. package/nationalarchives/components/pagination/macro.njk +3 -0
  84. package/nationalarchives/components/pagination/pagination.css +1 -0
  85. package/nationalarchives/components/pagination/pagination.css.map +1 -0
  86. package/nationalarchives/components/pagination/pagination.scss +98 -0
  87. package/nationalarchives/components/pagination/pagination.stories.js +73 -0
  88. package/nationalarchives/components/pagination/template.njk +38 -0
  89. package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
  90. package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
  91. package/nationalarchives/components/phase-banner/phase-banner.scss +5 -1
  92. package/nationalarchives/components/picture/picture.css +1 -13
  93. package/nationalarchives/components/picture/picture.css.map +1 -1
  94. package/nationalarchives/components/picture/picture.scss +1 -1
  95. package/nationalarchives/components/picture/picture.stories.js +2 -2
  96. package/nationalarchives/components/profile/profile.css +1 -1
  97. package/nationalarchives/components/profile/profile.css.map +1 -1
  98. package/nationalarchives/components/profile/template.njk +2 -2
  99. package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -1
  100. package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -1
  101. package/nationalarchives/components/skip-link/fixtures.json +1 -1
  102. package/nationalarchives/components/skip-link/skip-link.css +1 -1
  103. package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
  104. package/nationalarchives/components/skip-link/skip-link.js +2 -0
  105. package/nationalarchives/components/skip-link/skip-link.js.map +1 -0
  106. package/nationalarchives/components/skip-link/skip-link.mjs +40 -0
  107. package/nationalarchives/components/skip-link/skip-link.scss +18 -16
  108. package/nationalarchives/components/skip-link/skip-link.stories.js +48 -6
  109. package/nationalarchives/components/skip-link/template.njk +1 -1
  110. package/nationalarchives/components/tabs/tabs.css +1 -1
  111. package/nationalarchives/components/tabs/tabs.css.map +1 -1
  112. package/nationalarchives/components/tabs/tabs.js +1 -1
  113. package/nationalarchives/components/tabs/tabs.js.map +1 -1
  114. package/nationalarchives/components/tabs/tabs.mjs +6 -2
  115. package/nationalarchives/components/tabs/tabs.scss +17 -2
  116. package/nationalarchives/components/tabs/tabs.stories.js +6 -6
  117. package/nationalarchives/lib/_font-awesome.scss +3 -2
  118. package/nationalarchives/lib/cookies.mjs +122 -50
  119. package/nationalarchives/stories/development/contributing.mdx +0 -10
  120. package/nationalarchives/stories/development/cookies.mdx +82 -0
  121. package/nationalarchives/stories/development/structure.mdx +88 -0
  122. package/nationalarchives/stories/development/using/compiled.mdx +9 -0
  123. package/nationalarchives/stories/development/using/hosted.mdx +53 -0
  124. package/nationalarchives/stories/development/using/npm.mdx +59 -0
  125. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +333 -72
  126. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +10 -21
  127. package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +2 -2
  128. package/nationalarchives/stories/utilities/typography/headings.stories.js +6 -3
  129. package/nationalarchives/stories/utilities/typography/lists.stories.js +93 -0
  130. package/nationalarchives/stories/utilities/typography/typography.mdx +11 -1
  131. package/nationalarchives/stories/utilities/typography/typography.stories.js +1 -1
  132. package/nationalarchives/templates/homepage.njk +11 -58
  133. package/nationalarchives/templates/layouts/_generic.njk +31 -14
  134. package/nationalarchives/templates/layouts/_prototype-kit.njk +11 -0
  135. package/nationalarchives/templates/search-results.njk +11 -15
  136. package/nationalarchives/templates/topics.njk +18 -22
  137. package/nationalarchives/tools/_colour.scss +77 -23
  138. package/nationalarchives/tools/_grid.scss +12 -12
  139. package/nationalarchives/tools/_media.scss +6 -0
  140. package/nationalarchives/tools/_spacing.scss +6 -6
  141. package/nationalarchives/tools/_typography.scss +4 -2
  142. package/nationalarchives/utilities/_a11y.scss +15 -0
  143. package/nationalarchives/utilities/_columns.scss +42 -0
  144. package/nationalarchives/utilities/_debug.scss +1 -1
  145. package/nationalarchives/utilities/_global.scss +32 -32
  146. package/nationalarchives/utilities/_index.scss +2 -0
  147. package/nationalarchives/utilities/_lists.scss +181 -0
  148. package/nationalarchives/utilities/_typography.scss +129 -138
  149. package/nationalarchives/variables/_assets.scss +2 -1
  150. package/nationalarchives/variables/_colour.scss +94 -74
  151. package/nationalarchives/variables/_features.scss +1 -0
  152. package/nationalarchives/variables/_grid.scss +5 -5
  153. package/nationalarchives/variables/_index.scss +1 -0
  154. package/nationalarchives/variables/_media.scss +29 -29
  155. package/nationalarchives/variables/_typography.scss +15 -12
  156. package/package.json +15 -14
  157. package/nationalarchives/_features.scss +0 -1
  158. package/nationalarchives/assets/images/tna-horizontal-logo-inverted.svg +0 -51
  159. package/nationalarchives/assets/images/tna-horizontal-logo.svg +0 -51
  160. package/nationalarchives/stories/design/about.mdx +0 -25
  161. package/nationalarchives/stories/development/relationships.mdx +0 -57
  162. package/nationalarchives/stories/development/using.mdx +0 -75
@@ -1,40 +1,40 @@
1
1
  @use "sass:math";
2
2
  @use "./typography";
3
3
 
4
- $-largest-medium-device-px: 1024 !default;
5
- $-largest-small-device-px: 768 !default;
6
- $-largest-tiny-device-px: 480 !default;
4
+ $largest-medium-device-px: 1024 !default;
5
+ $largest-small-device-px: 768 !default;
6
+ $largest-tiny-device-px: 480 !default;
7
7
 
8
- $-smallest-large-device-em: #{math.div(
9
- $-largest-medium-device-px + 1,
10
- typography.$base-font-size-px
8
+ $smallest-large-device-em: #{math.div(
9
+ $largest-medium-device-px + 1,
10
+ typography.$relative-1rem-px
11
11
  )}em;
12
- $-largest-medium-device-em: #{math.div(
13
- $-largest-medium-device-px,
14
- typography.$base-font-size-px
12
+ $largest-medium-device-em: #{math.div(
13
+ $largest-medium-device-px,
14
+ typography.$relative-1rem-px
15
15
  )}em;
16
- $-smallest-medium-device-em: #{math.div(
17
- $-largest-small-device-px + 1,
18
- typography.$base-font-size-px
16
+ $smallest-medium-device-em: #{math.div(
17
+ $largest-small-device-px + 1,
18
+ typography.$relative-1rem-px
19
19
  )}em;
20
- $-largest-small-device-em: #{math.div(
21
- $-largest-small-device-px,
22
- typography.$base-font-size-px
20
+ $largest-small-device-em: #{math.div(
21
+ $largest-small-device-px,
22
+ typography.$relative-1rem-px
23
23
  )}em;
24
- $-smallest-small-device-em: #{math.div(
25
- $-largest-tiny-device-px + 1,
26
- typography.$base-font-size-px
24
+ $smallest-small-device-em: #{math.div(
25
+ $largest-tiny-device-px + 1,
26
+ typography.$relative-1rem-px
27
27
  )}em;
28
- $-largest-tiny-device-em: #{math.div(
29
- $-largest-tiny-device-px,
30
- typography.$base-font-size-px
28
+ $largest-tiny-device-em: #{math.div(
29
+ $largest-tiny-device-px,
30
+ typography.$relative-1rem-px
31
31
  )}em;
32
32
 
33
- $media-large: "(min-width: #{$-smallest-large-device-em})";
34
- $media-lt-large: "(max-width: #{$-largest-medium-device-em})";
35
- $media-medium: "(min-width: #{$-smallest-medium-device-em}) and (max-width: #{$-largest-medium-device-em})";
36
- $media-gt-mobile: "(min-width: #{$-smallest-medium-device-em})";
37
- $media-mobile: "(max-width: #{$-largest-small-device-em})";
38
- $media-small: "(min-width: #{$-smallest-small-device-em}) and (max-width: #{$-largest-small-device-em})";
39
- $media-gt-tiny: "(min-width: #{$-smallest-small-device-em})";
40
- $media-tiny: "(max-width: #{$-largest-tiny-device-em})";
33
+ $media-large: "(min-width: #{$smallest-large-device-em})";
34
+ $media-lt-large: "(max-width: #{$largest-medium-device-em})";
35
+ $media-medium: "(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})";
36
+ $media-gt-mobile: "(min-width: #{$smallest-medium-device-em})";
37
+ $media-mobile: "(max-width: #{$largest-small-device-em})";
38
+ $media-small: "(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})";
39
+ $media-gt-tiny: "(min-width: #{$smallest-small-device-em})";
40
+ $media-tiny: "(max-width: #{$largest-tiny-device-em})";
@@ -1,16 +1,19 @@
1
- $base-font-size-px: 16;
1
+ @use "sass:math";
2
2
 
3
- $interactive-text-decoration-thickness: 3.5px;
3
+ $relative-1rem-px: 16;
4
4
 
5
- $font-family-main: "Open Sans", serif;
6
- // $font-weight-main: 500;
7
- $font-weight-main: normal;
8
- // $font-weight-main-bold: 700;
9
- $font-weight-main-bold: bold;
5
+ $body-font-size-px: 18 !default;
6
+ $body-font-size-px-mobile: 17 !default;
7
+ $body-line-height: #{math.div(16, 18) * 2} !default; // 1.77777
10
8
 
11
- $font-family-heading: supria-sans-condensed, "Arial Narrow", sans-serif;
12
- $font-weight-heading: 400;
9
+ $interactive-text-decoration-thickness: 3.5px !default;
13
10
 
14
- $font-family-detail: "Roboto Mono", monospace;
15
- // $font-weight-detail: 400;
16
- $font-weight-detail: normal;
11
+ $font-family-main: "Open Sans", sans-serif !default;
12
+ $font-weight-main: normal !default; // Defined in utilities/_typography.scss
13
+ $font-weight-main-bold: bold !default; // Defined in utilities/_typography.scss
14
+
15
+ $font-family-heading: supria-sans-condensed, "Arial Narrow", sans-serif !default;
16
+ $font-weight-heading: 500 !default;
17
+
18
+ $font-family-detail: "Roboto Mono", monospace !default;
19
+ $font-weight-detail: normal !default;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@nationalarchives/frontend",
3
- "version": "0.1.20-prerelease",
3
+ "version": "0.1.22-prerelease",
4
4
  "description": "The National Archives frontend styles",
5
5
  "scripts": {
6
6
  "start": "storybook dev -p 6006",
7
- "build": "storybook build -o storybook",
7
+ "build": "storybook build -o storybook --webpack-stats-json",
8
8
  "test": "node tasks/test-fixtures.js && test-storybook --verbose --stories-json",
9
9
  "lint": "prettier --check '{src,.storybook,tasks}/**/*.{js,mjs,scss,json,html}' && stylelint 'src/**/*.scss' && eslint 'src/**/*.mjs'",
10
10
  "lint:fix": "prettier --write '{src,.storybook,tasks}/**/*.{js,mjs,scss,json,html}' && stylelint --fix 'src/**/*.scss' && eslint --fix 'src/**/*.mjs'",
@@ -41,18 +41,19 @@
41
41
  "devDependencies": {
42
42
  "@babel/core": "^7.22.10",
43
43
  "@babel/preset-env": "^7.22.10",
44
+ "@chromaui/addon-visual-tests": "^0.0.109",
44
45
  "@mdx-js/react": "^2.1.3",
45
- "@storybook/addon-a11y": "^7.4.0",
46
- "@storybook/addon-docs": "^7.4.0",
47
- "@storybook/addon-essentials": "^7.4.0",
48
- "@storybook/addon-interactions": "^7.4.0",
49
- "@storybook/addon-links": "^7.4.0",
50
- "@storybook/addon-mdx-gfm": "^7.4.0",
51
- "@storybook/html": "^7.4.0",
52
- "@storybook/html-webpack5": "^7.4.0",
53
- "@storybook/jest": "^0.2.2",
46
+ "@storybook/addon-a11y": "^7.5.1",
47
+ "@storybook/addon-docs": "^7.5.1",
48
+ "@storybook/addon-essentials": "^7.5.1",
49
+ "@storybook/addon-interactions": "^7.5.1",
50
+ "@storybook/addon-links": "^7.5.1",
51
+ "@storybook/addon-mdx-gfm": "^7.5.1",
52
+ "@storybook/html": "^7.5.1",
53
+ "@storybook/html-webpack5": "^7.5.1",
54
+ "@storybook/jest": "^0.2.3",
54
55
  "@storybook/test-runner": "^0.13.0",
55
- "@storybook/testing-library": "^0.2.0",
56
+ "@storybook/testing-library": "^0.2.2",
56
57
  "axe-playwright": "^1.2.3",
57
58
  "babel-loader": "^9.0.1",
58
59
  "chromatic": "^7.0.0",
@@ -60,7 +61,7 @@
60
61
  "css-loader": "^6.7.1",
61
62
  "diff": "^5.1.0",
62
63
  "eslint": "^8.46.0",
63
- "eslint-plugin-storybook": "^0.6.13",
64
+ "eslint-plugin-storybook": "^0.6.15",
64
65
  "glob": "^10.2.7",
65
66
  "jest-image-snapshot": "^6.2.0",
66
67
  "jsdom": "^22.1.0",
@@ -73,7 +74,7 @@
73
74
  "sass": "^1.64.2",
74
75
  "sass-loader": "^13.0.2",
75
76
  "simple-nunjucks-loader": "^3.2.0",
76
- "storybook": "^7.4.0",
77
+ "storybook": "^7.5.1",
77
78
  "style-loader": "^3.3.1",
78
79
  "stylelint": "^15.10.2",
79
80
  "stylelint-config-standard-scss": "^11.0.0",
@@ -1 +0,0 @@
1
- $debug-interactable-areas: false;
@@ -1,51 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 249.9 34.5" style="enable-background:new 0 0 249.9 34.5;" xml:space="preserve">
5
- <style type="text/css">
6
- .st0{fill:#000;}
7
- .st1{fill:#fff;}
8
- </style>
9
- <rect class="st0" width="249.9" height="34.3"/>
10
- <g>
11
- <path class="st1" d="M1.2,1.2h48.6v32H1.2V1.2z M0,0v33.1v1.2h50.9v-1.2V0H0z"/>
12
- <polygon class="st1" points="13.4,12.3 10,12.3 10,10.4 19,10.4 19,12.3 15.6,12.3 15.6,23.9 13.4,23.9 "/>
13
- <polygon class="st1" points="19.9,10.4 22,10.4 22,16.1 27.3,16.1 27.3,10.4 29.5,10.4 29.5,23.9 27.3,23.9 27.3,18 22,18 22,23.9
14
- 19.9,23.9 "/>
15
- <polygon class="st1" points="32,10.4 39.7,10.4 39.7,12.3 34.2,12.3 34.2,16.1 38.8,16.1 38.8,18 34.2,18 34.2,22 39.7,22
16
- 39.7,23.9 32,23.9 "/>
17
- <path class="st1" d="M50.9,1.2h49.8h48.6v32H50.9V1.2z M49.7,0v1.2v33.1h100.7V0H49.7z"/>
18
- <path class="st1" d="M62.1,10.4h2.4l4,7.9c0.3,0.7,0.7,1.7,1,2.5h0.1c-0.1-1.1-0.2-2.2-0.2-3v-7.4h2.2v13.5h-2.3l-4-7.8
19
- c-0.4-0.9-0.7-1.7-1.1-2.6h-0.1c0.1,0.9,0.2,2.1,0.2,3.1v7.2h-2.2C62.1,23.9,62.1,10.4,62.1,10.4z"/>
20
- <path class="st1" d="M79.8,18.8l-1.1-3.9c-0.2-0.7-0.3-1.4-0.6-2.4H78c-0.2,1-0.3,1.6-0.5,2.4l-1.1,3.9H79.8z M76.8,10.4h2.7
21
- l3.9,13.5h-2.2l-0.9-3.3h-4.1l-0.9,3.3h-2.3L76.8,10.4z"/>
22
- <polygon class="st1" points="85.7,12.3 82.3,12.3 82.3,10.4 91.3,10.4 91.3,12.3 87.9,12.3 87.9,23.9 85.7,23.9 "/>
23
- <rect x="92.4" y="10.4" class="st1" width="2.2" height="13.5"/>
24
- <path class="st1" d="M104.8,17.2c0-3.3-1-5-3-5c-2,0-3,1.7-3,5c0,3.3,1,5,3,5C103.8,22.2,104.8,20.5,104.8,17.2 M96.4,17.2
25
- c0-4.4,1.9-6.9,5.3-6.9c3.4,0,5.3,2.6,5.3,6.9c0,4.4-1.9,6.9-5.3,6.9C98.3,24.1,96.4,21.5,96.4,17.2"/>
26
- <path class="st1" d="M109.1,10.4h2.4l4,7.9c0.3,0.7,0.7,1.7,1,2.5h0.1c-0.1-1.1-0.2-2.2-0.2-3v-7.4h2.2v13.5h-2.3l-4-7.8
27
- c-0.4-0.9-0.7-1.7-1.1-2.6H111c0.1,0.9,0.2,2.1,0.2,3.1v7.2h-2.2V10.4z"/>
28
- <path class="st1" d="M126.8,18.8l-1.1-3.9c-0.2-0.7-0.3-1.4-0.6-2.4H125c-0.2,1-0.3,1.6-0.5,2.4l-1.1,3.9H126.8z M123.8,10.4h2.7
29
- l3.9,13.5h-2.2l-0.9-3.3H123l-0.9,3.3h-2.3L123.8,10.4z"/>
30
- <polygon class="st1" points="131.5,10.4 133.7,10.4 133.7,22 138.9,22 138.9,23.9 131.5,23.9 "/>
31
- <path class="st1" d="M150.4,1.2h98.3v32h-98.3V1.2z M149.2,34.3h100.7V0H149.2V34.3z"/>
32
- <path class="st1" d="M166.2,18.8l-1.1-3.9c-0.2-0.7-0.4-1.4-0.6-2.4h-0.1c-0.2,1-0.3,1.6-0.5,2.4l-1.1,3.9H166.2z M163.2,10.4h2.7
33
- l3.9,13.5h-2.2l-0.9-3.3h-4.1l-0.9,3.3h-2.3L163.2,10.4z"/>
34
- <path class="st1" d="M174.4,17.1c1.6,0,2.1-1,2.1-2.4c0-1.4-0.6-2.4-2.1-2.4h-1.7v4.8H174.4z M170.5,10.4h4c2.9,0,4.2,1.5,4.2,4.1
35
- c0,2-0.9,3.5-2.3,3.9v0.1c0.6,0.7,2.5,4.8,3,5v0.3h-2.4c-0.6-0.4-2.3-4.5-2.8-4.9h-1.6v4.9h-2.2L170.5,10.4L170.5,10.4z"/>
36
- <path class="st1" d="M182.5,17.1c0,3.4,1.2,5.1,3,5.1c1.8,0,2.5-1.3,2.5-3.3l2.2,0.1c0,0.1,0,0.3,0,0.4c0,2.8-1.4,4.7-4.7,4.7
37
- c-3.2,0-5.3-2.4-5.3-7c0-4.4,2.1-6.9,5.3-6.9c4.1,0,4.7,2.9,4.7,4.5c0,0.2,0,0.4,0,0.6l-2.2,0.1c0-2.1-0.7-3.3-2.5-3.3
38
- C183.7,12.1,182.5,13.8,182.5,17.1"/>
39
- <polygon class="st1" points="192,10.4 194.2,10.4 194.2,16.1 199.4,16.1 199.4,10.4 201.6,10.4 201.6,23.9 199.4,23.9 199.4,18
40
- 194.2,18 194.2,23.9 192,23.9 "/>
41
- <rect x="204.5" y="10.4" class="st1" width="2.2" height="13.5"/>
42
- <path class="st1" d="M208.5,10.4h2.3l2,7.8c0.3,1.2,0.5,2.3,0.7,3.5h0.2c0.2-1.3,0.4-2.3,0.7-3.5l2-7.8h2.3l-3.8,13.5h-2.6
43
- L208.5,10.4z"/>
44
- <polygon class="st1" points="220.2,10.4 227.9,10.4 227.9,12.3 222.4,12.3 222.4,16.1 227,16.1 227,18 222.4,18 222.4,21.9
45
- 227.9,21.9 227.9,23.9 220.2,23.9 "/>
46
- <path class="st1" d="M231.3,19.3c0,0.2,0,0.3,0,0.5c0,1.2,0.5,2.3,2.1,2.3c1.4,0,2.1-0.7,2.1-1.8c0-1-0.4-1.5-1.4-1.9l-2.2-0.8
47
- c-1.5-0.6-2.7-1.5-2.7-3.6c0-2.2,1.5-3.8,4.2-3.8c3.4,0,4.1,2.3,4.1,3.7c0,0.2,0,0.4-0.1,0.7l-2.1,0c0-0.1,0-0.3,0-0.5
48
- c0-1.1-0.4-2-1.9-2c-1.3,0-1.9,0.8-1.9,1.8c0,1.1,0.6,1.6,1.4,1.9l2.2,0.8c1.7,0.6,2.7,1.7,2.7,3.6c0,2.3-1.5,3.9-4.4,3.9
49
- c-3.7,0-4.3-2.5-4.3-4.1c0-0.2,0-0.4,0.1-0.6L231.3,19.3z"/>
50
- </g>
51
- </svg>
@@ -1,51 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 249.9 34.5" style="enable-background:new 0 0 249.9 34.5;" xml:space="preserve">
5
- <style type="text/css">
6
- .st0{fill:#fff;}
7
- .st1{fill:#000;}
8
- </style>
9
- <rect class="st0" width="249.9" height="34.3"/>
10
- <g>
11
- <path class="st1" d="M1.2,1.2h48.6v32H1.2V1.2z M0,0v33.1v1.2h50.9v-1.2V0H0z"/>
12
- <polygon class="st1" points="13.4,12.3 10,12.3 10,10.4 19,10.4 19,12.3 15.6,12.3 15.6,23.9 13.4,23.9 "/>
13
- <polygon class="st1" points="19.9,10.4 22,10.4 22,16.1 27.3,16.1 27.3,10.4 29.5,10.4 29.5,23.9 27.3,23.9 27.3,18 22,18 22,23.9
14
- 19.9,23.9 "/>
15
- <polygon class="st1" points="32,10.4 39.7,10.4 39.7,12.3 34.2,12.3 34.2,16.1 38.8,16.1 38.8,18 34.2,18 34.2,22 39.7,22
16
- 39.7,23.9 32,23.9 "/>
17
- <path class="st1" d="M50.9,1.2h49.8h48.6v32H50.9V1.2z M49.7,0v1.2v33.1h100.7V0H49.7z"/>
18
- <path class="st1" d="M62.1,10.4h2.4l4,7.9c0.3,0.7,0.7,1.7,1,2.5h0.1c-0.1-1.1-0.2-2.2-0.2-3v-7.4h2.2v13.5h-2.3l-4-7.8
19
- c-0.4-0.9-0.7-1.7-1.1-2.6h-0.1c0.1,0.9,0.2,2.1,0.2,3.1v7.2h-2.2C62.1,23.9,62.1,10.4,62.1,10.4z"/>
20
- <path class="st1" d="M79.8,18.8l-1.1-3.9c-0.2-0.7-0.3-1.4-0.6-2.4H78c-0.2,1-0.3,1.6-0.5,2.4l-1.1,3.9H79.8z M76.8,10.4h2.7
21
- l3.9,13.5h-2.2l-0.9-3.3h-4.1l-0.9,3.3h-2.3L76.8,10.4z"/>
22
- <polygon class="st1" points="85.7,12.3 82.3,12.3 82.3,10.4 91.3,10.4 91.3,12.3 87.9,12.3 87.9,23.9 85.7,23.9 "/>
23
- <rect x="92.4" y="10.4" class="st1" width="2.2" height="13.5"/>
24
- <path class="st1" d="M104.8,17.2c0-3.3-1-5-3-5c-2,0-3,1.7-3,5c0,3.3,1,5,3,5C103.8,22.2,104.8,20.5,104.8,17.2 M96.4,17.2
25
- c0-4.4,1.9-6.9,5.3-6.9c3.4,0,5.3,2.6,5.3,6.9c0,4.4-1.9,6.9-5.3,6.9C98.3,24.1,96.4,21.5,96.4,17.2"/>
26
- <path class="st1" d="M109.1,10.4h2.4l4,7.9c0.3,0.7,0.7,1.7,1,2.5h0.1c-0.1-1.1-0.2-2.2-0.2-3v-7.4h2.2v13.5h-2.3l-4-7.8
27
- c-0.4-0.9-0.7-1.7-1.1-2.6H111c0.1,0.9,0.2,2.1,0.2,3.1v7.2h-2.2V10.4z"/>
28
- <path class="st1" d="M126.8,18.8l-1.1-3.9c-0.2-0.7-0.3-1.4-0.6-2.4H125c-0.2,1-0.3,1.6-0.5,2.4l-1.1,3.9H126.8z M123.8,10.4h2.7
29
- l3.9,13.5h-2.2l-0.9-3.3H123l-0.9,3.3h-2.3L123.8,10.4z"/>
30
- <polygon class="st1" points="131.5,10.4 133.7,10.4 133.7,22 138.9,22 138.9,23.9 131.5,23.9 "/>
31
- <path class="st1" d="M150.4,1.2h98.3v32h-98.3V1.2z M149.2,34.3h100.7V0H149.2V34.3z"/>
32
- <path class="st1" d="M166.2,18.8l-1.1-3.9c-0.2-0.7-0.4-1.4-0.6-2.4h-0.1c-0.2,1-0.3,1.6-0.5,2.4l-1.1,3.9H166.2z M163.2,10.4h2.7
33
- l3.9,13.5h-2.2l-0.9-3.3h-4.1l-0.9,3.3h-2.3L163.2,10.4z"/>
34
- <path class="st1" d="M174.4,17.1c1.6,0,2.1-1,2.1-2.4c0-1.4-0.6-2.4-2.1-2.4h-1.7v4.8H174.4z M170.5,10.4h4c2.9,0,4.2,1.5,4.2,4.1
35
- c0,2-0.9,3.5-2.3,3.9v0.1c0.6,0.7,2.5,4.8,3,5v0.3h-2.4c-0.6-0.4-2.3-4.5-2.8-4.9h-1.6v4.9h-2.2L170.5,10.4L170.5,10.4z"/>
36
- <path class="st1" d="M182.5,17.1c0,3.4,1.2,5.1,3,5.1c1.8,0,2.5-1.3,2.5-3.3l2.2,0.1c0,0.1,0,0.3,0,0.4c0,2.8-1.4,4.7-4.7,4.7
37
- c-3.2,0-5.3-2.4-5.3-7c0-4.4,2.1-6.9,5.3-6.9c4.1,0,4.7,2.9,4.7,4.5c0,0.2,0,0.4,0,0.6l-2.2,0.1c0-2.1-0.7-3.3-2.5-3.3
38
- C183.7,12.1,182.5,13.8,182.5,17.1"/>
39
- <polygon class="st1" points="192,10.4 194.2,10.4 194.2,16.1 199.4,16.1 199.4,10.4 201.6,10.4 201.6,23.9 199.4,23.9 199.4,18
40
- 194.2,18 194.2,23.9 192,23.9 "/>
41
- <rect x="204.5" y="10.4" class="st1" width="2.2" height="13.5"/>
42
- <path class="st1" d="M208.5,10.4h2.3l2,7.8c0.3,1.2,0.5,2.3,0.7,3.5h0.2c0.2-1.3,0.4-2.3,0.7-3.5l2-7.8h2.3l-3.8,13.5h-2.6
43
- L208.5,10.4z"/>
44
- <polygon class="st1" points="220.2,10.4 227.9,10.4 227.9,12.3 222.4,12.3 222.4,16.1 227,16.1 227,18 222.4,18 222.4,21.9
45
- 227.9,21.9 227.9,23.9 220.2,23.9 "/>
46
- <path class="st1" d="M231.3,19.3c0,0.2,0,0.3,0,0.5c0,1.2,0.5,2.3,2.1,2.3c1.4,0,2.1-0.7,2.1-1.8c0-1-0.4-1.5-1.4-1.9l-2.2-0.8
47
- c-1.5-0.6-2.7-1.5-2.7-3.6c0-2.2,1.5-3.8,4.2-3.8c3.4,0,4.1,2.3,4.1,3.7c0,0.2,0,0.4-0.1,0.7l-2.1,0c0-0.1,0-0.3,0-0.5
48
- c0-1.1-0.4-2-1.9-2c-1.3,0-1.9,0.8-1.9,1.8c0,1.1,0.6,1.6,1.4,1.9l2.2,0.8c1.7,0.6,2.7,1.7,2.7,3.6c0,2.3-1.5,3.9-4.4,3.9
49
- c-3.7,0-4.3-2.5-4.3-4.1c0-0.2,0-0.4,0.1-0.6L231.3,19.3z"/>
50
- </g>
51
- </svg>
@@ -1,25 +0,0 @@
1
- import { Meta } from "@storybook/blocks";
2
-
3
- <Meta title="Design/Prototyping" />
4
-
5
- # Prototyping with the styles
6
-
7
- The National Archives frontend styles include support for the [GOV.UK Prototype Kit](https://prototype-kit.service.gov.uk/).
8
-
9
- You can use the components and styles within the prototype kit to make rich HTML prototypes.
10
-
11
- ## Create a new prototype
12
-
13
- 1. Create an empty directory `mkdir my-new-prototype`
14
- 1. Use `npx govuk-prototype-kit create` to create a new prototype project
15
- 1. Install the frontend styles with `npm install @nationalarchives/frontend`
16
- 1. Run `npm run dev` to start up the prototype kit
17
- 1. Use the National Archives components!
18
-
19
- ```Nunjucks
20
- {% from "nationalarchives/components/button/macro.njk" import tnaButton %}
21
- {{ tnaButton({
22
- text: "I am a button",
23
- url: "#"
24
- }) }}
25
- ```
@@ -1,57 +0,0 @@
1
- import { Meta } from "@storybook/blocks";
2
- import { Mermaid } from 'mdx-mermaid/Mermaid';
3
-
4
- <Meta title="Development/Relationships" />
5
-
6
- # Relationship to other resources
7
-
8
- Read about the [resources in the Developer Handbook](https://nationalarchives.github.io/developer-handbook/resources/) for more information.
9
-
10
- ## Context
11
-
12
- <Mermaid chart={`C4Context
13
-
14
- System_Ext(designsystem, "design-system", "Design-centric advice on how to design TNA services and applications using components, patterns and layouts")
15
- System_Ext(prototypekit, "govuk-prototype-kit")
16
- System_Ext(frontend, "tna-frontend", "Source of truth for HTML, CSS and JavaScript of components and layouts")
17
- Container(prototype, "Prototype", "Example TNA prototype")
18
- System_Ext(frontenddjango, "tna-frontend-django", "Django templates (HTML) for use in applications")
19
- Container(application, "Application", "Example TNA application")
20
- System_Ext(developerhandbook, "developer-handbook", "Technical advice on how to develop TNA services and applications")
21
-
22
- Rel(designsystem, prototypekit, "references")
23
- Rel(designsystem, frontend, "describes")
24
- Rel(designsystem, prototype, "documents how to make")
25
-
26
- Rel(prototype, prototypekit, "consumes", "npm")
27
- Rel(prototype, frontend, "consumes", "npm")
28
- Rel(prototype, application, "defines")
29
-
30
- Rel(frontend, frontenddjango, "defines")
31
-
32
- Rel(application, frontend, "consumes", "npm")
33
- Rel(application, frontenddjango, "consumes", "PyPi")
34
-
35
- Rel(developerhandbook, application, "documents how to make")
36
-
37
- UpdateLayoutConfig($c4ShapeInRow="2")
38
- `} />
39
-
40
- ## Frontend
41
-
42
- <Mermaid chart={`C4Context
43
- Person(dev, "Developer", "TNA developer")
44
- System_Ext(github, "GitHub", "Repositories for source files")
45
- System_Ext(npm, "NPMJS", "Hosts NodeJS packages")
46
- System_Ext(pypi, "PyPi", "Hosts Python packages")
47
- Container(app, "Application", "Example application")
48
-
49
- Rel(dev, github, "commits to", "git")
50
- UpdateRelStyle(dev, github, $offsetX="-30", $offsetY="-30")
51
- Rel(github, npm, "publishes to", "npm")
52
- Rel(github, pypi, "publishes to", "pip")
53
- Rel(app, npm, "consumes", "npm")
54
- Rel(app, pypi, "consumes", "pip")
55
-
56
- UpdateLayoutConfig($c4ShapeInRow="2")
57
- `} />
@@ -1,75 +0,0 @@
1
- import { Meta } from "@storybook/blocks";
2
-
3
- <Meta title="Development/Using" />
4
-
5
- # Using the styles
6
-
7
- ## NPM
8
-
9
- Install the frontend package from NPM with:
10
-
11
- ```sh
12
- npm install @nationalarchives/frontend
13
- ```
14
-
15
- ### CSS
16
-
17
- From here, you have access to include the SCSS files from the package so you can compile the package yourself:
18
-
19
- ```css
20
- // Include all the styles
21
- @include("node_modules/@nationalarchives/frontend/nationalarchives/all");
22
-
23
- // ...or just include a single component
24
- @include("node_modules/@nationalarchives/frontend/nationalarchives/components/tabs");
25
- ```
26
-
27
- ...or you can copy any of the compiled CSS files into your distribution:
28
-
29
- - `node_modules/@nationalarchives/frontend/nationalarchives/all.css`
30
- - `node_modules/@nationalarchives/frontend/nationalarchives/all.css.map`
31
- - `node_modules/@nationalarchives/frontend/nationalarchives/components/tabs.css`
32
- - `node_modules/@nationalarchives/frontend/nationalarchives/components/tabs.css.map`
33
-
34
- ### JavaScript
35
-
36
- ```js
37
- // Import all the JavaScript
38
- import "node_modules/@nationalarchives/frontend/nationalarchives/all.mjs";
39
-
40
- // ...or import just the JavaScript for a single component
41
- import "node_modules/@nationalarchives/frontend/nationalarchives/components/tabs/tabs.mjs";
42
- ```
43
-
44
- ...or you can copy any of the compiled JavaScript files into your distribution:
45
-
46
- - `node_modules/@nationalarchives/frontend/nationalarchives/all.js`
47
- - `node_modules/@nationalarchives/frontend/nationalarchives/all.js.map`
48
- - `node_modules/@nationalarchives/frontend/nationalarchives/components/tabs.js`
49
- - `node_modules/@nationalarchives/frontend/nationalarchives/components/tabs.js.map`
50
-
51
- ## Hosted
52
-
53
- ### CSS
54
-
55
- Include the CSS in the `<head>` element of your page:
56
-
57
- ```html
58
- <!-- All styles -->
59
- <link href="https://cdn.jsdelivr.net/npm/@nationalarchives/frontend@0.1.18-prerelease/nationalarchives/all.css" rel="stylesheet" integrity="sha384-6Egfw6aX1Jrwuf+APn+BMPswroudkIQ6StU095OPkNCKLEzj7ksWGmYxjend8P7g" crossorigin="anonymous">
60
-
61
- <!-- Styles for a single component -->
62
- <link href="https://cdn.jsdelivr.net/npm/@nationalarchives/frontend@0.1.18-prerelease/nationalarchives/components/tabs.css" rel="stylesheet" integrity="sha384-hkx4svJn1A7pWYlzaDRMmtIBBijZdEop+M1Y/H4Hdg8aAqZRJHG56RokLk/eqJYl" crossorigin="anonymous">
63
- ```
64
-
65
- ### JavaScript
66
-
67
- Add the JavaScript to the end of your page just before your closing `</body>` tag:
68
-
69
- ```html
70
- <!-- All JavaScript -->
71
- <script src="https://cdn.jsdelivr.net/npm/@nationalarchives/frontend@0.1.18-prerelease/nationalarchives/all.js" integrity="sha384-sBkiMlxl9svXopGxNSMVAdALjzyvh6sQHp+21PE3LGfTxAEbG4EIpK" crossorigin="anonymous"></script>
72
-
73
- <!-- JavaScript for a single component -->
74
- <script src="https://cdn.jsdelivr.net/npm/@nationalarchives/frontend@0.1.18-prerelease/nationalarchives/components/tabs.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
75
- ```