@nationalarchives/frontend 0.1.3-prerelease → 0.1.6-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 (57) hide show
  1. package/README.md +1 -168
  2. package/govuk-prototype-kit.config.json +10 -2
  3. package/nationalarchives/all.css +1 -1
  4. package/nationalarchives/all.css.map +1 -1
  5. package/nationalarchives/all.scss +4 -8
  6. package/nationalarchives/components/_all.scss +5 -7
  7. package/nationalarchives/components/button/_index.scss +15 -16
  8. package/nationalarchives/components/button/button.stories.js +1 -2
  9. package/nationalarchives/components/card/_index.scss +71 -24
  10. package/nationalarchives/components/card/card.stories.js +41 -10
  11. package/nationalarchives/components/card/fixtures.json +135 -7
  12. package/nationalarchives/components/card/macro-options.json +42 -10
  13. package/nationalarchives/components/card/template.njk +53 -24
  14. package/nationalarchives/components/footer/_index.scss +61 -51
  15. package/nationalarchives/components/footer/fixtures.json +1 -1
  16. package/nationalarchives/components/footer/footer.stories.js +22 -2
  17. package/nationalarchives/components/footer/macro-options.json +12 -0
  18. package/nationalarchives/components/footer/template.njk +16 -5
  19. package/nationalarchives/components/grid/_index.scss +127 -52
  20. package/nationalarchives/components/grid/grid.stories.js +2 -3
  21. package/nationalarchives/components/sensitive-image/_index.scss +55 -58
  22. package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +1 -2
  23. package/nationalarchives/stories/design/about.mdx +25 -0
  24. package/nationalarchives/stories/development/about.mdx +62 -0
  25. package/nationalarchives/stories/development/dependencies.mdx +9 -0
  26. package/nationalarchives/stories/development/publishing.mdx +16 -0
  27. package/nationalarchives/stories/development/relationships.md +91 -0
  28. package/nationalarchives/stories/development/structure.mdx +2 -2
  29. package/nationalarchives/stories/utilities/heading-groups.stories.js +44 -0
  30. package/nationalarchives/stories/{global → utilities}/headings.stories.js +1 -1
  31. package/nationalarchives/stories/utilities/lists.stories.js +38 -0
  32. package/nationalarchives/stories/{global → utilities}/typography.mdx +8 -8
  33. package/nationalarchives/stories/utilities/typography.stories.js +14 -0
  34. package/nationalarchives/templates/homepage.njk +64 -0
  35. package/nationalarchives/templates/layouts/_generic.njk +60 -0
  36. package/nationalarchives/tools/_all.scss +2 -1
  37. package/nationalarchives/tools/_grid.scss +44 -0
  38. package/nationalarchives/tools/_typography.scss +6 -0
  39. package/nationalarchives/utilities/_all.scss +2 -3
  40. package/nationalarchives/utilities/_global.scss +8 -0
  41. package/nationalarchives/utilities/_typography.scss +126 -18
  42. package/nationalarchives/variables/_all.scss +3 -2
  43. package/nationalarchives/variables/_grid.scss +7 -7
  44. package/nationalarchives/variables/_media.scss +11 -11
  45. package/nationalarchives/variables/_typography.scss +10 -0
  46. package/package.json +2 -2
  47. package/nationalarchives/_base.scss +0 -6
  48. package/nationalarchives/_prototype-kit.scss +0 -3
  49. package/nationalarchives/components/button/_button.scss +0 -2
  50. package/nationalarchives/components/card/_card.scss +0 -2
  51. package/nationalarchives/components/footer/_footer.scss +0 -2
  52. package/nationalarchives/components/grid/_grid.scss +0 -2
  53. package/nationalarchives/components/sensitive-image/_sensitive-image.scss +0 -2
  54. package/nationalarchives/stories/global/heading-groups.stories.js +0 -23
  55. package/nationalarchives/stories/global/typography.stories.js +0 -15
  56. package/nationalarchives/tools/_exports.scss +0 -36
  57. package/nationalarchives/utilities/_grid.scss +0 -131
@@ -0,0 +1,38 @@
1
+ const argTypes = {
2
+ items: { control: "object" },
3
+ };
4
+
5
+ export default {
6
+ title: "Utilities/Typography",
7
+ argTypes,
8
+ };
9
+
10
+ const UnorderedListTemplate = ({ items, plain }) =>
11
+ `<ul class="tna-ul${plain ? " tna-ul--plain" : ""}">${items.reduce(
12
+ (list, item) => `${list}<li>${item}</li>`,
13
+ ""
14
+ )}</ul>`;
15
+ export const UnorderedList = UnorderedListTemplate.bind({});
16
+ UnorderedList.args = {
17
+ items: ["Alpha", "Beta", "Gamma"],
18
+ };
19
+ export const UnorderedListPlain = UnorderedListTemplate.bind({});
20
+ UnorderedListPlain.args = {
21
+ items: ["Alpha", "Beta", "Gamma"],
22
+ plain: true,
23
+ };
24
+
25
+ const OrderedListTemplate = ({ items, plain }) =>
26
+ `<ol class="tna-ol${plain ? " tna-ol--plain" : ""}">${items.reduce(
27
+ (list, item) => `${list}<li>${item}</li>`,
28
+ ""
29
+ )}</ol>`;
30
+ export const OrderedList = OrderedListTemplate.bind({});
31
+ OrderedList.args = {
32
+ items: ["Alpha", "Beta", "Gamma"],
33
+ };
34
+ export const OrderedListPlain = OrderedListTemplate.bind({});
35
+ OrderedListPlain.args = {
36
+ items: ["Alpha", "Beta", "Gamma"],
37
+ plain: true,
38
+ };
@@ -1,7 +1,8 @@
1
- import { Meta, Primary, Controls, Story, Canvas, Typeset } from "@storybook/blocks";
1
+ import { Meta, Canvas } from "@storybook/blocks";
2
2
  import * as HeadingStories from './headings.stories';
3
3
  import * as HeadingGroupStories from './heading-groups.stories';
4
4
  import * as TypographyStories from './typography.stories';
5
+ import * as ListStories from './lists.stories';
5
6
 
6
7
  <Meta of={TypographyStories} />
7
8
 
@@ -9,14 +10,13 @@ import * as TypographyStories from './typography.stories';
9
10
 
10
11
  We use a set of typefaces...
11
12
 
12
- <Story of={HeadingStories.Heading1} />
13
- <Story of={HeadingStories.Heading2} />
14
- <Story of={HeadingStories.Heading3} />
15
- <Story of={HeadingGroupStories.HeadingGroup} />
16
- <Story of={TypographyStories.BodyFont} />
17
-
18
13
  <Canvas of={HeadingStories.Heading1} />
19
14
  <Canvas of={HeadingStories.Heading2} />
20
15
  <Canvas of={HeadingStories.Heading3} />
21
16
  <Canvas of={HeadingGroupStories.HeadingGroup} />
22
- <Canvas of={TypographyStories.BodyFont} />
17
+ <Canvas of={HeadingGroupStories.HeadingGroupSeparated} />
18
+ <Canvas of={TypographyStories.Paragraph} />
19
+ <Canvas of={ListStories.UnorderedList} />
20
+ <Canvas of={ListStories.UnorderedListPlain} />
21
+ <Canvas of={ListStories.OrderedList} />
22
+ <Canvas of={ListStories.OrderedListPlain} />
@@ -0,0 +1,14 @@
1
+ const argTypes = {
2
+ text: { control: "text" },
3
+ };
4
+
5
+ export default {
6
+ title: "Utilities/Typography",
7
+ argTypes,
8
+ };
9
+
10
+ const ParagraphTemplate = ({ text }) => `<p class="tna-p">${text}</p>`;
11
+ export const Paragraph = ParagraphTemplate.bind({});
12
+ Paragraph.args = {
13
+ text: "This is some body text",
14
+ };
@@ -0,0 +1,64 @@
1
+ {% from "nationalarchives/components/card/macro.njk" import tnaCard %}
2
+
3
+ {% extends "layouts/_generic.njk" %}
4
+
5
+ {% block pageTitle %}The National Archives | Welcome{% endblock %}
6
+
7
+ {% block content %}
8
+ <div class="tna-container">
9
+ <div class="tna-column tna-column--full">
10
+ <h1 class="tna-heading tna-heading--xl">
11
+ Welcome
12
+ </h1>
13
+ </div>
14
+ <div class="tna-column tna-column--full">
15
+ {{ tnaCard({
16
+ "heading": {
17
+ "supertitle": "Card supertitle",
18
+ "title": "Card title",
19
+ "level": 2,
20
+ "size": "m"
21
+ },
22
+ "href": "#",
23
+ "image": {
24
+ "src": "https://loremflickr.com/640/360",
25
+ "alt": "A placeholder image"
26
+ },
27
+ "body": "<p>Card body</p>",
28
+ "actions": [
29
+ {
30
+ "text": "Card action",
31
+ "href": "#",
32
+ "title": "Go and do the action"
33
+ }
34
+ ],
35
+ "featured": true,
36
+ "htmlElement": "article"
37
+ }) }}
38
+ </div>
39
+ {% for item in range(0, 12) -%}
40
+ <div class="tna-column tna-column--width-1-3 tna-column--width-1-2-medium tna-column--full-small tna-column--full-tiny">
41
+ {{ tnaCard({
42
+ "heading": {
43
+ "supertitle": "Card supertitle",
44
+ "title": "Card title",
45
+ "level": 3
46
+ },
47
+ "href": "#",
48
+ "image": {
49
+ "src": "https://loremflickr.com/640/360",
50
+ "alt": "A placeholder image"
51
+ },
52
+ "body": "<p>Card body</p>",
53
+ "actions": [
54
+ {
55
+ "text": "Card action",
56
+ "href": "#",
57
+ "title": "Go and do the action"
58
+ }
59
+ ]
60
+ }) }}
61
+ </div>
62
+ {%- endfor %}
63
+ </div>
64
+ {% endblock %}
@@ -0,0 +1,60 @@
1
+ {# Based on https://github.com/alphagov/govuk-frontend/blob/8b6bf304b9fc891f64459c25a08f3d623f3fea72/packages/govuk-frontend/src/govuk/template.njk #}
2
+ {#% from "./components/skip-link/macro.njk" import tnaSkipLink -%#}
3
+ <!DOCTYPE html>
4
+ <html lang="{{ htmlLang | default('en') }}" class="tna-template {{ htmlClasses }}">
5
+ <head>
6
+ <meta charset="utf-8">
7
+ <title{% if pageTitleLang %} lang="{{ pageTitleLang }}"{% endif %}>{% block pageTitle %}The National Archives{% endblock %}</title>
8
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
9
+ <meta name="theme-color" content="{{ themeColor | default('#000000') }}">
10
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
11
+
12
+ {% block headIcons %}
13
+ <link rel="shortcut icon" sizes="16x16 32x32 48x48" href="{{ assetPath | default('/assets') }}/images/favicon.ico" type="image/x-icon">
14
+ <link rel="mask-icon" href="{{ assetPath | default('/assets') }}/images/govuk-mask-icon.svg" color="{{ themeColor | default('#0b0c0c') }}"> {# Hardcoded value of $govuk-black #}
15
+ <link rel="apple-touch-icon" sizes="180x180" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-180x180.png">
16
+ <link rel="apple-touch-icon" sizes="167x167" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-167x167.png">
17
+ <link rel="apple-touch-icon" sizes="152x152" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-152x152.png">
18
+ <link rel="apple-touch-icon" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon.png">
19
+ {% endblock %}
20
+
21
+ {% block head %}{% endblock %}
22
+
23
+ {% block stylesheets %}
24
+ {% include "govuk-prototype-kit/includes/stylesheets-plugins.njk" %}
25
+ {% endblock %}
26
+
27
+ {# OpenGraph images needs to be absolute, so we need either a URL for the image or for assetUrl to be set #}
28
+ {% if opengraphImageUrl or assetUrl %}
29
+ <meta property="og:image" content="{{ opengraphImageUrl | default(assetUrl + '/images/govuk-opengraph-image.png') }}">
30
+ {% endif %}
31
+ </head>
32
+ <body class="tna-template__body {{ bodyClasses }}" {%- for attribute, value in bodyAttributes %} {{attribute}}="{{value}}"{% endfor %}>
33
+
34
+ {% block bodyStart %}{% endblock %}
35
+
36
+ {% block skipLink %}
37
+ {#{ govukSkipLink({
38
+ href: '#main-content',
39
+ text: 'Skip to main content'
40
+ }) }#}
41
+ {% endblock %}
42
+
43
+ {% block header %}
44
+ <h1>HEADER</h1>
45
+ {% endblock %}
46
+
47
+ {% block main %}
48
+ {% block beforeContent %}{% endblock %}
49
+ <main class="tna-main-wrapper {{ mainClasses }}" id="main-content" role="main"{% if mainLang %} lang="{{ mainLang }}"{% endif %}>
50
+ {% block content %}{% endblock %}
51
+ </main>
52
+ {% endblock %}
53
+
54
+ {% block footer %}
55
+ <h1>FOOTER</h1>
56
+ {% endblock %}
57
+
58
+ {% block bodyEnd %}{% endblock %}
59
+ </body>
60
+ </html>
@@ -1 +1,2 @@
1
- @import "exports";
1
+ @use "grid";
2
+ @use "typography";
@@ -0,0 +1,44 @@
1
+ @use "sass:math";
2
+ @use "../variables/grid";
3
+
4
+ @mixin columns-generator($count, $suffix: "") {
5
+ @for $i from 1 through $count - 1 {
6
+ $simplestFractionFound: false;
7
+
8
+ @for $j from math.div($count, 2) through 1 {
9
+ @if (
10
+ $count % $j == 0 and $i % $j == 0 and $simplestFractionFound != true
11
+ ) {
12
+ .tna-column--width-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
13
+ width: math.div(100%, $count) * $i;
14
+ flex: none;
15
+ }
16
+
17
+ // .column--margin-right-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
18
+ // margin-right: math.div(100%, $count) * $i;
19
+ // }
20
+
21
+ // .column--margin-left-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
22
+ // margin-left: math.div(100%, $count) * $i;
23
+ // }
24
+
25
+ $simplestFractionFound: true;
26
+ }
27
+ }
28
+
29
+ @if ($simplestFractionFound != true) {
30
+ .tna-column--width-#{$i}-#{$count}#{$suffix} {
31
+ width: math.div(100%, $count) * $i;
32
+ flex: none;
33
+ }
34
+
35
+ // .column--margin-right-#{$i}-#{$count}#{$suffix} {
36
+ // margin-right: math.div(100%, $count) * $i;
37
+ // }
38
+
39
+ // .column--margin-left-#{$i}-#{$count}#{$suffix} {
40
+ // margin-left: math.div(100%, $count) * $i;
41
+ // }
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,6 @@
1
+ @use "sass:math";
2
+ @use "../variables/typography";
3
+
4
+ @mixin relativeFontSize($fontSizePx) {
5
+ font-size: #{math.div($fontSizePx, typography.$baseFontSizePx)}rem;
6
+ }
@@ -1,3 +1,2 @@
1
- @import "global";
2
- @import "grid";
3
- @import "typography";
1
+ @use "global";
2
+ @use "typography";
@@ -1,3 +1,5 @@
1
+ @use "../variables/typography";
2
+
1
3
  .tna-template {
2
4
  min-width: 320px;
3
5
  width: 100%;
@@ -7,6 +9,8 @@
7
9
  overflow-y: auto;
8
10
  -webkit-overflow-scrolling: touch;
9
11
 
12
+ font-size: typography.$baseFontSizePx;
13
+
10
14
  @media (prefers-reduced-motion) {
11
15
  * {
12
16
  animation: none !important;
@@ -37,3 +41,7 @@ video,
37
41
  canvas {
38
42
  width: 100%;
39
43
  }
44
+
45
+ *:focus {
46
+ outline: 3px #f0a solid;
47
+ }
@@ -1,49 +1,164 @@
1
+ @use "../variables/typography";
2
+ @use "../tools/typography" as tools;
3
+
1
4
  // Temporary - will eventually bundle font files into package
2
5
  @import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&family=Roboto+Mono:wght@500;700&display=swap");
6
+ @import url("https://use.typekit.net/hkj3kuz.css");
3
7
 
4
8
  .tna-template {
5
- font-family: "Open Sans", sans-serif;
6
- font-size: 16px;
9
+ font-family: typography.$fontFamilyMain;
10
+ font-weight: typography.$fontWeightMain;
7
11
  -moz-osx-font-smoothing: grayscale;
8
12
  -webkit-font-smoothing: antialiased;
9
13
  text-rendering: optimizeLegibility;
10
14
  -webkit-text-size-adjust: none;
11
15
  direction: ltr;
16
+
17
+ h1,
18
+ h2,
19
+ h3,
20
+ h4,
21
+ h5,
22
+ h6,
23
+ p,
24
+ ul,
25
+ ol {
26
+ margin: 0 0 2rem;
27
+
28
+ &:last-child {
29
+ margin-bottom: 0;
30
+ }
31
+ }
32
+
33
+ a {
34
+ &,
35
+ &:link {
36
+ &:hover {
37
+ text-decoration-thickness: 3px;
38
+ }
39
+
40
+ &:active {
41
+ text-decoration-thickness: 4px;
42
+ }
43
+ }
44
+ }
45
+ }
46
+
47
+ // $block-text-elements: p, ul, ol;
48
+ // $block-text-elements-selector: "";
49
+ // @each $element in $block-text-elements {
50
+ // .tna-template #{$element},
51
+ // .tna-#{$element} {
52
+ // margin: 0 0 2rem;
53
+
54
+ // outline: 1px #f90 solid;
55
+
56
+ // &:first-child {
57
+ // margin-top: 0;
58
+ // }
59
+ // }
60
+ // }
61
+ .tna-template p,
62
+ .tna-p,
63
+ .tna-template ul,
64
+ .tna-ul,
65
+ .tna-template ol,
66
+ .tna-ol {
67
+ // margin: 0 0 2rem;
68
+
69
+ // outline: 1px #f90 solid;
70
+
71
+ // &:first-child {
72
+ // margin-top: 0;
73
+ // }
74
+ }
75
+
76
+ // $list-elements: ul, ol;
77
+ // @each $element in $list-elements {
78
+ // .tna-template #{$element},
79
+ // .tna-#{$element} {
80
+ // padding-left: 2rem;
81
+
82
+ // &.tna-#{$element}--plain {
83
+ // padding-left: 0;
84
+
85
+ // list-style: none;
86
+ // }
87
+ // }
88
+ // }
89
+ .tna-template ul,
90
+ .tna-ul,
91
+ .tna-template ol,
92
+ .tna-ol {
93
+ padding-left: 2rem;
94
+
95
+ li::marker {
96
+ color: #f0a;
97
+ font-weight: 700;
98
+ }
99
+ }
100
+
101
+ .tna-template .tna-ul--plain,
102
+ .tna-template .tna-ol--plain {
103
+ padding-left: 0;
104
+
105
+ list-style: none;
12
106
  }
13
107
 
14
108
  .tna-template__body {
15
- font-size: 1rem;
109
+ @include tools.relativeFontSize(16);
16
110
  line-height: 1.6;
17
111
  }
18
112
 
19
113
  .tna-heading {
114
+ margin-bottom: 2rem;
115
+
116
+ font-family: typography.$fontFamilyHeading;
117
+ font-weight: typography.$fontWeightHeading;
20
118
  }
21
119
 
22
120
  .tna-heading--xl {
23
- font-size: 4rem;
121
+ @include tools.relativeFontSize(64);
24
122
  }
25
123
 
26
124
  .tna-heading--l {
27
- font-size: 2rem;
125
+ @include tools.relativeFontSize(32);
28
126
  }
29
127
 
30
128
  .tna-heading--m {
31
- font-size: 1.3rem;
129
+ @include tools.relativeFontSize(20);
32
130
  }
33
131
 
34
132
  .tna-heading--s {
35
- font-size: 1.125rem;
133
+ @include tools.relativeFontSize(18);
36
134
  }
37
135
 
38
136
  .tna-hgroup {
39
137
  }
40
138
 
139
+ .tna-hgroup__supertitle {
140
+ @include tools.relativeFontSize(14);
141
+ font-family: typography.$fontFamilyDetail;
142
+ font-weight: typography.$fontWeightDetail;
143
+ text-transform: uppercase;
144
+
145
+ .tna-hgroup & {
146
+ margin: 0;
147
+ }
148
+ }
149
+
150
+ .tna-hgroup__title {
151
+ .tna-hgroup__supertitle {
152
+ display: block;
153
+ }
154
+ }
155
+
41
156
  .tna-hgroup--xl {
42
157
  .tna-hgroup__supertitle {
43
158
  }
44
159
 
45
160
  .tna-hgroup__title {
46
- font-size: 4rem;
161
+ @include tools.relativeFontSize(64);
47
162
  }
48
163
  }
49
164
 
@@ -52,7 +167,7 @@
52
167
  }
53
168
 
54
169
  .tna-hgroup__title {
55
- font-size: 2rem;
170
+ @include tools.relativeFontSize(32);
56
171
  }
57
172
  }
58
173
 
@@ -61,7 +176,7 @@
61
176
  }
62
177
 
63
178
  .tna-hgroup__title {
64
- font-size: 1.3rem;
179
+ @include tools.relativeFontSize(20);
65
180
  }
66
181
  }
67
182
 
@@ -70,13 +185,6 @@
70
185
  }
71
186
 
72
187
  .tna-hgroup__title {
73
- font-size: 1.125rem;
188
+ @include tools.relativeFontSize(18);
74
189
  }
75
190
  }
76
-
77
- .tna-hgroup__supertitle {
78
- text-transform: uppercase;
79
- }
80
-
81
- .tna-hgroup__title {
82
- }
@@ -1,2 +1,3 @@
1
- @import "grid";
2
- @import "media";
1
+ @use "grid";
2
+ @use "media";
3
+ @use "typography";
@@ -1,9 +1,9 @@
1
- $largest-container-width: 75.25rem;
1
+ $largest-container-width: 75.25rem !default;
2
2
 
3
- $gutter-width: 2rem;
4
- $gutter-width-mobile: 0.75rem;
3
+ $gutter-width: 2rem !default;
4
+ $gutter-width-mobile: 0.75rem !default;
5
5
 
6
- $column-count: 12;
7
- $column-count-medium: 6;
8
- $column-count-small: 4;
9
- $column-count-tiny: 2;
6
+ $column-count: 12 !default;
7
+ $column-count-medium: 6 !default;
8
+ $column-count-small: 4 !default;
9
+ $column-count-tiny: 2 !default;
@@ -1,12 +1,12 @@
1
- $largest-medium-device: 1024px;
2
- $largest-small-device: 768px;
3
- $largest-tiny-device: 480px;
1
+ $largest-medium-device: 1024px !default;
2
+ $largest-small-device: 768px !default;
3
+ $largest-tiny-device: 480px !default;
4
4
 
5
- $media-large: "(min-width: #{$largest-medium-device + 1px})";
6
- $media-lt-large: "(max-width: #{$largest-medium-device})";
7
- $media-medium: "(min-width: #{$largest-small-device + 1px}) and (max-width: #{$largest-medium-device})";
8
- $media-gt-mobile: "(min-width: #{$largest-small-device + 1px})";
9
- $media-mobile: "(max-width: #{$largest-small-device})";
10
- $media-small: "(min-width: #{$largest-tiny-device + 1px}) and (max-width: #{$largest-small-device})";
11
- $media-gt-tiny: "(min-width: #{$largest-tiny-device + 1px})";
12
- $media-tiny: "(max-width: #{$largest-tiny-device})";
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;
@@ -0,0 +1,10 @@
1
+ $baseFontSizePx: 16;
2
+
3
+ $fontFamilyMain: "Open Sans", sans-serif;
4
+ $fontWeightMain: 400;
5
+
6
+ $fontFamilyHeading: supria-sans-condensed, monospace;
7
+ $fontWeightHeading: 600;
8
+
9
+ $fontFamilyDetail: "Roboto Mono", monospace;
10
+ $fontWeightDetail: 500;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nationalarchives/frontend",
3
- "version": "0.1.3-prerelease",
3
+ "version": "0.1.6-prerelease",
4
4
  "description": "The National Archives frontend styles",
5
5
  "scripts": {
6
6
  "start": "storybook dev -p 6006",
@@ -8,7 +8,7 @@
8
8
  "lint": "prettier --check '{src,.storybook,tasks}/**/*.{js,mjs,scss,json}'",
9
9
  "test": "node tasks/test-fixtures.js",
10
10
  "prettier": "prettier --write '{src,.storybook,tasks}/**/*.{js,mjs,scss,json}'",
11
- "package:sass": "sass --style=compressed --quiet-deps --load-path=node_modules src/nationalarchives/all.scss package/nationalarchives/all.css",
11
+ "package:sass": "sass --style=compressed --quiet-deps src/nationalarchives/all.scss package/nationalarchives/all.css",
12
12
  "package:scripts": "webpack"
13
13
  },
14
14
  "repository": {
@@ -1,6 +0,0 @@
1
- $govuk-include-default-font-face: false;
2
- // $govuk-assets-path: "/govuk-frontend/govuk/assets/" !default;
3
-
4
- @import "tools/all";
5
-
6
- // @import "govuk-frontend/govuk/base.scss";
@@ -1,3 +0,0 @@
1
- $nationalarchives-assets-path: "/extension-assets/%40tna%2Ffrontend/nationalarchives/assets/";
2
-
3
- @import "all";
@@ -1,2 +0,0 @@
1
- @import "../../base";
2
- @import "./index";
@@ -1,2 +0,0 @@
1
- @import "../../base";
2
- @import "./index";
@@ -1,2 +0,0 @@
1
- @import "../../base";
2
- @import "./index";
@@ -1,2 +0,0 @@
1
- @import "../../base";
2
- @import "./index";
@@ -1,2 +0,0 @@
1
- @import "../../base";
2
- @import "./index";
@@ -1,23 +0,0 @@
1
- const argTypes = {
2
- supertitle: { control: "text" },
3
- title: { control: "text" },
4
- };
5
-
6
- export default {
7
- title: "Global styles/Typography",
8
- argTypes,
9
- };
10
-
11
- const Template = ({
12
- supertitle,
13
- title,
14
- }) => `<hgroup class="tna-hgroup tna-hgroup--heading-2">
15
- <p class="tna-hgroup__supertitle">${supertitle}</p>
16
- <h2 class="tna-hgroup__title">${title}</h2>
17
- </hgroup>`;
18
-
19
- export const HeadingGroup = Template.bind({});
20
- HeadingGroup.args = {
21
- supertitle: "The story of",
22
- title: "This is a title",
23
- };
@@ -1,15 +0,0 @@
1
- const argTypes = {
2
- text: { control: "text" },
3
- };
4
-
5
- export default {
6
- title: "Global styles/Typography",
7
- argTypes,
8
- };
9
-
10
- const BodyFontTemplate = ({ text }) => `<p>${text}</p>`;
11
-
12
- export const BodyFont = BodyFontTemplate.bind({});
13
- BodyFont.args = {
14
- text: "This is some body text",
15
- };