@nationalarchives/frontend 0.1.65 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/config/.eslintrc.js +1 -1
  2. package/config/.htmlvalidate.json +12 -5
  3. package/config/stylelint.config.js +1 -0
  4. package/nationalarchives/all.css +1 -1
  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 +0 -18
  9. package/nationalarchives/components/_forms.scss +9 -0
  10. package/nationalarchives/components/_index.scss +2 -35
  11. package/nationalarchives/components/_presentation.scss +23 -0
  12. package/nationalarchives/components/accordion/accordion.css.map +1 -1
  13. package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
  14. package/nationalarchives/components/button/button.css +1 -1
  15. package/nationalarchives/components/button/button.css.map +1 -1
  16. package/nationalarchives/components/button/button.scss +9 -9
  17. package/nationalarchives/components/card/card.css +1 -1
  18. package/nationalarchives/components/card/card.css.map +1 -1
  19. package/nationalarchives/components/checkboxes/checkboxes.css +1 -1
  20. package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
  21. package/nationalarchives/components/checkboxes/checkboxes.njk +1 -1
  22. package/nationalarchives/components/checkboxes/checkboxes.scss +1 -1
  23. package/nationalarchives/components/checkboxes/macro-options.json +6 -0
  24. package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
  25. package/nationalarchives/components/date-input/date-input.css +1 -1
  26. package/nationalarchives/components/date-input/date-input.css.map +1 -1
  27. package/nationalarchives/components/date-input/date-input.scss +2 -2
  28. package/nationalarchives/components/date-input/fixtures.json +5 -5
  29. package/nationalarchives/components/date-input/template.njk +1 -1
  30. package/nationalarchives/components/date-search/date-search.css +1 -1
  31. package/nationalarchives/components/date-search/date-search.css.map +1 -1
  32. package/nationalarchives/components/date-search/date-search.scss +2 -2
  33. package/nationalarchives/components/details/details.css.map +1 -1
  34. package/nationalarchives/components/error-summary/error-summary.css +1 -1
  35. package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
  36. package/nationalarchives/components/error-summary/error-summary.js +1 -1
  37. package/nationalarchives/components/error-summary/error-summary.js.map +1 -1
  38. package/nationalarchives/components/error-summary/error-summary.mjs +1 -1
  39. package/nationalarchives/components/error-summary/error-summary.scss +3 -4
  40. package/nationalarchives/components/files-list/_index.scss +1 -0
  41. package/nationalarchives/components/files-list/files-list.css +1 -0
  42. package/nationalarchives/components/files-list/files-list.css.map +1 -0
  43. package/nationalarchives/components/{files/files.scss → files-list/files-list.scss} +2 -1
  44. package/nationalarchives/components/files-list/fixtures.json +71 -0
  45. package/nationalarchives/components/files-list/macro.njk +3 -0
  46. package/nationalarchives/components/files-list/template.njk +33 -0
  47. package/nationalarchives/components/footer/footer.css.map +1 -1
  48. package/nationalarchives/components/gallery/fixtures.json +1 -1
  49. package/nationalarchives/components/gallery/gallery.css +1 -1
  50. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  51. package/nationalarchives/components/gallery/gallery.scss +5 -6
  52. package/nationalarchives/components/gallery/template.njk +11 -7
  53. package/nationalarchives/components/global-header/global-header.css.map +1 -1
  54. package/nationalarchives/components/header/header.css.map +1 -1
  55. package/nationalarchives/components/hero/hero.css +1 -1
  56. package/nationalarchives/components/hero/hero.css.map +1 -1
  57. package/nationalarchives/components/hero/hero.scss +0 -24
  58. package/nationalarchives/components/index-grid/index-grid.css +1 -1
  59. package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
  60. package/nationalarchives/components/index-grid/index-grid.scss +1 -1
  61. package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
  62. package/nationalarchives/components/picture/picture.css.map +1 -1
  63. package/nationalarchives/components/quick-filters/quick-filters.css +1 -1
  64. package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
  65. package/nationalarchives/components/radios/radios.css +1 -1
  66. package/nationalarchives/components/radios/radios.css.map +1 -1
  67. package/nationalarchives/components/radios/radios.scss +1 -1
  68. package/nationalarchives/components/records-list/_index.scss +1 -0
  69. package/nationalarchives/components/records-list/fixtures.json +42 -0
  70. package/nationalarchives/components/records-list/macro.njk +3 -0
  71. package/nationalarchives/components/records-list/records-list.css +1 -0
  72. package/nationalarchives/components/records-list/records-list.css.map +1 -0
  73. package/nationalarchives/components/{featured-records/featured-records.scss → records-list/records-list.scss} +1 -1
  74. package/nationalarchives/components/records-list/template.njk +21 -0
  75. package/nationalarchives/components/search-field/search-field.css +1 -1
  76. package/nationalarchives/components/search-field/search-field.css.map +1 -1
  77. package/nationalarchives/components/search-field/search-field.scss +1 -1
  78. package/nationalarchives/components/select/select.css +1 -1
  79. package/nationalarchives/components/select/select.css.map +1 -1
  80. package/nationalarchives/components/select/select.scss +2 -2
  81. package/nationalarchives/components/sidebar/fixtures.json +12 -2
  82. package/nationalarchives/components/sidebar/sidebar.css +1 -1
  83. package/nationalarchives/components/sidebar/sidebar.css.map +1 -1
  84. package/nationalarchives/components/sidebar/template.njk +9 -0
  85. package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
  86. package/nationalarchives/components/tabs/tabs.css.map +1 -1
  87. package/nationalarchives/components/text-input/text-input.css +1 -1
  88. package/nationalarchives/components/text-input/text-input.css.map +1 -1
  89. package/nationalarchives/components/text-input/text-input.scss +2 -2
  90. package/nationalarchives/components/textarea/textarea.css +1 -1
  91. package/nationalarchives/components/textarea/textarea.css.map +1 -1
  92. package/nationalarchives/components/textarea/textarea.scss +2 -2
  93. package/nationalarchives/components/warning/warning.css +1 -1
  94. package/nationalarchives/components/warning/warning.css.map +1 -1
  95. package/nationalarchives/components/warning/warning.scss +1 -0
  96. package/nationalarchives/global-header-package.css +1 -1
  97. package/nationalarchives/global-header-package.css.map +1 -1
  98. package/nationalarchives/global-header-package.scss +1 -1
  99. package/nationalarchives/print.css +1 -1
  100. package/nationalarchives/print.css.map +1 -1
  101. package/nationalarchives/prototype-kit.css +1 -1
  102. package/nationalarchives/prototype-kit.css.map +1 -1
  103. package/nationalarchives/tools/_colour.scss +25 -50
  104. package/nationalarchives/utilities/_columns.scss +1 -1
  105. package/nationalarchives/utilities/_index.scss +1 -0
  106. package/nationalarchives/utilities/_reset.scss +2 -8
  107. package/nationalarchives/utilities/{_colour.scss → colour/_index.scss} +2 -2
  108. package/nationalarchives/utilities/{_forms.scss → forms/_index.scss} +6 -6
  109. package/nationalarchives/utilities/grid/macro.njk +3 -0
  110. package/nationalarchives/utilities/{_lists.scss → lists/_index.scss} +16 -7
  111. package/nationalarchives/utilities/{_overrides.scss → overrides/_index.scss} +2 -2
  112. package/nationalarchives/utilities/{_tables.scss → tables/_index.scss} +5 -5
  113. package/nationalarchives/utilities/{_typography.scss → typography/_index.scss} +5 -5
  114. package/nationalarchives/variables/_colour.scss +12 -5
  115. package/package.json +1 -1
  116. package/nationalarchives/components/accordion/accordion.stories.js +0 -432
  117. package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +0 -128
  118. package/nationalarchives/components/button/button-group.stories.js +0 -114
  119. package/nationalarchives/components/button/button.stories.js +0 -207
  120. package/nationalarchives/components/card/card.stories.js +0 -402
  121. package/nationalarchives/components/checkboxes/checkboxes.stories.js +0 -241
  122. package/nationalarchives/components/compound-filters/compound-filters.stories.js +0 -61
  123. package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +0 -250
  124. package/nationalarchives/components/date-input/date-input.stories.js +0 -119
  125. package/nationalarchives/components/date-search/date-search.stories.js +0 -124
  126. package/nationalarchives/components/details/details.stories.js +0 -33
  127. package/nationalarchives/components/error-summary/error-summary.stories.js +0 -59
  128. package/nationalarchives/components/featured-records/_index.scss +0 -1
  129. package/nationalarchives/components/featured-records/featured-records.css +0 -1
  130. package/nationalarchives/components/featured-records/featured-records.css.map +0 -1
  131. package/nationalarchives/components/featured-records/featured-records.stories.js +0 -50
  132. package/nationalarchives/components/featured-records/fixtures.json +0 -42
  133. package/nationalarchives/components/featured-records/macro.njk +0 -3
  134. package/nationalarchives/components/featured-records/template.njk +0 -21
  135. package/nationalarchives/components/files/_index.scss +0 -1
  136. package/nationalarchives/components/files/files.css +0 -1
  137. package/nationalarchives/components/files/files.css.map +0 -1
  138. package/nationalarchives/components/files/files.stories.js +0 -59
  139. package/nationalarchives/components/files/fixtures.json +0 -71
  140. package/nationalarchives/components/files/macro.njk +0 -3
  141. package/nationalarchives/components/files/template.njk +0 -33
  142. package/nationalarchives/components/footer/footer.stories.js +0 -241
  143. package/nationalarchives/components/gallery/gallery.stories.js +0 -87
  144. package/nationalarchives/components/global-header/global-header.stories.js +0 -364
  145. package/nationalarchives/components/grid/_index.scss +0 -1
  146. package/nationalarchives/components/grid/grid.css +0 -1
  147. package/nationalarchives/components/grid/grid.css.map +0 -1
  148. package/nationalarchives/components/grid/grid.stories.js +0 -279
  149. package/nationalarchives/components/grid/macro.njk +0 -3
  150. package/nationalarchives/components/header/header.stories.js +0 -239
  151. package/nationalarchives/components/hero/hero.stories.js +0 -326
  152. package/nationalarchives/components/index-grid/index-grid.stories.js +0 -128
  153. package/nationalarchives/components/pagination/pagination.stories.js +0 -532
  154. package/nationalarchives/components/phase-banner/phase-banner.stories.js +0 -39
  155. package/nationalarchives/components/picture/picture.stories.js +0 -75
  156. package/nationalarchives/components/quick-filters/quick-filters.stories.js +0 -76
  157. package/nationalarchives/components/radios/radios.stories.js +0 -244
  158. package/nationalarchives/components/search-field/search-field.stories.js +0 -88
  159. package/nationalarchives/components/search-filters/_index.scss +0 -1
  160. package/nationalarchives/components/search-filters/fixtures.json +0 -16
  161. package/nationalarchives/components/search-filters/macro-options.json +0 -39
  162. package/nationalarchives/components/search-filters/macro.njk +0 -3
  163. package/nationalarchives/components/search-filters/search-filters.css +0 -1
  164. package/nationalarchives/components/search-filters/search-filters.css.map +0 -1
  165. package/nationalarchives/components/search-filters/search-filters.js +0 -2
  166. package/nationalarchives/components/search-filters/search-filters.js.map +0 -1
  167. package/nationalarchives/components/search-filters/search-filters.mjs +0 -67
  168. package/nationalarchives/components/search-filters/search-filters.scss +0 -198
  169. package/nationalarchives/components/search-filters/search-filters.stories.js +0 -207
  170. package/nationalarchives/components/search-filters/template.njk +0 -108
  171. package/nationalarchives/components/select/select.stories.js +0 -197
  172. package/nationalarchives/components/sensitive-image/_index.scss +0 -1
  173. package/nationalarchives/components/sensitive-image/fixtures.json +0 -51
  174. package/nationalarchives/components/sensitive-image/macro-options.json +0 -58
  175. package/nationalarchives/components/sensitive-image/macro.njk +0 -3
  176. package/nationalarchives/components/sensitive-image/sensitive-image.css +0 -1
  177. package/nationalarchives/components/sensitive-image/sensitive-image.css.map +0 -1
  178. package/nationalarchives/components/sensitive-image/sensitive-image.js +0 -2
  179. package/nationalarchives/components/sensitive-image/sensitive-image.js.map +0 -1
  180. package/nationalarchives/components/sensitive-image/sensitive-image.mjs +0 -23
  181. package/nationalarchives/components/sensitive-image/sensitive-image.scss +0 -85
  182. package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +0 -86
  183. package/nationalarchives/components/sensitive-image/template.njk +0 -11
  184. package/nationalarchives/components/sidebar/sidebar.stories.js +0 -227
  185. package/nationalarchives/components/skip-link/skip-link.stories.js +0 -76
  186. package/nationalarchives/components/tabs/tabs.stories.js +0 -300
  187. package/nationalarchives/components/text-input/text-input.stories.js +0 -188
  188. package/nationalarchives/components/textarea/textarea.stories.js +0 -130
  189. package/nationalarchives/components/warning/warning.stories.js +0 -39
  190. package/nationalarchives/stories/intro.mdx +0 -13
  191. package/nationalarchives/stories/utilities/colour-schemes/colour-combinations.stories.js +0 -293
  192. package/nationalarchives/stories/utilities/colour-schemes/colour-themes.stories.js +0 -1513
  193. package/nationalarchives/stories/utilities/forms/forms.mdx +0 -117
  194. package/nationalarchives/stories/utilities/lists/lists.stories.js +0 -212
  195. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +0 -42
  196. package/nationalarchives/stories/utilities/tables/tables.stories.js +0 -47
  197. package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +0 -94
  198. package/nationalarchives/stories/utilities/typography/headings.stories.js +0 -33
  199. package/nationalarchives/stories/utilities/typography/typography.stories.js +0 -91
  200. package/nationalarchives/components/{files → files-list}/macro-options.json +0 -0
  201. package/nationalarchives/components/{featured-records → records-list}/macro-options.json +0 -0
  202. package/nationalarchives/{components/grid/grid.scss → utilities/grid/_index.scss} +1 -1
  203. /package/nationalarchives/{components → utilities}/grid/fixtures.json +0 -0
  204. /package/nationalarchives/{components → utilities}/grid/macro-options.json +0 -0
  205. /package/nationalarchives/{components → utilities}/grid/template.njk +0 -0
@@ -1,207 +0,0 @@
1
- import Button from "./template.njk";
2
- import macroOptions from "./macro-options.json";
3
-
4
- const argTypes = {
5
- text: { control: "text" },
6
- href: { control: "text" },
7
- title: { control: "text" },
8
- icon: { control: "text" },
9
- iconSvg: { control: "text" },
10
- accent: { control: "boolean" },
11
- small: { control: "boolean" },
12
- plain: { control: "boolean" },
13
- iconOnly: { control: "boolean" },
14
- iconOnlyOnMobile: { control: "boolean" },
15
- rightAlignIcon: { control: "boolean" },
16
- buttonElement: { control: "boolean" },
17
- buttonType: { control: "text" },
18
- classes: { control: "text" },
19
- attributes: { control: "object" },
20
- };
21
-
22
- Object.keys(argTypes).forEach((argType) => {
23
- argTypes[argType].description = macroOptions.find(
24
- (option) => option.name === argType,
25
- )?.description;
26
- });
27
-
28
- export default {
29
- title: "Components/Button",
30
- argTypes,
31
- };
32
-
33
- const Template = ({
34
- text,
35
- href,
36
- title,
37
- icon,
38
- iconSvg,
39
- accent,
40
- small,
41
- plain,
42
- iconOnly,
43
- iconOnlyOnMobile,
44
- rightAlignIcon,
45
- buttonElement,
46
- buttonType,
47
- classes,
48
- attributes,
49
- }) =>
50
- Button({
51
- params: {
52
- text,
53
- href,
54
- title,
55
- icon,
56
- iconSvg,
57
- accent,
58
- small,
59
- plain,
60
- iconOnly,
61
- iconOnlyOnMobile,
62
- rightAlignIcon,
63
- buttonElement,
64
- buttonType,
65
- classes,
66
- attributes,
67
- },
68
- });
69
-
70
- export const Standard = Template.bind({});
71
- Standard.parameters = {
72
- chromatic: { disableSnapshot: true },
73
- };
74
- Standard.args = {
75
- text: "Button",
76
- href: "#",
77
- classes: "tna-button--demo",
78
- };
79
-
80
- export const Accent = Template.bind({});
81
- Accent.parameters = {
82
- chromatic: { disableSnapshot: true },
83
- };
84
- Accent.args = {
85
- text: "Button",
86
- href: "#",
87
- accent: true,
88
- classes: "tna-button--demo",
89
- };
90
-
91
- export const Icon = Template.bind({});
92
- Icon.parameters = {
93
- chromatic: { disableSnapshot: true },
94
- };
95
- Icon.args = {
96
- text: "Explore the collection",
97
- href: "#",
98
- icon: "map-location-dot",
99
- classes: "tna-button--demo",
100
- };
101
-
102
- export const RightAlignedIcon = Template.bind({});
103
- RightAlignedIcon.parameters = {
104
- chromatic: { disableSnapshot: true },
105
- };
106
- RightAlignedIcon.args = {
107
- text: "Search",
108
- href: "#",
109
- icon: "chevron-right",
110
- rightAlignIcon: true,
111
- classes: "tna-button--demo",
112
- };
113
-
114
- export const IconOnly = Template.bind({});
115
- IconOnly.parameters = {
116
- chromatic: { disableSnapshot: true },
117
- };
118
- IconOnly.args = {
119
- text: "Show as a list",
120
- href: "#",
121
- icon: "list",
122
- iconOnly: true,
123
- classes: "tna-button--demo",
124
- };
125
-
126
- export const Small = Template.bind({});
127
- Small.parameters = {
128
- chromatic: { disableSnapshot: true },
129
- };
130
- Small.args = {
131
- text: "Small button",
132
- href: "#",
133
- small: true,
134
- classes: "tna-button--demo",
135
- };
136
-
137
- export const SmallWithIcon = Template.bind({});
138
- SmallWithIcon.parameters = {
139
- chromatic: { disableSnapshot: true },
140
- };
141
- SmallWithIcon.args = {
142
- text: "Explore the collection",
143
- href: "#",
144
- icon: "map-location-dot",
145
- small: true,
146
- classes: "tna-button--demo",
147
- };
148
-
149
- export const SmallIconOnly = Template.bind({});
150
- SmallIconOnly.parameters = {
151
- chromatic: { disableSnapshot: true },
152
- };
153
- SmallIconOnly.args = {
154
- text: "Explore the collection",
155
- href: "#",
156
- icon: "map-location-dot",
157
- small: true,
158
- iconOnly: true,
159
- classes: "tna-button--demo",
160
- };
161
-
162
- export const Plain = Template.bind({});
163
- Plain.parameters = {
164
- chromatic: { disableSnapshot: true },
165
- };
166
- Plain.args = {
167
- text: "Plain button",
168
- href: "#",
169
- plain: true,
170
- classes: "tna-button--demo",
171
- };
172
-
173
- export const SmallPlain = Template.bind({});
174
- SmallPlain.parameters = {
175
- chromatic: { disableSnapshot: true },
176
- };
177
- SmallPlain.args = {
178
- text: "Plain small button",
179
- href: "#",
180
- small: true,
181
- plain: true,
182
- classes: "tna-button--demo",
183
- };
184
-
185
- export const SmallPlainIcon = Template.bind({});
186
- SmallPlainIcon.parameters = {
187
- chromatic: { disableSnapshot: true },
188
- };
189
- SmallPlainIcon.args = {
190
- text: "Plain small button",
191
- href: "#",
192
- icon: "map-location-dot",
193
- small: true,
194
- plain: true,
195
- classes: "tna-button--demo",
196
- };
197
-
198
- export const ButtonElement = Template.bind({});
199
- ButtonElement.parameters = {
200
- chromatic: { disableSnapshot: true },
201
- };
202
- ButtonElement.args = {
203
- text: "Button element",
204
- href: "#",
205
- buttonElement: true,
206
- classes: "tna-button--demo",
207
- };
@@ -1,402 +0,0 @@
1
- import Card from "./template.njk";
2
- import macroOptions from "./macro-options.json";
3
- import { customViewports } from "../../../../.storybook/viewports";
4
-
5
- const argTypes = {
6
- supertitle: { control: "text" },
7
- title: { control: "text" },
8
- headingLevel: { control: { type: "number", min: 1, max: 6 } },
9
- headingSize: { control: "inline-radio", options: ["s", "m", "l"] },
10
- href: { control: "text" },
11
- hrefClasses: { control: "text" },
12
- hrefAttributes: { control: "object" },
13
- imageSrc: { control: { type: "file", accept: ".jpg" } },
14
- imageAlt: { control: "text" },
15
- imageWidth: { control: { type: "number", min: 1 } },
16
- imageHeight: { control: { type: "number", min: 1 } },
17
- imageType: { control: "text" },
18
- imageSources: { control: "object" },
19
- lazyImage: { control: "boolean" },
20
- label: { control: "text" },
21
- labelColour: {
22
- control: "inline-radio",
23
- options: ["accent", "black", "pink", "orange", "yellow", "green", "blue"],
24
- },
25
- meta: { control: "object" },
26
- body: { control: "text" },
27
- text: { control: "text" },
28
- actions: { control: "object" },
29
- horizontal: { control: "boolean" },
30
- style: {
31
- control: "inline-radio",
32
- options: ["none", "contrast", "tint", "accent"],
33
- },
34
- plainSupertitle: { control: "boolean" },
35
- htmlElement: { control: "text" },
36
- classes: { control: "text" },
37
- attributes: { control: "object" },
38
- };
39
-
40
- Object.keys(argTypes).forEach((argType) => {
41
- const macroOption = macroOptions.find((option) => option.name === argType);
42
- argTypes[argType] = {
43
- ...argTypes[argType],
44
- description: macroOption?.description,
45
- };
46
- });
47
-
48
- export default {
49
- title: "Components/Card",
50
- argTypes,
51
- };
52
-
53
- const Template = ({
54
- supertitle,
55
- title,
56
- headingLevel,
57
- headingSize,
58
- href,
59
- hrefClasses,
60
- hrefAttributes,
61
- imageSrc,
62
- imageAlt,
63
- imageWidth,
64
- imageHeight,
65
- imageType,
66
- imageSources,
67
- lazyImage,
68
- label,
69
- labelColour,
70
- meta,
71
- body,
72
- text,
73
- actions,
74
- horizontal,
75
- style,
76
- plainSupertitle,
77
- htmlElement,
78
- classes,
79
- attributes,
80
- }) =>
81
- Card({
82
- params: {
83
- supertitle,
84
- title,
85
- headingLevel,
86
- headingSize,
87
- href,
88
- hrefClasses,
89
- hrefAttributes,
90
- imageSrc,
91
- imageAlt,
92
- imageWidth,
93
- imageHeight,
94
- imageType,
95
- imageSources,
96
- lazyImage,
97
- label,
98
- labelColour,
99
- meta,
100
- body,
101
- text,
102
- actions,
103
- horizontal,
104
- style,
105
- plainSupertitle,
106
- htmlElement,
107
- classes,
108
- attributes,
109
- },
110
- });
111
-
112
- export const Standard = Template.bind({});
113
- Standard.args = {
114
- supertitle: "Card supertitle",
115
- title: "Card title",
116
- headingLevel: 3,
117
- headingSize: "m",
118
- href: "#",
119
- imageSrc:
120
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
121
- imageAlt: "The National Archives office",
122
- imageWidth: 499,
123
- imageHeight: 333,
124
- label: "New",
125
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.</p>",
126
- htmlElement: "article",
127
- classes: "tna-card--demo",
128
- };
129
-
130
- export const Simple = Template.bind({});
131
- Simple.args = {
132
- title: "Card title",
133
- headingLevel: 3,
134
- headingSize: "m",
135
- imageSrc:
136
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
137
- imageAlt: "The National Archives office",
138
- imageWidth: 499,
139
- imageHeight: 333,
140
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.</p>",
141
- htmlElement: "article",
142
- classes: "tna-card--demo",
143
- };
144
-
145
- export const Meta = Template.bind({});
146
- Meta.args = {
147
- supertitle: "Card supertitle",
148
- title: "Card title",
149
- headingLevel: 3,
150
- headingSize: "m",
151
- href: "#",
152
- imageSrc:
153
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
154
- imageAlt: "The National Archives office",
155
- imageWidth: 499,
156
- imageHeight: 333,
157
- label: "New",
158
- labelColour: "green",
159
- meta: [
160
- { title: "Event date", text: "24th September 2023", icon: "calendar" },
161
- { title: "Cost", text: "From £16", icon: "ticket" },
162
- { title: "Location", text: "Online", icon: "location-dot" },
163
- ],
164
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.</p>",
165
- htmlElement: "article",
166
- classes: "tna-card--demo",
167
- };
168
-
169
- export const PlainSupertitle = Template.bind({});
170
- PlainSupertitle.args = {
171
- supertitle: "Card supertitle",
172
- title: "Card title",
173
- headingLevel: 3,
174
- headingSize: "m",
175
- href: "#",
176
- imageSrc:
177
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
178
- imageAlt: "The National Archives office",
179
- imageWidth: 499,
180
- imageHeight: 333,
181
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.</p>",
182
- htmlElement: "article",
183
- plainSupertitle: true,
184
- classes: "tna-card--demo",
185
- };
186
-
187
- export const Contrast = Template.bind({});
188
- Contrast.args = {
189
- supertitle: "Card supertitle",
190
- title: "Card title",
191
- headingLevel: 3,
192
- headingSize: "m",
193
- href: "#",
194
- imageSrc:
195
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
196
- imageAlt: "The National Archives office",
197
- imageWidth: 499,
198
- imageHeight: 333,
199
- label: "New",
200
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.</p>",
201
- style: "contrast",
202
- htmlElement: "article",
203
- classes: "tna-card--demo",
204
- };
205
-
206
- export const Accent = Template.bind({});
207
- Accent.args = {
208
- supertitle: "Card supertitle",
209
- title: "Card title",
210
- headingLevel: 3,
211
- headingSize: "m",
212
- href: "#",
213
- imageSrc:
214
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
215
- imageAlt: "The National Archives office",
216
- imageWidth: 499,
217
- imageHeight: 333,
218
- label: "New",
219
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.</p>",
220
- style: "accent",
221
- htmlElement: "article",
222
- classes: "tna-card--demo",
223
- };
224
-
225
- export const NoImage = Template.bind({});
226
- NoImage.args = {
227
- title: "Card title",
228
- headingLevel: 3,
229
- headingSize: "m",
230
- href: "#",
231
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.</p>",
232
- htmlElement: "article",
233
- classes: "tna-card--demo",
234
- };
235
-
236
- export const Actions = Template.bind({});
237
- Actions.args = {
238
- title: "Card title",
239
- headingLevel: 3,
240
- headingSize: "m",
241
- imageSrc:
242
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
243
- imageAlt: "The National Archives office",
244
- imageWidth: 499,
245
- imageHeight: 333,
246
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.</p>",
247
- actions: [
248
- {
249
- text: "Card action 1",
250
- href: "#",
251
- },
252
- {
253
- text: "Card action 2",
254
- href: "#",
255
- title: "Go and do the action",
256
- },
257
- ],
258
- htmlElement: "article",
259
- classes: "tna-card--demo",
260
- };
261
-
262
- export const Horizontal = Template.bind({});
263
- Horizontal.args = {
264
- supertitle: "Card supertitle",
265
- title: "Card title",
266
- href: "#",
267
- headingLevel: 3,
268
- headingSize: "l",
269
- imageSrc:
270
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
271
- imageAlt: "The National Archives office",
272
- imageWidth: 499,
273
- imageHeight: 333,
274
- label: "New",
275
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.</p>",
276
- horizontal: true,
277
- htmlElement: "article",
278
- classes: "tna-card--demo",
279
- };
280
-
281
- export const HorizontalContrast = Template.bind({});
282
- HorizontalContrast.args = {
283
- supertitle: "Card supertitle",
284
- title: "Card title",
285
- href: "#",
286
- headingLevel: 3,
287
- headingSize: "l",
288
- imageSrc:
289
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
290
- imageAlt: "The National Archives office",
291
- imageWidth: 499,
292
- imageHeight: 333,
293
- label: "New",
294
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.</p>",
295
- horizontal: true,
296
- style: "contrast",
297
- htmlElement: "article",
298
- classes: "tna-card--demo",
299
- };
300
-
301
- export const HorizontalAccent = Template.bind({});
302
- HorizontalAccent.args = {
303
- supertitle: "Card supertitle",
304
- title: "Card title",
305
- href: "#",
306
- headingLevel: 3,
307
- headingSize: "l",
308
- imageSrc:
309
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
310
- imageAlt: "The National Archives office",
311
- imageWidth: 499,
312
- imageHeight: 333,
313
- label: "New",
314
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.</p>",
315
- horizontal: true,
316
- style: "accent",
317
- htmlElement: "article",
318
- classes: "tna-card--demo",
319
- };
320
-
321
- export const HorizontalMinimal = Template.bind({});
322
- HorizontalMinimal.args = {
323
- title: "Card title",
324
- headingLevel: 3,
325
- headingSize: "l",
326
- imageSrc:
327
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
328
- imageAlt: "The National Archives office",
329
- imageWidth: 499,
330
- imageHeight: 333,
331
- horizontal: true,
332
- htmlElement: "article",
333
- classes: "tna-card--demo",
334
- };
335
-
336
- export const HorizontalMobile = Template.bind({});
337
- HorizontalMobile.parameters = {
338
- viewport: {
339
- defaultViewport: "small",
340
- },
341
- chromatic: {
342
- viewports: [customViewports["small"].styles.width.replace(/px$/, "")],
343
- },
344
- };
345
- HorizontalMobile.args = {
346
- title: "Card title",
347
- headingLevel: 3,
348
- headingSize: "l",
349
- imageSrc:
350
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
351
- imageAlt: "The National Archives office",
352
- imageWidth: 499,
353
- imageHeight: 333,
354
- horizontal: true,
355
- htmlElement: "article",
356
- classes: "tna-card--demo",
357
- };
358
-
359
- export const HorizontalContrastMobile = Template.bind({});
360
- HorizontalContrastMobile.parameters = {
361
- viewport: {
362
- defaultViewport: "small",
363
- },
364
- chromatic: {
365
- viewports: [customViewports["small"].styles.width.replace(/px$/, "")],
366
- },
367
- };
368
- HorizontalContrastMobile.args = {
369
- title: "Card title",
370
- headingLevel: 3,
371
- headingSize: "l",
372
- imageSrc:
373
- "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
374
- imageAlt: "The National Archives office",
375
- imageWidth: 499,
376
- imageHeight: 333,
377
- horizontal: true,
378
- style: "contrast",
379
- htmlElement: "article",
380
- classes: "tna-card--demo",
381
- };
382
-
383
- export const Sources = Template.bind({});
384
- Sources.args = {
385
- supertitle: "Card supertitle",
386
- title: "Card title",
387
- headingLevel: 3,
388
- headingSize: "m",
389
- imageSrc: "https://www.gstatic.com/webp/gallery/2.jpg",
390
- imageAlt: "A man in a canoe paddling through white water",
391
- imageWidth: 550,
392
- imageHeight: 404,
393
- imageSources: [
394
- {
395
- src: "https://www.gstatic.com/webp/gallery/2.webp",
396
- type: "image/webp",
397
- },
398
- ],
399
- body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.</p>",
400
- htmlElement: "article",
401
- classes: "tna-card--demo",
402
- };