@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
@@ -1,36 +0,0 @@
1
- ////
2
- /// @group tools
3
- ////
4
-
5
- /// List of modules which have already been exported
6
- ///
7
- /// @type List
8
- /// @access private
9
-
10
- $_nationalarchives-imported-modules: () !default;
11
-
12
- /// Export module
13
- ///
14
- /// Ensure that the modules of CSS that we define throughout Frontend are only
15
- /// included in the generated CSS once, no matter how many times they are
16
- /// imported across the individual components.
17
- ///
18
- /// @param {String} $name - Name of module - must be unique within the codebase
19
- /// @content The passed content will only be outputted if a module of the same
20
- /// $name has not already been outputted
21
- /// @access public
22
-
23
- @mixin nationalarchives-exports($name) {
24
- // If the mixin is not in the list of modules already exported...
25
- @if not index($_nationalarchives-imported-modules, $name) {
26
- // ... then add it to the list
27
- $_nationalarchives-imported-modules: append(
28
- $_nationalarchives-imported-modules,
29
- $name
30
- ) !global;
31
- // ... and output the CSS for that module
32
- @content;
33
- }
34
- // The next time exports is called for the module of the same name, it will be
35
- // found in the list and so nothing will be outputted.
36
- }
@@ -1,131 +0,0 @@
1
- @import "../variables/all";
2
-
3
- @mixin columns-generator($count, $suffix: "") {
4
- @for $i from 1 through $count - 1 {
5
- $simplestFractionFound: false;
6
-
7
- @for $j from math.div($count, 2) through 1 {
8
- @if (
9
- $count % $j == 0 and $i % $j == 0 and $simplestFractionFound != true
10
- ) {
11
- .tna-column--width-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
12
- width: math.div(100%, $count) * $i;
13
- }
14
-
15
- // .column--margin-right-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
16
- // margin-right: math.div(100%, $count) * $i;
17
- // }
18
-
19
- // .column--margin-left-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
20
- // margin-left: math.div(100%, $count) * $i;
21
- // }
22
-
23
- $simplestFractionFound: true;
24
- }
25
- }
26
-
27
- @if ($simplestFractionFound != true) {
28
- .tna-column--width-#{$i}-#{$count}#{$suffix} {
29
- width: math.div(100%, $count) * $i;
30
- }
31
-
32
- // .column--margin-right-#{$i}-#{$count}#{$suffix} {
33
- // margin-right: math.div(100%, $count) * $i;
34
- // }
35
-
36
- // .column--margin-left-#{$i}-#{$count}#{$suffix} {
37
- // margin-left: math.div(100%, $count) * $i;
38
- // }
39
- }
40
- }
41
- }
42
-
43
- @mixin grid-medium {
44
- .tna-column--width-full-medium {
45
- width: 100%;
46
- }
47
-
48
- @for $i from 1 through 3 {
49
- .tna-column--flex-#{$i}-medium {
50
- flex: $i 0;
51
- }
52
- }
53
-
54
- // @for $i from 1 through 3 {
55
- // .column--order-#{$i}-medium {
56
- // order: $i;
57
- // }
58
- // }
59
-
60
- @include columns-generator($column-count-medium, "-medium");
61
- }
62
-
63
- @mixin grid-mobile {
64
- .tna-container {
65
- padding-right: math.div($gutter-width-mobile, 2) + 0.75rem;
66
- padding-left: math.div($gutter-width-mobile, 2) + 0.75rem;
67
- }
68
-
69
- .tna-column {
70
- padding-right: math.div($gutter-width-mobile, 2);
71
- padding-left: math.div($gutter-width-mobile, 2);
72
- }
73
-
74
- // .column--width-full-mobile {
75
- // width: 100%;
76
- // }
77
-
78
- // @for $i from 1 through 3 {
79
- // .column--flex-#{$i}-mobile {
80
- // flex: $i 0;
81
- // }
82
- // }
83
-
84
- // @for $i from 1 through 3 {
85
- // .column--order-#{$i}-mobile {
86
- // order: $i;
87
- // }
88
- // }
89
- }
90
-
91
- @mixin grid-small {
92
- .tna-column--width-full-small {
93
- width: 100%;
94
- }
95
-
96
- @for $i from 1 through 3 {
97
- .tna-column--flex-#{$i}-small {
98
- flex: $i 0;
99
- }
100
- }
101
-
102
- // @for $i from 1 through 3 {
103
- // .column--order-#{$i}-small {
104
- // order: $i;
105
- // }
106
- // }
107
-
108
- @include columns-generator($column-count-small, "-small");
109
- }
110
-
111
- @mixin grid-tiny {
112
- .tna-column--width-full-tiny {
113
- width: 100%;
114
- }
115
-
116
- @for $i from 1 through 3 {
117
- .tna-column--flex-#{$i}-tiny {
118
- width: auto;
119
-
120
- flex: $i 0;
121
- }
122
- }
123
-
124
- // @for $i from 1 through 3 {
125
- // .column--order-#{$i}-tiny {
126
- // order: $i;
127
- // }
128
- // }
129
-
130
- @include columns-generator($column-count-tiny, "-tiny");
131
- }