northants-design-system 0.2.3 → 0.2.7
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 +12200 -11988
- package/build/index.esm.js.map +1 -1
- package/build/index.js +12203 -11988
- package/build/index.js.map +1 -1
- package/build/library/pages/ServiceLandingPageExample/ServiceLandingPageExample.storydata.d.ts +2 -0
- package/build/library/pages/ServiceLandingPageExample/ServiceLandingPageExample.types.d.ts +10 -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/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/build/library/structure/Breadcrumbs/Breadcrumbs.types.d.ts +10 -6
- 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 +9 -9
package/build/library/pages/ServiceLandingPageExample/ServiceLandingPageExample.storydata.d.ts
CHANGED
|
@@ -2,8 +2,10 @@ import { SectionLinksProps } from '../../structure/SectionLinks/SectionLinks.typ
|
|
|
2
2
|
import { FooterLinkProp } from '../../structure/Footer/Footer.types';
|
|
3
3
|
import { BreadcrumbProp } from '../../structure/Breadcrumbs/Breadcrumbs.types';
|
|
4
4
|
import { ServicesLinksListProps } from '../../structure/ServicesLinksList/ServicesLinksList.types';
|
|
5
|
+
import { AlertBannerServiceProps } from '../../structure/AlertBannerService/AlertBannerService.types';
|
|
5
6
|
export declare const threeTopServicesData: ServicesLinksListProps;
|
|
6
7
|
export declare const sixTopServicesData: ServicesLinksListProps;
|
|
7
8
|
export declare const sections: SectionLinksProps[];
|
|
8
9
|
export declare const footerLinks: FooterLinkProp[];
|
|
9
10
|
export declare const breadcrumbs: BreadcrumbProp[];
|
|
11
|
+
export declare const serviceAlert: AlertBannerServiceProps;
|
|
@@ -3,6 +3,7 @@ import { FooterLinkProp } from '../../structure/Footer/Footer.types';
|
|
|
3
3
|
import { HeroImageProps } from '../../structure/HeroImage/HeroImage.types';
|
|
4
4
|
import { SectionLinksProps } from '../../structure/SectionLinks/SectionLinks.types';
|
|
5
5
|
import { ServicesLinksListProps } from '../../structure/ServicesLinksList/ServicesLinksList.types';
|
|
6
|
+
import { AlertBannerServiceProps } from '../../structure/AlertBannerService/AlertBannerService.types';
|
|
6
7
|
export interface ServiceLandingPageExampleProps {
|
|
7
8
|
/**
|
|
8
9
|
* The Service landing page title
|
|
@@ -35,9 +36,17 @@ export interface ServiceLandingPageExampleProps {
|
|
|
35
36
|
/**
|
|
36
37
|
* Summary text describing the page
|
|
37
38
|
*/
|
|
38
|
-
summary?:
|
|
39
|
+
summary?: string;
|
|
39
40
|
/**
|
|
40
41
|
* Should the summary be displayed
|
|
41
42
|
*/
|
|
42
43
|
showSummary?: Boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Optional service alert banner
|
|
46
|
+
*/
|
|
47
|
+
serviceAlert?: AlertBannerServiceProps;
|
|
48
|
+
/**
|
|
49
|
+
* Optional heading icon
|
|
50
|
+
*/
|
|
51
|
+
icon?: string;
|
|
43
52
|
}
|
|
@@ -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 { BreadcrumbsProps } from
|
|
3
|
-
declare const Breadcrumbs: React.
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BreadcrumbsProps } from './Breadcrumbs.types';
|
|
3
|
+
declare const Breadcrumbs: React.FunctionComponent<BreadcrumbsProps>;
|
|
4
4
|
export default Breadcrumbs;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
export interface BreadcrumbsProps {
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
* An array of the breadcrumbs, each with a title and a URL not including the current page users are on
|
|
4
|
+
*/
|
|
5
5
|
breadcrumbsArray: Array<BreadcrumbProp>;
|
|
6
|
+
/**
|
|
7
|
+
* Should the breadcrumbs have bottom margin
|
|
8
|
+
*/
|
|
9
|
+
hasMargin?: boolean;
|
|
6
10
|
}
|
|
7
11
|
export interface BreadcrumbProp {
|
|
8
12
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
* Title of the page
|
|
14
|
+
*/
|
|
11
15
|
title: string;
|
|
12
16
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
* URL of the page
|
|
18
|
+
*/
|
|
15
19
|
url: string;
|
|
16
20
|
}
|
|
@@ -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.7",
|
|
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"
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
55
55
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
56
56
|
"@rollup/plugin-json": "~4.1.0",
|
|
57
|
-
"@storybook/addon-a11y": "~6.4.
|
|
58
|
-
"@storybook/addon-essentials": "~6.4.
|
|
57
|
+
"@storybook/addon-a11y": "~6.4.18",
|
|
58
|
+
"@storybook/addon-essentials": "~6.4.18",
|
|
59
59
|
"@storybook/addon-ie11": "0.0.1",
|
|
60
|
-
"@storybook/addon-links": "~6.4.
|
|
61
|
-
"@storybook/builder-webpack5": "~6.4.
|
|
62
|
-
"@storybook/manager-webpack5": "~6.4.
|
|
63
|
-
"@storybook/react": "~6.4.
|
|
60
|
+
"@storybook/addon-links": "~6.4.18",
|
|
61
|
+
"@storybook/builder-webpack5": "~6.4.18",
|
|
62
|
+
"@storybook/manager-webpack5": "~6.4.18",
|
|
63
|
+
"@storybook/react": "~6.4.18",
|
|
64
64
|
"@testing-library/jest-dom": "^5.16.1",
|
|
65
65
|
"@testing-library/react": "^10.4.9",
|
|
66
66
|
"@types/jest": "^27.4.0",
|