@govuk-pay/pay-js-commons 3.3.9 → 3.5.0
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/.github/workflows/run-tests.yml +5 -2
- package/.idea/codeStyles/Project.xml +0 -7
- package/.idea/sonarlint/issuestore/index.pb +0 -0
- package/images/custom/scottish-government-planning.svg +1 -0
- package/lib/nunjucks-filters/slugify.js +1 -1
- package/package.json +9 -6
- package/sass/custom/scottish-government-planning.scss +55 -0
|
@@ -16,11 +16,14 @@ jobs:
|
|
|
16
16
|
|
|
17
17
|
steps:
|
|
18
18
|
- name: Checkout
|
|
19
|
-
uses: actions/checkout@
|
|
19
|
+
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
|
20
|
+
- name: Parse Node version
|
|
21
|
+
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
|
|
22
|
+
id: parse-node-version
|
|
20
23
|
- name: Setup
|
|
21
24
|
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a
|
|
22
25
|
with:
|
|
23
|
-
node-version:
|
|
26
|
+
node-version: "${{ steps.parse-node-version.outputs.NVMRC }}"
|
|
24
27
|
- name: Cache NPM packages
|
|
25
28
|
uses: actions/cache@136d96b4aee02b1f0de3ba493b1d47135042d9c0
|
|
26
29
|
with:
|
|
@@ -9,13 +9,6 @@
|
|
|
9
9
|
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
10
10
|
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
11
11
|
</JSCodeStyleSettings>
|
|
12
|
-
<JavaCodeStyleSettings>
|
|
13
|
-
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="1000" />
|
|
14
|
-
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="10000" />
|
|
15
|
-
</JavaCodeStyleSettings>
|
|
16
|
-
<TypeScriptCodeStyleSettings version="0">
|
|
17
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
18
|
-
</TypeScriptCodeStyleSettings>
|
|
19
12
|
<codeStyleSettings language="JavaScript">
|
|
20
13
|
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
|
21
14
|
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 204 38.8" xml:space="preserve"><style>.st0{fill:#0065bd}.st1{fill:#333}</style><g id="Logo" transform="translate(0 .961)"><g id="Group_10868"><g id="Group_10868-2" transform="translate(0 .185)"><path id="Path_10094" class="st0" d="M0 4.2v28.9l23.6-14.3L0 4.2z"/><path id="Path_10095" class="st0" d="M63.5 4.2v28.9L39.9 18.8 63.5 4.2z"/><path id="Path_10096" class="st0" d="M7.8 0h47.4L31.3 13.9 7.8 0z"/><path id="Path_10097" class="st0" d="M7.8 37.6h47.4l-23.9-14-23.5 14z"/></g><path id="Rectangle_1435" class="st1" d="M79.3 0h2v37.8h-2z"/><path class="st1" d="M100.2 20.3V27h-4V7.8h7.5c1.4 0 2.7.3 3.8.8 1.1.5 1.9 1.3 2.5 2.2.6 1 .9 2.1.9 3.3 0 1.9-.6 3.4-1.9 4.4-1.3 1.1-3.1 1.6-5.3 1.6h-3.5zm0-3.2h3.5c1 0 1.8-.2 2.4-.7.5-.5.8-1.2.8-2.1 0-.9-.3-1.7-.8-2.3s-1.3-.9-2.3-.9h-3.6v6zm17.1 9.9h-3.8V6.8h3.8V27zm11.3 0c-.2-.3-.3-.8-.4-1.3-.9 1-2.1 1.5-3.6 1.5-1.4 0-2.6-.4-3.5-1.2-.9-.8-1.4-1.8-1.4-3.1 0-1.5.6-2.7 1.7-3.5 1.1-.8 2.7-1.2 4.9-1.2h1.8v-.8c0-.7-.2-1.2-.5-1.6-.3-.4-.9-.6-1.6-.6-.6 0-1.1.2-1.5.5-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-3.1-.6-1-.4-1.7-1-2.3-1.6l1.7-2.3c.9 1.1 2.1 1.6 3.5 1.6 1 0 1.8-.3 2.4-.8.6-.5.8-1.3.8-2.3v-.8c-.9 1-2 1.5-3.5 1.5-1.7 0-3.1-.7-4.2-2s-1.6-3.1-1.6-5.3v-.3zm3.8.3c0 1.3.3 2.3.8 3 .5.7 1.2 1.1 2.1 1.1 1.2 0 2-.4 2.5-1.3v-6c-.5-.9-1.3-1.3-2.5-1.3-.9 0-1.6.4-2.2 1.1-.4.8-.7 1.9-.7 3.4z"/></g></g></svg>
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@govuk-pay/pay-js-commons",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Reusable js scripts for GOV.UK Pay Node.js projects",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": "^16.14.0"
|
|
7
|
+
},
|
|
5
8
|
"main": "lib/index.js",
|
|
6
9
|
"scripts": {
|
|
7
10
|
"compile": "npm run transpile",
|
|
@@ -33,7 +36,6 @@
|
|
|
33
36
|
"Google Analytics",
|
|
34
37
|
"Event Tracking"
|
|
35
38
|
],
|
|
36
|
-
"author": "Jon Heslop (Government Digital Service)",
|
|
37
39
|
"license": "MIT",
|
|
38
40
|
"bugs": {
|
|
39
41
|
"url": "https://github.com/alphagov/pay-js-commons/issues"
|
|
@@ -114,24 +116,25 @@
|
|
|
114
116
|
"chai": "^4.2.0",
|
|
115
117
|
"eslint-plugin-import": "^2.18.0",
|
|
116
118
|
"eslint-plugin-promise": "^5.1.0",
|
|
117
|
-
"husky": "^
|
|
119
|
+
"husky": "^8.0.1",
|
|
118
120
|
"jest": "^27.0.1",
|
|
119
121
|
"js-cookie": "^3.0.0",
|
|
120
122
|
"jsdom": "^19.0.0",
|
|
121
123
|
"jsdom-global": "^3.0.2",
|
|
124
|
+
"jest-environment-jsdom": "^27.0.1",
|
|
122
125
|
"karma": "^6.0.0",
|
|
123
126
|
"karma-browserify": "^8.0.0",
|
|
124
127
|
"karma-chrome-launcher": "^3.1.0",
|
|
125
128
|
"karma-mocha": "^2.0.0",
|
|
126
129
|
"karma-mocha-reporter": "^2.2.5",
|
|
127
130
|
"karma-source-map-support": "^1.2.0",
|
|
128
|
-
"lint-staged": "^
|
|
131
|
+
"lint-staged": "^13.0.1",
|
|
129
132
|
"mocha": "^9.1.0",
|
|
130
|
-
"sinon": "^
|
|
133
|
+
"sinon": "^14.0.0",
|
|
131
134
|
"standard": "^16.0.3",
|
|
132
135
|
"uglify-js": "^3.6.0",
|
|
133
136
|
"watchify": "^4.0.0",
|
|
134
|
-
"xo": "^0.
|
|
137
|
+
"xo": "^0.49.0"
|
|
135
138
|
},
|
|
136
139
|
"directories": {
|
|
137
140
|
"lib": "lib"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
$govuk-font-family: -apple-system,BlinkMacSystemFont,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif; // Override font as so not to use New Transport
|
|
2
|
+
@import "application";
|
|
3
|
+
|
|
4
|
+
// CUSTOM BRANDING
|
|
5
|
+
// Use the variables below to control the style
|
|
6
|
+
// Make sure banner colours meet minimum colour contrast levels
|
|
7
|
+
|
|
8
|
+
$custom-banner-colour: #ffffff;
|
|
9
|
+
$custom-banner-border-colour: #cccccc;
|
|
10
|
+
$custom-text-colour: #0b0c0c;
|
|
11
|
+
$logo-image-height: 2em;
|
|
12
|
+
|
|
13
|
+
.custom-branding {
|
|
14
|
+
@if $logo-image-height != null {
|
|
15
|
+
.custom-branding-image {
|
|
16
|
+
max-height: $logo-image-height;
|
|
17
|
+
|
|
18
|
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.govuk-header {
|
|
25
|
+
background-color: $custom-banner-colour;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.govuk-header__link{
|
|
29
|
+
&:link,
|
|
30
|
+
&:visited {
|
|
31
|
+
color: $custom-text-colour;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.govuk-header__link--service-name {
|
|
36
|
+
color: $custom-text-colour;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.govuk-header__container {
|
|
40
|
+
border-bottom-color: $custom-banner-border-colour;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@include govuk-media-query($from: tablet) {
|
|
44
|
+
.govuk-header__content {
|
|
45
|
+
width: 66%;
|
|
46
|
+
vertical-align: bottom;
|
|
47
|
+
margin-bottom: 7px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.govuk-button {
|
|
52
|
+
padding: 7px 15px 6px;
|
|
53
|
+
padding: .368421053em .842105263em .315789474em;
|
|
54
|
+
}
|
|
55
|
+
}
|