@nationalarchives/frontend 0.1.13-prerelease → 0.1.15-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 (65) hide show
  1. package/nationalarchives/_features.scss +0 -3
  2. package/nationalarchives/all.css +1 -1
  3. package/nationalarchives/all.css.map +1 -1
  4. package/nationalarchives/all.js +1 -1
  5. package/nationalarchives/all.js.map +1 -1
  6. package/nationalarchives/all.mjs +7 -7
  7. package/nationalarchives/all.scss +2 -5
  8. package/nationalarchives/components/breadcrumbs/_index.scss +62 -19
  9. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +2 -0
  10. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -0
  11. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +63 -0
  12. package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +28 -0
  13. package/nationalarchives/components/breadcrumbs/fixtures.json +1 -1
  14. package/nationalarchives/components/breadcrumbs/template.njk +3 -3
  15. package/nationalarchives/components/button/fixtures.json +5 -5
  16. package/nationalarchives/components/button/template.njk +1 -1
  17. package/nationalarchives/components/card/_index.scss +72 -29
  18. package/nationalarchives/components/card/card.stories.js +6 -1
  19. package/nationalarchives/components/card/fixtures.json +2 -2
  20. package/nationalarchives/components/card/macro-options.json +6 -6
  21. package/nationalarchives/components/card/template.njk +5 -5
  22. package/nationalarchives/components/filters/filters.stories.js +1 -1
  23. package/nationalarchives/components/footer/_index.scss +7 -4
  24. package/nationalarchives/components/footer/template.njk +1 -1
  25. package/nationalarchives/components/header/_index.scss +17 -11
  26. package/nationalarchives/components/header/header.stories.js +73 -28
  27. package/nationalarchives/components/header/template.njk +1 -1
  28. package/nationalarchives/components/hero/_index.scss +4 -15
  29. package/nationalarchives/components/hero/hero.stories.js +2 -0
  30. package/nationalarchives/components/index-grid/_index.scss +20 -5
  31. package/nationalarchives/components/index-grid/index-grid.stories.js +6 -2
  32. package/nationalarchives/components/index-grid/macro-options.json +22 -2
  33. package/nationalarchives/components/index-grid/template.njk +12 -6
  34. package/nationalarchives/components/message/_index.scss +3 -1
  35. package/nationalarchives/components/picture/_index.scss +13 -32
  36. package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +3 -1
  37. package/nationalarchives/components/tabs/_index.scss +6 -12
  38. package/nationalarchives/components/tabs/tabs.stories.js +3 -1
  39. package/nationalarchives/patterns/featured-collection/_index.scss +1 -1
  40. package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +1 -1
  41. package/nationalarchives/patterns/featured-collection/template.njk +2 -2
  42. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.mdx +85 -0
  43. package/nationalarchives/stories/utilities/{colour.stories.js → colour-schemes/colour-schemes.stories.js} +129 -18
  44. package/nationalarchives/stories/utilities/overrides/overrides.mdx +66 -0
  45. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +36 -0
  46. package/nationalarchives/stories/utilities/{headings.stories.js → typography/headings.stories.js} +2 -1
  47. package/nationalarchives/stories/utilities/typography/typography.stories.js +34 -0
  48. package/nationalarchives/tools/_colour.scss +51 -53
  49. package/nationalarchives/tools/_typography.scss +13 -1
  50. package/nationalarchives/utilities/_global.scss +10 -22
  51. package/nationalarchives/utilities/_index.scss +1 -0
  52. package/nationalarchives/utilities/_overrides.scss +17 -0
  53. package/nationalarchives/utilities/_typography.scss +36 -27
  54. package/nationalarchives/variables/_colour.scss +50 -27
  55. package/nationalarchives/variables/_index.scss +1 -0
  56. package/nationalarchives/variables/_spacing.scss +7 -0
  57. package/nationalarchives/variables/_typography.scss +2 -1
  58. package/package.json +1 -1
  59. package/nationalarchives/components/card/card.js +0 -2
  60. package/nationalarchives/components/card/card.js.map +0 -1
  61. package/nationalarchives/components/card/card.mjs +0 -45
  62. package/nationalarchives/stories/utilities/typography.stories.js +0 -29
  63. /package/nationalarchives/stories/utilities/{heading-groups.stories.js → typography/heading-groups.stories.js} +0 -0
  64. /package/nationalarchives/stories/utilities/{lists.stories.js → typography/lists.stories.js} +0 -0
  65. /package/nationalarchives/stories/utilities/{typography.mdx → typography/typography.mdx} +0 -0
@@ -1,5 +1,4 @@
1
- @use "../../utilities/global"; // To get %tna-invert
2
- @use "../../variables/colour" as colourVars;
1
+ @use "../../variables/colour" as colourVars; // TODO
3
2
  @use "../../tools/colour";
4
3
  @use "../../tools/media";
5
4
 
@@ -7,8 +6,12 @@
7
6
  padding-top: 3rem;
8
7
  padding-bottom: 3rem;
9
8
 
10
- // @include colour.invert;
11
- @extend %tna-invert;
9
+ @include colour.invert;
10
+
11
+ @include colour.on-high-contrast {
12
+ border-top: 1px transparent solid;
13
+ @include colour.colour-border("keyline");
14
+ }
12
15
 
13
16
  &__link {
14
17
  &,
@@ -38,7 +38,7 @@
38
38
  <div class="tna-column tna-column--flex-1 tna-column--width-1-4-small tna-column--width-1-2-tiny tna-footer__social-item">
39
39
  <a href="{{ item.href }}" class="tna-footer__social-item-link tna-footer__link" {%- if item.title %}title="{{ item.title }}"{% endif %}>
40
40
  {%- if item.image -%}
41
- <img class="tna-footer__social-item-link-image" src="{{ item.image }}" alt="" />
41
+ <img class="tna-footer__social-item-link-image" src="{{ item.image }}" alt="" width="40" height="40" />
42
42
  {%- endif -%}
43
43
  {{ item.text }}
44
44
  </a>
@@ -1,5 +1,4 @@
1
1
  @use "sass:math";
2
- @use "../../utilities/global"; // To get %tna-invert
3
2
  @use "../../tools/colour";
4
3
  @use "../../variables/colour" as colourVars; // TODO
5
4
  @use "../../variables/grid";
@@ -7,12 +6,10 @@
7
6
  @use "../../tools/media";
8
7
 
9
8
  .tna-header {
10
- color: #fff;
9
+ @include colour.invert;
11
10
 
12
11
  background-color: colourVars.$tna-black;
13
12
 
14
- // @include colour.invert;
15
-
16
13
  &__exit {
17
14
  padding-top: 0.5rem;
18
15
  padding-bottom: 0.5rem;
@@ -104,8 +101,8 @@
104
101
  }
105
102
 
106
103
  &__logo {
107
- padding-top: 1.25rem;
108
- padding-bottom: 1.25rem;
104
+ padding-top: 1.5rem;
105
+ padding-bottom: 1.5rem;
109
106
  }
110
107
 
111
108
  &__logo-link {
@@ -138,8 +135,8 @@
138
135
  }
139
136
 
140
137
  .tna-logo {
141
- width: 6.25rem;
142
- height: 6.25rem;
138
+ width: 6rem;
139
+ height: 6rem;
143
140
 
144
141
  display: inline-block;
145
142
  }
@@ -149,6 +146,11 @@
149
146
  outline-offset: 1px;
150
147
  }
151
148
 
149
+ &__logo-link--href:active .tna-logo,
150
+ &__logo-link--href:focus .tna-logo {
151
+ outline: none;
152
+ }
153
+
152
154
  .tna-logo__foreground {
153
155
  fill: #fff;
154
156
  }
@@ -387,8 +389,8 @@
387
389
  &,
388
390
  &:link,
389
391
  &:visited {
392
+ @include colour.uninvert;
390
393
  @include colour.colour-font("font-dark");
391
-
392
394
  @include colour.colour-background("page-background");
393
395
  }
394
396
  // transition:
@@ -440,9 +442,13 @@
440
442
  }
441
443
 
442
444
  &__navigation {
445
+ @include colour.uninvert;
443
446
  @include colour.colour-font("font-base");
444
447
  @include typography.relative-font-size(20);
445
448
 
449
+ align-items: stretch;
450
+ flex-direction: column;
451
+
446
452
  &.tna-column {
447
453
  padding-right: 0;
448
454
  padding-left: 0;
@@ -452,7 +458,7 @@
452
458
  display: none;
453
459
 
454
460
  &--open {
455
- display: block;
461
+ display: flex;
456
462
  }
457
463
  }
458
464
  }
@@ -499,7 +505,7 @@
499
505
 
500
506
  position: relative;
501
507
 
502
- line-height: 1.6;
508
+ line-height: #{math.div(1, 1.125) * 2};
503
509
 
504
510
  &::after {
505
511
  width: 0;
@@ -125,15 +125,17 @@ Desktop.args = {
125
125
  classes: "tna-header--demo",
126
126
  };
127
127
  Desktop.play = async ({ canvasElement }) => {
128
- const navigationItems = canvasElement.querySelector(
128
+ await new Promise((r) => setTimeout(r, 100));
129
+
130
+ const $navigationItems = canvasElement.querySelector(
129
131
  `.tna-header__navigation-items`,
130
132
  );
131
- const navigationToggle = canvasElement.querySelector(
133
+ const $navigationToggle = canvasElement.querySelector(
132
134
  `.tna-header__navigation-toggle-button`,
133
135
  );
134
136
 
135
- await expect(navigationItems).toBeVisible();
136
- await expect(navigationToggle).not.toBeVisible();
137
+ await expect($navigationItems).toBeVisible();
138
+ await expect($navigationToggle).not.toBeVisible();
137
139
  };
138
140
 
139
141
  export const Mobile = Template.bind({});
@@ -164,46 +166,89 @@ Mobile.args = {
164
166
  classes: "tna-header--demo",
165
167
  };
166
168
  Mobile.play = async ({ args, canvasElement, step }) => {
169
+ await new Promise((r) => setTimeout(r, 100));
170
+
167
171
  const canvas = within(canvasElement);
168
172
 
169
- const navigationItems = canvasElement.querySelector(
173
+ const $navigationItems = canvasElement.querySelector(
170
174
  `.tna-header__navigation-items`,
171
175
  );
172
- const [linkA, linkB, linkC] = args.navigation.map((navigationItem) =>
176
+ const [$linkA, $linkB, $linkC] = args.navigation.map((navigationItem) =>
173
177
  canvas.getByText(navigationItem.text),
174
178
  );
175
- const navigationToggle = canvasElement.querySelector(
179
+ const $navigationToggle = canvasElement.querySelector(
176
180
  `.tna-header__navigation-toggle-button`,
177
181
  );
178
182
 
179
183
  await step("Initial load", async () => {
180
- await expect(navigationItems).not.toBeVisible();
181
- await expect(navigationToggle).toBeVisible();
182
- await expect(navigationToggle).toHaveAttribute("aria-expanded", "false");
183
- await expect(linkA).not.toBeVisible();
184
- await expect(linkB).not.toBeVisible();
185
- await expect(linkC).not.toBeVisible();
184
+ await expect($navigationItems).not.toBeVisible();
185
+ await expect($navigationToggle).toBeVisible();
186
+ await expect($navigationToggle).toHaveAttribute("aria-expanded", "false");
187
+ await expect($linkA).not.toBeVisible();
188
+ await expect($linkB).not.toBeVisible();
189
+ await expect($linkC).not.toBeVisible();
186
190
  });
187
191
 
188
192
  await step("Open the menu", async () => {
189
- await userEvent.click(navigationToggle);
190
- await expect(navigationItems).toBeVisible();
191
- await expect(navigationToggle).toBeVisible();
192
- await expect(navigationToggle).toHaveAttribute("aria-expanded", "true");
193
- await expect(linkA).toBeVisible();
194
- await expect(linkB).toBeVisible();
195
- await expect(linkC).toBeVisible();
193
+ await userEvent.click($navigationToggle);
194
+ await expect($navigationItems).toBeVisible();
195
+ await expect($navigationToggle).toBeVisible();
196
+ await expect($navigationToggle).toHaveAttribute("aria-expanded", "true");
197
+ await expect($linkA).toBeVisible();
198
+ await expect($linkB).toBeVisible();
199
+ await expect($linkC).toBeVisible();
196
200
  });
197
201
 
198
202
  await step("Close the menu", async () => {
199
- await userEvent.click(navigationToggle);
200
- await expect(navigationItems).not.toBeVisible();
201
- await expect(navigationToggle).toBeVisible();
202
- await expect(navigationToggle).toHaveAttribute("aria-expanded", "false");
203
- await expect(linkA).not.toBeVisible();
204
- await expect(linkB).not.toBeVisible();
205
- await expect(linkC).not.toBeVisible();
203
+ await userEvent.click($navigationToggle);
204
+ await expect($navigationItems).not.toBeVisible();
205
+ await expect($navigationToggle).toBeVisible();
206
+ await expect($navigationToggle).toHaveAttribute("aria-expanded", "false");
207
+ await expect($linkA).not.toBeVisible();
208
+ await expect($linkB).not.toBeVisible();
209
+ await expect($linkC).not.toBeVisible();
206
210
  });
207
211
 
208
- navigationToggle.blur();
212
+ $navigationToggle.blur();
209
213
  };
214
+
215
+ // export const NoJavascript = Template.bind({});
216
+ // NoJavascript.args = {
217
+ // navigation: [
218
+ // {
219
+ // text: "Alpha",
220
+ // href: "#/alpha",
221
+ // selected: true,
222
+ // },
223
+ // {
224
+ // text: "Beta",
225
+ // href: "#/beta",
226
+ // },
227
+ // {
228
+ // text: "Gamma",
229
+ // href: "#/gamma",
230
+ // },
231
+ // ],
232
+ // classes: "tna-header--demo",
233
+ // };
234
+ // NoJavascript.play = async ({ args, canvasElement, step }) => {
235
+ // document.documentElement.classList.remove("tna-template--js-enabled");
236
+ // canvasElement.innerHTML = canvasElement.innerHTML;
237
+ // const $navigationToggleWrapper = canvasElement.querySelector(
238
+ // `.tna-header__navigation-toggle`,
239
+ // );
240
+ // $navigationToggleWrapper.innerHTML = "";
241
+
242
+ // const canvas = within(canvasElement);
243
+
244
+ // // const $navigationItems = canvasElement.querySelector(
245
+ // // `.tna-header__navigation-items`,
246
+ // // );
247
+ // // const [$linkA, $linkB, $linkC] = args.navigation.map((navigationItem) =>
248
+ // // canvas.getByText(navigationItem.text),
249
+ // // );
250
+ // // await expect($navigationItems).toBeVisible();
251
+ // // await expect($linkA).toBeVisible();
252
+ // // await expect($linkB).toBeVisible();
253
+ // // await expect($linkC).toBeVisible();
254
+ // };
@@ -20,7 +20,7 @@
20
20
  <div class="tna-container tna-header__contents">
21
21
  <div class="tna-column tna-header__logo">
22
22
  <{%- if params.logo.href -%}a href="{{ params.logo.href }}" class="tna-header__logo-link tna-header__logo-link--href" title="{%- if params.logo.title -%}{{ params.logo.title }}{%- else -%}The National Archives{%- if params.logo.strapline %} - {{ params.logo.strapline }}{%- endif -%}{%- endif -%}"{%- else -%}span class="tna-header__logo-link"{%- endif -%}>
23
- <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" class="tna-logo" style="enable-background:new 0 0 160 160" viewBox="0 0 160 160" width="100" height="100">
23
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" class="tna-logo" style="enable-background:new 0 0 160 160" viewBox="0 0 160 160" width="96" height="96">
24
24
  <path fill="#fff" d="M0 0h160v160H0z" class="tna-logo__background"/>
25
25
  <g class="tna-logo__foreground" fill="#000">
26
26
  <path d="M1.9 107.2h156.3V158H1.9v-50.8zm0-52.7h156.3v50.8H1.9V54.5zm0-52.6h77.2v50.8H1.9V1.9zm79 0h77.2v50.8H80.9V1.9zm0-1.9H0v160h160V0H80.9z"/>
@@ -1,11 +1,11 @@
1
- @use "../../utilities/global"; // To get %tna-invert
2
1
  @use "../../tools/colour";
3
2
  @use "../../tools/media";
4
3
 
5
4
  .tna-hero {
6
5
  min-height: min(35vw, 480px);
7
- padding-top: 5.25rem;
8
- padding-bottom: 3.25rem;
6
+ margin-bottom: 2rem;
7
+ padding-top: 5rem;
8
+ padding-bottom: 3rem;
9
9
 
10
10
  display: flex;
11
11
  align-items: flex-end;
@@ -106,7 +106,6 @@
106
106
  display: block;
107
107
 
108
108
  @include colour.invert;
109
- // @extend %tna-invert;
110
109
 
111
110
  &__image {
112
111
  height: 320px;
@@ -159,7 +158,7 @@
159
158
  }
160
159
  }
161
160
 
162
- @mixin high-contrast {
161
+ @include colour.on-high-contrast {
163
162
  &__content-inner {
164
163
  border: 1px transparent solid;
165
164
  @include colour.colour-border("keyline-dark");
@@ -169,14 +168,4 @@
169
168
  }
170
169
  }
171
170
  }
172
-
173
- .tna-template--high-contrast-theme & {
174
- @include high-contrast;
175
- }
176
-
177
- @media (prefers-contrast: more) {
178
- .tna-template--system-theme & {
179
- @include high-contrast;
180
- }
181
- }
182
171
  }
@@ -51,6 +51,8 @@ Standard.args = {
51
51
  };
52
52
 
53
53
  Standard.play = async ({ args, canvasElement, step }) => {
54
+ await new Promise((r) => setTimeout(r, 100));
55
+
54
56
  const canvas = within(canvasElement);
55
57
  const image = canvas.getByAltText(args.image.alt);
56
58
  const title = canvas.getByText(args.heading);
@@ -1,7 +1,16 @@
1
- @use "../../utilities/global"; // To get %tna-invert
1
+ @use "sass:math";
2
2
  @use "../../tools/colour";
3
3
 
4
4
  .tna-index-grid {
5
+ &__heading {
6
+ }
7
+
8
+ &__items {
9
+ margin-top: 1rem;
10
+
11
+ list-style: none;
12
+ }
13
+
5
14
  &__item-wrapper {
6
15
  margin-bottom: 2rem;
7
16
  }
@@ -12,14 +21,20 @@
12
21
  display: flex;
13
22
  flex-direction: column;
14
23
 
15
- // @include colour.invert;
16
- @extend %tna-invert;
24
+ @include colour.invert;
17
25
  text-decoration: none;
26
+
27
+ @include colour.on-high-contrast {
28
+ border: 1px transparent solid;
29
+ @include colour.colour-border("keyline-dark");
30
+ }
18
31
  }
19
32
 
20
33
  &__item-image {
21
34
  width: 100%;
22
- height: auto;
35
+ height: #{math.div(2, 3) * 100%};
36
+
37
+ object-fit: cover;
23
38
  }
24
39
 
25
40
  &__item-content {
@@ -41,6 +56,6 @@
41
56
  }
42
57
 
43
58
  &__item-subtitle {
44
- @include colour.colour-font("font-light", true);
59
+ @include colour.colour-font("font-light");
45
60
  }
46
61
  }
@@ -2,7 +2,7 @@ import IndexGrid from "./template.njk";
2
2
  import macroOptions from "./macro-options.json";
3
3
 
4
4
  const argTypes = {
5
- heading: { control: "text" },
5
+ heading: { control: "object" },
6
6
  items: { control: "object" },
7
7
  columns: { control: "number" },
8
8
  columnsMedium: { control: "number" },
@@ -58,13 +58,17 @@ const exampleItem = {
58
58
  };
59
59
  export const Standard = Template.bind({});
60
60
  Standard.args = {
61
- heading: "My dogs",
61
+ heading: {
62
+ title: "My dogs",
63
+ level: 2,
64
+ },
62
65
  items: Array(12)
63
66
  .fill({ ...exampleItem })
64
67
  .map((item, index) => {
65
68
  const pseudoRandom = ((index * 29) % 8) + 1;
66
69
  return {
67
70
  ...item,
71
+ href: `#/category-${index}`,
68
72
  title: `Category #${index + 101}`,
69
73
  subtitle: `${pseudoRandom} photos`,
70
74
  };
@@ -1,9 +1,29 @@
1
1
  [
2
2
  {
3
3
  "name": "heading",
4
- "type": "string",
4
+ "type": "object",
5
5
  "required": true,
6
- "description": ""
6
+ "description": "",
7
+ "params": [
8
+ {
9
+ "name": "title",
10
+ "type": "string",
11
+ "required": true,
12
+ "description": ""
13
+ },
14
+ {
15
+ "name": "level",
16
+ "type": "number",
17
+ "required": true,
18
+ "description": ""
19
+ },
20
+ {
21
+ "name": "size",
22
+ "type": "text",
23
+ "required": false,
24
+ "description": ""
25
+ }
26
+ ]
7
27
  },
8
28
  {
9
29
  "name": "items",
@@ -2,10 +2,16 @@
2
2
  <nav class="tna-index-grid {{ containerClasses | join(' ') }}" aria-label="{{ params.heading }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
3
3
  <div class="tna-container">
4
4
  <div class="tna-column tna-column--full">
5
- <h1>
6
- {{ params.heading }}
7
- </h1>
5
+ {%- set headingSize = 'l' -%}
6
+ {%- if params.heading.size -%}
7
+ {%- set headingSize = params.heading.size -%}
8
+ {%- endif -%}
9
+ <h{{ params.heading.level }} class="tna-heading tna-heading--{{ headingSize }} tna-index-grid__heading">
10
+ {{ params.heading.title }}
11
+ </h{{ params.heading.level }}>
8
12
  </div>
13
+ </div>
14
+ <ul class="tna-index-grid__items tna-container">
9
15
  {%- set itemClasses = ['tna-index-grid__item-wrapper', 'tna-column'] -%}
10
16
 
11
17
  {%- if params.columns == 1 -%}
@@ -39,7 +45,7 @@
39
45
  {%- endif -%}
40
46
 
41
47
  {%- for item in params.items -%}
42
- <div class="{{ itemClasses | join(' ') }}">
48
+ <li class="{{ itemClasses | join(' ') }}">
43
49
  <a href="{{ item.href }}" class="tna-index-grid__item" title="{{ item.title }}">
44
50
  <img src="{{ item.src }}" class="tna-index-grid__item-image" width="{{ item.width }}" height="{{ item.height }}" alt="{{ item.alt }}" />
45
51
  <span class="tna-index-grid__item-content">
@@ -50,7 +56,7 @@
50
56
  {%- endif -%}
51
57
  </span>
52
58
  </a>
53
- </div>
59
+ </li>
54
60
  {%- endfor -%}
55
- </div>
61
+ </ul>
56
62
  <nav>
@@ -1,4 +1,4 @@
1
- @use "../../variables/colour" as colourVars;
1
+ @use "../../variables/colour" as colourVars; // TODO
2
2
  @use "../../tools/colour";
3
3
 
4
4
  .tna-message {
@@ -7,6 +7,8 @@
7
7
  display: flex;
8
8
  align-items: center;
9
9
 
10
+ color: colourVars.$tna-black;
11
+
10
12
  @include colour.colour-background("keyline");
11
13
 
12
14
  border-left: 0.5rem transparent solid;
@@ -1,10 +1,13 @@
1
- @use "../../utilities/global"; // To get %tna-invert
2
1
  @use "../../tools/colour";
3
2
 
4
3
  .tna-picture {
5
- margin: 0 0 1rem;
4
+ margin: 0 0 2rem;
6
5
  padding: 0;
7
6
 
7
+ &:last-child {
8
+ margin-bottom: 0;
9
+ }
10
+
8
11
  &__image-wrapper {
9
12
  // padding: 1rem 0;
10
13
 
@@ -22,11 +25,12 @@
22
25
  position: absolute;
23
26
  right: 1rem;
24
27
  bottom: 1rem;
28
+
29
+ font-size: 1rem;
25
30
  }
26
31
 
27
32
  &__transcript {
28
- // @include colour.invert;
29
- @extend %tna-invert;
33
+ @include colour.invert;
30
34
 
31
35
  padding: 1rem 1.5rem;
32
36
 
@@ -37,22 +41,6 @@
37
41
  .tna-tabs {
38
42
  margin-bottom: 0.5rem;
39
43
  }
40
-
41
- .tna-tabs__list-item-link {
42
- @include colour.colour-font("font-dark", true);
43
-
44
- &::after {
45
- @include colour.colour-background("keyline-dark", true);
46
- }
47
-
48
- .tna-template--js-enabled & {
49
- @include colour.colour-font("font-light", true);
50
-
51
- &--selected {
52
- @include colour.colour-font("font-dark", true);
53
- }
54
- }
55
- }
56
44
  }
57
45
 
58
46
  &__caption {
@@ -64,18 +52,11 @@
64
52
 
65
53
  border-bottom: 1px solid;
66
54
  @include colour.colour-border("keyline");
55
+ }
67
56
 
68
- // &::after {
69
- // height: 1px;
70
-
71
- // position: absolute;
72
- // right: 20%;
73
- // bottom: 0;
74
- // left: 20%;
75
-
76
- // @include colour.colour-background("keyline");
77
-
78
- // content: "";
79
- // }
57
+ @include colour.on-high-contrast {
58
+ border-width: 1px 1px 0;
59
+ @include colour.colour-border("keyline-dark");
60
+ border-style: solid;
80
61
  }
81
62
  }
@@ -19,7 +19,7 @@ Object.keys(argTypes).forEach((argType) => {
19
19
  });
20
20
 
21
21
  export default {
22
- title: "Experimental/Components/Sensitive image",
22
+ title: "Components/Experimental/Sensitive image",
23
23
  argTypes,
24
24
  };
25
25
 
@@ -68,6 +68,8 @@ Test.args = {
68
68
  };
69
69
 
70
70
  Test.play = async ({ args, canvasElement }) => {
71
+ await new Promise((r) => setTimeout(r, 100));
72
+
71
73
  const canvas = within(canvasElement);
72
74
 
73
75
  const image = canvas.getByAltText(args.image.alt);
@@ -1,7 +1,11 @@
1
1
  @use "../../tools/colour";
2
2
 
3
3
  .tna-tabs {
4
- margin-bottom: 1rem;
4
+ margin-bottom: 2rem;
5
+
6
+ &:last-child {
7
+ margin-bottom: 0;
8
+ }
5
9
 
6
10
  &__list {
7
11
  margin: 0 0 1rem;
@@ -124,7 +128,7 @@
124
128
  }
125
129
  }
126
130
 
127
- @mixin high-contrast {
131
+ @include colour.on-high-contrast {
128
132
  &__list-item-link {
129
133
  padding-right: 1rem;
130
134
  padding-left: 1rem;
@@ -135,14 +139,4 @@
135
139
  @include colour.colour-border("keyline-dark");
136
140
  }
137
141
  }
138
-
139
- .tna-template--high-contrast-theme & {
140
- @include high-contrast;
141
- }
142
-
143
- @media (prefers-contrast: more) {
144
- .tna-template--system-theme & {
145
- @include high-contrast;
146
- }
147
- }
148
142
  }
@@ -5,7 +5,7 @@ import { within, userEvent } from "@storybook/testing-library";
5
5
 
6
6
  const argTypes = {
7
7
  title: { control: "text" },
8
- items: { control: "array" },
8
+ items: { control: "object" },
9
9
  sticky: { control: "boolean" },
10
10
  classes: { control: "text" },
11
11
  attributes: { control: "object" },
@@ -81,6 +81,8 @@ Test.args = {
81
81
  };
82
82
 
83
83
  Test.play = async ({ args, canvasElement, step }) => {
84
+ await new Promise((r) => setTimeout(r, 100));
85
+
84
86
  const canvas = within(canvasElement);
85
87
 
86
88
  const tablist = canvas.getByRole("tablist");
@@ -1,4 +1,4 @@
1
- @use "../../variables/colour" as colourVars;
1
+ @use "../../variables/colour" as colourVars; // TODO
2
2
 
3
3
  .tna-featured-collection {
4
4
  padding-top: 2rem;
@@ -14,7 +14,7 @@ Object.keys(argTypes).forEach((argType) => {
14
14
  });
15
15
 
16
16
  export default {
17
- title: "Experimental/Patterns/Featured collection",
17
+ title: "Patterns/Experimental/Featured collection",
18
18
  argTypes,
19
19
  };
20
20
 
@@ -43,9 +43,9 @@
43
43
  href: "#",
44
44
  image: {
45
45
  src: "https://picsum.photos/id/29/640/360",
46
- alt: "A placeholder image",
47
- label: "Feature"
46
+ alt: "A placeholder image"
48
47
  },
48
+ label: "Feature",
49
49
  body: "<p>Card body</p>"
50
50
  })
51
51
  },