@nationalarchives/frontend 0.1.24-prerelease → 0.1.26-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 (213) hide show
  1. package/README.md +22 -0
  2. package/govuk-prototype-kit.config.json +4 -12
  3. package/nationalarchives/all.css +2 -2
  4. package/nationalarchives/all.css.map +1 -1
  5. package/nationalarchives/all.js +1 -1
  6. package/nationalarchives/all.js.map +1 -1
  7. package/nationalarchives/all.mjs +0 -11
  8. package/nationalarchives/components/_index.scss +8 -0
  9. package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
  10. package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
  11. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
  12. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
  13. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +1 -1
  14. package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +1 -1
  15. package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +1 -1
  16. package/nationalarchives/components/button/_button-group.scss +4 -0
  17. package/nationalarchives/components/button/button.css +1 -1
  18. package/nationalarchives/components/button/button.css.map +1 -1
  19. package/nationalarchives/components/button/button.scss +89 -26
  20. package/nationalarchives/components/button/button.stories.js +52 -5
  21. package/nationalarchives/components/button/macro-options.json +18 -0
  22. package/nationalarchives/components/button/template.njk +15 -6
  23. package/nationalarchives/components/card/card.css +1 -1
  24. package/nationalarchives/components/card/card.css.map +1 -1
  25. package/nationalarchives/components/card/card.scss +7 -37
  26. package/nationalarchives/components/card/card.stories.js +6 -78
  27. package/nationalarchives/components/card/fixtures.json +17 -17
  28. package/nationalarchives/components/card/macro-options.json +41 -17
  29. package/nationalarchives/components/card/template.njk +51 -48
  30. package/nationalarchives/components/checkboxes/_index.scss +1 -0
  31. package/nationalarchives/components/checkboxes/checkboxes.css +1 -0
  32. package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -0
  33. package/nationalarchives/components/checkboxes/checkboxes.scss +143 -0
  34. package/nationalarchives/components/checkboxes/checkboxes.stories.js +238 -0
  35. package/nationalarchives/components/checkboxes/fixtures.json +4 -0
  36. package/nationalarchives/components/checkboxes/macro-options.json +102 -0
  37. package/nationalarchives/components/checkboxes/macro.njk +3 -0
  38. package/nationalarchives/components/checkboxes/template.njk +35 -0
  39. package/nationalarchives/components/cookie-banner/cookie-banner.css +1 -1
  40. package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
  41. package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
  42. package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
  43. package/nationalarchives/components/cookie-banner/cookie-banner.mjs +19 -16
  44. package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +103 -42
  45. package/nationalarchives/components/cookie-banner/fixtures.json +54 -8
  46. package/nationalarchives/components/cookie-banner/macro-options.json +19 -1
  47. package/nationalarchives/components/cookie-banner/template.njk +1 -1
  48. package/nationalarchives/components/date-input/_index.scss +1 -0
  49. package/nationalarchives/components/date-input/date-input.css +1 -0
  50. package/nationalarchives/components/date-input/date-input.css.map +1 -0
  51. package/nationalarchives/components/date-input/date-input.scss +48 -0
  52. package/nationalarchives/components/date-input/date-input.stories.js +116 -0
  53. package/nationalarchives/components/date-input/fixtures.json +4 -0
  54. package/nationalarchives/components/date-input/macro-options.json +96 -0
  55. package/nationalarchives/components/date-input/macro.njk +3 -0
  56. package/nationalarchives/components/date-input/template.njk +45 -0
  57. package/nationalarchives/components/date-search/_index.scss +1 -0
  58. package/nationalarchives/components/date-search/date-search.css +1 -0
  59. package/nationalarchives/components/date-search/date-search.css.map +1 -0
  60. package/nationalarchives/components/date-search/date-search.scss +27 -0
  61. package/nationalarchives/components/date-search/date-search.stories.js +121 -0
  62. package/nationalarchives/components/date-search/fixtures.json +4 -0
  63. package/nationalarchives/components/date-search/macro-options.json +94 -0
  64. package/nationalarchives/components/date-search/macro.njk +3 -0
  65. package/nationalarchives/components/date-search/template.njk +27 -0
  66. package/nationalarchives/components/featured-records/featured-records.css +1 -1
  67. package/nationalarchives/components/featured-records/featured-records.css.map +1 -1
  68. package/nationalarchives/components/filters/filters.css +1 -1
  69. package/nationalarchives/components/filters/filters.css.map +1 -1
  70. package/nationalarchives/components/filters/filters.scss +0 -8
  71. package/nationalarchives/components/filters/template.njk +2 -2
  72. package/nationalarchives/components/footer/footer.css +1 -1
  73. package/nationalarchives/components/footer/footer.css.map +1 -1
  74. package/nationalarchives/components/footer/footer.scss +3 -5
  75. package/nationalarchives/components/footer/footer.stories.js +1 -1
  76. package/nationalarchives/components/footer/template.njk +13 -9
  77. package/nationalarchives/components/gallery/gallery.css +1 -1
  78. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  79. package/nationalarchives/components/gallery/gallery.scss +0 -11
  80. package/nationalarchives/components/gallery/gallery.stories.js +8 -10
  81. package/nationalarchives/components/gallery/template.njk +1 -1
  82. package/nationalarchives/components/grid/grid.css +1 -1
  83. package/nationalarchives/components/grid/grid.css.map +1 -1
  84. package/nationalarchives/components/grid/grid.scss +12 -0
  85. package/nationalarchives/components/grid/grid.stories.js +12 -0
  86. package/nationalarchives/components/header/header.css +1 -1
  87. package/nationalarchives/components/header/header.css.map +1 -1
  88. package/nationalarchives/components/header/header.scss +36 -41
  89. package/nationalarchives/components/header/header.stories.js +0 -41
  90. package/nationalarchives/components/header/template.njk +3 -3
  91. package/nationalarchives/components/hero/hero.css +1 -1
  92. package/nationalarchives/components/hero/hero.css.map +1 -1
  93. package/nationalarchives/components/hero/hero.scss +3 -7
  94. package/nationalarchives/components/hero/hero.stories.js +6 -0
  95. package/nationalarchives/components/index-grid/fixtures.json +324 -1
  96. package/nationalarchives/components/index-grid/index-grid.css +1 -1
  97. package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
  98. package/nationalarchives/components/index-grid/index-grid.scss +13 -10
  99. package/nationalarchives/components/index-grid/index-grid.stories.js +27 -14
  100. package/nationalarchives/components/index-grid/macro-options.json +34 -29
  101. package/nationalarchives/components/index-grid/template.njk +13 -8
  102. package/nationalarchives/components/message/message.css +1 -1
  103. package/nationalarchives/components/message/message.css.map +1 -1
  104. package/nationalarchives/components/message/message.scss +1 -6
  105. package/nationalarchives/components/message/template.njk +1 -1
  106. package/nationalarchives/components/pagination/macro-options.json +6 -0
  107. package/nationalarchives/components/pagination/pagination.css +1 -1
  108. package/nationalarchives/components/pagination/pagination.css.map +1 -1
  109. package/nationalarchives/components/pagination/pagination.scss +4 -0
  110. package/nationalarchives/components/pagination/pagination.stories.js +63 -2
  111. package/nationalarchives/components/pagination/template.njk +39 -17
  112. package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
  113. package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
  114. package/nationalarchives/components/phase-banner/phase-banner.scss +2 -3
  115. package/nationalarchives/components/picture/picture.css +1 -1
  116. package/nationalarchives/components/picture/picture.css.map +1 -1
  117. package/nationalarchives/components/picture/picture.js.map +1 -1
  118. package/nationalarchives/components/picture/picture.mjs +0 -4
  119. package/nationalarchives/components/picture/picture.scss +1 -1
  120. package/nationalarchives/components/picture/template.njk +1 -1
  121. package/nationalarchives/components/radios/_index.scss +1 -0
  122. package/nationalarchives/components/radios/fixtures.json +4 -0
  123. package/nationalarchives/components/radios/macro-options.json +102 -0
  124. package/nationalarchives/components/radios/macro.njk +3 -0
  125. package/nationalarchives/components/radios/radios.css +1 -0
  126. package/nationalarchives/components/radios/radios.css.map +1 -0
  127. package/nationalarchives/components/radios/radios.scss +131 -0
  128. package/nationalarchives/components/radios/radios.stories.js +241 -0
  129. package/nationalarchives/components/radios/template.njk +35 -0
  130. package/nationalarchives/components/search-field/_index.scss +1 -0
  131. package/nationalarchives/components/search-field/fixtures.json +4 -0
  132. package/nationalarchives/components/search-field/macro-options.json +68 -0
  133. package/nationalarchives/components/search-field/macro.njk +3 -0
  134. package/nationalarchives/components/search-field/search-field.css +1 -0
  135. package/nationalarchives/components/search-field/search-field.css.map +1 -0
  136. package/nationalarchives/components/search-field/search-field.scss +32 -0
  137. package/nationalarchives/components/search-field/search-field.stories.js +88 -0
  138. package/nationalarchives/components/search-field/template.njk +32 -0
  139. package/nationalarchives/components/select/_index.scss +1 -0
  140. package/nationalarchives/components/select/fixtures.json +4 -0
  141. package/nationalarchives/components/select/macro-options.json +114 -0
  142. package/nationalarchives/components/select/macro.njk +3 -0
  143. package/nationalarchives/components/select/select.css +1 -0
  144. package/nationalarchives/components/select/select.css.map +1 -0
  145. package/nationalarchives/components/select/select.scss +51 -0
  146. package/nationalarchives/components/select/select.stories.js +194 -0
  147. package/nationalarchives/components/select/template.njk +29 -0
  148. package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -1
  149. package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -1
  150. package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +3 -0
  151. package/nationalarchives/components/sensitive-image/template.njk +1 -1
  152. package/nationalarchives/components/skip-link/skip-link.css +1 -1
  153. package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
  154. package/nationalarchives/components/skip-link/skip-link.stories.js +4 -1
  155. package/nationalarchives/components/skip-link/template.njk +1 -1
  156. package/nationalarchives/components/tabs/tabs.css +1 -1
  157. package/nationalarchives/components/tabs/tabs.css.map +1 -1
  158. package/nationalarchives/components/tabs/tabs.js +1 -1
  159. package/nationalarchives/components/tabs/tabs.js.map +1 -1
  160. package/nationalarchives/components/tabs/tabs.mjs +1 -1
  161. package/nationalarchives/components/tabs/tabs.scss +11 -1
  162. package/nationalarchives/components/tabs/tabs.stories.js +6 -3
  163. package/nationalarchives/components/tabs/template.njk +1 -1
  164. package/nationalarchives/components/text-input/_index.scss +1 -0
  165. package/nationalarchives/components/text-input/fixtures.json +4 -0
  166. package/nationalarchives/components/text-input/macro-options.json +118 -0
  167. package/nationalarchives/components/text-input/macro.njk +3 -0
  168. package/nationalarchives/components/text-input/template.njk +30 -0
  169. package/nationalarchives/components/text-input/text-input.css +1 -0
  170. package/nationalarchives/components/text-input/text-input.css.map +1 -0
  171. package/nationalarchives/components/text-input/text-input.scss +44 -0
  172. package/nationalarchives/components/text-input/text-input.stories.js +188 -0
  173. package/nationalarchives/components/textarea/_index.scss +1 -0
  174. package/nationalarchives/components/textarea/fixtures.json +4 -0
  175. package/nationalarchives/components/textarea/macro-options.json +106 -0
  176. package/nationalarchives/components/textarea/macro.njk +3 -0
  177. package/nationalarchives/components/textarea/template.njk +27 -0
  178. package/nationalarchives/components/textarea/textarea.css +1 -0
  179. package/nationalarchives/components/textarea/textarea.css.map +1 -0
  180. package/nationalarchives/components/textarea/textarea.scss +45 -0
  181. package/nationalarchives/components/textarea/textarea.stories.js +127 -0
  182. package/nationalarchives/lib/cookies.mjs +172 -63
  183. package/nationalarchives/prototype-kit.css +2 -2
  184. package/nationalarchives/prototype-kit.css.map +1 -1
  185. package/nationalarchives/prototype-kit.scss +0 -8
  186. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +449 -91
  187. package/nationalarchives/stories/utilities/forms/forms.mdx +117 -0
  188. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +1 -0
  189. package/nationalarchives/stories/utilities/tables/tables.mdx +8 -0
  190. package/nationalarchives/stories/utilities/tables/tables.stories.js +45 -0
  191. package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +59 -19
  192. package/nationalarchives/stories/utilities/typography/typography.stories.js +0 -6
  193. package/nationalarchives/templates/layouts/_generic.njk +1 -1
  194. package/nationalarchives/templates/layouts/_prototype-kit.njk +2 -0
  195. package/nationalarchives/tests/cookies.test.js +427 -0
  196. package/nationalarchives/tests/uuid.test.js +17 -0
  197. package/nationalarchives/tools/_colour.scss +50 -27
  198. package/nationalarchives/tools/_typography.scss +0 -1
  199. package/nationalarchives/utilities/_a11y.scss +6 -2
  200. package/nationalarchives/utilities/_colour.scss +10 -6
  201. package/nationalarchives/utilities/_debug.scss +3 -4
  202. package/nationalarchives/utilities/_forms.scss +93 -0
  203. package/nationalarchives/utilities/_index.scss +2 -0
  204. package/nationalarchives/utilities/_lists.scss +6 -1
  205. package/nationalarchives/utilities/_overrides.scss +1 -1
  206. package/nationalarchives/utilities/_tables.scss +86 -0
  207. package/nationalarchives/utilities/_typography.scss +71 -77
  208. package/nationalarchives/variables/_colour.scss +15 -10
  209. package/nationalarchives/variables/_forms.scss +2 -0
  210. package/nationalarchives/variables/_index.scss +1 -0
  211. package/nationalarchives/variables/_typography.scss +2 -2
  212. package/package.json +19 -19
  213. package/nationalarchives/stories/utilities/overrides/overrides.mdx +0 -53
@@ -6,11 +6,3 @@
6
6
  );
7
7
 
8
8
  @use "all";
9
-
10
- .tna-template__body {
11
- p {
12
- color: inherit;
13
- font-family: inherit;
14
- font-weight: inherit;
15
- }
16
- }
@@ -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 Checkboxes from "../../../components/checkboxes/template.njk";
5
6
  import FeaturedRecords from "../../../components/featured-records/template.njk";
6
7
  import Footer from "../../../components/footer/template.njk";
7
8
  import CookieBanner from "../../../components/cookie-banner/template.njk";
@@ -13,7 +14,11 @@ import Message from "../../../components/message/template.njk";
13
14
  import Pagination from "../../../components/pagination/template.njk";
14
15
  import PhaseBanner from "../../../components/phase-banner/template.njk";
15
16
  import Picture from "../../../components/picture/template.njk";
17
+ import Radios from "../../../components/radios/template.njk";
18
+ import Select from "../../../components/select/template.njk";
16
19
  import Tabs from "../../../components/tabs/template.njk";
20
+ import TextInput from "../../../components/text-input/template.njk";
21
+ import Textarea from "../../../components/textarea/template.njk";
17
22
 
18
23
  const argTypes = {
19
24
  theme: {
@@ -28,7 +33,7 @@ const argTypes = {
28
33
  },
29
34
  accent: {
30
35
  control: "radio",
31
- options: ["none", "black", "yellow", "pink", "orange", "green", "blue"],
36
+ options: ["none", "yellow", "pink", "orange", "green", "blue"],
32
37
  },
33
38
  };
34
39
 
@@ -64,28 +69,26 @@ const Template = ({ theme, accent }) => {
64
69
  theme === "system"
65
70
  ? "tna-template--system-theme"
66
71
  : theme === "light"
67
- ? "tna-template--light-theme"
68
- : theme === "dark"
69
- ? "tna-template--dark-theme"
70
- : theme === "light high-contrast"
71
- ? "tna-template--light-theme tna-template--high-contrast-theme"
72
- : theme === "dark high-contrast"
73
- ? "tna-template--dark-theme tna-template--high-contrast-theme"
74
- : ""
72
+ ? "tna-template--light-theme"
73
+ : theme === "dark"
74
+ ? "tna-template--dark-theme"
75
+ : theme === "light high-contrast"
76
+ ? "tna-template--light-theme tna-template--high-contrast-theme"
77
+ : theme === "dark high-contrast"
78
+ ? "tna-template--dark-theme tna-template--high-contrast-theme"
79
+ : ""
75
80
  } ${
76
- accent === "black"
77
- ? "tna-template--black-accent"
78
- : accent === "yellow"
81
+ accent === "yellow"
79
82
  ? "tna-template--yellow-accent"
80
83
  : accent === "pink"
81
- ? "tna-template--pink-accent"
82
- : accent === "orange"
83
- ? "tna-template--orange-accent"
84
- : accent === "green"
85
- ? "tna-template--green-accent"
86
- : accent === "blue"
87
- ? "tna-template--blue-accent"
88
- : ""
84
+ ? "tna-template--pink-accent"
85
+ : accent === "orange"
86
+ ? "tna-template--orange-accent"
87
+ : accent === "green"
88
+ ? "tna-template--green-accent"
89
+ : accent === "blue"
90
+ ? "tna-template--blue-accent"
91
+ : ""
89
92
  }">
90
93
  <div class="tna-template__body tna-template__body--padded">
91
94
  <!--
@@ -258,7 +261,6 @@ const Template = ({ theme, accent }) => {
258
261
  params: {
259
262
  text: "Primary button",
260
263
  href: "#",
261
- classes: "tna-button--solid-hover",
262
264
  },
263
265
  })}
264
266
  </div>
@@ -446,64 +448,68 @@ const Template = ({ theme, accent }) => {
446
448
  classes: "tna-hero--demo",
447
449
  },
448
450
  })}
449
- <div class="tna-container tna-section tna-!--padding-bottom-s">
450
- <div class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
451
- ${Card({
452
- params: {
453
- ...cardDefaultOptions,
454
- classes: "tna-!--margin-bottom-m",
455
- },
456
- })}
457
- </div>
458
- <div class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
459
- ${Card({
460
- params: {
461
- ...cardDefaultOptions,
462
- style: "boxed",
463
- classes: "tna-!--margin-bottom-m",
464
- },
465
- })}
466
- </div>
467
- <div class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
468
- ${Card({
469
- params: {
470
- ...cardDefaultOptions,
471
- style: "accent",
472
- classes: "tna-!--margin-bottom-m",
473
- },
474
- })}
475
- </div>
451
+ <div class="tna-section tna-!--padding-bottom-s">
452
+ <ul class="tna-ul tna-ul--plain tna-container">
453
+ <li class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
454
+ ${Card({
455
+ params: {
456
+ ...cardDefaultOptions,
457
+ classes: "tna-!--margin-bottom-m",
458
+ },
459
+ })}
460
+ </li>
461
+ <li class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
462
+ ${Card({
463
+ params: {
464
+ ...cardDefaultOptions,
465
+ style: "boxed",
466
+ classes: "tna-!--margin-bottom-m",
467
+ },
468
+ })}
469
+ </li>
470
+ <li class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
471
+ ${Card({
472
+ params: {
473
+ ...cardDefaultOptions,
474
+ style: "accent",
475
+ classes: "tna-!--margin-bottom-m",
476
+ },
477
+ })}
478
+ </li>
479
+ </ul>
476
480
  </div>
477
481
  <hr>
478
- <div class="tna-container tna-section">
479
- <div class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
480
- ${Card({
481
- params: {
482
- ...cardDefaultOptions,
483
- horizontal: true,
484
- classes: "tna-!--margin-bottom-m",
485
- },
486
- })}
487
- </div>
488
- <div class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
489
- ${Card({
490
- params: {
491
- ...cardDefaultOptions,
492
- horizontal: true,
493
- style: "boxed",
494
- classes: "tna-!--margin-bottom-m",
495
- },
496
- })}
497
- </div>
498
- <div class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
499
- ${Card({
500
- params: {
501
- ...cardDefaultOptions,
502
- horizontal: true,
503
- style: "accent",
504
- },
505
- })}
506
- </div>
482
+ <div class="tna-section">
483
+ <ul class="tna-ul tna-ul--plain tna-container">
484
+ <li class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
485
+ ${Card({
486
+ params: {
487
+ ...cardDefaultOptions,
488
+ horizontal: true,
489
+ classes: "tna-!--margin-bottom-m",
490
+ },
491
+ })}
492
+ </li>
493
+ <li class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
494
+ ${Card({
495
+ params: {
496
+ ...cardDefaultOptions,
497
+ horizontal: true,
498
+ style: "boxed",
499
+ classes: "tna-!--margin-bottom-m",
500
+ },
501
+ })}
502
+ </li>
503
+ <li class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
504
+ ${Card({
505
+ params: {
506
+ ...cardDefaultOptions,
507
+ horizontal: true,
508
+ style: "accent",
509
+ },
510
+ })}
511
+ </li>
512
+ </ul>
507
513
  </div>
508
514
  <hr>
509
515
  <div class="tna-container tna-section">
@@ -611,8 +617,10 @@ const Template = ({ theme, accent }) => {
611
617
  <div class="tna-section">
612
618
  ${IndexGrid({
613
619
  params: {
614
- heading: { title: "My dogs 1", level: 3, href: "#" },
615
- items: Array(12)
620
+ title: "My dogs 1",
621
+ headingLevel: 3,
622
+ headingHref: "#",
623
+ items: Array(6)
616
624
  .fill({
617
625
  ...{
618
626
  href: "#",
@@ -679,7 +687,91 @@ const Template = ({ theme, accent }) => {
679
687
  next: {
680
688
  href: "#",
681
689
  },
682
- classes: "tna-pagination--demo",
690
+ classes: "tna-pagination--demo tna-!--margin-top-m",
691
+ },
692
+ })}
693
+ <div class="tna-button-group">
694
+ <a href="#" class="tna-button" role="button">Primary button</a>
695
+ <a href="#" class="tna-button tna-button--accent" role="button">Accent button</a>
696
+ <a href="" class="tna-button tna-button--plain" role="button">Plain button</a>
697
+ </div>
698
+ </div>
699
+ </div>
700
+ </div>
701
+ <div class="tna-section tna-background-tint">
702
+ ${IndexGrid({
703
+ params: {
704
+ title: "My dogs 2",
705
+ headingLevel: 3,
706
+ headingHref: "#",
707
+ items: Array(6)
708
+ .fill({
709
+ ...{
710
+ href: "#",
711
+ src: "https://picsum.photos/id/237/800/600",
712
+ alt: "Photo of a puppy",
713
+ width: "800",
714
+ height: "600",
715
+ title: "Cat",
716
+ subtitle: "4 photos",
717
+ },
718
+ })
719
+ .map((item, index) => {
720
+ const pseudoRandom = ((index * 29) % 8) + 1;
721
+ return {
722
+ ...item,
723
+ href: `#/category-${index}`,
724
+ title: `Category #${index + 101}`,
725
+ subtitle: `${pseudoRandom} photos`,
726
+ };
727
+ }),
728
+ columns: 4,
729
+ columnsMedium: 3,
730
+ columnsSmall: 2,
731
+ columnsTiny: 1,
732
+ },
733
+ })}
734
+ <div class="tna-container">
735
+ <div class="tna-column tna-column--full">
736
+ ${Pagination({
737
+ params: {
738
+ landmarkLabel: "My dogs 2 results",
739
+ previous: {
740
+ href: "#",
741
+ },
742
+ items: [
743
+ {
744
+ number: 1,
745
+ href: "#",
746
+ },
747
+ {
748
+ ellipsis: true,
749
+ },
750
+ {
751
+ number: 6,
752
+ href: "#",
753
+ },
754
+ {
755
+ number: 7,
756
+ current: true,
757
+ href: "#",
758
+ },
759
+ {
760
+ number: 8,
761
+ href: "#",
762
+ },
763
+ {
764
+ ellipsis: true,
765
+ },
766
+ {
767
+ number: 42,
768
+ href: "#",
769
+ },
770
+ ],
771
+ next: {
772
+ href: "#",
773
+ },
774
+ classes: "tna-pagination--demo tna-!--margin-top-m",
683
775
  },
684
776
  })}
685
777
  <div class="tna-button-group">
@@ -693,8 +785,10 @@ const Template = ({ theme, accent }) => {
693
785
  <div class="tna-section tna-background-contrast">
694
786
  ${IndexGrid({
695
787
  params: {
696
- heading: { title: "My dogs 2", level: 3, href: "#" },
697
- items: Array(12)
788
+ title: "My dogs 3",
789
+ headingLevel: 3,
790
+ headingHref: "#",
791
+ items: Array(6)
698
792
  .fill({
699
793
  ...{
700
794
  href: "#",
@@ -761,7 +855,7 @@ const Template = ({ theme, accent }) => {
761
855
  next: {
762
856
  href: "#",
763
857
  },
764
- classes: "tna-pagination--demo",
858
+ classes: "tna-pagination--demo tna-!--margin-top-m",
765
859
  },
766
860
  })}
767
861
  <div class="tna-button-group">
@@ -775,8 +869,10 @@ const Template = ({ theme, accent }) => {
775
869
  <div class="tna-section tna-background-accent-light">
776
870
  ${IndexGrid({
777
871
  params: {
778
- heading: { title: "My dogs 3", level: 3, href: "#" },
779
- items: Array(12)
872
+ title: "My dogs 4",
873
+ headingLevel: 3,
874
+ headingHref: "#",
875
+ items: Array(6)
780
876
  .fill({
781
877
  ...{
782
878
  href: "#",
@@ -843,7 +939,7 @@ const Template = ({ theme, accent }) => {
843
939
  next: {
844
940
  href: "#",
845
941
  },
846
- classes: "tna-pagination--demo",
942
+ classes: "tna-pagination--demo tna-!--margin-top-m",
847
943
  },
848
944
  })}
849
945
  <div class="tna-button-group">
@@ -857,8 +953,10 @@ const Template = ({ theme, accent }) => {
857
953
  <div class="tna-section tna-background-accent">
858
954
  ${IndexGrid({
859
955
  params: {
860
- heading: { title: "My dogs 4", level: 3, href: "#" },
861
- items: Array(12)
956
+ title: "My dogs 5",
957
+ headingLevel: 3,
958
+ headingHref: "#",
959
+ items: Array(6)
862
960
  .fill({
863
961
  ...{
864
962
  href: "#",
@@ -925,7 +1023,7 @@ const Template = ({ theme, accent }) => {
925
1023
  next: {
926
1024
  href: "#",
927
1025
  },
928
- classes: "tna-pagination--demo",
1026
+ classes: "tna-pagination--demo tna-!--margin-top-m",
929
1027
  },
930
1028
  })}
931
1029
  <div class="tna-button-group">
@@ -936,6 +1034,123 @@ const Template = ({ theme, accent }) => {
936
1034
  </div>
937
1035
  </div>
938
1036
  </div>
1037
+ <div class="tna-section">
1038
+ <div class="tna-container">
1039
+ <div class="tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny">
1040
+ <form>
1041
+ <h2 class="tna-heading tna-heading--l">
1042
+ Forms
1043
+ </h2>
1044
+ ${TextInput({
1045
+ params: {
1046
+ label: "Enter your name",
1047
+ headingLevel: 3,
1048
+ headingSize: "m",
1049
+ id: "name",
1050
+ name: "name",
1051
+ autofill: "name",
1052
+ },
1053
+ })}
1054
+ ${TextInput({
1055
+ params: {
1056
+ label: "Enter your email",
1057
+ headingLevel: 3,
1058
+ headingSize: "m",
1059
+ id: "email",
1060
+ name: "email",
1061
+ autofill: "email",
1062
+ },
1063
+ })}
1064
+ ${Select({
1065
+ params: {
1066
+ label: "Sort by",
1067
+ headingLevel: 3,
1068
+ headingSize: "m",
1069
+ id: "sort",
1070
+ name: "sort",
1071
+ items: [
1072
+ {
1073
+ text: "Relevance",
1074
+ value: "relevance",
1075
+ },
1076
+ {
1077
+ text: "Date",
1078
+ value: "date",
1079
+ },
1080
+ {
1081
+ text: "Title",
1082
+ value: "title",
1083
+ },
1084
+ ],
1085
+ },
1086
+ })}
1087
+ ${Radios({
1088
+ params: {
1089
+ label: "Type",
1090
+ headingLevel: 3,
1091
+ headingSize: "m",
1092
+ id: "type",
1093
+ name: "type",
1094
+ items: [
1095
+ {
1096
+ text: "Audio",
1097
+ value: "audio",
1098
+ },
1099
+ {
1100
+ text: "Image",
1101
+ value: "image",
1102
+ },
1103
+ {
1104
+ text: "Video",
1105
+ value: "video",
1106
+ },
1107
+ ],
1108
+ },
1109
+ })}
1110
+ ${Checkboxes({
1111
+ params: {
1112
+ label: "Categories",
1113
+ headingLevel: 3,
1114
+ headingSize: "m",
1115
+ id: "categories",
1116
+ name: "categories",
1117
+ items: [
1118
+ {
1119
+ text: "Alpha",
1120
+ value: "alpha",
1121
+ },
1122
+ {
1123
+ text: "Beta",
1124
+ value: "beta",
1125
+ },
1126
+ {
1127
+ text: "Gamma",
1128
+ value: "gamma",
1129
+ },
1130
+ ],
1131
+ },
1132
+ })}
1133
+ ${Textarea({
1134
+ params: {
1135
+ label: "Enter your feedback",
1136
+ headingLevel: 3,
1137
+ headingSize: "m",
1138
+ id: "feedback",
1139
+ name: "feedback",
1140
+ },
1141
+ })}
1142
+ <div class="tna-button-group">
1143
+ <button type="button" class="tna-button">
1144
+ Submit
1145
+ </button>
1146
+ <a href="#" class="tna-button tna-button--plain">
1147
+ Skip
1148
+ </a>
1149
+ </div>
1150
+ </form>
1151
+ </div>
1152
+ </div>
1153
+ </div>
939
1154
  </main>
940
1155
  ${Footer({
941
1156
  params: {
@@ -1068,7 +1283,7 @@ const Template = ({ theme, accent }) => {
1068
1283
  href: "#",
1069
1284
  },
1070
1285
  {
1071
- text: "Terms and condidtions",
1286
+ text: "Terms and conditions",
1072
1287
  href: "#",
1073
1288
  },
1074
1289
  {
@@ -1087,7 +1302,9 @@ const Template = ({ theme, accent }) => {
1087
1302
  };
1088
1303
 
1089
1304
  export const System = Template.bind({});
1090
- // System.parameters = { options: { showPanel: false } };
1305
+ System.parameters = {
1306
+ chromatic: { disableSnapshot: true },
1307
+ };
1091
1308
  System.args = {
1092
1309
  theme: "system",
1093
1310
  accent: "pink",
@@ -1116,3 +1333,144 @@ DarkHighContrast.args = {
1116
1333
  theme: "dark high-contrast",
1117
1334
  accent: "pink",
1118
1335
  };
1336
+
1337
+ const CombinationsTemplate = () => {
1338
+ const themes = [
1339
+ "tna-template--light-theme",
1340
+ "tna-template--light-theme tna-template--high-contrast-theme",
1341
+ "tna-template--dark-theme",
1342
+ "tna-template--dark-theme tna-template--high-contrast-theme",
1343
+ ];
1344
+
1345
+ const accents = [
1346
+ "",
1347
+ // "tna-template--black-accent",
1348
+ "tna-template--yellow-accent",
1349
+ "tna-template--pink-accent",
1350
+ "tna-template--orange-accent",
1351
+ "tna-template--green-accent",
1352
+ "tna-template--blue-accent",
1353
+ ];
1354
+
1355
+ const blocks = [
1356
+ "",
1357
+ "tna-background-tint",
1358
+ "tna-background-accent-light",
1359
+ "tna-background-accent",
1360
+ "tna-background-contrast",
1361
+ ];
1362
+
1363
+ return `<div class="tna-colour-contrast-demo">
1364
+ <div class="tna-colour-contrast-demo__header">
1365
+ <div class="tna-colour-contrast-demo__block">
1366
+ Blocks
1367
+ </div>
1368
+ ${blocks.reduce(
1369
+ (blockOutput, block) =>
1370
+ `${blockOutput}<div class="tna-colour-contrast-demo__block">
1371
+ ${block.replace(/^tna-background-/, "") || "Base"}
1372
+ </div>`,
1373
+ "",
1374
+ )}
1375
+ </div>
1376
+ <div class="tna-colour-contrast-demo__examples">
1377
+ ${themes.reduce(
1378
+ (themeOutput, theme) =>
1379
+ `${themeOutput}${accents.reduce(
1380
+ (
1381
+ accentOutput,
1382
+ accent,
1383
+ ) => `${accentOutput}<div class="tna-colour-contrast-demo__theme-accent">
1384
+ <div class="tna-colour-contrast-demo__example">
1385
+ <p>Theme: <strong>${theme
1386
+ .replace(/tna-template--/g, "")
1387
+ .replace(/-theme/g, "")}</strong></p>
1388
+ <p>Accent: <strong>${
1389
+ accent.replace(/tna-template--/g, "").replace(/-accent/g, "") ||
1390
+ "[none]"
1391
+ }</strong></p>
1392
+ </div>
1393
+ ${blocks.reduce(
1394
+ (blockOutput, block) =>
1395
+ `${blockOutput}<div class="tna-colour-contrast-demo__example tna-template ${theme} ${accent}">
1396
+ <div class="tna-template__body">
1397
+ <div class="tna-colour-contrast-demo__example-content ${block}">
1398
+ <p>Text</p>
1399
+ <p><a href="#"><strong>Link</strong></a> / <a href="#" class="tna-colour-contrast-demo__link--visited"><strong>Link (visited)</strong></a></p>
1400
+ <span class="tna-chip">Chip</span>
1401
+ <div class="tna-button-group">
1402
+ ${Button({
1403
+ params: {
1404
+ text: "Button",
1405
+ small: true,
1406
+ },
1407
+ })}
1408
+ ${Button({
1409
+ params: {
1410
+ text: "Button",
1411
+ small: true,
1412
+ accent: true,
1413
+ },
1414
+ })}
1415
+ ${Button({
1416
+ params: {
1417
+ text: "Button",
1418
+ small: true,
1419
+ plain: true,
1420
+ },
1421
+ })}
1422
+ <!--${Button({
1423
+ params: {
1424
+ text: "Button",
1425
+ accent: true,
1426
+ class: "tna-button--solid-hover",
1427
+ },
1428
+ })}-->
1429
+ </div>
1430
+ <!--${Pagination({
1431
+ params: {
1432
+ previous: {
1433
+ href: "#",
1434
+ },
1435
+ items: [
1436
+ {
1437
+ number: 1,
1438
+ href: "#",
1439
+ },
1440
+ {
1441
+ ellipsis: true,
1442
+ },
1443
+ {
1444
+ number: 7,
1445
+ current: true,
1446
+ href: "#",
1447
+ },
1448
+ {
1449
+ ellipsis: true,
1450
+ },
1451
+ {
1452
+ number: 42,
1453
+ href: "#",
1454
+ },
1455
+ ],
1456
+ next: {
1457
+ href: "#",
1458
+ },
1459
+ },
1460
+ })}-->
1461
+ </div>
1462
+ </div>
1463
+ </div>`,
1464
+ "",
1465
+ )}
1466
+ </div>`,
1467
+ "",
1468
+ )}`,
1469
+ "",
1470
+ )}
1471
+ </div>
1472
+ </div>`;
1473
+ };
1474
+
1475
+ export const Combinations = CombinationsTemplate.bind({});
1476
+ Combinations.args = {};