@nationalarchives/frontend 0.1.14-prerelease → 0.1.16-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 (89) hide show
  1. package/LICENCE +21 -0
  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/_index.scss +1 -0
  9. package/nationalarchives/components/breadcrumbs/_index.scss +54 -39
  10. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +2 -0
  11. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -0
  12. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +67 -0
  13. package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +10 -3
  14. package/nationalarchives/components/breadcrumbs/fixtures.json +23 -1
  15. package/nationalarchives/components/breadcrumbs/macro-options.json +6 -0
  16. package/nationalarchives/components/breadcrumbs/template.njk +17 -12
  17. package/nationalarchives/components/button/_index.scss +1 -2
  18. package/nationalarchives/components/button/button.stories.js +2 -3
  19. package/nationalarchives/components/button/fixtures.json +5 -5
  20. package/nationalarchives/components/button/template.njk +1 -1
  21. package/nationalarchives/components/card/_index.scss +78 -34
  22. package/nationalarchives/components/card/card.stories.js +72 -5
  23. package/nationalarchives/components/card/fixtures.json +15 -2
  24. package/nationalarchives/components/card/macro-options.json +6 -12
  25. package/nationalarchives/components/card/template.njk +6 -6
  26. package/nationalarchives/components/filters/filters.stories.js +3 -4
  27. package/nationalarchives/components/footer/_index.scss +8 -14
  28. package/nationalarchives/components/footer/footer.stories.js +2 -3
  29. package/nationalarchives/components/footer/template.njk +1 -1
  30. package/nationalarchives/components/grid/_index.scss +2 -2
  31. package/nationalarchives/components/grid/grid.stories.js +2 -3
  32. package/nationalarchives/components/header/_index.scss +27 -26
  33. package/nationalarchives/components/header/header.stories.js +2 -3
  34. package/nationalarchives/components/header/template.njk +1 -1
  35. package/nationalarchives/components/hero/_index.scss +7 -20
  36. package/nationalarchives/components/hero/hero.stories.js +2 -3
  37. package/nationalarchives/components/index-grid/_index.scss +17 -1
  38. package/nationalarchives/components/index-grid/index-grid.stories.js +7 -5
  39. package/nationalarchives/components/index-grid/macro-options.json +22 -2
  40. package/nationalarchives/components/index-grid/template.njk +12 -6
  41. package/nationalarchives/components/message/_index.scss +4 -6
  42. package/nationalarchives/components/message/phase-banner.stories.js +2 -3
  43. package/nationalarchives/components/phase-banner/phase-banner.stories.js +2 -3
  44. package/nationalarchives/components/picture/_index.scss +12 -15
  45. package/nationalarchives/components/picture/picture.stories.js +2 -3
  46. package/nationalarchives/components/profile/profile.stories.js +2 -3
  47. package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +3 -4
  48. package/nationalarchives/components/skip-link/_index.scss +63 -0
  49. package/nationalarchives/components/skip-link/fixtures.json +11 -0
  50. package/nationalarchives/components/skip-link/macro-options.json +26 -0
  51. package/nationalarchives/components/skip-link/macro.njk +3 -0
  52. package/nationalarchives/components/skip-link/skip-link.stories.js +31 -0
  53. package/nationalarchives/components/skip-link/template.njk +4 -0
  54. package/nationalarchives/components/tabs/_index.scss +7 -14
  55. package/nationalarchives/components/tabs/tabs.stories.js +2 -3
  56. package/nationalarchives/patterns/featured-collection/_index.scss +2 -2
  57. package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +3 -4
  58. package/nationalarchives/patterns/featured-collection/template.njk +2 -2
  59. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.mdx +85 -0
  60. package/nationalarchives/stories/utilities/{colour.stories.js → colour-schemes/colour-schemes.stories.js} +142 -52
  61. package/nationalarchives/stories/utilities/overrides/overrides.mdx +66 -0
  62. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +30 -0
  63. package/nationalarchives/stories/utilities/{headings.stories.js → typography/headings.stories.js} +2 -1
  64. package/nationalarchives/stories/utilities/typography/typography.stories.js +34 -0
  65. package/nationalarchives/templates/layouts/_generic.njk +10 -8
  66. package/nationalarchives/tools/_colour.scss +105 -16
  67. package/nationalarchives/tools/_index.scss +0 -1
  68. package/nationalarchives/tools/_typography.scss +13 -1
  69. package/nationalarchives/utilities/_debug.scss +41 -1
  70. package/nationalarchives/utilities/_global.scss +13 -4
  71. package/nationalarchives/utilities/_index.scss +1 -0
  72. package/nationalarchives/utilities/_overrides.scss +30 -0
  73. package/nationalarchives/utilities/_typography.scss +42 -34
  74. package/nationalarchives/variables/_colour.scss +103 -106
  75. package/nationalarchives/variables/_grid.scss +1 -1
  76. package/nationalarchives/variables/_index.scss +1 -1
  77. package/nationalarchives/variables/_media.scss +23 -23
  78. package/nationalarchives/variables/_spacing.scss +15 -0
  79. package/nationalarchives/variables/_typography.scss +2 -1
  80. package/package.json +2 -2
  81. package/nationalarchives/components/card/card.js +0 -2
  82. package/nationalarchives/components/card/card.js.map +0 -1
  83. package/nationalarchives/components/card/card.mjs +0 -45
  84. package/nationalarchives/stories/utilities/typography.stories.js +0 -29
  85. package/nationalarchives/tools/_assets.scss +0 -5
  86. package/nationalarchives/variables/_assets.scss +0 -1
  87. /package/nationalarchives/stories/utilities/{heading-groups.stories.js → typography/heading-groups.stories.js} +0 -0
  88. /package/nationalarchives/stories/utilities/{lists.stories.js → typography/lists.stories.js} +0 -0
  89. /package/nationalarchives/stories/utilities/{typography.mdx → typography/typography.mdx} +0 -0
@@ -7,7 +7,7 @@
7
7
  "text": "Log in",
8
8
  "href": "#"
9
9
  },
10
- "html": "<a href=\"#\" class=\"tna-button \">Log in</a>",
10
+ "html": "<a href=\"#\" class=\"tna-button \" role=\"button\">Log in</a>",
11
11
  "hidden": false
12
12
  },
13
13
  {
@@ -17,7 +17,7 @@
17
17
  "href": "#",
18
18
  "title": "Log in to the service"
19
19
  },
20
- "html": "<a href=\"#\" class=\"tna-button \" title=\"Log in to the service\">Log in</a>",
20
+ "html": "<a href=\"#\" class=\"tna-button \" role=\"button\" title=\"Log in to the service\">Log in</a>",
21
21
  "hidden": false
22
22
  },
23
23
  {
@@ -27,7 +27,7 @@
27
27
  "href": "#",
28
28
  "secondary": true
29
29
  },
30
- "html": "<a href=\"#\" class=\"tna-button tna-button--secondary\">Log in</a>",
30
+ "html": "<a href=\"#\" class=\"tna-button tna-button--secondary\" role=\"button\">Log in</a>",
31
31
  "hidden": false
32
32
  },
33
33
  {
@@ -37,7 +37,7 @@
37
37
  "href": "#",
38
38
  "classes": "button__test-class"
39
39
  },
40
- "html": "<a href=\"#\" class=\"tna-button button__test-class\">Log in</a>",
40
+ "html": "<a href=\"#\" class=\"tna-button button__test-class\" role=\"button\">Log in</a>",
41
41
  "hidden": false
42
42
  },
43
43
  {
@@ -49,7 +49,7 @@
49
49
  "data-testattribute": "foobar"
50
50
  }
51
51
  },
52
- "html": "<a href=\"#\" class=\"tna-button \" data-testattribute=\"foobar\">Log in</a>",
52
+ "html": "<a href=\"#\" class=\"tna-button \" role=\"button\" data-testattribute=\"foobar\">Log in</a>",
53
53
  "hidden": false
54
54
  }
55
55
  ]
@@ -2,6 +2,6 @@
2
2
  {%- if params.secondary -%}
3
3
  {%- set buttonClasses = buttonClasses.concat('tna-button--secondary') -%}
4
4
  {%- endif -%}
5
- <a href="{{ params.href }}" class="tna-button {{ buttonClasses | join(' ') }}"{%- if params.title %} title="{{ params.title }}"{% endif %} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
5
+ <a href="{{ params.href }}" class="tna-button {{ buttonClasses | join(' ') }}" role="button"{%- if params.title %} title="{{ params.title }}"{% endif %} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
6
6
  {{ params.text }}
7
7
  </a>
@@ -1,8 +1,14 @@
1
+ @use "sass:math";
1
2
  @use "../../tools/colour";
2
- @use "../../variables/colour" as colourVars;
3
+ @use "../../tools/typography";
4
+ @use "../../tools/media";
3
5
 
4
6
  .tna-card {
5
- margin-bottom: 1rem;
7
+ margin-bottom: 2rem;
8
+
9
+ &:last-child {
10
+ margin-bottom: 0;
11
+ }
6
12
 
7
13
  &__inner {
8
14
  display: flex;
@@ -18,37 +24,58 @@
18
24
 
19
25
  &__title {
20
26
  order: 2;
27
+
28
+ @include typography.main-font;
29
+ @include typography.main-font-weight-bold;
21
30
  }
22
31
 
23
32
  &__title-link {
24
33
  }
25
34
 
26
35
  &__image-container {
36
+ height: 0;
27
37
  margin-bottom: 1rem;
38
+ // padding-bottom: #{math.div(9, 16) * 100%};
39
+ padding-bottom: #{math.div(2, 3) * 100%};
28
40
 
29
41
  position: relative;
30
42
  order: 1;
31
43
  }
32
44
 
33
45
  &__image {
34
- height: auto;
46
+ width: 100%;
47
+ height: 100%;
48
+
49
+ position: absolute;
50
+ inset: 0;
51
+
52
+ object-fit: cover;
35
53
  }
36
54
 
37
55
  &__image-label {
38
- padding: 0 0.5rem;
56
+ max-width: calc(100% - 2rem);
57
+ padding: 0.25rem 0.5rem;
39
58
 
40
59
  position: absolute;
41
60
  top: 1rem;
42
61
  left: 0;
43
62
 
63
+ @include colour.fixed;
64
+
65
+ @include colour.colour-font("font-dark");
66
+ @include typography.relative-font-size(14);
67
+ @include typography.main-font-weight-bold;
44
68
  text-transform: uppercase;
69
+ line-height: #{math.div(16, 14)};
45
70
 
46
- background-color: colourVars.$tna-yellow;
71
+ @include colour.colour-background("accent");
47
72
  }
48
73
 
49
- &__body {
50
- // margin-top: 2rem;
74
+ &--green-label #{&}__image-label {
75
+ background-color: colour.brand-colour("green");
76
+ }
51
77
 
78
+ &__body {
52
79
  order: 3;
53
80
  }
54
81
 
@@ -68,57 +95,74 @@
68
95
 
69
96
  @include colour.colour-font("font-base");
70
97
 
71
- // background-color: colour.$tna-yellow;
72
98
  @include colour.colour-background("accent");
73
99
 
74
- .tna-card__inner {
75
- margin-left: 50%;
76
- padding: 2rem;
77
- }
78
-
79
100
  .tna-card__heading {
80
101
  padding-bottom: 2rem;
81
102
 
82
- border-bottom: 2px transparent solid;
83
- @include colour.colour-border("keyline-dark");
103
+ @include colour.colour-border("keyline-dark", 2px, solid, bottom);
84
104
  }
85
105
 
86
106
  .tna-card__supertitle {
87
107
  color: inherit;
88
108
  }
89
109
 
110
+ .tna-card__title {
111
+ @include typography.heading-font;
112
+ }
113
+
90
114
  .tna-card__title-link {
91
115
  @include colour.colour-font("font-dark");
92
116
  }
93
117
 
94
118
  .tna-card__image-container {
95
- margin-bottom: 0;
119
+ margin-bottom: 2rem;
120
+ }
121
+
122
+ @include media.on-larger-than-mobile {
123
+ .tna-card__inner {
124
+ margin-left: 50%;
125
+ padding: 2rem;
126
+ }
127
+
128
+ .tna-card__image-container {
129
+ height: auto;
130
+ margin-bottom: 0;
131
+ padding-bottom: 0;
96
132
 
97
- position: absolute;
98
- inset: 0 50% 0 0;
133
+ display: block;
134
+
135
+ position: absolute;
136
+ inset: 0 50% 0 0;
137
+ }
99
138
  }
100
139
 
101
- .tna-card__image {
102
- width: 100%;
103
- height: 100%;
104
- object-fit: cover;
140
+ @include media.on-mobile {
141
+ .tna-card__inner {
142
+ padding: 0 0 2rem;
143
+ }
144
+
145
+ .tna-card__heading,
146
+ .tna-card__body,
147
+ .tna-card__actions {
148
+ margin-right: 2rem;
149
+ margin-left: 2rem;
150
+ }
105
151
  }
106
152
  }
107
153
 
108
- @mixin high-contrast {
109
- padding: 1rem;
110
-
111
- border: 1px transparent solid;
112
- @include colour.colour-border("keyline-dark");
113
- }
154
+ @include colour.on-high-contrast {
155
+ @include colour.colour-border("keyline-dark", 1px);
114
156
 
115
- .tna-template--high-contrast-theme & {
116
- @include high-contrast;
117
- }
157
+ .tna-card__inner {
158
+ padding-bottom: 1rem;
159
+ }
118
160
 
119
- @media (prefers-contrast: more) {
120
- .tna-template--system-theme & {
121
- @include high-contrast;
161
+ .tna-card__heading,
162
+ .tna-card__body,
163
+ .tna-card__actions {
164
+ margin-right: 2rem;
165
+ margin-left: 2rem;
122
166
  }
123
167
  }
124
168
  }
@@ -5,6 +5,7 @@ const argTypes = {
5
5
  heading: { control: "object" },
6
6
  href: { control: "text" },
7
7
  image: { control: "object" },
8
+ label: { control: "text" },
8
9
  body: { control: "text" },
9
10
  text: { control: "text" },
10
11
  actions: { control: "object" },
@@ -29,6 +30,7 @@ const Template = ({
29
30
  heading,
30
31
  href,
31
32
  image,
33
+ label,
32
34
  body,
33
35
  text,
34
36
  actions,
@@ -36,12 +38,13 @@ const Template = ({
36
38
  htmlElement,
37
39
  classes,
38
40
  attributes,
39
- }) => {
40
- return Card({
41
+ }) =>
42
+ Card({
41
43
  params: {
42
44
  heading,
43
45
  href,
44
46
  image,
47
+ label,
45
48
  body,
46
49
  text,
47
50
  actions,
@@ -51,7 +54,6 @@ const Template = ({
51
54
  attributes,
52
55
  },
53
56
  });
54
- };
55
57
 
56
58
  export const Standard = Template.bind({});
57
59
  Standard.args = {
@@ -59,7 +61,6 @@ Standard.args = {
59
61
  supertitle: "Card supertitle",
60
62
  title: "Card title",
61
63
  level: 3,
62
- size: "m",
63
64
  singleSentence: false,
64
65
  },
65
66
  href: "#",
@@ -69,6 +70,7 @@ Standard.args = {
69
70
  width: 1996,
70
71
  height: 1331,
71
72
  },
73
+ label: "New",
72
74
  body: "<p>Card body</p>",
73
75
  // actions: [
74
76
  // {
@@ -87,7 +89,6 @@ Featured.args = {
87
89
  supertitle: "Card supertitle",
88
90
  title: "Card title",
89
91
  level: 3,
90
- size: "m",
91
92
  singleSentence: false,
92
93
  },
93
94
  href: "#",
@@ -97,6 +98,7 @@ Featured.args = {
97
98
  width: 1996,
98
99
  height: 1331,
99
100
  },
101
+ label: "New",
100
102
  body: "<p>Card body</p>",
101
103
  actions: [
102
104
  {
@@ -109,3 +111,68 @@ Featured.args = {
109
111
  htmlElement: "article",
110
112
  classes: "tna-card--demo",
111
113
  };
114
+
115
+ const GridTemplate = ({
116
+ heading,
117
+ href,
118
+ image,
119
+ label,
120
+ body,
121
+ text,
122
+ actions,
123
+ featured,
124
+ htmlElement,
125
+ classes,
126
+ attributes,
127
+ }) =>
128
+ `<div class="tna-container">
129
+ ${Array(12)
130
+ .fill(
131
+ `<div class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny tna-!--margin-bottom-l">
132
+ ${Card({
133
+ params: {
134
+ heading,
135
+ href,
136
+ image,
137
+ label,
138
+ body,
139
+ text,
140
+ actions,
141
+ featured,
142
+ htmlElement,
143
+ classes,
144
+ attributes,
145
+ },
146
+ })}
147
+ </div>`,
148
+ )
149
+ .join("")}
150
+ </div>`;
151
+
152
+ export const Grid = GridTemplate.bind({});
153
+ Grid.args = {
154
+ heading: {
155
+ supertitle: "Card supertitle",
156
+ title: "Card title",
157
+ level: 3,
158
+ singleSentence: false,
159
+ },
160
+ href: "#",
161
+ image: {
162
+ src: "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
163
+ alt: "The National Archives office",
164
+ width: 1996,
165
+ height: 1331,
166
+ },
167
+ label: "New",
168
+ body: "<p>Card body</p>",
169
+ // actions: [
170
+ // {
171
+ // text: "Card action",
172
+ // href: "#",
173
+ // title: "Go and do the action",
174
+ // },
175
+ // ],
176
+ htmlElement: "article",
177
+ classes: "tna-card--demo",
178
+ };
@@ -105,7 +105,7 @@
105
105
  },
106
106
  "body": "<p>Card body</p>"
107
107
  },
108
- "html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__image-container\"><img src=\"https://loremflickr.com/640/360\" alt=\"A placeholder image\" width=\"640\" height=\"360\" class=\"tna-card__image\" /></div><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
108
+ "html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><a href=\"\" class=\"tna-card__image-container\" tabindex=\"-1\"><img src=\"https://loremflickr.com/640/360\" alt=\"A placeholder image\" width=\"640\" height=\"360\" class=\"tna-card__image\" /></a><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
109
109
  "hidden": false
110
110
  },
111
111
  {
@@ -124,7 +124,7 @@
124
124
  }
125
125
  ]
126
126
  },
127
- "html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div><div class=\"tna-card__actions\"><a href=\"#\" class=\"tna-card__action tna-button\"title=\"Go and do the action\">Card action</a></div></div></div>",
127
+ "html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div><div class=\"tna-card__actions\"><a href=\"#\" class=\"tna-card__action tna-button\" role=\"button\"title=\"Go and do the action\">Card action</a></div></div></div>",
128
128
  "hidden": false
129
129
  },
130
130
  {
@@ -154,6 +154,19 @@
154
154
  },
155
155
  "html": "<div class=\"tna-card \" data-module=\"tna-card\" data-testattribute=\"foobar\"><div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
156
156
  "hidden": false
157
+ },
158
+ {
159
+ "name": "with a label",
160
+ "options": {
161
+ "heading": {
162
+ "title": "Card title",
163
+ "level": 3
164
+ },
165
+ "label": "New",
166
+ "body": "<p>Card body</p>"
167
+ },
168
+ "html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
169
+ "hidden": false
157
170
  }
158
171
  ]
159
172
  }
@@ -23,12 +23,6 @@
23
23
  "required": true,
24
24
  "description": ""
25
25
  },
26
- {
27
- "name": "size",
28
- "type": "text",
29
- "required": false,
30
- "description": ""
31
- },
32
26
  {
33
27
  "name": "singleSentence",
34
28
  "type": "boolean",
@@ -61,12 +55,6 @@
61
55
  "required": true,
62
56
  "description": ""
63
57
  },
64
- {
65
- "name": "label",
66
- "type": "string",
67
- "required": false,
68
- "description": ""
69
- },
70
58
  {
71
59
  "name": "width",
72
60
  "type": "number",
@@ -81,6 +69,12 @@
81
69
  }
82
70
  ]
83
71
  },
72
+ {
73
+ "name": "label",
74
+ "type": "string",
75
+ "required": false,
76
+ "description": ""
77
+ },
84
78
  {
85
79
  "name": "body",
86
80
  "type": "string",
@@ -1,6 +1,6 @@
1
1
  {%- set htmlElement = params.htmlElement if params.htmlElement else 'div' -%}
2
2
  {%- set containerClasses = [params.classes] if params.classes else [] -%}
3
- {%- set headingSize = params.heading.size if params.heading.size else "m" -%}
3
+ {%- set headingSize = "l" if params.featured else "m" -%}
4
4
  {%- if params.featured -%}
5
5
  {%- set containerClasses = containerClasses.concat('tna-card--featured') -%}
6
6
  {%- endif -%}
@@ -40,14 +40,14 @@
40
40
  </h{{ params.heading.level }}>
41
41
  {%- endif -%}
42
42
  {%- if params.image -%}
43
- <div class="tna-card__image-container">
43
+ <a href="{{ item.href }}" class="tna-card__image-container" tabindex="-1">
44
44
  <img src="{{ params.image.src }}" alt="{{ params.image.alt }}" width="{{ params.image.width }}" height="{{ params.image.height }}" class="tna-card__image" />
45
- {%- if params.image.label -%}
45
+ {%- if params.label -%}
46
46
  <div class="tna-card__image-label">
47
- {{ params.image.label }}
47
+ {{ params.label }}
48
48
  </div>
49
49
  {%- endif -%}
50
- </div>
50
+ </a>
51
51
  {%- endif -%}
52
52
  <div class="tna-card__body">
53
53
  {%- if params.text -%}
@@ -59,7 +59,7 @@
59
59
  {%- if params.actions -%}
60
60
  <div class="tna-card__actions">
61
61
  {%- for item in params.actions -%}
62
- <a href="{{ item.href }}" class="tna-card__action tna-button" {%- if item.title %}title="{{ item.title }}"{% endif %}>{{ item.text }}</a>
62
+ <a href="{{ item.href }}" class="tna-card__action tna-button" role="button" {%- if item.title %}title="{{ item.title }}"{% endif %}>{{ item.text }}</a>
63
63
  {%- endfor -%}
64
64
  </div>
65
65
  {%- endif -%}
@@ -15,12 +15,12 @@ Object.keys(argTypes).forEach((argType) => {
15
15
  });
16
16
 
17
17
  export default {
18
- title: "Experimental/Components/Filters",
18
+ title: "Components/Filters",
19
19
  argTypes,
20
20
  };
21
21
 
22
- const Template = ({ items, stack, classes, attributes }) => {
23
- return Filters({
22
+ const Template = ({ items, stack, classes, attributes }) =>
23
+ Filters({
24
24
  params: {
25
25
  items,
26
26
  stack,
@@ -28,7 +28,6 @@ const Template = ({ items, stack, classes, attributes }) => {
28
28
  attributes,
29
29
  },
30
30
  });
31
- };
32
31
 
33
32
  export const Standard = Template.bind({});
34
33
  Standard.args = {
@@ -1,4 +1,3 @@
1
- @use "../../variables/colour" as colourVars;
2
1
  @use "../../tools/colour";
3
2
  @use "../../tools/media";
4
3
 
@@ -7,6 +6,11 @@
7
6
  padding-bottom: 3rem;
8
7
 
9
8
  @include colour.invert;
9
+ @include colour.colour-font("contrast-font-base");
10
+
11
+ @include colour.on-high-contrast {
12
+ @include colour.colour-border("keyline", 1px, solid, top);
13
+ }
10
14
 
11
15
  &__link {
12
16
  &,
@@ -15,8 +19,7 @@
15
19
  }
16
20
 
17
21
  &:hover {
18
- // @include colour.colour-font("link");
19
- color: colourVars.$tna-blue;
22
+ @include colour.colour-font("link");
20
23
  }
21
24
  }
22
25
 
@@ -28,8 +31,6 @@
28
31
 
29
32
  &__title {
30
33
  margin-bottom: 0.5rem;
31
-
32
- color: inherit;
33
34
  }
34
35
 
35
36
  &__address {
@@ -44,7 +45,6 @@
44
45
  }
45
46
 
46
47
  &__navigation-group-title {
47
- color: inherit;
48
48
  }
49
49
 
50
50
  &__navigation-group-items {
@@ -113,23 +113,17 @@
113
113
 
114
114
  &,
115
115
  &:visited {
116
- color: inherit;
117
- fill: #fff;
116
+ @include colour.colour-font("font-dark");
118
117
  }
119
118
 
120
119
  &:hover {
121
- // @include colour.colour-font("link");
122
- // @include colour.colour-fill("link");
123
- color: colourVars.$tna-blue;
124
- fill: colourVars.$tna-blue;
120
+ @include colour.colour-font("link");
125
121
  }
126
122
  }
127
123
 
128
124
  &__govuk-logotype-crown {
129
125
  margin: 0 auto;
130
126
  display: block;
131
-
132
- fill: inherit;
133
127
  }
134
128
 
135
129
  @include media.on-mobile {
@@ -28,8 +28,8 @@ const Template = ({
28
28
  social,
29
29
  classes,
30
30
  attributes,
31
- }) => {
32
- return Footer({
31
+ }) =>
32
+ Footer({
33
33
  params: {
34
34
  title,
35
35
  address,
@@ -39,7 +39,6 @@ const Template = ({
39
39
  attributes,
40
40
  },
41
41
  });
42
- };
43
42
 
44
43
  export const Standard = Template.bind({});
45
44
  Standard.args = {
@@ -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>
@@ -50,8 +50,8 @@
50
50
 
51
51
  @include media.on-mobile {
52
52
  .tna-container {
53
- padding-right: math.div(grid.$gutter-width-mobile, 2) + 0.75rem;
54
- padding-left: math.div(grid.$gutter-width-mobile, 2) + 0.75rem;
53
+ padding-right: math.div(grid.$gutter-width-mobile, 2);
54
+ padding-left: math.div(grid.$gutter-width-mobile, 2);
55
55
  }
56
56
 
57
57
  .tna-column {
@@ -30,8 +30,8 @@ const Template = ({
30
30
  htmlElement,
31
31
  classes,
32
32
  attributes,
33
- }) => {
34
- return Header({
33
+ }) =>
34
+ Header({
35
35
  params: {
36
36
  columns,
37
37
  maxWidth,
@@ -42,7 +42,6 @@ const Template = ({
42
42
  attributes,
43
43
  },
44
44
  });
45
- };
46
45
 
47
46
  export const Standard = Template.bind({});
48
47
  Standard.args = {