@nationalarchives/frontend 0.1.9-prerelease → 0.1.11-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 (130) hide show
  1. package/README.md +3 -3
  2. package/govuk-prototype-kit.config.json +0 -3
  3. package/nationalarchives/_features.scss +4 -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 +54 -3
  9. package/nationalarchives/all.scss +8 -4
  10. package/nationalarchives/assets/images/footer/facebook.svg +11 -0
  11. package/nationalarchives/assets/images/footer/flickr.svg +11 -0
  12. package/nationalarchives/assets/images/footer/instagram.svg +17 -0
  13. package/nationalarchives/assets/images/footer/rss.svg +13 -0
  14. package/nationalarchives/assets/images/footer/twitter.svg +14 -0
  15. package/nationalarchives/assets/images/footer/youtube.svg +12 -0
  16. package/nationalarchives/assets/images/tna-square-logo.svg +5 -24
  17. package/nationalarchives/components/_index.scss +13 -0
  18. package/nationalarchives/components/breadcrumbs/_index.scss +28 -6
  19. package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +1 -2
  20. package/nationalarchives/components/breadcrumbs/fixtures.json +1 -1
  21. package/nationalarchives/components/breadcrumbs/macro.njk +1 -1
  22. package/nationalarchives/components/breadcrumbs/template.njk +14 -13
  23. package/nationalarchives/components/button/_index.scss +23 -11
  24. package/nationalarchives/components/button/button.stories.js +1 -2
  25. package/nationalarchives/components/button/fixtures.json +5 -5
  26. package/nationalarchives/components/button/macro.njk +1 -1
  27. package/nationalarchives/components/card/_index.scss +51 -7
  28. package/nationalarchives/components/card/card.js +2 -0
  29. package/nationalarchives/components/card/card.js.map +1 -0
  30. package/nationalarchives/components/card/card.mjs +45 -0
  31. package/nationalarchives/components/card/card.stories.js +18 -15
  32. package/nationalarchives/components/card/fixtures.json +14 -12
  33. package/nationalarchives/components/card/macro-options.json +18 -0
  34. package/nationalarchives/components/card/macro.njk +1 -1
  35. package/nationalarchives/components/card/template.njk +9 -4
  36. package/nationalarchives/components/filters/filters.stories.js +1 -2
  37. package/nationalarchives/components/filters/macro.njk +1 -1
  38. package/nationalarchives/components/filters/template.njk +2 -2
  39. package/nationalarchives/components/footer/_index.scss +68 -13
  40. package/nationalarchives/components/footer/fixtures.json +1 -1
  41. package/nationalarchives/components/footer/footer.stories.js +20 -23
  42. package/nationalarchives/components/footer/macro-options.json +12 -6
  43. package/nationalarchives/components/footer/macro.njk +1 -1
  44. package/nationalarchives/components/footer/template.njk +26 -16
  45. package/nationalarchives/components/grid/_index.scss +10 -12
  46. package/nationalarchives/components/grid/fixtures.json +12 -12
  47. package/nationalarchives/components/grid/grid.stories.js +56 -3
  48. package/nationalarchives/components/grid/macro-options.json +30 -0
  49. package/nationalarchives/components/grid/macro.njk +1 -1
  50. package/nationalarchives/components/grid/template.njk +17 -1
  51. package/nationalarchives/components/header/_index.scss +269 -60
  52. package/nationalarchives/components/header/header.js +1 -1
  53. package/nationalarchives/components/header/header.js.map +1 -1
  54. package/nationalarchives/components/header/header.mjs +7 -12
  55. package/nationalarchives/components/header/header.stories.js +156 -6
  56. package/nationalarchives/components/header/macro-options.json +83 -5
  57. package/nationalarchives/components/header/macro.njk +1 -1
  58. package/nationalarchives/components/header/template.njk +45 -36
  59. package/nationalarchives/components/hero/_index.scss +36 -6
  60. package/nationalarchives/components/hero/fixtures.json +16 -1
  61. package/nationalarchives/components/hero/hero.stories.js +32 -16
  62. package/nationalarchives/components/hero/macro-options.json +14 -2
  63. package/nationalarchives/components/hero/macro.njk +1 -1
  64. package/nationalarchives/components/hero/template.njk +7 -5
  65. package/nationalarchives/components/phase-banner/_index.scss +60 -0
  66. package/nationalarchives/components/phase-banner/fixtures.json +81 -0
  67. package/nationalarchives/components/phase-banner/macro-options.json +26 -0
  68. package/nationalarchives/components/phase-banner/macro.njk +3 -0
  69. package/nationalarchives/components/phase-banner/phase-banner.stories.js +64 -0
  70. package/nationalarchives/components/phase-banner/template.njk +16 -0
  71. package/nationalarchives/components/picture/_index.scss +77 -0
  72. package/nationalarchives/components/picture/fixtures.json +4 -0
  73. package/nationalarchives/components/picture/macro-options.json +88 -0
  74. package/nationalarchives/components/picture/macro.njk +3 -0
  75. package/nationalarchives/components/picture/picture.js +2 -0
  76. package/nationalarchives/components/picture/picture.js.map +1 -0
  77. package/nationalarchives/components/picture/picture.mjs +57 -0
  78. package/nationalarchives/components/picture/picture.stories.js +63 -0
  79. package/nationalarchives/components/picture/template.njk +42 -0
  80. package/nationalarchives/components/profile/_index.scss +2 -0
  81. package/nationalarchives/components/profile/fixtures.json +4 -0
  82. package/nationalarchives/components/profile/macro-options.json +14 -0
  83. package/nationalarchives/components/profile/macro.njk +3 -0
  84. package/nationalarchives/components/profile/profile.stories.js +32 -0
  85. package/nationalarchives/components/profile/template.njk +15 -0
  86. package/nationalarchives/components/sensitive-image/fixtures.json +3 -3
  87. package/nationalarchives/components/sensitive-image/macro.njk +1 -1
  88. package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +1 -2
  89. package/nationalarchives/components/tabs/_index.scss +148 -0
  90. package/nationalarchives/components/tabs/fixtures.json +4 -0
  91. package/nationalarchives/components/tabs/macro-options.json +52 -0
  92. package/nationalarchives/components/tabs/macro.njk +3 -0
  93. package/nationalarchives/components/tabs/tabs.js +2 -0
  94. package/nationalarchives/components/tabs/tabs.js.map +1 -0
  95. package/nationalarchives/components/tabs/tabs.mjs +214 -0
  96. package/nationalarchives/components/tabs/tabs.stories.js +302 -0
  97. package/nationalarchives/components/tabs/template.njk +20 -0
  98. package/nationalarchives/patterns/_index.scss +1 -0
  99. package/nationalarchives/patterns/featured-collection/_index.scss +13 -0
  100. package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +35 -0
  101. package/nationalarchives/patterns/featured-collection/macro-options.json +20 -0
  102. package/nationalarchives/patterns/featured-collection/macro.njk +3 -0
  103. package/nationalarchives/patterns/featured-collection/template.njk +96 -0
  104. package/nationalarchives/stories/development/contributing.mdx +39 -0
  105. package/nationalarchives/stories/development/dependencies.mdx +2 -0
  106. package/nationalarchives/stories/development/technologies.mdx +65 -0
  107. package/nationalarchives/stories/utilities/colour.stories.js +189 -0
  108. package/nationalarchives/stories/utilities/typography.mdx +1 -0
  109. package/nationalarchives/stories/utilities/typography.stories.js +15 -0
  110. package/nationalarchives/templates/layouts/_generic.njk +1 -1
  111. package/nationalarchives/tools/_assets.scss +5 -0
  112. package/nationalarchives/tools/_colour.scss +129 -0
  113. package/nationalarchives/tools/_grid.scss +2 -2
  114. package/nationalarchives/tools/_index.scss +5 -0
  115. package/nationalarchives/tools/_media.scss +12 -11
  116. package/nationalarchives/tools/_typography.scss +15 -0
  117. package/nationalarchives/utilities/_debug.scss +11 -0
  118. package/nationalarchives/utilities/_global.scss +120 -3
  119. package/nationalarchives/utilities/_index.scss +3 -0
  120. package/nationalarchives/utilities/_typography.scss +155 -111
  121. package/nationalarchives/variables/_assets.scss +1 -0
  122. package/nationalarchives/variables/_colour.scss +120 -11
  123. package/nationalarchives/variables/{_all.scss → _index.scss} +1 -0
  124. package/nationalarchives/variables/_media.scss +39 -11
  125. package/nationalarchives/variables/_typography.scss +1 -1
  126. package/package.json +18 -15
  127. package/nationalarchives/components/_all.scss +0 -7
  128. package/nationalarchives/stories/development/structure.mdx +0 -7
  129. package/nationalarchives/tools/_all.scss +0 -3
  130. package/nationalarchives/utilities/_all.scss +0 -2
@@ -1,178 +1,222 @@
1
- @use "../variables/colour";
2
- @use "../variables/typography";
1
+ @use "../tools/colour";
3
2
  @use "../tools/media";
4
- @use "../tools/typography" as tools;
3
+ @use "../tools/typography";
5
4
 
6
5
  // Temporary - will eventually bundle font files into package
7
6
  @import "https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&family=Roboto+Mono:wght@500;700&display=swap";
8
7
  @import "https://use.typekit.net/hkj3kuz.css";
9
8
 
10
9
  .tna-template {
11
- font-family: typography.$font-family-main;
12
- font-weight: typography.$font-weight-main;
13
- color: colour.$base-font-colour;
10
+ @include colour.colour-font("font-base");
11
+ @include typography.main-font;
14
12
  -moz-osx-font-smoothing: grayscale;
15
13
  -webkit-font-smoothing: antialiased;
16
14
  text-rendering: optimizeLegibility;
17
15
  -webkit-text-size-adjust: none;
18
16
  direction: ltr;
17
+ }
19
18
 
20
- p {
21
- margin: 0 0 2rem;
19
+ .tna-template__body {
20
+ color: inherit;
21
+ @include typography.relative-font-size(18);
22
+ line-height: 1.6;
23
+ }
22
24
 
23
- &:last-child {
24
- margin-bottom: 0;
25
- }
25
+ h1,
26
+ h2,
27
+ h3,
28
+ h4,
29
+ h5,
30
+ h6,
31
+ ul,
32
+ ol {
33
+ margin-top: 0;
34
+ }
35
+
36
+ p {
37
+ margin: 0 0 1.5rem;
38
+
39
+ &:last-child {
40
+ margin-bottom: 0;
26
41
  }
42
+ }
27
43
 
28
- a {
29
- &:active {
30
- text-decoration-thickness: 4px;
31
- }
44
+ a {
45
+ @include colour.colour-font("link");
32
46
 
33
- &:hover {
34
- text-decoration-thickness: 3px;
35
- }
47
+ &:visited {
48
+ @include colour.colour-font("link-visited");
36
49
  }
37
50
 
38
- .tna-template__body {
39
- @include tools.relative-font-size(16);
40
- line-height: 1.6;
51
+ &:active {
52
+ text-decoration-thickness: 4px;
41
53
  }
42
54
 
43
- .tna-ul,
44
- .tna-ol {
45
- padding-left: 2rem;
55
+ &:hover {
56
+ text-decoration-thickness: 3px;
57
+ }
58
+ }
46
59
 
47
- li::marker {
48
- color: #f0a;
49
- font-weight: 700;
50
- }
60
+ .tna-ul,
61
+ .tna-ol {
62
+ padding-left: 2rem;
63
+
64
+ li::marker {
65
+ @include colour.colour-font("accent");
66
+ font-weight: 700;
51
67
  }
52
68
 
53
- .tna-ul--plain,
54
- .tna-ol--plain {
69
+ &--plain {
55
70
  padding-left: 0;
56
71
 
57
72
  list-style: none;
58
73
  }
74
+ }
59
75
 
60
- .tna-heading {
61
- margin-top: 0;
62
- margin-bottom: 1.5rem;
63
-
64
- color: colour.$tna-black;
65
- font-family: typography.$font-family-heading;
66
- font-weight: typography.$font-weight-heading;
76
+ .tna-heading {
77
+ margin-bottom: 1.5rem;
67
78
 
68
- &:last-child {
69
- margin-bottom: 0;
70
- }
79
+ @include colour.colour-font("font-dark");
80
+ @include typography.heading-font;
71
81
 
72
- &--xl {
73
- @include tools.relative-font-size(64);
74
- line-height: 1;
82
+ &:last-child {
83
+ margin-bottom: 0;
84
+ }
75
85
 
76
- @include media.on-medium {
77
- @include tools.relative-font-size(42);
78
- }
86
+ &--xl {
87
+ @include typography.relative-font-size(64);
88
+ line-height: 1;
79
89
 
80
- @include media.on-mobile {
81
- @include tools.relative-font-size(36);
82
- }
90
+ @include media.on-medium {
91
+ @include typography.relative-font-size(42);
83
92
  }
84
93
 
85
- &--l {
86
- @include tools.relative-font-size(32);
87
- line-height: 1.2;
94
+ @include media.on-mobile {
95
+ @include typography.relative-font-size(36);
96
+ }
97
+ }
88
98
 
89
- @include media.on-medium {
90
- @include tools.relative-font-size(26);
91
- }
99
+ &--l {
100
+ @include typography.relative-font-size(32);
101
+ line-height: 1.2;
92
102
 
93
- @include media.on-mobile {
94
- @include tools.relative-font-size(24);
95
- }
103
+ @include media.on-medium {
104
+ @include typography.relative-font-size(26);
96
105
  }
97
106
 
98
- &--m {
99
- @include tools.relative-font-size(20);
100
- line-height: 1.4;
107
+ @include media.on-mobile {
108
+ @include typography.relative-font-size(24);
101
109
  }
110
+ }
102
111
 
103
- &--s {
104
- @include tools.relative-font-size(18);
105
- line-height: 1.6;
106
- }
112
+ &--m {
113
+ @include typography.relative-font-size(20);
114
+ line-height: 1.4;
107
115
  }
108
116
 
109
- .tna-hgroup {
110
- margin-bottom: 2rem;
117
+ &--s {
118
+ @include typography.relative-font-size(18);
119
+ line-height: 1.6;
120
+ }
121
+ }
111
122
 
112
- &:last-child {
113
- margin-bottom: 0;
114
- }
123
+ .tna-hgroup {
124
+ margin-bottom: 2rem;
115
125
 
116
- &__supertitle {
117
- margin: 0;
126
+ &:last-child {
127
+ margin-bottom: 0;
128
+ }
118
129
 
119
- color: colour.$base-font-colour;
120
- @include tools.relative-font-size(14);
121
- font-family: typography.$font-family-detail;
122
- font-weight: typography.$font-weight-detail;
123
- text-transform: uppercase;
130
+ &__supertitle {
131
+ margin: 0;
124
132
 
125
- // .tna-hgroup & {
126
- // margin: 0;
127
- // }
128
- }
133
+ @include colour.colour-font("font-base");
134
+ @include typography.relative-font-size(14);
135
+ @include typography.detail-font;
136
+ text-transform: uppercase;
129
137
 
130
- &__title {
138
+ .tna-hgroup & {
131
139
  margin: 0;
140
+ }
141
+ }
142
+
143
+ &__title {
144
+ margin: 0;
132
145
 
133
- color: colour.$tna-black;
146
+ @include colour.colour-font("font-dark");
134
147
 
135
- .tna-hgroup__supertitle {
136
- display: block;
148
+ .tna-hgroup__supertitle {
149
+ display: block;
150
+
151
+ @include colour.colour-font("font-base");
152
+ }
153
+ }
137
154
 
138
- color: colour.$base-font-colour;
139
- }
155
+ &--xl {
156
+ .tna-hgroup__supertitle {
140
157
  }
141
158
 
142
- &--xl {
143
- .tna-hgroup__supertitle {
144
- }
159
+ .tna-hgroup__title {
160
+ @include typography.relative-font-size(64);
161
+ }
162
+ }
145
163
 
146
- .tna-hgroup__title {
147
- @include tools.relative-font-size(64);
148
- }
164
+ &--l {
165
+ .tna-hgroup__supertitle {
149
166
  }
150
167
 
151
- &--l {
152
- .tna-hgroup__supertitle {
153
- }
168
+ .tna-hgroup__title {
169
+ @include typography.relative-font-size(32);
170
+ }
171
+ }
154
172
 
155
- .tna-hgroup__title {
156
- @include tools.relative-font-size(32);
157
- }
173
+ &--m {
174
+ .tna-hgroup__supertitle {
158
175
  }
159
176
 
160
- &--m {
161
- .tna-hgroup__supertitle {
162
- }
177
+ .tna-hgroup__title {
178
+ @include typography.relative-font-size(20);
179
+ }
180
+ }
163
181
 
164
- .tna-hgroup__title {
165
- @include tools.relative-font-size(20);
166
- }
182
+ &--s {
183
+ .tna-hgroup__supertitle {
167
184
  }
168
185
 
169
- &--s {
170
- .tna-hgroup__supertitle {
171
- }
186
+ .tna-hgroup__title {
187
+ @include typography.relative-font-size(18);
188
+ }
189
+ }
190
+ }
191
+
192
+ .tna-blockquote {
193
+ margin: 0;
194
+ padding: 1rem 1rem 1rem 2rem;
195
+
196
+ border-left: 0.35rem solid;
197
+ @include colour.colour-border("keyline");
198
+
199
+ quotes: "“" "”" "‘" "’";
200
+
201
+ &::before {
202
+ float: left;
203
+
204
+ content: open-quote;
205
+ }
206
+
207
+ &__quote {
208
+ font-weight: 700;
209
+ }
210
+
211
+ &__author {
212
+ font-style: italic;
213
+
214
+ .tna-blockquote & {
215
+ margin: 1rem 0 0;
216
+ }
172
217
 
173
- .tna-hgroup__title {
174
- @include tools.relative-font-size(18);
175
- }
218
+ &::before {
219
+ content: "\2014" " ";
176
220
  }
177
221
  }
178
222
  }
@@ -0,0 +1 @@
1
+ $tna-assets-path: "/assets" !default;
@@ -1,11 +1,120 @@
1
- $tna-black: #000;
2
- $tna-yellow: #fc0;
3
- $tna-pink: #fe1d57;
4
- $tna-orange: #fd3f03;
5
- $tna-green: #86bc25;
6
- $tna-blue: #00b0ff;
7
-
8
- $dark: #26262a !default;
9
- $base-font-colour: #343338 !default;
10
- $focus-colour: #004c7e !default;
11
- $keyline-colour: #ccc !default;
1
+ @use "sass:map";
2
+ @use "../features";
3
+
4
+ $-tna-black: #000;
5
+ $-tna-grey: #8c9694;
6
+ $-tna-light-grey: #d9d9d6;
7
+ $-tna-white: #fff;
8
+
9
+ $-tna-yellow: #fc0;
10
+ $-tna-pink: #fe1d57;
11
+ $-tna-orange: #fd3f03;
12
+ $-tna-green: #86bc25;
13
+ $-tna-blue: #00b0ff;
14
+
15
+ $-tna-brown: #654e37;
16
+ $-tna-maroon: #9c193a;
17
+ $-tna-chestnut: #8f3415;
18
+ $-tna-forest: #00623b;
19
+ $-tna-navy: #004c7e;
20
+
21
+ $-tna-cream: #f9f7e2;
22
+ $-tna-pastel-pink: #fad3d4;
23
+ $-tna-pastel-orange: #f9e1bc;
24
+ $-tna-pastel-green: #dde5d5;
25
+ $-tna-pastel-blue: #d4e5ef;
26
+
27
+ $-dark-grey: #26262a;
28
+ $-base-font: #343338;
29
+
30
+ $-accent-colour: $-tna-yellow;
31
+ $-accent-colour-dark: $-accent-colour;
32
+
33
+ // @debug $-accent-colour;
34
+ // @mixin configure($accent-colour: null) {
35
+ // @debug $accent-colour;
36
+ // @if $accent-colour {
37
+ // $-accent-colour: $accent-colour !global;
38
+ // }
39
+ // }
40
+ // @debug $-accent-colour;
41
+
42
+ // @function -accent-colour() {
43
+ // @return $-accent-colour or $-tna-yellow;
44
+ // }
45
+
46
+ // @function -accent-colour-dark() {
47
+ // @return $-accent-colour-dark or -accent-colour();
48
+ // }
49
+
50
+ // TODO: Scoped variables should not be used directly outside of this file
51
+ $tna-black: $-tna-black;
52
+ $dark-grey: $-dark-grey;
53
+ $tna-yellow: $-tna-yellow;
54
+ $tna-pink: $-tna-pink;
55
+ $tna-orange: $-tna-orange;
56
+ $tna-green: $-tna-green;
57
+ $tna-blue: $-tna-blue;
58
+ $tna-cream: $-tna-cream;
59
+
60
+ $colour-palette-default: (
61
+ "page-background": $-tna-white,
62
+ "font-base": $-base-font,
63
+ "font-dark": $-tna-black,
64
+ "font-light": rgba($-base-font, 0.7),
65
+ "link": #1d70ab,
66
+ "link-visited": #4c2c92,
67
+ // "focus-outline": #004c7e,
68
+ "focus-outline": $-tna-blue,
69
+ "keyline": #ccc,
70
+ "keyline-dark": $-dark-grey,
71
+ "accent": -accent-colour(),
72
+ "button-primary-text": $-tna-white,
73
+ "button-primary-background": $-tna-black,
74
+ "button-primary-hover-text": $-tna-black,
75
+ "button-primary-hover-background": $-tna-white,
76
+ "button-secondary-text": $-tna-black,
77
+ "button-secondary-background": $-tna-yellow,
78
+ "button-secondary-hover-text": $-tna-black,
79
+ "button-secondary-hover-background": $-tna-white,
80
+ );
81
+
82
+ $colour-palette-dark: map.merge(
83
+ $colour-palette-default,
84
+ (
85
+ "page-background": #222,
86
+ "font-base": rgba($-tna-white, 0.95),
87
+ "font-dark": $-tna-white,
88
+ "font-light": rgba($-tna-white, 0.8),
89
+ "link": $-tna-blue,
90
+ "link-visited": #b9f,
91
+ "keyline": rgba($-tna-white, 0.5),
92
+ "keyline-dark": $-tna-white,
93
+ "accent": -accent-colour-dark(),
94
+ )
95
+ );
96
+
97
+ $colour-palette-high-contrast: map.merge(
98
+ $colour-palette-default,
99
+ (
100
+ "font-base": $-tna-black,
101
+ "font-light": $-tna-black,
102
+ "link": $-tna-black,
103
+ "link-visited": $-tna-black,
104
+ "focus-outline": $-tna-orange,
105
+ "keyline": $-tna-black,
106
+ "keyline-dark": $-tna-black,
107
+ )
108
+ );
109
+
110
+ $colour-palette-high-contrast-dark: map.merge(
111
+ $colour-palette-dark,
112
+ (
113
+ "page-background": #191919,
114
+ "font-base": $-tna-white,
115
+ "font-light": $-tna-white,
116
+ "link": $-tna-white,
117
+ "link-visited": $-tna-white,
118
+ "keyline": $-tna-white,
119
+ )
120
+ );
@@ -1,3 +1,4 @@
1
+ @use "assets";
1
2
  @use "colour";
2
3
  @use "grid";
3
4
  @use "media";
@@ -1,12 +1,40 @@
1
- $largest-medium-device: 1024px !default;
2
- $largest-small-device: 768px !default;
3
- $largest-tiny-device: 480px !default;
1
+ @use "sass:math";
2
+ @use "./typography";
4
3
 
5
- $media-large: "(min-width: #{$largest-medium-device + 1px})" !default;
6
- $media-lt-large: "(max-width: #{$largest-medium-device})" !default;
7
- $media-medium: "(min-width: #{$largest-small-device + 1px}) and (max-width: #{$largest-medium-device})" !default;
8
- $media-gt-mobile: "(min-width: #{$largest-small-device + 1px})" !default;
9
- $media-mobile: "(max-width: #{$largest-small-device})" !default;
10
- $media-small: "(min-width: #{$largest-tiny-device + 1px}) and (max-width: #{$largest-small-device})" !default;
11
- $media-gt-tiny: "(min-width: #{$largest-tiny-device + 1px})" !default;
12
- $media-tiny: "(max-width: #{$largest-tiny-device})" !default;
4
+ $largest-medium-device-px: 1024 !default;
5
+ $largest-small-device-px: 768 !default;
6
+ $largest-tiny-device-px: 480 !default;
7
+
8
+ $smallest-large-device-em: #{math.div(
9
+ $largest-medium-device-px + 1,
10
+ typography.$base-font-size-px
11
+ )}em;
12
+ $largest-medium-device-em: #{math.div(
13
+ $largest-medium-device-px,
14
+ typography.$base-font-size-px
15
+ )}em;
16
+ $smallest-medium-device-em: #{math.div(
17
+ $largest-small-device-px + 1,
18
+ typography.$base-font-size-px
19
+ )}em;
20
+ $largest-small-device-em: #{math.div(
21
+ $largest-small-device-px,
22
+ typography.$base-font-size-px
23
+ )}em;
24
+ $smallest-small-device-em: #{math.div(
25
+ $largest-tiny-device-px + 1,
26
+ typography.$base-font-size-px
27
+ )}em;
28
+ $largest-tiny-device-em: #{math.div(
29
+ $largest-tiny-device-px,
30
+ typography.$base-font-size-px
31
+ )}em;
32
+
33
+ $media-large: "(min-width: #{$smallest-large-device-em})";
34
+ $media-lt-large: "(max-width: #{$largest-medium-device-em})";
35
+ $media-medium: "(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})";
36
+ $media-gt-mobile: "(min-width: #{$smallest-medium-device-em})";
37
+ $media-mobile: "(max-width: #{$largest-small-device-em})";
38
+ $media-small: "(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})";
39
+ $media-gt-tiny: "(min-width: #{$smallest-small-device-em})";
40
+ $media-tiny: "(max-width: #{$largest-tiny-device-em})";
@@ -3,7 +3,7 @@ $base-font-size-px: 16;
3
3
  $font-family-main: "Open Sans", sans-serif;
4
4
  $font-weight-main: 400;
5
5
 
6
- $font-family-heading: supria-sans-condensed, monospace;
6
+ $font-family-heading: supria-sans-condensed, sans-serif;
7
7
  $font-weight-heading: 600;
8
8
 
9
9
  $font-family-detail: "Roboto Mono", monospace;
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@nationalarchives/frontend",
3
- "version": "0.1.9-prerelease",
3
+ "version": "0.1.11-prerelease",
4
4
  "description": "The National Archives frontend styles",
5
5
  "scripts": {
6
6
  "start": "storybook dev -p 6006",
7
7
  "build": "storybook build -o storybook",
8
- "test": "test-storybook --stories-json && node tasks/test-fixtures.js",
9
- "lint": "prettier --check '{src,.storybook,tasks}/**/*.{js,mjs,scss,json}' && stylelint 'src/**/*.scss' && eslint 'src/**/*.mjs'",
10
- "lint:fix": "prettier --write '{src,.storybook,tasks}/**/*.{js,mjs,scss,json}' && stylelint --fix 'src/**/*.scss' && eslint --fix 'src/**/*.mjs'",
8
+ "test": "node tasks/test-fixtures.js && test-storybook --verbose --stories-json",
9
+ "lint": "prettier --check '{src,.storybook,tasks}/**/*.{js,mjs,scss,json,html}' && stylelint 'src/**/*.scss' && eslint 'src/**/*.mjs'",
10
+ "lint:fix": "prettier --write '{src,.storybook,tasks}/**/*.{js,mjs,scss,json,html}' && stylelint --fix 'src/**/*.scss' && eslint --fix 'src/**/*.mjs'",
11
11
  "package:sass": "sass --style=compressed --quiet-deps src/nationalarchives/all.scss package/nationalarchives/all.css",
12
- "package:scripts": "webpack"
12
+ "package:scripts": "webpack",
13
+ "package:test": "tasks/build-package.sh && node tasks/test-package.js"
13
14
  },
14
15
  "repository": {
15
16
  "type": "git",
@@ -42,22 +43,24 @@
42
43
  "@babel/core": "^7.19.1",
43
44
  "@babel/preset-env": "^7.22.5",
44
45
  "@mdx-js/react": "^2.1.3",
45
- "@storybook/addon-a11y": "^7.0.22",
46
- "@storybook/addon-docs": "^7.0.22",
47
- "@storybook/addon-essentials": "^7.0.22",
48
- "@storybook/addon-interactions": "^7.0.23",
49
- "@storybook/addon-links": "^7.0.22",
50
- "@storybook/addon-mdx-gfm": "^7.0.22",
51
- "@storybook/html": "^7.0.22",
52
- "@storybook/html-webpack5": "^7.0.22",
46
+ "@storybook/addon-a11y": "^7.2.0",
47
+ "@storybook/addon-docs": "^7.2.0",
48
+ "@storybook/addon-essentials": "^7.2.0",
49
+ "@storybook/addon-interactions": "^7.2.0",
50
+ "@storybook/addon-links": "^7.2.0",
51
+ "@storybook/addon-mdx-gfm": "^7.2.0",
52
+ "@storybook/html": "^7.2.0",
53
+ "@storybook/html-webpack5": "^7.2.0",
53
54
  "@storybook/jest": "^0.1.0",
54
- "@storybook/test-runner": "^0.11.0",
55
+ "@storybook/test-runner": "^0.12.0",
55
56
  "@storybook/testing-library": "^0.2.0",
56
57
  "babel-loader": "^9.0.1",
58
+ "chromatic": "^6.19.9",
57
59
  "copy-webpack-plugin": "^11.0.0",
58
60
  "css-loader": "^6.7.1",
59
61
  "diff": "^5.1.0",
60
62
  "eslint": "^8.43.0",
63
+ "eslint-plugin-storybook": "^0.6.13",
61
64
  "glob": "^10.2.7",
62
65
  "jest-image-snapshot": "^6.1.0",
63
66
  "nunjucks": "^3.2.3",
@@ -67,7 +70,7 @@
67
70
  "sass": "^1.54.9",
68
71
  "sass-loader": "^13.0.2",
69
72
  "simple-nunjucks-loader": "^3.2.0",
70
- "storybook": "^7.0.22",
73
+ "storybook": "^7.2.0",
71
74
  "style-loader": "^3.3.1",
72
75
  "stylelint": "^15.9.0",
73
76
  "stylelint-config-standard-scss": "^10.0.0",
@@ -1,7 +0,0 @@
1
- @use "button/index" as button;
2
- @use "card/index" as card;
3
- @use "footer/index" as footer;
4
- @use "grid/index" as grid;
5
- @use "header/index" as header;
6
- @use "hero/index" as hero;
7
- @use "sensitive-image/index" as sensitive-image;
@@ -1,7 +0,0 @@
1
- import { Meta } from "@storybook/blocks";
2
-
3
- <Meta title="Development/Structure" />
4
-
5
- # Project structure
6
-
7
- [Technical details]
@@ -1,3 +0,0 @@
1
- @use "grid";
2
- @use "media";
3
- @use "typography";
@@ -1,2 +0,0 @@
1
- @use "global";
2
- @use "typography";