northants-design-system 0.2.4 → 0.2.8
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/build/index.d.ts +6 -3
- package/build/index.esm.js +15532 -21005
- package/build/index.esm.js.map +1 -1
- package/build/index.js +15557 -21029
- package/build/index.js.map +1 -1
- package/build/library/slices/GoogleMap/GoogleMap.d.ts +7 -0
- package/build/library/slices/GoogleMap/GoogleMap.storydata.d.ts +44 -0
- package/build/library/slices/GoogleMap/GoogleMap.types.d.ts +28 -0
- package/build/library/slices/Image/Image.d.ts +8 -0
- package/build/library/slices/Image/Image.types.d.ts +22 -0
- package/build/library/slices/Promotions/Promotions.d.ts +7 -0
- package/build/library/structure/CookieBanner/CookieBanner.d.ts +3 -3
- package/build/library/structure/CookieBanner/CookieClear.d.ts +2 -2
- package/build/library/structure/PromoBlock/PromoBlock.storydata.d.ts +5 -0
- package/build/library/structure/SectionLinks/SectionLinks.d.ts +6 -3
- package/build/library/structure/SectionLinks/SectionLinks.storydata.d.ts +2 -0
- package/build/library/structure/SectionLinks/SectionLinks.types.d.ts +25 -9
- package/package.json +28 -28
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const GoogleMapWithTitleAndDescription: {
|
|
2
|
+
allowCookies: boolean;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
link_title: string;
|
|
6
|
+
link_url: string;
|
|
7
|
+
iframe_html: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const GoogleMapWithTitleOnly: {
|
|
10
|
+
title: string;
|
|
11
|
+
link_title: string;
|
|
12
|
+
link_url: string;
|
|
13
|
+
iframe_html: string;
|
|
14
|
+
allowCookies: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const GoogleMapNoTitleOrDescription: {
|
|
17
|
+
link_title: string;
|
|
18
|
+
link_url: string;
|
|
19
|
+
iframe_html: string;
|
|
20
|
+
allowCookies: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare const GoogleMapWithTitleAndDescriptionDataWithoutCookies: {
|
|
23
|
+
allowCookies: boolean;
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
link_title: string;
|
|
27
|
+
link_url: string;
|
|
28
|
+
iframe_html: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const GoogleMapWithTitleAndDescriptionDataAutodetectCookies: {
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
33
|
+
link_title: string;
|
|
34
|
+
link_url: string;
|
|
35
|
+
iframe_html: string;
|
|
36
|
+
};
|
|
37
|
+
export declare const GoogleMapWithInvalidLinks: {
|
|
38
|
+
title: string;
|
|
39
|
+
description: string;
|
|
40
|
+
link_title: string;
|
|
41
|
+
link_url: string;
|
|
42
|
+
iframe_html: string;
|
|
43
|
+
allowCookies: boolean;
|
|
44
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface GoogleMapProps {
|
|
2
|
+
/**
|
|
3
|
+
* Title text. Optional.
|
|
4
|
+
*/
|
|
5
|
+
title?: string;
|
|
6
|
+
/**
|
|
7
|
+
* The description text displayed under the title and above the map. Optional.
|
|
8
|
+
*/
|
|
9
|
+
description?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The map's iframe code as provide by the 'Embed a map' sharing option on Google Maps.
|
|
12
|
+
* Used if cookies have been accepted.
|
|
13
|
+
*/
|
|
14
|
+
iframe_html: string;
|
|
15
|
+
/**
|
|
16
|
+
* The map's URL as provided by the 'Send a link' sharing option on Google Maps.
|
|
17
|
+
* Used if cookies have not been accepted; a link will be displayed instead of an embed.
|
|
18
|
+
*/
|
|
19
|
+
link_url: string;
|
|
20
|
+
/**
|
|
21
|
+
* Title for the link used if cookies were not accepted. Optional.
|
|
22
|
+
*/
|
|
23
|
+
link_title?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Allow overriding if cookies are allowed (for stories).
|
|
26
|
+
*/
|
|
27
|
+
allowCookies?: boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageProps } from './Image.types';
|
|
3
|
+
/**
|
|
4
|
+
* Responsive image slice component that allows 4 by 3 or 16 by 9 images
|
|
5
|
+
* with an optional caption.
|
|
6
|
+
*/
|
|
7
|
+
declare const Image: React.FunctionComponent<ImageProps>;
|
|
8
|
+
export default Image;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface ImageProps {
|
|
2
|
+
/**
|
|
3
|
+
* The large image url
|
|
4
|
+
*/
|
|
5
|
+
imageLarge: string;
|
|
6
|
+
/**
|
|
7
|
+
* The small image url
|
|
8
|
+
*/
|
|
9
|
+
imageSmall: string;
|
|
10
|
+
/**
|
|
11
|
+
* The image alt text to describe the image
|
|
12
|
+
*/
|
|
13
|
+
imageAltText?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The image ratio, either '4by3' or '16by9'
|
|
16
|
+
*/
|
|
17
|
+
ratio: string;
|
|
18
|
+
/**
|
|
19
|
+
* The optional image caption that goes under the image
|
|
20
|
+
*/
|
|
21
|
+
caption?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PromoBlockProps } from '../../structure/PromoBlock/PromoBlock.types';
|
|
3
|
+
/**
|
|
4
|
+
* Combined promotional banner and promotional block for use as a slice on any page
|
|
5
|
+
*/
|
|
6
|
+
declare const Promotions: React.FunctionComponent<PromoBlockProps>;
|
|
7
|
+
export default Promotions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { CookieBannerProps } from
|
|
3
|
-
declare const CookieBanner: React.
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CookieBannerProps } from './CookieBanner.types';
|
|
3
|
+
declare const CookieBanner: React.FunctionComponent<CookieBannerProps>;
|
|
4
4
|
export default CookieBanner;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { SectionLinksProps } from
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SectionLinksProps } from './SectionLinks.types';
|
|
3
|
+
/**
|
|
4
|
+
* Display a list of links for a section with optional images
|
|
5
|
+
*/
|
|
6
|
+
declare const SectionLinks: React.FunctionComponent<SectionLinksProps>;
|
|
4
7
|
export default SectionLinks;
|
|
@@ -4,7 +4,7 @@ export interface SectionLinksProps {
|
|
|
4
4
|
*/
|
|
5
5
|
sectionTitle: string;
|
|
6
6
|
/**
|
|
7
|
-
* If there is only one section then do not
|
|
7
|
+
* If there is only one section then do not display the title
|
|
8
8
|
*/
|
|
9
9
|
displayTitle?: boolean;
|
|
10
10
|
/**
|
|
@@ -15,22 +15,38 @@ export interface SectionLinksProps {
|
|
|
15
15
|
* An array of page links that sit under this section
|
|
16
16
|
*/
|
|
17
17
|
pageLinksArray: Array<PageLinkProp>;
|
|
18
|
+
/**
|
|
19
|
+
* Should the section links have images
|
|
20
|
+
*/
|
|
21
|
+
hasImages?: boolean;
|
|
18
22
|
}
|
|
19
23
|
export interface PageLinkProp {
|
|
20
24
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
* Title of the page
|
|
26
|
+
*/
|
|
23
27
|
title: string;
|
|
24
28
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
* Summary of the page
|
|
30
|
+
*/
|
|
27
31
|
summary: string;
|
|
28
32
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
* URL of the page
|
|
34
|
+
*/
|
|
31
35
|
url: string;
|
|
32
36
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
* Is the link to an external website?
|
|
38
|
+
*/
|
|
35
39
|
isExternal?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The small image url
|
|
42
|
+
*/
|
|
43
|
+
imageSmall?: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* The large image url
|
|
46
|
+
*/
|
|
47
|
+
imageLarge?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* The image alt text
|
|
50
|
+
*/
|
|
51
|
+
imageAltText?: string | null;
|
|
36
52
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "northants-design-system",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Design system for West & North Northamptonshire Councils, two unitary councils encompassing Wellingborough, Corby, Daventry, East Northants, Kettering, Northampton, Northamptonshire County and South Northants.",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/wearefuturegov/northants-design-system.git"
|
|
10
10
|
},
|
|
11
|
-
"author": "FutureGov",
|
|
11
|
+
"author": "West Northants Council & FutureGov",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/wearefuturegov/northants-design-system/issues"
|
|
@@ -48,58 +48,58 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/core": "^7.16.7",
|
|
51
|
-
"@babel/preset-env": "^7.16.
|
|
51
|
+
"@babel/preset-env": "^7.16.11",
|
|
52
52
|
"@babel/preset-typescript": "^7.16.7",
|
|
53
53
|
"@etchteam/storybook-addon-status": "^4.1.0",
|
|
54
|
-
"@rollup/plugin-commonjs": "^
|
|
55
|
-
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
54
|
+
"@rollup/plugin-commonjs": "^21.0.0",
|
|
56
55
|
"@rollup/plugin-json": "~4.1.0",
|
|
57
|
-
"@
|
|
58
|
-
"@storybook/addon-
|
|
59
|
-
"@storybook/addon-
|
|
60
|
-
"@storybook/addon-
|
|
61
|
-
"@storybook/
|
|
62
|
-
"@storybook/
|
|
63
|
-
"@storybook/
|
|
64
|
-
"@
|
|
65
|
-
"@testing-library/
|
|
56
|
+
"@rollup/plugin-node-resolve": "^13.1.0",
|
|
57
|
+
"@storybook/addon-a11y": "~6.4.19",
|
|
58
|
+
"@storybook/addon-essentials": "~6.4.19",
|
|
59
|
+
"@storybook/addon-ie11": "0.0.6",
|
|
60
|
+
"@storybook/addon-links": "~6.4.19",
|
|
61
|
+
"@storybook/builder-webpack5": "~6.4.19",
|
|
62
|
+
"@storybook/manager-webpack5": "~6.4.19",
|
|
63
|
+
"@storybook/react": "~6.4.19",
|
|
64
|
+
"@testing-library/jest-dom": "^5.16.2",
|
|
65
|
+
"@testing-library/react": "^12.0.0",
|
|
66
66
|
"@types/jest": "^27.4.0",
|
|
67
67
|
"@types/react": "^17.0.38",
|
|
68
68
|
"@types/react-dom": "^17.0.11",
|
|
69
69
|
"@types/styled-components": "^5.1.19",
|
|
70
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
71
|
-
"@typescript-eslint/parser": "^
|
|
72
|
-
"babel-jest": "^27.
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^5.12.0",
|
|
71
|
+
"@typescript-eslint/parser": "^5.12.0",
|
|
72
|
+
"babel-jest": "^27.5.1",
|
|
73
73
|
"babel-loader": "^8.2.3",
|
|
74
74
|
"babel-preset-react-app": "^10.0.1",
|
|
75
75
|
"dayjs": "^1.10.7",
|
|
76
|
-
"eslint": "^
|
|
77
|
-
"eslint-config-airbnb": "^
|
|
76
|
+
"eslint": "^8.9.0",
|
|
77
|
+
"eslint-config-airbnb": "^19.0.0",
|
|
78
78
|
"eslint-plugin-import": "^2.25.4",
|
|
79
79
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
80
80
|
"eslint-plugin-react": "^7.28.0",
|
|
81
81
|
"eslint-plugin-react-hooks": "^4.3.0",
|
|
82
|
-
"eslint-plugin-storybook": "^0.
|
|
82
|
+
"eslint-plugin-storybook": "^0.5.6",
|
|
83
83
|
"identity-obj-proxy": "^3.0.0",
|
|
84
|
-
"jest": "^
|
|
84
|
+
"jest": "^27",
|
|
85
85
|
"jsuri": "^1.3.1",
|
|
86
86
|
"node-sass": "^7.0.1",
|
|
87
87
|
"react": "^17.0.2",
|
|
88
88
|
"react-dom": "^17.0.2",
|
|
89
|
-
"rollup": "~2.
|
|
89
|
+
"rollup": "~2.67.2",
|
|
90
90
|
"rollup-plugin-copy": "^3.4.0",
|
|
91
91
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
92
92
|
"rollup-plugin-postcss": "^4.0.2",
|
|
93
93
|
"rollup-plugin-svg": "^2.0.0",
|
|
94
|
-
"rollup-plugin-typescript2": "^0.
|
|
95
|
-
"sass-loader": "^
|
|
94
|
+
"rollup-plugin-typescript2": "^0.31.2",
|
|
95
|
+
"sass-loader": "^12.0.0",
|
|
96
96
|
"styled-components": "^5.3.3",
|
|
97
|
-
"ts-jest": "^
|
|
97
|
+
"ts-jest": "^27",
|
|
98
98
|
"typescript": "^4.5.4",
|
|
99
|
-
"webpack": "^5.
|
|
99
|
+
"webpack": "^5.69.0"
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
|
-
"axios": "^0.
|
|
102
|
+
"axios": "^0.26.0",
|
|
103
103
|
"core-js": "^3.20.2",
|
|
104
104
|
"downshift": "^6.1.7",
|
|
105
105
|
"html-react-parser": "^1.4.5",
|