@nationalarchives/frontend 0.1.18-prerelease → 0.1.20-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.
- package/nationalarchives/all.css +12 -2
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.mjs +26 -2
- package/nationalarchives/all.scss +20 -4
- package/nationalarchives/assets/fonts/OpenSans-Bold.ttf +0 -0
- package/nationalarchives/assets/fonts/OpenSans-Medium.ttf +0 -0
- package/nationalarchives/assets/fonts/RobotoMono-Regular.ttf +0 -0
- package/nationalarchives/components/_index.scss +18 -16
- package/nationalarchives/components/breadcrumbs/_index.scss +1 -109
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -0
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -0
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +111 -0
- package/nationalarchives/components/button/_button-group.scss +3 -5
- package/nationalarchives/components/button/_index.scss +1 -73
- package/nationalarchives/components/button/button.css +13 -0
- package/nationalarchives/components/button/button.css.map +1 -0
- package/nationalarchives/components/button/button.scss +103 -0
- package/nationalarchives/components/button/button.stories.js +61 -0
- package/nationalarchives/components/button/macro-options.json +19 -1
- package/nationalarchives/components/button/template.njk +8 -2
- package/nationalarchives/components/card/_index.scss +1 -183
- package/nationalarchives/components/card/card.css +13 -0
- package/nationalarchives/components/card/card.css.map +1 -0
- package/nationalarchives/components/card/card.scss +171 -0
- package/nationalarchives/components/card/card.stories.js +185 -95
- package/nationalarchives/components/card/fixtures.json +83 -92
- package/nationalarchives/components/card/macro-options.json +77 -48
- package/nationalarchives/components/card/template.njk +47 -37
- package/nationalarchives/components/cookie-banner/_index.scss +1 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.css +13 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.js +2 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.mjs +83 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.scss +32 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +164 -0
- package/nationalarchives/components/cookie-banner/fixtures.json +4 -0
- package/nationalarchives/components/cookie-banner/macro-options.json +38 -0
- package/nationalarchives/components/cookie-banner/macro.njk +3 -0
- package/nationalarchives/components/cookie-banner/template.njk +61 -0
- package/nationalarchives/components/filters/_index.scss +1 -54
- package/nationalarchives/components/filters/filters.css +1 -0
- package/nationalarchives/components/filters/filters.css.map +1 -0
- package/nationalarchives/components/filters/filters.scss +53 -0
- package/nationalarchives/components/footer/_index.scss +1 -270
- package/nationalarchives/components/footer/footer.css +13 -0
- package/nationalarchives/components/footer/footer.css.map +1 -0
- package/nationalarchives/components/footer/footer.scss +265 -0
- package/nationalarchives/components/footer/footer.stories.js +6 -6
- package/nationalarchives/components/footer/macro-options.json +7 -1
- package/nationalarchives/components/footer/template.njk +10 -6
- package/nationalarchives/components/gallery/_index.scss +1 -0
- package/nationalarchives/components/gallery/fixtures.json +4 -0
- package/nationalarchives/components/gallery/gallery.css +13 -0
- package/nationalarchives/components/gallery/gallery.css.map +1 -0
- package/nationalarchives/components/gallery/gallery.js +2 -0
- package/nationalarchives/components/gallery/gallery.js.map +1 -0
- package/nationalarchives/components/gallery/gallery.mjs +80 -0
- package/nationalarchives/components/gallery/gallery.scss +129 -0
- package/nationalarchives/components/gallery/gallery.stories.js +76 -0
- package/nationalarchives/components/gallery/macro-options.json +104 -0
- package/nationalarchives/components/gallery/macro.njk +3 -0
- package/nationalarchives/components/gallery/template.njk +45 -0
- package/nationalarchives/components/grid/_index.scss +1 -79
- package/nationalarchives/components/grid/grid.css +1 -0
- package/nationalarchives/components/grid/grid.css.map +1 -0
- package/nationalarchives/components/grid/grid.scss +81 -0
- package/nationalarchives/components/header/_index.scss +1 -586
- package/nationalarchives/components/header/header.css +1 -0
- package/nationalarchives/components/header/header.css.map +1 -0
- package/nationalarchives/components/header/header.js +1 -1
- package/nationalarchives/components/header/header.js.map +1 -1
- package/nationalarchives/components/header/header.scss +594 -0
- package/nationalarchives/components/header/header.stories.js +5 -5
- package/nationalarchives/components/hero/_index.scss +1 -167
- package/nationalarchives/components/hero/hero.css +1 -0
- package/nationalarchives/components/hero/hero.css.map +1 -0
- package/nationalarchives/components/hero/hero.scss +169 -0
- package/nationalarchives/components/index-grid/_index.scss +1 -82
- package/nationalarchives/components/index-grid/index-grid.css +1 -0
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -0
- package/nationalarchives/components/index-grid/index-grid.scss +84 -0
- package/nationalarchives/components/message/_index.scss +1 -35
- package/nationalarchives/components/message/message.css +1 -0
- package/nationalarchives/components/message/message.css.map +1 -0
- package/nationalarchives/components/message/message.scss +36 -0
- package/nationalarchives/components/phase-banner/_index.scss +1 -60
- package/nationalarchives/components/phase-banner/fixtures.json +8 -8
- package/nationalarchives/components/phase-banner/phase-banner.css +1 -0
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -0
- package/nationalarchives/components/phase-banner/phase-banner.scss +31 -0
- package/nationalarchives/components/phase-banner/template.njk +2 -2
- package/nationalarchives/components/picture/_index.scss +1 -62
- package/nationalarchives/components/picture/picture.css +13 -0
- package/nationalarchives/components/picture/picture.css.map +1 -0
- package/nationalarchives/components/picture/picture.js +1 -1
- package/nationalarchives/components/picture/picture.js.map +1 -1
- package/nationalarchives/components/picture/picture.mjs +2 -1
- package/nationalarchives/components/picture/picture.scss +65 -0
- package/nationalarchives/components/profile/_index.scss +1 -2
- package/nationalarchives/components/profile/profile.css +1 -0
- package/nationalarchives/components/profile/profile.css.map +1 -0
- package/nationalarchives/components/profile/profile.scss +5 -0
- package/nationalarchives/components/sensitive-image/_index.scss +1 -77
- package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -0
- package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -0
- package/nationalarchives/components/sensitive-image/sensitive-image.js +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.js.map +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.scss +78 -0
- package/nationalarchives/components/skip-link/_index.scss +1 -63
- package/nationalarchives/components/skip-link/skip-link.css +1 -0
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -0
- package/nationalarchives/components/skip-link/skip-link.scss +61 -0
- package/nationalarchives/components/tabs/_index.scss +1 -144
- package/nationalarchives/components/tabs/tabs.css +1 -0
- package/nationalarchives/components/tabs/tabs.css.map +1 -0
- package/nationalarchives/components/tabs/tabs.js +1 -1
- package/nationalarchives/components/tabs/tabs.js.map +1 -1
- package/nationalarchives/components/tabs/tabs.mjs +2 -0
- package/nationalarchives/components/tabs/tabs.scss +143 -0
- package/nationalarchives/components/tabs/tabs.stories.js +0 -1
- package/nationalarchives/lib/_font-awesome.scss +5 -0
- package/nationalarchives/lib/_index.scss +1 -0
- package/nationalarchives/lib/cookies.mjs +110 -0
- package/nationalarchives/lib/font-awesome/brands.css +5 -0
- package/nationalarchives/lib/font-awesome/brands.css.map +1 -0
- package/nationalarchives/lib/font-awesome/fontawesome.css +5 -0
- package/nationalarchives/lib/font-awesome/fontawesome.css.map +1 -0
- package/nationalarchives/lib/font-awesome/regular.css +5 -0
- package/nationalarchives/lib/font-awesome/regular.css.map +1 -0
- package/nationalarchives/lib/font-awesome/solid.css +5 -0
- package/nationalarchives/lib/font-awesome/solid.css.map +1 -0
- package/nationalarchives/lib/font-awesome/v4-shims.css +5 -0
- package/nationalarchives/lib/font-awesome/v4-shims.css.map +1 -0
- package/nationalarchives/stories/development/about.mdx +60 -0
- package/nationalarchives/stories/development/contributing.mdx +8 -5
- package/nationalarchives/stories/development/relationships.mdx +57 -0
- package/nationalarchives/stories/development/using.mdx +75 -0
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +176 -50
- package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +3 -3
- package/nationalarchives/stories/utilities/typography/typography.stories.js +1 -1
- package/nationalarchives/templates/layouts/_generic.njk +6 -1
- package/nationalarchives/tools/_colour.scss +55 -17
- package/nationalarchives/tools/_index.scss +5 -4
- package/nationalarchives/tools/_spacing.scss +22 -0
- package/nationalarchives/tools/_typography.scss +0 -4
- package/nationalarchives/utilities/_a11y.scss +24 -0
- package/nationalarchives/utilities/_global.scss +3 -29
- package/nationalarchives/utilities/_index.scss +5 -5
- package/nationalarchives/utilities/_overrides.scss +5 -15
- package/nationalarchives/utilities/_typography.scss +68 -57
- package/nationalarchives/variables/_colour.scss +17 -9
- package/nationalarchives/variables/_grid.scss +1 -1
- package/nationalarchives/variables/_spacing.scss +12 -12
- package/nationalarchives/variables/_typography.scss +7 -7
- package/package.json +5 -2
- package/nationalarchives/assets/images/footer/facebook.svg +0 -11
- package/nationalarchives/assets/images/footer/flickr.svg +0 -11
- package/nationalarchives/assets/images/footer/instagram.svg +0 -17
- package/nationalarchives/assets/images/footer/rss.svg +0 -13
- package/nationalarchives/assets/images/footer/twitter.svg +0 -14
- package/nationalarchives/assets/images/footer/youtube.svg +0 -12
- package/nationalarchives/stories/development/dependencies.mdx +0 -11
- package/nationalarchives/stories/development/relationships.md +0 -91
- package/nationalarchives/stories/development/technologies.mdx +0 -65
- package/nationalarchives/utilities/_font-awesome.scss +0 -5
@@ -4,117 +4,120 @@
|
|
4
4
|
{
|
5
5
|
"name": "basic card",
|
6
6
|
"options": {
|
7
|
-
"
|
8
|
-
|
9
|
-
"level": 3
|
10
|
-
},
|
7
|
+
"title": "Card title",
|
8
|
+
"headingLevel": 3,
|
11
9
|
"body": "<p>Card body</p>"
|
12
10
|
},
|
13
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-
|
11
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
14
12
|
"hidden": false
|
15
13
|
},
|
16
14
|
{
|
17
15
|
"name": "with supertitle",
|
18
16
|
"options": {
|
19
|
-
"
|
20
|
-
|
21
|
-
|
22
|
-
"level": 3
|
23
|
-
},
|
17
|
+
"supertitle": "Card supertitle",
|
18
|
+
"title": "Card title",
|
19
|
+
"headingLevel": 3,
|
24
20
|
"body": "<p>Card body</p>"
|
25
21
|
},
|
26
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><hgroup class=\"tna-
|
27
|
-
"hidden": false
|
28
|
-
},
|
29
|
-
{
|
30
|
-
"name": "with single sentence supertitle",
|
31
|
-
"options": {
|
32
|
-
"heading": {
|
33
|
-
"supertitle": "Card supertitle",
|
34
|
-
"title": "Card title",
|
35
|
-
"level": 3,
|
36
|
-
"singleSentence": true
|
37
|
-
},
|
38
|
-
"body": "<p>Card body</p>"
|
39
|
-
},
|
40
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><hgroup class=\"tna-card__heading tna-hgroup tna-hgroup--l\"><h3 class=\"tna-card__title tna-hgroup__title\"><span class=\"tna-card__supertitle tna-hgroup__supertitle\">Card supertitle</span>Card title</h3></hgroup><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
22
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><hgroup class=\"tna-hgroup tna-hgroup--m tna-card__heading\"><h3 class=\"tna-hgroup__title\"><span class=\"tna-hgroup__supertitle\">Card supertitle</span>Card title</h3></hgroup><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
41
23
|
"hidden": false
|
42
24
|
},
|
43
25
|
{
|
44
26
|
"name": "heading size",
|
45
27
|
"options": {
|
46
|
-
"
|
47
|
-
|
48
|
-
|
49
|
-
"size": "m"
|
50
|
-
},
|
28
|
+
"title": "Card title",
|
29
|
+
"headingLevel": 3,
|
30
|
+
"headingSize": "xl",
|
51
31
|
"body": "<p>Card body</p>"
|
52
32
|
},
|
53
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-
|
33
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--xl tna-card__heading\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
54
34
|
"hidden": false
|
55
35
|
},
|
56
36
|
{
|
57
37
|
"name": "heading level",
|
58
38
|
"options": {
|
59
|
-
"
|
60
|
-
|
61
|
-
"level": 1
|
62
|
-
},
|
39
|
+
"title": "Card title",
|
40
|
+
"headingLevel": 1,
|
63
41
|
"body": "<p>Card body</p>"
|
64
42
|
},
|
65
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h1 class=\"tna-
|
43
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h1 class=\" tna-heading tna-heading--m tna-card__heading\">Card title</h1><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
66
44
|
"hidden": false
|
67
45
|
},
|
68
46
|
{
|
69
47
|
"name": "with link",
|
70
48
|
"options": {
|
71
|
-
"
|
72
|
-
|
73
|
-
"level": 3
|
74
|
-
},
|
49
|
+
"title": "Card title",
|
50
|
+
"headingLevel": 3,
|
75
51
|
"href": "#",
|
76
52
|
"body": "<p>Card body</p>"
|
77
53
|
},
|
78
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-
|
54
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\"><a href=\"#\" class=\"tna-card__heading-link\">Card title</a></h3><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
79
55
|
"hidden": false
|
80
56
|
},
|
81
57
|
{
|
82
58
|
"name": "with text",
|
83
59
|
"options": {
|
84
|
-
"
|
85
|
-
|
86
|
-
"level": 3
|
87
|
-
},
|
60
|
+
"title": "Card title",
|
61
|
+
"headingLevel": 3,
|
88
62
|
"text": "Card body"
|
89
63
|
},
|
90
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-
|
64
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
91
65
|
"hidden": false
|
92
66
|
},
|
93
67
|
{
|
94
68
|
"name": "with image",
|
95
69
|
"options": {
|
96
|
-
"
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
"
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
70
|
+
"title": "Card title",
|
71
|
+
"headingLevel": 3,
|
72
|
+
"imageSrc": "https://loremflickr.com/640/360",
|
73
|
+
"imageAlt": "A placeholder image",
|
74
|
+
"imageWidth": 640,
|
75
|
+
"imageHeight": 360,
|
76
|
+
"body": "<p>Card body</p>"
|
77
|
+
},
|
78
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\">Card title</h3><div class=\"tna-card__image-container\"><picture class=\"tna-card__image\"><img src=\"https://loremflickr.com/640/360\" alt=\"A placeholder image\" width=\"640\" height=\"360\"></picture></div><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
79
|
+
"hidden": false
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"name": "with image and alternative sources",
|
83
|
+
"options": {
|
84
|
+
"title": "Card title",
|
85
|
+
"headingLevel": 3,
|
86
|
+
"imageSrc": "https://loremflickr.com/640/360",
|
87
|
+
"imageAlt": "A placeholder image",
|
88
|
+
"imageWidth": 640,
|
89
|
+
"imageHeight": 360,
|
90
|
+
"imageSources": [
|
91
|
+
{
|
92
|
+
"src": "https://www.gstatic.com/webp/gallery/2.webp",
|
93
|
+
"type": "image/webp"
|
94
|
+
}
|
95
|
+
],
|
96
|
+
"body": "<p>Card body</p>"
|
97
|
+
},
|
98
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\">Card title</h3><div class=\"tna-card__image-container\"><picture class=\"tna-card__image\"><source srcset=\"https://www.gstatic.com/webp/gallery/2.webp\" type=\"image/webp\" width=\"640\" height=\"360\"><source srcset=\"https://loremflickr.com/640/360\" type=\"image/jpeg\" width=\"640\" height=\"360\"><img src=\"https://loremflickr.com/640/360\" alt=\"A placeholder image\" width=\"640\" height=\"360\"></picture></div><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
99
|
+
"hidden": false
|
100
|
+
},
|
101
|
+
{
|
102
|
+
"name": "with link and image",
|
103
|
+
"options": {
|
104
|
+
"title": "Card title",
|
105
|
+
"headingLevel": 3,
|
106
|
+
"imageSrc": "https://loremflickr.com/640/360",
|
107
|
+
"imageAlt": "A placeholder image",
|
108
|
+
"imageWidth": 640,
|
109
|
+
"imageHeight": 360,
|
110
|
+
"href": "#",
|
106
111
|
"body": "<p>Card body</p>"
|
107
112
|
},
|
108
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-
|
113
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\"><a href=\"#\" class=\"tna-card__heading-link\">Card title</a></h3><a href=\"#\" class=\"tna-card__image-container\" tabindex=\"-1\"><picture class=\"tna-card__image\"><img src=\"https://loremflickr.com/640/360\" alt=\"A placeholder image\" width=\"640\" height=\"360\"></picture></a><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
109
114
|
"hidden": false
|
110
115
|
},
|
111
116
|
{
|
112
117
|
"name": "with actions",
|
113
118
|
"options": {
|
114
|
-
"
|
115
|
-
|
116
|
-
"level": 3
|
117
|
-
},
|
119
|
+
"title": "Card title",
|
120
|
+
"headingLevel": 3,
|
118
121
|
"body": "<p>Card body</p>",
|
119
122
|
"actions": [
|
120
123
|
{
|
@@ -124,87 +127,75 @@
|
|
124
127
|
}
|
125
128
|
]
|
126
129
|
},
|
127
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-
|
130
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div><div class=\"tna-card__actions\"><a href=\"#\" class=\"tna-card__action\" role=\"button\"title=\"Go and do the action\">Card action</a></div></div></div>",
|
128
131
|
"hidden": false
|
129
132
|
},
|
130
133
|
{
|
131
134
|
"name": "with a label",
|
132
135
|
"options": {
|
133
|
-
"
|
134
|
-
|
135
|
-
"level": 3
|
136
|
-
},
|
136
|
+
"title": "Card title",
|
137
|
+
"headingLevel": 3,
|
137
138
|
"label": "New",
|
138
139
|
"body": "<p>Card body</p>"
|
139
140
|
},
|
140
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-
|
141
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
141
142
|
"hidden": false
|
142
143
|
},
|
143
144
|
{
|
144
145
|
"name": "with a boxed style",
|
145
146
|
"options": {
|
146
|
-
"
|
147
|
-
|
148
|
-
"level": 3
|
149
|
-
},
|
147
|
+
"title": "Card title",
|
148
|
+
"headingLevel": 3,
|
150
149
|
"body": "<p>Card body</p>",
|
151
150
|
"style": "boxed"
|
152
151
|
},
|
153
|
-
"html": "<div class=\"tna-card tna-card--contrast\" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-
|
152
|
+
"html": "<div class=\"tna-card tna-card--contrast\" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
154
153
|
"hidden": false
|
155
154
|
},
|
156
155
|
{
|
157
156
|
"name": "with a accent style",
|
158
157
|
"options": {
|
159
|
-
"
|
160
|
-
|
161
|
-
"level": 3
|
162
|
-
},
|
158
|
+
"title": "Card title",
|
159
|
+
"headingLevel": 3,
|
163
160
|
"body": "<p>Card body</p>",
|
164
161
|
"style": "accent"
|
165
162
|
},
|
166
|
-
"html": "<div class=\"tna-card tna-card--accent\" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-
|
163
|
+
"html": "<div class=\"tna-card tna-card--accent\" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
167
164
|
"hidden": false
|
168
165
|
},
|
169
166
|
{
|
170
167
|
"name": "with an unknown style",
|
171
168
|
"options": {
|
172
|
-
"
|
173
|
-
|
174
|
-
"level": 3
|
175
|
-
},
|
169
|
+
"title": "Card title",
|
170
|
+
"headingLevel": 3,
|
176
171
|
"body": "<p>Card body</p>",
|
177
172
|
"style": "foobar"
|
178
173
|
},
|
179
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-
|
174
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
180
175
|
"hidden": false
|
181
176
|
},
|
182
177
|
{
|
183
178
|
"name": "with classes",
|
184
179
|
"options": {
|
185
|
-
"
|
186
|
-
|
187
|
-
"level": 3
|
188
|
-
},
|
180
|
+
"title": "Card title",
|
181
|
+
"headingLevel": 3,
|
189
182
|
"body": "<p>Card body</p>",
|
190
183
|
"classes": "card__test-class"
|
191
184
|
},
|
192
|
-
"html": "<div class=\"tna-card card__test-class\" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-
|
185
|
+
"html": "<div class=\"tna-card card__test-class\" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
193
186
|
"hidden": false
|
194
187
|
},
|
195
188
|
{
|
196
189
|
"name": "with attributes",
|
197
190
|
"options": {
|
198
|
-
"
|
199
|
-
|
200
|
-
"level": 3
|
201
|
-
},
|
191
|
+
"title": "Card title",
|
192
|
+
"headingLevel": 3,
|
202
193
|
"body": "<p>Card body</p>",
|
203
194
|
"attributes": {
|
204
195
|
"data-testattribute": "foobar"
|
205
196
|
}
|
206
197
|
},
|
207
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\" data-testattribute=\"foobar\"><div class=\"tna-card__inner\"><h3 class=\"tna-
|
198
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\" data-testattribute=\"foobar\"><div class=\"tna-card__inner\"><h3 class=\" tna-heading tna-heading--m tna-card__heading\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
208
199
|
"hidden": false
|
209
200
|
}
|
210
201
|
]
|
@@ -1,53 +1,64 @@
|
|
1
1
|
[
|
2
2
|
{
|
3
|
-
"name": "
|
4
|
-
"type": "
|
3
|
+
"name": "supertitle",
|
4
|
+
"type": "string",
|
5
|
+
"required": false,
|
6
|
+
"description": "The smaller title to display above the main card title."
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"name": "title",
|
10
|
+
"type": "string",
|
5
11
|
"required": true,
|
6
|
-
"description": ""
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
{
|
21
|
-
"name": "level",
|
22
|
-
"type": "number",
|
23
|
-
"required": true,
|
24
|
-
"description": ""
|
25
|
-
},
|
26
|
-
{
|
27
|
-
"name": "size",
|
28
|
-
"type": "string",
|
29
|
-
"required": false,
|
30
|
-
"description": ""
|
31
|
-
},
|
32
|
-
{
|
33
|
-
"name": "singleSentence",
|
34
|
-
"type": "boolean",
|
35
|
-
"required": false,
|
36
|
-
"description": ""
|
37
|
-
}
|
38
|
-
]
|
12
|
+
"description": "The main title of the card."
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "headingLevel",
|
16
|
+
"type": "number",
|
17
|
+
"required": true,
|
18
|
+
"description": "The heading level which represents an element from `<h1>` through to `<h6>`."
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"name": "headingSize",
|
22
|
+
"type": "string",
|
23
|
+
"required": false,
|
24
|
+
"default": "m",
|
25
|
+
"description": "The physical size of the card title."
|
39
26
|
},
|
40
27
|
{
|
41
28
|
"name": "href",
|
42
29
|
"type": "string",
|
43
30
|
"required": false,
|
44
|
-
"description": ""
|
31
|
+
"description": "A URL to use as a link in the card's heading and image (if one is declared)."
|
45
32
|
},
|
46
33
|
{
|
47
|
-
"name": "
|
48
|
-
"type": "
|
34
|
+
"name": "imageSrc",
|
35
|
+
"type": "string",
|
36
|
+
"required": false,
|
37
|
+
"description": "A JPG file to use as the card's image."
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"name": "imageAlt",
|
41
|
+
"type": "string",
|
49
42
|
"required": false,
|
50
|
-
"description": ""
|
43
|
+
"description": "Alternative text for the image in the event that it can't be displayed."
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"name": "imageWidth",
|
47
|
+
"type": "number",
|
48
|
+
"required": false,
|
49
|
+
"description": "The width of the image in pixels."
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"name": "imageHeight",
|
53
|
+
"type": "number",
|
54
|
+
"required": false,
|
55
|
+
"description": "The height of the image in pixels."
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"name": "imageSources",
|
59
|
+
"type": "array",
|
60
|
+
"required": true,
|
61
|
+
"description": "Alternative sources of the image which can include WebP files.",
|
51
62
|
"params": [
|
52
63
|
{
|
53
64
|
"name": "src",
|
@@ -56,21 +67,27 @@
|
|
56
67
|
"description": ""
|
57
68
|
},
|
58
69
|
{
|
59
|
-
"name": "
|
70
|
+
"name": "type",
|
60
71
|
"type": "string",
|
61
72
|
"required": true,
|
62
73
|
"description": ""
|
63
74
|
},
|
75
|
+
{
|
76
|
+
"name": "media",
|
77
|
+
"type": "string",
|
78
|
+
"required": false,
|
79
|
+
"description": ""
|
80
|
+
},
|
64
81
|
{
|
65
82
|
"name": "width",
|
66
83
|
"type": "number",
|
67
|
-
"required":
|
84
|
+
"required": false,
|
68
85
|
"description": ""
|
69
86
|
},
|
70
87
|
{
|
71
88
|
"name": "height",
|
72
89
|
"type": "number",
|
73
|
-
"required":
|
90
|
+
"required": false,
|
74
91
|
"description": ""
|
75
92
|
}
|
76
93
|
]
|
@@ -79,25 +96,25 @@
|
|
79
96
|
"name": "label",
|
80
97
|
"type": "string",
|
81
98
|
"required": false,
|
82
|
-
"description": ""
|
99
|
+
"description": "A label which will appear over the top left of the card's image. If there is no imagem, the label is not displayed."
|
83
100
|
},
|
84
101
|
{
|
85
102
|
"name": "body",
|
86
103
|
"type": "string",
|
87
104
|
"required": true,
|
88
|
-
"description": ""
|
105
|
+
"description": "The HTML for the main body of the card. Not displayed if `text` is set."
|
89
106
|
},
|
90
107
|
{
|
91
108
|
"name": "text",
|
92
109
|
"type": "string",
|
93
110
|
"required": false,
|
94
|
-
"description": ""
|
111
|
+
"description": "The text for the card which will be inserted into a `<p>` element. Overwrites `body` if it is set."
|
95
112
|
},
|
96
113
|
{
|
97
114
|
"name": "actions",
|
98
115
|
"type": "array",
|
99
116
|
"required": false,
|
100
|
-
"description": "",
|
117
|
+
"description": "An array of actions to add at the bottom of the card. Each action is displayed as a button.",
|
101
118
|
"params": [
|
102
119
|
{
|
103
120
|
"name": "text",
|
@@ -116,6 +133,18 @@
|
|
116
133
|
"type": "string",
|
117
134
|
"required": false,
|
118
135
|
"description": ""
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"name": "icon",
|
139
|
+
"type": "string",
|
140
|
+
"required": false,
|
141
|
+
"description": ""
|
142
|
+
},
|
143
|
+
{
|
144
|
+
"name": "brandIcon",
|
145
|
+
"type": "string",
|
146
|
+
"required": false,
|
147
|
+
"description": ""
|
119
148
|
}
|
120
149
|
]
|
121
150
|
},
|
@@ -123,13 +152,13 @@
|
|
123
152
|
"name": "horizontal",
|
124
153
|
"type": "boolean",
|
125
154
|
"required": false,
|
126
|
-
"description": ""
|
155
|
+
"description": "Change the card to a horizontal layout, placing the image to the left of the content. This layout changes back to vertical on smaller devices."
|
127
156
|
},
|
128
157
|
{
|
129
158
|
"name": "style",
|
130
159
|
"type": "text",
|
131
160
|
"required": false,
|
132
|
-
"description": ""
|
161
|
+
"description": "The style of card to use which can be either `boxed` for an inverted card or `accent` for a card that matches the page's accent colour."
|
133
162
|
},
|
134
163
|
{
|
135
164
|
"name": "htmlElement",
|
@@ -10,49 +10,52 @@
|
|
10
10
|
{%- endif -%}
|
11
11
|
<{{ htmlElement }} class="tna-card {{ containerClasses | join(' ') }}" data-module="tna-card" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
12
12
|
<div class="tna-card__inner">
|
13
|
-
|
14
|
-
{
|
15
|
-
<
|
16
|
-
<
|
17
|
-
<span class="tna-card__supertitle tna-hgroup__supertitle">{{ params.heading.supertitle }}</span>
|
13
|
+
{%- if params.supertitle -%}
|
14
|
+
<hgroup class="tna-hgroup tna-hgroup--{{ params.headingSize or 'm' }} tna-card__heading">
|
15
|
+
<h{{ params.headingLevel }} class="tna-hgroup__title">
|
16
|
+
<span class="tna-hgroup__supertitle">{{ params.supertitle }}</span>
|
18
17
|
{%- if params.href -%}
|
19
|
-
|
18
|
+
<a href="{{ params.href }}" class="tna-card__heading-link">{{ params.title }}</a>
|
20
19
|
{%- else -%}
|
21
|
-
|
20
|
+
{{ params.title }}
|
22
21
|
{%- endif -%}
|
23
|
-
|
24
|
-
|
22
|
+
</h{{ params.headingLevel }}>
|
23
|
+
</hgroup>
|
25
24
|
{%- else -%}
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
{%- endif -%}
|
34
|
-
</h{{ params.heading.level }}>
|
35
|
-
</hgroup>
|
36
|
-
{%- endif -%}
|
37
|
-
{%- else -%}
|
38
|
-
<h{{ params.heading.level }} class="tna-card__title tna-heading tna-heading--{{ params.heading.size or 'l' }}">
|
39
|
-
{%- if params.href -%}
|
40
|
-
<a href="{{ params.href }}" class="tna-card__title-link">{{ params.heading.title }}</a>
|
41
|
-
{%- else -%}
|
42
|
-
{{ params.heading.title }}
|
25
|
+
<h{{ params.headingLevel }} class=" tna-heading tna-heading--{{ params.headingSize or 'm' }} tna-card__heading">
|
26
|
+
{%- if params.href -%}
|
27
|
+
<a href="{{ params.href }}" class="tna-card__heading-link">{{ params.title }}</a>
|
28
|
+
{%- else -%}
|
29
|
+
{{ params.title }}
|
30
|
+
{%- endif -%}
|
31
|
+
</h{{ params.headingLevel }}>
|
43
32
|
{%- endif -%}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
<
|
49
|
-
{%-
|
50
|
-
|
51
|
-
|
33
|
+
{%- if params.imageSrc -%}
|
34
|
+
{%- if params.href -%}
|
35
|
+
<a href="{{ params.href }}" class="tna-card__image-container" tabindex="-1">
|
36
|
+
{%- else -%}
|
37
|
+
<div class="tna-card__image-container">
|
38
|
+
{%- endif -%}
|
39
|
+
<picture class="tna-card__image">
|
40
|
+
{%- if params.imageSources -%}
|
41
|
+
{%- for source in params.imageSources -%}
|
42
|
+
<source srcset="{{ source.src }}" type="{{ source.type }}" width="{{ source.width if source.width else params.imageWidth }}" height="{{ source.height if source.height else params.imageHeight }}">
|
43
|
+
{%- endfor -%}
|
44
|
+
<source srcset="{{ params.imageSrc }}" type="image/jpeg" width="{{ params.imageWidth }}" height="{{ params.imageHeight }}">
|
45
|
+
{%- endif -%}
|
46
|
+
<img src="{{ params.imageSrc }}" alt="{{ params.imageAlt }}" width="{{ params.imageWidth }}" height="{{ params.imageHeight }}">
|
47
|
+
</picture>
|
48
|
+
{%- if params.label -%}
|
49
|
+
<div class="tna-chip tna-card__image-label">
|
50
|
+
{{ params.label }}
|
51
|
+
</div>
|
52
|
+
{%- endif -%}
|
53
|
+
{%- if params.href -%}
|
54
|
+
</a>
|
55
|
+
{%- else -%}
|
52
56
|
</div>
|
53
57
|
{%- endif -%}
|
54
|
-
|
55
|
-
{%- endif -%}
|
58
|
+
{%- endif -%}
|
56
59
|
<div class="tna-card__body">
|
57
60
|
{%- if params.text -%}
|
58
61
|
<p>{{ params.text }}</p>
|
@@ -63,7 +66,14 @@
|
|
63
66
|
{%- if params.actions -%}
|
64
67
|
<div class="tna-card__actions">
|
65
68
|
{%- for item in params.actions -%}
|
66
|
-
<a href="{{ item.href }}" class="tna-card__action" role="button" {%- if item.title %}title="{{ item.title }}"{% endif %}>
|
69
|
+
<a href="{{ item.href }}" class="tna-card__action" role="button" {%- if item.title %}title="{{ item.title }}"{% endif %}>
|
70
|
+
{%- if item.brandIcon -%}
|
71
|
+
<i class="fa-brands fa-{{ item.brandIcon }}"></i>
|
72
|
+
{%- elseif item.icon -%}
|
73
|
+
<i class="fa-solid fa-{{ item.icon }}"></i>
|
74
|
+
{%- endif -%}
|
75
|
+
{{ item.text }}
|
76
|
+
</a>
|
67
77
|
{%- endfor -%}
|
68
78
|
</div>
|
69
79
|
{%- endif -%}
|
@@ -0,0 +1 @@
|
|
1
|
+
@use "cookie-banner";
|